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 = 575)
}([function (e, t, i) {
    e.exports = i(66)(137)
}, function (e, t, i) {
    "use strict";

    function n(e, t, i, n, o, r, a, 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), r && (d._scopeId = "data-v-" + r), a ? (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(a)
        }, 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";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t, i, n, o, r, a, s, l, d, u, c, h, f, p, g, m, v, y, w, k, T, b;
        !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"
        }(r = 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"
        }(a = 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"
        }(w = 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"
        }(k = 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"
        }(T = 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"
        }(b = e.XLDownloadStrategy || (e.XLDownloadStrategy = {}))
    }(t.DownloadKernel || (t.DownloadKernel = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

    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 = a.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 === a.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 r.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 r = (e, n) => {
                        e ? (s.error("register error", e.message), i(n)) : i(t)
                    };
                    this.retCallbackMap[n] = Object.assign({callback: r}, 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 === a.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 r = (e, t) => {
                        i(!e && t)
                    };
                    this.retCallbackMap[n] = Object.assign({callback: r}, 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 r = {rid: o, method: t, args: i};
                    let a = (t, i) => {
                        t ? (s.error("callServerFunction error", t, e.getContext()), n([null, t])) : n([i, void 0])
                    };
                    this.retCallbackMap[o] = Object.assign({callback: a}, r), this.sendAdapter(e, r)
                } 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 r = (e, t) => {
                        i(e ? [!1, e] : [t, "success"])
                    };
                    this.retCallbackMap[n] = Object.assign({callback: r}, 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 r = {
                        action: "check_client_function_exist",
                        method: i,
                        rid: o,
                        src: this.getFullContextName(this.client),
                        dst: this.getFullContextName(e, t)
                    };
                    let a = (e, t) => {
                        n(!e && t)
                    };
                    this.retCallbackMap[o] = Object.assign({callback: a}, r), this.sendAdapter(e, r)
                } while (0)
            })
        }

        internalCallRemoteClientFunction(e, t, i, ...n) {
            return new Promise((o, r) => {
                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 r = (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 a = this.generateId();
                    const l = {
                        src: this.getFullContextName(this.client),
                        dst: this.getFullContextName(e, t),
                        action: "call_remote_client_api",
                        method: i,
                        args: n,
                        rid: a
                    };
                    this.retCallbackMap[a] = Object.assign({callback: r}, 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] = {}), a.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], a.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, r = !1;
            do {
                const a = this.contextCallbackMap[t];
                if (!a) {
                    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 = a.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)
                    }), r = !0;
                    break
                }
                o.success = !0, o.data = this.convertFunction2IdEx(l)
            } while (0);
            !r && 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 r = 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(r) : [].concat(r)
                }, !this.apis || !this.apis[o]) {
                    i.error = `callRegisterFunction ${o} is undefined`;
                    break
                }
                let a = void 0, s = this.decodeParameter(t.args, t.src);
                try {
                    a = this.apis[o].apply(null, [t.src].concat(s))
                } catch (e) {
                    i.error = e.message;
                    break
                }
                if (a && a.then) {
                    a.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(a)
            } while (0);
            s.information("callRegisterFunction", i), !n && i && this.sendAdapter(e, i)
        }
    }), d = global.__xdasIPCClienInstance, t.client = d
}, function (e, t) {
    e.exports = require("util")
}, function (e, t, i) {
    e.exports = i(66)(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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), r = i(2), a = i(5), s = i(600), l = a.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 a(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 = r.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 : r.dirname(e) === e ? i = !1 : (yield m(r.dirname(e))) && (i = yield a(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), r = o.createWriteStream(i);
                    n = new Promise(e => {
                        t.pipe(r).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), r = s.createInterface({input: n});
                        r.on("line", e => {
                            i.push(e)
                        }), r.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 = a, 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, a = yield f(i);
                if (a.isDirectory()) {
                    n = yield m(o);
                    let s = (yield h(i)) || [];
                    for (let l = 0; l < s.length; l++) {
                        let d = r.join(i, s[l]), u = r.join(o, s[l]);
                        (n = yield t(d)) && (n = (a = 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(54))).tmpdir();
                try {
                    e = yield t(`${n}${r.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 = r.normalize(e), i = r.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 = r.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(r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(7), a = i(0).default.getLogger("XLStat");
    let s = r.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 = "", r = 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(a => {
                        n = i().asyncTrackEvent(e, t, o, r, s, d, u, f, h, e => {
                            a(e)
                        })
                    }) : i().trackEvent(e, t, o, r, s, d, u, f, h), a.information(e, t, o, r, s, d, u, f, h)
                } while (0);
                return n
            })
        }

        function r(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, r = 0, a = 0, s = 0, l = "", d = 0) {
            o(e, t, i, n, r, a, s, l, d).catch()
        }, e.trackClick = r, e.trackShow = function (e, t = 0) {
            r(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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), r = i(2), a = i(0), s = i(44), l = i(8), d = i(14), u = i(13), c = a.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 = r.join(e, "云盘缓存"); else {
                    let t = yield u.ThunderUtil.getThunderTempPath(!0);
                    e = r.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.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(2), a = i(0), s = i(7), l = i(44), d = i(8), u = i(14), c = i(42), h = i(3), f = i(31),
        p = i(601), g = i(16), m = i(43), v = i(25), y = i(32), w = i(4), k = i(5), T = i(48), b = i(22), C = i(37),
        S = i(55), I = i(101), _ = g.DownloadKernelEventManager.getEventManager(),
        A = m.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        D = v.DownloadKernelCategoryManager.getCategoryManager(), x = a.default.getLogger("DownloadKernel.TaskManager"),
        N = s.default(r.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, a = t.categoryId;
                if (t.privateSpace) {
                    let e = D.getCurrentPrivateCategory();
                    e && (a = 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 r = o.createP2spTask(t.isBackground, t.taskBaseInfo, t.p2spTaskInfo, a);
                        t.taskBaseInfo.groupTaskId && t.taskBaseInfo.groupTaskId > 0 && (n = !0), t.isBackground && this.backgroundTasks.push(r)
                    }
                        break;
                    case h.DownloadKernel.TaskType.Bt:
                        yield o.createBtTask(t.isBackground, t.taskBaseInfo, t.btTaskInfo, a);
                        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, a), t.taskBaseInfo.groupTaskId && t.taskBaseInfo.groupTaskId > 0 && (n = !0)
                    }
                        break;
                    case h.DownloadKernel.TaskType.Group: {
                        let i = r.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 = r.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, a)
                    }
                        break;
                    case h.DownloadKernel.TaskType.Magnet:
                        o.createMagnetTask(t.isBackground, t.taskBaseInfo, t.magnetTaskInfo, a);
                        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 a = 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 = r.join(c.taskBaseInfo.savePath, c.taskBaseInfo.taskName);
                    this.setGroupTaskRelativePath(u, c.taskBaseInfo.savePath, o);
                    let m = a.get(g);
                    if (k.isNumber(m) || (m = 0), void 0 === s && (s = c.categoryId, c.privateSpace)) {
                        let e = D.getCurrentPrivateCategory();
                        e && (s = e.getId())
                    }
                    let v = yield this.getTaskName(f, c.taskBaseInfo.savePath, c.taskBaseInfo.taskName, m, c.taskBaseInfo.origin);
                    a.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 ? D.getCategoryView(s, h.DownloadKernel.CategroyViewID.Downloading) : A.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]) : (x.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]) : (x.warning("task start fail! taskId", e), this.removeStartTask(e))
                    })).catch())
                } else x.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)) : x.warning("task stop fail! taskId", e) : x.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)) : x.warning("task stop fail! taskId", e) : x.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), r = [i];
                null !== o && o.removeTask(r), this.removeTask(e);
                let a = f.ThunderKernel.beginTransaction();
                i.deleteStorageTask(), f.ThunderKernel.commitTransaction(a);
                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) {
                        x.warning("deleteBatchTask task", n);
                        continue
                    }
                    let r = n.getTaskStatus();
                    r === h.DownloadKernel.TaskStatus.StartPending || r === h.DownloadKernel.TaskStatus.Started ? o.push(n) : i.push(n), I.ThunderPanTaskNS.deleteTask(null, null, n.getId())
                }
                let r = !0, a = {};
                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);
                        a[o] || (a[o] = []), a[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 a) {
                        if (!a[e]) continue;
                        let t = this.getTaskCategoryView(a[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];
                        r = (yield t.deleteFile()) && r
                    }
                    _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskDestroyed, i, r)
                }
                return o.length > 0 && (yield new Promise(e => {
                    let i = 0;
                    for (let a = 0; a < o.length; ++a) {
                        let s = o[a], 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 a = f.ThunderKernel.beginTransaction();
                            s.deleteStorageTask(), f.ThunderKernel.commitTransaction(a), t && (r = (yield s.deleteFile()) && r), _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskDestroyed, [s], r), i === o.length && e()
                        })).catch()
                    }
                })), r
            })
        }

        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];
                        A.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];
                        A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed).removeTask(e)
                    } else {
                        let i = [t];
                        A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading).removeTask(i), this.removeStartTask(e)
                    }
                    t.moveToRecycle();
                    let n = A.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]), r = o.getTaskStatus();
                    r === h.DownloadKernel.TaskStatus.StartPending || r === 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), A.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 = A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed), i = [e];
                        t.removeTask(i)
                    } else {
                        A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading).removeTask([e]), this.removeStartTask(t)
                    }
                    e.moveToRecycle(), A.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 = A.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 = A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed), t = [];
                    t.push(i), e.insertTask(t, h.DownloadKernel.TaskInsertReason.Recover)
                } else {
                    let e = A.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) {
                A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Recycle).removeTask(t)
            }
            if (i.length > 0) {
                A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed).insertTask(i, h.DownloadKernel.TaskInsertReason.Recover)
            }
            if (n.length > 0) {
                A.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(),
                        r = n.getTaskAttribute(h.DownloadKernel.TaskAttribute.FileSize);
                    switch (r > 0 && (t.taskBaseInfo.fileSize = r), 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 r = n.getTaskStatus();
                    r === h.DownloadKernel.TaskStatus.Started || r === h.DownloadKernel.TaskStatus.StartPending || r === h.DownloadKernel.TaskStatus.StartWaiting ? (i = yield this.stopTaskAW(e, h.DownloadKernel.TaskStopReason.MoveTask), i = (r = n.getTaskStatus()) === h.DownloadKernel.TaskStatus.Succeeded || r === 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), r = null;
                if (!(r = -1 === e ? A.getCategoryViewFromId(o) : D.getCategoryView(e, o))) break;
                let a = null;
                if (!(a = -1 === t ? A.getCategoryViewFromId(o) : D.getCategoryView(t, o))) break;
                let s = [];
                if (s.push(n), r.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)
                    }
                }
                a.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 (x.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 (x.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 (x.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) {
                        x.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) {
                                x.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 (x.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 = [], r = [];
                for (let a = 0; a < e.length; ++a) {
                    let s = e[a], 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 && r.push(l))
                }
                let a = [];
                if (t.length <= 0 && i.length <= 0 && n.length <= 0 && o.length <= 0 && r.length <= 0) return a;
                if (t.length > 0) {
                    let e = yield this.batchFindP2spTask(t);
                    e && e.length > 0 && (a = a.concat(e))
                }
                if (i.length > 0) {
                    let e = yield this.batchFindEmuleTask(i);
                    e && e.length > 0 && (a = a.concat(e))
                }
                if (n.length > 0) {
                    let e = yield this.batchFindBtTask(n);
                    e && e.length > 0 && (a = a.concat(e))
                }
                if (o.length > 0) {
                    let e = this.batchFindMagnetTask(o);
                    e && e.length > 0 && (a = a.concat(e))
                }
                if (r.length > 0) {
                    let e = yield this.batchFindGroupTask(r);
                    e && e.length > 0 && (a = a.concat(e))
                }
                return x.information("batchFindTaskAsync keyInfos:", e, ", ret:", a), a
            })
        }

        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], r = this.tasks.get(o), a = !1;
                r && (a = r.queryTaskInfo(e => {
                    this.taskStatusChanage([e])
                }, (e, t) => {
                    this.taskDetailChanage([e], t)
                }, () => {
                    ++e === t && f.ThunderKernel.commitTransaction(i)
                })), a || ++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, r = "";
                    do {
                        if (!t) break;
                        if (r = t.userID, x.information(`stat dk userId ${t.userID}`, t), !t.vipList) break;
                        if (!t.vipList[0]) break;
                        if (x.information(`stat dk isVip ${t.vipList[0].isVip}`), "0" === (i = "1" === String(t.vipList[0].isVip) ? "1" : "0")) break;
                        x.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(r, "");
                    let a = `isvip=${i},viptype=${n},viplevel=${o},userchannel=${e}`;
                    x.information("stat dk extinfo", a), f.ThunderKernel.setGlobalExtInfo(a, !1)
                }); else {
                    f.ThunderKernel.setUserInfo("", "");
                    let t = `isvip=0,viptype=,viplevel=0,userchannel=${e}`;
                    x.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], r = this.getTaskFromTaskId(o);
                if (!r) continue;
                if (void 0 !== t && null !== t || (t = !0), !t && r.getIsPrivate()) continue;
                if (r.getTaskStatus() !== h.DownloadKernel.TaskStatus.Started) continue;
                let a = r.getDownloadSpeed();
                r.getTaskAttribute(h.DownloadKernel.TaskAttribute.Background) ? e && (i += a) : i += a
            }
            return i
        }

        getTotalTaskVipSpeed(e, t) {
            let i = 0;
            for (let n = 0; n < this.startTasks.length; ++n) {
                let o = this.startTasks[n], r = this.getTaskFromTaskId(o);
                if (!r) continue;
                if (void 0 !== t && null !== t || (t = !0), !t && r.getIsPrivate()) continue;
                if (r.getTaskStatus() !== h.DownloadKernel.TaskStatus.Started) continue;
                let a = r.getVipSpeed();
                r.getTaskAttribute(h.DownloadKernel.TaskAttribute.Background) ? e && (i += a) : i += a
            }
            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 r = o[n];
                                        if (!r) continue;
                                        let a = r.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskId);
                                        if (e !== a) continue;
                                        let s = r.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) {
                        x.warning(e)
                    }
                    if (null == n) break;
                    let o = this.tasks.get(e);
                    if (!o) break;
                    let r = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType);
                    if (r !== h.DownloadKernel.TaskType.Bt && r !== h.DownloadKernel.TaskType.Group) break;
                    o.getTaskAttribute(h.DownloadKernel.TaskAttribute.RecycleTime) > 0 && this.recoverFromRecycle(e);
                    let a = o.getTaskStatus();
                    if (a !== h.DownloadKernel.TaskStatus.Started && a !== h.DownloadKernel.TaskStatus.StartPending || (yield this.stopTaskAW(e, h.DownloadKernel.TaskStopReason.SelectDownloadLists), a = o.getTaskStatus()), r === h.DownloadKernel.TaskType.Bt) {
                        o.getExtraObject().setDownloadFile(n)
                    } else if (r === h.DownloadKernel.TaskType.Group) {
                        o.getExtraObject().setDownloadTask(n)
                    }
                    if (a === h.DownloadKernel.TaskStatus.StartWaiting) {
                        if (this.taskStatusChanage([o]), r === h.DownloadKernel.TaskType.Group) {
                            o.getExtraObject().updateTaskDetail()
                        } else if (r === h.DownloadKernel.TaskType.Bt) {
                            let t = o.getExtraObject(), i = t.getFileSize();
                            o.internalSetFileSize(i) && this.taskDetailChanage([o], h.DownloadKernel.TaskDetailChangedFlags.FileSize);
                            let n = [], r = t.getBtFileList();
                            for (let [, e]of r) {
                                let t = e.getBtDownloadFileInfo();
                                n.push(t)
                            }
                            _.fireTaskEvent(h.DownloadKernel.TaskEventType.BtSubFileDetailChanged, e, n)
                        }
                    } else if (a === h.DownloadKernel.TaskStatus.Succeeded || a === h.DownloadKernel.TaskStatus.Seeding) {
                        let e = null, t = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryId);
                        if (e = void 0 !== t && t > -1 ? D.getCategoryView(t, h.DownloadKernel.CategroyViewID.Completed) : A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed)) {
                            let t = [];
                            t.push(o), e.removeTask(t)
                        }
                        let i = null;
                        if (i = void 0 !== t && t > -1 ? D.getCategoryView(t, h.DownloadKernel.CategroyViewID.Downloading) : A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading)) {
                            if (r === 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) I.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 ? A.getCategoryViewFromId(n) : D.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),
                        r = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskUrl),
                        a = 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: r,
                        refUrl: a,
                        cookie: s,
                        useOriginResourceOnly: e.getOriginOnlyStrategy() ? 1 : 0,
                        nameFixed: u.getNameFixed()
                    };
                    t && t.p2spTaskInfo && (void 0 !== t.p2spTaskInfo.useOriginResourceOnly ? (x.information("redownload redefine orign", t.p2spTaskInfo.useOriginResourceOnly), c.useOriginResourceOnly = t.p2spTaskInfo.useOriginResourceOnly ? 1 : 0) : x.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),
                        r = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath), a = 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 = r)) : g = {
                        taskName: o,
                        savePath: r
                    };
                    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: a
                    })
                }
                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),
                        r = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskUrl), a = 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 = r : l = {url: r}, i = yield this.createTask(h.DownloadKernel.TaskType.Emule, {
                        taskBaseInfo: s,
                        emuleTaskInfo: l,
                        privateSpace: a
                    })
                }
                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), r = e.getIsPrivate(),
                        a = e.getExtraObject(), s = a.getSubTaskCount(), l = [];
                    for (let e = 0; e < s; ++e) {
                        let i = a.getSubTaskByIndex(e);
                        if (i) {
                            let n = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName),
                                o = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath),
                                a = 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: r};
                            if (c === h.DownloadKernel.TaskType.P2sp) {
                                let e = i.getExtraObject();
                                f.taskType = c, f.p2spTaskInfo = {
                                    url: a,
                                    refUrl: s,
                                    cookie: d,
                                    downloadSubTask: u,
                                    nameFixed: e.getNameFixed()
                                }, l.push(f)
                            } else c === h.DownloadKernel.TaskType.Emule && (f.taskType = c, f.emuleTaskInfo = {
                                url: a,
                                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: r
                    })
                }
                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);
                x.information("set taskStrategy", o), e.setDispatchStrategy(o);
                let r = null;
                t && (t.birdKey || t.searchSource) && (t.taskType === h.DownloadKernel.TaskType.P2sp ? r = e.getExtraObject() : t.taskType === h.DownloadKernel.TaskType.Bt ? r = e.getExtraObject() : t.taskType === h.DownloadKernel.TaskType.Emule ? r = e.getExtraObject() : t.taskType === h.DownloadKernel.TaskType.Group ? r = e.getExtraObject() : (t.taskType, h.DownloadKernel.TaskType.Magnet), r && (t.birdKey && r.setUserData(S.TaskUserDataGUID.guidBirdKey, "birdKey", t.birdKey), t.searchSource && r.setUserData(S.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 ? D.getCategoryView(o, i) : A.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();
                    x.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();
                    x.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 = [], r = new Map, a = 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 = a.get(l.categoryId);
                                    e || (e = [], a.set(l.categoryId, e)), e.push(u)
                                } else {
                                    let e = r.get(l.categoryId);
                                    e || (e = [], r.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 = A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading);
                        e && e.insertTask(i, h.DownloadKernel.TaskInsertReason.LoadTaskBasic)
                    }
                    if (n.length > 0) {
                        let e = A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed);
                        e && e.insertTask(n, h.DownloadKernel.TaskInsertReason.LoadTaskBasic)
                    }
                    if (o.length > 0) {
                        let e = A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Recycle);
                        e && e.insertTask(o, h.DownloadKernel.TaskInsertReason.LoadTaskBasic)
                    }
                    for (let [e, t]of r) {
                        let i = D.getCategoryView(e, h.DownloadKernel.CategroyViewID.Downloading);
                        i ? i.insertTask(t, h.DownloadKernel.TaskInsertReason.LoadTaskBasic) : x.warning("getCategoryView failed! categoryId:", e, ", categoryViewId:", h.DownloadKernel.CategroyViewID.Downloading)
                    }
                    for (let [e, t]of a) {
                        let i = D.getCategoryView(e, h.DownloadKernel.CategroyViewID.Completed);
                        i ? i.insertTask(t, h.DownloadKernel.TaskInsertReason.LoadTaskBasic) : x.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], r = o.taskId, a = this.getTaskFromTaskId(r);
                                a && (this.setGroupTaskRelativePath(a, o.savePath, n), e.addSubTask(a))
                            }
                        }
                    }
                }
                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 ? A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading) : D.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 ? A.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed) : D.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, r, a) => {
                    r === i && (n ? a && (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 a = void 0, s = void 0, l = o.getTaskStatus(),
                        u = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType),
                        c = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath);
                    if (yield T.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 = r.join(c, e), f = i.getInfoId() + ".torrent", p = r.join(c, f);
                        if (p += "\r\n", l === h.DownloadKernel.TaskStatus.Succeeded || l === h.DownloadKernel.TaskStatus.Seeding) a = (u += "\r\n") + p; else {
                            let e = u + ".bt.xltd";
                            (yield d.FileSystemAWNS.existsAW(e)) || (e = u + ".bt.td"), a = (e += "\r\n") + p
                        }
                        s = t
                    } else {
                        let f = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName), p = void 0,
                            g = yield T.SingleBtTaskNS.getCorrectSingleBtFolder(o);
                        p = g ? r.join(c, g) : r.join(c, f);
                        let m = r.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) a = p, s = m; else if (u === h.DownloadKernel.TaskType.Bt) {
                            if (g) {
                                let e = o.getExtraObject().getInfoId() + ".torrent", t = r.join(c, e);
                                a = p + "\r\n" + (t += "\r\n")
                            } else a = 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) {
                            a = p + ".xltd\r\n" + (p + ".xltd.cfg\r\n"), s = t
                        } else if (u === h.DownloadKernel.TaskType.Emule) {
                            a = 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 = r.join(c, e);
                                a = p + "\r\n" + (t += "\r\n")
                            } else a = p;
                            s = (yield d.FileSystemAWNS.existsAW(m)) ? t : m
                        } else u === h.DownloadKernel.TaskType.Group && (n = yield this.moveGroupTask(e, t, i))
                    }
                    void 0 !== a && void 0 !== s && (o.setTaskMovingState(!0), n = yield this.moveTaskFiles(a, s, e, u), o.setTaskMovingState(!1)), n && u !== h.DownloadKernel.TaskType.Group && (o.setSavePath(t), i && (yield this.startTask(e)), w.client.callServerFunction("ShowMessageToast", {
                        message: "移动成功",
                        type: "success"
                    }).catch())
                } while (0);
                return n
            })
        }

        moveGroupTask(e, t, o) {
            return n(this, void 0, void 0, function* () {
                let n = !1;
                do {
                    let a = this.tasks.get(e);
                    if (!a) break;
                    let s = a.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType);
                    if (s !== h.DownloadKernel.TaskType.Group) break;
                    let l = a.getExtraObject();
                    if (!l) break;
                    if (!l.getSubTaskByIndex(0)) break;
                    let u = a.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath),
                        c = a.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName), f = r.join(u, "*"),
                        p = r.join(t, c);
                    if (a.setTaskMovingState(!0), n = yield this.moveTaskFiles(f, p, e, s), a.setTaskMovingState(!1), n) {
                        let t = l.getSubTaskCount();
                        for (let e = 0; e < t; ++e) {
                            let t = l.getSubTaskByIndex(e);
                            if (t) {
                                let e = p, i = t.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath);
                                if (i === u) ; else if (i.length > u.length && i.substr(0, u.length) === u) {
                                    let t = i.slice(u.length);
                                    "\\" === t[0] && (t = t.slice(1), e = r.join(p, t))
                                }
                                t.setSavePath(e)
                            }
                        }
                        yield d.FileSystemAWNS.rmdirAW(u), a.setSavePath(p), o && (yield this.startTask(e)), w.client.callServerFunction("ShowMessageToast", {
                            message: "移动成功",
                            type: "success"
                        }).catch();
                        const {TaskUserDataGUID: n} = yield Promise.resolve().then(() => i(55));
                        let s = l.getUserData(n.guidNotSavePath, "notSavePath");
                        if (s && (u = r.normalize(u), s = r.normalize(s), 0 === u.indexOf(s))) {
                            let e = s.indexOf(":\\");
                            if (-1 !== e) {
                                let t = s.substr(0, e + ":\\".length);
                                t && d.FileSystemAWNS.deleteEmptySubDirs(s, 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, r = 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(r), 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, a) {
            return n(this, void 0, void 0, function* () {
                let n = "";
                for (; ;) {
                    if (e === h.DownloadKernel.TaskType.P2sp || e === h.DownloadKernel.TaskType.Emule) {
                        let e = r.extname(i), t = r.basename(i, e);
                        n = 0 === o ? i : t + "(" + o.toString() + ")" + e
                    } else n = 0 === o ? i : i + "(" + o.toString() + ")";
                    let s = !1, l = r.join(t, n);
                    if ("TD" !== a && "file_drag" !== a) {
                        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 = D.getCurrentPrivateCategory(), i = t ? t.getUserName() : "", n = e.getUserName();
            return !(!n || "" === n || i === n)
        }

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

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0).default.getLogger("async-remote-call"), r = i(582), a = i(20), s = i(5);
    t.asyncRemoteCall = new class extends a.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 r.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 r.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 r.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 r.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";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(2), a = i(0), s = i(8), l = i(33), d = a.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 a(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, r = e;
                for (; r >= 1e3 && !(o >= 4);) r /= 1024, o += 1;
                i = -1 === String(r).indexOf(".") ? r + n[o] : r.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"], r = 0, a = e;
                for (; a >= 1e3 && !(r >= 4);) a /= 1024, r += 1;
                if (-1 === String(a).indexOf(".")) n = a + o[r]; else {
                    let e = a.toFixed(t);
                    e.length <= i ? n = "KB" !== o[r] && "MB" !== o[r] || 1 === t ? e + o[r] : a.toFixed(1) + o[r] : ("." === (e = e.substr(0, i))[i - 1] && (e = e.substr(0, i - 1)), n = e + o[r])
                }
            }
            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 = [], r = e.length;
            for (let a = 0; a < r; a++) {
                let s = e[a];
                if ('"' !== s && "'" !== s || ("" === i ? (n = !0, i = s) : i === s && (n = !1, i = "")), " " !== s || n || a === r - 1) {
                    if (a === r - 1) {
                        let i = e.substring(t);
                        "" !== i.trim() && o.push(c(i))
                    }
                } else {
                    let i = e.substring(t, a);
                    "" !== i.trim() && o.push(c(i)), t = a + 1
                }
            }
            return o
        }, e.getThunderTempPath = function (e, t) {
            return n(this, void 0, void 0, function* () {
                const n = yield Promise.resolve().then(() => i(54));
                let o = r.join(n.tmpdir(), u);
                return t && (o = r.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 r = "", a = ["\\[", "\\^", "\\*", "\\(", "\\)", "\\|", "\\?", "\\$", "\\.", "\\+"], s = "", l = "|";
            for (let e = 0; e < o.length; e++) {
                for (let t = 0; t < a.length; t++) {
                    let i = new RegExp(a[t], "g");
                    o[e] = o[e].replace(i, a[t])
                }
                e === o.length - 1 && (l = ""), s = s.concat(o[e], l)
            }
            let d = new RegExp(s, "gi");
            return r = 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 r = Date.now();
                clearTimeout(i), r - n > t ? (e(...o), n = r) : i = setTimeout(() => {
                    e(...o), n = r
                }, 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 = a(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, r, a) {
                let s = -1;
                do {
                    if (e > t) {
                        s = t;
                        break
                    }
                    let l = Math.round((e + t) / 2), d = p(`${n.substr(0, l)}...${r}`, i);
                    if (a === d) {
                        s = l;
                        break
                    }
                    if (a > d) {
                        if (Math.round(a) === Math.round(d)) {
                            s = l;
                            break
                        }
                        s = o(l + 1, t, n, r, a)
                    } else if (d > a) {
                        if (Math.round(a) === Math.round(d)) {
                            s = l - 1;
                            break
                        }
                        s = o(e, l - 1, n, r, a)
                    }
                } while (0);
                return s
            }

            let a = e;
            do {
                if (!t) break;
                if (!e) break;
                let s = t.offsetWidth * n;
                if (s > p(e, i)) break;
                let l = r.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;
                a = `${d.substr(0, u - 2 * (n - 1))}...${l}`
            } while (0);
            return a
        }

        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";
    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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

    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 r.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 === a.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, r = this.decodeParameter(e.args, t);
                        try {
                            i = this.apis[o].apply(null, [t, e.__context].concat(r))
                        } 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: a.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(), r = (e, t) => {
                        n(e ? [null, e] : [t])
                    }, a = {s_rid: o, action: "call_client_by_id", rid: t, args: i};
                    this.retCallbackMap[o] = Object.assign({callback: r}, a), this.sendAdapter(e, a)
                }
            })
        }

        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 r = 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: r, action: "call_client_api", args: i, src: a.serverContextName, method: t};
                    this.retCallbackMap[r] = 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(), r = (e, t) => {
                            i(!e && t)
                        }, a = {s_rid: o, action: "check_client_function", method: t};
                        this.retCallbackMap[o] = Object.assign({callback: r}, a), this.sendAdapter(n, a)
                    } 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(), r = 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: r}, n), this.sendAdapter(r, 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 === a.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 r of o) this.sendAdapter(r, {
                    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, r = 0;
                for (; r < o;) {
                    let a = i[r];
                    a.addRef();
                    let s = a.fire(e, ...t);
                    a.release() ? (i.splice(r, 1), --o) : (++r, a.once && s && n.push(a))
                }
                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(119), r = i(120), a = i(70), s = i(372);
    !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(a.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 a = 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), a = n, i.pop()) : (this.jsCallbacks.set(n, o), i[t] = n)
                    }
                    s.CommonIPCRenderer.rendererCommunicator.sendMessageToRenderer(this.targetCommunitorInfo.id, {
                        name: r.CommonIPCMessage.msgNCCallNativeFunction,
                        args: [t, a].concat(i)
                    })
                } while (0)
            }

            AttachNativeEvent(t, i) {
                let r = 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 a = e.idGenerator.generateId();
                    if (e.idGenerator.isInvalidId(a)) {
                        o.error("id error");
                        break
                    }
                    if (this.eventJsCallbakcs.has(t)) this.eventJsCallbakcs.get(t).set(a, i); else {
                        let e = new Map;
                        e.set(a, i), this.eventJsCallbakcs.set(t, e)
                    }
                    r = a
                } while (0);
                return r
            }

            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 a = e.idGenerator.generateId();
                    this.jsReturnCallbacks.set(a, i), s.CommonIPCRenderer.rendererCommunicator.sendMessageToRenderer(this.targetCommunitorInfo.id, {
                        name: r.CommonIPCMessage.msgNCCheckNativeFunction,
                        args: [t, a]
                    })
                } while (0)
            }

            RegisterJSFunction(e, i) {
                let r = 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), r = t.Success
                } while (0);
                return r
            }

            bindMsgListeners() {
                s.CommonIPCRenderer.rendererCommunicator.onMessage(r.CommonIPCMessage.msgNCCallJsFunctionById, e => {
                    this.handleCallJsFunctionById(e.msg.args)
                }), s.CommonIPCRenderer.rendererCommunicator.onMessage(r.CommonIPCMessage.msgNCCallJsFunctionByName, e => {
                    this.handleCallJsFunctionByName(e.msg.args)
                }), s.CommonIPCRenderer.rendererCommunicator.onMessage(r.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 r = null, a = 0;
                    if (this.jsCallbacks.has(i) && (a = 1, r = this.jsCallbacks.get(i)), this.jsReturnCallbacks.has(i) && (a = 2, r = this.jsReturnCallbacks.get(i)), 0 === a) {
                        o.error(`callbacks[${i}] is null`);
                        break
                    }
                    t.splice(0, 1), r.apply(null, t), 2 === a && 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, r) => {
                        o.information(`value = ${t}, key = ${i}, map = ${r}`), 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: r.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(609)
}, function (e, t) {
    e.exports = require("electron")
}, function (e, t) {
    e.exports = require("events")
}, function (e, t, i) {
    "use strict";
    var n = i(50), o = i(498), r = i(500), a = i(99), s = i(62), l = i(501).http, d = i(501).https, u = i(47),
        c = i(80), h = i(621), f = i(375), p = i(499);
    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 w = u.parse(e.url), k = w.protocol || "http:";
            if (!y && w.auth) {
                var T = w.auth.split(":");
                y = (T[0] || "") + ":" + (T[1] || "")
            }
            y && delete v.Authorization;
            var b = "https:" === k, C = b ? e.httpsAgent : e.httpAgent, S = {
                path: r(w.path, e.params, e.paramsSerializer).replace(/^\?/, ""),
                method: e.method,
                headers: v,
                agent: C,
                auth: y
            };
            e.socketPath ? S.socketPath = e.socketPath : (S.hostname = w.hostname, S.port = w.port);
            var I, _ = e.proxy;
            if (!_ && !1 !== _) {
                var A = k.slice(0, -1) + "_proxy", D = process.env[A] || process.env[A.toUpperCase()];
                if (D) {
                    var x = u.parse(D);
                    if (_ = {host: x.hostname, port: x.port}, x.auth) {
                        var N = x.auth.split(":");
                        _.auth = {username: N[0], password: N[1]}
                    }
                }
            }
            if (_ && (S.hostname = _.host, S.host = _.host, S.headers.host = w.hostname + (w.port ? ":" + w.port : ""), S.port = _.port, S.path = k + "//" + w.hostname + (w.port ? ":" + w.port : "") + S.path, _.auth)) {
                var E = new Buffer(_.auth.username + ":" + _.auth.password, "utf8").toString("base64");
                S.headers["Proxy-Authorization"] = "Basic " + E
            }
            e.transport ? I = e.transport : 0 === e.maxRedirects ? I = b ? s : a : (e.maxRedirects && (S.maxRedirects = e.maxRedirects), I = b ? d : l), e.maxContentLength && e.maxContentLength > -1 && (S.maxBodyLength = e.maxContentLength);
            var P = I.request(S, function (n) {
                if (!P.aborted) {
                    clearTimeout(g), g = null;
                    var r = n;
                    switch (n.headers["content-encoding"]) {
                        case"gzip":
                        case"compress":
                        case"deflate":
                            r = r.pipe(c.createUnzip()), delete n.headers["content-encoding"]
                    }
                    var a = n.req || P, s = {
                        status: n.statusCode,
                        statusText: n.statusMessage,
                        headers: n.headers,
                        config: e,
                        request: a
                    };
                    if ("stream" === e.responseType) s.data = r, o(t, i, s); else {
                        var l = [];
                        r.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, a))
                        }), r.on("error", function (t) {
                            P.aborted || i(p(t, e, null, a))
                        }), r.on("end", function () {
                            var n = Buffer.concat(l);
                            "arraybuffer" !== e.responseType && (n = n.toString("utf8")), s.data = n, o(t, i, s)
                        })
                    }
                }
            });
            P.on("error", function (t) {
                P.aborted || i(p(t, e, null, P))
            }), e.timeout && !g && (g = setTimeout(function () {
                P.abort(), i(f("timeout of " + e.timeout + "ms exceeded", e, "ECONNABORTED", P))
            }, e.timeout)), e.cancelToken && e.cancelToken.promise.then(function (e) {
                P.aborted || (P.abort(), i(e))
            }), n.isStream(m) ? m.pipe(P) : P.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = 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 r.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 a = yield r.asyncRemoteCall.getIpcMain();
                return a.once(`message-box-init-${i}`, t => {
                    t.sender.send("message-box-init-reply", {popType: "message-box", options: e})
                }), new Promise(e => {
                    a.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 a = yield r.asyncRemoteCall.getIpcMain();
                return a.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 => {
                    a.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 r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(54), r = i(19), a = i(12), s = i(629), l = i(2), d = i(5), u = i(0), c = i(8), h = i(29), f = i(28),
        p = i(67), g = i(7), m = i(14), v = i(630), y = i(123), w = i(20), k = i(4), T = i(505), b = i(17),
        C = g.default(l.join(__rootDir, "../bin/ThunderHelper.node")), S = 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) {
                r.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* () {
                    r.ipcRenderer.once(m.NodeEventMesssageNS.eventLoginWndCreated, (e, t) => n(this, void 0, void 0, function* () {
                        let e = yield(yield a.asyncRemoteCall.getBrowserWindow()).fromId(t);
                        l(e);
                        let i = void 0, n = "unknown";
                        i = b.NativeCallModule.nativeCall.AttachNativeEvent("onLoginWndClose", e => {
                            b.NativeCallModule.nativeCall.DetachNativeEvent("onLoginWndClose", i), i = void 0, S.information("on login wnd event", e), n = e
                        }), e.once("closed", () => {
                            S.information("on login wnd close", n)
                        })
                    })), r.ipcRenderer.send(m.NodeEventMesssageNS.eventLoginWndCreate, e, t, i, o, s)
                }))
            }

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

            updateLoginWnd(e, t, i, n, o) {
                r.ipcRenderer.send(m.NodeEventMesssageNS.eventLoginWndShow, e, t, i, n, o), r.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* () {
                        r.ipcRenderer.once("personal-info-window-created", (e, t) => n(this, void 0, void 0, function* () {
                            let e = yield a.asyncRemoteCall.getBrowserWindow();
                            i(yield e.fromId(t))
                        })), r.ipcRenderer.once("personal-info-window-ready-to-show", (e, t) => {
                            k.client.broadcastEvent(T.ThunderEvent.hoverWindowReadyToShow)
                        });
                        let o = yield k.client.callServerFunction("IsLogined");
                        r.ipcRenderer.send("create-personal-info-window", e, t, o)
                    }))
                })
            }

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

            createModifierUserInfoWnd(e) {
                r.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, S.information("loginSDKHelper obj create"), this.eventEmitter = new w.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", r = C.getPublicUserDataPath(),
                            a = l.join(r, "Thunder Network/Thunder"), s = l.join(a, "/xlconfig.ini");
                        if ("" !== r && ((yield c.FileSystemAWNS.mkdirsAW(a)) && (i = C.readINI(s, n, o)), S.information("得到文件保存 peeridMd5Str:", i)), "" === i) {
                            let e = C.getPeerID();
                            i = h.ToolsUtilitiesAWNS.genarateMd5(e), S.information("重新计算 peeridStr:", e, ";peeridMd5Str:", i), (yield c.FileSystemAWNS.mkdirsAW(a)) && C.writeINI(s, n, o, i)
                        }
                        let d = C.getDmideCode(), u = h.ToolsUtilitiesAWNS.genarateMd5(d);
                        S.information("dmideCodeStr:", d, ";dmideCodeMd5Str:", u), t = u + i, e = h.ToolsUtilitiesAWNS.genarateMd5(t), this.deviceId = e
                    } while (0);
                    return S.information("deviceIDMd5Str:", e), e
                })
            }

            getInitData() {
                return n(this, void 0, void 0, function* () {
                    let e = yield k.client.callServerFunction("GetInitUserLoginParam"), t = e.clientId,
                        i = e.clientSecret, n = l.join(__rootDir, "../../Thunder.exe"), r = C.getFileVersion(n),
                        a = v.activityObj.getActivityInfo(), s = a.activityEnable, d = a.activityCssPath;
                    return S.information("getInitData:", a), 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: r,
                        thunderVersion: r,
                        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* () {
                    S.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) {
                                S.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);
                                S.information("SaveData bufStr:", e);
                                let o = new Buffer(e), r = h.ToolsUtilitiesAWNS.encryptBuffer(o, this.key);
                                n = yield this.saveDataToFile(this.loginDataPath, r)
                            } catch (e) {
                                S.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 S.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()) {
                            S.information("loadLoginDataFromFile no buf data");
                            break
                        }
                        let t = "";
                        try {
                            if (t = h.ToolsUtilitiesAWNS.decryptBuffer(e, this.key).toString(), d.isNullOrUndefined(t) || "" === t) {
                                S.information("loadLoginDataFromFile decryption bufStr is null");
                                break
                            }
                            this.loginInfo = JSON.parse(t), S.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"), S.information("loginHelper obj create")
            }

            getCurInternetState() {
                return C.getCurInternetState()
            }

            getUserHeaderAw(e) {
                return n(this, void 0, void 0, function* () {
                    S.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 S.information("leave getUserHeaderAw:", t, e), t
                })
            }

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

            updateHeaderAw(e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = "";
                    do {
                        if (S.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 S.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, S.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) {
                S.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 && (S.information("调用 logout 接口"), s.xlQuickLogin.logout())
            }

            logIn(e) {
                void 0 !== s.xlQuickLogin && "function" == typeof s.xlQuickLogin.retryLogin && (S.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(97), o = i(712), r = i(713), a = i(714), s = i(715), l = i(716), d = i(717), u = i(718), c = i(719),
        h = i(720), f = i(721), p = i(722), g = i(723), m = i(724), v = i(52), y = i(725), w = i(148);
    n.default.use(o.default);
    const k = new o.default.Store({
        modules: {
            Tabs: a.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: w.default
        }, strict: !1
    });
    t.connector = new r.default(k)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(5), a = i(608), s = i(31), l = i(71), d = i(495), 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 = a.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 (!r.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 a.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";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(62), r = i(18), a = i(0), s = i(20), l = i(9), d = i(8), u = a.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 {
                    r.default.defaults.adapter = i(21);
                    let t = new o.Agent({rejectUnauthorized: !1});
                    e = yield r.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"), 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";
    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(119), r = i(120), a = i(372), 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 a = r.CommonIPCMessage.msgNCCallJsFunctionById, s = [t].concat(i);
                    this.isWebviewInfo(e) ? this.sendMsgToWebviewNativeCall(a, s) : this.sendMsgToNativeCall(e, a, 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 a = r.CommonIPCMessage.msgNCCallJsFunctionByName, s = [t].concat(i);
                    this.isWebviewInfo(e) ? this.sendMsgToWebviewNativeCall(a, s) : this.sendMsgToNativeCall(e, a, 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 = r.CommonIPCMessage.msgNCNativeFireEvent, a = [e].concat(t);
                    this.sendMsgToWebviewNativeCall(i, a);
                    for (let e of this.nativeCallInfoList) this.sendMsgToNativeCall(e.id, i, a)
                } 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 === r.CommonIPCMessage.msgNCCallNativeFunction) {
                            this.handleWebviewCallNativeFunction(e.args[0]);
                            break
                        }
                        if (e.channel === r.CommonIPCMessage.msgNCCheckNativeFunction) {
                            this.handleWebviewCheckNativeFunction(e.args[0]);
                            break
                        }
                    } while (0)
                })
            }

            bindIPCMsgListeners() {
                a.CommonIPCRenderer.rendererCommunicator.onMessage(r.CommonIPCMessage.msgNCCallNativeFunction, e => {
                    this.handleCallNativeFunction(e)
                }), a.CommonIPCRenderer.rendererCommunicator.onMessage(r.CommonIPCMessage.msgNCCheckNativeFunction, e => {
                    this.handleCheckNativeFunction(e)
                }), a.CommonIPCRenderer.rendererCommunicator.onMessage(r.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 r = i[0];
                    if (!n.isString(r) || 0 === r.length) {
                        o.error(`funcName = ${r} error`);
                        break
                    }
                    let a = i[1];
                    if (!n.isNumber(a)) {
                        o.error(`callbackId = ${a} error`);
                        break
                    }
                    i.splice(0, 2), this.appendNativeCallInfoList(t), this.delegate.onJsCallNativeFunction(t.id, r, a, 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 r = i[0];
                    if (!n.isString(r) || 0 === r.length) {
                        o.error(`funcName = ${r} error`);
                        break
                    }
                    let a = i[1];
                    if (!n.isNumber(a)) {
                        o.error(`callbackId = ${a} error`);
                        break
                    }
                    this.appendNativeCallInfoList(t), i.splice(0, 2), this.delegate.onJsCheckNativeFunction(t.id, r, a)
                } 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 r = this.findNativeCallInfo(e);
                    if (n.isNullOrUndefined(r)) {
                        o.error("nativeCallInfo is null");
                        break
                    }
                    a.CommonIPCRenderer.rendererCommunicator.sendMessageToRenderer(r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(71), r = i(41), a = 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 a.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 a.FileSystemAWNS.existsAW(e))) {
                    let i = r.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, ""), r = n.update(e), a = n.final();
                i = Buffer.concat([r, a])
            } 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, ""), r = n.update(e), a = n.final();
                i = Buffer.concat([r, a])
            } 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 r = null;
            try {
                r = o.createHmac(e, t).update(i, "utf8").digest(n)
            } catch (e) {
                s.warning("encryptSha1Buffer", e)
            }
            return r
        }, 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 r = [];
                    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 && r.push(t)
                    }
                    let a = i.readUIntLE(0, 4);
                    e.setForegroundWindow(a) ? s.information("setForegroundWindow sucessful") : s.information("setForegroundWindow failed"), r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(12), a = i(2), s = i(0), l = i(44), d = i(3), u = i(16), c = i(34), h = i(14), f = i(32),
        p = i(376), g = i(25), m = i(43), v = i(13), y = i(33), w = i(8), k = s.default.getLogger("DownloadMgr"),
        T = u.DownloadKernelEventManager.getEventManager(),
        b = m.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        C = g.DownloadKernelCategoryManager.getCategoryManager(), S = [{
            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 I = 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 && C.isPrivateCategory(e) && (n = this.noneReactiveTaskMaps.taskListPrivate), n[t] = i
        }

        getTaskBases(e, t) {
            let i = {}, n = this.noneReactiveTaskMaps.taskList;
            return -1 !== e && C.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 && C.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 r.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: S});
                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 r = "", s = r = i.taskType === d.DownloadKernel.TaskType.Group ? n : a.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 = a.join(t, n);
                            if (yield w.FileSystemAWNS.existsAW(l)) {
                                s = l;
                                break
                            }
                            y.ThunderHelper.extractIcon(r, l) && (s = l)
                        } while (0);
                        t.push({type: "task", title: o, iconPath: s, iconIndex: 0, args: "", program: r})
                    }
                } else t.push({type: "task", title: "最近没有完成任务", program: ""});
                t.length > 0 && (k.information("jumpRecentList", t), e.push({
                    name: "最近完成的任务",
                    items: t,
                    type: "custom"
                })), k.information("categories", e);
                let i = yield r.asyncRemoteCall.getApp();
                try {
                    yield i.setJumpList(e)
                } catch (e) {
                    k.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 r.asyncRemoteCall.getApp()).getJumpListSettings();
                    k.information("getJumpListSettings", e);
                    let t = e.removedItems;
                    if (!t || 0 === t.length) {
                        k.information("update jumplist removedItems null");
                        break
                    }
                    if (0 === this.completedList.length) break;
                    k.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 r = "";
                        if (r = i.taskType === d.DownloadKernel.TaskType.Group ? n : a.join(n, o), e.iconPath && r.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), k.information("getJumplistGroup", this.recentList)
            })
        }

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

        attachCompletedCategoryViewChange() {
            T.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)
            }), T.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 = I
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(7), a = i(42), s = i(19), l = i(32);
    !function (e) {
        const t = i(2), d = r.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, r) {
            return e && "" !== e || u.warning("createP2spTask url:", e), n && "" !== n || u.warning("createP2spTask savePath:", n), o && "" !== o || u.warning("createP2spTask fileName:", o), e = a.Common.parseThunderPrivateUrl(e), d.createP2spTask(e, void 0 === t ? "" : t, void 0 === i ? "" : i, n, o, r)
        }, 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 = a.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 = a.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, r, a) {
            d.insertP2spTask(e, t, i, n, o, r, a)
        }, 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, r) {
            d.saveTaskChannelInfo(e, t, i, n, o, r)
        }, 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, r, a) {
            d.createCategory(e, t, i, n, o, r, a)
        }, 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, r, a) {
            let s = `SELECT taskid from TaskBase WHERE  CompletionTime != 0 and RemovingToRecycleTime = 0 and (${"CategoryId = " + o.join(" or CategoryId = ")})`;
            if (void 0 !== a) s = `${s} and ${"type = " + a}`; 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, r) {
            return n || (n = ""), i || (i = "", n = ""), t = t ? Number(t) : 0, d.verifyProxy(e, t, i, n, o, r)
        }, 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";
    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";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

        function o(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 = {})), e.getDriveType = function (e) {
            return e = o(e), l.getDriveType(e)
        }, e.getDriveInfo = function (e) {
            return e = o(e), l.getDriveInfo(e)
        }, e.getFreePartitionSpace = function (e) {
            return e = o(e), l.getFreePartitionSpace(e)
        }, e.getLogicalDriveStrings = function () {
            return l.getLogicalDriveStrings()
        }, e.getPartitionSpace = function (e) {
            return e = o(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] && r.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 = a.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 = a.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 = o(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.getSystemDirectory = function () {
            return l.getSystemDirectory()
        }, e.getVersionBlockString = function (e, t) {
            return l.getVersionBlockString(e, t)
        }, e.getOwnerName = function (e) {
            return l.getOwnerName(e)
        }
    }(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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

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

        function I(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 (++C < 4) {
                        let e = m.ThunderHelper.getTickCount();
                        I(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(), I(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)), S(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) => {
                            w.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 = k && "" !== k ? k : new Promise(e => {
                    T ? b.once("OnGetGlobalPeerId", t => {
                        e(t)
                    }) : l.ThunderKernel.queryGlobalInfo(1, (t, i) => {
                        w.information("getPeerId queryGlobalInfo glPeerId:", i), T = !1, k = i, e(i), b.emit("OnGetGlobalPeerId", i)
                    }) ? T = !0 : e("")
                })
            })
        }, e.initDataBase = S, 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) {
            w.information("enableCommonP2pChannel", e), t.enableCommonP2pChannel(e)
        }, e.enableCommonP2sChannel = function (e) {
            w.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(19), a = i(0), s = i(7), l = i(8), d = i(3), u = i(34), c = i(11), h = i(43), f = i(25),
        p = i(16), g = i(42), m = i(68), v = i(22), y = i(37), w = i(9), k = i(39), T = i(10), b = i(38), C = i(5),
        S = i(30), I = i(32), _ = i(45), A = i(56), D = i(51), x = i(55), N = i(69), E = i(140), P = i(40), O = i(105),
        M = i(72), F = i(48), L = i(103), R = i(13), B = i(58), U = i(15), V = i(4), K = i(26), W = i(101), j = i(12),
        G = i(33), H = i(64), z = i(23), X = i(70), q = i(61), Y = a.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 = A.ToastNotifyManagerNS.getToastNotifyManger();

    function ie(e) {
        return n(this, void 0, void 0, function* () {
            if (void 0 !== e) {
                let t = e + "\\.", i = yield j.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 j.asyncRemoteCall.getCurrentWindow();
                (yield j.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 re() {
        return n(this, void 0, void 0, function* () {
            return E.DownloadAndPlayNS.getXmpPath()
        })
    }

    function ae(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 r = o[n];
                            if (!r) continue;
                            let a = r.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                            if (e === a) {
                                r.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 a(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},
                                r = yield m.TaskUtilitiesAWNS.batchFindTaskAW([n]);
                            if (r && r.length > 0) {
                                i.errcode = 3, i.extra = r[0], b.ThunderNewTask.repeatTasksMsg([r[0]]);
                                break
                            }
                            let a = {
                                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, a);
                            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 r = yield m.TaskUtilitiesAWNS.importUnfinishedTaskAW(e, n);
                        if (null !== r && 0 === r.ret) {
                            let n = g.Common.parseEd2kUrl(r.url);
                            if (null !== n) {
                                let o = {taskType: d.DownloadKernel.TaskType.Emule, value: n.fileHash},
                                    a = yield m.TaskUtilitiesAWNS.batchFindTaskAW([o]);
                                if (a && a.length > 0) {
                                    i.errcode = 3, i.extra = a[0], b.ThunderNewTask.repeatTasksMsg([a[0]]);
                                    break
                                }
                                let s = {
                                    taskBaseInfo: {
                                        taskName: g.Common.getTaskNameFromImportFile(e),
                                        savePath: g.Common.getSavePathFromImportFile(e),
                                        origin: t = void 0 === t ? "Unknown" : t
                                    }, emuleTaskInfo: {url: r.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 r = 0; r < t.length; r++) {
                            let a = t[r];
                            if (".torrent" === o.extname(a)) {
                                n = a;
                                let t = o.join(i, a), r = yield m.TaskUtilitiesAWNS.parserBtFileInfoAW(t);
                                if (1 !== r.fileLists.length) break;
                                {
                                    let t = o.basename(e);
                                    if (t = o.basename(t, ".bt.xltd"), r.fileLists[0].fileName === t) break
                                }
                            }
                        }
                    }
                    do {
                        if (void 0 === n || null === n || "" === n) break;
                        let e = o.join(__profilesDir, "Torrents"), r = o.join(e, n);
                        if (yield l.FileSystemAWNS.existsAW(r)) {
                            let e = yield m.TaskUtilitiesAWNS.parserBtFileInfoAW(r),
                                n = {taskType: d.DownloadKernel.TaskType.Bt, value: e.infoId},
                                a = yield m.TaskUtilitiesAWNS.batchFindTaskAW([n]);
                            if (a && a.length > 0) {
                                b.ThunderNewTask.repeatTasksMsg([a[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: P.TaskCtrlOperatorNS.constructProductInfo(""),
                                        origin: t = void 0 === t ? "Unknown" : t,
                                        import: !0
                                    },
                                    btTaskInfo: {
                                        seedFile: r,
                                        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 r = n.getExtraObject();
                    if (0 === r.getDownloadFile().length) break;
                    if (yield F.SingleBtTaskNS.isSingleBtTask(n)) {
                        let e = F.SingleBtTaskNS.getSinleBtTaskFilePath(n), o = r.getBtFileList();
                        for (let [, n]of o) {
                            let o = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex),
                                r = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Download),
                                a = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName);
                            if (1 === r) {
                                let r = k.TaskUtilHelper.getTaskFileType(a);
                                if (null !== t && void 0 !== t && -1 !== t) {
                                    if (t === o) {
                                        i.push({fileExtType: r, fullPath: e, btFile: n});
                                        break
                                    }
                                } else i.push({fileExtType: r, fullPath: e, btFile: n})
                            }
                            break
                        }
                    } else {
                        let e = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath),
                            a = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), s = r.getBtFileList();
                        for (let [, n]of s) {
                            let r = 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, a, u, l);
                            if (1 === s) {
                                let e = k.TaskUtilHelper.getTaskFileType(l);
                                if (null !== t && void 0 !== t && -1 !== t) {
                                    if (t === r) {
                                        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 r = n.getExtraObject();
                    if (0 === r.getDownloadFile().length) break;
                    if (yield F.SingleBtTaskNS.isSingleBtTask(n)) {
                        let e = F.SingleBtTaskNS.getSinleBtTaskFilePath(n), o = r.getBtFileList();
                        for (let [, n]of o) {
                            let o = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex),
                                r = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Download),
                                a = 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 === r) {
                                if (k.TaskUtilHelper.getTaskFileType(a) === k.TaskUtilHelper.FileExtType.Video) if (null !== t && void 0 !== t && -1 !== t) {
                                    if (o === t) {
                                        i.push({
                                            fileName: a,
                                            fullPath: e,
                                            index: o,
                                            cid: s,
                                            gcid: l,
                                            playPosition: u,
                                            duration: c
                                        });
                                        break
                                    }
                                } else i.push({
                                    fileName: a,
                                    fullPath: e,
                                    index: o,
                                    cid: s,
                                    gcid: l,
                                    playPosition: u,
                                    duration: c
                                })
                            }
                            break
                        }
                    } else {
                        let e = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath),
                            a = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), s = r.getBtFileList();
                        for (let [, n]of s) {
                            let r = 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, a, 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 (k.TaskUtilHelper.getTaskFileType(l) === k.TaskUtilHelper.FileExtType.Video) if (null !== t && void 0 !== t && -1 !== t) {
                                    if (r === t) {
                                        i.push({
                                            fileName: l,
                                            fullPath: c,
                                            index: r,
                                            cid: h,
                                            gcid: f,
                                            playPosition: p,
                                            duration: g
                                        });
                                        break
                                    }
                                } else i.push({
                                    fileName: l,
                                    fullPath: c,
                                    index: r,
                                    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 r = n.getExtraObject();
                    if (null === r || void 0 === r) break;
                    let a = r.getSubTaskCount();
                    for (let e = 0; e < a; ++e) {
                        let n = r.getSubTaskByIndex(e), a = 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 (k.TaskUtilHelper.getTaskFileType(u) === k.TaskUtilHelper.FileExtType.Video) if (null !== t && void 0 !== t && -1 !== t) {
                                if (a === t) {
                                    i.push({
                                        fileName: u,
                                        fullPath: c,
                                        index: a,
                                        cid: f,
                                        gcid: p,
                                        isForbidden: y,
                                        taskId: n.getId(),
                                        taskUrl: g,
                                        playPosition: m,
                                        duration: v
                                    });
                                    break
                                }
                            } else i.push({
                                fileName: u,
                                fullPath: c,
                                index: a,
                                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 = T.ConfigNS.getValue("MoveToDir", "LatestSavePath", []), i = e.indexOf(t);
                        -1 !== i && e.splice(i, 1), e.splice(0, 0, t), e = e.slice(0, 3), T.ConfigNS.setValue("MoveToDir", "LatestSavePath", e), T.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, r = !1) {
            return n(this, void 0, void 0, function* () {
                function a(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 (!r && 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 re();
                            let e = T.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 j.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)
                                    })
                                }
                                T.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 O.default.installXmp(), !(t !== y.MessageBoxNS.Action.OK || (c = yield re()) && (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 = a(h)
                    }
                    let w = [], k = '/surl "' + e.playUrl + '"', S = "/sstartfrom xl11", I = "/sopenfrom " + e.openFrom;
                    "dc" === e.playType && (w.push("/stype"), w.push("dc")), w.push(S), w.push(I);
                    let _ = '/sname "' + e.fileName + '"';
                    w.push(_);
                    let A = "/scid " + e.cid;
                    w.push(A);
                    let D = "/sgcid " + e.gcid;
                    w.push(D), e.playPosPercent ? w.push("/iplaypercent " + 100 * e.playPosPercent) : C.isNumber(e.startPos) && (G.ThunderHelper.isWindows10() ? w.push("/iplayposition " + e.startPos) : w.push("/#i_laststartpos " + e.startPos));
                    let x, N = K.default.getConfigInfo("XmpLitePlayer", "EmbedMode"),
                        E = (yield(yield j.asyncRemoteCall.getCurrentWindow()).getNativeWindowHandle()).readUInt32LE(0);
                    w.push("-thunderwnd:" + E), Y.information("[CrossProduct] embed=", N);
                    let M = H.XmpPlaySoure.PLAY_BY_DOWNLOAD;
                    if (h) {
                        let t = h.getTaskAttribute(d.DownloadKernel.TaskAttribute.GroupTaskId);
                        x = "number" == typeof t && t > 0 ? t.toString() : e.taskId.toString()
                    } else e.panFileId && (x = e.panFileId, M = H.XmpPlaySoure.PLAY_BY_PAN);
                    if (c || (yield V.client.callServerFunction("SetPlayingTaskId", x, M)), e.playSoure = M, null !== N && 1 !== N || !e.isEmbed || w.push("-embedmode"), i || (yield b.ThunderNewTask.selectTask(Number(x))), h) {
                        let e = h.getTaskAttribute(d.DownloadKernel.TaskAttribute.RefUrl);
                        if (e) {
                            let t = "/srefurl " + e;
                            w.push(t)
                        }
                    }
                    let F = (new Date).getTime();
                    w.push("/sclicktimestamp " + F), "" !== f && w.push("/scommentid " + f), p > 0 && w.push("/thunderdownloadSpeed " + p);
                    let L = "/sfilesize " + e.fileSize;
                    if (w.push(L), m === d.DownloadKernel.TaskType.Bt) {
                        let t = '/shashid "' + g + '"';
                        w.push(t);
                        let i = '/ssubid "' + e.fileIndex + '"';
                        w.push(i)
                    }
                    let R = '/sext "' + o.extname(e.fileName) + '"';
                    w.push(R);
                    let B = "/staskid " + e.taskId;
                    if (w.push(B), void 0 !== e.taskType) {
                        let t = "/stasktype " + e.taskType;
                        w.push(t)
                    }
                    if (null !== e.fileDir && void 0 !== e.fileDir && "" !== e.fileDir) {
                        let t = '/sFilePath "' + e.fileDir + '"';
                        w.push(t)
                    }
                    let W = "/ssdkver " + u.DownloadKernelManager.getDownloadSdkVersion();
                    w.push(W);
                    let z = yield P.TaskCtrlOperatorNS.getUserLoginInfo();
                    if ("" !== z && w.push(z), e.dlnaPlay && w.push("/sshowdlna on"), e.panFileId) {
                        let t = '/spanfileid "' + e.panFileId + '"';
                        w.push(t)
                    }
                    if (e.playType) {
                        let t = '/splayType "' + e.playType + '"';
                        w.push(t)
                    }
                    if (e.playFrom) {
                        let t = '/splayFrom "' + e.playFrom + '"';
                        w.push(t)
                    }
                    w.push(k);
                    let Q = w.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, r, a, s, u, c = !0, h, g, m, v, y) {
            return n(this, void 0, void 0, function* () {
                let n = !1, k = Z.getTaskFromTaskId(e);
                do {
                    if (!k) break;
                    if (!v) {
                        if (!k.isSupportPlay()) break
                    }
                    let T = !1, b = $.getCategoryFromId(a);
                    (!b || b && b.getName() === f.CategoryManager.panCategoryName) && (T = !0);
                    let C = {playUrl: "", fileName: ""}, I = "", A = k.getTaskStatus(), D = null,
                        x = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.CategoryId), N = k.getIsPrivate();
                    if (C.isYunRecvTask = !N && -1 !== x, Y.warning("cqm downloadAndPlay xmpInfo.isYunRecvTask", C.isYunRecvTask), C.taskUrl = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl), C.fileSize = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.FileSize), C.taskId = e, C.taskType = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType), C.fileIndex = -1, C.isEmbed = h, C.dlnaPlay = s, C.startPos = void 0, C.playPosPercent = u, C.openFrom = "xunlei11", C.playFrom = g, C.showBackIcon = !1 !== m, C.isZipPlay = v, h && U.server.fireClientEvent("OnShowDownAndPlayToast", e), A === d.DownloadKernel.TaskStatus.Succeeded || A === d.DownloadKernel.TaskStatus.Seeding) {
                        if (C.playType = "local", v) {
                            let e = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath);
                            if (C.fileName = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), I = o.resolve(e, C.fileName), !(yield l.FileSystemAWNS.existsAW(I))) break;
                            if (C.cid = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid), C.gcid = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid), C.playUrl = I, c) {
                                let e = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Duration),
                                    t = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.PlayPosition);
                                C.startPos = e !== t ? t : 0
                            } else !1 === c && (C.startPos = 0)
                        } else if (C.taskType === d.DownloadKernel.TaskType.Emule || C.taskType === d.DownloadKernel.TaskType.P2sp) {
                            let e = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath);
                            if (C.fileName = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), I = o.resolve(e, C.fileName), !(yield l.FileSystemAWNS.existsAW(I))) break;
                            if (C.cid = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid), C.gcid = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid), C.playUrl = I, c) {
                                let e = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Duration),
                                    t = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.PlayPosition);
                                C.startPos = e !== t ? t : 0
                            } else !1 === c && (C.startPos = 0)
                        } else if (C.taskType === d.DownloadKernel.TaskType.Bt || C.taskType === d.DownloadKernel.TaskType.Group) {
                            let i = [];
                            if (0 === (i = C.taskType === d.DownloadKernel.TaskType.Bt ? yield p(e, t) : yield E(e, t)).length) break;
                            if (null !== (D = (i.length, i[0]))) {
                                if (yield l.FileSystemAWNS.existsAW(D.fullPath)) C.playUrl = D.fullPath; else if (C.taskType === d.DownloadKernel.TaskType.Bt) C.playUrl = yield k.getPlayUrl(D.index); else {
                                    let e = k.getExtraObject().getSubTaskByIndex(D.index);
                                    null !== e && void 0 !== e && (C.playUrl = yield e.getPlayUrl(-1))
                                }
                                C.fileName = D.fileName, C.cid = D.cid, C.gcid = D.gcid, C.fileIndex = D.index, c ? D.duration !== D.playPosition ? C.startPos = D.playPosition : C.startPos = 0 : !1 === c && (C.startPos = 0), C.taskType === d.DownloadKernel.TaskType.Group && (C.taskId = D.taskId, C.taskUrl = D.taskUrl)
                            }
                        }
                    } else {
                        if (C.playType = "p2s", A === d.DownloadKernel.TaskStatus.StartWaiting) {
                            Y.information("down and play waiting");
                            break
                        }
                        if (k.setDownloadStrategy(d.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_DOWNLOADINGPLAYING), A === d.DownloadKernel.TaskStatus.Stopped || A === d.DownloadKernel.TaskStatus.Failed) {
                            if (!(yield _.DownloadDispatchNS.startTask(e))) {
                                Y.information("down and play start waiting");
                                break
                            }
                            yield ae(e)
                        }
                        let i = !0;
                        if (C.taskType === d.DownloadKernel.TaskType.Bt || C.taskType === d.DownloadKernel.TaskType.Group) {
                            let n = [];
                            if (0 === (n = C.taskType === d.DownloadKernel.TaskType.Bt ? yield p(e, t) : yield E(e, t)).length) break;
                            if (null !== (D = (n.length, n[0]))) {
                                if (yield l.FileSystemAWNS.existsAW(D.fullPath)) C.playUrl = D.fullPath, i = !1; else if (C.taskType === d.DownloadKernel.TaskType.Bt) C.playUrl = yield k.getPlayUrl(D.index); else {
                                    let e = k.getExtraObject().getSubTaskByIndex(D.index);
                                    null !== e && void 0 !== e && (C.playUrl = yield e.getPlayUrl(-1))
                                }
                                C.fileDir = o.dirname(D.fullPath), C.fileName = D.fileName, C.cid = D.cid, C.gcid = D.gcid, C.fileIndex = D.index, c ? D.duration !== D.playPosition ? C.startPos = D.playPosition : C.startPos = 0 : !1 === c && (C.startPos = 0), C.taskType === d.DownloadKernel.TaskType.Group && (C.taskId = D.taskId, C.taskUrl = D.taskUrl), Y.information("Thunder.DownloadAndPlayIPC playTaskId:", C.taskId, ", taskId:", e)
                            }
                        } else if (C.taskType === d.DownloadKernel.TaskType.Emule || C.taskType === d.DownloadKernel.TaskType.P2sp) if (C.playUrl = yield k.getPlayUrl(-1), C.fileName = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), C.fileDir = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath), C.cid = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid), C.gcid = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid), c) {
                            let e = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.Duration),
                                t = k.getTaskAttribute(d.DownloadKernel.TaskAttribute.PlayPosition);
                            C.startPos = e !== t ? t : 0
                        } else !1 === c && (C.startPos = 0);
                        C.playUrl && C.playUrl
                    }
                    v && (C.fileName = y, C.fileIndex = t);
                    let P = yield ue(C, T, v);
                    if (n = P.ret) {
                        let e = k.getType();
                        if (e === d.DownloadKernel.TaskType.Bt) {
                            let e = k.getExtraObject().getBtFileByRealIndex(D.index);
                            e.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileStatus) === d.DownloadKernel.BtFileStatus.Complete && e.setUserRead(1)
                        } else if (e === d.DownloadKernel.TaskType.Group) {
                            let e = k.getExtraObject().getSubTaskByIndex(D.index);
                            null !== e && void 0 !== e && (e.getTaskStatus() !== d.DownloadKernel.TaskStatus.Succeeded && e.getTaskStatus() !== d.DownloadKernel.TaskStatus.Seeding || e.setUserRead(1))
                        } else k.getTaskStatus() !== d.DownloadKernel.TaskStatus.Succeeded && k.getTaskStatus() !== d.DownloadKernel.TaskStatus.Seeding || k.setUserRead(1)
                    }
                    let O = [];
                    if (void 0 === a && (a = S.default.getCurrentCategoryId()), -1 === a) O.push("panel_type=mypc"); else if ($.isPrivateCategory(a)) O.push("panel_type=private"); else {
                        let e = $.getCategoryFromId(a);
                        e && O.push("panel_type=" + e.getName())
                    }
                    void 0 === r && (r = ""), O.push("panel=" + r), O.push("taskid=" + e), O.push("filename=" + encodeURIComponent(C.fileName)), void 0 === i && (i = "other"), O.push("click_source=" + i), n ? O.push("result=success") : (O.push("result=fail"), O.push("errorcode=" + P.errcode));
                    let M = O.join(",");
                    Y.information("trackEvent", "download_leftpanel", "play_panel_show", M), w.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), w.XLStatNS.trackEvent("core_operate", "js_grouptask_delete_click", "", 0, 0, 0, 0, n)
            } while (0)
        }

        e.asyncOpenItem = t, e.importUncompletedFromFile = a, e.importUncompleted = function () {
            return n(this, void 0, void 0, function* () {
                Y.information("import un-finished");
                let e = yield j.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 j.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") : a(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 P.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 j.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 = "", a = "";
                    if (null !== t && void 0 !== t && "" !== t) o = t, null !== i && void 0 !== i && "" !== i && (a = i); else {
                        if (e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType) !== d.DownloadKernel.TaskType.Group) break;
                        let t = e.getExtraObject(),
                            i = t.getUserData(x.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile");
                        if (void 0 === i || null === i || "" === i || "0" === i) break;
                        let n = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                        if (o = P.TaskCtrlOperatorNS.getSavePathByFileName(n, i), !(yield l.FileSystemAWNS.existsAW(o))) break;
                        a = "", null !== (i = t.getUserData(x.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams")) && void 0 !== i && "" !== i && (a = i)
                    }
                    if (r.ipcRenderer.send("onOpenExecute", o, a), 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), w.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, r = "", a = yield j.asyncRemoteCall.getShell();
                "" === n ? r = i : (void 0 !== n && n.indexOf(".") === n.length - 1 && (n = n.substring(0, n.length - 1)), r = 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(r).catch() : a.showItemInFolder(r);
                            break
                        }
                        if (yield F.SingleBtTaskNS.isSingleBtTask(n)) r = 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),
                                    a = o.join(r, e);
                                if (r = o.join(r, e, n), e && !(yield l.FileSystemAWNS.dirExistsAW(a))) {
                                    let t = o.join(i, e);
                                    (yield l.FileSystemAWNS.dirExistsAW(t)) && (r = o.join(i, e, n))
                                }
                                break
                            }
                        }
                    } else {
                        if (e.taskType === d.DownloadKernel.TaskType.Group) {
                            t ? ie(i).catch() : a.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(r)) ? a.showItemInFolder(r) : ie(i).catch();
                        break
                    }
                    if (yield l.FileSystemAWNS.existsAW(r)) {
                        a.showItemInFolder(r);
                        break
                    }
                    if (e.taskType === d.DownloadKernel.TaskType.P2sp) {
                        (yield l.FileSystemAWNS.existsAW(r + ".td")) ? a.showItemInFolder(r + ".td") : (yield l.FileSystemAWNS.existsAW(r + ".xltd")) ? a.showItemInFolder(r + ".xltd") : ie(i).catch();
                        break
                    }
                    if (e.taskType === d.DownloadKernel.TaskType.Emule) {
                        (yield l.FileSystemAWNS.existsAW(r + ".emule.td")) ? a.showItemInFolder(r + ".emule.td") : (yield l.FileSystemAWNS.existsAW(r + ".xltd")) ? a.showItemInFolder(r + ".xltd") : (yield l.FileSystemAWNS.existsAW(r + ".emule.xltd")) ? a.showItemInFolder(r + ".emule.xltd") : ie(i).catch();
                        break
                    }
                    if (e.taskType === d.DownloadKernel.TaskType.Bt) {
                        (yield l.FileSystemAWNS.existsAW(r + ".bt.td")) ? a.showItemInFolder(r + ".bt.td") : (yield l.FileSystemAWNS.existsAW(r + ".xltd")) ? a.showItemInFolder(r + ".xltd") : (yield l.FileSystemAWNS.existsAW(r + ".bt.xltd")) ? a.showItemInFolder(r + ".bt.xltd") : ie(i).catch();
                        break
                    }
                    e.taskType === d.DownloadKernel.TaskType.Group && ie(i).catch()
                } while (0)
            })
        }, e.openTaskItem = function (e, r, a, 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), T = 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 (T) yield ce(e.taskId, -1, a, u, c, void 0, void 0, !0, h, f); else do {
                            if (g.endsWith(".exe")) {
                                const {exeVerify: t} = yield Promise.resolve().then(() => i(517));
                                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 || "")}`;
                                    w.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"}`, w.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),
                                        r = o.join(g, e);
                                    if (g = o.join(g, e, i), e && !(yield l.FileSystemAWNS.dirExistsAW(r))) {
                                        let t = o.join(n, e);
                                        (yield l.FileSystemAWNS.dirExistsAW(t)) && (g = o.join(n, e, i))
                                    }
                                    break
                                }
                            }
                            T ? yield ce(e.taskId, -1, a, u, c, void 0, void 0, !0, h, f) : t(g).catch()
                        } else if (null !== r && void 0 !== r && -1 !== r) {
                            let i = yield s(e.taskId, r);
                            null === i || void 0 === i || i.length <= 0 ? ie(g).catch() : i[0].fileExtType === k.TaskUtilHelper.FileExtType.Video ? yield ce(e.taskId, r, a, 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 T ? yield ce(e.taskId, -1, a, u, c, void 0, void 0, !0, h, f) : ie(g).catch(); else if (null !== r && void 0 !== r && -1 !== r) {
                            let i = yield s(e.taskId, r), n = {playUrl: i[0].fullPath, fileName: ""};
                            null === i || void 0 === i || i.length <= 0 ? ie(g).catch() : i[0].fileExtType === k.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, r, a, 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 !== r && void 0 !== r && -1 !== r) {
                        let e = m.getExtraObject();
                        if (null === e || void 0 === e) break;
                        let i = e.getSubTaskByIndex(r), 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, a, 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 r = 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 = r.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(r)) n = F.SingleBtTaskNS.getSinleBtTaskFilePath(r), L.exec(`rundll32.exe shell32.dll,OpenAs_RunDLL ${n}`, {cwd: process.cwd()}); else {
                            let i = yield F.SingleBtTaskNS.getCorrectSingleBtFolder(r);
                            if (i) {
                                let r = e.savePath, a = void 0, s = t.getBtFileList();
                                for (let [, e]of s) {
                                    a = e.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName);
                                    break
                                }
                                n = o.join(r, i, a), 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 = G.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 && S.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 && S.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 = T.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);
                            T.ConfigNS.setValue("ConfigMsg", "ConfigMsg_DeleteFile", t.checkboxChecked), Z.deleteBatchTask(i, t.checkboxChecked).then(e => {
                                t.checkboxChecked && !e && te.showNotify(A.ToastNotifyManagerNS.notifyIdTaskOperatorDestroyTask, D.ToastNotifyItemType.RedNotify, "文件在本地磁盘中删除失败", 3e3)
                            }).catch(), 1 === e.length && S.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(A.ToastNotifyManagerNS.notifyIdTaskOperatorDestroyTask, D.ToastNotifyItemType.RedNotify, "文件在本地磁盘中删除失败", 3e3)
                    }).catch(), 1 === e.length && S.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 r = yield j.asyncRemoteCall.getCurrentWindow();
                    const a = yield j.asyncRemoteCall.getDialog();
                    r && !(yield r.isDestroyed()) && a.showOpenDialog(r, {properties: ["openDirectory"]}).then(r => n(this, void 0, void 0, function* () {
                        let n = r.filePaths;
                        r.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 j.asyncRemoteCall.getCurrentWindow();
                    const t = yield j.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 = T.ConfigNS.getValue("CopyToDir", "LatestSavePath", []), n = t.indexOf(i);
                    -1 !== n && t.splice(n, 1), t.splice(0, 0, i), t = t.slice(0, 3), T.ConfigNS.setValue("CopyToDir", "LatestSavePath", t), T.ConfigNS.save().catch();
                    for (let t of e) {
                        let e = t.savePath, n = t.taskName, a = 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
                                }
                            }
                            a = o.join(e, n)
                        } else a = o.join(a, "*");
                        s = o.join(i, n), a !== i && r.ipcRenderer.send(I.ThunderChannelList.channelRMFileCopy, a, 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)
                }
            }
            r.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()), r.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 = "", r = e.taskName, a = "", s = Z.getTaskFromTaskId(e.taskId);
                if (e.taskType === d.DownloadKernel.TaskType.P2sp) "" === (n = s.getExtraObject().getDisplayUrl()) && (n = e.url), a = o.extname(r).toLowerCase(); else if (e.taskType === d.DownloadKernel.TaskType.Emule) n = e.url, a = o.extname(r).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()), a = ".torrent"
                }
                let l = yield z.LoginHelperNS.loginHelper.getUserInfoAw("userid");
                v.MessageBox.custom("copy-link-share", {
                    url: n,
                    panel: t,
                    taskName: r,
                    ext: a,
                    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 r(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 a() {
                    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(), r = o.getSubTaskCount();
                        for (let e = 0; e < r; ++e) {
                            let r = o.getSubTaskByIndex(e);
                            r && n.push({
                                searchFrom: "",
                                url: r.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl),
                                name: r.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 = r(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 a();
                    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++, W.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 r = t.getExtraObject().getBtFileList();
                            for (let [, e]of r) 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(), r = i.getSeedFilePath();
                    if (!(yield l.FileSystemAWNS.existsAW(r))) break;
                    let a = e.taskName;
                    void 0 !== a && "" !== a || "" === (a = i.getDisplayName()) && (a = o.parse(r).name);
                    let s = a, u = o.parse(a);
                    N.ParseUrlFileNameNS.isUsualFileExtName(u.ext) && (s = u.name + ".torrent");
                    let c = yield j.asyncRemoteCall.getCurrentWindow(),
                        h = {defaultPath: s, filters: [{name: "BT种子文件（*.torrent）", extensions: ["torrent"]}]};
                    (yield j.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(r, i)) || te.showNotify(A.ToastNotifyManagerNS.notifyIdTaskOperatorSaveAsTorrent, D.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 (C.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(A.ToastNotifyManagerNS.notifyIdTaskOperatorRecoverTask, D.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(), r = n.getType(), a = "";
            if (r === d.DownloadKernel.TaskType.P2sp) a = o.url, i = "p2sp", t = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid); else if (r === d.DownloadKernel.TaskType.Emule) a = o.url, i = "emule", t = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid); else if (r === d.DownloadKernel.TaskType.Bt) {
                i = "bt";
                let e = n.getExtraObject();
                t = e.getInfoId(), (a = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl)) && "" !== a || (a = "magnet:?xt=urn:btih:" + e.getInfoId())
            } else if (r === d.DownloadKernel.TaskType.Magnet) i = "magnet"; else if (r === 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(x.TaskUserDataGUID.guidDownloadGroupTask, "excludePath"),
                    r = t.getUserData(x.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile"),
                    s = t.getUserData(x.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams");
                e.excludePath = o || "", e.installFile = r || "", e.runParams = s || "";
                let l = t.getUserData(x.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: ""
                    }))
                }
                a = JSON.stringify(e)
            }
            if (a.length > 0) {
                Y.information("点击任务详情按钮,生成迅雷口令,taskURL:", a);
                let e = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.CategoryViewId), r = new Map;
                r.set(d.DownloadKernel.CategroyViewID.Downloading, "downloading"), r.set(d.DownloadKernel.CategroyViewID.Completed, "complete"), r.set(d.DownloadKernel.CategroyViewID.Recycle, "trash"), r.set(d.DownloadKernel.CategroyViewID.Unkown, "unknown");
                let s = {
                    pannel: r.get(e),
                    gcid: t,
                    taskid: o.taskId.toString(),
                    filename: o.taskName,
                    pannelType: n.getIsPrivate() ? "private" : "mypc",
                    taskType: i
                };
                M.openBirdKeyEncodeDialog(a, 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(x.TaskUserDataGUID.guidDownloadGroupTask, "excludePath"),
                    r = n.getUserData(x.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile"),
                    a = n.getUserData(x.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams");
                e.excludePath = o || "", e.installFile = r || "", e.runParams = a || "";
                let s = n.getUserData(x.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});
    const n = i(0), o = i(5), r = i(28), a = 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 = a.NativeFunctionErrorCode.Success;
                if (o.isNullOrUndefined(u) || 0 === u.length || o.isNullOrUndefined(u[0].nativeFunc)) {
                    if (h = a.NativeFunctionErrorCode.FunctionUnExist, o.isNullOrUndefined(i)) {
                        d = !0;
                        break
                    }
                    if (o.isNullOrUndefined(r.NativeCallHostModule.nativeCallHost)) {
                        s.warning(r.NativeCallHostModule.nativeCallHost);
                        break
                    }
                    r.NativeCallHostModule.nativeCallHost.callJsFunctionById.apply(r.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 = a.NativeFunctionErrorCode.Success;
                if ((o.isNullOrUndefined(n) || o.isNullOrUndefined(n[0]) || o.isNullOrUndefined(n[0].nativeFunc)) && (d = a.NativeFunctionErrorCode.FunctionUnExist, s.warning(n)), o.isNullOrUndefined(r.NativeCallHostModule.nativeCallHost)) {
                    s.warning(r.NativeCallHostModule.nativeCallHost);
                    break
                }
                r.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(r.NativeCallHostModule.nativeCallHost)) {
                    s.warning(r.NativeCallHostModule.nativeCallHost);
                    break
                }
                r.NativeCallHostModule.nativeCallHost.callJsFunctionById.apply(r.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 () {
            r.NativeCallHostModule.nativeCallHost.initialize();
            let e = {onJsCallNativeFunction: t, onJsCheckNativeFunction: i};
            r.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}), 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(2), a = i(0), s = i(7), l = i(32), d = i(3), u = i(11), c = i(68), h = i(40), f = i(13),
        p = i(69), g = i(22), m = i(30), v = i(14), y = i(10), w = i(8), k = i(42), T = i(47), b = i(26), C = i(87),
        S = i(55), I = i(45), _ = i(508), A = i(39), D = i(33), x = i(9), N = i(509), E = i(56), P = i(51), O = i(4),
        M = i(17), F = E.ToastNotifyManagerNS.getToastNotifyManger(), L = a.default.getLogger("ThunderNewTask"),
        R = u.DownloadKernelTaskManager.getTaskManager(), B = s.default(r.join(__rootDir, "../bin/ThunderHelper.node")),
        U = i(37), V = i(12), K = i(15), W = i(52), j = i(58), G = i(379);
    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, r = e[0], a = e[0].getTaskBaseInfo();
                    if (a.taskType === d.DownloadKernel.TaskType.P2sp || a.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 && (r = 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(r.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([r.getTaskBaseInfo()], !1).catch(); else {
                            yield R.deleteTask(r.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 I.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 a(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 w.FileSystemAWNS.unlinkAW(t.fullPath)
                } while (0)
            })
        }

        function Y(e, i, o, l, c, f, p, m, v, y, w, k) {
            return n(this, void 0, void 0, function* () {
                let T = f;
                const b = u.DownloadKernelTaskManager.getTaskManager();
                do {
                    if (void 0 === m) break;
                    if ("ignore" === m) {
                        if (void 0 === (T = a(v, f)) || null === T) break;
                        if (0 === T.length) {
                            if (void 0 !== y) yield t(y); else {
                                let t = r.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 b.deleteTask(y, !1))
                    } else if ("delete" === m) yield s(v), void 0 !== y && (yield b.deleteTask(y, !0)); else if ("continue" === m && void 0 !== y) {
                        yield I.DownloadDispatchNS.startTask(y);
                        break
                    }
                    let u = o.trackerUrls.join("\n"), C = h.TaskCtrlOperatorNS.constructProductInfo(p.browser), S = {
                        taskBaseInfo: {savePath: e, taskName: o.title, productInfo: C, origin: p.source},
                        btTaskInfo: {
                            originUrl: k,
                            seedFile: l,
                            displayName: c,
                            fileLists: o.fileLists,
                            infoId: o.infoId,
                            fileRealIndexLists: T,
                            tracker: u
                        },
                        privateSpace: w
                    };
                    L.information("create task bt productinfo", p);
                    let _ = yield b.createTask(d.DownloadKernel.TaskType.Bt, S);
                    if (null !== _) {
                        if (1 === i) {
                            let e = _.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                            yield I.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, r) {
            o.ipcRenderer.send("create-pre-new-task-window", e ? JSON.stringify(e) : e, t, i, n, r ? JSON.stringify(r) : r)
        }

        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 (D.ThunderHelper.getDriveType(e) === D.ThunderHelper.DriverType.DRIVE_FIXED) {
                    (yield D.ThunderHelper.getFixedDriveMediaType(e)) === D.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 O.client.callServerFunction("IsFileSizeSetterWorking")) && (yield ee(t))) {
                            z = !0, 0 === (yield O.client.callServerFunction("LaunchFileAssistant")) && x.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 O.client.callServerFunction("GetDownloadDir");
                    yield te(n, o);
                    let r = D.ThunderHelper.getTaskTypeFromUrl(t.url), a = p.ParseUrlFileNameNS.getNameFromUrl(t.url),
                        s = yield O.client.callServerFunction("GetConfigValue", "TaskDefaultSettings", "NewTaskStartMode", 1),
                        l = [], u = void 0;
                    if (r === d.DownloadKernel.TaskType.P2sp) u = {
                        taskType: d.DownloadKernel.TaskType.P2sp,
                        newTaskInfo: {
                            taskType: d.DownloadKernel.TaskType.P2sp,
                            taskBaseInfo: {taskName: a, savePath: o},
                            p2spTaskInfo: {
                                url: t.url,
                                refUrl: t.referer,
                                cookie: t.cookie,
                                nameFixed: t.nameFixedFlag & N.ThunderNewtaskHelperNS.taskOptFileNameFixed ? 1 : 0
                            },
                            searchSource: t.searchFrom
                        }
                    }, l = yield c.TaskUtilitiesAWNS.batchFindTaskAW([{
                        taskType: d.DownloadKernel.TaskType.P2sp,
                        value: t.url
                    }]); else if (r === d.DownloadKernel.TaskType.Emule) {
                        u = {
                            taskType: d.DownloadKernel.TaskType.Emule,
                            newTaskInfo: {
                                taskType: d.DownloadKernel.TaskType.Emule,
                                taskBaseInfo: {taskName: a, 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 I.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 O.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 (k.Common.isThunderPrivateUrl(e) && (n = k.Common.parseThunderPrivateUrl(e)), null === n || void 0 === n || "" === n) break;
                let o = n.indexOf(t);
                if (o < 0) break;
                let a = n.substring(o + t.length);
                if (null === a || void 0 === a || "" === a) break;
                i = ae(r.dirname(a))
            } while (0);
            return i
        }

        function re(e) {
            return n(this, void 0, void 0, function* () {
                let t = "";
                do {
                    if (!e) break;
                    let i = yield O.client.callServerFunction("GetCurrentSelectTabValue", "url");
                    if (e !== i) break;
                    let n = yield O.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 ae(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 : r.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 (k.Common.isThunderPrivateUrl(e) && (o = k.Common.parseThunderPrivateUrl(e)), null === o || void 0 === o || "" === o) break;
                if (null !== i && void 0 !== i && "" !== i) {
                    i === r.basename(t) && (n = o);
                    break
                }
                r.basename(o) === r.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 = T.parse(e).hostname;
                if (null === i || void 0 === i || "" === i) break;
                let n = b.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 a = o.json, s = !1;
                    if (null !== a && void 0 !== a && "" !== a) {
                        s = !0, n = yield N.ThunderNewtaskHelperNS.readThunderUnionConfig(a);
                        let e = "url=" + encodeURIComponent(a);
                        if (L.information("createThunderxTask:需要读取配置信息 jsonUrlStr = ", a), null === n || void 0 === n) {
                            e += ",result=fail,errorcode=pick_up_fail", x.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", x.XLStatNS.trackEvent("core_operate", "js_grouptask_pick_up_info", "", 0, 0, 0, 0, e);
                            break
                        }
                        e += ",result=success", x.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 = r.join(__rootDir, "../../Thunder.exe"), t = B.getFileVersion(e);
                        if (-1 === A.TaskUtilHelper.compareVersion(u, t)) {
                            if (!H) {
                                x.XLStatNS.trackEvent("core_operate", "newthunder_lowversion_popup", "", 0, 0, 0, 0, ""), H = !0;
                                let e = yield de(d);
                                H = !1, e && (x.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 w = [], T = "", b = "";
                    for (let e = 0; e < l.length; ++e) {
                        let i = l[e], n = i.url, o = i.name, r = i.referer || "", a = 0;
                        if (null !== h && void 0 !== h && "" !== h && "" === T) {
                            let e = se(n, h, o);
                            "" !== e && (T = e)
                        }
                        if (v && v.targetFile && "" === b) {
                            let e = se(n, v.targetFile, o);
                            "" !== e && (b = e)
                        }
                        null !== i.size && void 0 !== i.size && (a = i.size);
                        let s = "";
                        null !== i.dir && void 0 !== i.dir && "" !== i.dir ? s = ae(i.dir) : null !== p && void 0 !== p && "" !== p && (s = oe(n, p));
                        let d = n;
                        if (k.Common.isThunderPrivateUrl(n) && (d = k.Common.parseThunderPrivateUrl(n)), void 0 !== d && null !== d && "" !== d) {
                            let e = {
                                url: n,
                                referer: r,
                                fileName: o,
                                fileSize: a,
                                subDir: s,
                                statClick: t,
                                nameFixedFlag: N.ThunderNewtaskHelperNS.taskOptFileNameFixed
                            };
                            w.push(e)
                        }
                    }
                    if (w.length >= 1) {
                        let e = {};
                        if (null !== c && void 0 !== c && "" !== c) {
                            let t = f.ThunderUtil.getMaxFreeDriver();
                            null !== t && "" !== t && (t += ":"), c = r.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 !== T && void 0 !== T && "" !== T && le(T)) {
                                let t = h.replace(/[*?:|<>"]/g, "_");
                                e.installFile = t, e.runParams = g
                            }
                            v && v.name && v.targetFile && le(b) && (e.createShortcut = v)
                        }
                        Z(w, t, c, d, e), i && B.emptyClipBoard()
                    }
                } while (0)
            })
        }

        function ce(e, t) {
            return n(this, void 0, void 0, function* () {
                if ((yield O.client.callServerFunction("GetCurrentNav")) === W.NavViewID.Download) {
                    if (!t) return yield O.client.callServerFunction("SelectNav", W.NavViewID.Cloud), void (yield K.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcShowTransferWindow"));
                    x.XLStatNS.trackEvent("download_leftpanel", "sync_to_yunpan_tips_show"), F.showNotifyEx(E.ToastNotifyManagerNS.notifyIdTaskAdd2Cloud, P.ToastNotifyItemType.GreenNotify, `${e}个下载任务已同步到云盘`, 3e3, {
                        viewVisible: !0,
                        onView: () => n(this, void 0, void 0, function* () {
                            x.XLStatNS.trackEvent("download_leftpanel", "sync_to_yunpan_tips_click", "", 0, 0, 0, 0, "clickid=look"), yield O.client.callServerFunction("SelectNav", W.NavViewID.Cloud), yield K.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcShowTransferWindow")
                        }),
                        onClose: () => {
                            x.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 O.client.callServerFunction("IsLogined")) {
                        t = e;
                        break
                    }
                    let i = "";
                    if (!(yield j.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, r, a) {
            return n(this, void 0, void 0, function* () {
                if (t = yield he(t)) {
                    let n = 0, s = [], l = e.map(e => ({
                        from: a,
                        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 a = e[i];
                            if (a && a.task) {
                                if (n++, !o && !r) continue;
                                let e = a.task, d = o || r[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 && !r)))
                }
            })
        }

        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 (G.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 = D.ThunderHelper.getTaskTypeFromUrl(e);
                n === d.DownloadKernel.TaskType.Emule || n === d.DownloadKernel.TaskType.P2sp ? ne([Object.assign({}, t, {
                    url: e,
                    fileName: i,
                    nameFixedFlag: t.fileName ? N.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 w.FileSystemAWNS.readFileAW(t);
                    if (yield w.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 a = !1, s = "", l = [], u = [], c = "", h = "", p = "", g = "", m = "", v = "",
                        T = y.ConfigNS.getValue("TaskDefaultSettings", "OrignHostThreads", "5"), b = new Map,
                        C = new Map, S = new Map, I = new Map, _ = new Map, A = 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) {
                                    a = !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 (A || (A = {}), t[1]) {
                                        case"name":
                                            A.name = i;
                                            break;
                                        case"targetfile":
                                            A.targetFile = i;
                                            break;
                                        case"runparams":
                                            A.runParams = i
                                    }
                                } else if ("useragent" === e) v = i; else if ("threadcount" === e) T = 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 ? b.set(n, i) : l.push(i) : (o = /referer/).test(e) ? "" !== n ? C.set(n, i) : u.push(i) : (o = /^tasks\[\d+\]\[name\]/).test(e) ? "" !== n && S.set(n, i) : (o = /^tasks\[\d+\]\[size\]/).test(e) ? "" !== n && I.set(n, i) : (o = /^tasks\[\d+\]\[dir\]/).test(e) && "" !== n && _.set(n, i)
                                }
                            }
                        }
                    }
                    if (a) {
                        L.information("createUnionTask 通过读取配置信息得到数据 jsonUrlStr:", s);
                        let e = {minVersion: "", json: s};
                        yield ue(JSON.stringify(e))
                    } else {
                        let e = [], t = [], i = "", n = "";
                        if (null !== b && b.size > 0 && b.forEach((o, r) => {
                            let a = o, s = D.ThunderHelper.getTaskTypeFromUrl(a), l = "", u = 0, c = C.get(r) || "";
                            if (null !== S && S.size > 0 && (l = S.get(r)), null !== p && void 0 !== p && "" !== p && "" === i) {
                                let e = se(a, p, l);
                                "" !== e && (i = e)
                            }
                            if (A && "" !== A.targetFile && "" === n) {
                                let e = se(a, A.targetFile, l);
                                "" !== e && (n = e)
                            }
                            if (null !== I && I.size > 0) {
                                let e = I.get(r);
                                null !== e && "" !== e && (u = Number(e))
                            }
                            let h = "", f = _.get(r);
                            null !== f && void 0 !== f && "" !== f ? h = ae(f) : null !== g && void 0 !== g && "" !== g && (h = oe(a, g));
                            let m = a;
                            if (k.Common.isThunderPrivateUrl(a) && (m = k.Common.parseThunderPrivateUrl(a)), void 0 !== m && null !== m && "" !== m) {
                                let i = {
                                    url: a,
                                    referer: c,
                                    fileName: l,
                                    fileSize: u,
                                    subDir: h,
                                    statClick: "ThunderUnion",
                                    nameFixedFlag: N.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 = r.join(e, h), t.isNotSavePath = !0, t.notSavePath = h
                            }
                            if (T) {
                                let e = Number(T);
                                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
                                }
                                A && A.name && A.targetFile && le(n) && (t.createShortcut = A)
                            }
                            L.information("createUnionTask：新协议拉起新建面板", t);
                            let o = yield re(e[0].referer);
                            o && e.forEach(e => {
                                e.searchFrom = o
                            }), Z(e, "ThunderUnion", h, c, t)
                        }
                        if (t.length > 0) {
                            let e = yield re(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 re(u[0]), t = [];
                            for (let i = 0; i < l.length; ++i) t.push({
                                url: l[i],
                                referer: u[i] || "",
                                searchFrom: e,
                                thread: Number(T)
                            });
                            Z(t, "ThunderUnion")
                        }
                    }
                } while (0)
            })
        }, e.upload2ThunderPan = function (e, t) {
            return n(this, void 0, void 0, function* () {
                do {
                    yield O.client.callServerFunction("SelectNav", W.NavViewID.Cloud), yield me();
                    let i = yield j.default(!1, !0, t);
                    if (L.information("## upload2ThunderPan shouldLogin", i), !i) break;
                    yield ge(), yield O.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, a, s, u, f, p, g, m, v) => n(this, void 0, void 0, function* () {
                    let n = null;
                    try {
                        n = JSON.parse(a)
                    } catch (e) {
                        L.warning(e)
                    }
                    if (null === n) return;
                    let w = [...Object.values(n)];
                    if (L.information("xxx", w, s), s) {
                        let i = yield O.client.callServerFunction("GetUserID");
                        if (C.PrivateSpaceHelperNS.isPrivateSpaceOpen(i)) {
                            let t = yield C.PrivateSpaceHelperNS.openPrivateCategory(i);
                            if (t < 0 && e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateNewTaskResult, !1, "开启私人空间后才能创建任务至私人空间"), 0 !== t) return;
                            let n = yield C.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, P.ToastNotifyItemType.GreenNotify, "您未开通私人空间，请开通后再移动任务？", 3e3)
                        }
                    }
                    e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateNewTaskResult, !0);
                    let k = 0;
                    void 0 !== typeof w && null !== w && w.length > 0 && w.forEach(e => {
                        e.data.fileSize && (k += 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(k, 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 T = [], b = void 0, _ = {};
                    if (void 0 !== typeof w && null !== w && w.length > 0) {
                        let e = [], n = t;
                        null !== f && void 0 !== f && "" !== f && (n = r.join(t, f));
                        let a = w.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(a);
                        for (let t = 0; t < w.length; t++) {
                            let i = w[t], o = n;
                            void 0 !== i.data.subDir && null !== i.data.subDir && "" !== i.data.subDir && (o = r.join(n, i.data.subDir));
                            let a = h.TaskCtrlOperatorNS.constructProductInfo(i.data.browser),
                                u = {taskName: i.data.fileName, savePath: o, productInfo: a, 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 & N.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
                                }
                                T.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
                                }
                                T.push(c)
                            }
                        }
                        if (null !== f && void 0 !== f && "" !== f && T.length > 0) {
                            let e = {taskName: f, savePath: n, origin: T[0].taskBaseInfo.origin}, i = {subTaskList: T},
                                r = yield R.createTask(d.DownloadKernel.TaskType.Group, {
                                    taskType: d.DownloadKernel.TaskType.Group,
                                    taskBaseInfo: e,
                                    groupTaskInfo: i,
                                    privateSpace: s,
                                    searchSource: T[0].searchSource
                                });
                            if (null !== r) {
                                let e = r.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                                b = e, 1 === o && (yield I.DownloadDispatchNS.startTask(e));
                                let i = r.getExtraObject();
                                null !== p && void 0 !== p && (L.information("setUserData:", p), null !== p.installFile && void 0 !== p.installFile && "" !== p.installFile && i.setUserData(S.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile", p.installFile), p.excludePath && "" !== p.excludePath && i.setUserData(S.TaskUserDataGUID.guidDownloadGroupTask, "excludePath", p.excludePath), null !== p.isSelectInstallCheck && void 0 !== p.isSelectInstallCheck && p.isSelectInstallCheck && i.setUserData(S.TaskUserDataGUID.guidDownloadCompleteInstall, "isImmediatelyInstall", "1"), null !== p.runParams && void 0 !== p.runParams && "" !== p.runParams && i.setUserData(S.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams", p.runParams), p.createShortcut && i.setUserData(S.TaskUserDataGUID.guidCreateShortcut, "createShortcut", JSON.stringify(p.createShortcut))), i.setUserData(S.TaskUserDataGUID.guidDownloadGroupTask, "canRepost", "true"), p && p.notSavePath === t && i.setUserData(S.TaskUserDataGUID.guidNotSavePath, "notSavePath", p.notSavePath)
                            }
                        } else if (T.length > 0) {
                            let e = yield R.createBatchTask(T), 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 I.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(w, m, f, b, b ? 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 = r.join(t, i),
                                        a = yield c.TaskUtilitiesAWNS.parserBtFileInfoAW(o);
                                    if (!e.sender || (yield e.sender.isDestroyed())) {
                                        L.information("parserBtFileInfoAW back isDestroyed");
                                        break
                                    }
                                    if (null === a) {
                                        let t = {errinfo: "磁力链接解析失败"};
                                        e.sender.send(l.ThunderChannelList.channelMRNewTaskDownloadTorrentResult, !1, JSON.stringify(t));
                                        break
                                    }
                                    let s = JSON.stringify(a);
                                    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)
                        }), a = {taskType: d.DownloadKernel.TaskType.Magnet, value: t},
                        s = yield c.TaskUtilitiesAWNS.batchFindTaskAW([a]);
                    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),
                            a = p.ParseUrlFileNameNS.parseMagnetUrl(t) + ".torrent", s = r.join(n, a), c = {
                                taskBaseInfo: {
                                    taskName: a,
                                    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 I.DownloadDispatchNS.startTask(t, !0)
                        }
                    }
                })), e.on(l.ThunderChannelList.channelRMNewTaskCancleMagnet, (e, t) => {
                    _.MagnetListenerNS.release(t)
                }), e.on(l.ThunderChannelList.channelRMNewTaskCreateBtTask, (e, t, o, a, s, u, f, p, m, v, w, k, T) => n(this, void 0, void 0, function* () {
                    L.verbose(e);
                    let b = !1, S = void 0, _ = f.map(e => String(e)), A = void 0, D = void 0;
                    do {
                        if (void 0 === a || null === a) {
                            e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateBtTaskResult, !1, "开启私人空间后才能创建任务至私人空间");
                            break
                        }
                        let k = null;
                        try {
                            k = JSON.parse(a)
                        } catch (e) {
                            L.warning(e)
                        }
                        if (null === k) break;
                        if (p) {
                            let i = yield O.client.callServerFunction("GetUserID");
                            if (C.PrivateSpaceHelperNS.isPrivateSpaceOpen(i)) {
                                let t = yield C.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 C.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, P.ToastNotifyItemType.GreenNotify, "您未开通私人空间，请开通后再移动任务？", 3e3)
                            }
                        }
                        if (e.sender && !(yield e.sender.isDestroyed()) && e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateBtTaskResult, !0), p || $(t), void 0 !== typeof t && null !== t || (t = yield O.client.callServerFunction("GetDownloadDir")), void 0 === typeof k || null === k) break;
                        if (k = Object.assign({}, k), S = v || `magnet:?xt=urn:btih:${k.infoId}`, void 0 === typeof s || null === s) break;
                        b = !0, D = k.title;
                        let T = 0, _ = {};
                        f.forEach(e => {
                            _[e] = !0
                        });
                        let x = 0, N = 0;
                        for (let e of k.fileLists) {
                            if (x === k.fileLists.length) break;
                            _[e.realIndex] && (x++, e.fileSize && (N += e.fileSize, T += e.fileSize))
                        }
                        yield te(T, t);
                        let M = yield h.TaskCtrlOperatorNS.getBtExistFilePathList(t, k, f),
                            B = {taskType: d.DownloadKernel.TaskType.Bt, value: k.infoId},
                            V = yield c.TaskUtilitiesAWNS.batchFindTaskAW([B]), K = k.trackerUrls.join("\n"),
                            W = h.TaskCtrlOperatorNS.constructProductInfo(m.browser),
                            j = {savePath: t, taskName: k.title, productInfo: W, origin: m.source}, G = {
                                originUrl: v,
                                refUrl: m.referer,
                                seedFile: s,
                                displayName: u,
                                fileLists: k.fileLists,
                                infoId: k.infoId,
                                fileRealIndexLists: f,
                                tracker: K
                            }, H = {
                                taskType: d.DownloadKernel.TaskType.Bt,
                                newTaskInfo: {
                                    taskType: d.DownloadKernel.TaskType.Bt,
                                    taskBaseInfo: j,
                                    btTaskInfo: G,
                                    privateSpace: p
                                }
                            };
                        if (H.newTaskInfo.birdKey = w || 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 I.DownloadDispatchNS.startTask(n) : Y(t, o, k, s, u, f, m, i, M, n, p).catch()
                                    }
                                })).catch();
                                break
                            }
                            {
                                let e = r.join(t, k.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, k, 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 ? (A = z.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId), 1 === o && (yield I.DownloadDispatchNS.startTask(A))) : L.warning("create bt task null")
                    } while (0);
                    b && k && (yield pe({files: _, url: S, name: D, searchFrom: m.searchFrom}, k, A, T))
                })), 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 = O.client.attachServerEvent("ThunderPanPluginReady", () => {
                    O.client.detachServerEvent("ThunderPanPluginReady", t), X = !0;
                    for (let e of q) e && e();
                    q = []
                })
            })
        }
    }(t.ThunderNewTask || (t.ThunderNewTask = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(3);
    let r = ["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 a = ".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",
        w = ".rar;.tar;.zip;.gzip;.cab;.uue;.arj;.bz2;.lzh;.jar;.ace;.iso;.7-zip;.7z",
        k = ".asf;.mpg;.rmvb;.rm;.wmv;.avi;.mp4;.mpeg;.mkv;.mov;.ts;.flv;.3gp;.m2ts;",
        T = ".exe;.com;.bat;.scr;.lnk;.pif;.wsh;", b = ".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 : w.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 (r.indexOf(g) > -1) {
                    p = "doc" === i ? "word" : g;
                    break
                }
                if (i += ";", a.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 : a.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 += ";", k.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 += ";", T.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 += ";", b.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 r = t.Unkown;
                for (let e = 1; e < o.length; e++) o[e] > o[r] && (r = e);
                r === t.Video ? n = "视频任务组" : r === t.Software ? n = "程序任务组" : r === t.Music ? n = "音乐任务组" : r === t.Pic ? n = "图片任务组" : r === t.Doc ? n = "文档任务组" : r === 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, r = 0, a = 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]), r = Number(c[2]), null !== c[3] && void 0 !== c[3] && "" !== c[3] && (a = 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 > r) {
                    i = 1;
                    break
                }
                if (d < r) {
                    i = -1;
                    break
                }
                if (0 !== a) {
                    if (u > a) {
                        i = 1;
                        break
                    }
                    if (u < a) {
                        i = -1;
                        break
                    }
                }
                i = 0
            } while (0);
            return i
        }
    }(t.TaskUtilHelper || (t.TaskUtilHelper = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(7), s = i(8), l = i(3), d = i(11), u = i(22), c = i(37), h = i(9), f = i(5),
        p = i(30), g = i(45), m = i(48), v = i(39), y = i(126), w = i(31), k = i(25), T = i(4),
        b = r.default.getLogger("Thunder.TaskOperator"), C = a.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        S = d.DownloadKernelTaskManager.getTaskManager(), I = k.DownloadKernelCategoryManager.getCategoryManager();
    !function (e) {
        function t(e) {
            let t = C.getInstallChannel();
            e = void 0 === e ? "" : e;
            let i = o.join(__rootDir, "../../Thunder.exe");
            return `xl_thunder_pc|${C.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 r = 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 = S.getTaskFromTaskId(e.taskId), a = n.getExtraObject(), d = a.getDownloadFile();
                        if (1 !== d.length) {
                            t = !(yield s.FileSystemAWNS.isDirectoryEmptyAW(r));
                            break
                        }
                        if (yield m.SingleBtTaskNS.isSingleBtTask(n)) r = m.SingleBtTaskNS.getSinleBtTaskFilePath(n); else {
                            let e = a.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),
                                        a = o.join(r, e);
                                    if (r = o.join(r, e, n), e && !(yield s.FileSystemAWNS.dirExistsAW(a))) {
                                        let t = o.join(i, e);
                                        (yield s.FileSystemAWNS.dirExistsAW(t)) && (r = o.join(i, e, n))
                                    }
                                    break
                                }
                            }
                        }
                    } else if (e.taskType === l.DownloadKernel.TaskType.Group) {
                        r = i;
                        let n = S.getTaskFromTaskId(e.taskId).getExtraObject(), a = n.getSubTaskCount();
                        for (let e = 0; e < a; ++e) {
                            let i = n.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), r = o.join(e, n);
                                if (yield s.FileSystemAWNS.existsAW(r)) {
                                    t = !0;
                                    break
                                }
                            }
                        }
                        break
                    }
                    t = yield s.FileSystemAWNS.existsAW(r)
                } while (0);
                return t
            })
        }

        function r(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 r = S.getTaskFromTaskId(e.taskId);
                    if (yield m.SingleBtTaskNS.isSingleBtTask(r)) {
                        let e = m.SingleBtTaskNS.getSinleBtTaskFilePath(r);
                        t = yield s.FileSystemAWNS.existsAW(e)
                    } else {
                        let n = e.savePath, a = e.taskName;
                        void 0 !== a && a.indexOf(".") === a.length - 1 && (a = a.substring(0, a.length - 1));
                        let d = o.join(n, a), u = e.taskType;
                        if (u === l.DownloadKernel.TaskType.Bt) {
                            if ("" === a) {
                                t = yield s.FileSystemAWNS.existsAW(n);
                                break
                            }
                            if (t = yield s.FileSystemAWNS.existsAW(d)) break;
                            {
                                let e = yield m.SingleBtTaskNS.getCorrectSingleBtFolder(r);
                                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 T.client.callServerFunction("IsLogined"))) break;
                    let t = yield T.client.callServerFunction("GetSessionID"),
                        i = yield T.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 r(e[0]) : t !== l.DownloadKernel.TaskStatus.Failed
                } else i = !0;
                let a = p.default.getCurrentCategoryId(), s = "mypc";
                if (-1 !== a) if (I.isPrivateCategory(a)) s = "private"; else {
                    let e = I.getCategoryFromId(a);
                    e && (s = e.getName())
                }
                if (i) {
                    let i = !1, r = !1;
                    if (1 === e.length && e[0].taskType === l.DownloadKernel.TaskType.P2sp) {
                        i = !0;
                        let t = S.getTaskFromTaskId(e[0].taskId);
                        t && (r = t.getOriginOnlyStrategy())
                    }
                    u.MessageBox.confirm({
                        title: "重新下载",
                        content: "重新下载会删除本地文件，确定要重新下载么？",
                        type: u.MessageBox.ConfirmType.Info,
                        checkboxEnabled: i,
                        checkboxChecked: r,
                        checkboxLabel: "从原始地址重新下载",
                        windowHeight: i ? 178 : 154
                    }).then(r => n(this, void 0, void 0, function* () {
                        if (r.action === c.MessageBoxNS.Action.OK) {
                            if (void 0 !== o) {
                                let e = "";
                                e = void 0 !== r.checkboxChecked && r.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 ? r.checkboxChecked ? 1 : 0 : void 0
                                    }
                                };
                                (yield T.client.callServerFunction("GetXmpPlayTaskId")) === n.taskId && (yield T.client.callServerFunction("SetXmpStop"));
                                let o = yield S.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 = r.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 S.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 = S.getTaskFromTaskId(e.taskId);
                    if (yield m.SingleBtTaskNS.isSingleBtTask(n)) t = yield s.FileSystemAWNS.existsAW(e.savePath); else {
                        let i = e.savePath, r = e.taskName, a = e.taskType, d = o.join(i, r);
                        if (a === l.DownloadKernel.TaskType.Bt) {
                            if ("" === r) {
                                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 = r, 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 = S.getTaskFromTaskId(e.taskId), r = e.taskType;
                    if (r === 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, r = o.join(n, i);
                            t = yield s.FileSystemAWNS.dirExistsAW(r)
                        }
                    } else if (r !== 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 r = o.join(i, n);
                        if (v.TaskUtilHelper.isExecutableExt(r)) break;
                        t = yield s.FileSystemAWNS.existsAW(r)
                    }
                } while (0);
                return t
            })
        }, e.getBtExistFilePathList = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = [];
                do {
                    let r = o.join(e, t.title);
                    if (!(yield s.FileSystemAWNS.existsAW(r))) break;
                    let a = t.fileLists;
                    for (let e = 0; e < a.length; e++) {
                        let t = a[e];
                        if (-1 !== i.indexOf(t.realIndex)) {
                            let e = o.join(t.filePath, t.fileName), i = o.join(r, 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 = S.getTaskFromTaskId(e);
                n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskType) === l.DownloadKernel.TaskType.Group && (i = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath), i = o.join(i, t), b.information("getSavePathByFileName:", i, t))
            } while (0);
            return i
        }, e.shouleiFileTransfer = function (e) {
            return n(this, void 0, void 0, function* () {
                w.ThunderKernel.getSubNetUploader((t, i) => n(this, void 0, void 0, function* () {
                    if (b.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 = [];
                            S.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(3), r = i(7), a = i(10), s = Math.pow(2, 38),
        l = r.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 r = n.parse(i).name;
                if (!r || "" === r) break;
                let a = n.extname(r);
                if (!a || "" === a) break;
                ".td" === o || ".xltd" === o ? t = ".bt" === a || ".emule" === a ? n.parse(r).name : r : ".cfg" === o && (".td" === a || ".xltd" === a ? t = n.parse(r).name : ".emule" !== a && ".xlemule" !== a && ".bt" !== a && ".xlbt" !== a || (r = n.parse(r).name, t = n.parse(r).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), r = n.extname(e);
                if (!i || "" === i || !r || "" === r) break;
                let a = n.parse(i).name;
                if (!a || "" === a) break;
                let s = n.extname(a).toLowerCase();
                ".td" === r || ".xltd" === r ? t = ".bt" === s ? o.DownloadKernel.TaskType.Bt : ".emule" === s ? o.DownloadKernel.TaskType.Emule : o.DownloadKernel.TaskType.P2sp : ".cfg" === r && (".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 r = "file";
                if (n[1].length < r.length || 0 !== n[1].indexOf(r)) break;
                let a = 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 !== a.indexOf("%") && i(a)) try {
                    a = decodeURI(a)
                } catch (e) {
                }
                t = {
                    fileName: a = (a = (a = (a = (a = (a = (a = (a = (a = a.replace("<", "_")).replace(">", "_")).replace(":", "_")).replace('"', "_")).replace("/", "_")).replace("\\", "_")).replace("|", "_")).replace("?", "_")).replace("*", "_"),
                    fileHash: d,
                    fileSize: l
                }
            } while (0);
            return t
        };
        let r = 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 r = 0; r < e.length; r++) {
                let a = e.charAt(r);
                if (n++, escape(a).length > 4 && n++, o = o.concat(a), n >= t) {
                    i = o.toString();
                    break
                }
            }
            return n < t && (i = e), i
        }

        e.getXmpPath = function () {
            if (!r) {
                let e = "HKEY_LOCAL_MACHINE", t = "SOFTWARE\\Thunder Network\\Xmp", i = "Path";
                r = l.readRegString(e, t, i)
            }
            return r
        }, e.getLastAssociateExts = function () {
            return a.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), r = n.basename(e), a = n.extname(e), s = 260 - (i = d(o) + 2) - a.length - 2;
                s > 0 && (r = u(r, s), r += a, t = n.join(o, r))
            }
            return t
        }
    }(t.Common || (t.Common = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(3), o = i(373);
    !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";
    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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(3), a = i(14), s = i(51), l = i(56), d = i(102), u = i(30), c = i(16), h = i(34), f = i(25),
        p = i(11), g = i(43), m = i(124), v = i(33), y = i(125), w = i(74), k = i(15),
        T = o.default.getLogger("download-dispatch"), b = p.DownloadKernelTaskManager.getTaskManager(),
        C = c.DownloadKernelEventManager.getEventManager(), S = f.DownloadKernelCategoryManager.getCategoryManager(),
        I = l.ToastNotifyManagerNS.getToastNotifyManger(),
        _ = g.DownloadKernelCategoryViewManager.getCategoryViewManager(), A = 50, D = 51200;
    var x;
    !function (e) {
        e[e.resume = 1] = "resume"
    }(x || (x = {}));
    const N = 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 === b.getStartTaskIDs().length, t = yield y.CommonNS.callXmp(w.XmpPlayerFunction.isPlaying);
                v.ThunderHelper.setScreenSaveActive(e && !t, t)
            }), 3e4)
        }

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

        setAutoTail(e) {
            T.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, T.information("setFreeFromScheduleOpen", this.isFreeOpened, this.noLimitSize, this.tasks.length), e) {
                    for (let e of this.tasks) {
                        let i = b.getTaskFromTaskId(e), n = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileSize);
                        T.information("setFreeFromSchedule", n, t), n <= 1024 * t * 1024 && n > 0 ? i.setFreeFromSchedule(!0) : i.setFreeFromSchedule(!1)
                    }
                    for (let e of this.waitingTasks) b.getTaskFromTaskId(e).isFreeFromSchedule() && (yield this.startNoWaiting(e, !0))
                } else for (let e of this.tasks) b.getTaskFromTaskId(e).setFreeFromSchedule(!1)
            })
        }

        setAutoAddTaskAvailable(e) {
            T.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)) {
                        T.information("startTask is downloading", e);
                        break
                    }
                    let o = b.getTaskFromTaskId(e);
                    if (null === o) break;
                    if (o.getTaskAttribute(r.DownloadKernel.TaskAttribute.Background)) {
                        T.information("startTask is background", e), yield b.startTask(e, i);
                        break
                    }
                    let a = o.getTaskAttribute(r.DownloadKernel.TaskAttribute.CategoryId);
                    if (-1 !== a) {
                        S.isPrivateCategory(a) ? (T.information("startTask is private", e, a), yield b.startTask(e, i)) : yield k.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcRetrieveTaskContol", x.resume, [e]);
                        break
                    }
                    let s = o.isFreeFromSchedule();
                    if (s) {
                        T.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(r.DownloadKernel.TaskAttribute.FileSize);
                        if (t <= 1024 * this.noLimitSize * 1024 && t > 0) {
                            o.setFreeFromSchedule(!0), T.information("startTask isFreeFromSchedule"), yield this.startNoWaiting(e, !0, i), this.showSmallFileAdvancedNotify();
                            break
                        }
                        o.setFreeFromSchedule(!1)
                    }
                    if (t) {
                        T.information("startTask force no waiting", e), yield this.startNoWaiting(e, !1, i);
                        break
                    }
                    if (this.downloadingTasks.length < this.maxStartCount) {
                        T.information("startTask no waiting", e), yield this.startNoWaiting(e, !1, i);
                        break
                    }
                    T.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 && (T.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 = b.getTaskFromTaskId(e).getTaskAttribute(r.DownloadKernel.TaskAttribute.CategoryId);
                        void 0 !== t && -1 !== t ? S.isPrivateCategory(t) ? (i = !0, yield b.startTask(e)) : n.push(e) : o.push(e)
                    }
                    if (n.length > 0 && (yield k.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcRetrieveTaskContol", x.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 = b.getTaskFromTaskId(i), o = n.getTaskStatus(),
                                a = n.isFreeFromSchedule();
                            o !== r.DownloadKernel.TaskStatus.StartPending && o !== r.DownloadKernel.TaskStatus.Started || a || (e += 1) > this.maxStartCount && (T.information("to stop", i), this.stopAndWaiting(i, r.DownloadKernel.TaskStopReason.MaxDownloadReduce).catch())
                        }
                    } else if (this.waitingTasks.length > 0 && this.downloadingTasks.length < this.maxStartCount) {
                        T.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 (b.getTaskFromTaskId(t).getTaskStatus() === r.DownloadKernel.TaskStatus.StartWaiting && (yield this.startNoWaiting(t), T.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 ? I.showNotify(l.ToastNotifyManagerNS.notifyIdTaskDispatchSmallFileAdvanced, s.ToastNotifyItemType.GreenNotify, `正在优先下载小于${this.noLimitSize}MB的任务`, 3e3) : T.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(r.DownloadKernel.CategroyViewID.Downloading).getTasks();
            for (let [, i]of t) e.push(i.getTaskBaseInfo());
            e.sort(m.SortNS.getSortFuncByConfig(r.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 b.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 (b.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 = b.getTaskFromTaskId(t).getTaskStatus();
                if (e === r.DownloadKernel.TaskStatus.Stopped || e === r.DownloadKernel.TaskStatus.Failed || e === r.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]))
                }
            }
            b.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) && b.getTaskFromTaskId(t).getTaskStatus() === r.DownloadKernel.TaskStatus.StartWaiting) {
                        T.information("convertWaiting2Start", t), yield this.startNoWaiting(t);
                        break
                    }
                }
            })
        }

        batchConvertWaiting2Start(e) {
            for (let t of e) this.waitingTasks.includes(t) && b.getTaskFromTaskId(t).getTaskStatus() === r.DownloadKernel.TaskStatus.StartWaiting && (T.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 r = o.map(e => e.speed);
                i = r.reduce((e, t) => e + t, 0) / r.length
            } while (0);
            return T.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(a.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, this.onGlobalDownloadSpeedChanged.bind(this)), T.information("start auto add timer"), this.autoAddTimerId = setInterval(() => n(this, void 0, void 0, function* () {
                    do {
                        if (this.downloadingTasks.length + this.freeDownloadingTasks.length >= A) {
                            T.information("auto add task upper limit");
                            break
                        }
                        if (0 === this.waitingTasks.length) break;
                        this.isAutoAddTask() && (yield this.convertWaiting2Start())
                    } while (0)
                }), 3e4))
            } while (0)
        }

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

        isAutoAddTask() {
            let e = !1, t = this.getAverageSpeed(this.speedArray);
            return t < 1024 * this.autoAddRate && (e = !0), T.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) : (T.information("no waiting task to stopAutoAdd"), this.stopAutoAddTask())
            } while (0)
        }

        isLowSpeed(e, t) {
            let i = !1;
            do {
                if (0 === this.waitingTasks.length) {
                    T.information("isLowSpeed task no waiting now");
                    break
                }
                if (!t) break;
                if (0 === t.length) break;
                if (this.lowSpeedCache.hasOwnProperty(String(e))) {
                    T.information("task already move to tail once");
                    break
                }
                let n = b.getTaskFromTaskId(e);
                if (!n) break;
                let o = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileSize),
                    a = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSize);
                if (o > 0 && 100 * a / o >= 99.9) {
                    T.information("isLowSpeed percent more then 99.9");
                    break
                }
                if (v.ThunderHelper.getTickCount() - t[0].tickCount < 1e4) {
                    T.information("isLowSpeed task start less then 10s", t);
                    break
                }
                this.getAverageSpeed(t.slice(1)) < D && (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();
                    T.information("init first speed item", t, e), this.taskSpeedMap[e] = [{speed: 0, tickCount: t}]
                }
            } while (0)
        }

        trySwitchAutoTail() {
            T.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 = C.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];
                        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)
                }), T.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 r = n[o];
                        if (e.hasOwnProperty(String(r)) && this.isLowSpeed(r, e[r]) && (T.information("isLowSpeed data is", r, e[r]), i++, yield this.convertWaiting2Start(), yield this.moveTask2Tail(Number(r)), this.lowSpeedCache[r] = !0, i === t)) {
                            T.information("isLowSpeed current waitingtask all convert start");
                            break
                        }
                    }
                }), 3e4)
            } while (0)
        }

        stopAutoTail() {
            T.information("stopAutoTail"), void 0 !== this.autoTailTimerId && (clearInterval(this.autoTailTimerId), this.autoTailTimerId = void 0), this.taskDetailCookie && (C.detachTaskEvent(r.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) => {
                    b.stopTaskAW(e, t).then(t => {
                        t ? (T.information("stoptask and startwaiting", e), this.startWaiting(e)) : T.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) {
                        T.information("moveTask2Tail already at the end"), yield this.stopAndWaiting(e, r.DownloadKernel.TaskStopReason.LowSpeed);
                        break
                    }
                    return new Promise((t, i) => {
                        u.default.fireEvent(a.NodeEventMesssageNS.evetDownloadMove2Tail, e, () => n(this, void 0, void 0, function* () {
                            yield this.stopAndWaiting(e, r.DownloadKernel.TaskStopReason.LowSpeed), t()
                        }))
                    })
                } while (0)
            })
        }

        attachTaskEvent() {
            C.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, (...e) => n(this, void 0, void 0, function* () {
                do {
                    if (!e) break;
                    if (e[0] !== r.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(r.DownloadKernel.TaskAttribute.Background)) continue;
                        let n = i.getTaskStatus(), o = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
                        if (i.getTaskAttribute(r.DownloadKernel.TaskAttribute.GroupTaskId) > 0) continue;
                        if (-1 !== i.getTaskAttribute(r.DownloadKernel.TaskAttribute.CategoryId)) continue;
                        if (n === r.DownloadKernel.TaskStatus.StartPending || n === r.DownloadKernel.TaskStatus.Started) continue;
                        if ((n === r.DownloadKernel.TaskStatus.StopPending || n === r.DownloadKernel.TaskStatus.Stopped) && d.DownloadJammedNS.isStopPending(o)) {
                            T.information("ignore status change download jammed stop", n);
                            continue
                        }
                        let a = this.downloadingTasks.indexOf(o);
                        if (-1 !== a) this.downloadingTasks.splice(a, 1), this.syncTaskSpeedMap([o]); else {
                            let e = this.freeDownloadingTasks.indexOf(o);
                            -1 !== e && this.freeDownloadingTasks.splice(e, 1)
                        }
                        if (n === r.DownloadKernel.TaskStatus.StartWaiting) continue;
                        let s = this.waitingTasks.indexOf(o);
                        if (-1 !== s && (this.waitingTasks.splice(s, 1), this.switchAutoAddTask(), this.trySwitchAutoTail()), (n === r.DownloadKernel.TaskStatus.Succeeded || n === r.DownloadKernel.TaskStatus.Failed || n === r.DownloadKernel.TaskStatus.StopPending || n === r.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)
            })), C.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 (-1 !== e[1]) break;
                    if (e[2] !== r.DownloadKernel.CategroyViewID.Downloading) break;
                    let t = e[3];
                    for (let e of t) {
                        let t = e.getTaskAttribute(r.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 () {
            N.init()
        }, e.updateTasksOrder = function (e) {
            N.updateTasks(e)
        }, e.startTask = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = b.getTaskFromTaskId(e).getTaskStatus();
                return n !== r.DownloadKernel.TaskStatus.Succeeded && n !== r.DownloadKernel.TaskStatus.Seeding && N.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 N.startTasks(e)
            })
        }, e.setStartTaskCount = function (e) {
            do {
                if ("number" != typeof e && (e = Number(e)), isNaN(e)) break;
                if (e <= 0) break;
                N.setMaxStartTaskCount(e).catch()
            } while (0)
        }, e.setFreeFromScheduleOpen = function (e, t) {
            N.setFreeFromScheduleOpen(e, t).catch()
        }, e.setAutoAddTaskAvailable = function (e) {
            N.setAutoAddTaskAvailable(e)
        }, e.setAutoAddTask = function (e, t) {
            N.setAutoAddTask(e, t)
        }, e.setAutoTail = function (e) {
            N.setAutoTail(e)
        }
    }(t.DownloadDispatchNS || (t.DownloadDispatchNS = {}))
}, function (e, t, i) {
    e.exports = i(66)(28)
}, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(8), a = i(3);
    !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() !== a.DownloadKernel.TaskType.Bt) break;
                    let n = e.getExtraObject();
                    if (!n) break;
                    if (1 !== n.getFileCount()) break;
                    let s = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.SavePath),
                        l = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskName), d = o.join(s, l);
                    if (yield r.FileSystemAWNS.existsAW(d)) {
                        let e = yield r.FileSystemAWNS.lstatAW(d);
                        if (e && e.isDirectory()) {
                            let e = void 0, i = n.getBtFileList();
                            for (let [, t]of i) {
                                e = t.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileName);
                                break
                            }
                            if (!e) break;
                            let s = o.join(d, e);
                            if (yield r.FileSystemAWNS.existsAW(s)) {
                                let e = yield r.FileSystemAWNS.lstatAW(s);
                                e && e.isDirectory() && (t = !0);
                                break
                            }
                            let l = e + ".bt.xltd";
                            if (s = o.join(d, l), yield r.FileSystemAWNS.existsAW(s)) {
                                let e = yield r.FileSystemAWNS.lstatAW(s);
                                e && e.isDirectory() && (t = !0);
                                break
                            }
                            if (l = e + ".bt.td", s = o.join(d, l), yield r.FileSystemAWNS.existsAW(s)) {
                                let e = yield r.FileSystemAWNS.lstatAW(s);
                                e && e.isDirectory() && (t = !0);
                                break
                            }
                            break
                        }
                    }
                    let u = n.getBtFileList();
                    for (let [, e]of u) {
                        i = e.getBtFileAttribute(a.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() !== a.DownloadKernel.TaskType.Bt) break;
                    let i = e.getExtraObject();
                    if (!i) break;
                    if (1 !== i.getFileCount()) break;
                    let n = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.SavePath),
                        s = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskName), l = o.join(n, s),
                        d = yield r.FileSystemAWNS.dirExistsAW(l);
                    if (d) break;
                    let u = void 0, c = void 0, h = i.getBtFileList();
                    for (let [, e]of h) {
                        u = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileName), c = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FilePath);
                        break
                    }
                    if (!u || !c) break;
                    if (l = o.join(n, c), d = yield r.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, r = e.getExtraObject().getBtFileList();
                for (let [, e]of r) {
                    n = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FilePath), i = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileName), n && (i = o.join(n, i));
                    break
                }
                let s = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.SavePath);
                t = o.join(s, i)
            }
            return t
        }
    }(t.SingleBtTaskNS || (t.SingleBtTaskNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(0), a = i(20), s = i(2), l = i(23), d = i(7), u = i(17), c = i(10), h = i(14), f = i(71),
        p = d.default(s.join(__rootDir, "../bin/ThunderHelper.node")), g = r.default.getLogger("config-remote-global");
    const m = new class {
        constructor() {
            this.configJsonData = null, this.eventEmitter = new a.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 r = p.getChannelID();
                r && "" !== r && (i.channel = r), i["app-type"] = "pc";
                let a = (new Date).getTimezoneOffset();
                i["time-zome"] = (a / 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) {
    "use strict";
    var n = i(497), o = i(610), r = Object.prototype.toString;

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

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

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

    function d(e, t) {
        if (null !== e && void 0 !== e) if ("object" != typeof e && (e = [e]), a(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: a, isArrayBuffer: function (e) {
            return "[object ArrayBuffer]" === r.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]" === r.call(e)
        }, isFile: function (e) {
            return "[object File]" === r.call(e)
        }, isBlob: function (e) {
            return "[object Blob]" === r.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(44);
    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 r 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 = r;
    t.RedToastNotifyItem = class extends r {
        constructor(e, t, i, n) {
            super(e, t, i, n)
        }

        getType() {
            return o.RedNotify
        }
    };

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

        getCancel() {
            return !0
        }

        getCancelText() {
            return "取消"
        }

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

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

        getType() {
            return o.RedCancelNotify
        }
    };
    t.CustomToastNotifyItem = class extends a {
        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) {
    "use strict";
    var n;
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.Download = "download-panel", e.Cloud = "pan-plugin-view"
    }(n = t.NavViewID || (t.NavViewID = {}));
    const o = {
        currentNav: n.Download,
        navs: [{
            content: "下载",
            icon: "xly-icon-nav-down",
            key: n.Download,
            unReadNum: 0,
            showUnRead: !0,
            showRedDot: !1
        }, {
            content: "云盘",
            icon: "xly-icon-nav-cloud",
            key: n.Cloud,
            unReadNum: 0,
            showUnRead: !0,
            showRedDot: !1
        },]
    }, r = {
        SELECT_NAV(e, t) {
            e.navs.some(e => e.key === t) && (e.currentNav = t, "find-page" === t ? this.commit("SHOW_OR_HIDE_BROWSER", !0, {root: !0}) : this.commit("SHOW_OR_HIDE_BROWSER", !1, {root: !0}))
        }
    }, a = {
        currentNav: e => e.currentNav, navList: e => e.navs, messageUnreadNum: e => {
        }
    };
    t.default = {state: o, mutations: r, getters: a}
}, function (e, t, i) {
    (function () {
        var t, n, o, r, a, s, l, d, u, c, h, f, p = {}.hasOwnProperty;
        f = i(75), h = f.isObject, c = f.isFunction, u = f.isEmpty, a = null, t = null, n = null, o = null, r = 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 = [], a || (a = i(127), t = i(128), n = i(129), o = i(130), r = i(131), l = i(136), d = i(137), s = i(138))
            }

            return e.prototype.element = function (e, t, i) {
                var n, o, r, a, 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 (r = 0, d = e.length; r < d; r++) o = e[r], 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 (a = 0, f = m.length; a < f; a++) o = m[a], (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, r;
                if (this.isRoot) throw new Error("Cannot insert elements at root level");
                return o = this.parent.children.indexOf(this), r = this.parent.children.splice(o), n = this.parent.element(e, t, i), Array.prototype.push.apply(this.parent.children, r), n
            }, e.prototype.insertAfter = function (e, t, i) {
                var n, o, r;
                if (this.isRoot) throw new Error("Cannot insert elements at root level");
                return o = this.parent.children.indexOf(this), r = this.parent.children.splice(o + 1), n = this.parent.element(e, t, i), Array.prototype.push.apply(this.parent.children, r), 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 a(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, r, a;
                if (null != e && (e = e.valueOf()), null != t && (t = t.valueOf()), Array.isArray(e)) for (r = 0, a = e.length; r < a; r++) i = e[r], 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, r;
                return n = this.document(), r = new o(n, e, t, i), n.children[0] instanceof o ? n.children[0] = r : n.children.unshift(r), n.root() || n
            }, e.prototype.doctype = function (e, t) {
                var i, n, o, a, s, l, d, u, c;
                for (i = this.document(), n = new r(i, e, t), o = a = 0, l = (u = i.children).length; a < l; o = ++a) if (u[o] instanceof r) 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}), 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(0), o = i(44), r = i(51), a = 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) {
                a.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) {
                a.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) {
                a.information("showNotify notifyId:", e, ", notifyType:", t, ", message:", i, ", duration:", n, ", component:", o);
                let s = null;
                switch (t) {
                    case r.ToastNotifyItemType.GreenNotify:
                        s = new r.ToastNotifyItem(e, i, n);
                        break;
                    case r.ToastNotifyItemType.RedCancelNotify:
                        s = new r.RedCancelToastNotifyItem(e, i, n);
                        break;
                    case r.ToastNotifyItemType.RedNotify:
                        s = new r.RedToastNotifyItem(e, i, n);
                        break;
                    case r.ToastNotifyItemType.Custom:
                        s = new r.CustomToastNotifyItem(e, i, n, o)
                }
                return s ? (this.notifyList.push(s), this.fireEvent("OnShowNotify", e, s), s) : s
            }

            showNotifyEx(e, t, i, n, o, a) {
                let s = null;
                switch (t) {
                    case r.ToastNotifyItemType.GreenNotify:
                        s = new r.ToastNotifyItem(e, i, n, o);
                        break;
                    case r.ToastNotifyItemType.RedCancelNotify:
                        s = new r.RedCancelToastNotifyItem(e, i, n, o);
                        break;
                    case r.ToastNotifyItemType.RedNotify:
                        s = new r.RedToastNotifyItem(e, i, n, o);
                        break;
                    case r.ToastNotifyItemType.Custom:
                        s = new r.CustomToastNotifyItem(e, i, n, a)
                }
                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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(62), r = i(4), a = i(0), s = i(29), l = i(5), d = a.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"}, a = "prod") {
        return n(this, arguments, void 0, function* () {
            d.information("fetchFromApiProxy", arguments);
            try {
                const n = yield Promise.all([r.client.callServerFunction("GetUserID"), r.client.callServerFunction("GetSessionID"), r.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), w = o.toUpperCase() + "&" + y + "&", k = "";
                for (let e = 0; e < v.length - 1; ++e) k += v[e] + "%26";
                let T, b = w + (k += v[v.length - 1]);
                !t || "post" !== o && "put" !== o || (b += "%26" + JSON.stringify(t)), d.information("message: ", b), T = "test" === a ? "c9879c94a55474304cca0abafb867653" : "89917368930f3fea5bafebe704d6b623";
                let C = s.ToolsUtilitiesAWNS.encryptHmacBuffer("sha1", T, b, "base64");
                C = (C = C.replace(/\+/g, "-")).replace(/\//g, "_");
                let S = e + "?";
                for (let e in g) S += h(e) + "=" + h(g[e]) + "&";
                S += "sig=" + C, d.information("fetchFromApiProxy method", o, ", uri", S, ", data", t, ", headers", p._h);
                const I = yield i(18);
                return I.defaults.adapter = i(21), I.defaults.headers["Content-Type"] = "post" === o ? "application/json" : "application/x-www-form-urlencoded", I.request({
                    method: o,
                    url: S,
                    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"}, a = "prod") {
        return n(this, arguments, void 0, function* () {
            d.information("fetchFromApiProxy", arguments);
            try {
                const n = yield Promise.all([r.client.callServerFunction("GetUserID"), r.client.callServerFunction("GetSessionID"), r.client.callServerFunction("GetPeerID")]), [a, s, u] = n;
                d.information("fetchFromApiProxyNoSign", n);
                let c = {
                    _h: Object.assign({
                        "Account-Id": a,
                        "Peer-Id": u,
                        "User-Id": a,
                        "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", a = !0) {
        return n(this, void 0, void 0, function* () {
            let n = u[o], s = yield r.client.callServerFunction("GetValue", "ConfigFetchInterface", "TestServer", 0);
            return 1 === s && (n = u[o = "test"]), d.information("当前fetchSlRes 是否测试服:", s, " 远程地址:", n), a ? 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"}, a = "prod") {
        return n(this, void 0, void 0, function* () {
            let n = u[a], s = yield r.client.callServerFunction("GetValue", "ConfigFetchInterface", "TestServer", 0);
            1 === s && (n = u[a = "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 r.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, a = "prod") {
        return n(this, void 0, void 0, function* () {
            let n = u[a];
            t = `${n}${t}`;
            const s = yield Promise.all([r.client.callServerFunction("GetUserID"), r.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 a = 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: a, sessionID: l} = yield r.client.callServerFunction("GetUserInfoAw"),
                        d = yield r.client.callServerFunction("GetPeerID");
                    d = d || v("peerid", n) || v("deviceid", n);
                    const u = {
                        userID: o,
                        sessionID: l,
                        version: a,
                        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} = a;
            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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(4), a = 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 r.client.callServerFunction("IsLogined"),
                    d = yield r.client.callServerFunction("GetUserID");
                l ? (s.information("is logined"), n = Promise.resolve(d)) : (n = new Promise((i, n) => {
                    let r = -1;
                    if (r = a.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 !== r && (a.NativeCallModule.nativeCall.DetachNativeEvent("OnUserLogin", r), r = -1)
                    }), !e) {
                        let e = a.NativeCallModule.nativeCall.AttachNativeEvent("OnLoginWndClose", n => {
                            do {
                                if ("close" === n) {
                                    if (i(""), !t && -1 !== r) {
                                        a.NativeCallModule.nativeCall.DetachNativeEvent("OnUserLogin", r), r = -1;
                                        break
                                    }
                                } else if ("suc" === n && -1 !== r) break;
                                t && -1 !== r && (a.NativeCallModule.nativeCall.DetachNativeEvent("OnUserLogin", r), r = -1)
                            } while (0);
                            a.NativeCallModule.nativeCall.DetachNativeEvent("OnLoginWndClose", e)
                        })
                    }
                }), e || (o = Date.now(), r.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(3), o = i(377), r = i(102), a = i(25).DownloadKernelCategoryManager.getCategoryManager();
    !function (e) {
        let t, i, s;

        function l(e) {
            let o = null, r = e.receiveSize, a = e.srcUsing;
            do {
                if (e.taskType === n.DownloadKernel.TaskType.P2sp) {
                    if (r > 0) {
                        o = t.Stared;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.StartPending) {
                        o = t.Starting;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.Started && 0 === r) {
                        o = t.Connect;
                        break
                    }
                } else if (e.taskType === n.DownloadKernel.TaskType.Bt) {
                    if (r > 0) {
                        o = i.Stared;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.StartPending) {
                        o = i.Analy;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.Started) {
                        o = a > 0 ? i.Connect : i.Search;
                        break
                    }
                } else if (e.taskType === n.DownloadKernel.TaskType.Emule) {
                    if (r > 0) {
                        o = s.Stared;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.StartPending) {
                        o = s.Starting;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.Started) {
                        o = a > 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 || a.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 (r.DownloadJammedNS.isStopPending(e.taskId)) {
                        t = "0B/s";
                        break
                    }
                } else if (r.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(66)(12)
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(54), 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 r = o.join(t, `${i}-xunlei-node-net-ipc-{FD196984-2591-4588-AA6F-5C8AC1266290}.sock`);
        return "win32" === process.platform && (r = "\\\\.\\pipe\\" + (r = (r = r.replace(/^\//, "")).replace(/\//g, "-"))), r
    }, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(641), a = i(0), s = i(12), l = i(15), d = a.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"), r.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"), r.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) {
        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}), 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 r = new Date(+e), a = (new Date).getTime(), s = a - 1 * e, l = n(a, r.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) : r.getFullYear() === (new Date).getFullYear() ? `${o(r.getMonth() + 1, 2)}-${o(r.getDate(), 2)} ${o(r.getHours(), 2)}:${o(r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(47), r = i(18), a = 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 r.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 r.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 = a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), r = i(34), a = i(11), s = i(31), l = i(8), d = a.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], r = null;
                    n.taskType === o.DownloadKernel.TaskType.P2sp ? r = {
                        keyType: o.DownloadKernel.KeyType.P2spUrl,
                        keyValue: n.value,
                        keyFilter: o.DownloadKernel.KeyFilter.All
                    } : n.taskType === o.DownloadKernel.TaskType.Emule ? r = {
                        keyType: o.DownloadKernel.KeyType.EmuleFileHash,
                        keyValue: n.value,
                        keyFilter: o.DownloadKernel.KeyFilter.All
                    } : n.taskType === o.DownloadKernel.TaskType.Bt ? r = {
                        keyType: o.DownloadKernel.KeyType.BtInfoId,
                        keyValue: n.value,
                        keyFilter: o.DownloadKernel.KeyFilter.All
                    } : n.taskType === o.DownloadKernel.TaskType.Magnet && (r = {
                        keyType: o.DownloadKernel.KeyType.MagnetUrl,
                        keyValue: n.value,
                        keyFilter: o.DownloadKernel.KeyFilter.All
                    }), r && t.push(r)
                }
                return d.batchFindTaskAsync(t)
            })
        }, e.importUnfinishedTaskAW = function (e, t) {
            return n(this, void 0, void 0, function* () {
                return new Promise(i => {
                    r.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), r = i(3), a = i(39), s = i(33), 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 = a.TaskUtilHelper.getTaskFileType(void 0, e);
                if (n === a.TaskUtilHelper.FileExtType.Video || n === a.TaskUtilHelper.FileExtType.Music || n === a.TaskUtilHelper.FileExtType.Pic) {
                    i = !0;
                    break
                }
                i = t(e)
            } while (0);
            return i
        }

        function l(e) {
            let t = !1, r = n.parse(e);
            return t = i(r.name) && o(r.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 w(e) {
            return u.parseEd2kUrl(e)
        }

        function k(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 === r.DownloadKernel.TaskType.P2sp) {
                let i = k(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 === r.DownloadKernel.TaskType.Emule && (t = w(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 = w, e.parseUrl = k, 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});
    const n = i(19), o = i(5), r = i(119), a = i(120);
    !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 = [a.CommonIPCMessage.msgIPCRendererConnect, a.CommonIPCMessage.msgIPCRendererDisconnect]
            }

            onMessage(e, t) {
                do {
                    if (!o.isString(e) || 0 === e.length) {
                        r.error("msgName is null");
                        break
                    }
                    if (o.isNullOrUndefined(t)) {
                        r.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(a.CommonIPCMessage.msgIPCSendToMain, (e, t) => {
                    let i = void 0;
                    do {
                        if (o.isNullOrUndefined(t)) {
                            r.error("msgInfo is empty");
                            break
                        }
                        if (!this.isConnected) {
                            r.warning("hasnot been connected yet");
                            break
                        }
                        let n = t.msg.name;
                        if (this.isIPCModuleIntervalMsg(n)) {
                            r.information(`IPC module interval msg : ${n}`);
                            let o = this.handleIPCModuleIntervalMsg(e.sender, t);
                            if (i = o[1], !o[0]) break;
                            r.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(a.CommonIPCMessage.msgIPCSendToRenderer, (t, i) => {
                    let n = void 0;
                    do {
                        if (o.isNullOrUndefined(i)) {
                            r.error("msgInfo is empty");
                            break
                        }
                        if (!this.isConnected) {
                            r.warning("hasnot been connected yet");
                            break
                        }
                        let a = i.msg.name;
                        if (this.isIPCModuleIntervalMsg(a)) {
                            r.information(`IPC module interval msg : ${a}`);
                            let e = this.handleIPCModuleIntervalMsg(t.sender, i);
                            if (n = e[1], !e[0]) break;
                            r.information("need to dispatch msg:" + a)
                        }
                        e ? (r.information("is main, handle forward msg"), this.handleForwardRendererToRendererMsg(i)) : (r.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 === a.CommonIPCMessage.msgIPCRendererConnect) {
                        i = [!0, this.handleRendererConnectMsg(e, t)];
                        break
                    }
                    if (n === a.CommonIPCMessage.msgIPCRendererDisconnect) {
                        i = [!0, this.handleRendererDisconnectMsg(e, t)];
                        break
                    }
                } while (0);
                return i
            }

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

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

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

            sendForwardRendererToRendererMsg(e) {
                r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), r = i(22), a = i(4), 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, r) {
        let a = {url: "/dlj_create", data: Object.assign({url: e, "Chat-Version": 2}, r), method: "post"};
        return "string" == typeof i && (a.data.type = i), t && (a.data.uid = t), "string" == typeof n && (a.data.passwd = n), o.fetchSlRes(a)
    }

    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 a.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), r.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 a.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) {
        r.MessageBox.custom("BirdKeyShow", {
            showType: d.ShowUI_Decoding,
            birdkeyChars: e,
            statData: t
        }, {modal: !1}).catch()
    }, t.saveVestUrlToConfig = function (e, t) {
        let i = t ? "vestURL" : "commonUrl";
        a.client.callServerFunction("GetValue", "BirdKeyVest", i, []).then(t => {
            let n = t || [];
            "" !== e && -1 === n.join().indexOf(e) && (n.push(e), a.client.callServerFunction("SetValue", "BirdKeyVest", i, n).catch())
        }).catch()
    }, t.isVestUrl = function (e, t) {
        return n(this, void 0, void 0, function* () {
            let i = yield a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(2), a = i(29), s = i(8), l = i(7), d = i(10), u = i(14), c = i(149), h = i(0), f = i(4),
        p = i(23), g = i(38), m = i(26), v = h.default.getLogger("AdHelperNS"),
        y = l.default(r.join(__rootDir, "../bin/ThunderHelper.node"));
    o.default.defaults.headers["Content-Type"] = "application/x-www-form-urlencoded";
    const w = "1.0", k = "14", T = "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}${T}`, t = a.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), r = Number(n.vasType), a = Number(n.isYear);
                        0 === o ? e = t.noVip : 3 === r ? e = 0 !== a ? t.bjN : t.bjVip : 5 === r && (e = 0 !== a ? t.cjN : t.cjVip)
                    }
                }
                return e
            })
        }

        function h(e) {
            return n(this, void 0, void 0, function* () {
                let t = "", n = {appId: k, 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 b() {
        }

        !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 r = m.default.getConfigInfo("ad", "enable");
                    if (0 === r) {
                        v.information("获取到的配置中信息，不显示广告 enable = ", r);
                        break
                    }
                    if (null === e || void 0 === e) break;
                    let a = `${b()}/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: w
                    });
                    v.information("getAdDataAw:", a, u);
                    try {
                        null !== (s = yield o.default({
                            method: "post",
                            url: a,
                            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 = `${b()}/api/adp/hotword`, r = null, a = yield h({count: e});
                    v.information("getHotWordsAw:", n, a);
                    try {
                        null !== (r = yield o.default({
                            method: "get",
                            url: n + "?" + a
                        })) && void 0 !== r && 200 === r.status && void 0 !== r.data && null !== r.data && "" !== r.data && (t = r.data)
                    } catch (e) {
                        v.information(e)
                    }
                } while (0);
                return t
            })
        }, e.statServer = function (e, t, r) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (null === e || void 0 === e || null === t || void 0 === t || null === r || void 0 === r) break;
                    let n = {positionId: e, orderId: t, statType: r, statValue: 1}, a = [];
                    a.push(n);
                    let s = {
                        appId: k,
                        callId: Date.now(),
                        guid: y.getPeerID(),
                        identity: "",
                        items: JSON.stringify(a),
                        positionId: e,
                        v: w
                    };
                    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 = `${b()}/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 = r.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 a = o.substring(t.length);
                        a = r.join(__rootDir, `../../../${a}`), n = y.shellExecute(0, "open", a, "", "", "SW_SHOW"), v.information("execute:", e, a, 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, 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.trans_gcid = 4130] = "trans_gcid", e[e.PlayType = 4131] = "PlayType", e[e.StringEnd = 4132] = "StringEnd"
    }(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.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.updateFloatHwnd = "UpdateFloatHwnd", e.updateAplayerHwnd = "UpdateAplayerHwnd", e.updatePlaySource = "UpdatePlaySource", e.setXmpCurrentMode = "SetXmpCurrentMode", e.getXmpCurrentMode = "GetXmpCurrentMode", 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.getIsFullScreen = "GetIsFullScreen", 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.isCurrentBuffingIsByDrag = "IsCurrentBuffingIsByDrag",e.getLastPlayError = "GetLastPlayError",e.getPlayId = "GetPlayId",e.getPlayTick = "GetPlayTick"
    }(t.XmpPlayerFunction || (t.XmpPlayerFunction = {})), 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, "失效文件，可能已经被删除"]]);
        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, t) {
    (function () {
        var t, i, n, o, r, a, s = [].slice, l = {}.hasOwnProperty;
        t = function () {
            var e, t, i, n, r, a;
            if (a = arguments[0], r = 2 <= arguments.length ? s.call(arguments, 1) : [], o(Object.assign)) Object.assign.apply(null, arguments); else for (e = 0, i = r.length; e < i; e++) if (null != (n = r[e])) for (t in n) l.call(n, t) && (a[t] = n[t]);
            return a
        }, o = function (e) {
            return !!e && "[object Function]" === Object.prototype.toString.call(e)
        }, r = 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
        }, a = function (e) {
            var t, i;
            return r(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 = r, e.exports.isArray = i, e.exports.isEmpty = n, e.exports.isPlainObject = a
    }).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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), r = i(2), a = i(0), s = i(7), l = i(8), d = i(14), u = i(10), c = i(647),
        h = a.default.getLogger("BHOConfig"), f = s.default(r.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 = r.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 = r.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";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

    class b 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, 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.extData = t.extData, this.hideUI && (this.showUrl = !1), void 0 !== t.pinned && "boolean" == typeof t.pinned && (this.pinned = t.pinned), e === T.XDAS ? n = this.xdasTabInit(t) : e === T.Chromium ? n = yield this.chromiumTabInit(t, i) : e === T.IE && (n = this.ieTabInit(t))
                } while (0);
                return n
            })
        }

        navigate(e) {
            let t = !1;
            do {
                if (this.type !== T.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 !== T.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 !== T.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 !== T.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 !== T.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 !== T.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 !== T.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 !== T.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 !== T.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 !== T.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 === T.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 === T.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 === T.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 === T.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 === T.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 === T.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 === T.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 r = c.NativeCall.nativeFunctionContainer.filter(e => t === e.functionName), a = 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") || k,
                    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 === T.Chromium) {
                    s = h.NativeFunctionErrorCode.NotAllowed, this.browser.callJsFunctionById(i, s);
                    break
                }
                if (d.isNullOrUndefined(r) || 0 === r.length || d.isNullOrUndefined(r[0].nativeFunc)) {
                    if (s = h.NativeFunctionErrorCode.FunctionUnExist, d.isNullOrUndefined(i)) {
                        o = !0;
                        break
                    }
                    if (this.type === T.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, a))
                    } else if (this.type === T.Chromium) {
                        if (d.isNullOrUndefined(this.browser)) {
                            y.warning(this.browser);
                            break
                        }
                        this.browser.callJsFunctionById(i, s)
                    }
                } else r[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 === T.XDAS) {
                    if (d.isNullOrUndefined(u.NativeCallHostModule.nativeCallHost)) {
                        y.warning(u.NativeCallHostModule.nativeCallHost);
                        break
                    }
                    u.NativeCallHostModule.nativeCallHost.callJsFunctionById(e, i, o)
                } else if (this.type === T.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] === b.defaultBrowserUrl
        }

        setShowUrl(e) {
            this.showUrl = e
        }

        xdasTabInit(e) {
            return d.isNullOrUndefined(e) && (e = {}), void 0 === e.title ? this.title = b.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 = b.defaultBrowserUrl, this.curUrl = e.url), a.BrowserSupportNS.browserIsInitFinish() || (this.trackBrowserEvent("browser_load_init", e.url), yield a.BrowserSupportNS.initTBC()), void 0 === e.title ? this.title = b.defaultBrowserTitle : this.title = e.title, void 0 === e.isFromPopup && (e.isFromPopup = !1), void 0 === e.eventListeners ? e.eventListeners = b.defaultEventList : e.eventListeners = e.eventListeners.concat(b.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(w, n)), y.information("stroe chromiumTabInit param", e), this.trackBrowserEvent("browser_load_create", e.url);
                    let o = new r.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 === T.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 = b.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
        }
    }

    b.defaultXDASTitle = "下载", b.defaultBrowserTitle = "正在加载...", b.defaultBrowserUrl = "http://misc.xl9.xunlei.com/chrome/client/view/dist/1.0/new_tab.html", b.defaultEventList = [], b.tempBrowser = null, t.Tab = b
}, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(3), a = i(33);
    let s = null;
    const l = i(0).default.getLogger("url.helper");
    !function (e) {
        function t(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 d(e, i = !0) {
            i = void 0 === i || i;
            let n = !1;
            do {
                if ("string" != typeof e || "" === e) break;
                let o = e.trim();
                if ("" === o) break;
                if (a.ThunderHelper.getTaskTypeFromUrl(o) === r.DownloadKernel.TaskType.Unkown) {
                    if (!i) break;
                    t(o) && (n = !0)
                } else n = !0;
                n || o.match(/^file:\/\/\//) && (n = !0)
            } while (0);
            return n
        }

        e.isMagnetCode = t, e.fixMagnetUrl = function (e) {
            let i = "";
            do {
                if ("string" != typeof e || "" === e) break;
                if ("" === (i = e.trim())) break;
                a.ThunderHelper.getTaskTypeFromUrl(i) === r.DownloadKernel.TaskType.Unkown && t(i) && (i = "magnet:?xt=urn:btih:" + i)
            } while (0);
            return i
        }, e.isUrlValid = d, 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 === s && (s = yield Promise.resolve().then(() => i(47)));
                let n = s.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 = a.ThunderHelper.getTaskTypeFromUrl(i);
                if (n === r.DownloadKernel.TaskType.P2sp || n === r.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 u = ".edu;.gov;.mil;.hk;.tw;.com.tw;.com.tw;.aero;.biz;.coop;.info;.museum;.name;.pro;";
        u += ".com;.cn;.xin;.net;.top;.xyz;.wang;.shop;.site;.club;.cc;.fun;.online;.biz;.red;.link;.ltd;.mobi;.info;.org;", u += ".com.cn;.net.cn;.org.cn;.gov.cn;.name;.vip;.work;.tv;.co;.kim;.group;.tech;.store;.ren;.ink;.pub;.live;.wiki;.design;";
        const c = (u += ".me").split(";");

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

        function f(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;
                l.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];
                l.information("url parse", t)
            } while (0);
            return t
        }

        e.isUsualDomainSuffix = h, e.urlParse = f, e.isUrl = function (e) {
            let t = !1, i = e;
            do {
                if (void 0 === e || null === e) break;
                if (d(e, !1)) {
                    t = !0;
                    break
                }
                if (e.trim().match(/^file:\/\/\//)) {
                    t = !0;
                    break
                }
                let n = f(e);
                if (null === n) {
                    l.information("url parse failed");
                    break
                }
                if (void 0 === n.host || null === n.host) break;
                if (void 0 !== n.scheme) {
                    t = !0;
                    break
                }
                let r = n.host.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
                if (r) {
                    if (l.information("url parse is ip", r), Number(r[1]) <= 0 || Number(r[1]) > 255) {
                        t = !1;
                        break
                    }
                    if (Number(r[2]) < 0 || Number(r[2]) > 255) {
                        t = !1;
                        break
                    }
                    if (Number(r[4]) < 0 || Number(r[4]) > 255) {
                        t = !1;
                        break
                    }
                    if (Number(r[4]) < 0 || Number(r[4]) > 255) {
                        t = !1;
                        break
                    }
                    t = !0, void 0 === n.scheme && void 0 !== n.port && (i = `http://${e}`);
                    break
                }
                if (n.host.match(/\.{2,}/)) {
                    l.information("url parse has multi dot"), t = !1;
                    break
                }
                let a = o.extname(n.host);
                if ("" === a) break;
                if (h(a)) {
                    t = !0;
                    break
                }
            } while (0);
            return l.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.isSuffixNeedDownload = function (e) {
            let t = !0;
            do {
                if (void 0 === e) break;
                if ("" === e || "." === e) break;
                if (e = e.toLowerCase(), -1 !== ["txt", "url", "html", "htm", "mht", "nfo"].indexOf(e)) {
                    t = !1;
                    break
                }
            } while (0);
            return t
        }
    }(t.URLHelperNS || (t.URLHelperNS = {}))
}, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(20), a = i(15), s = i(49), 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 r.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, a.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];
                                    a.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 r = 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] < r) {
                        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, a.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(548), o = i(549);
    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(66)(16)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

        function P(e, t, i) {
            D.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();
                D.information("onInsertToCategoryView taskStatus:", n), n !== s.DownloadKernel.TaskStatus.Succeeded && n !== s.DownloadKernel.TaskStatus.Seeding || M(t, t.getIsPrivate()).then().catch()
            }
        }

        function O(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(), r = e.getTaskBaseInfo().taskType;
                if (D.information("moveTaskFileToPrivateSpace taskType:", r, ", 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"), D.information("moveTaskFileToPrivateSpace newSrcPath:", i), r === s.DownloadKernel.TaskType.Group) return function (e, t, i) {
                        return n(this, void 0, void 0, function* () {
                            let n = e.getSavePath(), r = e.getTaskName();
                            if (!(yield u.FileSystemAWNS.existsAW(n))) return;
                            let a = o.join(n, r);
                            if (D.information("destPath:", a), n !== a) {
                                yield u.FileSystemAWNS.mkdirsAW(i);
                                let o = yield F(n, a);
                                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(a)
                                    }
                                    _.fireTaskEvent(s.DownloadKernel.TaskEventType.TaskMovedEnd, [e])
                                }
                            } else B(e, !!t && R())
                        })
                    }(e, t, i);
                    if (r === s.DownloadKernel.TaskType.Bt) return function (e, t, i) {
                        return n(this, void 0, void 0, function* () {
                            let n = e.getExtraObject(), r = n.getDownloadFile();
                            if (1 !== r.length) return;
                            let a = n.getBtFileList(), l = a.get(r[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 T.SingleBtTaskNS.isSingleBtTask(e);
                            if (p) d = T.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), r = yield F(d, n);
                                r && (e.setSavePath(i), _.fireTaskEvent(s.DownloadKernel.TaskEventType.TaskMovedEnd, [e]), B(e, !!t && R()))
                            } else B(e, !!t && R())
                        })
                    }(e, t, i);
                    if (r === s.DownloadKernel.TaskType.P2sp || r === s.DownloadKernel.TaskType.Emule) return function (e, t, i) {
                        return n(this, void 0, void 0, function* () {
                            let n = e.getSavePath(), r = e.getTaskName(), a = o.join(n, r);
                            if (yield u.FileSystemAWNS.existsAW(a)) if (n !== i) {
                                yield u.FileSystemAWNS.mkdirsAW(i);
                                let n = o.join(i, r), l = yield F(a, 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 D.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);
                        D.information("moveFile existsAW success:", n), i(n)
                    } else {
                        let n = !1;
                        (yield u.FileSystemAWNS.lstatAW(e)).isDirectory() ? (n = yield u.FileSystemAWNS.copyDirsAW(e, t), D.information("moveFile copyDirsAW success:", n), n && (n = yield u.FileSystemAWNS.rmdirsAW(e), D.information("moveFile rmdirsAW success:", n))) : (n = yield u.FileSystemAWNS.copyFileAW(e, t), D.information("moveFile copyFileAW success:", n), n && (n = yield u.FileSystemAWNS.unlinkAW(e), D.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();
            D.information("setTaskHidden path:", i, ", name:", n, ", hidden:", t), t && !function (e) {
                if (!e || "" === e) return !1;
                let t = l;
                "" !== l && "0" !== l || (t = "私人空间");
                if (D.information("userId:", t), D.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 = I.setFileAttributes(e, i);
            D.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);
                D.information("setPrivateSavePath", i, t), U(t, 1 === i)
            })
        }

        function W(e, t) {
            D.information("setAllTaskFileHidden", e, t);
            let i = A.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 j(e, t, i) {
            return n(this, void 0, void 0, function* () {
                return new Promise((o, r) => n(this, void 0, void 0, function* () {
                    let n = null;
                    if (n = e && "" !== e ? A.getPrivateCategoryFromUserId(e) : A.getCurrentPrivateCategory()) {
                        let e = yield b.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 === k.MessageBoxNS.Action.OK ? o(0) : o(-1)
                        }).catch()
                    } else o(-1)
                }))
            })
        }

        function G(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = R(e);
                return new Promise((o, r) => {
                    (function (e, t) {
                        return p.MessageBox.custom("private-space-set-password", {isSetHide: e, showType: t})
                    })(i, t).then(t => {
                        if (t.action === k.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), W(e, t.args.isSetHide)
                            }
                            let r = A.getCurrentPrivateCategory();
                            r && r.setPassword(t.args.password, "", !0, (t, i) => n(this, void 0, void 0, function* () {
                                t && (z(!1), N.emit(E.SetPassword, !0), x.showNotify(C.ToastNotifyManagerNS.notifyIdScheduleTaskDownloadMode, S.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 ? A.getPrivateCategoryFromUserId(e) : A.getCurrentPrivateCategory()) ? G(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 N
        }, e.getPrivateSavePath = L, e.isPrivateSpaceOpen = function (e) {
            let t = !1, i = A.getPrivateCategoryFromUserId(e);
            if (i) {
                let e = i.getPassword();
                e && "" !== e && (t = !0)
            }
            return t
        }, e.setPrivateSavePath = K, e.setAllTaskFileHidden = W, e.phoneVerifyPrivateCategory = j, 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 ? A.getPrivateCategoryFromUserId(e) : A.getCurrentPrivateCategory()) {
                        let i = n.getPassword();
                        i && "" !== i ? t(0) : G(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 ? A.getPrivateCategoryFromUserId(e) : A.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 ? j(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 === k.MessageBoxNS.Action.OK) i.args && i.args.success && (z(!1), V(e, 0), t(0)); else if (i.action === k.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 j(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 = a.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => n(this, void 0, void 0, function* () {
                            D.information("OnUserLogin userId:", e), l = e, A.setUserInfo(e, "")
                        })), i = a.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                            D.information("OnUserLogout currentUserId:", l), l = "", f = !0, A.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 && O(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];
                        D.information("insertTaskCallback categoryId:", t, ", categoryViewId:", i);
                        let n = e[3], o = e[4];
                        n.length > 0 && o === s.DownloadKernel.TaskInsertReason.MoveThoughCategory && P(t, i, n)
                    } while (0)
                }), (yield r.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 = A.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 () {
            a.NativeCallModule.nativeCall.DetachNativeEvent("onLoginSuc", t), a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(8), a = i(7), s = i(510), l = i(44), d = i(5), u = i(14), c = i(10), h = i(76),
        f = d.promisify, p = a.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, r = !1;
                        0 !== c.ConfigNS.getValue("Motitor", o, 2) && (r = !0);
                        let a = {content: n, name: i.name, key: o, isSelect: r};
                        e.push(a)
                    }
                } 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\\"), a = o.join(n, i);
                        if (!(yield r.FileSystemAWNS.existsAW(a))) break;
                        let l = yield r.FileSystemAWNS.readFileAW(a);
                        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 r = i.name;
                        void 0 !== r && null !== r && "" !== r && 0 !== o && (void 0 !== e && null !== e && "" !== e ? "edge" === r || "edgecp" === r ? e += "edge||edgecp||" : e = e + r + "||" : e = "edge" === r || "edgecp" === r ? "edge||edgecp||" : r + "||")
                    }
                    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 a = e.reg.regName, s = p.queryRegValue(i, n, a);
                        if (g.information("checkInstallByappReg:", s, i, n, a), 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 r.FileSystemAWNS.existsAW(s))) {
                                let e = o.dirname(s);
                                s = this.getFilePathByDir(e, d)
                            }
                        }
                        t || (t = yield r.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 r = o.join(n, e.filePath);
                    t = p.queryFileExists(r)
                } 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(77), r = i(5), a = i(0), s = i(20), l = a.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 (r.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";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(0), a = i(13), s = r.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(664));
                    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", (r, l) => n(this, void 0, void 0, function* () {
                    if (s.verbose(r), 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 && a.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 r = yield(yield o.asyncRemoteCall.getMenu()).buildFromTemplate(n),
                            s = yield o.asyncRemoteCall.getCurrentWindow();
                        yield r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), r = i(0), a = i(15), s = i(70), l = i(112), d = i(56), u = i(51), c = i(113), h = i(82),
        f = i(146), p = i(78), g = i(114).MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"),
        m = r.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)
                    };
                    a.server.registerFunctions(e), a.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], r = i[1];
                    if (!r.src) break;
                    n = v.create(t, o, r)[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 r = d.ToastNotifyManagerNS.getToastNotifyManger().showNotify(o.id, o.type, o.message, o.duration);
                    r && o.type === u.ToastNotifyItemType.RedCancelNotify && r.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 a.server.callClientFunctionByName(s.CommonIPCBase.mainProcessContext, "CreateBrowserWindow", ...i))[0]
                })
            }

            roundRectWindow(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return (yield a.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(96).Buffer
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(446), o = i(348);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(894);
    var a = i(1), s = Object(a.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, r = console;

    function a(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 r = [];
        return o.forEach((e, o) => {
            let a = t.exec(e) || i.exec(e), s = {};
            a && 5 === a.length && (s.method = a[1], s.path = a[2], s.line = a[3], s.pos = a[4], s.file = n.basename(s.path), r.push(s))
        }), r
    }

    if (o = "renderer" === process.type ? "[Renderer] [async-remote]:" : "browser" === process.type ? "[Browser] [async-remote]:" : `[${process.type}] [async-remote]`, t.traceback = function (e = 5) {
        return a(e).map(e => e.method + "@(" + e.file + ")").join(" <= ")
    }, t.time = function (...e) {
        r.time(...e)
    }, t.timeEnd = function (...e) {
        r.timeEnd(...e)
    }, t.trace = function (...e) {
        let t = a(), i = "";
        t[0] && t[0].method && (i = i), r.trace(o, ...e)
    }, t.info = function (...e) {
        let t = a(), i = "anonymous";
        t[0] && t[0].method && (i = i), r.info(o, "[" + i + "]", e.join(","))
    }, t.warn = function (...e) {
        let t = a(), i = "";
        t[0] && t[0].method && (i = i), r.warn("<WARN>" + o, "[" + i + "]", e.join(","))
    }, t.error = function (...e) {
        let t = a(), i = "";
        t[0] && t[0].method && (i = i), r.error("<ERROR>" + o, "[" + i + "]", e.join(","))
    }, t.log = function (...e) {
        r.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(66)(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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(31), r = i(0), a = i(5), s = i(15), l = r.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 r;
            return a.isNullOrUndefined(n) ? (l.warning("error param, expect data, got 0. "), !1) : (r = `INSERT INTO ThunderPanTask (TaskId, PanTaskId, UserId, Data) VALUES (${e}, '${t}', '${i}', '${n}')`, o.ThunderKernel.execSqlite(r, (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, r) {
                    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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(9), a = i(3), s = i(3), l = i(506), 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() !== a.DownloadKernel.TaskStatus.Started) break;
                let n = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileSize),
                    o = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSize);
                t = {
                    taskId: e,
                    taskTotalSize: n,
                    receiveDataSize: i.getTaskAttribute(a.DownloadKernel.TaskAttribute.ReceivedSize),
                    receiveValidDataSize: o,
                    addReceiveDataSize: 0,
                    time: 0,
                    peering: i.getTaskAttribute(a.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 r = n.receiveDataSize - e.receiveDataSize;
                r > 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: r
                }
            } 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, a.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(a.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== a.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(a.DownloadKernel.TaskAttribute.Background)) continue;
                        let n = i.getTaskStatus();
                        n !== a.DownloadKernel.TaskStatus.StopPending && n !== a.DownloadKernel.TaskStatus.Stopped || this.removeTaskListInfoByTask(i), n === a.DownloadKernel.TaskStatus.Started && this.removeStopPending(i.getId())
                    }
                } while (0)
            }), f.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];
                    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(a.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;
                        r.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,
                    r = n > 0 ? Math.round(o / n) : 1 / 0;
                e.validation.remainSize = o, e.validation.speed = n, e.validation.remainSeconds = r
            }
            e.isValidating && (i && i.isValidating || (e.validation.startTime = Date.now(), r.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 || (r.XLStatNS.trackEvent("download_leftpanel", "data_error_correction", "", 0, 0, 0, 0, ""), e.dlSize < e.fileSize && r.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(a.DownloadKernel.TaskAttribute.Background)) continue;
                if (e.getTaskStatus() !== s.DownloadKernel.TaskStatus.Started) continue;
                let t = e.getId(), i = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSize),
                    n = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.RealDownloadSize),
                    o = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.ValidDownloadSize),
                    r = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileSize), l = {
                        taskId: t,
                        dlSize: i,
                        realSize: n,
                        validSize: o,
                        fileSize: r,
                        validation: {remainSize: r - 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) {
    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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = 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 => {
                    r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(54), r = i(103), a = i(2), s = i(8), l = i(3), d = i(11), u = i(16), c = i(45), h = i(0), f = i(140),
        p = i(643), g = i(7), m = i(104), v = i(38), y = i(13), w = i(68), k = i(22), T = i(37), b = i(15), C = i(10),
        S = g.default(a.join(__rootDir, "../bin/ThunderHelper.node")), I = h.default.getLogger("DownloadAndPlayHelper"),
        _ = d.DownloadKernelTaskManager.getTaskManager(), A = u.DownloadKernelEventManager.getEventManager();
    const D = new class {
        constructor() {
            this.taskStatusChangedEventTable = [], I.information("constructor DownloadAndPlayHelper object")
        }

        init() {
            return n(this, void 0, void 0, function* () {
                if (I.information("init DownloadAndPlayHelper"), !1 === (yield this.isCodecsIntegral())) {
                    let e = o.tmpdir(), t = "APlayerCodecs3.exe", i = a.join(e, "..\\..\\"), n = a.join(i, t);
                    (yield s.FileSystemAWNS.existsAW(n)) && (yield s.FileSystemAWNS.unlinkAW(n)), I.information("downloadplay:", i, n);
                    let d = "NONE";
                    I.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 = a.join(i, n);
                            s.FileSystemAWNS.existsAW(o).then(t => {
                                t && S.checkDigitalSignature(o, t => {
                                    if (I.information("cqm getVideoMediaInfo CheckDigitalSignature exePath", o, " result", t), !t) return;
                                    I.information("downloadplay:运行exe = ", o);
                                    let i = a.join(__rootDir, "../.."), n = `${o} -path=${i}`;
                                    I.information("install args ", n), r.exec(n), null !== this.taskStatusChangedEventTable[e] && void 0 !== this.taskStatusChangedEventTable[e] && (I.information("downloadplay:取消监听 ", this.taskStatusChangedEventTable[e]), A.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() {
            return n(this, void 0, void 0, function* () {
                I.information("enter installXmp");
                {
                    I.information("XmpFixBoxEx: ipcMain on channelRMDownloadXmpEx");
                    let e = f.DownloadAndPlayNS.getXmpPath();
                    if (null !== e && void 0 !== e && "" !== e && (yield s.FileSystemAWNS.existsAW(e))) return !0;
                    k.MessageBox.confirm({
                        title: "提示",
                        content: "您未安装迅雷影音，是否下载安装？",
                        type: k.MessageBox.ConfirmType.Info,
                        fileName: "",
                        okText: "立即下载",
                        cancelText: "取消",
                        cancelVisible: !0
                    }).then(e => n(this, void 0, void 0, function* () {
                        e.action === T.MessageBoxNS.Action.OK ? yield this.downloadXmpEx() : e.action === T.MessageBoxNS.Action.Cancel ? I.information("XmpFixBoxEx: Cancel") : e.action === T.MessageBoxNS.Action.Close && I.information("XmpFixBoxEx: Close")
                    })).catch()
                }
                return !0
            })
        }

        autoInstallXmp() {
            return n(this, void 0, void 0, function* () {
                if (I.information("enter auto installXmp"), 0 !== C.ConfigNS.getValue("CompletedTaskPlay", "isXmpInited", 1)) return !0;
                let e = f.DownloadAndPlayNS.getXmpPath();
                return null !== e && void 0 !== e && "" !== e && (yield s.FileSystemAWNS.existsAW(e)) ? (I.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 = a.dirname(i);
                        S.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 = S.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 = a.join(__rootDir, "../../XMP");
                    t = "V" + t, e = a.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() {
            return n(this, void 0, void 0, function* () {
                I.information("XmpFixBoxEx: enter downloadXmpEx");
                const e = d.DownloadKernelTaskManager.getTaskManager();
                let t = yield w.TaskUtilitiesAWNS.batchFindTaskAW([{
                    taskType: l.DownloadKernel.TaskType.P2sp,
                    value: "NONE"
                }]);
                if (t.length > 0) k.MessageBox.confirm({
                    title: "提示",
                    content: "重复下载，该任务已存在列表中",
                    type: k.MessageBox.ConfirmType.Info,
                    fileName: "XMPSetup-xlx.exe",
                    okText: "查看",
                    cancelText: "取消",
                    cancelVisible: !0
                }).then(e => n(this, void 0, void 0, function* () {
                    if (e.action === T.MessageBoxNS.Action.OK) {
                        let e = t[0].getId();
                        yield v.ThunderNewTask.selectTask(e)
                    } else e.action, T.MessageBoxNS.Action.Cancel
                })).catch(); else {
                    let t = {taskName: "XMPSetup-xl11.exe", savePath: y.ThunderUtil.getDefaultDownloadDir()}, i = {
                        url: "NONE",
                        refUrl: "",
                        cookie: "",
                        nameFixed: 0
                    }, n = yield e.createTask(l.DownloadKernel.TaskType.P2sp, {taskBaseInfo: t, p2spTaskInfo: i});
                    if (null !== n) {
                        let t = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                        yield e.startTask(t)
                    }
                }
            })
        }

        downloadXmpZip() {
            return n(this, void 0, void 0, function* () {
                I.information("enter downloadXmpEx");
                const e = d.DownloadKernelTaskManager.getTaskManager();
                let t = a.resolve(__rootDir, "../../../profiles"), i = {taskName: "XMPSetup_xmpxl11.zip", savePath: t},
                    n = a.resolve(t, "XMPSetup_xmpxl11.zip");
                if (yield s.FileSystemAWNS.existsAW(n)) return void this.uncompressXmp(n).catch();
                yield s.FileSystemAWNS.unlinkAW(a.resolve(t, "XMPSetup_xmpxl11.zip.xltd")), yield s.FileSystemAWNS.unlinkAW(a.resolve(t, "XMPSetup_xmpxl11.zip.xltd.cfg"));
                let o = yield e.createTask(l.DownloadKernel.TaskType.P2sp, {
                    taskBaseInfo: i,
                    p2spTaskInfo: {
                        url: "NONE",
                        refUrl: "",
                        cookie: "",
                        nameFixed: 0
                    },
                    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 = a.join(i, n);
                        this.uncompressXmp(o).catch(), null !== this.taskStatusChangedEventTable[t] && void 0 !== this.taskStatusChangedEventTable[t] && (I.information("downloadplay:取消监听 ", this.taskStatusChangedEventTable[t]), A.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* () {
                I.information("enter uncompressXmp");
                let t = a.resolve(__rootDir, "../../XMP");
                I.information("downloadplay: xmp exe path = ", e, ", uncompress path: ", t), I.information("uncompress paths ", t, e);
                let i = yield m.UnzipUtilitiesAWNS.uncompressZipFile(t, e);
                "100004" !== S.getChannelID() ? i && (I.information("uncompress xmpzip success, begin write xmp reg"), f.DownloadAndPlayNS.writeXmpReg(t), f.DownloadAndPlayNS.associateForXmp().catch(), b.server.fireClientEvent("OnUncompressXmpEnd")) : C.ConfigNS.setValue("CompletedTaskPlay", "isXmpInited", 2)
            })
        }

        isCodecsIntegral() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                {
                    let t = a.join(__rootDir, "../../codecs"), i = a.join(t, "avisplitter.dll"),
                        n = a.join(t, "realmediasplitter.dll"), o = a.join(t, "d3dcompiler_43.dll"),
                        r = a.join(t, "audioswitcher.dll");
                    (yield s.FileSystemAWNS.existsAW(i)) && (yield s.FileSystemAWNS.existsAW(n)) && (yield s.FileSystemAWNS.existsAW(o)) && (yield s.FileSystemAWNS.existsAW(r)) && (e = !0), I.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] = A.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 = D
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(2), a = i(7), s = i(81), l = i(13), d = i(14), u = i(8), c = i(38), h = i(3), f = i(68),
        p = i(35), g = i(34), m = i(63), v = i(9), y = i(0), w = i(644), k = i(29), T = i(11), b = i(15), C = i(385),
        S = i(518), I = y.default.getLogger("command_line"), _ = T.DownloadKernelTaskManager.getTaskManager(),
        A = a.default(r.join(__rootDir, "../bin/ThunderHelper.node"));
    const D = new class {
        constructor() {
            this.readyToShow = !0, this.startArgs = "", this.uploadfiles = [], this.delayUploadTimerId = void 0
        }

        init() {
            return n(this, void 0, void 0, function* () {
                b.server.registerFunctions({
                    ProcessCommandLine: (e, t, ...i) => {
                        let n = i[0];
                        if (I.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 (I.information(e, t), "path" === e) {
                    let e = r.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"), I.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(645));
                        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 k.ToolsUtilitiesAWNS.setForegroundWindow(A, 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 (I.information("executeCmdLine", t, n, i), t && i) return void (yield C.DownloadAndPlayUnionNS.createUnionPlayTasks(i, t));
                if (n && i) return void (yield S.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(), w.default.fireEvent(d.NodeEventMesssageNS.eventOnCommand, e), o[i] = n
                }
                b.server.fireClientEvent(d.NodeEventMesssageNS.eventOnCommandline, o)
            })
        }
    };
    t.default = D
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(10), r = i(34), a = i(22), s = i(37), 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), r.DownloadKernelManager.setDownloadSpeedLimit(e), r.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,
                    r = 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", r)
            }
            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),
                r = o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeed", 1024),
                a = o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_Switch", !1);
            if (l.information("handleCustomDownloadMode Enter maxDownloadSpeed = ", n, ", maxUploadSpeed = ", r, ", timeSwitch = ", a), a) {
                let a = 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();
                (a > l || a === l && s > d) && (l += 24), (h > l || h === l && f > d) && (a += 24, l += 24);
                let g = 60 * h + f, m = 60 * a + s, v = 60 * l + d;
                if (m <= g && g < v) u(n, r), i = setTimeout(() => {
                    u(-1, -1), clearTimeout(i), i = void 0, e()
                }, 6e4 * (v - g)); else {
                    u(-1, -1), t = setTimeout(() => {
                        u(n, r), 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, r)
        }, 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"), r.DownloadKernelManager.setDownloadSpeedLimit(-1), r.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 a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(88), a = i(386), s = i(10), l = i(0), d = i(22), u = i(12), c = i(9), h = i(109), f = i(4),
        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, r = {}, s = [];
                do {
                    if (!(yield f.client.callServerFunction("IsConfigBrowserInitFinish"))) {
                        p.warning("cqm isBrowserConfigInit not inited");
                        break
                    }
                    let l = (i = a.BrowserHelperNs.getDefaultBrowserPath()).split("\\"), d = "";
                    l && l.length > 0 && (d = l[l.length - 1]), n = yield a.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), r[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: r, 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 = r.SettingConfigHelperNS.configBrowserHelper.getWatchBrowerByName("360安全浏览器");
            t && e.push(t);
            let i = r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(388), a = i(12), s = i(2), l = i(17), d = i(390), u = i(520), c = i(0), h = i(5), f = i(29),
        p = i(15), g = i(4), m = i(64), v = i(7), y = c.default.getLogger("Thunder.Main.Renderer.Embedded.Browser"),
        w = 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, k, T, b, C, S, I, _, A, D) {
            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 = k, this.callBackShow = b, this.callBackClose = C, this.callBackClosed = S;
                    let x = "development" === process.env.RUN_ENV ? "http://localhost:9080/embedded-browser-renderer/" : `file:///${__dirname}/../embedded-browser-renderer/index.html`;
                    x += `?browserType=${s}&title=${t}&minimizable=${_ ? 1 : 0}`;
                    let N = yield a.asyncRemoteCall.getCurrentWindow(), E = this.isTopLevel ? null : N,
                        P = yield a.asyncRemoteCall.getBrowserWindow();
                    this.wnd = yield new P({
                        width: this.width,
                        height: this.height,
                        resizable: !1,
                        frame: !1,
                        parent: E,
                        center: !this.startX || !this.startY,
                        show: !1,
                        modal: i,
                        alwaysOnTop: I,
                        minimizable: !!_,
                        webPreferences: {
                            spellcheck: !1,
                            nodeIntegration: !0,
                            webSecurity: "development" !== process.env.RUN_ENV,
                            preload: `file:///${__rootDir}/out/plugin-boot.js`
                        }
                    }), o.ipcRenderer.send("embedded-browser-create", this.wnd.id, this.isTopLevel), this.isTopLevel || d.ThunderWindowNS.fitWindowPosInParent(this.wnd, N).catch(), this.browserCtr = new r.BrowserCtrl, this.wnd.once("show", () => {
                        if (A && A.length > 0) {
                            let e = `EmbeddedBrowserRendererContext${s}`;
                            p.server.isRemoteClientExist(e) && g.client.callRemoteClientFunction(e, "AddMenu", A).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(D), this.registerNativeFunctions(T), w.setWindowLong(t, m.SetWindowType.GWL_STYLE, m.WindowStyle.WS_CLIPCHILDREN), this.isToolWindow && w.setWindowLong(t, m.SetWindowType.GWL_EXSTYLE, m.WindowStyleEx.WS_EX_TOOLWINDOW)
                    })), this.wnd.on("resize", () => {
                        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(x)
                } 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(w, 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, r, a) {
            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();
                    w.showWindow(t, m.CmdShow.SW_SHOW)
                } else !1 === this.isAlreadyClose && this.autoCloseAtError && (yield this.closeWnd());
                this.browserEventHandler && t && this.browserEventHandler("OnLoadError", t, i, o, r, a)
            })
        }

        onLoadEnd(e, t, i, o, r) {
            return n(this, void 0, void 0, function* () {
                if (y.information("OnLoadEnd isMainframe", t, i), (yield this.isWindow()) && t) {
                    let t = e.target.getWindowHandle();
                    w.showWindow(t, m.CmdShow.SW_SHOW)
                }
                this.browserEventHandler && t && this.browserEventHandler("OnLoadEnd", t, i, o, r)
            })
        }

        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();
                    w.showWindow(t, m.CmdShow.SW_HIDE)
                }
                this.browserEventHandler && this.browserEventHandler("OnBeforeNavigate", t, i, o)
            })
        }

        onNewBrowserPopup(e, t, i, n, o, r) {
            y.information("onNewBrowserPopup url", i);
            let a = !1;
            this.browserEventHandler && (a = this.browserEventHandler("OnNewBrowserPopup", i)), a || 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 a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

    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 : r.join(i, "../bin/TBC"),
                            a = r.join(n, "libCef.dll");
                        if (!(t = yield this.fileExists(a))) break;
                        let s = e.node_module_path ? e.node_module_path : r.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) => {
                    a.exists(e, e => {
                        t(e)
                    })
                })
            })
        }
    }, function (e) {
        for (var i in e) t.hasOwnProperty(i) || (t[i] = e[i])
    }(i(649))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(20), a = i(4), s = i(15), l = i(0), d = i(399), u = i(3), c = i(14), h = i(30), f = i(79),
        p = i(32), g = i(12), m = "vip-download", v = "ThunderPanPlugin", y = "ThunderIM", w = [m, v, y],
        k = l.default.getLogger("plugin-ui-webview");

    class T extends r.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] ? (k.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, r = o.parentElement,
                    a = i.$el.parentElement.parentElement;
                if (!a) break;
                let s = i.$refs.pluginPlaceholder;
                if (!s) break;
                let l = a.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;`;
                r.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
                        }
                    }
                }
                k.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 (k.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 === w.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 k.information("create webview", n), n
        }

        attachDownloadItemActiveChange() {
            h.default.attachListener(c.NodeEventMesssageNS.eventDownloadItemActive, (e, t, i, n, o, r) => {
                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 r = `webview_${m}`;
                if (document.querySelector(`#${r}`)) {
                    i = this.webviewCreatedMap[r] === e ? [!0, "success"] : [!1, `webview already created by other ${this.webviewCreatedMap[r]}`];
                    break
                }
                let a = document.createElement("webview");
                a.spellcheck = !1, a.nodeintegration = !0, a.id = r, a.style = "height: 100%; width: 100%;", a.src = t.src, a.preload = `file:///${__rootDir}/out/plugin-boot.js`, a.addEventListener("did-finish-load", () => n(this, void 0, void 0, function* () {
                    let e = a.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(a), i = [!0, "success"], this.webviewCreatedMap[r] = e, a.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() && a && a.openDevTools()
                }, !0)
            } while (0);
            return i
        }

        createPanWebview(e, t) {
            let r = [!1, ""];
            do {
                let s = `webview_${t.id}`;
                if (s || (s = `webview_${v}`), document.querySelector(`#${s}`)) {
                    r = 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), r = [!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(47).parse(t).protocol;
                    "http:" !== n && "https:" !== n || a.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 r
        }

        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 = T, function (e) {
        const t = new T;
        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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(20), a = i(0), s = i(3), l = i(59), d = i(11), u = i(671), c = i(40), h = i(35), f = i(14),
        p = i(9), g = i(48), m = i(77), v = i(10), y = i(22), w = i(124), k = i(397), T = i(25), b = i(87), C = i(58),
        S = i(528), I = i(38), _ = i(30), A = i(5), D = i(2), x = i(141), N = i(37), E = i(90), P = i(26), O = i(15),
        M = i(126), F = i(4), L = i(39), R = a.default.getLogger("Thunder.ContextMenu"),
        B = T.DownloadKernelCategoryManager.getCategoryManager(), U = d.DownloadKernelTaskManager.getTaskManager(),
        V = S.GroupAccelerateWebManagerNS.getManager(), K = x.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 r.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, A.isNullOrUndefined(i) || (this.count = i), A.isNullOrUndefined(t) || (this.categoryId = t), A.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 === P.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;
                        B.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 k.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 = U.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 r = U.getTaskFromTaskId(e[0].taskId).isSupportPlay();
                                r ? 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 a = 3;
                                this.searchMode && i.splice(a, 0, {
                                    type: "normal",
                                    label: "打开任务位置(&G)",
                                    id: u.ContextMenuIdsNS.contextMenuOpenTaskPosition,
                                    statId: "openfile_position_click",
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed
                                }), r ? i.splice(a, 0, {
                                    type: "normal",
                                    label: "字幕搜索",
                                    icon: `${__rootDir}/static/icon/sunbtitle.png`,
                                    id: u.ContextMenuIdsNS.contxtMenuSubtitleSearch,
                                    statId: "finished_rk_subtitlesearch_click"
                                }, {type: "separator"}) : i.splice(a, 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 r = i.findIndex(e => e.id === u.ContextMenuIdsNS.contextMenuDownloadDelete);
                            -1 === r && (r = i.findIndex(e => e.id === u.ContextMenuIdsNS.contextMenuDownloadDestroy)), !this.canShare() || -1 !== e[0].categoryId && -1 === this.categoryId || i.splice(r++, 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(r++, 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: w.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 = w.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);
                R.information("sort_by", n);
                let o = n.sortBy === w.SortNS.SortType.ByTime_Remain || n.sortBy === w.SortNS.SortType.ByTime_Creation || n.sortBy === w.SortNS.SortType.ByTime_Completion,
                    r = "按时间", a = "";
                i === s.DownloadKernel.CategroyViewID.Downloading ? (r = "按创建时间", a = "downloading_rk_rank_click") : i === s.DownloadKernel.CategroyViewID.Completed ? (r = "按完成时间", a = "finished_rk_rank_click") : i === s.DownloadKernel.CategroyViewID.Recycle && (r = "按删除时间", a = "dustbin_rk_rank_click"), t = [{
                    type: "checkbox",
                    label: "默认",
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortByDefault,
                    statId: a,
                    extData: "rank_type=default",
                    checked: n.sortBy === w.SortNS.SortType.Default
                }, {
                    type: "checkbox",
                    label: r,
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortByTime,
                    checked: o,
                    statId: a,
                    extData: "rank_type=create_time",
                    userData: o ? n.asce : void 0
                }, {
                    type: "checkbox",
                    label: "按文件名 A-Z",
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortByName,
                    checked: n.sortBy === w.SortNS.SortType.ByName,
                    statId: a,
                    extData: "rank_type=file_name",
                    userData: n.sortBy === w.SortNS.SortType.ByName ? n.asce : void 0
                }, {
                    type: "checkbox",
                    label: "按文件大小",
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortBySize,
                    checked: n.sortBy === w.SortNS.SortType.BySize,
                    statId: a,
                    extData: "rank_type=file_size",
                    userData: n.sortBy === w.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 === w.SortNS.SortType.ByProgress,
                    statId: a,
                    extData: "rank_type=progress_speed",
                    userData: n.sortBy === w.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, []), r = [],
                    a = u.ContextMenuIdsNS.contextMenuDownloadMoveFileLastest;
                o && (a = u.ContextMenuIdsNS.contextMenuDownloadCopyFileLastest);
                for (let t of n) {
                    let i = /&/gi;
                    t = t.replace(i, "&&"), r.push({type: "normal", label: t, enabled: e, id: a})
                }
                return r
            })
        }

        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 = D.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 => {
                                R.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 => {
                            R.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 ? V.openGroupAccelerateTabByTaskId(e[0].taskId, "menu", "downloading", void 0).catch() : V.openGroupAccelerateTabByTaskId(e[0].taskId, "menu", "complete", void 0).catch()
                    }
                        break;
                    case u.ContextMenuIdsNS.contxtMenuSubtitleSearch: {
                        let e = this.getSelectdTaskInfos()[0].taskId, t = U.getTaskFromTaskId(e), i = t.getTaskName(),
                            n = t.getType(), o = "";
                        t && (o = t.getSavePath()), n === s.DownloadKernel.TaskType.Bt && t.getExtraObject().getDownloadFile().length > 1 && (o = D.join(o, i));
                        let r = t.getTaskAttribute(s.DownloadKernel.TaskAttribute.CategoryViewId),
                            a = K.getDisaplayName(e), l = 0;
                        (l = a.length) > 1 ? y.MessageBox.custom("SubtitleTaskFilelist", {
                            size: "large",
                            taskId: e,
                            taskName: i,
                            taskType: n,
                            fileList: a,
                            saveDir: o,
                            categoryViewId: r
                        }, {
                            center: !0,
                            width: 500,
                            height: 329
                        }).catch() : y.MessageBox.custom("SubtitleSearch", {
                            taskId: e,
                            taskName: a[0].fileName,
                            cid: a[0].cid,
                            saveDir: o,
                            from: "taskList",
                            categoryViewId: r
                        }, {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;
                            yield h.TaskOperatorNs.pauseAll(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 && C.default(!1, !0, "privatespace").then(t => n(this, void 0, void 0, function* () {
                            if (t && "" !== t) {
                                let i = 0;
                                if (!1 === b.PrivateSpaceHelperNS.isPrivateSpaceOpen(t) && 0 !== (i = yield b.PrivateSpaceHelperNS.phoneVerifyPrivateCategory(t))) return;
                                if (0 === (i = yield b.PrivateSpaceHelperNS.openPrivateCategory(t)) && 0 === (i = yield b.PrivateSpaceHelperNS.accessPrivateCategory(t))) {
                                    let i = yield b.PrivateSpaceHelperNS.getPrivateSavePath(t);
                                    if (i = D.join(i, t), yield h.TaskOperatorNs.move2Dir(e, i, !1)) {
                                        let i = B.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 && B.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 => {
                            R.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 => {
                                R.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";
                        e.categoryView === s.DownloadKernel.CategroyViewID.Completed ? i = -1 === this.categoryId && t.length > 0 && -1 !== t[0].categoryId ? "download_getback_complete_play" : "download_left_complate_rk" : -1 === this.categoryId && t.length > 0 && -1 !== t[0].categoryId && (i = "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 = U.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 = U.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 => {
                                R.warning(e)
                            });
                            void 0 !== o && o === s.DownloadKernel.CategroyViewID.Completed && h.TaskOperatorNs.markReadStatus(i, 1)
                        }
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadOpenAs:
                        let r = this.getSelectdTaskInfos();
                        if (r.length > 0) {
                            let e = r[0];
                            if (e.taskType === s.DownloadKernel.TaskType.Bt) {
                                let t = U.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 => {
                            R.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 => {
                                R.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:
                        w.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, w.SortNS.SortType.Default, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByTime:
                        w.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, w.SortNS.SortType.ByTime, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByType:
                        w.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, w.SortNS.SortType.ByType, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByName:
                        w.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, w.SortNS.SortType.ByName, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortBySize:
                        w.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, w.SortNS.SortType.BySize, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByStatus:
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByProgress:
                        w.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, w.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 b.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 === N.MessageBoxNS.Action.OK && (v.ConfigNS.setValue("PrivateSpaceDefaultPath", e, t.args.savePath), v.ConfigNS.setValue("PrivateSpaceLockUserTask", e, t.args.hideLocalDir), b.PrivateSpaceHelperNS.setPrivateSavePath(e, t.args.savePath).then().catch(), b.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 b.PrivateSpaceHelperNS.phoneVerifyPrivateCategory(e)) && b.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];
                        I.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 = U.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 O.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 r = yield o.asyncRemoteCall.getCurrentWindow();
                    this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuPopup, n);
                    const a = yield(yield o.asyncRemoteCall.getMenu()).buildFromTemplate(n);
                    yield E.MenuSkinNS.setStyle(a, {}), i ? a.popup({
                        window: r,
                        x: i.clientX,
                        y: i.clientY,
                        async: !1
                    }) : a.popup({
                        window: r,
                        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);
                                R.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, r = e[i];
                if (!A.isBoolean(r.visible) || r.visible) {
                    if ("submenu" === r.type) {
                        let e = this.buildMenuTemplate(r.submenu);
                        o = {type: r.type, label: r.label, submenu: e}
                    } else o = "separator" === r.type ? {type: r.type} : {
                        type: r.type,
                        label: r.label,
                        enabled: r.enabled,
                        icon: r.icon,
                        id: r.id,
                        checked: r.checked,
                        click: (...e) => n(this, void 0, void 0, function* () {
                            if ("function" != typeof r.click) {
                                if (void 0 !== r.statId && "" !== r.statId) {
                                    void 0 === r.extData && (r.extData = "");
                                    let e = this.statExtData(r.extData);
                                    R.information("trackEvent", "download_leftpanel", r.statId, e), p.XLStatNS.trackEvent("download_leftpanel", r.statId, "", 0, 0, 0, 0, e)
                                }
                                yield this.handleMenuClick(r)
                            } else r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(20), a = i(402), s = i(3), l = i(11), d = i(16), u = i(43), c = i(45), h = i(0), f = i(4),
        p = i(57), g = i(40), m = i(68), v = i(13), y = i(33), w = i(69), k = i(26), T = i(17), b = i(508), C = i(8),
        S = l.DownloadKernelTaskManager.getTaskManager(), I = d.DownloadKernelEventManager.getEventManager(),
        _ = u.DownloadKernelCategoryViewManager.getCategoryViewManager(), A = h.default.getLogger("ShouleiSync"),
        D = 1e4, x = 12e4 / D;
    !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(),
                        r = n.getTasks(), a = [...o.values(), ...r.values()];
                    a.sort((e, t) => t.getTaskAttribute(s.DownloadKernel.TaskAttribute.CreateTime) - e.getTaskAttribute(s.DownloadKernel.TaskAttribute.CreateTime)), a = a.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 < a.length && l < i.maxSyncCount; ++t) {
                        let i, n, o, r = a[t], d = r.getTaskBaseInfo(),
                            u = r.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 = r.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: r.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize),
                                download_size: r.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize)
                            }), ++l
                        }
                    }
                    return A.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(), r = 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()) {
                                    r = 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()) {
                                    r = i, t.splice(e, 1);
                                    continue
                                }
                            } else if (o === s.DownloadKernel.TaskType.P2sp && i.link.toLocaleLowerCase() === n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl).toLocaleLowerCase()) {
                                r = i, t.splice(e, 1);
                                continue
                            }
                        }
                        if (r && -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" !== r.index[n] && (r.index = r.index.substr(0, n) + "1" + r.index.substr(n + 1))
                                }
                                if (i !== r.index) {
                                    let t = [];
                                    for (let i = 0; i < r.index.length; ++i) if ("1" === r.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 S.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, r)) : e === s.DownloadKernel.CategroyViewID.Recycle && (yield this.reDownloadTask(n, r))
                        }
                    }
                })
            }

            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 S.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 C.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) {
                            A.warning("invalid taskData!", i), this.taskList.splice(t, 1);
                            continue
                        }
                        if ("bt" === i.task_type && !i.index) {
                            A.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 = w.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 ? (A.warning("findInfo unknown value!", i, o), this.taskList.splice(t, 1)) : (i.dk_task_type = o, e.push({
                                taskType: o,
                                value: n
                            }), ++t)
                        } else A.warning("unknown task type!", i.link), this.taskList.splice(t, 1)
                    }
                    let t = [...this.taskList], i = yield m.TaskUtilitiesAWNS.batchFindTaskAW(e);
                    if (A.information("repeatTasks", i), i.length > 0 && (yield this.doRepeatTasks(i, t)), A.information("newTaskDatas", t), t.length > 0) {
                        let e = [], i = v.ThunderUtil.getDefaultDownloadDir(), r = [];
                        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: w.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
                                }, r.push(n)) : o.dk_task_type === s.DownloadKernel.TaskType.Emule && (n.taskType = s.DownloadKernel.TaskType.Emule, n.emuleTaskInfo = {url: o.link}, r.push(n))
                            }
                        }
                        if (r.length > 0) {
                            A.information("createBatchTask newTaskInfos", r);
                            let e = yield S.createBatchTask(r);
                            if (A.information("createBatchTask tasks", e), e.length > 0) {
                                let t = [];
                                e.forEach(e => {
                                    t.push(e.getId())
                                }), A.information("startTasks taskIds", t), yield c.DownloadDispatchNS.startTasks(t)
                            }
                        }
                        e.length > 0 && (A.information("btNewTasks", e), e.forEach(e => n(this, void 0, void 0, function* () {
                            let t = (e, t, r) => n(this, void 0, void 0, function* () {
                                    do {
                                        if (t) {
                                            let t = S.getTaskFromTaskId(e);
                                            if (!t) {
                                                A.warning("getTaskFromTaskId failed!", e);
                                                break
                                            }
                                            let n = t.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath),
                                                r = t.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName),
                                                a = o.join(n, r), l = yield m.TaskUtilitiesAWNS.parserBtFileInfoAW(a);
                                            if (null === l) {
                                                A.warning("parserBtFileInfoAW!", a);
                                                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 r = yield g.TaskCtrlOperatorNS.getBtExistFilePathList(n, l, o);
                                                r.length > 0 && (yield this.btRepeatDeleteExist(r));
                                                let u = "magnet:?xt=urn:btih:" + d.link, h = {
                                                    originUrl: d.source_url || u,
                                                    seedFile: a,
                                                    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 S.createTask(s.DownloadKernel.TaskType.Bt, f);
                                                if (A.information("create task magnet productinfo", e), null !== p) {
                                                    let e = p.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId);
                                                    yield c.DownloadDispatchNS.startTask(e)
                                                }
                                            }
                                        } else A.warning("onTaskFinish download magnet fialed!", e, r)
                                    } while (0);
                                    this.magnetTaskIdMap.delete(e)
                                }), r = yield v.ThunderUtil.getThunderTempPath(!0), a = "magnet:?xt=urn:btih:" + e.link,
                                l = w.ParseUrlFileNameNS.parseMagnetUrl(a) + ".torrent", d = o.join(r, l), u = {
                                    taskName: l,
                                    savePath: r,
                                    productInfo: g.TaskCtrlOperatorNS.constructProductInfo(""),
                                    origin: e.source
                                }, h = {url: a, torrentFilePath: d}, f = {
                                    taskType: s.DownloadKernel.TaskType.Magnet,
                                    taskBaseInfo: u,
                                    magnetTaskInfo: h,
                                    isBackground: !0
                                };
                            A.information("create task magnet", f);
                            let p = yield S.createTask(s.DownloadKernel.TaskType.Magnet, f);
                            if (null !== p) {
                                let i = p.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId);
                                b.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 S.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;
                        S.batchStopTask(this.taskIds, s.DownloadKernel.TaskStopReason.Manual), e = !0
                    } while (0);
                    return e
                })
            }
        }

        class N 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 N(e.task_ids));
                        break;
                    case"sync":
                        t = new i
                }
                return A.information("createCommand", t), t
            }
        }

        class P {
            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())
                }, D))
            }

            stop() {
                this.timer && (clearInterval(this.timer), this.timer = null), this.heartBeatTimes = 0
            }

            reset() {
                this.heartBeatTimes = 0, this.start()
            }
        }

        class O extends r.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 P(this)
            }

            enable() {
                return n(this, void 0, void 0, function* () {
                    return yield k.default.isInitedAw(), 1 === k.default.getConfigInfo("shouleiDownload", "enableSync2")
                })
            }

            init() {
                return n(this, void 0, void 0, function* () {
                    if (yield this.enable()) {
                        this.syncStateEventCookie = a.SyncMsgHelperNS.attachSyncMsgStateChangeEvent(this.onSyncMsgStateChangeEvent.bind(this));
                        let e = a.SyncMsgHelperNS.getSyncMsgState();
                        A.information("SyncMsgState", e), e === a.SyncMsgHelperNS.SyncMsgState.Connected && this.registerTopic().catch(), this.logoutCookie = T.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", this.onUserLogout.bind(this))
                    }
                })
            }

            uninit() {
                this.syncStateEventCookie && (a.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 && (T.NativeCallModule.nativeCall.DetachNativeEvent("onLogout", this.logoutCookie), this.logoutCookie = void 0)
            }

            getState() {
                return this.syncState
            }

            onHeartBeat(e) {
                if (e >= x) return "online" === this.syncState && (this.syncState = "offline", this.detachTaskEvents(), this.fireEvent("OnConnectStateChanged", this.syncState)), !1;
                return (new i).execute().then(e => {
                    A.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) {
                A.information("fireEvent", e, ...t), this.emit(e, ...t)
            }

            onSyncMsgStateChangeEvent(e, t) {
                return n(this, void 0, void 0, function* () {
                    A.information("onSyncMsgStateChangeEvent", e, t), e === a.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);
                    A.information("receving from topics: ", e), void 0 !== e[1] ? A.information("error = ", e[1]) : (A.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* () {
                    A.information("onSyncMessage: ", t);
                    let e = null;
                    try {
                        e = JSON.parse(t)
                    } catch (e) {
                        A.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();
                                A.information("command execute ret", i, t)
                            }
                        }
                    }
                })
            }

            attachTaskEvents() {
                this.taskStatusChangedCookie || (this.taskStatusChangedCookie = I.attachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, this.onTaskStatusChanged.bind(this))), this.insertToCategoryCookie || (this.insertToCategoryCookie = I.attachTaskEvent(s.DownloadKernel.TaskEventType.InsertToCategoryView, this.onInsertToCategoryView.bind(this))), this.removeCategoryCookie || (this.removeCategoryCookie = I.attachTaskEvent(s.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.onRemoveFromCategoryView.bind(this)))
            }

            detachTaskEvents() {
                this.taskStatusChangedCookie && (I.detachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedCookie), this.taskStatusChangedCookie = void 0), this.insertToCategoryCookie && (I.detachTaskEvent(s.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryCookie), this.insertToCategoryCookie = void 0), this.removeCategoryCookie && (I.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 => {
                        A.information("reportDownloadList", e)
                    }).catch()
                } else this.delayReportTimer || (this.delayReportTimer = setTimeout(() => {
                    this.delayReportTimer = null, (new i).execute().then(e => {
                        A.information("reportDownloadList", e)
                    }).catch()
                }, 1e3))
            }
        }

        e.ShouleiListSyncManager = O;
        let M = null;
        e.getMananger = function () {
            return M || (M = new O), M
        }
    }(t.ShouleiListSyncNS || (t.ShouleiListSyncNS = {}))
}, 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(460), o = i(342);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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._, r = Array.prototype, a = Object.prototype,
                s = "undefined" != typeof Symbol ? Symbol.prototype : null, l = r.push, d = r.slice, u = a.toString,
                c = a.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, r) {
                            return e.call(t, i, n, o, r)
                        }
                }
                return function () {
                    return e.apply(t, arguments)
                }
            }, w = 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 w(e, t, 1 / 0)
            };
            var k = 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 r = Array(t + 1);
                    for (o = 0; o < t; o++) r[o] = arguments[o];
                    return r[t] = n, e.apply(this, r)
                }
            }, T = function (e) {
                if (!m.isObject(e)) return {};
                if (p) return p(e);
                g.prototype = e;
                var t = new g;
                return g.prototype = null, t
            }, b = function (e) {
                return function (t) {
                    return null == t ? void 0 : t[e]
                }
            }, C = function (e, t) {
                return null != e && c.call(e, t)
            }, S = 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
            }, I = Math.pow(2, 53) - 1, _ = b("length"), A = function (e) {
                var t = _(e);
                return "number" == typeof t && t >= 0 && t <= I
            };
            m.each = m.forEach = function (e, t, i) {
                var n, o;
                if (t = y(t, i), A(e)) for (n = 0, o = e.length; n < o; n++) t(e[n], n, e); else {
                    var r = m.keys(e);
                    for (n = 0, o = r.length; n < o; n++) t(e[r[n]], r[n], e)
                }
                return e
            }, m.map = m.collect = function (e, t, i) {
                t = w(t, i);
                for (var n = !A(e) && m.keys(e), o = (n || e).length, r = Array(o), a = 0; a < o; a++) {
                    var s = n ? n[a] : a;
                    r[a] = t(e[s], s, e)
                }
                return r
            };
            var D = function (e) {
                return function (t, i, n, o) {
                    var r = arguments.length >= 3;
                    return function (t, i, n, o) {
                        var r = !A(t) && m.keys(t), a = (r || t).length, s = e > 0 ? 0 : a - 1;
                        for (o || (n = t[r ? r[s] : s], s += e); s >= 0 && s < a; s += e) {
                            var l = r ? r[s] : s;
                            n = i(n, t[l], l, t)
                        }
                        return n
                    }(t, y(i, o, 4), n, r)
                }
            };
            m.reduce = m.foldl = m.inject = D(1), m.reduceRight = m.foldr = D(-1), m.find = m.detect = function (e, t, i) {
                var n = (A(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 = w(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(w(t)), i)
            }, m.every = m.all = function (e, t, i) {
                t = w(t, i);
                for (var n = !A(e) && m.keys(e), o = (n || e).length, r = 0; r < o; r++) {
                    var a = n ? n[r] : r;
                    if (!t(e[a], a, e)) return !1
                }
                return !0
            }, m.some = m.any = function (e, t, i) {
                t = w(t, i);
                for (var n = !A(e) && m.keys(e), o = (n || e).length, r = 0; r < o; r++) {
                    var a = n ? n[r] : r;
                    if (t(e[a], a, e)) return !0
                }
                return !1
            }, m.contains = m.includes = m.include = function (e, t, i, n) {
                return A(e) || (e = m.values(e)), ("number" != typeof i || n) && (i = 0), m.indexOf(e, t, i) >= 0
            }, m.invoke = k(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 r = o;
                    if (!r) {
                        if (n && n.length && (e = S(e, n)), null == e) return;
                        r = e[t]
                    }
                    return null == r ? r : r.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, r = -1 / 0, a = -1 / 0;
                if (null == t || "number" == typeof t && "object" != typeof e[0] && null != e) for (var s = 0, l = (e = A(e) ? e : m.values(e)).length; s < l; s++) null != (n = e[s]) && n > r && (r = n); else t = w(t, i), m.each(e, function (e, i, n) {
                    ((o = t(e, i, n)) > a || o === -1 / 0 && r === -1 / 0) && (r = e, a = o)
                });
                return r
            }, m.min = function (e, t, i) {
                var n, o, r = 1 / 0, a = 1 / 0;
                if (null == t || "number" == typeof t && "object" != typeof e[0] && null != e) for (var s = 0, l = (e = A(e) ? e : m.values(e)).length; s < l; s++) null != (n = e[s]) && n < r && (r = n); else t = w(t, i), m.each(e, function (e, i, n) {
                    ((o = t(e, i, n)) < a || o === 1 / 0 && r === 1 / 0) && (r = e, a = o)
                });
                return r
            }, m.shuffle = function (e) {
                return m.sample(e, 1 / 0)
            }, m.sample = function (e, t, i) {
                if (null == t || i) return A(e) || (e = m.values(e)), e[m.random(e.length - 1)];
                var n = A(e) ? m.clone(e) : m.values(e), o = _(n);
                t = Math.max(Math.min(t, o), 0);
                for (var r = o - 1, a = 0; a < t; a++) {
                    var s = m.random(a, r), l = n[a];
                    n[a] = n[s], n[s] = l
                }
                return n.slice(0, t)
            }, m.sortBy = function (e, t, i) {
                var n = 0;
                return t = w(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 x = function (e, t) {
                return function (i, n, o) {
                    var r = t ? [[], []] : {};
                    return n = w(n, o), m.each(i, function (t, o) {
                        var a = n(t, o, i);
                        e(r, t, a)
                    }), r
                }
            };
            m.groupBy = x(function (e, t, i) {
                C(e, i) ? e[i].push(t) : e[i] = [t]
            }), m.indexBy = x(function (e, t, i) {
                e[i] = t
            }), m.countBy = x(function (e, t, i) {
                C(e, i) ? e[i]++ : e[i] = 1
            });
            var N = /[^\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(N) : A(e) ? m.map(e, m.identity) : m.values(e) : []
            }, m.size = function (e) {
                return null == e ? 0 : A(e) ? e.length : m.keys(e).length
            }, m.partition = x(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, r = 0, a = _(e); r < a; r++) {
                    var s = e[r];
                    if (A(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 = k(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 = w(i, n));
                for (var o = [], r = [], a = 0, s = _(e); a < s; a++) {
                    var l = e[a], d = i ? i(l, a, e) : l;
                    t && !i ? (a && r === d || o.push(l), r = d) : i ? m.contains(r, d) || (r.push(d), o.push(l)) : m.contains(o, l) || o.push(l)
                }
                return o
            }, m.union = k(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 r = e[n];
                    if (!m.contains(t, r)) {
                        var a;
                        for (a = 1; a < i && m.contains(arguments[a], r); a++) ;
                        a === i && t.push(r)
                    }
                }
                return t
            }, m.difference = k(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 = k(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 P = function (e) {
                return function (t, i, n) {
                    i = w(i, n);
                    for (var o = _(t), r = e > 0 ? 0 : o - 1; r >= 0 && r < o; r += e) if (i(t[r], r, t)) return r;
                    return -1
                }
            };
            m.findIndex = P(1), m.findLastIndex = P(-1), m.sortedIndex = function (e, t, i, n) {
                for (var o = (i = w(i, n, 1))(t), r = 0, a = _(e); r < a;) {
                    var s = Math.floor((r + a) / 2);
                    i(e[s]) < o ? r = s + 1 : a = s
                }
                return r
            };
            var O = function (e, t, i) {
                return function (n, o, r) {
                    var a = 0, s = _(n);
                    if ("number" == typeof r) e > 0 ? a = r >= 0 ? r : Math.max(r + s, a) : s = r >= 0 ? Math.min(r + 1, s) : r + s + 1; else if (i && r && s) return n[r = i(n, o)] === o ? r : -1;
                    if (o != o) return (r = t(d.call(n, a, s), m.isNaN)) >= 0 ? r + a : -1;
                    for (r = e > 0 ? a : s - 1; r >= 0 && r < s; r += e) if (n[r] === o) return r;
                    return -1
                }
            };
            m.indexOf = O(1, m.findIndex, m.sortedIndex), m.lastIndexOf = O(-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), r = 0; r < n; r++, e += i) o[r] = 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 r = T(e.prototype), a = e.apply(r, o);
                return m.isObject(a) ? a : r
            };
            m.bind = k(function (e, t, i) {
                if (!m.isFunction(e)) throw new TypeError("Bind must be called on a function");
                var n = k(function (o) {
                    return M(e, n, t, this, i.concat(o))
                });
                return n
            }), m.partial = k(function (e, t) {
                var i = m.partial.placeholder, n = function () {
                    for (var o = 0, r = t.length, a = Array(r), s = 0; s < r; s++) a[s] = t[s] === i ? arguments[o++] : t[s];
                    for (; o < arguments.length;) a.push(arguments[o++]);
                    return M(e, n, this, this, a)
                };
                return n
            }), m.partial.placeholder = m, m.bindAll = k(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, r = "" + (t ? t.apply(this, arguments) : n);
                    return C(o, r) || (o[r] = e.apply(this, arguments)), o[r]
                };
                return i.cache = {}, i
            }, m.delay = k(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, r, a, s = 0;
                i || (i = {});
                var l = function () {
                    s = !1 === i.leading ? 0 : m.now(), n = null, a = e.apply(o, r), n || (o = r = null)
                }, d = function () {
                    var d = m.now();
                    s || !1 !== i.leading || (s = d);
                    var u = t - (d - s);
                    return o = this, r = arguments, u <= 0 || u > t ? (n && (clearTimeout(n), n = null), s = d, a = e.apply(o, r), n || (o = r = null)) : n || !1 === i.trailing || (n = setTimeout(l, u)), a
                };
                return d.cancel = function () {
                    clearTimeout(n), s = 0, n = o = r = null
                }, d
            }, m.debounce = function (e, t, i) {
                var n, o, r = function (t, i) {
                    n = null, i && (o = e.apply(t, i))
                }, a = k(function (a) {
                    if (n && clearTimeout(n), i) {
                        var s = !n;
                        n = setTimeout(r, t), s && (o = e.apply(this, a))
                    } else n = m.delay(r, t, this, a);
                    return o
                });
                return a.cancel = function () {
                    clearTimeout(n), n = null
                }, a
            }, 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 = k;
            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 || a, r = "constructor";
                    for (C(e, r) && !m.contains(t, r) && t.push(r); i--;) (r = L[i]) in e && e[r] !== o[r] && !m.contains(t, r) && t.push(r)
                };
            m.keys = function (e) {
                if (!m.isObject(e)) return [];
                if (f) return f(e);
                var t = [];
                for (var i in e) C(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 = w(t, i);
                for (var n = m.keys(e), o = n.length, r = {}, a = 0; a < o; a++) {
                    var s = n[a];
                    r[s] = t(e[s], s, e)
                }
                return r
            }, 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 r = arguments[o], a = e(r), s = a.length, l = 0; l < s; l++) {
                        var d = a[l];
                        t && void 0 !== i[d] || (i[d] = r[d])
                    }
                    return i
                }
            };
            m.extend = B(m.allKeys), m.extendOwn = m.assign = B(m.keys), m.findKey = function (e, t, i) {
                t = w(t, i);
                for (var n, o = m.keys(e), r = 0, a = o.length; r < a; r++) if (t(e[n = o[r]], n, e)) return n
            };
            var U, V, K = function (e, t, i) {
                return t in i
            };
            m.pick = k(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, r = t.length; o < r; o++) {
                    var a = t[o], s = e[a];
                    n(s, a, e) && (i[a] = s)
                }
                return i
            }), m.omit = k(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 = T(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), r = 0; r < n; r++) {
                    var a = i[r];
                    if (t[a] !== o[a] || !(a 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 r = "[object Array]" === o;
                if (!r) {
                    if ("object" != typeof e || "object" != typeof t) return !1;
                    var a = e.constructor, l = t.constructor;
                    if (a !== l && !(m.isFunction(a) && a instanceof a && 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), r) {
                    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], !C(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 || (A(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 C(e, "callee")
            });
            var W = n.document && n.document.childNodes;
            "function" != typeof /./ && "object" != typeof Int8Array && "function" != typeof W && (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 C(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 S(t, e)
                } : b(e)
            }, m.propertyOf = function (e) {
                return null == e ? function () {
                } : function (t) {
                    return m.isArray(t) ? S(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 j = {"&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#x27;", "`": "&#x60;"},
                G = m.invert(j), 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(j), m.unescape = H(G), 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 r = null == e ? void 0 : e[t[o]];
                    void 0 === r && (r = i, o = n), e = m.isFunction(r) ? r.call(e) : r
                }
                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"),
                    r = 0, a = "__p+='";
                e.replace(o, function (t, i, n, o, s) {
                    return a += e.slice(r, s).replace(Y, J), r = s + t.length, i ? a += "'+\n((__t=(" + i + "))==null?'':_.escape(__t))+\n'" : n ? a += "'+\n((__t=(" + n + "))==null?'':__t)+\n'" : o && (a += "';\n" + o + "\n__p+='"), t
                }), a += "';\n", t.variable || (a = "with(obj||{}){\n" + a + "}\n"), a = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + a + "return __p;\n";
                try {
                    n = new Function(t.variable || "obj", "_", a)
                } catch (e) {
                    throw e.source = a, e
                }
                var s = function (e) {
                    return n.call(this, e, m)
                }, l = t.variable || "obj";
                return s.source = "function(" + l + "){\n" + a + "}", 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 = r[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 = r[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(960)(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(603), r = i(5), a = i(31), 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) {
            a.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 (r.isNumber(i) ? (n = o.addItem(t, i), s.information("addItem number key:", t, ", value:", i)) : r.isString(i) ? (n = o.addItem(t, i), s.information("addItem string key:", t, ", value:", i)) : r.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), a.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 r = n.getItem(t);
            if (r) switch (r.getType()) {
                case o.BencodeMap.BencodeDataType.Integer:
                case o.BencodeMap.BencodeDataType.String:
                case o.BencodeMap.BencodeDataType.List:
                case o.BencodeMap.BencodeDataType.Map:
                    return r.getValue()
            }
        }

        getAllUserData() {
            return this.userData.encode("")
        }

        setAllUserData(e) {
            this.userData.decode(e);
            let t = "";
            t = this.userData.encode(t), a.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(4), r = i(13), a = i(9), s = i(0);
    let {isDef: l, isUndef: d} = r.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), a.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), a.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(33), r = i(3), a = 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 === r.DownloadKernel.CategroyViewID.Downloading) -1 === i ? (o = "CategoryViewId1_SortAttr", s = "CategoryViewId1_SortState") : (o = "CategoryViewId4_SortAttr", s = "CategoryViewId4_SortState"); else if (e === r.DownloadKernel.CategroyViewID.Completed) -1 === i ? (o = "CategoryViewId2_SortAttr", s = "CategoryViewId2_SortState") : (o = "CategoryViewId5_SortAttr", s = "CategoryViewId5_SortState"); else {
                    if (e !== r.DownloadKernel.CategroyViewID.Recycle) break;
                    o = "CategoryViewId3_SortAttr", s = "CategoryViewId3_SortState"
                }
                let l = a.ConfigNS.getValue("TaskList", o, t.Default);
                e !== r.DownloadKernel.CategroyViewID.Downloading && (l !== t.ByProgress && l !== t.ByState || (l = t.Default));
                let d = 0 === a.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 === r.DownloadKernel.CategroyViewID.Downloading) -1 === i ? (n = "CategoryViewId1_SortAttr", o = "CategoryViewId1_SortState") : (n = "CategoryViewId4_SortAttr", o = "CategoryViewId4_SortState"); else if (t === r.DownloadKernel.CategroyViewID.Completed) -1 === i ? (n = "CategoryViewId2_SortAttr", o = "CategoryViewId2_SortState") : (n = "CategoryViewId5_SortAttr", o = "CategoryViewId5_SortState"); else {
                    if (t !== r.DownloadKernel.CategroyViewID.Recycle) break;
                    n = "CategoryViewId3_SortAttr", o = "CategoryViewId3_SortState"
                }
                a.ConfigNS.setValue("TaskList", n, e.sortBy);
                let s = e.asce ? 0 : -1;
                a.ConfigNS.setValue("TaskList", o, s)
            } while (0)
        }

        function d(e, t) {
            let i = null;
            return e === r.DownloadKernel.CategroyViewID.Downloading ? i = ((e, i) => {
                let n = e.createTime, o = i.createTime;
                return t ? n - o : o - n
            }) : e === r.DownloadKernel.CategroyViewID.Completed ? i = ((e, i) => {
                let n = e.completionTime, o = i.completionTime;
                return t ? n - o : o - n
            }) : e === r.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, r = i.taskType;
                if (e) {
                    if (o === r) {
                        let e = n.extname(t.taskName).toLowerCase(), o = n.extname(i.taskName).toLowerCase();
                        return e === o ? 0 : e < o ? -1 : 1
                    }
                    return o - r
                }
                if (o === r) {
                    let e = n.extname(t.taskName).toLowerCase(), o = n.extname(i.taskName).toLowerCase();
                    return e === o ? 0 : e < o ? 1 : -1
                }
                return r - 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, r = i.taskName;
                return e ? o.ThunderHelper.compareStr(r, n) : o.ThunderHelper.compareStr(n, r)
            }
        }

        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 r = null;
            void 0 !== o && null !== o || (o = i(e, n));
            do {
                if (o.sortBy === t.Default) {
                    r = d(e, !1);
                    break
                }
                if (o.sortBy === t.ByTime_Creation || o.sortBy === t.ByTime_Completion || o.sortBy === t.ByTime_Remain) {
                    r = d(e, o.asce);
                    break
                }
                if (o.sortBy === t.BySize) {
                    r = c(o.asce);
                    break
                }
                if (o.sortBy === t.ByType) {
                    r = u(o.asce);
                    break
                }
                if (o.sortBy === t.ByName) {
                    r = h(o.asce);
                    break
                }
                if (o.sortBy === t.ByProgress) {
                    r = p(o.asce);
                    break
                }
                if (o.sortBy === t.ByState) {
                    r = f(o.asce);
                    break
                }
            } while (0);
            return null === r && (r = d(e, !1)), r
        }

        function m(e, t, i) {
            let n = void 0, o = void 0;
            return e === r.DownloadKernel.CategroyViewID.Downloading ? o = 0 : e === r.DownloadKernel.CategroyViewID.Completed ? o = 1 : e === r.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, a) {
            let s = !1;
            i === t.ByTime && (i = o === r.DownloadKernel.CategroyViewID.Downloading ? t.ByTime_Creation : o === r.DownloadKernel.CategroyViewID.Completed ? t.ByTime_Completion : o === r.DownloadKernel.CategroyViewID.Recycle ? t.ByTime_Remain : t.Default), i !== t.Default && (s = void 0 === n || n), l({
                sortBy: i,
                asce: !s
            }, o, a), e(m(o, a))
        }
    }(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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), r = i(74), a = i(507), s = "main-renderer";
    !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(r.XmpPlayerFunction.getXmpPlayType)
            })
        }

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

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

        e.openPayVipUrl = function (e) {
            o.client.callRemoteClientFunction("vip-download-webview", "OpenPayVipUrl", e).catch()
        }, e.callXmp = t, e.getXmpPlayType = i, e.isYunBo = l, e.isPlayAndDownload = function () {
            return n(this, void 0, void 0, function* () {
                return (yield i()) === r.XmpPlayType.downloadAndPlay
            })
        }, e.isLocalPlay = function () {
            return n(this, void 0, void 0, function* () {
                return (yield i()) === r.XmpPlayType.localFile
            })
        }, e.getXmpCurrentMode = function () {
            return n(this, void 0, void 0, function* () {
                return t(r.XmpPlayerFunction.getXmpCurrentMode)
            })
        }, e.getCurrentTaskGcid = function () {
            return n(this, void 0, void 0, function* () {
                return t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.XmpMediaAttr.Gcid)
            })
        }, e.getCurrentTaskId = d, e.getCurrentTaskIdOrPanId = function () {
            return n(this, void 0, void 0, function* () {
                return (yield l()) ? t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.XmpMediaAttr.PanFileId) : t(r.XmpPlayerFunction.getPlayingTaskId)
            })
        }, e.getCurrentTaskStatus = function () {
            return n(this, void 0, void 0, function* () {
                let e = yield d();
                return a.default.getTaskStatus(e)
            })
        }, e.getStatPlayType = function () {
            return n(this, void 0, void 0, function* () {
                return t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.XmpMediaAttr.PlayType)
            })
        }, e.getStatPlayfrom = function () {
            return n(this, void 0, void 0, function* () {
                return (yield t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.XmpMediaAttr.PlayFrom)) || ""
            })
        }, e.getStatOpenFrom = function () {
            return n(this, void 0, void 0, function* () {
                return (yield t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(57), a = i(378), s = i(26), l = i(3), 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 a = c(e);
                if (!a || "" === a) 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: a,
                        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 r.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, a, 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: a,
                        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 r.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 r = yield p(o, i);
                if (r && "" !== r) {
                    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 a = h(o);
                    n = `${e}?entry=${t}&appType=PC&videobtindex=${a}&storid=${r}&share_from=${i}`, u.information("shareLink", n)
                }
            } while (0);
            return n
        })
    }

    function v(e, t, i, o, r, a, l = "pic", d = "") {
        return n(this, void 0, void 0, function* () {
            let n = "";
            {
                let c = yield g(e, t, i, o, r, a, 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=${a}&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 r = d.getTaskFromTaskId(e);
                if (!r) break;
                let a = yield p(r, o, "file_transfer", t);
                if (a && "" !== a) {
                    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(r);
                    n = `${e}?entry=${i}&appType=PC&videobtindex=${t}&storid=${a}&share_from=${o}&pcfiletransfer=1`, u.information("shareLink", n)
                }
            } while (0);
            return n
        })
    }

    function w(e, t, i, o, r, a, l, d = "pic", c = "") {
        return n(this, void 0, void 0, function* () {
            let n = "";
            {
                let h = yield g(e, t, i, o, r, a, 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=${a}&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 a.getBaiduDWZ(o), u.information("GetBaiduDWZ", n)), n
        })
    }, t.getShouleiShareLinkDlj2 = function (e, t, i, o, r, s, l = "pic", d = "") {
        return n(this, void 0, void 0, function* () {
            let n = "", c = yield v(e, t, i, o, r, s, l, d);
            return c && "" !== c && (n = yield a.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 = "", r = yield y(e, t, i, o);
            return r && "" !== r && (n = yield a.getBaiduDWZ(r), u.information("GetBaiduDWZ", n)), n
        })
    }, t.getShouleiFileTransferLink2 = w, t.getShouleiFileTransferDlj2 = function (e, t, i, o, r, s, l, d = "pic", c = "") {
        return n(this, void 0, void 0, function* () {
            let n = "", h = yield w(e, t, i, o, r, s, l, d, c);
            return h && "" !== h && (n = yield a.getBaiduDWZ(h), u.information("GetBaiduDWZ", n)), n
        })
    }
}, function (e, t, i) {
    (function () {
        var t, n, o, r, a, s = {}.hasOwnProperty;
        a = i(75), r = a.isObject, o = a.isFunction, n = i(53), t = i(511), 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, a;
                if (null != e && (e = e.valueOf()), r(e)) for (n in e) s.call(e, n) && (a = e[n], this.attribute(n, a)); 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(53), 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(53), 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(75).isObject, t = i(53), e.exports = function (e) {
            function i(e, t, o, r) {
                var a;
                i.__super__.constructor.call(this, e), n(t) && (t = (a = t).version, o = a.encoding, r = a.standalone), t || (t = "1.0"), this.version = this.stringify.xmlVersion(t), null != o && (this.encoding = this.stringify.xmlEncoding(o)), null != r && (this.standalone = this.stringify.xmlStandalone(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
            }(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, r, a, s, l = {}.hasOwnProperty;
        s = i(75).isObject, a = i(53), t = i(132), o = i(133), n = i(134), r = i(135), e.exports = function (e) {
            function i(e, t, n) {
                var o, r;
                i.__super__.constructor.call(this, e), this.documentObject = e, s(t) && (t = (o = t).pubID, n = o.sysID), null == n && (n = (r = [t, n])[0], t = r[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, a), 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, r) {
                var a;
                return a = new t(this, e, i, n, o, r), this.children.push(a), 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 r(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(53), e.exports = function (e) {
            function i(e, t, n, o, r, a) {
                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 (!r) throw new Error("Missing DTD attribute default");
                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");
                if (a && !r.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(a), this.defaultValueType = r
            }

            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(75).isObject, t = i(53), e.exports = function (e) {
            function i(e, t, o, r) {
                if (i.__super__.constructor.call(this, e), null == o) throw new Error("Missing entity name");
                if (null == r) throw new Error("Missing entity value");
                if (this.pe = !!t, this.name = this.stringify.eleName(o), n(r)) {
                    if (!r.pubID && !r.sysID) throw new Error("Public and/or system identifiers are required for an external entity");
                    if (r.pubID && !r.sysID) throw new Error("System identifier is required for a public external entity");
                    if (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")
                } else this.value = this.stringify.dtdEntityValue(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
            }(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(53), 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(53), 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(53), 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(53), 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(53), 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4);
    !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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(7), a = i(42), s = i(49), l = i(0), d = i(9), u = i(10), c = i(54),
        h = l.default.getLogger("[DownloadAndPlayNS]"), f = r.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        function t(e = "xmp") {
            let t = a.Common.getLastAssociateExts(),
                i = o.resolve(__rootDir, "..\\..\\XMP\\Program\\AssociateHelper.exe"), n = [];
            n.push("--associate=" + t), n.push("--xmpdesc=" + e);
            let r = n.join(" ");
            h.information("handleAssociate", i, r), f.shellExecute(0, "open", i, r, "", "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 r = f.getLongPathName(t);
                null !== r && void 0 !== r && "" !== r && (t = r)
            } 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 r = f.queryRegValue(i, n, o);
                    h.information("current mp4player: ", r);
                    let a = e.associate_whitelist, s = !1;
                    for (let e of a) if (r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(18), a = i(8), s = i(0), l = i(44), d = i(3), u = i(11), c = i(16), h = i(45), f = i(39),
        p = i(32), g = i(19), m = i(12), v = u.DownloadKernelTaskManager.getTaskManager(),
        y = c.DownloadKernelEventManager.getEventManager(), w = 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* () {
                    w.information("Init");
                    let e = yield a.FileSystemAWNS.existsAW(s);
                    if (e) {
                        let e = yield a.FileSystemAWNS.readFileAW(s);
                        if (e) {
                            try {
                                this.subtitleData = JSON.parse(e.toString())
                            } catch (e) {
                                w.warning(e), this.subtitleData = {}
                            }
                            w.information("Init, subtitle data", this.subtitleData)
                        }
                    } else (e = yield a.FileSystemAWNS.mkdirsAW(i)) && (yield a.FileSystemAWNS.writeFileAW(s, "{}"));
                    let t = yield m.asyncRemoteCall.getIpcMain();
                    t.on(p.ThunderChannelList.channelRMGetSutitleByCid, (e, t, i) => n(this, void 0, void 0, function* () {
                        w.information("channelRMGetSutitleByCid cid and taskid ", t, i);
                        let n = yield this.querySubtitleByCid(t, i);
                        w.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* () {
                        w.information("channelRMGetSutitleByName name and taskid ", t, i);
                        let n = yield this.querySubtitleByName(t, i);
                        w.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* () {
                        w.information("channelRMDownloadSutitle taskid ", i), yield this.downloadSubtitle(t, i, o)
                    })), t.on(p.ThunderChannelList.channelRMGetDisplayName, (e, t) => n(this, void 0, void 0, function* () {
                        w.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);
                    w.information(" fileName: ", e, " cid: ", o);
                    let r = {fileName: e, cid: o};
                    r && t.push(r)
                } 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);
                            w.information("btfile inde: ", e, " fileName: ", n, " cid: ", o);
                            let r = {fileName: n, cid: o};
                            r && t.push(r)
                        }
                    }
                } 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);
                            w.information(" fileName: ", o, " cid: ", e);
                            let i = {fileName: o, cid: e};
                            i && t.push(i)
                        }
                    }
                }
                return w.information("getDisaplayName ret ", t), t
            }

            querySubtitleByCid(e, t) {
                return n(this, void 0, void 0, function* () {
                    w.information("querySubtitleByCid");
                    let i = [], n = null;
                    try {
                        n = yield r.default.get(`http://sub.xmp.sandai.net:8000/subxl/${e}.json`), w.information("response: ", n)
                    } catch (e) {
                        w.warning(e)
                    }
                    if (null !== n && void 0 !== n.status && 200 === n.status && void 0 !== n.data && null !== n.data) {
                        w.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* () {
                    w.information("querySubtitleByName");
                    let i = [];
                    e = encodeURI(e);
                    let n = null;
                    try {
                        n = yield r.default.get(`http://subtitle.kankan.xunlei.com:8000/search.json/mname=${e}`), w.information("querySubtitleByName response: ", n)
                    } catch (e) {
                        w.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), r = 0;
                            r = (o *= 100) < 15 ? 0 : o < 35 ? 1 : o < 55 ? 2 : o < 85 ? 3 : o < 92 ? 4 : 5, e.rate = r, (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* () {
                    w.information("downloadSubtitle");
                    let n = e.surl, r = n.substring(n.lastIndexOf(".")),
                        a = i.substring(0, i.lastIndexOf(".")) + ".XLSUB" + r, s = this.getSaveDir(t);
                    w.information("downloadSubtitle fileName", a), w.information("downloadSubtitle filePath", s);
                    let l = o.join(s, a);
                    w.information("downloadSubtitle:", s, l);
                    let u = {
                        taskBaseInfo: {savePath: s, taskName: a},
                        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* () {
                    w.information("save"), w.information(e);
                    let t = JSON.stringify(e, void 0, 2);
                    w.information("save jsonStr: ", t), yield a.FileSystemAWNS.writeFileAW(s, t)
                })
            }

            attachTaskStatusChangedEvent(e, i, r) {
                w.information("Sunbtitle taskId: ", e), w.information("item: ", i), void 0 !== this.taskStatusChangedEventTable[e] && null !== this.taskStatusChangedEventTable[e] || (this.taskStatusChangedEventTable[e] = y.attachTaskEvent(d.DownloadKernel.TaskEventType.StatusChanged, (...a) => n(this, void 0, void 0, function* () {
                    let n = !1;
                    do {
                        if (!a) {
                            w.information("args is null");
                            break
                        }
                        if (a[0] !== d.DownloadKernel.TaskEventType.StatusChanged) {
                            w.information("args[0] is not StatusChanged");
                            break
                        }
                        let s = a[1];
                        if (!s) {
                            w.information("taskList is null");
                            break
                        }
                        for (let a = 0; a < s.length; ++a) {
                            let l = s[a];
                            if (!l) continue;
                            if (l.getId() !== e) continue;
                            let u = l.getTaskStatus();
                            if (w.information("get status ", u), u === d.DownloadKernel.TaskStatus.Succeeded) {
                                w.information("send: channelMRDownloadSutitleSuc"), g.ipcRenderer.send(p.ThunderChannelList.channelMRDownloadSutitleSuc), this.fireEvent(t.DownloadSuccess, e, r, i);
                                let n = [];
                                w.information("subtitleData: ", this.subtitleData), w.information("befor has sutitleTaskId "), this.subtitleData[r] && (w.information("has sutitleTaskId ", e), n = this.subtitleData[r]), w.information("after has sutitleTaskId ");
                                let a = {scid: "", surl: "", sname: "", language: "", path: "", rate: 0, status: 0};
                                a.scid = i.scid, a.surl = i.surl, a.sname = l.getTaskName().replace(".XLSUB", ""), a.language = i.language, a.rate = i.rate, a.status = 1;
                                let s = this.getSaveDir(e), u = l.getTaskName();
                                a.path = o.join(s, u), n.push(a), this.subtitleData[r] = n, yield this.save(this.subtitleData), null !== this.taskStatusChangedEventTable[e] && void 0 !== this.taskStatusChangedEventTable[e] && (w.information("取消监听 ", this.taskStatusChangedEventTable[e]), y.detachTaskEvent(d.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventTable[e]), this.taskStatusChangedEventTable[e] = null)
                            } else u === d.DownloadKernel.TaskStatus.Failed && (w.information("send: channelMRDownloadSutitleFail"), g.ipcRenderer.send(p.ThunderChannelList.channelMRDownloadSutitleFail), this.fireEvent(t.DownloadFail, e, r, i), null !== this.taskStatusChangedEventTable[e] && void 0 !== this.taskStatusChangedEventTable[e] && (w.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) {
                w.information("getSaveDir");
                let t = "", i = v.getTaskFromTaskId(e), n = i.getTaskName(), r = i.getType();
                if (i && (t = i.getSavePath()), r === d.DownloadKernel.TaskType.Bt) {
                    i.getExtraObject().getFileCount() > 1 && (t = o.join(t, n))
                }
                return w.information("name and save dir: ", n, t), t
            }

            isAlreadyDownload(e, t) {
                return n(this, void 0, void 0, function* () {
                    w.information("isAlreadyDownload cid ", e);
                    let i = !1, n = this.subtitleData[t];
                    if (w.information("isAlreadyDownload subtitleList ", n), n && n.length >= 1) for (let t of n) if (t.scid === e) {
                        let e = t.path;
                        w.information("isAlreadyDownload fielPath ", e), (yield a.FileSystemAWNS.existsAW(e)) && (i = !0)
                    }
                    return w.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), r = i(36), a = i(27), s = i(646), l = i(30), d = i(14), 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}];
                    r.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let r = {type: "chat", extra: {userId: o[0]}};
                    t.getNativeModule().emit("openComunityGroup", r), e.callNativeFunctionCallback(i, n, a.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const r = o[0];
                    try {
                        let o = JSON.parse(r);
                        t.getNativeModule().emit("newMessage", o), e.callNativeFunctionCallback(i, n, a.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const o = n[0];
                    let r = h.getTaskAverageSpeedByTaskUniqueID(o);
                    c.information("getTaskSpeedByGcid gcid:", o, ", taskAverageSpeed:", r), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, "" + r)
                } 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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const o = n[0];
                    let r = h.getTaskNameByTaskUniqueID(o);
                    c.information("getTaskSpeedByGcid gcid:", o, ", taskName:", r), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, r)
                } 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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const o = n[0];
                    c.information("switchToTask", o);
                    let r = h.getTaskInfoByTaskUniqueID(o);
                    if (!r) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    c.information("switchToTask gcid:", o, ", taskInfo:", r), l.default.fireEvent(d.NodeEventMesssageNS.eventDownloadSwitchCategory, r.categoryId, r.categoryViewId, r.taskId), e.callNativeFunctionCallback(t, i, a.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const r = 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", r), e.callNativeFunctionCallback(i, n, a.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let r = null;
                    try {
                        r = JSON.parse(o[0])
                    } catch (e) {
                        break
                    }
                    t.getNativeModule().emit("openComunityGroup", r), e.callNativeFunctionCallback(i, n, a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(111), a = i(2), s = i(0), l = i(20), d = i(8), u = i(7), c = i(389), h = i(64),
        f = s.default.getLogger("Browser.Support"), p = u.default(a.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 = a.join(__rootDir, "../bin/TBC/"), i = a.join(t, "libCef.dll");
                    if (!(e = yield d.FileSystemAWNS.existsAW(i))) break;
                    let n = a.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"), r.context.on("browser-created", (e, t) => {
                    f.information("new browser-created:", JSON.stringify(t))
                }), r.context.on("browser-destroyed", (e, t) => {
                    f.information("browser destroyed: ", JSON.stringify(t))
                });
                let e = a.join(__rootDir, "../bin/TBC/"), i = p.getPeerID(), n = a.join(__rootDir, "../../Thunder.exe"),
                    o = p.getFileVersion(n);
                return g = yield r.context.init({
                    data_path: a.join(e, "Data"),
                    product_version: o,
                    peer_id: i,
                    user_agent: "Thunder/" + o,
                    tbc_dir: e,
                    node_module_path: a.join(__rootDir, "../bin/TBC/xlbrowsernode.node"),
                    flash_allow_list_path: a.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) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                {
                    let i = yield o.asyncRemoteCall.getCurrentWindow(),
                        n = yield c.BrowserWindowNS.getBrowserWindowPosition(p, i);
                    p.setWindowPos(e, h.OptionOfHWNDInAfter.HWND_TOP, n.x, n.y, n.width, n.height, 0), t = !0
                }
                return t
            })
        }
    }(t.BrowserSupportNS || (t.BrowserSupportNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(110), a = 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 r.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 || a.NativeCallModule.nativeCall.CallNativeFunction("FireEventFunction", "OnPhoneAuthResult", 0)
            })
        }

        closeDialog(e, t) {
            this.isType = !0;
            let i = e;
            null !== e && void 0 !== e || (i = 0), a.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 r = i.deviceid, a = 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(r)}&auth.sessionid=${encodeURIComponent(n)}&auth.userid=${encodeURIComponent(a)}&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), r = i(109), a = 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 = {
        [r.PopView.PRE_NEW_TASK]: 0,
        [r.PopView.BT_NEW_TASK]: 0,
        [r.PopView.NEW_TASK]: 0,
        [r.PopView.LOGIN]: 1,
        [r.PopView.BROWSER_GUIDE]: 2,
        [r.PopView.SIGN]: 3,
        [r.PopView.THUNDER_PAN_IMPORT]: 4,
        [r.PopView.VIP_RENEW]: 5,
        [r.PopView.LOGIN_NONE_VIP_ACTIVITY]: 6,
        [r.PopView.VIP_PACK_TRY_GUIDE]: 7,
        [r.PopView.VIP_TRY_GUIDE]: 8,
        [r.PopView.VIP_HUDDLE_NOVICE_GUIDE]: 9,
        [r.PopView.KUAINIAO_AUTO]: 10
    }, u = {
        [r.PopView.PRE_NEW_TASK]: l.P0,
        [r.PopView.BT_NEW_TASK]: l.P0,
        [r.PopView.NEW_TASK]: l.P0,
        [r.PopView.LOGIN]: l.P1,
        [r.PopView.BROWSER_GUIDE]: l.P1,
        [r.PopView.SIGN]: l.UnKnown,
        [r.PopView.THUNDER_PAN_IMPORT]: l.P1,
        [r.PopView.VIP_RENEW]: l.P2,
        [r.PopView.LOGIN_NONE_VIP_ACTIVITY]: l.P2,
        [r.PopView.VIP_PACK_TRY_GUIDE]: l.P3,
        [r.PopView.VIP_TRY_GUIDE]: l.P3,
        [r.PopView.VIP_HUDDLE_NOVICE_GUIDE]: l.P3,
        [r.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 === r.PopView.LOGIN && t.toLowerCase() !== "autoLoginFail".toLowerCase() && "auto" !== t.toLowerCase() && t.toLowerCase() !== "Install".toLowerCase()) {
                    i = !0;
                    break
                }
                if (e === r.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, a.information("query can pop but other delay to show", e);
                    break
                }
                if (o) break;
                i = this.tryPop(e, !1)
            } while (0);
            return a.information("query can pop", e, i), i
        }

        popNow(e, t) {
            a.information("popNow in", e, t), this.isAuto(e, t) && this.tryPop(e, !0), this.showQueue.push({
                bid: e,
                from: t
            })
        }

        enqueue(e, t, i) {
            a.information("setReady in", e, i);
            do {
                if (e === r.PopView.PRE_NEW_TASK || e === r.PopView.BT_NEW_TASK || e === r.PopView.NEW_TASK) break;
                if (i = i || "", e === r.PopView.LOGIN && i.toLowerCase() !== "autoLoginFail".toLowerCase() && "auto" !== i.toLowerCase() && i.toLowerCase() !== "Install".toLowerCase()) {
                    t && t();
                    break
                }
                if (e === r.PopView.BROWSER_GUIDE && "auto" !== i.toLowerCase()) {
                    t && t();
                    break
                }
                if (!t || !n.isFunction(t)) {
                    a.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 ? (a.information("setReady wait pop", e), this.willPopQueue[e] = [i, t]) : (a.information("setReady pop rightnow", e), this.tryPop(e, !1) && t && t())
            } while (0)
        }

        setFinish(e) {
            a.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() : a.information(`${e} finished, but still other party show`, this.showQueue)
        }

        hasAutoPop() {
            let e = !1;
            for (let t of this.showQueue) if (t.bid === r.PopView.PRE_NEW_TASK || t.bid === r.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 === r.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) {
                    a.information("popNext no dlg wait");
                    break
                }
                setTimeout(() => {
                    do {
                        if (0 === (e = Object.keys(this.willPopQueue)).length) {
                            a.information("popNext onTimer no dlg wait");
                            break
                        }
                        e.sort((e, t) => d[e] - d[t]), a.information("popNext", e);
                        let t = e[0];
                        if (0 === d[t]) {
                            a.information("popNext but newtask dlg still exist");
                            break
                        }
                        let i = this.willPopQueue[t] || [];
                        this.tryPop(t, !1) ? (delete this.willPopQueue[t], a.information("popNext onTimer show", t), i[1] && i[1]()) : (a.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) {
                    a.information(e, "over total max popCount", this.otherPopCount, c);
                    break
                }
                let n = u[e];
                if (!n || n === l.UnKnown) {
                    a.information(e, "has no classify");
                    break
                }
                let o = this.eachPopCount[n];
                if (void 0 === o) break;
                if (o >= h[n]) {
                    a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(19), a = i(12), s = i(82), l = i(114), d = i(32), u = i(7), c = i(0), h = i(672), f = i(4),
        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 a.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()
                                    }
                                }
                                k().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 w(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => n(this, void 0, void 0, function* () {
                    r.ipcRenderer.once("notify-window-created", (i, o) => n(this, void 0, void 0, function* () {
                        u = !1;
                        let i = yield(yield a.asyncRemoteCall.getBrowserWindow()).fromId(o);
                        c[o] = e, t(i)
                    })), u = !0, r.ipcRenderer.send("create-notify-window", JSON.parse(JSON.stringify(e)))
                }))
            })
        }

        function k() {
            return n(this, void 0, void 0, function* () {
                try {
                    m.information("close"), t && !(yield t.isDestroyed()) && t.close()
                } catch (e) {
                    m.warning(e)
                }
            })
        }

        function T(e) {
            m.information("setTimer..."), o = !1, e = e || 1e4, i && b(), i = setInterval(() => {
                o || (e -= 1e3) <= 0 && k().catch()
            }, 1e3)
        }

        function b() {
            i && (m.information("killTimer..."), clearInterval(i), i = null)
        }

        function C() {
            S(), v = f.client.attachServerEvent("OnLoginStatusChange", (e, t, i) => {
                "unlogin" !== i && "offline" !== i || k().catch()
            })
        }

        function S() {
            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 r = "development" === process.env.RUN_ENV ? "http://localhost:9080/notification-renderer/" : `file:///${__dirname}/../notification-renderer/index.html`;
                    if (e.url && (r = e.url), "AdvertisementWebPageTips" !== e.type) {
                        yield y();
                        let n = yield w(e);
                        if (t && t.id === n.id) {
                            m.warning("get duplicate window", n.id);
                            break
                        }
                        t = n, (yield a.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 && C(), T(e.duration), i && i("ready-to-show"))
                        }), t.once("closed", () => {
                            n === t && (m.information("closed..."), b(), S(), delete c[t.id], t = null, p.deQueue())
                        }), t.loadURL(r).catch()
                    } else {
                        let s = (yield(yield a.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(r, {
                            x: u,
                            y: c,
                            width: l,
                            height: d
                        }, null, e.title, (r, ...a) => {
                            if (m.information("callback", r, ...a), i && i(r, ...a), "webpage_loaded" === r) T(e.duration); else if ("mouse_hover" === r) o = !0; else if ("mouse_leave" === r) o = !1; else if ("webpage_load_failed" === r) ; else if ("click" === r) {
                                if (t) {
                                    t.hide();
                                    let e = t;
                                    f = setTimeout(() => n(this, void 0, void 0, function* () {
                                        (yield e.isDestroyed()) || e.close()
                                    }), 5e3)
                                }
                            } else "closed" === r && (f && (clearTimeout(f), f = null), t = null, b(), p.deQueue())
                        }).then(e => {
                            m.information("notifyWindow=", e), t = e
                        }).catch()
                    }
                } while (0)
            })
        }, e.close = k, 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 ? r.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 a.asyncRemoteCall.getBrowserWindow()).fromId(i);
                                    e(t)
                                }), 0)
                            })) : e(null)
                        }))
                    })
                }(), m.information("waitCreateDone end"), t
            })
        }, e.setTimer = T
    }(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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(82), a = i(146), s = i(114), l = i(26), d = i(401),
        u = s.MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"),
        c = o.default.getLogger("NotificationHelper");
    !function (e) {
        function t(e) {
            return !e.type || e.type !== r.Notification.TipsType.DownloadComplete && e.type !== r.Notification.TipsType.DownloadFail && e.type !== r.Notification.TipsType.ConsumptionTips && e.type !== r.Notification.TipsType.CommunityTips && e.type !== r.Notification.TipsType.CommonPushTip
        }

        function i(e, t) {
            return n(this, void 0, void 0, function* () {
                (yield a.NotificationNS.getCurrentWindow()) ? u.getCurrentProperty() < e.priority ? (o(e, t), a.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* () {
                    a.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 r = (new Date).getTime();
                            if (r - i < 60 * t * 1e3) {
                                c.information("adTipsPopupMode interval, adTipsLastPopupTime:", i, "currentTime:", r, "interval:", t), setTimeout(() => {
                                    e(n, o)
                                }, 60 * t * 1e3 - (r - 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}, r = {
        SET_CURRENT_GUIDE(e, t, i) {
            e.currentGuide = t
        }
    };
    t.default = {state: o, mutations: r, 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(788)
}, 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, r = i.modules.data, a = t.getScale(o, n), s = Math.floor((o + 2 * n.margin) * a), l = n.margin * a, 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[r[Math.floor((u - l) / a) * o + Math.floor((c - l) / a)] ? 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(851), a = i(855);

    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 r = {
            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 r) {
            let {hosts: i, handler: n} = r[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, r = 90) {
        if (!t.isALi(e)) return;
        let a = "m_mfit";
        switch (i) {
            case 1:
                a = "m_mfit";
                break;
            case 2:
                a = "m_lfit"
        }
        return `${e}&x-oss-process=image/resize,${a}${o ? ",h_" + o : ""}${n ? ",w_" + n : ""}/quality,q_${r}`
    }, 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 = r(e, {whiteList: {br: []}})).match(/\[[^[\]]+\]/g);
        return t && t.forEach(t => {
            let i = a[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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4);
    !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(444), o = i(344);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(447), o = i(352);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(448), o = i(358);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(8), a = i(73), s = i(67), l = i(82), d = i(147), u = i(9), c = i(13), h = i(7), f = i(401),
        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(159), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(696), a = i(729), 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 r = i[0];
            i[0].startsWith("StartTask") ? r = "StartTask" : i[0].startsWith("PauseTask") && (r = "PauseTask"), l.XLStatNS.trackEvent("core_event", "pc_response_stat", "", 0, 0, 0, 0, "operation=" + r + ",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: r.default, MainBody: a.default}})], f), t.default = f
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(161), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(697), o = i(24);
    t.default = o.connector.connect({
        mapCommitToProps: {selectNav: "SELECT_NAV", setCurrentGuide: "SET_CURRENT_GUIDE"},
        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(163), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(698), s = i(708), l = i(4), d = i(727), u = i(52), c = i(58), h = i(9), f = i(142), p = i(91),
        g = i(12), m = i(145), v = i(148), y = i(10),
        w = f.CommunityNaviteFunctionNS.CommunityNaviteFunction.getNativeModule();
    w.registerNativeFunction();
    let k = class extends r.Vue {
        constructor() {
            super(...arguments), this.dragable = !0, this.curUserId = "", this.eventOnMessageLoadend = -1, this.hasClickNetdisk = !1, this.netdiskGuideTips = "全新云盘、最高领2T空间"
        }

        updateCurUserId(e) {
            this.curUserId = e, this.currentGuide === v.NewIssueGuide.netdisk && this.setCurrentGuide(v.NewIssueGuide.unknown)
        }

        isVisited(e) {
            return "find-page" !== this.curNav && e > 0
        }

        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.Cloud ? (t = "yunpan", this.hasClickNetdisk = !0) : e === u.NavViewID.Browser ? t = "discover" : e === u.NavViewID.Message && (t = "message"), 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(), w.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)
        }

        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([r.Prop({})], k.prototype, "curNav", void 0), n([r.Prop({})], k.prototype, "navList", void 0), n([r.Prop({})], k.prototype, "selectNav", void 0), n([r.Prop()], k.prototype, "currentGuide", void 0), n([r.Prop()], k.prototype, "setCurrentGuide", void 0), n([r.Watch("curNav")], k.prototype, "onCurNavChange", null), k = n([r.Component({
        components: {
            LoginArea: a.default,
            SystemButtons: s.default
        }
    })], k), t.default = k
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(165), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(12), a = i(6), s = i(2), l = i(17), d = i(29), u = i(23), c = i(0), h = i(9), f = i(13), p = i(7),
        g = i(699), m = i(701), v = i(15), y = i(91), w = i(402), k = i(4), T = i(505), b = i(49);
    let {isDef: C} = f.ThunderUtil;
    const S = p.default(s.join(__rootDir, "../bin/ThunderHelper.node")), I = i(706), _ = i(707),
        A = c.default.getLogger("login-area");
    let D = class extends a.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 = I, 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 = w.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 w.SyncMsgHelperNS.checkSyncMsg()) ? (this.syncMsgEventId = w.SyncMsgHelperNS.attachSyncMsgStateChangeEvent((e, t) => o(this, void 0, void 0, function* () {
                        this.syncMsgState = e
                    })), this.syncMsgState = w.SyncMsgHelperNS.getSyncMsgState()) : this.syncMsgState = w.SyncMsgHelperNS.SyncMsgState.Error
                }), 15e3) : (this.syncMsgOnceTimerID && (clearTimeout(this.syncMsgOnceTimerID), this.syncMsgOnceTimerID = null), this.syncMsgEventId && (w.SyncMsgHelperNS.detachSyncMsgStateChangeEvent(this.syncMsgEventId), this.syncMsgEventId = void 0))
            })
        }

        onHeaderChange(e, t) {
            A.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);
            A.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"), A.information("strIsOffline:", e), e
        }

        get showInfoIcon() {
            return this.isLogin && (this.syncMsgState === w.SyncMsgHelperNS.SyncMsgState.Close || this.syncMsgState === w.SyncMsgHelperNS.SyncMsgState.Error)
        }

        get showRestoreIcon() {
            return this.isLogin && this.syncMsgState === w.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() {
            A.information("setDefaultHeader"), this.curLoginHeaderUrl = I
        }

        setDefaultIcon() {
            A.information("setDefaultIcon"), this.curIconUrl = _
        }

        showPersonalInfoWnd(e) {
            return o(this, void 0, void 0, function* () {
                let t = this.getClientRectsEx(), i = yield this.isLoginInfoRect(t);
                if (A.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(S, this.personalInfoWnd)), this.isLogin && this.stat("userinfo_show")) : yield this.closePersonalInfoWnd(), k.client.detachServerEvent(T.ThunderEvent.hoverWindowReadyToShow, this.eventHoverWindowReadyToShow)
                    });
                    this.personalInfoWnd.once("ready-to-show", () => {
                        e().catch()
                    }), this.eventHoverWindowReadyToShow = k.client.attachServerEvent(T.ThunderEvent.hoverWindowReadyToShow, () => {
                        e().catch()
                    }), this.personalInfoWnd.once("closed", () => {
                        this.personalInfoWnd = null
                    })
                }
            })
        }

        onPromptTitleShow(e) {
            if (A.information("onPromptTitleShow", e), e) {
                let e = "";
                e = "is_ad=1";
                let t = encodeURIComponent(e);
                A.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);
                    A.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;
            C(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 r.asyncRemoteCall.getScreen()).getCursorScreenPoint(), n = null;
                    try {
                        n = JSON.parse(e)
                    } catch (e) {
                        A.warning(e)
                    }
                    if (null === n) break;
                    let o = yield(yield r.asyncRemoteCall.getCurrentWindow()).getBounds(), a = o.x + 26, s = o.y + 60,
                        l = o.x + 26 + Number(n.width), d = o.y + 60 + Number(n.height);
                    i.x >= a && 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 r.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, a = t[0].bottom - t[0].top;
                return JSON.stringify({x: i, y: n, width: o, height: a})
            })
        }

        enter(e) {
            return o(this, void 0, void 0, function* () {
                if (A.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 (A.information("点击促销文案", this.promptData.title), A.information("islogin", this.isLogin), A.information("curLoginStatus", this.curLoginStatus), !this.isLogin) {
                let t = `button=${e}`;
                t += ",is_ad=1", A.information("extData", t);
                let i = encodeURIComponent(t);
                A.information(t, i), h.XLStatNS.trackEvent("clienttop", "nolog_head_nickname_click", "", 0, 0, 0, 0, i), this.promptTextClicked = !0, A.information("this.curLoginHeaderUrl", this.curLoginHeaderUrl), u.LoginHelperNS.loginHelper.showLoginDlg("clienthead", !0), A.information("this.curLoginHeaderUrl", this.curLoginHeaderUrl)
            }
        }

        clickUserHeader(e) {
            if (A.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";
                k.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);
                A.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) {
                k.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 r = encodeURIComponent(o);
                A.information(e, o, r), h.XLStatNS.trackEvent("clienttop", i, "", 0, 0, 0, 0, r)
            }
        }

        switchAccount() {
            this.isLogin = !1, this.curUserid = "", this.curLoginStatus = "unlogin", this.userNick = "", this.curLoginHeaderUrl = I, this.rectDatas = "", this.updateLoginStatus(), this.$emit("updateCurUserId", this.curUserid), u.LoginHelperNS.loginHelper.switchAccount("changeaccount")
        }

        personalCenter() {
            k.client.callServerFunction("OpenNewTab", "http://i.xunlei.com/login.html")
        }

        updateLoginStatus() {
            if (A.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 (A.information("收到 getAllUserInfo 返回数据 userInfo:", i), null === i || void 0 === i) {
                                A.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 ? I : 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 (A.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 = I, this.updateLoginStatus()
            })
        }

        checkPromptState() {
            if (A.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, A.information("prompt data", this.promptData))
            }
        }

        stat(e) {
            let t = `is_login=${this.isLogin ? 1 : 0},is_vip=${this.isVip}`;
            A.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() {
            b.default.isInited() ? this.userHeaderText = b.default.getConfigValue("main", "nologinbutton", {text: "登录送云盘"}).text || "登录送云盘" : b.default.attachListener("OnRemoteGlobalConfigLoaded", () => {
                this.userHeaderText = b.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(), k.client.attachServerEvent("OnLoginBefore", (e, t, i) => {
                    if (A.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 = I;
                        let e = u.LoginHelperNS.loginHelper.getUserHeader(i);
                        A.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 = I
                }), k.client.attachServerEvent("OnLoginSuc", e => o(this, void 0, void 0, function* () {
                    if (A.information("收到 onLoginSuc 事件"), this.promptTextClicked && this.promptData && this.promptData.url) {
                        this.promptTextClicked = !1;
                        let e = this.promptData.url;
                        A.information("prompt url", e), k.client.callServerFunction("OpenNewTab", e)
                    }
                    yield this.updateUserInfo("login"), yield this.enter("onLoginSuc")
                })), k.client.attachServerEvent("OnGetUserInfoFinished", e => o(this, void 0, void 0, function* () {
                    A.information("收到 onGetUserInfoFinished 事件"), yield this.updateUserInfo("update");
                    let e = yield u.LoginHelperNS.loginHelper.updateHeaderAw(this.headerUrl, this.curUserid);
                    A.information("下载头像成功：", e, this.curLoginStatus), "online" === this.curLoginStatus && null !== e && void 0 !== e && "" !== e && (this.curLoginHeaderUrl = e, l.NativeCallModule.nativeCall.CallNativeFunction("NativeFireEvent", "onUserHeaderChange", e, t => {
                        A.information("onUserHeaderChange", e, t)
                    }))
                })), k.client.attachServerEvent("OnLoginFailed", (e, t, i) => {
                    A.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 = I, this.updateLoginStatus())
                }), k.client.attachServerEvent("OnLogout", e => o(this, void 0, void 0, function* () {
                    A.information("收到 onLogout 事件"), this.isLogin = !1, this.curLoginStatus = "unlogin", this.userNick = "", this.curLoginHeaderUrl = I, this.rectDatas = "", this.updateLoginStatus(), yield this.closePersonalInfoWnd(), m.VipRenewIconManagerNS.getIconManager().onLogout(), h.XLStatNS.setUserID(0)
                })), k.client.attachServerEvent("OnSwitchAccount", e => o(this, void 0, void 0, function* () {
                    this.switchAccount(), yield this.closePersonalInfoWnd()
                })), k.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 && (A.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))
                })), k.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) {
                        A.warning(e)
                    }
                }), k.client.attachServerEvent("OnLoginUpdate", (e, t, i) => {
                    A.information("收到事件 onLoginUpdate:", t, i), "vipinfo" !== t && "userinfo" !== t || this.updateUserInfo("update").catch(), k.client.broadcastEvent("onUserInfoChange", t, i, e => {
                        A.information("fire onUserInfoChange:", e)
                    }), v.server.fireClientEvent("onUserInfoChange", t, i), v.server.fireClientEvent("OnUserInfoChange", t, i)
                }), (yield r.asyncRemoteCall.getIpcMain()).on("onCancelRetry", () => {
                    A.information("收到 onCancelRetry 事件"), this.isLogin = !1, this.curLoginStatus = "unlogin", this.userNick = "", this.curLoginHeaderUrl = I, this.rectDatas = "", this.updateLoginStatus(), u.LoginHelperNS.loginHelper.logout()
                });
                let t = g.LoginPromptManagerNS.getManager();
                t.attachListener(g.LoginPromptManagerEventNS.promptDataGet, e => {
                    A.information("prompt data event result", e), e && this.checkPromptState()
                }), t.init(), A.information("attach prompt data event")
            })
        }
    };
    n([a.Watch("isLogin")], D.prototype, "onLoginChange", null), n([a.Watch("curLoginHeaderUrl", {immediate: !0})], D.prototype, "onHeaderChange", null), n([a.Watch("vipButtonShow")], D.prototype, "onVipButtonShow", null), D = n([a.Component({})], D), t.default = D
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(167), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(709), o = i(24);
    t.default = o.connector.connect({
        mapCommitToProps: {createNewTab: "CREATE_NEW_TAB"},
        mapGettersToProps: {currentTab: e => e.currentTab, curNav: e => e.currentNav}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(169), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(12), s = i(10), l = i(22), d = i(2), u = i(7), c = i(52), h = i(9), f = i(0), p = i(4),
        g = i(14), m = i(13), v = i(532), y = i(65), w = i(49), k = i(710), T = i(386),
        b = u.default(d.join(__rootDir, "../bin/ThunderHelper.node")),
        C = f.default.getLogger("system-buttons"), {isDef: S} = m.ThunderUtil, I = i(46), _ = i(711);
    let A = !1, D = class extends r.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() {
            let e = !1;
            return this.gameLink && (e = !0), e
        }

        onPopShow(e) {
            e && this.trackVipEvent("sidebar_acti_entrance_bubble_show", {
                aidfrom: this.configurableButton.aid,
                type: this.popTimerId ? "auto" : "hover"
            })
        }

        onGameIconShow(e) {
            e && this.trackVipEvent("sidebar_game_entrance_show")
        }

        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) {
                        C.warning(e)
                    }
                    try {
                        let e = JSON.parse(yield p.client.callServerFunction("GetUserInfo", 2));
                        S(e) && (i = Number(e.vasType), t = Number(e.isVip))
                    } catch (e) {
                        C.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.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 = I(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 = I(t, "0", "aidfrom"), this.configurableButton.title = I(t, "0", "hover"), this.configurableButton.link = this.appendUrlParams(I(t, "0", "url"), {
                        aidfrom: this.configurableButton.aid,
                        referfrom: I(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 r = t.find(e => "image_link_after_click" === e.id);
                    if (this.configurableButton.imgAfterClick = r ? r.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 a = t.find(e => "image_pop" === e.id);
                    if (!a || !a.img) break;
                    let s = this.isClickedToday(this.configurableButton.aid);
                    this.configurableButton.imagePop = s ? "" : a.img, this.autoPopHover()
                } while (0)
            })
        }

        autoPopHover() {
            do {
                if (A) break;
                A = !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) {
                    C.warning(e)
                }
                try {
                    let e = JSON.parse(yield p.client.callServerFunction("GetUserInfo", 2));
                    S(e) && (i = Number(e.vasType), t = Number(e.isVip))
                } catch (e) {
                    C.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) {
                    C.warning(e)
                }
                try {
                    let e = JSON.parse(yield p.client.callServerFunction("GetUserInfo", 2));
                    S(e) && (n = Number(e.vasType))
                } catch (e) {
                    C.warning(e)
                }
                let o = d.join(__rootDir, "../../Thunder.exe"),
                    r = `is_login=${i},vip_type=${n},client_version=${b.getFileVersion(o)}`;
                for (let e in t) r += `,${e}=${t[e]}`;
                h.XLStatNS.trackEvent("xlx_vip_event", e, "", 0, 0, 0, 0, r), C.information("trackEvent", e, r)
            })
        }

        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() {
            p.client.callServerFunction("OpenNewTab", this.gameLink).catch(), this.trackVipEvent("sidebar_game_entrance_click")
        }

        getGameConfig() {
            return o(this, void 0, void 0, function* () {
                yield w.default.isInitedAW();
                let e = w.default.getConfigValue("home", "sidebar_game", void 0);
                if (e && e.sidebar_game_switch) {
                    let t = "https://api-game-ssl.xunlei.com/jump/xunleiIcon?referfrom=v_pc_xds_homepage_navigation_icon&skipLogin=1";
                    this.gameLink = e.sidebar_game_link ? e.sidebar_game_link : t
                }
            })
        }

        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 T.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 a.asyncRemoteCall.getCurrentWindow(), t = yield e.isMinimized(), i = yield e.isVisible();
                e && !t && i && this.trackVipEvent("sidebar_hygw_entrance_show")
            })
        }
    };
    n([r.Prop({})], D.prototype, "createNewTab", void 0), n([r.Prop()], D.prototype, "curNav", void 0), n([r.Prop()], D.prototype, "currentTab", void 0), n([r.Watch("isPopShow")], D.prototype, "onPopShow", null), n([r.Watch("isGameIconShow")], D.prototype, "onGameIconShow", null), n([r.Watch("maximized")], D.prototype, "onMaximizedChange", null), n([r.Watch("isShowNewTag")], D.prototype, "onShowNewTag", null), D = n([r.Component({components: {MainMenu: k.default}})], D), t.default = D
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(171), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(37), a = i(22), s = i(9), l = i(4), d = i(7), u = i(18), c = i(2),
        h = i(0).default.getLogger("system-buttons"), f = d.default(c.join(__rootDir, "../bin/ThunderHelper.node")),
        p = i(6);
    let g = class extends p.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() {
            return o(this, void 0, void 0, function* () {
                l.client.callServerFunction("ShowBrowserGuideDlg", !0, "main_menu", !0).catch(), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=browser_support"), this.$emit("update:isShowMenu", !1)
            })
        }

        clickXmp() {
            l.client.callServerFunction("DownloadOrOpenXmp"), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=xmp"), this.$emit("update:isShowMenu", !1)
        }

        clickNewTask() {
            l.client.callServerFunction("CreatePreNewTaskWindow"), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=newtask"), this.$emit("update:isShowMenu", !1)
        }

        clickUnfinished() {
            l.client.callServerFunction("ImportUncompleted"), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=unfinished"), this.$emit("update:isShowMenu", !1)
        }

        clickDownloadDetectTools() {
            a.MessageBox.custom("DownloadDetectTools", {singleton: !0}, {modal: !1}).then(e => {
                e.action, r.MessageBoxNS.Action.OK
            }).catch(), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=download_diagnosis"), this.$emit("update:isShowMenu", !1)
        }

        clickSetting() {
            l.client.callServerFunction("OpenSettingCenter"), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=setting"), this.$emit("update:isShowMenu", !1)
        }

        clickFeedback() {
            let e = f.getPeerID(), t = c.join(__rootDir, "../../Thunder.exe"),
                i = "http://misc-xl9-ssl.xunlei.com/client/view/dist/1.0/feedback.html?version=" + f.getFileVersion(t) + "&pid=" + e;
            l.client.callServerFunction("OpenNewTab", i).catch(), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=feedback"), this.$emit("update:isShowMenu", !1)
        }

        clickCheckUpdate() {
            return o(this, void 0, void 0, function* () {
                (yield l.client.callServerFunction("GetValue", "XLUpdate", "ShowMenuUpdateIcon", !1)) && (yield l.client.callServerFunction("SetValue", "XLUpdate", "ShowMenuUpdateIcon", !1)), f.startManualUpdateWithUI(), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=check"), this.$emit("update:isShowMenu", !1)
            })
        }

        clickAboutThunder() {
            a.MessageBox.custom("about", {
                windowWidth: 450,
                windowHeight: 296
            }), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=more_about"), this.$emit("update:isShowMenu", !1)
        }

        clickCustomHelp() {
            l.client.callServerFunction("OpenNewTab", "http://help.xunlei.com/").catch(), s.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=more_kefu"), this.$emit("update:isShowMenu", !1)
        }

        clickThunderBbs() {
            l.client.callServerFunction("OpenNewTab", "http://bbs.xunlei.com/").catch(), this.$emit("update:isShowMenu", !1)
        }

        clickPrivacy() {
            l.client.callServerFunction("OpenNewTab", "https://i.xunlei.com/xluser/privacy.html").catch(), this.$emit("update:isShowMenu", !1)
        }

        clickQuit() {
            l.client.callServerFunction("ExitThunder"), s.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 l.client.callServerFunction("GetDownloadCompleteTaskType"), e === this.downloadCompleteTaskType ? yield l.client.callServerFunction("CancelDownloadCompleteTask") : yield l.client.callServerFunction("SetDownloadCompleteTaskType", e);
                s.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 l.client.callServerFunction("GetValue", "XLUpdate", "UpdateMd5", "")) !== e.data.md5 && 2 === parseInt(e.data.t, 10) && (yield l.client.callServerFunction("SetValue", "XLUpdate", "UpdateMd5", e.data.md5), yield l.client.callServerFunction("SetValue", "XLUpdate", "ShowMainUpdateIcon", !0), yield l.client.callServerFunction("SetValue", "XLUpdate", "ShowMenuUpdateIcon", !0)), (yield l.client.callServerFunction("GetValue", "XLUpdate", "ShowMainUpdateIcon", !0)) && (this.showNewIcon = !0)
                } else yield l.client.callServerFunction("SetValue", "XLUpdate", "UpdateMd5", ""), yield l.client.callServerFunction("SetValue", "XLUpdate", "ShowMainUpdateIcon", !1), yield l.client.callServerFunction("SetValue", "XLUpdate", "ShowMenuUpdateIcon", !1); else yield l.client.callServerFunction("SetValue", "XLUpdate", "UpdateMd5", ""), yield l.client.callServerFunction("SetValue", "XLUpdate", "ShowMainUpdateIcon", !1), yield l.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 l.client.callServerFunction("GetDownloadCompleteTaskType"), setTimeout(() => {
                    this.checkUpgrade()
                }, 5e3), s.XLStatNS.trackEvent("clienttop", "clienttop_main_menu_click", "", 0, 0, 0, 0), document.addEventListener("keydown", this.listenKeyDown)
            })
        }

        beforeDestroy() {
            document.removeEventListener("keydown", this.listenKeyDown)
        }
    };
    n([p.Prop()], g.prototype, "isShowMenu", void 0), n([p.Prop({default: !0})], g.prototype, "showBrowserIcon", void 0), g = n([p.Component({components: {}})], g), t.default = g
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(173), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(730), 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",
            addNavUnreadNum: "ADD_NAV_UNREAD_NUM",
            setNavUnreadNum: "SET_NAV_UNREAD_NUM",
            setNavShowUnreadNum: "SET_NAV_SHOW_UNREAD_NUM",
            setNavShowRedDot: "SET_NAV_SHOW_RED_DOT"
        },
        mapDispatchToProps: {selectTab: "selectTab", getUnreadNums: "getUnreadNums"},
        mapGettersToProps: {
            currentTab: e => e.currentTab,
            curNav: e => e.currentNav,
            allTabs: e => e.allTabs,
            startTaskCount: e => e.startTaskCount,
            messageUnreadNum: e => e.messageUnreadNum
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(175), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(731), s = i(77), l = i(738), d = i(750), u = i(52), c = i(23), h = i(4), f = i(15), p = i(64),
        g = i(112), m = i(17), v = i(393), y = i(146), w = i(82), k = i(78), T = i(114), b = i(0), C = i(10), S = i(22),
        I = i(9), _ = g.PluginWebviewMgrNS.getWebViewMgr(), A = b.default.getLogger("main-body"),
        D = T.MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"), x = i(46);
    let N = class extends r.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 = k.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
        }

        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()})
        }

        getBrowserTabCount() {
            let e = 0;
            if (this.allTabs) for (let t = 0; t < this.allTabs.length; ++t) this.allTabs[t].tab && this.allTabs[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() {
            return o(this, void 0, void 0, function* () {
                let e = yield h.client.callServerFunction("GetXmpMode");
                !0 === this.settingTab ? e !== p.XMPShowMode.MINI_MODE && e !== p.XMPShowMode.EMBED_CHILD_MODE || (h.client.callServerFunction("SetXmpPause"), this.isSetXmpPause = !0) : this.isSetXmpPause && (e !== p.XMPShowMode.MINI_MODE && e !== 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(), I.XLStatNS.trackEvent("community", "message_tray_flicker_click", "", 0, 0, 0, 0)
            }), I.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" === x(this.currentTab, "tab", "name") && x(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 ? (D.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
        }

        closeSettingCenter() {
            this.settingTab = !1, this.curNav === u.NavViewID.Browser && this.showOrHideBrowser(!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, S.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.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 => {
                    A.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)), A.information("### syncMessage ", t);
                                do {
                                    if ("/user/me/group_chat" !== t.subject) break;
                                    let e = x(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 = P.PrivateMessage, o = x(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 = P.ReferMessage; else {
                                            if (!t) break;
                                            n = P.AtMessage
                                        }
                                    }
                                    let r = yield h.client.callServerFunction("GetMainWindowStates");
                                    if (this.curNav !== u.NavViewID.Message && this.settingNotifyFlag && "/user/me/group_chat" === x(t, "subject") || !r.visible || r.minimized) {
                                        let r = parseInt(x(t, "id"), 10), a = x(t, "data", "group", "name"),
                                            s = x(t, "data", "group", "avatar"), l = x(t, "data", "group", "id"), d = {
                                                msgType: n,
                                                msgid: r,
                                                userId: e,
                                                userName: a,
                                                userAvatar: s,
                                                messageContent: o,
                                                createTime: x(t, "data", "record", "created_at"),
                                                groupId: l
                                            }, u = yield y.NotificationNS.getCurrentWindowType(), c = {
                                                type: w.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 === w.Notification.TipsType.CommunityGroupTips) {
                                            f.server.fireClientEvent("OnThunderIMDataChange", c), y.NotificationNS.setTimer(this.notifyDuration);
                                            break
                                        }
                                        D.clearQueuesByName("community"), D.enQueue({
                                            callback: () => {
                                                y.NotificationNS.notify(c).catch()
                                            }, name: "community", priority: this.communityMsgProperty
                                        });
                                        let h = !(yield y.NotificationNS.getCurrentWindow());
                                        h && !this.isMsgTipsShowing && (A.information("deQueue", h), D.deQueue(), this.isMsgTipsShowing = !0, this.timerMsgTipsShow = setTimeout(() => {
                                            this.isMsgTipsShowing = !1
                                        }, this.notifyDuration))
                                    }
                                } while (0)
                            } catch (e) {
                                A.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 = C.ConfigNS.getValue("UserCommunitySet", `radio_id_${e}`, !0);
                    A.information("setting-center:handleConfChange", t), "1" === t ? t = !0 : "3" === t && (t = !1), C.ConfigNS.setValue("UserCommunitySet", "radio_id_", t), this.handleConfChange(t, "UserCommunitySet-radio_id_")
                }), m.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                    A.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), D.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 A.information("getUnreadNums"), v.getUnreadMsgNum(e).then(e => {
                    if (!e.error && "ok" === e.data.result) {
                        let t = x(e, "data", "data", "chitchat");
                        this.isMessagePageLoaded || (A.information("获取未读数消息", e, t), this.setNavUnreadNum({
                            nav: u.NavViewID.Message,
                            unReadNum: t || 0
                        }))
                    }
                }).catch(e => {
                    A.information("getUnreadNums error")
                })
            })
        }

        setConfNotifyFlag() {
            this.settingNotifyFlag = C.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, r, a) {
            return o(this, void 0, void 0, function* () {
                this.isThunderImPluginReady ? f.server.fireClientEvent("ThunderImOpenMessage", {
                    groupId: i,
                    classType: r,
                    msgId: n,
                    from: a
                }) : this.messageDataToOpen = {groupId: i, classType: r, msgId: n, from: a}, 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, P;
    n([r.Prop({})], N.prototype, "setConfigValue", void 0), n([r.Prop({})], N.prototype, "formData", void 0), n([r.Prop({})], N.prototype, "confSchema", void 0), n([r.Prop()], N.prototype, "curNav", void 0), n([r.Prop({})], N.prototype, "currentTab", void 0), n([r.Prop({})], N.prototype, "currentTabId", void 0), n([r.Prop({})], N.prototype, "allTabs", void 0), n([r.Prop({})], N.prototype, "startTaskCount", void 0), n([r.Prop({})], N.prototype, "selectNav", void 0), n([r.Prop({})], N.prototype, "selectTab", void 0), n([r.Prop({})], N.prototype, "createNewTab", void 0), n([r.Prop({})], N.prototype, "showOrHideBrowser", void 0), n([r.Prop()], N.prototype, "setNavUnreadNum", void 0), n([r.Prop()], N.prototype, "addNavUnreadNum", void 0), n([r.Prop()], N.prototype, "messageUnreadNum", void 0), n([r.Prop()], N.prototype, "setNavShowUnreadNum", void 0), n([r.Prop()], N.prototype, "setNavShowRedDot", void 0), n([r.Watch("curNav", {immediate: !0})], N.prototype, "onCurNavChange", null), n([r.Watch("currentTabId")], N.prototype, "oncurrentTabIdChange", null), n([r.Watch("startTaskCount")], N.prototype, "onStartTaskCountChange", null), n([r.Watch("settingTab")], N.prototype, "onSettingTabChange", null), n([r.Watch("messageListLength")], N.prototype, "onMessageListChange", null), N = n([r.Component({
        components: {
            MainTopContainer: a.default,
            PanPluginView: () => Promise.resolve().then(() => i(753)),
            DownloadPanel: () => Promise.resolve().then(() => i(755)),
            FindPage: l.default,
            MessagePage: d.default,
            SettingViewContainer: () => Promise.resolve().then(() => i(890))
        }
    })], N), t.default = N, 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"
    }(P || (P = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(177), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(732), 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: {
            updateTabs: "UPDATE_TABS",
            updateCurrent: "UPDATE_CURRENT",
            updateBookMarksIconUrl: "UPDATE_BOOK_MARKS_ICONURL"
        },
        mapDispatchToProps: {
            closeTab: "closeTab",
            closeTabByName: "closeTabByName",
            selectTab: "selectTab",
            onBrowserNewBrowserPopup: "onNewBrowserPopup",
            removeTabCtrl: "removeTabCtrl",
            onCreateNewTab: "onCreateNewTab"
        },
        mapGettersToProps: {allTabs: e => e.allTabs, curNav: e => e.currentNav, navList: e => e.navList}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(179), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(0), a = i(6), s = i(9), l = i(395), d = i(19), u = i(28), c = i(32), h = i(12), f = i(15), p = i(4),
        g = i(38), m = i(52);
    i(984);
    const v = r.default.getLogger("main-top-search");
    let y = class extends a.Vue {
        constructor() {
            super(...arguments), this.text = "", this.disableHover = !1, this.maximized = !1, this.dragable = !0, this.isPopupMenu = !1, this.allowUploadFolder = !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)
                }))
            })
        }

        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() {
            return "find-page" === this.curNav
        }

        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");
                this.isPopupMenu = !0, setTimeout(() => {
                    this.$refs.menuButton.focus()
                }, 100), s.XLStatNS.trackEvent("pc_yunpan", "top_operation_click", "", 0, 0, 0, 0, "clickid=add")
            })
        }

        onBlur() {
            this.isPopupMenu = !1
        }

        uploadLocalFiles() {
            this.isPopupMenu = !1, v.information("uploadLocalFiles"), f.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcUploadLocalFiles", "file"), s.XLStatNS.trackEvent("pc_yunpan", "top_add_btn_child_click", "", 0, 0, 0, 0, "clickid=local_upload")
        }

        uploadLocalDir() {
            this.isPopupMenu = !1, v.information("uploadLocalDir"), f.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcUploadLocalFiles", "dir"), s.XLStatNS.trackEvent("pc_yunpan", "top_add_btn_child_click", "", 0, 0, 0, 0, "clickid=local_upload_dir")
        }

        addLink() {
            this.isPopupMenu = !1, v.information("addLink"), g.ThunderNewTask.createPreNewTaskWindow(null, "yunpan"), s.XLStatNS.trackEvent("pc_yunpan", "top_add_btn_child_click", "", 0, 0, 0, 0, "clickid=link")
        }

        addBt() {
            this.isPopupMenu = !1, v.information("addBt"), p.client.callServerFunction("ImportTorrent", {clickFrom: "yunpan"}), s.XLStatNS.trackEvent("pc_yunpan", "top_add_btn_child_click", "", 0, 0, 0, 0, "clickid=BT_link")
        }

        createFolder() {
            this.isPopupMenu = !1, v.information("createFolder"), this.$nextTick(() => {
                document.getElementById("webview_home-1EAC214F-7644-4163-9EB8-AF4BAA62D144").focus(), f.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcCreateFolder")
            }), s.XLStatNS.trackEvent("pc_yunpan", "top_add_btn_child_click", "", 0, 0, 0, 0, "clickid=new_folder")
        }

        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([a.Prop()], y.prototype, "curNav", void 0), n([a.Prop({})], y.prototype, "navList", void 0), n([a.Prop()], y.prototype, "isLogined", void 0), n([a.Prop()], y.prototype, "settingTab", void 0), n([a.Watch("isLogined")], y.prototype, "onUserLogin", null), y = n([a.Component({components: {FindPageMainTop: () => Promise.resolve().then(() => i(733))}})], y), t.default = y
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(181), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(734);
    let a = class extends o.Vue {
    };
    n([o.Prop()], a.prototype, "isFindPage", void 0), a = n([o.Component({components: {AddressBarContainer: r.default}})], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(183), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(735), 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(185), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(62), a = i(12), s = i(2), l = i(6), d = i(5), u = i(77), c = i(13), h = i(81), f = i(9), p = i(22),
        g = i(142), m = i(0), v = i(7), y = i(72), w = i(26), k = i(37), T = i(90), b = i(10), C = i(18), S = i(8),
        I = i(29), _ = i(4), A = i(49), D = i(52), x = i(15), N = i(69), E = i(3), P = i(76), O = i(14),
        M = v.default(s.join(__rootDir, "../bin/ThunderHelper.node")), F = m.default.getLogger("address-bar"),
        L = g.CommunityNaviteFunctionNS.CommunityNaviteFunction.getNativeModule(), R = i(46);
    let B = class extends l.Vue {
        constructor() {
            super(...arguments), this.clearTextTimer = void 0, this.textData = "", this.relatedKeyList = ["迅雷", "720p", "1080p", "蓝光", "4K"], this.animate = !1, this.defaultPlaceholder = "搜全网、搜本地、访问网址", 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 a.asyncRemoteCall.getCurrentWebContents()).once("context-menu", (n, r) => o(this, void 0, void 0, function* () {
                    if (r.isEditable) {
                        let n = [{
                            label: "撤销",
                            enabled: r.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 a.asyncRemoteCall.getCurrentWebContents()).undo()
                            })
                        }, {type: "separator"}, {
                            label: "剪切",
                            enabled: r.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 a.asyncRemoteCall.getCurrentWebContents()).cut()
                            })
                        }, {
                            label: "复制",
                            enabled: r.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 a.asyncRemoteCall.getCurrentWebContents()).copy()
                            })
                        }, {
                            label: "粘贴",
                            enabled: r.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 a.asyncRemoteCall.getCurrentWebContents()).paste()
                            })
                        }, {
                            label: "删除",
                            enabled: r.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 a.asyncRemoteCall.getCurrentWebContents()).delete()
                            })
                        }, {type: "separator"}, {
                            label: "全选",
                            enabled: r.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 a.asyncRemoteCall.getCurrentWebContents()).selectAll()
                            })
                        }];
                        if (void 0 !== t && "function" == typeof t) {
                            let e = t(r);
                            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 a.asyncRemoteCall.getMenu()).buildFromTemplate(n);
                        yield T.MenuSkinNS.setStyle(s, {});
                        let l = yield a.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 !== D.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 R(this.currentTab, "tab", "url")
        }

        get hideCollectIcon() {
            return R(this.currentTab, "tab", "type") === u.TabType.XDAS || R(this.currentTab, "tab", "name") === this.communityName || !1 === R(this.currentTab, "tab", "showUrl")
        }

        get showGroupEnrty() {
            return !1
        }

        get groupIsOpen() {
            return w.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 C.default.get(e, {responseType: "arraybuffer"})
                } catch (e) {
                    F.warning("error=====" + e)
                }
                return null !== i && void 0 !== i.status && 200 === i.status && null !== i.data && (n = yield S.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 a.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 = R(this.currentTab, "tab", "title"), f.XLStatNS.trackEvent("clienttop", "bookmarks_add")) : (n = this.bookMarks[this.curUrl].name, f.XLStatNS.trackEvent("clienttop", "bookmarks_modify"));
                let r = {state: i, title: n};
                p.MessageBox.custom("BookMarks", r, t).then(e => o(this, void 0, void 0, function* () {
                    if (e.action === k.MessageBoxNS.Action.OK) {
                        if ("ok" === e.args.state) {
                            let t = "";
                            if (-1 === this.curUrl.indexOf("ftp://")) {
                                let e = I.ToolsUtilitiesAWNS.genarateMd5(this.domain), i = this.currentTab.tab.iconUrl;
                                if (F.information("iconMd5 ", e, i), "" !== i) {
                                    t = __profilesDir + "/BookMarksIcon/" + e + ".png";
                                    let i = yield S.FileSystemAWNS.readdirAW(__profilesDir);
                                    do {
                                        let e = !1;
                                        for (let t of i) if ("BookMarksIcon" === t) {
                                            e = !0;
                                            break
                                        }
                                        if (e) break;
                                        (yield S.FileSystemAWNS.mkdirAW(__profilesDir + "/BookMarksIcon")) || F.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 === k.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 a.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 === D.NavViewID.Cloud ? o = "云盘" : this.curNav === D.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 = "";
                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 === D.NavViewID.Cloud && f.XLStatNS.trackEvent("pc_yunpan", "top_operation_click", "", 0, 0, 0, 0, `button=search,url=${encodeURIComponent(t)}`)
            }
            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}`), F.information("顶部地址栏输入为迅雷口令,已中断Tab导航");
                    break
                }
                F.information("顶部地址栏输入不是迅雷口令", n);
                let o = M.getTaskTypeFromUrl(n), r = void 0;
                if (o === E.DownloadKernel.TaskType.P2sp || o === E.DownloadKernel.TaskType.Emule) if (void 0 === (r = N.ParseUrlFileNameNS.getNameFromUrl(n)) || r.endsWith(".html") || -1 === r.indexOf(".")) r = null; else {
                    let e = r.split("."), t = e[e.length - 1];
                    t && (t = t.toLowerCase()), -1 === P.BHOConfigNS.getValue("Monitor", "ExtendNames", P.BHOConfigNS.getDefaultExtendNames()).indexOf(t) && (r = null)
                }
                if (o !== E.DownloadKernel.TaskType.Unkown && null !== r) {
                    F.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);
            x.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) {
            F.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 r = e, a = h.URLHelperNS.isUrl(e);
                if (a.ret && void 0 !== a.suggest && (r = a.suggest), null !== t && void 0 !== t || (t = !1 === a.ret), t) {
                    r = A.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]), r = t === this.emptyRelatedKey || this.isFindPage ? r.replace("$word$", encodeURIComponent(e)) : r.replace("$word$", encodeURIComponent(`${e} ${t}`)), _.client.callServerFunction("AddSearchKeyword", {keyword: e}).catch()
                } else _.client.callServerFunction("AddSearchKeyword", {url: e}).catch();
                if (F.information("open url", r, t), void 0 !== i && null !== i || (i = "top_search_address-enter_btn_click"), this.needNewTab()) {
                    let e = {
                        tabType: u.TabType.Chromium,
                        tabParam: {url: r, extData: JSON.stringify({search_from: i})}
                    };
                    this.createNewTab(e)
                } else {
                    this.currentTab.tab.navigate(r), this.currentTab.tab.setExtData(JSON.stringify({search_from: i}));
                    let e = this.currentTab.tab.getBrowser();
                    this.onOriginalUrlChange({originalUrl: r, 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=" + r + ",prefix_type=" + e)
                } else f.XLStatNS.trackEvent("download_leftpanel", "search_direct_click", "", 0, 0, 0, 0, `type=search_url,search_url=${r}`)
            } 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, x.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)
            } 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();
                        x.server.fireClientEvent("OnAddressBarInputChanged", e, Math.round(t.left), Math.round(t.top + t.height + 3), Math.round(t.width), Math.round(t.height)), x.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();
                    x.server.fireClientEvent("OnAddressBarInputChanged", e, Math.round(t.left), Math.round(t.top + t.height + 3), Math.round(t.width), Math.round(t.height)), x.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 = M.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 = M.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 = M.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 a.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 {
                    C.default.defaults.adapter = i(21);
                    let e = new r.Agent({rejectUnauthorized: !1});
                    t = yield C.default.get("https://static-xl.a.88cdn.com/json/thunderx_search_bar.json", {
                        timeout: 1e4,
                        httpsAgent: e
                    })
                } catch (e) {
                    F.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) {
                        F.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, b.ConfigNS.setValue("SearchBar", "FavoritesTip", !1))
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                x.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()
                    }
                }), b.ConfigNS.attachListener(O.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    this.curRelatedKey = b.ConfigNS.getValue("SearchBar", "RelatedKey", "迅雷"), this.showFavoritesTip = b.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 || x.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()
                }), L.on("handleCollent", e => {
                    this.handleCollect()
                }), L.on("bookmarks.top", e => {
                    this.setBookMarksItemTop(e)
                }), L.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 === k.MessageBoxNS.Action.OK) {
                        if ("ok" === e.args.state) {
                            let o = "";
                            if (-1 === i.indexOf("ftp://")) {
                                let e = I.ToolsUtilitiesAWNS.genarateMd5(n), i = t.iconUrl;
                                if (F.information("iconMd5 ", e, i), "" !== i) {
                                    o = __profilesDir + "/BookMarksIcon/" + e + ".png";
                                    let t = yield S.FileSystemAWNS.readdirAW(__profilesDir);
                                    do {
                                        let e = !1;
                                        for (let i of t) if ("BookMarksIcon" === i) {
                                            e = !0;
                                            break
                                        }
                                        if (e) break;
                                        (yield S.FileSystemAWNS.mkdirAW(__profilesDir + "/BookMarksIcon")) || F.information("创建保存书签icon文件夹失败")
                                    } while (0)
                                }
                                (yield this.downloadIcon(i, o)) || (o = "")
                            }
                            let r = {};
                            r[i] = {
                                name: e.args.title,
                                url: i,
                                iconUrl: o
                            }, this.addBookMarksItem(r), "add" === t.state && this.showFavAnimation()
                        }
                    } else e.action === k.MessageBoxNS.Action.Cancel && void 0 !== this.bookMarks[i] && this.deleteBookMarksItem(i)
                })), setTimeout(() => {
                    this.switchOn = w.default.getConfigInfo("searchBar", "enableAssociativeWord"), null !== this.switchOn && void 0 !== this.switchOn || (this.switchOn = 1), this.searchSuffix = w.default.getConfigInfo("searchBar", "searchSuffix") || this.searchSuffix, b.ConfigNS.setValue("SearchBar", "EnableAssociativeWord", this.switchOn), b.ConfigNS.setValue("SearchBar", "SearchSuffix", this.searchSuffix.toString());
                    let e = A.default.getConfigValue("search", "RelatedKey", null);
                    e && e.length > 0 && (this.relatedKeyList = e);
                    let t = A.default.getConfigValue("search", "emptyRelatedKey", "无");
                    this.emptyRelatedKey = t
                }, 3e3), (yield a.asyncRemoteCall.getCurrentWindow()).hookWindowMessage(528, () => {
                    do {
                        if (!this.$refs.input) break;
                        let e = M.getCursorPos(),
                            t = this.$refs.input.$el.querySelector("input").getBoundingClientRect();
                        x.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(), b.ConfigNS.attachListener(O.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    this.initBookMarks()
                }), x.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])
                })
            })
        }

        handleSearchShortcut() {
            return o(this, void 0, void 0, function* () {
                if (M.IsInFullScreen() || this.curNav === D.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 = [], r = (Object.values(this.bookMarks) || []).reverse();
            for (let e = 0; e < r.length; e++) {
                let t = !0;
                for (let i = 0; i < n.length; i++) if (!r[e].url.includes(n[i]) && !r[e].name.includes(n[i])) {
                    t = !1;
                    break
                }
                if (t && (o.push(r[e]), o.length >= 2)) return o
            }
            return o
        }

        initBrowser() {
            if (!this.isBrowserInited) {
                F.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, b.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(), x.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()], B.prototype, "initBookMarks", void 0), n([l.Prop()], B.prototype, "isFindPage", void 0), n([l.Prop({})], B.prototype, "currentTab", void 0), n([l.Prop({})], B.prototype, "curNav", void 0), n([l.Prop({})], B.prototype, "currentSelectdTaskIds", void 0), n([l.Prop({})], B.prototype, "currentTabIndex", void 0), n([l.Prop({})], B.prototype, "bookMarks", void 0), n([l.Prop({})], B.prototype, "allNetGroups", void 0), n([l.Prop({})], B.prototype, "addBookMarksItem", void 0), n([l.Prop({})], B.prototype, "deleteBookMarksItem", void 0), n([l.Prop({})], B.prototype, "setBookMarksItemTop", void 0), n([l.Prop({})], B.prototype, "getGroupData", void 0), n([l.Watch("currentTab")], B.prototype, "onCurrentTabChange", null), n([l.Prop({})], B.prototype, "createNewTab", void 0), n([l.Prop({})], B.prototype, "closeTabByName", void 0), n([l.Prop({})], B.prototype, "onOriginalUrlChange", void 0), n([l.Watch("isFindPage")], B.prototype, "onFindPageSelect", null), B = n([l.Component], B), t.default = B
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(187), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(739), 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,
            currentTab: e => e.currentTab,
            currentNav: e => e.currentNav
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(189), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(740), s = i(77), l = i(89), d = i(143), u = i(27), c = i(743), h = i(111), f = i(19),
        p = i(12), g = i(17), m = i(36), v = i(63), y = i(744), w = i(5), k = i(2), T = i(0), b = i(7), C = i(38),
        S = i(9), I = i(390), _ = i(22), A = i(37), D = i(90), x = i(29), N = i(18), E = i(8), P = i(15), O = i(47),
        M = i(3), F = i(11), L = i(13), R = i(68), B = i(69), U = i(26), V = i(392), K = i(394),
        W = T.default.getLogger("Thunder.Main.Renderer.view.tabs"),
        j = b.default(k.join(__rootDir, "../bin/ThunderHelper.node")), G = l.TabEventManagerNS.getEventEmitter(),
        H = i(46), z = i(79), X = i(32);
    let q = class extends r.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() {
            return "find-page" === this.currentNav ? (void 0 !== this.timeoutLoadClose && (W.information("clear timeout close find Page", this.currentNav), clearTimeout(this.timeoutLoadClose), this.timeoutLoadClose = void 0), this.isLoaded = !0, "position: fixed;") : (void 0 === this.timeoutLoadClose && (this.timeoutLoadClose = setTimeout(() => {
                W.information("timeout close find Page", this.currentNav), this.isLoaded = !1
            }, 3e5)), "position: initial;")
        }

        get homepageShow() {
            return this.currentTabIsChromium || "recommend" !== this.currentTabName ? "opacity: 0; width: 0; height: 0; overflow: hidden;" : ""
        }

        get currentTabIsChromium() {
            return H(this.currentTab, "tab", "type") === s.TabType.Chromium
        }

        get currentTabName() {
            return H(this.currentTab, "tab", "name")
        }

        get currentTabTitle() {
            return H(this.currentTab, "title")
        }

        isTabLoading(e) {
            let t = !1;
            do {
                let i = this.tabs[e].tab;
                if (w.isNullOrUndefined(i)) break;
                "loading" === i.state && (t = !0)
            } while (0);
            return t
        }

        handleAdd(e) {
            S.XLStatNS.trackEvent("clienttop", "clienttop_newtab_add");
            let t = {tabType: s.TabType.Chromium, tabParam: {showUrl: !1}};
            w.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* () {
                S.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 === A.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 === A.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", H(this.tabs, `${this.current}`)), this.$root.$emit("tab.click", H(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),
                        r = yield p.asyncRemoteCall.getCurrentWindow();
                    yield D.MenuSkinNS.setStyle(o, {}), yield o.popup({window: r})
                }))
            })
        }

        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 = H(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 (G.on(l.TabEventManagerNS.EventType.CreateNewTab, this.onCreateTab), z.DevEnvHelperNS.isLogEnable()) {
                    let e = yield p.asyncRemoteCall.getGlobalShortcut();
                    this.shortcutRegistered = yield e.register("ctrl+shift+f12", () => {
                        let e = H(this.tabs, `${this.current}`, "tab");
                        e && e.showDevTool(!0)
                    })
                }
                f.ipcRenderer.on(X.ThunderChannelList.channelMRUpdateLogEnviroment, () => o(this, void 0, void 0, function* () {
                    if (T.default.enableLogger && !this.shortcutRegistered) {
                        let e = yield p.asyncRemoteCall.getGlobalShortcut();
                        this.shortcutRegistered = yield e.register("ctrl+shift+f12", () => {
                            let e = H(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 = H(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) && P.server.isRemoteClientExist(o)) {
                                P.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 = H(this.currentTab, t, e)
                        }
                        return n
                    }
                };
                P.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 (w.isNullOrUndefined(e) || w.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), G.on(l.TabEventManagerNS.EventType.RemoveTab, this.onTabEvent), G.on(l.TabEventManagerNS.EventType.AddTab, this.onTabEvent), G.on(l.TabEventManagerNS.EventType.ChangeTab, this.onTabEvent), G.on(l.TabEventManagerNS.EventType.VisibleChange, this.onTabVisibleChange), V.CommonSitesMgrNS.getInstance().init().catch()
            })
        }

        onCurrentNavChange() {
            return o(this, void 0, void 0, function* () {
                if ("find-page" === this.currentNav) {
                    let e = H(this.tabs, `${this.current}`, "tab");
                    if (w.isNullOrUndefined(e)) return;
                    if (e.getTabType() === s.TabType.Chromium) return void (yield this.addAllListener())
                }
                this.removeAllListener().catch()
            })
        }

        onCurrentTabChange(e, t) {
            return o(this, void 0, void 0, function* () {
                if ("find-page" === this.currentNav) {
                    let i = H(this.tabs, `${this.current}`, "tab");
                    if (w.isNullOrUndefined(i)) return;
                    if (i.getTabType() === s.TabType.Chromium && 0 !== e && 0 === t) return void (yield this.addAllListener());
                    if (0 !== e && 0 !== t) return
                }
                this.removeAllListener().catch()
            })
        }

        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("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("show", this.resizeCurrentBrowserWindow)
            })
        }

        trackBrowserEvent(e, t, i = "") {
            do {
                if (!t || "" === t) break;
                let n = O.parse(t);
                if (n.host && n.host.indexOf(".xunlei.com") < 0) break;
                i = i + (i.length > 0 ? "," : "") + "url=" + encodeURIComponent(t), S.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), G.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 (w.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(), w.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 (!w.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(), w.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 (!w.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, r, a) {
            return o(this, void 0, void 0, function* () {
                let t = e.target.getURL(), n = {url: i, refUrl: t, ev: e};
                S.XLStatNS.trackEvent("clienttop", "browsertabpage_show", "", 0, 0, 0, 0, "source=url_click");
                let o = this.getBrowserTab(e.target);
                w.isNullOrUndefined(o) || this.fireBrowserEvent("OnNewBrowserPopup", o.name), 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);
            w.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, r = {isMainFrame: t, url: i, transitionType: n, browser: o}, a = this.getBrowserTab(o);
            w.isNullOrUndefined(a) || this.fireBrowserEvent("OnLoadStart", a.name), this.onBrowserLoadStart(r), t && this.trackBrowserEvent("browser_load_navigation_start", i)
        }

        onLoadEnd(e, t, i, n, o) {
            W.information("onLoadEnd", t, i, n, o);
            let r = e.target, a = {isMainFrame: t, url: i, frameName: n, httpStatusCode: o, browser: r},
                s = this.getBrowserTab(r);
            w.isNullOrUndefined(s) || this.fireBrowserEvent("OnLoadEnd", s.name), this.onBrowserLoadEnd(a), 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, r = {isLoading: t, canGoBack: i, canGoForward: n, browser: o}, a = this.getBrowserTab(o);
            w.isNullOrUndefined(a) || this.fireBrowserEvent("OnLoadingStateChange", a.name), this.onBrowserLoadStatusChange(r)
        }

        onLoadError(e, t, i, n, o, r) {
            W.information("OnLoadError", t, n, o, r, i);
            let a = e.target, s = {isMainFrame: t, url: i, errorCode: n, errorText: o, failedUrl: r, browser: a},
                l = this.getBrowserTab(a);
            w.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++) w.isNullOrUndefined(this.tabs[i]) || w.isNullOrUndefined(this.tabs[i].tab) || (t = this.tabs[i].tab.getBrowser(), w.isNullOrUndefined(t) || e.target === t && G.emit(l.TabEventManagerNS.EventType.GotFocus, this.tabs[i].tab));
                let i = (yield(yield p.asyncRemoteCall.getCurrentWindow()).getNativeWindowHandle()).readUInt32LE(0);
                I.ThunderWindowNS.bringWindowToTop(i)
            })
        }

        onBeforeDownload(e, t, i, n, r) {
            return o(this, void 0, void 0, function* () {
                W.information("onBeforeDownload", t, i, "suggestName:", n, "mimeType", r);
                const a = ["http://lx.patch1.9you.com/xlwan/%E8%BF%85%E9%9B%B7_%E7%A5%9E%E5%BA%A7.exe"];
                let s = U.default.getConfigInfo("webgame", "directDownloadUrls");
                if (w.isArray(s) || (s = a), W.information("onBeforeDownload urlList", s), s.includes(t)) {
                    const e = F.DownloadKernelTaskManager.getTaskManager();
                    let i = yield R.TaskUtilitiesAWNS.batchFindTaskAW([{
                        taskType: M.DownloadKernel.TaskType.P2sp,
                        value: t
                    }]);
                    if (i.length > 0) {
                        let e = i[0];
                        _.MessageBox.confirm({
                            title: "提示",
                            content: "重复下载，该任务已存在列表中",
                            type: _.MessageBox.ConfirmType.Info,
                            fileName: e.getTaskName(),
                            okText: "查看",
                            cancelText: "取消",
                            cancelVisible: !0
                        }).then(t => o(this, void 0, void 0, function* () {
                            if (t.action === A.MessageBoxNS.Action.OK) {
                                let t = e.getId();
                                C.ThunderNewTask.selectTask(t)
                            } else t.action, A.MessageBoxNS.Action.Cancel
                        })).catch()
                    } else {
                        let i = L.ThunderUtil.getDefaultDownloadDir(), n = B.ParseUrlFileNameNS.getNameFromUrl(t),
                            r = {taskName: n = n.replace(/[*?/\\:|<>\"]/g, "_"), savePath: i},
                            a = {url: t, refUrl: "", cookie: "", nameFixed: 1},
                            s = yield e.createTask(M.DownloadKernel.TaskType.P2sp, {taskBaseInfo: r, p2spTaskInfo: a});
                        if (null !== s) {
                            let t = s.getTaskAttribute(M.DownloadKernel.TaskAttribute.TaskId);
                            e.startTask(t), _.MessageBox.confirm({
                                title: "提示",
                                content: "任务已创建，请前往下载列表查看",
                                type: _.MessageBox.ConfirmType.Success,
                                fileName: s.getTaskName(),
                                okText: "立即查看",
                                cancelVisible: !1
                            }).then(e => o(this, void 0, void 0, function* () {
                                if (e.action === A.MessageBoxNS.Action.OK) {
                                    let e = s.getId();
                                    C.ThunderNewTask.selectTask(e)
                                }
                            })).catch()
                        }
                    }
                } else {
                    let i = this.getBrowserTab(e.target), o = i && i.getSearchFrom(),
                        r = {referer: e.target.getURL(), fileName: n, browser: "xlbrowser.exe", searchFrom: o};
                    C.ThunderNewTask.createTaskByUrl(t, r)
                }
            })
        }

        onCustomProtocalExecution(e, t) {
            let i = this.getBrowserTab(e.target), n = i && i.getSearchFrom(),
                o = {referer: e.target.getURL(), browser: "xlbrowser.exe", searchFrom: n};
            C.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 (!w.isNullOrUndefined(this.allTabs[i]) && !w.isNullOrUndefined(this.allTabs[i].tab) && (t = this.allTabs[i].tab.getBrowser(), !w.isNullOrUndefined(t) && e.target === t)) {
                let e = {tabInfo: this.allTabs[i], index: i};
                this.fireBrowserEvent("OnCloseBrowser", H(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 (!w.isNullOrUndefined(this.tabs[o]) && !w.isNullOrUndefined(this.tabs[o].tab) && (n = this.tabs[o].tab.getBrowser(), !w.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 = H(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 = x.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 N.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), w.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                if (w.isNullOrUndefined(n) || w.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), w.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                if (w.isNullOrUndefined(n) || w.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 = O.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), w.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                if (e === H(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), w.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                let o = null;
                if (n[0]) try {
                    o = JSON.parse(n[0])
                } catch (e) {
                }
                let r = n[1];
                o && "object" == typeof o && (o = Object.assign({}, o, {
                    nativeCallId: t,
                    okCallbackId: r
                })), e.setBeforeCloseExtra(o), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success)
            } while (0)
        }

        closeTabName(e, t, i, n) {
            W.information("closeTabName args", 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, 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 (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, u.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0], r = {};
                r.tab = e, r.nativeCallId = t, r.tabName = n[1], r.callBackId = n[2];
                let a = this.nextListenerCookie, s = this.listenerMap.get(o);
                s || (s = new Map, this.listenerMap.set(o, s)), s.set(a, r), ++this.nextListenerCookie, W.information("attachTabEvent listenerMap", this.listenerMap, a), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success, a)
            } while (0)
        }

        detachTabEvent(e, t, i, n) {
            W.information("detachEvent enter");
            do {
                if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                if (w.isNullOrUndefined(n) || w.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 (w.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                const o = n[0];
                if (w.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), w.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                e === H(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), w.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (w.isNullOrUndefined(t) || w.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 (0 === this.tabs.length) break;
                let e = H(this.tabs, `${this.current}`, "tab");
                if (w.isNullOrUndefined(e)) break;
                if (e.getTabType() === s.TabType.Chromium) {
                    let t = e.getBrowser();
                    if (w.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)
        }

        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([r.Prop({})], q.prototype, "bookMarks", void 0), n([r.Prop({})], q.prototype, "currentCategoryId", void 0), n([r.Prop({})], q.prototype, "currentTab", void 0), n([r.Prop({})], q.prototype, "tabs", void 0), n([r.Prop({})], q.prototype, "allTabs", void 0), n([r.Prop({})], q.prototype, "unread", void 0), n([r.Prop({})], q.prototype, "updateBookMarksIconUrl", void 0), n([r.Prop({})], q.prototype, "createNewTab", void 0), n([r.Prop({})], q.prototype, "onBrowserBindWindowHandle", void 0), n([r.Prop({})], q.prototype, "onBrowserTitleChange", void 0), n([r.Prop({})], q.prototype, "onBrowserFavIconChange", void 0), n([r.Prop({})], q.prototype, "onBrowserLoadStatusChange", void 0), n([r.Prop({})], q.prototype, "onBrowserAddressChange", void 0), n([r.Prop({})], q.prototype, "onBrowserNewBrowserPopup", void 0), n([r.Prop({})], q.prototype, "onBrowserNewBrowserPopupCompleted", void 0), n([r.Prop({})], q.prototype, "onBrowserLoadStart", void 0), n([r.Prop({})], q.prototype, "onBrowserLoadEnd", void 0), n([r.Prop({})], q.prototype, "onBrowserLoadError", void 0), n([r.Prop({})], q.prototype, "selectTab", void 0), n([r.Prop({})], q.prototype, "closeTab", void 0), n([r.Prop({})], q.prototype, "closeTabByName", void 0), n([r.Prop({})], q.prototype, "removeTabCtrl", void 0), n([r.Prop({})], q.prototype, "onCreateNewTab", void 0), n([r.Prop({})], q.prototype, "onAppQuit", void 0), n([r.Prop({})], q.prototype, "onJsCallNativeFunction", void 0), n([r.Prop({})], q.prototype, "onJsCheckNativeFunction", void 0), n([r.Prop({default: "transparent"})], q.prototype, "background", void 0), n([r.Prop({default: 0})], q.prototype, "current", void 0), n([r.Prop({})], q.prototype, "updateCurrent", void 0), n([r.Prop({})], q.prototype, "updateTabs", void 0), n([r.Prop({})], q.prototype, "currentNav", void 0), n([r.Watch("tabs", {deep: !0})], q.prototype, "onTabsUpdated", null), n([r.Watch("current")], q.prototype, "onCurrentUpdated", null), n([r.Watch("currentNav")], q.prototype, "onCurrentNavChange", null), n([r.Watch("current")], q.prototype, "onCurrentTabChange", null), q = n([r.Component({
        filters: {unread: y.unread},
        components: {HomePage: a.default, BrowserViewContainer: () => Promise.resolve().then(() => i(745))}
    })], q), t.default = q
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(191), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(741), 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(193), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(12), a = i(2), s = i(6), l = i(77), d = i(539), u = i(0), c = i(79), h = i(4),
        f = u.default.getLogger("home-page"), p = i(28), g = i(399);
    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(a.join(__rootDir, "plugins/ThunderXWebXDAS"));
                p.NativeCallHostModule.nativeCallHost.initialize();
                let t = yield e.getCurFilePath();
                f.information("url", t), this.onMounted(`file:///${a.join(t, "index.html")}`), e.active();
                const n = document.querySelector(`#${this.elementId}`);
                n.addEventListener("new-window", e => {
                    let t = e.url;
                    const n = i(47).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 r.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(195), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(746), 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(197), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(5), a = i(46);
    let s = class extends o.Vue {
        get canGoBack() {
            let e = !1;
            do {
                if (r.isNullOrUndefined(this.currentTab) || r.isNullOrUndefined(this.currentTab.tab)) break;
                e = this.currentTab.tab.canGoBack
            } while (0);
            return e
        }

        goBack() {
            do {
                if (r.isNullOrUndefined(this.currentTab) || r.isNullOrUndefined(this.currentTab.tab)) break;
                this.currentTab.tab.goBack()
            } while (0)
        }

        refresh() {
            do {
                if (r.isNullOrUndefined(this.currentTab) || r.isNullOrUndefined(this.currentTab.tab)) break;
                this.currentTab.tab.refresh(!1)
            } while (0)
        }

        isDownloadTab() {
            return "" === a(this.currentTab, "tab", "url") && "下载" === a(this.currentTab, "title")
        }

        get isError() {
            return !this.isDownloadTab() && !0 === a(this.currentTab, "tab", "isErrorPage")
        }

        get isLoading() {
            return !this.isDownloadTab() && !0 === a(this.currentTab, "tab", "isLoadingPage")
        }
    };
    n([o.Prop({})], s.prototype, "currentTab", void 0), s = n([o.Component({components: {Loading: () => Promise.resolve().then(() => i(574))}})], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(199), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(751), 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(201), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(12), a = i(6), s = i(79), l = i(28), d = i(399), u = i(5);
    let c = class extends a.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 r.asyncRemoteCall.getWebContents();
                        (t = yield n.fromId(i)).on("context-menu", (e, t) => {
                            d.ContextMenuNS.popContextMenu(e, t)
                        })
                    }
                }))
            })
        }
    };
    n([a.Prop()], c.prototype, "elementId", void 0), n([a.Prop()], c.prototype, "messagePageUrl", void 0), n([a.Prop({})], c.prototype, "preloadPath", void 0), c = n([a.Component], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(203), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(5), a = i(46);
    let s = class extends o.Vue {
        get canGoBack() {
            let e = !1;
            do {
                if (r.isNullOrUndefined(this.currentTab) || r.isNullOrUndefined(this.currentTab.tab)) break;
                e = this.currentTab.tab.canGoBack
            } while (0);
            return e
        }

        goBack() {
            do {
                if (r.isNullOrUndefined(this.currentTab) || r.isNullOrUndefined(this.currentTab.tab)) break;
                this.currentTab.tab.goBack()
            } while (0)
        }

        refresh() {
            do {
                if (r.isNullOrUndefined(this.currentTab) || r.isNullOrUndefined(this.currentTab.tab)) break;
                this.currentTab.tab.refresh(!1)
            } while (0)
        }

        isDownloadTab() {
            return "" === a(this.currentTab, "tab", "url") && "下载" === a(this.currentTab, "title")
        }

        get isError() {
            return !this.isDownloadTab() && !0 === a(this.currentTab, "tab", "isErrorPage")
        }

        get isLoading() {
            return !this.isDownloadTab() && !0 === a(this.currentTab, "tab", "isLoadingPage")
        }
    };
    n([o.Prop({})], s.prototype, "currentTab", void 0), s = n([o.Component({components: {Loading: () => Promise.resolve().then(() => i(574))}})], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(205), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(756), 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(207), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(19), a = i(0), s = i(12), l = i(6), d = i(757), u = i(764), c = i(768), h = i(771), f = i(774),
        p = i(775), g = i(776), m = i(871), v = i(885), y = i(886), w = i(3), k = i(25), T = i(87), b = i(14),
        C = i(113), S = i(58), I = i(17), _ = i(35), A = i(30), D = i(52), x = i(4), N = i(45), E = i(34), P = i(16),
        O = i(540), M = i(11), F = i(888), L = i(89), R = i(91), B = i(112), U = i(23), V = i(15), K = i(9), W = i(406),
        j = i(26), G = i(124), H = i(10), z = a.default.getLogger("DownloadPanel"),
        X = B.PluginWebviewMgrNS.getWebViewMgr(), q = M.DownloadKernelTaskManager.getTaskManager(),
        Y = P.DownloadKernelEventManager.getEventManager(), J = k.DownloadKernelCategoryManager.getCategoryManager(),
        Z = O.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 = A.default.getTaskBases(-1, w.DownloadKernel.CategroyViewID.Downloading),
                    t = Object.values(e).filter(e => -1 === e.categoryId);
                if (t.length > 0) {
                    t.sort(G.SortNS.getSortFuncByConfig(w.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 = A.default.getTaskBases(-1, w.DownloadKernel.CategroyViewID.Completed),
                    t = Object.values(e).filter(e => -1 === e.categoryId);
                if (t.length > 0) {
                    t.sort(G.SortNS.getSortFuncByConfig(w.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, w.DownloadKernel.CategroyViewID.Downloading), n = i.getTaskCount();
                    n += (i = J.getCategoryView(e, w.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() && N.DownloadDispatchNS.updateTasksOrder(e), this.onCacheDownloadingSkeleton()
        }

        onShowLeftBottomAdChange(e) {
            e && W.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 === w.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 === w.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 S.default(!1, !0, "privatespace");
                if (e && "" !== e) {
                    let t = J.getPrivateCategoryFromUserId(e);
                    if (t && this.currentCategoryId !== t.getId()) {
                        0 === (yield T.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 x.client.callServerFunction("GetCurrentNav")) !== D.NavViewID.Download && (yield x.client.callServerFunction("SelectNav", D.NavViewID.Download)), this.currentCategoryId !== e) if (-1 !== e && J.isPrivateCategory(e)) {
                    let t = yield x.client.callServerFunction("GetUserID");
                    if (0 !== (yield T.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), T.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* () {
                T.PrivateSpaceHelperNS.init(), this.onLogoutEventId = I.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", e => {
                    -1 !== this.currentCategoryId && this.UPDATE_CATEGORY(-1);
                    let t = J.getPrivateCategoryFromUserId(e);
                    t && _.TaskOperatorNs.pauseCategoryAllTask(t.getId(), w.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()
                }), r.ipcRenderer.on("main-window-state-active-show", () => {
                    this.tryRestorePrivate()
                }), C.downloadContextMenu.attachListener(b.NodeEventMesssageNS.eventDownloadContextMenuClick, this.handleMenuClick), A.default.attachListener(b.NodeEventMesssageNS.eventDownloadSwitchCategory, this.handleSwitchCategory), A.default.attachListener(b.NodeEventMesssageNS.eventShowSearchTaskPage, this.handleOpenSearchPage), E.DownloadKernelManager.attachListener(b.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 = I.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", t => {
                        Z.init() && Z.upgradePrivateSpace(t), e.loginHelper.getAllUserInfo(e => {
                            this.setUserVipAdConfig(e).catch()
                        }), this.curUserId = t
                    }), this.onUserInfoChangeCookie = I.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)
                    })
                })), x.client.attachServerEvent("fengxing_ad_show", (e, t) => {
                    this.isFengxingAdShow = t, this.currentCategoryViewId === w.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 = j.default.getConfigInfo("cooperateAd", "allShow");
                0 !== i && 1 !== n && ((yield W.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(b.NodeEventMesssageNS.eventConfigInitFinished, () => {
                this.taskDbLoadFinished = !0
            })
        }

        mounted() {
            this.taskDbLoadFinished = q.isLoadStorageTaskFinish(), this.taskDbLoadFinished || (this.taskDbLoadCookie = 1, E.DownloadKernelManager.attachListener(b.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(w.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== w.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    if (e[2] !== w.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(b.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(w.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.removeCategoryCookie), this.removeCategoryCookie = -1), T.PrivateSpaceHelperNS.uninit(), void 0 !== this.onLogoutEventId && (I.NativeCallModule.nativeCall.DetachNativeEvent("onLogout", this.onLogoutEventId), this.onLogoutEventId = void 0), void 0 !== this.onLoginEventId && (I.NativeCallModule.nativeCall.DetachNativeEvent("onLoginSuc", this.onLoginEventId), this.onLoginEventId = void 0), void 0 !== this.onUserInfoChangeCookie && (I.NativeCallModule.nativeCall.DetachNativeEvent("onUserInfoChange", this.onUserInfoChangeCookie), this.onUserInfoChangeCookie = void 0), C.downloadContextMenu.detachListener(b.NodeEventMesssageNS.eventDownloadContextMenuClick, this.handleMenuClick), A.default.detachListener(b.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(209), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    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: {
            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(211), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(0), s = i(4), l = i(9), d = i(22), u = i(3), c = i(759), h = i(761), f = i(536), p = i(115),
        g = i(10), m = i(65), v = i(524), y = i(16), w = i(5), k = i(26),
        T = y.DownloadKernelEventManager.getEventManager(), b = a.default.getLogger("tool-bar");
    let C = class extends r.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 && (T.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 = k.default.getConfigInfo("shouleiDownload", "enableSyncNewIcon"),
                        i = k.default.getConfigInfo("shouleiDownload", "syncNewIconLimitTimes") || 1,
                        n = g.ConfigNS.getValue("ShouleiDownload", "SyncButtonNewTimes", 0);
                    if (w.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 (b.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([r.Prop({})], C.prototype, "currentCategoryId", void 0), n([r.Prop({})], C.prototype, "currentCategoryViewId", void 0), n([r.Prop({})], C.prototype, "downloadingButtons", void 0), n([r.Prop({})], C.prototype, "completedButtons", void 0), n([r.Prop({})], C.prototype, "recycleButtons", void 0), n([r.Prop({})], C.prototype, "privateDownloadingButtons", void 0), n([r.Prop({})], C.prototype, "privateCompletedButtons", void 0), n([r.Prop({})], C.prototype, "attachToolbarEvent", void 0), C = n([r.Component({
        components: {
            ToolBarButtonContainer: c.default,
            ToolBarVipButtonContainer: h.default
        }
    })], C), t.default = C
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(213), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(760), 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(215), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let r = 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({})], r.prototype, "redDot", void 0), n([o.Prop({})], r.prototype, "imgSrc", void 0), n([o.Prop({})], r.prototype, "title", void 0), n([o.Prop({})], r.prototype, "id", void 0), n([o.Prop({})], r.prototype, "newIcon", void 0), n([o.Prop({})], r.prototype, "loading", void 0), n([o.Prop({})], r.prototype, "tooltip", void 0), n([o.Prop({})], r.prototype, "tooltipTitle", void 0), n([o.Prop({})], r.prototype, "tooltipSubTitle", void 0), n([o.Prop({})], r.prototype, "currentCategoryId", void 0), n([o.Prop({})], r.prototype, "currentCategoryViewId", void 0), n([o.Prop({})], r.prototype, "showPrivateSpaceOpenPage", void 0), n([o.Prop({})], r.prototype, "currentSelectdTaskInfos", void 0), n([o.Prop({})], r.prototype, "buttonClassFilter", void 0), n([o.Prop({})], r.prototype, "click", void 0), n([o.Prop({})], r.prototype, "tooltipClose", void 0), n([o.Prop({})], r.prototype, "tooltipClick", void 0), n([o.Prop({})], r.prototype, "enter", void 0), n([o.Prop({})], r.prototype, "CREATE_NEW_TAB", void 0), n([o.Prop({})], r.prototype, "SORT_CATEGORY_BY_FUNCTION", void 0), n([o.Watch("currentSelectdTaskInfos", {immediate: !0})], r.prototype, "onSelectChange", null), r = n([o.Component], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(217), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(762), 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(219), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(4), s = i(0).default.getLogger("DownloadPanel.ToolBarVipButton"), l = i(763);
    let d = class extends r.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 && a.client.callServerFunction("SetValue", "ToolBarButtonVipIcon", this.cfgType, this.clickUrl).catch(), a.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([r.Prop({})], d.prototype, "title", void 0), n([r.Prop({})], d.prototype, "id", void 0), n([r.Prop({})], d.prototype, "currentCategoryId", void 0), n([r.Prop({})], d.prototype, "currentCategoryViewId", void 0), n([r.Prop({})], d.prototype, "showPrivateSpaceOpenPage", void 0), n([r.Prop({})], d.prototype, "currentSelectdTaskInfos", void 0), n([r.Prop({})], d.prototype, "buttonClassFilter", void 0), n([r.Prop({})], d.prototype, "CREATE_NEW_TAB", void 0), n([r.Prop({})], d.prototype, "SORT_CATEGORY_BY_FUNCTION", void 0), n([r.Watch("currentSelectdTaskInfos", {immediate: !0})], d.prototype, "onSelectChange", null), d = n([r.Component], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(221), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    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: {
            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(223), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(13), s = i(14), l = i(107), d = i(34), u = i(404), c = i(766), h = i(17), f = i(4), p = i(23),
        g = i(10), m = i(9), v = i(28), y = i(47), w = i(2), k = i(7), T = i(3), b = i(16), C = i(26), S = i(523),
        I = i(22), _ = i(58), A = i(91), D = i(115), x = i(25), N = i(87), E = i(106), P = i(386), O = i(0), M = i(8),
        F = i(148), L = O.default.getLogger("StatusBar"), R = b.DownloadKernelEventManager.getEventManager(),
        B = k.default(w.join(__rootDir, "../bin/ThunderHelper.node")), U = i(767).urls,
        V = x.DownloadKernelCategoryManager.getCategoryManager();
    let K = class extends r.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(108))).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", r = yield this.findProcessAw(o);
                    t.browserAddonInstall && !t.browserAddonOpen && ("QQBrowser" === e ? i = t.openCmdLine : "msedge.exe" === o ? i = t.installCmdLine : r ? "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 a = ",browser=" + this.tipsInfo.title + ",click_id=quick_start";
                    m.XLStatNS.trackEvent("download_leftpanel", "browser_plugin_guid_bubble_click", "", 0, 0, 0, 0, a), 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 N.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 = a.ThunderUtil.formatSize(this.totalDownloadSpeed, 1) + "/s"
        }

        get curSpeed() {
            let e = "";
            return e = this.totalDownloadSpeed >= 1024e3 ? a.ThunderUtil.formatSize(this.totalDownloadSpeed, 1) + "/s" : a.ThunderUtil.formatSize(this.totalDownloadSpeed, 0) + "/s"
        }

        get curUpSpeed() {
            let e = "";
            return e = a.ThunderUtil.formatSize(this.totalUploadSpeed, 1) + "/s"
        }

        get curVipSpeed() {
            let e = "";
            return e = this.downloadVipSpeed >= 1024e3 ? a.ThunderUtil.formatSize(this.downloadVipSpeed, 1) + "/s" : a.ThunderUtil.formatSize(this.downloadVipSpeed, 0) + "/s"
        }

        get downSize() {
            let e = "";
            return e = a.ThunderUtil.formatSize(this.todayDownSize)
        }

        get upSize() {
            let e = "";
            return e = a.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 && I.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(), S.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 !== C.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
                }), A.PluginFunctionUINS.on("add_pc_node_button", (e, t) => {
                    this.canShowPcNode = !0, this.updatePcNodeButtonInfo(e, t), this.pcNodePopOptions && this.pcNodePopOptions.onShow && this.pcNodePopOptions.onShow()
                }), A.PluginFunctionUINS.on("update_pc_node_button", (e, t) => {
                    this.updatePcNodeButtonInfo(e, t)
                }), A.PluginFunctionUINS.on("add_kuainiao_button", (e, t) => {
                    this.canShowKuainiaoInterface = !0, this.updateKuainiaoButtonInfo(e, t), e.onShow && e.onShow()
                }), A.PluginFunctionUINS.on("update_kuainiao_button", (e, t) => {
                    this.updateKuainiaoButtonInfo(e, t)
                }), A.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(T.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    do {
                        if (!e) break;
                        if (e[0] !== T.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(T.DownloadKernel.TaskAttribute.GroupTaskId);
                            if (n.getTaskAttribute(T.DownloadKernel.TaskAttribute.Background) || o > 0) continue;
                            let r = n.getTaskStatus();
                            i = n.getTaskAttribute(T.DownloadKernel.TaskAttribute.SavePath).slice(0, 2);
                            let a = n.getTaskAttribute(T.DownloadKernel.TaskAttribute.TaskId),
                                s = this.taskIds.indexOf(a), l = this.taskPath.indexOf(i);
                            r === T.DownloadKernel.TaskStatus.StartWaiting || r === T.DownloadKernel.TaskStatus.StartPending || r === T.DownloadKernel.TaskStatus.Started ? -1 === s && (this.taskIds.push(a), 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 = D.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* () {
                    P.BrowserHelperNs.resetAddons().catch();
                    let e = yield P.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 P.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 P.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), I.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([r.Prop({})], K.prototype, "currentCategoryId", void 0), n([r.Prop()], K.prototype, "currentGuide", void 0), n([r.Prop()], K.prototype, "setCurrentGuide", void 0), n([r.Prop({})], K.prototype, "UPDATE_CATEGORY", void 0), n([r.Prop({})], K.prototype, "current", void 0), n([r.Prop({})], K.prototype, "tabs", void 0), n([r.Watch("canShowDiskBusy")], K.prototype, "onIsDiskInfoChange", null), n([r.Watch("isLimit")], K.prototype, "onIsLimtChanged", null), K = n([r.Component], K), t.default = K
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(225), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    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: {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(227), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0}), i(1003);
    const o = i(6), r = i(540).DownloadKernelUpgradeNS.getUpgrade();
    let a = class extends o.Vue {
        constructor() {
            super(...arguments), this.progress = 0
        }

        onUpgradeProgress(e, t) {
            this.progress = e > 0 ? Math.floor(100 * t / e) : 0
        }

        created() {
            r.attachListener(r.eventUpgradeProgress, this.onUpgradeProgress)
        }

        destroyed() {
            r.detachListener(r.eventUpgradeProgress, this.onUpgradeProgress)
        }
    };
    a = n([o.Component], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(229), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0}), i(1005);
    const o = i(6), r = i(56), a = i(51), s = r.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() === a.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 a.ToastNotifyItemType.GreenNotify:
                    this.type = "send";
                    break;
                case a.ToastNotifyItemType.RedNotify:
                case a.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(772))}})], l), t.default = l
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(231), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(13);
    let {isDef: s} = a.ThunderUtil;
    const l = i(4), d = i(9), u = i(10);
    let c = class extends r.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([r.Prop({})], c.prototype, "data", void 0), n([r.Prop({})], c.prototype, "isUp", void 0), c = n([r.Component], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(233), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(541), s = i(73), l = i(4);
    let d = class extends r.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.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(83));
                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)
                        }
                        a.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(13));
                                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(83));
                    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 || ""), 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(83));
                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), a.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 e = n;
                        this.isLarge = !!e.subtitle, this.showProgress = !!e.showProgress, this.progress = e.progress, this.secondary = e.subtitle || "", this.content = e.maintitle, this.btnText = e.buttonText, this.iconUrl = e.icon, this.btnVisible = void 0 === e.btnVisible || e.btnVisible, this.checkStyleExValid(n.styleEx) ? this.styleEx = n.styleEx : this.styleEx = {}, this.orderData = e, 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(83));
                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(83));
                    e.getInstance().removeListener("adplatfor_update_order", this.updateOrderScope), this.updateOrderScope = null
                }
            })
        }
    };
    d = n([r.Component], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(235), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(406), a = i(73), s = i(149);
    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;
                a.AdHelperNS.execute(e, t, i)
            } else "close" === e ? this.$emit("ad-left-bottom-show", !1) : "nodisturb" === e && (r.adLeftBottomHelper.setNoDisturb(), this.$emit("ad-left-bottom-show", !1));
            r.adLeftBottomHelper.handleEvent(e)
        }

        created() {
            this.cookie = r.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 && (r.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(237), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(777), 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(239), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(77), s = i(30), l = i(11), d = i(16), u = i(14), c = i(3), h = i(4), f = i(383), p = i(23),
        g = i(9), m = i(61), v = i(0), y = i(74), w = i(49), k = i(778), T = v.default.getLogger("task-detail"),
        b = l.DownloadKernelTaskManager.getTaskManager(), C = d.DownloadKernelEventManager.getEventManager();
    let S = class extends r.Vue {
        constructor() {
            super(...arguments), this.elementId = "home-1EAC214F-7644-4163-9EB8-AF4BAA62D144", this.transition = !1, this.curTaskId = 0, this.curTask = null, this.select = !1, this.curPannel = "", this.curIndex = I.Comments, this.unFireIndex = I.Comments, this.playingMediaIndex = -1, this.playingCurTask = !1, this.playingTaskId = 0, this.playState = y.XmpMediaState.Invalid, this.intervalGetPlayMedia = void 0, 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 ? (T.information("this.curTaskId", this.curTaskId), this.curTask.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName)) : ""
        }

        get curTaskStatus() {
            return 0 !== this.curTaskId ? 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() === a.TabType.Chromium && this.tabs[i].tab.getOriginalUrl() === e) {
                t = i;
                break
            }
            return t
        }

        updateTaskInfo(...e) {
            T.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 (T.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 = b.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, r) => {
                    this.timeoutOnTaskItemActive && clearTimeout(this.timeoutOnTaskItemActive), t ? (this.curTaskId = i, this.curTask = b.getTaskFromTaskId(this.curTaskId), this.select = !0, this.curIndex = r, T.information("DownloadItemActive", i, e, r)) : (o || i === this.curTaskId) && (this.timeoutOnTaskItemActive = setTimeout(() => {
                        this.curTaskId = 0, this.curTask = null, this.curPannel = "", this.select = !1
                    }, 100))
                }), s.default.attachListener(u.NodeEventMesssageNS.eventDetailSwitch2Index, (e, t) => {
                    T.information("DetailSwitch2Index", e, t), this.curTaskId = e, this.curIndex = t
                }), C.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.intervalGetPlayMedia = setInterval(this.getPlayMedia, 2e3), 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), w.default.isInited() ? this.handleRemoteConfig() : w.default.attachListener("OnRemoteGlobalConfigLoaded", () => o(this, void 0, void 0, function* () {
                    this.handleRemoteConfig()
                }))
            })
        }

        beforeDestroy() {
            window.removeEventListener("resize", this.updateViewPos), window.removeEventListener("maximize", this.updateViewPos), clearInterval(this.intervalGetPlayMedia);
            let e = document.querySelector("div#xly-task-detail-down__main.xly-down__main");
            e && e.removeEventListener("scroll", this.onScroll)
        }

        handleRemoteConfig() {
            this.showComment = w.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, T.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 I;
    n([r.Prop({})], S.prototype, "tabs", void 0), n([r.Prop({})], S.prototype, "preloadPath", void 0), n([r.Prop()], S.prototype, "currentCategoryId", void 0), n([r.Prop({})], S.prototype, "currentSelectdTaskIds", void 0), n([r.Prop({})], S.prototype, "currentCategoryViewId", void 0), n([r.Prop({})], S.prototype, "createNewTab", void 0), n([r.Prop({})], S.prototype, "selectTab", void 0), n([r.Prop({})], S.prototype, "selectNav", void 0), n([r.Prop({})], S.prototype, "getUser", void 0), n([r.Prop({})], S.prototype, "setCurUser", void 0), n([r.Watch("isLogined")], S.prototype, "updateUserInfo", null), n([r.Watch("curTaskId", {immediate: !0})], S.prototype, "onCurTaskChange", null), S = n([r.Component({
        components: {
            XlTab: () => Promise.resolve().then(() => i(825)),
            XlHeader: () => Promise.resolve().then(() => i(839)),
            XlDetail: () => Promise.resolve().then(() => i(840)),
            FileList: () => Promise.resolve().then(() => i(841)),
            MultiChosenTasks: () => Promise.resolve().then(() => i(844)),
            Comment: () => Promise.resolve().then(() => i(847)),
            Recommend: () => Promise.resolve().then(() => i(868)),
            ScanCode: k.default
        }
    })], S), t.default = S, function (e) {
        e.Comments = "comments", e.FileList = "files", e.Attribute = "detail"
    }(I || (I = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(241), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(779), o = i(24), r = i(3), a = i(25).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 === r.DownloadKernel.CategroyViewID.Downloading) {
                        i = e.DownloadListState.taskList[t].tasksMap[n];
                        break
                    }
                } else if (a.isPrivateCategory(o)) for (let t = 0; t < e.DownloadListState.taskListPrivate.length; t++) e.DownloadListState.taskListPrivate[t].id === r.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(243), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(4), s = i(0), l = i(3), d = i(11), u = i(16), c = i(542), h = i(35), f = i(13), p = i(15),
        g = i(9), m = i(22), v = i(783), y = i(408), w = i(785), k = i(786), T = i(787),
        b = u.DownloadKernelEventManager.getEventManager(), C = d.DownloadKernelTaskManager.getTaskManager(),
        S = i(150), I = s.default.getLogger("ScanCode");
    let _ = class extends r.Vue {
        constructor() {
            super(...arguments), this.imgRunning = w, this.imgPause = k, this.imgFinish = T, 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() {
            a.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 = C.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* () {
                b.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)
                })), b.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)
                })), a.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)
                    }
                }), a.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;
                    S.toCanvas(i, o, {margin: 0, width: 74}, e => {
                        I.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 = a.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;
                            I.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) {
                            I.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), I.warning("#### 任务成功或失败, clean Accelerate"))
            }
        }

        exitAccelerate(e) {
            let t = C.getTaskFromTaskId(e);
            clearTimeout(this.tokenMap[e].timeoutTimer), this.tokenMap[e].timeoutTimer = null, a.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 (a.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 + "次";
                a.client.callServerFunction("ShowToast", {id: "scancode", type: 0, message: i, duration: 4e3})
            }
        }

        updateVipCert(e, t = !0) {
            if (!this.vipSpeedMap[e].isShowVipSpeed && !this.vipSpeedMap[e].isHuddle) {
                C.getTaskFromTaskId(e).setAcclerating(!0), a.client.callServerFunction("UpdateDcdnWithVipCert", e, this.tokenMap[e].token, this.tokenMap[e].btIndex).catch();
                let t = {
                    [e]: {
                        isShowVipSpeed: !0,
                        isShowSuperSpeed: !1,
                        isAcclerated: !1,
                        isHuddle: !1,
                        isSensitive: !1,
                        sensitive: null,
                        isShowVipHover: !1,
                        isShowSuperHover: !1,
                        hoverText: "扫码加速",
                        hoverType: "ScanCode",
                        remindType: "none"
                    }
                };
                a.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 = C.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].hoverText && !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), I.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), I.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 = C.getTaskFromTaskId(e), 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, r = 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 > r && (i = e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.RealIndex), r = t)
                            }
                            this.tokenMap[e].btIndex = i
                        }
                    }
                    let r = -1 === t.btIndex ? 0 : t.btIndex, a = yield this.queryToken(e, t.trial_verify_info, r);
                    if (!a || 0 === a.length) {
                        I.warning("get token failed, taskid: ", e, "token: ", JSON.stringify(t));
                        break
                    }
                    let s = a[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([n.getTaskBaseInfo()]), t.timeoutTimer = setTimeout(() => {
                        let i = C.getTaskFromTaskId(e).getTaskStatus();
                        i > 0 && i < 8 ? (this.exitAccelerate(e), I.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 = C.getTaskFromTaskId(e), o = n.getTaskBaseInfo(),
                    r = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.Gcid),
                    a = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.Cid) || r, s = new v.VipTaskHttpSession, d = {
                        taskType: n.getType(),
                        files: [{
                            subId: i,
                            taskStatus: 6,
                            filePath: n.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath),
                            fileName: n.getTaskName(),
                            gcid: r,
                            cid: a,
                            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 && (r = i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Gcid), a = i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Cid), t = e)
                    }
                    d.files[0].gcid = r, d.files[0].cid = a || r
                }
                let u = yield s.queryToken(d);
                return I.information("tokenResponse", u), u
            })
        }
    };
    n([r.Prop()], _.prototype, "curTaskId", void 0), n([r.Prop()], _.prototype, "curUserId", void 0), n([r.Prop()], _.prototype, "vipSpeedInfo", void 0), n([r.Prop({})], _.prototype, "taskBase", void 0), n([r.Prop()], _.prototype, "vipSpeedMap", void 0), n([r.Prop()], _.prototype, "vipInfo", void 0), n([r.Prop()], _.prototype, "curCategoryViewid", void 0), n([r.Watch("accelerationTimes")], _.prototype, "onaccelerationTimesChange", null), n([r.Watch("vipSpeedInfo")], _.prototype, "onVipSpeedInfoChange", null), n([r.Watch("vipTaskInfo")], _.prototype, "onVipTaskInfoChange", null), n([r.Watch("switchShowType")], _.prototype, "onswitchShowTypeChange", null), n([r.Watch("curTaskId")], _.prototype, "onCurTaskIdChange", null), _ = n([r.Component({components: {}})], _), t.default = _
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(245), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(3), s = i(11), l = i(16), d = i(40), u = i(15), c = i(4), h = i(9), f = i(49),
        p = l.DownloadKernelEventManager.getEventManager(), g = i(0).default.getLogger("XlTab.view"),
        m = s.DownloadKernelTaskManager.getTaskManager();
    let v = class extends r.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 === a.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);
                this.curTask = m.getTaskFromTaskId(this.curTaskId);
                let t = this.curTask.isSupportPlay(), i = this.curTask.getTaskStatus(), n = !1,
                    o = this.curTask.getTaskBaseInfo(), r = o.taskName.toLocaleLowerCase().endsWith(".zip");
                i !== a.DownloadKernel.TaskStatus.Seeding && i !== a.DownloadKernel.TaskStatus.Succeeded || (n = yield d.TaskCtrlOperatorNS.isExistTaskFile(o));
                let s = [];
                t && this.curCategoryid === a.DownloadKernel.CategroyViewID.Downloading && i !== a.DownloadKernel.TaskStatus.Failed ? (s = [{
                    title: "边下边播",
                    key: "Preview"
                }, {
                    title: "速度",
                    key: "TaskChart"
                }], this.activeKey = "Preview") : t && n && this.curCategoryid === a.DownloadKernel.CategroyViewID.Completed ? (s = [{
                    title: "播放",
                    key: "Preview"
                }, {
                    title: "速度",
                    key: "TaskChart"
                }], this.activeKey = "Preview") : e && r && n && (this.curCategoryid === a.DownloadKernel.CategroyViewID.Completed || this.curCategoryid === a.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(a.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                if (e && e[0] === a.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(a.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                if (!e || e[0] !== a.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() === a.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(a.DownloadKernel.TaskEventType.StatusChanged, this.eventOnTaskStatusChange), c.client.detachServerEvent("OnTabChange", this.eventOnTabChange), p.detachTaskEvent(a.DownloadKernel.TaskEventType.InsertToCategoryView, this.eventOnInsertToCategoryView)
        }
    };
    n([r.Prop()], v.prototype, "checkedTaskNum", void 0), n([r.Prop()], v.prototype, "completeTaskNum", void 0), n([r.Prop({default: 0})], v.prototype, "curTaskId", void 0), n([r.Prop({default: ""})], v.prototype, "curUserId", void 0), n([r.Prop()], v.prototype, "curCategoryid", void 0), n([r.Prop()], v.prototype, "currentCategoryId", void 0), n([r.Watch("curCategoryid", {immediate: !0})], v.prototype, "OnCurCategoryidChange", null), n([r.Watch("curTaskId", {immediate: !0})], v.prototype, "onCurTaskIdChange", null), n([r.Watch("activeKey", {immediate: !0})], v.prototype, "onActiveKeyChange", null), n([r.Watch("track1")], v.prototype, "onTrack", null), v = n([r.Component({
        components: {
            Preview: () => Promise.resolve().then(() => i(826)),
            File: () => Promise.resolve().then(() => i(830)),
            Attribute: () => Promise.resolve().then(() => i(833)),
            TaskChart: () => Promise.resolve().then(() => i(835))
        }
    })], v), t.default = v
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(247), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(4), s = i(15), l = i(3), d = i(11), u = i(9), c = i(827), h = i(74), f = i(61), p = i(0),
        g = i(39), m = i(10), v = p.default.getLogger("Thunder-Preview"),
        y = d.DownloadKernelTaskManager.getTaskManager();
    let w = class extends r.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 = y.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 a.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), v.information("checkPlayingMedia", "xmpMode", this.xmpMode, "curMediaId", e, "curTaskId", this.curTaskId, "isCurTaskPlayingMedia", this.isCurTaskPlayingMedia, "clickTaskId", this.clickTaskId), v.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, v.information("preview updateDownloadEmbedRect", JSON.stringify(i)), 0 !== i.x && 0 !== i.width && 0 !== i.height && (yield a.client.callServerFunction("UpdateDownloadEmbedRect", i), yield a.client.callServerFunction("ThunderResize"), v.information("play rect", i))
                }))
            })
        }

        play() {
            return o(this, void 0, void 0, function* () {
                this.beginForceLoading = !0, this.clickTaskId = this.curTaskId;
                let e = y.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) a.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("."),
                        r = o[o.length - 1], s = "video";
                    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=" + r), -1 === this.currentCategoryId && -1 !== e.getTaskBaseInfo().categoryId && (this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Downloading ? t = "download_getbacking_play" : this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Completed && (t = "download_getback_complete_play")), a.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 => {
                    a.client.attachServerEvent(e, (t, ...i) => o(this, void 0, void 0, function* () {
                        switch (v.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 a.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* () {
                a.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 = a.client.attachServerEvent("OnShowDownAndPlayToast", this.onShowDownAndPlayToast), this.attachPlayerEvent(), this.attachUIEvent(), this.curViewId = yield a.client.callServerFunction("GetCurrentNav").catch(), this.eventOnXMPModeChanged = a.client.attachServerEvent("OnXmpModeChanged", this.OnXmpModeChanged), this.playByXmpPlugin = "0" === m.ConfigNS.getValue("CompletedTaskPlay", "LanuchMediaPlayer", "1"), this.eventOnPlayVideoByXmp = a.client.attachServerEvent("OnPlayVideoByXmp", this.closeGuide.bind(this))
            })
        }

        beforeDestroy() {
            this.pageHeight = window.innerHeight, a.client.detachServerEvent("OnShowDownAndPlayToast", this.eventOnShowDownAndPlayToast), a.client.detachServerEvent("OnXmpModeChanged", this.eventOnXMPModeChanged), a.client.detachServerEvent("OnPlayVideoByXmp", this.eventOnPlayVideoByXmp)
        }
    };
    n([r.Prop({default: 0})], w.prototype, "curTaskId", void 0), n([r.Prop()], w.prototype, "currentCategoryId", void 0), n([r.Prop()], w.prototype, "curCategroyViewId", void 0), n([r.Watch("curCategroyViewId")], w.prototype, "OnCurCategoryidChange", null), n([r.Prop()], w.prototype, "playingCurTask", void 0), n([r.Watch("curTaskId", {immediate: !0})], w.prototype, "OnCurTaskChange", null), n([r.Watch("curViewId", {immediate: !0})], w.prototype, "OnCurViewChange", null), w = n([r.Component({components: {VideoState: c.default}})], w), t.default = w
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(249), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(4), a = i(6), s = i(407), l = i(61), d = i(125), u = i(74), c = i(0).default.getLogger("video-state");
    let h = class extends a.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.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()
        }

        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.information("video-state-change", e, "desc", this.xmpMediaStateDesc, "buffer", this.bufferPercent, "forceloading", this.forceLoading), this.$emit("video-state-change", e)
        }

        information(...e) {
            this.loggerEnable && c.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() {
            r.client.attachServerEvent("OnDownloadCodec", () => {
                this.isDownloadCodecEvent = !0, this.isDownloadCodec = !0, this.checkXmpStateDesc(), this.codecTimeOut && (clearTimeout(this.codecTimeOut), this.codecTimeOut = null)
            }), r.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)
            })), r.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() {
            r.client.callRemoteClientFunction(l.mainRendererContext, "OnCancelDownloadCodecs"), r.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(), yield this.checkXmpStateDesc(), yield this.checkPlayType(), this.emitState(), this.attachDownloadCodecEvent()
            })
        }

        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 => {
                    r.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()
                    }))
                }), r.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]}`, r.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))
                }
                if (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"), this.isLoading || this.isBuffering) {
                    this.speedText = "0KB";
                    let e = yield d.CommonNS.callXmp(u.XmpPlayerFunction.getDownloadAndPlayTaskData);
                    if (e) {
                        let t = e.speed / 1024;
                        t > 1024 ? (t /= 1024, this.speedText = `${t.toFixed(2)}MB`) : this.speedText = `${t.toFixed(0)}KB`;
                        let i = setTimeout(() => {
                            this.checkXmpStateDesc(), clearTimeout(i)
                        }, 1500)
                    }
                } else if ("" === this.xmpMediaStateDesc) {
                    let e = setTimeout(() => {
                        r.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())
                        }), this.checkXmpStateDesc(), clearTimeout(e)
                    }, 500)
                }
            })
        }

        onHangleRetry() {
            return o(this, void 0, void 0, function* () {
                c.warning(" onHangleRetry"), r.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),
                    t = yield d.CommonNS.callXmp(u.XmpPlayerFunction.openMedia, e);
                c.warning(t)
            })
        }

        get isXmpEmbedPlay() {
            return !(this.xmpMode === u.XmpMode.INDEPENDENT_MODE)
        }

        openPayVip(e) {
            return o(this, void 0, void 0, function* () {
                e && this.trackOpenVipBtn(!1), d.CommonNS.callXmp("BufferClickVipBtn")
            })
        }

        trackOpenVipBtnEx() {
            return setTimeout(() => {
                this.trackOpenVipBtn(!0).catch()
            }, 0), !0
        }

        trackShowErrorPage() {
            return setTimeout(() => {
                r.client.callServerFunction("TrackEvent", "core_event", "player_fail_play_show", "", 0, 0, 0, 0, `errorcode=${this.errCode}`).catch()
            }, 0), !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);
                r.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()
                }
            } else "nothing" === e && (this.preShowPage = "");
            return t
        }

        isCanShowPageEx(e) {
            return this.preShowPage === e
        }
    };
    n([a.Prop({default: !1})], h.prototype, "isEmbed", void 0), n([a.Prop({default: ""})], h.prototype, "panFileId", void 0), n([a.Prop({default: !1})], h.prototype, "beginForceLoading", void 0), n([a.Prop({default: !0})], h.prototype, "loggerEnable", void 0), n([a.Watch("panFileId")], h.prototype, "onPanFileIdChange", null), n([a.Watch("forceLoading")], h.prototype, "onForceLoadingChange", null), n([a.Watch("xmpMediaStateDesc")], h.prototype, "onStateDescChange", null), n([a.Watch("bufferPercent")], h.prototype, "onBufferPercentChange", null), n([a.Watch("isDownloadCodec")], h.prototype, "onIsDownloadCodecChange", null), n([a.Watch("xmpMode")], h.prototype, "onXmpModeChange", null), n([a.Watch("beginForceLoading")], h.prototype, "onBeginForceLoadingChange", null), h = n([a.Component], h), t.default = h
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(251), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(831), 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(253), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(3), s = i(11), l = i(39), d = i(2), u = i(13), c = i(0), h = i(4), f = i(125), p = i(22),
        g = i(37), m = i(40), v = i(148), y = i(10), w = i(9), k = c.default.getLogger("task-detail-ZipFileList"),
        T = s.DownloadKernelTaskManager.getTaskManager(), b = (e, t) => e < t ? -1 : e === t ? 0 : 1;
    var C, S, I;
    !function (e) {
        e.zipDoGetFileList = "ZipDoGetFileList", e.zipDoDelFileList = "ZipDoDelFileList", e.zipAbortGetFileList = "ZipAbortGetFileList", e.zipOpenFile = "ZipOpenFile", e.zipOpenPassWord = "ZipOpenPassWord", e.zipOpenIndex = "ZipOpenIndex", e.zipMakeIndexFile = "ZipMakeIndexFile"
    }(C || (C = {})), function (e) {
        e.onZipListCompleted = "OnZipListCompleted", e.onZipListCompletedError = "OnZipListCompletedError", e.onZipIndexCompleted = "OnZipIndexCompleted", e.onZipPassWordError = "OnZipPassWordError", e.onZipIndexProgress = "OnZipIndexProgress", e.onZipIndexError = "OnZipIndexError"
    }(S || (S = {})), 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"
    }(I || (I = {}));
    let _ = class extends r.Vue {
        constructor() {
            super(...arguments), this.isGuideTipsShowed = !1, this.taskFileExist = !0, this.expandHead = !0, this.curTask = {}, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [], this.eventZipListComplete = 0, this.eventZipListCompletedError = 0, this.eventZipIndexComplete = 0, this.eventZipPassWordError = 0, this.eventFileExitsChange = 0, this.eventZipIndexError = 0, this.zipFileError = !1, this.clickRow = null, this.isAllSelectedAndFinished = !1, this.isSingle = !1, this.isMoreFile = !1, this.tryReportClickExtData = "", this.zipListFailTry = null, this.columns = [{
                label: "文件名称",
                prop: "name",
                sortable: !0,
                sorter: (e, t) => b(e.data.fileName.toLowerCase(), t.data.fileName.toLowerCase())
            }, {
                label: "大小",
                prop: "fileSize",
                width: 78,
                sortable: !0,
                sorter: (e, t) => b(e.data.fileSize, t.data.fileSize)
            }], this.tabHeight = 0
        }

        onCurTaskChange() {
            k.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), w.XLStatNS.trackEvent("download_detail", "compressed_package_open_newuser_guid_click"))
        }

        onClickName(e) {
            if ("leaf" === e.type) {
                let t = "", i = !1;
                e.data.isSupportPlay ? (t += "file_type=video", e.data.encryNoSurppor ? this.$message({
                    message: "不支持的加密方式，无法播放",
                    type: "warning",
                    duration: 2e3
                }) : e.data.encry ? (w.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_show"), p.MessageBox.custom("ZipPassword").then(n => {
                    if (n.action === g.MessageBoxNS.Action.OK) {
                        let t = n.args.passWord;
                        this.clickRow = e, this.makeZipIndex(t), w.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_click", "", 0, 0, 0, 0, "click_id=confirm"), i = !0
                    } else n.action === g.MessageBoxNS.Action.Cancel ? (t += ";video_open_result=fail;errorcode=2", w.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_click", "", 0, 0, 0, 0, "click_id=cancel")) : n.action === g.MessageBoxNS.Action.Close && (t += ";video_open_result=fail;errorcode=2", w.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_click", "", 0, 0, 0, 0, "click_id=close"))
                }).catch()) : (this.clickRow = e, i = !0, this.makeZipIndex())) : (t += "file_type=other", this.openDir(e)), t += `;task_type=${this.curTask.categoryId === this.currentCategoryId ? "download" : "getback"}`, i ? this.tryReportClickExtData = t : (this.tryReportClickExtData = "", w.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, t))
            } 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 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 r = n.parent;
            for (; r;) r.data.fileSize += t.fileSize, r = r.parent;
            return o
        }

        setUserRead(e) {
            e.data.userRead = 1;
            let t = T.getTaskFromTaskId(this.curTask.taskId);
            t && t.setUserRead(1)
        }

        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(), this.setUserRead(e)
            })
        }

        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";
                this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed ? i = "download_right_complate_filelist" : this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Recycle && (i = "download_right_recycle_filelist"), -1 !== this.curTask.categoryId && -1 !== this.currentCategoryId ? (i = "download_private_space_bxbb_play", this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed && (i = "download_private_space_local_play")) : -1 === this.currentCategoryId && -1 !== this.curTask.categoryId && (i = "download_getbacking_play", this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed && (i = "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), k.information("play rect", i)
            })
        }

        openDir(e) {
            let t = this.taskFile;
            h.client.callServerFunction("ShellOpen", t).catch(), T.getTaskFromTaskId(this.curTask.taskId).setUserRead(1)
        }

        isSupportPlay(e) {
            return "branch" !== e.type && (!!this.subFiles[e.data.index] && this.subFiles[e.data.index].isSupportPlay)
        }

        getFileList(e) {
            let t = [], i = !1;
            for (let n = 0; n < e.fileItems.length; ++n) {
                let o = {};
                o.index = n, o.pathIndex = e.fileItems[n].pathIndex, o.filePath = e.pathItems[e.fileItems[n].pathIndex].full, o.fileName = e.fileItems[n].file, o.fileSize = e.fileItems[n].size, o.isSupportPlay = l.TaskUtilHelper.isVideoFileExt(o.fileName), !this.isGuideTipsShowed && o.isSupportPlay && (i = !0), o.encry = e.fileItems[n].encry, o.encryNoSurppor = e.fileItems[n].encryNoSurppor, t.push(o)
            }
            return i && (this.setCurrentGuide(v.NewIssueGuide.zipFile), y.ConfigNS.setValue("GuideTips", "ZipFile", !0), w.XLStatNS.trackEvent("download_detail", "compressed_package_open_newuser_guid_show")), t
        }

        uninit() {
            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), k.information("init FileList"), this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [], this.isMoreFile = !1, this.curTask = T.getTaskFromTaskId(this.curTaskId).getTaskBaseInfo(), this.taskFileExist = yield m.TaskCtrlOperatorNS.isExistTaskFile(this.curTask), this.expandHead = !0, this.isZipFile && this.taskFileExist) {
                    this.attachEvent(), (yield f.CommonNS.callXmp(C.zipDoGetFileList, 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(C.zipDoGetFileList, this.taskFile, this.curTaskId);
                k.information(C.zipDoGetFileList, "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.toLocaleLowerCase().endsWith(".zip")
        }

        onZipListCompleted(e, ...t) {
            k.information("onZipListCompleted", t[1]);
            let i = !1;
            do {
                if (t.length < 2) break;
                if (t[0] !== this.taskFile) break;
                let e = t[1];
                this.isMoreFile = e.isMoreFile, this.calcTabHeight(), this.subFiles = this.getFileList(e), this.parseFileList(this.subFiles), this.zipFileError = !1, i = !0
            } while (0);
            i || (this.isMoreFile = !1, this.zipFileError = !0, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [])
        }

        onZipListCompletedError(e, ...t) {
            this.zipFileError = !0, this.isMoreFile = !1, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = []
        }

        onZipIndexCompleted(e, ...t) {
            this.tryReportClickExtData && (this.tryReportClickExtData += ";video_open_result=success", w.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, this.tryReportClickExtData), this.tryReportClickExtData = "")
        }

        onZipPassWordError(e, ...t) {
            this.tryReportClickExtData && (this.tryReportClickExtData += ";video_open_result=fail;errorcode=1", w.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, this.tryReportClickExtData)), w.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_show"), p.MessageBox.custom("ZipPassword", {tips: !0}).then(e => {
                if (e.action === g.MessageBoxNS.Action.OK) {
                    let t = e.args.passWord;
                    this.makeZipIndex(t), w.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_click", "", 0, 0, 0, 0, "click_id=confirm")
                } else e.action === g.MessageBoxNS.Action.Cancel ? w.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_click", "", 0, 0, 0, 0, "click_id=cancel") : e.action === g.MessageBoxNS.Action.Close && w.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_click", "", 0, 0, 0, 0, "click_id=close")
            }).catch()
        }

        onZipIndexError(e, ...t) {
            f.CommonNS.callXmp("SetXmpCurrentMode", I.INDEPENDENT_MODE), this.tryReportClickExtData && (this.tryReportClickExtData += ";video_open_result=fail;errorcode=0", w.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, this.tryReportClickExtData), this.tryReportClickExtData = "")
        }

        makeZipIndex(e = "") {
            let t = {
                pathIndex: this.clickRow.data.pathIndex,
                file: this.clickRow.name,
                encry: this.clickRow.encry,
                encryNoSurppor: this.clickRow.encryNoSurppor
            };
            f.CommonNS.callXmp(C.zipMakeIndexFile, t, e), this.playFile(this.clickRow)
        }

        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(C.zipDoDelFileList, this.taskFile)))
        }

        attachEvent() {
            this.eventZipListComplete || (this.eventZipListComplete = h.client.attachServerEvent(S.onZipListCompleted, this.onZipListCompleted.bind(this)), this.eventZipListCompletedError = h.client.attachServerEvent(S.onZipListCompletedError, this.onZipListCompletedError.bind(this)), this.eventZipIndexComplete = h.client.attachServerEvent(S.onZipIndexCompleted, this.onZipIndexCompleted.bind(this)), this.eventZipPassWordError = h.client.attachServerEvent(S.onZipPassWordError, this.onZipPassWordError.bind(this)), this.eventZipIndexError = h.client.attachServerEvent(S.onZipIndexError, this.onZipIndexError.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, k.information("calcTabHeight", this.tabHeight), this.tabHeight
        }

        beforeDestroy() {
            this.uninit(), this.eventZipListComplete && (h.client.detachServerEvent(S.onZipListCompleted, this.eventZipListComplete), h.client.detachServerEvent(S.onZipListCompletedError, this.eventZipListCompletedError), h.client.detachServerEvent(S.onZipIndexCompleted, this.eventZipIndexComplete), h.client.detachServerEvent(S.onZipPassWordError, this.eventZipPassWordError), h.client.detachServerEvent("TaskFileExitsChange", this.eventFileExitsChange)), this.closeTips()
        }
    };
    n([r.Prop()], _.prototype, "curTaskId", void 0), n([r.Prop()], _.prototype, "operate", void 0), n([r.Prop()], _.prototype, "playingCurTask", void 0), n([r.Prop()], _.prototype, "playingMediaIndex", void 0), n([r.Prop()], _.prototype, "curCategroyViewID", void 0), n([r.Prop()], _.prototype, "currentCategoryId", void 0), n([r.Prop()], _.prototype, "playstate", void 0), n([r.Prop()], _.prototype, "currentGuide", void 0), n([r.Prop()], _.prototype, "setCurrentGuide", void 0), n([r.Watch("curTaskId", {immediate: !0})], _.prototype, "onCurTaskChange", null), _ = n([r.Component], _), t.default = _
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(255), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(6), a = i(3), s = i(11), l = i(16);
    let d = i(834);
    const u = i(13), c = o.default.getLogger("task-detail-Attribute"), h = s.DownloadKernelTaskManager.getTaskManager(),
        f = l.DownloadKernelEventManager.getEventManager();
    let p = class extends r.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() === a.DownloadKernel.TaskStatus.Seeding || this.task.getTaskStatus() === a.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(a.DownloadKernel.TaskAttribute.TaskId) === this.curTaskId) {
                        this.task = i, this.drawTaskInfo();
                        break
                    }
                }
            } while (0)
        }

        mounted() {
            c.information("attribute mounted"), this.init(), this.eventOnTaskDetailChange = f.attachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                this.updateTaskInfo(...e)
            })
        }

        beforeDestroy() {
            c.information("### attribute beforeDestroy"), f.detachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, this.eventOnTaskDetailChange)
        }
    };
    n([r.Prop({default: 0})], p.prototype, "curTaskId", void 0), n([r.Watch("curTaskId")], p.prototype, "watchTaskInfoChange", null), p = n([r.Component], p), t.default = p
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(257), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(836), o = i(24), r = i(25).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 (r.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(259), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(0), a = i(5), s = i(3), l = i(11), d = i(16), u = i(40), c = i(59), h = i(65), f = i(383), p = i(837),
        g = i(6), m = i(13), v = i(384), y = i(23), w = i(9), k = i(39), T = i(401), b = i(4), C = i(408), S = i(49),
        I = i(72), _ = i(150), A = d.DownloadKernelEventManager.getEventManager(),
        D = l.DownloadKernelTaskManager.getTaskManager(), x = r.default.getLogger("TaskChart");
    let N = class extends g.Vue {
        constructor() {
            super(...arguments), this.width = 0, this.height = 0, this.progress = 0, this.avgSpeed = 0, this.maxSpeed = 0, this.downloadSpeed = 0, this.vipSpeed = 0, 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.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 = T.MemoryConfigNS.getValue("TaskChar", e, !1), this.curTaskIsTryTask) break;
                this.vipTaskInfo && this.vipTaskInfo.enterType === C.VipDownloadDefineNS.VipTaskType.Try && (this.curTaskIsTryTask = !0), this.curTaskIsTryTask && T.MemoryConfigNS.setValue("TaskChar", e, !0)
            } while (0)
        }

        attachTaskStatus() {
            b.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 = D.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 r = this.curTask.getType();
                this.isBtOrGroup = r === s.DownloadKernel.TaskType.Bt || r === s.DownloadKernel.TaskType.Group, this.updateDownloadInfo();
                let a = this.filteredData[0] ? [].concat(Object.values(Object.values(this.filteredData[0]))) : [];
                this.maxValue = this.getMaxValue(a), 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("easyShare");
                    if (_.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
                    }
                    w.XLStatNS.trackEvent("core_event", "player_guid_yun_add_icon_show", "", 0, 0, 0, 0, "taskid=" + this.curTaskId + ",gcid=" + this.curTaskBase.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 I.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, w.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), r = o.split("."),
                    a = r[r.length - 1], l = "video";
                if (k.TaskUtilHelper.getTaskFileType(o) === k.TaskUtilHelper.FileExtType.Music && (l = "music"), "play" === e) t = "download_right_gotback_play_click"; else {
                    if ("bianxiabianbo" !== e) break;
                    t = "download_right_gettingback_play_click"
                }
                w.XLStatNS.trackEvent("pc_yunpan", "yunpan_consumption_click", "", 0, 0, 0, 0, "from=" + t + ",file_type=" + l + ",suffix=" + a)
            } while (0)
        }

        operate(e, t) {
            if (this.trackEvent(e), "play" === e) {
                this.$emit("tabChange", "Preview"), t || (t = {});
                let e = "download_right_complate_speed_embed";
                -1 === this.currentCategoryId && -1 !== this.curTaskBase.categoryId && (this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading ? e = "download_getbacking_play" : this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Completed && (e = "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"}`
            }
            w.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 = D.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], r = this.bSplineRender(o);
                    if (this.points = r, 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], r = 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 r = o.find(e => e.xValue === +i);
                                    r && (e.push((r || {x: 0}).x), t.push(n))
                                }
                            });
                            for (let a = 0; a < e.length; a++) {
                                let s = [];
                                if (a === e.length - 1) s = r; else {
                                    let t = r.findIndex(t => t.x >= e[a + 1]);
                                    (s = r.splice(0, t - 1)).push(r[0])
                                }
                                i.setLineDash([]), this.drawLineAndGradient(i, o, n[t[a]].lineColorStart, n[t[a]].lineColorEnd, n[t[a]].gradientColorStart, n[t[a]].gradientColorEnd, 2, s)
                            }
                        }
                    } else this.drawLineAndGradient(i, o, this.userSpeedCurveColor.lineColorStart, this.userSpeedCurveColor.lineColorEnd, this.userSpeedCurveColor.gradientColorStart, this.userSpeedCurveColor.gradientColorEnd, 2, r)
                }), 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 r = this.transformData(o);
                    if (0 === r.length) return;
                    let a = r.length - 1;
                    0 === t ? (this.lastData = r.slice(0, a), this.lastPoint === r[a].xValue || 0 === a ? (this.xPoint = 0, this.lastData[a] = {
                        x: this.lastPointX,
                        y: this.lastPointY
                    }, this.yPoint = (r[a].y - this.lastPointY) / this.frame) : (this.xPoint = (r[a].x - r[a - 1].x) / this.frame, this.yPoint = (r[a].y - r[a - 1].y) / this.frame, this.lastData[a] = {
                        xValue: r[a - 1].xValue,
                        yValue: r[a - 1].yValue,
                        x: r[a - 1].x,
                        y: r[a - 1].y
                    }), this.lastPoint = r[a].xValue, this.lastPointX = r[a].x, this.lastPointY = r[a].y) : (r[a].x = this.lastData[a].x, r[a].y = this.lastData[a].y, this.lastData = r), this.lastData[a].x = this.lastData[a].x + this.xPoint, this.lastData[a].y = this.lastData[a].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 r = [];
                            if (o === t.length - 1) r = s; else {
                                let e = s.findIndex(e => e.x >= t[o + 1]);
                                (r = 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, r)
                        }
                    }
                }), 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, r, a, s) {
            if (!t.length || !s.length) return void (this.curveTop = 20);
            e.lineWidth = a * 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, r), e.fillStyle = u, e.closePath(), e.fill()
        }

        drawLine(e, t, i, n, o, r) {
            if (!t.length) return;
            if (!r.length) return;
            e.lineWidth = o * this.scale, e.beginPath(), e.moveTo((r[0] || t[0]).x, (r[0] || t[0]).y), this.renderPath(e, r);
            let a = e.createLinearGradient(0, 0, t[t.length - 1].x, 0);
            a.addColorStop(0, i), a.addColorStop(1, n), e.strokeStyle = a, 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 r = this.renderPath(e, o);
            e.lineTo(o[r].x, this.height), e.lineTo(o[0].x, this.height), e.lineTo(o[0].x, o[0].y);
            let a = e.createLinearGradient(0, 0, 0, this.height);
            a.addColorStop(0, i), a.addColorStop(1, n), e.fillStyle = a, 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), a.isNullOrUndefined(this.taskSpeedInfo)) 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}, r = {0: 0}, a = {};
                    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, r[n] = t.addSpeed, a[n] = t.vipSpeedColor
                        }
                    }
                    i.historySpeedMap = o || {}, i.historyIncreaseSpeedMap = r || {}, i.historyVipSpeedColorMap = a || {}
                } while (0);
                return i
            })
        }

        mounted() {
            S.default.isInitedAW().then(() => {
                let e = S.default.getConfigValue("main", "task-detail", null);
                x.information("remote config: ", JSON.stringify(e)), e && e.TaskChart && (this.taskChartRemoteConfig = e.TaskChart)
            }).catch()
        }
    };
    n([g.Prop()], N.prototype, "currentCategoryId", void 0), n([g.Prop()], N.prototype, "currentCategoryViewId", void 0), n([g.Prop({default: 8})], N.prototype, "paddingTopPercent", void 0), n([g.Prop({default: 0})], N.prototype, "paddingBottomPercent", void 0), n([g.Prop({default: Math.max(window.devicePixelRatio, 2)})], N.prototype, "scale", void 0), n([g.Prop({default: 1})], N.prototype, "step", void 0), n([g.Prop({default: 21})], N.prototype, "topMargin", void 0), n([g.Prop({default: 0})], N.prototype, "curTaskId", void 0), n([g.Prop({default: ""})], N.prototype, "curUserId", void 0), n([g.Prop({})], N.prototype, "curTaskBase", void 0), n([g.Prop()], N.prototype, "activeKey", void 0), n([g.Prop()], N.prototype, "checkedTaskNum", void 0), n([g.Prop()], N.prototype, "completeTaskNum", void 0), n([g.Watch("activeKey", {immediate: !0})], N.prototype, "onActiveKeyChange", null), n([g.Prop()], N.prototype, "vipSpeedInfo", void 0), n([g.Watch("vipTaskInfo")], N.prototype, "onVipTaskInfoChange", null), n([g.Watch("curUserId")], N.prototype, "onCurUserIdChange", null), n([g.Watch("curTaskId", {immediate: !0})], N.prototype, "onTaskChange", null), N = n([g.Component], N), t.default = N
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(261), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let r = class extends o.Vue {
        mounted() {
        }
    };
    n([o.Prop({default: ""})], r.prototype, "curTaskName", void 0), r = n([o.Component], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(263), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(19), s = i(35), l = i(3), d = i(11), u = i(4), c = i(15), h = i(65), f = i(23), p = i(101),
        g = i(9), m = i(8), v = i(0).default.getLogger("dltab_detail_detail"),
        y = d.DownloadKernelTaskManager.getTaskManager();
    let w = class extends r.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 = k.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 = k.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 = k.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), r = {};
                                o.title !== n ? (r = Object.assign(o, {
                                    id: t.slice(1),
                                    title: n.slice(1)
                                }), p.ThunderPanTaskNS.updateTaskPath(i.FileId, JSON.stringify(r))) : r = o, this.panTaskData = r
                            } 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 = k.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 = k.complete, void this.getPanTaskType();
                    if (this.saveStatus = e[0].phase, this.saveStatus === k.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 !== k.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 = k.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") {
            a.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 = k.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 = "", r = "";
                            for (let t of e[0].path) i += "\\" + t.id, r += "\\" + t.title;
                            let a = JSON.parse(o.Data);
                            a.title !== r ? (n = Object.assign(a, {
                                id: i.slice(1),
                                title: r.slice(1)
                            }), p.ThunderPanTaskNS.updateTaskPath(o.FileId, JSON.stringify(n))) : n = a, t = o.FileId, this.saveStatus = k.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 !== k.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 k;
    n([r.Prop()], w.prototype, "currentCategoryId", void 0), n([r.Prop({default: -1})], w.prototype, "curTaskId", void 0), n([r.Prop({})], w.prototype, "curTaskStatus", void 0), n([r.Prop()], w.prototype, "curCategroyViewID", void 0), n([r.Prop({default: ""})], w.prototype, "curUserId", void 0), n([r.Watch("curTaskId", {immediate: !0})], w.prototype, "onTaskChange", null), n([r.Watch("curUserId")], w.prototype, "onUserChange", null), n([r.Watch("panFileId", {immediate: !0})], w.prototype, "onPanFileIdChange", null), n([r.Watch("curTaskStatus", {immediate: !0})], w.prototype, "onTaskStatusChange", null), n([r.Watch("panTaskType")], w.prototype, "onPanTaskTypeChange", null), n([r.Watch("panTaskData")], w.prototype, "onPanTaskDataChange", null), n([r.Watch("saveStatus")], w.prototype, "onSaveStatusChange", null), n([r.Watch("panTaskProgress")], w.prototype, "onPanTaskProgressChange", null), w = n([r.Component], w), t.default = w, function (e) {
        e.pending = "PHASE_TYPE_PENDING", e.running = "PHASE_TYPE_RUNNING", e.error = "PHASE_TYPE_ERROR", e.complete = "PHASE_TYPE_COMPLETE"
    }(k || (k = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(265), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(842), 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(267), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(3), s = i(11), l = i(16), d = i(59), u = i(8), c = i(48), h = i(2), f = i(13), p = i(0),
        g = i(4), m = i(46), v = p.default.getLogger("task-detail-FileList"),
        y = l.DownloadKernelEventManager.getEventManager(), w = s.DownloadKernelTaskManager.getTaskManager(),
        k = (e, t) => e < t ? -1 : e === t ? 0 : 1;
    let T = class extends r.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) => k(e.data.fileName.toLowerCase(), t.data.fileName.toLowerCase())
            }, {
                label: "大小",
                prop: "fileSize",
                width: 78,
                sortable: !0,
                sorter: (e, t) => k(e.data.fileSize, t.data.fileSize)
            }, {
                label: "进度",
                prop: "progress",
                width: 78,
                sortable: !0,
                sorter: (e, t) => k(this.getProgress(e), this.getProgress(t))
            }]
        }

        onCurTaskChange() {
            v.information("onCurTaskChange"), 0 === this.curTaskId ? this.uninit() : this.init()
        }

        get checkedKeysCache() {
            return this.checkedKeys.reduce((e, t) => (e[t] = !0, e), {})
        }

        get taskType() {
            return this.curTask.taskType
        }

        get selectedFailedSubFileRetryDownload() {
            let e = m(this.curTask, "status");
            return e = e ? parseInt(e, 10) : 0, !!(this.selectedFailedSubFile && e >= 7 && e <= 10)
        }

        isNormal(e) {
            let t = !1;
            if ("leaf" === e.type) if (e.data.isSupportPlay) {
                if (this.curCategroyViewID === a.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) : "leaf" === e.type && this.curCategroyViewID !== a.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";
            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"
            }, n = this.isNormal(e) ? "is-normal " : "";
            for (let e of Object.keys(i)) if (i[e].includes(t)) return n + "xly-type-" + e;
            return n + "xly-type-unknown"
        }

        isComplete(e) {
            return e.data.isComplete || ("leaf" === e.type ? e.data.isComplete = this.taskType !== a.DownloadKernel.TaskType.Group ? e.data.downloadSize === e.data.fileSize && e.data.isNeedDownload && e.data.downloadSize && 3 === e.data.status : [a.DownloadKernel.TaskStatus.Succeeded, a.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 !== a.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 === a.DownloadKernel.TaskStatus.Seeding || this.curTask.taskStatus === a.DownloadKernel.TaskStatus.Succeeded ? this.isAllSelectedAndFinished = Object.values(this.leafMap).every(e => !!e.data.isNeedDownload && (this.taskType !== a.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) {
            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 !== a.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 = w.getTaskFromTaskId(this.curTask.taskId);
            if (t && (t.setUserRead(1), "leaf" === e.type)) if (this.taskType === a.DownloadKernel.TaskType.Bt) {
                let i = t.getExtraObject().getBtFileList();
                for (let [, t]of i) if (t.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.RealIndex) === e.data.index) {
                    t.setUserRead(1);
                    break
                }
            } else if (this.taskType === a.DownloadKernel.TaskType.Group) {
                t.getExtraObject().getSubTaskByIndex(e.data.index).setUserRead(1)
            }
        }

        openFile(e) {
            return o(this, void 0, void 0, function* () {
                yield this.updateDstRect(), g.client.callServerFunction("OperateTask", this.curTaskId, "open", e.data.index), this.setUserRead(e)
            })
        }

        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";
                this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed ? i = "download_right_complate_filelist" : this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Recycle && (i = "download_right_recycle_filelist"), -1 !== this.curTask.categoryId && -1 !== this.currentCategoryId ? (i = "download_private_space_bxbb_play", this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed && (i = "download_private_space_local_play")) : -1 === this.currentCategoryId && -1 !== this.curTask.categoryId && (i = "download_getbacking_play", this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed && (i = "download_getback_complete_play")), g.client.callServerFunction("OperateTask", this.curTaskId, "play", {
                    fileIndex: e.data.index,
                    playFrom: i
                }).then().catch(), this.setUserRead(e), g.client.broadcastEvent("OnTabChange", "Preview")
            })
        }

        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), v.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(), w.getTaskFromTaskId(this.curTask.taskId).setUserRead(1)
        }

        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)
            })
        }

        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(m(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 = w.getTaskFromTaskId(e.taskId), r = e.taskType;
                if (r === a.DownloadKernel.TaskType.Bt) {
                    let r = 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 r) {
                        let r = {};
                        r.index = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.RealIndex), r.filePath = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FilePath), r.fileName = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileName), r.isNeedDownload = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.Download), r.fileSize = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileSize), r.cid = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.Cid), r.gcid = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.Gcid), r.status = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileStatus), r.downloadSize = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.DownloadSize), r.errCode = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.ErrorCode), r.isSupportPlay = e.isSupportPlay(), r.userRead = e.getUserRead(), 0 !== r.errCode ? r.errMessage = d.TaskStatusHelper.getTaskErrorInfoByCode(r.errCode) : r.errMessage = "", r.status === a.DownloadKernel.BtFileStatus.Complete ? (t = f ? c.SingleBtTaskNS.getSinleBtTaskFilePath(o) : h.join(s, l, r.filePath, r.fileName), i = yield u.FileSystemAWNS.existsAW(t), r.isDelete = !i) : r.isDelete = !1, n[r.index] = r
                    }
                } else if (r === a.DownloadKernel.TaskType.Group) {
                    let e = o.getExtraObject(), r = e.getSubTaskCount(), s = "";
                    for (let o = 0; o < r; ++o) {
                        let r = e.getSubTaskByIndex(o);
                        if (r) {
                            let e = {};
                            e.index = o, e.filePath = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.RelativePath), e.taskId = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId), e.fileName = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskName), e.url = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskUrl), e.refUrl = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.RefUrl), e.isNeedDownload = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSubTask), e.fileSize = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileSize), e.downloadSize = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSize), e.cid = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.Cid), e.gcid = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.Gcid), e.status = r.getTaskStatus(), e.errCode = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.ErrorCode), e.isSupportPlay = r.isSupportPlay(), e.userRead = r.getUserRead(), e.status === a.DownloadKernel.TaskStatus.Failed ? e.errMessage = d.TaskStatusHelper.getTaskErrorInfoByCode(e.errCode) : e.errMessage = "";
                            let l = r.getTaskChannelInfo();
                            e.dcdnStatus = l.dcdnStatus, s = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.SavePath), e.status === a.DownloadKernel.TaskStatus.Succeeded || e.status === a.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 v.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 v.warning("error in updateTreeStatus", "node: ", t, "fileinfo: ", e);
            let i = t.data.downloadSize,
                n = this.taskType === a.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 r = m(t.data, "downloadSize") || 0, a = m(t.data, "fileSize") || 0;
                    if (this.$set(t.data, "downloadSize", e.downloadSize - i + r), -1 !== n && this.$set(t.data, "fileSize", e.fileSize - n + a), 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 === a.DownloadKernel.TaskType.Bt ? e : [a.DownloadKernel.TaskStatus.Seeding, a.DownloadKernel.TaskStatus.Succeeded].includes(e) ? a.DownloadKernel.BtFileStatus.Complete : e === a.DownloadKernel.TaskStatus.Failed ? a.DownloadKernel.BtFileStatus.Error : a.DownloadKernel.BtFileStatus.Started
        }

        getBtSubFileList(e, t) {
            let i = [];
            do {
                let n = w.getTaskFromTaskId(e);
                if (!n) break;
                if (n.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskType) !== a.DownloadKernel.TaskType.Bt) break;
                let o = n.getExtraObject();
                if (!o) break;
                for (let e = 0; e < t.length; ++e) {
                    let n = t[e], r = o.getBtFileByRealIndex(n.realIndex);
                    if (!r) continue;
                    let s = {};
                    s.index = n.realIndex, s.filePath = n.relativePath, s.fileName = r.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileName), s.isNeedDownload = r.getIsDownload(), s.isSupportPlay = r.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 = r.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] !== a.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(a.DownloadKernel.TaskAttribute.RelativePath), e.index = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileIndex), e.taskId = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId), e.fileName = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskName), e.url = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskUrl), e.refUrl = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.RefUrl), e.isNeedDownload = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSubTask), e.fileSize = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileSize), e.downloadSize = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSize), e.cid = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.Cid), e.gcid = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.Gcid), e.status = n.getTaskStatus(), e.errCode = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.ErrorCode), e.userRead = n.getUserRead(), e.isSupportPlay = n.isSupportPlay(), e.status === a.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] !== a.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 && (y.detachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.eventBtSubFileDetailChanged), this.eventBtSubFileDetailChanged = -1), -1 !== this.eventGroupTaskSubFileDetailChanged && (y.detachTaskEvent(a.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 (v.information("init FileList"), this.cacheCompleteTaskNum = this.completeTaskNum, this.editingSelected = !1, this.curTask = w.getTaskFromTaskId(this.curTaskId).getTaskBaseInfo(), !this.curTask || ![a.DownloadKernel.TaskType.Bt, a.DownloadKernel.TaskType.Group].includes(this.curTask.taskType)) return;
                let e = (new Date).getTime();
                -1 !== this.eventBtSubFileDetailChanged && (y.detachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.eventBtSubFileDetailChanged), this.eventBtSubFileDetailChanged = -1), -1 !== this.eventGroupTaskSubFileDetailChanged && (y.detachTaskEvent(a.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.eventGroupTaskSubFileDetailChanged), this.eventGroupTaskSubFileDetailChanged = -1), this.subFiles = yield this.getFileList(this.curTask), this.parseFileList(this.subFiles), this.taskType === a.DownloadKernel.TaskType.Bt ? this.eventBtSubFileDetailChanged = y.attachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...e) => {
                    this.onBtSubFileDetailChanged(...e)
                }) : this.taskType === a.DownloadKernel.TaskType.Group && (this.eventGroupTaskSubFileDetailChanged = y.attachTaskEvent(a.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";
                this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed && (e = "download_right_complated_embed"), -1 !== this.curTask.categoryId && -1 !== this.currentCategoryId ? (e = "download_private_space_bxbb_play", this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed && (e = "download_private_space_local_play")) : -1 === this.currentCategoryId && -1 !== this.curTask.categoryId && (this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Downloading ? e = "download_getbacking_play" : this.curCategroyViewID === a.DownloadKernel.CategroyViewID.Completed && (e = "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([r.Prop()], T.prototype, "curTaskId", void 0), n([r.Prop()], T.prototype, "operate", void 0), n([r.Prop()], T.prototype, "playingCurTask", void 0), n([r.Prop()], T.prototype, "playingMediaIndex", void 0), n([r.Prop()], T.prototype, "curCategroyViewID", void 0), n([r.Prop()], T.prototype, "currentCategoryId", void 0), n([r.Prop()], T.prototype, "playstate", void 0), n([r.Prop()], T.prototype, "currentGuide", void 0), n([r.Prop()], T.prototype, "setCurrentGuide", void 0), n([r.Prop()], T.prototype, "checkedTaskNum", void 0), n([r.Prop()], T.prototype, "completeTaskNum", void 0), n([r.Watch("curTaskId", {immediate: !0})], T.prototype, "onCurTaskChange", null), T = n([r.Component], T), t.default = T
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(269), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(845), o = i(24), r = i(3);
    t.default = o.connector.connect({
        mapStateToProps: {
            taskBaseMap: (e, t) => {
                let i = null;
                if (t.curCategoryViewId !== r.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(271), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(4), s = i(11), l = i(3), d = i(45), u = i(35), c = i(40), h = i(9), f = i(59),
        p = s.DownloadKernelTaskManager.getTaskManager();
    let g = class extends r.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;
            let t = Object.keys(this.taskBaseMap);
            for (let i of t) {
                let t = this.taskBaseMap[Number(i)].taskStatus;
                if (t >= 3 && t <= 5) {
                    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 r = n.getIsPrivate();
                        -1 === o.categoryId || r ? 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 r = o.getTaskBaseInfo();
                        i.push(r);
                        let a = o.getIsPrivate();
                        -1 === r.categoryId || a ? e = !0 : this.removeText = "彻底删除";
                        let s = yield c.TaskCtrlOperatorNS.isExistTaskFile(r);
                        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(), r = n.getIsPrivate(), a = n.getTaskStatus();
                (-1 === o.categoryId || r) && (a !== l.DownloadKernel.TaskStatus.Started && a !== 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) a.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 && a.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([r.Prop()], g.prototype, "taskBaseMap", void 0), n([r.Prop()], g.prototype, "currentCategoryId", void 0), n([r.Prop()], g.prototype, "taskIds", void 0), n([r.Prop()], g.prototype, "curCategoryViewId", void 0), n([r.Watch("taskIds", {immediate: !0})], g.prototype, "onTaskIdsChange", null), g = n([r.Component({components: {MultiChosenItem: () => Promise.resolve().then(() => i(846))}})], g), t.default = g
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(273), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(39), a = i(11), s = i(3), l = i(13), d = i(65),
        u = a.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 = r.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(275), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(848), o = i(24), r = i(25).DownloadKernelCategoryManager.getCategoryManager();
    t.default = o.connector.connect({
        mapStateToProps: {
            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.currentCategoryViewId) {
                        i = e.DownloadListState.taskList[o].tasksMap[n];
                        break
                    }
                } else if (r.isPrivateCategory(o)) for (let o = 0; o < e.DownloadListState.taskListPrivate.length; o++) e.DownloadListState.taskListPrivate[o].id === t.currentCategoryViewId && (i = e.DownloadListState.taskListPrivate[o].tasksMap[n]);
                return i
            }
        }, mapCommitToProps: {}, mapDispatchToProps: {}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(277), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(849), s = i(566), l = i(862), d = i(867), u = i(3), c = i(11), h = i(16), f = i(5), p = i(29),
        g = i(4), m = i(412), v = i(13), y = i(39), w = i(0), k = i(9), T = w.default.getLogger("comment"), b = i(46),
        C = c.DownloadKernelTaskManager.getTaskManager(), S = h.DownloadKernelEventManager.getEventManager();
    let I = class extends r.Vue {
        constructor() {
            super(...arguments), 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 = y.TaskUtilHelper.getTaskFileType(t);
                i === y.TaskUtilHelper.FileExtType.Video ? e = "video" : i === y.TaskUtilHelper.FileExtType.Software ? e = "app" : i === y.TaskUtilHelper.FileExtType.Doc ? e = "doc" : i === y.TaskUtilHelper.FileExtType.Music ? e = "music" : i === y.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)
        }

        get extra() {
            let e = b(this.curTaskBase, "fileSize") || "";
            "number" == typeof e && (e = e.toString());
            let t = this.curTaskBase.realDownloadSize / this.curTaskBase.downloadingPeriod || 0;
            "number" == typeof t && (t = t.toString());
            let i = b(this.curTaskBase, "taskType") || "";
            "number" == typeof i && (i = i.toString());
            let n = b(this.curTaskBase, "taskName").split(".");
            const o = {
                kuaiNiaoSpeedup: "",
                bandWidth: "",
                taskSize: e,
                taskSuffix: n[n.length - 1],
                taskType: i,
                taskSpeed: t,
                taskUrl: encodeURIComponent(b(this.curTaskBase, "url") || ""),
                taskName: encodeURIComponent(b(this.curTaskBase, "taskName") || "")
            };
            return Object.assign({}, o, {
                extParams: Object.keys(o).join(","),
                downloadspeed: v.ThunderUtil.formatSize(b(this.curTaskBase, "averageSpeed"))
            })
        }

        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 || this.isYunTask) return this.curTask = {}, void (this.gcid = "");
            this.eventOnGcidChange && (S.detachTaskEvent(u.DownloadKernel.TaskEventType.DetailChanged, this.eventOnGcidChange), this.eventOnGcidChange = void 0), this.curTask = C.getTaskFromTaskId(e), this.curTaskBase.taskType === u.DownloadKernel.TaskType.Bt ? this.gcid = this.curTask.getExtraObject().getInfoId() : this.curTaskBase.taskType === u.DownloadKernel.TaskType.Group ? (T.information("calcGroupTaskUniqueId before"), this.gcid = this.calcGroupTaskUniqueId(this.curTask), T.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 = S.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.gcid = this.curTask.getTaskAttribute(u.DownloadKernel.TaskAttribute.Gcid), this.gcid && (S.detachTaskEvent(u.DownloadKernel.TaskEventType.DetailChanged, this.eventOnGcidChange), this.eventOnGcidChange = void 0))
        }

        switchPage(e) {
            k.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: b(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* () {
                T.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 + "#";
                    T.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([r.Prop()], I.prototype, "curTaskId", void 0), n([r.Prop()], I.prototype, "currentCategoryId", void 0), n([r.Prop()], I.prototype, "currentCategoryViewId", void 0), n([r.Prop({})], I.prototype, "curUserId", void 0), n([r.Prop()], I.prototype, "userInfo", void 0), n([r.Prop()], I.prototype, "vipInfo", void 0), n([r.Prop()], I.prototype, "curTaskBase", void 0), n([r.Watch("gcid", {immediate: !0})], I.prototype, "onGcidChange", null), n([r.Watch("curTaskId", {immediate: !0})], I.prototype, "onCurTaskIdChange", null), I = n([r.Component({
        components: {
            Avatar: a.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(279), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(850), 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(281), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(152), a = i(58), s = i(4), 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() {
            a.default()
        }

        getUserLink(e) {
            return r.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(283), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(856), o = i(24), r = i(25).DownloadKernelCategoryManager.getCategoryManager();
    t.default = o.connector.connect({
        mapStateToProps: {
            allusers: e => e.Users.all,
            curUser: e => e.Users.curUser,
            preloadPath: e => `file:///${__rootDir}/out/common-preload.js`,
            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.currentCategoryViewId) {
                        i = e.DownloadListState.taskList[o].tasksMap[n];
                        break
                    }
                } else if (r.isPrivateCategory(o)) for (let o = 0; o < e.DownloadListState.taskListPrivate.length; o++) e.DownloadListState.taskListPrivate[o].id === t.currentCategoryViewId && (i = e.DownloadListState.taskListPrivate[o].tasksMap[n]);
                return i
            }
        }, mapCommitToProps: {}, mapDispatchToProps: {}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(285), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(46), s = i(13), l = i(857), d = i(858), u = i(859), c = i(58), h = i(412), f = i(23),
        p = i(4), g = i(0), m = i(9), v = "download_detail", y = g.default.getLogger("comment-input");
    let w = class extends r.Vue {
        constructor() {
            super(...arguments), 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 = {}
        }

        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 a(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 && m.XLStatNS.trackEvent(v, "dltab_detail_comment_tip1_show", "", 0, 0, 0, 0)
        }

        oncanShowCommentNoteChange(e) {
            e && m.XLStatNS.trackEvent(v, "dltab_detail_comment_tip2_show", "", 0, 0, 0, 0)
        }

        extra() {
            let e = a(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 = a(this.curTaskBase, "taskType") || "", n = a(this.curTaskBase, "taskName").split(".");
            const o = {
                kuaiNiaoSpeedup: "",
                bandWidth: "",
                taskSize: e,
                taskSuffix: n[n.length - 1],
                taskType: String(i),
                taskSpeed: String(t),
                taskUrl: encodeURIComponent(a(this.curTaskBase, "url") || ""),
                taskName: encodeURIComponent(a(this.curTaskBase, "taskName") || "")
            };
            return Object.assign({}, o, {
                extParams: Object.keys(o).join(","),
                downloadspeed: s.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, r = i.selectionStart, s = i.selectionEnd,
                l = n.substring(0, r) + o + n.substring(s, n.length);
            this.text = l, this.$nextTick(() => {
                i.focus(), r += o.length, s += o.length, i.setSelectionRange(r, r)
            });
            let d = "button=emoji,is_login=" + ("" === this.curUserId ? 0 : 1);
            this.comment && (d += ",commentid=" + a(this.comment, "cid")), m.XLStatNS.trackEvent(v, "dltab_detail_comment_click", "", 0, 0, 0, 0, d), m.XLStatNS.trackEvent(v, "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 ? m.XLStatNS.trackEvent(v, "dltab_detail_comment_click", "", 0, 0, 0, 0, "button=sendreply,is_login=" + e + ",commentid=" + a(this.comment, "cid")) : m.XLStatNS.trackEvent(v, "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) {
                        y.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 p.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: a(this, "comment", "cid") || "",
                    username: this.curUserNick,
                    hugFlag: !1,
                    device: this.deviceId,
                    images: e,
                    extra: this.extra()
                };
                y.information("sendCommentRequest", i);
                let n = yield h.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", m.XLStatNS.trackEvent(v, "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 && m.XLStatNS.trackEvent(v, "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, m.XLStatNS.trackEvent(v, "comment_pic_upload_start", "", 0, 0, 0, 0, "add_type=" + (t ? "local" : "paste"));
                        let i = yield h.default.aliUpload(e, e => {
                            y.information("callback progress", e), this.imgUploadProgress = 100 * e
                        });
                        if (!i) throw new Error("no url");
                        y.information("aliUpload url", i), m.XLStatNS.trackEvent(v, "comment_pic_upload_result", "", 0, 0, 0, 0, "result=success"), this.commentImgUrl.push(i), this.resetImgUpload()
                    } catch (e) {
                        y.warning("error", e), m.XLStatNS.trackEvent(v, "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 c.default()
                }
                return this.curUserId
            })
        }

        getAuthPlatformParamObj() {
            return o(this, void 0, void 0, function* () {
                const e = yield f.LoginHelperNS.loginHelper.getUserInfoAw(),
                    t = yield p.client.callServerFunction("GetThunderVersion");
                return Object.assign({}, e, {appid: 165, clientVersion: t})
            })
        }

        auth() {
            return o(this, void 0, void 0, function* () {
                return yield p.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([r.Prop()], w.prototype, "curTaskId", void 0), n([r.Prop({default: "0"})], w.prototype, "curUserId", void 0), n([r.Prop({default: ""})], w.prototype, "tid", void 0), n([r.Prop({})], w.prototype, "curUserNick", void 0), n([r.Prop()], w.prototype, "comment", void 0), n([r.Prop({default: 100})], w.prototype, "maxLength", void 0), n([r.Prop({default: 6})], w.prototype, "minLength", void 0), n([r.Prop({default: !1})], w.prototype, "focus", void 0), n([r.Prop()], w.prototype, "deviceId", void 0), n([r.Prop({default: ""})], w.prototype, "autoSendCommentText", void 0), n([r.Prop()], w.prototype, "curTaskBase", void 0), n([r.Prop()], w.prototype, "currentCategoryViewId", void 0), n([r.Prop()], w.prototype, "currentCategoryId", void 0), n([r.Watch("tid")], w.prototype, "onTidChange", null), n([r.Watch("text")], w.prototype, "onTextChange", null), n([r.Watch("placeholder")], w.prototype, "onPlaceholderChange", null), n([r.Watch("canShowCommentNote")], w.prototype, "oncanShowCommentNoteChange", null), w = n([r.Component({
        components: {
            Emoji: l.default,
            imgUpload: d.default,
            imgUploadPanel: u.default
        }
    })], w), t.default = w
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(287), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let r = 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
        }
    };
    r = n([o.Component], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(289), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(58), a = i(6), s = i(9);
    let l = class extends a.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 r.default()
            })
        }

        handleChange(e) {
            this.$emit("change", e)
        }

        handleDeleteImg() {
            this.$refs[this.refName].value = ""
        }
    };
    n([a.Prop({default: "imgInput"})], l.prototype, "refName", void 0), n([a.Prop({default: !0})], l.prototype, "isEnable", void 0), n([a.Prop({default: "0"})], l.prototype, "curUserId", void 0), l = n([a.Component], l), t.default = l
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(291), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(152), r = i(6);
    let a = class extends r.Vue {
        deleteCommentImg() {
            this.$emit("delete")
        }

        thumbnail(e) {
            return o.getThumbUrl(e, 110, 110)
        }
    };
    n([r.Prop()], a.prototype, "imgUploadProgress", void 0), n([r.Prop()], a.prototype, "isImgUploading", void 0), n([r.Prop()], a.prototype, "isImageFrameShow", void 0), n([r.Prop()], a.prototype, "commentImgUrl", void 0), n([r.Prop()], a.prototype, "showCommentImgPreview", void 0), a = n([r.Component], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(293), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(863), a = i(864), s = i(566), l = i(152), d = i(4), u = i(65), c = i(412), h = i(866),
        f = i(46), p = i(150), 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: r.default,
            CommentImg: a.default,
            CommentInput: s.default,
            commentReport: h.default
        }
    })], v), t.default = v
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(295), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(46);
    let a = class extends o.Vue {
        get avatar() {
            let e = "";
            return this.userInfo && r(this.userInfo, "uid") === this.curUserId && (e = r(this.curUser, "imgURL")) && (e = e.replace("%s", "100x100")), e || (e = r(this.userInfo, "portrait_url") || r(this.comment, "userImg")), e
        }
    };
    n([o.Prop()], a.prototype, "userInfo", void 0), n([o.Prop()], a.prototype, "userImg", void 0), n([o.Prop()], a.prototype, "curUserId", void 0), n([o.Prop()], a.prototype, "comment", void 0), n([o.Prop()], a.prototype, "curUser", void 0), a = n([o.Component], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(297), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(152), a = i(4), s = i(6), l = i(9);
    let d = class extends s.Vue {
        constructor() {
            super(...arguments), this.loadingImg = i(865), this.imgWidth = 0, this.imgHeight = 0, this.isLarge = !1, this.showRawImg = !0
        }

        get imgViewUrl() {
            return r.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 {
                    r.aliImageInfo(this.imgUrl).then(e => {
                        this.imgWidth = e.ImageWidth.value, this.imgHeight = e.ImageHeight.value
                    }).catch()
                } catch (e) {
                }
            })
        }

        lazyImgObj(e) {
            return r.lazyImgObj(e)
        }

        toggleView() {
            this.isLarge = !this.isLarge, this.isLarge && l.XLStatNS.trackEvent("download_detail", "comment_pic_click", "", 0, 0, 0, 0, "button=enlarge")
        }

        openRawImage() {
            r.aliImageInfo(this.imgUrl).then(e => {
                a.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(299), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(46), a = 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=" + r(this.commentInfo, "cid")), this.userInfo && (e += ",userid=" + r(this.userInfo, "uid")), a.XLStatNS.trackEvent("download_detail", "dltab_detail_comment_report", "", 0, 0, 0, 0, e)
        }

        handleReportCancel() {
            this.$emit("cancelReport")
        }

        mounted() {
            let e = "";
            this.commentInfo && (e += "commentid=" + r(this.commentInfo, "cid")), this.userInfo && (e += ",userid=" + r(this.userInfo, "uid")), a.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(301), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(9);
    let a = 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);
            r.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);
            r.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), r.XLStatNS.trackEvent("download_detail", "dltab_detail_quickcomment_click", "", 0, 0, 0, 0, "comments=" + t)
        }
    };
    n([o.Prop({default: ""})], a.prototype, "tid", void 0), n([o.Prop({default: []})], a.prototype, "quickReviewConfigs", void 0), n([o.Prop({default: "0"})], a.prototype, "curUserId", void 0), n([o.Watch("tid")], a.prototype, "handlerTid", null), n([o.Watch("index", {immediate: !0})], a.prototype, "onQuickReviewShow", null), a = n([o.Component({components: {}})], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(303), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(537), s = i(4), l = i(10), d = i(49), u = i(9);
    let c = class extends r.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 a.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],
                r = 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,${r}`)
        }

        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([r.Prop({default: 0})], c.prototype, "curTaskId", void 0), n([r.Prop()], c.prototype, "vipInfo", void 0), n([r.Prop()], c.prototype, "isLogined", void 0), n([r.Prop()], c.prototype, "curUserId", void 0), n([r.Watch("curTaskId")], c.prototype, "onCurTaskIdChange", null), c = n([r.Component], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(305), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(872), 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(307), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(62), a = i(6), s = i(0), l = i(3), d = i(59), u = i(567), c = i(35), h = i(113), f = i(14), p = i(30),
        g = i(9), m = i(34), v = i(16), y = i(11), w = i(397), k = i(48), T = i(73), b = i(10), C = i(4), S = i(15),
        I = i(49), _ = i(25), A = i(46), D = v.DownloadKernelEventManager.getEventManager(),
        x = y.DownloadKernelTaskManager.getTaskManager(), N = _.DownloadKernelCategoryManager.getCategoryManager(),
        E = s.default.getLogger("DownloadList");
    let P = class extends a.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 = O.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 = x.getTaskFromTaskId(t);
                if (i && i.getTaskBaseInfo().isMoving) {
                    e = !1;
                    break
                }
            }
            return e
        }

        completedListRestore() {
            w.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) {
            w.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 = x.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 I.default.isInitedAW();
                    let t = I.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 C.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 r = i.indexOf(e);
            if (-1 !== r) if (1 === n.length && n[0] === e) this.$refs[t].scrollTo(r); else if (r <= this.$refs[t].getLoadedCount() - 1) o([e]); else {
                let t = {
                    categoryId: this.currentCategoryId,
                    categoryViewId: this.currentCategoryViewId,
                    toIndex: r + 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()
                })
            }), C.client.attachServerEvent("OnPanTaskTypeChange", (e, ...t) => {
                t && (this.panTaskType = t[0])
            }), C.client.attachServerEvent("OnPanTaskUploadProgressChange", (e, ...t) => {
                !t || t.length < 1 || (this.panTaskProgress = t[0])
            }), C.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 = x.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(() => {
                b.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 = x.getTaskFromTaskId(e[0].taskId);
                        k.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 = x.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 r.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 T.AdHelperNS.getHotWordsAw(), i = A(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() {
            w.CompletedFilterNS.refresh((e, t) => {
                do {
                    if ("全部" === e) {
                        this.completedListRestore();
                        break
                    }
                    e && (this.completedFilter = e), t && this.FILTER_TASK(t)
                } while (0)
            }), this.statusChangedEventId = D.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 || N.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 ? C.client.callServerFunction("SetPerformanceItemEnd", "StartTask_" + e.getId()) : t !== l.DownloadKernel.TaskStatus.StopPending && t !== l.DownloadKernel.TaskStatus.Stopped || C.client.callServerFunction("SetPerformanceItemEnd", "PauseTask_" + e.getId())
                    }
                } while (0)
            }), x.isLoadStorageTaskFinish() ? this.bLoadDbFinish = !0 : (this.dataBaseLoadCookie = 0, m.DownloadKernelManager.attachListener(f.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd)), this.insertToCategoryViewEventId = D.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], r = n.map(e => e.getTaskBaseInfo());
                    this.INSERT_TO_CATEGORY_VIEW({
                        id: i,
                        categoryId: t,
                        tasks: r
                    }), 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), I.default.isInited() ? (this.sideNetdiskVasType = I.default.getConfigValue("main", "sideNetdisk", [3, 5]), this.qrCodeConfig = I.default.getConfigValue("main", "QRCode", {
                show: !1,
                text: "扫码加速"
            }), S.server.fireClientEvent("OnQrCodeConfigUpdate", this.qrCodeConfig)) : I.default.attachListener("OnRemoteGlobalConfigLoaded", () => {
                this.sideNetdiskVasType = I.default.getConfigValue("main", "sideNetdisk", [3, 5]), this.qrCodeConfig = I.default.getConfigValue("main", "QRCode", {
                    show: !1,
                    text: "扫码加速"
                }), S.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 && D.detachTaskEvent(l.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryViewEventId), void 0 !== this.statusChangedEventId && D.detachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, this.statusChangedEventId), void 0 !== this.dataBaseLoadCookie && (this.dataBaseLoadCookie = void 0, m.DownloadKernelManager.detachListener(f.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd))
        }
    };
    var O;
    n([a.Prop()], P.prototype, "vipInfo", void 0), n([a.Prop({})], P.prototype, "currentTabId", void 0), n([a.Prop({})], P.prototype, "currentCategoryId", void 0), n([a.Prop({})], P.prototype, "currentCategoryViewId", void 0), n([a.Prop({})], P.prototype, "downloadingTaskList", void 0), n([a.Prop({})], P.prototype, "completedTaskList", void 0), n([a.Prop({})], P.prototype, "recycleTaskList", void 0), n([a.Prop({})], P.prototype, "downloadingLoadedList", void 0), n([a.Prop({})], P.prototype, "completedLoadedList", void 0), n([a.Prop({})], P.prototype, "completedFilterTaskList", void 0), n([a.Prop({})], P.prototype, "completedFilterLoadedList", void 0), n([a.Prop({})], P.prototype, "recycleLoadedList", void 0), n([a.Prop({})], P.prototype, "downloadingSelectedIndexs", void 0), n([a.Prop({})], P.prototype, "completedSelectedTaskIndexs", void 0), n([a.Prop({})], P.prototype, "recycleSelectedTaskIndexs", void 0), n([a.Prop({})], P.prototype, "currentSelectdTaskIds", void 0), n([a.Prop({})], P.prototype, "UPDATE_CATEGORY", void 0), n([a.Prop({})], P.prototype, "UPDATE_CATEGORYVIEW", void 0), n([a.Prop({})], P.prototype, "SORT_CATEGORY_HISTORY", void 0), n([a.Prop({})], P.prototype, "SORT_CATEGORY_BY_FUNCTION", void 0), n([a.Prop({})], P.prototype, "UPDATE_DOWNLOADING_SELECTED_TASKS", void 0), n([a.Prop({})], P.prototype, "UPDATE_COMPLETED_SELECTED_TASKS", void 0), n([a.Prop({})], P.prototype, "UPDATE_RECYCLE_SELECTED_TASKS", void 0), n([a.Prop({})], P.prototype, "MOVE_TO_TOP", void 0), n([a.Prop({})], P.prototype, "UPDATE_DOWNLOADING_TASKLIST", void 0), n([a.Prop({})], P.prototype, "UPDATE_COMPLETED_TASKLIST", void 0), n([a.Prop({})], P.prototype, "UPDATE_RECYCLE_TASKLIST", void 0), n([a.Prop({})], P.prototype, "MOVE_TO_BOTTOM", void 0), n([a.Prop({})], P.prototype, "SELECT_PRE", void 0), n([a.Prop({})], P.prototype, "SELECT_NEXT", void 0), n([a.Prop({})], P.prototype, "INIT_CATEGORY_TASKLIST", void 0), n([a.Prop({})], P.prototype, "INSERT_TO_CATEGORY_VIEW", void 0), n([a.Prop({})], P.prototype, "UPDATE_TASK_STATUS", void 0), n([a.Prop({})], P.prototype, "LOAD_MORE", void 0), n([a.Prop({})], P.prototype, "FILTER_TASK", void 0), n([a.Prop({})], P.prototype, "FILTER_TASK_LOAD_MORE", void 0), n([a.Prop({})], P.prototype, "attachTaskEvent", void 0), n([a.Prop({})], P.prototype, "selectTab", void 0), n([a.Watch("currentCategoryId")], P.prototype, "onCategoryChange", null), n([a.Watch("currentCategoryViewId")], P.prototype, "onCategoryViewChange", null), n([a.Watch("completedFilter")], P.prototype, "onCompletedFilterChange", null), P = n([a.Component({components: {DownloadCategory: u.default}})], P), t.default = P, 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"
    }(O || (O = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(309), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(0), s = i(3), l = i(873), d = i(880), u = i(882), c = i(30), h = i(14), f = i(11), p = i(390),
        g = i(112), m = i(10), v = i(26), y = i(40), w = i(4), k = a.default.getLogger("DownloadCategory"),
        T = g.PluginWebviewMgrNS.getWebViewMgr(), b = f.DownloadKernelTaskManager.getTaskManager();
    let C = class extends r.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 && T.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);
                    k.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 (k.information("updateShouleiFileTransferTip autoShowToolTip", e), 1 === e) {
                        yield v.default.isInitedAw();
                        let e = v.default.getConfigInfo("shouleiDownload", "enableTransfer");
                        if (k.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(b.getTaskFromTaskId(i).getTaskBaseInfo())) {
                                    e = i;
                                    break
                                }
                            }
                            k.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 && T.updateTaskAdWebview()
        }

        handleSorting() {
            this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && (T.hideTaskAdWebview(), T.setSorting(!0))
        }

        handleSortEnd() {
            this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && (T.setSorting(!1), T.updateTaskAdWebview())
        }

        handleItemDbClick(e) {
            this.$emit("dblclick", e)
        }

        handleContextMenu(e) {
            this.$emit("contextmenu", e)
        }

        handleCancleActive(e) {
            k.information("receive eventShowHomePage", e);
            let t = b.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, r = 0;
                for (let t of i) {
                    if (r === e) break;
                    o += 1, t.classList.contains("v-leave") || (r += 1)
                }
                o === i.length && (o -= 1);
                let a = i[o];
                k.information("scroll index & realIndex", e, o), p.ThunderWindowNS.autoAdaptScrollIntoView(a, t, n)
            } while (0)
        }

        onVipPluginLoaded(e) {
            this.enbaleVipPlugin = e
        }

        resizeHandler(e) {
            this.enbaleVipPlugin && this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && T.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 = T.isVipPluginEnable(), this.vipPluginAttachFunc = this.onVipPluginLoaded.bind(this), T.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 && T.updateTaskAdWebview()
            });
            this.observer.observe(this.$el, {
                attributes: !0,
                childList: !0,
                characterData: !0
            }), this.updateShouleiFileTransferTip().catch(), "DownloadingItemContainer" === this.componentName && (setTimeout(() => {
                this.initScanCode()
            }, 2e3), w.client.attachServerEvent("UpdateAccelerationTimes", (e, t, i) => {
                this.accelerationTimes = t, this.days = i
            }), w.client.attachServerEvent("UpdateSaveStatus", (e, t) => {
                this.saveStatus = t
            }), w.client.attachServerEvent("UpdateFirstShowScanCode", this.updateFirstShowScanCode.bind(this)))
        }

        destroyed() {
            this.observer && this.observer.disconnect(), c.default.detachListener(h.NodeEventMesssageNS.eventShowHomePage, this.handleCancleActive), T.removeListener("vip_plugin_enable", this.vipPluginAttachFunc), window.removeEventListener("resize", this.resizeHandler.bind(this))
        }
    };
    n([r.Prop({})], C.prototype, "pulseForRename", void 0), n([r.Prop({default: ""})], C.prototype, "sharedKeyWords", void 0), n([r.Prop({})], C.prototype, "itemType", void 0), n([r.Prop({})], C.prototype, "currentCategoryId", void 0), n([r.Prop({})], C.prototype, "currentCategoryViewId", void 0), n([r.Prop({})], C.prototype, "componentName", void 0), n([r.Prop({})], C.prototype, "tasklist", void 0), n([r.Prop({})], C.prototype, "selectedTaskIds", void 0), n([r.Prop({default: !0})], C.prototype, "sortable", void 0), n([r.Prop({})], C.prototype, "COMMIT_SELECT", void 0), n([r.Prop({})], C.prototype, "COMMIT_UPDATE_TASKLIST", void 0), n([r.Prop({})], C.prototype, "LOAD_MORE", void 0), n([r.Prop({default: 100})], C.prototype, "panTaskProgress", void 0), n([r.Prop({default: 0})], C.prototype, "panTaskType", void 0), n([r.Prop({default: null})], C.prototype, "panTaskData", void 0), n([r.Prop()], C.prototype, "showSideNetdisk", void 0), n([r.Prop()], C.prototype, "qrCodeConfig", void 0), n([r.Prop()], C.prototype, "vipInfo", void 0), n([r.Watch("tasklist", {immediate: !0})], C.prototype, "onLoadedListChanged", null), n([r.Watch("tasklist")], C.prototype, "onTasklistChange", null), n([r.Watch("currentCategoryViewId")], C.prototype, "handleCategoryShow", null), C = n([r.Component({
        components: {
            DownloadingItemContainer: l.default,
            CompletedItemContainer: d.default,
            RecycleItemContainer: u.default
        }
    })], C), t.default = C
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(311), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(874), o = i(24), r = i(3), a = i(25).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 === r.DownloadKernel.CategroyViewID.Downloading) {
                        i = e.DownloadListState.taskList[t].tasksMap[n];
                        break
                    }
                } else if (a.isPrivateCategory(o)) for (let t = 0; t < e.DownloadListState.taskListPrivate.length; t++) e.DownloadListState.taskListPrivate[t].id === r.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(313), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(3), s = i(11), l = i(13), d = i(65), u = i(39), c = i(59), h = i(14), f = i(35), p = i(30),
        g = i(9), m = i(16), v = i(45), y = i(0), w = i(568), k = i(102), T = i(112), b = i(542), C = i(4), S = i(52),
        I = i(15), _ = i(10), A = i(72), D = i(150), x = {margin: 0, width: 72},
        N = T.PluginWebviewMgrNS.getWebViewMgr(), E = m.DownloadKernelEventManager.getEventManager(),
        P = s.DownloadKernelTaskManager.getTaskManager(), O = 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 r.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() {
            return this.active && "" !== this.shortlink && this.qrCodeConfig.show
        }

        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, a.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, e, this.active)
        }

        onTaskBaseChanged() {
            let e = k.DownloadJammedNS.isValidatingFileData(this.taskId),
                t = k.DownloadJammedNS.isCorrectingData(this.taskId);
            if (e) {
                this.toolTip.validating = "正在校验文件...";
                let e = k.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, a.DownloadKernel.CategroyViewID.Downloading, this.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, this.$el)
            })
        }

        onShowCloudExpand() {
            return o(this, void 0, void 0, function* () {
                yield this.$nextTick(), this.isShowExpand && N.updateTaskAdWebview()
            })
        }

        onTaskFailedChange(e) {
            "search" !== this.itemType && this.enbaleVipPlugin && this.active && (e ? N.hideTaskAdWebview(this.taskId) : this.$nextTick(() => {
                N.showTaskAdWebview(this.taskId, this)
            }))
        }

        onOptionsChanged(e) {
            this.active && p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemActive, a.DownloadKernel.CategroyViewID.Downloading, e === a.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, this.$el), this.chosen && p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemChosen, a.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, e === a.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 !== a.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 === a.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 = P.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 = P.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 === a.DownloadKernel.CategroyViewID.Downloading && p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemActive, a.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 A.queryBirdKeyInfo(e, void 0, void 0, t);
                    O.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 === a.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 = P.getTaskFromTaskId(this.taskBase.taskId),
                        i = {task_id: String(this.taskBase.taskId), task_infos: []};
                    if (this.taskBase.taskType === a.DownloadKernel.TaskType.Bt) {
                        let t = e.getExtraObject(), n = t.getInfoId(), o = t.getDisplayName();
                        i.infohash = n, i.bt_title = o;
                        let r = t.getBtFileList();
                        for (let [, e]of r) {
                            let t = {};
                            e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.Download) && e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileStatus) < 3 && (t.url = "", t.gcid = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.Gcid), t.cid = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.Cid) || t.gcid, t.filename = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileName), t.filesize = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileSize), t.file_index = e.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.RealIndex), i.task_infos.push(t))
                        }
                    } else if (this.taskBase.taskType === a.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 b.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;
                            D.toCanvas(t, e, x, e => {
                                O.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 && I.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 === a.DownloadKernel.TaskStatus.Failed
        }

        get isForbidden() {
            let e = !1;
            do {
                if (this.taskError) {
                    let t = 0, i = P.getTaskFromTaskId(this.taskBase.taskId);
                    if (null !== i && (t = i.getTaskAttribute(a.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 = P.getTaskFromTaskId(this.taskBase.taskId);
                null !== i && (t = i.getTaskAttribute(a.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 === a.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 = k.DownloadJammedNS.isValidatingFileData(this.taskId);
            k.DownloadJammedNS.isCorrectingData(this.taskId) && !t && (O.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), O.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 !== a.DownloadKernel.TaskStatus.StartPending && this.taskBase.taskStatus !== a.DownloadKernel.TaskStatus.StopPending && this.taskBase.taskStatus !== a.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 !== a.DownloadKernel.TaskStatus.StartWaiting && this.taskBase.taskStatus !== a.DownloadKernel.TaskStatus.StartPending && this.taskBase.taskStatus !== a.DownloadKernel.TaskStatus.Started || (e = !0), e
        }

        get isGroup() {
            let e = !1;
            return this.taskBase.taskType === a.DownloadKernel.TaskType.Group && (e = !0), e
        }

        get isBt() {
            let e = !1;
            return this.taskBase.taskType === a.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 === a.DownloadKernel.TaskStatus.Failed
        }

        get isShowExpand() {
            return this.taskStatus !== a.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 = w.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()), P.getTaskFromTaskId(this.taskBase.taskId) && f.TaskOperatorNs.downloadAndPlay(this.taskBase.taskId, -1, "bianxiabianbo", "downloading", this.currentCategoryId, !1, 0, !this.playCompleted).catch()
        }

        handleStartTask() {
            C.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()), P.stopTask(this.taskBase.taskId, a.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(a.DownloadKernel.BtFileAttribute.Duration),
                        o = n.getBtFileAttribute(a.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(a.DownloadKernel.TaskAttribute.Duration),
                        o = n.getTaskAttribute(a.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(a.DownloadKernel.TaskAttribute.Duration),
                    i = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.PlayPosition);
                t && (this.playProgress = i / t)
            }
        }

        onBtSubFileDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== a.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                if (!e[1] || !e[2]) break;
                if (e[1] === this.taskBase.taskId) {
                    let e = P.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] !== a.DownloadKernel.TaskEventType.StatusChanged) break;
                if (!e[1]) break;
                let t = e[1];
                if (t[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.CategoryId) !== this.currentCategoryId) break;
                for (let e = 0; e < t.length; e++) {
                    let i = t[e];
                    if (i.getTaskAttribute(a.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] !== a.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged) break;
                if (!e[1]) break;
                e[1].forEach((e, t) => {
                    if (t === this.taskId) {
                        let e = P.getTaskFromTaskId(t);
                        e && this.updateGroupTaskPlayProgress(e)
                    }
                })
            } while (0)
        }

        onP2spTaskDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== a.DownloadKernel.TaskEventType.DetailChanged) break;
                if (!e[1]) break;
                let t = e[2];
                if (t & a.DownloadKernel.TaskDetailChangedFlags.PlayPosition || t & a.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 C.client.callServerFunction("SelectNav", S.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 C.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 C.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 C.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 = P.getTaskFromTaskId(this.taskBase.taskId);
                if (this.taskBase.taskType === a.DownloadKernel.TaskType.Bt) {
                    this.btSubDetailCookie = E.attachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.onBtSubFileDetailChanged);
                    let t = e.getExtraObject().getDownloadFile();
                    this.subTaskCount = t.length, this.updateBtTaskPlayProgress(e)
                } else if (this.taskBase.taskType === a.DownloadKernel.TaskType.Group) {
                    this.groupTaskStatusCookie = E.attachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, this.onGroupTaskStatusChanged);
                    let t = e.getExtraObject();
                    this.subTaskCount = t.getDownloadTaskCount(), this.groupTaskSubFileDetailChangedCookie = E.attachTaskEvent(a.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.onGroupTaskSubFileDetailChanged), this.updateGroupTaskPlayProgress(e)
                } else this.p2spTaskDetailChangedCookie = E.attachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, this.onP2spTaskDetailChanged), this.updateP2spTaskPlayProgress(e)
            })
        }

        unInitialize() {
            return o(this, void 0, void 0, function* () {
                -1 !== this.btSubDetailCookie && (E.detachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.btSubDetailCookie), this.btSubDetailCookie = -1), -1 !== this.groupTaskStatusCookie && (E.detachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, this.groupTaskStatusCookie), this.groupTaskStatusCookie = -1), -1 !== this.groupTaskSubFileDetailChangedCookie && (E.detachTaskEvent(a.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.groupTaskSubFileDetailChangedCookie), this.groupTaskSubFileDetailChangedCookie = -1), -1 !== this.p2spTaskDetailChangedCookie && (E.detachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, this.p2spTaskDetailChangedCookie), this.p2spTaskDetailChangedCookie = -1), this.clearGetShortLinkTimer()
            })
        }

        created() {
            if (this.isBt) {
                if (P.getTaskFromTaskId(this.taskBase.taskId).getExtraObject().isBtFileLoadEnd()) this.taskExtraLoaded = !0; else {
                    let e = void 0, t = () => {
                        this.taskExtraLoaded = !0, E.detachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileLoaded, e), e = void 0
                    };
                    e = E.attachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileLoaded, t)
                }
            } else this.taskExtraLoaded = !0;
            this.initialize()
        }

        mounted() {
            this.onOptionsChanged(this.currentCategoryViewId), C.client.callServerFunction("SetPerformanceItemEnd", "ClickDownload")
        }

        destroyed() {
            this.unInitialize(), "search" !== this.itemType && (this.active && (p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemActive, a.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, a.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, !1, !1))
        }
    };
    n([r.Prop()], F.prototype, "isFirstShowScanCode", void 0), n([r.Prop()], F.prototype, "vipInfo", void 0), n([r.Prop()], F.prototype, "showSideNetdisk", void 0), n([r.Prop({})], F.prototype, "enbaleVipPlugin", void 0), n([r.Prop({})], F.prototype, "vipSpeedInfo", void 0), n([r.Prop({})], F.prototype, "pulseForRename", void 0), n([r.Prop({default: ""})], F.prototype, "sharedKeyWords", void 0), n([r.Prop({})], F.prototype, "itemType", void 0), n([r.Prop({})], F.prototype, "index", void 0), n([r.Prop({})], F.prototype, "taskId", void 0), n([r.Prop({})], F.prototype, "taskBase", void 0), n([r.Prop({})], F.prototype, "currentCategoryId", void 0), n([r.Prop({})], F.prototype, "currentCategoryViewId", void 0), n([r.Prop()], F.prototype, "chosen", void 0), n([r.Prop()], F.prototype, "active", void 0), n([r.Prop()], F.prototype, "dataChecking", void 0), n([r.Prop({default: 0})], F.prototype, "accelerationTimes", void 0), n([r.Prop()], F.prototype, "panTaskProgress", void 0), n([r.Prop({default: 0})], F.prototype, "panTaskType", void 0), n([r.Prop({})], F.prototype, "panTaskData", void 0), n([r.Prop()], F.prototype, "qrCodeConfig", void 0), n([r.Prop()], F.prototype, "saveStatus", void 0), n([r.Watch("chosen")], F.prototype, "onChosenChanged", null), n([r.Watch("taskBase")], F.prototype, "onTaskBaseChanged", null), n([r.Watch("enbaleVipPlugin")], F.prototype, "onEnableVipPlugin", null), n([r.Watch("isShowCloudExpand")], F.prototype, "onShowCloudExpand", null), n([r.Watch("isFailed")], F.prototype, "onTaskFailedChange", null), n([r.Watch("currentCategoryViewId")], F.prototype, "onOptionsChanged", null), n([r.Watch("panTaskType")], F.prototype, "onPanTaskTypeChange", null), n([r.Watch("taskId", {immediate: !0})], F.prototype, "onTaskIdChanged", null), n([r.Watch("sharedKeyWords", {immediate: !0})], F.prototype, "onKeyWordsChange", null), n([r.Watch("pulseForRename", {immediate: !0})], F.prototype, "onRenamePulse", null), n([r.Watch("active")], F.prototype, "onActiveChanged", null), F = n([r.Component({
        components: {ItemVipSpeedPlugin: () => Promise.resolve().then(() => i(879))},
        watch: {}
    })], F), t.default = F
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(315), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(15), s = i(3), l = i(13);
    let d = class extends r.Vue {
        onHoverChanged(e, t) {
            return o(this, void 0, void 0, function* () {
                a.server.fireClientEvent("on_task_item_hover", e, this.taskId, this.vipSpeedInfo, "hover")
            })
        }

        clickVipLink() {
            return o(this, void 0, void 0, function* () {
                a.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([r.Prop({})], d.prototype, "vipSpeedInfo", void 0), n([r.Prop({})], d.prototype, "taskBase", void 0), n([r.Prop({})], d.prototype, "startStatusPrompt", void 0), n([r.Prop({})], d.prototype, "active", void 0), n([r.Prop({})], d.prototype, "hover", void 0), n([r.Watch("isHover")], d.prototype, "onHoverChanged", null), d = n([r.Component({components: {}})], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(317), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(881), o = i(24), r = i(3), a = i(25).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 === r.DownloadKernel.CategroyViewID.Completed) {
                            i = e.DownloadListState.taskList[t].tasksMap[n];
                            break
                        }
                    } else if (a.isPrivateCategory(o)) for (let t = 0; t < e.DownloadListState.taskListPrivate.length; t++) e.DownloadListState.taskListPrivate[t].id === r.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(319), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(2), a = i(41), s = i(6), l = i(0), d = i(3), u = i(11), c = i(65), h = i(13), f = i(39), p = i(40),
        g = i(35), m = i(14), v = i(9), y = i(30), w = i(22), k = i(37), T = i(55), b = i(8), C = i(48), S = i(16),
        I = i(26), _ = i(38), A = i(407), D = i(15), x = l.default.getLogger("Thunder.Download.Completed"),
        N = u.DownloadKernelTaskManager.getTaskManager(), E = S.DownloadKernelEventManager.getEventManager();
    let P = 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 && a.unwatchFile(t, this.handleWatchFile), this.handleWatchFile().catch(), e && a.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 = N.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 : r.join(e, t)
        }

        handleWatchFile(e, t) {
            return o(this, void 0, void 0, function* () {
                void 0 !== e && void 0 !== t && x.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), D.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), x.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, x.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 = N.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 = N.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 = N.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 (N.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(), I.default.isInitedAw().then(() => {
                this.enableShouleiFileTransfer = 0 !== I.default.getConfigInfo("shouleiDownload", "enableTransfer")
            }).catch(), A.default.addListener(A.UserEventNS.authorityChanged, () => {
                this.isVip = A.default.isVip
            }), this.isVip = A.default.isVip
        }

        destroyed() {
            this.unInitialize(), x.information("item destroyed"), a.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 = r.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 = N.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 b.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 b.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 = N.getTaskFromTaskId(this.taskBase.taskId).getExtraObject().getDownloadFile().length
            } else if (this.isGroup) {
                t = N.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(T.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 (N.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) {
                    t = "download_getback_complete_play";
                    let e = this.taskBase.taskName.split("."), i = e[e.length - 1], n = "video";
                    f.TaskUtilHelper.getTaskFileType(this.taskBase.taskName) === f.TaskUtilHelper.FileExtType.Music && (n = "music"), v.XLStatNS.trackEvent("pc_yunpan", "yunpan_consumption_click", "", 0, 0, 0, 0, "from=download_left_gotback_play_click,file_type=" + n + ",suffix=" + i)
                }
                -1 === this.currentCategoryId && -1 !== this.taskBase.categoryId && (this.currentCategoryViewId === d.DownloadKernel.CategroyViewID.Downloading ? t = "download_getbacking_play" : this.currentCategoryViewId === d.DownloadKernel.CategroyViewID.Completed && (t = "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 = r.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) {
                    w.MessageBox.confirm({
                        title: "提示",
                        content: "此文件已经被删除，是否需要重新下载？",
                        type: w.MessageBox.ConfirmType.Info,
                        okText: "重新下载",
                        cancelText: "删除任务"
                    }).then(e => {
                        e.action === k.MessageBoxNS.Action.OK ? p.TaskCtrlOperatorNS.redownloadTask([this.taskBase], !1) : e.action === k.MessageBoxNS.Action.Cancel && g.TaskOperatorNs.destroyTasks([this.taskBase], !1)
                    });
                    break
                }
                if (this.taskBase.taskType === d.DownloadKernel.TaskType.Bt) {
                    let e = N.getTaskFromTaskId(this.taskBase.taskId);
                    C.SingleBtTaskNS.isSingleBtTask(e).then(e => {
                        if (e) {
                            let e = "download_left_complate_double_click";
                            -1 !== this.currentCategoryId ? e = "download_private_space_local_play" : -1 === this.currentCategoryId && -1 !== this.taskBase.categoryId && (e = "download_getback_complete_play"), g.TaskOperatorNs.openTaskItem(this.taskBase, void 0, void 0, void 0, void 0, void 0, e)
                        } else g.TaskOperatorNs.openTaskFolder(this.taskBase, !0)
                    }).catch()
                } else if (this.taskBase.taskType === d.DownloadKernel.TaskType.Group) {
                    let e = N.getTaskFromTaskId(this.taskBase.taskId);
                    g.TaskOperatorNs.executeInstallFile(e).then(e => {
                        e || g.TaskOperatorNs.openTaskFolder(this.taskBase, !0)
                    }).catch()
                } else {
                    let e = "download_left_complate_double_click";
                    if (-1 !== this.currentCategoryId ? e = "download_private_space_local_play" : -1 !== this.taskBase.categoryId && (e = "download_getback_complete_play"), this.canPlay) {
                        let t = "double_click", i = this.statExtData();
                        i = `${i},panel=finished,click_source=${t}`, v.XLStatNS.trackEvent("download_leftpanel", "play_click", "", 0, 0, 0, 0, i), N.getTaskFromTaskId(this.taskBase.taskId) && g.TaskOperatorNs.downloadAndPlay(this.taskBase.taskId, -1, t, "finished", this.currentCategoryId, !1, 0, !this.playCompleted, !1, e).catch()
                    } else g.TaskOperatorNs.openTaskItem(this.taskBase, void 0, void 0, void 0, void 0, void 0, e)
                }
            } while (0)
        }
    };
    n([s.Prop({})], P.prototype, "filtering", void 0), n([s.Prop({})], P.prototype, "fileTransferTooltip", void 0), n([s.Prop({})], P.prototype, "pulseForRename", void 0), n([s.Prop({})], P.prototype, "sharedKeyWords", void 0), n([s.Prop({})], P.prototype, "itemType", void 0), n([s.Prop({})], P.prototype, "index", void 0), n([s.Prop({})], P.prototype, "taskId", void 0), n([s.Prop({})], P.prototype, "taskBase", void 0), n([s.Prop({})], P.prototype, "currentCategoryId", void 0), n([s.Prop({})], P.prototype, "currentCategoryViewId", void 0), n([s.Prop()], P.prototype, "deleted", void 0), n([s.Prop()], P.prototype, "chosen", void 0), n([s.Prop()], P.prototype, "active", void 0), n([s.Watch("chosen")], P.prototype, "onChosenChanged", null), n([s.Watch("active")], P.prototype, "onActiveChanged", null), n([s.Watch("currentCategoryViewId")], P.prototype, "onOptionsChanged", null), n([s.Watch("fullFileName", {immediate: !0})], P.prototype, "onFullFileNameChange", null), n([s.Watch("opened", {immediate: !0})], P.prototype, "onOpenedChange", null), n([s.Watch("sharedKeyWords", {immediate: !0})], P.prototype, "onKeyWordsChange", null), n([s.Watch("pulseForRename", {immediate: !0})], P.prototype, "onRenamePulse", null), n([s.Watch("showShouleiFileTransferIcon", {immediate: !0})], P.prototype, "onShouleiFileTransferIconShow", null), P = n([s.Component], P), t.default = P
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(321), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(883), o = i(24), r = i(3);
    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 === r.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(323), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(2), a = i(41), s = i(6), l = i(3), d = i(11), u = i(65), c = i(13), h = i(39), f = i(40), p = i(35),
        g = i(14), m = i(30), v = i(9), y = i(22), w = i(37), k = i(8), T = i(48),
        b = d.DownloadKernelTaskManager.getTaskManager();
    let C = 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(), a.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 : r.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 = r.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 k.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 = b.getTaskFromTaskId(this.taskBase.taskId);
            return t && (e = t.isSupportPlay()), e
        }

        get isSingleTask() {
            let e = !0;
            if (this.taskBase.taskType === l.DownloadKernel.TaskType.Bt) {
                b.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()), b.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 === w.MessageBoxNS.Action.OK ? f.TaskCtrlOperatorNS.redownloadTask([this.taskBase], !1) : e.action === w.MessageBoxNS.Action.Cancel && p.TaskOperatorNs.destroyTasks([this.taskBase], !1)
                            });
                            break
                        }
                        if (this.taskBase.taskType === l.DownloadKernel.TaskType.Bt) {
                            let e = b.getTaskFromTaskId(this.taskBase.taskId);
                            T.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), b.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, a.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({})], C.prototype, "pulseForRename", void 0), n([s.Prop({})], C.prototype, "sharedKeyWords", void 0), n([s.Prop({})], C.prototype, "itemType", void 0), n([s.Prop({})], C.prototype, "index", void 0), n([s.Prop({})], C.prototype, "taskId", void 0), n([s.Prop({})], C.prototype, "taskBase", void 0), n([s.Prop({})], C.prototype, "currentCategoryId", void 0), n([s.Prop({})], C.prototype, "currentCategoryViewId", void 0), n([s.Prop()], C.prototype, "active", void 0), n([s.Prop()], C.prototype, "chosen", void 0), n([s.Prop()], C.prototype, "deleted", void 0), n([s.Watch("currentCategoryViewId")], C.prototype, "onOptionsChanged", null), n([s.Watch("chosen")], C.prototype, "onChosenChanged", null), n([s.Watch("active")], C.prototype, "onActiveChanged", null), n([s.Watch("taskId", {immediate: !0})], C.prototype, "onTaskIdChanged", null), n([s.Watch("sharedKeyWords", {immediate: !0})], C.prototype, "onKeyWordsChange", null), n([s.Watch("pulseForRename", {immediate: !0})], C.prototype, "onRenamePulse", null), n([s.Watch("fullFileName", {immediate: !0})], C.prototype, "onFullFileNameChange", null), C = n([s.Component], C), t.default = C
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(325), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(13), a = i(3);
    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 === a.DownloadKernel.TaskStatus.Failed
        }

        formatSizeCustom(e) {
            return r.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(327), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(887), 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(329), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(87), s = i(4), l = i(9);
    let d = class extends r.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 a.PrivateSpaceHelperNS.phoneVerifyPrivateCategory(e)) && a.PrivateSpaceHelperNS.openPrivateCategory(e)
                }
            })
        }

        created() {
            let e = a.PrivateSpaceHelperNS.getEventEmitter();
            this.privateSpaceSetPasswordListener || (this.privateSpaceSetPasswordListener = (e => {
                e && this.SHOW_PRIVATE_SPACE_OPEN_PAGE(!1)
            }), e.on(a.PrivateSpaceHelperNS.EventType.SetPassword, this.privateSpaceSetPasswordListener))
        }

        destroyed() {
            if (this.privateSpaceSetPasswordListener) {
                a.PrivateSpaceHelperNS.getEventEmitter().removeListener(a.PrivateSpaceHelperNS.EventType.SetPassword, this.privateSpaceSetPasswordListener), this.privateSpaceSetPasswordListener = null
            }
        }
    };
    n([r.Prop({})], d.prototype, "SHOW_PRIVATE_SPACE_OPEN_PAGE", void 0), n([r.Prop({})], d.prototype, "UPDATE_CATEGORYVIEW", void 0), d = n([r.Component], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(331), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(889), 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(333), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(0), a = i(3), s = i(59), l = i(567), d = i(35), u = i(113), c = i(14), h = i(30), f = i(9),
        p = i(34), g = i(16), m = i(11), v = i(5), y = i(90), w = i(31),
        k = g.DownloadKernelEventManager.getEventManager(), T = m.DownloadKernelTaskManager.getTaskManager(),
        b = r.default.getLogger("DownloadList");
    let C = class extends o.Vue {
        constructor() {
            super(...arguments), this.categoryLastSelectList = [{
                category: a.DownloadKernel.CategroyViewID.Downloading,
                lastIndex: 0
            }, {
                category: a.DownloadKernel.CategroyViewID.Completed,
                lastIndex: 0
            }, {
                category: a.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) {
            b.information("多关键字数组:", e);
            let t = [], i = [];
            for (let n = 0; n < e.length; n++) {
                let o = a.DownloadKernel.SearchKeyType.NameInclude;
                this.escapeCode = "";
                let r = this.replaceSpecialKeyForDB(e[n]);
                w.ThunderKernel.searchTask(o, r, -1, this.escapeCode, n => {
                    let o, r;
                    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 = T.getTaskFromTaskId(e[t])) && (r = o.getTaskAttribute(a.DownloadKernel.TaskAttribute.CategoryViewId)), r && (r === a.DownloadKernel.CategroyViewID.Downloading ? this.downloadingSearchArray.push(e[t]) : r === a.DownloadKernel.CategroyViewID.Completed ? this.completeSearchArray.push(e[t]) : r === a.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 = T.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(a.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, a.DownloadKernel.TaskStopReason.Manual) : s.TaskStatusHelper.canStartSelectedTask(this.currentCategoryViewId, this.currentSelSearchTaskInfos) ? d.TaskOperatorNs.startTasks(this.currentSelSearchTaskInfos) : b.information("downloaditem dbclick do nothing")
        }

        recycleItemDbClick() {
            b.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 !== a.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(a.DownloadKernel.CategroyViewID.Completed)
            })
        }

        mounted() {
            this.statusChangedEventId = k.attachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    let t = e[1];
                    if (t.length > 0) {
                        if (t[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.CategoryId) !== this.currentCategoryId) break;
                        if (this.UPDATE_TASK_STATUS(t.map(e => e.getTaskBaseInfo())), t[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.Background)) break;
                        if (t[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.GroupTaskId) > 0) break;
                        t[0].getTaskStatus() !== a.DownloadKernel.TaskStatus.Succeeded && t[0].getTaskStatus() !== a.DownloadKernel.TaskStatus.Seeding || this.$nextTick(() => {
                            this.startSearch()
                        })
                    }
                } while (0)
            }), T.isLoadStorageTaskFinish() ? this.bLoadDbFinish = !0 : (this.dataBaseLoadCookie = 0, p.DownloadKernelManager.attachListener(c.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd)), this.removeFromCategoryViewEventId = k.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 (e[1] !== this.currentCategoryId) break;
                    let t = e[2], i = e[3];
                    if (t === a.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 === a.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 === a.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 = k.attachTaskEvent(a.DownloadKernel.TaskEventType.InsertToCategoryView, (...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 = e[4];
                    n.map(e => e.getTaskBaseInfo()), this.$nextTick(() => {
                        this.startSearch()
                    }), this.bLoadDbFinish && i === a.DownloadKernel.CategroyViewID.Downloading && (o === a.DownloadKernel.TaskInsertReason.Create && this.UPDATE_CATEGORY(t), this.$nextTick(() => {
                        if (this.currentCategoryViewId !== a.DownloadKernel.CategroyViewID.Downloading) this.UPDATE_CATEGORYVIEW(a.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 = k.attachTaskEvent(a.DownloadKernel.TaskEventType.TaskRenamed, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.TaskRenamed) break;
                    this.pulseEventFlag = !this.pulseEventFlag, this.$nextTick(() => {
                        this.startSearch()
                    })
                } while (0)
            }), this.cookieOfTaskDestroyed = k.attachTaskEvent(a.DownloadKernel.TaskEventType.TaskDestroyed, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== a.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 && k.detachTaskEvent(a.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryViewEventId), void 0 !== this.removeFromCategoryViewEventId && k.detachTaskEvent(a.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.removeFromCategoryViewEventId), void 0 !== this.statusChangedEventId && k.detachTaskEvent(a.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, k.detachTaskEvent(a.DownloadKernel.TaskEventType.TaskRenamed, this.cookieOfTaskRenamed)), this.cookieOfTaskDestroyed && (this.cookieOfTaskDestroyed = void 0, k.detachTaskEvent(a.DownloadKernel.TaskEventType.TaskDestroyed, this.cookieOfTaskDestroyed))
        }
    };
    n([o.Prop({})], C.prototype, "hasLeftBottomAd", void 0), n([o.Prop({})], C.prototype, "currentTabId", void 0), n([o.Prop({})], C.prototype, "currentCategoryId", void 0), n([o.Prop({})], C.prototype, "currentCategoryViewId", void 0), n([o.Prop({})], C.prototype, "downloadingTaskList", void 0), n([o.Prop({})], C.prototype, "completedTaskList", void 0), n([o.Prop({})], C.prototype, "recycleTaskList", void 0), n([o.Prop({})], C.prototype, "downloadingSelectedIndexs", void 0), n([o.Prop({})], C.prototype, "completedSelectedTaskIndexs", void 0), n([o.Prop({})], C.prototype, "recycleSelectedTaskIndexs", void 0), n([o.Prop({})], C.prototype, "downloadingResultCount", void 0), n([o.Prop({})], C.prototype, "completedResultCount", void 0), n([o.Prop({})], C.prototype, "recycleResultCount", void 0), n([o.Prop({})], C.prototype, "UPDATE_CATEGORY", void 0), n([o.Prop({})], C.prototype, "UPDATE_CATEGORYVIEW", void 0), n([o.Prop({})], C.prototype, "UPDATE_DOWNLOADING_SELECTED_TASKS", void 0), n([o.Prop({})], C.prototype, "UPDATE_COMPLETED_SELECTED_TASKS", void 0), n([o.Prop({})], C.prototype, "UPDATE_RECYCLE_SELECTED_TASKS", void 0), n([o.Prop({})], C.prototype, "UPDATE_DOWNLOADING_TASKLIST", void 0), n([o.Prop({})], C.prototype, "UPDATE_COMPLETED_TASKLIST", void 0), n([o.Prop({})], C.prototype, "UPDATE_RECYCLE_TASKLIST", void 0), n([o.Prop({})], C.prototype, "UPDATE_TASK_STATUS", void 0), n([o.Prop({})], C.prototype, "attachTaskEvent", void 0), n([o.Prop({})], C.prototype, "selectTab", void 0), n([o.Watch("currentCategoryId")], C.prototype, "onCategoryChange", null), C = n([o.Component({components: {DownloadCategory: l.default}})], C), t.default = C
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(335), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(891), 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"
        },
        mapGettersToProps: {baseSetting: "baseSetting"}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(337), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(892), a = i(6), s = i(17), l = i(10), d = i(14), u = i(142), c = i(88), h = i(108), f = i(23),
        p = i(105), g = i(4), m = i(0), v = i(76), y = m.default.getLogger("setting-center-view"),
        w = u.CommunityNaviteFunctionNS.CommunityNaviteFunction.getNativeModule();
    let k = class extends a.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) {
                        y.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);
            if (this.handleConfChange(1 === Number(n), "MagnetGenericSettings-MagnetWatchLink"), !!!l.ConfigNS.getValue("Monitor", "ExtendNames", "")) {
                let e = v.BHOConfigNS.getValue("Monitor", "ExtendNames", v.BHOConfigNS.getDefaultExtendNames());
                l.ConfigNS.setValue("Monitor", "ExtendNames", e)
            }
        }

        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();
                    y.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([a.Prop({})], k.prototype, "initSettingData", void 0), n([a.Prop({})], k.prototype, "formData", void 0), n([a.Prop({})], k.prototype, "confSchema", void 0), n([a.Prop({})], k.prototype, "removeConfigData", void 0), n([a.Prop({})], k.prototype, "setConfigValue", void 0), n([a.Prop({})], k.prototype, "setFormData", void 0), n([a.Prop({})], k.prototype, "addFormdataItem", void 0), n([a.Prop({})], k.prototype, "addSchemaItem", void 0), n([a.Prop({})], k.prototype, "addSelectItem", void 0), k = n([a.Component({components: {generatorView: r.default}})], k), t.default = k
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(339), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(893), r = i(897), a = i(93), s = i(156), l = i(899), d = i(900), u = i(155), c = i(901), h = i(569),
        f = i(154), p = i(902), 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: r.default,
            confSelect: a.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(341), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(153), s = i(117), l = i(154), d = i(93), u = i(155), c = i(895), h = i(896), f = i(156);
    let p = class extends r.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 a.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([r.Prop({})], p.prototype, "item", void 0), n([r.Prop({})], p.prototype, "formData", void 0), n([r.Prop()], p.prototype, "value", void 0), n([r.Prop()], p.prototype, "label", void 0), p = n([r.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(343), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let r = class extends o.Vue {
    };
    n([o.Prop()], r.prototype, "classes", 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(345), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(153), s = i(22), l = i(37), d = i(13), u = i(17), c = i(117), h = i(569);
    let f = class extends r.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 a.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) a.ConfigHelperNS.setValue(e.formData[t].section, e.formData[t].key, e.formData[t].value)
                }).catch()
            })
        }
    };
    n([r.Prop({})], f.prototype, "item", void 0), n([r.Prop()], f.prototype, "classes", void 0), n([r.Prop()], f.prototype, "text", void 0), n([r.Prop()], f.prototype, "disabled", void 0), n([r.Prop({})], f.prototype, "formData", void 0), f = n([r.Component({
        components: {
            confTip: c.default,
            confSpeedText: h.default
        }
    })], f), t.default = f
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(347), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(153);
    let s = class extends r.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 a.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 a.ConfigHelperNS.getValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeedTmp", 1024)) + "KB/S"), this.maxUploadSpeed = e
            })
        }
    };
    n([r.Prop({})], s.prototype, "item", void 0), n([r.Prop({})], s.prototype, "formData", void 0), n([r.Watch("formData", {
        immediate: !0,
        deep: !0
    })], s.prototype, "onFormDataChange", null), s = n([r.Component], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(349), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(12), s = i(414), l = i(570), d = i(15), u = i(0).default.getLogger("conf-select");
    let c = class extends r.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 a.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 a.asyncRemoteCall.getDialog();
                    let i = yield a.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([r.Prop({})], c.prototype, "item", void 0), n([r.Prop()], c.prototype, "label", void 0), n([r.Prop({})], c.prototype, "formData", void 0), n([r.Prop()], c.prototype, "options", void 0), n([r.Prop()], c.prototype, "value", void 0), n([r.Prop()], c.prototype, "disabled", void 0), n([r.Prop()], c.prototype, "classes", void 0), n([r.Prop()], c.prototype, "name", void 0), n([r.Prop()], c.prototype, "placeHolder", void 0), n([r.Watch("formData", {deep: !0})], c.prototype, "onFormDataChange", null), c = n([r.Component({components: {SelectNative: l.default}})], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(351), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6);
    let a = class extends r.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([r.Prop()], a.prototype, "value", void 0), n([r.Prop({default: () => []})], a.prototype, "options", void 0), n([r.Prop({default: !1})], a.prototype, "useNative", void 0), n([r.Prop({default: "bottom"})], a.prototype, "position", void 0), n([r.Watch("options")], a.prototype, "onOptionsChanged", null), a = n([r.Component], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(353), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(414), r = i(6), a = i(154);
    let s = class extends r.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([r.Prop()], s.prototype, "item", void 0), n([r.Prop({})], s.prototype, "formData", void 0), n([r.Prop()], s.prototype, "disabled", void 0), n([r.Prop()], s.prototype, "value", void 0), n([r.Prop()], s.prototype, "name", void 0), n([r.Prop()], s.prototype, "label", void 0), s = n([r.Component({components: {confBtn: a.default}})], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(355), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(414), r = i(6);
    let a = class extends r.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([r.Prop({})], a.prototype, "item", void 0), n([r.Prop()], a.prototype, "value", void 0), n([r.Prop()], a.prototype, "disabled", void 0), a = n([r.Component], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(357), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(570);
    let a = 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({})], a.prototype, "item", void 0), n([o.Prop()], a.prototype, "value", void 0), n([o.Prop()], a.prototype, "disabled", void 0), a = n([o.Component({components: {SelectNative: r.default}})], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(359), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(17);
    let a = 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 && (r.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                this.userId = e
            }), r.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                this.userId = ""
            }))
        }
    };
    n([o.Prop({})], a.prototype, "item", void 0), n([o.Prop()], a.prototype, "classes", void 0), n([o.Prop()], a.prototype, "extIndex", 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(361), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(117), s = i(154), l = i(155), d = i(93), u = i(898), c = i(17), h = i(4);
    let f = class extends r.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([r.Prop({})], f.prototype, "item", void 0), n([r.Prop({})], f.prototype, "formData", void 0), n([r.Prop()], f.prototype, "value", void 0), f = n([r.Component({
        components: {
            confTip: a.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(363), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(93);
    let a = class extends o.Vue {
        handleInput(e, t = "") {
            "" === t ? this.$emit("input", e, this.item.name) : this.$emit("input", e, t)
        }
    };
    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, "disabled", void 0), a = n([o.Component({components: {confSelect: r.default}})], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(365), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(117), a = i(155), s = i(156), l = i(93);
    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: r.default,
            confInput: a.default,
            confText: s.default,
            confSelect: l.default
        }
    })], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(367), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(117), a = i(156), s = i(93);
    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: r.default,
            confText: a.default,
            confSelect: s.default
        }
    })], l), t.default = l
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(369), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let r = class extends o.Vue {
        handleChange(e) {
            let t = e.target;
            this.$emit("input", t.value, this.item.name)
        }
    };
    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, "label", void 0), r = n([o.Component({components: {}})], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(371), o = i.n(n);
    for (var r in n) "default" !== r && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(r);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, r = arguments.length, a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
        return r > 3 && a && Object.defineProperty(t, i, a), a
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const r = i(6), a = i(153), s = i(22), l = i(37), d = i(403);
    let u = class extends r.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, r) {
            let a = !1, s = {name: e, host: t, port: i, type: n, userName: o, passWord: r};
            if (this.proxyList.length > 0) for (let t = 0; t < this.proxyList.length; ++t) if (this.proxyList[t].name === e) {
                a = !0;
                break
            }
            a || (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, r = e.args.userName,
                        a = e.args.passWord;
                    this.handleAddProxyResult(t, i, n, o, r, a)
                }
            }).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 a.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 a.ConfigHelperNS.getValue("ProxySetting", "ConnectType_Http", "直接连接");
                    t === i && this.$emit("input", "直接连接", "ProxySetting-ConnectType_Http"), t === (i = yield a.ConfigHelperNS.getValue("ProxySetting", "ConnectType_Hub", "直接连接")) && this.$emit("input", "直接连接", "ProxySetting-ConnectType_Hub"), t === (i = yield a.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() {
            a.ConfigHelperNS.setValue("ProxyList", "proxys", this.formatProxys()).catch(), a.ConfigHelperNS.setValue("ConnectType", "ProxyName", this.getProxyNames()).catch()
        }

        initProxys() {
            return o(this, void 0, void 0, function* () {
                let e = yield a.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([r.Prop({})], u.prototype, "item", void 0), n([r.Prop()], u.prototype, "value", void 0), n([r.Prop()], u.prototype, "disabled", void 0), u = n([r.Component({components: {}})], u), t.default = u
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(19), o = i(5), r = i(119), a = i(120), s = i(70);
    !function (e) {
        class t extends s.CommonIPCBase.Communicator {
            constructor() {
                super()
            }

            initialize(e) {
                this.currInfo = {id: void 0, context: e, isMainCommunicator: !1}
            }

            connect() {
                this.isConnected ? r.warning("has been connected") : (this.sendConnectMsgToMain(), this.isConnected = !0, this.startListenIPCMessage(!1))
            }

            disconnect() {
                this.isConnected ? (this.isConnected = !1, this.sendDisconnectMsgToMain()) : r.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)) {
                        r.error("msgInfo is null");
                        break
                    }
                    let e = t.msg.args[0];
                    if (o.isNullOrUndefined(e)) {
                        r.error("connectRendererInfo is null");
                        break
                    }
                    r.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)) {
                        r.error("msgInfo is null");
                        break
                    }
                    let e = t.msg.args[0];
                    if (o.isNullOrUndefined(e)) {
                        r.error("disconnectRendererInfo is null");
                        break
                    }
                    r.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: a.CommonIPCMessage.msgIPCRendererConnect, args: []});
                this.currInfo.id = e[0], this.rendererInfos = e[1]
            }

            sendDisconnectMsgToMain() {
                this.sendMessageToMain({name: a.CommonIPCMessage.msgIPCRendererDisconnect, args: []})
            }

            sendIPCMsgToMain(e, t = !1) {
                let i = void 0;
                do {
                    if (o.isNullOrUndefined(e)) {
                        r.error("msg is null");
                        break
                    }
                    i = (t ? n.ipcRenderer.sendSync : n.ipcRenderer.send)(a.CommonIPCMessage.msgIPCSendToMain, {
                        msg: e,
                        senderInfo: this.currInfo
                    })
                } while (0);
                return i
            }

            sendIPCMsgToRenderer(e, t) {
                do {
                    if (o.isNullOrUndefined(e)) {
                        r.error("rendererId is null");
                        break
                    }
                    if (o.isNullOrUndefined(t)) {
                        r.error("msg is null");
                        break
                    }
                    let i = [e].concat(t.args);
                    t.args = i, n.ipcRenderer.send(a.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(3), r = i(16), a = n.default.getLogger("DownloadKernel.CategoryView"),
        s = r.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 r = n.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskId);
                    0 !== r && (this.tasks.set(r, n), i.push(n)), a.information("insertTask categoryId:", this.categoryId, ", catygoryViewId:", this.categoryViewId, "taskId:", r)
                }
                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 r = n.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskId);
                    this.tasks.has(r) && (this.tasks.delete(r), t.push(n)), a.information("removeTask catygoryView:", this.categoryViewId, "taskId:", r)
                }
                s.fireTaskEvent(o.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.categoryId, this.categoryViewId, t)
            }
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = i(50), o = i(612), r = {"Content-Type": "application/x-www-form-urlencoded"};

    function a(e, t) {
        !n.isUndefined(e) && n.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t)
    }

    var s, l = {
        adapter: ("undefined" != typeof XMLHttpRequest ? s = i(613) : "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) ? (a(t, "application/x-www-form-urlencoded;charset=utf-8"), e.toString()) : n.isObject(e) ? (a(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(r)
    }), e.exports = l
}, function (e, t, i) {
    "use strict";
    var n = i(499);
    e.exports = function (e, t, i, o, r) {
        var a = new Error(e);
        return n(a, t, i, o, r)
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(3), o = i(43).DownloadKernelCategoryViewManager.getCategoryViewManager(),
        r = i(0).default.getLogger("TaskCtrlHelper.DownloadProgress");
    !function (e) {
        function t() {
            let e = -1, t = 0, i = 0, a = [], s = o.getCategoryViewFromId(n.DownloadKernel.CategroyViewID.Downloading);
            if (s) {
                let o = s.getTasks(), r = void 0, l = void 0;
                for (let [, e]of o) null !== e && ((r = e.getTaskStatus()) !== n.DownloadKernel.TaskStatus.PreDownloading && r !== n.DownloadKernel.TaskStatus.StartWaiting && r !== n.DownloadKernel.TaskStatus.StartPending && r !== n.DownloadKernel.TaskStatus.Started || (t += (l = e.getTaskBaseInfo()).fileSize, i += l.downloadSize, a.push(e.getId())));
                t > 0 && (e = i / t)
            }
            return a.length > 0 && -1 === e && (e = 0), e >= 1 && (e = 1), r.information("progress:", e), {
                progress: e,
                downloadingTaskIds: a,
                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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(2), a = i(7), s = i(29), l = i(13),
        d = a.default(r.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(), r = "!@#$%^&*()QAZxl_pc" + e + t + n,
                    a = "client_name=xl_pc&client_version=" + e + "&ts=" + t + "&r=" + n + "&key=" + (r = (r = s.ToolsUtilitiesAWNS.genarateMd5(r)).toUpperCase());
                u.information("key", r);
                const l = `http://download.code.lixian.vip.xunlei.com/errcode?${a}`;
                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)), r = Number(e.code.substring(n + 1, t));
                    for (let t = o; t <= r; 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 = r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(2), a = i(7), s = i(5), l = i(57),
        d = a.default(r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(103), a = i(18), s = i(15), l = i(8), d = i(29), u = i(14), c = i(0), h = i(510), f = i(9),
        p = i(63), g = i(3), m = i(11), v = i(16), y = i(45), w = i(19), k = i(32),
        T = m.DownloadKernelTaskManager.getTaskManager(), b = v.DownloadKernelEventManager.getEventManager(),
        C = 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* () {
                    C.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}`, r = yield l.FileSystemAWNS.readdirAW(n);
                        for (let e = 0; e < r.length; e++) {
                            let i = r[e], a = o.join(n, i), s = yield l.FileSystemAWNS.lstatAW(a);
                            s && (s.isDirectory() && i !== t ? l.FileSystemAWNS.rmdirsAW(a).catch() : s.isFile() && "config.json" !== i && l.FileSystemAWNS.unlinkAW(a).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 && (C.information("sendPluginStat", n, "plugin_load", t), t = encodeURIComponent(t), f.XLStatNS.trackEvent(n, "plugin_load", "", 0, 0, 0, 0, t), i = 0, t = ""));
                "" !== t && (C.information("sendPluginStat", n, "plugin_load", t), t = encodeURIComponent(t), f.XLStatNS.trackEvent(n, "plugin_load", "", 0, 0, 0, 0, t))
            }

            sendPluginStat(e, t) {
                C.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 && (C.information("sendPluginStat", t, i), i = encodeURIComponent(i), f.XLStatNS.trackEvent("core_event", t, "", 0, 0, 0, 0, i), n = 0, i = "");
                "" !== i && (C.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* () {
                    C.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* () {
                    C.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) {
                            C.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) {
                        C.warning(e)
                    }
                    void 0 !== e && (C.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) {
                let i = e.name;
                null !== this.unzipPlugins && (this.unzipPlugins[`${i}`] = t)
            }

            startDownloadPlugins(e, t, o, r, 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) {
                                C.warning(e)
                            }
                            if (n && n.main) {
                                let r = `${this.currentDir}${e}/${n.main}`;
                                (yield l.FileSystemAWNS.existsAW(r)) && (i = {
                                    state: t,
                                    main: r,
                                    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) ? (C.information("owner is running", n.owner, n.name), s.server.fireClientEvent("OnPluginReady", e, n.owner, i)) : (C.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* () {
                    C.information("loadPlugin enter");
                    let i = null;
                    const n = `${this.currentDir}${e}/index`, o = `${this.currentDir}${e}/config.json`;
                    let a = yield l.FileSystemAWNS.existsAW(`${n}.js`), s = yield l.FileSystemAWNS.existsAW(`${o}`);
                    C.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) {
                                C.warning(e)
                            }
                            if (C.information("loadPlugin config", n), n && n.main) {
                                let t = `${this.currentDir}${e}/${n.main}`;
                                if (yield l.FileSystemAWNS.existsAW(t)) {
                                    let a = `${__rootDir}/out/plugin-boot.js`;
                                    if (yield l.FileSystemAWNS.existsAW(a)) {
                                        const i = r.fork(a, ["--type=xdas-plugin-process", `--xdas-plugin-config=${o}`, `--xdas-plugin-name=${e}`]);
                                        C.information("loadPlugin fork", i, e), w.ipcRenderer.send(k.ThunderChannelList.channelRMSetEnvironmentVariable, i.pid.toString(), t), i.once("exit", () => {
                                            w.ipcRenderer.send(k.ThunderChannelList.channelRMSetEnvironmentVariable, i.pid.toString())
                                        })
                                    } else {
                                        const i = r.fork(t, ["--type=xdas-plugin-process", `--xdas-plugin-name=${e}`]);
                                        C.information("loadPlugin fork", i), w.ipcRenderer.send(k.ThunderChannelList.channelRMSetEnvironmentVariable, i.pid.toString(), t), i.once("exit", () => {
                                            w.ipcRenderer.send(k.ThunderChannelList.channelRMSetEnvironmentVariable, i.pid.toString())
                                        })
                                    }
                                    i = {}, n.version && n.clear && this.clear(e, n.version, n.main).catch()
                                }
                            }
                        } else if (a) try {
                            i = require(n)
                        } catch (e) {
                            C.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 = []), C.information("loadPlugin leave", i), i) : i
                })
            }

            loadConfig(e, t) {
                return n(this, void 0, void 0, function* () {
                    if (C.information("loadConfig enter"), this.plugins = e, t) {
                        let t = void 0;
                        try {
                            t = JSON.stringify(e)
                        } catch (e) {
                            C.warning(e)
                        }
                        void 0 !== t && (C.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* () {
                    C.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* () {
                    C.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* () {
                    C.information("onDownloadPluginFinish bSuccess:", e, "name:", t.name, "index:", this.handlePluginIndex);
                    const n = `${this.currentDir}${t.name}.zip`, o = `${this.currentDir}${t.name}/`;
                    let r = !1, a = !1, s = !1;
                    if (e) {
                        let e = yield l.FileSystemAWNS.existsAW(o);
                        if (e && (s = yield this.isPluginUnzip(t)), a = e, r = !s) {
                            const {UnzipUtilitiesAWNS: e} = yield Promise.resolve().then(() => i(104));
                            (a = 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 (a) {
                            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() && (C.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 (C.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] && (C.information("取消监听 ", this.taskStatusChangedEventTable[e]), b.detachTaskEvent(g.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventTable[e]), this.taskStatusChangedEventTable[e] = null)
            }

            attachTaskStatusChangedEvent(e, t) {
                C.information("attachTaskStatusChangedEvent taskId: ", e), void 0 !== this.taskStatusChangedEventTable[e] && null !== this.taskStatusChangedEventTable[e] || (this.taskStatusChangedEventTable[e] = b.attachTaskEvent(g.DownloadKernel.TaskEventType.StatusChanged, (...i) => n(this, void 0, void 0, function* () {
                    let n = !1;
                    do {
                        if (!i) {
                            C.information("args is null");
                            break
                        }
                        if (i[0] !== g.DownloadKernel.TaskEventType.StatusChanged) {
                            C.information("args[0] is not StatusChanged");
                            break
                        }
                        let o = i[1];
                        if (!o) {
                            C.information("taskList is null");
                            break
                        }
                        for (let i = 0; i < o.length; ++i) {
                            let r = o[i];
                            if (!r) continue;
                            if (r.getId() !== e) continue;
                            let a = r.getTaskStatus();
                            C.information("get status ", a), a === 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)) : a === 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* () {
                    C.information("downloadPlugin enter");
                    let o = !1;
                    const r = `${this.currentDir}`, s = `${this.currentDir}${e.name}.zip`, d = `${e.name}.zip`;
                    do {
                        if (void 0 !== e.url) {
                            let t = null;
                            try {
                                a.default.defaults.adapter = i(21), t = yield a.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: r, taskName: d},
                            p2spTaskInfo: {url: e.url, nameFixed: 1},
                            isBackground: !0
                        }, i = yield T.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 (C.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, r, a, s, l, d, u, c, h, f, p, g = {}.hasOwnProperty;
        l = i(130), d = i(131), t = i(128), n = i(129), u = i(127), h = i(136), f = i(137), c = i(138), o = i(132), r = i(134), a = i(133), s = i(135), p = i(513), 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, r, a;
                for (this.textispresent = !1, r = "", i = 0, o = (a = e.children).length; i < o; i++) t = a[i], r += 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 && r.slice(-this.newline.length) === this.newline && (r = r.slice(0, -this.newline.length)), r
            }, 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 r):
                                return this.dtdElement(l, i + 1);
                            case!(l instanceof a):
                                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, r, a, s, l, d, p, m, v, y, w, k, T;
                for (p in i || (i = 0), T = !1, this.textispresent ? (this.newline = "", this.pretty = !1) : (this.newline = this.newlinedefault, this.pretty = this.prettydefault), m = "", m += (k = 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 (a = 0, l = (y = e.children).length; a < l; a++) if (null != (r = y[a]).value) {
                        this.textispresent++, T = !0;
                        break
                    }
                    for (this.textispresent && (this.newline = "", this.pretty = !1, k = this.space(i)), m += ">" + this.newline, s = 0, d = (w = e.children).length; s < d; s++) r = w[s], m += function () {
                        switch (!1) {
                            case!(r instanceof t):
                                return this.cdata(r, i + 1);
                            case!(r instanceof n):
                                return this.comment(r, i + 1);
                            case!(r instanceof u):
                                return this.element(r, i + 1);
                            case!(r instanceof h):
                                return this.raw(r, i + 1);
                            case!(r instanceof f):
                                return this.text(r, i + 1);
                            case!(r instanceof c):
                                return this.processingInstruction(r, i + 1);
                            default:
                                throw new Error("Unknown XML node type: " + r.constructor.name)
                        }
                    }.call(this);
                    T && this.textispresent--, this.textispresent || (this.newline = this.newlinedefault, this.pretty = this.prettydefault), m += k + "</" + 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, r;
                if (t || (t = 0), e instanceof u) {
                    for (n in o = this.space(t) + "<" + e.name, r = e.attributes) g.call(r, n) && (i = r[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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(8), s = i(3), l = i(59), d = i(11), u = i(383), c = i(40), h = i(48), f = i(72),
        p = i(5), g = i(29), m = i(26), v = i(55), y = i(139), w = i(39), k = i(516), T = i(33),
        b = r.default.getLogger("NativeFunction.TaskInfo"), C = d.DownloadKernelTaskManager.getTaskManager();

    class S {
        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 = C.getTaskFromTaskId(e);
                    if (n) {
                        let o = yield this.getFileList(n);
                        i.fileList = o;
                        let r = i.progress, a = yield this.getHistorySpeedInfo(e, r);
                        a && (a.maxSpeed && (i.maxSpeed = a.maxSpeed), a.historySpeedMap && (i.historySpeed = a.historySpeedMap), a.historyIncreaseSpeedMap && (i.historyIncreaseSpeed = a.historyIncreaseSpeedMap), a.historyVipSpeedColorMap && (i.historyVipSpeedColor = a.historyVipSpeedColorMap), t = JSON.stringify(i), b.information("taskInfo: ", t))
                    } else b.warning("task is null")
                } else b.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), b.information("taskInfo: ", t)) : b.warning("taskInfo is null"), t
            })
        }

        getBtSubFileListString(e, t) {
            let i = [];
            do {
                let n = C.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], r = o.getBtFileByRealIndex(n.realIndex);
                    if (!r) continue;
                    let a = {};
                    a.index = n.realIndex, a.filePath = n.relativePath, a.fileName = r.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileName), a.isNeedDownload = r.getIsDownload(), a.isSupportPlay = r.isSupportPlay(), a.fileSize = n.fileSize, a.cid = n.cid, a.gcid = n.gcid, a.status = n.fileStatus, a.downloadSize = n.downloadSize, a.errCode = n.errorCode, a.userRead = n.userRead, 0 !== a.errCode ? a.errMessage = l.TaskStatusHelper.getTaskErrorInfoByCode(a.errCode) : a.errMessage = "", i.push(a)
                }
            } 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 + "#";
                    b.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 = C.getTaskFromTaskId(e);
                if (i) {
                    let n = i.getTaskStatus(), r = 0;
                    n !== s.DownloadKernel.TaskStatus.Succeeded && n !== s.DownloadKernel.TaskStatus.Seeding || (r = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.CompletionTime)), i.getTaskAttribute(s.DownloadKernel.TaskAttribute.RecycleTime) > 0 && (n = 20);
                    let a = 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),
                        w = m.offlineSize + m.originSize + m.p2pSize + m.p2sSize;
                    w < v && (m.p2pSize > 0 ? m.p2pSize = m.p2pSize + v - w : m.offlineSize > 0 ? m.offlineSize = m.offlineSize + v - w : m.originSize > 0 ? m.originSize = m.originSize + v - w : m.p2sSize > 0 && (m.p2sSize = m.p2sSize + v - w));
                    let k = "";
                    c === s.DownloadKernel.TaskType.P2sp || c === s.DownloadKernel.TaskType.Emule ? k = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.Gcid) : c === s.DownloadKernel.TaskType.Group && (b.information("calcGroupTaskUniqueId before"), k = this.calcGroupTaskUniqueId(i), b.information("calcGroupTaskUniqueId end, taskId: ", i.getId(), ", uniqueId: ", k));
                    let T = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize),
                        C = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.SrcTotal),
                        S = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.SrcUsing),
                        I = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod),
                        _ = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.CreateTime),
                        A = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath),
                        D = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.Description),
                        x = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.ErrorCode),
                        N = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.Moving), E = yield this.getActions(i),
                        P = this.getProgress(i), O = this.getSpeedInfo(i),
                        M = yield y.VipPluginFunctionNS.getVipSpeedColor(e);
                    if (t.status = n, t.taskID = e, t.type = c, t.name = h, t.gcid = k, t.suffix = u, t.url = d, t.refUrl = a, t.isFromVest = !1, t.isMoving = N, "" !== d || "" !== p) {
                        let e = "" === d ? p : d, i = yield f.isVestUrl(e, "vestURL");
                        t.isFromVest = i
                    }
                    t.size = T, t.downloadSize = v, t.progress = P, t.allResourceCount = C, t.resourceCount = S, t.errCode = x, 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 = O.averageSpeed, t.speed = O.speed, t.increaseSpeed = O.increaseSpeed, t.vipSpeedColor = M, t.channelInfo = m, t.savePath = A, t.infoId = p, t.duration = I, t.createTime = _, t.completeTime = r, t.md5 = g, t.note = D
                }
                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 r = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName),
                                    a = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath);
                                n = o.join(a, r), i !== s.DownloadKernel.TaskType.Emule && i !== s.DownloadKernel.TaskType.P2sp || w.TaskUtilHelper.isIsoExt(r) && T.ThunderHelper.isWindow8OrLater() && ("" !== (yield k.DiskImageHelperNS.getVirtualDiskPhysicalPath(n)) ? t.push("ejectiso") : t.push("mountiso"))
                            }
                            if (!(yield a.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 = [], r = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskType);
                if (r === s.DownloadKernel.TaskType.Bt) {
                    let r = 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 r) {
                        let r = {};
                        r.index = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.RealIndex), r.filePath = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FilePath), r.fileName = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileName), r.isNeedDownload = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.Download), r.fileSize = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileSize), r.cid = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.Cid), r.gcid = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.Gcid), r.status = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileStatus), r.downloadSize = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.DownloadSize), r.errCode = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.ErrorCode), r.isSupportPlay = f.isSupportPlay(), r.userRead = f.getUserRead(), 0 !== r.errCode ? r.errMessage = l.TaskStatusHelper.getTaskErrorInfoByCode(r.errCode) : r.errMessage = "", r.status === s.DownloadKernel.BtFileStatus.Complete ? (t = c ? h.SingleBtTaskNS.getSinleBtTaskFilePath(e) : o.join(d, u, r.filePath, r.fileName), i = yield a.FileSystemAWNS.existsAW(t), r.isDelete = !i) : r.isDelete = !1, n.push(r)
                    }
                } else if (r === s.DownloadKernel.TaskType.Group) {
                    let r = e.getExtraObject(), d = r.getSubTaskCount(), u = "";
                    for (let e = 0; e < d; ++e) {
                        let d = r.getSubTaskByIndex(e);
                        if (d) {
                            let r = {};
                            r.index = e, r.filePath = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.RelativePath), r.taskId = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId), r.fileName = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName), r.url = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl), r.refUrl = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.RefUrl), r.isNeedDownload = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSubTask), r.fileSize = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize), r.downloadSize = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize), r.cid = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.Cid), r.gcid = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.Gcid), r.status = d.getTaskStatus(), r.errCode = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.ErrorCode), r.isSupportPlay = d.isSupportPlay(), r.userRead = d.getUserRead(), r.status === s.DownloadKernel.TaskStatus.Failed ? r.errMessage = l.TaskStatusHelper.getTaskErrorInfoByCode(r.errCode) : r.errMessage = "";
                            let c = d.getTaskChannelInfo();
                            r.dcdnStatus = c.dcdnStatus, u = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath), r.status === s.DownloadKernel.TaskStatus.Succeeded || r.status === s.DownloadKernel.TaskStatus.Seeding ? (t = o.join(u, r.fileName), i = yield a.FileSystemAWNS.existsAW(t), r.isDelete = !i) : r.isDelete = !1, n.push(r)
                        }
                    }
                }
                return n
            })
        }

        getSpeedInfo(e) {
            let t = e.getDownloadSpeed(), i = 0, n = e.getVipSpeed(),
                o = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                r = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod);
            r < 1 && (r = 1), i = o / r, i = parseInt(i.toString(), 10);
            let a = {};
            return a.averageSpeed = i, a.speed = t, a.increaseSpeed = n, a
        }

        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 = {}, r = {}, a = {};
                    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, r[n] = t.addSpeed, a[n] = t.vipSpeedColor
                        }
                    }
                    i.historySpeedMap = o, i.historyIncreaseSpeedMap = r, i.historyVipSpeedColorMap = a
                } while (0);
                return i
            })
        }
    }

    t.TaskInfoManager = S, function (e) {
        const t = new S;
        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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(8), s = i(3), l = i(16), d = i(11), u = i(5), c = i(139),
        h = r.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 a.FileSystemAWNS.existsAW(this.dataPath)) || (yield a.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, r = i.getDownloadSpeed(), a = 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, r, a).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(), r = i.getTaskPreStatus();
                        if (n !== s.DownloadKernel.TaskStatus.StartWaiting && n !== s.DownloadKernel.TaskStatus.StartPending || r !== 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), a.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, r) {
                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 a = yield c.VipPluginFunctionNS.getVipSpeedColor(e),
                        s = {progress: i, downloadSpeed: o, addSpeed: r, vipSpeedColor: a}, 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 a.FileSystemAWNS.existsAW(n)) {
                        let i = yield a.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], r = t.speedInfoMap[0];
                    if (!(u.isObject(n) && u.isObject(r) || 0 !== t.aveSpeed)) {
                        let n = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                            r = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod);
                        r < 1 && (r = 1), t.aveSpeed = Math.round(n / r), 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), r = "TaskInfoEx_" + e.toString() + ".txt",
                            s = o.join(this.dataPath, r);
                        t = yield a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(12), a = i(0), s = i(14), l = i(3), d = i(11), u = i(35), c = i(22), h = i(30), f = i(45),
        p = i(141), g = i(5), m = i(8), v = i(516), y = i(16), w = a.default.getLogger("Thunder.TaskOperator"),
        k = d.DownloadKernelTaskManager.getTaskManager(), T = p.SubtitleManagerNS.getSubtitleManger(),
        b = 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 = k.getTaskFromTaskId(e);
            if (i) {
                if (g.isString(t)) try {
                    t = JSON.parse(t)
                } catch (e) {
                    w.warning(e)
                }
                if (null !== t && void 0 !== t && "object" == typeof t) {
                    let n = !0;
                    "finished" === t.panel && (n = !1);
                    let o = !0 === t.isZipPlay, r = "";
                    if (o && (n = !1, r = t.fileName), w.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, r).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 = k.getTaskFromTaskId(e);
                if (!i) return void w.information("错误的任务ID,taskid=", e);
                let n, o = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryViewId),
                    r = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryId);
                g.isString(t) ? n = JSON.parse(t) : g.isObject(t) && (n = t);
                let a = -1, s = i.getType();
                if (s === l.DownloadKernel.TaskType.Bt) {
                    let e = i.getExtraObject().getBtFileList();
                    for (let [t, i]of e) if (i.isSupportPlay()) {
                        a = t;
                        break
                    }
                } else s === l.DownloadKernel.TaskType.Emule || s === l.DownloadKernel.TaskType.P2sp ? a = 0 : w.warning("不支持播放");
                let d = 0;
                n && void 0 !== n.posPercent && (d = n.posPercent), n && (n.fileIndex = a, n.panel = o, n.categoryId = r, n.percent = d), w.information("播放预览视频: fileIndex=", a, " panel=", o, " categoryId=", r, " percent=", d), this.playTask(e, n)
            })
        }

        static downloadAndPlayTask(e, t, i) {
            if (k.getTaskFromTaskId(e)) {
                if (g.isString(t)) try {
                    t = JSON.parse(t)
                } catch (e) {
                    w.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 = k.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 = k.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) {
            k.stopTask(e, l.DownloadKernel.TaskStopReason.Manual)
        }

        static restoreTask(e) {
            k.recoverFromRecycle(e)
        }

        static deleteTask(e) {
            let t = k.getTaskFromTaskId(e);
            if (t) {
                let e = t.getTaskBaseInfo();
                u.TaskOperatorNs.destroyTasks([e])
            }
        }

        static noteTask(e, t) {
            if (t) {
                let i = k.getTaskFromTaskId(e);
                i && i.setDescription(t)
            }
        }

        static downloadSelectFiles(e, t) {
            return n(this, void 0, void 0, function* () {
                (yield k.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 r = k.getTaskFromTaskId(e);
                u.TaskOperatorNs.executeInstallFile(r, n, o).catch()
            } catch (e) {
            }
        }

        static openSubtitleDlg(e) {
            let t = k.getTaskFromTaskId(e);
            if (t) {
                let i = t.getTaskName(), n = t.getType(), r = "";
                t && (r = t.getSavePath()), n === l.DownloadKernel.TaskType.Bt && t.getExtraObject().getDownloadFile().length > 1 && (r = o.join(r, i));
                let a = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryViewId), s = T.getDisaplayName(e),
                    d = 0;
                (d = s.length) > 1 ? c.MessageBox.custom("SubtitleTaskFilelist", {
                    size: "large",
                    taskId: e,
                    taskName: i,
                    taskType: n,
                    fileList: s,
                    saveDir: r,
                    categoryViewId: a
                }, {center: !0, width: 500, height: 329}).catch() : c.MessageBox.custom("SubtitleSearch", {
                    taskId: e,
                    taskName: i,
                    cid: s[0].cid,
                    saveDir: r,
                    from: "taskList",
                    categoryViewId: a
                }, {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 = k.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;
                    let s = yield v.DiskImageHelperNS.attachVirtualDisk(a);
                    "" !== s && (yield(yield r.asyncRemoteCall.getShell()).showItemInFolder(s), b.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 = k.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;
                    (yield v.DiskImageHelperNS.detachVirtualDisk(r)) && b.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(3), a = i(11), s = i(16), l = i(34), d = i(14), u = i(69), c = i(8), h = i(33), f = i(39),
        p = i(4), g = i(68), m = i(35), v = i(42), y = i(0), w = a.DownloadKernelTaskManager.getTaskManager(),
        k = s.DownloadKernelEventManager.getEventManager(), T = y.default.getLogger("XmpUnionNS");
    !function (e) {
        function t(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                let a = !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"), a = i;
                            a && "" !== a || (a = u.ParseUrlFileNameNS.getNameFromUrl(e));
                            let s = null, l = {savePath: o, taskName: a}, d = h.ThunderHelper.getTaskTypeFromUrl(e);
                            if (d === r.DownloadKernel.TaskType.P2sp) {
                                let i = {taskType: r.DownloadKernel.TaskType.P2sp, value: e},
                                    o = yield g.TaskUtilitiesAWNS.batchFindTaskAW([i]);
                                if (o && o[0]) {
                                    n = o[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
                                    let e = o[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.RecycleTime);
                                    e > 0 && w.recoverFromRecycle(n);
                                    break
                                }
                                let a = {url: e, refUrl: t || "", downloadSubTask: 1};
                                yield y(), s = yield w.createTask(r.DownloadKernel.TaskType.P2sp, {
                                    taskBaseInfo: l,
                                    p2spTaskInfo: a
                                })
                            } else if (d === r.DownloadKernel.TaskType.Emule) {
                                let t = v.Common.parseEd2kUrl(e);
                                if (null !== t) {
                                    let e = {taskType: r.DownloadKernel.TaskType.Emule, value: t.fileHash},
                                        i = yield g.TaskUtilitiesAWNS.batchFindTaskAW([e]);
                                    if (i && i[0]) {
                                        n = i[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
                                        let e = i[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.RecycleTime);
                                        e > 0 && w.recoverFromRecycle(n);
                                        break
                                    }
                                }
                                let i = {url: e, downloadSubTask: 1};
                                yield y(), s = yield w.createTask(r.DownloadKernel.TaskType.Emule, {
                                    taskBaseInfo: l,
                                    emuleTaskInfo: i
                                })
                            }
                            null !== s && (n = s.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId))
                        } while (0);
                        return n
                    })
                }(e, i, t), l && o && (a = yield m.TaskOperatorNs.downloadAndPlay(l)), a
            })
        }

        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()) {
                        T.information("parseUnionFileAndCreateTasks:读取内容 buf为null");
                        break
                    }
                    let o = n.toString(), r = (o += "\r\n").split("\r\n");
                    if (r.length <= 1) {
                        T.information("parseUnionFileAndCreateTasks:lines.length <= 1");
                        break
                    }
                    let a = new Map, s = new Map, l = new Map, d = [], u = [], h = [];
                    for (let e = 0; e < r.length; ++e) {
                        let t = r[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), T.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 ? a.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))
                            }
                        }
                    }
                    T.information("parseUnionFileAndCreateTasks urlsInfo:", a);
                    let f = !1;
                    if (a.size > 0) for (let e of a) {
                        let n = e[0], o = e[1], r = void 0, a = l.get(n) || "";
                        null !== s && s.size > 0 && (r = s.get(n)), T.information("parseUnionFileAndCreateTasks name, url:", r, o), (f = yield t(o, r, a, !f && i)) && (i = !1)
                    }
                    if (T.information("parseUnionFileAndCreateTasks urllist:", d), d.length >= 1) for (let e = 0; e < d.length; ++e) T.information("parseUnionFileAndCreateTasks name, url:", u[e], d[e]), (f = yield t(d[e], u[e], h[e], !f && i)) && (i = !1)
                } while (0)
            })
        }

        function a(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: r.DownloadKernel.TaskType.Bt, value: n.infoId},
                        a = yield g.TaskUtilitiesAWNS.batchFindTaskAW([o]);
                    if (a && a[0]) {
                        i = a[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId), a[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.RecycleTime) > 0 && w.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 w.createTask(r.DownloadKernel.TaskType.Bt, d);
                    u && (i = u.getTaskAttribute(r.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 w.createTask(r.DownloadKernel.TaskType.Magnet, d);
                    if (null !== h) {
                        let e = h.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
                        yield w.startTask(e), yield b(e, t)
                    }
                    (yield c.FileSystemAWNS.existsAW(l)) && (i = yield a(e, name))
                }
                return i
            })
        }

        function y() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    w.isLoadStorageTaskFinish() ? e() : l.DownloadKernelManager.attachListener(d.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                        e()
                    })
                })
            })
        }

        function b(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = 0, n = !1;
                return new Promise(o => {
                    y().then(() => {
                        i = k.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, (...t) => {
                            do {
                                if (!t) break;
                                if (t[0] !== r.DownloadKernel.TaskEventType.StatusChanged) break;
                                if (!t[1]) break;
                                let a = t[1];
                                for (let t = 0; t < a.length; ++t) {
                                    let s = a[t];
                                    if (!s) continue;
                                    let l = s.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
                                    if (e === l) {
                                        s.getTaskStatus() === r.DownloadKernel.TaskStatus.Succeeded && (k.detachTaskEvent(r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(7), r = i(2), a = i(0), s = i(4), l = i(8),
        d = o.default(r.resolve(__rootDir, "../bin/ThunderHelper.node")),
        u = a.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 = r.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 r = !1, a = o.extensions.settings[this.xunleiKey];
                        if (a || "msedge" !== t || (a = o.extensions.settings[this.msedeXunleiKey], r = !0), !a) break;
                        if (a.state === c.Working) break;
                        r ? (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 = "", r = null;
                        n && n.length > 0 && (o = n.toString());
                        try {
                            r = JSON.parse(o)
                        } catch (e) {
                        }
                        if (!r) break;
                        if (!r.extensions) break;
                        if (!r.extensions.settings) break;
                        let a = r.extensions.settings[this.xunleiKey];
                        a || "msedge" !== t || (a = r.extensions.settings[this.msedeXunleiKey]), a && (i = a.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 = r.basename(n, ".exe"),
                        a = {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;
                            a = {
                                icon: i.icon,
                                name: i.browserTitle,
                                default: !0,
                                install: i.browserAddonInstall,
                                open: i.browserAddonOpen,
                                exeName: o
                            }, this.browserList.push(a), !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 = r.join(o, "../BHO/xl_ext_chrome.crx"), u.information("installDir", o);
                    let a = 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"), w = d.getAppDataLocalPath(),
                        k = "https://ext.se.360.cn/webstore/detail/ncennffkjdiamlpmcbajkmaiiiddgioo",
                        T = "--https://e://extensions/", b = this.getBrowserPath("360se", a),
                        C = r.join(b, "../../User Data/Default/Extensions"), S = yield this.is360AddonsInstalled(C),
                        I = r.join(C, "../Preferences"), _ = yield this.isAddonsOpened(I, "360se"),
                        A = null !== a && "" !== b, D = {
                            browserData: a,
                            browserExist: A,
                            browserPath: b,
                            browserAddonPath: C,
                            browserAddonInstall: S,
                            installCmdLine: k,
                            openCmdLine: T,
                            browserTitle: "360安全浏览器",
                            icon: "xly-img-icon-360",
                            browserAddonOpen: _,
                            browserAddonConfigPath: I
                        };
                    t.set("360se", D), 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", T = "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", b = this.getBrowserPath("chrome", h), D = {
                        browserData: h,
                        browserExist: A = null !== h && "" !== b,
                        browserPath: b,
                        browserAddonPath: m,
                        browserAddonInstall: v,
                        installCmdLine: k,
                        openCmdLine: T,
                        browserTitle: "Chrome浏览器",
                        icon: "xly-img-icon-chrome",
                        browserAddonOpen: y,
                        browserAddonConfigPath: m
                    }, e ? t.set("chrome", D) : v && t.set("chrome", D), b = this.getBrowserPath("msedge", c), T = k = "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", D = {
                        browserData: c,
                        browserExist: A = null !== c && "" !== b,
                        browserPath: b,
                        browserAddonPath: f,
                        browserAddonInstall: p,
                        installCmdLine: k,
                        openCmdLine: T,
                        browserTitle: "Edge浏览器",
                        icon: "xly-img-icon-edge",
                        browserAddonOpen: g,
                        browserAddonConfigPath: f
                    }, t.set("msedge", D), 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", T = "qqbrowser://extensions/manage", b = this.getBrowserPath("QQBrowser", l);
                    let x = r.join(w, "Tencent/QQBrowser/User Data/Default/Preferences"),
                        N = yield this.isAddonsOpened(x, "QQBrowser"), E = d.getQQAddonsPath(),
                        P = yield this.is360AddonsInstalled(E);
                    D = {
                        browserData: l,
                        browserExist: A = null !== l && "" !== b,
                        browserPath: b,
                        browserAddonPath: E,
                        browserAddonInstall: P,
                        installCmdLine: k,
                        openCmdLine: T,
                        browserTitle: "QQ浏览器",
                        icon: "xly-img-icon-qq",
                        browserAddonOpen: N,
                        browserAddonConfigPath: E
                    }, e ? t.set("QQBrowser", D) : P && t.set("QQBrowser", D), T = k = '"' + this.crxPath + '"', b = this.getBrowserPath("360chrome", s);
                    let O = r.join(b, "../../User Data/Default/Extensions"), M = yield this.is360AddonsInstalled(O),
                        F = r.join(O, "../Preferences"), L = yield this.isAddonsOpened(F, "360chrome");
                    D = {
                        browserData: s,
                        browserExist: A = null !== s && "" !== b,
                        browserPath: b,
                        browserAddonPath: O,
                        browserAddonInstall: M,
                        installCmdLine: k,
                        openCmdLine: T,
                        browserTitle: "360极速浏览器",
                        icon: "xly-img-icon-360js",
                        browserAddonOpen: L,
                        browserAddonConfigPath: F
                    }, t.set("360chrome", D), u.information("browserInfos", t);
                    let R = r.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 = r.join(n, "../../User Data/Default/Extensions");
                        if (!(yield this.is360AddonsInstalled(o))) {
                            u.information("reset 306se addon not install");
                            break
                        }
                        let a = r.join(o, "../Preferences"), s = yield this.getAddonsState(a, "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(a, "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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(519), r = i(651), a = i(144), s = i(652), l = i(521), d = i(654), u = i(110), c = i(27), h = i(0),
        f = i(5), p = h.default.getLogger("EmbeddedBrowserManagerNs");
    let g = [];
    !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 r = e, a = t[3];
                    if (null === a || void 0 === a || a <= 0) {
                        p.information("createWebWnd 参数错误：wndWidth=", a);
                        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], w = t[11], k = t[12];
                    k && m.setBrowserEventHandler(k), yield m.createWnd(i, n, o, r, a, s, l, d, c, h, v, y, w, () => {
                        for (let t in g) if (g[Number(t)].moduleName === e) {
                            g.splice(Number(t), 1);
                            break
                        }
                    })
                } while (0)
            })
        }

        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, r.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 a.phoneAuthObject.createPhoneAuthDlg(e, s.phoneAuthNative.getNativeFunctionMap())
                } else yield t(e, ...i)
            })
        }, e.createWebWnd = t, 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 r = t, a = e.width;
                    if (null === a || void 0 === a || a <= 0) {
                        p.information("createWebWnd 参数错误：wndWidth=", a);
                        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, w = e.onCloseCallback, k = e.onBrowserEvent;
                    k && m.setBrowserEventHandler(k), 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, r, a, s, l, d, c, h, v, y, w, () => {
                        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 r = o[0].embeddedBrowserObj;
                !1 === i ? r.hideWnd().catch() : r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(111), r = i(143), a = i(26), s = i(5), l = i(27), d = i(9), u = i(47),
        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, a, 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(a)) break;
                    r.BrowserSupportNS.browserIsInitFinish() || (this.trackBrowserEvent("browser_load_init", t), yield r.BrowserSupportNS.initTBC()), this.trackBrowserEvent("browser_load_create", t);
                    let n = new o.Browser;
                    if (n.init({rect: a, 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 r = o && o.length > 0 ? o[0] : void 0;
                                o = o && o.length > 0 ? o.slice(1) : o, this.onJsCallNativeFunction(0, i, n, o, t, r)
                            }
                        };
                        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, r) => {
                            !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, r) {
            let d = !1;
            do {
                if (s.isNullOrUndefined(e), s.isNullOrUndefined(t) || "" === t) break;
                if (s.isNullOrUndefined(f.nativeFunctionMap)) break;
                let u = a.default.getConfigInfo("nativeFunc", "domains") || h;
                if (!this.isUrlInDomains(o, u, r) && !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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(5);
    let r = !1, a = !1, s = 0;
    const l = 2, d = 2;
    !function (e) {
        function t(e) {
            do {
                if (r) break;
                if (!e) break;
                r = !0, a = e.getDPIAwareSupport(), s = e.getSysDPIFactor()
            } while (0)
        }

        function i(e, i) {
            t(e);
            let n = 1;
            return n = a && i ? e.getMonitorDPIFactor(i) : s
        }

        function u() {
            return window.document.querySelector(".xly-findpage .xly-browser-tab").getBoundingClientRect()
        }

        e.getDpiFactor = i, e.getBrowserWindowPosition = function (e, o) {
            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 a = i(e, r);
                    a = window.devicePixelRatio;
                    let s = u(), c = yield o.getContentSize(), h = s.left * a, f = s.bottom * a,
                        p = (c[0] - s.left - l) * a, g = (c[1] - s.bottom - d) * a;
                    n = {x: Math.round(h), y: Math.round(f), width: Math.round(p), height: Math.round(g)}
                } while (0);
                return n
            })
        }, e.getHeaderRect = u, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(12), a = i(32), s = i(4), l = i(70);
    !function (e) {
        e.resizeToFitContent = function (e = 0, t = 0, i) {
            return n(this, void 0, void 0, function* () {
                let n = yield r.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(), r = e.getBoundingClientRect(), a = o.bottom;
            void 0 !== i && "number" == typeof i && i > 0 && (a = o.top + i), r.top < o.top ? t.scrollTop = n - (o.top - r.top) : r.bottom > a && (t.scrollTop = n + (r.bottom - a))
        }, e.fitWindowPosInParent = function (e, t) {
            return n(this, void 0, void 0, function* () {
                if (e || (e = yield r.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 r.asyncRemoteCall.getCurrentWindow());
                let n = "browser" !== process.type ? yield i.getPosition() : i.getPosition(),
                    a = "browser" !== process.type ? yield i.getSize() : i.getSize(),
                    s = "browser" !== process.type ? yield r.asyncRemoteCall.getScreen() : o.screen,
                    l = yield s.getCursorScreenPoint(), d = yield s.getDisplayNearestPoint(l), u = d.size.width,
                    c = d.size.height, h = a[0], f = a[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 r = t.getPosition(), a = 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 = a[0], p = a[1];
                r[0] + f > c && (f = c - r[0]), r[1] + p > h && (p = h - r[1]);
                let g = r[0] + (f - s[0]) / 2, m = r[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 r.asyncRemoteCall.getCurrentWindow()).getNativeWindowHandle();
                    e = t.readUIntLE(0, 4)
                }
                o.ipcRenderer.send(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), r = i(10), a = 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 a.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 && r.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) {
                    }
                    r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(8), r = i(63), a = i(3), s = i(16), l = i(5), d = i(4),
        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(a.DownloadKernel.TaskEventType.TaskCreated, (...e) => {
                        do {
                            if (!e) break;
                            if (e[0] !== a.DownloadKernel.TaskEventType.TaskCreated) break;
                            let t = e[1];
                            if (!t) break;
                            for (let e of t) {
                                let t = e.getTaskAttribute(a.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, r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), r = i(4), a = 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, r) {
        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 (a.information("isResourceLegal:,res", n), !n || !n.data) return !1;
            let r = !1;
            do {
                if ("string" == typeof n.data) try {
                    n.data = JSON.parse(n.data)
                } catch (e) {
                    r = !1;
                    break
                }
                "bt" === t ? r = 0 === n.data.ret_code || 1 === n.data.ret_code || 2 === n.data.ret_code : 1 === n.data.ret_code ? r = !0 : 0 === n.data.ret_code ? n.data.result && n.data.result[0] && 0 === n.data.result[0].ret_code && (r = !0) : r = !1
            } while (0);
            return r
        })
    }, 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 r.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 a.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 r.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 a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(5), r = i(0), a = i(8), s = i(63), l = r.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 a.FileSystemAWNS.existsAW(h))) break;
                    let e = (yield a.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), r = `${e}_${o}`;
                            this.historys.hasOwnProperty(r) ? l.warning("daily url exist", this.historys[r].url, this.historys[r].accessTime) : this.count++, this.historys[r] = {
                                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 a.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 a.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}`,
                        r = this.records[e.url];
                    if (r) {
                        if ("OnAddressChange" === t) {
                            r.visitCount = r.visitCount + 1, r.lastAccessTime = i;
                            let t = this.historys[o];
                            if (t) {
                                let e = r.visits.indexOf(t.accessTime);
                                -1 !== e && (l.information("delete earlier this day", t.accessTime, i), r.visits.splice(e, 1), r.visits.push(i)), t.accessTime = i
                            } else r.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 && (r.iconUrl = e.iconUrl), e.name && (r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(22), s = i(37), l = i(7), d = i(10), u = i(8), c = i(9), h = i(3), f = i(43),
        p = i(12), g = f.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        m = l.default(o.join(__rootDir, "../bin/ThunderHelper.node")), v = r.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"), a.MessageBox.confirm({
                            title: "提示",
                            content: "您还没创建桌面快捷方式，是否要创建？",
                            type: a.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"), a.MessageBox.confirm({
                            title: "退出迅雷",
                            content: "当前有正在下载的任务，确定退出吗？",
                            type: a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(10), r = i(76), a = i(2), s = i(663), l = a.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 r = 0; r < e.conf.sechema.length; ++r) if ((o = e.conf.sechema[r]).name === t) {
                if (!o.children) break;
                let t = o.children.length;
                for (let a = 0; a < t; a++) if (o.children[a].name === n) {
                    a === t - 1 ? o.children.push(i) : o.children.splice(a + 1 > t - 1 ? t - 1 : a + 1, 0, i), e.conf.sechema[r] = o;
                    break
                }
                break
            }
        }

        function d(t, i) {
            let n, o = !1;
            for (let r = 0; r < e.conf.sechema.length; ++r) if ((n = e.conf.sechema[r]).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: "接管设置",
                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: r.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: !1},
                "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},
                "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(a.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 r = t.children[0], a = !1;
                    for (let t = 0; t < e.conf.sechema[o].children.length; ++t) {
                        let i = e.conf.sechema[o].children[t];
                        if (i.name === r.name) {
                            if (a = !0, n = !0, r.children.length > 0) for (let e = 0; e < r.children.length; ++e) if (i.children.length > 0) {
                                let t = !1;
                                for (let n = 0; n < i.children.length; ++n) if (r.children[e].name === i.children[n].name) {
                                    t = !0, i.children[n] = r.children[e];
                                    break
                                }
                                t || i.children.push(r.children[e])
                            } else i.children.push(r.children[e]);
                            break
                        }
                    }
                    a || (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 r = e.conf.sechema[i].children[t];
                    if (r.name === o.name) {
                        if (o.children.length > 0 && r.children.length > 0) for (let e = 0; e < o.children.length; ++e) for (let t = 0; t < r.children.length; ++t) if (o.children[e].name === r.children[t].name) {
                            n = !0, r.children.splice(t, 1);
                            break
                        }
                        0 === r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(0), a = i(9), s = i(22), l = i(3), d = i(90), u = i(8), c = i(31), h = i(23),
        f = i(25).DownloadKernelCategoryManager.getCategoryManager(), p = r.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"}],
            r = [{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 w = [...r];

        function k() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (y) break;
                    if (y = !0, !(yield u.FileSystemAWNS.existsAW(v))) {
                        w.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 && w.splice(2, 0, ...t) : w.splice(2, 0, ...i)
                } while (0)
            })
        }

        function T() {
            return w.filter(e => "custom" === e.id || "checkbox" === e.type && !e.id && !e.taskType)
        }

        function b() {
            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 = k, 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
                })), (w = [...r]).splice(2, 0, ...e), yield u.FileSystemAWNS.writeFileAW(v, JSON.stringify(e));
                let n = [-1], o = yield b();
                -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 = T, e.getMenuOptions = function (e, t) {
            return n(this, void 0, void 0, function* () {
                yield k();
                let i = [], n = [e];
                if (-1 === e) {
                    let e = yield b();
                    -1 !== e && n.push(e)
                }
                for (let e of w) 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)}`;
                        a.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 = T();
                                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* () {
                a.XLStatNS.trackEvent("download_leftpanel", "finished_tab_float_show"), yield k();
                let n = [], r = [t];
                if (-1 === t) {
                    let e = yield b();
                    -1 !== e && r.push(e)
                }
                for (let e of w) 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)}`;
                        a.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 = T();
                                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)
                            }, r, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(10), a = i(14), s = i(26), 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, r = "https://xluser-ssl.xunlei.com/msg/v1.1/SendSms?";
                    r = `${r}${i}`;
                    try {
                        null !== (n = yield o.default.get(r, {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 r = null, a = "https://xluser-ssl.xunlei.com/msg/v1.1/CheckSms?";
                    a = `${a}${n = `${n}&token=${e}&code=${t}`}`;
                    try {
                        null !== (r = yield o.default.get(a, {timeout: 1e4})) && void 0 !== r.status && 200 === r.status && void 0 !== r.data && null !== r.data && "" !== r.data && (i = JSON.stringify(r.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();
            r.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, r = i.userid;
                    try {
                        let t = yield l.LoginHelperNS.loginSDKHelper.getInitData(), i = JSON.parse(t), a = i.appid,
                            s = "PC-" + i.package;
                        e = `deviceid=${o}&sessionid=${n}&userid=${r}&platformVersion=${i.platform}&appid=${a}&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 => {
                    r.ConfigNS.attachListener(a.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        let t = r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(90), a = i(0).default.getLogger("ConTextMenu");
    !function (e) {
        e.popContextMenu = function (e, t) {
            t && (a.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 r.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 r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(14), r = i(10);

    class a extends r.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 = a;
    const s = new a;
    !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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), r = i(0), a = i(20), s = r.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, r = 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 (r || (r = new a.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, r.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, r.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, r.emit("SyncMsgStateChange", i, null))
                }), 5e3)
            })
        }, e.uninit = function () {
            r && r.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 r || (r = new a.EventEmitter), r.addListener("SyncMsgStateChange", e), e
        }, e.detachSyncMsgStateChangeEvent = function (e) {
            r && r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(27), r = 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, a, s, l) {
            return n(this, void 0, void 0, function* () {
                return new Promise(n => {
                    r.NativeCallModule.nativeCall.CallNativeFunction("VerifyProxy", e, t, a, s, l, (e, t) => {
                        e === o.NativeFunctionErrorCode.Success ? n(t) : n(i.Fall)
                    })
                })
            })
        }, e.setProxy = function (e, t, i, a, s) {
            return n(this, void 0, void 0, function* () {
                return new Promise(n => {
                    r.NativeCallModule.nativeCall.CallNativeFunction("SetProxy", e, t, i, a, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(7), a = i(16), s = i(3), l = i(43), d = i(63), u = i(22), c = i(35), h = i(32), f = i(12),
        p = i(56), g = i(51), m = i(65), v = i(25), y = i(37), w = i(28), k = i(17), T = i(20), b = i(23),
        C = r.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        S = v.DownloadKernelCategoryManager.getCategoryManager(), I = a.DownloadKernelEventManager.getEventManager(),
        _ = l.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        A = p.ToastNotifyManagerNS.getToastNotifyManger();
    var D, x;
    !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"
    }(D = t.ScheduleCompleteTaskType || (t.ScheduleCompleteTaskType = {})), function (e) {
        e.Unknow = "Unknow", e.ScheduleTaskCountChange = "ScheduleTaskCountChange"
    }(x = t.ScheduleTaskEventType || (t.ScheduleTaskEventType = {})), function (e) {
        let t = D.UnKnown, i = null, o = -1, r = -1, a = -1, l = [], v = !1, N = !1;
        const E = new T.EventEmitter;

        function P() {
            i = I.attachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, W)
        }

        function O() {
            null !== i && (I.detachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, i), i = null)
        }

        function M() {
            O(), t = D.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;
            a = 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 = S.getCurrentPrivateCategory();
                    t && (e = c.TaskOperatorNs.hasCategoryStartTask(t.getId()));
                    return e
                }() ? e = 0 : e >= 300 ? (w.NativeCallHostModule.nativeCallHost.fireNativeEvent("getCurrentTabUrl", "callbackGetCurrentTabUrl"), k.NativeCallModule.nativeCall.AttachNativeEvent("callbackGetCurrentTabUrl", t => n(this, void 0, void 0, function* () {
                    t ? e = 0 : (v = !0, yield c.TaskOperatorNs.startAllPausedTask(), clearInterval(a), a = -1)
                }))) : e++
            }, 1e3)
        }

        function R(e) {
            return e && (e = !1, c.TaskOperatorNs.pauseAll(s.DownloadKernel.TaskStopReason.FreeDownload).catch(), -1 !== a && (clearInterval(a), a = -1), function () {
                let e = S.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 r = n.getTaskBaseInfo(), a = n.getTaskPreStatus();
                if (r.taskType !== s.DownloadKernel.TaskType.Bt || o !== s.DownloadKernel.TaskStatus.Succeeded && o !== s.DownloadKernel.TaskStatus.Seeding || a !== s.DownloadKernel.TaskStatus.Succeeded && a !== 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 b.LoginHelperNS.loginHelper.getUserInfoAw("userid");
                    if (!t) break;
                    let i = S.getCategoryFromUserId("ThunderPanPlugin", t, "ThunderPan Download Category");
                    if (!i) break;
                    let n = i.getId(), o = S.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 === D.ShutDown ? C.shutDownMachine() : e === D.Sleep ? C.suspendMachine() : e === D.Exit ? yield d.quitPromises.run() : e === D.StartAll ? c.TaskOperatorNs.startAll() : e === D.StopAll && c.TaskOperatorNs.pauseAll(s.DownloadKernel.TaskStopReason.PauseAll).catch()
            })
        }

        function W(...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 !== D.ShutDown && e !== D.Sleep && e !== D.Exit) break;
                if (t === e) break;
                M(), t = e, P();
                let i = "";
                switch (e) {
                    case D.ShutDown:
                        i = "已开启下载完成后关机";
                        break;
                    case D.Sleep:
                        i = "已开启下载完成后睡眠";
                        break;
                    case D.Exit:
                        i = "已开启下载完成后退出迅雷"
                }
                let n = A.showNotify(p.ToastNotifyManagerNS.notifyIdScheduleTaskComplete, g.ToastNotifyItemType.RedCancelNotify, i, 5e3);
                n && n.onCancel(() => {
                    M()
                })
            } while (0)
        }, e.getDownloadCompleteTaskType = function () {
            return t
        }, e.startDownloadCompleteMonitor = P, e.stopDownloadCompleteMonitor = O, 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(x.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(x.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) {
            N ? 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 && (N = !0, e())
            }).catch()
        }, e.startFreeDownLoad = function () {
            let e = !1, t = 0;
            r = setInterval(() => {
                t = C.getFreeTime(), e ? t < 300 && (e = !1, v = R(v)) : t >= 300 && (e = !0, L())
            }, 2e3)
        }, e.closeFreeDownLoad = function () {
            -1 !== r && (clearInterval(r), r = -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(47), o = i(99), r = i(0).default.getLogger("Thunder.shub-http.http-session"), a = i(62),
        s = i(13), {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) {
                    r.information("body is empty"), t(null);
                    break
                }
                let n = this.auth, o = this.accept, a = {
                    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 || "*/*"}
                };
                r.verbose("option", a);
                try {
                    this.postImpl(i, a, e, i => {
                        this.mCurRetries < this.retries ? (this.mCurRetries++, r.information("mCurRetries", this.mCurRetries), this.post(e, t)) : t(i)
                    })
                } catch (e) {
                    r.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 || "*/*"}
                }
            }
            r.verbose("option", i);
            try {
                this.getImpl(i, e, i => {
                    this.mCurRetries < this.retries ? (this.mCurRetries++, r.information("mCurRetries", this.mCurRetries), this.get(e, t)) : t(i)
                })
            } catch (e) {
                r.warning("error ", e), t(null)
            }
        }

        postImpl(e, t, i, n) {
            let s = (this.protocol === d.HTTPS ? a : o).request(t, e => {
                let t = null;
                e.on("data", e => {
                    t = t ? Buffer.concat([t, e]) : e
                }), e.on("end", () => {
                    r.information("statusCode", e.statusCode), r.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 ? a : o).get(e, e => {
                let i = null;
                e.on("data", e => {
                    i = i ? Buffer.concat([i, e]) : e
                }), e.on("end", () => {
                    r.information("statusCode", e.statusCode), r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(8), a = i(67), s = i(44), l = i(73), d = i(10), u = i(0), c = i(149), 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 r.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 = {}, r = e[i];
                    n.orderId = r.orderId, f.information("parseOrders: curOrderId = ", r.orderId);
                    let a = r.materials;
                    if (null === a || void 0 === a || a.length <= 0) {
                        f.information("parseOrders:materials 有问题");
                        continue
                    }
                    let s = a[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 a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), r = i(4), a = 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 r.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 r.client.callServerFunction("GetSessionID");
                    return e && "" !== e && (this.mSessionId = e), this.mSessionId || "0"
                }
            })
        }

        getUserinfo() {
            return n(this, void 0, void 0, function* () {
                return yield r.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 r.client.callServerFunction("IsLogined");
                if (null === e) {
                    let t = setInterval(() => n(this, void 0, void 0, function* () {
                        (e = yield r.client.callServerFunction("IsLogined")) && this.onLogin().catch(), null !== e && (clearInterval(t), r.client.attachServerEvent("onUserInfoChange", this.onUserInfoChange.bind(this)), r.client.attachServerEvent("onLoginStatusChange", this.onLoginStatusChange.bind(this)))
                    }), 50)
                } else e && this.onLogin().catch(), r.client.attachServerEvent("onUserInfoChange", this.onUserInfoChange.bind(this)), r.client.attachServerEvent("onLoginStatusChange", this.onLoginStatusChange.bind(this))
            })
        }

        onLogin() {
            return n(this, void 0, void 0, function* () {
                a.information("--\x3eonLogin"), this.mPreUserIsVip = this.mIsVip, this.clear(), this.mIsLogin = !0, yield this.parseUserInfo(), this.emit(s.login), this.authorityChanged(this.authority), a.information("<--onLogin")
            })
        }

        onLogout() {
            a.information("--\x3eonLogout"), this.mPreUserIsVip = this.mIsVip, this.clear(), this.emit(s.logout), this.authorityChanged(!1), a.information("<--onLogout")
        }

        onUserInfoChange(e, t, i) {
            return n(this, void 0, void 0, function* () {
                a.information("--\x3eonUserInfoChange"), "vipinfo" === t && (a.information("data", i), yield this.parseUserInfo(), this.mIsVip && this.authorityChanged(this.authority, !0)), a.information("<--onUserInfoChange")
            })
        }

        onLoginStatusChange(e, t, i) {
            a.information("--\x3eonLoginStatusChange", "newStatus", i), "unlogin" === i || "offline" === i ? this.onLogout() : "online" === i && this.onLogin().catch(), a.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 (a.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";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t, i, n, o, r, a, s, l, d, u;
        !function (e) {
            e.Unkown = "XgtType.Unkown", e.Try = "XgtType.Try", e.Ad = "XgtType.Ad", e.Baotuan = "XgtType.Baotuan", e.PlayGame = "XgtType.PlayGame", 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"
        }(r = e.VipTaskStatus || (e.VipTaskStatus = {})), function (e) {
            e[e.StatusOnly = 1] = "StatusOnly", e[e.TokenOnly = 2] = "TokenOnly", e[e.Others = 3] = "Others"
        }(a = 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"
        }(d = e.PlayGameXgtState || (e.PlayGameXgtState = {})), function (e) {
            e.clickJoinBtn = "clickJoinBtn", e.clickJoinBtnByWeb = "clickJoinBtnByWeb", e.clickJoinBtnByMenu = "clickJoinBtnByMenu", e.clickCutLineBtn = "clickCutLineBtn", e.teamImmediately = "teamImmediately", e.statusCallbackEndAutoJoin = "statusCallbackEndAutoJoin", e.statusCallbackEndEnter = "statusCallbackEndEnter", e.authority = "authority", e.loginAutoJoin = "loginAutoJoin", e.taskStarted = "taskStarted", e.grayAutoJoin = "grayAutoJoin", e.restartAppJoin = "restartAppJoin", e.resumeBaotuan = "resumeBaotuan", e.packagetry = "packagetry"
        }(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(563), o = i(852);
    for (var r in(t = e.exports = function (e, t) {
        return new o(t).process(e)
    }).FilterCSS = o, n) t[r] = n[r];
    "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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), r = i(29), a = i(4), s = i(860), l = i(861);
    t.default = {
        getComments({tid: e, sourceId: t, pageSize: i = 10, typeId: r = 4, lastId: a = 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: r,
                    last_id: a,
                    type: s,
                    page_size: i,
                    category: l,
                    v: "1.0"
                })
            })
        },
        publishComment({tid: e, sourceId: t, cid: i, username: a, comment: s, device: l, hugFlag: d, images: u, extra: c, typeId: h = 4}) {
            return n(this, void 0, void 0, function* () {
                let n = r.ToolsUtilitiesAWNS.genarateMd5(encodeURIComponent(s) + (new Date).getTime()),
                    f = Object.assign({}, {
                        tid: e,
                        source_id: t,
                        type_id: h,
                        cid: i,
                        username: a,
                        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: r}) {
            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: r})
            })
        },
        likeComment({tid: e, typeId: t = 4, cid: i, username: r, type: a = 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: r,
                    type: a
                })
            })
        },
        reportComment({cid: e, reason: t, desc: i}) {
            return n(this, void 0, void 0, function* () {
                let n = yield a.client.callServerFunction("GetThunderVersion"),
                    r = yield a.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": r
                })
            })
        },
        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: r}) => o.fetchCmtRes("post", "/comment/api/get_single_comment", {
            tid: e,
            source_id: t,
            type_id: i,
            cid: n,
            userid: r
        }),
        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: r, accessKeySecret: a, stsToken: s, region: d, bucket: u, exist: c} = n.data,
                    h = new l({accessKeyId: r, accessKeySecret: a, 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(118);

    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(86), o = i.n(n), r = i(60), a = i.n(r), 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], r = t.length;
        if ("function" == typeof o) return o.apply(null, t.slice(1));
        if ("string" == typeof o) {
            for (var a = String(o).replace(s, function (e) {
                if ("%%" === e) return "%";
                if (n >= r) 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 < r; l = t[++n]) a += " " + l;
            return a
        }
        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 r(a) {
            if (a && a.length) i(a); else {
                var s = n;
                n += 1, s < o ? t(e[s], r) : 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 r = Object.keys(e), a = r.length, s = 0, l = [], d = function (e) {
            l.push.apply(l, e), ++s === a && n(l)
        };
        r.forEach(function (t) {
            var n = e[t];
            -1 !== o.indexOf(t) ? c(n, i, d) : function (e, t, i) {
                var n = [], o = 0, r = e.length;

                function a(e) {
                    n.push.apply(n, e), ++o === r && i(n)
                }

                e.forEach(function (e) {
                    t(e, a)
                })
            }(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" : a()(n)) && "object" === a()(e[i]) ? e[i] = o()({}, e[i], n) : e[i] = n
        }
        return e
    }

    var g = function (e, t, i, n, o, r) {
        !e.required || i.hasOwnProperty(e.field) && !u(t, r || 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" : a()(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 w = "enum";
    var k = {
        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 r = e.type;
                ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"].indexOf(r) > -1 ? y[r](t) || n.push(d(o.messages.types[r], e.fullField, e.type)) : r && (void 0 === t ? "undefined" : a()(t)) !== e.type && n.push(d(o.messages.types[r], e.fullField, e.type))
            }
        }, range: function (e, t, i, n, o) {
            var r = "number" == typeof e.len, a = "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), r ? l !== e.len && n.push(d(o.messages[u].len, e.fullField, e.len)) : a && !s && l < e.min ? n.push(d(o.messages[u].min, e.fullField, e.min)) : s && !a && l > e.max ? n.push(d(o.messages[u].max, e.fullField, e.max)) : a && 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[w] = Array.isArray(e[w]) ? e[w] : [], -1 === e[w].indexOf(t) && n.push(d(o.messages[w], e.fullField, e[w].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 T = "enum";
    var b = function (e, t, i, n, o) {
        var r = e.type, a = [];
        if (e.required || !e.required && n.hasOwnProperty(e.field)) {
            if (u(t, r) && !e.required) return i();
            k.required(e, t, n, a, o, r), u(t, r) || k.type(e, t, n, a, o)
        }
        i(a)
    }, C = {
        string: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t, "string") && !e.required) return i();
                k.required(e, t, n, r, o, "string"), u(t, "string") || (k.type(e, t, n, r, o), k.range(e, t, n, r, o), k.pattern(e, t, n, r, o), !0 === e.whitespace && k.whitespace(e, t, n, r, o))
            }
            i(r)
        }, method: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                k.required(e, t, n, r, o), void 0 !== t && k.type(e, t, n, r, o)
            }
            i(r)
        }, number: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                k.required(e, t, n, r, o), void 0 !== t && (k.type(e, t, n, r, o), k.range(e, t, n, r, o))
            }
            i(r)
        }, boolean: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                k.required(e, t, n, r, o), void 0 !== t && k.type(e, t, n, r, o)
            }
            i(r)
        }, regexp: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                k.required(e, t, n, r, o), u(t) || k.type(e, t, n, r, o)
            }
            i(r)
        }, integer: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                k.required(e, t, n, r, o), void 0 !== t && (k.type(e, t, n, r, o), k.range(e, t, n, r, o))
            }
            i(r)
        }, float: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                k.required(e, t, n, r, o), void 0 !== t && (k.type(e, t, n, r, o), k.range(e, t, n, r, o))
            }
            i(r)
        }, array: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t, "array") && !e.required) return i();
                k.required(e, t, n, r, o, "array"), u(t, "array") || (k.type(e, t, n, r, o), k.range(e, t, n, r, o))
            }
            i(r)
        }, object: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                k.required(e, t, n, r, o), void 0 !== t && k.type(e, t, n, r, o)
            }
            i(r)
        }, enum: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                k.required(e, t, n, r, o), t && k[T](e, t, n, r, o)
            }
            i(r)
        }, pattern: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t, "string") && !e.required) return i();
                k.required(e, t, n, r, o), u(t, "string") || k.pattern(e, t, n, r, o)
            }
            i(r)
        }, date: function (e, t, i, n, o) {
            var r = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                if (k.required(e, t, n, r, o), !u(t)) {
                    var a = void 0;
                    a = "number" == typeof t ? new Date(t) : t, k.type(e, a, n, r, o), a && k.range(e, a.getTime(), n, r, o)
                }
            }
            i(r)
        }, url: b, hex: b, email: b, required: function (e, t, i, n, o) {
            var r = [], s = Array.isArray(t) ? "array" : void 0 === t ? "undefined" : a()(t);
            k.required(e, t, n, r, o, s), i(r)
        }
    };

    function S() {
        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 I = S();

    function _(e) {
        this.rules = null, this._messages = I, this.define(e)
    }

    _.prototype = {
        messages: function (e) {
            return e && (this._messages = p(S(), e)), this._messages
        }, define: function (e) {
            if (!e) throw new Error("Cannot configure a schema with no rules");
            if ("object" !== (void 0 === e ? "undefined" : a()(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],
                r = 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 === I && (c = S()), 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 = r[i], g.forEach(function (n) {
                        var a = n;
                        "function" == typeof a.transform && (r === e && (r = o()({}, r)), m = r[i] = a.transform(m)), (a = "function" == typeof a ? {validator: a} : o()({}, a)).validator = t.getValidationMethod(a), a.field = i, a.fullField = a.fullField || i, a.type = t.getType(a), a.validator && (v[i] = v[i] || [], v[i].push({
                            rule: a,
                            value: m,
                            source: r,
                            field: i
                        }))
                    })
                });
                var y = {};
                h(v, s, function (e, t) {
                    var i = e.rule,
                        n = !("object" !== i.type && "array" !== i.type || "object" !== a()(i.fields) && "object" !== a()(i.defaultField));

                    function r(e, t) {
                        return o()({}, t, {fullField: i.fullField + "." + e})
                    }

                    function u() {
                        var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
                        if (Array.isArray(a) || (a = [a]), a.length && l("async-validator:", a), a.length && i.message && (a = [].concat(i.message)), a = a.map(f(i)), s.first && a.length) return y[i.field] = 1, t(a);
                        if (n) {
                            if (i.required && !e.value) return a = i.message ? [].concat(i.message).map(f(i)) : s.error ? [s.error(i, d(s.messages.required, i.field))] : [], t(a);
                            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(r.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 ? a.concat(e) : e)
                            })
                        } else t(a)
                    }

                    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 = [], r = {};
                        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++) r[n = o[i].field] = r[n] || [], r[n].push(o[i]); else o = null, r = null;
                        u(o, r)
                    }(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 && !C.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] ? C.required : C[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");
        C[e] = t
    }, _.messages = I;
    t.default = _
}, 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.findPageStyle && !e.panStyle && !e.messagePageStyle}
        }), e._v(" "), i("pan-plugin-view", {
            staticClass: "xly-client__page xly-pan",
            class: {"is-show": e.panStyle}
        }), e._v(" "), i("find-page", {
            staticClass: "xly-client__page xly-findpage",
            class: {"is-show": e.findPageStyle}
        }), 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()], 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,
                expression: "!settingTab && curNav !== 'message-page'"
            }], 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",
            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",
            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",
            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 ? 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", [i("ul", {staticClass: "xly-context-menu__main xly-context-menu__main--primary"}, [e.showBrowserIcon ? i("li", {
            staticClass: "xly-context-menu__item",
            on: {}
        }, [e._m(0)]) : e._e(), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {}
        }, [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", {
            on: {}
        }, [e._m(4)]), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {}
        }, [e._m(5)]), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {}
        }, [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", {
            staticClass: "xly-context-menu__item",
            on: {}
        }, [e._m(9)]), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {}
        }, [e._m(10)]), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {}
        }, [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 ? i("div", {
            staticClass: "xly-down-bar__detail",
            domProps: {innerHTML: e._s(e.secondary)}
        }) : 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",
            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(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.currentSelectdTaskIds.length > 1,
                expression: "currentSelectdTaskIds.length > 1"
            }], staticClass: "xly-down-detail"
        }, [i("MultiChosenTasks", {
            attrs: {
                taskIds: e.currentSelectdTaskIds,
                curCategoryViewId: e.currentCategoryViewId,
                currentCategoryId: e.currentCategoryId
            }
        })], 1), 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, r = t.chosen, a = 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: r,
                            active: a,
                            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 () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.showScancode && "Downloading" === e.curCategoryViewid,
                expression: "showScancode && curCategoryViewid === 'Downloading'"
            }]
        }, [i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.accelerationTimes > 0 && "" !== e.shortlink && !e.isAccelerating,
                expression: "accelerationTimes > 0 && shortlink !== '' && !isAccelerating"
            }]
        }, ["a" === e.qrcodeConfig.guidePage ? i("div", {staticClass: "xly-detail-code xly-detail-code--type-2"}, [i("td-media", {
            staticClass: "xly-detail-code__media",
            attrs: {align: "middle"}
        }, [i("div", {
            staticClass: "xly-detail-code__resource",
            attrs: {slot: "media"},
            slot: "media"
        }, [i("canvas", {
            attrs: {
                id: "showCodeAcceleration",
                width: "74px",
                height: "74px"
            }
        })]), e._v(" "), i("h4", [e._v(e._s(e.qrcodeConfig.right_panel_text) + " "), i("span", {staticClass: "tips"}, [e._v("福利")])]), e._v(" "), i("p", [e._v(e._s(e.qrcodeConfig.zerotype_text))]), e._v(" "), i("p", [e._v("请使用"), i("span", [e._v("微信")]), e._v("或"), i("span", [e._v("手机迅雷")]), e._v("扫码")]), e._v(" "), i("i", {
            staticClass: "xly-icon-help",
            on: {click: e.handleClickHelp}
        })]), e._v(" "), i("div", {staticClass: "xly-detail-code__times"}, [i("p", {staticClass: "number"}, [e._v(e._s(e.accelerationTimes))]), e._v(" "), i("p", [e._v("本周剩余次数")])])], 1) : "b" === e.qrcodeConfig.guidePage ? i("div", {staticClass: "xly-detail-code xly-detail-code--type-1 "}, [i("td-media", {
            staticClass: "xly-detail-code__media",
            attrs: {align: "middle"}
        }, [i("div", {
            staticClass: "xly-detail-code__resource",
            attrs: {slot: "media"},
            slot: "media"
        }, [i("canvas", {
            attrs: {
                id: "showCodeAcceleration",
                width: "74px",
                height: "74px"
            }
        })]), e._v(" "), i("h4", [e._v(e._s(e.qrcodeConfig.right_panel_text) + " "), i("span", {staticClass: "tips"}, [e._v("本周剩余：" + e._s(e.accelerationTimes))])]), e._v(" "), i("p", [e._v(e._s(e.qrcodeConfig.zerotype_text))]), e._v(" "), i("p", [e._v("请使用"), i("span", [e._v("微信")]), e._v("或"), i("span", [e._v("手机迅雷")]), e._v("扫码")]), e._v(" "), i("i", {
            staticClass: "xly-icon-help",
            on: {click: e.handleClickHelp}
        })])], 1) : i("div", {staticClass: "xly-detail-code"}, [i("td-media", {
            staticClass: "xly-detail-code__media",
            attrs: {align: "middle"}
        }, [i("div", {
            staticClass: "xly-detail-code__resource",
            attrs: {slot: "media"},
            slot: "media"
        }, [i("canvas", {
            attrs: {
                id: "showCodeAcceleration",
                width: "60px",
                height: "60px"
            }
        })]), e._v(" "), i("h4", [e._v(e._s(e.qrcodeConfig.right_panel_text))]), e._v(" "), i("p", [e._v("请使用"), i("span", [e._v("微信")]), e._v("或"), i("span", [e._v("手机迅雷")]), e._v("扫码，每个任务可加速1次，本周剩余" + e._s(e.accelerationTimes) + "/" + e._s(e.maxTimesPerWeek))]), e._v(" "), i("i", {
            staticClass: "xly-icon-help",
            attrs: {title: "扫码加速规则"},
            on: {click: e.handleClickHelp}
        })])], 1)]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.accelerationTimes <= 0 && "" !== e.shortlink,
                expression: "accelerationTimes <= 0 && shortlink !== ''"
            }], staticClass: "xly-detail-code"
        }, [i("td-media", {
            staticClass: "xly-detail-code__media",
            attrs: {align: "middle"}
        }, [i("div", {
            staticClass: "xly-detail-code__resource",
            attrs: {slot: "media"},
            slot: "media"
        }, [i("canvas", {
            attrs: {
                id: "daoLiangCode",
                width: "60px",
                height: "60px"
            }
        })]), e._v(" "), i("h4", [e._v("扫码加速下载任务")]), e._v(" "), i("p", [e._v("本周次数已用完，下周再来扫码加速吧")]), e._v(" "), i("i", {
            staticClass: "xly-icon-help",
            attrs: {title: "扫码加速规则"},
            on: {click: e.handleClickHelp}
        })])], 1), e._v(" "), e.curTaskStatus <= 5 && e.isAccelerating && "" === e.shortlink && !e.isHuddleOrTry ? i("div", {staticClass: "xly-detail-code"}, [i("td-media", {
            staticClass: "xly-detail-code__media",
            attrs: {align: "middle"}
        }, [i("div", {
            staticClass: "xly-detail-code__resource",
            attrs: {slot: "media"},
            slot: "media"
        }, [i("img", {
            attrs: {
                src: e.imgRunning,
                alt: "扫码加速"
            }
        })]), e._v(" "), e.curTaskStatus <= 3 ? i("h4", [e._v("准备加速中...")]) : i("h4", [e._v("扫码加速中..."), i("span", {staticClass: "number is-light"}, [e._v(e._s(e.vipSpeed))])]), e._v(" "), e.curTaskStatus <= 3 ? i("p", [e._v("当前任务正在排队中, 稍后自动开启")]) : i("p", [e._v("剩余加速流量" + e._s(e.remainSize) + "/" + e._s(e.allOfflineSize))]), e._v(" "), i("i", {
            staticClass: "xly-icon-help",
            attrs: {title: "扫码加速规则"},
            on: {click: e.handleClickHelp}
        })])], 1) : e.isAccelerating && "" === e.shortlink && ([6, 7].includes(e.curTaskStatus) || e.isHuddleOrTry) ? i("div", {staticClass: "xly-detail-code"}, [i("td-media", {
            staticClass: "xly-detail-code__media",
            attrs: {align: "middle"}
        }, [i("div", {
            staticClass: "xly-detail-code__resource",
            attrs: {slot: "media"},
            slot: "media"
        }, [i("img", {
            attrs: {
                src: e.imgPause,
                alt: "扫码加速已暂停"
            }
        })]), e._v(" "), [6, 7].includes(e.curTaskStatus) ? i("h4", [e._v("扫码加速已暂停")]) : i("h4", [e._v("准备加速中...")]), e._v(" "), [6, 7].includes(e.curTaskStatus) ? i("p", {staticClass: "is-note"}, [e._v("任务已暂停，开始任务后，将自动重启扫码加速")]) : e.isHuddle ? i("p", {staticClass: "is-note"}, [e._v("正在优先使用抱团加速，加速结束后，将自动重启扫码加速")]) : i("p", {staticClass: "is-note"}, [e._v("正在优先使用试用加速，加速结束后，将自动重启扫码加速")]), e._v(" "), i("i", {
            staticClass: "xly-icon-help",
            attrs: {title: "扫码加速规则"},
            on: {click: e.handleClickHelp}
        })])], 1) : e.curTaskStatus < 8 && e.hasAccelerated && "" === e.shortlink ? i("div", {staticClass: "xly-detail-code"}, [i("td-media", {
            staticClass: "xly-detail-code__media",
            attrs: {align: "middle"}
        }, [i("div", {
            staticClass: "xly-detail-code__resource",
            attrs: {slot: "media"},
            slot: "media"
        }, [i("img", {
            attrs: {
                src: e.imgFinish,
                alt: "加速完成"
            }
        })]), e._v(" "), i("h4", [i("i", {staticClass: "td-icon-success"}), e._v(" 加速完成，节省了" + e._s(e.saveTimeStr) + "，峰值速度为" + e._s(e.maxSpeedStr))]), e._v(" "), i("p", [e._v("本周剩余" + e._s(e.accelerationTimes) + "/" + e._s(e.maxTimesPerWeek) + "次，快去扫码加速其他任务")]), e._v(" "), i("i", {
            staticClass: "xly-icon-help",
            attrs: {title: "扫码加速规则"},
            on: {click: e.handleClickHelp}
        })])], 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", {
            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, r = t.row;
                    return [i("i", {
                        staticClass: "xly-icon-type is-small",
                        class: e.rowIcon(r, n, o),
                        on: {
                            click: function (t) {
                                e.onClickName(r)
                            }
                        }
                    })]
                }
            }, {
                key: "default", fn: function (t) {
                    var n = t.prop, o = t.value, r = t.row;
                    return ["name" === n ? [i("span", {
                        class: {
                            "is-unread": e.isUnread(r) && !r.data.errMessage,
                            "is-normal": e.isNormal(r)
                        }, attrs: {title: r.name}, on: {
                            click: function (t) {
                                t.stopPropagation(), e.onClickName(r, o)
                            }
                        }
                    }, [e._v(e._s(r.name))])] : "fileSize" === n ? [e._v("\n        " + e._s(e.formatSize(r.data.fileSize)))] : "progress" === n ? [r.data.errMessage ? [i("span", {staticClass: "xly-file-list__status is-error"}, [e._v("\n            失败\n            "), i("td-tooltip", {
                        attrs: {
                            content: r.data.errMessage,
                            trigger: "hover"
                        }
                    }, [i("i", {staticClass: "xly-icon-note"})])], 1)] : r.data.isDelete ? [i("span", {staticClass: "xly-file-list__status"}, [e._v("已删除")])] : "branch" === r.type ? [e.haveSelectItem(r) ? [1 === e.getProgress(r) && r.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(r) ? i("i", {
                        staticClass: "xly-icon-play-small",
                        attrs: {title: "播放"},
                        on: {
                            click: function (t) {
                                e.playFile(r)
                            }
                        }
                    }) : i("i", {
                        staticClass: "xly-icon-open-small", attrs: {title: "打开文件夹"}, on: {
                            click: function (t) {
                                e.openDir(r)
                            }
                        }
                    })])] : [i("span", {staticClass: "xly-file-list__status"}, [e._v(e._s((100 * r.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(r) ? i("i", {
                        staticClass: "xly-icon-play-small",
                        attrs: {title: "播放"},
                        on: {
                            click: function (t) {
                                e.playFile(r)
                            }
                        }
                    }) : e._e()])]] : [i("span", {staticClass: "xly-file-list__status is-disabled"}, [e._v("不下载")])]] : e.isComplete(r) ? [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 && r.data.index === e.playingMediaIndex && e.playstate > 1 && e.playstate < 6 ? i("i", {staticClass: "xly-gif-playing"}) : e.isSupportPlay(r) ? i("i", {
                        staticClass: "xly-icon-play-small",
                        attrs: {title: "播放"},
                        on: {
                            click: function (t) {
                                e.playFile(r)
                            }
                        }
                    }) : i("i", {
                        staticClass: "xly-icon-file-small", attrs: {title: "打开文件"}, on: {
                            click: function (t) {
                                e.openFile(r)
                            }
                        }
                    })])] : e.checkedKeys.includes(r.key) ? [i("span", {staticClass: "xly-file-list__status"}, [e._v(e._s((100 * e.getProgress(r)).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(r) && e.playingCurTask && r.data.index === e.playingMediaIndex && e.playstate > 1 && e.playstate < 6 ? i("i", {staticClass: "xly-gif-playing"}) : e.isSupportPlay(r) ? i("i", {
                        staticClass: "xly-icon-play-small",
                        attrs: {title: "播放"},
                        on: {
                            click: function (t) {
                                e.playFile(r)
                            }
                        }
                    }) : 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(" "), i("li", {on: {click: e.move2Dir}}, [e._v("移动文件到")]), 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(" "), i("li", {on: {click: e.move2Dir}}, [e._v("移动文件到")]), 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: !(-1 === e.currentCategoryId && e.curTaskBase && -1 !== e.curTaskBase.categoryId),
                expression: "!(currentCategoryId === -1 && (curTaskBase && curTaskBase.categoryId !== -1))"
            }], 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", {staticClass: "xmpc-loading__vip"}, [e._v("\n      会员尊享视频高速加载特权\n      "), i("button", {
            staticClass: "xmpc-button xmpc-button--small",
            on: {
                click: function (t) {
                    e.openPayVip(!1)
                }
            }
        }, [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", [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("td-table", {
            ref: "table",
            attrs: {
                columns: e.columns,
                data: e.tree,
                height: e.tabHeight,
                "row-height": 36,
                expand: e.expandHead,
                checkable: "",
                "tree-enabled": "",
                "all-selected-disabled": e.isAllSelectedAndFinished
            },
            on: {
                checkAll: function (e) {
                }
            },
            scopedSlots: e._u([{
                key: "icon", fn: function (t) {
                    var n = t.prop, o = t.value, r = t.row;
                    return [i("i", {
                        staticClass: "xly-icon-type is-small",
                        class: e.rowIcon(r, o, n),
                        on: {
                            click: function (t) {
                                e.onClickName(r)
                            }
                        }
                    })]
                }
            }, {
                key: "default", fn: function (t) {
                    var n = t.prop, o = t.value, r = t.row;
                    return ["name" === n ? [i("span", {
                        staticClass: "is-active",
                        attrs: {title: r.name},
                        on: {
                            click: function (t) {
                                e.onClickName(r, o)
                            }
                        }
                    }, [e._v(e._s(r.name))])] : "fileSize" === n ? [e._v(e._s(e.formatSize(r.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}}, ["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 ? i("i", {staticClass: "xly-line"}) : e._e(), e._v(" "), "a" === e.shareShowType ? i("div", {
            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: "easyShare"}}), e._v(" "), i("p", [e._v("手机扫码" + e._s(e.scanButtonText))])])]) : e._e()]), e._v(" "), "b" === e.shareShowType ? i("div", {
            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: "easyShare"}}), e._v(" "), i("p", [e._v("手机扫码" + e._s(e.scanButtonText))])])], 1) : e._e()]) : 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(492), 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(3), o = i(31), r = i(373), a = i(71), 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 = a.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 r.CategoryView(e, n.DownloadKernel.CategroyViewID.Downloading),
                i = new r.CategoryView(e, n.DownloadKernel.CategroyViewID.Completed),
                o = new r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18);
    !function (e) {
        let t = !1, r = [];
        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 && r.push(i)
                    }
                }
            })
        }, e.getExtraTracks = function () {
            return r
        }
    }(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(375);
    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(50);

    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 r;
        if (i) r = i(t); else if (n.isURLSearchParams(t)) r = t.toString(); else {
            var a = [];
            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)), a.push(o(t) + "=" + o(e))
                }))
            }), r = a.join("&")
        }
        return r && (e += (-1 === e.indexOf("?") ? "?" : "&") + r), e
    }
}, function (e, t, i) {
    var n = i(47), o = i(99), r = i(62), a = i(502), s = i(100).Writable, l = i(618)("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 r = o + ":", s = i[r] = 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: r,
                    maxRedirects: t.maxRedirects,
                    maxBodyLength: t.maxBodyLength
                }, e), e.nativeProtocols = i, a.equal(e.protocol, r, "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 r in this._currentUrl = n.format(this._options), o._redirectable = this, u) r && o.on(r, u[r]);
        if (this._isRedirect) {
            var a = this._requestBodyBuffers;
            !function e() {
                if (0 !== a.length) {
                    var t = a.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 r = n.resolve(this._currentUrl, t);
            l("redirecting to", r), Object.assign(this._options, n.parse(r)), this._isRedirect = !0, this._performRequest()
        } else e.responseUrl = this._currentUrl, this.emit("response", e), this._requestBodyBuffers = []
    }, e.exports = h({http: o, https: r}), 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(9), a = i(13), s = i(0), {isDef: l} = a.ThunderUtil, d = i(72), u = i(33), c = i(3), h = i(4),
        f = i(69), p = i(34), 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 a = m(e.getTaskAttribute(c.DownloadKernel.TaskAttribute.ProductInfo)), s = e.getId();
                const u = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize);
                let w = `broswer=${a},taskid=${s}`, k = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskType),
                    T = "";
                if (k === c.DownloadKernel.TaskType.P2sp) T = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskUrl), w = `${w},task_type=p2sp,download_info=${encodeURIComponent(T)}`; else if (k === c.DownloadKernel.TaskType.Bt) {
                    let t = e.getExtraObject().getInfoId();
                    w = `${w},task_type=bt,download_info=${t}`, T = t
                } else k === c.DownloadKernel.TaskType.Emule ? (T = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskUrl), w = `${w},task_type=emule,download_info=${encodeURIComponent(T)}`) : k === c.DownloadKernel.TaskType.Group ? w = `${w},task_type=group,download_info=` : k === c.DownloadKernel.TaskType.Magnet && (T = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskUrl), w = `${w},task_type=magnet,download_info=${encodeURIComponent(T)}`);
                let b = yield d.isVestUrl(T, "vestURL"), C = yield d.isVestUrl(T, "commonUrl"), S = "";
                b ? (S = n, n = "xl_password_vest") : C && (S = n, n = "xl_password_common");
                let I = 0;
                const _ = yield h.client.callServerFunction("IsLogined");
                let A = !1, D = 0, x = yield h.client.callServerFunction("GetUserInfo", 2);
                if (x) try {
                    x = JSON.parse(x)
                } catch (e) {
                    g.warning(e.message)
                }
                x && (D = Number(x.vasType).valueOf(), A = Boolean("1" === x.isVip)), _ && A && (I = 5 === D ? 7 : l(D) && D > 2 ? 3 : 2), w = `${w = `${w},source=${n},pwd_source=${S},is_login=${_ ? 1 : 0},is_vip=${A ? 1 : 0},vip_type=${I}`},disk_type=${yield y(e.getTaskAttribute(c.DownloadKernel.TaskAttribute.SavePath))}`;
                let N = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName), E = encodeURIComponent(N),
                    P = o.extname(N);
                "" !== (P = void 0 === P ? "" : P) && (P = P.substring(1)), f.ParseUrlFileNameNS.isUsualFileExtName(P) || (P = ""), w = `${w},filename=${E},filesize=${u},filesuffix=${P},libversion=${p.DownloadKernelManager.getDownloadSdkVersion()}`, void 0 !== i && (w = `${w},${i}`);
                let O = "core_event";
                g.information("trackEvent", O, t, w), r.XLStatNS.trackEvent(O, t, "", 0, 0, 0, 0, w)
            } 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(631), r = i(20), a = i(4), 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 r.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 a.client.callServerFunction("GetTpPeerId");
                    return e && "" !== e && (this.mPeerId = e), this.mPeerId || ""
                }
            })
        }

        getCurrentCategoryId() {
            return n(this, void 0, void 0, function* () {
                return yield a.client.callServerFunction("GetCurrentCategoryId")
            })
        }

        getTaskBaseInfo(e) {
            return n(this, void 0, void 0, function* () {
                let t = null, i = yield a.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 a.client.callServerFunction("GetTaskStatus", e)
            })
        }

        IsTaskExist(e) {
            return n(this, void 0, void 0, function* () {
                return yield a.client.callServerFunction("IsTaskExist", e)
            })
        }

        getTaskDetail(e) {
            return n(this, void 0, void 0, function* () {
                let t = null, i = yield a.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, r = e.type;
                    t = {infoId: n, files: new Map};
                    for (let i of e.fileList) {
                        let e = -1, a = i.url;
                        r === o.DownloadKernel.TaskType.Bt ? (e = i.index, a = this.createBtFileUrl(i.index, n)) : r === 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: a,
                            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 a.client.callServerFunction("EnableDcdnWithVipCert", e, t)
            })
        }

        updateDcdnWithVipCert(e, t) {
            return n(this, void 0, void 0, function* () {
                s.information("updateDcdnWithVipCert", "taskId", e, "vipCert", t), yield a.client.callServerFunction("UpdateDcdnWithVipCert", e, t)
            })
        }

        disableDcdnWithVipCert(e) {
            return n(this, void 0, void 0, function* () {
                s.information("disableDcdnWithVipCert", "taskId", e), yield a.client.callServerFunction("DisableDcdnWithVipCert", e)
            })
        }

        getDownloadingActiveTaskId() {
            return n(this, void 0, void 0, function* () {
                return yield a.client.callServerFunction("GetDownloadingActiveTaskId")
            })
        }

        attachDkEvents() {
            a.client.attachServerEvent("OnTaskInserted", this.onTaskInserted.bind(this)), a.client.attachServerEvent("OnTaskRemoved", this.onTaskRemoved.bind(this)), a.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)
                    }
                }
            }), a.client.attachServerEvent("OnTaskDetailChanged", (e, t, i) => {
                t.forEach(e => n(this, void 0, void 0, function* () {
                    this.onTaskDetailChanged(Number(e), yield this.getTaskBaseInfo(e))
                }))
            }), a.client.attachServerEvent("OnTaskDcdnStatusChanged", (e, t) => {
                if (null !== t) for (let e in t) {
                    let i = t[e];
                    this.onTaskDcdnStatusChanged(Number(e), i)
                }
            }), a.client.attachServerEvent("OnBtSubFileDcdnStatusChanged", this.onBtSubFileDcdnStatusChanged.bind(this)), a.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) {
            a.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";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(3), a = i(11), s = i(16), l = o.default.getLogger("magnet-listener"),
        d = a.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, r.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(r.DownloadKernel.TaskEventType.StatusChanged, (...t) => n(this, void 0, void 0, function* () {
                do {
                    if (!t) break;
                    if (t[0] !== r.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(), a = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskType),
                            s = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
                        l.information("magnet channelRMNewTaskDownloadTorrent taskStatus", o, s, e), a === r.DownloadKernel.TaskType.Magnet && s === e && (o === r.DownloadKernel.TaskStatus.Succeeded || o === r.DownloadKernel.TaskStatus.Seeding ? this.fireAll(s, !0) : o === r.DownloadKernel.TaskStatus.Failed && this.fireAll(s, !1, n.getTaskAttribute(r.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(r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(7), a = i(0), s = i(19), l = i(32), d = i(3), u = i(33), c = i(69),
        h = a.default.getLogger("ThunderNewTask"), f = r.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    let p = 5;
    !function (e) {
        let t;

        function r(e, t, i, n) {
            void 0 === i && (i = u.ThunderHelper.getTaskTypeFromUrl(e));
            let r = void 0, a = -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);
                    a = t.fileSize, l = t.fileHash
                }
                r = {
                    url: e,
                    cookie: "",
                    referer: "",
                    fileName: u,
                    browser: "",
                    statClick: t = void 0 === t ? "" : t,
                    fileSize: a,
                    fileHash: l,
                    fileType: s,
                    birdkeyChars: n
                };
                break
            } while (0);
            return r
        }

        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 = r(e, t, i, n);
            h.verbose(e);
            let a = 5;
            return {
                taskType: i,
                data: o,
                setting: {
                    loginFtp: !1,
                    ftpInfo: {userName: "", password: ""},
                    onlyOrigin: !1,
                    thread: a = 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 = r, 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, r, a = {}.hasOwnProperty;
        n = i(380), e = i(632), o = i(637), r = i(514), t.defaults = n.defaults, t.processors = r, t.ValidationError = function (e) {
            function t(e) {
                this.message = e
            }

            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, 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, r;
                for (n in this.assertLegalChar = t(this.assertLegalChar, this), e || (e = {}), this.noDoubleEncoding = e.noDoubleEncoding, o = e.stringify || {}) i.call(o, n) && (r = o[n], this[n] = r)
            }

            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, r, a, 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 != (r = e.newline) ? r : "\n", this.offset = null != (a = e.offset) ? a : 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), r = i(382), a = i(36), s = i(27), l = i(3), d = i(16), u = i(11), c = i(14), h = i(30),
        f = i(4), p = n.default.getLogger("TaskDetail.TaskDetail"), g = r.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, r) => {
                    t ? (this.curTaskId = i, this.select = !0, this.onTaskSelectChanged(e, r)) : (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)}];
                a.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 r = 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(() => {
                        r === 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(7), a = i(0), s = r.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        l = a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(2), a = i(62), s = i(0), l = i(33), 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 a.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 a = t.savePath, s = t.taskName, d = r.join(a, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(5), r = i(4), a = i(0), s = i(58), l = i(15), d = i(8), u = i(52),
        c = a.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) {
                    c.warning("JSON.parse exception!", t, e)
                }
                o.isObject(t) ? yield function (e) {
                    return n(this, void 0, void 0, function* () {
                        do {
                            yield a();
                            let t = yield s.default(!1, !0, "yunfetchback");
                            if (!t || "" === t) {
                                c.warning("shouldLogin failed!", e);
                                break
                            }
                            if (!e.fromShare && e.userId !== t) {
                                if (c.information("userid not equal, SwitchAccount. ", e, t), r.client.callServerFunction("SwitchAccount").catch(), !(t = yield s.default(!1, !0, "yunfetchback")) || "" === t) {
                                    c.warning("SwitchAccount shouldLogin failed!", e);
                                    break
                                }
                                if (e.userId !== t) {
                                    c.warning("SwitchAccount userId illegal!", e, t);
                                    break
                                }
                            }
                            if (l.server.isRemoteClientExist("ThunderPanPluginWebview")) yield r.client.callServerFunction("BringMainWndToTop"), yield r.client.callServerFunction("SelectNav", u.NavViewID.Download), yield l.server.callClientFunctionByName("ThunderPanPluginWebview", "ExternalFetchBack", e); else {
                                c.information("ThunderPanPluginWebview not exist! wait for ready.");
                                let t = r.client.attachServerEvent("ThunderPanPluginReady", () => n(this, void 0, void 0, function* () {
                                    c.information("ThunderPanPluginReady"), r.client.detachServerEvent("ThunderPanPluginReady", t), yield r.client.callServerFunction("BringMainWndToTop"), yield r.client.callServerFunction("SelectNav", u.NavViewID.Download), yield l.server.callClientFunctionByName("ThunderPanPluginWebview", "ExternalFetchBack", e)
                                }))
                            }
                        } while (0)
                    })
                }(t) : c.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()) {
                        c.information("parseUnionFileAndCreateTasks:读取内容 buf为null");
                        break
                    }
                    let n = i.toString();
                    if (n.length <= 2) {
                        c.information("strContent.length <= 2", n);
                        break
                    }
                    yield t(n)
                } while (0)
            })
        }

        function a() {
            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 (c.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(110), a = i(10), s = i(0), l = i(17), d = i(23), u = i(9), c = i(391), h = i(14), f = i(26),
        p = i(18), g = i(650).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 r.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 r = f.default.getConfigInfo("activity", "enable_sign");
                    if (null !== r && void 0 !== r && 1 === r) {
                        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 = a.ConfigNS.getValue("sign", "testUrl", "");
            e && "" !== e && (this.url = e), this.width = 400, this.height = 460
        }

        writeConfig() {
            if ("auto" === this.curPopupType) {
                let e = this.getCurDate();
                a.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 = a.ConfigNS.getValue("ConfigPopUpPanel", "ShowDate", "");
                if (t === i) {
                    m.information("ShowDate:", i, "curDate:", t), e = !1;
                    break
                }
                let n = a.ConfigNS.getValue("ConfigPopUpPanel", "StartCount", 0),
                    o = a.ConfigNS.getValue("ConfigPopUpPanel", "ShowTime", 0),
                    r = Math.round((new Date).getTime() / 1e3);
                m.information("isPopup:", n, o, r), e = !(0 !== n && (1 === n ? r - o <= 604800 : 2 === n ? r - o <= 2592e3 : 3 !== n || r - 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";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(389), r = i(64), a = i(7).default(n.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        function t(e, t, i, n, r, s, l) {
            let d = {x: 0, y: 0, width: 0, height: 0}, u = o.BrowserWindowNS.getDpiFactor(a, e);
            return d.x = Math.ceil(n * u), d.y = Math.ceil(s * u), d.width = Math.ceil((t - n - r) * u), d.height = Math.ceil((i - s - l) * u), d
        }

        e.resizeBrowserWindow = function (e, i, n, o, s, l, d, u = r.Uflag.SWP_SHOWWINDOW) {
            let c = !1;
            {
                let h = t(e, i, n, o, s, l, d);
                a.setWindowPos(e, r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(110), r = i(17), a = i(653), s = i(10), l = i(26), 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, w = 612;
    t.newsPopupObject = new class {
        constructor() {
            this.embeddedBrowserObj = null, this.title = "迅雷，发现好电影", this.url = v, this.width = y, this.height = w, 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 a.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 r = this.adMap.get(e);
            r && (r.move(t, i, n, o), r.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 => {
                    r.NativeCallModule.nativeCall.CallNativeFunction("IsTipsWndShow", t => {
                        g.information("isAlreadyShowTips:", t), e(t)
                    })
                })
            })
        }

        setDefaultValue() {
            this.url = v, this.width = y, this.height = w
        }

        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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(17), r = i(28), a = i(23), s = i(655), l = i(34), d = i(16), u = i(11), c = i(3), h = i(14), f = i(0),
        p = i(5), g = i(63), m = i(2), v = i(8), y = i(29), w = f.default.getLogger("DownloadDataManager"),
        k = u.DownloadKernelTaskManager.getTaskManager(), T = d.DownloadKernelEventManager.getEventManager();
    const b = 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 => {
                    a.LoginHelperNS.loginHelper.getUserInfo("sessionid", function (t) {
                        w.information("getSessionID:sessionid = ", t), e(t)
                    })
                })
            })
        }

        init() {
            return n(this, void 0, void 0, function* () {
                w.information("init Enter");
                let e = !1;
                return (yield v.FileSystemAWNS.existsAW(`${this.downloadDataDir}`)) || (yield v.FileSystemAWNS.mkdirsAW(`${this.downloadDataDir}`)), (yield a.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* () {
                    w.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* () {
                    w.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())
                })), T.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 r = Math.round(t * o / (t - n) - o);
                this.vipSaveCur += r
            } 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 w.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
                });
                w.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 = k.getStartTaskIDs();
            for (let e = 0; e < t.length; ++e) {
                let i = k.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, r.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()), w.information("saveDownloadData downloadData = ", this.downloadDataRecord);
                    let e = JSON.stringify(this.downloadDataRecord);
                    w.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) {
                    w.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()) {
                        w.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) {
                            w.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), w.information("loadDownloadData decryption downloadData:", this.downloadDataRecord, this.initMaxDownloadSpeed, this.initDownloadSize)
                    } catch (e) {
                        w.information("loadDownloadData exception", e)
                    }
                } while (0)
            })
        }

        getUserID() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    a.LoginHelperNS.loginHelper.getUserInfo("userid", function (t) {
                        w.information("getUserID:userid = ", t), e(t)
                    })
                })
            })
        }
    };
    t.default = b
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(62), a = i(18), s = i(67), l = i(8), d = i(69),
        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 {
                    a.default.defaults.adapter = i(21);
                    let e = new r.Agent({rejectUnauthorized: !1});
                    t = yield a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(63), r = i(35), a = i(38), s = i(9), l = i(0), d = i(395), 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"), a.ThunderNewTask.createPreNewTaskWindow(null)
        }

        importUncompleted(e) {
            r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(12), a = i(2), s = i(5), l = i(0), d = i(29), u = i(7), c = i(28),
        h = u.default(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(33), s = i(3), l = i(45), d = i(40), u = i(11), c = i(16),
        h = r.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 r = e.fileName;
                    if (!r) break;
                    let c = `${i}${n}${r}`;
                    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: r,
                            savePath: n,
                            productInfo: d.TaskCtrlOperatorNS.constructProductInfo(e.browser),
                            origin: f
                        }, isBackground: !0
                    }, g = a.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, r))};
                            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(), r = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId);
                            -1 !== t.indexOf(r) && (o === s.DownloadKernel.TaskStatus.Succeeded || o === s.DownloadKernel.TaskStatus.Seeding ? (this.fireAll(r, !0, n), this.release(r)) : o === s.DownloadKernel.TaskStatus.Failed && (this.fireAll(r, !1), this.release(r)))
                        }
                        (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 r = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath),
                    a = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName), l = o.normalize(o.join(r, a));
                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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(5), a = i(17), s = i(58), l = i(529), d = i(530), u = i(89), c = i(36), h = i(27), f = i(10),
        p = i(9), g = i(107), m = d.GroupAccelerateManagerNS.getManager(),
        v = l.GroupAccelerateEventManagerNS.getEventManager(), y = u.TabEventManagerNS.getEventEmitter(),
        w = 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, w.information("constructor")
            }

            init(e) {
                w.information("init", " entryPage: ", e), e && (this.entryPage = e), v.on(l.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, (e, t, i) => {
                    w.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) => {
                    w.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* () {
                    w.information("openGroupAccelerateTabByTaskId", " taskId: ", e, " entry: ", t, " panel: ", i, " queryString: ", o);
                    let n = m.getTaskUniqueIdByTaskId(e);
                    w.information("openGroupAccelerateTabByTaskId", " taskUniqueId: ", n), n && "" !== n && this.openGroupAccelerateTabByTaskUniqueId(n, t, i, o).then(e => {
                        w.information("openGroupAccelerateTabByTaskId success")
                    }).catch(() => {
                        w.information("openGroupAccelerateTabByTaskId failed")
                    })
                })
            }

            openGroupAccelerateTabByTaskUniqueId(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    if (w.information("openGroupAccelerateTabByTaskUniqueId", " taskUniqueId: ", e, " entry: ", t, " panel: ", i, " queryString: ", o), !e) return void w.information("openGroupAccelerateTabByTaskUniqueId bad taskUniqueId");
                    r.isNullOrUndefined(t) && (t = ""), r.isNullOrUndefined(i) && (i = ""), r.isNullOrUndefined(o) && (o = "");
                    let n = yield s.default(!1, !0, "groupspeedup");
                    if (w.information("openGroupAccelerateTabByTaskUniqueId", " userId: ", n), n && "0" !== n) {
                        let r = Number(n);
                        if (!isNaN(r) && 0 !== r) {
                            let n = JSON.stringify({
                                title: "组队加速",
                                url: this.entryPage,
                                name: "groupAccelerate",
                                showUrl: !1
                            });
                            a.NativeCallModule.nativeCall.CallNativeFunction("GetTabIndexByTitleAndName", n, (r, s) => {
                                if (w.information("GetTabIndexByTitleAndName", n, r, s), r === h.NativeFunctionErrorCode.Success && s > -1) w.information("groupAccelerate nativeCall exists", s), a.NativeCallModule.nativeCall.CallNativeFunction("SelectTab", s), a.NativeCallModule.nativeCall.CallNativeFunction("FireEventFunction", "OnShowTeam", e, t, i, o); else {
                                    let r = {};
                                    r.taskUniqueId = e, r.entry = t, r.panel = i, r.queryString = o, this.pendingShowTeamInfoArray.push(r), w.information("openGroupAccelerateTabByTaskUniqueId do opentab"), a.NativeCallModule.nativeCall.CallNativeFunction("OpenNewTab", this.entryPage, n)
                                }
                            }), f.ConfigNS.setValue("GroupAccelerate", "unusecount", 0);
                            let r = (new Date).getTime();
                            f.ConfigNS.setValue("GroupAccelerate", "lastusetime", r), 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((r, a) => {
                    r && r.tab && "nativeCallId" in r && r.callBackId && r.gcid === o && r.tab.callNativeFunctionCallback(r.nativeCallId, r.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 (w.information("externalOpenGroupAccelerateTab enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) {
                        w.information("externalOpenGroupAccelerateTab bad external args");
                        break
                    }
                    if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1]) || r.isNullOrUndefined(n[2]) || r.isNullOrUndefined(n[3])) {
                        w.information("externalOpenGroupAccelerateTab bad args"), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = n[2], l = n[3];
                    this.openGroupAccelerateTabByTaskId(o, a, s, l).then(e => {
                        w.information("externalOpenGroupAccelerateTab success")
                    }).catch(() => {
                        w.information("externalOpenGroupAccelerateTab failed")
                    }), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success)
                } while (0)
            }

            externalGetTaskInfo(e, t, i, n) {
                do {
                    if (w.information("externalGetTaskInfo enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) {
                        w.information("externalGetTaskInfo bad external args");
                        break
                    }
                    if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[1])) {
                        w.information("externalGetTaskInfo bad args"), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1];
                    w.information("externalGetTaskInfo", " taskId: ", o, " taskUniqueId: ", a);
                    let s = m.getTaskInfoJson(o, a);
                    w.information("externalGetTaskInfo", " taskInfoJson: ", s), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success, s)
                } while (0)
            }

            externalJoinTeam(e, t, i, n) {
                do {
                    if (w.information("externalJoinTeam enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) {
                        w.information("externalGetTaskInfo bad external args");
                        break
                    }
                    if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[3])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = n[2], l = n[3], d = null;
                    try {
                        d = JSON.parse(s)
                    } catch (e) {
                        w.warning(e)
                    }
                    if (null === d) break;
                    let u = d.member_count;
                    u || (u = 0);
                    let c = d.group_name;
                    if (r.isNullOrUndefined(c) && (c = ""), w.information("externalJoinTeam", " taskId: ", o, " groupId: ", a, " opts: ", s, " taskUniqueId: ", l, " memberCount: ", u, " groupName: ", c), !a || !l) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    m.joinTeam(o, "" + a, 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 (w.information("externalExitTeam enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) break;
                    if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1]) || r.isNullOrUndefined(n[2])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = n[2];
                    m.exitTeam(o, a, s), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success)
                } while (0)
            }

            externalTeamPageReady(e, t, i, n) {
                do {
                    if (w.information("externalTeamPageReady enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) {
                        w.information("externalGetTaskInfo bad external args");
                        break
                    }
                    for (let e of this.pendingShowTeamInfoArray) e && (w.information("externalTeamPageReady fire event", " taskUniqueId: ", e.taskUniqueId, " entry: ", e.entry, " panel: ", e.panel, " queryString: ", e.queryString), a.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 (w.information("externalSubscribeTaskSpeed enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) {
                        w.information("externalSubscribeTaskSpeed bad external args");
                        break
                    }
                    if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = {};
                    s.tab = e, s.nativeCallId = t, s.callBackId = a, 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 (w.information("externalUnsubscribeTaskSpeed enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) {
                        w.information("externalUnsubscribeTaskSpeed bad external args");
                        break
                    }
                    if (r.isNullOrUndefined(n) || r.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 (w.information("externalSubscribeTaskStatus enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) {
                        w.information("externalSubscribeTaskStatus bad external args");
                        break
                    }
                    if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = {};
                    s.tab = e, s.nativeCallId = t, s.callBackId = a, 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 (w.information("externalUnsubscribeTaskStatus enter"), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) {
                        w.information("externalUnsubscribeTaskStatus bad external args");
                        break
                    }
                    if (r.isNullOrUndefined(n) || r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(9), a = i(2), s = i(8), l = i(17), d = i(57), u = i(14), c = i(3), h = i(34), f = i(16),
        p = i(11), g = i(43), m = i(25), v = i(529), y = i(23), w = i(5),
        k = v.GroupAccelerateEventManagerNS.getEventManager(), T = p.DownloadKernelTaskManager.getTaskManager(),
        b = f.DownloadKernelEventManager.getEventManager(),
        C = g.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        S = m.DownloadKernelCategoryManager.getCategoryManager(), I = 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() {
                I.information("init"), l.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                    let t = Number(e);
                    isNaN(t) || (this.currentUserId = t), this.updatePrivateSpaceCategoryViewTaskIdMap(), T.isLoadStorageTaskFinish() && this.checkTaskGroupAccelerateStatus(), this.getUserGroupAccelerateInfo().then(e => {
                        I.information("init login getUserGroupAccelerateInfo")
                    }).catch(() => {
                        I.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 (I.information("getUserID:userid = ", e), e && "" !== e) {
                        let t = Number(e);
                        isNaN(t) || (this.currentUserId = t), T.isLoadStorageTaskFinish() && this.checkTaskGroupAccelerateStatus(), this.getUserGroupAccelerateInfo().then(e => {
                            I.information("init getUserGroupAccelerateInfo")
                        }).catch(() => {
                            I.information("init getUserGroupAccelerateInfo failed")
                        })
                    }
                }), this.insertToCategoryViewEventId = b.attachTaskEvent(c.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    e && e[0] === c.DownloadKernel.TaskEventType.InsertToCategoryView && this.onInsertToCategoryView(e[1], e[2], e[3])
                }), this.removeFromCategoryViewEventId = b.attachTaskEvent(c.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                    e && e[0] === c.DownloadKernel.TaskEventType.RemoveFromCategoryView && this.onRemoveFromCategoryView(e[1], e[2], e[3])
                }), this.detailChangedEventId = b.attachTaskEvent(c.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    e && e[0] === c.DownloadKernel.TaskEventType.DetailChanged && this.onDetailChanged(e[1])
                }), this.taskStatusChangedEventId = b.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 && (b.detachTaskEvent(c.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryViewEventId), this.insertToCategoryViewEventId = void 0), void 0 !== this.removeFromCategoryViewEventId && (b.detachTaskEvent(c.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.removeFromCategoryViewEventId), this.removeFromCategoryViewEventId = void 0), void 0 !== this.detailChangedEventId && (b.detachTaskEvent(c.DownloadKernel.TaskEventType.DetailChanged, this.detailChangedEventId), this.detailChangedEventId = void 0), void 0 !== this.taskStatusChangedEventId && (b.detachTaskEvent(c.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventId), this.taskStatusChangedEventId = void 0), this.taskGroupInfoMap.clear(), this.taskIdMap.clear()
            }

            canEnterGroupAccelerate(e) {
                I.information("canEnterGroupAccelerate", " taskId: ", e);
                let t = !1;
                do {
                    if (!e) break;
                    let i = T.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) {
                I.information("canEnterGroupAccelerate", " taskId: ", e);
                let t = !1;
                do {
                    if (!e) break;
                    let i = T.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 r = this.getTaskGroupInfo(n);
                    r && r.taskId === e && (t = !0)
                } while (0);
                return t
            }

            joinTeam(e, t, i, o, r) {
                return n(this, void 0, void 0, function* () {
                    I.information("joinTeam", " taskId: ", e, " groupId:", t, " groupName:", i, " memberCount: ", o, " taskUniqueId: ", r);
                    let n = 0;
                    n = "" !== r ? this.taskIdMap.get(r) : e || 0, I.information("joinTeam", " realTaskId: ", n);
                    do {
                        let e = this.taskGroupInfoMap.get(r);
                        if (e && e.taskId) {
                            I.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, T.getTaskFromTaskId(n)) {
                            e.previousSpeed = this.getTaskAverageSpeed(n), (yield this.getIsVip()) ? this.setTaskPriority(n, 999) : this.setTaskPriority(n, 700), k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnJoinTeam, n, r), 0 === this.groupAcceleratingTaskNum && (this.enterGroupAccelerateTimeStamp = (new Date).getTime(), this.enterGroupAccelerateUploadSize = h.DownloadKernelManager.getTotalUploadSize()), this.groupAcceleratingTaskNum += 1, I.information("joinTeam", " this.enterGroupAccelerateTimeStamp: ", this.enterGroupAccelerateTimeStamp), I.information("joinTeam", " this.enterGroupAccelerateUploadSize: ", this.enterGroupAccelerateUploadSize), I.information("joinTeam", " this.groupAcceleratingTaskNum: ", this.groupAcceleratingTaskNum)
                        } else e.previousSpeed = 0;
                        this.taskGroupInfoMap.set(r, e), I.information("joinTeam", " this.taskGroupInfoMap.size: ", this.taskGroupInfoMap.size), this.saveGroupAccelerateInfo().then(e => {
                            I.information("joinTeam saveGroupAccelerateInfo")
                        }).catch(() => {
                            I.information("joinTeam saveGroupAccelerateInfo failed")
                        })
                    } while (0)
                })
            }

            exitTeam(e, t, i) {
                if (I.information("exitTeam", " taskId: ", e, " groupId: ", t, " taskUniqueId: ", i), "" !== i) {
                    let e = this.taskGroupInfoMap.get(i);
                    if (e) {
                        I.information("exitTeam", " taskGroupInfo.taskId: ", e.taskId);
                        let t = e.taskId;
                        this.taskGroupInfoMap.delete(i), this.setTaskPriority(t, 0), this.saveGroupAccelerateInfo().then(e => {
                            I.information("exitTeam saveGroupAccelerateInfo")
                        }).catch(() => {
                            I.information("exitTeam saveGroupAccelerateInfo failed")
                        }), this.groupAcceleratingTaskNum -= 1, 0 === this.groupAcceleratingTaskNum && (this.enterGroupAccelerateTimeStamp = 0, this.enterGroupAccelerateUploadSize = 0), I.information("exitTeam", " this.enterGroupAccelerateTimeStamp: ", this.enterGroupAccelerateTimeStamp), I.information("exitTeam", " this.enterGroupAccelerateUploadSize: ", this.enterGroupAccelerateUploadSize), I.information("exitTeam", " this.groupAcceleratingTaskNum: ", this.groupAcceleratingTaskNum), k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnExitTeam, t, i)
                    } else I.information("exitTeam bad taskGroupInfo")
                } else I.information("exitTeam bad taskUniqueId")
            }

            getTaskGroupInfo(e) {
                I.information("getTaskGroupInfo", " taskUniqueId: ", e);
                let t = null;
                return "" !== e && (t = this.taskGroupInfoMap.get(e)), t
            }

            exitAllTeamNoTask() {
                I.information("exitAllTeamNoTask"), this.taskGroupInfoMap.forEach((e, t) => {
                    e.taskId || (this.sendExitTeamCommand("" + e.groupId), this.taskGroupInfoMap.delete(t))
                }), this.saveGroupAccelerateInfo().then(e => {
                    I.information("exitAllTeamNoTask saveGroupAccelerateInfo")
                }).catch(() => {
                    I.information("exitAllTeamNoTask saveGroupAccelerateInfo failed")
                })
            }

            sendExitTeamCommand(e) {
                do {
                    I.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 => {
                            I.information("sendExitTeamCommand saveGroupAccelerateInfo")
                        }).catch(() => {
                            I.information("sendExitTeamCommand saveGroupAccelerateInfo failed")
                        })
                    }).catch(() => {
                    })
                } while (0)
            }

            isUserLicensed() {
                return this.currentUserLicensed
            }

            getTaskInfoJson(e, t) {
                I.information("getTaskInfoJson", " taskId: ", e, " taskUniqueId: ", t);
                let i = void 0;
                "" !== t && (i = this.taskIdMap.get(t)), I.information("getTaskInfoJson", " realTaskId: ", i), void 0 !== i && (e = i), I.information("getTaskInfoJson now", " taskId: ", e);
                let n = "null";
                do {
                    if (!e) {
                        n = "null";
                        break
                    }
                    let o = T.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 r = "", s = o.getTaskBaseInfo().taskType, l = e.name;
                        s !== c.DownloadKernel.TaskType.P2sp && s !== c.DownloadKernel.TaskType.Emule || (r = a.extname(l)) && (r = r.substring(1)), e.suffix = r, e.url = o.getTaskBaseInfo().url, e.size = o.getTaskBaseInfo().fileSize, e.progress = e.size > 0 ? 100 * o.getTaskBaseInfo().downloadSize / e.size : 0, I.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 I.information("getTaskInfoJson", " taskInfoJson: ", n), n
            }

            updateTaskAccelerateInfo(e) {
                I.information("updateTaskAccelerateInfo", " taskId: ", e);
                do {
                    if (!e) break;
                    let t = this.getTaskUniqueIdByTaskId(e);
                    if (I.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 (I.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, r = t[e].task,
                                    a = t[e].belong_status;
                                I.information("updateTaskAccelerateInfo data[", e, "]:", t[e]);
                                let s = this.taskGroupInfoMap.get(r);
                                s && (I.information("updateTaskAccelerateInfo has group"), 0 !== a ? (s.memberCount = n, s.groupName = o) : setTimeout(() => {
                                    this.exitTeam(s.taskId, i, r)
                                }, 100))
                            }
                            k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTeamInfoUpdated)
                        }
                    }).catch(() => {
                    })
                } while (0)
            }

            requestTaskTeamInfo(e) {
                do {
                    if (!e || "" === e) break;
                    I.information("requestTaskTeamInfo", " taskUniqueId: ", e), d.fetchSlRes({
                        url: "/group_accel/motorcade_list",
                        data: {task: e},
                        method: "get"
                    }).then(t => {
                        t && k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.RequestTaskTeamInfoSuccess, e, t.data)
                    }).catch(() => {
                        k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.RequestTaskTeamInfofailed, e)
                    })
                } while (0)
            }

            getTaskUniqueIdByTaskId(e) {
                I.information("getTaskUniqueIdByTaskId", " taskId: ", e);
                let t = "";
                if (e) {
                    let i = T.getTaskFromTaskId(e);
                    i && (t = this.getTaskUniqueIdByTask(i))
                }
                return I.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();
                            I.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);
                            I.information("getTaskUniqueIdByTaskBase p2sp or emule task gcid: ", n), t = n
                    }
                }
                return I.information("getTaskUniqueIdByTaskId", " uniqueId: ", t), t
            }

            getTaskStatus(e) {
                I.information("getTaskStatus", " taskId: ", e);
                let t = c.DownloadKernel.TaskStatus.Unkown;
                if (e) {
                    let i = T.getTaskFromTaskId(e);
                    i && (t = i.getTaskStatus())
                }
                return I.information("getTaskStatus", " taskStatus: ", t), t
            }

            getTaskIdByTaskUniqueId(e) {
                I.information("getTaskIdByTaskUniqueId", " taskUniqueId: ", e);
                let t = 0;
                return e && "" !== e && ((t = this.taskIdMap.get(e)) || (t = 0)), I.information("getTaskIdByTaskUniqueId", " taskId: ", t), t
            }

            addTaskToExistingTeam(e) {
                do {
                    if (!e) break;
                    let t = e.getTaskBaseInfo().taskId;
                    if (!t) break;
                    I.information("addTaskToExistingTeam", " taskId: ", t);
                    let i = this.getTaskUniqueIdByTask(e);
                    if ("" !== i) {
                        I.information("addTaskToExistingTeam", " taskUniqueId: ", i), this.taskIdMap.set(i, t);
                        let e = this.taskGroupInfoMap.get(i);
                        e && (I.information("addTaskToExistingTeam has taskGroupInfo, taskGroupInfo.taskId:", e.taskId), e.taskId || (I.information("addTaskToExistingTeam do joinTeam"), this.joinTeam(t, "" + e.groupId, e.groupName, e.memberCount, i).catch()))
                    }
                    let n = e.getTaskStatus();
                    k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, t, n, i)
                } while (0)
            }

            exitAllTeam(e, t = !0) {
                if (I.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 => {
                    I.information("exitAllTeam success"), this.saveGroupAccelerateInfo().then(e => {
                        I.information("exitAllTeam saveGroupAccelerateInfo")
                    }).catch(() => {
                        I.information("exitAllTeam saveGroupAccelerateInfo failed")
                    }), i.forEach((e, t) => {
                        k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnExitTeam, e.taskId, t)
                    })
                }).catch(() => {
                    I.information("exitAllTeam failed")
                }) : i.forEach((e, t) => {
                    k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnExitTeam, e.taskId, t)
                }), this.taskGroupInfoMap.clear()
            }

            updateCategoryViewTaskIdMap(e) {
                let t = e.getTasks();
                if (t) {
                    I.information("updateCategoryViewTaskIdMap tasks.size:", t.size);
                    for (let [, e]of t) if (e) {
                        let t = e.getTaskBaseInfo().taskId, i = this.getTaskUniqueIdByTask(e);
                        I.information("updateCategoryViewTaskIdMap", " taskId: ", t, " taskUniqueId: ", i), t && "" !== i && this.taskIdMap.set(i, t)
                    } else I.information("updateCategoryViewTaskIdMap bad task")
                }
            }

            updatePrivateSpaceCategoryViewTaskIdMap() {
                let e = [c.DownloadKernel.CategroyViewID.Downloading, c.DownloadKernel.CategroyViewID.Completed];
                for (let t of e) {
                    let e = S.getCurrentPrivateCategory();
                    if (e) {
                        let i = e.getCategoryViewFromId(t);
                        this.updateCategoryViewTaskIdMap(i)
                    }
                }
            }

            updateTaskIdMap() {
                I.information("updateTaskIdMap enter");
                let e = [c.DownloadKernel.CategroyViewID.Downloading, c.DownloadKernel.CategroyViewID.Completed];
                for (let t of e) {
                    I.information("updateTaskIdMap categroyViewID", t);
                    let e = C.getCategoryViewFromId(t);
                    this.updateCategoryViewTaskIdMap(e)
                }
                this.updatePrivateSpaceCategoryViewTaskIdMap()
            }

            onDetailChanged(e) {
                do {
                    if (!e) break;
                    I.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 r = this.getTaskUniqueIdByTask(i);
                        if (!r || "" === r) continue;
                        I.information("onDetailChanged", " taskId: ", o);
                        let a = this.taskIdMap.get(r);
                        I.information("onDetailChanged", " taskUniqueId: ", r, ", taskIdRecord:", a), a || (this.addTaskToExistingTeam(i), k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnReceiveGcid, o, r));
                        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);
                        I.information("onDetailChanged", " taskSpeed: ", s, " increaseSpeed: ", d, " extraInfoStr: ", c), k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskSpeedChange, o, s, d, c, r)
                    }
                } 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 r = this.getTaskUniqueIdByTask(i);
                    if (!r || "" === r) continue;
                    let a = o;
                    if (I.information("onTaskStatusChanged", " taskId: ", n), I.information("onTaskStatusChanged", " taskUniqueId: ", r), I.information("onTaskStatusChanged", " status: ", a), k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, n, a, r), o === c.DownloadKernel.TaskStatus.DestroyPending) {
                        I.information("onTaskStatusChanged delete taskInfoMap taskUniqueId:", r), this.taskIdMap.delete(r);
                        let e = this.taskGroupInfoMap.get(r);
                        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) {
                    I.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 && (I.information("onInsertToCategoryView taskId: ", n, "taskUniqueId: ", o), this.taskIdMap.get(o) || this.addTaskToExistingTeam(t))
                    }
                } else if (t === c.DownloadKernel.CategroyViewID.Recycle) {
                    I.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 && (I.information("onInsertToCategoryView", " taskId: ", n), I.information("onInsertToCategoryView", " taskUniqueId: ", o), k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, n, 20, o))
                    }
                }
            }

            onRemoveFromCategoryView(e, t, i) {
                if (t === c.DownloadKernel.CategroyViewID.Recycle) do {
                    if (!i) break;
                    I.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(), r = this.getTaskUniqueIdByTask(t);
                        if (!r || "" === r) continue;
                        let a = o;
                        I.information("onRemoveFromCategoryView", " taskId: ", n), I.information("onRemoveFromCategoryView", " taskUniqueId: ", r), I.information("onRemoveFromCategoryView", " status: ", a), k.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, n, a, r)
                    }
                } while (0)
            }

            reportGroupAccelerateTaskInfo() {
                do {
                    if (!this.currentUserId || 0 === this.currentUserId) break;
                    I.information("reportGroupAccelerateTaskInfo", " currentUserId: ", this.currentUserId);
                    let e = new Array;
                    if (this.taskGroupInfoMap.forEach((t, i) => {
                        let n = {};
                        n.group_id = t.groupId, I.information("reportGroupAccelerateTaskInfo", " groupId: ", t.groupId), n.uid = this.currentUserId;
                        let o = t.taskId;
                        if (o) {
                            let e = T.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;
                        I.information("reportGroupAccelerateTaskInfo", " group_id: ", n.group_id), I.information("reportGroupAccelerateTaskInfo", " rate: ", n.rate), I.information("reportGroupAccelerateTaskInfo", " ul_total: ", n.ul_total), I.information("reportGroupAccelerateTaskInfo", " ul_time: ", n.ul_time), I.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() {
                I.information("checkTaskGroupAccelerateStatus this.currentUserId:", this.currentUserId), this.currentUserId && 0 !== this.currentUserId && this.loadGroupAccelerateInfo().then(e => {
                    do {
                        if (!e || e.size <= 0) {
                            I.information("checkTaskGroupAccelerateStatus bad taskGroupInfoMapTemp");
                            break
                        }
                        let t = [];
                        if (e.forEach((e, i) => {
                            let n = e.taskId;
                            if (I.information("checkTaskGroupAccelerateStatus", " taskUniqueId: ", i, " taskId: ", n), n) {
                                T.getTaskFromTaskId(n) && i && "" !== i && (I.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 (I.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 (I.information("checkTaskGroupAccelerateStatus data[", t, "]:", i[t]), 1 === i[t].belong_status) {
                                    let n = i[t].group_id, o = i[t].member_count, r = i[t].group_name, a = i[t].task;
                                    e.forEach((e, t) => {
                                        if (e.groupId === n && t === a) {
                                            this.joinTeam(e.taskId, "" + n, r, o, t).catch();
                                            let i = this.taskGroupInfoMap.get(t);
                                            i && (i.memberCount = o, i.groupName = r)
                                        }
                                    })
                                }
                            }
                        }).catch(() => {
                            I.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), I.information("sendExitAllTeamCommand", " groupId: ", e.groupId)
                        }), 0 === i.length && (I.information("sendExitAllTeamCommand no group"), t = !0), d.fetchSlRes({
                            url: "/group_accel/exit_batch",
                            data: {uid: this.currentUserId, group_ids: i},
                            method: "post"
                        }).then(e => {
                            I.information("sendExitAllTeamCommand success"), t = !0
                        }).catch(() => {
                            I.information("sendExitAllTeamCommand failed"), t = !1
                        })
                    } while (0);
                    return t
                })
            }

            getUserGroupAccelerateInfo() {
                return n(this, void 0, void 0, function* () {
                    I.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 (I.information("getUserGroupAccelerateInfo success ", e), !e) {
                                I.information("getUserGroupAccelerateInfo bad res"), this.currentUserLicensed = !1;
                                break
                            }
                            if (!e.data) {
                                I.information("getUserGroupAccelerateInfo bad res.data"), this.currentUserLicensed = !1;
                                break
                            }
                            if (!e.data.data) {
                                I.information("getUserGroupAccelerateInfo bad res.data"), this.currentUserLicensed = !1;
                                break
                            }
                            e.data.data.have_licence && 1 === e.data.data.have_licence ? (I.information("getUserGroupAccelerateInfo licensed"), this.currentUserLicensed = !0) : (I.information("getUserGroupAccelerateInfo not licensed"), this.currentUserLicensed = !1)
                        } while (0)
                    }).catch(() => {
                        I.information("getUserGroupAccelerateInfo fail"), this.currentUserLicensed = !1
                    })
                })
            }

            getNewPercent(e, t) {
                I.information("getNewPercent", " currentPercent: ", e, " taskType: ", t);
                let i = 0, n = 0, o = 5, r = 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) {
                            r = e;
                            break
                        }
                        i = 20, n = 60, o = 10
                    }
                    if (e) if (e < i || e > n) r = i + (n - i) * Math.random(); else {
                        let t = e - o;
                        t < i && (t = i);
                        let a = e + o;
                        a > n && (a = n), r = t + (a - t) * Math.random()
                    } else r = i + (n - i) * Math.random()
                } while (0);
                return I.information("getNewPercent", " newPercent: ", r), r
            }

            setTaskPriority(e, t) {
                do {
                    if (!e) break;
                    if (!t || 0 !== t && 700 !== t && 999 !== t) break;
                    let i = T.getTaskFromTaskId(e);
                    if (!i) break;
                    i.getExtraObject().setTaskPriorityLevel(-1, t), I.information("taskExtra.setTaskPriorityLevel taskId: ", e, ", index: -1, priority: ", t)
                } while (0)
            }

            getTaskAverageSpeed(e) {
                let t = T.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 I.information("getTaskAverageSpeed taskId:", e, ", taskAverageSpeed:", o), I.information("getTaskAverageSpeed downloadSize:", n, ", downloadingPeriod:", i), o
            }

            getIncreaseSpeedInfo(e) {
                let t = {increaseSpeed: 0, increaseSize: 0};
                do {
                    if (!e) break;
                    let i = T.getTaskFromTaskId(e);
                    if (!i) break;
                    let n = this.getTaskUniqueIdByTaskId(e);
                    if (!n || "" === n) break;
                    let o = this.taskGroupInfoMap.get(n);
                    if (!o) break;
                    let r = i.getTaskBaseInfo().taskType, a = o.currentPercent, s = this.getNewPercent(a, r);
                    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 = T.getTaskFromTaskId(e);
                    if (!i) break;
                    let n = this.getTaskUniqueIdByTask(i);
                    if (!n || "" === n) break;
                    let o = this.taskGroupInfoMap.get(n);
                    if (!o) break;
                    let r = i.getTaskBaseInfo().downloadingPeriod;
                    if (!r) break;
                    let a = i.getTaskChannelInfo();
                    if (!a) break;
                    let s = a.p2pSize - a.dcdnSize;
                    if (s < 0 && (s = 0), !o.lastDownloadingPeriod || !o.lastP2PSize) {
                        o.lastDownloadingPeriod = r, o.lastP2PSize = s;
                        break
                    }
                    let l = s - o.lastP2PSize;
                    l < 0 && (l = 0), o.lastP2PSize = s;
                    let d = r - o.lastDownloadingPeriod;
                    d < 0 && (d = 0), o.lastDownloadingPeriod = r;
                    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 (I.information("saveGroupAccelerateInfo", " currentUserId: ", this.currentUserId), !this.currentUserId) return;
                    let e = a.join(__profilesDir, "GroupAccelerate");
                    (yield s.FileSystemAWNS.existsAW(e)) || (yield s.FileSystemAWNS.mkdirsAW(e));
                    let t = a.join(__profilesDir, "GroupAccelerate\\TaskInfoEx_" + this.currentUserId + ".txt");
                    I.information("saveGroupAccelerateInfo", " filePath: ", t), I.information("saveGroupAccelerateInfo", " this.taskGroupInfoMap.size: ", this.taskGroupInfoMap.size);
                    let i = JSON.stringify([...this.taskGroupInfoMap]);
                    I.information("saveGroupAccelerateInfo", " strData: ", i), yield s.FileSystemAWNS.writeFileAW(t, i)
                })
            }

            loadGroupAccelerateInfo() {
                return n(this, void 0, void 0, function* () {
                    if (I.information("loadGroupAccelerateInfo", " currentUserId: ", this.currentUserId), !this.currentUserId) return null;
                    let e = a.join(__profilesDir, "GroupAccelerate\\TaskInfoEx_" + this.currentUserId + ".txt");
                    I.information("loadGroupAccelerateInfo", " filePath: ", e);
                    let t = yield s.FileSystemAWNS.readFileAW(e), i = null;
                    try {
                        let e = t.toString();
                        return I.information("loadGroupAccelerateInfo", " fileStr: ", e), i = new Map(JSON.parse(e))
                    } catch (e) {
                        return null
                    }
                })
            }

            sendFileCompleteStat(e) {
                do {
                    if (!e) break;
                    let t = T.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 a = o.previousSpeed;
                    if (!a) break;
                    let s = "pannel=complete,taskid=" + e + ",gcid=" + i + ",previos_speed=" + a + ",stop_speed=" + this.getTaskAverageSpeed(e);
                    I.information("SendFileCompleteStat", " strExtData: ", s), r.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) {
                            w.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), r = i(0), a = i(400), s = i(13), l = i(674), d = i(8), u = i(675),
        c = r.default.getLogger("Thunder.Skin");
    t.default = new class extends o.EventEmitter {
        constructor() {
            super(), this.skinInfo = a.SkinHelperNS.defaultSkinInfo, this.isTemp = !1, this.lsatSkinInfo = a.SkinHelperNS.defaultSkinInfo, this.featuredSkinInfo = a.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 !== a.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 !== a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(62), r = i(18), a = i(0), s = i(13), l = i(8), d = i(4);
    let {isDef: u} = s.ThunderUtil;
    const c = a.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 {
                    r.default.defaults.adapter = i(21);
                    let e = 1 === (yield d.client.callServerFunction("GetValue", "ConfigFetchInterface", "TestServer", 0)) ? this.testPapersURL : this.wallpapersURL;
                    try {
                        let t = yield r.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 {
                    r.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 r.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 {
                    r.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 r.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* () {
                r.default.defaults.adapter = i(21);
                try {
                    let t = yield r.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(104));
                        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* () {
                r.default.defaults.adapter = i(21);
                try {
                    let t = yield r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), r = i(0), a = i(534), s = i(13), l = i(8),
        d = r.default.getLogger("Thunder.suspension-skin.skin-manager"), u = a.SuspensionSkinHelperNS.cacheDir;
    t.default = new class extends o.EventEmitter {
        constructor() {
            super(), this.skinInfo = a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), r = i(17), a = i(0), s = i(18), l = i(69), d = a.default.getLogger("vip-label-config");
    !function (e) {
        let t = void 0, i = void 0, a = 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 = a.get(e);
                return t || (t = yield function (e) {
                    return n(this, void 0, void 0, function* () {
                        let t = yield u(), r = 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(), r = 128;
                                            e = r * Math.pow(2, 24) + t * Math.pow(2, 16) + i * Math.pow(2, 8) + o
                                        }
                                        i = e
                                    }
                                    return i
                                })
                            }(), a = 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=${r}&over=${t}&userid=${f}&sessionid=${e}&scene=${a}&deviceid=${l}&cpeerid=${c}&timestamp=${Date.now()}`
                        } else h = `http://advertpay.vip.xunlei.com/xl11/advertisement?iver=${r}&over=${t}&scene=${a}&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), a.set(e, t)), t
            })
        }, function () {
            r.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 && a.clear()
                }
            })), r.NativeCallModule.nativeCall.AttachNativeEvent("onLoginStatusChange", (e, t) => {
                d.information("onLoginStatusChange", "newStatus", t), "unlogin" === t || "offline" === t ? a.clear() : "online" === t && a.clear()
            })
        }(), e.getConfigUrl = function (e, t, i, n) {
            if (i) {
                let n = l.ParseUrlFileNameNS.parseDynamicUrlPath(i.toLowerCase()),
                    o = l.ParseUrlFileNameNS.parseDynamicUrlArgs(n.args), r = Object.getOwnPropertyNames(o), a = "";
                for (let i = 0; i < r.length; ++i) {
                    let n = r[i];
                    a += "referfrom" === n && e ? `&${n}=${e}` : "aidfrom" === n && t ? `&${n}=${t}` : `&${n}=${o[n]}`
                }
                return r.indexOf("referfrom") < 0 && (a += `&referfrom=${e}`), r.indexOf("aidfrom") < 0 && (a += `&aidfrom=${t}`), `${n.pageFileName}?${a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(13), a = i(0), s = i(20), l = i(4), d = i(71),
        u = a.default.getLogger("vip-plugin-switch-config");
    let {isDef: c, isUndef: h} = r.ThunderUtil;
    !function (e) {
        const t = "http://media.info.client.xunlei.com/VipPluginSwitchConfig.json";
        let a = new s.EventEmitter;
        a.setMaxListeners(0);
        let f = void 0, p = void 0, g = void 0;

        function m(e) {
            g = e, a.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 a = !1;
                    for (let e of i) if (2 === e.length && r.ThunderUtil.versionCompare(o, e[0]) >= 0 && r.ThunderUtil.versionCompare(o, e[1]) <= 0) {
                        a = !0;
                        break
                    }
                    const s = yield l.client.callServerFunction("GetPeerID");
                    if (u.information("peerid", s), !a || !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), a.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* () {
                    a.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* () {
                    a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(23), a = "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 = `${a}/videos/search`;
                o.default.defaults.headers["Content-Type"] = "application/json", yield function () {
                    return n(this, void 0, void 0, function* () {
                        let e = yield r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

    function l(e, t, i, n, o) {
        r.createRegKey(e, t), r.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]),
                r = o.join(__rootDir, "../../Thunder.exe"), d = "Software\\Classes\\." + e;
            l("HKEY_CURRENT_USER", d, "", i, a), l("HKEY_CURRENT_USER", d = "Software\\Classes\\" + i, "", t[1], a), l("HKEY_CURRENT_USER", d = "Software\\Classes\\" + i + "\\DefaultIcon", "", n, a), l("HKEY_CURRENT_USER", d = "Software\\Classes\\" + i + "\\Shell\\Open", "", t[3], a), l("HKEY_CURRENT_USER", d = "Software\\Classes\\" + i + "\\Shell\\Open\\command", "", '"' + r + '" "%1" -StartType:' + e, a)
        } while (0)
    }

    function u(e) {
        do {
            if (!e || "" === e) break;
            let t = s.get(e);
            if (!t) break;
            let i = "Software\\Classes\\." + e;
            r.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Classes\\" + t[0], r.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e + "\\OpenWithList", r.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e + "\\OpenWithProgids", r.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e + "\\UserChoice", r.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e, r.deleteRegKey("HKEY_CURRENT_USER", i), d(e), r.refreshIcon()
        } while (0)
    }

    function c(e) {
        do {
            let t = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e + "\\OpenWithList",
                i = r.readRegString("HKEY_CURRENT_USER", t, "MRUList");
            if (null === i || void 0 === i || "" === i) break;
            let n = i.substring(0, 1);
            null !== (i = r.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 (r.readRegString("HKEY_CURRENT_USER", "Software\\Classes\\." + e, "") === i) break;
                r.deleteRegKey("HKEY_CURRENT_USER", "Software\\Classes\\." + e), r.deleteRegKey("HKEY_CURRENT_USER", "Software\\Classes\\" + t[0]), r.deleteRegKey("HKEY_CURRENT_USER", "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e), d(e), r.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 (r.queryRegValue("HKEY_CURRENT_USER", "Software\\classes\\" + e + "\\Shell\\Open\\command", "") === i) break;
                    r.deleteRegKey("HKEY_CURRENT_USER", "Software\\classes\\" + e), l("HKEY_CURRENT_USER", "Software\\classes\\" + e, "URL Protocol", "", a), l("HKEY_CURRENT_USER", "Software\\classes\\" + e + "\\Shell\\Open\\command", "", i, a), t = !0
                } while (0);
                return t
            })
        }

        e.checkAndRegisterFileType = t, e.checkAndRegisterTorrentFile = function () {
            {
                let e = o.join(__rootDir, "../../Thunder.exe"), i = "torrent",
                    n = r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(8), s = i(13), l = r.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 a.FileSystemAWNS.readdirAW(e)).filter(e => e !== t).map(e => a.FileSystemAWNS.rmdirsAW(o.join(this.versionsDir, e)))
            })
        }

        save(e, t) {
            return n(this, void 0, void 0, function* () {
                yield a.FileSystemAWNS.mkdirsAW(this.dir), yield a.FileSystemAWNS.mkdirsAW(this.versionsDir);
                const i = o.join(this.versionsDir, e);
                return a.FileSystemAWNS.copyDirsAW(t, i)
            })
        }

        getCurVersion() {
            return n(this, void 0, void 0, function* () {
                return (yield a.FileSystemAWNS.readFileAW(`${this.dir}/VERION.txt`)).toString()
            })
        }

        setCurVersion(e) {
            return n(this, void 0, void 0, function* () {
                return a.FileSystemAWNS.writeFileAW(`${this.dir}/VERION.txt`, e)
            })
        }
    }

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

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(7), s = i(3), l = i(25), d = i(770), u = i(34), c = i(14), h = i(43), f = i(44),
        p = i(42), g = i(8), m = r.default.getLogger("DownloadKernel.Upgrade"),
        v = a.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        y = l.DownloadKernelCategoryManager.getCategoryManager(), w = d.PrivateSpaceUpgradeNS.getUpgrade(),
        k = h.DownloadKernelCategoryViewManager.getCategoryViewManager();

    class T 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(), r = t.getSeedFilePath(), a = o.parse(r), s = a.dir,
                l = a.name + a.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:", r, ", 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), r = o.join(e, l);
                        (yield g.FileSystemAWNS.existsAW(r)) || (yield g.FileSystemAWNS.renameAW(n, r))
                    }
                    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 w.upgradePrivateSpace(e)
        }

        startUpgrade() {
            this.totalTaskCount = 0, this.upgradeTaskCount = 0, u.DownloadKernelManager.attachListener(c.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                let e = k.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 = T, function (e) {
        const t = new T;
        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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(44), a = i(29), s = i(8), l = i(73), d = i(149), u = i(10), c = i(67), 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 r.default {
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), r = i(4), a = i(71), s = i(29), l = i(543), 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 w(e, t) {
        let i = "xl_pc" + g + e + String(t);
        return (i = s.ToolsUtilitiesAWNS.genarateMd5(i)).substr(0, 16).toUpperCase()
    }

    function k(e, t) {
        let i = null;
        try {
            let n = a.createCipheriv("aes-128-ecb", t, ""), o = n.update(e), r = n.final();
            i = Buffer.concat([o, r])
        } catch (e) {
            d.error("encryptBuffer", e)
        }
        return i
    }

    function T(e, t) {
        d.information("key", t);
        let i = JSON.stringify(e);
        return d.information("jsonStr", i), k(Buffer.from(i), t)
    }

    function b(e, t) {
        let i = null;
        try {
            let n = a.createDecipheriv("aes-128-ecb", t, ""), o = n.update(e), r = n.final();
            i = Buffer.concat([o, r])
        } catch (e) {
            d.error("decryptBuffer", e)
        }
        return i
    }

    function C(e, t) {
        d.information("key", t);
        let i = null;
        if (e = b(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 r.client.callServerFunction("GetDeviceIdOfWebSDKPlugin")), v || (v = yield r.client.callServerFunction("GetPeerID"));
            let e = yield r.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 r.client.callServerFunction("GetDeviceIdOfWebSDKPlugin"));
            let i = yield r.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([r.client.callServerFunction("GetUserID"), r.client.callServerFunction("GetPeerID"), r.client.callServerFunction("GetVipInfo")]), [a, s, u] = o;
            let c = `${a}:${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 = w(a, h), m = {peer_id: s, task_infos: e.task_infos};
            e.infohash && (m.infohash = e.infohash, m.bt_title = e.bt_title);
            let v = T(m, p), y = "/speed/speedup";
            t && (y = "/speed/res_status");
            let k = `http://ali.pc-x.speed.auth.vip.xunlei.com${y}?${f}`, b = {
                    Authorization: `Basic ${new Buffer(c).toString("base64")}`,
                    Accept: "application/json;version=1.3"
                }, C = yield n.request({method: "post", url: k, data: v, headers: b}),
                S = l.VipTaskHttpPackageNS.praseTokenBuffer(a, h, C.data, !1);
            return d.information("query token", S), S
        })
    }, t.encryptBuffer = k, t.encryptHttpBuffer = T, t.decryptBuffer = b, t.praseTokenBuffer = function (e, t, i, n) {
        const o = n ? "praseStatusBuffer" : "praseTokenBuffer";
        d.information(`--\x3e${o}`);
        let r = C(i, w(e, t)), a = null;
        return r && ((a = r).detailMessage = r.message, a.message = r.simple_msg), d.information(`<--${o}`), a
    }, t.decryptHttpBuffer = C
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(544), r = i(545), a = i(4), 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 = r.ToolsUtilitiesAWNS.genarateMd5(i)).substr(0, 16).toUpperCase()
        }

        e.createTokenBuffer = function (e, i, r) {
            return n(this, void 0, void 0, function* () {
                const n = r ? "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 a.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, r) {
            const a = r ? "praseStatusBuffer" : "praseTokenBuffer";
            s.information(`--\x3e${a}`);
            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(`<--${a}`), u
        }
    }(t.VipTaskHttpPackageNS || (t.VipTaskHttpPackageNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(96), o = i(545), r = i(407), a = i(781), 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=" + a.default.clientName + "&client_version=" + a.default.thunderVersionNumber + "&client_sequence=" + e + "&r=" + t + "&isvip=" + Number(r.default.isVip);
            return void 0 !== i && (n = n + "&verify_type=" + i), n
        }, e.getKey = function (e, t) {
            let i = a.default.clientName + a.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 r = n.Buffer.from(i);
            return o.ToolsUtilitiesAWNS.encryptBuffer(r, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(71), r = i(41), a = i(780), 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 a.FileSystemAWNS.existsAW(e))) {
                    let i = r.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, ""), r = n.update(e), a = n.final();
                i = Buffer.concat([r, a])
            } 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, ""), r = n.update(e), a = n.final();
                i = Buffer.concat([r, a])
            } 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(92), o = i(84), r = i(409), a = i(791), s = i(792), l = i(793), d = i(794), u = i(795), c = i(547),
        h = i(796), f = i(799), p = i(800), g = i(85), m = i(801), v = i(550);

    function y(e, t, i) {
        var n, o, r = e.size, a = p.getEncodedBits(t, i);
        for (n = 0; n < 15; n++) o = 1 == (a >> n & 1), n < 6 ? e.set(n, 8, o, !0) : n < 8 ? e.set(n + 1, 8, o, !0) : e.set(r - 15 + n, 8, o, !0), n < 8 ? e.set(8, r - 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(r - 8, 8, 1, !0)
    }

    function w(e, t, i) {
        var r = new a;
        i.forEach(function (t) {
            r.put(t.mode.bit, 4), r.put(t.getLength(), g.getCharCountIndicator(t.mode, e)), t.write(r)
        });
        var s = 8 * (o.getSymbolTotalCodewords(e) - c.getTotalCodewordsCount(e, t));
        for (r.getLengthInBits() + 4 <= s && r.put(0, 4); r.getLengthInBits() % 8 != 0;) r.putBit(0);
        for (var l = (s - r.getLengthInBits()) / 8, d = 0; d < l; d++) r.put(d % 2 ? 17 : 236, 8);
        return function (e, t, i) {
            for (var r = o.getSymbolTotalCodewords(t), a = c.getTotalCodewordsCount(t, i), s = r - a, l = c.getBlocksCount(t, i), d = l - r % l, u = Math.floor(r / l), f = Math.floor(s / l), p = f + 1, g = u - f, m = new h(g), v = 0, y = new Array(l), w = new Array(l), k = 0, T = new n(e.buffer), b = 0; b < l; b++) {
                var C = b < d ? f : p;
                y[b] = T.slice(v, v + C), w[b] = m.encode(y[b]), v += C, k = Math.max(k, C)
            }
            var S, I, _ = new n(r), A = 0;
            for (S = 0; S < k; S++) for (I = 0; I < l; I++) S < y[I].length && (_[A++] = y[I][S]);
            for (S = 0; S < g; S++) for (I = 0; I < l; I++) _[A++] = w[I][S];
            return _
        }(r, e, t)
    }

    function k(e, t, i, n) {
        var r;
        if (v(e)) r = m.fromArray(e); else {
            if ("string" != typeof e) throw new Error("Invalid data");
            var a = t;
            if (!a) {
                var c = m.rawSplit(e);
                a = f.getBestVersionForData(c, i)
            }
            r = m.fromString(e, a || 40)
        }
        var h = f.getBestVersionForData(r, 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 = w(t, i, r), g = o.getSymbolSize(t), k = new s(g);
        return function (e, t) {
            for (var i = e.size, n = d.getPositions(t), o = 0; o < n.length; o++) for (var r = n[o][0], a = n[o][1], s = -1; s <= 7; s++) if (!(r + s <= -1 || i <= r + s)) for (var l = -1; l <= 7; l++) a + l <= -1 || i <= a + 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(r + s, a + l, !0, !0) : e.set(r + s, a + l, !1, !0))
        }(k, 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)
            }
        }(k), function (e, t) {
            for (var i = l.getPositions(t), n = 0; n < i.length; n++) for (var o = i[n][0], r = i[n][1], a = -2; a <= 2; a++) for (var s = -2; s <= 2; s++) -2 === a || 2 === a || -2 === s || 2 === s || 0 === a && 0 === s ? e.set(o + a, r + s, !0, !0) : e.set(o + a, r + s, !1, !0)
        }(k, t), y(k, i, 0), t >= 7 && function (e, t) {
            for (var i, n, o, r = e.size, a = f.getEncodedBits(t), s = 0; s < 18; s++) i = Math.floor(s / 3), n = s % 3 + r - 8 - 3, o = 1 == (a >> s & 1), e.set(i, n, o, !0), e.set(n, i, o, !0)
        }(k, t), function (e, t) {
            for (var i = e.size, n = -1, o = i - 1, r = 7, a = 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;
                    a < t.length && (d = 1 == (t[a] >>> r & 1)), e.set(o, s - l, d), -1 == --r && (a++, r = 7)
                }
                if ((o += n) < 0 || i <= o) {
                    o -= n, n = -n;
                    break
                }
            }
        }(k, p), isNaN(n) && (n = u.getBestMask(k, y.bind(null, k, i))), u.applyMask(n, k), y(k, i, n), {
            modules: k,
            version: t,
            errorCorrectionLevel: i,
            maskPattern: n,
            segments: r
        }
    }

    t.create = function (e, t) {
        if (void 0 === e || "" === e) throw new Error("No input text");
        var i, n, a = r.M;
        return void 0 !== t && (a = r.from(t.errorCorrectionLevel, r.M), i = f.from(t.version), n = u.from(t.maskPattern), t.toSJISFunc && o.setToSJISFunction(t.toSJISFunc)), k(e, i, a, n)
    }
}, function (e, t, i) {
    var n = i(409),
        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],
        r = [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 r[4 * (e - 1) + 0];
            case n.M:
                return r[4 * (e - 1) + 1];
            case n.Q:
                return r[4 * (e - 1) + 2];
            case n.H:
                return r[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 + "$"), r = new RegExp("^[0-9]+$"), a = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
    t.testKanji = function (e) {
        return o.test(e)
    }, t.testNumeric = function (e) {
        return r.test(e)
    }, t.testAlphanumeric = function (e) {
        return a.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(100), r = e.exports = function () {
        o.call(this), this._buffers = [], this._buffered = 0, this._reads = [], this._paused = !1, this._encoding = "utf8", this.writable = !0
    };
    n.inherits(r, o), r.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))
    }, r.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
    }, r.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()))
    }, r.prototype.destroySoon = r.prototype.end, r.prototype._end = function () {
        this._reads.length > 0 && this.emit("error", new Error("There are some read requests waiting on finished stream")), this.destroy()
    }, r.prototype.destroy = function () {
        this._buffers && (this.writable = !1, this._reads = null, this._buffers = null, this.emit("close"))
    }, r.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))
    }, r.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++], r = Math.min(o.length, e.length - t);
            o.copy(n, t, 0, r), t += r, r !== o.length && (this._buffers[--i] = o.slice(r))
        }
        i > 0 && this._buffers.splice(0, i), this._buffered -= e.length, e.func.call(this, n)
    }, r.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(553), o = i(554);

    function r(e, t, i) {
        var n = e * t;
        return 8 !== i && (n = Math.ceil(n / (8 / i))), n
    }

    var a = e.exports = function (e, t) {
        var i = e.width, o = e.height, a = 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 = [], a) for (var d = n.getImagePasses(i, o), u = 0; u < d.length; u++) this._images.push({
            byteWidth: r(d[u].width, s, l),
            height: d[u].height,
            lineIndex: 0
        }); else this._images.push({byteWidth: r(i, s, l), height: o, lineIndex: 0});
        this._xComparison = 8 === l ? s : 16 === l ? 2 * s : 1
    };
    a.prototype.start = function () {
        this.read(this._images[this._imageIndex].byteWidth + 1, this._reverseFilterLine.bind(this))
    }, a.prototype._unFilterType1 = function (e, t, i) {
        for (var n = this._xComparison, o = n - 1, r = 0; r < i; r++) {
            var a = e[1 + r], s = r > o ? t[r - n] : 0;
            t[r] = a + s
        }
    }, a.prototype._unFilterType2 = function (e, t, i) {
        for (var n = this._lastLine, o = 0; o < i; o++) {
            var r = e[1 + o], a = n ? n[o] : 0;
            t[o] = r + a
        }
    }, a.prototype._unFilterType3 = function (e, t, i) {
        for (var n = this._xComparison, o = n - 1, r = this._lastLine, a = 0; a < i; a++) {
            var s = e[1 + a], l = r ? r[a] : 0, d = a > o ? t[a - n] : 0, u = Math.floor((d + l) / 2);
            t[a] = s + u
        }
    }, a.prototype._unFilterType4 = function (e, t, i) {
        for (var n = this._xComparison, r = n - 1, a = this._lastLine, s = 0; s < i; s++) {
            var l = e[1 + s], d = a ? a[s] : 0, u = s > r ? t[s - n] : 0, c = s > r && a ? a[s - n] : 0, h = o(u, d, c);
            t[s] = l + h
        }
    }, a.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, r = t % 8, a = (e - o) / 8, s = (t - r) / 8, l = 0; l < n.length; l++) {
            for (var d = n[l], u = a * 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] < r; 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 r = t % n[o].x.length, a = (t - r) / n[o].x.length * 8 + n[o].x[r], s = i % n[o].y.length;
            return 4 * a + ((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), r = Math.abs(n - t), a = Math.abs(n - i);
        return o <= r && o <= a ? e : r <= a ? t : i
    }
}, function (e, t, i) {
    "use strict";
    var n = i(116), o = i(556), r = 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
    };
    r.prototype.start = function () {
        this.read(n.PNG_SIGNATURE.length, this._parseSignature.bind(this))
    }, r.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))
    }, r.prototype._parseChunkBegin = function (e) {
        for (var t = e.readUInt32BE(0), i = e.readUInt32BE(4), r = "", a = 4; a < 8; a++) r += String.fromCharCode(e[a]);
        var s = Boolean(32 & e[4]);
        if (this._hasIHDR || i === n.TYPE_IHDR) {
            if (this._crc = new o, this._crc.write(new Buffer(r)), 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 " + r))
        } else this.error(new Error("Expected IHDR on beggining"))
    }, r.prototype._skipChunk = function () {
        this.read(8, this._parseChunkBegin.bind(this))
    }, r.prototype._handleChunkEnd = function () {
        this.read(4, this._parseChunkEnd.bind(this))
    }, r.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))
    }, r.prototype._handleIHDR = function (e) {
        this.read(e, this._parseIHDR.bind(this))
    }, r.prototype._parseIHDR = function (e) {
        this._crc.write(e);
        var t = e.readUInt32BE(0), i = e.readUInt32BE(4), o = e[8], r = e[9], a = e[10], s = e[11], l = e[12];
        if (8 === o || 4 === o || 2 === o || 1 === o || 16 === o) if (r in n.COLORTYPE_TO_BPP_MAP) if (0 === a) if (0 === s) if (0 === l || 1 === l) {
            this._colorType = r;
            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(r & n.COLORTYPE_PALETTE),
                color: Boolean(r & n.COLORTYPE_COLOR),
                alpha: Boolean(r & n.COLORTYPE_ALPHA),
                bpp: d,
                colorType: r
            }), 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))
    }, r.prototype._handlePLTE = function (e) {
        this.read(e, this._parsePLTE.bind(this))
    }, r.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()
    }, r.prototype._handleTRNS = function (e) {
        this.read(e, this._parseTRNS.bind(this))
    }, r.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()
    }, r.prototype._handleGAMA = function (e) {
        this.read(e, this._parseGAMA.bind(this))
    }, r.prototype._parseGAMA = function (e) {
        this._crc.write(e), this.gamma(e.readUInt32BE(0) / n.GAMMA_DIVISION), this._handleChunkEnd()
    }, r.prototype._handleIDAT = function (e) {
        this.read(-e, this._parseIDAT.bind(this, e))
    }, r.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()
    }, r.prototype._handleIEND = function (e) {
        this.read(e, this._parseIEND.bind(this))
    }, r.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(553), 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 r(e, t, i, n, r, a) {
        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 + a;
                    if (g === r.length) throw new Error("Ran out of data");
                    t[h + f] = r[g]
                }
            }
            a += n
        }
        return a
    }

    function a(e, t, i, n, r, a) {
        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 = r.get(n), f = i(c, u, d), p = 0; p < 4; p++) {
                var g = o[n][p];
                t[f + p] = 255 !== g ? h[g] : a
            }
            r.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, r, a, 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, r = h >> 1 & 1, a = 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, a, r, 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 = r(h[v], i, f, d, e, g) : a(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, r = t.colorType, a = t.transColor, s = t.palette, l = e;
        return 3 === r ? function (e, t, i, n, o) {
            for (var r = 0, a = 0; a < n; a++) for (var s = 0; s < i; s++) {
                var l = o[e[r]];
                if (!l) throw new Error("index " + e[r] + " not in palette");
                for (var d = 0; d < 4; d++) t[r + d] = l[d];
                r += 4
            }
        }(e, l, n, o, s) : (a && function (e, t, i, n, o) {
            for (var r = 0, a = 0; a < n; a++) for (var s = 0; s < i; s++) {
                var l = !1;
                if (1 === o.length ? o[0] === e[r] && (l = !0) : o[0] === e[r] && o[1] === e[r + 1] && o[2] === e[r + 2] && (l = !0), l) for (var d = 0; d < 4; d++) t[r + d] = 0;
                r += 4
            }
        }(e, l, n, o, a), 8 !== i && (16 === i && (l = new Buffer(n * o * 4)), function (e, t, i, n, o) {
            for (var r = Math.pow(2, o) - 1, a = 0, s = 0; s < n; s++) for (var l = 0; l < i; l++) {
                for (var d = 0; d < 4; d++) t[a + d] = Math.floor(255 * e[a + d] / r + .5);
                a += 4
            }
        }(e, l, n, o, i))), l
    }
}, function (e, t, i) {
    "use strict";
    var n = i(116), o = i(556), r = i(812), a = i(813), 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 = r(e, t, i, this._options), s = n.COLORTYPE_TO_BPP_MAP[this._options.colorType];
        return a(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(151);

    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 r(e, t, i) {
        var n = e + t;
        return void 0 !== i && (n += " " + i), n
    }

    t.render = function (e, t, i) {
        var a = n.getOptions(t), s = e.modules.size, l = e.modules.data, d = s + 2 * a.margin,
            u = a.color.light.a ? "<path " + o(a.color.light, "fill") + ' d="M0 0h' + d + "v" + d + 'H0z"/>' : "",
            c = "<path " + o(a.color.dark, "stroke") + ' d="' + function (e, t, i) {
                for (var n = "", o = 0, a = !1, s = 0, l = 0; l < e.length; l++) {
                    var d = Math.floor(l % t), u = Math.floor(l / t);
                    d || a || (a = !0), e[l] ? (s++, l > 0 && d > 0 && e[l - 1] || (n += a ? r("M", d + i, .5 + u + i) : r("m", o, 0), o = 0, a = !1), d + 1 < t && e[l + 1] || (n += r("h", s), s = 0)) : o++
                }
                return n
            }(l, s, a.margin) + '"/>', h = 'viewBox="0 0 ' + d + " " + d + '"',
            f = '<svg xmlns="http://www.w3.org/2000/svg" ' + (a.width ? 'width="' + a.width + '" height="' + a.width + '" ' : "") + h + ' shape-rendering="crispEdges">' + u + c + "</svg>\n";
        return "function" == typeof i && i(null, f), f
    }
}, function (e, t, i) {
    var n = i(410).FilterCSS, o = i(410).getDefaultWhiteList, r = i(411);

    function a() {
        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 w(e) {
        return e.replace(c, "&quot;")
    }

    function k(e) {
        return e.replace(h, '"')
    }

    function T(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 b(e) {
        return e.replace(p, ":").replace(g, " ")
    }

    function C(e) {
        for (var t = "", i = 0, n = e.length; i < n; i++) t += e.charCodeAt(i) < 32 ? " " : e.charAt(i);
        return r.trim(t)
    }

    function S(e) {
        return e = C(e = b(e = T(e = k(e))))
    }

    function I(e) {
        return e = l(e = w(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 = a, 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 = S(i), "href" === t || "src" === t) {
            if ("#" === (i = r.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 = I(i)
    }, t.escapeHtml = l, t.escapeQuote = w, t.unescapeQuote = k, t.escapeHtmlEntities = T, t.escapeDangerHtml5Entities = b, t.clearNonPrintableCharacter = C, t.friendlyAttrValue = S, t.escapeAttrValue = I, 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 (a, s, l) {
                if (function (t) {
                    return !!i || -1 !== r.indexOf(e, t)
                }(a)) {
                    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(a, s, l)
            }, remove: function (e) {
                var t = "", i = 0;
                return r.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(411);

    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 r(e) {
        return "</" === e.slice(0, 2)
    }

    var a = /[^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 = "", a = 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(a, d)), s = d, a = d;
                    continue
                }
                if (">" === f) {
                    n += i(e.slice(a, s)), c = o(h = e.slice(s, d + 1)), n += t(s, n.length, c, h, r(h)), a = 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 a < e.length && (n += i(e.substr(a))), n
    }, t.parseAttr = function (e, t) {
        "use strict";
        var i = 0, o = [], r = !1, u = e.length;

        function c(e, i) {
            if (!((e = (e = n.trim(e)).replace(a, "").toLowerCase()).length < 1)) {
                var r = t(e, i || "");
                r && o.push(r)
            }
        }

        for (var h = 0; h < u; h++) {
            var f, p = e.charAt(h);
            if (!1 !== r || "=" !== p) if (!1 === r || h !== i || '"' !== p && "'" !== p || "=" !== e.charAt(h - 1)) {
                if (/\s|\n|\t/.test(p)) {
                    if (e = e.replace(/\s|\n|\t/g, " "), !1 === r) {
                        if (-1 === (f = s(e, h))) {
                            c(n.trim(e.slice(i, h))), r = !1, i = h + 1;
                            continue
                        }
                        h = f - 1;
                        continue
                    }
                    if (-1 === (f = l(e, h - 1))) {
                        c(r, d(n.trim(e.slice(i, h)))), r = !1, i = h + 1;
                        continue
                    }
                }
            } else {
                if (-1 === (f = e.indexOf(p, h + 1))) break;
                c(r, n.trim(e.slice(i + 1, f))), r = !1, i = (h = f) + 1
            } else r = e.slice(i, h), i = h + 1
        }
        return i < e.length && (!1 === r ? c(e.slice(i)) : c(r, d(n.trim(e.slice(i))))), n.trim(o.join(" "))
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(282);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\commentInput-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(459), o = i(308);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(884);
    var a = i(1), s = Object(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), r = i(30), a = i(14), s = i(11), l = i(42), d = s.DownloadKernelTaskManager.getTaskManager();
    !function (e) {
        let t = null, s = -1, u = null;
        e.init = function () {
            r.default.attachListener(a.NodeEventMesssageNS.eventDownloadItemActive, (e, r, a, c, h) => {
                r && e === o.DownloadKernel.CategroyViewID.Downloading ? (-1 !== s && null !== t && (clearTimeout(t), t = null), s = a, 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(875));
                            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 = "", r = d.getTaskFromTaskId(t.taskId).getExtraObject(),
                                    a = r.getSubTaskCount(), s = new Map;
                                for (let t = 0; t < a; ++t) {
                                    let n = r.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) => {
                                    r.setSubTaskFileSize(s.get(e), t.fileSize)
                                }, () => {
                                    u = null
                                }).catch())
                            }
                        }
                    }
                }), 100)) : s === a && (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(445), o = i(346);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(461), o = i(350);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(103), r = i(54), a = i(959), s = i(118), l = i(572), d = i(964);
    t.probe = function (e, t) {
        var i = t || {}, u = a.defer(), c = null, h = r.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(118), o = i(5), r = i(961), a = i(962), s = i(963);

    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 = r : l.isWindow(e) ? t = s : l.isMacOS(e) && (t = a), t
    }, e.exports = l
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(118), r = i(413);

    function a() {
        r.call(this)
    }

    n.inherits(a, r), a.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)
    }, a.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)
    }, a.prototype._processFooter = function (e) {
        if ((e.match(/[\/]/g) || []).length >= 3) {
            var t = /([0-9\.]+)/g, i = t.exec(e), n = t.exec(e), r = t.exec(e), a = t.exec(e);
            o.all([i, n, r, a]) && (this._response.min = parseFloat(i[1], 10), this._response.avg = parseFloat(n[1], 10), this._response.max = parseFloat(r[1], 10), this._response.stddev = parseFloat(a[1], 10), this._changeState(this.STATES.END)), this._changeState(this.STATES.END)
        }
    }, e.exports = a
}, 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 = {}, r = (i(747), i(1)), a = Object(r.a)(o, n, [], !1, null, "6d2ca8de", null);
    a.options.__file = "src\\common\\components\\loading.vue";
    t.default = a.exports
}, function (e, t, i) {
    i(576), e.exports = i(577)
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(5), r = i(0), a = i(7), s = i(79), l = i(19), d = i(32),
        u = a.default(n.join(__rootDir, "../bin/ThunderHelper.node"));

    function c() {
        "console" === process.env.TL_OUTPUT ? r.default.outputLogger = r.outputLoggerConsole : r.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 {
                [r.LogLevel.Critical]: e(r.LogLevel.Critical),
                [r.LogLevel.Error]: e(r.LogLevel.Error),
                [r.LogLevel.Warning]: e(r.LogLevel.Warning),
                [r.LogLevel.Information]: e(r.LogLevel.Information),
                [r.LogLevel.Verbose]: e(r.LogLevel.Verbose)
            }
        }()
    }

    function h() {
        let e = s.DevEnvHelperNS.isLogEnable();
        "1" === process.env.TL_ENABLE !== e && (process.env.TL_ENABLE = e ? "1" : "0", r.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", r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(70), r = i(372);
    r.CommonIPCRenderer.rendererCommunicator.initialize(o.CommonIPCBase.mainRendererContext), r.CommonIPCRenderer.rendererCommunicator.connect();
    let a = !1;
    const s = i(15);
    s.server.start({IsMainRendererReadyToShow: () => a});
    const l = i(4);
    l.client.start({name: o.CommonIPCBase.mainRendererContext});
    const d = i(581), u = i(17), c = i(19), h = i(2), f = i(2), p = i(20), g = i(97), m = i(0);
    i(590);
    const v = i(38), y = i(34), w = i(379), k = i(14), T = i(642), b = i(658), C = i(662), S = i(667), I = i(668),
        _ = i(669), A = i(670), D = i(91), x = i(673), N = i(676), E = i(677), P = i(678), O = i(679), M = i(680),
        F = i(28), L = i(681), R = i(682), B = i(683), U = i(684), V = i(685), K = i(686), W = i(687), j = i(688),
        G = i(689), H = i(515), z = i(32), X = i(35), q = i(690), Y = i(102), J = i(45), Z = i(23), Q = i(398),
        $ = i(30), ee = i(10), te = i(76), ie = i(691), ne = i(88), oe = i(106), re = i(63), ae = i(105), se = i(695),
        le = i(9), de = i(938), ue = i(939), ce = i(525), he = i(940), fe = i(538), pe = i(26), ge = i(49), me = i(22),
        ve = i(56), ye = i(51), we = i(530), ke = i(528), Te = i(539), be = i(141), Ce = i(941), Se = i(942), Ie = i(7),
        _e = Ie.default(f.join(__rootDir, "../bin/ThunderHelper.node")),
        Ae = Ie.default(f.join(__rootDir, "../bin/WeakReferences.node")), De = i(943), xe = i(568), Ne = i(948),
        Ee = i(949);
    i(377), i(950);
    const Pe = i(951), Oe = i(109), Me = i(145), Fe = i(952), Le = i(953), Re = i(954), Be = i(408), Ue = i(3),
        Ve = i(31), Ke = i(11);
    i(967);
    const We = i(968), je = i(969), Ge = i(395), He = i(402), ze = i(115), Xe = i(970), qe = i(36), Ye = i(12),
        Je = i(8), Ze = i(13), Qe = Ke.DownloadKernelTaskManager.getTaskManager(),
        $e = we.GroupAccelerateManagerNS.getManager(), et = ke.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, rt = "", at = !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:")) rt = 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 ? at = !0 : i.indexOf("unionfile") > -1 && (st = !0)
            }
            nt = !0
        })
    }

    lt().then(() => {
        oe.default.setStartArgs(rt)
    }).catch(), re.quitPromises.add(function () {
        return new Promise(e => n(this, void 0, void 0, function* () {
            _e.setQuitEvent(), e(!0)
        }))
    }), re.quitPromises.add(function () {
        return new Promise(e => n(this, void 0, void 0, function* () {
            yield he.default.saveMainWndData(), _e.stopListenLocalNet(), e(!0)
        }))
    }), re.quitPromises.add(function () {
        return new Promise(e => {
            v.ThunderNewTask.uninit(), e(!0)
        })
    }), re.quitPromises.addBefore(function () {
        return new Promise(e => n(this, void 0, void 0, function* () {
            yield X.TaskOperatorNs.pauseAll(Ue.DownloadKernel.TaskStopReason.Exit), e(!0)
        }))
    }), re.quitPromises.addBefore(function () {
        return n(this, void 0, void 0, function* () {
            return He.SyncMsgHelperNS.uninit(), !0
        })
    }), re.quitPromises.addBefore(function () {
        return n(this, void 0, void 0, function* () {
            return ze.ShouleiListSyncNS.getMananger().uninit(), !0
        })
    }), re.quitPromises.addAfter(function () {
        return n(this, void 0, void 0, function* () {
            return yield ee.ConfigNS.save(), yield te.BHOConfigNS.save(), !0
        })
    }), re.quitPromises.add(function () {
        return new Promise(e => {
            e(!0)
        })
    }), re.quitPromises.add(function () {
        return n(this, void 0, void 0, function* () {
            return s.server.fireClientEvent("main-will-quit"), !0
        })
    }), re.quitPromises.add(function () {
        return n(this, void 0, void 0, function* () {
            return ae.default.uninit(), !0
        })
    }), re.quitPromises.add(function () {
        return n(this, void 0, void 0, function* () {
            return yield Re.DownloadDetectHelperNS.uninit(), !0
        })
    }), re.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)
                }
            })
        })
    }), re.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 = Ae, pe.default.init().catch(e => {
        it.warning(e)
    }), ge.default.init().catch(e => {
        it.warning(e)
    }), _e.allowSetForegroundWindow(), T.NaviteFunctionNS.registerNativeFunction(), b.PluginFunctionNS.registerPluginFunction(), C.ConfigPluginFunctionNS.registerPluginFunction(), S.ConfigRemoteGlobalPluginFunctionNS.registerPluginFunction(), I.LoginPluginFunctionNS.registerPluginFunction(), _.TipsPluginFunctionNS.registerPluginFunction(), A.DkPluginFunctionNS.registerPluginFunction(), D.PluginFunctionUINS.registerPluginFunction(), x.SkinPluginFunctionNS.registerPluginFunction(), N.VipPluginFunctionNS.registerPluginFunction(), E.NotificationPluginFunctionNS.registerPluginFunction(), je.ScheduleTaskPluginFunctionNS.registerPluginFunction(), P.ShouleiConnectPluginFunctionNS.registerPluginFunction(), O.SearchPluginFunctionNS.registerPluginFunction(), M.XmpPluginFunctionNS.registerPluginFunction(), Promise.resolve().then(() => i(972)).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)
    }), Ce.BindConfigNS.init(), he.default.initMainRendererHelper(), B.ConfigNaviteFunctionNS.registerNativeFunction(), U.ConfigRemoteGlobalNaviteFunctionNS.registerNativeFunction(), K.SkinNaviteFunctionNS.registerNativeFunction(), L.LoginNaviteFunctionNS.registerNativeFunction(), Ne.TipsNaviteFunctionNS.registerNativeFunction(), G.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 Ge.QuitMessageBoxMgrNS.popup()) && (yield re.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 = Te.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), ae.default.autoInstallXmp().catch(), ae.default.init().then().catch()
            }, 3e3), a = !0, qe.NativeCallNS.init(), R.DKNaviteFunctionNS.registerNativeFunction(), W.VipNaviteFunctionNS.registerNativeFunction(), V.DownloadAndPlayNaviteFunctionNS.registerNativeFunction(), j.SubtitleManagerNaviteFunctionNS.registerNativeFunction(), Ee.NotificationNaviteFunctionNS.registerNativeFunction(), De.AdManageNS.init(), Pe.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(), re.quitPromises.add(Le.fullScreenCheckEnd), $e.init(), et.init("http://misc-xl9-ssl.xunlei.com/acc_xdas/dist/#/"), ue.ClipBoardNS.init(at && st), xe.QueryTaskInfoNS.init(), We.TaskP2spAutoRenameNS.init(), be.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;
            w.PluginLoaderNS.pluginLoader.loadPlugin("VipDownload").catch(), w.PluginLoaderNS.pluginLoader.loadPlugin("VipPluginController").catch(), yield w.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, rt, t), !e && ("Install" === rt || t && "AutoRun" !== rt && !ot)) {
                        let e = "other";
                        "Install" === rt ? e = "Install" : t && (e = "auto"), Z.LoginHelperNS.loginHelper.showLoginDlg(e, !0), t && !ot && "AutoRun" !== rt && Q.commonLoginHelper.setLoginWndShowConfig()
                    }
                }))
            })), yield w.PluginLoaderNS.pluginLoader.loadPlugin("ThunderXLogin"), w.PluginLoaderNS.pluginLoader.loadPlugin("VipRenewButton", "vip-plugin-controller").catch(), yield w.PluginLoaderNS.pluginLoader.loadPlugin("Centertip"), w.PluginLoaderNS.pluginLoader.loadPlugin("ThunderPanPlugin").catch(), w.PluginLoaderNS.pluginLoader.loadPlugin("ThunderIM").catch(), setTimeout(() => {
                w.PluginLoaderNS.pluginLoader.loadPlugin("XmpPlugin").catch()
            }, 1e3), w.PluginLoaderNS.pluginLoader.loadPlugin("Flash").catch(), setTimeout(() => {
                try {
                    let t = _e.getPeerID(), i = _e.getOSVersion(), n = f.join(__rootDir, "../../Thunder.exe"),
                        o = _e.getFileVersion(n), r = _e.getChannelID();
                    w.PluginLoaderNS.pluginLoader.startDownloadPlugins(t, i, "21", o, r, e)
                } catch (e) {
                }
            }, 1e4), e.on(k.NodeEventMesssageNS.eventPluginLoderPluginReady, e => n(this, void 0, void 0, function* () {
                if ("addTest4" === e) {
                    let t = yield w.PluginLoaderNS.pluginLoader.loadPlugin(e);
                    t && t.add && t.add("plugin loader")
                }
            })), setTimeout(() => {
                if ("Install" === rt && !(ee.ConfigNS.getValue("ShowBrowser", "ShowBoxCount", 0) >= 3)) {
                    let e = "auto";
                    Me.popMutual.enqueue(Oe.PopView.BROWSER_GUIDE, () => n(this, void 0, void 0, function* () {
                        yield(yield Promise.resolve().then(() => i(108))).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(517));
                yield e.init()
            }), 5e3), setTimeout(() => {
                Se.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(94), r = i(20), a = i(579), s = i(61);
    t.Server = class extends r.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 a.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(94), o = i(20), r = i(121), a = i(491), 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 a.Parser, t = this.socket;
            t.on("data", t => {
                e.feed(t)
            }), t.on("connect", () => {
                this.emit("connect")
            }), t.on("end", () => {
                r.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) {
                r.error(e.message)
            } else r.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(94), o = i(20), r = i(121), a = i(491), 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 a.Parser, t = this.socket;
            t.on("data", t => {
                e.feed(t)
            }), t.on("connect", () => {
                this.emit("connect")
            }), t.on("end", () => {
                r.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) {
                r.error(e.message)
            } else r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(54), r = (i(41), i(2)), a = i(5);
    let s = null;
    const l = i(9), d = i(19), u = i(0), c = i(7), h = i(32), f = i(12), p = "xdas_profile_stat";
    let g = "", m = void 0, v = null, y = void 0, w = null,
        k = c.default(r.join(__rootDir, "../bin/ThunderHelper.node")), T = new Set;

    function b() {
        return n(this, void 0, void 0, function* () {
            return new Promise(e => n(this, void 0, void 0, function* () {
                void 0 === y && (null === w && (w = new Promise(e => {
                    e(y = function (e) {
                        let t = "";
                        if (0 === e.length && "renderer" === process.type) {
                            let e = r.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("?"), a = e.indexOf("#");
                            n = o > -1 ? Math.min(o - 1, n) : n, n = a > -1 ? Math.min(a - 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 w), e(y)
            }))
        })
    }

    function C(e) {
        let t = "";
        do {
            if (null === e || void 0 === e) break;
            switch (typeof e) {
                case"string":
                    t = e;
                    break;
                case"object":
                    t = a.inspect(e) || "";
                    break;
                case"number":
                case"boolean":
                    t = e.toString() || ""
            }
        } while (0);
        return t
    }

    function S(e) {
        return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
    }

    function I(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(71)));
                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 A(e, t, i, o) {
        return n(this, void 0, void 0, function* () {
            let r = C(t), a = C(i), s = yield I(a), d = function (e) {
                let t = new RegExp(S("file:///"), "g"), i = new RegExp(S(process.resourcesPath + "\\"), "g"),
                    n = new RegExp(S(encodeURI(process.resourcesPath.replace(/\\/g, "/") + "/")), "g");
                return e.replace(t, "").replace(i, "").replace(n, "")
            }(C(o)), u = yield I(d), c = `${e}:${s}:${u}`;
            T.has(c) || (T.add(c), l.XLStatNS.trackEvent(p, "uncaught_exception", "", 0, 0, 0, 0, `type=${e},business_name=${yield b()},code=${r},message_hash=${s},message=${encodeURI(a)},stack_hash=${u},stack=${encodeURI(d)}`)), function (e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                })
            }().catch()
        })
    }

    function D(e) {
        console.error(e);
        let t = e || {};
        A("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 = k.iSColdStartUp() ? 1 : 0, i = o.release(), n = k.performanceMonitorReporter.getProcessUptime(),
                    r = yield _(), a = `key=${e},start_type=${r},cold_start_up=${t},os_version=${i},cost_time=${n}`;
                l.XLStatNS.trackEvent(p, "cold_start_up", "", 0, 0, 0, 0, a)
            })
        }
    }(t.PerformanceMonitorStatNS || (t.PerformanceMonitorStatNS = {})), function () {
        return n(this, void 0, void 0, function* () {
            if (process.on("uncaughtException", e => {
                console.error(e);
                let t = e || {};
                A("uncaughtException", t.code, t.message, t.stack).catch()
            }), "browser" === process.type) process.on("unhandledRejection", (e, t) => {
                D(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 => {
                    D(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 = k.iSColdStartUp() ? 1 : 0, t = o.release(), i = window.performance.timing,
                                    n = i.loadEventEnd - i.navigationStart, r = i.fetchStart - i.navigationStart,
                                    a = 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=${r},domin_lookup_time=${a},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(95);
    if ("renderer" === process.type) {
        if (n.info("client running"), !global.__xdasAsyncRemoteExports) {
            let e = {};
            global.__xdasAsyncRemoteExports = e;
            let t = i(583);
            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(587);
        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(96), r = i(584), a = i(585), s = i(493), l = i(586), d = i(95), u = i(494),
        c = n.ipcRenderer, h = process.electronBinding("v8_util"), f = new r.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 w(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 = C(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 = C(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 k(e, t, i) {
        if (i) {
            let t = C(i);
            Object.setPrototypeOf(e, t)
        }
    }

    function T(e, t) {
        h.setHiddenValue(e, "__remote_id__", t)
    }

    function b(e) {
        return h.getHiddenValue(e, "__remote_id__")
    }

    function C(e, t, i) {
        const n = {
            value: () => e.value,
            array: () => e.members.map(e => C(e)),
            buffer: () => o.Buffer.from(e.value),
            promise: () => Promise.resolve({then: C(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 r;
        return e.type in n ? r = n[e.type]() : e.refId ? p.has(e.refId) ? (h.addRemoteObjectRef(g, e.refId), r = p.get(e.refId)) : (d.warn("[metaToValue] refId point to null" + e.refId), r = "function" === e.type ? () => {
        } : {}) : e.id ? p.has(e.id) ? (h.addRemoteObjectRef(g, e.id), w(r = p.get(e.id), e.id, e.members, !0), k(r, e.id, e.proto)) : (r = "function" === e.type ? t ? function (e, t, i) {
            if (p.has(i.id)) return p.get(i.id);
            let n = b(e), o = function (...e) {
                throw Error("never should come to a proxied function")
            };
            Object.defineProperty(o, "name", {value: t, writable: !1, enumerable: !0});
            let r = new Proxy(o, {
                apply: (e, i, o) => new Promise((e, r) => {
                    let d = b(i);
                    if (d || (d = b(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), a.default.add(h, t => {
                        try {
                            y(C(t), e, r)
                        } catch (e) {
                            r(e)
                        }
                    })
                }), construct: (e, i, o) => new Promise((e, o) => {
                    let r = s.default.browser.memberConstruct, d = l.default(r);
                    c.send(r, g, d, n, t, v(i)), a.default.add(d, t => {
                        try {
                            let i = C(t);
                            e(i)
                        } catch (e) {
                            o(e)
                        }
                    })
                })
            });
            return h.setHiddenValue(o, "__remote_id__", i.id), r
        }(t, i, e) : function (e) {
            let t = e.id;
            const i = function (...e) {
                throw new Error("Should Never com to a remoteFunction PlaceHolder")
            };
            return T(i, t), new Proxy(i, {
                apply: (e, i, n) => new Promise((e, o) => {
                    let r = s.default.browser.functionCall, d = l.default(r), u = b(i);
                    c.send(r, g, d, u, t, v(n)), a.default.add(d, t => {
                        try {
                            y(C(t), e, o)
                        } catch (e) {
                            o(e)
                        }
                    })
                }), construct: (e, i, n) => new Promise((e, n) => {
                    let o = s.default.browser.construct, r = l.default(o);
                    c.send(o, g, r, t, v(i)), a.default.add(r, t => {
                        try {
                            let i = C(t);
                            e(i)
                        } catch (e) {
                            n(e)
                        }
                    })
                })
            })
        }(e) : {}, h.setRemoteObjectFreer(r, g, e.id), p.set(e.id, r), h.setHiddenValue(r, "__remote_id__", e.id), h.addRemoteObjectRef(g, e.id), function (e) {
            let t = b(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, r) => {
                            let d = s.default.browser.memberSet, u = l.default(d), h = v([n]);
                            c.send(d, g, u, t, i, h), a.default.add(u, t => {
                                try {
                                    let a = C(t);
                                    e[i] = n, o(a)
                                } catch (e) {
                                    r(e)
                                }
                            })
                        })
                    }
                }, __get: {
                    enumerable: !1, writable: !1, value: function (i) {
                        return new Promise((n, o) => {
                            let r = s.default.browser.memberGet, d = l.default(r);
                            c.send(r, g, d, t, i), a.default.add(d, t => {
                                try {
                                    const r = C(t);
                                    e[i] = r, n(r)
                                } 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), a.default.add(o, n => {
                                try {
                                    if (n.id !== t) throw Error("SYNC_RETURN: remote id not match");
                                    let o = C(n);
                                    e(o)
                                } catch (e) {
                                    i(e)
                                }
                            })
                        })
                    }
                }
            })
        }(r), w(r, e.id, e.members), k(r, e.id, e.proto), Object.defineProperty(r.constructor, "name", {value: e.name}), e.extendedMemberNames && e.extendedMemberNames.forEach((e, t) => {
            let i = r[e], n = r.__proto__;
            for (; n;) {
                if (Object.prototype.hasOwnProperty.call(n, e)) {
                    delete n[e];
                    break
                }
                n = n.__proto__
            }
            Object.defineProperty(r, e, {value: i, enumerable: !1, writable: !1, configurable: !0})
        })) : d.error("no id of meta:", e), r
    }

    t.Interest = m;

    class S {
        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), r = l.default(o);
                    c.send(o, g, r, t), a.default.add(r, e => {
                        try {
                            let t = C(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 I(e, t, i) {
        try {
            a.default.invoke(t, i).remove(t)
        } finally {
            a.default.remove(t)
        }
    }

    c.on(s.default.renderer.requireReturn, I), c.on(s.default.renderer.getBuiltInReturn, I), c.on(s.default.renderer.getGlobalReturn, I), c.on(s.default.renderer.currentWindowReturn, I), c.on(s.default.renderer.currentWebContentsReturn, I), c.on(s.default.renderer.functionCallReturn, I), c.on(s.default.renderer.constructReturn, I), c.on(s.default.renderer.memberCallReturn, I), c.on(s.default.renderer.memberSetReturn, I), c.on(s.default.renderer.memberGetReturn, I), c.on(s.default.renderer.memberConstructReturn, I), c.on(s.default.renderer.callback, (e, t, i) => {
        f.apply(t, C(i))
    }), c.on(s.default.renderer.syncReturn, I), 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"], A = ["__promise_", "__resolved_", "__remoteObj_", "__name_", "__what_"],
        D = e => {
            if (!e.__isResolved()) throw Error("Can not access the property of a remote module which has not Resolved yet.")
        };

    function x(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 => (D(e), Reflect.getPrototypeOf(e.__remoteObj_)),
            setPrototypeOf: (e, t) => {
                throw new Error("changing prototype of remote object is forbidden")
            },
            isExtensible: t => (D(e), Reflect.isExtensible(e.__remoteObj_)),
            preventExtensions: t => (D(e), Reflect.preventExtensions(e)),
            getOwnPropertyDescriptor: (t, i) => (D(e), Reflect.getOwnPropertyDescriptor(e.__remoteObj_, i)),
            has: (t, i) => (D(e), Reflect.has(e.__remoteObj_, i)),
            deleteProperty: (t, i) => (D(t), Reflect.deleteProperty(e.__remoteObj_, i)),
            defineProperty: (t, i, n) => (D(e), Reflect.defineProperty(e.__remoteObj_, i, n)),
            get: (t, i, n) => {
                if ("string" == typeof i) {
                    if (String.prototype.includes.call(A, i)) {
                        return e[i]
                    }
                    if (String.prototype.includes.call(_, i)) {
                        return e[i]
                    }
                }
                return D(e), Reflect.get(e.__remoteObj_, i)
            },
            set: (t, i, n, o) => (D(e), Reflect.set(e.__remoteObj_, i, n, o)),
            ownKeys: t => (D(e), Reflect.ownKeys(e.__remoteObj_)),
            apply: (t, i, n) => {
                D(e), Reflect.apply(e.__remoteObj_, i, n)
            },
            construct: (t, i, n) => {
                if (D(e), "function" != typeof e.__remoteObj_) throw Error("operator new ONLY used for function");
                return new Promise((t, n) => {
                    let o = s.default.browser.construct, r = l.default(o),
                        d = h.getHiddenValue(e.__remoteObj_, "__remote_id__");
                    c.send(o, g, r, d, v(i)), a.default.add(r, e => {
                        try {
                            t(C(e))
                        } catch (e) {
                            n(e)
                        }
                    })
                })
            }
        });
        return e.__promise_.then(e => {
            let t = typeof e;
            if ("function" === t || "object" === t) {
                let t = b(e);
                t && T(i, t)
            }
        }), i
    }

    t.remoteRequire = function (e) {
        return x(new S("module", e))
    }, t.getBuiltin = function (e) {
        return x(new S("builtin", e))
    }, t.getGlobal = function (e) {
        return x(new S("global", e))
    }, t.getCurrentWindow = function () {
        return x(new S("current_window"))
    }, t.getCurrentWebContents = function () {
        return x(new S("current_web_contents"))
    }, t.getWebContents = function () {
        return x(new S("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 r, a = i.exec(o);
            for (; null !== a;) {
                const e = a[1];
                if (!e.includes("native") && !e.includes("electron.asar")) {
                    r = /([^/^)]*)\)?$/gi.exec(e)[1];
                    break
                }
                a = i.exec(o)
            }
            return this.callbacks[t] = e, n.setHiddenValue(e, "__remote_callback_id__", t), n.setHiddenValue(e, "__remote_call_location__", r), 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(95);
    var o;
    !function (e) {
        let t = {};
        e.add = function (e, i, n) {
            t[e] = {func: i, thisArg: n}
        }, e.invoke = function (i, ...o) {
            let r = t[i];
            return r ? r.thisArg ? r.func.apply(r.thisArg, ...o) : r.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(588), r = i(493), a = i(589), s = i(95), l = i(494), d = n.ipcMain,
        u = process.electronBinding("v8_util");
    let c = u.createDoubleIDWeakMap();
    const h = new o.default;

    function f(e, t, i, n, o, r) {
        let a, l = !1, d = null, u = !1;
        do {
            try {
                a = t[n]
            } catch (e) {
                l = !0
            }
            if (l) try {
                a = 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 a ? d.type = "method" : ((o.set || o.writable) && (d.writable = !0), d.type = "get"), u ? (d.configurable = !0, d.value = m(e, a, r, !1, null)) : d.value = m(e, a, r, !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(a.propertiesOfFunction, e)
        }));
        let r = [];
        do {
            if (0 === o.length) break;
            let a = o.length;
            for (let s = 0; s < a; s++) {
                let a = f(e, t, i, o[s], 0, n);
                a && r.push(a)
            }
        } while (0);
        return r
    }

    function g(e, t, i, n = null) {
        let o = null, r = Object.getPrototypeOf(t);
        return o = null === r || r === Object.prototype || r === Function.prototype ? null : m(e, r, n, !1, i)
    }

    function m(e, t, i = null, n = !1, o = null) {
        i = null === i ? {} : i;
        const r = {type: typeof t};
        "object" === r.type && (r.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" === r.type || "function" === r.type) {
                let n = h.getIdOfObject(t);
                if (n && i[n]) {
                    r.refId = n, h.add(e, t);
                    break
                }
            }
            "array" === r.type ? r.members = t.map(t => m(e, t, i)) : "object" === r.type || "function" === r.type ? (null == o && (r.extendedMemberNames = [], o = {
                value: t,
                meta: r
            }), r.name = t.constructor ? t.constructor.name : "", r.id = h.add(e, t), i[r.id] = !0, r.members = p(e, t, o, i), r.proto = g(e, t, o, i)) : "buffer" === r.type ? r.value = Buffer.from(t) : "promise" === r.type ? (t.then(function () {
            }, function () {
            }), r.then = m(e, function (e, i) {
                t.then(e, i)
            })) : "error" === r.type ? (r.members = v(t), r.members.push({
                name: "name",
                value: t.name
            })) : "date" === r.type ? r.value = t.getTime() : (r.type = "value", r.value = t)
        } while (0);
        return r
    }

    function v(e) {
        return Object.getOwnPropertyNames(e).map(t => ({name: t, value: e[t]}))
    }

    function y(e, t, i, o) {
        const a = 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: a(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] = a(l.value);
                    return e
                }
                case"function": {
                    const a = 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() || a !== 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(r.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(a)
    }

    function w(e, t, i, n) {
        let o, r;
        try {
            return t.apply(i, n)
        } catch (e) {
            return r = t.name, new Error(`Could not call remote function '${o = null != r ? r : "anonymous"}'. Check that the function signature is correct. Underlying error: ${e.message}`)
        }
    }

    function k(e) {
        return {type: "exception", message: e.message, stack: e.stack || e}
    }

    function T(e) {
        const t = new Error(e);
        throw Object.defineProperty(t, "code", {value: "EBADRPC"}), Object.defineProperty(t, "errno", {value: -72}), t
    }

    var b;
    !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(r.default.browser.require, (e, i, n, o) => {
                s.info(`[REQUIRE] module=${o} `);
                let a = process.mainModule.require(o), l = m(e.sender, a);
                t(e, r.default.renderer.requireReturn, n, l)
            }), d.on(r.default.browser.builtIn, (e, i, o, a) => {
                s.info(`[BUILTIN]: property=${a} contextId=${i}`);
                let l = n[a], d = m(e.sender, l);
                s.info(`[BUILTIN]: returns remoteId:${d.id}, type: ${typeof l}`), t(e, r.default.renderer.getBuiltInReturn, o, d)
            }), d.on(r.default.browser.global, (e, i, n, o) => {
                s.info(`[GLOBAL]: proerty:${o} contextId=${i}`);
                let a, l = global[o];
                a = m(e.sender, l), s.info(`[GLOBAL]: returns remoteid=${a.id}, obj=` + typeof l), t(e, r.default.renderer.getGlobalReturn, n, a)
            }), d.on(r.default.browser.currentWindow, (e, i, n, o) => {
                s.info(`[CURRENT_WINDOW]: property=${o} contextId=${i}`);
                let a = e.sender.getOwnerBrowserWindow.call(e.sender), l = m(e.sender, a);
                s.info(`[CURRENT_WINDOW]: returns remoteid=${l.id}, obj=` + a), t(e, r.default.renderer.currentWindowReturn, n, l)
            }), d.on(r.default.browser.currentWebContents, (e, i, n, o) => {
                t(e, r.default.renderer.currentWebContentsReturn, n, m(e.sender, e.sender))
            }), d.on(r.default.browser.webContents, (e, i, o, a) => {
                s.info(`[WebContents]: proerty:${a} contextId=${i}`);
                let l, d = n.webContents;
                l = m(e.sender, d), s.info(`[WebContents]: returns remoteid=${l.id}, obj=` + typeof d), t(e, r.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(r.default.browser.construct, (i, n, o, a, l) => {
                let d, u = null;
                try {
                    s.info(`[CONSTRUCTOR]: remoteId=${a} `);
                    let c = l.length > 0 ? l[l.length - 1] : null;
                    l = y(i.sender, i.frameId, n, l);
                    let f = h.get(a);
                    null == f && T(`Cannot call constructor on missing remote object ${a}`), 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 = k(e)
                } finally {
                    t(i, r.default.renderer.constructReturn, o, d)
                }
            }), d.on(r.default.browser.functionCall, function (e, i, n, o, a, l) {
                let d;
                try {
                    s.info(`[FUNCTION_CALL]: remoteId=${a}`), l = y(e.sender, e.frameId, i, l);
                    let u = h.get(a);
                    if (null == u) s.error(`Cannot call function on missing remote object ${a}`), d = m(e.sender, void 0); else {
                        let t = o ? h.get(o) : global;
                        if (t) {
                            let i = w(0, u, t, l);
                            d = m(e.sender, i)
                        } else s.error(`Cannot call function(${a}) on missing context(${o})`), d = m(e.sender, void 0)
                    }
                    s.info(`[FUNCTION_CALL]: name=${u.name}`)
                } catch (e) {
                    d = k(e)
                } finally {
                    t(e, r.default.renderer.functionCallReturn, n, d)
                }
            }), d.on(r.default.browser.memberCall, function (e, i, n, o, a, l, d) {
                let u;
                s.info(`[MEMBER_CALL]: thisArg=${o}, remoteId=${a}, method=${l}, args count=${d.length}`);
                try {
                    d = y(e.sender, e.frameId, i, d);
                    let c = h.get(a);
                    null == c && T(`Cannot call function '${l}' on missing remote object ${a}`);
                    let f = o ? h.get(o) : c;
                    if (f) {
                        let t = w(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 = k(e)
                } finally {
                    t(e, r.default.renderer.memberCallReturn, n, u)
                }
            }), d.on(r.default.browser.memberGet, function (e, i, n, o, a) {
                let l;
                try {
                    s.info(`[MEMBER_GET]: remoteId=${o}, property=`, a);
                    let i = h.get(o);
                    null == i && T(`Cannot get property '${Object.toString.call(a)}' on missing remote object ${o}`);
                    let d = i[a];
                    l = m(e.sender, d)
                } catch (e) {
                    l = k(e)
                } finally {
                    t(e, r.default.renderer.memberGetReturn, n, l)
                }
            }), d.on(r.default.browser.memberSet, function (e, i, n, o, a, l) {
                try {
                    s.info(`[MEMBER_SET]: remoteId=${o}, property=` + a), l = y(e.sender, e.frameId, i, l);
                    let d = h.get(o);
                    null == d && T(`Cannot set property '${Object.toString.call(a)}' on missing remote object ${o}`), d[a] = l[0], t(e, r.default.renderer.memberSetReturn, n, {
                        type: "value",
                        value: !0
                    })
                } catch (i) {
                    t(e, r.default.renderer.memberSetReturn, n, k(i))
                }
            }), d.on(r.default.browser.memberConstruct, function (i, n, o, a, l, d) {
                let u, c = null;
                try {
                    s.info(`[MEMBER_CONSTRUCTOR]: regId=${a}, method=${l}`);
                    let f = d.length > 0 ? d[d.length - 1] : null;
                    d = y(i.sender, i.frameId, n, d);
                    let p = h.get(a);
                    null == p && T(`Cannot call constructor '${l}' on missing remote object ${a}`), 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 = k(e)
                } finally {
                    t(i, r.default.renderer.memberConstructReturn, o, u)
                }
            }), d.on(r.default.browser.sync, function (e, i, n, o) {
                let a = h.get(o);
                t(e, r.default.renderer.syncReturn, n, m(e.sender, a))
            }), 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(r.default.browser.contextRelease, e => {
                h.clear(e.sender.id)
            })
        }, e.getObjectRegistry = function () {
            return h
        }
    }(b || (b = {})), e.exports = b
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(95), o = -1 * Math.pow(2, 31), r = 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 r.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 = r.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}), r.setHiddenValue(e, "__remote_id__", t)
            }
            return t
        }

        dereference(e) {
            let t = this.storage.get(e);
            null != t && (t.count -= 1, 0 === t.count && (r.deleteHiddenValue(t.object, "__remote_id__"), this.storage.delete(e)))
        }

        registerDeleteListener(e, t) {
            const i = e.getProcessId(), o = (r, a) => {
                a === 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(591), o = i(592), r = i(97);
    i(593);
    const a = i(594);
    i(595), i(973);
    const s = i(596), l = i(597), d = i(598);
    r.default.directive("visibility", n.default), r.default.directive("opacity", o.default), r.default.use(a.default), r.default.use(l), r.default.use(d.default), r.default.use(s.default, {
        preLoad: 1.3,
        error: i(599),
        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(66)(216)
}, function (e, t, i) {
    e.exports = i(66)(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())
                }, r = function () {
                    try {
                        i.documentElement.doScroll("left")
                    } catch (e) {
                        return void setTimeout(r, 50)
                    }
                    o()
                };
                r(), 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")
    }, r = 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
        }
    }(), a = 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, r = 0; ++r < o;) for (var a = Object(arguments[r]), s = Object.getOwnPropertySymbols(a), l = 0; l < s.length; l++) {
            var d = s[l];
            i.call(a, d) && (n[d] = a[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];
            a(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 w(e, t) {
        if (e.length) {
            var i = e.indexOf(t);
            return i > -1 ? e.splice(i, 1) : void 0
        }
    }

    function k(e, t) {
        if ("IMG" === e.tagName && e.getAttribute("data-srcset")) {
            var i = e.getAttribute("data-srcset"), n = [], o = e.parentNode.offsetWidth * t, r = void 0, a = void 0,
                s = void 0;
            (i = i.trim().split(",")).map(function (e) {
                e = e.trim(), -1 === (r = e.lastIndexOf(" ")) ? (a = e, s = 999998) : (a = e.substr(0, r), s = parseInt(e.substr(r + 1, e.length - r - 2), 10)), n.push([s, a])
            }), 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 T(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 b = function () {
        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1;
        return g && window.devicePixelRatio || e
    };
    var C = 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
        }
    }(), S = {
        on: function (e, t, i) {
            var n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
            C ? 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)
        }
    }, I = 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]
    }, A = function (e) {
        return _(e, "overflow") + _(e, "overflow-y") + _(e, "overflow-x")
    };

    function D() {
    }

    var x = function () {
            function e(t) {
                var i = t.max;
                o(this, e), this.options = {max: i || 100}, this._caches = []
            }

            return r(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
        }(), N = function () {
            function e(t) {
                var i = t.el, n = t.src, r = t.error, a = 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 = r, this.loading = a, 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 r(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, I({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] : D;
                    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"), I({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",
        P = ["scroll", "wheel", "mousewheel", "resize", "animationend", "transitionend", "touchmove"],
        O = {rootMargin: "0px", threshold: 0}, M = function (e) {
            return function () {
                function t(e) {
                    var i, n, r, a, 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, w = e.listenEvents,
                        k = (e.hasbind, e.filter), T = e.adapter, C = e.observer, S = 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 || b(y),
                        ListenEvents: w || P,
                        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: k || {},
                        adapter: T || {},
                        observer: !!C,
                        observerOptions: S || O
                    }, this._initEvent(), this._imageCache = new x({max: 200}), this.lazyLoadHandler = (i = this._lazyLoadHandler.bind(this), n = this.options.throttleWait, r = null, a = 0, function () {
                        if (!r) {
                            var e = this, t = arguments, o = function () {
                                a = Date.now(), r = !1, i.apply(e, t)
                            };
                            Date.now() - a >= n ? o() : r = setTimeout(o, n)
                        }
                    }), this.setMode(this.options.observer ? v.observer : v.event)
                }

                return r(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 r = this._valueFormatter(i.value), a = r.src, s = r.loading, l = r.error;
                        e.nextTick(function () {
                            a = k(t, o.options.scale) || a, o._observer && o._observer.observe(t);
                            var r = Object.keys(i.modifiers)[0], d = void 0;
                            r && (d = (d = n.context.$refs[r]) ? d.$el || d : document.getElementById(r)), 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(A(t))) return t;
                                        t = t.parentNode
                                    }
                                    return window
                                }
                            }(t));
                            var u = new N({
                                bindType: i.arg,
                                $parent: d,
                                el: t,
                                loading: s,
                                error: l,
                                src: a,
                                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, r = this._valueFormatter(i.value), a = r.src, s = r.loading, l = r.error;
                        a = k(t, this.options.scale) || a;
                        var d = T(this.ListenerQueue, function (e) {
                            return e.el === t
                        });
                        d ? d.update({
                            src: a,
                            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 = T(this.ListenerQueue, function (t) {
                                return t.el === e
                            });
                            t && (this._removeListenerTarget(t.$parent), this._removeListenerTarget(window), w(this.ListenerQueue, t), t.$destroy())
                        }
                    }
                }, {
                    key: "removeComponent", value: function (e) {
                        e && (w(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 = T(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 S[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) w(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) {
                            w(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, r = void 0;
                            switch (t) {
                                case"loading":
                                    r = e.loading;
                                    break;
                                case"error":
                                    r = e.error;
                                    break;
                                default:
                                    r = e.src
                            }
                            if (o ? n.style[o] = 'url("' + r + '")' : n.getAttribute("src") !== r && n.setAttribute("src", r), n.setAttribute("lazy", t), this.$emit(t, e, i), this.options.adapter[t] && this.options.adapter[t](e, this.options), this.options.dispatchEvent) {
                                var a = new y(t, {detail: e});
                                n.dispatchEvent(a)
                            }
                        }
                    }
                }, {
                    key: "_valueFormatter", value: function (e) {
                        var t, i = e, o = this.options.loading, r = 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, r = e.error || this.options.error), {
                            src: i,
                            loading: o,
                            error: r
                        }
                    }
                }]), t
            }()
        }, F = function () {
            function e(t) {
                var i = t.lazy;
                o(this, e), this.lazy = i, i.lazyContainerMananger = this, this._queue = []
            }

            return r(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 = T(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 = T(this._queue, function (t) {
                        return t.el === e
                    });
                    n && (n.clear(), w(this._queue, n))
                }
            }]), e
        }(), L = {selector: "img"}, R = function () {
            function e(t) {
                var i = t.el, n = t.binding, r = t.vnode, a = t.lazy;
                o(this, e), this.el = null, this.vnode = r, this.binding = n, this.options = {}, this.lazy = a, this._queue = [], this.update({
                    el: i,
                    binding: n
                })
            }

            return r(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}), r = "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] : D;
                            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;
                            I({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
                            })
                        }
                    }
                })), r ? (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,
                        r = t.left + t.width + this.padding, a = 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 && a + e.height <= window.innerHeight ? (n = a, 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"}) : a + 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 = a, 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 && r + e.width <= window.innerWidth ? (i = r, 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"}) : r + 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 = r, 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, r = Array(o), a = 0; a < o; a++) r[a] = arguments[a];
                var s = +new Date;
                s - n > t && (e.apply(i, r), 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 r, a = e = e || {}, s = typeof e.default;
            "object" !== s && "function" !== s || (r = e, a = e.default);
            var l, d = "function" == typeof a ? a.options : a;
            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: r, exports: a, 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 r = {
                install: function (e, t) {
                    e.use(n.a), e.prototype.$vipInfo = function (e) {
                        return i.i(o.a)(e)
                    }
                }
            };
            t.default = r
        }, 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 r, a = e = e || {}, s = typeof e.default;
                "object" !== s && "function" !== s || (r = e, a = e.default);
                var l, d = "function" == typeof a ? a.options : a;
                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: r, exports: a, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(5), s = i(8), l = i(3), d = i(31), u = i(602), c = i(604), h = i(606), f = i(607),
        p = i(98), g = i(16), m = i(42), v = i(25), y = i(496), w = i(48), k = i(7), T = i(39), b = i(55), C = i(33),
        S = r.default.getLogger("DownloadKernel.Task"), I = g.DownloadKernelEventManager.getEventManager(),
        _ = v.DownloadKernelCategoryManager.getCategoryManager(),
        A = k.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    var D;
    !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"
    }(D || (D = {}));
    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.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 w.SingleBtTaskNS.isSingleBtTask(this)) && this.taskType !== l.DownloadKernel.TaskType.Group) {
                            let i = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath), n = o.join(i, t),
                                r = o.join(i, e), a = yield s.FileSystemAWNS.existsAW(n);
                            a && (r = m.Common.getMaxFilePath(r), yield s.FileSystemAWNS.renameAW(n, r), (a = yield s.FileSystemAWNS.existsAW(r)) && (e = o.basename(r)))
                        }
                        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 = T.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), r = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName);
                        1 === n.getTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSubTask) && (i = T.TaskUtilHelper.isVideoFileExt(r)) && 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 (S.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 (S.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 (S.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* () {
                S.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() {
            S.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) {
            S.information("stop reason", e);
            let t = C.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* () {
                S.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), a.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, r) {
            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), a.isNumber(r) && this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryId, r);
                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), a.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), a.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), a.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)
                }
                I.fireTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileLoaded, this.taskId, []), I.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)
                    }
                    I.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, r = 0, a = 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 || (r = 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);
                a = 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);
                a = e.downloadSize - t, S.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 ? S.information("use old valid size. ", e, this.getId()) : (this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ValidDownloadSize, 0), S.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 !== D.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, a, r) && (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 = this.updateTaskStatus(l.DownloadKernel.TaskStatus.Stopped);
            return this.virtualTaskId > 0 && (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]), I.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) {
            S.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) {
            S.information("addServer fileIndex:", e, "serverResourceInfo:", t);
            let i = this.serverResourceInfos.get(e);
            i ? (S.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() {
            S.information("beginBatchSetTaskAttribute taskId:", this.taskId), this.batchSetTaskAttribute = !0
        }

        commitBatchSetTaskAttribute() {
            if (this.batchSetTaskAttribute && (this.batchSetTaskAttribute = !1, S.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* () {
                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),
                            r = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName);
                        e = yield new Promise(e => {
                            this.virtualTaskId = d.ThunderKernel.createP2spTask(t, i, n, o, r, t => {
                                S.information("createP2spTask result:", t), e(t)
                            }), this.virtualTaskId <= 0 && e(-1)
                        }), S.information("createP2spTask virtualTaskId:", this.virtualTaskId, ", ret:", e, ", url:", t, ", refUrl: ", i, ", cookie:", n, ", savePath:", o, ", fileName:", r)
                    }
                        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 w.SingleBtTaskNS.isSingleBtTask(this)) || 1 === t.getFileCount() && (yield w.SingleBtTaskNS.getCorrectSingleBtFolder(this)) || (i = o.join(i, n)), t.isBtFileLoadEnd() || (yield this.loadStorageBtTaskAW(this.getTaskBaseInfo()));
                        let r = t.getSeedFilePath();
                        if (!(yield s.FileSystemAWNS.existsAW(r))) {
                            this.attribute.set(l.DownloadKernel.TaskAttribute.ErrorCode, l.DownloadKernel.TaskError.torrentFileNotExist);
                            break
                        }
                        let a = t.getDownloadFile();
                        e = yield new Promise(e => {
                            this.virtualTaskId = d.ThunderKernel.createBtTask(r, i, a, t => {
                                S.information("createP2spTask result:", t), e(t)
                            }), this.virtualTaskId <= 0 && e(-1)
                        }), S.information("createBtTask virtualTaskId:", this.virtualTaskId, ", ret:", e, ", torrentFilePath:", r, ", savePath: ", i, ", downloadIndexs:", a)
                    }
                        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);
                        e = yield new Promise(e => {
                            this.virtualTaskId = d.ThunderKernel.createEmuleTask(t, i, n, t => {
                                S.information("createP2spTask result:", t), e(t)
                            }), this.virtualTaskId <= 0 && e(-1)
                        }), S.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);
                        e = yield new Promise(e => {
                            this.virtualTaskId = d.ThunderKernel.createMagnetTask(t, i, t => {
                                S.information("createP2spTask result:", t), e(t)
                            }), this.virtualTaskId <= 0 && e(-1)
                        }), S.information("createMagnetTask virtualTaskId:", this.virtualTaskId, ", ret:", e, ", url:", t, ", savePath: ", i)
                    }
                }
                return S.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 S.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, r = e.dcdnStatus;
            if (this.channelInfo.dcdnStatus !== r && (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,
                    r = this.historyChannelInfo.dcdnSize + e.dcdnSize;
                this.historyChannelInfo = {originSize: t, p2pSize: i, p2sSize: n, offlineSize: o, dcdnSize: r}
            } 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 !== A.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 C.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),
                    r = o.join(__profilesDir, "Torrents"), a = this.getExtraObject().getInfoId(), d = a + ".xlbt.cfg",
                    u = a + ".xlbt.dat", c = a + ".torrent", h = o.join(t, i), f = o.join(r, d), p = o.join(r, u),
                    g = !0;
                if (yield w.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 r = i.getBtFileList(), a = void 0, d = void 0;
                    for (let [, e]of r) {
                        a = e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FilePath), d = e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileName);
                        break
                    }
                    if (!a || !d) break;
                    let u = o.join(t, a);
                    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(a, 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), r = o.join(i, n), a = [r];
                    for (let i = 0; i < t.length; ++i) {
                        let n = t[i], l = o.join(r, 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 > r.length && !a.includes(l);) a = a.concat([l]), l = o.parse(l).dir
                    }
                    a.sort((e, t) => e.length > t.length ? -1 : e.length < t.length ? 1 : 0), S.information("task.deleteBtSubFile savePaths:", a);
                    for (let e = 0; e < a.length; ++e) {
                        let t = a[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 = w.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", r = o.join(i, n);
                yield this.shareDeleteFile(r)
            })
        }

        fireTaskEvent(e, ...t) {
            I.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 = T.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 = T.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 = T.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(b.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 D.None:
                case D.Create:
                case D.StartPending:
                    break;
                case D.Downloading:
                case D.StopPending:
                case D.CompletePending:
                case D.ErrorStopPending:
                    t = l.DownloadKernel.TaskStatus.Started;
                    break;
                case D.Pause:
                    t = l.DownloadKernel.TaskStatus.Stopped;
                    break;
                case D.Complete:
                    t = l.DownloadKernel.TaskStatus.Succeeded;
                    break;
                case D.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(3), o = i(31), r = i(98), a = i(122), 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, r.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 a.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 r 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 = r;

        class a 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 = a;

        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 a = !1;
                if (n.isNumber(i)) {
                    let n = null, r = this.value.get(e);
                    r && r.getType() === t.Integer ? n = r : (n = new o, this.value.set(e, n)), n.setValue(i), a = !0
                } else if (n.isString(i)) {
                    let n = null, o = this.value.get(e);
                    o && o.getType() === t.String ? n = o : (n = new r, this.value.set(e, n)), n.setValue(i), a = !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);
                    a = !0
                }
                return a
            }

            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 r, a = 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)), a = t
                    } else if ("d" === e[i]) {
                        let t = new s;
                        d = t.decode(e.substr(i)), a = t
                    } else {
                        let t = new r;
                        d = t.decode(e.substr(i)), a = t
                    }
                    if (!(d >= 0)) return -1;
                    i += d, this.value.set(n.getValue(), a)
                }
                return i < t && "e" === e[i] ? i + 1 : -1
            }

            encode(e) {
                e += "d";
                let t = new r;
                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 a : "d" === e[n] ? new s : new r).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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(3), a = i(31), s = i(98), l = i(605), d = i(16), u = i(122), 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(r.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 && a.ThunderKernel.insertBtTask(n, this.infoId, this.tracker, this.seedFile, this.displayName);
                let e = i.fileLists, o = a.ThunderKernel.beginTransaction();
                for (let i = 0; i < e.length; ++i) {
                    let n = e[i], o = n.realIndex, r = 0;
                    this.downloadIndexLists.indexOf(o) > -1 && (r = 1);
                    let a = new l.BtFile(this);
                    a.saveBtFileInfo(t, r, n), this.fileLists.set(o, a)
                }
                a.ThunderKernel.commitTransaction(o)
            }
            let o = this.task.getTaskAttribute(r.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) a.ThunderKernel.setTaskPriorityLevel(i, this.downloadIndexLists[e], t); else 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)
        }

        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(r.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(r.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, a = this.fileLists.get(o), s = this.getFileStatus(i.fileStatus),
                        l = i.errorCode;
                    0 !== l && (s = l > 700 ? r.DownloadKernel.BtFileStatus.Forbidden : r.DownloadKernel.BtFileStatus.Error, a && n.push(o)), i.fileStatus = s, a && a.updateFileInfo(i)
                }
                if (n.length > 0) {
                    let e = this.getDownloadFile();
                    for (let o = 0; o < n.length; ++o) for (let a = 0; a < e.length; ++a) if (e[a] === n[o]) {
                        this.subError || (this.subError = !0, i = !0);
                        let e = n[o], a = this.fileLists.get(e);
                        a && a.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.ErrorCode) > 700 && (t = !0);
                        break
                    }
                }
                let o = this.task.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
                if (p.fireTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileDetailChanged, o, e), i) {
                    let e = "Error";
                    t && (e = "Forbidden"), p.fireTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileForbidden, o, e)
                }
            }
        }

        deleteStorageBtFile() {
            let e = this.task.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
            a.ThunderKernel.deleteStorageTask(e, s.StatementType.DestroyBtFile)
        }

        loadBtTask(e) {
            let t = this.task.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
            a.ThunderKernel.loadStorageTask(t, s.StatementType.LoadBtTask, i => {
                i ? (this.infoId = i.infoId, this.tracker = i.tracker, this.seedFile = i.seedFile, this.displayName = i.displayName, a.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(r.DownloadKernel.TaskAttribute.TaskId);
                        a.ThunderKernel.saveBtTaskSeedFile(e, i)
                    }
                }
            })
        }

        isBtFileLoadEnd() {
            return this.loadSubFileEnd
        }

        getFileStatus(e) {
            let t = r.DownloadKernel.BtFileStatus.Stopped;
            switch (e) {
                case 0:
                    break;
                case 1:
                    t = r.DownloadKernel.BtFileStatus.Stopped;
                    break;
                case 2:
                    t = r.DownloadKernel.BtFileStatus.Started;
                    break;
                case 3:
                    t = r.DownloadKernel.BtFileStatus.Complete
            }
            return t
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(3), o = i(31), r = i(16), a = i(39), s = r.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 r = this.attribute.get(n.DownloadKernel.BtFileAttribute.DcdnStatus);
            if (r !== 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, r)
            }
        }

        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 = a.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, r = this.attribute.get(n.DownloadKernel.BtFileAttribute.Cid),
                a = this.attribute.get(n.DownloadKernel.BtFileAttribute.Gcid);
            r && "" !== r || ("0000000000000000000000000000000000000000" === e ? this.setAttribute(n.DownloadKernel.BtFileAttribute.Cid, "") : this.setAttribute(n.DownloadKernel.BtFileAttribute.Cid, e), r = e, i = !0), a && "" !== a || ("0000000000000000000000000000000000000000" === t ? this.setAttribute(n.DownloadKernel.BtFileAttribute.Gcid, "") : this.setAttribute(n.DownloadKernel.BtFileAttribute.Gcid, t), a = t, i = !0), i && o.ThunderKernel.saveBtFileCid(this.taskId, this.realIndex, r, a)
        }

        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(3), r = i(31), a = i(98), s = i(122), 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 = r.ThunderKernel.getFileHashByUrl(t), r.ThunderKernel.insertEmuleTask(e, this.fileHash, this.configPath)
            } else r.ThunderKernel.loadStorageTask(this.taskId, a.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) && 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)
        }

        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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(8), a = i(3), s = i(31), l = i(98), d = i(16), u = i(122), 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(a.DownloadKernel.TaskAttribute.TaskId), t ? s.ThunderKernel.insertGroupTask(this.taskId, this.moveTimeout, this.downloadingSubCount, this.subTaskOrder) : (this.downloadingPeriod = e.getTaskAttribute(a.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(a.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(a.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                        let t = i.getTaskAttribute(a.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(a.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 r = this.subTasks[o];
                    if (!r) continue;
                    if (0 === r.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSubTask)) {
                        n++;
                        continue
                    }
                    let s = r.getTaskStatus();
                    if (s !== a.DownloadKernel.TaskStatus.Succeeded && s !== a.DownloadKernel.TaskStatus.Seeding) if (s !== a.DownloadKernel.TaskStatus.Failed) {
                        if ((yield r.start(e)) && (t = !0, ++i >= this.startTaskCount)) break
                    } else (yield r.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 !== a.DownloadKernel.TaskStatus.Succeeded && o !== a.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(a.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(a.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 r.FileSystemAWNS.existsAW(i)) && (e = (yield r.FileSystemAWNS.rmdirAW(i)) && e)
                }
                const {TaskUserDataGUID: s} = yield Promise.resolve().then(() => i(55));
                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 && r.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, r = 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 === a.DownloadKernel.TaskStatus.Stopped || p === a.DownloadKernel.TaskStatus.Succeeded || p === a.DownloadKernel.TaskStatus.Seeding || p === a.DownloadKernel.TaskStatus.Failed) continue;
                let g = f.getTaskAttribute(a.DownloadKernel.TaskAttribute.VirtualId);
                g < 1 || (r++, 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 (r === 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(a.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, e)
                    }
                })))
            }
            return 0 === r && (this.subTasks.length > 0 && e(this.subTasks[0]), this.updateTaskDetail(), this.updateTaskStatus(), i()), o
        }

        getErrorCodes() {
            let e = [];
            do {
                if (this.task.getTaskStatus() !== a.DownloadKernel.TaskStatus.Failed) break;
                for (let t = 0; t < this.subTasks.length; ++t) {
                    let i = this.subTasks[t];
                    if (0 !== i.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSubTask) && i.getTaskStatus() === a.DownloadKernel.TaskStatus.Failed) {
                        let t = i.getTaskAttribute(a.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, r = 0, s = 0, l = this.task.getTaskStatus();
            if (l === a.DownloadKernel.TaskStatus.StartWaiting || l === a.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(a.DownloadKernel.TaskAttribute.DownloadSubTask)) {
                        d++;
                        continue
                    }
                    switch (u.getTaskStatus()) {
                        case a.DownloadKernel.TaskStatus.Unkown:
                            e++;
                            break;
                        case a.DownloadKernel.TaskStatus.Started:
                            i++, c = !0;
                            break;
                        case a.DownloadKernel.TaskStatus.StartPending:
                            n++;
                            break;
                        case a.DownloadKernel.TaskStatus.Stopped:
                            t++;
                            break;
                        case a.DownloadKernel.TaskStatus.StopPending:
                            o++;
                            break;
                        case a.DownloadKernel.TaskStatus.Succeeded:
                            r++;
                            break;
                        case a.DownloadKernel.TaskStatus.Failed:
                            s++;
                            break;
                        case a.DownloadKernel.TaskStatus.Seeding:
                            r++
                    }
                }
                if (c) break
            }
            let u = !1;
            l !== a.DownloadKernel.TaskStatus.StopPending && (i > 0 ? (l = a.DownloadKernel.TaskStatus.Started, u = !0) : n > 0 && l !== a.DownloadKernel.TaskStatus.Started && (l = a.DownloadKernel.TaskStatus.StartPending, u = !0));
            let c = this.subTasks.length - d;
            return u || (o > 0 ? l = a.DownloadKernel.TaskStatus.StopPending : e === c ? l = a.DownloadKernel.TaskStatus.Unkown : r === c ? l = a.DownloadKernel.TaskStatus.Succeeded : s === c ? l = a.DownloadKernel.TaskStatus.Failed : s + r === c ? l = a.DownloadKernel.TaskStatus.Succeeded : t > 0 && l !== a.DownloadKernel.TaskStatus.Started && (l = a.DownloadKernel.TaskStatus.Stopped)), l
        }

        setDownloadTask(e) {
            let t = 0, i = [];
            for (let n = 0; n < this.subTasks.length; ++n) {
                let o = this.subTasks[n], r = !1, s = !1;
                for (let i = 0; i < e.length; ++i) if (n === e[i]) {
                    s = o.updateDownloadSubTask(1), r = !0;
                    let e = o.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSize);
                    e && e > 0 && (t += e);
                    break
                }
                r || (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(a.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(a.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                    let t = i.getDownloadSpeed(), n = i.getVipSpeed(),
                        o = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileSize),
                        r = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSize),
                        s = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.ReceivedSize),
                        l = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.SrcUsing),
                        d = i.getTaskAttribute(a.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), r && (e.downloadSize += r), s && (e.receivedSize += s), l && (e.usingResCount += l), d && (e.totalResCount += d)
                }
            }
            if (e.downloadSize) {
                let t = this.task.getTaskAttribute(a.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 !== a.DownloadKernel.TaskStatus.Stopped && e !== a.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(a.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                    let o = n.getTaskStatus();
                    o !== a.DownloadKernel.TaskStatus.Started && o !== a.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(a.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                    let n = t.getTaskStatus();
                    if (n !== a.DownloadKernel.TaskStatus.Succeeded && n !== a.DownloadKernel.TaskStatus.Seeding && n !== a.DownloadKernel.TaskStatus.Failed && (yield t.start()) && ++e >= this.startTaskCount) break
                }
            })
        }

        updateTaskDetail() {
            let e = a.DownloadKernel.TaskDetailChangedFlags.UnKnown, t = this.getTaskSizeInfo();
            if (t.downloadSpeed > 0) if (0 === this.startTime) this.startTime = (new Date).getTime(), this.downloadingPeriod = this.task.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadingPeriod); else {
                let t = ((new Date).getTime() - this.startTime) / 1e3, i = this.downloadingPeriod + Math.round(t);
                this.task.internalSetDownloadingPeriod(i) && (e |= a.DownloadKernel.TaskDetailChangedFlags.DownloadingPeriod)
            } else this.startTime = 0;
            this.task.internalSetTaskSpeed(t.downloadSpeed, t.vipSpeed) && (e |= a.DownloadKernel.TaskDetailChangedFlags.TaskSpeed), this.task.internalSetFileSize(t.fileSize) && (e |= a.DownloadKernel.TaskDetailChangedFlags.FileSize), this.task.internalSetDownloadSize(t.downloadSize) && (e |= a.DownloadKernel.TaskDetailChangedFlags.DownloadSize), this.task.internalSetReceivedSize(t.receivedSize) && (e |= a.DownloadKernel.TaskDetailChangedFlags.ReceivedSize), this.task.internalSetSrcUsing(t.usingResCount) && (e |= a.DownloadKernel.TaskDetailChangedFlags.SrcUsing), this.task.internalSetSrcTotal(t.totalResCount) && (e |= a.DownloadKernel.TaskDetailChangedFlags.SrcTotal), this.task.internalSetTaskChannelInfo(t.channelInfo) && (e |= a.DownloadKernel.TaskDetailChangedFlags.ChannelInfo), h.fireTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, [this.task], e)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(3), r = i(373), a = i(495), s = n.default.getLogger("DownloadKernel.PrivateCategory");

    class l extends a.Category {
        constructor(e) {
            super(e);
            let t = new r.CategoryView(e, o.DownloadKernel.CategroyViewID.Downloading),
                i = new r.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(50), o = i(497), r = i(611), a = i(374);

    function s(e) {
        var t = new r(e), i = o(r.prototype.request, t);
        return n.extend(i, r.prototype, t), n.extend(i, t), i
    }

    var l = s(a);
    l.Axios = r, l.create = function (e) {
        return s(n.merge(a, e))
    }, l.Cancel = i(504), l.CancelToken = i(627), l.isCancel = i(503), l.all = function (e) {
        return Promise.all(e)
    }, l.spread = i(628), 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(374), o = i(50), r = i(622), a = i(623);

    function s(e) {
        this.defaults = e, this.interceptors = {request: new r, response: new r}
    }

    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 = [a, 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(50);
    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(50), o = i(498), r = i(500), a = i(614), s = i(615), l = i(375),
        d = "undefined" != typeof window && window.btoa && window.btoa.bind(window) || i(616);
    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(), r(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 ? a(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(617),
                    w = (e.withCredentials || s(e.url)) && e.xsrfCookieName ? y.read(e.xsrfCookieName) : void 0;
                w && (h[e.xsrfHeaderName] = w)
            }
            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(50),
        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, r, a = {};
        return e ? (n.forEach(e.split("\n"), function (e) {
            if (r = e.indexOf(":"), t = n.trim(e.substr(0, r)).toLowerCase(), i = n.trim(e.substr(r + 1)), t) {
                if (a[t] && o.indexOf(t) >= 0) return;
                a[t] = "set-cookie" === t ? (a[t] ? a[t] : []).concat([i]) : a[t] ? a[t] + ", " + i : i
            }
        }), a) : a
    }
}, function (e, t, i) {
    "use strict";
    var n = i(50);
    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, r = String(e), a = "", s = 0, l = n; r.charAt(0 | s) || (l = "=", s % 1); a += l.charAt(63 & t >> 8 - s % 1 * 8)) {
            if ((i = r.charCodeAt(s += .75)) > 255) throw new o;
            t = t << 8 | i
        }
        return a
    }
}, function (e, t, i) {
    "use strict";
    var n = i(50);
    e.exports = n.isStandardBrowserEnv() ? {
        write: function (e, t, i, o, r, a) {
            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(r) && s.push("domain=" + r), !0 === a && 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(619)).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, r = 0;
        e[0].replace(/%[a-zA-Z%]/g, function (e) {
            "%%" !== e && "%c" === e && (r = ++o)
        }), e.splice(r, 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, r = o - (i || o);
                e.diff = r, e.prev = i, e.curr = o, i = o;
                for (var a = new Array(arguments.length), s = 0; s < a.length; s++) a[s] = arguments[s];
                a[0] = t.coerce(a[0]), "string" != typeof a[0] && a.unshift("%O");
                var l = 0;
                a[0] = a[0].replace(/%([a-zA-Z%])/g, function (i, n) {
                    if ("%%" === i) return i;
                    l++;
                    var o = t.formatters[n];
                    if ("function" == typeof o) {
                        var r = a[l];
                        i = o.call(e, r), a.splice(l, 1), l--
                    }
                    return i
                }), t.formatArgs.call(e, a), (n.log || t.log || console.log.bind(console)).apply(e, a)
            }
        }

        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 r = t.instances[i];
            r.enabled = t.enabled(r.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(620), t.instances = [], t.names = [], t.skips = [], t.formatters = {}
}, function (e, t) {
    var i = 1e3, n = 60 * i, o = 60 * n, r = 24 * o, a = 365.25 * r;

    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 * a;
                case"days":
                case"day":
                case"d":
                    return s * r;
                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, r, "day") || s(l, o, "hour") || s(l, n, "minute") || s(l, i, "second") || l + " ms" : function (e) {
            if (e >= r) return Math.round(e / r) + "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:\\thunder11\\11.1.11.1618\\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:\\thunder11\\11.1.11.1618\\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(50);

    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(50), o = i(624), r = i(503), a = i(374), s = i(625), l = i(626);

    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 || a.adapter)(e).then(function (t) {
            return d(e), t.data = o(t.data, t.headers, e.transformResponse), t
        }, function (t) {
            return r(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(50);
    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(504);

    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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(8), r = i(26), a = i(14), s = i(10), l = i(123), 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 r.default.isInitedAw();
                    let e = r.default.getConfigInfo("activity", "enable");
                    if (d.information("getActiveConfig activityEnable:", e), null === e || void 0 === e) break;
                    if (1 !== e) break;
                    let t = r.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(a.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        let t = s.ConfigNS.getValue("Activity", "Date", "");
                        e(t)
                    })
                })
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t, i, n, o, r, a, s, l, d, u, c, h, f, p, g, m, v, y, w;
        !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"
        }(r = 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"
        }(a = 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"
        }(w = e.TaskStopReason || (e.TaskStopReason = {}))
    }(t.DownloadKernel || (t.DownloadKernel = {}))
}, function (e, t, i) {
    (function () {
        "use strict";
        var e, n, o, r, a, s = {}.hasOwnProperty;
        e = i(633), n = i(380).defaults, r = function (e) {
            return "string" == typeof e && (e.indexOf("&") >= 0 || e.indexOf(">") >= 0 || e.indexOf("<") >= 0)
        }, a = 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 && r(t) ? e.raw(a(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 && r(d) ? e.raw(a(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 && r(u) ? e.ele(f).raw(a(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 && r(d) ? e = e.ele(f).raw(a(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, r, a, s, l;
        l = i(75), a = l.assign, s = l.isFunction, t = i(634), n = i(635), r = i(381), o = i(636), e.exports.create = function (e, i, n, o) {
            var r, s;
            if (null == e) throw new Error("Root element needs a name");
            return o = a({}, i, n, o), s = (r = new t(o)).element(e), o.headless || (r.declaration(o), null == o.pubID && null == o.sysID || r.doctype(o)), s
        }, e.exports.begin = function (e, i, o) {
            var r;
            return s(e) && (i = (r = [e, i])[0], o = r[1], e = {}), i ? new n(e, i, o) : new t(e)
        }, e.exports.stringWriter = function (e) {
            return new r(e)
        }, e.exports.streamWriter = function (e, t) {
            return new o(e, t)
        }
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o, r, a = {}.hasOwnProperty;
        r = i(75).isPlainObject, t = i(53), o = i(512), n = i(381), 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) 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
            }(i, t), i.prototype.end = function (e) {
                var t;
                return e ? r(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, r, a, s, l, d, u, c, h, f, p, g, m, v, y, w, k, T = {}.hasOwnProperty;
        k = i(75), y = k.isObject, v = k.isFunction, w = k.isPlainObject, c = i(127), n = i(128), o = i(129), f = i(136), m = i(137), h = i(138), d = i(130), u = i(131), r = i(132), s = i(133), a = i(134), l = i(135), t = i(511), g = i(512), p = i(381), e.exports = function () {
            function e(e, t, i) {
                var n;
                e || (e = {}), e.writer ? w(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) T.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, r, a;
                if (this.openCurrent(), null != e && (e = e.valueOf()), null != t && (t = t.valueOf()), Array.isArray(e)) for (i = 0, r = e.length; i < r; i++) n = e[i], this.instruction(n); else if (y(e)) for (n in e) T.call(e, n) && (o = e[n], this.instruction(n, o)); else v(t) && (t = t.apply()), a = new h(this, e, t), this.onData(this.writer.processingInstruction(a, 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 a(this, e, t), this.onData(this.writer.dtdElement(i, this.currentLevel + 1)), this
            }, e.prototype.attList = function (e, t, i, n, o) {
                var a;
                return this.openCurrent(), a = new r(this, e, t, i, n, o), this.onData(this.writer.dtdAttList(a, 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, r, a, s, l, d, u, c, h, f, p, g = {}.hasOwnProperty;
        l = i(130), d = i(131), t = i(128), n = i(129), u = i(127), h = i(136), f = i(137), c = i(138), o = i(132), r = i(134), a = i(133), s = i(135), p = i(513), 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, r, a, s, u, h;
                for (i = 0, r = (s = e.children).length; i < r; i++) (t = s[i]).isLastRootNode = !1;
                for (e.children[e.children.length - 1].isLastRootNode = !0, h = [], o = 0, a = (u = e.children).length; o < a; 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 r):
                            this.dtdElement(l, i + 1);
                            break;
                        case!(l instanceof a):
                            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, r, a, 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), a = 0, s = (p = e.children).length; a < s; a++) switch (r = p[a], !1) {
                        case!(r instanceof t):
                            this.cdata(r, i + 1);
                            break;
                        case!(r instanceof n):
                            this.comment(r, i + 1);
                            break;
                        case!(r instanceof u):
                            this.element(r, i + 1);
                            break;
                        case!(r instanceof h):
                            this.raw(r, i + 1);
                            break;
                        case!(r instanceof f):
                            this.text(r, i + 1);
                            break;
                        case!(r instanceof c):
                            this.processingInstruction(r, i + 1);
                            break;
                        default:
                            throw new Error("Unknown XML node type: " + r.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, r, a, s, l, d, u = function (e, t) {
            return function () {
                return e.apply(t, arguments)
            }
        }, c = {}.hasOwnProperty;
        l = i(638), o = i(20), e = i(639), s = i(514), d = i(640).setImmediate, n = i(380).defaults, r = function (e) {
            return "object" == typeof e && null != e && 0 === Object.keys(e).length
        }, a = 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, r;
                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) && (r = o[i], this.options[i] = r);
                for (i in e) c.call(e, i) && (r = e[i], this.options[i] = r);
                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 r, s, l, d, u;
                        if ((l = {})[t] = "", !i.options.ignoreAttrs) for (r in u = o.attributes) c.call(u, r) && (e in l || i.options.mergeAttrs || (l[e] = {}), s = i.options.attrValueProcessors ? a(i.options.attrValueProcessors, o.attributes[r], r) : o.attributes[r], d = i.options.attrNameProcessors ? a(i.options.attrNameProcessors, r) : r, i.options.mergeAttrs ? i.assignOrPush(l, d, s) : l[e][d] = s);
                        return l["#name"] = i.options.tagNameProcessors ? a(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 ? a(e.options.valueProcessors, u[t], d) : u[t], 1 === Object.keys(u).length && t in u && !e.EXPLICIT_CHARKEY && (u = u[t])), r(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, r;
                        if (r = n[n.length - 1]) return r[t] += i, e.options.explicitChildren && e.options.preserveChildrenOrder && e.options.charsAsChildren && (e.options.includeWhiteChars || "" !== i.replace(/\\n/g, "").trim()) && (r[e.options.childkey] = r[e.options.childkey] || [], (o = {"#name": "__text__"})[t] = i, e.options.normalize && (o[t] = o[t].replace(/\s{2,}/g, " ").trim()), r[e.options.childkey].push(o)), r
                    }
                }(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, r;
            return null != n ? ("function" == typeof n && (o = n), "object" == typeof i && (r = i)) : ("function" == typeof i && (o = i), r = {}), new t.Parser(r).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 = a, e.createStream = function (e, t) {
            return new a(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 = S.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 N(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 S.BEGIN:
                        if (this.state = S.BEGIN_WHITESPACE, "\ufeff" === o) continue;
                        U(this, o);
                        continue;
                    case S.BEGIN_WHITESPACE:
                        U(this, o);
                        continue;
                    case S.TEXT:
                        if (this.sawRoot && !this.closedRoot) {
                            for (var r = 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(r, i - 1)
                        }
                        "<" !== o || this.sawRoot && this.closedRoot && !this.strict ? (m(o) || this.sawRoot && !this.closedRoot || P(this, "Text data outside of root node."), "&" === o ? this.state = S.TEXT_ENTITY : this.textNode += o) : (this.state = S.OPEN_WAKA, this.startTagPosition = this.position);
                        continue;
                    case S.SCRIPT:
                        "<" === o ? this.state = S.SCRIPT_ENDING : this.script += o;
                        continue;
                    case S.SCRIPT_ENDING:
                        "/" === o ? this.state = S.CLOSE_TAG : (this.script += "<" + o, this.state = S.SCRIPT);
                        continue;
                    case S.OPEN_WAKA:
                        if ("!" === o) this.state = S.SGML_DECL, this.sgmlDecl = ""; else if (m(o)) ; else if (w(h, o)) this.state = S.OPEN_TAG, this.tagName = o; else if ("/" === o) this.state = S.CLOSE_TAG, this.tagName = ""; else if ("?" === o) this.state = S.PROC_INST, this.procInstName = this.procInstBody = ""; else {
                            if (P(this, "Unencoded <"), this.startTagPosition + 1 < this.position) {
                                var a = this.position - this.startTagPosition;
                                o = new Array(a).join(" ") + o
                            }
                            this.textNode += "<" + o, this.state = S.TEXT
                        }
                        continue;
                    case S.SGML_DECL:
                        (this.sgmlDecl + o).toUpperCase() === s ? (A(this, "onopencdata"), this.state = S.CDATA, this.sgmlDecl = "", this.cdata = "") : this.sgmlDecl + o === "--" ? (this.state = S.COMMENT, this.comment = "", this.sgmlDecl = "") : (this.sgmlDecl + o).toUpperCase() === l ? (this.state = S.DOCTYPE, (this.doctype || this.sawRoot) && P(this, "Inappropriately located doctype declaration"), this.doctype = "", this.sgmlDecl = "") : ">" === o ? (A(this, "onsgmldeclaration", this.sgmlDecl), this.sgmlDecl = "", this.state = S.TEXT) : v(o) ? (this.state = S.SGML_DECL_QUOTED, this.sgmlDecl += o) : this.sgmlDecl += o;
                        continue;
                    case S.SGML_DECL_QUOTED:
                        o === this.q && (this.state = S.SGML_DECL, this.q = ""), this.sgmlDecl += o;
                        continue;
                    case S.DOCTYPE:
                        ">" === o ? (this.state = S.TEXT, A(this, "ondoctype", this.doctype), this.doctype = !0) : (this.doctype += o, "[" === o ? this.state = S.DOCTYPE_DTD : v(o) && (this.state = S.DOCTYPE_QUOTED, this.q = o));
                        continue;
                    case S.DOCTYPE_QUOTED:
                        this.doctype += o, o === this.q && (this.q = "", this.state = S.DOCTYPE);
                        continue;
                    case S.DOCTYPE_DTD:
                        this.doctype += o, "]" === o ? this.state = S.DOCTYPE : v(o) && (this.state = S.DOCTYPE_DTD_QUOTED, this.q = o);
                        continue;
                    case S.DOCTYPE_DTD_QUOTED:
                        this.doctype += o, o === this.q && (this.state = S.DOCTYPE_DTD, this.q = "");
                        continue;
                    case S.COMMENT:
                        "-" === o ? this.state = S.COMMENT_ENDING : this.comment += o;
                        continue;
                    case S.COMMENT_ENDING:
                        "-" === o ? (this.state = S.COMMENT_ENDED, this.comment = x(this.opt, this.comment), this.comment && A(this, "oncomment", this.comment), this.comment = "") : (this.comment += "-" + o, this.state = S.COMMENT);
                        continue;
                    case S.COMMENT_ENDED:
                        ">" !== o ? (P(this, "Malformed comment"), this.comment += "--" + o, this.state = S.COMMENT) : this.state = S.TEXT;
                        continue;
                    case S.CDATA:
                        "]" === o ? this.state = S.CDATA_ENDING : this.cdata += o;
                        continue;
                    case S.CDATA_ENDING:
                        "]" === o ? this.state = S.CDATA_ENDING_2 : (this.cdata += "]" + o, this.state = S.CDATA);
                        continue;
                    case S.CDATA_ENDING_2:
                        ">" === o ? (this.cdata && A(this, "oncdata", this.cdata), A(this, "onclosecdata"), this.cdata = "", this.state = S.TEXT) : "]" === o ? this.cdata += "]" : (this.cdata += "]]" + o, this.state = S.CDATA);
                        continue;
                    case S.PROC_INST:
                        "?" === o ? this.state = S.PROC_INST_ENDING : m(o) ? this.state = S.PROC_INST_BODY : this.procInstName += o;
                        continue;
                    case S.PROC_INST_BODY:
                        if (!this.procInstBody && m(o)) continue;
                        "?" === o ? this.state = S.PROC_INST_ENDING : this.procInstBody += o;
                        continue;
                    case S.PROC_INST_ENDING:
                        ">" === o ? (A(this, "onprocessinginstruction", {
                            name: this.procInstName,
                            body: this.procInstBody
                        }), this.procInstName = this.procInstBody = "", this.state = S.TEXT) : (this.procInstBody += "?" + o, this.state = S.PROC_INST_BODY);
                        continue;
                    case S.OPEN_TAG:
                        w(f, o) ? this.tagName += o : (O(this), ">" === o ? L(this) : "/" === o ? this.state = S.OPEN_TAG_SLASH : (m(o) || P(this, "Invalid character in tag name"), this.state = S.ATTRIB));
                        continue;
                    case S.OPEN_TAG_SLASH:
                        ">" === o ? (L(this, !0), R(this)) : (P(this, "Forward-slash in opening tag not followed by >"), this.state = S.ATTRIB);
                        continue;
                    case S.ATTRIB:
                        if (m(o)) continue;
                        ">" === o ? L(this) : "/" === o ? this.state = S.OPEN_TAG_SLASH : w(h, o) ? (this.attribName = o, this.attribValue = "", this.state = S.ATTRIB_NAME) : P(this, "Invalid attribute name");
                        continue;
                    case S.ATTRIB_NAME:
                        "=" === o ? this.state = S.ATTRIB_VALUE : ">" === o ? (P(this, "Attribute without value"), this.attribValue = this.attribName, F(this), L(this)) : m(o) ? this.state = S.ATTRIB_NAME_SAW_WHITE : w(f, o) ? this.attribName += o : P(this, "Invalid attribute name");
                        continue;
                    case S.ATTRIB_NAME_SAW_WHITE:
                        if ("=" === o) this.state = S.ATTRIB_VALUE; else {
                            if (m(o)) continue;
                            P(this, "Attribute without value"), this.tag.attributes[this.attribName] = "", this.attribValue = "", A(this, "onattribute", {
                                name: this.attribName,
                                value: ""
                            }), this.attribName = "", ">" === o ? L(this) : w(h, o) ? (this.attribName = o, this.state = S.ATTRIB_NAME) : (P(this, "Invalid attribute name"), this.state = S.ATTRIB)
                        }
                        continue;
                    case S.ATTRIB_VALUE:
                        if (m(o)) continue;
                        v(o) ? (this.q = o, this.state = S.ATTRIB_VALUE_QUOTED) : (P(this, "Unquoted attribute value"), this.state = S.ATTRIB_VALUE_UNQUOTED, this.attribValue = o);
                        continue;
                    case S.ATTRIB_VALUE_QUOTED:
                        if (o !== this.q) {
                            "&" === o ? this.state = S.ATTRIB_VALUE_ENTITY_Q : this.attribValue += o;
                            continue
                        }
                        F(this), this.q = "", this.state = S.ATTRIB_VALUE_CLOSED;
                        continue;
                    case S.ATTRIB_VALUE_CLOSED:
                        m(o) ? this.state = S.ATTRIB : ">" === o ? L(this) : "/" === o ? this.state = S.OPEN_TAG_SLASH : w(h, o) ? (P(this, "No whitespace between attributes"), this.attribName = o, this.attribValue = "", this.state = S.ATTRIB_NAME) : P(this, "Invalid attribute name");
                        continue;
                    case S.ATTRIB_VALUE_UNQUOTED:
                        if (!y(o)) {
                            "&" === o ? this.state = S.ATTRIB_VALUE_ENTITY_U : this.attribValue += o;
                            continue
                        }
                        F(this), ">" === o ? L(this) : this.state = S.ATTRIB;
                        continue;
                    case S.CLOSE_TAG:
                        if (this.tagName) ">" === o ? R(this) : w(f, o) ? this.tagName += o : this.script ? (this.script += "</" + this.tagName, this.tagName = "", this.state = S.SCRIPT) : (m(o) || P(this, "Invalid tagname in closing tag"), this.state = S.CLOSE_TAG_SAW_WHITE); else {
                            if (m(o)) continue;
                            k(h, o) ? this.script ? (this.script += "</" + o, this.state = S.SCRIPT) : P(this, "Invalid tagname in closing tag.") : this.tagName = o
                        }
                        continue;
                    case S.CLOSE_TAG_SAW_WHITE:
                        if (m(o)) continue;
                        ">" === o ? R(this) : P(this, "Invalid characters in closing tag");
                        continue;
                    case S.TEXT_ENTITY:
                    case S.ATTRIB_VALUE_ENTITY_Q:
                    case S.ATTRIB_VALUE_ENTITY_U:
                        var d, u;
                        switch (this.state) {
                            case S.TEXT_ENTITY:
                                d = S.TEXT, u = "textNode";
                                break;
                            case S.ATTRIB_VALUE_ENTITY_Q:
                                d = S.ATTRIB_VALUE_QUOTED, u = "attribValue";
                                break;
                            case S.ATTRIB_VALUE_ENTITY_U:
                                d = S.ATTRIB_VALUE_UNQUOTED, u = "attribValue"
                        }
                        ";" === o ? (this[u] += B(this), this.entity = "", this.state = d) : w(this.entity.length ? g : p, o) ? this.entity += o : (P(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, r = 0, a = n.length; r < a; r++) {
                        var s = t[n[r]].length;
                        if (s > i) switch (n[r]) {
                            case"textNode":
                                D(t);
                                break;
                            case"cdata":
                                A(t, "oncdata", t.cdata), t.cdata = "";
                                break;
                            case"script":
                                A(t, "onscript", t.script), t.script = "";
                                break;
                            default:
                                N(t, "Max buffer length exceeded: " + n[r])
                        }
                        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;
                D(e = this), "" !== e.cdata && (A(e, "oncdata", e.cdata), e.cdata = ""), "" !== e.script && (A(e, "onscript", e.script), e.script = "")
            }
        };
        try {
            t = i(100).Stream
        } catch (e) {
            t = function () {
            }
        }
        var r = e.EVENTS.filter(function (e) {
            return "error" !== e && "end" !== e
        });

        function a(e, i) {
            if (!(this instanceof a)) return new a(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, r.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
                })
            })
        }

        a.prototype = Object.create(t.prototype, {constructor: {value: a}}), a.prototype.write = function (e) {
            if ("function" == typeof Buffer && "function" == typeof Buffer.isBuffer && Buffer.isBuffer(e)) {
                if (!this._decoder) {
                    var t = i(492).StringDecoder;
                    this._decoder = new t("utf8")
                }
                e = this._decoder.write(e)
            }
            return this._parser.write(e.toString()), this.emit("data", e), !0
        }, a.prototype.end = function (e) {
            return e && e.length && this.write(e), this._parser.end(), !0
        }, a.prototype.on = function (e, i) {
            var n = this;
            return n._parser["on" + e] || -1 === r.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 w(e, t) {
            return e.test(t)
        }

        function k(e, t) {
            return !w(e, t)
        }

        var T, b, C, S = 0;
        for (var I in e.STATE = {
            BEGIN: S++,
            BEGIN_WHITESPACE: S++,
            TEXT: S++,
            TEXT_ENTITY: S++,
            OPEN_WAKA: S++,
            SGML_DECL: S++,
            SGML_DECL_QUOTED: S++,
            DOCTYPE: S++,
            DOCTYPE_QUOTED: S++,
            DOCTYPE_DTD: S++,
            DOCTYPE_DTD_QUOTED: S++,
            COMMENT_STARTING: S++,
            COMMENT: S++,
            COMMENT_ENDING: S++,
            COMMENT_ENDED: S++,
            CDATA: S++,
            CDATA_ENDING: S++,
            CDATA_ENDING_2: S++,
            PROC_INST: S++,
            PROC_INST_BODY: S++,
            PROC_INST_ENDING: S++,
            OPEN_TAG: S++,
            OPEN_TAG_SLASH: S++,
            ATTRIB: S++,
            ATTRIB_NAME: S++,
            ATTRIB_NAME_SAW_WHITE: S++,
            ATTRIB_VALUE: S++,
            ATTRIB_VALUE_QUOTED: S++,
            ATTRIB_VALUE_CLOSED: S++,
            ATTRIB_VALUE_UNQUOTED: S++,
            ATTRIB_VALUE_ENTITY_Q: S++,
            ATTRIB_VALUE_ENTITY_U: S++,
            CLOSE_TAG: S++,
            CLOSE_TAG_SAW_WHITE: S++,
            SCRIPT: S++,
            SCRIPT_ENDING: S++
        }, 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[I]] = I;

        function _(e, t, i) {
            e[t] && e[t](i)
        }

        function A(e, t, i) {
            e.textNode && D(e), _(e, t, i)
        }

        function D(e) {
            e.textNode = x(e.opt, e.textNode), e.textNode && _(e, "ontext", e.textNode), e.textNode = ""
        }

        function x(e, t) {
            return e.trim && (t = t.trim()), e.normalize && (t = t.replace(/\s+/g, " ")), t
        }

        function N(e, t) {
            return D(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 && P(e, "Unclosed root tag"), e.state !== S.BEGIN && e.state !== S.BEGIN_WHITESPACE && e.state !== S.TEXT && N(e, "Unexpected end"), D(e), e.c = "", e.closed = !0, _(e, "onend"), o.call(e, e.strict, e.opt), e
        }

        function P(e, t) {
            if ("object" != typeof e || !(e instanceof o)) throw new Error("bad call to strictFail");
            e.strict && N(e, t)
        }

        function O(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, A(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) P(e, "xml: prefix must be bound to " + d + "\nActual: " + e.attribValue); else if ("xmlns" === n && e.attribValue !== u) P(e, "xmlns: prefix must be bound to " + u + "\nActual: " + e.attribValue); else {
                        var o = e.tag, r = e.tags[e.tags.length - 1] || e;
                        o.ns === r.ns && (o.ns = Object.create(r.ns)), o.ns[n] = e.attribValue
                    }
                    e.attribList.push([e.attribName, e.attribValue])
                } else e.tag.attributes[e.attribName] = e.attribValue, A(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 && (P(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) {
                    A(e, "onopennamespace", {prefix: t, uri: i.ns[t]})
                });
                for (var r = 0, a = e.attribList.length; r < a; r++) {
                    var s = e.attribList[r], 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 && (P(e, "Unbound namespace prefix: " + JSON.stringify(c)), p.uri = c), e.tag.attributes[l] = p, A(e, "onattribute", p)
                }
                e.attribList.length = 0
            }
            e.tag.isSelfClosing = !!t, e.sawRoot = !0, e.tags.push(e.tag), A(e, "onopentag", e.tag), t || (e.noscript || "script" !== e.tagName.toLowerCase() ? e.state = S.TEXT : e.state = S.SCRIPT, e.tag = null, e.tagName = ""), e.attribName = e.attribValue = "", e.attribList.length = 0
        }

        function R(e) {
            if (!e.tagName) return P(e, "Weird empty close tag."), e.textNode += "</>", void (e.state = S.TEXT);
            if (e.script) {
                if ("script" !== e.tagName) return e.script += "</" + e.tagName + ">", e.tagName = "", void (e.state = S.SCRIPT);
                A(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;
                P(e, "Unexpected close tag")
            }
            if (t < 0) return P(e, "Unmatched closing tag: " + e.tagName), e.textNode += "</" + e.tagName + ">", void (e.state = S.TEXT);
            e.tagName = i;
            for (var o = e.tags.length; o-- > t;) {
                var r = e.tag = e.tags.pop();
                e.tagName = e.tag.name, A(e, "onclosetag", e.tagName);
                var a = {};
                for (var s in r.ns) a[s] = r.ns[s];
                var l = e.tags[e.tags.length - 1] || e;
                e.opt.xmlns && r.ns !== l.ns && Object.keys(r.ns).forEach(function (t) {
                    var i = r.ns[t];
                    A(e, "onclosenamespace", {prefix: t, uri: i})
                })
            }
            0 === t && (e.closedRoot = !0), e.tagName = e.attribValue = e.attribName = "", e.attribList.length = 0, e.state = S.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 ? (P(e, "Invalid character entity"), "&" + e.entity + ";") : String.fromCodePoint(t))
        }

        function U(e, t) {
            "<" === t ? (e.state = S.OPEN_WAKA, e.startTagPosition = e.position) : m(t) || (P(e, "Non-whitespace before first tag."), e.textNode = t, e.state = S.TEXT)
        }

        function V(e, t) {
            var i = "";
            return t < e.length && (i = e.charAt(t)), i
        }

        S = e.STATE, String.fromCodePoint || (T = String.fromCharCode, b = Math.floor, C = function () {
            var e, t, i = [], n = -1, o = arguments.length;
            if (!o) return "";
            for (var r = ""; ++n < o;) {
                var a = Number(arguments[n]);
                if (!isFinite(a) || a < 0 || a > 1114111 || b(a) !== a) throw RangeError("Invalid code point: " + a);
                a <= 65535 ? i.push(a) : (e = 55296 + ((a -= 65536) >> 10), t = a % 1024 + 56320, i.push(e, t)), (n + 1 === o || i.length > 16384) && (r += T.apply(null, i), i.length = 0)
            }
            return r
        }, Object.defineProperty ? Object.defineProperty(String, "fromCodePoint", {
            value: C,
            configurable: !0,
            writable: !0
        }) : String.fromCodePoint = C)
    }(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), r = i(7).default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        a = n.default.getLogger("HistoryDataNS");
    let s = o.resolve(__profilesDir, "mainWndData.ini"), l = 1060, d = 680;
    !function (e) {
        e.getMainWndSizeHistoryData = function () {
            let e = null;
            a.information(s);
            let t = r.readINI(s, "MainBody", "ExitState"), i = r.readINI(s, "MainBody", "MainWndLastWidth"),
                n = r.readINI(s, "MainBody", "MainWndLastHeight");
            if (a.information(t, i, n), "" !== i && "" !== n) {
                let o = Number(i), r = Number(n);
                (o < l || r < d) && (o = l, r = d), (e = {}).width = o, e.height = r, e.exitState = t
            }
            return null === e && ((e = {}).exitState = "normal", e.width = l, e.height = d), e
        }, e.setExitType = function (e) {
            r.writeINI(s, "MainBody", "ExitType", e)
        }, e.getExitType = function () {
            return r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(2), a = i(2), s = i(29), l = i(36), d = i(27), u = i(515), c = i(382), h = i(384), f = i(35),
        p = i(9), g = i(81), m = i(3), v = i(72), y = i(30), w = i(14), k = i(5), T = i(106), b = i(38), C = i(142),
        S = i(33), I = i(28), _ = i(107), A = i(59), D = i(7), x = i(108), N = i(10), E = i(8), P = i(13), O = i(387),
        M = i(144), F = i(522), L = i(392), R = i(378), B = i(523), U = i(126), V = i(67), K = i(656), W = i(22),
        j = i(11), G = i(55), H = i(657), z = i(394), X = i(31), q = i(524), Y = i(12), J = i(4), Z = i(64), Q = i(15),
        $ = i(70), ee = j.DownloadKernelTaskManager.getTaskManager(),
        te = D.default(r.join(__rootDir, "../bin/ThunderHelper.node")),
        ie = C.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}];
                    l.NativeCallNS.registerNativeFunction(e)
                }
            }

            pageReady(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0] || !o[1]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = o[1], a = o[2];
                        yield h.TaskOperate.operateTaskActions(n, r, a), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }

            shellOpen(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        const n = yield Y.asyncRemoteCall.getDialog();
                        let r = null;
                        if (o[0]) try {
                            r = JSON.parse(o[0])
                        } catch (e) {
                            ne.warning("showOpenDialog param error", o[0], e)
                        }
                        r || (r = {properties: ["openDirectory"]});
                        let a = yield Y.asyncRemoteCall.getCurrentWindow();
                        n.showOpenDialog(a, r).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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        const n = yield Y.asyncRemoteCall.getDialog();
                        let r = null;
                        if (o[0]) try {
                            r = JSON.parse(o[0])
                        } catch (e) {
                            ne.warning("showSaveDialog param error", o[0], e)
                        }
                        let a = yield Y.asyncRemoteCall.getCurrentWindow();
                        n.showSaveDialog(a, r).then(n => {
                            let o = n.filePath;
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
                        }).catch()
                    } while (0)
                })
            }

            getFileMd5(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 = r.join(__rootDir, "../../Thunder.exe"), a = te.getFileVersion(o);
                e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, a)
            }

            trackEvent(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information(o);
                    do {
                        if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = void 0 === o[1] ? "" : o[1], a = 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, r, a, s, l, u, c, h, f);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, g)
                    } while (0)
                })
            }

            getCurrentCategoryId(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.isNullOrUndefined(n[0]) || k.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], a = void 0;
                    void 0 !== n[2] && (a = n[2]);
                    let s = n[3];
                    ne.information(o, r, a), y.default.fireEvent(w.NodeEventMesssageNS.eventDownloadSwitchCategory, o, r, a, s)
                } while (0)
            }

            dragOpenFile(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    if (void 0 === o || null === o || "" === o) break;
                    T.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 r = S.ThunderHelper.getTaskTypeFromUrl(o);
                    r === m.DownloadKernel.TaskType.P2sp || r === m.DownloadKernel.TaskType.Emule ? b.ThunderNewTask.createPreNewTaskWindow([o], "url_drag") : r !== m.DownloadKernel.TaskType.Bt && r !== m.DownloadKernel.TaskType.Magnet || b.ThunderNewTask.createBtTaskWindow({
                        url: o,
                        type: "url"
                    }, {source: "url_drag"})
                } while (0)
            }

            getCurInternetState(e, t, i, n) {
                do {
                    if (ne.information(n), k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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), k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    let o = "pc-xdas";
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
                } while (0)
            }

            createNewTask(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    let o = n[0], r = null;
                    try {
                        r = JSON.parse(o)
                    } catch (e) {
                        ne.warning(e)
                    }
                    if (ne.information("createNewTask", r), k.isNullOrUndefined(r)) break;
                    for (let e in r) {
                        let t = r[e];
                        if ("com" === t.type) {
                            let e = void 0;
                            for (let t in r) {
                                void 0 === e && (e = []), ne.information("createNewTask url", r[t].url);
                                let i = r[t].url.split("%0A");
                                if (1 === i.length && (i = r[t].url.split(/[\n\r\n]/)), ne.information("createNewTask urls", i), 1 === i.length) e.push({
                                    url: r[t].url,
                                    referer: r[t].refer,
                                    fileName: r[t].name,
                                    statClick: r[t].stat ? r[t].stat : "outline",
                                    browser: r[t].browser ? r[t].browser : "xlbrowser.exe"
                                }); else for (let n of i) e.push({
                                    url: n,
                                    referer: r[t].refer,
                                    statClick: r[t].stat ? r[t].stat : "outline",
                                    browser: r[t].browser ? r[t].browser : "xlbrowser.exe"
                                })
                            }
                            b.ThunderNewTask.createPreNewTaskWindow(e);
                            break
                        }
                        if ("bt" === t.type) {
                            let e = t.url;
                            b.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]), k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n[0])) break;
                    let o = null;
                    try {
                        o = JSON.parse(n[0])
                    } catch (e) {
                        break
                    }
                    let r = [];
                    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 = S.ThunderHelper.getTaskTypeFromUrl(t.url);
                        if (ne.information(" createNewTaskEx", t.url, " type:", i), i === m.DownloadKernel.TaskType.P2sp || i === m.DownloadKernel.TaskType.Emule) r.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;
                            b.ThunderNewTask.createBtTaskWindow({
                                url: i,
                                type: "url",
                                birdkeyChars: o[e].birdkeyChars
                            }, {source: t.stat, referer: t.refer})
                        } else t.url.includes("taskGroupName") && b.ThunderNewTask.createThunderxTask(t.url, t.stat, !1).catch()
                    }
                    r.length > 0 && b.ThunderNewTask.createPreNewTaskWindow(r)
                } while (0)
            }

            fireEventFunction(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    I.NativeCallHostModule.nativeCallHost.fireNativeEvent("onWebEvent", ...n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            showCustomDownloadModeDlg(e, t, i) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    _.DownloadModeNS.showCustomDownloadModeDlg().catch(), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            showBrowserGuideDlg(e, t, i) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    x.default().popUpBrowserGuide(!0).catch()
                } while (0)
            }

            getTaskStartStatusPrompt(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    try {
                        let o = JSON.parse(n[0]), r = A.TaskStatusHelper.getTaskStartStatusPrompt(o);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, r)
                    } catch (n) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError)
                    }
                } while (0)
            }

            openURLByIEorDefault(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        let n = "";
                        do {
                            if (N.ConfigNS.getValue("TaskDefaultSettings", "UseLastCatalog", !0) && (n = N.ConfigNS.getValue("PathAndCategory", "LastUsedPath", "")) || (n = N.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "")), void 0 !== n && null !== n && "" !== n && (yield E.FileSystemAWNS.mkdirsAW(n))) break;
                            n = P.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (k.isNullOrUndefined(o) || k.isNullOrUndefined(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = 0, r = o[0];
                        if (!this.isPersonalPageTrackEvent) {
                            this.isPersonalPageTrackEvent = !0;
                            let e = N.ConfigNS.getValue("Install", "PersonalUid", "");
                            void 0 !== e && null !== e || (e = "");
                            let t = "uid=" + e + ",start_page=" + (r ? "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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (k.isNullOrUndefined(o) || k.isNullOrUndefined(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.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 => {
                                    I.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* () {
                                I.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e)
                            }))
                        }
                        yield O.EmbeddedBrowserManagerNs.showWebWnd(r, ...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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (k.isNullOrUndefined(o) || k.isNullOrUndefined(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.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 => {
                                    I.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* () {
                                I.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* () {
                                I.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e, i, ...o)
                            }))
                        }
                        yield O.EmbeddedBrowserManagerNs.createWebWnd(r, ...o), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }

            registerWebFunction(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], a = n[2];
                    if (null === r || void 0 === r || "" === r) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if (null === a || void 0 === a) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    O.EmbeddedBrowserManagerNs.registerWebFunction(o, r, (e, ...i) => {
                        I.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, a, void 0, ...i)
                    }), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            callBackWebFunction(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], a = n[2], s = n[3];
                    if (null === o || void 0 === o || "" === o) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if (null === r || void 0 === r) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if (null === a || void 0 === a) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    O.EmbeddedBrowserManagerNs.callBackWebFunction(o, r, a, s), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            fireEventWebFunction(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (k.isNullOrUndefined(n) || k.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), O.EmbeddedBrowserManagerNs.fireEventWebFunction(o, ...n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            isPhoneAuth(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        yield L.CommonSitesMgrNS.getInstance().delete(o[0])
                    } while (0)
                })
            }

            topBookmarksItem(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 r = yield(yield Y.asyncRemoteCall.getCurrentWindow()).getBounds(),
                            a = {y: r.y + 48, x: r.x + (r.width - 400) / 2, modal: !1},
                            s = yield W.MessageBox.custom("BookMarks", {state: n.state, title: n.title}, a);
                        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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        let n = o[0];
                        if (!n) break;
                        let r = null;
                        try {
                            r = JSON.parse(n)
                        } catch (e) {
                        }
                        if (!r) break;
                        yield z.historyManager.delete(r), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }

            getBaiduDWZ(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = yield R.getBaiduDWZ(n);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, r)
                    } while (0)
                })
            }

            getShouleiShareLink(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = "pic";
                        k.isString(o[1]) && (r = o[1]);
                        let a = "";
                        k.isString(o[2]) && (a = o[2]);
                        let s = yield U.getShouleiShareLink(n, r, a);
                        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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = "pic";
                        k.isString(o[1]) && (r = o[1]);
                        let a = "";
                        k.isString(o[2]) && (a = o[2]);
                        let s = yield U.getShouleiShareLinkDlj(n, r, a);
                        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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = o[1], a = o[2], s = o[3], l = o[4], u = o[5], c = "pic";
                        k.isString(o[6]) && (c = o[6]);
                        let h = "";
                        k.isString(o[7]) && (h = o[7]);
                        let f = yield U.getShouleiShareLink2(n, r, a, 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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = o[1], a = o[2], s = o[3], l = o[4], u = o[5], c = "pic";
                        k.isString(o[6]) && (c = o[6]);
                        let h = "";
                        k.isString(o[7]) && (h = o[7]);
                        let f = yield U.getShouleiShareLinkDlj2(n, r, a, 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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0] || !o[1]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let r = o[0], a = "pic";
                        k.isString(o[1]) && (a = o[1]);
                        let s = "";
                        k.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(r, l, a, 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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let r = o[0], a = "pic";
                        k.isString(o[1]) && (a = o[1]);
                        let s = "";
                        k.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(r, l, a, 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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        let n = o[0], r = o[1];
                        r || (r = "picPreview");
                        let a = yield K.videoPreviewData.getVideoPreview(n);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, a)
                    } while (0)
                })
            }

            getInitDownloadData(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (!n || n.length < 3) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let r = n[0], a = n[1], s = null;
                    s = k.isString(r) && r.length > 0 ? o.default.getLogger(r) : ne;
                    let l = !0;
                    switch (a) {
                        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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0] || !k.isString(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = yield E.FileSystemAWNS.existsAW(n);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, r)
                    } while (0)
                })
            }

            getTaskBirdKeyData(e, t, i, n) {
                do {
                    if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = h.TaskOperate.getTaskBirdKeyData(o);
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, r)
                } while (0)
            }

            createWebShortcut(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("createWebShortcut");
                    do {
                        if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 = a.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 = r.join(f, "XLWebPageGame/IconDir"), g = n + ".ico";
                            c = r.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 r = null;
                        if (o[1]) try {
                            r = JSON.parse(o[1])
                        } catch (e) {
                            ne.warning(e)
                        }
                        let a = yield W.MessageBox.pop(n, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(a))
                    } while (0)
                })
            }

            messageBoxConfirm(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("messageBoxConfirm args:", o);
                    do {
                        if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 r = null;
                        if (o[1]) try {
                            r = JSON.parse(o[1])
                        } catch (e) {
                            ne.warning(e)
                        }
                        let a = yield W.MessageBox.confirm(n, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(a))
                    } while (0)
                })
            }

            messageBoxCustom(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("messageBoxCustom args:", o);
                    do {
                        if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = null;
                        try {
                            r = JSON.parse(o[1])
                        } catch (n) {
                            ne.warning(n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = null;
                        if (o[1]) try {
                            a = JSON.parse(o[2])
                        } catch (e) {
                            ne.warning(e)
                        }
                        let s = yield W.MessageBox.custom(n, r, a);
                        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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], r = ee.getTaskFromTaskId(Number(n));
                        if (!r) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = void 0;
                        a = r.getExtraObject().getUserData(G.TaskUserDataGUID.guidBirdKey, "birdKey"), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, a)
                    } while (0)
                })
            }

            promptShare(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.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 = N.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 (k.isNullOrUndefined(e) || k.isNullOrUndefined(t) || k.isNullOrUndefined(i)) break;
                        let n = yield q.getMobileImgSrc();
                        if (!n) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.CallFailed);
                            break
                        }
                        let r = yield W.MessageBox.custom("img-dlg", {src: n, width: 400, height: 276}, {
                            width: 400,
                            height: 276
                        });
                        if (e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(r)), !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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), r = i(15), a = i(3), s = i(16), l = i(11), d = i(0), u = i(70), c = i(63), h = i(64), 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 w(e, t, i) {
            return n(this, void 0, void 0, function* () {
                yield o.client.callServerFunction("SetPlayingTaskId", i.toString(), h.XmpPlaySoure.PLAY_BY_DOWNLOAD)
            })
        }

        function k(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 r = 0, a = n.getTaskBaseInfo();
            a && (r = a.downloadSize || 0);
            let s = o.dcdnSize || 0, l = o.offlineSize || 0, d = {
                taskId: n.getId(),
                dcdnDownloadSized: s + l,
                taskStatus: n.getTaskStatus(),
                downloadSize: r,
                channelInfo: o
            };
            return m.information("[NewStat]... 得到任务信息对象,obj=", d), d
        }

        function T(e, t, i) {
            m.information("setOrderDownload taskId:", i);
            do {
                let e = p.getTaskFromTaskId(i);
                if (!e) break;
                e.setDownloadStrategy(a.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_DOWNLOADINGPLAYING)
            } while (0)
        }

        function b(e, t, i) {
            m.information("setDisorderDownload taskId:", i);
            do {
                let e = p.getTaskFromTaskId(i);
                if (!e) break;
                e.setDownloadStrategy(a.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_NORMALDOWNLOAD)
            } while (0)
        }

        function C(e, t, i) {
            m.information("onStopPlay taskId:", i)
        }

        function S(e, t, i, n) {
            m.information("onPlayCompleted taskId:", i, "fileIndex", n);
            do {
                let e = p.getTaskFromTaskId(i);
                if (!e) break;
                if (e.getType() === a.DownloadKernel.TaskType.Bt) {
                    let t = e.getExtraObject().getBtFileByRealIndex(n);
                    if (t) {
                        let e = t.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.Duration);
                        t.setPlayPosition(e)
                    }
                } else {
                    let t = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.Duration);
                    e.setPlayPosition(t)
                }
            } while (0)
        }

        function I(e, t, i, n, o, r) {
            m.information("onUpdateDurationAndPosition taskId:", i, "fileIndex", n, "duration:", o, "position:", r);
            do {
                let e = p.getTaskFromTaskId(i);
                if (!e) break;
                if (e.getType() === a.DownloadKernel.TaskType.Bt) {
                    let t = e.getExtraObject().getBtFileByRealIndex(n);
                    t && (t.setDuration(o), t.setPlayPosition(r))
                } else e.setDuration(o), e.setPlayPosition(r)
            } while (0)
        }

        e.init = function () {
            r.server.registerFunctions({
                SetOrderDownload: T,
                SetDisorderDownload: b,
                OnStopPlay: C,
                OnPlayCompleted: S,
                OnUpdateDurationAndPosition: I,
                OpenURL: y,
                UpdatePlayTaskId: w,
                GetTaskInfoById: k
            }), d = g.attachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    e[1].forEach(e => n(this, void 0, void 0, function* () {
                        let t = e.getTaskStatus();
                        t === a.DownloadKernel.TaskStatus.StopPending ? v("OnTaskStopPending", e.getId()).catch() : t === a.DownloadKernel.TaskStatus.Stopped ? yield r.server.callClientFunctionByName(f.mainRendererContext, "OnTaskStopped", e.getId()) : t === a.DownloadKernel.TaskStatus.Started ? v("OnTaskStarted", e.getId()).catch() : t === a.DownloadKernel.TaskStatus.Succeeded || t === a.DownloadKernel.TaskStatus.Seeding ? v("OnTaskSuccess", e.getId()).catch() : t === a.DownloadKernel.TaskStatus.DestroyPending ? v("OnTaskDestroyPending", e.getId()).catch() : t === a.DownloadKernel.TaskStatus.Failed && v("OnTaskFailed", e.getId()).catch()
                    }))
                } while (0)
            }), t = g.attachTaskEvent(a.DownloadKernel.TaskEventType.InsertToCategoryView, (e, t, i, n) => {
                if (e !== a.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(a.DownloadKernel.TaskEventType.RemoveFromCategoryView, (e, t, i, n) => {
                if (e !== a.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(a.DownloadKernel.TaskEventType.DetailChanged, (e, t, i) => {
                if (e !== a.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(a.DownloadKernel.TaskEventType.DcdnStatusChanged, (e, t) => {
                if (e !== a.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(a.DownloadKernel.TaskAttribute.TaskId),
                        r = n.getTaskChannelInfo().dcdnStatus;
                    i[o] = r
                }
                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 r.server.callClientFunctionByName(u.CommonIPCBase.mainProcessContext, "getXmpShowMode"))[0];
                m.information("callClientFunctionByName getXmpShowMode end"), m.information("quitPromises showMode", t), t === h.XMPShowMode.EMBED_CHILD_MODE && (yield r.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(a.DownloadKernel.TaskEventType.StatusChanged, d), d = void 0), t && (g.detachTaskEvent(a.DownloadKernel.TaskEventType.InsertToCategoryView, t), t = void 0), i && (g.detachTaskEvent(a.DownloadKernel.TaskEventType.RemoveFromCategoryView, t), i = void 0), s && (g.detachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, t), s = void 0), l && (g.detachTaskEvent(a.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(44);
    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(3), r = i(34), a = i(11), s = i(16), l = i(25), d = i(43), u = i(68), c = i(10), h = i(23),
        f = i(17), p = i(7), g = i(4);
    !function (e) {
        e.dk = o.DownloadKernel, e.dkManager = r.DownloadKernelManager, e.taskManager = a.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(3), r = i(16), a = i(11), s = i(25), l = i(17),
        d = a.DownloadKernelTaskManager.getTaskManager(), u = r.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 r = n.getTaskAttribute(o.DownloadKernel.TaskAttribute.CategoryId);
                    if (-1 !== r && (!t || t.getId() !== r)) continue;
                    let a = this.getTaskUniqueIDByTask(n);
                    if (a && "" !== a) {
                        let e = this.getTaskNameByTask(n), t = n.getTaskBaseInfo().taskId,
                            i = n.getTaskAttribute(o.DownloadKernel.TaskAttribute.CategoryViewId);
                        h.information("updateTaskInfo uniqueId:", a, ", taskId:", t, ", taskName:", e, ", categoryId:", r, ", categoryViewId:", i);
                        let s = {taskId: t, taskName: e, categoryId: r, categoryViewId: i};
                        this.taskInfoMap[a] = 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 r = Math.round(n / i);
                return h.information("getTaskAverageSpeed taskId:", e, ", taskAverageSpeed:", r, ", taskAverageSpeedFormat:", this.formatSize(r)), r
            }

            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", r = /^\s*\[(.+?)\]\s*$/, a = /^\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(r)) ? i[t[1]] = o = i[t[1]] || {} : o && (t = s.match(a)) && (o[t[1]] = t[2])
            }
            return i
        }
    }(t.IniNS || (t.IniNS = {}))
}, 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 = 648
}, 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) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4);

    class r {
        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 = r, function (e) {
        const t = new r;
        e.getUserHelper = function () {
            return t
        }
    }(t.UserHelperNS || (t.UserHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(519), o = i(4), r = i(5), a = 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, a.NativeFunctionErrorCode.Success)
        }

        showLoginPanel(e, t, i, n) {
            o.client.callServerFunction("ShowLoginDlg", "sign").catch(), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
        }

        pageReady(e, t, i, o) {
            do {
                if (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) break;
                n.signObject.show().catch(), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
            } while (0)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(27), o = i(144);
    t.phoneAuthNative = new class {
        constructor() {
        }

        getNativeFunctionMap() {
            return [{functionName: "HideWebDlg", nativeFunc: this.hideWebDlg}]
        }

        hideWebDlg(e, t, i, r) {
            do {
                if (null === e || void 0 === e) break;
                if (null === r || void 0 === r) break;
                let a = r[0], s = r[1];
                o.phoneAuthObject.closeDialog(s, a), 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), r = i(0).default.getLogger("News-Popup.AdContainer"),
        a = 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() {
            r.information("show id:", this.id);
            do {
                if (!this.hwnd || !a.isWindowHandle(this.hwnd)) break;
                a.showWindow(this.hwnd, 5)
            } while (0)
        }

        hide() {
            r.information("hide id:", this.id);
            do {
                if (!this.hwnd || !a.isWindowHandle(this.hwnd)) break;
                a.showWindow(this.hwnd, 0)
            } while (0)
        }

        close() {
            r.information("close id:", this.id);
            do {
                if (!this.hwnd || !a.isWindowHandle(this.hwnd)) break;
                a.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
                }, r.information("move id:", this.id, ", hwnd: ", this.hwnd, ", this.rect:", this.rect), !this.hwnd || !a.isWindowHandle(this.hwnd)) break;
                let o = (65535 & e) << 16 | 65535 & t, l = (65535 & i) << 16 | 65535 & n;
                a.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(521), o = i(10), r = i(5), a = i(0), s = i(27), l = a.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 || !r.isNumber(t) || !r.isNumber(i)) break;
                if (!o || !r.isNumber(o[0]) || !r.isNumber(o[1])) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let a = o[0], l = o[1], d = n.newsPopupObject.getSize();
                d[0] === a && d[1] === l || (n.newsPopupObject.setSize(a, 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 || !r.isNumber(t) || !r.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 || !r.isNumber(t) || !r.isNumber(i)) break;
                if (!o || !r.isNumber(o[0]) || !r.isNumber(o[1])) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let a = o[0], d = o[1];
                n.newsPopupObject.setStartMoveMousePos(a, d).catch(), l.information("setStartMoveMousePos x:", a, ", y:", d), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        setMoveMousePos(e, t, i, o) {
            do {
                if (!e || !r.isNumber(t) || !r.isNumber(i)) break;
                let a = o[0], d = o[1];
                n.newsPopupObject.setMoveMousePos(a, d), l.information("setMoveMousePos x:", a, ", y:", d), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        minimize(e, t, i, o) {
            do {
                if (!e || !r.isNumber(t) || !r.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 || !r.isNumber(t) || !r.isNumber(i)) break;
                let a = "";
                o.length > 0 && r.isString(o[0]) && (a = o[0]);
                let d = n.newsPopupObject.createAd(a);
                l.information("createAd adType:", a, ", id:", d), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, d)
            } while (0)
        }

        showAd(e, t, i, o) {
            do {
                if (!e || !r.isNumber(t) || !r.isNumber(i)) break;
                if (!(o && r.isNumber(o[0]) && r.isNumber(o[1]) && r.isNumber(o[2]) && r.isNumber(o[3]) && r.isNumber(o[4]))) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let a = o[0], d = o[1], u = o[2], c = o[3], h = o[4];
                n.newsPopupObject.showAd(a, d, u, c, h), l.information("showAd id:", a, ", 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 || !r.isNumber(t) || !r.isNumber(i)) break;
                if (!o || !r.isNumber(o[0])) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let a = o[0];
                n.newsPopupObject.hideAd(a), l.information("hideAd id:", a), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        closeAd(e, t, i, o) {
            do {
                if (!e || !r.isNumber(t) || !r.isNumber(i)) break;
                if (!o || !r.isNumber(o[0])) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let a = o[0];
                l.information("closeAd id:", a), n.newsPopupObject.closeAd(a), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        setConfigValue(e, t, i, n) {
            do {
                if (!e || !r.isNumber(t) || !r.isNumber(i)) break;
                if (!(n && r.isString(n[0]) && r.isString(n[1]) && r.isString(n[2]))) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let a = n[0], l = n[1], d = n[2];
                o.ConfigNS.setValue(a, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4);
    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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), r = i(42), a = i(11), s = i(0), l = i(393), d = i(2), u = i(8), c = i(67),
        h = i(16).DownloadKernelEventManager.getEventManager(), f = a.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 = "", a = "", 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", a = d.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskUrl); else if (e === o.DownloadKernel.TaskType.Emule) n = "emule", a = 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
                        }
                        a = e.getInfoId()
                    }
                }
                return r.Common.isThunderPrivateUrl(a) && (a = r.Common.parseThunderPrivateUrl(a)), (i = yield l.getVideoPreviewInfo(n, a, 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=", a), 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 r = {};
                    if (i = this.previewDataMap.get(o), p.information("get key=", o, " value=", i), !i) continue;
                    if (this.objectDeepClone(r, i.data), !r) continue;
                    if (!r.pictures) continue;
                    if ("object" != typeof r.pictures) continue;
                    if (r.pictures.length < 1) continue;
                    let a = {
                        "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 < r.pictures.length; e++) r.pictures[e].startsWith("file:///") ? y++ : ((m = r.pictures[e].indexOf("?")) >= 0 && (f = d.extname(r.pictures[e].substring(0, m))), -1 !== h.indexOf(f) && (l = f), void 0 === (v = this.getTimePercent(r.pictures[e])) && (v = e), s = n + o + "_" + v + l, g = yield c.AxiosNS.downloadFileAW(r.pictures[e], s, a), p.information("下载文件,url=", r.pictures[e], " filePath=", s, " 结果,ret=", g), g && (r.pictures[e] = "file:///" + s, y++));
                    this.netRequestMap.set(o, 6 === y), p.information("saveMap key=", o, " data=", r), e.set(o, {
                        data: r,
                        status: i.status
                    }), r = 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), r = i(81), a = i(33), s = i(3), l = i(51), 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 a.ThunderHelper.getTaskTypeFromUrl(e) === s.DownloadKernel.TaskType.Unkown ? r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(2), a = i(5), s = i(0), l = i(4), d = i(15), u = i(70), c = i(659), h = i(9), f = i(13),
        p = i(81), g = i(379), m = i(79), v = i(378), y = i(33), w = i(7), k = i(3), T = i(8), b = i(106), C = i(10),
        S = i(14), I = i(29), _ = i(72), A = i(522), D = i(509), x = i(107), N = i(27), E = i(384), P = i(35),
        O = i(144), M = i(108), F = i(38), L = i(30), R = i(59), B = i(382), U = i(387), V = i(28), K = i(377),
        W = i(36), j = i(126), G = i(89), H = i(22), z = i(660), X = i(109), q = i(145), Y = i(385), J = i(52),
        Z = i(525), Q = i(17), $ = s.default.getLogger("plugin-function"),
        ee = B.TaskInfoManagerNS.getTaskInfoManager(), te = w.default(r.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), W.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], r = i[2];
                        yield E.TaskOperate.operateTaskActions(n, o, r)
                    } 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];
                    P.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 r = i[0];
                            r || (r = {properties: ["openDirectory"]});
                            let a = yield o.asyncRemoteCall.getCurrentWindow();
                            if (a && !(yield a.isDestroyed())) {
                                let e = yield n.showOpenDialog(a, r);
                                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 r = i[0], a = yield o.asyncRemoteCall.getCurrentWindow();
                            n.showSaveDialog(a, r).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 I.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 = r.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 (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = void 0 === i[1] ? "" : i[1], r = 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, r, s, l, d, u, c, f)
                    } while (0);
                    return t
                })
            }

            getCurrentCategoryId(e, t, ...i) {
                let n = void 0;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    n = L.default.getCurrentCategoryId()
                } while (0);
                return n
            }

            getCurrentTabId(e, t, ...i) {
                let n = void 0;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    n = G.getCurrentTabID()
                } while (0);
                return n
            }

            switchCategoryView(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0]) || a.isNullOrUndefined(i[1])) break;
                    let t = i[0], n = i[1], o = void 0;
                    void 0 !== i[2] && (o = i[2]);
                    let r = i[3];
                    $.information(t, n, o), L.default.fireEvent(S.NodeEventMesssageNS.eventDownloadSwitchCategory, t, n, o, r)
                } while (0)
            }

            getCurInternetState(e, t, ...i) {
                let n = void 0;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    n = te.getCurInternetState()
                } while (0);
                return n
            }

            dragOpenFile(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0])) break;
                    let t = i[0];
                    if (void 0 === t || null === t || "" === t) break;
                    let n = i[1];
                    b.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 === k.DownloadKernel.TaskType.P2sp || o === k.DownloadKernel.TaskType.Emule ? F.ThunderNewTask.createPreNewTaskWindow([t], n || "url_drag") : o !== k.DownloadKernel.TaskType.Bt && o !== k.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 (a.isNullOrUndefined(e)) break;
                    n = "pc-xdas"
                } while (0);
                return n
            }

            createNewTask(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    let t = i[0], n = null;
                    try {
                        n = JSON.parse(t)
                    } catch (e) {
                        $.warning(e)
                    }
                    if ($.information("createNewTask", n), a.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 ? D.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 (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.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 === k.DownloadKernel.TaskType.P2sp || o === k.DownloadKernel.TaskType.Emule) n.push({
                            url: t[e].url,
                            referer: t[e].refer,
                            fileName: t[e].name,
                            statClick: t[e].stat
                        }); else if (o === k.DownloadKernel.TaskType.Bt || o === k.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 (a.isNullOrUndefined(e)) break;
                    x.DownloadModeNS.showCustomDownloadModeDlg().catch()
                } while (0)
            }

            getTaskStartStatusPrompt(e, t, ...i) {
                let n = "";
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0])) break;
                    let t = null;
                    try {
                        t = JSON.parse(i[0])
                    } catch (e) {
                    }
                    t && (n = R.TaskStatusHelper.getTaskStartStatusPrompt(t)), x.DownloadModeNS.showCustomDownloadModeDlg().catch()
                } while (0);
                return n
            }

            showBrowserGuideDlg(e, t, ...i) {
                do {
                    if (a.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 (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0])) break;
                    n = te.openURLByIEorDefault(i[0])
                } while (0);
                return n
            }

            openURLByDefault(e, t, ...i) {
                let n = void 0;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.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 (a.isNullOrUndefined(e)) break;
                        do {
                            if (C.ConfigNS.getValue("TaskDefaultSettings", "UseLastCatalog", !0) && (t = C.ConfigNS.getValue("PathAndCategory", "LastUsedPath", "")) || (t = C.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "")), void 0 !== t && null !== t && "" !== t && (yield T.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 (a.isNullOrUndefined(e)) break;
                        if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0])) break;
                        let n = i[0];
                        if (!this.isPersonalPageTrackEvent) {
                            this.isPersonalPageTrackEvent = !0;
                            let e = C.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 (a.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 (a.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 (a.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 (a.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 (a.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 (a.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 (a.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 (a.isNullOrUndefined(e)) break;
                    if (!i) break;
                    let t = i[0];
                    U.EmbeddedBrowserManagerNs.enableSignAutoShow(t)
                } while (0)
            }

            registerWebFunction(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], o = i[1], r = i[2];
                    if (!o) break;
                    if (!r) break;
                    U.EmbeddedBrowserManagerNs.registerWebFunction(t, o, (e, t, i, o) => n(this, void 0, void 0, function* () {
                        let n = yield r(...o);
                        e.callNativeFunctionCallback(t, i, N.NativeFunctionErrorCode.Success, n[0])
                    }))
                } while (0)
            }

            registerWebExternal(e, t, ...i) {
                do {
                    if (a.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 r = t[i];
                        r && (W.NativeCallNS.checkNativeFunction(i) || (o.push({
                            functionName: i,
                            nativeFunc: (e, t, i, o) => n(this, void 0, void 0, function* () {
                                let n = yield r(...o);
                                e.callNativeFunctionCallback(t, i, N.NativeFunctionErrorCode.Success, n[0])
                            })
                        }), this.clientWebExternalMap[i] = e))
                    }
                    o.length > 0 && W.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 (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], n = i[1], o = i[2], r = 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, r)
                } while (0)
            }

            fireEventWebFunction(e, t, ...i) {
                do {
                    if (a.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 (a.isNullOrUndefined(e)) break;
                        t = yield O.phoneAuthObject.isPhoneAuthAw()
                    } while (0);
                    return t
                })
            }

            getSearchRecommends(e, t, ...i) {
                let n = void 0;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    n = A.SearchConfigNS.getRecommends()
                } while (0);
                return n
            }

            setSearchRecommends(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    A.SearchConfigNS.setRecommends(t)
                } while (0)
            }

            getBaiduDWZ(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (a.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 (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = "pic";
                        a.isString(i[1]) && (o = i[1]);
                        let r = "";
                        a.isString(i[2]) && (r = i[2]), t = yield j.getShouleiShareLink(n, o, r)
                    } while (0);
                    return t
                })
            }

            getShouleiShareLinkDlj(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = "pic";
                        a.isString(i[1]) && (o = i[1]);
                        let r = "";
                        a.isString(i[2]) && (r = i[2]), t = yield j.getShouleiShareLinkDlj(n, o, r)
                    } while (0);
                    return t
                })
            }

            getShouleiShareLink2(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = i[1], r = i[2], s = i[3], l = i[4], d = i[5], u = "pic";
                        a.isString(i[6]) && (u = i[6]);
                        let c = "";
                        a.isString(i[7]) && (c = i[7]), t = yield j.getShouleiShareLink2(n, o, r, 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 (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = i[1], r = i[2], s = i[3], l = i[4], d = i[5], u = "pic";
                        a.isString(i[6]) && (u = i[6]);
                        let c = "";
                        a.isString(i[7]) && (c = i[7]), t = yield j.getShouleiShareLinkDlj2(n, o, r, 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 (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || i[1]) break;
                        let n = i[0], o = i[1], r = "pic";
                        a.isString(i[2]) && (r = i[2]);
                        let s = "";
                        a.isString(i[3]) && (s = i[3]), t = yield j.getShouleiFileTransferLink(n, o, r, s)
                    } while (0);
                    return t
                })
            }

            getShouleiFileTransferDlj(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || !i[1]) break;
                        let n = i[0], o = i[1], r = "pic";
                        a.isString(i[2]) && (r = i[2]);
                        let s = "";
                        a.isString(i[3]) && (s = i[3]), t = yield j.getShouleiFileTransferDlj(n, o, r, s)
                    } while (0);
                    return t
                })
            }

            getShouleiFileTransferLink2(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || !i[6]) break;
                        let n = i[0], o = i[1], r = i[2], s = i[3], l = i[4], d = i[5], u = i[6], c = "pic";
                        a.isString(i[7]) && (c = i[7]);
                        let h = "";
                        a.isString(i[8]) && (h = i[8]), t = yield j.getShouleiFileTransferLink2(n, o, r, 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 (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || !i[6]) break;
                        let n = i[0], o = i[1], r = i[2], s = i[3], l = i[4], d = i[5], u = i[6], c = "pic";
                        a.isString(i[7]) && (c = i[7]);
                        let h = "";
                        a.isString(i[8]) && (h = i[8]), t = yield j.getShouleiFileTransferDlj2(n, o, r, s, l, d, u, c, h)
                    } while (0);
                    return t
                })
            }

            log(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (!i || i.length < 3) break;
                    let t = i[0], n = i[1], o = null;
                    switch (o = a.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 (a.isNullOrUndefined(e)) break;
                        let i = yield o.asyncRemoteCall.getCurrentWindow(), n = yield i.isMinimized(),
                            r = yield i.isVisible();
                        i && !n && r && (t = !0)
                    } while (0);
                    return t
                })
            }

            isInFullScreen(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (a.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 (a.isNullOrUndefined(e)) break;
                        if (a.isNullOrUndefined(i) || a.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 (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0]) || a.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 (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0]) || a.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 (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0]) || a.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 (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.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 (a.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 (a.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 (a.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 (a.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 (a.isNullOrUndefined(e)) break;
                        let i = yield(yield o.asyncRemoteCall.getCurrentWebContents()).session.getUserAgent(),
                            n = "XW-G4v1H72tgfJym", r = "Qbaferw2knfQKqxa25EYJGtZ2_6755CMwzXBN3ctW54",
                            s = "https://xluser-ssl.xunlei.com";
                        1 === C.ConfigNS.getValue("UserLoginConfig", "TestServer", 0) && (n = "XXDfQA-ruQKfza9f", r = "jXD0dQ-nm_yybCfqj7EqUKQtp6sc5q1kzodIj96Gfq0", s = "https://dev-xluser-ssl.xunlei.com"), t = {
                            clientId: n,
                            clientSecret: r,
                            apiOrigin: s,
                            userAgent: i
                        }
                    } while (0);
                    return t
                })
            }

            bringMainWndToTop(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        let t = yield o.asyncRemoteCall.getCurrentWindow();
                        t && ((yield t.isMinimized()) && (yield t.restore()), yield t.show(), yield I.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 (a.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 (a.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 (a.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = i[1] || {}, r = i[2] || {};
                        t = yield H.MessageBox.custom(n, o, r)
                    } 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 (a.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 (a.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 (a.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 (a.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 (a.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 (a.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 (a.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] || a.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] || a.isNullOrUndefined(ie)) break;
                        e = i[0]
                    } while (0);
                    return ie.caclGCid(e)
                })
            }

            caclCid(e, t, ...i) {
                let n = "";
                do {
                    if (!i || !i[0] || a.isNullOrUndefined(ie)) break;
                    n = i[0]
                } while (0);
                return ie.caclCid(n)
            }

            caclBCid(e, t, ...i) {
                let n = "";
                do {
                    if (!i || !i[0] || a.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] || a.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 T.FileSystemAWNS.existsAW(t) && e.push({
                        filePath: t,
                        fileInfo: yield ie.getMediaInfo(t),
                        fileSize: yield T.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) T.FileSystemAWNS.existsAW(i) && e.push({
                        filePath: i,
                        fileInfo: yield ie.getMediaInfo(i),
                        fileSize: yield T.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] || a.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] || a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(2), a = i(7), s = i(0), l = i(103), d = i(12), u = i(8), c = i(4), h = i(5), f = i(661),
        p = a.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 = r.basename(e), i = r.extname(e), n = yield u.FileSystemAWNS.getFileSize(e),
                    o = this.getBlockSize(n), a = {
                        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(a, this.decodeMediaInfo(t)), a.mediaCid = yield this.caclCid(e), g.information("getVideoMediaInfo mediaInfo", a), a.mediaGcid = yield this.caclGCid(e), a.mediaBcid = yield this.caclBCid(e), g.information("getVideoMediaInfo mediaInfo gcid", a)
                } while (0);
                return a
            })
        }

        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 = r.basename(i), n = r.extname(i), o = yield u.FileSystemAWNS.getFileSize(i),
                        a = this.getBlockSize(o), s = {
                            mediaName: e,
                            mediaSuffix: n,
                            mediaGcid: "",
                            mediaBcid: "",
                            mediaCid: "",
                            mediaPath: i,
                            mediaSize: o.toString(),
                            mediaBlockSize: a.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, r) => n(this, void 0, void 0, function* () {
                        r && (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"]),
                        r = yield this.getValue(t, "checkpoint", void 0);
                    o.send({filePath: e, key: t, checkpoint: r, 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(r => {
                    if ("" !== e && "" !== t && u.FileSystemAWNS.existsAW(t)) {
                        let a = `${__rootDir}/out/post-upload-oss`,
                            s = l.fork(a, ["--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* () {
                            r(e ? o.success : o.fail)
                        }))
                    } else r(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"]), r = void 0;
                    o.send({filePath: e, key: t, checkpoint: r, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

    class u {
        constructor() {
            this.isInit = !1, this.configData = {}, this.configPath = void 0, this.configBakPath = void 0, this.eventContainer = new a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(5), r = i(15), a = i(10), s = i(14), l = i(26), d = i(396), u = i(87), c = i(88), h = i(397);
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, a.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigValueChanged, (e, t, i, n) => {
                    r.server.fireClientEvent("OnConfigValueChanged", e, t, i, n), r.server.fireClientEvent("OnConfigValueChanaged", e, t, i, n)
                }), a.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    r.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
                    };
                    r.server.registerFunctions(e)
                }
            }

            save(e, t, ...i) {
                do {
                    if (!e) break;
                    a.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], r = i[1], s = i[2];
                    n = a.ConfigNS.getValue(t, r, 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], r = i[2];
                    a.ConfigNS.setValue(t, n, r)
                } 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
                            }
                            a.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], r = i[1];
                    if ("string" == typeof i[0]) try {
                        t = JSON.parse(i[0])
                    } catch (e) {
                    }
                    if ("string" == typeof i[1]) try {
                        r = JSON.parse(i[1])
                    } catch (e) {
                    }
                    t && r && (n = d.SettingInit.addSettingItemData(t, r))
                } 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], r = i[1];
                    if ("string" == typeof i[0]) try {
                        t = JSON.parse(i[0])
                    } catch (e) {
                    }
                    if ("string" == typeof i[1]) try {
                        r = JSON.parse(i[1])
                    } catch (e) {
                    }
                    t && r && (n = d.SettingInit.removeSettingItemData(t, r))
                } 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(42), r = i(8), a = i(2);
    t.confAdd = new class {
        isXmpExist() {
            return n(this, void 0, void 0, function* () {
                let e = o.Common.getXmpPath();
                return r.FileSystemAWNS.existsAW(e)
            })
        }

        isXmpLiteExist() {
            return n(this, void 0, void 0, function* () {
                let e = a.join(__rootDir, "../../XMP/XMP.exe");
                return r.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(665), o = i(666);
    !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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), r = i(0), a = i(4), s = r.default.getLogger("GetSkinInfo");
    let l;
    (function () {
        return n(this, void 0, void 0, function* () {
            "renderer" === process.type ? (s.information("renderer process"), a.client.callServerFunction("GetSkinInfo").then(e => {
                l = e, s.information("send OnChangeSkin", e)
            }).catch(e => {
                s.warning(e)
            }), a.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(49), r = i(15), a = n.default.getLogger("ConfigRemoteGlobalPluginFunction");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, o.default.attachListener("OnRemoteGlobalConfigLoaded", e => {
                    a.information("OnRemoteGlobalConfigLoaded ret:", e), r.server.fireClientEvent("OnRemoteGlobalConfigLoaded", e)
                }), o.default.attachListener("OnRemoteGlobalConfigUpdated", e => {
                    a.information("OnRemoteGlobalConfigUpdated ret:", e), r.server.fireClientEvent("OnRemoteGlobalConfigUpdated", e)
                })
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetRemoteGlobalConfigValue: this.getRemoteGlobalConfigValue,
                        IsRemoteGlobalConfigInitFinish: this.isRemoteGlobalConfigInitFinish
                    };
                    r.server.registerFunctions(e)
                }
            }

            getRemoteGlobalConfigValue(e, t, ...i) {
                let n = void 0;
                do {
                    if (!e) break;
                    if (!i || !i[0]) break;
                    let t = i[0], r = void 0;
                    i.length >= 2 && (r = i[1]);
                    let a = i[2];
                    n = o.default.getConfigValue(t, r, a)
                } 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), r = i(23), a = i(5), s = i(0), l = i(17), d = i(391), u = i(123), c = i(398),
        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", () => {
                        r.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 => {
                        r.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 => {
                        r.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 r.LoginHelperNS.loginHelper.getSessionIDAw()
                })
            }

            getUserInfoAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return r.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];
                    r.LoginHelperNS.loginHelper.getUserInfoEx(e, e => {
                        t(e)
                    })
                })
            }

            getAllUserInfoAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return r.LoginHelperNS.loginHelper.getAllUserInfoAw()
                })
            }

            getUserInfoByKeyAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return r.LoginHelperNS.loginHelper.getUserInfoByKeyAw(i[0], i[1])
                })
            }

            isLogined(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        r.LoginHelperNS.loginHelper.isLogined(t => {
                            e(t)
                        })
                    })
                })
            }

            getAllUserInfo(e, t, ...i) {
                return new Promise(e => {
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0])) r.LoginHelperNS.loginHelper.getAllUserInfo(t => {
                        e(t)
                    }); else {
                        let t = i[0];
                        r.LoginHelperNS.loginHelper.getAllUserInfo(t, t => {
                            e(t)
                        })
                    }
                })
            }

            getUserInfo(e, t, ...i) {
                return h.information(i), new Promise(e => {
                    let t = 0;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0])) t = 0; else {
                        let e = i[0];
                        t = null === e || void 0 === e || "" === e ? 0 : Number(e)
                    }
                    r.LoginHelperNS.loginHelper.getUserInfoEx(t, t => {
                        e(t)
                    })
                })
            }

            showLoginDlg(e, t, ...i) {
                let n, o = "other", s = !0;
                a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0]) || (o = i[0]), a.isNullOrUndefined(i) || a.isNullOrUndefined(i[1]) || (s = i[1]), a.isNullOrUndefined(i) || a.isNullOrUndefined(i[2]) || (n = i[2]), r.LoginHelperNS.loginHelper.showLoginDlg(o, s, n)
            }

            logout(e, t, ...i) {
                r.LoginHelperNS.loginHelper.logout()
            }

            login(e, t, ...i) {
                let n;
                i && (n = i[0]), r.LoginHelperNS.loginHelper.logIn(n)
            }

            switchAccount(e, t, ...i) {
                let n;
                i && (n = i[0]), r.LoginHelperNS.loginHelper.switchAccount(n)
            }

            isAutoLoginAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        r.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 r.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 r.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) {
                r.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];
                            r.LoginHelperNS.loginHelper.getUserInfo(t, function (t) {
                                e(t)
                            })
                        } else r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(15), a = i(5), s = i(526), 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
                    };
                    r.server.registerFunctions(e)
                }
            }

            attachCallbackEvent(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(i) || a.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 (a.isNullOrUndefined(i)) break;
                    if (a.isNullOrUndefined(i[0]) || a.isNullOrUndefined(i[1])) break;
                    let e = i[0], t = i[1], n = "", o = null, r = null;
                    a.isNullOrUndefined(i[2]) || (o = i[2]), a.isNullOrUndefined(i[3]) || (r = i[3]), a.isNullOrUndefined(i[4]) || (n = i[4]), s.TipsHelperNS.tipsUIHelper.createTipsWnd(e, t, o, r, 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, r = null, l = null, d = null;
                a.isNullOrUndefined(i[0]) || (n = i[0]), a.isNullOrUndefined(i[1]) || (o = i[1]), a.isNullOrUndefined(i[2]) || (r = i[2]), a.isNullOrUndefined(i[3]) || (l = i[3]), a.isNullOrUndefined(i[4]) || (d = i[4]), s.TipsHelperNS.tipsUIHelper.showOrHideTipsWnd(n, o, r, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), r = i(4), a = i(5), s = i(0), l = i(3), d = i(34), u = i(11), c = i(16), h = i(43), f = i(31),
        p = i(8), g = i(55), m = i(14), v = i(30), y = i(527), w = i(38), k = i(68), T = i(48), b = i(376), C = i(40),
        S = i(25), I = i(101), _ = s.default.getLogger("DKNativeFunction"),
        A = u.DownloadKernelTaskManager.getTaskManager(), D = c.DownloadKernelEventManager.getEventManager(),
        x = h.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        N = S.DownloadKernelCategoryManager.getCategoryManager();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, D.attachTaskEvent(l.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    this.onTaskDetailChanged(...e)
                }), D.attachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    this.onTaskStatusChanged(...e)
                }), D.attachTaskEvent(l.DownloadKernel.TaskEventType.DcdnStatusChanged, (...e) => {
                    this.onTaskDcdnStatusChanged(...e)
                }), D.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...e) => {
                    this.onBtSubFileDetailChanged(...e)
                }), D.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileLoaded, (...e) => {
                    this.onBtSubFileLoaded(...e)
                }), D.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileForbidden, (...e) => {
                    this.onBtSubFileForbidden(...e)
                }), D.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileDcdnStatusChanged, (...e) => {
                    this.onBtSubFileDcdnStatusChanged(...e)
                }), D.attachTaskEvent(l.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    this.onTaskInserted(...e)
                }), D.attachTaskEvent(l.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                    this.onTaskRemoved(...e)
                }), D.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 (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], o = A.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 (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], o = A.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 = A.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 (a.isNullOrUndefined(e)) break;
                    if (!i || !a.isArray(i[0])) break;
                    i[0].forEach(e => {
                        let t = A.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 (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], o = A.getTaskFromTaskId(t);
                    o && (n = o.getTaskStatus())
                } while (0);
                return n
            }

            isTaskExist(e, t, ...i) {
                let n = !1;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    A.getTaskFromTaskId(t) && (n = !0)
                } while (0);
                return n
            }

            enableDcdnWithVipCert(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0] || !i[1]) break;
                    let t = i[0], n = A.getTaskFromTaskId(t);
                    if (n) {
                        let e = -1;
                        a.isNumber(i[2]) && (e = i[2]), n.enableDcdnWithVipCert(i[1], e)
                    }
                } while (0)
            }

            updateDcdnWithVipCert(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0] || !i[1]) break;
                    let t = i[0], n = A.getTaskFromTaskId(t);
                    if (n) {
                        let e = -1;
                        a.isNumber(i[2]) && (e = i[2]), n.updateDcdnWithVipCert(i[1], e)
                    }
                } while (0)
            }

            disableDcdnWithVipCert(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], n = A.getTaskFromTaskId(t);
                    if (n) {
                        let e = -1;
                        a.isNumber(i[1]) && (e = i[1]), n.disableDcdnWithVipCert(e)
                    }
                } while (0)
            }

            getPeerId(e, t, ...i) {
                return new Promise(t => {
                    do {
                        if (a.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 (a.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 (a.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 (a.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 (a.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 (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = x.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 (a.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = x.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], r = A.getTaskFromTaskId(o);
                if (r) {
                    let e = i[1], t = i[2], o = i[3], a = r.getTaskAttribute(l.DownloadKernel.TaskAttribute.VirtualId);
                    n = f.ThunderKernel.setTaskExtStat(a, 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 (a.isNullOrUndefined(e)) break;
                    if (a.isNullOrUndefined(i) || a.isNullOrUndefined(i[0]) || a.isNullOrUndefined(i[1])) break;
                    let t = i[0], o = A.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 (a.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 = N.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 = A.getTaskFromTaskId(e);
                    return yield T.SingleBtTaskNS.isSingleBtTask(t)
                })
            }

            isSupportPlay(e, t, ...i) {
                let n = !1;
                do {
                    if (!i[0]) break;
                    let e = i[0], t = A.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 = A.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 = C.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 r.client.callServerFunction("ShowOpenDialog", {
                        properties: ["openFile"],
                        filters: [{name: "BT种子文件（*.torrent）", extensions: ["torrent"]}]
                    });
                    if (e = e || {}, void 0 !== t) {
                        let i = t[0], n = yield k.TaskUtilitiesAWNS.parserBtFileInfoAW(i);
                        if (null === n) w.ThunderNewTask.createBtTaskWindow({
                            type: "file",
                            seedFile: i
                        }, Object.assign({}, e)); else {
                            let t = JSON.stringify(n);
                            w.ThunderNewTask.createBtTaskWindow({
                                data: t,
                                type: "file",
                                seedFile: i
                            }, Object.assign({}, e))
                        }
                    }
                    return t
                })
            }

            getDownloadProgressPercent(e, t, ...i) {
                return b.DownloadProgressNS.getDownloadProgressPercent()
            }

            getDownloadProgress(e, t, ...i) {
                return b.DownloadProgressNS.getDownloadProgress()
            }

            getDownloadDetails(e, t, ...i) {
                return b.DownloadProgressNS.getDownloadDetails()
            }

            createTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (i.length < 2 || !a.isNumber(i[0]) || !a.isObject(i[1])) {
                            _.warning("createTask failed, args invalid! (TaskType: number, newTaskInfo: INewTaskInfo) => Promise<number>", i);
                            break
                        }
                        let n = i[0], o = i[1], r = yield A.createTask(n, o);
                        if (!r) break;
                        t = r.getId()
                    } while (0);
                    return t
                })
            }

            createBatchTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = null;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !a.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 && a.isNumber(i[1])) {
                            let e = i[1];
                            o = A.getTaskFromTaskId(e)
                        }
                        let r = yield A.createBatchTask(n, o);
                        if (!r) break;
                        t = [], r.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 (a.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !a.isNumber(i[0])) {
                            _.warning("startTask failed, args invalid! (taskId: number) => void", i);
                            break
                        }
                        let n = i[0];
                        t = yield A.startTask(n)
                    } while (0);
                    return t
                })
            }

            startWaitingTask(e, t, ...i) {
                let n = !1;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !a.isNumber(i[0])) {
                        _.warning("startWaitingTask failed, args invalid! (taskId: number) => boolean", i);
                        break
                    }
                    let t = i[0];
                    n = A.startWaitingTask(t)
                } while (0);
                return n
            }

            stopTask(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !a.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 && a.isNumber(i[1]) && (n = i[1]), A.stopTask(t, n)
                } while (0)
            }

            deleteTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !a.isNumber(i[0]) || !a.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 A.deleteTask(n, o)
                    } while (0);
                    return t
                })
            }

            removeToRecycle(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !a.isNumber(i[0])) {
                            _.warning("removeToRecycle failed, args invalid! (taskId: number) => Promise<void>", i);
                            break
                        }
                        let t = i[0];
                        yield A.removeToRecycle(t)
                    } while (0)
                })
            }

            recoverFromRecycle(e, t, ...i) {
                let n = !1;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !a.isNumber(i[0])) {
                        _.warning("recoverFromRecycle failed, args invalid! (taskId: number) => Promise<boolean>", i);
                        break
                    }
                    let t = i[0];
                    n = A.recoverFromRecycle(t)
                } while (0);
                return n
            }

            batchStartTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !a.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 A.startTask(e)) && t
                    } while (0);
                    return t
                })
            }

            batchStartWaitingTask(e, t, ...i) {
                let n = !1;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !a.isArray(i[0])) {
                        _.warning("batchStartWaitingTask failed, args invalid! (taskIds: number[]) => boolean", i);
                        break
                    }
                    let t = i[0];
                    n = A.startWaitingTasks(t)
                } while (0);
                return n
            }

            batchStopTask(e, t, ...i) {
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !a.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 && a.isNumber(i[1]) && (n = i[1]), A.batchStopTask(t, n)
                } while (0)
            }

            batchDeleteTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !a.isArray(i[0]) || !a.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 A.deleteBatchTask(n, o)
                    } while (0);
                    return t
                })
            }

            batchRemoveToRecycle(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !a.isArray(i[0])) {
                            _.warning("batchRemoveToRecycle failed, args invalid! (taskIds: number[]) => Promise<void>", i);
                            break
                        }
                        let t = i[0];
                        yield A.batchRemoveToRecycle(t)
                    } while (0)
                })
            }

            batchRecoverFromRecycle(e, t, ...i) {
                let n = !1;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !a.isArray(i[0])) {
                        _.warning("batchRecoverFromRecycle failed, args invalid! (taskIds: number[]) => boolean", i);
                        break
                    }
                    let t = i[0];
                    A.batchRecoverFromRecycle(t), n = !0
                } while (0);
                return n
            }

            batchFindTaskAsync(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = [];
                    do {
                        if (a.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !a.isArray(i[0])) {
                            _.warning("batchFindTaskAsync failed, args invalid! (keyInfos: IKeyInfo[]) => Promise<ITaskBase[]>", i);
                            break
                        }
                        let n = i[0], o = yield A.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 (a.isNullOrUndefined(e)) break;
                        yield N.init()
                    } while (0);
                    return !0
                })
            }

            getCategoryFromUserId(e, t, ...i) {
                let n = null;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !a.isString(i[0]) || !a.isString(i[1])) {
                        _.warning("getCategoryFromUserId failed, args invalid! (categoryName: string, userId: string) => ICategoryData[]", i);
                        break
                    }
                    let t = i[0], o = i[1], r = void 0;
                    i.length >= 3 && (r = i[2]);
                    let s = N.getCategoryFromUserId(t, o, r);
                    s && (n = s.getCategoryData())
                } while (0);
                return n
            }

            getCategoryById(e, t, ...i) {
                let n = null;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !a.isNumber(i[0])) {
                        _.warning("getCategoryById failed, args invalid! (categoryId: number) => ICategoryData", i);
                        break
                    }
                    let t = i[0], o = N.getCategoryFromId(t);
                    o && (n = o.getCategoryData())
                } while (0);
                return n
            }

            getCategoryByName(e, t, ...i) {
                let n = [];
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !a.isString(i[0])) {
                        _.warning("getCategoryByName failed, args invalid! (categoryName: string) => ICategoryData[]", i);
                        break
                    }
                    let t = i[0], o = N.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 (a.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !a.isNumber(i[0]) || !a.isString(i[1])) {
                        _.warning("getCategoryTaskCount failed, args invalid! (categoryId: number, categoryViewId: CategoryViewID) => number", i);
                        break
                    }
                    let t = i[0], o = i[1], r = N.getCategoryFromId(t);
                    if (!r) break;
                    let s = r.getCategoryViewFromId(o);
                    if (!s) break;
                    n = s.getTaskCount()
                } while (0);
                return n
            }

            getCategoryTaskList(e, t, ...i) {
                let n = [];
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !a.isNumber(i[0]) || !a.isString(i[1])) {
                        _.warning("getCategoryTaskList failed, args invalid! (categoryId: number, categoryViewId: CategoryViewID) => Promise<number[]>", i);
                        break
                    }
                    let t = i[0], o = i[1], r = N.getCategoryFromId(t);
                    if (!r) break;
                    let s = r.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 (a.isNullOrUndefined(e)) break;
                    if (i.length < 3 || !a.isNumber(i[0]) || !a.isNumber(i[1]) || !a.isObject(i[2])) {
                        _.warning("addServer failed, args invalid! (taskId: number, fileIndex: number, serverResourceInfo: IXLServerResourceInfo) => boolean", i);
                        break
                    }
                    let t = i[0], o = i[1], r = i[2], s = A.getTaskFromTaskId(t);
                    if (!s) break;
                    s.addServer(o, r), n = !0
                } while (0);
                return n
            }

            discardServer(e, t, ...i) {
                let n = !1;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 3 || !a.isNumber(i[0]) || !a.isNumber(i[1]) || !a.isString(i[2])) {
                        _.warning("discardServer failed, args invalid! (taskId: number, fileIndex: number, url: string) => boolean", i);
                        break
                    }
                    let t = i[0], o = i[1], r = i[2], s = A.getTaskFromTaskId(t);
                    if (!s) break;
                    s.discardServer(o, r), n = !0
                } while (0);
                return n
            }

            getUserData(e, t, ...i) {
                let n = void 0;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !a.isNumber(i[0]) || !a.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 = A.getTaskFromTaskId(t);
                    if (!o) break;
                    let r = i[1], s = i[2], l = o.getExtraObject().getUserData(r, s);
                    if (a.isNullOrUndefined(l)) break;
                    if (a.isNumber(l) || a.isString(l)) n = l; else if (a.isArray(l)) {
                        let e = l, t = [];
                        for (let i = 0; i < e.length; ++i) t.push(e[i].toJs());
                        n = t
                    } else if (a.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 (a.isNullOrUndefined(e)) break;
                    if (i.length < 3 || !a.isNumber(i[0]) || !a.isString(i[1]) || !a.isString(i[2]) || !a.isString(i[3]) && !a.isNumber(i[3]) && !a.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 = A.getTaskFromTaskId(t);
                    if (!o) break;
                    let r = i[1], s = i[2], l = i[3];
                    n = o.getExtraObject().setUserData(r, s, l)
                } while (0);
                return n
            }

            setTaskUrl(e, t, ...i) {
                let n = !1;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !a.isNumber(i[0]) || !a.isString(i[1])) {
                        _.warning("setTaskUrl failed, args invalid! (taskId: number, url: string) => boolean", i);
                        break
                    }
                    let t = i[0], o = A.getTaskFromTaskId(t);
                    if (!o) break;
                    let r = i[1];
                    n = o.setTaskUrl(r)
                } while (0);
                return n
            }

            getTaskAttribute(e, t, ...i) {
                let n = void 0;
                do {
                    if (a.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !a.isNumber(i[0]) || !a.isNumber(i[1])) {
                        _.warning("getTaskAttribute failed, args invalid! (taskId: number, attr: DownloadKernel.TaskAttribute) => any", i);
                        break
                    }
                    let t = i[0], o = A.getTaskFromTaskId(t);
                    if (!o) break;
                    let r = i[1];
                    n = o.getTaskAttribute(r)
                } 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), r = i.getTaskBaseInfo();
                        n[o] = r
                    }
                    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),
                            r = n.getTaskChannelInfo().dcdnStatus;
                        i[o] = r
                    }
                    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 = A.getTaskFromTaskId(t);
                    if (!i) break;
                    let n = e[2], r = i.getTaskBaseInfo();
                    o.server.fireClientEvent("OnBtSubFileDetailChanged", t, JSON.stringify(n), JSON.stringify(r))
                } 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 = A.getTaskFromTaskId(t);
                    if (!n) break;
                    let r = n.getTaskBaseInfo();
                    o.server.fireClientEvent("OnBtSubFileLoaded", t, JSON.stringify(i), JSON.stringify(r))
                } 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], r = e[4];
                    o.server.fireClientEvent("OnBtSubFileDcdnStatusChanged", t, i, n, r)
                } 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], r = [];
                    for (let e = 0; e < n.length; ++e) {
                        let t = n[e].getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                        r.push(t)
                    }
                    let a = JSON.stringify(r);
                    o.server.fireClientEvent("OnTaskInserted", t, i, a)
                } 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], r = [];
                    for (let e = 0; e < n.length; ++e) {
                        let t = n[e].getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                        r.push(t)
                    }
                    let a = JSON.stringify(r);
                    o.server.fireClientEvent("OnTaskRemoved", t, i, a)
                } 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, r, a) {
                if (n && t) {
                    let s = n.__vue__;
                    s ? s.$nextTick(() => {
                        _.information("active fire", t, i), o.server.fireClientEvent("OnDownloadItemActive", e, t, i, r, a)
                    }) : o.server.fireClientEvent("OnDownloadItemActive", e, t, i, r, a)
                } else o.server.fireClientEvent("OnDownloadItemActive", e, t, i, r, a)
            }

            onDownloadItemChosen(e, t, i, n) {
                o.server.fireClientEvent("OnDownloadItemChosen", e, i, t, n)
            }

            insertPanTaskReference(e, t, ...i) {
                !i || i.length < 4 || I.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(110), a = 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 r.EmbeddedBrowser
        }

        createWebPageTipDlg(e, t, i, r, s) {
            return n(this, void 0, void 0, function* () {
                a.information("createWebPageTipDlg url:", e, t);
                {
                    void 0 !== e && null !== e && "" !== e && (this.url = e), this.title = r, 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 a = (e, t) => {
                        "click_close" === t ? this.callback && s("click_close") : this.callback && s(t)
                    };
                    (yield o.asyncRemoteCall.getIpcMain()).on("ad-webpagetip", a);
                    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", a), 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), r = i(0), a = i(5), s = i(13), l = i(531), d = i(533), u = i(22), c = i(26), h = i(2), f = i(7),
        p = r.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 (a.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 (a.isNullOrUndefined(e)) break;
                        if (a.isNullOrUndefined(i) || a.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 (a.isNullOrUndefined(e)) break;
                        if (a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), r = i(0), a = i(13), s = i(400), l = i(10), d = i(14), u = i(532), c = i(139),
        h = i(4), {isDef: f} = a.ThunderUtil, p = r.default.getLogger("Thunder.Skin:spring-festival-skin");
    !function (e) {
        let t = void 0, r = !1;
        const a = 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: a
                    });
                    p.information("init res", l), 200 === l.status && f(l.data) && 0 === l.data.result && f(l.data.data) && (r = 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 = r
                } 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), r = i(535), a = i(536);
    !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 a.VipPluginSwitchConfigNS.getToolbarVipButtonEnable()
                })
            }

            getVipRenewButtonEnable(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return a.VipPluginSwitchConfigNS.getVipRenewButtonEnable()
                })
            }

            getVipLabelConfig(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = i[0];
                    return yield r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), r = i(13), a = i(147), 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 (r.ThunderUtil.isUndef(i) || r.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), r.ThunderUtil.isDef(n) && (o = ((...e) => {
                                n(...e)
                            })), a.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 (r.ThunderUtil.isUndef(i) || r.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 (r.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(115).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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), r = i(4), a = i(52), s = i(392), l = i(3), d = i(31), u = i(394), c = i(11), h = i(5), f = i(537),
        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, r = [];
                    for (let e of t) {
                        let t = p.getTaskFromTaskId(e);
                        t && (o = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryViewId)) !== l.DownloadKernel.CategroyViewID.Recycle && r.push(e)
                    }
                    return r
                })
            }

            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(), r.client.callServerFunction("SelectNav", a.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), r = i(140), a = i(0), s = i(105), l = a.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, r = i[1];
            try {
                o = require(r.src)
            } catch (e) {
                l.warning(e)
            }
            l.information("loadPlugin result", o)
        }

        associateForXmp(e, t, ...i) {
            r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(36), a = i(5), s = i(28), l = i(27), d = i(391), u = i(23), c = i(123), h = i(109),
        f = i(145), p = i(398), 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
                    }];
                    r.NativeCallNS.registerNativeFunction(e)
                }
            }

            fireEvent(e, t, i, n) {
                if (a.isNullOrUndefined(n) || a.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(), r = void 0;
                o && (r = JSON.stringify(o)), g.information("getLoginOption:option = ", r), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, r)
            }

            showLoginDlg(e, t, i, n) {
                g.information(n);
                let o = "other", r = !0, s = null;
                if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0]) || (o = n[0]), a.isNullOrUndefined(n) || a.isNullOrUndefined(n[1]) || (r = n[1]), !a.isNullOrUndefined(n) && !a.isNullOrUndefined(n[2])) {
                    let e = n[2];
                    try {
                        s = JSON.parse(e)
                    } catch (e) {
                        g.warning(e)
                    }
                }
                u.LoginHelperNS.loginHelper.showLoginDlg(o, r, s), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success)
            }

            getLoginInfo(e, t, i, n) {
                if (a.isNullOrUndefined(n) || a.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), (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) && e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                let o = 0;
                if (a.isNullOrUndefined(n) || a.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), a.isNullOrUndefined(n) || a.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), (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.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), a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1]) || a.isNullOrUndefined(n[2])) {
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = n[2];
                    u.LoginHelperNS.loginSDKHelper.saveData(o, r, 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), a.isNullOrUndefined(o) || a.isNullOrUndefined(o[0]) || a.isNullOrUndefined(o[1])) {
                            e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let r = o[0], s = o[1];
                        n = "memory" === r && "initconfig" === s ? yield u.LoginHelperNS.loginSDKHelper.getInitData() : u.LoginHelperNS.loginSDKHelper.loadData(r, 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 (a.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], r = o[1], s = yield u.LoginHelperNS.loginSDKHelper.fireEvent(n, r);
                        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), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i) || a.isNullOrUndefined(n)) {
                        g.information("createLoginWnd 失败");
                        break
                    }
                    if (a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1])) {
                        g.information("createLoginWnd 失败 参数错误"), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = "", d = null, c = null;
                    a.isNullOrUndefined(n[2]) || (s = n[2]), a.isNullOrUndefined(n[3]) || (d = n[3]), a.isNullOrUndefined(n[4]) || (c = n[4]);
                    let p = () => {
                        u.LoginHelperNS.loginUIHelper.createLoginWnd(o, r, 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 (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i) || a.isNullOrUndefined(n)) break;
                    if (a.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, r = null, s = null, d = null, c = null;
                a.isNullOrUndefined(n[0]) || (o = n[0]), a.isNullOrUndefined(n[1]) || (r = n[1]), a.isNullOrUndefined(n[2]) || (s = n[2]), a.isNullOrUndefined(n[3]) || (d = n[3]), a.isNullOrUndefined(n[4]) || (c = n[4]), u.LoginHelperNS.loginUIHelper.updateLoginWnd(o, r, 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 = a.isNullOrUndefined(n) || a.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), a.isNullOrUndefined(n) || a.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], r = n[1];
                    p.commonLoginHelper.checkSmsAw(o, r).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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(3), a = i(34), s = i(11), l = i(16), d = i(43), u = i(36), c = i(27), h = i(28), f = i(31),
        p = i(14), g = i(40), m = i(8), v = i(55), y = i(376), w = i(48), k = i(527), T = i(403), b = i(5),
        C = o.default.getLogger("DKNativeFunction"), S = s.DownloadKernelTaskManager.getTaskManager(),
        I = l.DownloadKernelEventManager.getEventManager(),
        _ = d.DownloadKernelCategoryViewManager.getCategoryViewManager();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, I.attachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    this.onTaskDetailChanged(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    this.onTaskStatusChanged(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.DcdnStatusChanged, (...e) => {
                    this.onTaskDcdnStatusChanged(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...e) => {
                    this.onBtSubFileDetailChanged(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileLoaded, (...e) => {
                    this.onBtSubFileLoaded(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileForbidden, (...e) => {
                    this.onBtSubFileForbidden(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileDcdnStatusChanged, (...e) => {
                    this.onBtSubFileDcdnStatusChanged(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    this.onTaskInserted(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                    this.onTaskRemoved(...e)
                }), I.attachTaskEvent(r.DownloadKernel.TaskEventType.TaskCategoryMovedEnd, (...e) => {
                    this.onTaskCategoryMovedEnd(...e)
                }), a.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = S.getTaskFromTaskId(o);
                    if (r) {
                        let n = r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], a = S.getTaskFromTaskId(o);
                    if (a) {
                        let n = a.getTaskAttribute(r), 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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = S.getTaskFromTaskId(o);
                    if (r) {
                        let n = r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = null;
                    try {
                        r = JSON.parse(o)
                    } catch (e) {
                        C.warning(e)
                    }
                    if (r) {
                        let n = [];
                        for (let e = 0; e < r.length; ++e) {
                            let t = S.getTaskFromTaskId(r[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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = S.getTaskFromTaskId(o);
                    if (r) {
                        let n = r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = S.getTaskFromTaskId(o);
                    if (r) {
                        let n = r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.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: r.DownloadKernel.KeyFilter.All};
                    S.batchFindTaskAsync([o]).then(n => {
                        if (n && n.length > 0) {
                            let o = n[0].getTaskAttribute(r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    S.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = S.getTaskFromTaskId(o);
                    if (r) {
                        let n = r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0] || !n[1]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = S.getTaskFromTaskId(o);
                    if (r) {
                        let o = -1;
                        b.isNumber(n[2]) && (o = n[2]), r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0] || !n[1]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = S.getTaskFromTaskId(o);
                    if (r) {
                        let o = -1;
                        b.isNumber(n[2]) && (o = n[2]), r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = S.getTaskFromTaskId(o);
                    if (r) {
                        let o = -1;
                        b.isNumber(n[1]) && (o = n[1]), r.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    C.verbose(n), a.DownloadKernelManager.getPeerId().then(n => {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                    }).catch()
                } while (0)
            }

            execSqlite(e, t, i, n) {
                do {
                    if (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    f.ThunderKernel.querySqlite(n[0], (n, o, r) => {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n, o, r)
                    })
                } while (0)
            }

            getCategoryViewTaskList(e, t, i, n) {
                do {
                    if (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError), C.warning("getCategoryViewTaskList args", n);
                        break
                    }
                    let o = _.getCategoryViewFromId(n[0]);
                    if (o) {
                        let n = [], r = o.getTasks();
                        if (r) for (let e of r) {
                            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 (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.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(), r = "", a = [];
                        if (n) {
                            for (let [, e]of n) {
                                let t = e.getTaskBaseInfo();
                                a.push(t)
                            }
                            r = JSON.stringify(a)
                        }
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, r)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            isLoadStorageTaskFinish(e, t, i) {
                do {
                    if (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    a.DownloadKernelManager.attachListener(p.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !0)
                    })
                } while (0)
            }

            onTaskDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== r.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(r.DownloadKernel.TaskAttribute.TaskId), a = i.getTaskBaseInfo();
                        n[o] = a
                    }
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskDetailChanged", JSON.stringify(n), i)
                } while (0)
            }

            onTaskStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== r.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(r.DownloadKernel.TaskAttribute.TaskId)] = o
                    }
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskStatusChanged", JSON.stringify(i))
                } while (0)
            }

            onTaskDcdnStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== r.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(r.DownloadKernel.TaskAttribute.TaskId),
                            a = n.getTaskChannelInfo().dcdnStatus;
                        i[o] = a
                    }
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskDcdnStatusChanged", JSON.stringify(i))
                } while (0)
            }

            onBtSubFileDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = S.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] !== r.DownloadKernel.TaskEventType.BtSubFileLoaded) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = e[2], n = S.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] !== r.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] !== r.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] !== 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 = [];
                    for (let e = 0; e < n.length; ++e) {
                        let t = n[e].getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId);
                        o.push(t)
                    }
                    let a = JSON.stringify(o);
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskInserted", t, i, a)
                } while (0)
            }

            onTaskRemoved(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== r.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(r.DownloadKernel.TaskAttribute.TaskId);
                        o.push(t)
                    }
                    let a = JSON.stringify(o);
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskRemoved", t, i, a)
                } while (0)
            }

            onTaskCategoryMovedEnd(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== r.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 = a.DownloadKernelManager.getTotalTaskDownloadSpeed(!1, !1),
                    i = a.DownloadKernelManager.getTotalTaskVipSpeed(!1, !1);
                h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnGlobalDownloadSpeedChanged", t, i)
            }

            isSupportInstall(e, t, i, n) {
                do {
                    if (b.isNullOrUndefined(e) || b.isNullOrUndefined(t) || b.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = S.getTaskFromTaskId(o);
                    if (!a) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if (a.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskType) === r.DownloadKernel.TaskType.Group) {
                        let n = a.getExtraObject(),
                            r = n.getUserData(v.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile");
                        if (void 0 !== r && null !== r && "" !== r && "0" !== r) {
                            let a = g.TaskCtrlOperatorNS.getSavePathByFileName(o, r);
                            m.FileSystemAWNS.existsAW(a).then(o => {
                                if (o) {
                                    let o = n.getUserData(v.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams");
                                    e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !0, a, 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], r = S.getTaskFromTaskId(o);
                w.SingleBtTaskNS.isSingleBtTask(r).then(n => {
                    e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                }).catch()
            }

            verifyProxy(e, t, i, n) {
                let o = n[0], r = n[1], a = n[2], s = n[3], l = n[4];
                0 !== f.ThunderKernel.verifyProxy(o, r, a, s, l, n => {
                    e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                }) && e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, T.ProxyNS.ProxyVerifyResult.ParamError)
            }

            setProxy(e, t, i, n) {
                let o = n[0], r = n[1], a = n[2], s = n[3], l = n[4], d = f.ThunderKernel.setProxy(o, r, a, s, l);
                e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, d)
            }

            setTaskExtStat(e, t, i, n) {
                let o = n[0], a = S.getTaskFromTaskId(o);
                if (a) {
                    let o = n[1], s = n[2], l = n[3], d = a.getTaskAttribute(r.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 r = o[0];
                        if ("string" == typeof r) try {
                            r = JSON.parse(o[0])
                        } catch (e) {
                            C.warning(e)
                        }
                        if (!r) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        if (!r.url) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        if (!r.savePath) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        if (!r.fileName) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = o[1];
                        void 0 !== a && null !== a && (r.onTaskFinish = ((i, o) => n(this, void 0, void 0, function* () {
                            e.callNativeFunctionCallback(t, a, i, o)
                        })));
                        let s = yield k.sdkDownloader.createTaskBySDK(r);
                        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(14), r = i(36), a = i(27), s = i(28), l = i(10), d = i(396), u = i(26), c = i(88), h = i(5),
        f = i(19), p = i(32), 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}];
                    r.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, a.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = n[2], d = l.ConfigNS.getValue(o, r, s);
                    g.information("getValue section:", o, "key:", r, "ret: ", d), e.callNativeFunctionCallback(t, i, a.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = n[2];
                    l.ConfigNS.setValue(o, r, s), e.callNativeFunctionCallback(t, i, a.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, a.NativeFunctionErrorCode.Success, !0)
                    })
                } while (0)
            }

            getConfigModules(e, t, i, n) {
                do {
                    if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t) || h.isNullOrUndefined(i)) break;
                    let o = "", r = "";
                    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] && (r = n[1]));
                    let s = u.default.getConfigInfo(o, r);
                    e.callNativeFunctionCallback(t, i, a.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, a.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = c.SettingConfigHelperNS.configBrowserHelper.getWatchBrowerByName(o);
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, r)
                } while (0)
            }

            addConfigSettingItemData(e, t, i, n) {
                {
                    let o = null, r = null;
                    if (n[0] && n[1]) try {
                        o = JSON.parse(n[0]), r = JSON.parse(n[1])
                    } catch (e) {
                    }
                    if (o && r) {
                        let n = d.SettingInit.addSettingItemData(o, r);
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
                    } else e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError)
                }
            }

            removeConfigSettingItemData(e, t, i, n) {
                {
                    let o = null, r = null;
                    if (n[0] && n[1]) try {
                        o = JSON.parse(n[0]), r = JSON.parse(n[1])
                    } catch (e) {
                    }
                    if (o && r) {
                        let n = d.SettingInit.removeSettingItemData(o, r);
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
                    } else e.callNativeFunctionCallback(t, i, a.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), r = i(27), a = i(28), s = i(49), 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), a.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnRemoteGlobalConfigLoaded", e)
                }), s.default.attachListener("OnRemoteGlobalConfigUpdated", e => {
                    d.information("OnRemoteGlobalConfigUpdated ret:", e), a.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, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = void 0;
                    n.length >= 2 && (a = 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, a, u);
                    if (!l.isNullOrUndefined(h)) try {
                        c = JSON.stringify(h)
                    } catch (e) {
                        d.warning(e), c = h
                    }
                    e.callNativeFunctionCallback(t, i, r.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, r.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), r = i(105), a = i(140), s = i(27), l = i(385);
    !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) || r.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 a = "";
                    o.isNullOrUndefined(n) || o.isNullOrUndefined(n[0]) || (a = n[0]), r.default.openXmp(a).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) || r.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) || r.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 r = a.DownloadAndPlayNS.getXmpPath();
                e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, r)
            }

            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 r = n[0];
                    if (o.isNullOrUndefined(r) || "" === r) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let l = a.DownloadAndPlayNS.getXmpReg(r);
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, l)
                } while (0)
            }

            getXmpUserDataPath(e, t, i, n) {
                o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i) || r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(36), a = i(27), s = i(13), l = i(531), d = i(533), u = i(400), c = i(22), h = i(26), 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}];
                    r.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    g.information(n), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
                } while (0)
            }

            setSkinInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
                })
            }

            setShakeInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    e.callNativeFunctionCallback(t, i, a.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, a.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, a.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n;
                        try {
                            let r = o[0];
                            "string" == typeof r && (r = JSON.parse(r)), n = yield c.MessageBox.customIndividuation("Individuation", Object.assign({
                                singleton: !0,
                                version: m.getFileVersion(f.join(__rootDir, "../../Thunder.exe")),
                                dynamicSkinVersion: h.default.getConfigInfo("dynamicSkinVersion")
                            }, r || {}), {
                                modal: !1,
                                alwaysOnTop: !0,
                                webPreferences: {spellcheck: !1, nodeIntegration: !0, webSecurity: !1}
                            })
                        } catch (n) {
                            e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        e.callNativeFunctionCallback(t, i, a.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, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    g.information(n), e.callNativeFunctionCallback(t, i, a.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, a.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        try {
                            yield d.default.setSkinInfo(o[0], o[1], o[2])
                        } 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.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(36), r = i(27), a = i(13), s = i(139), l = i(535);
    !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 (a.ThunderUtil.isUndef(e) || a.ThunderUtil.isUndef(t) || a.ThunderUtil.isUndef(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, r.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, r.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            getVipSubTaskInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (a.ThunderUtil.isUndef(e) || a.ThunderUtil.isUndef(t) || a.ThunderUtil.isUndef(i)) break;
                        if (!o || a.ThunderUtil.isUndef(o[0]) || a.ThunderUtil.isUndef(o[1])) {
                            e.callNativeFunctionCallback(t, i, r.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, r.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            getVipLabelConfig(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (a.ThunderUtil.isUndef(e) || a.ThunderUtil.isUndef(t) || a.ThunderUtil.isUndef(i)) break;
                        if (!o || a.ThunderUtil.isUndef(o[0])) {
                            e.callNativeFunctionCallback(t, i, r.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, r.NativeFunctionErrorCode.Success, d)
                    } while (0)
                })
            }

            clickTryAcclerateBtn(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (a.ThunderUtil.isUndef(e) || a.ThunderUtil.isUndef(t) || a.ThunderUtil.isUndef(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], l = o[1];
                        yield s.VipPluginFunctionNS.clickTryAcclerateBtn(n, l), e.callNativeFunctionCallback(t, i, r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(12), a = i(0), s = i(36), l = i(5), d = i(27), u = i(141), c = i(3), h = i(11), f = i(7),
        p = i(28), g = a.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], r = o[1], a = yield m.querySubtitleByCid(n, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(a))
                    } 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], r = o[1], a = yield m.querySubtitleByName(n, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(a))
                    } 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], r = m.getDisaplayName(n);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(r))
                    } 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 r = o[1], a = o[2], s = yield m.downloadSubtitle(n, r, a);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, s)
                    } while (0)
                })
            }

            openSubtitle(e, t, i, a) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (l.isNullOrUndefined(e) || l.isNullOrUndefined(t) || l.isNullOrUndefined(i)) break;
                        if (!a || !a[0] || !a[1]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = a[0], s = a[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 r.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), r = i(28), a = i(115), s = i(27), l = a.ShouleiListSyncNS.getMananger();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, l.attachEvent("OnConnectStateChanged", e => {
                    r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(8), a = i(10), s = i(14), l = i(35), d = i(506), u = i(102), c = i(3), h = i(34), f = i(16),
        p = i(82), g = i(146), m = i(12), v = i(0), y = i(78), w = i(114), k = i(55), T = i(45), b = i(56), C = i(51),
        S = i(9), I = i(23), _ = i(43), A = i(106), D = i(7), x = i(4), N = i(40), E = i(22), P = i(37), O = i(25),
        M = D.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        F = w.MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"),
        L = f.DownloadKernelEventManager.getEventManager(), R = v.default.getLogger("task-helper"),
        B = b.ToastNotifyManagerNS.getToastNotifyManger(), U = y.MsgQueueNS.MsgPriority.Download,
        V = _.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        K = O.DownloadKernelCategoryManager.getCategoryManager();
    const W = 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(),
                r = n.getMinutes(), a = 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 === r && 0 === a) {
                    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 - a + 60 * (60 - r - 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), S.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), S.XLStatNS.trackEvent("business", "downloading_check_cnt", "", 0, 0, 0, 0, e), R.information("trackEvent", "business", "downloading_check_cnt", e), "AutoRun" !== A.default.getStartArgs()) return;
            let i = a.ConfigNS.getValue("Consumption", "ShowMainWindowTime", 0),
                o = a.ConfigNS.getValue("Consumption", "HideMainWindowTime", 0),
                r = a.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(r)).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() {
            a.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 (a.ConfigNS.getValue("ConfigNormalSession", "ConfigNormal_AutoDeleteNotExistFile", !1)) {
                    let e = yield l.TaskOperatorNs.removeNonExistingTask();
                    if (e > 0) {
                        let t = "已自动删除" + e + "个文件不存在的任务";
                        R.information(t), B.showNotify(b.ToastNotifyManagerNS.notifyIdAutoDeleteNonExistTasks, C.ToastNotifyItemType.GreenNotify, t, 3e3)
                    }
                }
            })
        }

        autoStartUnfinishTask() {
            let e = a.ConfigNS.getValue("ConfigNormalSession", "ConfigNormal_MaxRunningTaskCount", 5);
            T.DownloadDispatchNS.setStartTaskCount(e), a.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 r = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName), a = encodeURIComponent(r),
                    s = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.Gcid), l = e.getExtraObject();
                if (null === l || void 0 === l) break;
                let d = `taskid=${n},filesize=${o},filename=${a},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, r = e.getTaskChannelInfo();
                        if (null !== r && void 0 !== r) {
                            void 0 !== r.originSize && (t = this.getSizeFormat(r.originSize)), null !== r.p2sSize && void 0 !== r.p2sSize && (i = this.getSizeFormat(r.p2sSize)), null !== r.p2pSize && void 0 !== r.p2pSize && (n = this.getSizeFormat(r.p2pSize));
                            let e = 0;
                            null !== r.offlineSize && void 0 !== r.offlineSize && (e = r.offlineSize), null !== r.dcdnSize && void 0 !== r.dcdnSize && (e += r.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), S.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 x.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"),
                                r = yield n.getPath("documents"),
                                s = a.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() === r.toUpperCase() ? t += "my_file" : i.toUpperCase() === s.toUpperCase() ? t += "xl_download" : t += "other"
                        }
                        let o = e.getExtraObject();
                        if (o) {
                            let e = o.getUserData(k.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(k.TaskUserDataGUID.guidSearchFrom, "searchFrom");
                            i && (t += `,search_from=${i}`)
                        }
                        let r = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.RefUrl) || "";
                        t += `,cpeerid=${i},referer=${encodeURIComponent(r)}`, 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, r = 0,
                a = 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=", a, ";period=", s, ";originalsize=", l), null !== t && void 0 !== t && null !== s && void 0 !== s && null !== l && void 0 !== l && 0 !== l && null !== a && void 0 !== a && 0 !== a ? r = Math.floor((t / l - t / a) * s) : o = 1;
            let d = JSON.stringify({
                type: "dlfile_report",
                data: {dlFileSize: t, cid: i, url: n, deadLinks: o, saveTime: r}
            });
            return R.information("getDownloadFileReportedData data=", d), d
        }

        onTaskFinished(e) {
            return n(this, void 0, void 0, function* () {
                let t = a.ConfigNS.getValue("BossKey", "BossKeyState", !1);
                const i = a.ConfigNS.getValue("ConfigMsg", "ConfigMsg_Finish", !0),
                    n = yield m.asyncRemoteCall.getCurrentWindow(), o = n.isMinimized(), r = 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 w = K.getCategoryFromId(y);
                w && w.getName() === O.CategoryManager.panCategoryName && (v = !0);
                const T = null !== (yield(yield m.asyncRemoteCall.getBrowserWindow()).getFocusedWindow());
                if (I.LoginHelperNS.loginHelper.channel(this.getDownloadFileReportedData(e)), t || this.playTaskFinishedSound().catch(), this.openFinishedTask(e).catch(), h) {
                    let t = e.getExtraObject().getUserData(k.TaskUserDataGUID.guidDownloadCompleteInstall, "isImmediatelyInstall");
                    null !== t && void 0 !== t && "1" === t && l.TaskOperatorNs.executeInstallFile(e).catch(), this.createShortcut(e).catch()
                }
                if (!t && i && (o || !r || !T) && 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"), S.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(k.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 a = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskId),
                        s = N.TaskCtrlOperatorNS.getSavePathByFileName(a, n.targetFile);
                    if (!(yield r.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 r.FileSystemAWNS.existsAW(u)) && (yield r.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(k.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),
                        a = N.TaskCtrlOperatorNS.getSavePathByFileName(n, i.targetFile);
                    if (!(yield r.FileSystemAWNS.existsAW(a))) {
                        R.warning("targetFile not exist!", a);
                        break
                    }
                    let s = i.name.replace(/[*?/\\:|<>\"]/g, "_"), l = yield m.asyncRemoteCall.getApp(),
                        d = o.join(yield l.getPath("desktop"), `${s}.lnk`);
                    (yield r.FileSystemAWNS.existsAW(d)) && (yield r.FileSystemAWNS.unlinkAW(d), R.information("createShortcut", i, "lnkPath", d), yield new Promise(e => {
                        M.createShortcut(d, a, i.runParams || "", a, 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),
                    r = o.getTaskAttribute(c.DownloadKernel.TaskAttribute.UserRead);
                if (n.getTime() - i <= 2592e6 && 0 === r) {
                    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 r = (100 * o).toFixed(0) + "%";
                    "100%" === r && (r = "99%"), e.length < 3 && e.push({taskName: i, percent: r})
                }
                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", r = "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;
                    r += t.totalNumber;
                    let e = new Date;
                    F.enQueue({
                        callback: () => {
                            R.information("trackEvent", "business", o, r), S.XLStatNS.trackEvent("business", o, "", 0, 0, 0, 0, r);
                            let s = "亲,";
                            I.LoginHelperNS.loginHelper.getAllUserInfo(o => n(this, void 0, void 0, function* () {
                                (yield x.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() : a.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 === P.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(k.TaskUserDataGUID.guidHttpHeaderField, t, o), R.information("http auth", t, o);
                            let r = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskId);
                            yield T.DownloadDispatchNS.startTask(r)
                        }
                    }
                })).catch()
            } while (0)
        }

        onTaskFailed(e) {
            return n(this, void 0, void 0, function* () {
                let t = a.ConfigNS.getValue("BossKey", "BossKeyState", !1);
                const i = a.ConfigNS.getValue("ConfigMsg", "ConfigMsg_FailSuggest", !0),
                    n = yield m.asyncRemoteCall.getCurrentWindow(), o = n.isMinimized(), r = 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 w = K.getCategoryFromId(y);
                if (w && w.getName() === O.CategoryManager.panCategoryName && (v = !0), !t && i && (o || !r || !f) && s && !h) {
                    if (u && l < 10485760) return;
                    F.enQueue({
                        callback: () => {
                            R.information("trackEvent", "download_leftpanel", "dl_fail_tips_show", "panel_type=mypc"), S.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 (a.ConfigNS.getValue("ConfigMsg", "ConfigMsg_PlayWaveWhileFinish", !0)) {
                    let e = o.join(__rootDir, "../../download-complete.wav"),
                        t = a.ConfigNS.getValue("ConfigMsg", "ConfigMsg_WavePath", e);
                    (yield r.FileSystemAWNS.existsAW(t)) ? yield new Audio(t).play() : (yield r.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 = a.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 (a.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(k.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 a = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskId),
                        s = N.TaskCtrlOperatorNS.getSavePathByFileName(a, n.targetFile);
                    if (!(yield r.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 r.FileSystemAWNS.existsAW(u)) && (yield r.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 () {
            W.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(54), r = i(2), a = i(7), s = i(0), l = i(9), d = i(14), u = i(10), c = i(76), h = i(4), f = i(34),
        p = i(538), g = i(107), m = i(35), v = i(45), y = i(56), w = i(51), k = i(88), T = i(404), b = i(19), C = i(32),
        S = i(403), I = i(31), _ = i(692), A = i(42), D = i(26), x = i(8), N = i(694),
        E = s.default.getLogger("ConfigHandler"), P = a.default(r.join(__rootDir, "../bin/ThunderHelper.node")),
        O = y.ToastNotifyManagerNS.getToastNotifyManger();
    let M = "";
    const F = new class {
        init() {
            this.attachConfigInitFinished(), N.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() : "") !== M && (M = e, E.information("updateNetDiscVODCachePath", e), I.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 && I.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;
                        I.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 = P.readRegString("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) && T.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 D.default.isInitedAw();
                let r = u.ConfigNS.getValue("ConfigNet", "ConfigNet_OpenMirrorImageIncreaseSpeed", !0);
                f.DownloadKernelManager.enableCommonP2sChannel(r);
                let a = u.ConfigNS.getValue("ConfigNet", "ConfigNet_OpenXunleiP2PIncreaseSpeed", !0);
                f.DownloadKernelManager.enableCommonP2pChannel(a)
            })
        }

        isXmpExist() {
            return n(this, void 0, void 0, function* () {
                let e = A.Common.getXmpPath();
                return x.FileSystemAWNS.existsAW(e)
            })
        }

        isXmpLiteExist() {
            return n(this, void 0, void 0, function* () {
                let e = r.join(__rootDir, "../../XMP/XMP.exe");
                return x.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 && I.ThunderKernel.setGlobalConnectionLimit(e)
                    } else {
                        const e = 4294967295;
                        I.ThunderKernel.setGlobalConnectionLimit(e)
                    }
                    break;
                case"MaxResourceCount":
                    u.ConfigNS.getValue("TaskDefaultSettings", "MaxResourceLimit", !1) && Number(i) && I.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":
                    E.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":
                    E.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();
                            E.information("notifyBrowserConfigChanged notify:", e)
                        }).catch()
                    }
            }
        }

        handleSetFreedown(e, t) {
            E.verbose("handleSetMaxRunningTaskCount preValue:", e, "; newValue:", t), t && h.client.callServerFunction("ShowMessageToast", {
                message: "已开启空闲下载",
                type: "success"
            }).catch()
        }

        onMotitorChanged(e, t, i) {
            E.information("onMotitorChanged:", e, t, i);
            do {
                if ("MotitorAll" === e) break;
                let t = k.SettingConfigHelperNS.configBrowserHelper.getWriteIniConfigShowBrowsers();
                c.BHOConfigNS.setValue("Monitor", "ConfigBrowsers", t), k.SettingConfigHelperNS.configBrowserHelper.savaMotiorBrowserToConfig()
            } while (0)
        }

        onProxySettingChanged(e, t, i) {
            switch (E.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 (E.verbose("handleAutoRun preValue:", e, "; newValue:", t), t) {
                let e = r.join(__rootDir, "../../Thunder.exe") + " -silent -StartType:AutoRun";
                P.writeRegValue("HKEY_CURRENT_USER", "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Thunder", e, 1)
            } else P.deleteRegValue("HKEY_CURRENT_USER", "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Thunder")
        }

        handleSetMaxRunningTaskCount(e, t) {
            E.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 + "个文件不存在的任务";
                        E.information(t), O.showNotify(y.ToastNotifyManagerNS.notifyIdAutoDeleteNonExistTasks, w.ToastNotifyItemType.GreenNotify, t, 3e3)
                    }
                }
            })
        }

        handleSetThreadCount(e, t) {
            E.verbose("handleSetThreadCount preValue:", e, "; newValue:", t)
        }

        handleDownloadMode(e, t) {
            E.verbose("handleDownloadMode preValue:", e, "; newValue:", t), "1" === String(t) ? (E.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), E.information("handleDownloadMode DownloadMode handleCustomDownloadMode"), g.DownloadModeNS.handleCustomDownloadMode())
        }

        handleOpenMirrorImageIncreaseSpeed(e, t) {
            E.verbose("handleOpenMirrorImageIncreaseSpeed preValue:", e, "; newValue:", t), f.DownloadKernelManager.enableCommonP2sChannel(t)
        }

        handleOpenXunleiP2PIncreaseSpeed(e, t) {
            E.verbose("handleOpenXunleiP2PIncreaseSpeed preValue:", e, "; newValue:", t), f.DownloadKernelManager.enableCommonP2pChannel(t)
        }

        handleMonitorClipBoard(e, t) {
            E.verbose("handleMonitorClipBoard preValue:", e, "; newValue:", t)
        }

        handleUseProxy(e, t) {
            E.verbose("handleUseProxy preValue:", e, "; newValue:", t)
        }

        handleProxyTypeChanged(e, t) {
            E.verbose("handleUseProxy preValue:", e, "; newValue:", t);
            let i = "1", n = "null";
            if ("0" === t) void 0 !== e && I.ThunderKernel.setProxy(S.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) : I.ThunderKernel.setProxy(S.ProxyNS.ProxyType.None, "", 0, "", ""), i = "0", n = "custom"
            }
            let o = "download_agent=" + i;
            o = o + ",agent=" + n, E.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) {
            E.verbose("handlePlayWaveWhileFinish preValue:", e, "; newValue:", t)
        }

        handleSetPortType(e, t) {
            E.verbose("handleSetPortType preValue:", e, "; newValue:", t)
        }

        handleOpenNoLimitDownload(e, t) {
            E.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) {
            E.verbose("handleAntiDisturb preValue:", e, "; newValue:", t)
        }

        handleOpenIdleDownload(e, t) {
            E.verbose("handleOpenIdleDownload preValue:", e, "; newValue:", t)
        }

        handleWatchEmuleLink(e, t) {
            E.verbose("handleWatchEmuleLink preValue:", e, "; newValue:", t);
            let i = '"' + r.join(__rootDir, "../../Thunder.exe") + '" "%1" -StartType:ed2k';
            if (E.information("emuleValue: ", i), 1 === t) P.createRegKey("HKEY_CURRENT_USER", "Software\\Classes\\ed2k\\Shell\\Open\\command"), P.writeRegValue("HKEY_CURRENT_USER", "Software\\Classes\\ed2k\\Shell\\Open\\command", "", i, 1), E.information("writeRegValue HKEY_CURRENT_USER Software\\Classes\\ed2k\\Shell\\Open\\command ", i); else {
                let e = P.readRegString("HKEY_CURRENT_USER", "Software\\Classes\\ed2k\\Shell\\Open\\command", "");
                E.information("oldEmuleValue: ", e), e === i && (P.writeRegValue("HKEY_CURRENT_USER", "Software\\Classes\\ed2k\\Shell\\Open\\command", "", "", 1), E.information("remove HKEY_CURRENT_USER Software\\Classes\\ed2k\\Shell\\Open\\command"))
            }
        }

        handleWatchMagnetLink(e, t) {
            E.verbose("handleWatchMagnetLink preValue:", e, "; newValue:", t);
            let i = '"' + r.join(__rootDir, "../../Thunder.exe") + '" "%1" -StartType:magnet';
            if (E.information("magnetValue: ", i), 1 === t) P.createRegKey("HKEY_CURRENT_USER", "Software\\Classes\\magnet\\Shell\\Open\\command"), P.writeRegValue("HKEY_CURRENT_USER", "Software\\Classes\\magnet\\Shell\\Open\\command", "", i, 1), E.information("writeRegValue HKEY_CURRENT_USER Software\\Classes\\magnet\\Shell\\Open\\command ", i); else {
                let e = P.readRegString("HKEY_CURRENT_USER", "Software\\Classes\\magnet\\Shell\\Open\\command", "");
                E.information("oldMagnetValue: ", e), e === i && (P.writeRegValue("HKEY_CURRENT_USER", "Software\\Classes\\magnet\\Shell\\Open\\command", "", "", 1), E.information("remove HKEY_CURRENT_USER Software\\Classes\\magnet\\Shell\\Open\\command"))
            }
        }

        handleBossKeySwitch(e, t) {
            E.verbose("handleBossKeySwitch preValue:", e, "; newValue:", t)
        }

        handleDiskCacheSelect(e, t) {
            E.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(), E.verbose("handleBHOConfigMonitorBrowserChanged preValue:", e, "; newValue:", t)
        }

        handleNewTaskDlgWithoutMainWnd(e, t) {
            e !== t && u.ConfigNS.saveSync()
        }

        setAwayMode(e) {
            let t = r.join(__rootDir, "../../ThunderCmd.exe");
            b.ipcRenderer.send(C.ThunderChannelList.channelRMExecute, "AwayMode", "runas", t, e, "", "SW_HIDE"), b.ipcRenderer.once(C.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(), r = n.indexOf(".", 0), a = n.substring(0, r);
            if (null !== a && void 0 !== a && Number(a) >= 6) {
                let e = P.queryRegValue("HKEY_LOCAL_MACHINE", "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", "AwayModeEnabled");
                E.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 (E.verbose("useCostomProxy proxyName:", e), "直接连接" === e) return void I.ThunderKernel.setProxy(S.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 = S.ProxyNS.ProxyType.None;
                "HTTP" === t.type ? e = S.ProxyNS.ProxyType.Http : "SOCKS5" === t.type && (e = S.ProxyNS.ProxyType.Sock5), I.ThunderKernel.setProxy(e, t.host, t.port, t.userName, t.passWord)
            }
        }

        useIEProxy() {
            let e = this.getIEProxy();
            if (e.host && e.port) {
                let t = S.ProxyNS.ProxyType.None;
                "HTTP" === e.type ? t = S.ProxyNS.ProxyType.Http : "SOCKS5" === e.type && (t = S.ProxyNS.ProxyType.Sock5), I.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":
                        N.default.onConfigSwitch(t, i);
                        break;
                    case"defaultDownloadPath":
                    case"downloadPaths":
                    case"SetVODCachePath":
                        this.updateVodCachePath().catch()
                }
            })
        }
    };
    !function (e) {
        e.init = function () {
            F.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(99), r = i(47), a = i(693), s = i(76), 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 r = {code: 0};
                    r.value = o, e.write(JSON.stringify(r))
                } 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 = r.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 = a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), r = i(64), a = i(4), s = i(11).DownloadKernelTaskManager.getTaskManager(), l = i(10), d = i(0),
        u = i(125), c = i(74), 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() {
            [r.XmpEvent.onPreOpen, r.XmpEvent.onOpenSucceeded, r.XmpEvent.onPreStop, r.XmpEvent.onStop].forEach(e => {
                a.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 r.XmpEvent.onPreOpen:
                            case r.XmpEvent.onOpenSucceeded:
                                yield this.onYunBoPreOpen(t);
                                break;
                            case r.XmpEvent.onPreStop:
                            case r.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 && (a.client.detachServerEvent("OnTaskStatusChanged", this.onTaskStatusChangedCookie), this.onTaskStatusChangedCookie = void 0), this.taskStatus.forEach((e, t) => n(this, void 0, void 0, function* () {
                    yield a.client.callServerFunction("OperateTask", t, "pause")
                }));
                let e = yield a.client.callRemoteClientFunction("ThunderPanPluginWebview", "IpcAllRetrieveTaskControl", f.autoPause);
                this.cloudRetrieveId = e[0], this.onTaskStatusChangedCookie = a.client.attachServerEvent("OnTaskStatusChanged", this.onTaskStatusChanged.bind(this))
            })
        }

        getDownloadingTask() {
            return n(this, void 0, void 0, function* () {
                (yield a.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 a.client.callServerFunction("OperateTask", t, "continue"))
                })), this.taskStatus.forEach((e, t) => n(this, void 0, void 0, function* () {
                    e !== o.DownloadKernel.TaskStatus.Started && (yield a.client.callServerFunction("OperateTask", t, "continue"))
                })), yield a.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(415), o = i(158);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(906), i(907), i(908), i(909), i(910), i(911), i(912), i(913), i(914), i(915), 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);
    var a = i(1), s = Object(a.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(160);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-left\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(416), o = i(162);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(728);
    var a = i(1), s = Object(a.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(418), o = i(164);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(10), r = i(44), a = i(700), s = i(0).default.getLogger("login-prompt"), l = i(17);
    let d = new a.DataHelper;
    var u;
    !function (e) {
        e.promptDataGet = "OnpromptDataGet"
    }(u = t.LoginPromptManagerEventNS || (t.LoginPromptManagerEventNS = {}));

    class c extends r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(405), r = i(0).default.getLogger("login-prompt"), a = i(2), s = i(8), l = i(67);
    t.DataHelper = class extends o.HttpSession {
        constructor() {
            super(...arguments), this.dataList = [], this.adDataDir = a.resolve(__profilesDir, "LoginPrompt/")
        }

        init() {
            return n(this, void 0, void 0, function* () {
                let e = yield s.FileSystemAWNS.mkdirsAW(this.adDataDir);
                return e || r.information("初始化路径目录失败"), e
            })
        }

        httpLoadDataInfo(e) {
            r.information("httpLoadDataInfo---\x3e"), this.host = "static-xl.a.88cdn.com", this.retries = 2, this.timeout = 2e4, this.path = "/json/login_icon.json", r.information("uri:" + this.path), r.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 => {
                r.information("error", t), e(!1, null)
            }), r.information("<---httpLoadDataInfo")
        }

        downLoadResource(e, t) {
        }

        parseResponse(e) {
            if (!e) return null;
            let t = e.toString(), i = null;
            try {
                i = JSON.parse(t)
            } catch (e) {
                r.warning(e)
            }
            return r.information("jsonstr", t), r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(23), r = i(702), a = i(44), s = i(4), l = i(705), 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 a.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, r = o.getFullYear(),
                a = o.getMonth(), s = o.getDate(),
                l = (o = new Date(r + "-" + (a < 10 ? "0" + (a + 1) : a + 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 r.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 r.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 r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(703), r = i(704), a = i(0).default.getLogger("vip-renewicon.http-session");
    t.UserHttpSession = class extends o.HttpSession {
        querySettingInfo() {
            return n(this, void 0, void 0, function* () {
                return a.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", a.information("uri:", this.path), a.information("host:", this.host), new Promise(e => {
                    this.get(t => {
                        let i = null;
                        200 === t.statusCode && t.body && (i = r.UserHttpPackageNS.praseSettingBuffer(t.body)), e(i)
                    }, t => {
                        a.information("error", t), e(null)
                    })
                })
            })
        }

        queryCashInfo(e, t) {
            return n(this, void 0, void 0, function* () {
                return a.information("queryCashInfo"), this.host = "dynamic.vip.xunlei.com", this.retries = 1, this.timeout = 5e3, this.path = "/cashv2/userCashCount?userid=" + e + "&sessionid=" + t, a.information("host:", this.host), a.information("uri:", this.path), new Promise(e => {
                    this.get(t => {
                        let i = null;
                        200 === t.statusCode && t.body && (i = r.UserHttpPackageNS.praseCashBuffer(t.body)), e(i)
                    }, t => {
                        a.information("error", t), e(null)
                    })
                })
            })
        }

        queryUserTags(e, t) {
            return n(this, void 0, void 0, function* () {
                return a.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", a.information("uri:", this.path), a.information("host:", this.host), new Promise(e => {
                    this.get(t => {
                        let i = null;
                        200 === t.statusCode && t.body && (i = r.UserHttpPackageNS.praseTagBuffer(t.body)), e(i)
                    }, t => {
                        a.information("error", t), e(null)
                    })
                })
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(99);
    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(4), o = i(0).default.getLogger("vip-renewicon.stat-utilities");
    !function (e) {
        e.trackEvent = function (e, t) {
            let i = (t = t || {}).attribute1 || "", r = t.attribute2 || "", a = 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 ：", r), o.information("extData ： ", a), a = encodeURIComponent(a), n.client.callServerFunction("TrackEvent", e, i, r, 0, 0, 0, 0, a).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(166);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-left\\system-buttons-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(420), o = i(168);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(426), o = i(170);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(66)(215)
}, function (e, t, i) {
    e.exports = i(66)(194)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(77), r = i(143), a = i(64), s = i(2), l = i(0), d = i(7), u = i(5), c = i(81), h = i(38), f = i(29),
        p = i(4), g = i(89), m = i(10), v = i(12), y = l.default.getLogger("Thunder.MainRenderer.stroe.Tabs"),
        w = d.default(s.join(__rootDir, "../bin/ThunderHelper.node")), k = g.TabEventManagerNS.getEventEmitter();
    let T = g.createXDASTab({title: "推荐", showUrl: !1, name: "recommend", pinned: !0});
    u.isNullOrUndefined(T) && y.warning(T);
    let b = 1,
        C = ["http://misc.xl9.xunlei.com/chrome/client/view/dist/1.0/new_tab.html", "http://pc.xunlei.com/pages/#/new-tab"],
        S = 0;
    const I = {
        tabs: [{title: T.getTitle(), tab: T, pinned: T.getPinned(), key: b++}],
        current: 0,
        curBrowserWndHandle: 0,
        hideTabs: []
    };

    function _(e, t, i) {
        return n(this, void 0, void 0, function* () {
            do {
                if (y.information("Remove_TAb_CTRL param:", i), u.isNullOrUndefined(i) || u.isNullOrUndefined(i.index) || u.isNullOrUndefined(i.tabInfo) || u.isNullOrUndefined(i.tabInfo.tab)) {
                    y.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) && (y.information("doRemoveTabCtrl hide page"), w.showWindow(e, a.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)) && y.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)) {
                    y.warning(d), k.emit(g.TabEventManagerNS.EventType.RemoveTab, i);
                    break
                }
                let c = t.tabs[t.current].tab;
                c.isErrorPage || c.isLoadingPage ? (y.information("doRemoveTabCtrl hide error page"), w.showWindow(d, a.CmdShow.SW_HIDE)) : "find-page" === e.getters.currentNav && i.tabInfo && !i.tabInfo.tab.hideUI && (y.information("[tbc] doRemoveTabCtrl showWindow", d), w.showWindow(d, a.CmdShow.SW_SHOW), r.BrowserSupportNS.resizeBrowserWindow(d).catch()), 0 !== t.curBrowserWndHandle && t.curBrowserWndHandle !== d && (y.information("doRemoveTabCtrl hide other page"), w.showWindow(t.curBrowserWndHandle, a.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 D(e, t, i) {
        return n(this, void 0, void 0, function* () {
            y.information("[tbc] doCreateNewTab createTabParam", i), i && i.tabParam && !i.tabParam.hideUI && (S = (new Date).getTime());
            let e = yield g.createNewTab(i.tabType, i.tabParam);
            y.information("[tbc] newTab", e), u.isNullOrUndefined(e) ? y.warning(e) : (i.tabType === o.TabType.XDAS && (w.isWindowHandle(t.curBrowserWndHandle) && (y.information("doCreateNewTab hide page"), w.showWindow(t.curBrowserWndHandle, a.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 N = {
        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)) {
                            y.warning(n);
                            break
                        }
                        let o = e.tabs[e.current].tab;
                        o.isErrorPage || o.isLoadingPage || r.BrowserSupportNS.resizeBrowserWindow(n).catch(), w.isWindowHandle(n) && (i.isErrorPage ? (y.information("SHOW_OR_HIDE_BROWSER hide page"), w.showWindow(n, a.CmdShow.SW_HIDE), t.refresh()) : i.isLoadingPage ? (y.information("SHOW_OR_HIDE_BROWSER hide page"), w.showWindow(n, a.CmdShow.SW_HIDE)) : (y.information("SHOW_OR_HIDE_BROWSER show page"), w.showWindow(n, a.CmdShow.SW_SHOW), w.setWindowFocus(n, !0)))
                    }
                } else y.information("SHOW_OR_HIDE_BROWSER hide page"), w.showWindow(e.curBrowserWndHandle, a.CmdShow.SW_HIDE)
            } while (0)
        }, CREATE_NEW_TAB(e, t) {
            {
                y.information("[tbc] CREATE_NEW_TAB", t), t.tabType !== o.TabType.Chromium || t.tabParam.hideUI || (y.information("[tbc] SELECT_NAV", "find-page"), this.commit("SELECT_NAV", "find-page", {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)), y.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)) : D(0, e, t).catch()
            }
        }, SELECT_TAB(e, t) {
            y.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)) {
                        y.warning(i);
                        break
                    }
                    if (y.information("SELECT_TAB hwnd: " + i + " curBrowserWndHandle: " + e.curBrowserWndHandle), i === e.curBrowserWndHandle) break;
                    let o = e.tabs[n.index].tab;
                    o.isErrorPage || o.isLoadingPage || r.BrowserSupportNS.resizeBrowserWindow(i).catch(), w.isWindowHandle(i) && (s.isErrorPage ? (y.information("SELECT_TAB hide page: isErrorPage"), w.showWindow(i, a.CmdShow.SW_HIDE), t.refresh()) : s.isLoadingPage ? (y.information("SELECT_TAB hide page: isLoadingPage"), w.showWindow(i, a.CmdShow.SW_HIDE)) : "find-page" === this.getters.currentNav && (y.information("SELECT_TAB show page"), w.showWindow(i, a.CmdShow.SW_SHOW), w.setWindowFocus(i, !0))), w.isWindowHandle(e.curBrowserWndHandle) && (y.information("SELECT_TAB hide page: isWindowHandle(curBrowserWndHandle)"), w.showWindow(e.curBrowserWndHandle, a.CmdShow.SW_HIDE)), e.curBrowserWndHandle = i
                } else s.getTabType() === o.TabType.IE ? y.information("ie") : s.getTabType() === o.TabType.XDAS && (w.isWindowHandle(e.curBrowserWndHandle) && (y.information("SELECT_TAB hide page: isWindowHandle(curBrowserWndHandle)2"), w.showWindow(e.curBrowserWndHandle, a.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) {
            y.information("ON_BIND_WND_HANDLE");
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.hwnd)) {
                    y.warning(t);
                    break
                }
                if (!1 === w.isWindowHandle(t.hwnd)) {
                    y.warning(t.hwnd);
                    break
                }
                if (t.browser) {
                    let i = A(e.hideTabs, t.browser);
                    if (i && i.tab && i.tab.hideUI) {
                        y.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, a.CmdShow.SW_HIDE);
                        break
                    }
                }
                let i = e.tabs[e.current].tab;
                if (!i) break;
                if (i.getTabType() === o.TabType.XDAS) {
                    y.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, a.CmdShow.SW_HIDE);
                    break
                }
                if (i.getTabType() === o.TabType.Chromium) {
                    let e = i.getBrowser();
                    if (e && e !== t.browser) {
                        y.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, a.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 ? (y.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, a.CmdShow.SW_HIDE)) : (r.BrowserSupportNS.resizeBrowserWindow(t.hwnd).catch(), "find-page" !== this.getters.currentNav ? (y.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, a.CmdShow.SW_HIDE)) : (y.information("ON_BIND_WND_HANDLE show page"), w.showWindow(t.hwnd, a.CmdShow.SW_SHOW))), w.isWindowHandle(e.curBrowserWndHandle) && (y.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(e.curBrowserWndHandle, a.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) {
            y.information("ON_NEW_BROWSER_POPUP_COMPLETED");
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    y.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)) {
                    y.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)) {
                    y.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)) {
                    y.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) {
            return n(this, void 0, void 0, function* () {
                y.information("ON_LOAD_START");
                do {
                    if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                        y.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 = yield p.client.callServerFunction("IsSettingCenterOpened");
                                y.information("ON_LOAD_START current tab", i, t);
                                let s = n.getWindowHandle();
                                w.isWindowHandle(s) && (r.BrowserSupportNS.resizeBrowserWindow(s).catch(), "find-page" !== this.getters.currentNav || o ? (y.information("ON_LOAD_START hide page"), w.showWindow(s, a.CmdShow.SW_HIDE)) : (y.information("ON_LOAD_START show page"), w.showWindow(s, a.CmdShow.SW_SHOW)), e.curBrowserWndHandle = s)
                            }
                            break
                        }
                    }
                } while (0)
            })
        }, ON_LOAD_END(e, t) {
            y.information("ON_LOAD_END");
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    y.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) {
            y.information("ON_LOAD_STATUS_CHANGE");
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    y.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.canGoBack = t.canGoBack, i.tab.canGoForward = t.canGoForward, t.isLoading && (i.tab.isErrorPage = !1);
                        break
                    }
                }
            } while (0)
        }, ON_ADDRESS_CHANGE(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    y.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 && (C.includes(t.url) ? i.tab.setShowUrl(!1) : i.tab.setShowUrl(!0));
                        break
                    }
                }
            } while (0)
        }, ON_LOAD_ERROR(e, t) {
            y.warning("ON_LOAD_ERROR ", t.errorCode);
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    y.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 && (-105 === t.err || -21 === t.err || -106 === t.err || -118 === t.err || -7 === t.err || -101 === t.err))) {
                        i.tab.state = "error", i.tab.url = t.failedUrl, i.tab.isErrorPage = !0, i.tab.isLoadingPage = !1;
                        let n = e.getWindowHandle();
                        if (0 === n) break;
                        y.warning("ON_LOAD_ERROR HIDE hwnd: ", n), w.isWindowHandle(n) && (y.information("ON_LOAD_ERROR hide page"), w.showWindow(n, a.CmdShow.SW_HIDE));
                        break
                    }
                }
            } while (0)
        }, ON_APP_QUIT(e) {
            y.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 && y.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)) {
                    y.warning(t);
                    break
                }
                let i = t.tabInfo.tab;
                if (i.getTabType() === o.TabType.Chromium) {
                    i.destroyBrowser(!0) || _(this, e, t).catch()
                } else _(this, e, t).catch()
            } while (0)
        }, CLOSE_TAB_BY_NAME(e, t) {
            do {
                if (u.isNullOrUndefined(t)) {
                    y.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(), r = {tabInfo: e.tabs[i], index: i};
                    if (n === o.TabType.Chromium) {
                        t.destroyBrowser(!0) || _(this, e, r).catch()
                    } else _(this, e, r).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) {
            _(this, e, t).catch()
        }, ON_CHROMIUM_CALL_NATIVE_FUNCTION(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.functionName) || u.isNullOrUndefined(t.browser)) {
                    y.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.onJsCallNativeFunction(0, t.functionName, t.callBackId, t.args) && y.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)) {
                    y.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) && y.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)) {
                    y.warning(o);
                    break
                }
                w.isWindowHandle(o) && (i.isErrorPage ? (y.information("ON_BROWSER_CREATE hide page"), w.showWindow(o, a.CmdShow.SW_HIDE), n.refresh()) : "find-page" === this.getters.currentNav && (y.information("ON_BROWSER_CREATE show page"), w.showWindow(o, a.CmdShow.SW_SHOW), w.setWindowFocus(o, !0))), w.isWindowHandle(e.curBrowserWndHandle) && (y.information("ON_BROWSER_CREATE hide page"), w.showWindow(e.curBrowserWndHandle, a.CmdShow.SW_HIDE)), e.curBrowserWndHandle = o;
                let s = e.tabs[e.current].tab;
                s.isErrorPage || s.isLoadingPage || r.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
        }
    }, E = {
        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* () {
                y.information("ON_NEW_BROWSER_POPUP");
                do {
                    if (u.isNullOrUndefined(t)) {
                        y.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,
                        r = yield g.createNewTab(n, i, t.ev);
                    if (u.isNullOrUndefined(r)) {
                        y.warning(r);
                        break
                    }
                    e("ON_NEW_BROWSER_POPUP", r)
                } 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)) {
                    y.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)
    };
    t.default = {state: I, mutations: N, actions: E, getters: P}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(10), o = i(396), r = i(97), a = 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_SCHEMA_ITEM(e, t) {
            if (a.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), r.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] && r.default.set(e.formData, i, t)
        }, ADD_SELECT_ITEM(e, t) {
            let i = e.formData[t.target];
            a.information("targetItem", i), i.selectItems.includes(t.from) || (i.selectItems.push(t.from), r.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), r = i(3), a = i(16), s = i(43), l = i(25), d = i(11), u = i(30), c = i(124),
        h = o.default.getLogger("DownloadStore"), f = d.DownloadKernelTaskManager.getTaskManager(),
        p = a.DownloadKernelEventManager.getEventManager(),
        g = s.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        m = l.DownloadKernelCategoryManager.getCategoryManager(), v = 20, y = {
            currentCategoryId: -1,
            currentPrivateCategoryId: Number.MIN_VALUE,
            currentCategoryViewId: window.__xadsSkeletonCompletedActive ? r.DownloadKernel.CategroyViewID.Completed : r.DownloadKernel.CategroyViewID.Downloading,
            taskList: [{
                categoryId: -1,
                id: r.DownloadKernel.CategroyViewID.Downloading,
                tasksMap: {},
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }, {
                categoryId: -1,
                id: r.DownloadKernel.CategroyViewID.Completed,
                tasksMap: {},
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }, {
                categoryId: -1,
                id: r.DownloadKernel.CategroyViewID.Recycle,
                tasksMap: {},
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }],
            taskListPrivate: [{
                id: r.DownloadKernel.CategroyViewID.Downloading,
                tasksMap: {},
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }, {id: r.DownloadKernel.CategroyViewID.Completed, tasksMap: {}, selected: [], taskIds: [], loadedIndex: 0}],
            filterTasks: {
                categoryId: -1,
                id: r.DownloadKernel.CategroyViewID.Completed,
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }
        };

    function w(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 k = {
        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 r = [...Object.values(o)];
                r.sort(c.SortNS.getSortFuncByConfig(i.id, i.categoryId)), i.taskIds = r.map(e => e.taskId), i.selected = i.selected.filter(e => o.hasOwnProperty(e)), w(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 r = o.getTasks(), a = {};
                for (let [e, t]of r) a[e] = t.getTaskBaseInfo();
                let s = u.default.getTaskBases(n.categoryId, n.id), l = Object.assign({}, s, a);
                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), w(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 r = o.getTasks();
                t[i].tasksMap = null, t[i].tasksMap = {}, t[i].selected = [], t[i].loadedIndex = 0, t[i].categoryId = e.currentCategoryId;
                let a = {};
                for (let [e, t]of r) a[e] = t.getTaskBaseInfo();
                let s = [...Object.values(a)];
                s.sort(c.SortNS.getSortFuncByConfig(n.id, n.categoryId)), u.default.updateTaskMaps(t[i].categoryId, t[i].id, a), t[i].taskIds = s.map(e => e.taskId), w(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), w(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 = [], w(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, w(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 || [];
            w(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, w(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 r = u.default.getTaskBases(t.categoryId, t.id), a = Object.assign({}, r, o);
                u.default.updateTaskMaps(t.categoryId, t.id, a), n.length > 0 && i[e].taskIds.splice(0, 0, ...n), w(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),
                    r = 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 a = r.indexOf(t);
                    -1 !== a && r.splice(a, 1)
                }
                u.default.updateTaskMaps(t.categoryId, t.categoryViewId, n), i[e].taskIds = o, i[e].selected = r, w(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 a = u.default.getTaskBases(n, r.DownloadKernel.CategroyViewID.Downloading);
                    a.hasOwnProperty(String(i.taskId)) ? (a[i.taskId] = i, u.default.updateTaskMaps(n, r.DownloadKernel.CategroyViewID.Downloading, a), o[t].tasksMap.hasOwnProperty(String(i.taskId)) && Object.assign(o[t].tasksMap[i.taskId], i)) : (t = 1, (a = u.default.getTaskBases(n, r.DownloadKernel.CategroyViewID.Completed)).hasOwnProperty(String(i.taskId)) ? (a[i.taskId] = i, u.default.updateTaskMaps(n, r.DownloadKernel.CategroyViewID.Completed, a), o[t].tasksMap.hasOwnProperty(String(i.taskId)) && Object.assign(o[t].tasksMap[i.taskId], i)) : (t = 2, (a = u.default.getTaskBases(n, r.DownloadKernel.CategroyViewID.Recycle)) && a.hasOwnProperty(String(i.taskId)) && (a[i.taskId] = i, u.default.updateTaskMaps(n, r.DownloadKernel.CategroyViewID.Recycle, a), 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 a = u.default.getTaskBases(e.currentCategoryId, r.DownloadKernel.CategroyViewID.Completed);
                for (let s of t) a.hasOwnProperty(String(s.taskId)) && (a[s.taskId] = s, u.default.updateTaskMaps(e.currentCategoryId, r.DownloadKernel.CategroyViewID.Completed, a), 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 a = u.default.getTaskBases(e.currentCategoryId, r.DownloadKernel.CategroyViewID.Completed);
                for (let s of t) a.hasOwnProperty(String(s.taskId)) && (a[s.taskId] = s, u.default.updateTaskMaps(e.currentCategoryId, r.DownloadKernel.CategroyViewID.Completed, a), 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 = r.DownloadKernel.CategroyViewID.Downloading;
                t[0].taskStatus !== r.DownloadKernel.TaskStatus.Succeeded && t[0].taskStatus !== r.DownloadKernel.TaskStatus.Seeding || (i = 1, o = r.DownloadKernel.CategroyViewID.Completed);
                let a = e.taskList;
                -1 !== e.currentCategoryId && (a = e.taskListPrivate);
                let s = u.default.getTaskBases(e.currentCategoryId, o);
                for (let r of t) s.hasOwnProperty(String(r.taskId)) && (s[r.taskId] = r, u.default.updateTaskMaps(e.currentCategoryId, o, s), a[i].tasksMap.hasOwnProperty(String(r.taskId)) && n.Vue.set(a[i].tasksMap, String(r.taskId), Object.assign({}, r)))
            } while (0)
        }, UPDATE_TASK_MOVED(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                let i = 0, o = r.DownloadKernel.CategroyViewID.Downloading;
                t[0].taskStatus !== r.DownloadKernel.TaskStatus.Succeeded && t[0].taskStatus !== r.DownloadKernel.TaskStatus.Seeding || (i = 1, o = r.DownloadKernel.CategroyViewID.Completed);
                let a = e.taskList;
                -1 !== e.currentCategoryId && (a = e.taskListPrivate);
                let s = u.default.getTaskBases(e.currentCategoryId, o);
                for (let r of t) s.hasOwnProperty(String(r.taskId)) && (s[r.taskId] = r, u.default.updateTaskMaps(e.currentCategoryId, o, s), a[i].tasksMap.hasOwnProperty(String(r.taskId)) && n.Vue.set(a[i].tasksMap, String(r.taskId), Object.assign({}, r)))
            } while (0)
        }, UPDATE_TASK_STATUS(e, t) {
            do {
                if (!t || 0 === t.length) break;
                let i = 0, n = r.DownloadKernel.CategroyViewID.Downloading, o = {}, a = e.taskList;
                -1 !== e.currentCategoryId && (a = e.taskListPrivate);
                let s = u.default.getTaskBases(e.currentCategoryId, n);
                for (let r of t) s.hasOwnProperty(String(r.taskId)) && (s[r.taskId] = r, u.default.updateTaskMaps(e.currentCategoryId, n, s), a[i].tasksMap.hasOwnProperty(String(r.taskId)) && (o[r.taskId] = r));
                a[i].tasksMap = Object.assign({}, a[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].taskIds;
                -1 !== e.currentCategoryId && (i = e.taskListPrivate[0].taskIds);
                let n = [];
                for (let e of t) {
                    let t = i.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.splice(n[e], 1)[0]);
                i.splice(0, 0, ...o)
            } while (0)
        }, MOVE_TO_BOTTOM(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                let i = e.taskList[0].taskIds;
                -1 !== e.currentCategoryId && (i = e.taskListPrivate[0].taskIds);
                let n = [];
                for (let e of t) {
                    let t = i.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.splice(n[e], 1)[0]);
                i.splice(i.length, 0, ...o)
            } while (0)
        }, SELECT_PRE(e) {
            let t = null, i = [], n = [];
            if (e.currentCategoryViewId === r.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 === r.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 === r.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 === r.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 === r.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 === r.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 = r.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)
        }
    }, T = {
        attachTaskEvent({commit: e}) {
            p.attachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== r.DownloadKernel.TaskEventType.DetailChanged) break;
                    if (!t[1]) break;
                    let i = t[1].map(e => e.getTaskBaseInfo()), n = t[2];
                    n & r.DownloadKernel.TaskDetailChangedFlags.UserRead && e("UPDATE_TASK_READED", i), n !== r.DownloadKernel.TaskDetailChangedFlags.UserRead && e("UPDATE_TASK_INFO", i)
                } while (0)
            }), p.attachTaskEvent(r.DownloadKernel.TaskEventType.TaskMovingStateChange, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== r.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(r.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== r.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(r.DownloadKernel.TaskEventType.TaskRenamed, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== r.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(r.DownloadKernel.TaskEventType.TaskMovedEnd, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== r.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(r.DownloadKernel.TaskEventType.TaskCategoryMovedEnd, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== r.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(r.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== r.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)
            })
        }
    }, b = {
        currentCategoryTaskCount: e => {
            let t = 0;
            return e.currentCategoryViewId === r.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 === r.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 === r.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 === r.DownloadKernel.CategroyViewID.Completed ? i = 1 : e.currentCategoryViewId === r.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 !== r.DownloadKernel.TaskStatus.StartPending && n.taskStatus !== r.DownloadKernel.TaskStatus.Started || (t += 1)
            }
            return t
        }
    };
    t.default = {state: y, mutations: k, actions: T, getters: b}
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), r = i(0), a = i(3), s = i(38), l = i(59), d = i(11), u = i(35), c = i(40), h = i(43), f = i(9),
        p = i(91), g = i(113), m = i(48), v = h.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        y = r.default.getLogger("download-tool-bar"), w = d.DownloadKernelTaskManager.getTaskManager();
    let k = (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)
    }, T = () => "", b = e => {
        let t = "";
        return e.showPrivateSpaceOpenPage && (t = "is-disabled"), t
    }, C = (e, t) => {
        y.verbose(e);
        let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
        i === a.DownloadKernel.CategroyViewID.Downloading ? u.TaskOperatorNs.startTasks(n) : y.warning("toolbar start tasks but not in downloading category")
    }, S = e => {
        let t = e.currentCategoryViewId, i = e.currentSelectdTaskInfos, n = "is-disabled";
        return !e.showPrivateSpaceOpenPage && l.TaskStatusHelper.canStartSelectedTask(t, i) && (n = ""), n
    }, I = (e, t) => {
        y.verbose(e);
        let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
        i === a.DownloadKernel.CategroyViewID.Downloading ? u.TaskOperatorNs.pauseTasks(n, a.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
    }, A = (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)
    }, D = (e, t) => {
        f.XLStatNS.trackEvent("download_leftpanel", "top_delete_click");
        let i = t.currentSelectdTaskInfos;
        u.TaskOperatorNs.destroyTasks(i)
    }, x = e => {
        let t = e.currentCategoryViewId, i = e.currentSelectdTaskInfos, n = "is-disabled";
        return !e.showPrivateSpaceOpenPage && l.TaskStatusHelper.canDeleteSelectedTask(t, i) && (n = ""), n
    }, N = (e, t) => n(this, void 0, void 0, function* () {
        y.verbose(e);
        let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
        do {
            if (i === a.DownloadKernel.CategroyViewID.Downloading) break;
            if (1 !== n.length) break;
            let e = n[0].taskType;
            if (e === a.DownloadKernel.TaskType.Bt) {
                let e = w.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 === a.DownloadKernel.TaskType.Group) if (i === a.DownloadKernel.CategroyViewID.Completed) {
                let e = w.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 === a.DownloadKernel.CategroyViewID.Completed ? e = "finished" : i === a.DownloadKernel.CategroyViewID.Recycle && (e = "dustbin"), yield u.TaskOperatorNs.openTaskItem(n[0], void 0, void 0, e)
            }
            i === a.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 === a.DownloadKernel.CategroyViewID.Downloading) break;
            if (1 !== n.length) break;
            yield u.TaskOperatorNs.openTaskFolder(n[0]), i === a.DownloadKernel.CategroyViewID.Completed && u.TaskOperatorNs.markReadStatus(n, 1)
        } while (0)
    }), 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 !== a.DownloadKernel.CategroyViewID.Completed) break;
            if (1 === i.length) {
                if (!(yield c.TaskCtrlOperatorNS.canOpenSelectedTaskFile(i[0]))) break;
                o = ""
            }
        } while (0);
        return o
    }), 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 !== a.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: k,
            filterClass: b
        }, {id: "xlx-icon-nav-down", title: "下载", onClick: C, filterClass: S}, {
            id: "xlx-icon-nav-pause",
            title: "暂停",
            onClick: I,
            filterClass: _
        }, {id: "xlx-icon-nav-delete", title: "删除任务", onClick: A, filterClass: x}, {
            id: "xlx-icon-nav-vip",
            title: "会员",
            onClick: L,
            filterClass: T
        }, {id: "xlx-icon-nav-more", title: "更多", onClick: R, filterClass: b}],
        completedButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: k,
            filterClass: b
        }, {id: "xlx-icon-nav-file", title: "打开文件", onClick: N, filterClass: P}, {
            id: "xlx-icon-nav-folder",
            title: "打开文件夹",
            onClick: E,
            filterClass: O
        }, {id: "xlx-icon-nav-delete", title: "删除任务", onClick: A, filterClass: x}, {
            id: "xlx-icon-nav-vip",
            title: "会员",
            onClick: L,
            filterClass: T
        }, {id: "xlx-icon-nav-more", title: "更多", onClick: R, filterClass: b}],
        recycleButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: k,
            filterClass: b
        }, {
            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 === a.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 === a.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(a.DownloadKernel.CategroyViewID.Recycle).getTasks().size,
                    n = "is-disabled";
                return !t && i > 0 && (n = ""), n
            }
        }, {id: "xlx-icon-nav-vip", title: "会员", onClick: L, filterClass: T}, {
            id: "xlx-icon-nav-more",
            title: "更多",
            onClick: R,
            filterClass: b
        }],
        privateDownloadingButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: k,
            filterClass: b
        }, {id: "xlx-icon-nav-down", title: "下载", onClick: C, filterClass: S}, {
            id: "xlx-icon-nav-pause",
            title: "暂停",
            onClick: I,
            filterClass: _
        }, {id: "xlx-icon-nav-delete", title: "删除任务", onClick: D, filterClass: x}, {
            id: "xlx-icon-nav-vip",
            title: "会员",
            onClick: L,
            filterClass: T
        }, {id: "xlx-icon-nav-home", title: "私人空间设置", onClick: B, filterClass: F}],
        privateCompletedButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: k,
            filterClass: b
        }, {id: "xlx-icon-nav-file", title: "打开文件", onClick: N, filterClass: P}, {
            id: "xlx-icon-nav-folder",
            title: "打开文件夹",
            onClick: E,
            filterClass: O
        }, {id: "xlx-icon-nav-delete", title: "删除任务", onClick: D, filterClass: x}, {
            id: "xlx-icon-nav-vip",
            title: "会员",
            onClick: L,
            filterClass: T
        }, {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 W(e, t) {
        for (let i = 0; i < e.length; i++) {
            if (e[i].id === t) {
                o.Vue.delete(e, String(i));
                break
            }
        }
    }

    const j = {
        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) {
            W(e.downloadingButtons, t), W(e.completedButtons, t), W(e.recycleButtons, t), W(e.privateDownloadingButtons, t), W(e.privateCompletedButtons, t)
        }
    }, G = {
        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: j, actions: G, 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(393), r = n.default.getLogger("CommunityStore");
    r.verbose("enter");
    const a = {
        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) {
            r.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, r.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) => (r.information("getUnreadNums"), o.getUnreadMsgNum(n).then(t => {
            t.error || "ok" !== t.data.result || (r.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 => {
            r.information("getUnreadNums error")
        })),
        getUnreadCircleMsgNum: ({commit: e, state: t, rootState: i}, n) => o.getUnreadCircleMsgNum(n).then(t => {
            r.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 => {
            r.information("getUnreadCircleMsgNum error")
        }),
        getUnreadNoticeNum: ({commit: e, state: t, rootState: i}, n) => (r.information("getUnreadNoticeNum"), o.getUnreadNoticeNum(n).then(t => {
            r.information("获取未读系统通知数", t), t.error || "ok" !== t.data.result || e("SET_UNREAD_NUMS", {notice: t.data.count})
        }).catch(e => {
            r.information("getUnreadNoticeNum error")
        })),
        getUserInfo: ({commit: e, state: t, rootState: i}, n) => (r.information("getUserInfo", n), void 0 !== t.chatUsersInfo[n] ? (r.information("用户信息已存在"), Promise.resolve({data: {result: "ok"}})) : o.getUserInfo(n).then(t => (r.information("getUserInfo....", t), t.error || "ok" !== t.data.result || (r.information("getUserInfo....", t.data.user_info), e("SET_USERS_INFO", t.data.user_info)), t)).catch(e => {
            r.information("getUserInfo error")
        })),
        getUserSessionList: ({commit: e, state: t, rootState: i}, n) => o.getUserSessionList(n).then(i => {
            if (r.information("获取用户会话列表", i), !i.error && "ok" === i.data.result) {
                let o = 0, a = [];
                r.information("getUserSessionList userId: ", n, ", sessions:", i.data.sessions);
                for (let e = 0; e < i.data.sessions.length; e++) r.information("mineId--", t.mineId), i.data.sessions[e].user_id === t.mineId || a.includes(i.data.sessions[e].record.sender) || (o += i.data.sessions[e].unread, a.push(i.data.sessions[e].record.sender));
                o > 0 && e("SET_CHATS_NUM", o), r.information("私信未读数 chatNum", o)
            }
        }).catch(e => {
            r.information("getUserSessionList error")
        })
    }, l = {
        totalUnread(e, t, i) {
            let {star: n, comment: o, notice: r, chat: a, circle: s} = e.unreadNums;
            return n + o + r + a + s
        },
        UnreadMsgsLen: (e, t, i) => (r.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: a, 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), r = i(10), a = 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);
                r.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), a.Vue.delete(e.bookMarks, t);
                    let i = JSON.stringify(e.bookMarks);
                    r.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);
                        r.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);
                        r.ConfigNS.setValue("book-marks-section", "book-marks-key", i);
                        break
                    }
                }
            }
        }, h = {
            initBookMarks: ({commit: e, state: t, rootState: i}) => new Promise((e, t) => {
                let i = r.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);
                        r.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), r = i(18), a = o.default.getLogger("groupStore"), s = {
        SET_GROUP_DATA(e, t) {
            e.all = t
        }
    }, l = {
        getGroupData({commit: e, state: t, rootState: o}) {
            try {
                r.default.defaults.adapter = i(21);
                let t = new n.Agent({rejectUnauthorized: !1});
                return r.default.get("https://static-xl.a.88cdn.com/json/group_data.json", {httpsAgent: t}).then(t => {
                    a.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 => {
                    a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(726), r = i(97), a = {
        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 || [], r.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, r = n.findIndex(e => e === o);
            i ? -1 === r && n.push(o) : r >= 0 && n.splice(r, 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: r}) {
            return n(this, void 0, void 0, function* () {
                return o.default.toggleFollow({uid: i, follow: r}).then(t => {
                    e("ToggleFollow", {uid: i, follow: r})
                })
            })
        },
        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: a, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(a, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(56), r = i(51), a = i(3), s = i(16), l = i(10), d = i(12), u = i(89), c = i(4), h = i(0), f = i(57),
        p = i(5), g = i(17), m = i(52), v = o.ToastNotifyManagerNS.getToastNotifyManger(),
        y = s.DownloadKernelEventManager.getEventManager(), w = u.TabEventManagerNS.getEventEmitter(),
        k = h.default.getLogger("GetCoinPrizeToast");

    class T {
        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 === a.DownloadKernel.TaskStatus.Succeeded || o === a.DownloadKernel.TaskStatus.Seeding) {
                    k.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) : k.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) k.information("get-coin-prize toast pop now"); else if (yield this.hasCoinPrize()) {
                        let t = yield this.getToastTime();
                        k.information("toast time", t), t > 0 && ((e = v.getTopNotify()) && e.getId() === o.ToastNotifyManagerNS.notifyIdGetCoinPrize ? k.information("get-coin-prize toast pop now2") : (v.showNotify(o.ToastNotifyManagerNS.notifyIdGetCoinPrize, r.ToastNotifyItemType.Custom, "恭喜完成每日下载任务", t, "get-coin-prize-toast"), this.addPopTimes().catch()))
                    } else k.information("hasCoinPrize false")
                } else k.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;
                        k.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())) {
                        k.information("mainWindow minimized or hide");
                        break
                    }
                    let i = yield c.client.callServerFunction("GetCurrentNav");
                    if (i !== m.NavViewID.Download) {
                        k.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"))) {
                        k.information("not login");
                        break
                    }
                    let t = yield c.client.callServerFunction("GetUserID");
                    if (!t || "" === t || "0" === t) {
                        k.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)) {
                            k.information("toast clicked.");
                            break
                        }
                        let e = l.ConfigNS.getValue("Toast", "GetCoinPrizePopTimes" + t, 0);
                        if (e >= 2) {
                            k.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"))) {
                        k.information("not login");
                        break
                    }
                    let t = yield c.client.callServerFunction("GetUserID");
                    if (!t || "" === t || "0" === t) {
                        k.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)) {
                            k.information("pop clicked.");
                            break
                        }
                        let i = l.ConfigNS.getValue("Toast", "GetCoinPrizePopTimes" + t, 0);
                        if (1 === i) {
                            k.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) {
                        k.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)) {
                            k.information("pop clicked.");
                            break
                        }
                        let i = l.ConfigNS.getValue("Toast", "GetCoinPrizePopTimes" + t, 0);
                        k.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())) {
                        k.information("onCheckMainWindowState canPopState || getCurrentPopTimes false");
                        break
                    }
                    this.toastNotify().catch()
                } while (0)
            })
        }

        init() {
            return n(this, void 0, void 0, function* () {
                this.taskStatusChangedEventId = y.attachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    e && e[0] === a.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), w.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(a.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), w.removeListener(u.TabEventManagerNS.EventType.ChangeTab, this.checkMainWindowStateListener), this.checkMainWindowStateListener = null, this.loginEventId && (g.NativeCallModule.nativeCall.DetachNativeEvent("onLoginSuc", this.loginEventId), this.loginEventId = void 0)
            })
        }
    }

    let b = null;
    t.initGetCoinPrizeToast = function () {
        b || (b = new T), b.init().catch()
    }, t.uninitGetCoinPrizeToast = function () {
        b && b.uninit().catch()
    }
}, function (e, t, i) {
    "use strict";
    var n = i(982);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(172);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(417), o = i(174);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(905);
    var a = i(1), s = Object(a.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(176);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\search-view\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(421), o = i(178);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(737);
    var a = i(1), s = Object(a.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(427), o = i(180);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(736);
    var a = i(1), s = Object(a.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(182);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\address-bar\\address-bar-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(454), o = i(184);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(986);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(988);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(186);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(422), o = i(188);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(190);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\home-page\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(433), o = i(192);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(742);
    var a = i(1), s = Object(a.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(990);
    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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(2), a = o.default.getLogger("Thunder.renderer.contextmenu"), s = i(5), l = i(8), d = i(19),
        u = i(7), c = i(49), h = i(111), f = i(4), p = i(42), g = i(38), m = i(3), v = i(33), y = i(12),
        w = u.default(r.join(__rootDir, "../bin/ThunderHelper.node")),
        k = ".asf;.avi;.exe;.iso;.mp3;.mp4;.mkv;.mpeg;.mpg;.mpga;.ra;.rar;||.rm;.rmvb;.tar;.wma;.wmp;.wmv;.mov;.zip;.3gp;.chm;.mdf;",
        T = ["http://", "https://", "ftp://"], b = ["thunder://", "thunders://", "ed2k://", "magnet:"];

    function C(e) {
        let t = !1;
        if (e) for (let i = 0; i < T.length; ++i) {
            let n = T[i];
            if (0 === e.indexOf(n)) {
                t = !0;
                break
            }
        }
        return t
    }

    function S(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 I(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 (C(e)) {
                    let i = r.extname(e);
                    if (!i || i.length <= 0) break;
                    i += ";", k.indexOf(i) > -1 && (t = !0)
                } else S(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 A(e) {
        do {
            if (s.isNullOrUndefined(e)) break;
            let t = e;
            !1 === x(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) {
            a.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 (I(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 = r.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: N}, {
        label: "链接另存为",
        onclick: E
    }, {
        label: "复制链接地址", onclick: function (e, t) {
            w.copyTextToClipBoard(t.linkURL)
        }
    }], t.contextMenuMedia = [{
        label: "在新标签页中打开图片", onclick: function (e, t) {
            A(t.sourceURL)
        }
    }, {
        label: "图片另存为", onclick: function (e, t) {
            return n(this, void 0, void 0, function* () {
                let e = r.basename(t.sourceURL), o = r.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 a = void 0;
                a = "" !== 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, a).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) {
            w.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: N}, {label: "链接另存为", onclick: E}, {
        label: "复制链接地址",
        onclick: function (e, t) {
            w.copyTextToClipBoard(t.linkURL), I(t.linkURL) && a.information(t.linkURL)
        }
    }];
    let D = {
        page: t.contextMenuPage,
        selection: t.contextMenuSelection,
        edit: t.contextMenuEditable,
        link: t.contextMenuLink,
        media: t.contextMenuMedia
    };

    function x(e) {
        let t = !1;
        do {
            let i = e.trim();
            if (s.isNullOrUndefined(i)) break;
            if (t = /([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(i)) {
                t = 1 === w.isPingHostValid(i)
            }
        } while (0);
        return t
    }

    function N(e, t) {
        I(t.linkURL) ? a.information(t.linkURL) : A(t.linkURL)
    }

    function E(e, t) {
        return n(this, void 0, void 0, function* () {
            if (I(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" !== r.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, r = [];
            n.elemTypeFlag & h.PopupElemTypeFlag.EDITABLE ? r.push(...D.edit) : (n.elemTypeFlag & h.PopupElemTypeFlag.MEDIA && r.push(...D.media), n.elemTypeFlag & h.PopupElemTypeFlag.LINK && r.push(...D.link), n.elemTypeFlag & h.PopupElemTypeFlag.SELECTION && r.push(...D.selection)), n.elemTypeFlag & h.PopupElemTypeFlag.PAGE && 0 === r.length && r.push(...D.page);
            let a = new Map;
            r.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), a.set(o, t)
                }
            }), o.curRegistryMap = a, o.curMenuParam = n
        }), e.on("context-menu-command", (e, t, i) => {
            let n = e.target, o = n.curRegistryMap, r = n.curMenuParam;
            n.curRegistryMap = null, n.curMenuParam = null;
            let s = o.get(i);
            null !== s ? s.onclick(e.target, r) : a.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(194);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\browser-view\\browser-view-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(434), o = i(196);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(748), i(749);
    var a = i(1), s = Object(a.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(992);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(994);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(997);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(198);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\message-view\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(423), o = i(200);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(752);
    var a = i(1), s = Object(a.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(999);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(419), o = i(202);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(754);
    var a = i(1), s = Object(a.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(1001);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(204);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(424), o = i(206);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(208);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(435), o = i(210);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(212);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar-button-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(465), o = i(214);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(216);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar-vip-button-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(466), o = i(218);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(17), r = i(9), a = i(18), s = i(2), l = i(8), d = i(67),
        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 {
                    a.default.defaults.adapter = i(21), a.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 a = `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 && (a = `${a},${i}`), u.information(`sendStat: event=${e}, attr1=${t}, statExtData=${a}`), a = encodeURIComponent(a), r.XLStatNS.trackEvent(e, t, "", 0, 0, 0, 0, a)
        }

        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()),
                r = o.getFullYear(), a = o.getMonth(), s = o.getDate(),
                l = (o = new Date(r + "-" + (a < 10 ? "0" + (a + 1) : a + 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(), r = i;
            this.mVipIconData && this.mVipIconData[e] && this.mVipIconData[e].online && (r = new Date(this.mVipIconData[e].online).getTime());
            let a = i;
            this.mVipIconData && this.mVipIconData[e] && this.mVipIconData[e].offline && (a = new Date(this.mVipIconData[e].offline).getTime()), u.information("updateUIPrivate, curDate=" + String(i) + ", onlineDate=" + String(r) + ", offlineDate=" + String(a)), r >= i || i >= a || o.NativeCallModule.nativeCall.CallNativeFunction("GetValue", "ToolBarButtonVipIcon", t, "", (i, o) => n(this, void 0, void 0, function* () {
                let n = "";
                0 === i && (n = o);
                let r = this.mVueObj.clickUrl;
                this.mVipIconData && this.mVipIconData[e] && ("string" == typeof this.mVipIconData[e].xdslink && "" !== this.mVipIconData[e].xdslink ? r = this.mVipIconData[e].xdslink.trim() : "string" == typeof this.mVipIconData[e].link && "" !== this.mVipIconData[e].link && (r = this.mVipIconData[e].link.trim()));
                let a = "";
                a = "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", a += "_", a += this.mModel, -1 === r.toLowerCase().indexOf("referfrom") && (r = -1 === r.indexOf("?") ? `${r}?referfrom=${a}` : `${r}&referfrom=${a}`), this.mVueObj.clickUrl = r, this.mVueObj.cfgType = t, this.mVueObj.hasRedPoint = n !== r;
                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 a.default.defaults.adapter = i(21), a.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(220);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\status-bar-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(436), o = i(222);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(34), r = i(63);
    !function (e) {
        let t = 0, i = 0, a = "", 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() === a && (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(), a = n.ConfigNS.getValue("FlowMonitor", "Date", ""), u() && (t = 0, i = 0, f(0, 0)), s = t, l = i, r.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(224);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\upgrade-task-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(437), o = i(226);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(3), a = i(11), s = i(25), l = i(68), d = i(10), u = i(5),
        c = o.default.getLogger("PrivateSpace.Upgrade"), h = a.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], a = o.getType();
                    if (c.information("addTaskListToNewPrivateSpace taskType:", a), a === r.DownloadKernel.TaskType.P2sp) {
                        let i = o.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskUrl),
                            n = {taskType: r.DownloadKernel.TaskType.P2sp, value: i};
                        t = yield this.insertTaskToNewPrivateSpace(e, o, n)
                    } else if (a === r.DownloadKernel.TaskType.Bt) {
                        let i = o.getExtraObject().getInfoId(), n = {taskType: r.DownloadKernel.TaskType.Bt, value: i};
                        t = yield this.insertTaskToNewPrivateSpace(e, o, n)
                    } else if (a === r.DownloadKernel.TaskType.Emule) {
                        let i = o.getExtraObject().getFileHash(),
                            n = {taskType: r.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(428), o = i(228);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(438), o = i(230);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(429), o = i(232);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(430), o = i(234);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(236);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(439), o = i(238);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(870);
    var a = i(1), s = Object(a.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(240);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\scan-code-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(467), o = i(242);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), r = i(2), a = 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 = a(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 = a(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 = a(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 = a(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 = a(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 = a(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 = r.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 : r.dirname(e) === e ? i = !1 : (yield g(r.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), r = o.createWriteStream(i);
                    n = new Promise(e => {
                        t.pipe(r).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 = a(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 = a(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 = a(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, a = yield h(i);
                if (a.isDirectory()) {
                    n = yield g(o);
                    let s = yield c(i);
                    for (let l = 0; l < s.length; l++) {
                        let d = r.join(i, s[l]), u = r.join(o, s[l]);
                        (n = yield t(d)) && (n = (a = 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 = a(o.mkdtemp), n = (yield Promise.resolve().then(() => i(54))).tmpdir();
                try {
                    e = yield t(`${n}${r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(74), r = i(0), a = i(782), s = r.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 a.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";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), r = i(74), a = i(507), s = "main-renderer";
    !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(r.XmpPlayerFunction.getXmpPlayType)
            })
        }

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

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

        e.openPayVipUrl = function (e) {
            o.client.callRemoteClientFunction("vip-download-webview", "OpenPayVipUrl", e).catch()
        }, e.callXmp = t, e.getXmpPlayType = i, e.isYunBo = l, e.isPlayAndDownload = function () {
            return n(this, void 0, void 0, function* () {
                return (yield i()) === r.XmpPlayType.downloadAndPlay
            })
        }, e.isLocalPlay = function () {
            return n(this, void 0, void 0, function* () {
                return (yield i()) === r.XmpPlayType.localFile
            })
        }, e.getXmpCurrentMode = function () {
            return n(this, void 0, void 0, function* () {
                return t(r.XmpPlayerFunction.getXmpCurrentMode)
            })
        }, e.getCurrentTaskGcid = function () {
            return n(this, void 0, void 0, function* () {
                return t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.XmpMediaAttr.Gcid)
            })
        }, e.getCurrentTaskId = d, e.getCurrentTaskIdOrPanId = function () {
            return n(this, void 0, void 0, function* () {
                return (yield l()) ? t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.XmpMediaAttr.PanFileId) : t(r.XmpPlayerFunction.getPlayingTaskId)
            })
        }, e.getCurrentTaskStatus = function () {
            return n(this, void 0, void 0, function* () {
                let e = yield d();
                return a.default.getTaskStatus(e)
            })
        }, e.getStatPlayType = function () {
            return n(this, void 0, void 0, function* () {
                return t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.XmpMediaAttr.PlayType)
            })
        }, e.getStatPlayfrom = function () {
            return n(this, void 0, void 0, function* () {
                return (yield t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.XmpMediaAttr.PlayFrom)) || ""
            })
        }, e.getStatOpenFrom = function () {
            return n(this, void 0, void 0, function* () {
                return (yield t(r.XmpPlayerFunction.getCurrentMediaAttribute, r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(544), r = i(784), a = i(405), s = i(4), l = i(543),
        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 a.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"),
                    r = e.verify || (yield s.client.callServerFunction("GetSessionID")), a = (new Date).getTime(),
                    d = e.verifyType, u = this.getUriParam(i, a, 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, r, h, f), this.accept = o.HttpJsonCryptoNS.getAccept(), e.userId = n, e.random = a, 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(a => n(this, void 0, void 0, function* () {
                        let n = [];
                        if (o === e.userId) {
                            let i = a.headers["random-num"];
                            d.information("random", i);
                            let o = null, s = void 0, u = void 0;
                            do {
                                if (200 !== (u = a.statusCode)) {
                                    s = r.HttpErrorNS.errorStatusCode;
                                    break
                                }
                                if (!a.body || !i) {
                                    s = r.HttpErrorNS.errorData;
                                    break
                                }
                                {
                                    let n = Number(i).valueOf();
                                    o = l.VipTaskHttpPackageNS.praseTokenBuffer(e.userId, n, a.body, t)
                                }
                                if (!o) {
                                    s = r.HttpErrorNS.errorPrase;
                                    break
                                }
                                s = r.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(r.HttpErrorNS.errorConnect, e)), i(n)
                    }))
                }))
            })
        }

        createTokenResponse(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                let n = [];
                if (e === r.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 === r.HttpErrorNS.errorStatusCode && (o = `new Error occupied, message status: ${i}`), o || (o = r.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(789), o = i(546), r = i(807), a = i(819), s = i(820), l = i(821);

    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 a;
            case"png":
            case"image/png":
            default:
                return r
        }
    }

    function c(e, t, i) {
        if (!i.cb) return new Promise(function (n, r) {
            try {
                var a = o.create(t, i.opts);
                return e(a, i.opts, function (e, t) {
                    return e ? r(e) : n(t)
                })
            } catch (e) {
                r(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(822).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 a
            }
        }(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 r = d(t, i, o);
        return c(u(r.opts.type || function (e) {
            return e.slice(2 + (e.lastIndexOf(".") - 1 >>> 0)).toLowerCase()
        }(e)).renderToFile.bind(null, e), t, r)
    }, 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(790);
    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(92);

    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(84).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)), r = [i - 7], a = 1; a < t - 1; a++) r[a] = r[a - 1] - o;
        return r.push(6), r.reverse()
    }, t.getPositions = function (e) {
        for (var i = [], n = t.getRowColCoords(e), o = n.length, r = 0; r < o; r++) for (var a = 0; a < o; a++) 0 === r && 0 === a || 0 === r && a === o - 1 || r === o - 1 && 0 === a || i.push([n[r], n[a]]);
        return i
    }
}, function (e, t, i) {
    var n = i(84).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, r = 10;

    function a(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, r = 0, a = null, s = null, l = 0; l < t; l++) {
            o = r = 0, a = s = null;
            for (var d = 0; d < t; d++) {
                var u = e.get(l, d);
                u === a ? o++ : (o >= 5 && (n += i + (o - 5)), a = u, o = 1), (u = e.get(d, l)) === s ? r++ : (r >= 5 && (n += i + (r - 5)), s = u, r = 1)
            }
            o >= 5 && (n += i + (o - 5)), r >= 5 && (n += i + (r - 5))
        }
        return n
    }, t.getPenaltyN2 = function (e) {
        for (var t = e.size, i = 0, o = 0; o < t - 1; o++) for (var r = 0; r < t - 1; r++) {
            var a = e.get(o, r) + e.get(o, r + 1) + e.get(o + 1, r) + e.get(o + 1, r + 1);
            4 !== a && 0 !== a || i++
        }
        return i * n
    }, t.getPenaltyN3 = function (e) {
        for (var t = e.size, i = 0, n = 0, r = 0, a = 0; a < t; a++) {
            n = r = 0;
            for (var s = 0; s < t; s++) n = n << 1 & 2047 | e.get(a, s), s >= 10 && (1488 === n || 93 === n) && i++, r = r << 1 & 2047 | e.get(s, a), s >= 10 && (1488 === r || 93 === r) && 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) * r
    }, 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, a(e, o, n))
    }, t.getBestMask = function (e, i) {
        for (var n = Object.keys(t.Patterns).length, o = 0, r = 1 / 0, a = 0; a < n; a++) {
            i(a), t.applyMask(a, e);
            var s = t.getPenaltyN1(e) + t.getPenaltyN2(e) + t.getPenaltyN3(e) + t.getPenaltyN4(e);
            t.applyMask(a, e), s < r && (r = s, o = a)
        }
        return o
    }
}, function (e, t, i) {
    var n = i(92), o = i(797);

    function r(e) {
        this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree)
    }

    r.prototype.initialize = function (e) {
        this.degree = e, this.genPoly = o.generateECPolynomial(this.degree)
    }, r.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), r = o.mod(i, this.genPoly), a = this.degree - r.length;
        if (a > 0) {
            var s = new n(this.degree);
            return s.fill(0), r.copy(s, a), s
        }
        return r
    }, e.exports = r
}, function (e, t, i) {
    var n = i(92), o = i(798);
    t.mul = function (e, t) {
        var i = new n(e.length + t.length - 1);
        i.fill(0);
        for (var r = 0; r < e.length; r++) for (var a = 0; a < t.length; a++) i[r + a] ^= o.mul(e[r], t[a]);
        return i
    }, t.mod = function (e, t) {
        for (var i = new n(e); i.length - t.length >= 0;) {
            for (var r = i[0], a = 0; a < t.length; a++) i[a] ^= o.mul(t[a], r);
            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]), r = 0; r < e; r++) i = t.mul(i, [1, o.exp(r)]);
        return i
    }
}, function (e, t, i) {
    var n = i(92);
    if (n.alloc) var o = n.alloc(512), r = n.alloc(256); else o = new n(512), r = new n(256);
    !function () {
        for (var e = 1, t = 0; t < 255; t++) o[t] = e, r[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 r[e]
    }, t.exp = function (e) {
        return o[e]
    }, t.mul = function (e, t) {
        return 0 === e || 0 === t ? 0 : o[r[e] + r[t]]
    }
}, function (e, t, i) {
    var n = i(84), o = i(547), r = i(409), a = i(85), s = i(548), l = i(550), d = n.getBCHDigit(7973);

    function u(e, t) {
        return a.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 = a.BYTE);
        var r = 8 * (n.getSymbolTotalCodewords(e) - o.getTotalCodewordsCount(e, t));
        if (i === a.MIXED) return r;
        var l = r - u(i, e);
        switch (i) {
            case a.NUMERIC:
                return Math.floor(l / 10 * 3);
            case a.ALPHANUMERIC:
                return Math.floor(l / 11 * 2);
            case a.KANJI:
                return Math.floor(l / 13);
            case a.BYTE:
            default:
                return Math.floor(l / 8)
        }
    }, t.getBestVersionForData = function (e, i) {
        var n, o = r.from(i, r.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, a.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(84), o = n.getBCHDigit(1335);
    t.getEncodedBits = function (e, t) {
        for (var i = e.bit << 3 | t, r = i << 10; n.getBCHDigit(r) - o >= 0;) r ^= 1335 << n.getBCHDigit(r) - o;
        return 21522 ^ (i << 10 | r)
    }
}, function (e, t, i) {
    var n = i(85), o = i(802), r = i(803), a = i(804), s = i(805), l = i(549), d = i(84), u = i(806);

    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), r = 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(r, 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 r.getBitsLength(e);
            case n.KANJI:
                return s.getBitsLength(e);
            case n.BYTE:
                return a.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 r(e);
            case n.KANJI:
                return new s(e);
            case n.BYTE:
                return new a(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: {}}, r = ["start"], a = 0; a < e.length; a++) {
                for (var s = e[a], l = [], d = 0; d < s.length; d++) {
                    var u = s[d], c = "" + a + d;
                    l.push(c), i[c] = {node: u, lastCount: 0}, o[c] = {};
                    for (var h = 0; h < r.length; h++) {
                        var f = r[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))
                    }
                }
                r = l
            }
            for (h = 0; h < r.length; h++) o[r[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), r = u.find_path(o.map, "start", "end"), a = [], s = 1; s < r.length - 1; s++) a.push(o.table[r[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)
            }, [])
        }(a))
    }, t.rawSplit = function (e) {
        return t.fromArray(f(e, d.isKanjiModeEnabled()))
    }
}, function (e, t, i) {
    var n = i(85);

    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(85),
        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 r(e) {
        this.mode = n.ALPHANUMERIC, this.data = e
    }

    r.getBitsLength = function (e) {
        return 11 * Math.floor(e / 2) + e % 2 * 6
    }, r.prototype.getLength = function () {
        return this.data.length
    }, r.prototype.getBitsLength = function () {
        return r.getBitsLength(this.data.length)
    }, r.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 = r
}, function (e, t, i) {
    var n = i(92), o = i(85);

    function r(e) {
        this.mode = o.BYTE, this.data = new n(e)
    }

    r.getBitsLength = function (e) {
        return 8 * e
    }, r.prototype.getLength = function () {
        return this.data.length
    }, r.prototype.getBitsLength = function () {
        return r.getBitsLength(this.data.length)
    }, r.prototype.write = function (e) {
        for (var t = 0, i = this.data.length; t < i; t++) e.put(this.data[t], 8)
    }, e.exports = r
}, function (e, t, i) {
    var n = i(85), o = i(84);

    function r(e) {
        this.mode = n.KANJI, this.data = e
    }

    r.getBitsLength = function (e) {
        return 13 * e
    }, r.prototype.getLength = function () {
        return this.data.length
    }, r.prototype.getBitsLength = function () {
        return r.getBitsLength(this.data.length)
    }, r.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 = r
}, function (e, t, i) {
    "use strict";
    var n = {
        single_source_shortest_paths: function (e, t, i) {
            var o = {}, r = {};
            r[t] = 0;
            var a, s, l, d, u, c, h, f = n.PriorityQueue.make();
            for (f.push(t, 0); !f.empty();) for (l in s = (a = f.pop()).value, d = a.cost, u = e[s] || {}) u.hasOwnProperty(l) && (c = d + u[l], h = r[l], (void 0 === r[l] || h > c) && (r[l] = c, f.push(l, c), o[l] = s));
            if (void 0 !== i && void 0 === r[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(808).PNG, r = i(151);
    t.render = function (e, t) {
        var i = r.getOptions(t), n = i.rendererOpts, a = r.getImageWidth(e.modules.size, i);
        n.width = a, n.height = a;
        var s = new o(n);
        return r.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), r = [];
        o.on("error", n), o.on("data", function (e) {
            r.push(e)
        }), o.on("end", function () {
            n(null, Buffer.concat(r))
        }), o.pack()
    }, t.renderToFile = function (e, i, o, r) {
        void 0 === r && (r = o, o = void 0);
        var a = n.createWriteStream(e);
        a.on("error", r), a.on("close", r), t.renderToFileStream(a, 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(100), r = i(809), a = i(811), s = i(814), 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 r(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 a(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, r, a, s) {
        if (n |= 0, o |= 0, r |= 0, a |= 0, s |= 0, (i |= 0) > e.width || n > e.height || i + o > e.width || n + r > e.height) throw new Error("bitblt reading outside image");
        if (a > t.width || s > t.height || a + o > t.width || s + r > t.height) throw new Error("bitblt writing outside image");
        for (var l = 0; l < r; l++) e.data.copy(t.data, (s + l) * t.width + a << 2, (n + l) * e.width + i << 2, (n + l) * e.width + i + o << 2)
    }, l.prototype.bitblt = function (e, t, i, n, o, r, a) {
        return l.bitblt(this, e, t, i, n, o, r, a), 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 r = e.data[n + o] / 255;
                r = Math.pow(r, 1 / 2.2 / e.gamma), e.data[n + o] = Math.round(255 * r)
            }
            e.gamma = 0
        }
    }, l.prototype.adjustGamma = function () {
        l.adjustGamma(this)
    }
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(80), r = i(551), a = i(810), s = i(555), l = i(557), d = i(558), u = e.exports = function (e) {
        r.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, r), 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, r = this.emit.bind(this, "error");
            this._inflate.on("error", function (e) {
                n && r(e)
            }), this._filter.on("complete", this._complete.bind(this));
            var a = this._filter.write.bind(this._filter);
            this._inflate.on("data", function (e) {
                n && (e.length > n && (e = e.slice(0, n)), n -= e.length, a(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 a(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(551), r = i(552), a = e.exports = function (e) {
        o.call(this);
        var t = [], i = this;
        this._filter = new r(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(a, o)
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(100), r = i(116), a = i(559), s = e.exports = function (e) {
        o.call(this);
        var t = e || {};
        this._packer = new a(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(r.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(116);
    e.exports = function (e, t, i, o) {
        var r, a = -1 !== [n.COLORTYPE_COLOR_ALPHA, n.COLORTYPE_ALPHA].indexOf(o.colorType);
        if (o.colorType === o.inputColorType) {
            var s = (r = new ArrayBuffer(2), new DataView(r).setInt16(0, 256, !0), 256 !== new Int16Array(r)[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, r, s, l = d;
            switch (o.inputColorType) {
                case n.COLORTYPE_COLOR_ALPHA:
                    l = e[t + 3], i = e[t], r = e[t + 1], s = e[t + 2];
                    break;
                case n.COLORTYPE_COLOR:
                    i = e[t], r = e[t + 1], s = e[t + 2];
                    break;
                case n.COLORTYPE_ALPHA:
                    l = e[t + 1], r = i = e[t], s = i;
                    break;
                case n.COLORTYPE_GRAYSCALE:
                    r = i = e[t], s = i;
                    break;
                default:
                    throw new Error("input color type:" + o.inputColorType + " is not supported at present")
            }
            return o.inputHasAlpha && (a || (l /= d, i = Math.min(Math.max(Math.round((1 - l) * g.red + l * i), 0), d), r = Math.min(Math.max(Math.round((1 - l) * g.green + l * r), 0), d), s = Math.min(Math.max(Math.round((1 - l) * g.blue + l * s), 0), d))), {
                red: i,
                green: r,
                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 w = m(l, f);
            switch (o.colorType) {
                case n.COLORTYPE_COLOR_ALPHA:
                case n.COLORTYPE_COLOR:
                    8 === o.bitDepth ? (h[p] = w.red, h[p + 1] = w.green, h[p + 2] = w.blue, a && (h[p + 3] = w.alpha)) : (h.writeUInt16BE(w.red, p), h.writeUInt16BE(w.green, p + 2), h.writeUInt16BE(w.blue, p + 4), a && h.writeUInt16BE(w.alpha, p + 6));
                    break;
                case n.COLORTYPE_ALPHA:
                case n.COLORTYPE_GRAYSCALE:
                    var k = (w.red + w.green + w.blue) / 3;
                    8 === o.bitDepth ? (h[p] = k, a && (h[p + 1] = w.alpha)) : (h.writeUInt16BE(k, p), a && h.writeUInt16BE(w.alpha, p + 2))
            }
            f += u, p += c
        }
        return h
    }
}, function (e, t, i) {
    "use strict";
    var n = i(554);
    var o = {
        0: function (e, t, i, n, o) {
            for (var r = 0; r < i; r++) n[o + r] = e[t + r]
        }, 1: function (e, t, i, n, o, r) {
            for (var a = 0; a < i; a++) {
                var s = a >= r ? e[t + a - r] : 0, l = e[t + a] - s;
                n[o + a] = l
            }
        }, 2: function (e, t, i, n, o) {
            for (var r = 0; r < i; r++) {
                var a = t > 0 ? e[t + r - i] : 0, s = e[t + r] - a;
                n[o + r] = s
            }
        }, 3: function (e, t, i, n, o, r) {
            for (var a = 0; a < i; a++) {
                var s = a >= r ? e[t + a - r] : 0, l = t > 0 ? e[t + a - i] : 0, d = e[t + a] - (s + l >> 1);
                n[o + a] = d
            }
        }, 4: function (e, t, i, o, r, a) {
            for (var s = 0; s < i; s++) {
                var l = s >= a ? e[t + s - a] : 0, d = t > 0 ? e[t + s - i] : 0,
                    u = t > 0 && s >= a ? e[t + s - (i + a)] : 0, c = e[t + s] - n(l, d, u);
                o[r + s] = c
            }
        }
    }, r = {
        0: function (e, t, i) {
            for (var n = 0, o = t + i, r = t; r < o; r++) n += Math.abs(e[r]);
            return n
        }, 1: function (e, t, i, n) {
            for (var o = 0, r = 0; r < i; r++) {
                var a = r >= n ? e[t + r - n] : 0, s = e[t + r] - a;
                o += Math.abs(s)
            }
            return o
        }, 2: function (e, t, i) {
            for (var n = 0, o = t + i, r = t; r < o; r++) {
                var a = t > 0 ? e[r - i] : 0, s = e[r] - a;
                n += Math.abs(s)
            }
            return n
        }, 3: function (e, t, i, n) {
            for (var o = 0, r = 0; r < i; r++) {
                var a = r >= n ? e[t + r - n] : 0, s = t > 0 ? e[t + r - i] : 0, l = e[t + r] - (a + s >> 1);
                o += Math.abs(l)
            }
            return o
        }, 4: function (e, t, i, o) {
            for (var r = 0, a = 0; a < i; a++) {
                var s = a >= o ? e[t + a - o] : 0, l = t > 0 ? e[t + a - i] : 0,
                    d = t > 0 && a >= o ? e[t + a - (i + o)] : 0, u = e[t + a] - n(s, l, d);
                r += Math.abs(u)
            }
            return r
        }
    };
    e.exports = function (e, t, i, n, a) {
        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 && (a *= 2);
        for (var l = t * a, 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 = r[s[g]](e, u, l, a);
                m < p && (h = s[g], p = m)
            }
            c[d] = h, d++, o[h](e, u, l, c, d, a), d += l, u += l
        }
        return c
    }
}, function (e, t, i) {
    "use strict";
    var n = i(815), o = i(818);
    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), r = i(816);
    o.deflateSync || (n = !1);
    var a = i(560), s = i(817), l = i(555), d = i(557), u = i(558);
    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 a(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 = r(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 w = d.dataToBitMap(y, c);
        y = null;
        var k = u(w, c);
        return c.data = k, c.gamma = h || 0, c
    }
}, function (e, t, i) {
    "use strict";
    var n = i(502).ok, o = i(80), r = i(5), a = i(96).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 r, 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) {
            r = 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 r;
        if (p >= a) throw l(this), new RangeError("Cannot create final Buffer. It would be larger than 0x" + a.toString(16) + " bytes");
        var v = Buffer.concat(f, p);
        return l(this), v
    }, r.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(560), o = i(552);
    t.process = function (e, t) {
        var i = [], r = new n(e);
        return new o(t, {
            read: r.read.bind(r), write: function (e) {
                i.push(e)
            }, complete: function () {
            }
        }).start(), r.process(), Buffer.concat(i)
    }
}, function (e, t, i) {
    "use strict";
    var n = !0, o = i(80);
    o.deflateSync || (n = !1);
    var r = i(116), a = i(559);
    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 a(t || {}), s = [];
        s.push(new Buffer(r.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(151), o = {WW: " ", WB: "▄", BB: "█", BW: "▀"};
    t.render = function (e, t, i) {
        var r = e.modules.size, a = e.modules.data, s = n.getOptions(t), l = "",
            d = Array(r + 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 < r; f += 2) {
            l += h;
            for (var p = 0; p < r; p++) {
                var g = a[f * r + p], m = a[(f + 1) * r + 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, r) {
        void 0 === r && (r = o, o = void 0);
        var a = i(41), s = t.render(n, o);
        a.writeFile(e, s, r)
    }
}, function (e, t) {
    t.render = function (e, t, i) {
        var n = e.modules.size, o = e.modules.data, r = "[47m  [0m", a = "", s = Array(n + 3).join(r),
            l = Array(2).join(r);
        a += s + "\n";
        for (var d = 0; d < n; ++d) {
            a += r;
            for (var u = 0; u < n; u++) a += o[d * n + u] ? "[40m  [0m" : r;
            a += l + "\n"
        }
        return a += s + "\n", "function" == typeof i && i(null, a), a
    }
}, function (e, t, i) {
    var n = i(561);
    t.render = n.render, t.renderToFile = function (e, n, o, r) {
        void 0 === r && (r = o, o = void 0);
        var a = 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);
        a.writeFile(e, s, r)
    }
}, function (e, t, i) {
    var n = i(823), o = i(546), r = i(824), a = i(561);

    function s(e, t, i, r, a) {
        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 = r = void 0) : 2 !== l || t.getContext || (r = i, i = t, t = void 0), new Promise(function (n, a) {
                try {
                    var s = o.create(i, r);
                    n(e(s, t, r))
                } catch (e) {
                    a(e)
                }
            })
        }
        if (l < 2) throw new Error("Too few arguments provided");
        2 === l ? (a = i, i = t, t = r = void 0) : 3 === l && (t.getContext && void 0 === a ? (a = r, r = void 0) : (a = r, r = i, i = t, t = void 0));
        try {
            var u = o.create(i, r);
            a(null, e(u, t, r))
        } catch (e) {
            a(e)
        }
    }

    t.create = o.create, t.toCanvas = s.bind(null, r.render), t.toDataURL = s.bind(null, r.renderToDataURL), t.toString = s.bind(null, function (e, t, i) {
        return a.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(151);
    t.render = function (e, t, i) {
        var o = i, r = t;
        void 0 !== o || t && t.getContext || (o = t, t = void 0), t || (r = function () {
            try {
                return document.createElement("canvas")
            } catch (e) {
                throw new Error("You need to specify a canvas element")
            }
        }()), o = n.getOptions(o);
        var a = n.getImageWidth(e.modules.size, o), s = r.getContext("2d"), l = s.createImageData(a, a);
        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, r, a), s.putImageData(l, 0, 0), r
    }, t.renderToDataURL = function (e, i, n) {
        var o = n;
        void 0 !== o || i && i.getContext || (o = i, i = void 0), o || (o = {});
        var r = t.render(e, i, o), a = o.type || "image/png", s = o.rendererOpts || {};
        return r.toDataURL(a, s.quality)
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(455), o = i(244);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(468), o = i(246);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(473), o = i(248);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(828), i(829);
    var a = i(1), s = Object(a.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 = i(1007);
    i.n(n).a
}, 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(250);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\tabs\\ZipFileList-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(474), o = i(252);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(832);
    var a = i(1), s = Object(a.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(1012);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(469), o = i(254);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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.]+)/),
                    r = /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]), r && (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), r = {
                "[object Function]": 1,
                "[object RegExp]": 1,
                "[object Date]": 1,
                "[object Error]": 1,
                "[object CanvasGradient]": 1,
                "[object CanvasPattern]": 1,
                "[object Image]": 1,
                "[object Canvas]": 1
            }, a = {
                "[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 (a[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 (!r[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], r = t[n];
                !R(r) || !R(o) || M(r) || M(o) || V(r) || V(o) || B(r) || B(o) || Z(r) || Z(o) ? !i && n in e || (e[n] = m(t[n])) : v(o, r, 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 w(e, t) {
            for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i]);
            return e
        }

        function k(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 T() {
            return p.createCanvas()
        }

        function b() {
            return t = t || T().getContext("2d")
        }

        function C(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 S(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 I(e, t, i) {
            k(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 A(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 r in e) e.hasOwnProperty(r) && t.call(i, e[r], r, e)
        }

        function D(e, t, i) {
            if (e && t) {
                if (e.map && e.map === h) return e.map(t, i);
                for (var n = [], o = 0, r = e.length; o < r; o++) n.push(t.call(i, e[o], o, e));
                return n
            }
        }

        function x(e, t, i, n) {
            if (e && t) {
                if (e.reduce && e.reduce === f) return e.reduce(t, i, n);
                for (var o = 0, r = e.length; o < r; o++) i = t.call(n, i, e[o], o, e);
                return i
            }
        }

        function N(e, t, i) {
            if (e && t) {
                if (e.filter && e.filter === u) return e.filter(t, i);
                for (var n = [], o = 0, r = e.length; o < r; 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 P(e, t) {
            var i = c.call(arguments, 2);
            return function () {
                return e.apply(t, i.concat(c.call(arguments)))
            }
        }

        function O(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 !!r[s.call(e)]
        }

        function U(e) {
            return !!a[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 W(e) {
            for (var t = 0, i = arguments.length; t < i; t++) if (null != arguments[t]) return arguments[t]
        }

        function j(e, t) {
            return null != e ? e : t
        }

        function G(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 && A(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 = P(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: w,
            defaults: k,
            createCanvas: T,
            getContext: b,
            indexOf: C,
            inherits: S,
            mixin: I,
            isArrayLike: _,
            each: A,
            map: D,
            reduce: x,
            filter: N,
            find: E,
            bind: P,
            curry: O,
            isArray: M,
            isFunction: F,
            isString: L,
            isObject: R,
            isBuiltInObject: B,
            isTypedArray: U,
            isDom: V,
            eqNaN: K,
            retrieve: W,
            retrieve2: j,
            retrieve3: G,
            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 re(e, t) {
            return e[0] = t[0], e[1] = t[1], e
        }

        function ae(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 we(e, t) {
            return (e[0] - t[0]) * (e[0] - t[0]) + (e[1] - t[1]) * (e[1] - t[1])
        }

        var ke = we;

        function Te(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 be(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 Ce(e, t, i) {
            return e[0] = Math.min(t[0], i[0]), e[1] = Math.min(t[1], i[1]), e
        }

        function Se(e, t, i) {
            return e[0] = Math.max(t[0], i[0]), e[1] = Math.max(t[1], i[1]), e
        }

        var Ie = (Object.freeze || Object)({
            create: oe,
            copy: re,
            clone: ae,
            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: we,
            distSquare: ke,
            negate: function (e, t) {
                return e[0] = -t[0], e[1] = -t[1], e
            },
            lerp: Te,
            applyTransform: be,
            min: Ce,
            max: Se
        });

        function _e() {
            this.on("mousedown", this._dragStart, this), this.on("mousemove", this._drag, this), this.on("mouseup", this._dragEnd, this)
        }

        function Ae(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(Ae(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, r = n - this._y;
                    this._x = i, this._y = n, t.drift(o, r, e), this.dispatchToElement(Ae(t, e), "drag", e.event);
                    var a = this.findHover(i, n, t).target, s = this._dropTarget;
                    t !== (this._dropTarget = a) && (s && a !== s && this.dispatchToElement(Ae(s, e), "dragleave", e.event), a && a !== s && this.dispatchToElement(Ae(a, e), "dragenter", e.event))
                }
            }, _dragEnd: function (e) {
                var t = this._draggingTarget;
                t && (t.dragging = !1), this.dispatchToElement(Ae(t, e), "dragend", e.event), this._dropTarget && this.dispatchToElement(Ae(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null
            }
        };
        var De = Array.prototype.slice, xe = function (e) {
            this._$handlers = {}, this._$eventProcessor = e
        };

        function Ne(e, t, i, n, o, r) {
            var a = 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), a[t] || (a[t] = []);
            for (var s = 0; s < a[t].length; s++) if (a[t][s].h === n) return e;
            var l = {h: n, one: r, query: i, ctx: o || e, callAtLast: n.zrEventfulCallAtLast}, d = a[t].length - 1,
                u = a[t][d];
            return u && u.callAtLast ? a[t].splice(d, 0, l) : a[t].push(l), e
        }

        xe.prototype = {
            constructor: xe, one: function (e, t, i, n) {
                return Ne(this, e, t, i, n, !0)
            }, on: function (e, t, i, n) {
                return Ne(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, r = i[e].length; o < r; 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 = De.call(n, 1));
                    for (var r = t.length, a = 0; a < r;) {
                        var s = t[a];
                        if (i && i.filter && null != s.query && !i.filter(e, s.query)) a++; 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(a, 1), r--) : a++
                        }
                    }
                }
                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 = De.call(n, 1, n.length - 1));
                    for (var r = n[n.length - 1], a = t.length, s = 0; s < a;) {
                        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(r);
                                    break;
                                case 2:
                                    l.h.call(r, n[1]);
                                    break;
                                case 3:
                                    l.h.call(r, n[1], n[2]);
                                    break;
                                default:
                                    l.h.apply(r, n)
                            }
                            l.one ? (t.splice(s, 1), a--) : s++
                        }
                    }
                }
                return i && i.afterTrigger && i.afterTrigger(e), this
            }
        };
        var Ee = Math.log(2);

        function Pe(e, t, i, n, o, r) {
            var a = n + "-" + o, s = e.length;
            if (r.hasOwnProperty(a)) return r[a];
            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] * Pe(e, t - 1, u, d, o | p, r), f++)
            }
            return r[a] = c
        }

        function Oe(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 = Pe(i, 8, 0, 0, 0, n);
            if (0 !== o) {
                for (var r = [], a = 0; a < 8; a++) for (var s = 0; s < 8; s++) null == r[s] && (r[s] = 0), r[s] += ((a + s) % 2 ? -1 : 1) * Pe(i, 7, 0 === a ? 1 : 0, 1 << a, 1 << s, n) / o * t[a];
                return function (e, t, i) {
                    var n = t * r[6] + i * r[7] + 1;
                    e[0] = (t * r[0] + i * r[1] + r[2]) / n, e[1] = (t * r[3] + i * r[4] + r[5]) / n
                }
            }
        }

        var Me = "___zrEVENTSAVED", Fe = [];

        function Le(e, t, i, n, r) {
            if (t.getBoundingClientRect && o.domSupported && !Re(t)) {
                var a = t[Me] || (t[Me] = {}), s = function (e, t, i) {
                    for (var n = i ? "invTrans" : "trans", o = t[n], r = t.srcCoords, a = !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), a = a && r && h === r[c] && f === r[1 + c], l.push(e[d].offsetLeft, e[d].offsetTop)
                    }
                    return a && o ? o : (t.srcCoords = s, t[n] = i ? Oe(l, s) : Oe(s, l))
                }(function (e, t) {
                    var i = t.markers;
                    if (i) return i;
                    i = t.markers = [];
                    for (var n = ["left", "right"], o = ["top", "bottom"], r = 0; r < 4; r++) {
                        var a = document.createElement("div"), s = a.style, l = r % 2, d = (r >> 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(a), i.push(a)
                    }
                    return i
                }(t, a), a, r);
                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 ? We(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) : We(e, t, i), i
        }

        function We(e, t, i) {
            if (o.domSupported && e.getBoundingClientRect) {
                var n = t.clientX, r = t.clientY;
                if (Re(e)) {
                    var a = e.getBoundingClientRect();
                    return i.zrX = n - a.left, void (i.zrY = r - a.top)
                }
                if (Le(Ve, e, n, r)) return i.zrX = Ve[0], void (i.zrY = Ve[1])
            }
            i.zrX = i.zrY = 0
        }

        function je(e) {
            return e || window.event
        }

        function Ge(e, t, i) {
            if (null != (t = je(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 r = t.button;
            return null == t.which && void 0 !== r && Ue.test(t.type) && (t.which = 1 & r ? 1 : 2 & r ? 3 : 4 & r ? 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}, r = 0, a = n.length; r < a; r++) {
                        var s = n[r], 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 r = Ye(n) / Ye(o);
                        isFinite(r) || (r = 1), t.pinchScale = r;
                        var a = function (e) {
                            return [(e[0][0] + e[1][0]) / 2, (e[0][1] + e[1][1]) / 2]
                        }(n);
                        return t.pinchX = a[0], t.pinchY = a[1], {type: "pinch", target: e[0].target, event: t}
                    }
                }
            }
        }, Ze = "silent";

        function Qe() {
            ze(this.event)
        }

        function $e() {
        }

        function et(e, t, i, n) {
            xe.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 && (A(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, r = o.target;
                r && !r.__zr && (r = (o = this.findHover(o.x, o.y)).target);
                var a = this._hovered = n ? {x: t, y: i} : this.findHover(t, i), s = a.target, l = this.proxy;
                l.setCursor && l.setCursor(s ? s.cursor : "default"), r && s !== r && this.dispatchToElement(o, "mouseout", e), this.dispatchToElement(a, "mousemove", e), s && s !== r && this.dispatchToElement(a, "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, r = 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] && (r.cancelBubble = n[o].call(n, r)), n.trigger(t, r), n = n.parent, !r.cancelBubble);) ;
                    r.cancelBubble || (this.trigger(t, r), this.painter && this.painter.eachOtherLayer(function (e) {
                        "function" == typeof e[o] && e[o].call(e, r), e.trigger && e.trigger(t, r)
                    }))
                }
            }, findHover: function (e, t, i) {
                for (var n = this.storage.getDisplayList(), o = {x: e, y: t}, r = n.length - 1; 0 <= r; r--) {
                    var a;
                    if (n[r] !== i && !n[r].ignore && (a = it(n[r], e, t)) && (o.topTarget || (o.topTarget = n[r]), a !== Ze)) {
                        o.target = n[r];
                        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)
                }
            }
        }, A(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (e) {
            et.prototype[e] = function (t) {
                var i, n, o = t.zrX, r = t.zrY, a = nt(this, o, r);
                if ("mouseup" === e && a || (n = (i = this.findHover(o, r)).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)
            }
        }), I(et, xe), I(et, _e);
        var ot = "undefined" == typeof Float32Array ? Array : Float32Array;

        function rt() {
            var e = new ot(6);
            return at(e), e
        }

        function at(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], r = t[0] * i[2] + t[2] * i[3],
                a = 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] = r, e[3] = a, 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], r = t[4], a = t[1], s = t[3], l = t[5], d = Math.sin(i), u = Math.cos(i);
            return e[0] = n * u + a * d, e[1] = -n * d + a * u, e[2] = o * u + s * d, e[3] = -o * d + u * s, e[4] = u * r + d * l, e[5] = u * l - d * r, 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], r = t[1], a = t[3], s = t[5], l = i * a - r * n;
            return l ? (l = 1 / l, e[0] = a * l, e[1] = -r * l, e[2] = -n * l, e[3] = i * l, e[4] = (n * s - a * o) * l, e[5] = (r * o - i * s) * l, e) : null
        }

        function ft(e) {
            var t = rt();
            return st(t, e), t
        }

        var pt = (Object.freeze || Object)({
            create: rt,
            identity: at,
            copy: st,
            mul: lt,
            translate: dt,
            rotate: ut,
            scale: ct,
            invert: ht,
            clone: ft
        }), gt = at;

        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 wt = [];
        yt.updateTransform = function () {
            var e = this.parent, t = e && e.transform, i = this.needLocalTransform(), n = this.transform;
            if (i || t) {
                n = n || rt(), 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(wt);
                    var r = wt[0] < 0 ? -1 : 1, a = wt[1] < 0 ? -1 : 1, s = ((wt[0] - r) * o + r) / wt[0] || 0,
                        l = ((wt[1] - a) * o + a) / wt[1] || 0;
                    n[0] *= s, n[1] *= s, n[2] *= l, n[3] *= l
                }
                this.invTransform = this.invTransform || rt(), 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 kt = [], Tt = rt();
        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(kt, e.invTransform, t), t = kt);
                var i = this.origin;
                i && (i[0] || i[1]) && (Tt[4] = i[0], Tt[5] = i[1], lt(kt, t, Tt), kt[4] -= i[0], kt[5] -= i[1], t = kt), 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 && be(i, i, n), i
        }, yt.transformCoordToGlobal = function (e, t) {
            var i = [e, t], n = this.transform;
            return n && be(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, r = 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] += r[0], t[5] += r[1], t
        };
        var bt = {
            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 - bt.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 * bt.bounceIn(2 * e) : .5 * bt.bounceOut(2 * e - 1) + .5
            }
        };

        function Ct(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 St() {
            this.head = null, this.tail = null, this._len = 0
        }

        Ct.prototype = {
            constructor: Ct, 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 ? bt[n] : n,
                            r = "function" == typeof o ? o(i) : i;
                        return this.fire("frame", r), 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 It = St.prototype;

        function _t(e) {
            this._list = new St, this._map = {}, this._maxSize = e || 10, this._lastRemovedEntry = null
        }

        It.insert = function (e) {
            var t = new At(e);
            return this.insertEntry(t), t
        }, It.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++
        }, It.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--
        }, It.len = function () {
            return this._len
        }, It.clear = function () {
            this.head = this.tail = null, this._len = 0
        };
        var At = function (e) {
            this.value = e, this.next, this.prev
        }, Dt = _t.prototype;
        Dt.put = function (e, t) {
            var i = this._list, n = this._map, o = null;
            if (null == n[e]) {
                var r = i.len(), a = this._lastRemovedEntry;
                if (r >= this._maxSize && 0 < r) {
                    var s = i.head;
                    i.remove(s), delete n[s.key], o = s.value, this._lastRemovedEntry = s
                }
                a ? a.value = t : a = new At(t), a.key = e, i.insertEntry(a), n[e] = a
            }
            return o
        }, Dt.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
        }, Dt.clear = function () {
            this._list.clear(), this._map = {}
        };
        var xt = {
            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 Nt(e) {
            return (e = Math.round(e)) < 0 ? 0 : 255 < e ? 255 : e
        }

        function Et(e) {
            return e < 0 ? 0 : 1 < e ? 1 : e
        }

        function Pt(e) {
            return e.length && "%" === e.charAt(e.length - 1) ? Nt(parseFloat(e) / 100 * 255) : Nt(parseInt(e, 10))
        }

        function Ot(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 xt) return Rt(t, xt[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 r = o.indexOf("("), a = o.indexOf(")");
                if (-1 !== r && a + 1 === o.length) {
                    var s = o.substr(0, r), l = o.substr(r + 1, a - (r + 1)).split(","), d = 1;
                    switch (s) {
                        case"rgba":
                            if (4 !== l.length) return void Lt(t, 0, 0, 0, 1);
                            d = Ot(l.pop());
                        case"rgb":
                            return 3 !== l.length ? void Lt(t, 0, 0, 0, 1) : (Lt(t, Pt(l[0]), Pt(l[1]), Pt(l[2]), d), Vt(e, t), t);
                        case"hsla":
                            return 4 !== l.length ? void Lt(t, 0, 0, 0, 1) : (l[3] = Ot(l[3]), Wt(l, t), Vt(e, t), t);
                        case"hsl":
                            return 3 !== l.length ? void Lt(t, 0, 0, 0, 1) : (Wt(l, t), Vt(e, t), t);
                        default:
                            return
                    }
                }
                Lt(t, 0, 0, 0, 1)
            }
        }

        function Wt(e, t) {
            var i = (parseFloat(e[0]) % 360 + 360) % 360 / 360, n = Ot(e[1]), o = Ot(e[2]),
                r = o <= .5 ? o * (n + 1) : o + n - o * n, a = 2 * o - r;
            return Lt(t = t || [], Nt(255 * Mt(a, r, i + 1 / 3)), Nt(255 * Mt(a, r, i)), Nt(255 * Mt(a, r, i - 1 / 3)), 1), 4 === e.length && (t[3] = e[3]), t
        }

        function jt(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 Gt(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), r = Math.ceil(n), a = t[o], s = t[r], l = n - o;
                return i[0] = Nt(Ft(a[0], s[0], l)), i[1] = Nt(Ft(a[1], s[1], l)), i[2] = Nt(Ft(a[2], s[2], l)), i[3] = Et(Ft(a[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), r = Math.ceil(n), a = Kt(t[o]), s = Kt(t[r]), l = n - o,
                    d = Zt([Nt(Ft(a[0], s[0], l)), Nt(Ft(a[1], s[1], l)), Nt(Ft(a[2], s[2], l)), Et(Ft(a[3], s[3], l))], "rgba");
                return i ? {color: d, leftIndex: o, rightIndex: r, 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, r = e[2] / 255, a = Math.min(n, o, r),
                        s = Math.max(n, o, r), l = s - a, d = (s + a) / 2;
                    if (0 == l) i = t = 0; else {
                        i = d < .5 ? l / (s + a) : l / (2 - s - a);
                        var u = ((s - n) / 6 + l / 2) / l, c = ((s - o) / 6 + l / 2) / l, h = ((s - r) / 6 + l / 2) / l;
                        n === s ? t = h - c : o === s ? t = 1 / 3 + u - h : r === 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] = Ot(i)), null != n && (e[2] = Ot(n)), Zt(Wt(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: jt,
            toHex: Gt,
            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 r = e.length;
            if (1 === o) for (var a = 0; a < r; a++) n[a] = ii(e[a], t[a], i); else {
                var s = r && e[0].length;
                for (a = 0; a < r; a++) for (var l = 0; l < s; l++) n[a][l] = ii(e[a][l], t[a][l], i)
            }
        }

        function ri(e, t, i) {
            var n = e.length, o = t.length;
            if (n !== o) if (o < n) e.length = o; else for (var r = n; r < o; r++) e.push(1 === i ? t[r] : $t.call(t[r]));
            var a = e[0] && e[0].length;
            for (r = 0; r < e.length; r++) if (1 === i) isNaN(e[r]) && (e[r] = t[r]); else for (var s = 0; s < a; s++) isNaN(e[r][s]) && (e[r][s] = t[r][s])
        }

        function ai(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 r = e[0].length;
                for (o = 0; o < n; o++) for (var a = 0; a < r; a++) if (e[o][a] !== t[o][a]) return !1
            }
            return !0
        }

        function si(e, t, i, n, o, r, a, 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, r, a); 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, r, a)
            }
        }

        function li(e, t, i, n, o, r, a) {
            var s = .5 * (i - e), l = .5 * (n - t);
            return (2 * (t - i) + s + l) * a + (-3 * (t - i) - 2 * s - l) * r + 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, r) {
            var a = 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, w = 0; w < d; w++) {
                    g.push(n[w].time / u);
                    var k = n[w].value;
                    if (c && ai(k, v, p) || !c && k === v || (y = !1), "string" == typeof (v = k)) {
                        var T = Kt(k);
                        T ? (k = T, h = !0) : f = !0
                    }
                    m.push(k)
                }
                if (r || !y) {
                    var b = m[d - 1];
                    for (w = 0; w < d - 1; w++) c ? ri(m[w], b, p) : !isNaN(m[w]) || isNaN(b) || f || h || (m[w] = b);
                    c && ri(a(e._target, o), b, p);
                    var C, S, I, A, D, x = 0, N = 0;
                    if (h) var E = [0, 0, 0, 0];
                    var P = new Ct({
                        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 < N) {
                                for (i = Math.min(x + 1, d - 1); 0 <= i && !(g[i] <= t); i--) ;
                                i = Math.min(i, d - 2)
                            } else {
                                for (i = x; i < d && !(g[i] > t); i++) ;
                                i = Math.min(i - 1, d - 2)
                            }
                            N = t;
                            var n = g[(x = i) + 1] - g[i];
                            if (0 != n) if (C = (t - g[i]) / n, l) if (I = m[i], S = m[0 === i ? i : i - 1], A = m[d - 2 < i ? d - 1 : i + 1], D = m[d - 3 < i ? d - 1 : i + 2], c) si(S, I, A, D, C, C * C, C * C * C, a(e, o), p); else {
                                if (h) r = si(S, I, A, D, C, C * C, C * C * C, E, 1), r = ui(E); else {
                                    if (f) return ni(I, A, C);
                                    r = li(S, I, A, D, C, C * C, C * C * C)
                                }
                                s(e, o, r)
                            } else if (c) oi(m[i], m[i + 1], C, a(e, o), p); else {
                                var r;
                                if (h) oi(m[i], m[i + 1], C, E, 1), r = ui(E); else {
                                    if (f) return ni(m[i], m[i + 1], C);
                                    r = ii(m[i], m[i + 1], C)
                                }
                                s(e, o, r)
                            }
                        },
                        ondestroy: i
                    });
                    return t && "spline" !== t && (P.easing = t), P
                }
            }
        }

        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() {
                    --r || o._doneCallback()
                }

                var n, o = this, r = 0;
                for (var a in this._tracks) if (this._tracks.hasOwnProperty(a)) {
                    var s = ci(this, e, i, this._tracks[a], a, t);
                    s && (this._clipList.push(s), r++, 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 r || 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, r, a, s) {
            L(n) ? (r = o, o = n, n = 0) : F(o) ? (r = o, o = "linear", n = 0) : F(n) ? (r = n, n = 0) : i = F(i) ? (r = i, 500) : i || 500, e.stopAnimation(), function e(t, i, n, o, r, a, 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], r, a, 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 == r ? 500 : r, l).delay(a || 0)
            }(e, "", e, t, i, n, s);
            var l = e.animators.slice(), d = l.length;

            function u() {
                --d || r && r()
            }

            d || r && r();
            for (var c = 0; c < l.length; c++) l[c].done(u).start(o, a)
        }

        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, r = this.__zr;
                if (e) {
                    var a = e.split("."), s = o;
                    n = "shape" === a[0];
                    for (var l = 0, d = a.length; l < d; l++) s = s && s[a[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(C(u, c), 1)
                    }), u.push(c), r && r.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, r) {
                vi(this, e, t, i, n, o, r)
            }, animateFrom: function (e, t, i, n, o, r) {
                vi(this, e, t, i, n, o, r, !0)
            }
        };
        var wi = function (e) {
            vt.call(this, e), xe.call(this, e), gi.call(this, e), this.id = e.id || n()
        };
        wi.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)
            }
        }, I(wi, gi), I(wi, vt), I(wi, xe);
        var ki, Ti, bi, Ci, Si = be, Ii = Math.min, _i = Math.max;

        function Ai(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
        }

        Ai.prototype = {
            constructor: Ai, union: function (e) {
                var t = Ii(e.x, this.x), i = Ii(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: (ki = [], Ti = [], bi = [], Ci = [], function (e) {
                if (e) {
                    ki[0] = bi[0] = this.x, ki[1] = Ci[1] = this.y, Ti[0] = Ci[0] = this.x + this.width, Ti[1] = bi[1] = this.y + this.height, Si(ki, ki, e), Si(Ti, Ti, e), Si(bi, bi, e), Si(Ci, Ci, e), this.x = Ii(ki[0], Ti[0], bi[0], Ci[0]), this.y = Ii(ki[1], Ti[1], bi[1], Ci[1]);
                    var t = _i(ki[0], Ti[0], bi[0], Ci[0]), i = _i(ki[1], Ti[1], bi[1], Ci[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 = rt();
                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 Ai || (e = Ai.create(e));
                var t = this, i = t.x, n = t.x + t.width, o = t.y, r = t.y + t.height, a = e.x, s = e.x + e.width,
                    l = e.y, d = e.y + e.height;
                return !(n < a || s < i || r < 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 Ai(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}
            }
        }, Ai.create = function (e) {
            return new Ai(e.x, e.y, e.width, e.height)
        };
        var Di = function (e) {
            for (var t in e = e || {}, wi.call(this, e), e) e.hasOwnProperty(t) && (this[t] = e[t]);
            this._children = [], this.__storage = null, this.__dirty = !0
        };
        Di.prototype = {
            constructor: Di, 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 Di && e.addChildrenToStorage(t)), i && i.refresh()
            }, remove: function (e) {
                var t = this.__zr, i = this.__storage, n = this._children, o = C(n, e);
                return o < 0 || (n.splice(o, 1), e.parent = null, i && (i.delFromStorage(e), e instanceof Di && 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 Di && 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 Di && 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 Di && i.delChildrenFromStorage(e)
                }
            }, dirty: function () {
                return this.__dirty = !0, this.__zr && this.__zr.refresh(), this
            }, getBoundingRect: function (e) {
                for (var t = null, i = new Ai(0, 0, 0, 0), n = e || this._children, o = [], r = 0; r < n.length; r++) {
                    var a = n[r];
                    if (!a.ignore && !a.invisible) {
                        var s = a.getBoundingRect(), l = a.getLocalTransform(o);
                        l ? (i.copy(s), i.applyTransform(l), (t = t || i.clone()).union(i)) : (t = t || s.clone()).union(s)
                    }
                }
                return t || i
            }
        }, S(Di, wi);
        var xi = 32, Ni = 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 Pi(e, t, i, n, o) {
            for (n === t && n++; n < i; n++) {
                for (var r, a = e[n], s = t, l = n; s < l;) o(a, e[r = s + l >>> 1]) < 0 ? l = r : s = 1 + r;
                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] = a
            }
        }

        function Oi(e, t, i, n, o, r) {
            var a = 0, s = 0, l = 1;
            if (0 < r(e, t[i + o])) {
                for (s = n - o; l < s && 0 < r(e, t[i + o + l]);) (l = 1 + ((a = l) << 1)) <= 0 && (l = s);
                s < l && (l = s), a += o, l += o
            } else {
                for (s = o + 1; l < s && r(e, t[i + o - l]) <= 0;) (l = 1 + ((a = l) << 1)) <= 0 && (l = s);
                s < l && (l = s);
                var d = a;
                a = o - l, l = o - d
            }
            for (a++; a < l;) {
                var u = a + (l - a >>> 1);
                0 < r(e, t[i + u]) ? a = u + 1 : l = u
            }
            return l
        }

        function Mi(e, t, i, n, o, r) {
            var a = 0, s = 0, l = 1;
            if (r(e, t[i + o]) < 0) {
                for (s = o + 1; l < s && r(e, t[i + o - l]) < 0;) (l = 1 + ((a = l) << 1)) <= 0 && (l = s);
                s < l && (l = s);
                var d = a;
                a = o - l, l = o - d
            } else {
                for (s = n - o; l < s && 0 <= r(e, t[i + o + l]);) (l = 1 + ((a = l) << 1)) <= 0 && (l = s);
                s < l && (l = s), a += o, l += o
            }
            for (a++; a < l;) {
                var u = a + (l - a >>> 1);
                r(e, t[i + u]) < 0 ? l = u : a = u + 1
            }
            return l
        }

        function Fi(e, t, i, n) {
            i = i || 0;
            var o = (n = n || e.length) - i;
            if (!(o < 2)) {
                var r = 0;
                if (o < xi) Pi(e, i, n, i + (r = Ei(e, i, n, t)), t); else {
                    var a = new function (e, t) {
                        var i, n, o = Ni, r = 0, a = [];

                        function s(s) {
                            var l = i[s], d = n[s], u = i[s + 1], c = n[s + 1];
                            n[s] = d + c, s === r - 3 && (i[s + 1] = i[s + 2], n[s + 1] = n[s + 2]), r--;
                            var h = Mi(e[u], e, l, d, 0, t);
                            l += h, 0 != (d -= h) && 0 !== (c = Oi(e[l + d - 1], e, u, c, c - 1, t)) && (d <= c ? function (i, n, r, s) {
                                var l = 0;
                                for (l = 0; l < n; l++) a[l] = e[i + l];
                                var d = 0, u = r, 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] = a[d]
                                    }
                                    for (var h, f, p, g = o; ;) {
                                        f = h = 0, p = !1;
                                        do {
                                            if (t(e[u], a[d]) < 0) {
                                                if (e[c++] = e[u++], f++, (h = 0) == --s) {
                                                    p = !0;
                                                    break
                                                }
                                            } else if (e[c++] = a[d++], h++, f = 0, 1 == --n) {
                                                p = !0;
                                                break
                                            }
                                        } while ((h | f) < g);
                                        if (p) break;
                                        do {
                                            if (0 !== (h = Mi(e[u], a, d, n, 0, t))) {
                                                for (l = 0; l < h; l++) e[c + l] = a[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 = Oi(a[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++] = a[d++], 1 == --n) {
                                                p = !0;
                                                break
                                            }
                                            g--
                                        } while (Ni <= h || Ni <= 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] = a[d]
                                    } else {
                                        if (0 === n) throw new Error;
                                        for (l = 0; l < n; l++) e[c + l] = a[d + l]
                                    }
                                } else for (l = 0; l < n; l++) e[c + l] = a[d + l]
                            }(l, d, u, c) : function (i, n, r, s) {
                                var l = 0;
                                for (l = 0; l < s; l++) a[l] = e[r + l];
                                var d = i + n - 1, u = s - 1, c = r + 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] = a[u]
                                    }
                                    for (var p = o; ;) {
                                        var g = 0, m = 0, v = !1;
                                        do {
                                            if (t(a[u], e[d]) < 0) {
                                                if (e[c--] = e[d--], g++, (m = 0) == --n) {
                                                    v = !0;
                                                    break
                                                }
                                            } else if (e[c--] = a[u--], m++, g = 0, 1 == --s) {
                                                v = !0;
                                                break
                                            }
                                        } while ((g | m) < p);
                                        if (v) break;
                                        do {
                                            if (0 != (g = n - Mi(a[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--] = a[u--], 1 == --s) {
                                                v = !0;
                                                break
                                            }
                                            if (0 != (m = s - Oi(e[d], a, 0, s, s - 1, t))) {
                                                for (s -= m, f = 1 + (c -= m), h = 1 + (u -= m), l = 0; l < m; l++) e[f + l] = a[h + l];
                                                if (s <= 1) {
                                                    v = !0;
                                                    break
                                                }
                                            }
                                            if (e[c--] = e[d--], 0 == --n) {
                                                v = !0;
                                                break
                                            }
                                            p--
                                        } while (Ni <= g || Ni <= 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] = a[u]
                                    } else {
                                        if (0 === s) throw new Error;
                                        for (h = c - (s - 1), l = 0; l < s; l++) e[h + l] = a[l]
                                    }
                                } else for (h = c - (s - 1), l = 0; l < s; l++) e[h + l] = a[l]
                            }(l, d, u, c))
                        }

                        i = [], n = [], this.mergeRuns = function () {
                            for (; 1 < r;) {
                                var e = r - 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 < r;) {
                                var e = r - 2;
                                0 < e && n[e - 1] < n[e + 1] && e--, s(e)
                            }
                        }, this.pushRun = function (e, t) {
                            i[r] = e, n[r] = t, r += 1
                        }
                    }(e, t), s = function (e) {
                        for (var t = 0; xi <= e;) t |= 1 & e, e >>= 1;
                        return e + t
                    }(o);
                    do {
                        if ((r = Ei(e, i, n, t)) < s) {
                            var l = o;
                            s < l && (l = s), Pi(e, i, i + l, i + r, t), r = l
                        }
                        a.pushRun(i, r), a.mergeRuns(), o -= r, i += r
                    } while (0 !== o);
                    a.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, r = t.length; n < r; 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, r = e; o;) o.parent = r, o.updateTransform(), t.push(o), o = (r = o).clipPath
                    }
                    if (e.isGroup) {
                        for (var a = e._children, s = 0; s < a.length; s++) {
                            var l = a[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 Di && 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 Di && 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 = C(this._roots, e);
                    0 <= o && (this.delFromStorage(e), this._roots.splice(o, 1), e instanceof Di && 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,
            Wi = [["shadowBlur", 0], ["shadowOffsetX", 0], ["shadowOffsetY", 0], ["shadowColor", "#000"], ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]],
            ji = function (e) {
                this.extendFrom(e, !1)
            };
        ji.prototype = {
            constructor: ji,
            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, r = !o || e.__attrCachedBy !== Vi.STYLE_BIND;
                e.__attrCachedBy = Vi.STYLE_BIND;
                for (var a = 0; a < Wi.length; a++) {
                    var s = Wi[a], l = s[0];
                    !r && n[l] === o[l] || (e[l] = Ui(e, l, n[l] || s[1]))
                }
                if (!r && n.fill === o.fill || (e.fillStyle = n.fill), !r && n.stroke === o.stroke || (e.strokeStyle = n.stroke), !r && n.opacity === o.opacity || (e.globalAlpha = null == n.opacity ? 1 : n.opacity), !r && 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, r = Math.min(n, o), a = null == t.x ? .5 : t.x,
                        s = null == t.y ? .5 : t.y, l = null == t.r ? .5 : t.r;
                    return t.global || (a = a * n + i.x, s = s * o + i.y, l *= r), e.createRadialGradient(a, s, 0, a, s, l)
                } : function (e, t, i) {
                    var n = null == t.x ? 0 : t.x, o = null == t.x2 ? 1 : t.x2, r = null == t.y ? 0 : t.y,
                        a = null == t.y2 ? 0 : t.y2;
                    return t.global || (n = n * i.width + i.x, o = o * i.width + i.x, r = r * i.height + i.y, a = a * i.height + i.y), n = isNaN(n) ? 0 : n, o = isNaN(o) ? 1 : o, r = isNaN(r) ? 0 : r, a = isNaN(a) ? 0 : a, e.createLinearGradient(n, r, o, a)
                })(e, t, i), o = t.colorStops, r = 0; r < o.length; r++) n.addColorStop(o[r].offset, o[r].color);
                return n
            }
        };
        for (var Gi = ji.prototype, Hi = 0; Hi < Wi.length; Hi++) {
            var zi = Wi[Hi];
            zi[0] in Gi || (Gi[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 = T(), o = t.getWidth(), r = t.getHeight(), a = n.style;
            return a && (a.position = "absolute", a.left = 0, a.top = 0, a.width = o + "px", a.height = r + "px", n.setAttribute("data-zr-dom-id", e)), n.width = o * i, n.height = r * 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
        }

        ji.getGradient = Gi.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, r = this.domBack;
                o && (o.width = e + "px", o.height = t + "px"), n.width = e * i, n.height = t * i, r && (r.width = e * i, r.height = t * i, 1 !== i && this.ctxBack.scale(i, i))
            }, clear: function (e, t) {
                var i, n = this.dom, o = this.ctx, r = n.width, a = 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, r / d, a / d)), o.clearRect(0, 0, r, a), t && "transparent" !== t && (t.colorStops ? (i = t.__canvasGradient || ji.getGradient(o, t, {
                    x: 0,
                    y: 0,
                    width: r,
                    height: a
                }), t.__canvasGradient = i) : t.image && (i = Xi.prototype.getCanvasPattern.call(t, o)), o.save(), o.fillStyle = i || t, o.fillRect(0, 0, r, a), o.restore()), s) {
                    var u = this.domBack;
                    o.save(), o.globalAlpha = l, o.drawImage(u, 0, 0, r, a), 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 r = Qi.get(e), a = {hostEl: i, cb: n, cbPayload: o};
                return r ? nn(t = r.image) || r.pending.push(a) : ((t = new Image).onload = t.onerror = tn, Qi.put(e, t.__cachedImgObj = {
                    image: t,
                    pending: [a]
                }), 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 = {}, rn = 0, an = 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, r = (e + "").split("\n"), a = 0, s = 0, l = r.length; s < l; s++) a = Math.max((n = r[s], o = t, dn.measureText(n, o)).width, a);
            return an < rn && (rn = 0, on = {}), rn++, on[i] = a
        }

        function cn(e, t, i, n, o, r, a, s) {
            return a ? function (e, t, i, n, o, r, a, s) {
                var l = Tn(e, {rich: a, truncate: s, font: t, textAlign: i, textPadding: o, textLineHeight: r}),
                    d = l.outerWidth, u = l.outerHeight, c = hn(0, d, i), h = fn(0, u, n);
                return new Ai(c, h, d, u)
            }(e, t, i, n, o, r, a, s) : function (e, t, i, n, o, r, a) {
                var s = kn(e, t, o, r, a), 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 Ai(u, c, l, d);
                return h.lineHeight = s.lineHeight, h
            }(e, t, i, n, o, r, 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, r = i.x, a = i.y;
            o = o || 0;
            var s = i.height, l = i.width, d = s / 2, u = "left", c = "top";
            switch (n) {
                case"left":
                    r -= o, a += d, u = "right", c = "middle";
                    break;
                case"right":
                    r += o + l, a += d, c = "middle";
                    break;
                case"top":
                    r += l / 2, a -= o, u = "center", c = "bottom";
                    break;
                case"bottom":
                    r += l / 2, a += s + o, u = "center";
                    break;
                case"inside":
                    r += l / 2, a += d, u = "center", c = "middle";
                    break;
                case"insideLeft":
                    r += o, a += d, c = "middle";
                    break;
                case"insideRight":
                    r += l - o, a += d, u = "right", c = "middle";
                    break;
                case"insideTop":
                    r += l / 2, a += o, u = "center";
                    break;
                case"insideBottom":
                    r += l / 2, a += s - o, u = "center", c = "bottom";
                    break;
                case"insideTopLeft":
                    r += o, a += o;
                    break;
                case"insideTopRight":
                    r += l - o, a += o, u = "right";
                    break;
                case"insideBottomLeft":
                    r += o, a += s - o, c = "bottom";
                    break;
                case"insideBottomRight":
                    r += l - o, a += s - o, u = "right", c = "bottom"
            }
            return (e = e || {}).x = r, e.y = a, e.textAlign = u, e.textVerticalAlign = c, e
        }

        function gn(e, t, i, n, o) {
            if (!t) return "";
            var r = (e + "").split("\n");
            o = mn(t, i, n, o);
            for (var a = 0, s = r.length; a < s; a++) r[a] = vn(r[a], o);
            return r.join("\n")
        }

        function mn(e, t, i, n) {
            (n = w({}, n)).font = t, i = j(i, "..."), n.maxIterations = j(n.maxIterations, 2);
            var o = n.minChar = j(n.minChar, 0);
            n.cnCharWidth = un("国", t);
            var r = n.ascCharWidth = un("a", t);
            n.placeholder = j(n.placeholder, "");
            for (var a = e = Math.max(0, e - 1), s = 0; s < o && r <= a; s++) a -= r;
            var l = un(i, t);
            return a < l && (i = "", l = 0), a = e - l, n.ellipsis = i, n.ellipsisWidth = l, n.contentWidth = a, n.containerWidth = e, n
        }

        function vn(e, t) {
            var i = t.containerWidth, n = t.font, o = t.contentWidth;
            if (!i) return "";
            var r = un(e, n);
            if (r <= i) return e;
            for (var a = 0; ; a++) {
                if (r <= o || a >= t.maxIterations) {
                    e += t.ellipsis;
                    break
                }
                var s = 0 === a ? yn(e, o, t.ascCharWidth, t.cnCharWidth) : 0 < r ? Math.floor(e.length * o / r) : 0;
                r = un(e = e.substr(0, s), n)
            }
            return "" === e && (e = t.placeholder), e
        }

        function yn(e, t, i, n) {
            for (var o = 0, r = 0, a = e.length; r < a && o < t; r++) {
                var s = e.charCodeAt(r);
                o += 0 <= s && s <= 127 ? i : n
            }
            return r
        }

        function wn(e) {
            return un("国", e)
        }

        function kn(e, t, i, n, o) {
            null != e && (e += "");
            var r = j(n, wn(t)), a = e ? e.split("\n") : [], s = a.length * r, 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 = "", a = []; 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 = a.length; f < p; f++) a[f] = vn(a[f], h)
            }
            return {lines: a, height: s, outerHeight: l, lineHeight: r, canCacheByTextString: d}
        }

        function Tn(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 r = n.index;
                o < r && bn(i, e.substring(o, r)), bn(i, n[2], n[1]), o = sn.lastIndex
            }
            o < e.length && bn(i, e.substring(o, e.length));
            var a = 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 < a.length; p++) {
                for (var g = a[p], m = 0, v = 0, y = 0; y < g.tokens.length; y++) {
                    var w = (x = g.tokens[y]).styleName && t.rich[x.styleName] || {}, k = x.textPadding = w.textPadding,
                        T = x.font = w.font || t.font, b = x.textHeight = j(w.textHeight, wn(T));
                    if (k && (b += k[0] + k[2]), x.height = b, x.lineHeight = G(w.textLineHeight, t.textLineHeight, b), x.textAlign = w && w.textAlign || t.textAlign, x.textVerticalAlign = w && w.textVerticalAlign || "middle", null != f && s + x.lineHeight > f) return {
                        lines: [],
                        width: 0,
                        height: 0
                    };
                    x.textWidth = un(x.text, T);
                    var C = w.textWidth, S = null == C || "auto" === C;
                    if ("string" == typeof C && "%" === C.charAt(C.length - 1)) x.percentWidth = C, d.push(x), C = 0; else {
                        if (S) {
                            C = x.textWidth;
                            var I = w.textBackgroundColor, _ = I && I.image;
                            _ && nn(_ = $i(_)) && (C = Math.max(C, _.width * b / _.height))
                        }
                        var A = k ? k[1] + k[3] : 0;
                        C += A;
                        var D = null != h ? h - v : null;
                        null != D && D < C && (!S || D < A ? (x.text = "", x.textWidth = C = 0) : (x.text = gn(x.text, D - A, T, c.ellipsis, {minChar: c.minChar}), x.textWidth = un(x.text, T), C = x.textWidth + A))
                    }
                    v += x.width = C, w && (m = Math.max(m, x.lineHeight))
                }
                g.width = v, s += g.lineHeight = m, l = Math.max(l, v)
            }
            for (i.outerWidth = i.width = j(t.textWidth, l), i.outerHeight = i.height = j(t.textHeight, s), u && (i.outerWidth += u[1] + u[3], i.outerHeight += u[0] + u[2]), p = 0; p < d.length; p++) {
                var x, N = (x = d[p]).percentWidth;
                x.width = parseInt(N, 10) / 100 * l
            }
            return i
        }

        function bn(e, t, i) {
            for (var n = "" === t, o = t.split("\n"), r = e.lines, a = 0; a < o.length; a++) {
                var s = o[a], l = {styleName: i, text: s, isLineHolder: !s && !n};
                if (a) r.push({tokens: [l]}); else {
                    var d = (r[r.length - 1] || (r[0] = {tokens: []})).tokens, u = d.length;
                    1 === u && d[0].isLineHolder ? d[0] = l : !s && u && !n || d.push(l)
                }
            }
        }

        function Cn(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 Sn(e, t) {
            var i, n, o, r, a, 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 = r = c : c instanceof Array ? 1 === c.length ? i = n = o = r = c[0] : 2 === c.length ? (i = o = c[0], n = r = c[1]) : 3 === c.length ? (i = c[0], n = r = c[1], o = c[2]) : (i = c[0], n = c[1], o = c[2], r = c[3]) : i = n = o = r = 0, d < i + n && (i *= d / (a = i + n), n *= d / a), d < o + r && (o *= d / (a = o + r), r *= d / a), u < n + o && (n *= u / (a = n + o), o *= u / a), u < i + r && (i *= u / (a = i + r), r *= u / a), 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 + r, l + u), 0 !== r && e.arc(s + r, l + u - r, r, 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 = b();
            return i.font = t || ln, i.measureText(e)
        };
        var In = ln, _n = {left: 1, right: 1, center: 1}, An = {top: 1, bottom: 1, middle: 1},
            Dn = [["textShadowBlur", "shadowBlur", 0], ["textShadowOffsetX", "shadowOffsetX", 0], ["textShadowOffsetY", "shadowOffsetY", 0], ["textShadowColor", "shadowColor", "transparent"]],
            xn = {}, Nn = {};

        function En(e) {
            return Pn(e), A(e.rich, Pn), e
        }

        function Pn(e) {
            if (e) {
                e.font = Cn(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 || An[i] ? i : "top", e.textPadding && (e.textPadding = z(e.textPadding))
            }
        }

        function On(e, t, i, n, o, r) {
            n.rich ? function (e, t, i, n, o, r) {
                r !== Ki && (t.__attrCachedBy = Vi.NONE);
                var a = e.__textCotentBlock;
                a && !e.__dirtyText || (a = e.__textCotentBlock = Tn(i, n)), function (e, t, i, n, o) {
                    var r = i.width, a = i.outerWidth, s = i.outerHeight, l = n.textPadding, d = Un(Nn, 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, a, h), g = fn(c, s, f), m = p, v = g;
                    l && (m += l[3], v += l[0]);
                    var y = m + r;
                    Ln(n) && Rn(e, t, n, p, g, a, s);
                    for (var w = 0; w < i.lines.length; w++) {
                        for (var k, T = i.lines[w], b = T.tokens, C = b.length, S = T.lineHeight, I = T.width, _ = 0, A = m, D = y, x = C - 1; _ < C && (!(k = b[_]).textAlign || "left" === k.textAlign);) Fn(e, t, k, n, S, v, A, "left"), I -= k.width, A += k.width, _++;
                        for (; 0 <= x && "right" === (k = b[x]).textAlign;) Fn(e, t, k, n, S, v, D, "right"), I -= k.width, D -= k.width, x--;
                        for (A += (r - (A - m) - (y - D) - I) / 2; _ <= x;) k = b[_], Fn(e, t, k, n, S, v, A + k.width / 2, "center"), A += k.width, _++;
                        v += S
                    }
                }(e, t, a, n, o)
            }(e, t, i, n, o, r) : function (e, t, i, n, o, r) {
                var a, s = Ln(n), l = !1, d = t.__attrCachedBy === Vi.PLAIN_TEXT;
                r !== Ki ? (r && (a = r.style, l = !s && d && a), t.__attrCachedBy = s ? Vi.NONE : Vi.PLAIN_TEXT) : d && (t.__attrCachedBy = Vi.NONE);
                var u = n.font || In;
                l && u === (a.font || In) || (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 = kn(i, c, h, f, n.truncate));
                var g = p.outerHeight, m = p.lines, v = p.lineHeight, y = Un(Nn, e, n, o), w = y.baseX, k = y.baseY,
                    T = y.textAlign || "left", b = y.textVerticalAlign;
                Mn(t, n, o, w, k);
                var C = fn(k, g, b), S = w, I = C;
                if (s || h) {
                    var _ = un(i, c);
                    h && (_ += h[1] + h[3]);
                    var A = hn(w, _, T);
                    s && Rn(e, t, n, A, C, _, g), h && (S = Gn(w, T, h), I += h[0])
                }
                t.textAlign = T, t.textBaseline = "middle", t.globalAlpha = n.opacity || 1;
                for (var D = 0; D < Dn.length; D++) {
                    var x = Dn[D], N = x[0], E = x[1], P = n[N];
                    l && P === a[N] || (t[E] = Ui(t, E, P || x[2]))
                }
                I += v / 2;
                var O = n.textStrokeWidth, M = l ? a.textStrokeWidth : null, F = !l || O !== M,
                    L = !l || F || n.textStroke !== a.textStroke, R = Kn(n.textStroke, O), B = Wn(n.textFill);
                if (R && (F && (t.lineWidth = O), L && (t.strokeStyle = R)), B && (l && n.textFill === a.textFill || (t.fillStyle = B)), 1 === m.length) R && t.strokeText(m[0], S, I), B && t.fillText(m[0], S, I); else for (D = 0; D < m.length; D++) R && t.strokeText(m[D], S, I), B && t.fillText(m[D], S, I), I += v
            }(e, t, i, n, o, r)
        }

        function Mn(e, t, i, n, o) {
            if (i && t.textRotation) {
                var r = t.textOrigin;
                "center" === r ? (n = i.width / 2 + i.x, o = i.height / 2 + i.y) : r && (n = r[0] + i.x, o = r[1] + i.y), e.translate(n, o), e.rotate(-t.textRotation), e.translate(-n, -o)
            }
        }

        function Fn(e, t, i, n, o, r, a, s) {
            var l = n.rich[i.styleName] || {};
            l.text = i.text;
            var d = i.textVerticalAlign, u = r + o / 2;
            "top" === d ? u = r + i.height / 2 : "bottom" === d && (u = r + o - i.height / 2), !i.isLineHolder && Ln(l) && Rn(e, t, l, "right" === s ? a - i.width : "center" === s ? a - i.width / 2 : a, u - i.height / 2, i.width, i.height);
            var c = i.textPadding;
            c && (a = Gn(a, s, c), u -= i.height / 2 - c[2] - i.textHeight / 2), Vn(t, "shadowBlur", G(l.textShadowBlur, n.textShadowBlur, 0)), Vn(t, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), Vn(t, "shadowOffsetX", G(l.textShadowOffsetX, n.textShadowOffsetX, 0)), Vn(t, "shadowOffsetY", G(l.textShadowOffsetY, n.textShadowOffsetY, 0)), Vn(t, "textAlign", s), Vn(t, "textBaseline", "middle"), Vn(t, "font", i.font || In);
            var h = Kn(l.textStroke || n.textStroke, p), f = Wn(l.textFill || n.textFill),
                p = j(l.textStrokeWidth, n.textStrokeWidth);
            h && (Vn(t, "lineWidth", p), Vn(t, "strokeStyle", h), t.strokeText(i.text, a, u)), f && (Vn(t, "fillStyle", f), t.fillText(i.text, a, u))
        }

        function Ln(e) {
            return !!(e.textBackgroundColor || e.textBorderWidth && e.textBorderColor)
        }

        function Rn(e, t, i, n, o, r, a) {
            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 ? Sn(t, {x: n, y: o, width: r, height: a, r: c}) : t.rect(n, o, r, a), 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, r, a)
            }
            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, r = i.y || 0, a = i.textAlign, s = i.textVerticalAlign;
            if (n) {
                var l = i.textPosition;
                if (l instanceof Array) o = n.x + jn(l[0], n.width), r = n.y + jn(l[1], n.height); else {
                    var d = t && t.calculateTextPosition ? t.calculateTextPosition(xn, i, n) : pn(xn, i, n);
                    o = d.x, r = d.y, a = a || d.textAlign, s = s || d.textVerticalAlign
                }
                var u = i.textOffset;
                u && (o += u[0], r += u[1])
            }
            return (e = e || {}).baseX = o, e.baseY = r, e.textAlign = a, 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 Wn(e) {
            return null == e || "none" === e ? null : e.image || e.colorStops ? "#000" : e
        }

        function jn(e, t) {
            return "string" == typeof e ? 0 <= e.lastIndexOf("%") ? parseFloat(e) / 100 * t : parseFloat(e) : e
        }

        function Gn(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 Ai;

        function qn(e) {
            for (var t in e = e || {}, wi.call(this, e), e) e.hasOwnProperty(t) && "style" !== t && (this[t] = e[t]);
            this.style = new ji(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), On(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 ? wi.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 ji(e, this), this.dirty(!1), this
            },
            calculateTextPosition: null
        }, S(qn, wi), I(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 r = i.x || 0, a = 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, r, a, 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, r, a, s, l)
                    } else e.drawImage(o, r, a, 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 Ai(e.x || 0, e.y || 0, e.width || 0, e.height || 0)), this._rect
            }
        }, S(Yn, qn);
        var Jn = 314159;

        function Zn(e) {
            return parseInt(e, 10)
        }

        var Qn = new Ai(0, 0, 0, 0), $n = new Ai(0, 0, 0, 0);

        function eo(e, t, i) {
            this.type = "canvas";
            var n = !e.nodeName || "CANVAS" === e.nodeName.toUpperCase();
            this._opts = i = w({}, 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 r = this._zlevelList = [], a = 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(), (a[Jn] = d).zlevel = Jn, r.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, xe.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], r = this._layers[o];
                    if (!r.__builtin__ && r.refresh) {
                        var a = 0 === n ? this._backgroundColor : null;
                        r.refresh(a)
                    }
                }
                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 = C(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 r = e[o], a = r.__from;
                        a && a.__zr ? (o++, a.invisible || (r.transform = a.transform, r.invTransform = a.invTransform, r.__clipPaths = a.__clipPaths, this._doPaintEl(r, i, !0, n))) : (e.splice(o, 1), a.__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 r = this._zlevelList[n];
                    (l = this._layers[r]).__builtin__ && l !== this._hoverlayer && (l.__dirty || t) && i.push(l)
                }
                for (var a = !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 && (a = !1), u.prevElClipPaths && d.restore(), d.restore()
                }
                return o.wxa && A(this._layers, function (e) {
                    e && e.ctx && e.ctx.draw && e.ctx.draw()
                }), a
            }, _doPaintEl: function (e, t, i, n) {
                var o = t.ctx, r = e.transform;
                if ((t.__dirty || i) && !e.invisible && 0 !== e.style.opacity && (!r || r[0] || r[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 a = 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
                    }(a, s) || (s && (o.restore(), n.prevElClipPaths = null, n.prevEl = null), a && (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)
                        }
                    }(a, o), n.prevElClipPaths = a)), 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, r = null, a = -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 (a = 0; a < o - 1 && !(n[a] < e && n[a + 1] > e); a++) ;
                        r = i[n[a]]
                    }
                    if (n.splice(a + 1, 0, e), !(i[e] = t).virtual) if (r) {
                        var l = r.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, r = this._zlevelList;
                for (o = 0; o < r.length; o++) n = r[o], (i = this._layers[n]).__builtin__ && e.call(t, i, n)
            }, eachOtherLayer: function (e, t) {
                var i, n, o, r = this._zlevelList;
                for (o = 0; o < r.length; o++) n = r[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 ((a = e[i]).zlevel !== e[i - 1].zlevel || a.incremental) {
                    this._needsManuallyCompositing = !0;
                    break
                }
                var n, o = null, r = 0;
                for (i = 0; i < e.length; i++) {
                    var a, s, l = (a = e[i]).zlevel;
                    n !== l && (n = l, r = 0), a.incremental ? ((s = this.getLayer(l + .001, this._needsManuallyCompositing)).incremental = !0, r = 1) : s = this.getLayer(l + (0 < r ? .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), a.__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(C(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);
                        A(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 r = {}, a = this.storage.getDisplayList(!0), s = 0; s < a.length; s++) {
                    var l = a[s];
                    this._doPaintEl(l, t, !0, r)
                }
                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], r = ["paddingRight", "paddingBottom"][e];
                if (null != t[i] && "auto" !== t[i]) return parseFloat(t[i]);
                var a = this.root, s = document.defaultView.getComputedStyle(a);
                return (a[n] || Zn(s[i]) || Zn(a.style[i])) - (Zn(s[o]) || 0) - (Zn(s[r]) || 0) | 0
            }, pathToImage: function (e, t) {
                t = t || this.dpr;
                var i = document.createElement("canvas"), n = i.getContext("2d"), o = e.getBoundingRect(), r = e.style,
                    a = r.shadowBlur * t, s = r.shadowOffsetX * t, l = r.shadowOffsetY * t,
                    d = r.hasStroke() ? r.lineWidth : 0, u = Math.max(d / 2, a - s), c = Math.max(d / 2, s + a),
                    h = Math.max(d / 2, a - l), f = Math.max(d / 2, l + a), 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 = C(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 = [], r = [], a = 0; a < n; a++) {
                    var s = i[a], l = s.step(e, t);
                    l && (o.push(l), r.push(s))
                }
                for (a = 0; a < n;) i[a]._needsRemove ? (i[a] = i[n - 1], i.pop(), n--) : a++;
                for (n = o.length, a = 0; a < n; a++) r[a].fire(o[a]);
                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
            }
        }, I(to, xe);
        var io, no, oo = o.domSupported, ro = (no = {
            pointerdown: 1,
            pointerup: 1,
            pointermove: 1,
            pointerout: 1
        }, {
            mouse: io = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
            touch: ["touchstart", "touchend", "touchmove"],
            pointer: D(io, function (e) {
                var t = e.replace("mouse", "pointer");
                return no.hasOwnProperty(t) ? t : e
            })
        }), ao = {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 = Ge(this.dom, e), this._mayPointerCapture = [e.zrX, e.zrY], this.trigger("mousedown", e)
            }, mousemove: function (e) {
                e = Ge(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 = Ge(this.dom, e), yo(this, !1), this.trigger("mouseup", e)
            }, mouseout: function (e) {
                e = Ge(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 = Ge(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 = Ge(this.dom, e)), this.handler.processGesture(e, "change"), po.mousemove.call(this, e)
            }, touchend: function (e) {
                uo(e = Ge(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)
            }
        };
        A(["click", "mousewheel", "dblclick", "contextmenu"], function (e) {
            po[e] = function (t) {
                t = Ge(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, r = e.mounted;
            for (var a in r) r.hasOwnProperty(a) && (t = e.domTarget, i = so(a), n = r[a], o = e.listenerOpts[a], 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 = je(n), co(e, n.target) || (n = function (e, t) {
                                return Ge(e.dom, new ho(e, t), !0)
                            }(e, n), t.domHandlers[i].call(e, n))
                        }, {capture: !0})
                    }

                    o.pointerEventsSupported ? A(ao.pointer, i) : o.touchEventsSupported || A(ao.mouse, i)
                }(e, i) : vo(i)
            }
        }

        function wo(e, t) {
            this.domTarget = e, this.domHandlers = t, this.mounted = {}, this.listenerOpts = {}, this.touchTimer = null, this.touching = !1
        }

        function ko(e, t) {
            var i, n, r;
            xe.call(this), this.dom = e, this.painterRoot = t, this._localHandlerScope = new wo(e, po), oo && (this._globalHandlerScope = new wo(document, go)), this._pointerCapturing = !1, this._mayPointerCapture = null, i = this, n = this._localHandlerScope, r = n.domHandlers, o.pointerEventsSupported ? A(ro.pointer, function (e) {
                mo(n, e, function (t) {
                    r[e].call(i, t)
                })
            }) : (o.touchEventsSupported && A(ro.touch, function (e) {
                mo(n, e, function (t) {
                    r[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)
                })
            }), A(ro.mouse, function (e) {
                mo(n, e, function (t) {
                    t = je(t), n.touching || r[e].call(i, t)
                })
            }))
        }

        var To = ko.prototype;
        To.dispose = function () {
            vo(this._localHandlerScope), oo && vo(this._globalHandlerScope)
        }, To.setCursor = function (e) {
            this.dom.style && (this.dom.style.cursor = e || "default")
        }, I(ko, xe);
        var bo = !o.canvasSupported, Co = {canvas: eo}, So = {};

        function Io(e, t) {
            var i = new Ao(n(), e, t);
            return So[i.id] = i
        }

        function _o(e, t) {
            Co[e] = t
        }

        var Ao = function (e, t, i) {
            i = i || {}, this.dom = t, this.id = e;
            var n = this, r = new Ri, a = i.renderer;
            if (bo) {
                if (!Co.vml) throw new Error("You need to require 'zrender/vml/vml' to support IE8");
                a = "vml"
            } else a && Co[a] || (a = "canvas");
            var s = new Co[a](t, r, i, e);
            this.storage = r, this.painter = s;
            var l = o.node || o.worker ? null : new ko(s.getViewportRoot(), s.root);
            this.handler = new et(r, s, l, s.root), this.animation = new to({stage: {update: P(this.flush, this)}}), this.animation.start(), this._needsRefresh;
            var d = r.delFromStorage, u = r.addToStorage;
            r.delFromStorage = function (e) {
                d.call(r, e), e && e.removeSelfFromZr(n)
            }, r.addToStorage = function (e) {
                u.call(r, e), e.addSelfToZr(n)
            }
        };
        Ao.prototype = {
            constructor: Ao, 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 So[e]
            }
        };
        var Do = (Object.freeze || Object)({
            version: "4.3.1", init: Io, dispose: function (e) {
                if (e) e.dispose(); else {
                    for (var t in So) So.hasOwnProperty(t) && So[t].dispose();
                    So = {}
                }
                return this
            }, getInstance: function (e) {
                return So[e]
            }, registerPainter: _o
        }), xo = A, No = R, Eo = M, Po = "series\0";

        function Oo(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 r = i[n];
                    !e.emphasis[t].hasOwnProperty(r) && e[t].hasOwnProperty(r) && (e.emphasis[t][r] = e[t][r])
                }
            }
        }

        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 !No(e) || Eo(e) || e instanceof Date ? e : e.value
        }

        function Ro(e, t) {
            t = (t || []).slice();
            var i = D(e || [], function (e, t) {
                return {exist: e}
            });
            return xo(t, function (e, n) {
                if (No(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 r = i[o].exist;
                        if (!(i[o].option || null != r.id && null != e.id || null == e.name || Vo(e) || Vo(r) || r.name !== e.name + "")) return i[o].option = e, void (t[n] = null)
                    }
                }
            }), xo(t, function (e, t) {
                if (No(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 = $();
            xo(e, function (e, i) {
                var n = e.exist;
                n && t.set(n.id, e)
            }), xo(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 = {})
            }), xo(e, function (e, i) {
                var n = e.exist, o = e.option, r = e.keyInfo;
                if (No(o)) {
                    if (r.name = null != o.name ? o.name + "" : n ? n.name : Po + i, n) r.id = n.id; else if (null != o.id) r.id = o.id + ""; else for (var a = 0; r.id = "\0" + r.name + "\0" + a++, t.get(r.id);) ;
                    t.set(r.id, e)
                }
            })
        }

        function Uo(e) {
            var t = e.name;
            return !(!t || !t.indexOf(Po))
        }

        function Vo(e) {
            return No(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) ? D(t.dataIndex, function (t) {
                return e.indexOfRawIndex(t)
            }) : e.indexOfRawIndex(t.dataIndex) : null != t.name ? M(t.name) ? D(t.name, function (t) {
                return e.indexOfName(t)
            }) : e.indexOfName(t.name) : void 0
        }

        function Wo() {
            var e = "__\0ec_inner_" + jo++ + "_" + Math.random().toFixed(5);
            return function (t) {
                return t[e] || (t[e] = {})
            }
        }

        var jo = 0;

        function Go(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 r = {};
            return xo(t, function (n, o) {
                if (n = t[o], "dataIndex" !== o && "dataIndexInside" !== o) {
                    var a = o.match(/^(\w+)(Index|Id|Name)$/) || [], s = a[1], l = (a[2] || "").toLowerCase();
                    if (!(!s || !l || null == n || "index" === l && "none" === n || i && i.includeMainTypes && C(i.includeMainTypes, s) < 0)) {
                        var d = {mainType: s};
                        "index" === l && "all" === n || (d[l] = n);
                        var u = e.queryComponents(d);
                        r[s + "Models"] = u, r[s + "Model"] = u[0]
                    }
                } else r[o] = n
            }), r
        }

        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 A(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 w(t.prototype, e), t.extend = this.extend, t.superCall = tr, t.superApply = ir, S(t, this), t.superClass = i, t
            }
        }

        var $o = 0;

        function er(e) {
            var t = ["__\0is_clz", $o++, Math.random().toFixed(3)].join("_");
            e.prototype[t] = !0, e.isInstance = function (e) {
                return !(!e || !e[t])
            }
        }

        function tr(e, t) {
            var i = H(arguments, 2);
            return this.superClass.prototype[t].apply(e, i)
        }

        function ir(e, t, i) {
            return this.superClass.prototype[t].apply(e, i)
        }

        function nr(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] ? A(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 A(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 or(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 = {}, r = 0; r < e.length; r++) {
                    var a = e[r][1];
                    if (!(i && 0 <= C(i, a) || n && C(n, a) < 0)) {
                        var s = t.getShallow(a);
                        null != s && (o[e[r][0]] = s)
                    }
                }
                return o
            }
        }

        var rr = or([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
            ar = {
                getLineStyle: function (e) {
                    var t = rr(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])
                }
            },
            sr = or([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]),
            lr = {
                getAreaStyle: function (e, t) {
                    return sr(this, e, t)
                }
            }, dr = Math.pow, ur = Math.sqrt, cr = 1e-8, hr = 1e-4, fr = ur(3), pr = 1 / 3, gr = oe(), mr = oe(),
            vr = oe();

        function yr(e) {
            return -cr < e && e < cr
        }

        function wr(e) {
            return cr < e || e < -cr
        }

        function kr(e, t, i, n, o) {
            var r = 1 - o;
            return r * r * (r * e + 3 * o * t) + o * o * (o * n + 3 * r * i)
        }

        function Tr(e, t, i, n, o) {
            var r = 1 - o;
            return 3 * (((t - e) * r + 2 * (i - t) * o) * r + (n - i) * o * o)
        }

        function br(e, t, i, n, o) {
            var r = 6 * i - 12 * t + 6 * e, a = 9 * t + 3 * n - 3 * e - 9 * i, s = 3 * t - 3 * e, l = 0;
            if (yr(a)) wr(r) && 0 <= (u = -s / r) && u <= 1 && (o[l++] = u); else {
                var d = r * r - 4 * a * s;
                if (yr(d)) o[0] = -r / (2 * a); else if (0 < d) {
                    var u, c = ur(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
        }

        function Cr(e, t, i, n, o, r) {
            var a = (t - e) * o + e, s = (i - t) * o + t, l = (n - i) * o + i, d = (s - a) * o + a, u = (l - s) * o + s,
                c = (u - d) * o + d;
            r[0] = e, r[1] = a, r[2] = d, r[3] = c, r[4] = c, r[5] = u, r[6] = l, r[7] = n
        }

        function Sr(e, t, i, n) {
            var o = 1 - n;
            return o * (o * e + 2 * n * t) + n * n * i
        }

        function Ir(e, t, i, n) {
            return 2 * ((1 - n) * (t - e) + n * (i - t))
        }

        function _r(e, t, i) {
            var n = e + i - 2 * t;
            return 0 == n ? .5 : (e - t) / n
        }

        function Ar(e, t, i, n, o) {
            var r = (t - e) * n + e, a = (i - t) * n + t, s = (a - r) * n + r;
            o[0] = e, o[1] = r, o[2] = s, o[3] = s, o[4] = a, o[5] = i
        }

        var Dr = Math.min, xr = Math.max, Nr = Math.sin, Er = Math.cos, Pr = 2 * Math.PI, Or = oe(), Mr = oe(),
            Fr = oe();

        function Lr(e, t, i) {
            if (0 !== e.length) {
                var n, o = e[0], r = o[0], a = o[0], s = o[1], l = o[1];
                for (n = 1; n < e.length; n++) o = e[n], r = Dr(r, o[0]), a = xr(a, o[0]), s = Dr(s, o[1]), l = xr(l, o[1]);
                t[0] = r, t[1] = s, i[0] = a, i[1] = l
            }
        }

        function Rr(e, t, i, n, o, r) {
            o[0] = Dr(e, i), o[1] = Dr(t, n), r[0] = xr(e, i), r[1] = xr(t, n)
        }

        var Br = [], Ur = [];

        function Vr(e, t, i, n, o, r, a, s, l, d) {
            var u, c = br, h = kr, f = c(e, i, o, a, Br);
            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, a, Br[u]);
                l[0] = Dr(p, l[0]), d[0] = xr(p, d[0])
            }
            for (f = c(t, n, r, s, Ur), u = 0; u < f; u++) {
                var g = h(t, n, r, s, Ur[u]);
                l[1] = Dr(g, l[1]), d[1] = xr(g, d[1])
            }
            l[0] = Dr(e, l[0]), d[0] = xr(e, d[0]), l[0] = Dr(a, l[0]), d[0] = xr(a, d[0]), l[1] = Dr(t, l[1]), d[1] = xr(t, d[1]), l[1] = Dr(s, l[1]), d[1] = xr(s, d[1])
        }

        function Kr(e, t, i, n, o, r, a, s, l) {
            var d = Ce, u = Se, c = Math.abs(o - r);
            if (c % Pr < 1e-4 && 1e-4 < c) return s[0] = e - i, s[1] = t - n, l[0] = e + i, void (l[1] = t + n);
            if (Or[0] = Er(o) * i + e, Or[1] = Nr(o) * n + t, Mr[0] = Er(r) * i + e, Mr[1] = Nr(r) * n + t, d(s, Or, Mr), u(l, Or, Mr), (o %= Pr) < 0 && (o += Pr), (r %= Pr) < 0 && (r += Pr), r < o && !a ? r += Pr : o < r && a && (o += Pr), a) {
                var h = r;
                r = o, o = h
            }
            for (var f = 0; f < r; f += Math.PI / 2) o < f && (Fr[0] = Er(f) * i + e, Fr[1] = Nr(f) * n + t, d(s, Fr, s), u(l, Fr, l))
        }

        var Wr = {M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7}, jr = [], Gr = [], Hr = [], zr = [], Xr = Math.min,
            qr = Math.max, Yr = Math.cos, Jr = Math.sin, Zr = Math.sqrt, Qr = Math.abs,
            $r = "undefined" != typeof Float32Array, ea = function (e) {
                this._saveData = !e, this._saveData && (this.data = []), this._ctx = null
            };

        function ta(e, t, i, n, o, r, a) {
            if (0 === o) return !1;
            var s = o, l = 0;
            if (t + s < a && n + s < a || a < t - s && a < n - s || e + s < r && i + s < r || r < e - s && r < i - s) return !1;
            if (e === i) return Math.abs(r - e) <= s / 2;
            var d = (l = (t - n) / (e - i)) * r - a + (e * n - i * t) / (e - i);
            return d * d / (l * l + 1) <= s / 2 * s / 2
        }

        function ia(e, t, i, n, o, r, a, s, l, d, u) {
            if (0 === l) return !1;
            var c = l;
            return !(t + c < u && n + c < u && r + c < u && s + c < u || u < t - c && u < n - c && u < r - c && u < s - c || e + c < d && i + c < d && o + c < d && a + c < d || d < e - c && d < i - c && d < o - c && d < a - c) && function (e, t, i, n, o, r, a, s, l, d, u) {
                var c, h, f, p, g, m = .005, v = 1 / 0;
                gr[0] = l, gr[1] = d;
                for (var y = 0; y < 1; y += .05) mr[0] = kr(e, i, o, a, y), mr[1] = kr(t, n, r, s, y), (p = ke(gr, mr)) < v && (c = y, v = p);
                v = 1 / 0;
                for (var w = 0; w < 32 && !(m < hr); w++) h = c - m, f = c + m, mr[0] = kr(e, i, o, a, h), mr[1] = kr(t, n, r, s, h), p = ke(mr, gr), 0 <= h && p < v ? (c = h, v = p) : (vr[0] = kr(e, i, o, a, f), vr[1] = kr(t, n, r, s, f), g = ke(vr, gr), f <= 1 && g < v ? (c = f, v = g) : m *= .5);
                return ur(v)
            }(e, t, i, n, o, r, a, s, d, u) <= c / 2
        }

        function na(e, t, i, n, o, r, a, s, l) {
            if (0 === a) return !1;
            var d = a;
            return !(t + d < l && n + d < l && r + d < l || l < t - d && l < n - d && l < r - 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, r, a, s, l) {
                var d, u = .005, c = 1 / 0;
                gr[0] = a, gr[1] = s;
                for (var h = 0; h < 1; h += .05) mr[0] = Sr(e, i, o, h), mr[1] = Sr(t, n, r, h), (m = ke(gr, mr)) < c && (d = h, c = m);
                c = 1 / 0;
                for (var f = 0; f < 32 && !(u < hr); f++) {
                    var p = d - u, g = d + u;
                    mr[0] = Sr(e, i, o, p), mr[1] = Sr(t, n, r, p);
                    var m = ke(mr, gr);
                    if (0 <= p && m < c) d = p, c = m; else {
                        vr[0] = Sr(e, i, o, g), vr[1] = Sr(t, n, r, g);
                        var v = ke(vr, gr);
                        g <= 1 && v < c ? (d = g, c = v) : u *= .5
                    }
                }
                return ur(c)
            }(e, t, i, n, o, r, s, l) <= d / 2
        }

        ea.prototype = {
            constructor: ea,
            _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 = Qr(i / pi / e) || 0, this._uy = Qr(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(Wr.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 = Qr(e - this._xi) > this._ux || Qr(t - this._yi) > this._uy || this._len < 5;
                return this.addData(Wr.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, r) {
                return this.addData(Wr.C, e, t, i, n, o, r), this._ctx && (this._needsDash() ? this._dashedBezierTo(e, t, i, n, o, r) : this._ctx.bezierCurveTo(e, t, i, n, o, r)), this._xi = o, this._yi = r, this
            },
            quadraticCurveTo: function (e, t, i, n) {
                return this.addData(Wr.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, r) {
                return this.addData(Wr.A, e, t, i, i, n, o - n, 0, r ? 0 : 1), this._ctx && this._ctx.arc(e, t, i, n, o, r), this._xi = Yr(o) * i + e, this._yi = Jr(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(Wr.R, e, t, i, n), this
            },
            closePath: function () {
                this.addData(Wr.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 || !$r || (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 ($r && this.data instanceof Float32Array && (this.data = new Float32Array(n + i)), o = 0; o < t; o++) for (var r = e[o].data, a = 0; a < r.length; a++) this.data[n++] = r[a];
                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, r = this._dashOffset, a = this._lineDash, s = this._ctx, l = this._xi,
                    d = this._yi, u = e - l, c = t - d, h = Zr(u * u + c * c), f = l, p = d, g = a.length;
                for (r < 0 && (r = o + r), f -= (r %= o) * (u /= h), p -= r * (c /= h); 0 < u && f <= e || u < 0 && e <= f || 0 === u && (0 < c && p <= t || c < 0 && t <= p);) f += u * (i = a[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 ? Xr(f, e) : qr(f, e), 0 <= c ? Xr(p, t) : qr(p, t));
                u = f - e, c = p - t, this._dashOffset = -Zr(u * u + c * c)
            },
            _dashedBezierTo: function (e, t, i, n, o, r) {
                var a, s, l, d, u, c = this._dashSum, h = this._dashOffset, f = this._lineDash, p = this._ctx,
                    g = this._xi, m = this._yi, v = kr, y = 0, w = this._dashIdx, k = f.length, T = 0;
                for (h < 0 && (h = c + h), h %= c, a = 0; a < 1; a += .1) s = v(g, e, i, o, a + .1) - v(g, e, i, o, a), l = v(m, t, n, r, a + .1) - v(m, t, n, r, a), y += Zr(s * s + l * l);
                for (; w < k && !(h < (T += f[w])); w++) ;
                for (a = (T - h) / y; a <= 1;) d = v(g, e, i, o, a), u = v(m, t, n, r, a), w % 2 ? p.moveTo(d, u) : p.lineTo(d, u), a += f[w] / y, w = (w + 1) % k;
                w % 2 != 0 && p.lineTo(o, r), s = o - d, l = r - u, this._dashOffset = -Zr(s * s + l * l)
            },
            _dashedQuadraticTo: function (e, t, i, n) {
                var o = i, r = 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, r)
            },
            toStatic: function () {
                var e = this.data;
                e instanceof Array && (e.length = this._len, $r && (this.data = new Float32Array(e)))
            },
            getBoundingRect: function () {
                jr[0] = jr[1] = Hr[0] = Hr[1] = Number.MAX_VALUE, Gr[0] = Gr[1] = zr[0] = zr[1] = -Number.MAX_VALUE;
                for (var e, t, i, n, o, r, a, s, l, d, u, c, h, f, p = this.data, g = 0, m = 0, v = 0, y = 0, w = 0; w < p.length;) {
                    var k = p[w++];
                    switch (1 === w && (v = g = p[w], y = m = p[w + 1]), k) {
                        case Wr.M:
                            g = v = p[w++], m = y = p[w++], Hr[0] = v, Hr[1] = y, zr[0] = v, zr[1] = y;
                            break;
                        case Wr.L:
                            Rr(g, m, p[w], p[w + 1], Hr, zr), g = p[w++], m = p[w++];
                            break;
                        case Wr.C:
                            Vr(g, m, p[w++], p[w++], p[w++], p[w++], p[w], p[w + 1], Hr, zr), g = p[w++], m = p[w++];
                            break;
                        case Wr.Q:
                            e = g, t = m, i = p[w++], n = p[w++], o = p[w], r = p[w + 1], a = Hr, s = zr, d = l = void 0, d = Sr, u = xr(Dr((l = _r)(e, i, o), 1), 0), c = xr(Dr(l(t, n, r), 1), 0), h = d(e, i, o, u), f = d(t, n, r, c), a[0] = Dr(e, o, h), a[1] = Dr(t, r, f), s[0] = xr(e, o, h), s[1] = xr(t, r, f), g = p[w++], m = p[w++];
                            break;
                        case Wr.A:
                            var T = p[w++], b = p[w++], C = p[w++], S = p[w++], I = p[w++], _ = p[w++] + I;
                            w += 1;
                            var A = 1 - p[w++];
                            1 === w && (v = Yr(I) * C + T, y = Jr(I) * S + b), Kr(T, b, C, S, I, _, A, Hr, zr), g = Yr(_) * C + T, m = Jr(_) * S + b;
                            break;
                        case Wr.R:
                            Rr(v = g = p[w++], y = m = p[w++], v + p[w++], y + p[w++], Hr, zr);
                            break;
                        case Wr.Z:
                            g = v, m = y
                    }
                    Ce(jr, jr, Hr), Se(Gr, Gr, zr)
                }
                return 0 === w && (jr[0] = jr[1] = Gr[0] = Gr[1] = 0), new Ai(jr[0], jr[1], Gr[0] - jr[0], Gr[1] - jr[1])
            },
            rebuildPath: function (e) {
                for (var t, i, n, o, r, a, 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 Wr.M:
                            t = n = s[c++], i = o = s[c++], e.moveTo(n, o);
                            break;
                        case Wr.L:
                            r = s[c++], a = s[c++], (Qr(r - n) > l || Qr(a - o) > d || c === u - 1) && (e.lineTo(r, a), n = r, o = a);
                            break;
                        case Wr.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 Wr.Q:
                            e.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1];
                            break;
                        case Wr.A:
                            var f = s[c++], p = s[c++], g = s[c++], m = s[c++], v = s[c++], y = s[c++], w = s[c++],
                                k = s[c++], T = m < g ? g : m, b = m < g ? 1 : g / m, C = m < g ? m / g : 1, S = v + y;
                            .001 < Math.abs(g - m) ? (e.translate(f, p), e.rotate(w), e.scale(b, C), e.arc(0, 0, T, v, S, 1 - k), e.scale(1 / b, 1 / C), e.rotate(-w), e.translate(-f, -p)) : e.arc(f, p, T, v, S, 1 - k), 1 === c && (t = Yr(v) * g + f, i = Jr(v) * m + p), n = Yr(S) * g + f, o = Jr(S) * m + p;
                            break;
                        case Wr.R:
                            t = n = s[c], i = o = s[c + 1], e.rect(s[c++], s[c++], s[c++], s[c++]);
                            break;
                        case Wr.Z:
                            e.closePath(), n = t, o = i
                    }
                }
            }
        }, ea.CMD = Wr;
        var oa = 2 * Math.PI;

        function ra(e) {
            return (e %= oa) < 0 && (e += oa), e
        }

        var aa = 2 * Math.PI;

        function sa(e, t, i, n, o, r, a, s, l) {
            if (0 === a) return !1;
            var d = a;
            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) % aa < 1e-4) return !0;
            if (r) {
                var c = n;
                n = ra(o), o = ra(c)
            } else n = ra(n), o = ra(o);
            o < n && (o += aa);
            var h = Math.atan2(l, s);
            return h < 0 && (h += aa), n <= h && h <= o || n <= h + aa && h + aa <= o
        }

        function la(e, t, i, n, o, r) {
            if (t < r && n < r || r < t && r < n) return 0;
            if (n === t) return 0;
            var a = n < t ? 1 : -1, s = (r - t) / (n - t);
            1 != s && 0 != s || (a = n < t ? .5 : -.5);
            var l = s * (i - e) + e;
            return l === o ? 1 / 0 : o < l ? a : 0
        }

        var da = ea.CMD, ua = 2 * Math.PI, ca = 1e-4, ha = [-1, -1, -1], fa = [-1, -1];

        function pa(e, t, i, n, o, r, a, s, l, d) {
            if (t < d && n < d && r < d && s < d || d < t && d < n && d < r && d < s) return 0;
            var u, c = function (e, t, i, n, o, r) {
                var a = n + 3 * (t - i) - e, s = 3 * (i - 2 * t + e), l = 3 * (t - e), d = e - o, u = s * s - 3 * a * l,
                    c = s * l - 9 * a * d, h = l * l - 3 * s * d, f = 0;
                if (yr(u) && yr(c)) yr(s) ? r[0] = 0 : 0 <= (S = -l / s) && S <= 1 && (r[f++] = S); else {
                    var p = c * c - 4 * u * h;
                    if (yr(p)) {
                        var g = c / u, m = -g / 2;
                        0 <= (S = -s / a + g) && S <= 1 && (r[f++] = S), 0 <= m && m <= 1 && (r[f++] = m)
                    } else if (0 < p) {
                        var v = ur(p), y = u * s + 1.5 * a * (-c + v), w = u * s + 1.5 * a * (-c - v);
                        0 <= (S = (-s - ((y = y < 0 ? -dr(-y, pr) : dr(y, pr)) + (w = w < 0 ? -dr(-w, pr) : dr(w, pr)))) / (3 * a)) && S <= 1 && (r[f++] = S)
                    } else {
                        var k = (2 * u * s - 3 * a * c) / (2 * ur(u * u * u)), T = Math.acos(k) / 3, b = ur(u),
                            C = Math.cos(T), S = (-s - 2 * b * C) / (3 * a),
                            I = (m = (-s + b * (C + fr * Math.sin(T))) / (3 * a), (-s + b * (C - fr * Math.sin(T))) / (3 * a));
                        0 <= S && S <= 1 && (r[f++] = S), 0 <= m && m <= 1 && (r[f++] = m), 0 <= I && I <= 1 && (r[f++] = I)
                    }
                }
                return f
            }(t, n, r, s, d, ha);
            if (0 === c) return 0;
            for (var h, f, p = 0, g = -1, m = 0; m < c; m++) {
                var v = ha[m], y = 0 === v || 1 === v ? .5 : 1;
                kr(e, i, o, a, v) < l || (g < 0 && (g = br(t, n, r, s, fa), fa[1] < fa[0] && 1 < g && (u = fa[0], fa[0] = fa[1], fa[1] = u), h = kr(t, n, r, s, fa[0]), 1 < g && (f = kr(t, n, r, s, fa[1]))), 2 === g ? v < fa[0] ? p += h < t ? y : -y : v < fa[1] ? p += f < h ? y : -y : p += s < f ? y : -y : v < fa[0] ? p += h < t ? y : -y : p += s < h ? y : -y)
            }
            return p
        }

        function ga(e, t, i, n, o, r, a, s) {
            if (t < s && n < s && r < s || s < t && s < n && s < r) return 0;
            var l = function (e, t, i, n, o) {
                var r = e - 2 * t + i, a = 2 * (t - e), s = e - n, l = 0;
                if (yr(r)) wr(a) && 0 <= (u = -s / a) && u <= 1 && (o[l++] = u); else {
                    var d = a * a - 4 * r * s;
                    if (yr(d)) 0 <= (u = -a / (2 * r)) && u <= 1 && (o[l++] = u); else if (0 < d) {
                        var u, c = ur(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
            }(t, n, r, s, ha);
            if (0 === l) return 0;
            var d = _r(t, n, r);
            if (0 <= d && d <= 1) {
                for (var u = 0, c = Sr(t, n, r, d), h = 0; h < l; h++) {
                    var f = 0 === ha[h] || 1 === ha[h] ? .5 : 1;
                    Sr(e, i, o, ha[h]) < a || (ha[h] < d ? u += c < t ? f : -f : u += r < c ? f : -f)
                }
                return u
            }
            return f = 0 === ha[0] || 1 === ha[0] ? .5 : 1, Sr(e, i, o, ha[0]) < a ? 0 : r < t ? f : -f
        }

        function ma(e, t, i, n, o, r, a, s) {
            if (i < (s -= t) || s < -i) return 0;
            var l = Math.sqrt(i * i - s * s);
            ha[0] = -l, ha[1] = l;
            var d = Math.abs(n - o);
            if (d < 1e-4) return 0;
            if (d % ua < 1e-4) {
                o = ua;
                var u = r ? 1 : -1;
                return a >= ha[n = 0] + e && a <= ha[1] + e ? u : 0
            }
            r ? (l = n, n = ra(o), o = ra(l)) : (n = ra(n), o = ra(o)), o < n && (o += ua);
            for (var c = 0, h = 0; h < 2; h++) {
                var f = ha[h];
                if (a < f + e) {
                    var p = Math.atan2(s, f);
                    u = r ? 1 : -1, p < 0 && (p = ua + p), (n <= p && p <= o || n <= p + ua && p + ua <= o) && (p > Math.PI / 2 && p < 1.5 * Math.PI && (u = -u), c += u)
                }
            }
            return c
        }

        function va(e, t, i, n, o) {
            for (var r = 0, a = 0, s = 0, l = 0, d = 0, u = 0; u < e.length;) {
                var c = e[u++];
                switch (c === da.M && 1 < u && (i || (r += la(a, s, l, d, n, o))), 1 === u && (l = a = e[u], d = s = e[u + 1]), c) {
                    case da.M:
                        a = l = e[u++], s = d = e[u++];
                        break;
                    case da.L:
                        if (i) {
                            if (ta(a, s, e[u], e[u + 1], t, n, o)) return !0
                        } else r += la(a, s, e[u], e[u + 1], n, o) || 0;
                        a = e[u++], s = e[u++];
                        break;
                    case da.C:
                        if (i) {
                            if (ia(a, s, e[u++], e[u++], e[u++], e[u++], e[u], e[u + 1], t, n, o)) return !0
                        } else r += pa(a, s, e[u++], e[u++], e[u++], e[u++], e[u], e[u + 1], n, o) || 0;
                        a = e[u++], s = e[u++];
                        break;
                    case da.Q:
                        if (i) {
                            if (na(a, s, e[u++], e[u++], e[u], e[u + 1], t, n, o)) return !0
                        } else r += ga(a, s, e[u++], e[u++], e[u], e[u + 1], n, o) || 0;
                        a = e[u++], s = e[u++];
                        break;
                    case da.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++], w = Math.cos(m) * p + h, k = Math.sin(m) * g + f;
                        1 < u ? r += la(a, s, w, k, n, o) : (l = w, d = k);
                        var T = (n - h) * g / p + h;
                        if (i) {
                            if (sa(h, f, g, m, m + v, y, t, T, o)) return !0
                        } else r += ma(h, f, g, m, m + v, y, T, o);
                        a = Math.cos(m + v) * p + h, s = Math.sin(m + v) * g + f;
                        break;
                    case da.R:
                        if (l = a = e[u++], d = s = e[u++], w = l + e[u++], k = d + e[u++], i) {
                            if (ta(l, d, w, d, t, n, o) || ta(w, d, w, k, t, n, o) || ta(w, k, l, k, t, n, o) || ta(l, k, l, d, t, n, o)) return !0
                        } else r += la(w, d, w, k, n, o), r += la(l, k, l, d, n, o);
                        break;
                    case da.Z:
                        if (i) {
                            if (ta(a, s, l, d, t, n, o)) return !0
                        } else r += la(a, s, l, d, n, o);
                        a = l, s = d
                }
            }
            return i || function (e, t) {
                return Math.abs(e - t) < ca
            }(s, d) || (r += la(a, s, l, d, n, o) || 0), 0 !== r
        }

        var ya = Xi.prototype.getCanvasPattern, wa = Math.abs, ka = new ea(!0);

        function Ta(e) {
            qn.call(this, e), this.path = null
        }

        function ba(e) {
            return Math.sqrt(e[0] * e[0] + e[1] * e[1])
        }

        Ta.prototype = {
            constructor: Ta,
            type: "path",
            __dirtyPath: !0,
            strokeContainThreshold: 5,
            segmentIgnoreThreshold: 0,
            subPixelOptimize: !1,
            brush: function (e, t) {
                var i, n = this.style, o = this.path || ka, r = n.hasStroke(), a = n.hasFill(), s = n.fill,
                    l = n.stroke, d = a && !!s.colorStops, u = r && !!l.colorStops, c = a && !!s.image,
                    h = r && !!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 = ya.call(s, e)), u ? e.strokeStyle = this._strokeGradient : h && (e.strokeStyle = ya.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 && r ? (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)), a) 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), r && (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 ea
            },
            getBoundingRect: function () {
                var e = this._rect, t = this.style, i = !e;
                if (i) {
                    var n = this.path;
                    n = n || (this.path = new ea), 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 r = t.lineWidth, a = t.strokeNoScale ? this.getLineScale() : 1;
                        t.hasFill() || (r = Math.max(r, this.strokeContainThreshold || 4)), 1e-10 < a && (o.width += r / a, o.height += r / a, o.x -= r / a / 2, o.y -= r / a / 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 r = this.path.data;
                    if (o.hasStroke()) {
                        var a = o.lineWidth, s = o.strokeNoScale ? this.getLineScale() : 1;
                        if (1e-10 < s && (o.hasFill() || (a = Math.max(a, this.strokeContainThreshold)), function (e, t, i, n) {
                            return va(e, t, !0, i, n)
                        }(r, a / s, e, t))) return !0
                    }
                    if (o.hasFill()) return function (e, t, i) {
                        return va(e, 0, !1, t, i)
                    }(r, 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 < wa(e[0] - 1) && 1e-10 < wa(e[3] - 1) ? Math.sqrt(wa(e[0] * e[3] - e[2] * e[1])) : 1
            }
        }, Ta.extend = function (e) {
            function t(t) {
                Ta.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 S(t, Ta), e) "style" !== i && "shape" !== i && (t.prototype[i] = e[i]);
            return t
        }, S(Ta, qn);
        var Ca = ea.CMD, Sa = [[], [], []], Ia = Math.sqrt, _a = Math.atan2, Aa = function (e, t) {
            var i, n, o, r, a, s = e.data, l = Ca.M, d = Ca.C, u = Ca.L, c = Ca.R, h = Ca.A, f = Ca.Q;
            for (r = o = 0; o < s.length;) {
                switch (i = s[o++], r = 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 = Ia(t[0] * t[0] + t[1] * t[1]), v = Ia(t[2] * t[2] + t[3] * t[3]),
                            y = _a(-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, r = o += 2;
                        break;
                    case c:
                        w[0] = s[o++], w[1] = s[o++], be(w, w, t), s[r++] = w[0], s[r++] = w[1], w[0] += s[o++], w[1] += s[o++], be(w, w, t), s[r++] = w[0], s[r++] = w[1]
                }
                for (a = 0; a < n; a++) {
                    var w;
                    (w = Sa[a])[0] = s[o++], w[1] = s[o++], be(w, w, t), s[r++] = w[0], s[r++] = w[1]
                }
            }
        }, Da = Math.sqrt, xa = Math.sin, Na = Math.cos, Ea = Math.PI, Pa = function (e, t) {
            return (e[0] * t[0] + e[1] * t[1]) / (ba(e) * ba(t))
        }, Oa = function (e, t) {
            return (e[0] * t[1] < e[1] * t[0] ? -1 : 1) * Math.acos(Pa(e, t))
        };

        function Ma(e, t, i, n, o, r, a, s, l, d, u) {
            var c = l * (Ea / 180), h = Na(c) * (e - i) / 2 + xa(c) * (t - n) / 2,
                f = -1 * xa(c) * (e - i) / 2 + Na(c) * (t - n) / 2, p = h * h / (a * a) + f * f / (s * s);
            1 < p && (a *= Da(p), s *= Da(p));
            var g = (o === r ? -1 : 1) * Da((a * a * (s * s) - a * a * (f * f) - s * s * (h * h)) / (a * a * (f * f) + s * s * (h * h))) || 0,
                m = g * a * f / s, v = g * -s * h / a, y = (e + i) / 2 + Na(c) * m - xa(c) * v,
                w = (t + n) / 2 + xa(c) * m + Na(c) * v, k = Oa([1, 0], [(h - m) / a, (f - v) / s]),
                T = [(h - m) / a, (f - v) / s], b = [(-1 * h - m) / a, (-1 * f - v) / s], C = Oa(T, b);
            Pa(T, b) <= -1 && (C = Ea), 1 <= Pa(T, b) && (C = 0), 0 === r && 0 < C && (C -= 2 * Ea), 1 === r && C < 0 && (C += 2 * Ea), u.addData(d, y, w, a, s, k, C, c, r)
        }

        var Fa = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi, La = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;

        function Ra(e, t) {
            var i = function (e) {
                if (!e) return new ea;
                for (var t, i = 0, n = 0, o = i, r = n, a = new ea, s = ea.CMD, l = e.match(Fa), d = 0; d < l.length; d++) {
                    for (var u, c = l[d], h = c.charAt(0), f = c.match(La) || [], p = f.length, g = 0; g < p; g++) f[g] = parseFloat(f[g]);
                    for (var m = 0; m < p;) {
                        var v, y, w, k, T, b, C, S = i, I = n;
                        switch (h) {
                            case"l":
                                i += f[m++], n += f[m++], u = s.L, a.addData(u, i, n);
                                break;
                            case"L":
                                i = f[m++], n = f[m++], u = s.L, a.addData(u, i, n);
                                break;
                            case"m":
                                i += f[m++], n += f[m++], u = s.M, a.addData(u, i, n), o = i, r = n, h = "l";
                                break;
                            case"M":
                                i = f[m++], n = f[m++], u = s.M, a.addData(u, i, n), o = i, r = n, h = "L";
                                break;
                            case"h":
                                i += f[m++], u = s.L, a.addData(u, i, n);
                                break;
                            case"H":
                                i = f[m++], u = s.L, a.addData(u, i, n);
                                break;
                            case"v":
                                n += f[m++], u = s.L, a.addData(u, i, n);
                                break;
                            case"V":
                                n = f[m++], u = s.L, a.addData(u, i, n);
                                break;
                            case"C":
                                u = s.C, a.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, a.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 _ = a.len(), A = a.data;
                                t === s.C && (v += i - A[_ - 4], y += n - A[_ - 3]), u = s.C, S = f[m++], I = f[m++], i = f[m++], n = f[m++], a.addData(u, v, y, S, I, i, n);
                                break;
                            case"s":
                                v = i, y = n, _ = a.len(), A = a.data, t === s.C && (v += i - A[_ - 4], y += n - A[_ - 3]), u = s.C, S = i + f[m++], I = n + f[m++], i += f[m++], n += f[m++], a.addData(u, v, y, S, I, i, n);
                                break;
                            case"Q":
                                S = f[m++], I = f[m++], i = f[m++], n = f[m++], u = s.Q, a.addData(u, S, I, i, n);
                                break;
                            case"q":
                                S = f[m++] + i, I = f[m++] + n, i += f[m++], n += f[m++], u = s.Q, a.addData(u, S, I, i, n);
                                break;
                            case"T":
                                v = i, y = n, _ = a.len(), A = a.data, t === s.Q && (v += i - A[_ - 4], y += n - A[_ - 3]), i = f[m++], n = f[m++], u = s.Q, a.addData(u, v, y, i, n);
                                break;
                            case"t":
                                v = i, y = n, _ = a.len(), A = a.data, t === s.Q && (v += i - A[_ - 4], y += n - A[_ - 3]), i += f[m++], n += f[m++], u = s.Q, a.addData(u, v, y, i, n);
                                break;
                            case"A":
                                w = f[m++], k = f[m++], T = f[m++], b = f[m++], C = f[m++], Ma(S = i, I = n, i = f[m++], n = f[m++], b, C, w, k, T, u = s.A, a);
                                break;
                            case"a":
                                w = f[m++], k = f[m++], T = f[m++], b = f[m++], C = f[m++], Ma(S = i, I = n, i += f[m++], n += f[m++], b, C, w, k, T, u = s.A, a)
                        }
                    }
                    "z" !== h && "Z" !== h || (u = s.Z, a.addData(u), i = o, n = r), t = u
                }
                return a.toStatic(), a
            }(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) {
                Aa(i, e), this.dirty(!0)
            }, t
        }

        function Ba(e, t) {
            return new Ta(Ra(e, t))
        }

        var Ua = function (e) {
            qn.call(this, e)
        };

        function Va(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 r = i[o], a = r && r.shape, s = r && r.type;
                    if (a && ("sector" === s && a.startAngle === a.endAngle || "rect" === s && (!a.width || !a.height))) {
                        for (var l = 0; l < Wa.length; l++) Wa[l][2] = n[Wa[l][0]], n[Wa[l][0]] = Wa[l][1];
                        t = !0;
                        break
                    }
                }
                if (e.apply(this, arguments), t) for (l = 0; l < Wa.length; l++) n[Wa[l][0]] = Wa[l][2]
            } : e
        }

        Ua.prototype = {
            constructor: Ua, 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), On(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
            }
        }, S(Ua, qn);
        var Ka = Ta.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)
                }
            }), Wa = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]],
            ja = Ta.extend({
                type: "sector",
                shape: {cx: 0, cy: 0, r0: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0},
                brush: Va(Ta.prototype.brush),
                buildPath: function (e, t) {
                    var i = t.cx, n = t.cy, o = Math.max(t.r0 || 0, 0), r = Math.max(t.r, 0), a = t.startAngle,
                        s = t.endAngle, l = t.clockwise, d = Math.cos(a), u = Math.sin(a);
                    e.moveTo(d * o + i, u * o + n), e.lineTo(d * r + i, u * r + n), e.arc(i, n, r, a, s, !l), e.lineTo(Math.cos(s) * o + i, Math.sin(s) * o + n), 0 !== o && e.arc(i, n, o, s, a, l), e.closePath()
                }
            }), Ga = Ta.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 Ha(e, t, i, n, o, r, a) {
            var s = .5 * (i - e), l = .5 * (n - t);
            return (2 * (t - i) + s + l) * a + (-3 * (t - i) - 2 * s - l) * r + s * o + t
        }

        function za(e, t, i) {
            var n = t.points, o = t.smooth;
            if (n && 2 <= n.length) {
                if (o && "spline" !== o) {
                    var r = function (e, t, i, n) {
                        var o, r, a, s, l = [], d = [], u = [], c = [];
                        if (n) {
                            a = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0];
                            for (var h = 0, f = e.length; h < f; h++) Ce(a, a, e[h]), Se(s, s, e[h]);
                            Ce(a, a, n[0]), Se(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], r = e[(h + 1) % f]; else {
                                if (0 === h || h === f - 1) {
                                    l.push(ae(e[h]));
                                    continue
                                }
                                o = e[h - 1], r = e[h + 1]
                            }
                            ue(d, r, o), ge(d, d, t);
                            var g = ve(p, o), m = ve(p, r), v = g + m;
                            0 !== v && (g /= v, m /= v), ge(u, d, -g), ge(c, d, m);
                            var y = le([], p, u), w = le([], p, c);
                            n && (Se(y, y, a), Ce(y, y, s), Se(w, w, a), Ce(w, w, s)), l.push(y), l.push(w)
                        }
                        return i && l.push(l.shift()), l
                    }(n, o, i, t.smoothConstraint);
                    e.moveTo(n[0][0], n[0][1]);
                    for (var a = n.length, s = 0; s < (i ? a : a - 1); s++) {
                        var l = r[2 * s], d = r[2 * s + 1], u = n[(s + 1) % a];
                        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, r = 1; r < i; r++) o += ve(e[r - 1], e[r]);
                        var a = o / 2;
                        for (a = a < i ? i : a, r = 0; r < a; r++) {
                            var s, l, d, u = r / (a - 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([Ha(s[0], f[0], l[0], d[0], h, p, g), Ha(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 Xa = Ta.extend({
            type: "polygon",
            shape: {points: null, smooth: !1, smoothConstraint: null},
            buildPath: function (e, t) {
                za(e, t, !0)
            }
        }), qa = Ta.extend({
            type: "polyline",
            shape: {points: null, smooth: !1, smoothConstraint: null},
            style: {stroke: "#000", fill: null},
            buildPath: function (e, t) {
                za(e, t, !1)
            }
        }), Ya = Math.round;

        function Ja(e, t, i) {
            if (t) {
                var n = t.x1, o = t.x2, r = t.y1, a = t.y2;
                e.x1 = n, e.x2 = o, e.y1 = r, e.y2 = a;
                var s = i && i.lineWidth;
                s && (Ya(2 * n) === Ya(2 * o) && (e.x1 = e.x2 = Qa(n, s, !0)), Ya(2 * r) === Ya(2 * a) && (e.y1 = e.y2 = Qa(r, s, !0)))
            }
        }

        function Za(e, t, i) {
            if (t) {
                var n = t.x, o = t.y, r = t.width, a = t.height;
                e.x = n, e.y = o, e.width = r, e.height = a;
                var s = i && i.lineWidth;
                s && (e.x = Qa(n, s, !0), e.y = Qa(o, s, !0), e.width = Math.max(Qa(n + r, s, !1) - e.x, 0 === r ? 0 : 1), e.height = Math.max(Qa(o + a, s, !1) - e.y, 0 === a ? 0 : 1))
            }
        }

        function Qa(e, t, i) {
            if (!t) return e;
            var n = Ya(2 * e);
            return (n + Ya(t)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2
        }

        var $a = {}, es = Ta.extend({
            type: "rect", shape: {r: 0, x: 0, y: 0, width: 0, height: 0}, buildPath: function (e, t) {
                var i, n, o, r;
                this.subPixelOptimize ? (Za($a, t, this.style), i = $a.x, n = $a.y, o = $a.width, r = $a.height, $a.r = t.r, t = $a) : (i = t.x, n = t.y, o = t.width, r = t.height), t.r ? Sn(e, t) : e.rect(i, n, o, r), e.closePath()
            }
        }), ts = {}, is = Ta.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, r;
                r = this.subPixelOptimize ? (Ja(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 a = t.percent;
                0 !== a && (e.moveTo(i, n), a < 1 && (o = i * (1 - a) + o * a, r = n * (1 - a) + r * a), e.lineTo(o, r))
            },
            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 ? Tr : kr)(e.x1, e.cpx1, e.cpx2, e.x2, t), (i ? Tr : kr)(e.y1, e.cpy1, e.cpy2, e.y2, t)] : [(i ? Ir : Sr)(e.x1, e.cpx1, e.x2, t), (i ? Ir : Sr)(e.y1, e.cpy1, e.y2, t)]
        }

        function rs(e) {
            this.colorStops = e || []
        }

        var as = Ta.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, r = t.y2, a = 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 && (Ar(i, a, o, u, ns), a = ns[1], o = ns[2], Ar(n, s, r, u, ns), s = ns[1], r = ns[2]), e.quadraticCurveTo(a, s, o, r)) : (u < 1 && (Cr(i, a, l, o, u, ns), a = ns[1], l = ns[2], o = ns[3], Cr(n, s, d, r, u, ns), s = ns[1], d = ns[2], r = ns[3]), e.bezierCurveTo(a, s, l, d, o, r)))
            },
            pointAt: function (e) {
                return os(this.shape, e, !1)
            },
            tangentAt: function (e) {
                var t = os(this.shape, e, !0);
                return me(t, t)
            }
        }), ss = Ta.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), r = t.startAngle, a = t.endAngle, s = t.clockwise,
                    l = Math.cos(r), d = Math.sin(r);
                e.moveTo(l * o + i, d * o + n), e.arc(i, n, o, r, a, !s)
            }
        }), ls = Ta.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(), Ta.prototype.getBoundingRect.call(this)
            }
        });

        function ds(e, t, i, n, o, r) {
            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 = r || !1, rs.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, rs.call(this, n)
        }

        function cs(e) {
            qn.call(this, e), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0
        }

        rs.prototype = {
            constructor: rs, addColorStop: function (e, t) {
                this.colorStops.push({offset: e, color: t})
            }
        }, ds.prototype = {constructor: ds}, S(ds, rs), us.prototype = {constructor: us}, S(us, rs), 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 Ai(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
        }, S(cs, qn);
        var fs = Math.max, ps = Math.min, gs = {}, ms = 1,
            vs = {color: "textFill", textBorderColor: "textStroke", textBorderWidth: "textStrokeWidth"},
            ys = "emphasis", ws = "normal", ks = 1, Ts = {}, bs = {};

        function Cs(e) {
            return Ta.extend(e)
        }

        function Ss(e, t) {
            bs[e] = t
        }

        function Is(e) {
            if (bs.hasOwnProperty(e)) return bs[e]
        }

        function _s(e, t, i, n) {
            var o = Ba(e, t);
            return i && ("center" === n && (i = Ds(i, o.getBoundingRect())), Ns(o, i)), o
        }

        function As(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(Ds(t, o))
                    }
                }
            });
            return n
        }

        function Ds(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 xs = function (e, t) {
            for (var i = [], n = e.length, o = 0; o < n; o++) {
                var r = e[o];
                r.path || r.createPathProxy(), r.__dirtyPath && r.buildPath(r.path, r.shape, !0), i.push(r.path)
            }
            var a = new Ta(t);
            return a.createPathProxy(), a.buildPath = function (e) {
                e.appendPath(i);
                var t = e.getContext();
                t && e.rebuildPath(t)
            }, a
        };

        function Ns(e, t) {
            if (e.applyTransform) {
                var i = e.getBoundingRect().calculateTransform(t);
                e.applyTransform(i)
            }
        }

        var Es = Qa;

        function Ps(e) {
            return null != e && "none" !== e
        }

        var Os = $(), 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, r = e.style;
                    n && (r = (o = i.addHover(e)).style), il(r), 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), r.extendFrom(t), Ls(r, t, "fill"), Ls(r, t, "stroke"), tl(r), n || (e.dirty(!1), e.z2 += ms)
                }
            }
        }

        function Ls(e, t, i) {
            !Ps(t[i]) && Ps(e[i]) && (e[i] = function (e) {
                if ("string" != typeof e) return e;
                var t = Os.get(e);
                return t || (t = jt(e, -.1), Ms < 1e4 && (Os.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 = ws, r = ws;
            e.__highlighted && (o = ys, n = !0), t(e, i), e.__highlighted && (r = ys, n = !0), e.isGroup && e.traverse(function (e) {
                e.isGroup || t(e, i)
            }), n && e.__highDownOnUpdate && e.__highDownOnUpdate(o, r)
        }

        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) {
            Gs(this, e) || this.__highByOuter || Bs(this, Fs)
        }

        function Ks(e) {
            Gs(this, e) || this.__highByOuter || Bs(this, Rs)
        }

        function Ws(e) {
            this.__highByOuter |= 1 << (e || 0), Bs(this, Fs)
        }

        function js(e) {
            (this.__highByOuter &= ~(1 << (e || 0))) || Bs(this, Rs)
        }

        function Gs(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", Ws)[n]("normal", js), e.__highByOuter = e.__highByOuter || 0, e.__highDownDispatcher = !i
            }
        }

        function Xs(e) {
            return !(!e || !e.__highDownDispatcher)
        }

        function qs(e) {
            var t = Ts[e];
            return null == t && ks <= 32 && (t = Ts[e] = ks++), t
        }

        function Ys(e, t, i, n, o, r, a) {
            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 ? j(l ? l.getFormattedLabel(d, "emphasis", null, u, c) : null, s) : null;
            null == p && null == g || (Zs(e, i, r, o), Zs(t, n, a, 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), w(n, i), tl(n))
        }

        function Zs(e, t, i, n, o) {
            return Qs(e, t, n, o), i && w(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 r = t.getShallow("rotate");
                null != r && (r *= Math.PI / 180), e.textRotation = r, e.textDistance = j(t.getShallow("distance"), n ? null : 5)
            }
            var a, 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 a = {}, d) if (d.hasOwnProperty(u)) {
                var c = t.getModel(["rich", u]);
                $s(a[u] = {}, c, l, i, n)
            }
            return e.rich = a, $s(e, t, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), e
        }

        function $s(e, t, i, n, o, r) {
            i = !o && i || gs, e.textFill = el(t.getShallow("color"), n) || i.color, e.textStroke = el(t.getShallow("textBorderColor"), n) || i.textBorderColor, e.textStrokeWidth = j(t.getShallow("textBorderWidth"), i.textBorderWidth), o || (r && (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"), r && 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, r = n.isRectText, a = n.useInsideStyle,
                    s = !1 !== a && (!0 === a || r && 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, r) {
            if ("function" == typeof o && (r = o, o = null), n && n.isAnimationEnabled()) {
                var a = e ? "Update" : "", s = n.getShallow("animationDuration" + a),
                    l = n.getShallow("animationEasing" + a), d = n.getShallow("animationDelay" + a);
                "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, r, !!r) : (t.stopAnimation(), t.attr(i), r && r())
            } else t.stopAnimation(), t.attr(i), r && r()
        }

        function rl(e, t, i, n, o) {
            ol(!0, e, t, i, n, o)
        }

        function al(e, t, i, n, o) {
            ol(!1, e, t, i, n, o)
        }

        function sl(e, t) {
            for (var i = at([]); 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)), be([], 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]),
                r = ["left" === e ? -n : "right" === e ? n : 0, "top" === e ? -o : "bottom" === e ? o : 0];
            return r = ll(r, t, i), Math.abs(r[0]) > Math.abs(r[1]) ? 0 < r[0] ? "right" : "left" : 0 < r[1] ? "bottom" : "top"
        }

        function ul(e, t, i, n) {
            if (e && t) {
                var o, r = (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 = r[e.anid];
                        if (t) {
                            var n = a(e);
                            e.attr(a(t)), rl(e, n, i, e.dataIndex)
                        }
                    }
                })
            }

            function a(e) {
                var t = {position: ae(e.position), rotation: e.rotation};
                return e.shape && (t.shape = w({}, e.shape)), t
            }
        }

        function cl(e, t) {
            return D(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 = w({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), k(n, i), new Yn(t)) : _s(e.replace("path://", ""), t, i, "center")
        }

        function fl(e, t, i, n, o) {
            for (var r = 0, a = o[o.length - 1]; r < o.length; r++) {
                var s = o[r];
                if (pl(e, t, i, n, s[0], s[1], a[0], a[1])) return !0;
                a = s
            }
        }

        function pl(e, t, i, n, o, r, a, s) {
            var l = i - e, d = n - t, u = a - o, c = s - r, h = gl(u, c, l, d);
            var f = e - o, p = t - r, 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
        }

        Ss("circle", Ka), Ss("sector", ja), Ss("ring", Ga), Ss("polygon", Xa), Ss("polyline", qa), Ss("rect", es), Ss("line", is), Ss("bezierCurve", as), Ss("arc", ss);
        var ml = (Object.freeze || Object)({
                Z2_EMPHASIS_LIFT: ms,
                CACHED_LABEL_STYLE_PROPERTIES: vs,
                extendShape: Cs,
                extendPath: function (e, t) {
                    return function (e, t) {
                        return Ta.extend(Ra(e, t))
                    }(e, t)
                },
                registerShape: Ss,
                getShapeClass: Is,
                makePath: _s,
                makeImage: As,
                mergePath: xs,
                resizePath: Ns,
                subPixelOptimizeLine: function (e) {
                    return Ja(e.shape, e.shape, e.style), e
                },
                subPixelOptimizeRect: function (e) {
                    return Za(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: rl,
                initProps: al,
                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),
                        r = ps(e.y + e.height, t.y + t.height);
                    if (i <= n && o <= r) return {x: i, y: o, width: n - i, height: r - o}
                },
                createIcon: hl,
                linePolygonIntersect: fl,
                lineLineIntersect: pl,
                Group: Di,
                Image: Yn,
                Text: Ua,
                Circle: Ka,
                Sector: ja,
                Ring: Ga,
                Polygon: Xa,
                Polyline: qa,
                Rect: es,
                Line: is,
                BezierCurve: as,
                Arc: ss,
                IncrementalDisplayable: cs,
                CompoundPath: ls,
                LinearGradient: ds,
                RadialGradient: us,
                BoundingRect: Ai
            }), 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"))
                }
            },
            wl = or([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]),
            kl = {
                getItemStyle: function (e, t) {
                    var i = wl(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]
                }
            }, Tl = I, bl = Wo();

        function Cl(e, t, i) {
            this.parentModel = t, this.ecModel = i, this.option = e
        }

        function Sl(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 Il(e, t) {
            var i = bl(e).getParent;
            return i ? i.call(e, t) : e.parentModel
        }

        Cl.prototype = {
            constructor: Cl, init: null, mergeOption: function (e) {
                v(this.option, e, !0)
            }, get: function (e, t) {
                return null == e ? this.option : Sl(this.option, this.parsePath(e), !t && Il(this, e))
            }, getShallow: function (e, t) {
                var i = this.option, n = null == i ? i : i[e], o = !t && Il(this, e);
                return null == n && o && (n = o.getShallow(e)), n
            }, getModel: function (e, t) {
                var i;
                return new Cl(null == e ? this.option : Sl(this.option, e = this.parsePath(e)), t = t || (i = Il(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) {
                bl(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(Cl), er(Cl), Tl(Cl, ar), Tl(Cl, lr), Tl(Cl, yl), Tl(Cl, kl);
        var _l = 0;

        function Al(e) {
            return [e || "", _l++, Math.random().toFixed(5)].join("_")
        }

        var Dl = 1e-4;

        function xl(e, t, i, n) {
            var o = t[1] - t[0], r = i[1] - i[0];
            if (0 == o) return 0 == r ? 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 * r + i[0]
        }

        function Nl(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 Pl(e) {
            return e.sort(function (e, t) {
                return e - t
            }), e
        }

        function Ol(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),
                r = Math.round(i(Math.abs(t[1] - t[0])) / n), a = Math.min(Math.max(-o + r, 0), 20);
            return isFinite(a) ? a : 20
        }

        function Ll(e, t, i) {
            if (!e[t]) return 0;
            var n = x(e, function (e, t) {
                return e + (isNaN(t) ? 0 : t)
            }, 0);
            if (0 === n) return 0;
            for (var o = Math.pow(10, i), r = D(e, function (e) {
                return (isNaN(e) ? 0 : e) / n * o * 100
            }), a = 100 * o, s = D(r, function (e) {
                return Math.floor(e)
            }), l = x(s, function (e, t) {
                return e + t
            }, 0), d = D(r, function (e, t) {
                return e - s[t]
            }); l < a;) {
                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 -Dl < e && e < Dl
        }

        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 Wl(e) {
            return Math.pow(10, jl(e))
        }

        function jl(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 Gl(e, t) {
            var i = jl(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, r = e[n].close, a = 0; a < 2; a++) o[a] <= t && (o[a] = t, r[a] = a ? 1 : 1 - i), t = o[a], i = r[a];
                o[0] === o[1] && r[0] * r[1] != 1 ? e.splice(n, 1) : n++
            }
            return e
        }

        function zl(e) {
            return 0 <= e - parseFloat(e)
        }

        var Xl = (Object.freeze || Object)({
            linearMap: xl,
            parsePercent: Nl,
            round: El,
            asc: Pl,
            getPrecision: Ol,
            getPrecisionSafe: Ml,
            getPixelPrecision: Fl,
            getPercentWithPrecision: Ll,
            MAX_SAFE_INTEGER: Rl,
            remRadian: Bl,
            isRadianAroundZero: Ul,
            parseDate: Kl,
            quantity: Wl,
            quantityExponent: jl,
            nice: Gl,
            quantile: function (e, t) {
                var i = (e.length - 1) * t + 1, n = Math.floor(i), o = +e[n - 1], r = i - n;
                return r ? o + r * (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 || [], r = 0; r < o.length; r++) {
                var a = td[r];
                e = e.replace(ed(a), ed(a, 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 A(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"), r = 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" + r + "|}  ",
                style: {color: i}
            } : ""
        }

        function rd(e, t) {
            return "0000".substr(0, t - (e += "").length) + e
        }

        function ad(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" : "", r = n["get" + o + "FullYear"](), a = 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", rd(a, 2)).replace("M", a).replace("yyyy", r).replace("yy", r % 100).replace("dd", rd(s, 2)).replace("d", s).replace("hh", rd(l, 2)).replace("h", l).replace("mm", rd(d, 2)).replace("m", d).replace("ss", rd(u, 2)).replace("s", u).replace("SSS", rd(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: ad,
                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, r, a, s) {
                    return cn(e, t, i, n, o, s, r, a)
                },
                windowOpen: dd
            }), cd = A, hd = ["left", "right", "top", "bottom", "width", "height"],
            fd = [["width", "left", "right"], ["height", "top", "bottom"]];

        function pd(e, t, i, n, o) {
            var r = 0, a = 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 = r + m) || l.newline ? (r = 0, u = m, a += s + i, f.height) : Math.max(s, f.height)
                } else {
                    var v = f.height + (g ? -g.y + f.y : 0);
                    s = o < (c = a + v) || l.newline ? (r += s + i, a = 0, c = v, f.width) : Math.max(s, f.width)
                }
                l.newline || (h[0] = r, h[1] = a, "horizontal" === e ? r = u + i : a = c + i)
            })
        }

        var gd = pd;

        function md(e, t, i) {
            i = Jl(i || 0);
            var n = t.width, o = t.height, r = Nl(e.left, n), a = Nl(e.top, o), s = Nl(e.right, n), l = Nl(e.bottom, o),
                d = Nl(e.width, n), u = Nl(e.height, o), c = i[2] + i[0], h = i[1] + i[3], f = e.aspect;
            switch (isNaN(d) && (d = n - s - h - r), isNaN(u) && (u = o - l - c - a), 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(r) && (r = n - s - d - h), isNaN(a) && (a = o - l - u - c), e.left || e.right) {
                case"center":
                    r = n / 2 - d / 2 - i[3];
                    break;
                case"right":
                    r = n - d - h
            }
            switch (e.top || e.bottom) {
                case"middle":
                case"center":
                    a = o / 2 - u / 2 - i[0];
                    break;
                case"bottom":
                    a = o - u - c
            }
            r = r || 0, a = a || 0, isNaN(d) && (d = n - h - r - (s || 0)), isNaN(u) && (u = o - c - a - (l || 0));
            var p = new Ai(r + i[3], a + i[0], d, u);
            return p.margin = i, p
        }

        function vd(e, t, i, n, o) {
            var r = !o || !o.hv || o.hv[0], a = !o || !o.hv || o.hv[1], s = o && o.boundingMode || "all";
            if (r || a) {
                var l;
                if ("raw" === s) l = "group" === e.type ? new Ai(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(k({width: l.width, height: l.height}, t), i, n);
                var u = e.position, c = r ? t.x - l.x : 0, h = a ? 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 = a(fd[0], 0), r = a(fd[1], 1);

            function a(i, o) {
                var r = {}, a = 0, d = {}, u = 0;
                if (cd(i, function (t) {
                    d[t] = e[t]
                }), cd(i, function (e) {
                    s(t, e) && (r[e] = d[e] = t[e]), l(r, e) && a++, 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 && a) {
                    if (2 <= a) return r;
                    for (var c = 0; c < i.length; c++) {
                        var h = i[c];
                        if (!s(r, h) && s(e, h)) {
                            r[h] = e[h];
                            break
                        }
                    }
                    return r
                }
                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, r)
        }

        function wd(e) {
            return kd({}, e)
        }

        function kd(e, t) {
            return t && e && cd(hd, function (i) {
                t.hasOwnProperty(i) && (e[i] = t[i])
            }), e
        }

        O(pd, "vertical"), O(pd, "horizontal");
        var Td, bd, Cd, Sd = Wo(), Id = Cl.extend({
            type: "component",
            id: "",
            name: "",
            mainType: "",
            subType: "",
            componentIndex: 0,
            defaultOption: null,
            ecModel: null,
            dependentModels: [],
            uid: null,
            layoutMode: null,
            $constructor: function (e, t, i, n) {
                Cl.call(this, e, t, i, n), this.uid = Al("ec_cpt_model")
            },
            init: function (e, t, i, n) {
                this.mergeDefaultAndTheme(e, i)
            },
            mergeDefaultAndTheme: function (e, t) {
                var i = this.layoutMode, n = i ? wd(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 = Sd(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 = {}, r = t.length - 1; 0 <= r; r--) o = v(o, t[r], !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]
        }

        nr(Id, {registerWhenExtend: !0}), bd = {}, (Td = Id).registerSubTypeDefaulter = function (e, t) {
            e = Zo(e), bd[e.main] = t
        }, Td.determineSubType = function (e, t) {
            var i = t.type;
            if (!i) {
                var n = Zo(e).main;
                Td.hasSubTypes(e) && bd[n] && (i = bd[n](t))
            }
            return i
        }, Cd = function (e) {
            var t = [];
            return A(Id.getClassesByMainType(e), function (e) {
                t = t.concat(e.prototype.dependencies || [])
            }), t = D(t, function (e) {
                return Zo(e).main
            }), "dataset" !== e && C(t, "dataset") <= 0 && t.unshift("dataset"), t
        }, Id.topologicalTravel = function (e, t, i, n) {
            if (e.length) {
                var o = function (e) {
                    var t = {}, i = [];
                    return A(e, function (n) {
                        var o = _d(t, n), r = function (e, t) {
                            var i = [];
                            return A(e, function (e) {
                                0 <= C(t, e) && i.push(e)
                            }), i
                        }(o.originalDeps = Cd(n), e);
                        o.entryCount = r.length, 0 === o.entryCount && i.push(n), A(r, function (e) {
                            C(o.predecessor, e) < 0 && o.predecessor.push(e);
                            var i = _d(t, e);
                            C(i.successor, e) < 0 && i.successor.push(n)
                        })
                    }), {graph: t, noEntryList: i}
                }(t), r = o.graph, a = o.noEntryList, s = {};
                for (A(e, function (e) {
                    s[e] = !0
                }); a.length;) {
                    var l = a.pop(), d = r[l], u = !!s[l];
                    u && (i.call(n, l, d.originalDeps.slice()), delete s[l]), A(d.successor, u ? h : c)
                }
                A(s, function () {
                    throw new Error("Circle dependency may exists")
                })
            }

            function c(e) {
                r[e].entryCount--, 0 === r[e].entryCount && a.push(e)
            }

            function h(e) {
                s[e] = !0, c(e)
            }
        }, I(Id, {
            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 Ad = "";
        "undefined" != typeof navigator && (Ad = navigator.platform || "");
        var Dd = {
                color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"],
                gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
                textStyle: {
                    fontFamily: Ad.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
            }, xd = Wo(), Nd = {
                clearColorPalette: function () {
                    xd(this).colorIdx = 0, xd(this).colorNameMap = {}
                }, getColorFromPalette: function (e, t, i) {
                    var n = xd(t = t || this), o = n.colorIdx || 0, r = n.colorNameMap = n.colorNameMap || {};
                    if (r.hasOwnProperty(e)) return r[e];
                    var a = Oo(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) : a;
                    if ((l = l || a) && l.length) {
                        var d = l[o];
                        return e && (r[e] = d), n.colorIdx = (o + 1) % l.length, d
                    }
                }
            }, Ed = "original", Pd = "arrayRows", Od = "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})
        }, er(Ud);
        var Vd = {Must: 1, Might: 2, Not: 3}, Kd = Wo();

        function Wd(e) {
            var t = e.option, i = t.data, n = U(i) ? Ld : Ed, o = !1, r = t.seriesLayoutBy, a = t.sourceHeader,
                s = t.dimensions, l = Xd(e);
            if (l) {
                var d = l.option;
                i = d.source, n = Kd(l).sourceFormat, o = !0, r = r || d.seriesLayoutBy, null == a && (a = d.sourceHeader), s = s || d.dimensions
            }
            var u = function (e, t, i, n, o) {
                if (!e) return {dimensionsDefine: jd(o)};
                var r, a;
                if (t === Pd) "auto" === n || null == n ? Gd(function (e) {
                    null != e && "-" !== e && (L(e) ? null == a && (a = 1) : a = 0)
                }, i, e, 10) : a = n ? 1 : 0, o || 1 !== a || (o = [], Gd(function (e, t) {
                    o[t] = null != e ? e : ""
                }, i, e)), r = o ? o.length : i === Bd ? e.length : e[0] ? e[0].length : null; else if (t === Od) o = o || function (e) {
                    for (var t, i = 0; i < e.length && !(t = e[i++]);) ;
                    if (t) {
                        var n = [];
                        return A(t, function (e, t) {
                            n.push(t)
                        }), n
                    }
                }(e); else if (t === Md) o || (o = [], A(e, function (e, t) {
                    o.push(t)
                })); else if (t === Ed) {
                    var s = Lo(e[0]);
                    r = M(s) && s.length || 1
                }
                return {startIndex: a, dimensionsDefine: jd(o), dimensionsDetectCount: r}
            }(i, n, r, a, s);
            Kd(e).source = new Ud({
                data: i,
                fromDataset: o,
                seriesLayoutBy: r,
                sourceFormat: n,
                dimensionsDefine: u.dimensionsDefine,
                startIndex: u.startIndex,
                dimensionsDetectCount: u.dimensionsDetectCount,
                encodeDefine: t.encode
            })
        }

        function jd(e) {
            if (e) {
                var t = $();
                return D(e, function (e, i) {
                    if (null == (e = w({}, 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 Gd(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 r = i[0] || [];
                for (o = 0; o < r.length && o < n; o++) e(r[o], o)
            }
        }

        function Hd(e, t, i) {
            var n = {}, o = Xd(t);
            if (!o || !e) return n;
            var r, a, s = [], l = [], d = t.ecModel, u = Kd(d).datasetMap, c = o.uid + "_" + i.seriesLayoutBy;
            A(e = e.slice(), function (t, i) {
                R(t) || (e[i] = {name: t}), "ordinal" === t.type && null == r && (a = p(e[r = i])), n[t.name] = []
            });
            var h = u.get(c) || u.set(c, {categoryWayDim: a, 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 A(e, function (e, t) {
                var i = e.name, o = p(e);
                if (null == r) {
                    var a = h.valueWayDim;
                    f(n[i], a, o), f(l, a, o), h.valueWayDim += o
                } else r === t ? (f(n[i], 0, o), f(s, 0, o)) : (a = h.categoryWayDim, f(n[i], a, o), f(l, a, 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, r = t.sourceFormat, a = t.dimensionsDefine;
            r !== Od && r !== Md || A(a, 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, r, t.seriesLayoutBy, a, 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, r) {
            var a, s, l;
            if (U(e)) return Vd.Not;
            if (n) {
                var d = n[r];
                R(d) ? (s = d.name, l = d.type) : L(d) && (s = d)
            }
            if (null != l) return "ordinal" === l ? Vd.Must : Vd.Not;
            if (t === Pd) if (i === Bd) {
                for (var u = e[r], c = 0; c < (u || []).length && c < 5; c++) if (null != (a = g(u[o + c]))) return a
            } else for (c = 0; c < e.length && c < 5; c++) {
                var h = e[o + c];
                if (h && null != (a = g(h[r]))) return a
            } else if (t === Od) {
                if (!s) return Vd.Not;
                for (c = 0; c < e.length && c < 5; c++) if ((f = e[c]) && null != (a = g(f[s]))) return a
            } 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 != (a = g(u[c]))) return a
            } 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 != (a = g(p[r]))) return a
            }

            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 = Cl.extend({
            init: function (e, t, i, n) {
                i = i || {}, this.option = null, this._theme = new Cl(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;
                            A(t, function (t, n) {
                                "colorLayer" === n && i || Id.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, Dd, !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 r = i.getMediaOption(this, this._api);
                    r.length && A(r, function (e) {
                        this.mergeOption(e, t = !0)
                    }, this)
                }
                return t
            }, mergeOption: function (e) {
                var t = this.option, i = this._componentsMap, n = [];
                Kd(this).datasetMap = $(), A(e, function (e, i) {
                    null != e && (Id.hasClass(i) ? i && n.push(i) : t[i] = null == t[i] ? m(e) : v(t[i], e, !0))
                }), Id.topologicalTravel(n, Id.getAllClassMainTypes(), function (n, o) {
                    var r = Oo(e[n]), a = Ro(i.get(n), r);
                    Bo(a), A(a, 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 : Id.determineSubType(e, t)
                        }(n, i, e.exist))
                    });
                    var s = function (e, t) {
                        M(t) || (t = t ? [t] : []);
                        var i = {};
                        return A(t, function (t) {
                            i[t] = (e.get(t) || []).slice()
                        }), i
                    }(i, o);
                    t[n] = [], i.set(n, []), A(a, function (e, o) {
                        var r = e.exist, a = e.option;
                        if (X(R(a) || r, "Empty component definition"), a) {
                            var l = Id.getClass(n, e.keyInfo.subType, !0);
                            if (r && r.constructor === l) r.name = e.keyInfo.name, r.mergeOption(a, this), r.optionUpdated(a, !1); else {
                                var d = w({dependentModels: s, componentIndex: o}, e.keyInfo);
                                w(r = new l(a, this, this, d), d), r.init(a, this, this, d), r.optionUpdated(null, !0)
                            }
                        } else r.mergeOption({}, this), r.optionUpdated({}, !1);
                        i.get(n)[o] = r, t[n][o] = r.option
                    }, this), "series" === n && Zd(this, i.get("series"))
                }, this), this._seriesIndicesMap = $(this._seriesIndices = this._seriesIndices || [])
            }, getOption: function () {
                var e = m(this.option);
                return A(e, function (t, i) {
                    if (Id.hasClass(i)) {
                        for (var n = (t = Oo(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, r = e.name, a = this._componentsMap.get(t);
                if (!a || !a.length) return [];
                if (null != n) M(n) || (n = [n]), i = N(D(n, function (e) {
                    return a[e]
                }), function (e) {
                    return !!e
                }); else if (null != o) {
                    var s = M(o);
                    i = N(a, function (e) {
                        return s && 0 <= C(o, e.id) || !s && e.id === o
                    })
                } else if (null != r) {
                    var l = M(r);
                    i = N(a, function (e) {
                        return l && 0 <= C(r, e.name) || !l && e.name === r
                    })
                } else i = a.slice();
                return Qd(i, e)
            }, findComponents: function (e) {
                var t, i, n, o, r, a = e.query, s = e.mainType,
                    l = (i = s + "Index", n = s + "Id", o = s + "Name", !(t = a) || 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 r = Qd(d, e), e.filter ? N(r, e.filter) : r
            }, eachComponent: function (e, t, i) {
                var n = this._componentsMap;
                "function" == typeof e ? (i = t, t = e, n.each(function (e, n) {
                    A(e, function (e, o) {
                        t.call(i, n, e, o)
                    })
                })) : L(e) ? A(n.get(e), t, i) : R(e) && A(this.findComponents(e), t, i)
            }, getSeriesByName: function (e) {
                return N(this._componentsMap.get("series"), function (t) {
                    return t.name === e
                })
            }, getSeriesByIndex: function (e) {
                return this._componentsMap.get("series")[e]
            }, getSeriesByType: function (e) {
                return N(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) {
                A(this._seriesIndices, function (i) {
                    var n = this._componentsMap.get("series")[i];
                    e.call(t, n, i)
                }, this)
            }, eachRawSeries: function (e, t) {
                A(this._componentsMap.get("series"), e, t)
            }, eachSeriesByType: function (e, t, i) {
                A(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 A(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 = N(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)
                }), Id.topologicalTravel(i, Id.getAllClassMainTypes(), function (i, n) {
                    A(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 = D(t, function (e) {
                return e.componentIndex
            }) || [])
        }

        function Qd(e, t) {
            return t.hasOwnProperty("subType") ? N(e, function (e) {
                return e.subType === t.subType
            }) : e
        }

        I(Jd, Nd);
        var $d = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel", "getViewOfSeriesModel"];

        function eu(e) {
            A($d, function (t) {
                this[t] = P(e[t], e)
            }, this)
        }

        var tu = {};

        function iu() {
            this._coordinateSystems = []
        }

        iu.prototype = {
            constructor: iu, create: function (e, t) {
                var i = [];
                A(tu, function (n, o) {
                    var r = n.create(e, t);
                    i = i.concat(r || [])
                }), this._coordinateSystems = i
            }, update: function (e, t) {
                A(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 = A, ou = m, ru = D, au = 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 A(e, function (e, t) {
                var i = t.match(su);
                if (i && i[1] && i[2]) {
                    i[1];
                    var r = i[2].toLowerCase();
                    !function (e, t, i) {
                        return e === t
                    }(n[r], e) && (o = !1)
                }
            }), o
        }

        lu.prototype = {
            constructor: lu, setOption: function (e, t) {
                e && A(Oo(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, r = [], a = [], s = e.timeline;
                    if (e.baseOption && (o = e.baseOption), (s || e.options) && (o = o || {}, r = (e.options || []).slice()), e.media) {
                        o = o || {};
                        var l = e.media;
                        nu(l, function (e) {
                            e && e.option && (e.query ? a.push(e) : n = n || e)
                        })
                    }
                    return (o = o || e).timeline || (o.timeline = s), nu([o].concat(r).concat(D(a, function (e) {
                        return e.option
                    })), function (e) {
                        nu(t, function (t) {
                            t(e, i)
                        })
                    }), {baseOption: o, timelineOptions: r, mediaDefault: n, mediaList: a}
                }.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 (Id.hasClass(i)) {
                                t = Oo(t);
                                var o = Ro(n = Oo(n), t);
                                e[i] = ru(o, function (e) {
                                    return e.option && e.exist ? au(e.exist, e.option, !0) : e.exist || e.option
                                })
                            } else e[i] = au(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 = ru(t.timelineOptions, ou), this._mediaList = ru(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,
                    r = [], a = [];
                if (!n.length && !o) return a;
                for (var s = 0, l = n.length; s < l; s++) du(n[s].query, t, i) && r.push(s);
                return !r.length && o && (r = [-1]), r.length && !function (e, t) {
                    return e.join(",") === t.join(",")
                }(r, this._currentMediaIndices) && (a = ru(r, function (e) {
                    return ou(-1 === e ? o.option : n[e].option)
                })), this._currentMediaIndices = r, a
            }
        };
        var uu = A, 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], r = t.normal, a = t.emphasis;
                r && r[o] && (e[o] = e[o] || {}, e[o].normal ? v(e[o].normal, r[o]) : e[o].normal = r[o], r[o] = null), a && a[o] && (e[o] = e[o] || {}, e[o].emphasis ? v(e[o].emphasis, a[o]) : e[o].emphasis = a[o], a[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, k(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, r = Fo.length; o < r; 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 wu(e) {
            return (M(e) ? e[0] : e) || {}
        }

        function ku(e) {
            A(Tu, function (t) {
                t[0] in e && !(t[1] in e) && (e[t[1]] = e[t[0]])
            })
        }

        var Tu = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]],
            bu = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"],
            Cu = 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 r = e.links || e.edges;
                                    if (r && !U(r)) for (var a = 0; a < r.length; a++) vu(r[a]);
                                    A(e.categories, function (e) {
                                        gu(e)
                                    })
                                }
                                if (o && !U(o)) for (a = 0; a < o.length; a++) vu(o[a]);
                                if ((i = e.markPoint) && i.data) {
                                    var s = i.data;
                                    for (a = 0; a < s.length; a++) vu(s[a])
                                }
                                if ((n = e.markLine) && n.data) {
                                    var l = n.data;
                                    for (a = 0; a < l.length; a++) M(l[a]) ? (vu(l[a][0]), vu(l[a][1])) : vu(l[a])
                                }
                                "gauge" === e.type ? (mu(e, "axisLabel"), mu(e, "title"), mu(e, "detail")) : "treemap" === e.type ? (pu(e.breadcrumb, "itemStyle"), A(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) && A(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(wu(e.axisPointer), "label"), mu(wu(e.tooltip).axisPointer, "label")
                })(e, t), e.series = Oo(e.series), A(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, r = e, a = 0; a < t.length - 1; a++) null == r[o = t[a]] && (r[o] = {}), r = r[o];
                                null != r[t[a]] || (r[t[a]] = i)
                            }(e, "itemStyle.color", i)
                        }
                        ku(e)
                    }
                }), e.dataRange && (e.visualMap = e.dataRange), A(bu, function (t) {
                    var i = e[t];
                    i && (M(i) || (i = [i]), A(i, function (e) {
                        ku(e)
                    }))
                })
            };

        function Su(e) {
            A(e, function (t, i) {
                var n = [], o = [NaN, NaN], r = [t.stackResultDimension, t.stackedOverDimension], a = t.data,
                    s = t.isStackedByIndex, l = a.map(r, function (r, l, d) {
                        var u, c, h = a.get(t.stackedDimension, d);
                        if (isNaN(h)) return o;
                        s ? c = a.getRawIndex(d) : u = a.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
                    });
                a.hostModel.setData(l), t.data = l
            })
        }

        function Iu(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), w(this, Au[n === Pd ? n + "_" + e.seriesLayoutBy : n])
        }

        var _u = Iu.prototype;
        _u.pure = !1;
        var Au = {
            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: Nu
            },
            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: Du, getItem: xu, appendData: Nu},
            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;
                    A(e, function (e, i) {
                        for (var n = t[i] || (t[i] = []), o = 0; o < (e || []).length; o++) n.push(e[o])
                    })
                }
            },
            original: {count: Du, getItem: xu, appendData: Nu},
            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 Du() {
            return this._data.length
        }

        function xu(e) {
            return this._data[e]
        }

        function Nu(e) {
            for (var t = 0; t < e.length; t++) this._data.push(e[t])
        }

        var Eu = {
            arrayRows: Pu, objectRows: function (e, t, i, n) {
                return null != i ? e[n] : e
            }, keyedColumns: Pu, original: function (e, t, i, n) {
                var o = Lo(e);
                return null != i && o instanceof Array ? o[i] : o
            }, typedArray: Pu
        };

        function Pu(e, t, i, n) {
            return null != i ? e[i] : e
        }

        var Ou = {
            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 No(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, r, a = e.getProvider().getSource().sourceFormat, s = e.getDimensionInfo(i);
                    return s && (o = s.name, r = s.index), Eu[a](n, t, r, o)
                }
            }
        }

        function Ru(e, t, i) {
            if (e) {
                var n = e.getProvider().getSource().sourceFormat;
                if (n === Ed || n === Od) {
                    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), r = i.getName(e),
                    a = 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: r,
                    dataIndex: o,
                    data: a,
                    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 r = this.getData(i), a = r.getItemModel(e), s = this.getDataParams(e, i);
                null != n && s.value instanceof Array && (s.value = s.value[n]);
                var l = a.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(r, 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 Wu = Ku.prototype;
        Wu.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 r, a = 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
            }

            a === l && s === d || (t = "reset"), !this._dirty && "reset" !== t || (this._dirty = !1, r = 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 && (r || 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 ju, Gu, Hu, zu, Xu, qu, Yu = qu = {
            reset: function (e, t, i, n) {
                Gu = e, ju = t, Hu = i, zu = n, Xu = Math.ceil(zu / Hu), qu.next = 1 < Hu && 0 < zu ? Zu : Ju
            }
        };

        function Ju() {
            return Gu < ju ? Gu++ : null
        }

        function Zu() {
            var e = Gu % Xu * Hu + Math.ceil(Gu / Xu), t = ju <= Gu ? null : e < zu ? e : Gu;
            return Gu++, t
        }

        function Qu(e, t, i, n, o, r) {
            Yu.reset(i, n, o, r), e._callingProgress = t, e._callingProgress({
                start: i,
                end: n,
                count: n - i,
                next: Yu.next
            }, e.context)
        }

        Wu.dirty = function () {
            this._dirty = !0, this._onDirty && this._onDirty(this.context)
        }, Wu.unfinished = function () {
            return this._progress && this._dueIndex < this._dueEnd
        }, Wu.pipe = function (e) {
            this._downstream === e && !this._dirty || ((this._downstream = e)._upstream = this, e.dirty())
        }, Wu.dispose = function () {
            this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0)
        }, Wu.getUpstream = function () {
            return this._upstream
        }, Wu.getDownstream = function () {
            return this._downstream
        }, Wu.setOutputEnd = function (e) {
            this._outputDueEnd = this._settedOutputEnd = e
        };
        var $u = Wo(), ec = Id.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), Wd(this);
                var o = this.getInitialData(e, i);
                rc(o, this), this.dataTask.context.data = o, $u(this).dataBeforeProcessed = o, tc(this)
            },
            mergeDefaultAndTheme: function (e, t) {
                var i = this.layoutMode, n = i ? wd(e) : {}, o = this.subType;
                Id.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), Wd(this);
                var n = this.getInitialData(e, t);
                rc(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, r = "html" === (n = n || "html") ? "<br/>" : "\n", a = "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 r = x(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 = (r ? m + $l(u.displayName || "-") + ": " : "") + $l("ordinal" === h ? e + "" : "time" === h ? t ? "" : ad("yyyy/MM/dd hh:mm:ss", e) : ql(e));
                                v && c.push(v), a && (s[f] = p, ++l)
                            }
                        }

                        u.length ? A(u, function (t) {
                            h(Lu(d, e, t), t)
                        }) : A(i, h);
                        var f = r ? a ? "\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), w = this.name;
                Uo(this) || (w = ""), w = w ? $l(w) + (t ? ": " : r) : "";
                var k = "string" == typeof v ? v : v.content;
                return {html: t ? k + w + g : w + k + (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 = Nd.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 A(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 rc(e, t) {
            A(e.CHANGABLE_METHODS, function (i) {
                e.wrapMethod(i, O(ac, t))
            })
        }

        function ac(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
            }
        }

        I(ec, Uu), I(ec, Nd);
        var lc = function () {
            this.group = new Di, this.uid = Al("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 = Wo();
            return function (t) {
                var i = e(t), n = t.pipelineContext, o = i.large, r = i.progressiveRender, a = i.large = n && n.large,
                    s = i.progressiveRender = n && n.progressiveRender;
                return !!(o ^ a || r ^ s) && "reset"
            }
        }

        dc.updateView = dc.updateLayout = dc.updateVisual = function (e, t, i, n) {
        }, Qo(lc), nr(lc, {registerWhenExtend: !0});
        var cc = Wo(), hc = uc();

        function fc() {
            this.group = new Di, this.uid = Al("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 ? A(Oo(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, r = t.pipelineContext.progressiveRender,
                a = e.view, s = o && cc(o).updateMethod, l = r ? "incrementalPrepareRender" : s && a[s] ? s : "render";
            return "render" !== l && a[l](t, i, n, o), wc[l]
        }

        pc.updateView = pc.updateLayout = pc.updateVisual = function (e, t, i, n) {
            this.render(e, t, i, n)
        }, Qo(fc), nr(fc, {registerWhenExtend: !0}), fc.markUpdateMethod = function (e, t) {
            cc(e).updateMethod = t
        };
        var wc = {
            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)
                }
            }
        }, kc = "\0__throttleOriginMethod", Tc = "\0__throttleRate", bc = "\0__throttleType";

        function Cc(e, t, i) {
            var n, o, r, a, s, l = 0, d = 0, u = null;

            function c() {
                d = (new Date).getTime(), u = null, e.apply(r, a || [])
            }

            function h() {
                n = (new Date).getTime(), r = this, a = 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 Sc(e, t, i, n) {
            var o = e[t];
            if (o) {
                var r = o[kc] || o, a = o[bc];
                if (o[Tc] !== i || a !== n) {
                    if (null == i || !n) return e[t] = r;
                    (o = e[t] = Cc(r, i, "debounce" === n))[kc] = r, o[bc] = n, o[Tc] = i
                }
                return o
            }
        }

        function Ic(e, t) {
            var i = e[t];
            i && i[kc] && (e[t] = i[kc])
        }

        var _c = {
            createOnAllSeries: !0, performRawSeries: !0, reset: function (e, t) {
                var i = e.getData(), n = (e.visualColorAccessPath || "itemStyle.color").split("."), o = e.get(n),
                    r = !F(o) || o instanceof rs ? null : o;
                o && !r || (o = e.getColorFromPalette(e.name, null, t.getSeriesCount())), i.setVisual("color", o);
                var a = (e.visualBorderColorAccessPath || "itemStyle.borderColor").split("."), s = e.get(a);
                if (i.setVisual("borderColor", s), !t.isSeriesFiltered(e)) return r && i.each(function (t) {
                    i.setItemVisual(t, "color", r(e.getDataParams(t)))
                }), {
                    dataEach: i.hasItemOption ? function (e, t) {
                        var i = e.getItemModel(t), o = i.get(n, !0), r = i.get(a, !0);
                        null != o && e.setItemVisual(t, "color", o), null != r && e.setItemVisual(t, "borderColor", r)
                    } : null
                }
            }
        }, Ac = {
            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: ""}
                }
            }
        }, Dc = 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, r = i.get("data.maxCount") || 10, a = i.get("series.maxCount") || 10, s = Math.min(n, a);
                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"), a = "series." + (1 < n ? "multiple" : "single") + ".";
                            i = u(i = c(o ? a + "withName" : a + "withoutName"), {
                                seriesId: e.seriesIndex,
                                seriesName: e.get("name"),
                                seriesType: function (e) {
                                    return Ac.series.typeNames[e] || "自定义图"
                                }(e.subType)
                            });
                            var l = e.getData();
                            (window.data = l).count() > r ? i += u(c("data.partialData"), {displayCnt: r}) : i += c("data.allData");
                            for (var h = [], f = 0; f < l.count(); f++) if (f < r) {
                                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 A(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 = Ac.aria, r = 0; r < n.length; ++r) o = o[n[r]];
                return o
            }
        }, xc = Math.PI;

        function Nc(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 = Nc.prototype;

        function Pc(e, t, i, n, o) {
            var r;

            function a(e, t) {
                return e.setDirty && (!e.dirtyMap || e.dirtyMap.get(t.__pipeline.id))
            }

            o = o || {}, A(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) {
                            a(o, e) && (e.dirty(), c = !0)
                        }), c && u.dirty(), Oc(u, n);
                        var f = e.getPerformArgs(u, o.block);
                        h.each(function (e) {
                            e.perform(f)
                        }), r |= u.perform(f)
                    } else d && d.each(function (s, l) {
                        a(o, s) && s.dirty();
                        var d = e.getPerformArgs(s, o.block);
                        d.skip = !t.performRawSeries && i.isSeriesFiltered(s.context.model), Oc(s, n), r |= s.perform(d)
                    })
                }
            }), e.unfinished |= r
        }

        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,
                    r = n && n.modDataCount;
                return {step: o, modBy: null != r ? Math.ceil(r / o) : null, modDataCount: r}
            }
        }, 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,
                r = e.get("large") && n >= e.get("largeThreshold"),
                a = "mod" === e.get("progressiveChunkMode") ? n : null;
            e.pipelineContext = i.context = {progressiveRender: o, modDataCount: a, large: r}
        }, 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
                }), jc(t, e, e.dataTask)
            })
        }, Ec.prepareStageTasks = function () {
            var e = this._stageTaskMap, t = this.ecInstance.getModel(), i = this.api;
            A(this._allHandlers, function (n) {
                var o = e.get(n.uid) || e.set(n.uid, []);
                n.reset && function (e, t, i, n, o) {
                    var r = i.seriesTaskMap || (i.seriesTaskMap = $()), a = t.seriesType, s = t.getTargetSeries;

                    function l(i) {
                        var a = i.uid, s = r.get(a) || r.set(a, Vu({plan: Bc, reset: Uc, count: Wc}));
                        s.context = {
                            model: i,
                            ecModel: n,
                            api: o,
                            useClearVisual: t.isVisual && !t.isLayout,
                            plan: t.plan,
                            reset: t.reset,
                            scheduler: e
                        }, jc(e, i, s)
                    }

                    t.createOnAllSeries ? n.eachRawSeries(l) : a ? n.eachRawSeriesByType(a, l) : s && s(n, o).each(l);
                    var d = e._pipelineMap;
                    r.each(function (e, t) {
                        d.get(t) || (e.dispose(), r.removeKey(t))
                    })
                }(this, n, o, t, i), n.overallReset && function (e, t, i, n, o) {
                    var r = i.overallTask = i.overallTask || Vu({reset: Mc});
                    r.context = {ecModel: n, api: o, overallReset: t.overallReset, scheduler: e};
                    var a = r.agentStubMap = r.agentStubMap || $(), s = t.seriesType, l = t.getTargetSeries, d = !0,
                        u = t.modifyOutputEnd;

                    function c(t) {
                        var i = t.uid, n = a.get(i);
                        n || (n = a.set(i, Vu({reset: Fc, onDirty: Rc})), r.dirty()), n.context = {
                            model: t,
                            overallProgress: d,
                            modifyOutputEnd: u
                        }, n.agent = r, n.__block = d, jc(e, t, n)
                    }

                    s ? n.eachRawSeriesByType(s, c) : l ? l(n, o).each(c) : (d = !1, A(n.getSeries(), c));
                    var h = e._pipelineMap;
                    a.each(function (e, t) {
                        h.get(t) || (e.dispose(), r.dirty(), a.removeKey(t))
                    })
                }(this, n, o, t, i)
            }, this)
        }, Ec.prepareView = function (e, t, i, n) {
            var o = e.renderTask, r = o.context;
            r.model = t, r.ecModel = i, r.api = n, o.__block = !e.incrementalPrepareRender, jc(this, t, o)
        }, Ec.performDataProcessorTasks = function (e, t) {
            Pc(this, this._dataProcessorHandlers, e, t, {block: !0})
        }, Ec.performVisualTasks = function (e, t, i) {
            Pc(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 Oc = 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 = Oo(e.reset(e.model, e.ecModel, e.api, e.payload));
            return 1 < t.length ? D(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 r = t.start; r < t.end; r++) o.dataEach(n, r); else o && o.progress && o.progress(t, n)
            }
        }

        function Wc(e) {
            return e.data.count()
        }

        function jc(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
        }

        Nc.wrapStageHandler = function (e, t) {
            return F(e) && (e = {
                overallReset: e, seriesType: function (e) {
                    Gc = null;
                    try {
                        e(Hc, zc)
                    } catch (e) {
                    }
                    return Gc
                }(e)
            }), e.uid = Al("stageHandler"), t && (e.visualType = t), e
        };
        var Gc, 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) {
            Gc = e
        }, Hc.eachComponent = function (e) {
            "series" === e.mainType && e.subType && (Gc = 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, Id.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 = Pd);
                        for (var n = 0, o = t.length; n < o; n++) {
                            var r = t[n];
                            if (null != r) {
                                if (M(r)) {
                                    i = Pd;
                                    break
                                }
                                if (R(r)) {
                                    i = Od;
                                    break
                                }
                            }
                        }
                    } else if (R(t)) {
                        for (var a in t) if (t.hasOwnProperty(a) && _(t[a])) {
                            i = Md;
                            break
                        }
                    } else if (null != t) throw new Error("Invalid data");
                    Kd(e).sourceFormat = i
                }(this)
            }
        }), lc.extend({type: "dataset"});
        var eh = Ta.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, r = t.ry, a = .5522848 * o, s = .5522848 * r;
                e.moveTo(i - o, n), e.bezierCurveTo(i - o, n - s, i - a, n - r, i, n - r), e.bezierCurveTo(i + a, n - r, i + o, n - s, i + o, n), e.bezierCurveTo(i + o, n + s, i + a, n + r, i, n + r), e.bezierCurveTo(i - a, n + r, 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 Di;
            this._root = n;
            var o = i.getAttribute("viewBox") || "", r = parseFloat(i.getAttribute("width") || t.width),
                a = parseFloat(i.getAttribute("height") || t.height);
            isNaN(r) && (r = null), isNaN(a) && (a = 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 != r && null != a && (l = ph(s, r, a), !t.ignoreViewBox)) {
                var c = n;
                (n = new Di).add(c), c.scale = l.scale.slice(), c.position = l.position.slice()
            }
            return t.ignoreRootClip || null == r || null == a || n.setClipPath(new es({
                shape: {
                    x: 0,
                    y: 0,
                    width: r,
                    height: a
                }
            })), {root: n, width: r, height: a, 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 = rh[o]) {
                    var r = n.call(this, e), a = e.getAttribute("id");
                    a && (this._defs[a] = r)
                }
            } 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 Ua({
                style: {text: e.textContent, transformText: !0},
                position: [this._textX || 0, this._textY || 0]
            });
            ah(t, o), dh(e, o, this._defs);
            var r = o.style.fontSize;
            r && r < 9 && (o.style.fontSize = 9, o.scale = o.scale || [1, 1], o.scale[0] *= r / 9, o.scale[1] *= r / 9);
            var a = o.getBoundingRect();
            return this._textX += a.width, t.add(o), o
        };
        var oh = {
            g: function (e, t) {
                var i = new Di;
                return ah(t, i), dh(e, i, this._defs), i
            }, rect: function (e, t) {
                var i = new es;
                return ah(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 Ka;
                return ah(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 ah(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 ah(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 Xa({shape: {points: i || []}});
                return ah(t, n), dh(e, n, this._defs), n
            }, polyline: function (e, t) {
                var i = new Ta;
                ah(t, i), dh(e, i, this._defs);
                var n = e.getAttribute("points");
                return n = n && sh(n), new qa({shape: {points: n || []}})
            }, image: function (e, t) {
                var i = new Yn;
                return ah(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,
                    r = e.getAttribute("dy") || 0;
                this._textX = parseFloat(i) + parseFloat(o), this._textY = parseFloat(n) + parseFloat(r);
                var a = new Di;
                return ah(t, a), dh(e, a, this._defs), a
            }, 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, r = e.getAttribute("dy") || 0, a = new Di;
                return ah(t, a), dh(e, a, this._defs), this._textX += o, this._textY += r, a
            }, path: function (e, t) {
                var i = Ba(e.getAttribute("d") || "");
                return ah(t, i), dh(e, i, this._defs), i
            }
        }, rh = {
            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),
                    r = 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, r), r
            }, radialgradient: function (e) {
            }
        };

        function ah(e, t) {
            e && e.__inheritedStyle && (t.__inheritedStyle || (t.__inheritedStyle = {}), k(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]), r = parseFloat(t[n + 1]);
                i.push([o, r])
            }
            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 || {}, r = "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 r = o.length - 1; 0 < r; r -= 2) {
                        var a = o[r], s = o[r - 1];
                        switch (n = n || rt(), s) {
                            case"translate":
                                a = q(a).split(th), dt(n, n, [parseFloat(a[0]), parseFloat(a[1] || 0)]);
                                break;
                            case"scale":
                                a = q(a).split(th), ct(n, n, [parseFloat(a[0]), parseFloat(a[1] || a[0])]);
                                break;
                            case"rotate":
                                a = q(a).split(th), ut(n, n, parseFloat(a[0]));
                                break;
                            case"skew":
                                a = q(a).split(th), console.warn("Skew transform is not supported yet");
                                break;
                            case"matrix":
                                a = q(a).split(th), n[0] = parseFloat(a[0]), n[1] = parseFloat(a[1]), n[2] = parseFloat(a[2]), n[3] = parseFloat(a[3]), n[4] = parseFloat(a[4]), n[5] = parseFloat(a[5])
                        }
                    }
                    t.setLocalTransform(n)
                }
            }(e, t), w(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 r in lh) lh.hasOwnProperty(r) && null != o[r] && (i[lh[r]] = o[r]);
                return i
            }(e)), !n)) for (var a in lh) if (lh.hasOwnProperty(a)) {
                var s = e.getAttribute(a);
                null != s && (o[lh[a]] = s)
            }
            var l = r ? "textFill" : "fill", d = r ? "textStroke" : "stroke";
            t.style = t.style || new ji;
            var u = t.style;
            null != o.fill && u.set(l, ch(o.fill, i)), null != o.stroke && u.set(d, ch(o.stroke, i)), A(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], function (e) {
                var t = "lineWidth" === e && r ? "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"), A(["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, r = Math.min(n, o);
            return {scale: [r, r], position: [-(e.x + e.width / 2) * r + t / 2, -(e.y + e.height / 2) * r + i / 2]}
        }

        var gh = $(), mh = {
            registerMap: function (e, t, i) {
                var n;
                return A(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, wh = A, kh = F, Th = R, bh = Id.parseClassType, Ch = {
            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
            }
        }, Sh = "__flagInMainProcess", Ih = "__optionUpdated", _h = /^[a-zA-Z0-9_]+$/;

        function Ah(e, t) {
            return function (i, n, o) {
                !t && this._disposed || (i = i && i.toLowerCase(), xe.prototype[e].call(this, i, n, o))
            }
        }

        function Dh() {
            xe.call(this)
        }

        function xh(e, t, i) {
            i = i || {}, "string" == typeof t && (t = $h[t]), this.id, this.group, this._dom = e;
            var n = this._zr = Io(e, {
                renderer: i.renderer || "canvas",
                devicePixelRatio: i.devicePixelRatio,
                width: i.width,
                height: i.height
            });
            this._throttledZrFlush = Cc(P(n.flush, n), 17), (t = m(t)) && Cu(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 w(new eu(e), {
                    getCoordinateSystems: P(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 r(e, t) {
                return e.__prio - t.__prio
            }

            Fi(Qh, r), Fi(Yh, r), this._scheduler = new Nc(this, o, Yh, Qh), xe.call(this, this._ecEventProcessor = new zh), this._messageCenter = new Dh, this._initEvents(), this.resize = P(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[Ih] || t._scheduler.unfinished || t._pendingActions.length || t.trigger("finished")
                })
            }(n, this), J(this)
        }

        Dh.prototype.on = Ah("on", !0), Dh.prototype.off = Ah("off", !0), Dh.prototype.one = Ah("one", !0), I(Dh, xe);
        var Nh = xh.prototype;

        function Eh(e, t, i) {
            if (!this._disposed) {
                var n, o = this._model, r = this._coordSysMgr.getCoordinateSystems();
                t = Go(o, t);
                for (var a = 0; a < r.length; a++) {
                    var s = r[a];
                    if (s[e] && null != (n = s[e](o, t, i))) return n
                }
            }
        }

        Nh._onframe = function () {
            if (!this._disposed) {
                var e = this._scheduler;
                if (this[Ih]) {
                    var t = this[Ih].silent;
                    this[Sh] = !0, Oh(this), Ph.update.call(this), this[Sh] = !1, this[Ih] = !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), Wh(this, this._model, 0, "remain"), i -= +new Date - o
                    } while (0 < i && e.unfinished);
                    e.unfinished || this._zr.flush()
                }
            }
        }, Nh.getDom = function () {
            return this._dom
        }, Nh.getZr = function () {
            return this._zr
        }, Nh.setOption = function (e, t, i) {
            if (!this._disposed) {
                var n;
                if (Th(t) && (i = t.lazyUpdate, n = t.silent, t = t.notMerge), this[Sh] = !0, !this._model || t) {
                    var o = new lu(this._api), r = this._theme, a = this._model = new Jd;
                    a.scheduler = this._scheduler, a.init(null, null, r, o)
                }
                this._model.setOption(e, Jh), i ? (this[Ih] = {silent: n}, this[Sh] = !1) : (Oh(this), Ph.update.call(this), this._zr.flush(), this[Ih] = !1, this[Sh] = !1, Rh.call(this, n), Bh.call(this, n))
            }
        }, Nh.setTheme = function () {
            console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")
        }, Nh.getModel = function () {
            return this._model
        }, Nh.getOption = function () {
            return this._model && this._model.getOption()
        }, Nh.getWidth = function () {
            return this._zr.getWidth()
        }, Nh.getHeight = function () {
            return this._zr.getHeight()
        }, Nh.getDevicePixelRatio = function () {
            return this._zr.painter.dpr || window.devicePixelRatio || 1
        }, Nh.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)
        }, Nh.getSvgDataURL = function () {
            if (o.svgSupported) {
                var e = this._zr;
                return A(e.storage.getDisplayList(), function (e) {
                    e.stopAnimation(!0)
                }), e.painter.toDataURL()
            }
        }, Nh.getDataURL = function (e) {
            if (!this._disposed) {
                var t = (e = e || {}).excludeComponents, i = this._model, n = [], o = this;
                wh(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 r = "svg" === this._zr.painter.getType() ? this.getSvgDataURL() : this.getRenderedCanvas(e).toDataURL("image/" + (e && e.type || "png"));
                return wh(n, function (e) {
                    e.group.ignore = !1
                }), r
            }
        }, Nh.getConnectedDataURL = function (e) {
            if (!this._disposed && o.canvasSupported) {
                var t = "svg" === e.type, i = this.group, n = Math.min, r = Math.max;
                if (nf[i]) {
                    var a = 1 / 0, s = 1 / 0, l = -1 / 0, d = -1 / 0, u = [], c = e && e.pixelRatio || 1;
                    A(tf, function (o, c) {
                        if (o.group === i) {
                            var h = t ? o.getZr().painter.getSvgDom().innerHTML : o.getRenderedCanvas(m(e)),
                                f = o.getDom().getBoundingClientRect();
                            a = n(f.left, a), s = n(f.top, s), l = r(f.right, l), d = r(f.bottom, d), u.push({
                                dom: h,
                                left: f.left,
                                top: f.top
                            })
                        }
                    });
                    var h = (l *= c) - (a *= c), f = (d *= c) - (s *= c), p = T(),
                        g = Io(p, {renderer: t ? "svg" : "canvas"});
                    if (g.resize({width: h, height: f}), t) {
                        var v = "";
                        return wh(u, function (e) {
                            var t = e.left - a, 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}
                    })), wh(u, function (e) {
                        var t = new Yn({style: {x: e.left * c - a, y: e.top * c - s, image: e.dom}});
                        g.add(t)
                    }), g.refreshImmediately(), p.toDataURL("image/" + (e && e.type || "png"))
                }
                return this.getDataURL(e)
            }
        }, Nh.convertToPixel = O(Eh, "convertToPixel"), Nh.convertFromPixel = O(Eh, "convertFromPixel"), Nh.containPixel = function (e, t) {
            var i;
            if (!this._disposed) return A(e = Go(this._model, e), function (e, n) {
                0 <= n.indexOf("Models") && A(e, function (e) {
                    var o = e.coordinateSystem;
                    if (o && o.containPoint) i |= !!o.containPoint(t); else if ("seriesModels" === n) {
                        var r = this._chartsMap[e.__viewId];
                        r && r.containPoint && (i |= r.containPoint(t, e))
                    }
                }, this)
            }, this), !!i
        }, Nh.getVisual = function (e, t) {
            var i = (e = Go(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)
        }, Nh.getViewOfComponentModel = function (e) {
            return this._componentsMap[e.__viewId]
        }, Nh.getViewOfSeriesModel = function (e) {
            return this._chartsMap[e.__viewId]
        };
        var Ph = {
            prepareAndUpdate: function (e) {
                Oh(this), Ph.update.call(this, e)
            }, update: function (e) {
                var t = this._model, i = this._api, n = this._zr, r = this._coordSysMgr, a = this._scheduler;
                if (t) {
                    a.restoreData(t, e), a.performSeriesTasks(t), r.create(t, i), a.performDataProcessorTasks(t, e), Fh(this, t), r.update(t, i), Vh(t), a.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")
                    }
                    jh(t, i)
                }
            }, updateTransform: function (e) {
                var t = this._model, i = this, n = this._api;
                if (t) {
                    var o = [];
                    t.eachComponent(function (r, a) {
                        var s = i.getViewOfComponentModel(a);
                        if (s && s.__alive) if (s.updateTransform) {
                            var l = s.updateTransform(a, t, n, e);
                            l && l.update && o.push(s)
                        } else o.push(s)
                    });
                    var r = $();
                    t.eachSeries(function (o) {
                        var a = i._chartsMap[o.__viewId];
                        if (a.updateTransform) {
                            var s = a.updateTransform(o, t, n, e);
                            s && s.update && r.set(o.uid, 1)
                        } else r.set(o.uid, 1)
                    }), Vh(t), this._scheduler.performVisualTasks(t, e, {
                        setDirty: !0,
                        dirtyMap: r
                    }), Wh(i, t, 0, e, r), jh(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), jh(t, this._api))
            }, updateVisual: function (e) {
                Ph.update.call(this, e)
            }, updateLayout: function (e) {
                Ph.update.call(this, e)
            }
        };

        function Oh(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 r = e._model;
            if (n) {
                var a = {};
                a[n + "Id"] = i[n + "Id"], a[n + "Index"] = i[n + "Index"], a[n + "Name"] = i[n + "Name"];
                var s = {mainType: n, query: a};
                o && (s.subType = o);
                var l = i.excludeSeriesId;
                null != l && (l = $(Oo(l))), r && r.eachComponent(s, function (t) {
                    l && null != l.get(t.id) || d(e["series" === n ? "_chartsMap" : "_componentsMap"][t.__viewId])
                }, e)
            } else wh(e._componentsViews.concat(e._chartsViews), d);

            function d(n) {
                n && n.__alive && n[t] && n[t](n.__model, r, 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], r = o.actionInfo, a = (r.update || "update").split(":"),
                s = a.pop();
            a = null != a[0] && bh(a[0]), this[Sh] = !0;
            var l = [e], d = !1;
            e.batch && (d = !0, l = D(e.batch, function (t) {
                return (t = k(w({}, t), e)).batch = null, t
            }));
            var u, c = [], h = "highlight" === i || "downplay" === i;
            wh(l, function (e) {
                (u = (u = o.action(e, this._model, this._api)) || w({}, e)).type = r.event || u.type, c.push(u), h ? Mh(this, s, e, "series") : a && Mh(this, s, e, a.main, a.sub)
            }, this), "none" === s || h || a || (this[Ih] ? (Oh(this), Ph.update.call(this, e), this[Ih] = !1) : Ph[s].call(this, e)), u = d ? {
                type: r.event || i,
                escapeConnect: n,
                batch: c
            } : c[0], this[Sh] = !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, r = o ? e._componentsViews : e._chartsViews, a = o ? e._componentsMap : e._chartsMap, s = e._zr, l = e._api, d = 0; d < r.length; d++) r[d].__alive = !1;

            function u(e) {
                var t = "_ec_" + e.id + "_" + e.type, d = a[t];
                if (!d) {
                    var u = bh(e.type);
                    (d = new (o ? lc.getClass(u.main, u.sub) : fc.getClass(u.sub))).init(i, l), a[t] = d, r.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 < r.length;) {
                var c = r[d];
                c.__alive ? d++ : (o || c.renderTask.dispose(), s.remove(c.group), c.dispose(i, l), r.splice(d, 1), delete a[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) {
                wh(e._componentsViews, function (e) {
                    var o = e.__model;
                    e.render(o, t, i, n), Hh(o, e)
                })
            }(e, t, i, n), wh(e._chartsViews, function (e) {
                e.__alive = !1
            }), Wh(e, t, 0, n), wh(e._chartsViews, function (e) {
                e.__alive || e.remove(t, i)
            })
        }

        function Wh(e, t, i, n, r) {
            var a, s = e._scheduler;
            t.eachSeries(function (t) {
                var i = e._chartsMap[t.__viewId];
                i.__alive = !0;
                var o = i.renderTask;
                s.updatePayload(o, n), r && r.get(t.uid) && o.dirty(), a |= 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 |= a, 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), Dc(e._zr.dom, t)
        }

        function jh(e, t) {
            wh(Zh, function (i) {
                i(e, t)
            })
        }

        Nh.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[Sh] = !0, i && Oh(this), Ph.update.call(this), this[Sh] = !1, Rh.call(this, n), Bh.call(this, n)
                }
            }
        }, Nh.showLoading = function (e, t) {
            if (!this._disposed && (Th(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)
            }
        }, Nh.hideLoading = function () {
            this._disposed || (this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null)
        }, Nh.makeActionFromEvent = function (e) {
            var t = w({}, e);
            return t.type = qh[e.type], t
        }, Nh.dispatchAction = function (e, t) {
            this._disposed || (Th(t) || (t = {silent: !!t}), Xh[e.type] && this._model && (this[Sh] ? 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))))
        }, Nh.appendData = function (e) {
            if (!this._disposed) {
                var t = e.seriesIndex;
                this.getModel().getSeriesByIndex(t).appendData(e), this._scheduler.unfinished = !0
            }
        }, Nh.on = Ah("on", !1), Nh.off = Ah("off", !1), Nh.one = Ah("one", !1);
        var Gh = ["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
        }

        Nh._initEvents = function () {
            wh(Gh, function (e) {
                function t(t) {
                    var i, n = this.getModel(), o = t.target;
                    if ("globalout" === e) i = {}; else if (o && null != o.dataIndex) {
                        var r = o.dataModel || n.getSeriesByIndex(o.seriesIndex);
                        i = r && r.getDataParams(o.dataIndex, o.dataType, o) || {}
                    } else o && o.eventData && (i = w({}, o.eventData));
                    if (i) {
                        var a = i.componentType, s = i.componentIndex;
                        "markLine" !== a && "markPoint" !== a && "markArea" !== a || (a = "series", s = i.seriesIndex);
                        var l = a && null != s && n.getComponent(a, 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), wh(qh, function (e, t) {
                this._messageCenter.on(t, function (e) {
                    this.trigger(t, e)
                }, this)
            }, this)
        }, Nh.isDisposed = function () {
            return this._disposed
        }, Nh.clear = function () {
            this._disposed || this.setOption({series: []}, !0)
        }, Nh.dispose = function () {
            if (!this._disposed) {
                this._disposed = !0, zo(this.getDom(), af, "");
                var e = this._api, t = this._model;
                wh(this._componentsViews, function (i) {
                    i.dispose(t, e)
                }), wh(this._chartsViews, function (i) {
                    i.dispose(t, e)
                }), this._zr.dispose(), delete tf[this.id]
            }
        }, I(xh, xe), zh.prototype = {
            constructor: zh, normalizeQuery: function (e) {
                var t = {}, i = {}, n = {};
                if (L(e)) {
                    var o = bh(e);
                    t.mainType = o.main || null, t.subType = o.sub || null
                } else {
                    var r = ["Index", "Name", "Id"], a = {name: 1, dataIndex: 1, dataType: 1};
                    A(e, function (e, o) {
                        for (var s = !1, l = 0; l < r.length; l++) {
                            var d = r[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)
                            }
                        }
                        a.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, r = n.packedEvent, a = n.model, s = n.view;
                if (!a || !s) return !0;
                var l = t.cptQuery, d = t.dataQuery;
                return u(l, a, "mainType") && u(l, a, "subType") && u(l, a, "index", "componentIndex") && u(l, a, "name") && u(l, a, "id") && u(d, r, "name") && u(d, r, "dataIndex") && u(d, r, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, t.otherQuery, o, r));

                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,
            rf = new Date - 0, af = "_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, af)]
        }

        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 = Th(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) {
            (kh(t) || Th(t)) && (i = t, t = n);
            var r = Nc.wrapStageHandler(i, o);
            return r.__prio = t, r.__raw = i, e.push(r), r
        }

        function yf(e, t) {
            ef[e] = t
        }

        function wf(e) {
            return Id.extend(e)
        }

        function kf(e) {
            return lc.extend(e)
        }

        function Tf(e) {
            return ec.extend(e)
        }

        function bf(e) {
            return fc.extend(e)
        }

        function Cf(e) {
            return e
        }

        function Sf(e, t, i, n, o) {
            this._old = e, this._new = t, this._oldKeyGetter = i || Cf, this._newKeyGetter = n || Cf, this.context = o
        }

        function If(e, t, i, n, o) {
            for (var r = 0; r < e.length; r++) {
                var a = "_ec_" + o[n](e[r], r), s = t[a];
                null == s ? (i.push(a), t[a] = r) : (s.length || (t[a] = s = [s]), s.push(r))
            }
        }

        mf(2e3, _c), cf(Cu), 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(), r = {
                        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 (!r.stackedDimension || !r.isStackedByIndex && !r.stackedByDimension) return;
                    n.length && o.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(r)
                }
            }), t.each(Su)
        }), yf("default", function (e, t) {
            k(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 Di, n = new es({style: {fill: t.maskColor}, zlevel: t.zlevel, z: 1e4});
            i.add(n);
            var o = t.fontSize + " sans-serif", r = 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(r), t.showSpinner) {
                var a = new ss({
                    shape: {startAngle: -xc / 2, endAngle: -xc / 2 + .1, r: t.spinnerRadius},
                    style: {stroke: t.color, lineCap: "round", lineWidth: t.lineWidth},
                    zlevel: t.zlevel,
                    z: 10001
                });
                a.animateShape(!0).when(1e3, {endAngle: 3 * xc / 2}).start("circularInOut"), a.animateShape(!0).when(1e3, {startAngle: 3 * xc / 2}).delay(300).start("circularInOut"), i.add(a)
            }
            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 && a.setShape({cx: l, cy: d}), r.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), Sf.prototype = {
            constructor: Sf, 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 (If(e, {}, n, "_oldKeyGetter", this), If(t, i, o, "_newKeyGetter", this), r = 0; r < e.length; r++) null != (s = i[a = n[r]]) ? ((d = s.length) ? (1 === d && (i[a] = null), s = s.shift()) : i[a] = null, this._update && this._update(s, r)) : this._remove && this._remove(r);
                for (var r = 0; r < o.length; r++) {
                    var a = o[r];
                    if (i.hasOwnProperty(a)) {
                        var s;
                        if (null == (s = i[a])) 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 Af(e, t) {
            return e.hasOwnProperty(t) || (e[t] = []), e[t]
        }

        function Df(e) {
            return "category" === e ? "ordinal" : "time" === e ? "time" : "float"
        }

        function xf(e) {
            null != e && w(this, e), this.otherDims = {}
        }

        var Nf = R, Ef = "undefined", Pf = {
                float: typeof Float64Array == Ef ? Array : Float64Array,
                int: typeof Int32Array == Ef ? Array : Int32Array,
                ordinal: Array,
                number: Array,
                time: Array
            }, Of = typeof Uint32Array == Ef ? Array : Uint32Array, Mf = typeof Int32Array == Ef ? Array : Int32Array,
            Ff = typeof Uint16Array == Ef ? Array : Uint16Array;

        function Lf(e) {
            return 65535 < e._rawCount ? Of : Ff
        }

        var Rf = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_rawData", "_chunkSize", "_chunkCount", "_dimValueGetter", "_count", "_rawCount", "_nameDimIdx", "_idDimIdx"],
            Bf = ["_extent", "_approximateExtent", "_rawExtent"];

        function Uf(e, t) {
            A(Rf.concat(t.__wrappedMethods || []), function (i) {
                t.hasOwnProperty(i) && (e[i] = t[i])
            }), e.__wrappedMethods = t.__wrappedMethods, A(Bf, function (i) {
                e[i] = m(t[i])
            }), e._calculationInfo = w(t._calculationInfo)
        }

        var Vf = function (e, t) {
            e = e || ["x", "y"];
            for (var i = {}, n = [], o = {}, r = 0; r < e.length; r++) {
                var a = e[r];
                L(a) ? a = new xf({name: a}) : a instanceof xf || (a = new xf(a));
                var s = a.name;
                a.type = a.type || "float", a.coordDim || (a.coordDim = s, a.coordDimIndex = 0), a.otherDims = a.otherDims || {}, n.push(s), (i[s] = a).index = r, a.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 = [], r = [],
                    a = t.userOutput = {dimensionNames: e.dimensions.slice(), encode: {}};
                A(e.dimensions, function (t) {
                    var s = e.getDimensionInfo(t), l = s.coordDim;
                    if (l) {
                        var d = s.coordDimIndex;
                        Af(i, l)[d] = t, s.isExtraCoord || (n.set(l, 1), function (e) {
                            return !("ordinal" === e || "time" === e)
                        }(s.type) && (o[0] = t), Af(a.encode, l)[d] = s.index), s.defaultTooltip && r.push(t)
                    }
                    _f.each(function (e, t) {
                        var n = Af(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 ? r = u.slice() : r.length || (r = o.slice()), i.defaultedLabel = o, i.defaultedTooltip = r, t
            }(this), this._invertedIndicesMap = o, this._calculationInfo = {}, this.userOutput = this._dimensionsSummary.userOutput
        }, Kf = Vf.prototype;

        function Wf(e, t, i, n, o) {
            var r = Pf[t.type], a = n - 1, s = t.name, l = e[s][a];
            if (l && l.length < i) {
                for (var d = new r(Math.min(o - a * i, i)), u = 0; u < l.length; u++) d[u] = l[u];
                e[s][a] = d
            }
            for (var c = n * i; c < o; c += i) e[s].push(new r(Math.min(o - c, i)))
        }

        function jf(e) {
            var t = e._invertedIndicesMap;
            A(t, function (i, n) {
                var o = e._dimensionInfos[n].ordinalMeta;
                if (o) {
                    i = t[n] = new Mf(o.categories.length);
                    for (var r = 0; r < i.length; r++) i[r] = -1;
                    for (r = 0; r < e._count; r++) i[e.get(n, r)] = r
                }
            })
        }

        function Gf(e, t, i) {
            var n;
            if (null != t) {
                var o = e._chunkSize, r = Math.floor(i / o), a = i % o, s = e.dimensions[t], l = e._storage[s][r];
                if (l) {
                    n = l[a];
                    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 = Gf(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(D(i, e.getDimensionInfo, e), e.hostModel);
            Uf(n, e);
            for (var o = n._storage = {}, r = e._storage, a = 0; a < i.length; a++) {
                var s = i[a];
                r[s] && (0 <= C(t, s) ? (o[s] = Jf(r[s]), n._rawExtent[s] = [1 / 0, -1 / 0], n._extent[s] = null) : o[s] = r[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 = $(), r = $(), a = [], s = function (e, t, i, n) {
                var o = Math.max(e.dimensionsDetectCount || 1, t.length, i.length, n || 0);
                return A(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] = w({}, R(n[l]) ? n[l] : {name: n[l]}), u = d.name, c = a[l] = new xf;
                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 = Oo(e).slice()).length && !L(e[0]) && e[0] < 0) h.set(t, !1); else {
                    var i = h.set(t, []);
                    A(e, function (e, n) {
                        L(e) && (e = o.get(e)), null != e && e < s && (i[n] = e, p(a[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, r.set(t, !0))
            }

            A(e, function (e, t) {
                var i, n, o;
                if (L(e)) i = e, e = {}; else {
                    i = e.name;
                    var r = e.ordinalMeta;
                    e.ordinalMeta = null, (e = m(e)).ordinalMeta = r, 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 = Oo(s)).length) for (var l = 0; l < (n && n.length || 1); l++) {
                        for (; f < a.length && null != a[f].coordDim;) f++;
                        f < a.length && s.push(f++)
                    }
                    A(s, function (t, r) {
                        var s = a[t];
                        if (p(k(s, e), i, r), null == s.name && n) {
                            var l = n[r];
                            R(l) || (l = {name: l}), s.name = s.displayName = l.name, s.defaultTooltip = l.defaultTooltip
                        }
                        o && k(s.otherDims, o)
                    })
                }
            });
            var g = i.generateCoord, v = i.generateCoordCount, y = null != v;
            v = g ? v || 1 : 0;
            for (var T, b, C = g || "value", S = 0; S < s; S++) null == (c = a[S] = a[S] || new xf).coordDim && (c.coordDim = $f(C, r, y), c.coordDimIndex = 0, (!g || v <= 0) && (c.isExtraCoord = !0), v--), null == c.name && (c.name = $f(c.coordDim, o)), null == c.type && (T = t, b = S, c.name, qd(T.data, T.sourceFormat, T.seriesLayoutBy, T.dimensionsDefine, T.startIndex, b) === Vd.Must || c.isExtraCoord && (null != c.otherDims.itemName || null != c.otherDims.seriesName)) && (c.type = "ordinal");
            return a
        }

        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 Iu(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 = Ou[this._rawData.getSource().sourceFormat], this._dimValueGetter = i = i || this.defaultDimValueGetter, this._dimValueGetterArrayRows = Ou.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, r = o.length, a = this._rawExtent, s = this.count(), l = s + Math.max(e.length, t ? t.length : 0), d = this._chunkCount, u = 0; u < r; u++) a[v = o[u]] || (a[v] = [1 / 0, -1 / 0]), n[v] || (n[v] = []), Wf(n, this._dimensionInfos[v], i, d, l), this._chunkCount = n[v].length;
            for (var c = new Array(r), h = s; h < l; h++) {
                for (var f = h - s, p = Math.floor(h / i), g = h % i, m = 0; m < r; m++) {
                    var v = o[m], y = this._dimValueGetterArrayRows(e[f] || c, v, f, m);
                    n[v][p][g] = y;
                    var w = a[v];
                    y < w[0] && (w[0] = y), y > w[1] && (w[1] = y)
                }
                t && (this._nameList[h] = t[f])
            }
            this._rawCount = this._count = l, this._extent = {}, jf(this)
        }, Kf._initDataFromProvider = function (e, t) {
            if (!(t <= e)) {
                for (var i, n = this._chunkSize, o = this._rawData, r = this._storage, a = this.dimensions, s = a.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[T = a[p]] || (c[T] = [1 / 0, -1 / 0]);
                    var g = l[T];
                    0 === g.otherDims.itemName && (i = this._nameDimIdx = p), 0 === g.otherDims.itemId && (this._idDimIdx = p), r[T] || (r[T] = []), Wf(r, g, n, f, t), this._chunkCount = r[T].length
                }
                for (var m = new Array(s), v = e; v < t; v++) {
                    m = o.getItem(v, m);
                    for (var y = Math.floor(v / n), w = v % n, k = 0; k < s; k++) {
                        var T, b = r[T = a[k]][y], C = this._dimValueGetter(m, T, v, k);
                        b[w] = C;
                        var S = c[T];
                        C < S[0] && (S[0] = C), C > S[1] && (S[1] = C)
                    }
                    if (!o.pure) {
                        var I = d[v];
                        if (m && null == I) if (null != m.name) d[v] = I = m.name; else if (null != i) {
                            var _ = a[i], A = r[_][y];
                            if (A) {
                                I = A[w];
                                var D = l[_].ordinalMeta;
                                D && D.categories.length && (I = D.categories[I])
                            }
                        }
                        var x = null == m ? null : m.id;
                        null == x && null != I && (h[I] = h[I] || 0, 0 < h[x = I] && (x += "__ec__" + h[I]), h[I]++), null != x && (u[v] = x)
                    }
                }
                !o.persistent && o.clean && o.clean(), this._rawCount = this._count = t, this._extent = {}, jf(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 r = (n = i)[0], a = n[1], s = 0; s < o; s++) {
                var l = this._getFast(e, this.getRawIndex(s));
                l < r && (r = l), a < l && (a = l)
            }
            return n = [r, a], 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) {
            Nf(e) ? w(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 r = (n + o) / 2 | 0;
                if (t[r] < e) n = 1 + r; else {
                    if (!(t[r] > e)) return r;
                    o = r - 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, r = -1, a = 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 && r < 0) && (o = u, r = d, a = 0), d === r && (n[a++] = s))
            }
            return n.length = a, 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] || Gf(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 = D(qf(e), this.getDimension, this)).length, r = 0; r < this.count(); r++) switch (o) {
                    case 0:
                        t.call(i, r);
                        break;
                    case 1:
                        t.call(i, this.get(e[0], r), r);
                        break;
                    case 2:
                        t.call(i, this.get(e[0], r), this.get(e[1], r), r);
                        break;
                    default:
                        for (var a = 0, s = []; a < o; a++) s[a] = this.get(e[a], r);
                        s[a] = r, 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 = D(qf(e), this.getDimension, this);
                for (var o = this.count(), r = new (Lf(this))(o), a = [], 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++) a[p] = this._getFast(d, h);
                        a[p] = u, c = t.apply(i, a)
                    }
                    c && (r[l++] = h)
                }
                return l < o && (this._indices = r), 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(), r = new (Lf(this))(o), a = 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 <= (T = p[m]) && T <= d || isNaN(T)) && (r[a++] = c), c++;
                            u = !0
                        } else if (2 === n) {
                            h = this._storage[s];
                            var v = this._storage[t[1]], y = e[t[1]][0], w = e[t[1]][1];
                            for (f = 0; f < this._chunkCount; f++) {
                                p = h[f];
                                var k = v[f];
                                for (g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++) {
                                    var T = p[m], b = k[m];
                                    (l <= T && T <= d || isNaN(T)) && (y <= b && b <= w || isNaN(b)) && (r[a++] = c), c++
                                }
                            }
                            u = !0
                        }
                    }
                    if (!u) if (1 === n) for (m = 0; m < o; m++) {
                        var C = this.getRawIndex(m);
                        (l <= (T = this._getFast(s, C)) && T <= d || isNaN(T)) && (r[a++] = C)
                    } else for (m = 0; m < o; m++) {
                        var S = !0;
                        for (C = this.getRawIndex(m), f = 0; f < n; f++) {
                            var I = t[f];
                            ((T = this._getFast(i, C)) < e[I][0] || T > e[I][1]) && (S = !1)
                        }
                        S && (r[a++] = this.getRawIndex(m))
                    }
                    return a < o && (this._indices = r), this._count = a, 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 = D(qf(e), this.getDimension, this));
            o._indices = this._indices, o.getRawIndex = o._indices ? zf : Hf;
            for (var r = o._storage, a = [], 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 && (a[0] = p, p = a);
                    for (var g = this.getRawIndex(h), m = Math.floor(g / s), v = g % s, y = 0; y < p.length; y++) {
                        var w = e[y], k = p[y], T = c[w], b = r[w];
                        b && (b[m][v] = k), k < T[0] && (T[0] = k), k > T[1] && (T[1] = k)
                    }
                }
            }
            return o
        }, Kf.downSample = function (e, t, i, n) {
            for (var o = Yf(this, [e]), r = o._storage, a = [], s = Math.floor(1 / t), l = r[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, a.length = s);
                for (var g = 0; g < s; g++) {
                    var m = this.getRawIndex(p + g), v = Math.floor(m / u), y = m % u;
                    a[g] = l[v][y]
                }
                var w = i(a), k = this.getRawIndex(Math.min(p + n(a, w) || 0, d - 1)), T = k % u;
                (l[Math.floor(k / u)][T] = w) < c[0] && (c[0] = w), w > c[1] && (c[1] = w), h[f++] = k
            }
            return o._count = f, o._indices = h, o.getRawIndex = zf, o
        }, Kf.getItemModel = function (e) {
            var t = this.hostModel;
            return new Cl(this.getRawDataItem(e), t, t && t.ecModel)
        }, Kf.diff = function (e) {
            var t = this;
            return new Sf(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 (Nf(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 (Nf(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 ? w(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, Nf(t)) for (var r in t) t.hasOwnProperty(r) && (n[r] = t[r], o[r] = !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) {
            A(this._graphicEls, function (i, n) {
                i && e && e.call(t, i, n)
            })
        }, Kf.cloneShallow = function (e) {
            if (!e) {
                var t = D(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], r = e.getReferringComponents("yAxis")[0];
                t.coordSysDims = ["x", "y"], i.set("x", o), i.set("y", r), ip(o) && (n.set("x", o), t.firstCategoryDimIndex = 0), ip(r) && (n.set("y", r), 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], r = o.findAxisModel("radiusAxis"),
                    a = o.findAxisModel("angleAxis");
                t.coordSysDims = ["radius", "angle"], i.set("radius", r), i.set("angle", a), ip(r) && (n.set("radius", r), t.firstCategoryDimIndex = 0), ip(a) && (n.set("angle", a), 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, r = o.getComponent("parallel", e.get("parallelIndex")),
                    a = t.coordSysDims = r.dimensions.slice();
                A(r.parallelAxisIndex, function (e, r) {
                    var s = o.getComponent("parallelAxis", e), l = a[r];
                    i.set(l, s), ip(s) && null == t.firstCategoryDimIndex && (n.set(l, s), t.firstCategoryDimIndex = r)
                })
            }
        };

        function ip(e) {
            return "category" === e.get("type")
        }

        function np(e, t, i) {
            var n, o, r, a, s = (i = i || {}).byIndex, l = i.stackedCoordDimension, d = !(!e || !e.get("stack"));
            if (A(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) {
                r = "__\0ecstackresult", a = "__\0ecstackedover", n && (n.createInvertedIndices = !0);
                var u = o.coordDim, c = o.type, h = 0;
                A(t, function (e) {
                    e.coordDim === u && h++
                }), t.push({
                    name: r,
                    coordDim: u,
                    coordDimIndex: h,
                    type: c,
                    isExtraCoord: !0,
                    isCalculationCoord: !0
                }), h++, t.push({
                    name: a,
                    coordDim: a,
                    coordDimIndex: h,
                    type: c,
                    isExtraCoord: !0,
                    isCalculationCoord: !0
                })
            }
            return {
                stackedDimension: o && o.name,
                stackedByDimension: n && n.name,
                isStackedByIndex: s,
                stackedOverDimension: a,
                stackResultDimension: r
            }
        }

        function op(e, t) {
            return !!t && t === e.getCalculationInfo("stackedDimension")
        }

        function rp(e, t) {
            return op(e, t) ? e.getCalculationInfo("stackResultDimension") : t
        }

        function ap(e, t, i) {
            i = i || {}, Ud.isInstance(e) || (e = Ud.seriesDataToSource(e));
            var n, o = t.get("coordinateSystem"), r = iu.get(o), a = 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);
            a && (n = D(a.coordSysDims, function (e) {
                var t = {name: e}, i = a.axisMap.get(e);
                if (i) {
                    var n = i.get("type");
                    t.type = Df(n)
                }
                return t
            })), n = n || r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"];
            var s, l, d = ep(e, {
                coordDimensions: n,
                generateCoord: i.generateCoord,
                encodeDefaulter: i.useEncodeDefaulter ? O(Hd, n, t) : null
            });
            a && A(d, function (e, t) {
                var i = e.coordDim, n = a.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), nr(sp, {registerWhenExtend: !0}), lp.createByAxisModel = function (e) {
            var t = e.option, i = t.data, n = i && D(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, wp = 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]), wp.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, r = [];
                if (!t) return r;
                i[0] < n[0] && (e ? r.push(yp(n[0] - t, o)) : r.push(i[0]));
                for (var a = n[0]; a <= n[1] && (r.push(a), (a = yp(a + t, o)) !== r[r.length - 1]);) if (1e4 < r.length) return [];
                var s = r.length ? r[r.length - 1] : n[1];
                return i[1] > s && (e ? r.push(yp(s + t, o)) : r.push(i[1])), r
            }, getMinorTicks: function (e) {
                for (var t = this.getTicks(!0), i = [], n = this.getExtent(), o = 1; o < t.length; o++) {
                    for (var r = t[o], a = t[o - 1], s = 0, l = [], d = (r - a) / e; s < e - 1;) {
                        var u = El(a + (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 r = function (e, t, i, n) {
                        var o = {}, r = e[1] - e[0], a = o.interval = Gl(r / t, !0);
                        null != i && a < i && (a = o.interval = i), null != n && n < a && (a = o.interval = n);
                        var s = o.intervalPrecision = gp(a);
                        return vp(o.niceTickExtent = [pp(Math.ceil(e[0] / a) * a, s), pp(Math.floor(e[1] / a) * a, s)], e), o
                    }(n, e, t, i);
                    this._intervalPrecision = r.intervalPrecision, this._interval = r.interval, this._niceExtent = r.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))
            }
        });
        wp.create = function () {
            return new wp
        };
        var kp = "__ec_stack_", Tp = "undefined" != typeof Float32Array ? Float32Array : Array;

        function bp(e) {
            return e.get("stack") || kp + e.seriesIndex
        }

        function Cp(e) {
            return e.dim + e.index
        }

        function Sp(e, t) {
            var i = [];
            return t.eachSeriesByType(e, function (e) {
                Np(e) && !Ep(e) && i.push(e)
            }), i
        }

        function Ip(e) {
            var t = function (e) {
                var t = {};
                A(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, r = n.mapDimension(i.dim), a = 0, s = n.count(); a < s; ++a) {
                        var l = n.get(r, a);
                        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 r = null, a = 1; a < o.length; ++a) {
                            var s = o[a] - o[a - 1];
                            0 < s && (r = null === r ? s : Math.min(r, s))
                        }
                        i[n] = r
                    }
                }
                return i
            }(e), i = [];
            return A(e, function (e) {
                var n, o = e.coordinateSystem.getBaseAxis(), r = o.getExtent();
                if ("category" === o.type) n = o.getBandWidth(); else if ("value" === o.type || "time" === o.type) {
                    var a = o.dim + "_" + o.index, s = t[a], l = Math.abs(r[1] - r[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(r[1] - r[0]) / c.count()
                }
                var h = Nl(e.get("barWidth"), n), f = Nl(e.get("barMaxWidth"), n), p = Nl(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: Cp(o),
                    stackId: bp(e)
                })
            }), _p(i)
        }

        function _p(e) {
            var t = {};
            A(e, function (e, i) {
                var n = e.axisKey, o = e.bandWidth, r = t[n] || {
                    bandWidth: o,
                    remainedWidth: o,
                    autoWidthCount: 0,
                    categoryGap: "20%",
                    gap: "30%",
                    stacks: {}
                }, a = r.stacks;
                t[n] = r;
                var s = e.stackId;
                a[s] || r.autoWidthCount++, a[s] = a[s] || {width: 0, maxWidth: 0};
                var l = e.barWidth;
                l && !a[s].width && (a[s].width = l, l = Math.min(r.remainedWidth, l), r.remainedWidth -= l);
                var d = e.barMaxWidth;
                d && (a[s].maxWidth = d);
                var u = e.barMinWidth;
                u && (a[s].minWidth = u);
                var c = e.barGap;
                null != c && (r.gap = c);
                var h = e.barCategoryGap;
                null != h && (r.categoryGap = h)
            });
            var i = {};
            return A(t, function (e, t) {
                i[t] = {};
                var n = e.stacks, o = e.bandWidth, r = Nl(e.categoryGap, o), a = Nl(e.gap, 1), s = e.remainedWidth,
                    l = e.autoWidthCount, d = (s - r) / (l + (l - 1) * a);
                d = Math.max(d, 0), A(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 + a * 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 + a * n, l--)
                    }
                }), d = (s - r) / (l + (l - 1) * a), d = Math.max(d, 0);
                var u, c = 0;
                A(n, function (e, t) {
                    e.width || (e.width = d), c += (u = e).width * (1 + a)
                }), u && (c -= u.width * a);
                var h = -c / 2;
                A(n, function (e, n) {
                    i[t][n] = i[t][n] || {bandWidth: o, offset: h, width: e.width}, h += e.width * (1 + a)
                })
            }), i
        }

        function Ap(e, t, i) {
            if (e && t) {
                var n = e[Cp(t)];
                return null != n && null != i && (n = n[bp(i)]), n
            }
        }

        function Dp(e, t) {
            var i = Sp(e, t), n = Ip(i), o = {};
            A(i, function (e) {
                var t = e.getData(), i = e.coordinateSystem, r = i.getBaseAxis(), a = bp(e), s = n[Cp(r)][a],
                    l = s.offset, d = s.width, u = i.getOtherAxis(r), c = e.get("barMinHeight") || 0;
                o[a] = o[a] || [], t.setLayout({bandWidth: s.bandWidth, offset: l, size: d});
                for (var h = t.mapDimension(u.dim), f = t.mapDimension(r.dim), p = op(t, h), g = u.isHorizontal(), m = Pp(0, u), v = 0, y = t.count(); v < y; v++) {
                    var w, k, T, b, C, S = t.get(h, v), I = t.get(f, v), _ = 0 <= S ? "p" : "n", A = m;
                    p && (o[a][I] || (o[a][I] = {
                        p: m,
                        n: m
                    }), A = o[a][I][_]), g ? (w = A, k = (C = i.dataToPoint([S, I]))[1] + l, T = C[0] - m, b = d, Math.abs(T) < c && (T = (T < 0 ? -1 : 1) * c), isNaN(T) || p && (o[a][I][_] += T)) : (w = (C = i.dataToPoint([I, S]))[0] + l, k = A, T = d, b = C[1] - m, Math.abs(b) < c && (b = (b <= 0 ? -1 : 1) * c), isNaN(b) || p && (o[a][I][_] += b)), t.setItemLayout(v, {
                        x: w,
                        y: k,
                        width: T,
                        height: b
                    })
                }
            }, this)
        }

        var xp = {
            seriesType: "bar", plan: uc(), reset: function (e) {
                if (Np(e) && Ep(e)) {
                    var t = e.getData(), i = e.coordinateSystem, n = i.grid.getRect(), o = i.getBaseAxis(),
                        r = i.getOtherAxis(o), a = t.mapDimension(r.dim), s = t.mapDimension(o.dim),
                        l = r.isHorizontal(), d = l ? 0 : 1, u = Ap(Ip([e]), o, e).width;
                    return .5 < u || (u = .5), {
                        progress: function (e, t) {
                            for (var o, c = e.count, h = new Tp(2 * c), f = new Tp(2 * c), p = new Tp(c), g = [], m = [], v = 0, y = 0; null != (o = e.next());) m[d] = t.get(a, 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: Pp(0, r),
                                backgroundStart: l ? n.x : n.y,
                                valueAxisHorizontal: l
                            })
                        }
                    }
                }
            }
        };

        function Np(e) {
            return e.coordinateSystem && "cartesian2d" === e.coordinateSystem.type
        }

        function Ep(e) {
            return e.pipelineContext && e.pipelineContext.large
        }

        function Pp(e, t) {
            return t.toGlobalCoord(t.dataToCoord("log" === t.type ? 1 : 0))
        }

        var Op = wp.prototype, Mp = Math.ceil, Fp = Math.floor, Lp = 864e5, Rp = wp.extend({
            type: "time", getLabel: function (e) {
                var t = this._stepLvl, i = new Date(e);
                return ad(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], r = o / e;
                null != t && r < t && (r = t), null != i && i < r && (r = i);
                var a = 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, r, 0, a), l = Bp[Math.min(s, a - 1)], d = l[1];
                "year" === l[0] && (d *= Gl(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)
            }
        });
        A(["contain", "normalize"], function (e) {
            Rp.prototype[e] = function (t) {
                return Op[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 = wp.prototype, Kp = Ml, Wp = El, jp = Math.floor, Gp = Math.ceil, Hp = Math.pow,
            zp = Math.log, Xp = sp.extend({
                type: "log", base: 10, $constructor: function () {
                    sp.apply(this, arguments), this._originalScale = new wp
                }, getTicks: function (e) {
                    var t = this._originalScale, i = this._extent, n = t.getExtent();
                    return D(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 = Wl(i);
                        for (e / i * n <= .5 && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && 0 < Math.abs(n);) n *= 10;
                        var o = [El(Gp(t[0] / n) * n), El(jp(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 Wp(e, Kp(t))
        }

        function Yp(e, t) {
            var i, n, o, r = e.type, a = t.getMin(), s = t.getMax(), l = e.getExtent();
            "ordinal" === r ? i = t.getCategories().length : (M(n = t.get("boundaryGap")) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = Nl(n[0], 1), n[1] = Nl(n[1], 1), o = l[1] - l[0] || Math.abs(l[0])), "dataMin" === a ? a = l[0] : "function" == typeof a && (a = a({
                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 != a, u = null != s;
            null == a && (a = "ordinal" === r ? i ? 0 : NaN : l[0] - n[0] * o), null == s && (s = "ordinal" === r ? i ? i - 1 : NaN : l[1] + n[1] * o), null != a && isFinite(a) || (a = NaN), null != s && isFinite(s) || (s = NaN), e.setBlank(K(a) || K(s) || "ordinal" === r && !e.getOrdinalMeta().categories.length), t.getNeedCrossZero() && (0 < a && 0 < s && !d && (a = 0), a < 0 && s < 0 && !u && (s = 0));
            var c = t.ecModel;
            if (c && "time" === r) {
                var h, f = Sp("bar", c);
                if (A(f, function (e) {
                    h |= e.getBaseAxis() === t.axis
                }), h) {
                    var p = Ip(f), g = function (e, t, i, n) {
                        var o = i.axis.getExtent(), r = o[1] - o[0], a = Ap(n, i.axis);
                        if (void 0 === a) return {min: e, max: t};
                        var s = 1 / 0;
                        A(a, function (e) {
                            s = Math.min(e.offset, s)
                        });
                        var l = -1 / 0;
                        A(a, 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) / r) - u;
                        return {min: e -= s / d * c, max: t += l / d * c}
                    }(a, s, t, p);
                    a = g.min, s = g.max
                }
            }
            return {extent: [a, 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 r = e.type;
            e.setExtent(n[0], n[1]), e.niceExtent({
                splitNumber: o,
                fixMin: i.fixMin,
                fixMax: i.fixMax,
                minInterval: "interval" === r || "time" === r ? t.get("minInterval") : null,
                maxInterval: "interval" === r || "time" === r ? t.get("maxInterval") : null
            });
            var a = t.get("interval");
            null != a && e.setInterval && e.setInterval(a)
        }

        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 wp;
                default:
                    return (sp.getClass(t) || wp).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())
        }

        A(["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 = Cs({
            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, r = t.height / 2;
                e.moveTo(i, n - r), e.lineTo(i + o, n + r), e.lineTo(i - o, n + r), e.closePath()
            }
        }), og = Cs({
            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, r = t.height / 2;
                e.moveTo(i, n - r), e.lineTo(i + o, n), e.lineTo(i, n + r), e.lineTo(i - o, n), e.closePath()
            }
        }), rg = Cs({
            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, r = Math.max(o, t.height), a = o / 2, s = a * a / (r - a),
                    l = n - r + a + s, d = Math.asin(s / a), u = Math.cos(d) * a, c = Math.sin(d), h = Math.cos(d),
                    f = .6 * a, p = .7 * a;
                e.moveTo(i - u, l + s), e.arc(i, l, a, 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()
            }
        }), ag = Cs({
            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, r = t.y, a = n / 3 * 2;
                e.moveTo(o, r), e.lineTo(o + a, r + i), e.lineTo(o, r + i / 4 * 3), e.lineTo(o - a, r + i), e.lineTo(o, r), 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 r = Math.min(i, n);
                o.x = e, o.y = t, o.width = r, o.height = r
            }, 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 = {};
        A({
            line: is,
            rect: es,
            roundRect: es,
            square: es,
            circle: Ka,
            diamond: og,
            pin: rg,
            arrow: ag,
            triangle: ng
        }, function (e, t) {
            lg[t] = new e
        });
        var dg = Cs({
            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, r, a) {
            var s, l = 0 === e.indexOf("empty");
            return l && (e = e.substr(5, 1).toLowerCase() + e.substr(6)), (s = 0 === e.indexOf("image://") ? As(e.slice(8), new Ai(t, i, n, o), a ? "center" : "cover") : 0 === e.indexOf("path://") ? _s(e.slice(7), {}, new Ai(t, i, n, o), a ? "center" : "cover") : new dg({
                shape: {
                    symbolType: e,
                    x: t,
                    y: i,
                    width: n,
                    height: o
                }
            })).__isEmptyBrush = l, s.setColor = ug, s.setColor(r), s
        }

        var hg = {isDimensionStacked: op, enableDataStack: np, getStackedDimension: rp},
            fg = (Object.freeze || Object)({
                createList: function (e) {
                    return ap(e.getSource(), e)
                }, getLayoutRect: md, dataStack: hg, createScale: function (e, t) {
                    var i = t;
                    Cl.isInstance(t) || I(i = new Cl(t), ig);
                    var n = Zp(i);
                    return n.setExtent(e[0], e[1]), Jp(n, i), n
                }, mixinAxisModelCommonMethods: function (e) {
                    I(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 r = 1; r < e.length; r++) {
                var a = e[r];
                n += la(o[0], o[1], a[0], a[1], t, i), o = a
            }
            var s = e[0];
            return gg(o[0], s[0]) && gg(o[1], s[1]) || (n += la(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], r = t[1], a = 0; a < e.length; a += 2) {
                var s = e.charCodeAt(a) - 64, l = e.charCodeAt(a + 1) - 64;
                s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), o = s += o, r = l += r, n.push([s / i, l / i])
            }
            return n
        }

        function wg(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, r = o.coordinates, a = o.encodeOffsets, s = 0; s < r.length; s++) {
                        var l = r[s];
                        if ("Polygon" === o.type) r[s] = yg(l, a[s], t); else if ("MultiPolygon" === o.type) for (var d = 0; d < l.length; d++) {
                            var u = l[d];
                            l[d] = yg(u, a[s][d], t)
                        }
                    }
                    e.UTF8Encoding = !1
                }
            }(e), D(N(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, r = [];
                "Polygon" === n.type && r.push({
                    type: "polygon",
                    exterior: o[0],
                    interiors: o.slice(1)
                }), "MultiPolygon" === n.type && A(o, function (e) {
                    e[0] && r.push({type: "polygon", exterior: e[0], interiors: e.slice(1)})
                });
                var a = new vg(i[t || "name"], r, i.cp);
                return a.properties = i, a
            })
        }

        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 = [], r = [], a = this.geometries, s = 0; s < a.length; s++) "polygon" === a[s].type && (Lr(a[s].exterior, o, r), Ce(i, i, o), Se(n, n, r));
                return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0), this._rect = new Ai(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 r = i[n].exterior, a = i[n].interiors;
                    if (mg(r, e[0], e[1])) {
                        for (var s = 0; s < (a ? a.length : 0); s++) if (mg(a[s])) continue e;
                        return !0
                    }
                }
                return !1
            }, transformTo: function (e, t, i, n) {
                var o = this.getBoundingRect(), r = o.width / o.height;
                i ? n = n || i / r : i = r * n;
                for (var a = new Ai(e, t, i, n), s = o.calculateTransform(a), 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++) be(u[h], u[h], s);
                    for (var f = 0; f < (c ? c.length : 0); f++) for (h = 0; h < c[f].length; h++) be(c[f][h], c[f][h], s)
                }
                (o = this._rect).copy(a), 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 kg = Wo();

        function Tg(e, t) {
            var i, n = bg(e, "labels"), o = eg(t), r = Cg(n, o);
            return r || Sg(n, o, {
                labels: F(o) ? _g(e, o) : Ig(e, i = "auto" === o ? function (e) {
                    var t = kg(e).autoInterval;
                    return null != t ? t : kg(e).autoInterval = e.calculateCategoryInterval()
                }(e) : o), labelCategoryInterval: i
            })
        }

        function bg(e, t) {
            return kg(e)[t] || (kg(e)[t] = [])
        }

        function Cg(e, t) {
            for (var i = 0; i < e.length; i++) if (e[i].key === t) return e[i].value
        }

        function Sg(e, t, i) {
            return e.push({key: t, value: i}), i
        }

        function Ig(e, t, i) {
            var n = Qp(e), o = e.scale, r = o.getExtent(), a = e.getLabelModel(), s = [], l = Math.max((t || 0) + 1, 1),
                d = r[0], u = o.count();
            0 !== d && 1 < l && 2 < u / l && (d = Math.round(Math.ceil(d / l) * l));
            var c = tg(e), h = a.get("showMinLabel") || c, f = a.get("showMaxLabel") || c;
            h && d !== r[0] && g(r[0]);
            for (var p = d; p <= r[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 !== r[1] && g(r[1]), s
        }

        function _g(e, t, i) {
            var n = e.scale, o = Qp(e), r = [];
            return A(n.getTicks(), function (e) {
                var a = n.getLabel(e);
                t(e, a) && r.push(i ? e : {formattedLabel: o(e), rawLabel: a, tickValue: e})
            }), r
        }

        var Ag = [0, 1], Dg = function (e, t, i) {
            this.dim = e, this.scale = t, this._extent = i || [0, 0], this.inverse = !1, this.onBand = !1
        };

        function xg(e, t) {
            var i = (e[1] - e[0]) / t / 2;
            e[0] += i, e[1] -= i
        }

        Dg.prototype = {
            constructor: Dg, 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 && xg(i = i.slice(), n.count()), xl(e, Ag, i, t)
            }, coordToData: function (e, t) {
                var i = this._extent, n = this.scale;
                this.onBand && "ordinal" === n.type && xg(i = i.slice(), n.count());
                var o = xl(e, i, Ag, t);
                return this.scale.scale(o)
            }, pointToData: function (e, t) {
            }, getTicksCoords: function (e) {
                var t = (e = e || {}).tickModel || this.getTickModel(), i = D(function (e, t) {
                    return "category" === e.type ? function (e, t) {
                        var i, n, o = bg(e, "ticks"), r = eg(t), a = Cg(o, r);
                        if (a) return a;
                        if (t.get("show") && !e.scale.isBlank() || (i = []), F(r)) i = _g(e, r, !0); else if ("auto" === r) {
                            var s = Tg(e, e.getLabelModel());
                            n = s.labelCategoryInterval, i = D(s.labels, function (e) {
                                return e.tickValue
                            })
                        } else i = Ig(e, n = r, !0);
                        return Sg(o, r, {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 r, a, s = e.getExtent();
                        if (1 === o) t[0].coord = s[0], r = t[1] = {coord: s[0]}; else {
                            var l = t[o - 1].tickValue - t[0].tickValue, d = (t[o - 1].coord - t[0].coord) / l;
                            A(t, function (e) {
                                e.coord -= d / 2
                            });
                            var u = e.scale.getExtent();
                            a = 1 + u[1] - t[o - 1].tickValue, r = {coord: t[o - 1].coord + d * a}, t.push(r)
                        }
                        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], r.coord) && (n ? r.coord = s[1] : t.pop()), n && h(r.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), D(this.scale.getMinorTicks(e), function (e) {
                    return D(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 = Tg(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: D(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, r = o.getExtent(),
                        a = o.count();
                    if (r[1] - r[0] < 1) return 0;
                    var s = 1;
                    40 < a && (s = Math.max(1, Math.floor(a / 40)));
                    for (var l = r[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 <= r[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 w = Math.max(0, Math.floor(Math.min(v, y))), k = kg(e.model), T = e.getExtent(),
                        b = k.lastAutoInterval, C = k.lastTickCount;
                    return null != b && null != C && Math.abs(b - w) <= 1 && Math.abs(C - a) <= 1 && w < b && k.axisExtend0 === T[0] && k.axisExtend1 === T[1] ? w = b : (k.lastTickCount = a, k.lastAutoInterval = w, k.axisExtend0 = T[0], k.axisExtend1 = T[1]), w
                }(this)
            }
        };
        var Ng = wg, Eg = {};
        A(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString", "isObject", "isFunction", "extend", "defaults", "clone", "merge"], function (e) {
            Eg[e] = ie[e]
        });
        var Pg = {};

        function Og(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 = [], r = 0; r < i.length; r++) {
                    var a = Lu(e, t, i[r]);
                    o.push(a)
                }
                return o.join(" ")
            }
        }

        function Mg(e, t, i) {
            Di.call(this), this.updateData(e, t, i)
        }

        A(["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) {
            Pg[e] = ml[e]
        }), ec.extend({
            type: "series.line",
            dependencies: ["grid", "polar"],
            getInitialData: function (e, t) {
                return ap(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 r = cg(e, -1, -1, 2, 2, t.getItemVisual(i, "color"), o);
            r.attr({z2: 100, culling: !0, scale: Rg(n)}), r.drift = Bg, this._symbolType = e, this.add(r)
        }, 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, r = Lg(e, t), a = n !== this._symbolType;
            if (a) {
                var s = e.getItemVisual(t, "symbolKeepAspect");
                this._createSymbol(n, e, t, r, s)
            } else (l = this.childAt(0)).silent = !1, rl(l, {scale: Rg(r)}, o, t);
            if (this._updateCommon(e, t, r, i), a) {
                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), al(l, u, o, t)
            }
            this._seriesModel = o
        };
        var Ug = ["itemStyle"], Vg = ["emphasis", "itemStyle"], Kg = ["label"], Wg = ["emphasis", "label"];

        function jg(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 Gg(e) {
            this.group = new Di, this._symbolCtor = e || Mg
        }

        Fg._updateCommon = function (e, t, i, n) {
            var o = this.childAt(0), r = e.hostModel, a = 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(Wg), h = p.getShallow("hoverAnimation"), f = p.getShallow("cursor")
            } else l = w({}, l);
            var g = o.style, m = e.getItemVisual(t, "symbolRotate");
            o.attr("rotation", (m || 0) * Math.PI / 180 || 0), d && o.attr("position", [Nl(d[0], i[0]), Nl(d[1], i[1])]), f && o.attr("cursor", f), o.setColor(a, n && n.symbolInnerColor), o.setStyle(s);
            var v = e.getItemVisual(t, "opacity");
            null != v && (g.opacity = v);
            var y = e.getItemVisual(t, "liftZ"), k = o.__z2Origin;
            null != y ? null == k && (o.__z2Origin = o.z2, o.z2 += y) : null != k && (o.z2 = k, o.__z2Origin = null);
            var T = n && n.useNameLabel;
            Ys(g, l, u, c, {
                labelFetcher: r, labelDataIndex: t, defaultText: function (t, i) {
                    return T ? e.getName(t) : Og(e, t)
                }, isRectText: !0, autoColor: a
            }), o.__symbolOriginalScale = Rg(i), o.hoverStyle = l, o.highDownOnUpdate = h && r.isAnimationEnabled() ? jg : 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), rl(i, {
                style: {opacity: 0},
                scale: [0, 0]
            }, this._seriesModel, this.dataIndex, e)
        }, S(Mg, Di);
        var Hg = Gg.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(), r = e.getOtherAxis(o), a = 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
                }(r, i), s = o.dim, l = r.dim, d = t.mapDimension(l), u = t.mapDimension(s),
                c = "x" === l || "radius" === l ? 1 : 0, h = D(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: a,
                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 r = e.baseDataOffset, a = [];
            return a[r] = i.get(e.baseDim, n), a[1 - r] = o, t.dataToPoint(a)
        }

        Hg.updateData = function (e, t) {
            t = Xg(t);
            var i = this.group, n = e.hostModel, o = this._data, r = this._symbolCtor, a = 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 r(e, n, a);
                    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, a), rl(d, {position: u}, n)) : (d = new r(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 r = t.getItemLayout(o);
                if (zg(t, r, o, i)) {
                    var a = new this._symbolCtor(t, o, this._seriesScope);
                    a.traverse(n), a.attr("position", r), this.group.add(a), t.setItemGraphicEl(o, a)
                }
            }
        }, 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 = Ce, Qg = Se, $g = de, em = re, tm = [], im = [], nm = [];

        function om(e) {
            return isNaN(e[0]) || isNaN(e[1])
        }

        function rm(e, t, i, n, o, r, a, s, l, d) {
            return "none" !== d && d ? function (e, t, i, n, o, r, a, 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 += r;
                            continue
                        }
                        break
                    }
                    if (h === i) e[0 < r ? "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 += r
                }
                return f
            }.apply(this, arguments) : function (e, t, i, n, o, r, a, 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 += r;
                            continue
                        }
                        break
                    }
                    if (h === i) e[0 < r ? "moveTo" : "lineTo"](p[0], p[1]), em(im, p); else if (0 < l) {
                        var g = h + r, m = t[g];
                        if (u) for (; m && om(t[g]);) m = t[g += r];
                        var v = .5, y = t[c];
                        if (!(m = t[g]) || om(m)) em(nm, p); else {
                            var w, k;
                            if (om(m) && !u && (m = p), ue(tm, m, y), "x" === d || "y" === d) {
                                var T = "x" === d ? 0 : 1;
                                w = Math.abs(p[T] - y[T]), k = Math.abs(p[T] - m[T])
                            } else w = ye(p, y), k = ye(p, m);
                            $g(nm, p, tm, -l * (1 - (v = k / (k + w))))
                        }
                        Zg(im, im, s), Qg(im, im, a), Zg(nm, nm, s), Qg(nm, nm, a), 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 += r
                }
                return f
            }.apply(this, arguments)
        }

        function am(e, t) {
            var i = [1 / 0, 1 / 0], n = [-1 / 0, -1 / 0];
            if (t) for (var o = 0; o < e.length; o++) {
                var r = e[o];
                r[0] < i[0] && (i[0] = r[0]), r[1] < i[1] && (i[1] = r[1]), r[0] > n[0] && (n[0] = r[0]), r[1] > n[1] && (n[1] = r[1])
            }
            return {min: t ? i : n, max: t ? n : i}
        }

        var sm = Ta.extend({
            type: "ec-polyline",
            shape: {points: [], smooth: 0, smoothConstraint: !0, smoothMonotone: null, connectNulls: !1},
            style: {fill: null, stroke: "#000"},
            brush: Va(Ta.prototype.brush),
            buildPath: function (e, t) {
                var i = t.points, n = 0, o = i.length, r = am(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 += rm(e, i, n, o, o, 1, r.min, r.max, t.smooth, t.smoothMonotone, t.connectNulls) + 1
            }
        }), lm = Ta.extend({
            type: "ec-polygon",
            shape: {
                points: [],
                stackedOnPoints: [],
                smooth: 0,
                stackedOnSmooth: 0,
                smoothConstraint: !0,
                smoothMonotone: null,
                connectNulls: !1
            },
            brush: Va(Ta.prototype.brush),
            buildPath: function (e, t) {
                var i = t.points, n = t.stackedOnPoints, o = 0, r = i.length, a = t.smoothMonotone,
                    s = am(i, t.smoothConstraint), l = am(n, t.smoothConstraint);
                if (t.connectNulls) {
                    for (; 0 < r && om(i[r - 1]); r--) ;
                    for (; o < r && om(i[o]); o++) ;
                }
                for (; o < r;) {
                    var d = rm(e, i, o, r, r, 1, s.min, s.max, t.smooth, a, t.connectNulls);
                    rm(e, n, o + d - 1, d, r, -1, l.min, l.max, t.stackedOnSmooth, a, t.connectNulls), o += d + 1, e.closePath()
                }
            }
        });

        function dm(e, t, i) {
            var n = e.getArea(), o = e.getBaseAxis().isHorizontal(), r = n.x, a = n.y, s = n.width, l = n.height,
                d = i.get("lineStyle.width") || 2;
            r -= d / 2, a -= d / 2, s += d, l += d, r = Math.floor(r), s = Math.round(s);
            var u = new es({shape: {x: r, y: a, width: s, height: l}});
            return t && (u.shape[o ? "width" : "height"] = 0, al(u, {shape: {width: s, height: l}}, i)), u
        }

        function um(e, t, i) {
            var n = e.getArea(), o = new ja({
                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, al(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 = [], r = [];
            return Lr(e, i, n), Lr(t, o, r), Math.max(Math.abs(i[0] - o[0]), Math.abs(i[1] - o[1]), Math.abs(n[0] - r[0]), Math.abs(n[1] - r[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, r = [], a = 0; a < e.length - 1; a++) {
                var s = e[a + 1], l = e[a];
                r.push(l);
                var d = [];
                switch (i) {
                    case"end":
                        d[o] = s[o], d[1 - o] = l[1 - o], r.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], r.push(d), r.push(c);
                        break;
                    default:
                        d[o] = l[o], d[1 - o] = s[1 - o], r.push(d)
                }
            }
            return e[a] && r.push(e[a]), r
        }

        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 r = o.shape, a = Math.max(r.width, r.height);
                n ? (r.y -= a, r.height += 2 * a) : (r.x -= a, r.width += 2 * a)
            }
            return o
        }

        function vm(e, t, i) {
            return {
                seriesType: e, performRawSeries: !0, reset: function (e, n, o) {
                    var r = e.getData(), a = e.get("symbol"), s = e.get("symbolSize"), l = e.get("symbolKeepAspect"),
                        d = e.get("symbolRotate"), u = F(a), c = F(s), h = F(d), f = u || c || h, p = !u && a ? a : t,
                        g = c ? null : s;
                    if (r.setVisual({
                        legendSymbol: i || p,
                        symbol: p,
                        symbolSize: g,
                        symbolKeepAspect: l,
                        symbolRotate: d
                    }), !n.isSeriesFiltered(e)) return {
                        dataEach: r.hasItemOption || f ? function (t, i) {
                            if (f) {
                                var n = e.getRawValue(i), o = e.getDataParams(i);
                                u && t.setItemVisual(i, "symbol", a(n, o)), c && t.setItemVisual(i, "symbolSize", s(n, o)), h && t.setItemVisual(i, "symbolRotate", d(n, o))
                            }
                            if (t.hasItemOption) {
                                var r = t.getItemModel(i), l = r.getShallow("symbol", !0),
                                    p = r.getShallow("symbolSize", !0), g = r.getShallow("symbolRotate", !0),
                                    m = r.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 = D(i.dimensions, function (e) {
                            return t.mapDimension(e)
                        }).slice(0, 2), r = o.length, a = t.getCalculationInfo("stackResultDimension");
                        return op(t, o[0]) && (o[0] = a), op(t, o[1]) && (o[1] = a), r && {
                            progress: function (e, t) {
                                for (var a = e.end - e.start, s = n && new Float32Array(a * r), l = e.start, d = 0, u = [], c = []; l < e.end; l++) {
                                    var h;
                                    if (1 === r) {
                                        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 wm(e, t) {
            return Math.round(e.length / 2)
        }

        fc.extend({
            type: "line", init: function () {
                var e = new Di, t = new Gg;
                this.group.add(t.group), this._symbolDraw = t, this._lineGroup = e
            }, render: function (e, t, i) {
                var n = e.coordinateSystem, o = this.group, r = e.getData(), a = e.getModel("lineStyle"),
                    s = e.getModel("areaStyle"), l = r.mapArray(r.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, r = t.count(); o < r; o++) n.push(Jg(i, e, t, o));
                        return n
                    }(n, r, Yg(n, r, v)), w = e.get("showSymbol"), T = w && !d && function (e, t, i) {
                        var n = e.get("showAllSymbol"), o = "auto" === n;
                        if (!n || o) {
                            var r = i.getAxesByScale("ordinal")[0];
                            if (r && (!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(), r = Math.max(1, Math.round(o / 5)), a = 0; a < o; a += r) if (1.5 * Mg.getSymbolSize(t, a)[e.isHorizontal() ? 1 : 0] > n) return !1;
                                return !0
                            }(r, t))) {
                                var a = t.mapDimension(r.dim), s = {};
                                return A(r.getViewLabels(), function (e) {
                                    s[e.tickValue] = 1
                                }), function (e) {
                                    return !s.hasOwnProperty(t.get(a, e))
                                }
                            }
                        }
                    }(e, r, n), b = this._data;
                b && b.eachItemGraphicEl(function (e, t) {
                    e.__temp && (o.remove(e), b.setItemGraphicEl(t, null))
                }), w || c.remove(), o.add(p);
                var C, S = !d && e.get("step");
                n && n.getArea && e.get("clip", !0) && (null != (C = n.getArea()).width ? (C.x -= .1, C.y -= .1, C.width += .2, C.height += .2) : C.r0 && (C.r0 -= .5, C.r1 += .5)), this._clipShapeForSymbol = C, h && u.type === n.type && S === 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)), w && c.updateData(r, {
                    isIgnore: T,
                    clipShape: C
                }), r.eachItemGraphicEl(function (e) {
                    e.stopAnimation(!0)
                }), hm(this._stackedOnPoints, y) && hm(this._points, l) || (g ? this._updateAnimation(r, y, n, i, S, v) : (S && (l = gm(l, n, S), y = gm(y, n, S)), h.setShape({points: l}), f && f.setShape({
                    points: l,
                    stackedOnPoints: y
                })))) : (w && c.updateData(r, {
                    isIgnore: T,
                    clipShape: C
                }), S && (l = gm(l, n, S), y = gm(y, n, S)), h = this._newPolyline(l, n, g), m && (f = this._newPolygon(l, y, n, g)), p.setClipPath(mm(n, !0, e)));
                var I = function (e, t) {
                    var i = e.getVisual("visualMeta");
                    if (i && i.length && e.count() && "cartesian2d" === t.type) {
                        for (var n, o, r = i.length - 1; 0 <= r; r--) {
                            var a = i[r].dimension, s = e.dimensions[a], l = e.getDimensionInfo(s);
                            if ("x" === (n = l && l.coordDim) || "y" === n) {
                                o = i[r];
                                break
                            }
                        }
                        if (o) {
                            var d = t.getAxis(n), u = D(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";
                            A(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
                        }
                    }
                }(r, n) || r.getVisual("color");
                h.useStyle(k(a.getLineStyle(), {fill: "none", stroke: I, lineJoin: "bevel"}));
                var _ = e.get("smooth");
                if (_ = pm(e.get("smooth")), h.setShape({
                    smooth: _,
                    smoothMonotone: e.get("smoothMonotone"),
                    connectNulls: e.get("connectNulls")
                }), f) {
                    var x = r.getCalculationInfo("stackedOnSeries"), N = 0;
                    f.useStyle(k(s.getAreaStyle(), {
                        fill: I,
                        opacity: .7,
                        lineJoin: "bevel"
                    })), x && (N = pm(x.get("smooth"))), f.setShape({
                        smooth: _,
                        stackedOnSmooth: N,
                        smoothMonotone: e.get("smoothMonotone"),
                        connectNulls: e.get("connectNulls")
                    })
                }
                this._data = r, this._coordSys = n, this._stackedOnPoints = y, this._points = l, this._step = S, this._valueOrigin = v
            }, dispose: function () {
            }, highlight: function (e, t, i, n) {
                var o = e.getData(), r = Ko(o, n);
                if (!(r instanceof Array) && null != r && 0 <= r) {
                    var a = o.getItemGraphicEl(r);
                    if (!a) {
                        var s = o.getItemLayout(r);
                        if (!s) return;
                        if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(s[0], s[1])) return;
                        (a = new Mg(o, r)).position = s, a.setZ(e.get("zlevel"), e.get("z")), a.ignore = isNaN(s[0]) || isNaN(s[1]), a.__temp = !0, o.setItemGraphicEl(r, a), a.stopSymbolAnimation(!0), this.group.add(a)
                    }
                    a.highlight()
                } else fc.prototype.highlight.call(this, e, t, i, n)
            }, downplay: function (e, t, i, n) {
                var o = e.getData(), r = Ko(o, n);
                if (null != r && 0 <= r) {
                    var a = o.getItemGraphicEl(r);
                    a && (a.__temp ? (o.setItemGraphicEl(r, null), this.group.remove(a)) : a.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, r) {
                var a = this._polyline, s = this._polygon, l = e.hostModel, d = function (e, t, i, n, o, r, a, 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, a), v = Yg(r, e, s), y = 0; y < l.length; y++) {
                            var w = l[y], k = !0;
                            switch (w.cmd) {
                                case"=":
                                    var T = e.getItemLayout(w.idx), b = t.getItemLayout(w.idx1);
                                    (isNaN(T[0]) || isNaN(T[1])) && (T = b.slice()), d.push(T), u.push(b), c.push(i[w.idx]), h.push(n[w.idx1]), g.push(t.getRawIndex(w.idx1));
                                    break;
                                case"+":
                                    var C = w.idx;
                                    d.push(o.dataToPoint([t.get(m.dataDimsForPoint[0], C), t.get(m.dataDimsForPoint[1], C)])), u.push(t.getItemLayout(C).slice()), c.push(Jg(m, o, t, C)), h.push(n[C]), g.push(t.getRawIndex(C));
                                    break;
                                case"-":
                                    C = w.idx;
                                    var S = e.getRawIndex(C);
                                    S !== C ? (d.push(e.getItemLayout(C)), u.push(r.dataToPoint([e.get(v.dataDimsForPoint[0], C), e.get(v.dataDimsForPoint[1], C)])), c.push(i[C]), h.push(Jg(v, r, e, C)), g.push(S)) : k = !1
                            }
                            k && (f.push(w), p.push(p.length))
                        }
                        p.sort(function (e, t) {
                            return g[e] - g[t]
                        });
                        var I = [], _ = [], A = [], D = [], x = [];
                        for (y = 0; y < p.length; y++) C = p[y], I[y] = d[C], _[y] = u[C], A[y] = c[C], D[y] = h[C], x[y] = f[C];
                        return {current: I, next: _, stackedOnCurrent: A, stackedOnNext: D, status: x}
                    }(this._data, e, this._stackedOnPoints, t, this._coordSys, i, this._valueOrigin, r), 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 a.setShape({points: h}), void (s && s.setShape({
                    points: h,
                    stackedOnPoints: f
                }));
                a.shape.__points = d.current, a.shape.points = u, rl(a, {shape: {points: h}}, l), s && (s.setShape({
                    points: u,
                    stackedOnPoints: c
                }), rl(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})
                }
                a.animators && a.animators.length && a.animators[0].during(function () {
                    for (var e = 0; e < p.length; e++) p[e].el.attr("position", a.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 km = {
            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 Tm(e) {
            return this._axes[e]
        }

        function bm(e) {
            this._axes = {}, this._dimList = [], this.name = e || ""
        }

        function Cm(e) {
            bm.call(this, e)
        }

        function Sm(e, t, i, n, o) {
            Dg.call(this, e, t, i), this.type = n || "value", this.position = o || "bottom"
        }

        bm.prototype = {
            constructor: bm, type: "cartesian", getAxis: function (e) {
                return this._axes[e]
            }, getAxes: function () {
                return D(this._dimList, Tm, this)
            }, getAxesByScale: function (e) {
                return e = e.toLowerCase(), N(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 r = i[o], a = this._axes[r];
                    n[r] = a[t](e[r])
                }
                return n
            }
        }, Cm.prototype = {
            constructor: Cm, 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(), r = n.getExtent(),
                    a = i.parse(e[0]), s = n.parse(e[1]);
                return (t = t || [])[0] = Math.min(Math.max(Math.min(o[0], o[1]), a), Math.max(o[0], o[1])), t[1] = Math.min(Math.max(Math.min(r[0], r[1]), s), Math.max(r[0], r[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 Ai(i, n, Math.max(e[0], e[1]) - i, Math.max(t[0], t[1]) - n)
            }
        }, S(Cm, bm), Sm.prototype = {
            constructor: Sm,
            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
        }, S(Sm, Dg);
        var Im = {
            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 Am(e, t, i, n) {
            A(Dm, function (o) {
                t.extend({
                    type: e + "Axis." + o, mergeDefaultAndTheme: function (t, n) {
                        var r = this.layoutMode, a = r ? wd(t) : {};
                        v(t, n.getTheme().get(o + "Axis")), v(t, this.getDefaultOption()), t.type = i(e, t), r && yd(t, a, r)
                    }, 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)
                })
            }), Id.registerSubTypeDefaulter(e + "Axis", O(i, e))
        }

        _m.categoryAxis = v({
            boundaryGap: !0,
            deduplication: null,
            splitLine: {show: !1},
            axisTick: {alignWithLabel: !1, interval: "auto"},
            axisLabel: {interval: "auto"}
        }, Im), _m.valueAxis = v({
            boundaryGap: [0, 0],
            splitNumber: 5,
            minorTick: {show: !1, splitNumber: 5, length: 3, lineStyle: {}},
            minorSplitLine: {show: !1, lineStyle: {color: "#eee", width: 1}}
        }, Im), _m.timeAxis = k({scale: !0, min: "dataMin", max: "dataMax"}, _m.valueAxis), _m.logAxis = k({
            scale: !0,
            logBase: 10
        }, _m.valueAxis);
        var Dm = ["value", "category", "time", "log"], xm = Id.extend({
            type: "cartesian2dAxis", axis: null, init: function () {
                xm.superApply(this, "init", arguments), this.resetRange()
            }, mergeOption: function () {
                xm.superApply(this, "mergeOption", arguments), this.resetRange()
            }, restoreData: function () {
                xm.superApply(this, "restoreData", arguments), this.resetRange()
            }, getCoordSysModel: function () {
                return this.ecModel.queryComponents({
                    mainType: "grid",
                    index: this.option.gridIndex,
                    id: this.option.gridId
                })[0]
            }
        });

        function Nm(e, t) {
            return t.type || (t.data ? "category" : "value")
        }

        v(xm.prototype, ig);
        var Em = {offset: 0};

        function Pm(e, t) {
            return e.getCoordSysModel() === t
        }

        function Om(e, t, i) {
            this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(e, t, i), this.model = e
        }

        Am("x", xm, Nm, Em), Am("y", xm, Nm, Em), Id.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 = Om.prototype;

        function Fm(e, t, i, n) {
            i.getAxesOnZeroOf = function () {
                return o ? [o] : []
            };
            var o, r = e[t], a = i.model, s = a.get("axisLine.onZero"), l = a.get("axisLine.onZeroAxisIndex");
            if (s) {
                if (null != l) Lm(r[l]) && (o = r[l]); else for (var d in r) if (r.hasOwnProperty(d) && Lm(r[d]) && !n[u(r[d])]) {
                    o = r[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), A(i.x, function (e) {
                Jp(e.scale, e.model)
            }), A(i.y, function (e) {
                Jp(e.scale, e.model)
            });
            var n = {};
            A(i.x, function (e) {
                Fm(i, "y", e, n)
            }), A(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 r() {
                A(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)
                })
            }

            r(), !i && e.get("containLabel") && (A(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, r = "category" === e.type, a = i.getExtent();
                            o = r ? 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 w = 0; w < o; w += y) {
                                var k = v(n ? n[w] : a[0] + w), T = m.getTextRect(k),
                                    b = (l = T, 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 Ai(c.x, c.y, p, g));
                                s ? s.union(b) : s = b
                            }
                            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)
                    }
                }
            }), r())
        }, 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, r = t.xAxisModel || o && o.getReferringComponents("xAxis")[0],
                a = t.yAxisModel || o && o.getReferringComponents("yAxis")[0], s = t.gridModel, l = this._coordsList;
            return o ? C(l, i = o.coordinateSystem) < 0 && (i = null) : r && a ? i = this.getCartesian(r.componentIndex, a.componentIndex) : r ? n = this.getAxis("x", r.componentIndex) : a ? n = this.getAxis("y", a.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: {}}, r = {x: 0, y: 0};
            if (t.eachComponent("xAxis", a("x"), this), t.eachComponent("yAxis", a("y"), this), !r.x || !r.y) return this._axesMap = {}, void (this._axesList = []);

            function a(t) {
                return function (i, a) {
                    if (Pm(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 Sm(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 = a, this._axesList.push(l), o[t][a] = l, r[t]++
                    }
                }
            }

            A((this._axesMap = o).x, function (t, i) {
                A(o.y, function (n, o) {
                    var r = "x" + i + "y" + o, a = new Cm(r);
                    a.grid = this, a.model = e, this._coordsMap[r] = a, this._coordsList.push(a), a.addAxis(t), a.addAxis(n)
                }, this)
            }, this)
        }, Mm._updateScale = function (e, t) {
            function i(e, t) {
                A(e.mapDimension(t.dim, !0), function (i) {
                    t.scale.unionExtentFromData(e, rp(e, i))
                })
            }

            A(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], r = n[1];
                    if (!Pm(o, t) || !Pm(r, t)) return;
                    var a = this.getCartesian(o.componentIndex, r.componentIndex), s = e.getData(), l = a.getAxis("x"),
                        d = a.getAxis("y");
                    "list" === s.type && (i(s, l), i(s, d))
                }
            }, this)
        }, Mm.getTooltipAxes = function (e) {
            var t = [], i = [];
            return A(this.getCartesians(), function (n) {
                var o = null != e && "auto" !== e ? n.getAxis(e) : n.getBaseAxis(), r = n.getOtherAxis(o);
                C(t, o) < 0 && t.push(o), C(i, r) < 0 && i.push(r)
            }), {baseAxes: t, otherAxes: i}
        };
        var Rm = ["xAxis", "yAxis"];

        function Bm(e) {
            return D(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, k(t, {
                labelOffset: 0,
                nameDirection: 1,
                tickDirection: 1,
                labelDirection: 1,
                silent: !0
            }), this.group = new Di;
            var i = new Di({position: t.position.slice(), rotation: t.rotation});
            i.updateTransform(), this._transform = i.transform, this._dumbGroup = i
        }

        Om.create = function (e, t) {
            var i = [];
            return e.eachComponent("grid", function (n, o) {
                var r = new Om(n, e, t);
                r.name = "grid_" + o, r.resize(n, t, !0), n.coordinateSystem = r, i.push(r)
            }), 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
        }, Om.dimensions = Om.prototype.dimensions = Cm.prototype.dimensions, iu.register("cartesian2d", Om);
        var Km = Math.PI;
        Vm.prototype = {
            constructor: Vm, hasBuilder: function (e) {
                return !!Wm[e]
            }, add: function (e) {
                Wm[e].call(this)
            }, getGroup: function () {
                return this.group
            }
        };
        var Wm = {
            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], r = [i[1], 0];
                    n && (be(o, o, n), be(r, r, n));
                    var a = w({lineCap: "round"}, t.getModel("axisLine.lineStyle").getLineStyle());
                    this.group.add(new is({
                        anid: "line",
                        subPixelOptimize: !0,
                        shape: {x1: o[0], y1: o[1], x2: r[0], y2: r[1]},
                        style: a,
                        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];
                        A([{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] - r[0]) * (o[0] - r[0]) + (o[1] - r[1]) * (o[1] - r[1]))
                        }], function (t, i) {
                            if ("none" !== s[i] && null != s[i]) {
                                var n = cg(s[i], -u / 2, -c / 2, u, c, a.stroke, !0), r = t.r + t.offset,
                                    l = [o[0] + r * Math.cos(e.rotation), o[1] - r * 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 r = o.getModel("lineStyle"), a = i.tickDirection * o.get("length"), s = Ym(n.getTicksCoords(), e._transform, a, k(r.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 r = (t = t || [])[0], a = 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(r), zm(d)) : Xm(r, a) && (n ? (zm(a), zm(u)) : (zm(r), 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 (W(i.axisLabelShow, t.get("axisLabel.show")) && !n.scale.isBlank()) {
                        var o = t.getModel("axisLabel"), r = o.get("margin"), a = n.getViewLabels(),
                            s = (W(i.labelRotate, o.get("rotate")) || 0) * Km / 180,
                            l = Gm(i.rotation, s, i.labelDirection), d = t.getCategories && t.getCategories(!0), u = [],
                            c = Hm(t), h = t.get("triggerEvent");
                        return A(a, function (a, s) {
                            var f = a.tickValue, p = a.formattedLabel, g = a.rawLabel, m = o;
                            d && d[f] && d[f].textStyle && (m = new Cl(d[f].textStyle, o, t.ecModel));
                            var v = m.getTextColor() || t.get("axisLine.lineStyle.color"),
                                y = [n.dataToCoord(f), i.labelOffset + i.labelDirection * r],
                                w = new Ua({anid: "label_" + f, position: y, rotation: l.rotation, silent: c, z2: 10});
                            Zs(w.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 && (w.eventData = jm(t), w.eventData.targetType = "axisLabel", w.eventData.value = g), e._dumbGroup.add(w), w.updateTransform(), u.push(w), e.group.add(w), w.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 r = n.getMinorTicksCoords();
                        if (r.length) for (var a = o.getModel("lineStyle"), s = i.tickDirection * o.get("length"), l = k(a.getLineStyle(), k(t.getModel("axisTick").getLineStyle(), {stroke: t.get("axisLine.lineStyle.color")})), d = 0; d < r.length; d++) for (var u = Ym(r[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 = W(e.axisName, t.get("name"));
                if (i) {
                    var n, o, r = t.get("nameLocation"), a = 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" === r ? d[0] - u * l : "end" === r ? d[1] + u * l : (d[0] + d[1]) / 2, qm(r) ? e.labelOffset + a * l : 0],
                        h = t.get("nameRotate");
                    null != h && (h = h * Km / 180), qm(r) ? n = Gm(e.rotation, null != h ? h : e.rotation, a) : (n = function (e, t, i, n) {
                        var o, r, a = Bl(i - e.rotation), s = n[0] > n[1],
                            l = "start" === t && !s || "start" !== t && s;
                        return o = Ul(a - Km / 2) ? (r = l ? "bottom" : "top", "center") : Ul(a - 1.5 * Km) ? (r = l ? "top" : "bottom", "center") : (r = "middle", a < 1.5 * Km && Km / 2 < a ? l ? "left" : "right" : l ? "right" : "left"), {
                            rotation: a,
                            textAlign: o,
                            textVerticalAlign: r
                        }
                    }(e, r, 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 = W(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), k = t.mainType, T = {componentType: k, name: i, $vars: ["name"]};
                    T[k + "Index"] = t.componentIndex;
                    var b = new Ua({
                        anid: "name",
                        __fullText: i,
                        __truncatedText: v,
                        position: c,
                        rotation: n.rotation,
                        silent: Hm(t),
                        z2: 1,
                        tooltip: y && y.show ? w({
                            content: i, formatter: function () {
                                return i
                            }, formatterParams: T
                        }, y) : null
                    });
                    Zs(b.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") && (b.eventData = jm(t), b.eventData.targetType = "axisName", b.eventData.name = i), this._dumbGroup.add(b), b.updateTransform(), this.group.add(b), b.decomposeTransform()
                }
            }
        }, jm = Vm.makeAxisEventDataBase = function (e) {
            var t = {componentType: e.mainType, componentIndex: e.componentIndex};
            return t[e.mainType + "Index"] = e.componentIndex, t
        }, Gm = 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 = at([]);
                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 r = [], a = [], s = [], l = 0; l < e.length; l++) {
                var d = e[l].coord;
                a[0] = d, s[a[1] = 0] = d, s[1] = i, t && (be(a, a, t), be(s, s, t));
                var u = new is({
                    anid: o + "_" + e[l].tickValue,
                    subPixelOptimize: !0,
                    shape: {x1: a[0], y1: a[1], x2: s[0], y2: s[1]},
                    style: n,
                    z2: 2,
                    silent: !0
                });
                r.push(u)
            }
            return r
        }

        var Jm = A, Zm = O;

        function Qm(e, t) {
            return "all" === e || M(e) && 0 <= C(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 = kf({
            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, r = i.get("status"),
                            a = i.get("value");
                        null != a && (a = n.parse(a));
                        var s = ev(i);
                        null == r && (o.status = s ? "show" : "hide");
                        var l = n.getExtent().slice();
                        l[0] > l[1] && l.reverse(), (null == a || a > l[1]) && (a = l[1]), a < l[0] && (a = l[0]), o.value = a, 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, r) {
            var a = iv.getAxisPointerClass(e.axisPointerClass);
            if (a) {
                var s = function (e) {
                    var t = $m(e);
                    return t && t.axisPointerModel
                }(t);
                s ? (e._axisPointer || (e._axisPointer = new a)).render(t, s, n, r) : ov(e, n)
            }
        }

        function ov(e, t, i) {
            var n = e._axisPointer;
            n && n.dispose(t, i), e._axisPointer = null
        }

        var rv = [];

        function av(e, t, i) {
            i = i || {};
            var n = e.coordinateSystem, o = t.axis, r = {}, a = o.getAxesOnZeroOf()[0], s = o.position,
                l = a ? "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 (a) {
                var g = a.toGlobalCoord(a.dataToCoord(0));
                p[h.onZero] = Math.max(Math.min(g, p[1]), p[0])
            }
            r.position = ["y" === d ? p[h[l]] : c[0], "x" === d ? p[h[l]] : c[3]], r.rotation = Math.PI / 2 * ("x" === d ? 0 : 1), r.labelDirection = r.tickDirection = r.nameDirection = {
                top: -1,
                bottom: 1,
                left: -1,
                right: 1
            }[s], r.labelOffset = a ? p[h[s]] - p[h.onZero] : 0, t.get("axisTick.inside") && (r.tickDirection = -r.tickDirection), W(i.labelInside, t.get("axisLabel.inside")) && (r.labelDirection = -r.labelDirection);
            var m = t.get("axisLabel.rotate");
            return r.labelRotate = "top" === l ? -m : m, r.z2 = 1, r
        }

        function sv(e, t, i, n) {
            var o = i.axis;
            if (!o.scale.isBlank()) {
                var r = i.getModel("splitArea"), a = r.getModel("areaStyle"), s = a.get("color"),
                    l = n.coordinateSystem.getRect(), d = o.getTicksCoords({tickModel: r, 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 = a.getAreaStyle();
                    for (s = M(s) ? s : [s], p = 1; p < d.length; p++) {
                        var y, w, T, b, C = o.toGlobalCoord(d[p].coord);
                        m = o.isHorizontal() ? (y = m, w = l.y, T = C - y, b = l.height, y + T) : (y = l.x, w = m, T = l.width, w + (b = C - w));
                        var S = d[p - 1].tickValue;
                        null != S && h.set(S, f), t.add(new es({
                            anid: null != S ? "area_" + S : null,
                            shape: {x: y, y: w, width: T, height: b},
                            style: k({fill: s[f]}, v),
                            silent: !0
                        })), f = (f + 1) % u
                    }
                    e.__splitAreaColors = h
                }
            }
        }

        function lv(e) {
            e.__splitAreaColors = null
        }

        iv.registerAxisPointerClass = function (e, t) {
            rv[e] = t
        }, iv.getAxisPointerClass = function (e) {
            return e && rv[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 Di, this.group.add(this._axisGroup), e.get("show")) {
                        var r = e.getCoordSysModel(), a = av(r, e), s = new Vm(e, a);
                        A(dv, s.add, s), this._axisGroup.add(s.getGroup()), A(uv, function (t) {
                            e.get(t + ".show") && this["_" + t](e, r)
                        }, 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"), r = o.get("color");
                        r = M(r) ? r : [r];
                        for (var a = 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] = a.y, c[0] = p, c[1] = a.y + a.height) : (u[0] = a.x, u[1] = p, c[0] = a.x + a.width, c[1] = p);
                            var g = l++ % r.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: k({stroke: r[g]}, h),
                                silent: !0
                            }))
                        }
                    }
                }, _minorSplitLine: function (e, t) {
                    var i = e.axis, n = e.getModel("minorSplitLine").getModel("lineStyle"),
                        o = t.coordinateSystem.getRect(), r = i.isHorizontal(), a = i.getMinorTicksCoords();
                    if (a.length) for (var s = [], l = [], d = n.getLineStyle(), u = 0; u < a.length; u++) for (var c = 0; c < a[u].length; c++) {
                        var h = i.toGlobalCoord(a[u][c].coord);
                        r ? (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_" + a[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"}), kf({
            type: "grid", render: function (e, t) {
                this.group.removeAll(), e.get("show") && this.group.add(new es({
                    shape: e.coordinateSystem.getRect(),
                    style: k({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(Ch.PROCESSOR.STATISTIC, {
            seriesType: "line",
            modifyOutputEnd: !0,
            reset: function (e, t, i) {
                var n = e.getData(), o = e.get("sampling"), r = e.coordinateSystem;
                if ("cartesian2d" === r.type && o) {
                    var a, s = r.getBaseAxis(), l = r.getOtherAxis(s), d = s.getExtent(), u = d[1] - d[0],
                        c = Math.round(n.count() / u);
                    1 < c && ("string" == typeof o ? a = km[o] : "function" == typeof o && (a = o), a && e.setData(n.downSample(n.mapDimension(l.dim), 1 / c, a, wm)))
                }
            }
        });
        var hv = ec.extend({
            type: "series.__base_bar__",
            getInitialData: function (e, t) {
                return ap(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"),
                        r = n.getLayout("size");
                    return i[t.getBaseAxis().isHorizontal() ? 0 : 1] += o + r / 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, r) {
            Ys(e, t, i.getModel("label"), i.getModel("emphasis.label"), {
                labelFetcher: o,
                labelDataIndex: r,
                defaultText: Og(o.getData(), r),
                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 = or([["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 = Cs({
                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), r = Math.max(t.r, 0), a = .5 * (r - o), s = o + a,
                        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, a, -Math.PI + l, l, !u)), e.arc(i, n, r, l, d, !u), e.moveTo(f * r + i, p * r + n), e.arc(f * s + i, p * s + n, a, 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"], wv = [0, 0];
        w(Cl.prototype, mv), bf({
            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, r = e.getData(), a = 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, r);
                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 || [];
                r.diff(a).add(function (t) {
                    var i = r.getItemModel(t), a = _v[s.type](r, t, i);
                    if (f) {
                        var l = _v[s.type](r, t), v = function (e, t, i) {
                            return new ("polar" === e.type ? ja : es)({shape: Pv(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 (r.hasValue(t)) {
                        if (u && bv[s.type](c, a)) return void o.remove(y);
                        var y = Cv[s.type](t, a, n, d, !1, h);
                        r.setItemGraphicEl(t, y), o.add(y), Dv(y, r, t, i, a, e, n, "polar" === s.type)
                    }
                }).update(function (t, i) {
                    var l = r.getItemModel(t), y = _v[s.type](r, t, l);
                    if (f) {
                        var w = v[i];
                        w.useStyle(p.getBarItemStyle()), "cartesian2d" === s.type && w.setShape("r", g), m[t] = w;
                        var k = _v[s.type](r, t);
                        rl(w, {shape: Pv(n, k, s)}, d, t)
                    }
                    var T = a.getItemGraphicEl(i);
                    if (r.hasValue(t)) {
                        if (u && bv[s.type](c, y)) return void o.remove(T);
                        T ? rl(T, {shape: y}, d, t) : T = Cv[s.type](t, y, n, d, !0, h), r.setItemGraphicEl(t, T), o.add(T), Dv(T, r, t, l, y, e, n, "polar" === s.type)
                    } else o.remove(T)
                }).remove(function (e) {
                    var t = a.getItemGraphicEl(e);
                    "cartesian2d" === s.type ? t && Sv(e, d, t) : t && Iv(e, d, t)
                }).execute();
                var y = this._backgroundGroup || (this._backgroundGroup = new Di);
                y.removeAll();
                for (var w = 0; w < m.length; ++w) y.add(m[w]);
                o.add(y), this._backgroundEls = m, this._data = r
            }, _renderLarge: function (e, t, i) {
                this._clear(), Nv(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(), Nv(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 ? Iv(t.dataIndex, e, t) : Sv(t.dataIndex, e, t)
                })) : t.removeAll(), this._data = null
            }, _removeBackground: function () {
                this.group.remove(this._backgroundGroup), this._backgroundGroup = null
            }
        });
        var kv = Math.max, Tv = Math.min, bv = {
            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 = kv(t.x, e.x), r = Tv(t.x + t.width, e.x + e.width), a = kv(t.y, e.y),
                    s = Tv(t.y + t.height, e.y + e.height);
                t.x = o, t.y = a, t.width = r - o, t.height = s - a;
                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
            }
        }, Cv = {
            cartesian2d: function (e, t, i, n, o) {
                var r = new es({shape: w({}, t), z2: 1});
                if (r.name = "item", n) {
                    var a = i ? "height" : "width", s = {};
                    r.shape[a] = 0, s[a] = t[a], ml[o ? "updateProps" : "initProps"](r, {shape: s}, n, e)
                }
                return r
            }, polar: function (e, t, i, n, o, r) {
                var a = t.startAngle < t.endAngle, s = new (!i && r ? vv : ja)({shape: k({clockwise: a}, 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 Sv(e, t, i) {
            i.style.text = null, rl(i, {shape: {width: 0}}, t, e, function () {
                i.parent && i.parent.remove(i)
            })
        }

        function Iv(e, t, i) {
            i.style.text = null, rl(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, r = 0 < n.width ? 1 : -1, a = 0 < n.height ? 1 : -1;
                return {x: n.x + r * o / 2, y: n.y + a * o / 2, width: n.width - r * o, height: n.height - a * 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 Av(e) {
            return null != e.startAngle && null != e.endAngle && e.startAngle === e.endAngle
        }

        function Dv(e, t, i, n, o, r, a, 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(k({
                stroke: Av(o) ? "none" : u,
                fill: Av(o) ? "none" : l,
                opacity: d
            }, c.getBarItemStyle()));
            var f = n.getShallow("cursor");
            f && e.attr("cursor", f), a ? o.height : o.width, s || fv(e.style, h, n, l, r, i), Av(o) && (h.fill = h.stroke = "none"), Hs(e, h)
        }

        var xv = Ta.extend({
            type: "largeBar", shape: {points: []}, buildPath: function (e, t) {
                for (var i = t.points, n = this.__startPoint, o = this.__baseDimIdx, r = 0; r < i.length; r += 2) n[o] = i[r + o], e.moveTo(n[0], n[1]), e.lineTo(i[r], i[r + 1])
            }
        });

        function Nv(e, t, i) {
            var n = e.getData(), o = [], r = n.getLayout("valueAxisHorizontal") ? 1 : 0;
            o[1 - r] = n.getLayout("valueAxisStart");
            var a = n.getLayout("largeDataIndices"), s = n.getLayout("barWidth"), l = e.getModel("backgroundStyle");
            if (e.get("showBackground", !0)) {
                var d = n.getLayout("largeBackgroundPoints"), u = [];
                u[1 - r] = n.getLayout("backgroundStart");
                var c = new xv({
                    shape: {points: d},
                    incremental: !!i,
                    __startPoint: u,
                    __baseDimIdx: r,
                    __largeDataIndices: a,
                    __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 xv({
                shape: {points: n.getLayout("largePoints")},
                incremental: !!i,
                __startPoint: o,
                __baseDimIdx: r,
                __largeDataIndices: a,
                __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 = Cc(function (e) {
            var t = function (e, t, i) {
                var n = e.__baseDimIdx, o = 1 - n, r = e.shape.points, a = e.__largeDataIndices,
                    s = Math.abs(e.__barWidth / 2), l = e.__startPoint[o];
                wv[0] = t, wv[1] = i;
                for (var d = wv[n], u = wv[1 - n], c = d - s, h = d + s, f = 0, p = r.length / 2; f < p; f++) {
                    var g = 2 * f, m = r[g + n], v = r[g + o];
                    if (c <= m && m <= h && (l <= v ? l <= u && u <= v : v <= u && u <= l)) return a[f]
                }
                return -1
            }(this, e.offsetX, e.offsetY);
            this.dataIndex = 0 <= t ? t : null
        }, 30, !1);

        function Pv(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 Ov(e, t, i) {
            t = M(t) && {coordDimensions: t} || w({}, t);
            var n = e.getSource(), o = ep(n, t), r = new Vf(o, e);
            return r.initData(n, i), r
        }

        gf(Ch.VISUAL.LAYOUT, O(Dp, "bar")), gf(Ch.VISUAL.PROGRESSIVE_LAYOUT, xp), mf({
            seriesType: "bar",
            reset: function (e) {
                e.getData().setVisual("legendSymbol", "roundRect")
            }
        });
        var Mv = {
            updateSelectedMap: function (e) {
                this._targetList = M(e) ? e.slice() : [], this._selectTargetMap = x(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 = Tf({
            type: "series.pie",
            init: function (e) {
                Lv.superApply(this, "init", arguments), this.legendVisualProvider = new Fv(P(this.getData, this), P(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 Ov(this, {coordDimensions: ["value"], encodeDefaulter: O(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(), r = this.dataIndex, a = o.getName(r), s = t.get("selectedOffset");
            n.dispatchAction({type: "pieToggleSelect", from: e, name: a, 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 r = (t.startAngle + t.endAngle) / 2, a = i ? n : 0, s = [Math.cos(r) * a, Math.sin(r) * a];
            o ? e.animate().when(200, {position: s}).start("bounceOut") : e.attr("position", s)
        }

        function Uv(e, t) {
            Di.call(this);
            var i = new ja({z2: 2}), n = new qa, o = new Ua;
            this.add(i), this.add(n), this.add(o), this.updateData(e, t, !0)
        }

        I(Lv, Mv);
        var Vv = Uv.prototype;

        function Kv(e, t) {
            A(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 Wv(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 r, a = n[t], s = null != a && o.getItemVisual(a, "color", !0),
                            l = null != a && o.getItemVisual(a, "borderColor", !0);
                        if (s && l || (r = i.getItemModel(t)), !s) {
                            var d = r.get("itemStyle.color") || e.getColorFromPalette(i.getName(t) || t + "", e.__paletteScope, i.count());
                            null != a && o.setItemVisual(a, "color", d)
                        }
                        if (!l) {
                            var u = r.get("itemStyle.borderColor");
                            null != a && o.setItemVisual(a, "borderColor", u)
                        }
                    })
                }
            }
        }

        Vv.updateData = function (e, t, i) {
            var n = this.childAt(0), o = this.childAt(1), r = this.childAt(2), a = e.hostModel, s = e.getItemModel(t),
                l = e.getItemLayout(t), d = w({}, l);
            d.label = null;
            var u = a.getShallow("animationTypeUpdate");
            i ? (n.setShape(d), "scale" === a.getShallow("animationType") ? (n.shape.r = l.r0, al(n, {shape: {r: l.r}}, a, t)) : (n.shape.endAngle = l.startAngle, rl(n, {shape: {endAngle: l.endAngle}}, a, t))) : "expansion" === u ? n.setShape(d) : rl(n, {shape: d}, a, t);
            var c = e.getItemVisual(t, "color");
            n.useStyle(k({
                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), a.isSelected(e.getName(t)), a.get("selectedOffset"), a.get("animation"));
            var f = !i && "transition" === u;
            this._updateLabel(e, t, f), this.highDownOnUpdate = a.get("silent") ? null : function (e, t) {
                var i = a.isAnimationEnabled() && s.get("hoverAnimation");
                "emphasis" === t ? (o.ignore = o.hoverIgnore, r.ignore = r.hoverIgnore, i && (n.stopAnimation(!0), n.animateTo({shape: {r: l.r + a.get("hoverOffset")}}, 300, "elasticOut"))) : (o.ignore = o.normalIgnore, r.ignore = r.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), r = e.hostModel, a = 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 ? (rl(n, {shape: d}, r, t), rl(o, {style: u}, r, t)) : (n.attr({shape: d}), o.attr({style: u})), o.attr({
                    rotation: s.rotation,
                    origin: [s.x, s.y],
                    z2: 10
                });
                var c = a.getModel("label"), h = a.getModel("emphasis.label"), f = a.getModel("labelLine"),
                    p = a.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})
            }
        }, S(Uv, Di), fc.extend({
            type: "pie", init: function () {
                var e = new Di;
                this._sectorGroup = e
            }, render: function (e, t, i, n) {
                if (!n || n.from !== this.uid) {
                    var o = e.getData(), r = this._data, a = this.group, s = t.get("animation"), l = !r,
                        d = e.get("animationType"), u = e.get("animationTypeUpdate"), c = O(Rv, this.uid, e, s, i),
                        h = e.get("selectedMode");
                    if (o.diff(r).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), a.add(t)
                    }).update(function (e, t) {
                        var i = r.getItemGraphicEl(t);
                        l || "transition" === u || i.eachChild(function (e) {
                            e.stopAnimation(!0)
                        }), i.updateData(o, e), i.off("click"), h && i.on("click", c), a.add(i), o.setItemGraphicEl(e, i)
                    }).remove(function (e) {
                        var t = r.getItemGraphicEl(e);
                        a.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 = P(a.removeClipPath, a);
                        a.setClipPath(this._createClipPath(f.cx, f.cy, g, f.startAngle, f.clockwise, m, e, l))
                    } else a.removeClipPath();
                    this._data = o
                }
            }, dispose: function () {
            }, _createClipPath: function (e, t, i, n, o, r, a, s) {
                var l = new ja({shape: {cx: e, cy: t, r0: 0, r: i, startAngle: n, endAngle: n, clockwise: o}});
                return (s ? al : rl)(l, {shape: {endAngle: n + (o ? 1 : -1) * Math.PI * 2}}, a, r), l
            }, containPoint: function (e, t) {
                var i = t.getData().getItemLayout(0);
                if (i) {
                    var n = e[0] - i.cx, o = e[1] - i.cy, r = Math.sqrt(n * n + o * o);
                    return r <= i.r && r >= i.r0
                }
            }
        });
        var jv = Math.PI / 180;

        function Gv(e, t, i, n, o, r, a, s, l, d) {
            function u(t, i, n) {
                for (var o = t; o < i && !(e[o].y + n > l + a); 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, r) {
                for (var a = 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 && a <= h && (h = a - 10), !t && h <= a && (h = a + 10), e[s].x = i + h * r, a = 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 w = e[y].x - d;
                    e[y].linePoints[1][0] += w, e[y].x = d
                }
                (f = e[y].y - p) < 0 && u(y, g, -f), p = e[y].y + e[y].height
            }
            for (a - p < 0 && c(g - 1, p - a), 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(Wv("pie")), gf(O(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), r = e.get("center"), a = e.get("radius");
                M(a) || (a = [0, a]), M(r) || (r = [r, r]);
                var s = Nl(o.width, i.getWidth()), l = Nl(o.height, i.getHeight()), d = Math.min(s, l),
                    u = Nl(r[0], s) + o.x, c = Nl(r[1], l) + o.y, h = Nl(a[0], d / 2), f = Nl(a[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, w = e.get("clockwise"), k = e.get("roseType"),
                    T = e.get("stillShowZeroSum"), b = t.getDataExtent(n);
                b[0] = 0;
                var C = zv, S = 0, I = p, _ = w ? 1 : -1;
                if (t.each(n, function (e, i) {
                    var n;
                    if (isNaN(e)) t.setItemLayout(i, {
                        angle: NaN,
                        startAngle: NaN,
                        endAngle: NaN,
                        clockwise: w,
                        cx: u,
                        cy: c,
                        r0: h,
                        r: k ? NaN : f,
                        viewRect: o
                    }); else {
                        (n = "area" !== k ? 0 === v && T ? y : e * y : zv / m) < g ? C -= n = g : S += e;
                        var r = I + _ * n;
                        t.setItemLayout(i, {
                            angle: n,
                            startAngle: I,
                            endAngle: r,
                            clockwise: w,
                            cx: u,
                            cy: c,
                            r0: h,
                            r: k ? xl(e, b, [h, f]) : f,
                            viewRect: o
                        }), I = r
                    }
                }), C < zv && m) if (C <= .001) {
                    var A = zv / m;
                    t.each(n, function (e, i) {
                        if (!isNaN(e)) {
                            var n = t.getItemLayout(i);
                            n.angle = A, n.startAngle = p + _ * i * A, n.endAngle = p + _ * (i + 1) * A
                        }
                    })
                } else y = C / S, I = p, t.each(n, function (e, i) {
                    if (!isNaN(e)) {
                        var n = t.getItemLayout(i), o = n.angle === g ? g : e * y;
                        n.startAngle = I, n.endAngle = I + _ * o, I += _ * o
                    }
                });
                !function (e, t, i, n, o, r) {
                    var a, s, l = e.getData(), d = [], u = !1, c = (e.get("minShowLabelAngle") || 0) * jv;
                    l.each(function (n) {
                        var r = 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 = Nl(f.get("margin"), i), y = f.get("bleedMargin"), w = f.getFont(),
                            k = h.getModel("labelLine"), T = k.get("length");
                        T = Nl(T, i);
                        var b = k.get("length2");
                        if (b = Nl(b, i), !(r.angle < c)) {
                            var C, S, I, _, A = (r.startAngle + r.endAngle) / 2, D = Math.cos(A), x = Math.sin(A);
                            a = r.cx, s = r.cy;
                            var N, E = e.getFormattedLabel(n, "normal") || l.getName(n), P = cn(E, w, _, "top"),
                                O = "inside" === p || "inner" === p;
                            if ("center" === p) C = r.cx, S = r.cy, _ = "center"; else {
                                var M = (O ? (r.r + r.r0) / 2 * D : r.r * D) + a,
                                    F = (O ? (r.r + r.r0) / 2 * x : r.r * x) + s;
                                if (C = M + 3 * D, S = F + 3 * x, !O) {
                                    var L = M + D * (T + t - r.r), R = F + x * (T + t - r.r),
                                        B = L + (D < 0 ? -1 : 1) * b;
                                    C = "edge" === m ? D < 0 ? o + v : o + i - v : B + (D < 0 ? -g : g), I = [[M, F], [L, R], [B, S = R]]
                                }
                                _ = O ? "center" : "edge" === m ? 0 < D ? "right" : "left" : 0 < D ? "left" : "right"
                            }
                            var U = f.get("rotate");
                            N = "number" == typeof U ? U * (Math.PI / 180) : U ? D < 0 ? -A + Math.PI : -A : 0, u = !!N, r.label = {
                                x: C,
                                y: S,
                                position: p,
                                height: P.height,
                                len: T,
                                len2: b,
                                linePoints: I,
                                textAlign: _,
                                verticalAlign: "middle",
                                rotation: N,
                                inside: O,
                                labelDistance: g,
                                labelAlignTo: m,
                                labelMargin: v,
                                bleedMargin: y,
                                textRect: P,
                                text: E,
                                font: w
                            }, O || d.push(r.label)
                        }
                    }), !u && e.get("avoidLabelOverlap") && function (e, t, i, n, o, r, a, 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 (Gv(d, t, i, n, 1, 0, r, 0, s, c), Gv(l, t, i, n, -1, 0, r, 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 - a - f.labelMargin : a + o - f.labelMargin - p[2][0] - f.labelDistance : f.x < t ? f.x - a - f.bleedMargin : a + 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] = a + f.labelMargin + v + f.labelDistance : p[2][0] = a + 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, a, s, t, i, n, o, r)
                }(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 ap(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 = Cs({
            shape: {points: null}, symbolProxy: null, softClipShape: null, buildPath: function (e, t) {
                var i = t.points, n = t.size, o = this.symbolProxy, r = o.shape;
                if (!((e.getContext ? e.getContext() : e) && n[0] < 4)) for (var a = 0; a < i.length;) {
                    var s = i[a++], l = i[a++];
                    isNaN(s) || isNaN(l) || this.softClipShape && !this.softClipShape.contain(s, l) || (r.x = s - n[0] / 2, r.y = l - n[1] / 2, r.width = n[0], r.height = n[1], o.buildPath(e, r, !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 r = i[o++], a = i[o++];
                        isNaN(r) || isNaN(a) || this.softClipShape && !this.softClipShape.contain(r, a) || e.fillRect(r - n[0] / 2, a - 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, r = Math.max(o[0], 4), a = Math.max(o[1], 4), s = n.length / 2 - 1; 0 <= s; s--) {
                    var l = 2 * s, d = n[l] - r / 2, u = n[1 + l] - a / 2;
                    if (d <= e && u <= t && e <= d + r && t <= u + a) return s
                }
                return -1
            }
        });

        function Jv() {
            this.group = new Di
        }

        var Zv = Jv.prototype;

        function Qv(e, t, i) {
            Dg.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 = D(e.getIndicatorModels(), function (e, t) {
                var i = "indicator_" + t, n = new Qv(i, "log" === e.get("axisType") ? new Xp : new wp);
                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 r = t.getVisual("symbolSize");
            e.setShape("size", r instanceof Array ? r : [r, r]), e.softClipShape = n.clipShape || null, e.symbolProxy = cg(t.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
            var a = e.shape.size[0] < 4;
            e.useStyle(o.getModel("itemStyle").getItemStyle(a ? ["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()
        }, bf({
            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 Gg, 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")), S(Qv, Dg), $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, r = Math.atan2(-i, t), a = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) {
                var d = this._indicatorAxes[l], u = Math.abs(r - d.angle);
                u < a && (o = d, s = l, a = u)
            }
            return [s, +(o && o.coordToData(n))]
        }, $v.prototype.resize = function (e, t) {
            var i = e.get("center"), n = t.getWidth(), o = t.getHeight(), r = Math.min(n, o) / 2;
            this.cx = Nl(i[0], n), this.cy = Nl(i[1], o), this.startAngle = e.get("startAngle") * Math.PI / 180;
            var a = e.get("radius");
            "string" != typeof a && "number" != typeof a || (a = [0, a]), this.r0 = Nl(a[0], r), this.r = Nl(a[1], r), A(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;
            A(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 r = t.getData();
                    A(i, function (e) {
                        e.scale.unionExtentFromData(r, r.mapDimension(e.dim))
                    })
                }
            }, this);
            var o = n.get("splitNumber");

            function r(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
            }

            A(i, function (e, t) {
                var i = Yp(e.scale, e.model).extent;
                Jp(e.scale, e.model);
                var n = e.model, a = e.scale, s = n.getMin(), l = n.getMax(), d = a.getInterval();
                if (null != s && null != l) a.setExtent(+s, +l), a.setInterval((l - s) / o); else if (null != s) for (; c = s + d * o, a.setExtent(+s, c), a.setInterval(d), d = r(d), c < i[1] && isFinite(c) && isFinite(i[1]);) ; else if (null != l) for (; h = l - d * o, a.setExtent(h, +l), a.setInterval(d), d = r(d), h > i[0] && isFinite(h) && isFinite(i[0]);) ; else {
                    var u = a.getTicks().length - 1;
                    o < u && (d = r(d));
                    var c, h = El((c = Math.ceil(i[1] / d) * d) - d * o);
                    a.setExtent(h, c), a.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 k({show: t}, e)
        }

        wf({
            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"), r = this.get("axisType"),
                    a = 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 = D(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 = k({color: h.color}, s)), h = v(m(h), {
                            boundaryGap: e,
                            splitNumber: t,
                            scale: i,
                            axisLine: n,
                            axisTick: o,
                            axisType: r,
                            axisLabel: a,
                            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 = w(new Cl(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"];
        kf({
            type: "radar", render: function (e, t, i) {
                this.group.removeAll(), this._buildAxes(e), this._buildSplitLineAndArea(e)
            }, _buildAxes: function (e) {
                var t = e.coordinateSystem;
                A(D(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) {
                    A(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"), r = e.getModel("splitArea"),
                        a = o.getModel("lineStyle"), s = r.getModel("areaStyle"), l = o.get("show"), d = r.get("show"),
                        u = a.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 Ka({
                        shape: {
                            cx: g,
                            cy: m,
                            r: p[v].coord
                        }
                    })), d && v < p.length - 1 && f[_(f, c, v)].push(new Ga({
                        shape: {
                            cx: g,
                            cy: m,
                            r0: p[v].coord,
                            r: p[v + 1].coord
                        }
                    })); else {
                        var y, w = D(i, function (e, i) {
                            var n = e.getTicksCoords();
                            return y = null == y ? n.length - 1 : Math.min(n.length - 1, y), D(n, function (e) {
                                return t.coordToPoint(e.coord, i)
                            })
                        }), T = [];
                        for (v = 0; v <= y; v++) {
                            for (var b = [], C = 0; C < i.length; C++) b.push(w[C][v]);
                            b[0] && b.push(b[0].slice()), l && h[_(h, u, v)].push(new qa({shape: {points: b}})), d && T && f[_(f, c, v - 1)].push(new Xa({shape: {points: b.concat(T)}})), T = b.slice().reverse()
                        }
                    }
                    var S = a.getLineStyle(), I = s.getAreaStyle();
                    A(f, function (e, t) {
                        this.group.add(xs(e, {style: k({stroke: "none", fill: c[t % c.length]}, I), silent: !0}))
                    }, this), A(h, function (e, t) {
                        this.group.add(xs(e, {style: k({fill: "none", stroke: u[t % u.length]}, S), 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(P(this.getData, this), P(this.getRawData, this))
            },
            getInitialData: function (e, t) {
                return Ov(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/>" + D(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(D(i.dimensions, function (e) {
                    return t.mapDimension(e)
                }), e, !0), o = 0, r = n.length; o < r; o++) if (!isNaN(n[o])) {
                    var a = i.getIndicatorAxes();
                    return i.coordToPoint(a[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 ry(e) {
            return [e.cx, e.cy]
        }

        bf({
            type: "radar", render: function (e, t, i) {
                var n = e.coordinateSystem, o = this.group, r = e.getData(), a = 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")), r = cg(i, -1, -1, 2, 2, n);
                        return r.attr({style: {strokeNoScale: !0}, z2: 100, scale: [o[0] / 2, o[1] / 2]}), r
                    }
                }

                function l(t, i, n, o, r, a) {
                    n.removeAll();
                    for (var l = 0; l < i.length - 1; l++) {
                        var d = s(o, r);
                        d && (t[d.__dimIdx = l] ? (d.attr("position", t[l]), ml[a ? "initProps" : "updateProps"](d, {position: i[l]}, e, r)) : d.attr("position", i[l]), n.add(d))
                    }
                }

                function d(e) {
                    return D(e, function (e) {
                        return [n.cx, n.cy]
                    })
                }

                r.diff(a).add(function (t) {
                    var i = r.getItemLayout(t);
                    if (i) {
                        var n = new Xa, o = new qa, a = {shape: {points: i}};
                        n.shape.points = d(i), o.shape.points = d(i), al(n, a, e, t), al(o, a, e, t);
                        var s = new Di, u = new Di;
                        s.add(o), s.add(n), s.add(u), l(o.shape.points, i, u, r, t, !0), r.setItemGraphicEl(t, s)
                    }
                }).update(function (t, i) {
                    var n = a.getItemGraphicEl(i), o = n.childAt(0), s = n.childAt(1), d = n.childAt(2),
                        u = {shape: {points: r.getItemLayout(t)}};
                    u.shape.points && (l(o.shape.points, u.shape.points, d, r, t, !1), rl(o, u, e), rl(s, u, e), r.setItemGraphicEl(t, n))
                }).remove(function (e) {
                    o.remove(a.getItemGraphicEl(e))
                }).execute(), r.eachItemGraphicEl(function (e, t) {
                    var i = r.getItemModel(t), n = e.childAt(0), a = e.childAt(1), s = e.childAt(2),
                        l = r.getItemVisual(t, "color");
                    o.add(e), n.useStyle(k(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, a.ignore = c, a.useStyle(k(d.getAreaStyle(), {
                        fill: l,
                        opacity: .7
                    })), a.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 = r.get(r.dimensions[e.__dimIdx], t);
                        null != i && !isNaN(i) || (i = ""), Ys(e.style, e.hoverStyle, g, v, {
                            labelFetcher: r.hostModel,
                            labelDataIndex: t,
                            labelDimIndex: e.__dimIdx,
                            defaultText: i,
                            autoColor: l,
                            isRectText: !0
                        })
                    }), e.highDownOnUpdate = function (e, t) {
                        a.attr("ignore", "emphasis" === t ? h : c)
                    }, Hs(e)
                }), this._data = r
            }, remove: function () {
                this.group.removeAll(), this._data = null
            }, dispose: function () {
            }
        }), mf(Wv("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();
                    A(o, function (e, r) {
                        t.each(t.mapDimension(o[r].dim), function (e, t) {
                            i[t] = i[t] || [];
                            var o = n.dataToPoint(e, r);
                            i[t][r] = oy(o) ? o : ry(n)
                        })
                    }), t.each(function (e) {
                        var o = E(i[e], function (e) {
                            return oy(e)
                        }) || ry(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 = [];
                A(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
            }
            A(e.series, function (e) {
                e && "radar" === e.type && e.polarIndex && (e.radarIndex = e.polarIndex)
            })
        });
        for (var ay = [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] += ay[0], sy[ly][dy][1] += ay[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 = Wo(),
            fy = {
                load: function (e, t, i) {
                    var n = hy(t).parsed;
                    if (n) return n;
                    var o, r = t.specialAreas || {}, a = t.geoJSON;
                    try {
                        o = a ? wg(a, i) : []
                    } catch (t) {
                        throw new Error("Invalid geoJson format\n" + t.message)
                    }
                    return A(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 = r[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 = Wo();

        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 r = i.width, a = i.height, s = i.viewBoxRect;
            if (t || (t = null == r || null == a ? n.getBoundingRect() : new Ai(0, 0, 0, 0), null != r && (t.width = r), null != a && (t.height = a)), s) {
                var l = ph(s, t.width, t.height), d = n;
                (n = new Di).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 = $()), r = o.get(i);
                    if (r) return r;
                    var a = n.originRoot, s = n.boundingRect;
                    return r = n.originRootHostKey ? gy(t, s).root : (n.originRootHostKey = i, a), o.set(i, r)
                }, 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 = [], r = $(), a = $();
                return A(wy(e), function (s) {
                    var l = my[s.type].load(e, s, i);
                    A(l.regions, function (e) {
                        var i = e.name;
                        t && t.hasOwnProperty(i) && (e = e.cloneShallow(i = t[i])), o.push(e), r.set(i, e), a.set(i, e.center)
                    });
                    var d = l.boundingRect;
                    d && (n ? n.union(d) : n = d.clone())
                }), {regions: o, regionsMap: r, nameCoordMap: a, boundingRect: n || new Ai(0, 0, 0, 0)}
            }, makeGraphic: yy("makeGraphic"), removeGraphic: yy("removeGraphic")
        };

        function yy(e) {
            return function (t, i) {
                var n = wy(t), o = [];
                return A(n, function (n) {
                    var r = my[n.type][e];
                    r && o.push(r(t, n, i))
                }), o
            }
        }

        function wy(e) {
            return mh.retrieveMap(e) || []
        }

        I(ec.extend({
            type: "series.map",
            dependencies: ["geo"],
            layoutMode: "box",
            needsDrawMap: !1,
            seriesGroup: [],
            getInitialData: function (e) {
                for (var t = Ov(this, {
                    coordDimensions: ["value"],
                    encodeDefaulter: O(zd, this)
                }), i = t.mapDimension("value"), n = $(), o = [], r = [], a = 0, s = t.count(); a < s; a++) {
                    var l = t.getName(a);
                    n.set(l, !0), o.push({name: l, value: t.get(i, a), selected: Ru(t, a, "selected")})
                }
                return A(vy.load(this.getMapType(), this.option.nameMap, this.option.nameProperty).regions, function (e) {
                    var t = e.name;
                    n.get(t) || (o.push({name: t}), r.push(t))
                }), this.updateSelectedMap(o), t.appendValues([], r), 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, r = [], a = 0; a < o.length; a++) {
                    var s = o[a].originalData.indexOfName(n), l = t.mapDimension("value");
                    isNaN(o[a].originalData.get(l, s)) || r.push($l(o[a].name))
                }
                return r.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 ky = "\0_ec_interaction_mutex";

        function Ty(e, t) {
            return !!by(e)[t]
        }

        function by(e) {
            return e[ky] || (e[ky] = {})
        }

        function Cy(e) {
            this.pointerChecker, this._zr = e, this._opt = {};
            var t = P, i = t(Sy, this), n = t(Iy, this), o = t(_y, this), r = t(Ay, this), a = t(Dy, this);
            xe.call(this), this.setPointerChecker = function (e) {
                this.pointerChecker = e
            }, this.enable = function (t, s) {
                this.disable(), this._opt = k(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", r), e.on("pinch", a))
            }, this.disable = function () {
                e.off("mousedown", i), e.off("mousemove", n), e.off("mouseup", o), e.off("mousewheel", r), e.off("pinch", a)
            }, this.dispose = this.disable, this.isDragging = function () {
                return this._dragging
            }, this.isPinching = function () {
                return this._pinching
            }
        }

        function Sy(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 Iy(e) {
            if (this._dragging && Ey("moveOnMouseMove", e, this._opt) && "pinch" !== e.gestureEvent && !Ty(this._zr, "globalPan")) {
                var t = e.offsetX, i = e.offsetY, n = this._x, o = this._y, r = t - n, a = i - o;
                this._x = t, this._y = i, this._opt.preventDefaultMouseMove && ze(e.event), Ny(this, "pan", "moveOnMouseMove", e, {
                    dx: r,
                    dy: a,
                    oldX: n,
                    oldY: o,
                    newX: t,
                    newY: i
                })
            }
        }

        function _y(e) {
            Xe(e) || (this._dragging = !1)
        }

        function Ay(e) {
            var t = Ey("zoomOnMouseWheel", e, this._opt), i = Ey("moveOnMouseWheel", e, this._opt), n = e.wheelDelta,
                o = Math.abs(n), r = e.offsetX, a = e.offsetY;
            if (0 !== n && (t || i)) {
                if (t) {
                    var s = 3 < o ? 1.4 : 1 < o ? 1.2 : 1.1;
                    xy(this, "zoom", "zoomOnMouseWheel", e, {scale: 0 < n ? s : 1 / s, originX: r, originY: a})
                }
                if (i) {
                    var l = Math.abs(n);
                    xy(this, "scrollMove", "moveOnMouseWheel", e, {
                        scrollDelta: (0 < n ? 1 : -1) * (3 < l ? .4 : 1 < l ? .15 : .05),
                        originX: r,
                        originY: a
                    })
                }
            }
        }

        function Dy(e) {
            Ty(this._zr, "globalPan") || xy(this, "zoom", null, e, {
                scale: 1 < e.pinchScale ? 1.1 : 1 / 1.1,
                originX: e.pinchX,
                originY: e.pinchY
            })
        }

        function xy(e, t, i, n, o) {
            e.pointerChecker && e.pointerChecker(n, o.originX, o.originY) && (ze(n.event), Ny(e, t, i, n, o))
        }

        function Ny(e, t, i, n, o) {
            o.isAvailableBehavior = P(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 Py(e, t, i) {
            var n = e.target, o = n.position;
            o[0] += t, o[1] += i, n.dirty()
        }

        function Oy(e, t, i, n) {
            var o = e.target, r = e.zoomLimit, a = o.position, s = o.scale, l = e.zoom = e.zoom || 1;
            if (l *= t, r) {
                var d = r.min || 0, u = r.max || 1 / 0;
                l = Math.max(Math.min(u, l), d)
            }
            var c = l / e.zoom;
            e.zoom = l, a[0] -= (i - a[0]) * (c - 1), a[1] -= (n - a[1]) * (c - 1), s[0] *= c, s[1] *= c, o.dirty()
        }

        ff({type: "takeGlobalCursor", event: "globalCursorTaken", update: "update"}, function () {
        }), I(Cy, xe);
        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) {
                A(t.__regions, function (i) {
                    t.trigger(e.isSelected(i.name) ? "emphasis" : "normal")
                })
            })
        }

        function By(e, t) {
            var i = new Di;
            this.uid = Al("ec_map_draw"), this._controller = new Cy(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 Di), i.add(this._backgroundGroup = new Di)
        }

        By.prototype = {
            constructor: By, draw: function (e, t, i, n, o) {
                var r = "geo" === e.mainType, a = e.getData && e.getData();
                r && t.eachComponent({mainType: "series", subType: "map"}, function (t) {
                    a || t.getHostGeoModel() !== e || (a = 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, rl(u, p, e)
                }
                var g = c.rawScale, m = c.rawPosition;
                d.removeAll();
                var v = ["itemStyle"], y = ["emphasis", "itemStyle"], w = ["label"], k = ["emphasis", "label"], T = $();
                A(s.regions, function (t) {
                    var i = T.get(t.name) || T.set(t.name, new Di),
                        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),
                        b = M.getModel(w), C = M.getModel(k);
                    if (a) {
                        o = a.indexOfName(t.name);
                        var S = a.getItemVisual(o, "color", !0);
                        S && (f.fill = S)
                    }

                    function I(e) {
                        return [e[0] * g[0] + m[0], e[1] * g[1] + m[1]]
                    }

                    A(t.geometries, function (e) {
                        if ("polygon" === e.type) {
                            for (var t = [], i = 0; i < e.exterior.length; ++i) t.push(I(e.exterior[i]));
                            for (n.shape.paths.push(new Xa({
                                segmentIgnoreThreshold: 1,
                                shape: {points: t}
                            })), i = 0; i < (e.interiors ? e.interiors.length : 0); ++i) {
                                for (var o = e.interiors[i], r = (t = [], 0); r < o.length; ++r) t.push(I(o[r]));
                                n.shape.paths.push(new Xa({segmentIgnoreThreshold: 1, shape: {points: t}}))
                            }
                        }
                    }), n.setStyle(f), n.style.strokeNoScale = !0, n.culling = !0;
                    var _ = b.get("show"), D = C.get("show"), x = a && isNaN(a.get(a.mapDimension("value"), o)),
                        N = a && a.getItemLayout(o);
                    if (r || x && (_ || D) || N && N.showLabel) {
                        var E, P = r ? t.name : o;
                        (!a || 0 <= o) && (E = e);
                        var O = new Ua({
                            position: I(t.center.slice()),
                            scale: [1 / u.scale[0], 1 / u.scale[1]],
                            z2: 10,
                            silent: !0
                        });
                        Ys(O.style, O.hoverStyle = {}, b, C, {
                            labelFetcher: E,
                            labelDataIndex: P,
                            defaultText: t.name,
                            useInsideStyle: !1
                        }, {
                            textAlign: "center",
                            textVerticalAlign: "middle"
                        }), h || rl(O, {scale: [1 / l[0], 1 / l[1]]}, e), i.add(O)
                    }
                    if (a) a.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 (r) {
                        if (e._mouseDownFlag) {
                            e._mouseDownFlag = !1;
                            for (var a = r.target; !a.__regions;) a = a.parent;
                            if (a) {
                                var s = {
                                    type: ("geo" === t.mainType ? "geo" : "map") + "ToggleSelect",
                                    batch: D(a.__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 && A(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, r = this._controllerHost;
                r.zoomLimit = e.get("scaleLimit"), r.zoom = n.getZoom(), o.enable(e.get("roam") || !1);
                var a = e.mainType;

                function s() {
                    var t = {type: "geoRoam", componentType: a};
                    return t[a + "Id"] = e.id, t
                }

                o.off("pan").on("pan", function (e) {
                    this._mouseDownFlag = !1, Py(r, e.dx, e.dy), i.dispatchAction(w(s(), {dx: e.dx, dy: e.dy}))
                }, this), o.off("zoom").on("zoom", function (e) {
                    if (this._mouseDownFlag = !1, Oy(r, e.scale, e.originX, e.originY), i.dispatchAction(w(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, r) {
                    return n.getViewRectAfterRoam().contain(o, r) && !Fy(t, i, e)
                })
            }
        };
        var Uy = "__seriesMapHighDown", Vy = "__seriesMapCallKey";

        function Ky(e) {
            var t = this[Uy];
            t && t.recordVersion === this[Vy] && Wy(t, e)
        }

        function Wy(e, t) {
            var i = e.circle, n = e.labelModel, o = e.hoverLabelModel, r = e.emphasisText, a = e.normalText;
            t ? (i.style.extendFrom(Zs({}, o, {text: o.get("show") ? r : null}, {
                isRectText: !0,
                useInsideStyle: !1
            }, !0)), i.__mapOriginalZ2 = i.z2, i.z2 += ms) : (Zs(i.style, n, {
                text: n.get("show") ? a : null,
                textPosition: n.getShallow("position") || "bottom"
            }, {
                isRectText: !0,
                useInsideStyle: !1
            }), i.dirty(!1), null != i.__mapOriginalZ2 && (i.z2 = i.__mapOriginalZ2, i.__mapOriginalZ2 = null))
        }

        function jy(e, t, i) {
            var n = e.getZoom(), o = e.getCenter(), r = t.zoom, a = e.dataToPoint(o);
            if (null != t.dx && null != t.dy && (a[0] -= t.dx, a[1] -= t.dy, o = e.pointToData(a), e.setCenter(o)), null != r) {
                if (i) {
                    var s = i.min || 0, l = i.max || 1 / 0;
                    r = Math.max(Math.min(n * r, l), s) / n
                }
                e.scale[0] *= r, e.scale[1] *= r;
                var d = e.position, u = (t.originX - d[0]) * (r - 1), c = (t.originY - d[1]) * (r - 1);
                d[0] -= u, d[1] -= c, e.updateTransform(), o = e.pointToData(a), e.setCenter(o), e.setZoom(r * n)
            }
            return {center: e.getCenter(), zoom: e.getZoom()}
        }

        bf({
            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) (r = this._mapDraw) && o.add(r.group); else if (e.needsDrawMap) {
                            var r = this._mapDraw || new By(i, !0);
                            o.add(r.group), r.draw(e, t, i, this, n), this._mapDraw = r
                        } 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 r = n.getItemLayout(i);
                        if (r && r.point) {
                            var a = r.point, s = r.offset, l = new Ka({
                                style: {fill: e.getData().getVisual("color")},
                                shape: {cx: a[0] + 9 * s, cy: a[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 = j(e.getFormattedLabel(c, "normal"), u),
                                    v = j(e.getFormattedLabel(c, "emphasis"), m), y = g[Uy], k = Math.random();
                                if (!y) {
                                    y = g[Uy] = {};
                                    var T = O(Ky, !0), b = O(Ky, !1);
                                    g.on("mouseover", T).on("mouseout", b).on("emphasis", T).on("normal", b)
                                }
                                w(y, {
                                    recordVersion: g[Vy] = k,
                                    circle: l,
                                    labelModel: f,
                                    hoverLabelModel: p,
                                    emphasisText: v,
                                    normalText: m
                                }), Wy(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 = jy(n, e, t.get("scaleLimit"));
                    t.setCenter && t.setCenter(o.center), t.setZoom && t.setZoom(o.zoom), "series" === i && A(t.seriesGroup, function (e) {
                        e.setCenter(o.center), e.setZoom(o.zoom)
                    })
                }
            })
        });
        var Gy = be;

        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, r = o ? o.coordinateSystem : null;
            return r === this ? r[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, r = i.seriesModel,
                a = o ? o.coordinateSystem : r ? r.coordinateSystem || (r.getReferringComponents("geo")[0] || {}).coordinateSystem : null;
            return a === this ? a[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 r, a = this.getBoundingRect(), s = e.get("layoutCenter"), l = e.get("layoutSize"), d = t.getWidth(),
                u = t.getHeight(), c = a.width / a.height * this.aspectScale, h = !1;
            if (s && l && (s = [Nl(s[0], d), Nl(s[1], u)], l = Nl(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 (r = e.getBoxLayoutParams()).aspect = c, f = md(r, {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) {
            A(t.get("geoCoord"), function (t, i) {
                e.addGeoCoord(i, t)
            })
        }

        I(Hy, vt), zy.prototype = {
            constructor: zy,
            type: "view",
            dimensions: ["x", "y"],
            setBoundingRect: function (e, t, i, n) {
                return this._rect = new Ai(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 Ai(e, t, i, n)
            },
            transformTo: function (e, t, i, n) {
                var o = this.getBoundingRect(), r = this._rawTransformable;
                r.transform = o.calculateTransform(new Ai(e, t, i, n)), r.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 = be([], n, e), i = be([], 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 || rt()), 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) : rt(), 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 ? Gy(i, e, n) : re(i, e)
            },
            pointToData: function (e) {
                var t = this.invTransform;
                return t ? Gy([], e, t) : [e[0], e[1]]
            },
            convertToPixel: O(Xy, "dataToPoint"),
            convertFromPixel: O(Xy, "pointToData"),
            containPoint: function (e) {
                return this.getViewRectAfterRoam().contain(e[0], e[1])
            }
        }, I(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(), r = this._invertLongitute;
                o = o.clone(), r && (o.y = -o.y - o.height);
                var a = this._rawTransformable;
                if (a.transform = o.calculateTransform(new Ai(e, t, i, n)), a.decomposeTransform(), r) {
                    var s = a.scale;
                    s[1] = -s[1]
                }
                a.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: O(Yy, "dataToPoint"),
            convertFromPixel: O(Yy, "pointToData")
        }, I(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"), r = e.get("aspectScale"), a = !0, s = mh.retrieveMap(o);
                    s && s[0] && "svg" === s[0].type ? (null == r && (r = 1), a = !1) : null == r && (r = .75);
                    var l = new qy(o + n, o, e.get("nameMap"), a);
                    l.aspectScale = r, 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)
                    }
                }), A(n, function (e, n) {
                    var o = new qy(n, n, y(D(e, function (e) {
                        return e.get("nameMap")
                    })));
                    o.zoomLimit = W.apply(null, D(e, function (e) {
                        return e.get("scaleLimit")
                    })), i.push(o), o.resize = Jy, o.aspectScale = e[0].get("aspectScale"), o.resize(e[0], t), A(e, function (e) {
                        Zy(e.coordinateSystem = o, e)
                    })
                }), i
            }, getFilledRegions: function (e, t, i) {
                for (var n = (e || []).slice(), o = $(), r = 0; r < n.length; r++) o.set(n[r].name, n[r]);
                return A(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 = {};
                    A(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 r = n.getName(t), a = i.getRegion(r);
                            if (a && !isNaN(e)) {
                                var s = o[r] || 0, l = i.dataToPoint(a.center);
                                o[r] = s + 1, n.setItemLayout(t, {point: l, offset: s})
                            }
                        })
                    });
                    var r = i.getData();
                    r.each(function (e) {
                        var t = r.getName(e), i = r.getItemLayout(e) || {};
                        i.showLabel = !o[t], r.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(Ch.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)
            }), A(t, function (e, t) {
                for (var i = function (e, t) {
                    var i = {};
                    return A(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 r = "ec-" + e[0].getName(o), a = 0, s = 1 / 0, l = -1 / 0, d = i[r].length, u = 0; u < d; u++) s = Math.min(s, i[r][u]), l = Math.max(l, i[r][u]), a += i[r][u];
                        return 0 === d ? NaN : "min" === t ? s : "max" === t ? l : "average" === t ? a / d : a
                    })
                }(D(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 = [];
            A(e.series, function (e) {
                e && "map" === e.type && (t.push(e), e.map = e.map || e.mapType, k(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 = A, ew = "\0__link_datas", tw = "\0__link_mainData";

        function iw(e) {
            var t = e.mainData, i = e.datas;
            i || (i = {main: t}, e.datasAttr = {main: "data"}), e.datas = e.mainData = null, sw(t, i, e), $y(i, function (i) {
                $y(t.TRANSFERABLE_METHODS, function (t) {
                    i.wrapMethod(t, O(nw, e))
                })
            }), t.wrapMethod("cloneShallow", O(rw, e)), $y(t.CHANGABLE_METHODS, function (i) {
                t.wrapMethod(i, O(ow, e))
            }), X(i[t.dataType] === t)
        }

        function nw(e, t) {
            if (function (e) {
                return e[tw] === e
            }(this)) {
                var i = w({}, this[ew]);
                sw(i[this.dataType] = t, i, e)
            } else lw(t, this.dataType, this[tw], e);
            return t
        }

        function ow(e, t) {
            return e.struct && e.struct.update(this), t
        }

        function rw(e, t) {
            return $y(t[ew], function (i, n) {
                i !== t && lw(i.cloneShallow(), n, t, e)
            }), t
        }

        function aw(e) {
            var t = this[tw];
            return null == e || null == t ? t : t[ew][e]
        }

        function sw(e, t, i) {
            e[ew] = {}, $y(t, function (t, n) {
                lw(t, n, e, i)
            })
        }

        function lw(e, t, i, n) {
            (i[ew][t] = e)[tw] = i, e.dataType = t, n.struct && (e[n.structAttr] = n.struct, n.struct[n.datasAttr[t]] = e), e.getLinkedData = aw
        }

        function dw(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 uw(e, t) {
            this.root, this.data, this._nodes = [], this.hostModel = e, this.levelModels = D(t || [], function (t) {
                return new Cl(t, e, e.ecModel)
            })
        }

        function cw(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 r = t[i];
                        r.hierNode.prelim += n, r.hierNode.modifier += n, o += r.hierNode.change, n += r.hierNode.shift + o
                    }
                }(e);
                var r = (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 - r) : e.hierNode.prelim = r
            } 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, r = e, a = r.parentNode.children[0], s = t, l = o.hierNode.modifier, d = r.hierNode.modifier, u = a.hierNode.modifier, c = s.hierNode.modifier; s = gw(s), r = mw(r), s && r;) {
                        o = gw(o), a = mw(a), o.hierNode.ancestor = e;
                        var h = s.hierNode.prelim + c - r.hierNode.prelim - d + n(s, r);
                        0 < h && (vw((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 += r.hierNode.modifier, l += o.hierNode.modifier, u += a.hierNode.modifier
                    }
                    s && !gw(o) && (o.hierNode.thread = s, o.hierNode.modifier += c - l), r && !mw(a) && (a.hierNode.thread = r, a.hierNode.modifier += d - u, i = e)
                }
                var f, p, g;
                return i
            }(e, o, e.parentNode.hierNode.defaultAncestor || n[0], t)
        }

        function hw(e) {
            var t = e.hierNode.prelim + e.parentNode.hierNode.modifier;
            e.setLayout({x: t}, !0), e.hierNode.modifier += e.parentNode.hierNode.modifier
        }

        function fw(e) {
            return arguments.length ? e : yw
        }

        function pw(e, t) {
            var i = {};
            return e -= Math.PI / 2, i.x = t * Math.cos(e), i.y = t * Math.sin(e), i
        }

        function gw(e) {
            var t = e.children;
            return t.length && e.isExpand ? t[t.length - 1] : e.hierNode.thread
        }

        function mw(e) {
            var t = e.children;
            return t.length && e.isExpand ? t[0] : e.hierNode.thread
        }

        function vw(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 yw(e, t) {
            return e.parentNode === t.parentNode ? 1 : 2
        }

        dw.prototype = {
            constructor: dw, 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", r = this[e.attr || "children"];
                "preorder" === o && (n = t.call(i, this));
                for (var a = 0; !n && a < r.length; a++) r[a].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)
            }
        }, uw.prototype = {
            constructor: uw, 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()
            }
        }, uw.createTree = function (e, t, i, n) {
            var o = new uw(t, i && i.levels), r = [], a = 1;
            !function e(t, i) {
                var n = t.value;
                a = Math.max(a, M(n) ? n.length : 1), r.push(t);
                var s = new dw(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(r, {coordDimensions: ["value"], dimensionsCount: a}), l = new Vf(s, t);
            return l.initData(r), n && n(l), iw({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 Cl(e.leaves || {}, this, this.ecModel),
                    n = uw.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 r = 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 <= r
                }), 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(), r = n.name; n && n !== i;) r = n.parentNode.name + "." + r, n = n.parentNode;
                return $l(r + (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 ww = Cs({
            shape: {parentPoint: [], childPoints: [], orient: "", forkPosition: ""},
            style: {stroke: "#000", fill: null},
            buildPath: function (e, t) {
                var i = t.childPoints, n = i.length, o = t.parentPoint, r = i[0], a = i[n - 1];
                if (1 === n) return e.moveTo(o[0], o[1]), void e.lineTo(r[0], r[1]);
                var s = t.orient, l = "TB" === s || "BT" === s ? 0 : 1, d = 1 - l, u = Nl(t.forkPosition, 1), c = [];
                c[l] = o[l], c[d] = o[d] + (a[d] - o[d]) * u, e.moveTo(o[0], o[1]), e.lineTo(c[0], c[1]), e.moveTo(r[0], r[1]), c[l] = r[l], e.lineTo(c[0], c[1]), c[l] = a[l], e.lineTo(c[0], c[1]), e.lineTo(a[0], a[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 kw(e, t) {
            var i = e.getItemLayout(t);
            return i && !isNaN(i.x) && !isNaN(i.y) && "none" !== e.getItemVisual(t, "symbol")
        }

        function Tw(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 bw(e, t, i, n, o, r) {
            var a = !i, s = e.tree.getNodeByDataIndex(t), l = s.getModel(), d = (r = Tw(s, l, r), 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();
            a ? (i = new Mg(e, t, r)).attr("position", [f.x, f.y]) : i.updateData(e, t, r), i.__radialOldRawX = i.__radialRawX, i.__radialOldRawY = i.__radialRawY, i.__radialRawX = p.rawX, i.__radialRawY = p.rawY, n.add(i), e.setItemGraphicEl(t, i), rl(i, {position: [p.x, p.y]}, o);
            var g = i.getSymbolPath();
            if ("radial" === r.layout) {
                var m, v, y = d.children[0], w = y.getLayout(), T = y.children.length;
                if (p.x === w.x && !0 === s.isExpand) {
                    var b = {};
                    b.x = (y.children[0].getLayout().x + y.children[T - 1].getLayout().x) / 2, b.y = (y.children[0].getLayout().y + y.children[T - 1].getLayout().y) / 2, (m = Math.atan2(b.y - w.y, b.x - w.x)) < 0 && (m = 2 * Math.PI + m), (v = b.x < w.x) && (m -= Math.PI)
                } else (m = Math.atan2(p.y - w.y, p.x - w.x)) < 0 && (m = 2 * Math.PI + m), 0 === s.children.length || 0 !== s.children.length && !1 === s.isExpand ? (v = p.x < w.x) && (m -= Math.PI) : (v = p.x > w.x) || (m -= Math.PI);
                var C = v ? "left" : "right", S = r.labelModel.get("rotate"), I = S * (Math.PI / 180);
                g.setStyle({
                    textPosition: r.labelModel.get("position") || C,
                    textRotation: null == S ? -m : I,
                    textOrigin: "center",
                    verticalAlign: "middle"
                })
            }
            !function (e, t, i, n, o, r, a, s, l) {
                var d = l.edgeShape, u = n.__edge;
                if ("curve" === d) t.parentNode && t.parentNode !== i && rl(u = u || (n.__edge = new as({
                    shape: Sw(l, o, o),
                    style: k({opacity: 0, strokeNoScale: !0}, l.lineStyle)
                })), {
                    shape: Sw(l, r, a),
                    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])
                    }
                    rl(u = u || (n.__edge = new ww({
                        shape: {
                            parentPoint: [a.x, a.y],
                            childPoints: [[a.x, a.y]],
                            orient: l.orient,
                            forkPosition: l.edgeForkPosition
                        }, style: k({opacity: 0, strokeNoScale: !0}, l.lineStyle)
                    })), {shape: {parentPoint: [a.x, a.y], childPoints: h}, style: {opacity: 1}}, e)
                }
                s.add(u)
            }(o, s, d, i, f, h, p, n, r)
        }

        function Cw(e, t, i, n, o, r) {
            for (var a, s = e.tree.getNodeByDataIndex(t), l = e.tree.root, d = s.getModel(), u = (r = Tw(s, d, r), s.parentNode === l ? s : s.parentNode || s), c = r.edgeShape; null == (a = u.getLayout());) u = u.parentNode === l ? u : u.parentNode || u;
            rl(i, {position: [a.x + 1, a.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 = r.edgeShape, f && ("curve" === c ? rl(f, {shape: Sw(r, a, a), style: {opacity: 0}}, o, function () {
                n.remove(f)
            }) : "polyline" === c && "orthogonal" === r.layout && rl(f, {
                shape: {
                    parentPoint: [a.x, a.y],
                    childPoints: [[a.x, a.y]]
                }, style: {opacity: 0}
            }, o, function () {
                n.remove(f)
            }))
        }

        function Sw(e, t, i) {
            var n, o, r, a, 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, r = l + (s - l) * e.curvature, a = u), "TB" !== c && "BT" !== c || (n = s, o = d + (u - d) * e.curvature, r = l, a = u + (d - u) * e.curvature), {
                x1: s,
                y1: d,
                x2: l,
                y2: u,
                cpx1: n,
                cpy1: o,
                cpx2: r,
                cpy2: a
            };
            s = t.rawX, d = t.rawY, l = i.rawX, u = i.rawY;
            var h = pw(s, d), f = pw(s, d + (u - d) * e.curvature), p = pw(l, u + (d - u) * e.curvature), g = pw(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 Iw(e, t) {
            for (var i, n = [e]; i = n.pop();) if (t(i), i.isExpand) {
                var o = i.children;
                if (o.length) for (var r = o.length - 1; 0 <= r; r--) n.push(o[r])
            }
        }

        function _w(e, t, i) {
            if (e && 0 <= C(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 r = e.targetNodeId;
                if (null != r && (o = n.getNodeById(r))) return {node: o}
            }
        }

        function Aw(e) {
            for (var t = []; e;) (e = e.parentNode) && t.push(e);
            return t.reverse()
        }

        function Dw(e, t) {
            return 0 <= C(Aw(e), t)
        }

        function xw(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
        }

        bf({
            type: "tree", init: function (e, t) {
                this._oldTree, this._mainGroup = new Di, this._controller = new Cy(t.getZr()), this._controllerHost = {target: this.group}, this.group.add(this._mainGroup)
            }, render: function (e, t, i, n) {
                var o = e.getData(), r = e.layoutInfo, a = this._mainGroup, s = e.get("layout");
                "radial" === s ? a.attr("position", [r.x + r.width / 2, r.y + r.height / 2]) : a.attr("position", [r.x, r.y]), this._updateViewCoordSys(e, r, 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) {
                    kw(o, t) && bw(o, t, null, a, e, d)
                }).update(function (t, i) {
                    var n = l.getItemGraphicEl(i);
                    kw(o, t) ? bw(o, t, n, a, e, d) : n && Cw(l, i, n, a, e, d)
                }).remove(function (t) {
                    var i = l.getItemGraphicEl(t);
                    i && Cw(l, t, i, a, 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 = [];
                Lr(i, n, o);
                var r = this._min, a = this._max;
                o[0] - n[0] == 0 && (n[0] = r ? r[0] : n[0] - 1, o[0] = a ? a[0] : o[0] + 1), o[1] - n[1] == 0 && (n[1] = r ? r[1] : n[1] - 1, o[1] = a ? a[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, r = this.group;
                n.setPointerChecker(function (t, n, o) {
                    var a = r.getBoundingRect();
                    return a.applyTransform(r.transform), a.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) {
                    Py(o, t.dx, t.dy), i.dispatchAction({seriesId: e.id, type: "treeRoam", dx: t.dx, dy: t.dy})
                }, this).on("zoom", function (t) {
                    Oy(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 = jy(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, r = 0, a = null;
                    a = "radial" === n ? (o = 2 * Math.PI, r = Math.min(i.height, i.width) / 2, fw(function (e, t) {
                        return (e.parentNode === t.parentNode ? 1 : 2) / e.depth
                    })) : (o = i.width, r = i.height, fw());
                    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 r = i[o];
                                r.hierNode = {
                                    defaultAncestor: null,
                                    ancestor: r,
                                    prelim: 0,
                                    modifier: 0,
                                    change: 0,
                                    shift: 0,
                                    i: o,
                                    thread: null
                                }, n.push(r)
                            }
                        }(s), function (e, t, i) {
                            for (var n, o = [e], r = []; n = o.pop();) if (r.push(n), n.isExpand) {
                                var a = n.children;
                                if (a.length) for (var s = 0; s < a.length; s++) o.push(a[s])
                            }
                            for (; n = r.pop();) t(n, i)
                        }(l, cw, a), s.hierNode.modifier = -l.hierNode.prelim, Iw(l, hw);
                        var d = l, u = l, c = l;
                        Iw(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 : a(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 = r / (c.depth - 1 || 1), Iw(l, function (e) {
                            m = (e.getLayout().x + f) * p, v = (e.depth - 1) * g;
                            var t = pw(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 = r / (u.getLayout().x + h + f), p = o / (c.depth - 1 || 1), Iw(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 = r / (c.depth - 1 || 1), Iw(l, function (e) {
                                m = (e.getLayout().x + f) * p, v = "TB" === y ? (e.depth - 1) * g : r - (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;
                    A(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 = D((n = e.levels = function (e, t) {
                    var i, n = t.get("color");
                    if (n) return A(e = e || [], function (e) {
                        var t = new Cl(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 Cl(e, this, t)
                }, this), r = uw.createTree(i, this, null, function (e) {
                    e.wrapMethod("getItemModel", function (e, t) {
                        var i = r.getNodeByDataIndex(t), n = o[i.depth];
                        return n && (e.parentModel = n), e
                    })
                });
                return r.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 = xw(i, this), t
            },
            setLayoutInfo: function (e) {
                this.layoutInfo = this.layoutInfo || {}, w(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 Nw = 5;

        function Ew(e) {
            this.group = new Di, e.add(this.group)
        }

        function Pw(e, t, i, n, o, r) {
            var a = [[o ? e : e - Nw, t], [e + i, t], [e + i, t + n], [o ? e : e - Nw, t + n]];
            return r || a.splice(2, 0, [e + i + Nw, t + n / 2]), o || a.push([e, t + n / 2]), a
        }

        function Ow(e) {
            var t = jw(e);
            return t.stroke = t.fill = t.lineWidth = null, t
        }

        Ew.prototype = {
            constructor: Ew, render: function (e, t, i, n) {
                var o = e.getModel("breadcrumb"), r = this.group;
                if (r.removeAll(), o.get("show") && i) {
                    var a = o.getModel("itemStyle"), s = a.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, a, s, n), vd(r, l.pos, l.box)
                }
            }, _prepare: function (e, t, i) {
                for (var n = e; n; n = n.parentNode) {
                    var o = n.getModel().get("name"), r = i.getTextRect(o),
                        a = Math.max(r.width + 16, t.emptyItemWidth);
                    t.totalWidth += a + 8, t.renderList.push({node: n, text: o, width: a})
                }
            }, _renderContent: function (e, t, i, n, o) {
                for (var r, a, s = 0, l = t.emptyItemWidth, d = e.get("breadcrumb.height"), u = function (e, t, i) {
                    var n = t.width, o = t.height, r = Nl(e.x, n), a = Nl(e.y, o), s = Nl(e.x2, n), l = Nl(e.y2, o);
                    return (isNaN(r) || isNaN(parseFloat(e.x))) && (r = 0), (isNaN(s) || isNaN(parseFloat(e.x2))) && (s = n), (isNaN(a) || isNaN(parseFloat(e.y))) && (a = 0), (isNaN(l) || isNaN(parseFloat(e.y2))) && (l = o), i = Jl(i || 0), {
                        width: Math.max(s - r - i[1] - i[3], 0),
                        height: Math.max(l - a - 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 Xa({
                        shape: {points: Pw(s, 0, m, d, f === h.length - 1, 0 === f)},
                        style: k(i.getItemStyle(), {
                            lineJoin: "bevel",
                            text: v,
                            textFill: n.getTextColor(),
                            textFont: n.getFont()
                        }),
                        z: 10,
                        onclick: O(o, g)
                    });
                    this.group.add(y), r = e, a = g, y.eventData = {
                        componentType: "series",
                        componentSubType: "treemap",
                        componentIndex: r.componentIndex,
                        seriesIndex: r.componentIndex,
                        seriesName: r.name,
                        seriesType: "treemap",
                        selfType: "breadcrumb",
                        nodeData: {dataIndex: a && a.dataIndex, name: a && a.name},
                        treePathInfo: a && xw(a, r)
                    }, s += m + 8
                }
            }, remove: function () {
                this.group.removeAll()
            }
        };
        var Mw = P, Fw = Di, Lw = es, Rw = A, Bw = ["label"], Uw = ["emphasis", "label"], Vw = ["upperLabel"],
            Kw = ["emphasis", "upperLabel"], Ww = 10,
            jw = or([["fill", "color"], ["stroke", "strokeColor"], ["lineWidth", "strokeWidth"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]);

        function Gw(e, t, i, n, o, r, a, s, l, d) {
            if (a) {
                var u = a.getLayout(), c = e.getData();
                if (c.setItemGraphicEl(a.dataIndex, null), u && u.isInView) {
                    var h = u.width, f = u.height, p = u.borderWidth, g = u.invisible, v = a.getRawIndex(),
                        y = s && s.getRawIndex(), k = a.viewChildren, T = u.upperHeight, b = k && k.length,
                        C = a.getModel("itemStyle"), S = a.getModel("emphasis.itemStyle"), I = P("nodeGroup", Fw);
                    if (I) {
                        if (l.add(I), I.attr("position", [u.x || 0, u.y || 0]), I.__tmNodeWidth = h, I.__tmNodeHeight = f, u.isAboveViewRoot) return I;
                        var _ = a.getModel(), A = P("background", Lw, d, 1);
                        if (A && function (t, i, n) {
                            if (i.dataIndex = a.dataIndex, i.seriesIndex = e.seriesIndex, i.setShape({
                                x: 0,
                                y: 0,
                                width: h,
                                height: f
                            }), g) x(i); else {
                                i.invisible = !1;
                                var o = a.getVisual("borderColor", !0), r = S.get("borderColor"), s = Ow(C);
                                s.fill = o;
                                var l = jw(S);
                                if (l.fill = r, n) {
                                    var d = h - 2 * p;
                                    N(s, l, o, d, T, {x: p, y: 0, width: d, height: T})
                                } else s.text = l.text = null;
                                i.setStyle(s), Us(i, l)
                            }
                            t.add(i)
                        }(I, A, b && u.upperLabelHeight), b) Xs(I) && zs(I, !1), A && (zs(A, !0), c.setItemGraphicEl(a.dataIndex, A)); else {
                            var D = P("content", Lw, d, 2);
                            D && function (t, i) {
                                i.dataIndex = a.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) x(i); else {
                                    i.invisible = !1;
                                    var r = a.getVisual("color", !0), s = Ow(C);
                                    s.fill = r;
                                    var l = jw(S);
                                    N(s, l, r, n, o), i.setStyle(s), Us(i, l)
                                }
                                t.add(i)
                            }(I, D), A && Xs(A) && zs(A, !1), zs(I, !0), c.setItemGraphicEl(a.dataIndex, I)
                        }
                        return I
                    }
                }
            }

            function x(e) {
                e.invisible || r.push(e)
            }

            function N(t, i, n, o, r, s) {
                var l = _.get("name"), d = _.getModel(s ? Vw : Bw), c = _.getModel(s ? Kw : Uw),
                    h = d.getShallow("show");
                Ys(t, i, d, c, {
                    defaultText: h ? l : null,
                    autoColor: n,
                    isRectText: !0,
                    labelFetcher: e,
                    labelDataIndex: a.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: r,
                    minChar: 2
                } : null
            }

            function E(t, i, n) {
                var o = t.text;
                if (!i && n.isLeafRoot && null != o) {
                    var r = e.get("drillDownIcon", !0);
                    t.text = r ? r + " " + o : o
                }
            }

            function P(e, r, 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() : w({}, t.shape)
                }(u, d, e)) : g || ((d = new r({
                    z: function (e, t) {
                        var i = e * Ww + t;
                        return (i - 1) / i
                    }(s, l)
                })).__tmDepth = s, function (e, t, i) {
                    var r = e[v] = {}, s = a.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), r.old = "nodeGroup" === i ? [0, d] : {
                            x: l,
                            y: d,
                            width: 0,
                            height: 0
                        }
                    }
                    r.fadein = "nodeGroup" !== i
                }(u, 0, d.__tmStorageName = e)), t[e][v] = d
            }
        }

        bf({
            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 (!(C(t.findComponents({mainType: "series", subType: "treemap", query: n}), e) < 0)) {
                    this.seriesModel = e, this.api = i, this.ecModel = t;
                    var o = _w(n, ["treemapZoomToNode", "treemapRootToNode"], e), r = n && n.type, a = e.layoutInfo,
                        s = !this._oldTree, l = this._storage, d = "treemapRootToNode" === r && o && l ? {
                            rootNodeGroup: l.nodeGroup[o.node.getRawIndex()],
                            direction: n.direction
                        } : null, u = this._giveContainerGroup(a), c = this._doRender(u, e, d);
                    s || r && "treemapZoomToNode" !== r && "treemapRootToNode" !== r ? 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 Fw, 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, r = {nodeGroup: [], background: [], content: []},
                    a = {nodeGroup: [], background: [], content: []}, s = this._storage, l = [],
                    d = O(Gw, t, a, s, i, r, l);
                !function e(t, i, n, o, r) {
                    function a(e) {
                        return e.getId()
                    }

                    function s(a, s) {
                        var l = null != a ? t[a] : null, u = null != s ? i[s] : null, c = d(l, u, n, r);
                        c && e(l && l.viewChildren || [], u && u.viewChildren || [], c, o, r + 1)
                    }

                    o ? Rw(i = t, function (e, t) {
                        e.isRemoved() || s(t, t)
                    }) : new Sf(i, t, a, a).add(s).update(s).remove(O(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) && Rw(u, function (e, t) {
                    var i = c[t];
                    Rw(e, function (e) {
                        e && (i.push(e), e.__tmWillDelete = 1)
                    })
                }), c);
                return this._oldTree = n, this._storage = a, {
                    lastsForAnimation: r,
                    willDeleteEls: h,
                    renderFinally: function () {
                        Rw(h, function (e) {
                            Rw(e, function (e) {
                                e.parent && e.parent.remove(e)
                            })
                        }), Rw(l, function (e) {
                            e.invisible = !0, e.dirty()
                        })
                    }
                }
            }, _doAnimation: function (e, t, i, n) {
                if (i.get("animation")) {
                    var o = i.get("animationDurationUpdate"), r = i.get("animationEasing"), a = function () {
                        var e, t = [], i = {};
                        return {
                            add: function (e, n, o, r, a) {
                                return L(r) && (a = r, r = 0), !i[e.id] && (i[e.id] = 1, t.push({
                                    el: e,
                                    target: n,
                                    time: o,
                                    delay: r,
                                    easing: a
                                }), !0)
                            }, done: function (t) {
                                return e = t, this
                            }, start: function () {
                                for (var n = t.length, o = 0, r = t.length; o < r; o++) {
                                    var a = t[o];
                                    a.el.animateTo(a.target, a.time, a.delay, a.easing, s)
                                }
                                return this;

                                function s() {
                                    --n || (t.length = 0, i = {}, e && e())
                                }
                            }
                        }
                    }();
                    Rw(t.willDeleteEls, function (e, t) {
                        Rw(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 && a.add(e, s, o, r)
                            }
                        })
                    }), Rw(this._storage, function (e, i) {
                        Rw(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 = w({}, e.shape), e.setShape(s.old)), s.fadein ? (e.setStyle("opacity", 0), l.style = {opacity: 1}) : 1 !== e.style.opacity && (l.style = {opacity: 1})), a.add(e, l, o, r))
                        })
                    }, this), this._state = "animating", a.done(Mw(function () {
                        this._state = "ready", t.renderFinally()
                    }, this)).start()
                }
            }, _resetController: function (e) {
                var t = this._controller;
                t || ((t = this._controller = new Cy(e.getZr())).enable(this.seriesModel.get("roam")), t.on("pan", Mw(this._onPan, this)), t.on("zoom", Mw(this._onZoom, this)));
                var i = new Ai(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 r = new Ai(o.x, o.y, o.width, o.height), a = this.seriesModel.layoutInfo;
                    t -= a.x, i -= a.y;
                    var s = rt();
                    dt(s, s, [-t, -i]), ct(s, s, [e.scale, e.scale]), dt(s, s, [t, i]), r.applyTransform(s), this.api.dispatchAction({
                        type: "treemapRender",
                        from: this.uid,
                        seriesId: this.seriesModel.id,
                        rootRect: {x: r.x, y: r.y, width: r.width, height: r.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), r = o.get("link", !0),
                                        a = o.get("target", !0) || "blank";
                                    r && dd(r, a)
                                }
                            }
                        }
                    }
                }, 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 Ew(this.group))).render(e, t, i.node, Mw(function (t) {
                    "animating" !== this._state && (Dw(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 r = o.transformCoordToLocal(e, t), a = o.shape;
                        if (!(a.x <= r[0] && r[0] <= a.x + a.width && a.y <= r[1] && r[1] <= a.y + a.height)) return !1;
                        i = {node: n, offsetX: r[0], offsetY: r[1]}
                    }
                }, this), i
            }
        });
        for (var Hw = function () {
        }, zw = ["treemapZoomToNode", "treemapRender", "treemapMove"], Xw = 0; Xw < zw.length; Xw++) ff({
            type: zw[Xw],
            update: "updateView"
        }, Hw);
        ff({type: "treemapRootToNode", update: "updateView"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "treemap", query: e}, function (t, i) {
                var n = _w(e, ["treemapZoomToNode", "treemapRootToNode"], t);
                if (n) {
                    var o = t.getViewRoot();
                    o && (e.direction = Dw(o, n.node) ? "rollUp" : "drillDown"), t.resetViewRoot(n.node)
                }
            })
        });
        var qw = A, Yw = R, Jw = -1, Zw = function (e) {
            var t = e.mappingMethod, i = e.type, n = this.option = m(e);
            this.type = i, this.mappingMethod = t, this._normalizeData = lk[t];
            var o = Qw[i];
            this.applyVisual = o.applyVisual, this.getColorMapper = o.getColorMapper, this._doMap = o._doMap[t], "piecewise" === t ? ($w(n), function (e) {
                var t = e.pieceList;
                e.hasSpecialVisual = !1, A(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 (qw(t, function (e, t) {
                    n[e] = t
                }), !M(i)) {
                    var o = [];
                    R(i) ? qw(i, function (e, t) {
                        var i = n[t];
                        o[null != i ? i : Jw] = e
                    }) : o[Jw] = i, i = sk(e, o)
                }
                for (var r = t.length - 1; 0 <= r; r--) null == i[r] && (delete n[t[r]], t.pop())
            }(n) : $w(n, !0) : (X("linear" !== t || n.dataExtent), $w(n))
        };
        Zw.prototype = {
            constructor: Zw, mapValueToVisual: function (e) {
                var t = this._normalizeData(e);
                return this._doMap(t, e)
            }, getNormalizer: function () {
                return P(this._normalizeData, this)
            }
        };
        var Qw = Zw.visualHandlers = {
            color: {
                applyVisual: ik("color"), getColorMapper: function () {
                    var e = this.option;
                    return P("category" === e.mappingMethod ? function (e, t) {
                        return t || (e = this._normalizeData(e)), nk.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: nk, piecewise: function (e, t) {
                        var i = ak.call(this, t);
                        return null == i && (i = Zt(Ht(e, this.option.parsedVisual), "rgba")), i
                    }, fixed: ok
                }
            },
            colorHue: ek(function (e, t) {
                return Yt(e, t)
            }),
            colorSaturation: ek(function (e, t) {
                return Yt(e, null, t)
            }),
            colorLightness: ek(function (e, t) {
                return Yt(e, null, null, t)
            }),
            colorAlpha: ek(function (e, t) {
                return Jt(e, t)
            }),
            opacity: {applyVisual: ik("opacity"), _doMap: rk([0, 1])},
            liftZ: {applyVisual: ik("liftZ"), _doMap: {linear: ok, category: ok, piecewise: ok, fixed: ok}},
            symbol: {
                applyVisual: function (e, t, i) {
                    var n = this.mapValueToVisual(e);
                    if (L(n)) i("symbol", n); else if (Yw(n)) for (var o in n) n.hasOwnProperty(o) && i(o, n[o])
                }, _doMap: {
                    linear: tk, category: nk, piecewise: function (e, t) {
                        var i = ak.call(this, t);
                        return null == i && (i = tk.call(this, e)), i
                    }, fixed: ok
                }
            },
            symbolSize: {applyVisual: ik("symbolSize"), _doMap: rk([0, 1])}
        };

        function $w(e, t) {
            var i = e.visual, n = [];
            R(i) ? qw(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]), sk(e, n)
        }

        function ek(e) {
            return {
                applyVisual: function (t, i, n) {
                    t = this.mapValueToVisual(t), n("color", e(i("color"), t))
                }, _doMap: rk([0, 1])
            }
        }

        function tk(e) {
            var t = this.option.visual;
            return t[Math.round(xl(e, [0, 1], [0, t.length - 1], !0))] || {}
        }

        function ik(e) {
            return function (t, i, n) {
                n(e, this.mapValueToVisual(t))
            }
        }

        function nk(e) {
            var t = this.option.visual;
            return t[this.option.loop && e !== Jw ? e % t.length : e]
        }

        function ok() {
            return this.option.visual[0]
        }

        function rk(e) {
            return {
                linear: function (t) {
                    return xl(t, e, this.option.visual, !0)
                }, category: nk, piecewise: function (t, i) {
                    var n = ak.call(this, i);
                    return null == n && (n = xl(t, e, this.option.visual, !0)), n
                }, fixed: ok
            }
        }

        function ak(e) {
            var t = this.option, i = t.pieceList;
            if (t.hasSpecialVisual) {
                var n = i[Zw.findPieceIndex(e, i)];
                if (n && n.visual) return n.visual[this.type]
            }
        }

        function sk(e, t) {
            return e.visual = t, "color" === e.type && (e.parsedVisual = D(t, function (e) {
                return Kt(e)
            })), t
        }

        var lk = {
            linear: function (e) {
                return xl(e, this.option.dataExtent, [0, 1], !0)
            }, piecewise: function (e) {
                var t = this.option.pieceList, i = Zw.findPieceIndex(e, t, !0);
                if (null != i) return xl(i, [0, t.length - 1], [0, 1], !0)
            }, category: function (e) {
                var t = this.option.categories ? this.option.categoryMap[e] : e;
                return null == t ? Jw : t
            }, fixed: te
        };

        function dk(e, t, i) {
            return e ? t <= i : t < i
        }

        Zw.listVisualTypes = function () {
            var e = [];
            return A(Qw, function (t, i) {
                e.push(i)
            }), e
        }, Zw.addVisualHandler = function (e, t) {
            Qw[e] = t
        }, Zw.isValidType = function (e) {
            return Qw.hasOwnProperty(e)
        }, Zw.eachVisual = function (e, t, i) {
            R(e) ? A(e, t, i) : t.call(i, e)
        }, Zw.mapVisual = function (e, t, i) {
            var n, o = M(e) ? [] : R(e) ? {} : (n = !0, null);
            return Zw.eachVisual(e, function (e, r) {
                var a = t.call(i, e, r);
                n ? o = a : o[r] = a
            }), o
        }, Zw.retrieveVisuals = function (e) {
            var t, i = {};
            return e && qw(Qw, function (n, o) {
                e.hasOwnProperty(o) && (i[o] = e[o], t = !0)
            }), t ? i : null
        }, Zw.prepareVisualTypes = function (e) {
            if (Yw(e)) {
                var t = [];
                qw(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
        }, Zw.dependsOn = function (e, t) {
            return "color" === t ? !(!e || 0 !== e.indexOf(t)) : e === t
        }, Zw.findPieceIndex = function (e, t, i) {
            for (var n, o = 1 / 0, r = 0, a = t.length; r < a; r++) {
                var s = t[r].value;
                if (null != s) {
                    if (s === e || "string" == typeof s && s === e + "") return r;
                    i && c(s, r)
                }
            }
            for (r = 0, a = t.length; r < a; r++) {
                var l = t[r], d = l.interval, u = l.close;
                if (d) {
                    if (d[0] === -1 / 0) {
                        if (dk(u[1], e, d[1])) return r
                    } else if (d[1] === 1 / 0) {
                        if (dk(u[0], d[0], e)) return r
                    } else if (dk(u[0], d[0], e) && dk(u[1], e, d[1])) return r;
                    i && c(d[0], r), i && c(d[1], r)
                }
            }
            if (i) return e === 1 / 0 ? t.length - 1 : e === -1 / 0 ? 0 : n;

            function c(t, i) {
                var r = Math.abs(t - e);
                r < o && (o = r, n = i)
            }
        };
        var uk = M, ck = "itemStyle", hk = {
            seriesType: "treemap", reset: function (e, t, i, n) {
                var o = e.getData().tree, r = o.root, a = e.getModel(ck);
                r.isRemoved() || function e(t, i, n, o, r, a) {
                    var s = t.getModel(), l = t.getLayout();
                    if (l && !l.invisible && l.isInView) {
                        var d, u, c = t.getModel(ck), h = n[t.depth], f = function (e, t, i, n) {
                            var o = w({}, t);
                            return A(["color", "colorAlpha", "colorSaturation"], function (r) {
                                var a = e.get(r, !0);
                                null == a && i && (a = i[r]), null == a && (a = t[r]), null == a && (a = n.get(r)), null != a && (o[r] = a)
                            }), o
                        }(c, i, h, o), p = c.get("borderColor"), g = c.get("borderColorSaturation");
                        null != g && (d = fk(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, r) {
                                if (r && r.length) {
                                    var a = gk(t, "color") || null != o.color && "none" !== o.color && (gk(t, "colorAlpha") || gk(t, "colorSaturation"));
                                    if (a) {
                                        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: a.name, dataExtent: d, visual: a.range};
                                        "color" !== c.type || "index" !== u && "id" !== u ? c.mappingMethod = "linear" : (c.mappingMethod = "category", c.loop = !0);
                                        var h = new Zw(c);
                                        return h.__drColorMappingBy = u, h
                                    }
                                }
                            }(0, s, l, 0, f, m);
                            A(m, function (t, i) {
                                if (t.depth >= r.length || t === r[t.depth]) {
                                    var l = function (e, t, i, n, o, r) {
                                        var a = w({}, t);
                                        if (o) {
                                            var s = o.type, l = "color" === s && o.__drColorMappingBy,
                                                d = "index" === l ? n : "id" === l ? r.mapIdToIndex(i.getId()) : i.getValue(e.get("visualDimension"));
                                            a[s] = o.mapValueToVisual(d)
                                        }
                                        return a
                                    }(s, f, t, i, v, a);
                                    e(t, l, n, o, r, a)
                                }
                            })
                        } else d = fk(f), t.setVisual("color", d)
                    }
                }(r, {}, D(o.levelModels, function (e) {
                    return e ? e.get(ck) : null
                }), a, e.getViewRoot().getAncestors(), e)
            }
        };

        function fk(e) {
            var t = pk(e, "color");
            if (t) {
                var i = pk(e, "colorAlpha"), n = pk(e, "colorSaturation");
                return n && (t = Yt(t, null, null, n)), i && (t = Jt(t, i)), t
            }
        }

        function pk(e, t) {
            var i = e[t];
            if (null != i && "none" !== i) return i
        }

        function gk(e, t) {
            var i = e.get(t);
            return uk(i) && i.length ? {name: t, range: i} : null
        }

        var mk = Math.max, vk = Math.min, yk = W, wk = A, kk = ["itemStyle", "borderWidth"],
            Tk = ["itemStyle", "gapWidth"], bk = ["upperLabel", "show"], Ck = ["upperLabel", "height"], Sk = {
                seriesType: "treemap", reset: function (e, t, i, n) {
                    var o = i.getWidth(), r = i.getHeight(), a = e.option,
                        s = md(e.getBoxLayoutParams(), {width: i.getWidth(), height: i.getHeight()}), l = a.size || [],
                        d = Nl(yk(s.width, l[0]), o), u = Nl(yk(s.height, l[1]), r), c = n && n.type,
                        h = _w(n, ["treemapZoomToNode", "treemapRootToNode"], e),
                        f = "treemapRender" === c || "treemapMove" === c ? n.rootRect : null, p = e.getViewRoot(),
                        g = Aw(p);
                    if ("treemapMove" !== c) {
                        var m = "treemapZoomToNode" === c ? function (e, t, i, n, o) {
                            var r, a = (t || {}).node, s = [n, o];
                            if (!a || a === i) return s;
                            for (var l = n * o, d = l * e.option.zoomToNodeRatio; r = a.parentNode;) {
                                for (var u = 0, c = r.children, h = 0, f = c.length; h < f; h++) u += c[h].getValue();
                                var p = a.getValue();
                                if (0 === p) return s;
                                d *= u / p;
                                var g = r.getModel(), m = g.get(kk), v = Math.max(m, Dk(g));
                                d += 4 * m * m + (3 * m + v) * Math.pow(d, .5), Rl < d && (d = Rl), a = r
                            }
                            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 = a.sort;
                        v && "asc" !== v && "desc" !== v && (v = "desc");
                        var y = {squareRatio: a.squareRatio, sort: v, leafDepth: a.leafDepth};
                        p.hostTree.clearLayouts();
                        var k = {x: 0, y: 0, width: m[0], height: m[1], area: m[0] * m[1]};
                        p.setLayout(k), function e(t, i, n, o) {
                            var r, a;
                            if (!t.isRemoved()) {
                                var s = t.getLayout();
                                r = s.width, a = s.height;
                                var l = t.getModel(), d = l.get(kk), u = l.get(Tk) / 2, c = Dk(l), h = Math.max(d, c),
                                    f = d - u, p = h - u, l = t.getModel();
                                t.setLayout({
                                    borderWidth: d,
                                    upperHeight: h,
                                    upperLabelHeight: c
                                }, !0), r = mk(r - 2 * f, 0), a = mk(a - f - p, 0);
                                var g = r * a, m = Ik(t, l, g, i, n, o);
                                if (m.length) {
                                    var v = {x: f, y: p, width: r, height: a}, y = vk(r, a), w = 1 / 0, k = [];
                                    k.area = 0;
                                    for (var T = 0, b = m.length; T < b;) {
                                        var C = m[T];
                                        k.push(C), k.area += C.getLayout().area;
                                        var S = _k(k, y, i.squareRatio);
                                        w = S <= w ? (T++, S) : (k.area -= k.pop().getLayout().area, Ak(k, y, v, u, !1), y = vk(v.width, v.height), k.length = k.area = 0, 1 / 0)
                                    }
                                    if (k.length && Ak(k, y, v, u, !0), !n) {
                                        var I = l.get("childrenVisibleMin");
                                        null != I && g < I && (n = !0)
                                    }
                                    for (var T = 0, b = m.length; T < b; T++) e(m[T], i, n, o + 1)
                                }
                            }
                        }(p, y, !1, 0), k = p.getLayout(), wk(g, function (e, t) {
                            var i = (g[t + 1] || p).getValue();
                            e.setLayout(w({dataExtent: [i, i], borderWidth: 0, upperHeight: 0}, k))
                        })
                    }
                    var T = e.getData().tree.root;
                    T.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, r = o.getLayout();
                        if (!r) return n;
                        for (var a = [r.width / 2, r.height / 2], s = o; s;) {
                            var l = s.getLayout();
                            a[0] += l.x, a[1] += l.y, s = s.parentNode
                        }
                        return {x: e.width / 2 - a[0], y: e.height / 2 - a[1]}
                    }(s, f, h), !0), e.setLayoutInfo(s), function e(t, i, n, o, r) {
                        var a = t.getLayout(), s = n[r], l = s && s === t;
                        if (!(s && !l || r === n.length && t !== o)) {
                            t.setLayout({isInView: !0, invisible: !l && !i.intersect(a), isAboveViewRoot: l}, !0);
                            var d = new Ai(i.x - a.x, i.y - a.y, i.width, i.height);
                            wk(t.viewChildren || [], function (t) {
                                e(t, d, n, o, r + 1)
                            })
                        }
                    }(T, new Ai(-s.x, -s.y, o, r), g, p, 0)
                }
            };

        function Ik(e, t, i, n, o, r) {
            var a = e.children || [], s = n.sort;
            "asc" !== s && "desc" !== s && (s = null);
            var l = null != n.leafDepth && n.leafDepth <= r;
            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
                })
            }(a = N(a, function (e) {
                return !e.isRemoved()
            }), s);
            var d = function (e, t, i) {
                for (var n = 0, o = 0, r = t.length; o < r; o++) n += t[o].getValue();
                var a = e.get("visualDimension");
                if (t && t.length) if ("value" === a && i) s = [t[t.length - 1].getValue(), t[0].getValue()], "asc" === i && s.reverse(); else {
                    var s = [1 / 0, -1 / 0];
                    wk(t, function (e) {
                        var t = e.getValue(a);
                        t < s[0] && (s[0] = t), t > s[1] && (s[1] = t)
                    })
                } else s = [NaN, NaN];
                return {sum: n, dataExtent: s}
            }(t, a, s);
            if (0 === d.sum) return e.viewChildren = [];
            if (d.sum = function (e, t, i, n, o) {
                if (!n) return i;
                for (var r = e.get("visibleMin"), a = o.length, s = a, l = a - 1; 0 <= l; l--) {
                    var d = o["asc" === n ? a - l - 1 : l].getValue();
                    d / i * t < r && (s = l, i -= d)
                }
                return "asc" === n ? o.splice(0, a - s) : o.splice(s, a - s), i
            }(t, i, d.sum, s, a), 0 === d.sum) return e.viewChildren = [];
            for (var u = 0, c = a.length; u < c; u++) {
                var h = a[u].getValue() / d.sum * i;
                a[u].setLayout({area: h})
            }
            return l && (a.length && e.setLayout({isLeafRoot: !0}, !0), a.length = 0), e.viewChildren = a, e.setLayout({dataExtent: d.dataExtent}, !0), a
        }

        function _k(e, t, i) {
            for (var n, o = 0, r = 1 / 0, a = 0, s = e.length; a < s; a++) (n = e[a].getLayout().area) && (n < r && (r = n), o < n && (o = n));
            var l = e.area * e.area, d = t * t * i;
            return l ? mk(d * o / l, l / (d * r)) : 1 / 0
        }

        function Ak(e, t, i, n, o) {
            var r = t === i.width ? 0 : 1, a = 1 - r, s = ["x", "y"], l = ["width", "height"], d = i[s[r]],
                u = t ? e.area / t : 0;
            (o || u > i[l[a]]) && (u = i[l[a]]);
            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[a]] = mk(u - 2 * n, 0),
                    v = i[s[r]] + i[l[r]] - d, y = c === h - 1 || v < g ? v : g, w = p[l[r]] = mk(y - 2 * n, 0);
                p[s[a]] = i[s[a]] + vk(n, m / 2), p[s[r]] = d + vk(n, w / 2), d += y, f.setLayout(p, !0)
            }
            i[s[a]] += u, i[l[a]] -= u
        }

        function Dk(e) {
            return e.get(bk) ? e.get(Ck) : 0
        }

        function xk(e) {
            return "_EC_" + e
        }

        function Nk(e) {
            this._directed = e || !1, this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this.data, this.edgeData
        }

        mf(hk), gf(Sk);
        var Ek = Nk.prototype;

        function Pk(e, t) {
            this.id = null == e ? "" : e, this.inEdges = [], this.outEdges = [], this.edges = [], this.hostGraph, this.dataIndex = null == t ? -1 : t
        }

        function Ok(e, t, i) {
            this.node1 = e, this.node2 = t, this.dataIndex = null == i ? -1 : i
        }

        function Mk(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 Fk(e, t, i, n, o) {
            for (var r = new Nk(n), a = 0; a < e.length; a++) r.addNode(W(e[a].id, e[a].name, a), a);
            var s = [], l = [], d = 0;
            for (a = 0; a < t.length; a++) {
                var u = t[a], c = u.source, h = u.target;
                r.addEdge(c, h, d) && (l.push(u), s.push(W(u.id, c + " > " + h)), d++)
            }
            var f, p = i.get("coordinateSystem");
            if ("cartesian2d" === p || "polar" === p) f = ap(e, i); else {
                var g = iu.get(p), m = g && "view" !== g.type && g.dimensions || [];
                C(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), iw({
                mainData: f,
                struct: r,
                structAttr: "graph",
                datas: {node: f, edge: y},
                datasAttr: {node: "data", edge: "edgeData"}
            }), r.update(), r
        }

        Ek.type = "graph", Ek.isDirected = function () {
            return this._directed
        }, Ek.addNode = function (e, t) {
            e = null == e ? "" + t : "" + e;
            var i = this._nodesMap;
            if (!i[xk(e)]) {
                var n = new Pk(e, t);
                return (n.hostGraph = this).nodes.push(n), i[xk(e)] = n
            }
        }, Ek.getNodeByIndex = function (e) {
            var t = this.data.getRawIndex(e);
            return this.nodes[t]
        }, Ek.getNodeById = function (e) {
            return this._nodesMap[xk(e)]
        }, Ek.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]), Pk.isInstance(e) || (e = n[xk(e)]), Pk.isInstance(t) || (t = n[xk(t)]), e && t) {
                var r = e.id + "-" + t.id;
                if (!o[r]) {
                    var a = new Ok(e, t, i);
                    return (a.hostGraph = this)._directed && (e.outEdges.push(a), t.inEdges.push(a)), e.edges.push(a), e !== t && t.edges.push(a), this.edges.push(a), o[r] = a
                }
            }
        }, Ek.getEdgeByIndex = function (e) {
            var t = this.edgeData.getRawIndex(e);
            return this.edges[t]
        }, Ek.getEdge = function (e, t) {
            Pk.isInstance(e) && (e = e.id), Pk.isInstance(t) && (t = t.id);
            var i = this._edgesMap;
            return this._directed ? i[e + "-" + t] : i[e + "-" + t] || i[t + "-" + e]
        }, Ek.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)
        }, Ek.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)
        }, Ek.breadthFirstTraverse = function (e, t, i, n) {
            if (Pk.isInstance(t) || (t = this._nodesMap[xk(t)]), t) {
                for (var o = "out" === i ? "outEdges" : "in" === i ? "inEdges" : "edges", r = 0; r < this.nodes.length; r++) this.nodes[r].__visited = !1;
                if (!e.call(n, t, null)) for (var a = [t]; a.length;) {
                    var s = a.shift(), l = s[o];
                    for (r = 0; r < l.length; r++) {
                        var d = l[r], u = d.node1 === s ? d.node2 : d.node1;
                        if (!u.__visited) {
                            if (e.call(n, u, s)) return;
                            a.push(u), u.__visited = !0
                        }
                    }
                }
            }
        }, Ek.update = function () {
            for (var e = this.data, t = this.edgeData, i = this.nodes, n = this.edges, o = 0, r = i.length; o < r; o++) i[o].dataIndex = -1;
            for (o = 0, r = e.count(); o < r; 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, r = n.length; o < r; o++) n[o].dataIndex = -1;
            for (o = 0, r = t.count(); o < r; o++) n[t.getRawIndex(o)].dataIndex = o
        }, Ek.clone = function () {
            for (var e = new Nk(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
        }, Pk.prototype = {
            constructor: Pk, 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)
            }
        }, Ok.prototype.getModel = function (e) {
            if (!(this.dataIndex < 0)) return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)
        }, I(Pk, Mk("hostGraph", "data")), I(Ok, Mk("hostGraph", "edgeData")), Nk.Node = Pk, Nk.Edge = Ok, er(Pk), er(Ok);
        var Lk = Tf({
            type: "series.graph",
            init: function (e) {
                Lk.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) {
                Lk.superApply(this, "mergeOption", arguments), this.fillDataTextStyle(e.edges || e.links), this._updateCategoriesData()
            },
            mergeDefaultAndTheme: function (e) {
                Lk.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 Fk(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"), r = new Cl({label: n.option}, n.parentModel, t),
                        a = o.getModel("emphasis.edgeLabel"),
                        s = new Cl({emphasis: {label: a.option}}, a.parentModel, t);

                    function l(e) {
                        return (e = this.parsePath(e)) && "label" === e[0] ? r : 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 Lk.superApply(this, "formatTooltip", arguments);
                var n = this.getData(), o = this.getDataParams(e, i), r = n.graph.getEdgeByIndex(e),
                    a = n.getName(r.node1.dataIndex), s = n.getName(r.node2.dataIndex), l = [];
                return null != a && l.push(a), null != s && l.push(s), l = $l(l.join(" > ")), o.value && (l += " : " + $l(o.value)), l
            },
            _updateCategoriesData: function () {
                var e = D(this.option.categories || [], function (e) {
                    return null != e.value ? e : w({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 Lk.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}}
            }
        }), Rk = is.prototype, Bk = as.prototype;

        function Uk(e) {
            return isNaN(+e.cpx1) || isNaN(+e.cpy1)
        }

        var Vk = Cs({
            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[Uk(t) ? "_buildPathLine" : "_buildPathCurve"](e, t)
            },
            _buildPathLine: Rk.buildPath,
            _buildPathCurve: Bk.buildPath,
            pointAt: function (e) {
                return this[Uk(this.shape) ? "_pointAtLine" : "_pointAtCurve"](e)
            },
            _pointAtLine: Rk.pointAt,
            _pointAtCurve: Bk.pointAt,
            tangentAt: function (e) {
                var t = this.shape, i = Uk(t) ? [t.x2 - t.x1, t.y2 - t.y1] : this._tangentAtCurve(e);
                return me(i, i)
            },
            _tangentAtCurve: Bk.tangentAt
        }), Kk = ["fromSymbol", "toSymbol"];

        function Wk(e) {
            return "_" + e + "Type"
        }

        function jk(e, t, i) {
            var n = t.getItemVisual(i, "color"), o = t.getItemVisual(i, e), r = t.getItemVisual(i, e + "Size");
            if (o && "none" !== o) {
                M(r) || (r = [r, r]);
                var a = cg(o, -r[0] / 2, -r[1] / 2, r[0], r[1], n);
                return a.name = e, a
            }
        }

        function Gk(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 Hk(e, t, i) {
            Di.call(this), this._createLine(e, t, i)
        }

        var zk = Hk.prototype;

        function Xk(e) {
            this._ctor = e || Hk, this.group = new Di
        }

        zk.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 r = this.childOfName("line");
                if (this.__dirty || r.__dirty) {
                    var a = r.shape.percent, s = r.pointAt(0), l = r.pointAt(a), d = ue([], l, s);
                    if (me(d, d), e) {
                        e.attr("position", s);
                        var u = r.tangentAt(0);
                        e.attr("rotation", Math.PI / 2 - Math.atan2(u[1], u[0])), e.attr("scale", [n * a, n * a])
                    }
                    if (t && (t.attr("position", l), u = r.tangentAt(1), t.attr("rotation", -Math.PI / 2 - Math.atan2(u[1], u[0])), t.attr("scale", [n * a, n * a])), !i.ignore) {
                        var c, h, f, p;
                        i.attr("position", l);
                        var g = i.__labelDistance, m = g[0] * n, v = g[1] * n, y = a / 2,
                            w = [(u = r.tangentAt(y))[1], -u[0]], k = r.pointAt(y);
                        0 < w[1] && (w[0] = -w[0], w[1] = -w[1]);
                        var T, b = u[0] < 0 ? -1 : 1;
                        if ("start" !== i.__position && "end" !== i.__position) {
                            var C = -Math.atan2(u[1], u[0]);
                            l[0] < s[0] && (C = Math.PI + C), i.attr("rotation", C)
                        }
                        switch (i.__position) {
                            case"insideStartTop":
                            case"insideMiddleTop":
                            case"insideEndTop":
                            case"middle":
                                T = -v, f = "bottom";
                                break;
                            case"insideStartBottom":
                            case"insideMiddleBottom":
                            case"insideEndBottom":
                                T = v, f = "top";
                                break;
                            default:
                                T = 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 * b + s[0], s[1] + T], h = u[0] < 0 ? "right" : "left", p = [-m * b, -T];
                                break;
                            case"insideMiddleTop":
                            case"insideMiddle":
                            case"insideMiddleBottom":
                            case"middle":
                                c = [k[0], k[1] + T], h = "center", p = [0, -T];
                                break;
                            case"insideEndTop":
                            case"insideEnd":
                            case"insideEndBottom":
                                c = [-m * b + l[0], l[1] + T], h = 0 <= u[0] ? "right" : "left", p = [m * b, -T]
                        }
                        i.attr({
                            style: {textVerticalAlign: i.__verticalAlign || f, textAlign: i.__textAlign || h},
                            position: c,
                            scale: [n, n],
                            origin: p
                        })
                    }
                }
            }
        }, zk._createLine = function (e, t, i) {
            var n = e.hostModel, o = function (e) {
                var t = new Vk({name: "line", subPixelOptimize: !0});
                return Gk(t.shape, e), t
            }(e.getItemLayout(t));
            o.shape.percent = 0, al(o, {shape: {percent: 1}}, n, t), this.add(o);
            var r = new Ua({name: "label", lineLabelOriginalOpacity: 1});
            this.add(r), A(Kk, function (i) {
                var n = jk(i, e, t);
                this.add(n), this[Wk(i)] = e.getItemVisual(t, i)
            }, this), this._updateCommonStl(e, t, i)
        }, zk.updateData = function (e, t, i) {
            var n = e.hostModel, o = this.childOfName("line"), r = e.getItemLayout(t), a = {shape: {}};
            Gk(a.shape, r), rl(o, a, n, t), A(Kk, function (i) {
                var n = e.getItemVisual(t, i), o = Wk(i);
                if (this[o] !== n) {
                    this.remove(this.childOfName(i));
                    var r = jk(i, e, t);
                    this.add(r)
                }
                this[o] = n
            }, this), this._updateCommonStl(e, t, i)
        }, zk._updateCommonStl = function (e, t, i) {
            var n = e.hostModel, o = this.childOfName("line"), r = i && i.lineStyle, a = i && i.hoverLineStyle,
                s = i && i.labelModel, l = i && i.hoverLabelModel;
            if (!i || e.hasItemOption) {
                var d = e.getItemModel(t);
                r = d.getModel("lineStyle").getLineStyle(), a = d.getModel("emphasis.lineStyle").getLineStyle(), s = d.getModel("label"), l = d.getModel("emphasis.label")
            }
            var u = e.getItemVisual(t, "color"), c = G(e.getItemVisual(t, "opacity"), r.opacity, 1);
            o.useStyle(k({
                strokeNoScale: !0,
                fill: "none",
                stroke: u,
                opacity: c
            }, r)), o.hoverStyle = a, A(Kk, 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, w = g ? j(n.getFormattedLabel(t, "emphasis", e.dataType), f) : null, T = m.style;
            if (null != y || null != w) {
                Zs(m.style, s, {text: y}, {autoColor: h}), m.__textAlign = T.textAlign, m.__verticalAlign = T.textVerticalAlign, m.__position = s.get("position") || "middle";
                var b = s.get("distance");
                M(b) || (b = [b, b]), m.__labelDistance = b
            }
            m.hoverStyle = null != w ? {
                text: w,
                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)
        }, zk.highlight = function () {
            this.trigger("emphasis")
        }, zk.downplay = function () {
            this.trigger("normal")
        }, zk.updateLayout = function (e, t) {
            this.setLinePoints(e.getItemLayout(t))
        }, zk.setLinePoints = function (e) {
            var t = this.childOfName("line");
            Gk(t.shape, e), t.dirty()
        }, S(Hk, Di);
        var qk = Xk.prototype;

        function Yk(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 Jk(e) {
            return isNaN(e[0]) || isNaN(e[1])
        }

        function Zk(e) {
            return !Jk(e[0]) && !Jk(e[1])
        }

        function Qk(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 $k(e) {
            var t = e.getVisual("symbolSize");
            return t instanceof Array && (t = (t[0] + t[1]) / 2), +t
        }

        qk.isPersistent = function () {
            return !0
        }, qk.updateData = function (e) {
            var t = this, i = t.group, n = t._lineData;
            t._lineData = e, n || i.removeAll();
            var o = Yk(e);
            e.diff(n).add(function (i) {
                !function (e, t, i, n) {
                    if (Zk(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, r) {
                !function (e, t, i, n, o, r) {
                    var a = t.getItemGraphicEl(n);
                    if (!Zk(i.getItemLayout(o))) return e.group.remove(a);
                    a ? a.updateData(i, o, r) : a = new e._ctor(i, o, r), i.setItemGraphicEl(o, a), e.group.add(a)
                }(t, n, e, r, i, o)
            }).remove(function (e) {
                i.remove(n.getItemGraphicEl(e))
            }).execute()
        }, qk.updateLayout = function () {
            var e = this._lineData;
            e && e.eachItemGraphicEl(function (t, i) {
                t.updateLayout(e, i)
            }, this)
        }, qk.incrementalPrepareUpdate = function (e) {
            this._seriesScope = Yk(e), this._lineData = null, this.group.removeAll()
        }, qk.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 (Zk(t.getItemLayout(n))) {
                var o = new this._ctor(t, n, this._seriesScope);
                o.traverse(i), this.group.add(o), t.setItemGraphicEl(n, o)
            }
        }, qk.remove = function () {
            this._clearIncremental(), this._incremental = null, this.group.removeAll()
        }, qk._clearIncremental = function () {
            var e = this._incremental;
            e && e.clearDisplaybles()
        };
        var eT = [], tT = [], iT = [], nT = Sr, oT = ke, rT = Math.abs;

        function aT(e, t, i) {
            for (var n, o = e[0], r = e[1], a = e[2], s = 1 / 0, l = i * i, d = .1, u = .1; u <= .9; u += .1) eT[0] = nT(o[0], r[0], a[0], u), eT[1] = nT(o[1], r[1], a[1], u), (f = rT(oT(eT, t) - l)) < s && (s = f, n = u);
            for (var c = 0; c < 32; c++) {
                var h = n + d;
                tT[0] = nT(o[0], r[0], a[0], n), tT[1] = nT(o[1], r[1], a[1], n), iT[0] = nT(o[0], r[0], a[0], h), iT[1] = nT(o[1], r[1], a[1], h);
                var f = oT(tT, t) - l;
                if (rT(f) < .01) break;
                var p = oT(iT, t) - l;
                d /= 2, f < 0 ? 0 <= p ? n += d : n -= d : 0 <= p ? n -= d : n += d
            }
            return n
        }

        function sT(e, t) {
            var i = [], n = Ar, o = [[], [], []], r = [[], []], a = [];
            t /= 2, e.eachEdge(function (e, s) {
                var l = e.getLayout(), d = e.getVisual("fromSymbol"), u = e.getVisual("toSymbol");
                l.__original || (l.__original = [ae(l[0]), ae(l[1])], l[2] && l.__original.push(ae(l[2])));
                var c = l.__original;
                if (null != l[2]) {
                    if (re(o[0], c[0]), re(o[1], c[2]), re(o[2], c[1]), d && "none" !== d) {
                        var h = $k(e.node1), f = aT(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 = $k(e.node2), f = aT(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]), re(l[0], o[0]), re(l[1], o[2]), re(l[2], o[1])
                } else re(r[0], c[0]), re(r[1], c[1]), ue(a, r[1], r[0]), me(a, a), d && "none" !== d && (h = $k(e.node1), de(r[0], r[0], a, h * t)), u && "none" !== u && (h = $k(e.node2), de(r[1], r[1], a, -h * t)), re(l[0], r[0]), re(l[1], r[1])
            })
        }

        var lT = "__focusNodeAdjacency", dT = "__unfocusNodeAdjacency", uT = ["itemStyle", "opacity"],
            cT = ["lineStyle", "opacity"];

        function hT(e, t) {
            var i = e.getVisual("opacity");
            return null != i ? i : e.getModel().get(t)
        }

        function fT(e, t, i) {
            var n = e.getGraphicEl(), o = hT(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 pT(e, t) {
            var i = hT(e, t), n = e.getGraphicEl();
            n.traverse(function (e) {
                e.isGroup || e.setStyle("opacity", i)
            }), n.highlight && n.highlight()
        }

        function gT(e) {
            return e instanceof Array || (e = [e, e]), e
        }

        function mT(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")])
                }), vT(i)
            }
        }

        function vT(e) {
            e.eachEdge(function (e) {
                var t = e.getModel().get("lineStyle.curveness") || 0, i = ae(e.node1.getLayout()),
                    n = ae(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)
            })
        }

        bf({
            type: "graph", init: function (e, t) {
                var i = new Gg, n = new Xk, o = this.group;
                this._controller = new Cy(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 r = this._symbolDraw, a = this._lineDraw, s = this.group;
                if ("view" === o.type) {
                    var l = {position: o.position, scale: o.scale};
                    this._firstRender ? s.attr(l) : rl(s, l, e)
                }
                sT(e.getGraph(), Qk(e));
                var d = e.getData();
                r.updateData(d);
                var u = e.getEdgeData();
                a.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 r = d.getItemModel(o);
                    t.off("drag").off("dragend");
                    var a = r.get("draggable");
                    a && 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(a && c), t[lT] && t.off("mouseover", t[lT]), t[dT] && t.off("mouseout", t[dT]), r.get("focusNodeAdjacency") && (t.on("mouseover", t[lT] = function () {
                        n._clearTimer(), i.dispatchAction({
                            type: "focusNodeAdjacency",
                            seriesId: e.id,
                            dataIndex: t.dataIndex
                        })
                    }), t.on("mouseout", t[dT] = function () {
                        n._dispatchUnfocus(i)
                    }))
                }, this), d.graph.eachEdge(function (t) {
                    var o = t.getGraphicEl();
                    o[lT] && o.off("mouseover", o[lT]), o[dT] && o.off("mouseout", o[dT]), t.getModel().get("focusNodeAdjacency") && (o.on("mouseover", o[lT] = function () {
                        n._clearTimer(), i.dispatchAction({
                            type: "focusNodeAdjacency",
                            seriesId: e.id,
                            edgeDataIndex: t.dataIndex
                        })
                    }), o.on("mouseout", o[dT] = 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), r = Math.atan2(o[1] - g, o[0] - p);
                        r < 0 && (r = 2 * Math.PI + r);
                        var a = o[0] < p;
                        a && (r -= Math.PI);
                        var s = a ? "left" : "right";
                        Js(n, {textRotation: -r, 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, r = n.dataIndex, a = n.edgeDataIndex, s = o.getNodeByIndex(r),
                    l = o.getEdgeByIndex(a);
                (s || l) && (o.eachNode(function (e) {
                    fT(e, uT, .1)
                }), o.eachEdge(function (e) {
                    fT(e, cT, .1)
                }), s && (pT(s, uT), A(s.edges, function (e) {
                    e.dataIndex < 0 || (pT(e, cT), pT(e.node1, uT), pT(e.node2, uT))
                })), l && (pT(l, cT), pT(l.node1, uT), pT(l.node2, uT)))
            }, unfocusNodeAdjacency: function (e, t, i, n) {
                var o = e.getData().graph;
                o.eachNode(function (e) {
                    fT(e, uT)
                }), o.eachEdge(function (e) {
                    fT(e, cT)
                })
            }, _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, r = this.group;
                n.setPointerChecker(function (t, n, o) {
                    var a = r.getBoundingRect();
                    return a.applyTransform(r.transform), a.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) {
                    Py(o, t.dx, t.dy), i.dispatchAction({seriesId: e.id, type: "graphRoam", dx: t.dx, dy: t.dy})
                }).on("zoom", function (t) {
                    Oy(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(), sT(e.getGraph(), Qk(e)), this._lineDraw.updateLayout()
                }, this)) : n.disable()
            }, _updateNodeAndLinkScale: function () {
                var e = this._model, t = e.getData(), i = Qk(e), n = [i, i];
                t.eachItemGraphicEl(function (e, t) {
                    e.attr("scale", n)
                })
            }, updateLayout: function (e) {
                sT(e.getGraph(), Qk(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 = jy(t.coordinateSystem, e);
                t.setCenter && t.setCenter(i.center), t.setZoom && t.setZoom(i.zoom)
            })
        });
        var yT = Math.PI, wT = [];

        function kT(e, t) {
            var i = e.coordinateSystem;
            if (!i || "view" === i.type) {
                var n = i.getBoundingRect(), o = e.getData(), r = o.graph, a = 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: a, cy: s}), d && (TT[t](e, i, r, o, l, a, s, d), r.eachEdge(function (e) {
                    var t, i = e.getModel().get("lineStyle.curveness") || 0, n = ae(e.node1.getLayout()),
                        o = ae(e.node2.getLayout()), r = (n[0] + o[0]) / 2, l = (n[1] + o[1]) / 2;
                    +i && (t = [a * (i *= 3) + r * (1 - i), s * i + l * (1 - i)]), e.setLayout([n, o, t])
                }))
            }
        }

        var TT = {
            value: function (e, t, i, n, o, r, a, 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) + r, o * Math.sin(l) + a]), l += i
                })
            }, symbolSize: function (e, t, i, n, o, r, a, s) {
                var l = 0;
                wT.length = s;
                var d = Qk(e);
                i.eachNode(function (e) {
                    var t = $k(e);
                    isNaN(t) && (t = 2), t < 0 && (t = 0), t *= d;
                    var i = Math.asin(t / 2 / o);
                    isNaN(i) && (i = yT / 2), wT[e.dataIndex] = i, l += 2 * i
                });
                var u = (2 * yT - l) / s / 2, c = 0;
                i.eachNode(function (e) {
                    var t = u + wT[e.dataIndex];
                    c += t, e.setLayout([o * Math.cos(c) + r, o * Math.sin(c) + a]), c += t
                })
            }
        }, bT = 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 r = 0; r < t.length; r++) if (!t[r].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 r = i.getName(n);
                    o["ec-" + r] = n;
                    var a = i.getItemModel(n), s = a.get("itemStyle.color") || e.getColorFromPalette(r, t);
                    i.setItemVisual(n, "color", s);
                    for (var l = ["opacity", "symbol", "symbolSize", "symbolKeepAspect"], d = 0; d < l.length; d++) {
                        var u = a.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 r = ["color", "opacity", "symbol", "symbolSize", "symbolKeepAspect"], a = 0; a < r.length; a++) null == n.getItemVisual(e, r[a], !0) && n.setItemVisual(e, r[a], i.getItemVisual(t, r[a]))
                    }
                })
            })
        }), mf(function (e) {
            e.eachSeriesByType("graph", function (e) {
                var t = e.getGraph(), i = e.getEdgeData(), n = gT(e.get("edgeSymbol")), o = gT(e.get("edgeSymbolSize")),
                    r = "lineStyle.color".split("."), a = "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(r)), i.setVisual("opacity", e.get(a)), i.each(function (e) {
                    var n = i.getItemModel(e), o = t.getEdgeByIndex(e), s = gT(n.getShallow("symbol", !0)),
                        l = gT(n.getShallow("symbolSize", !0)), d = n.get(r), u = n.get(a);
                    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 = [];
                    A(i.dimensions, function (e) {
                        o = o.concat(n.mapDimension(e, !0))
                    });
                    for (var r = 0; r < n.count(); r++) {
                        for (var a = [], s = !1, l = 0; l < o.length; l++) {
                            var d = n.get(o[l], r);
                            isNaN(d) || (s = !0), a.push(d)
                        }
                        s ? n.setItemLayout(r, i.dataToPoint(a)) : n.setItemLayout(r, [NaN, NaN])
                    }
                    vT(n.graph)
                } else t && "none" !== t || mT(e)
            })
        }), gf(Ch.VISUAL.POST_CHART_LAYOUT, function (e) {
            e.eachSeriesByType("graph", function (e) {
                "circular" === e.get("layout") && kT(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,
                        r = e.getModel("force"), a = r.get("initLayout");
                    e.preservedPoints ? n.each(function (e) {
                        var i = n.getId(e);
                        n.setItemLayout(e, t[i] || [NaN, NaN])
                    }) : a && "none" !== a ? "circular" === a && kT(e, "value") : mT(e);
                    var s = n.getDataExtent("value"), l = o.getDataExtent("value"), d = r.get("repulsion"),
                        u = r.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 = xl(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 = xl(e, l, u);
                        isNaN(o) && (o = (u[0] + u[1]) / 2);
                        var r = n.getModel();
                        return {
                            n1: h[n.node1.dataIndex],
                            n2: h[n.node2.dataIndex],
                            d: o,
                            curveness: r.get("lineStyle.curveness") || 0,
                            ignoreForceLayout: r.get("ignoreForceLayout")
                        }
                    }), p = (c = e.coordinateSystem).getBoundingRect(), g = function (e, t, i) {
                        for (var n = i.rect, o = n.width, r = n.height, a = [n.x + o / 2, n.y + r / 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) + a[0], r * (Math.random() - .5) + a[1])), d.pp = ae(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, r = 0; r < t.length; r++) {
                                    var l = t[r];
                                    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 || bT(d.p, d.p, n, h * u * c), p.fixed || bT(p.p, p.p, n, -(1 - h) * u * c)
                                    }
                                }
                                for (r = 0; r < o; r++) (v = e[r]).fixed || (ue(n, a, v.p), bT(v.p, v.p, n, s * c));
                                for (r = 0; r < o; r++) {
                                    d = e[r];
                                    for (var f = r + 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 || bT(d.pp, d.pp, n, g), p.fixed || bT(p.pp, p.pp, n, -g)
                                    }
                                }
                                var m = [];
                                for (r = 0; r < o; r++) {
                                    var v;
                                    (v = e[r]).fixed || (ue(m, v.p, v.pp), bT(v.p, v.p, m, c), re(v.pp, v.p))
                                }
                                c *= .992, i && i(e, t, c < .01)
                            }
                        }
                    }(h, f, {rect: p, gravity: r.get("gravity"), friction: r.get("friction")}), m = g.step;
                    g.step = function (e) {
                        for (var o = 0, r = h.length; o < r; o++) h[o].fixed && re(h[o].p, i.getNodeByIndex(o).getLayout());
                        m(function (o, r, a) {
                            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 = r.length; s < l; s++) {
                                var d = r[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] || [], re(f[0], c), re(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(a)
                        })
                    }, 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(), r = [], a = [];
                        Lr(o.mapArray(function (e) {
                            var t = o.getItemModel(e);
                            return [+t.get("x"), +t.get("y")]
                        }), r, a), a[0] - r[0] == 0 && (a[0] += 1, r[0] -= 1), a[1] - r[1] == 0 && (a[1] += 1, r[1] -= 1);
                        var s = (a[0] - r[0]) / (a[1] - r[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) && (r = [l.x, l.y], a = [l.x + l.width, l.y + l.height]);
                        var d = a[0] - r[0], u = a[1] - r[1], c = l.width, h = l.height,
                            f = e.coordinateSystem = new zy;
                        f.zoomLimit = e.get("scaleLimit"), f.setBoundingRect(r[0], r[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 Ov(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 CT = Ta.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, r = t.width, a = t.angle,
                    s = t.x - i(a) * r * (o / 3 <= r ? 1 : 2), l = t.y - n(a) * r * (o / 3 <= r ? 1 : 2);
                a = t.angle - Math.PI / 2, e.moveTo(s, l), e.lineTo(t.x + i(a) * r, t.y + n(a) * r), e.lineTo(t.x + i(t.angle) * o, t.y + n(t.angle) * o), e.lineTo(t.x - i(a) * r, t.y - n(a) * r), e.lineTo(s, l)
            }
        });

        function ST(e, t) {
            return t && ("string" == typeof t ? e = t.replace("{value}", null != e ? e : "") : "function" == typeof t && (e = t(e))), e
        }

        var IT = 2 * Math.PI, _T = (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(), r = Math.min(n, o);
                    return {cx: Nl(i[0], t.getWidth()), cy: Nl(i[1], t.getHeight()), r: Nl(e.get("radius"), r / 2)}
                }(e, i);
                this._renderMain(e, t, i, n, o)
            }, dispose: function () {
            }, _renderMain: function (e, t, i, n, o) {
                for (var r = this.group, a = e.getModel("axisLine"), s = a.getModel("lineStyle"), l = e.get("clockwise"), d = -e.get("startAngle") / 180 * Math.PI, u = ((g = -e.get("endAngle") / 180 * Math.PI) - d) % IT, c = d, h = s.get("width"), f = a.get("show"), p = 0; f && p < n.length; p++) {
                    var g, m = Math.min(Math.max(n[p][0], 0), 1), v = new ja({
                        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"])), r.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 w = d;
                    d = g, g = w
                }
                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, r, a, 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"), w = Nl(p.get("length"), c), k = Nl(g.get("length"), c), T = r, b = (a - r) / v, C = b / y, S = p.getModel("lineStyle").getLineStyle(), I = g.getModel("lineStyle").getLineStyle(), _ = 0; _ <= v; _++) {
                    var A = Math.cos(T), D = Math.sin(T);
                    if (p.get("show")) {
                        var x = new is({
                            shape: {x1: A * c + d, y1: D * c + u, x2: A * (c - w) + d, y2: D * (c - w) + u},
                            style: S,
                            silent: !0
                        });
                        "auto" === S.stroke && x.setStyle({stroke: n(_ / v)}), l.add(x)
                    }
                    if (m.get("show")) {
                        var N = ST(El(_ / v * (f - h) + h), m.get("formatter")), E = m.get("distance"), P = n(_ / v);
                        l.add(new Ua({
                            style: Zs({}, m, {
                                text: N,
                                x: A * (c - w - E) + d,
                                y: D * (c - w - E) + u,
                                textVerticalAlign: D < -.4 ? "top" : .4 < D ? "bottom" : "middle",
                                textAlign: A < -.4 ? "left" : .4 < A ? "right" : "center"
                            }, {autoColor: P}), silent: !0
                        }))
                    }
                    if (g.get("show") && _ !== v) {
                        for (var O = 0; O <= y; O++) {
                            A = Math.cos(T), D = Math.sin(T);
                            var M = new is({
                                shape: {
                                    x1: A * c + d,
                                    y1: D * c + u,
                                    x2: A * (c - k) + d,
                                    y2: D * (c - k) + u
                                }, silent: !0, style: I
                            });
                            "auto" === I.stroke && M.setStyle({stroke: n((_ + O / y) / v)}), l.add(M), T += C
                        }
                        T -= C
                    } else T += b
                }
            }, _renderPointer: function (e, t, i, n, o, r, a, s) {
                var l = this.group, d = this._data;
                if (e.get("pointer.show")) {
                    var u = [+e.get("min"), +e.get("max")], c = [r, a], h = e.getData(), f = h.mapDimension("value");
                    h.diff(d).add(function (t) {
                        var i = new CT({shape: {angle: r}});
                        al(i, {shape: {angle: xl(h.get(f, t), u, c, !0)}}, e), l.add(i), h.setItemGraphicEl(t, i)
                    }).update(function (t, i) {
                        var n = d.getItemGraphicEl(i);
                        rl(n, {shape: {angle: xl(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), r = i.getModel("pointer");
                        e.setShape({
                            x: o.cx,
                            y: o.cy,
                            width: Nl(r.get("width"), o.r),
                            r: Nl(r.get("length"), o.r)
                        }), e.useStyle(i.getModel("itemStyle").getItemStyle()), "auto" === e.style.fill && e.setStyle("fill", n(xl(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 r = e.getData(), a = r.mapDimension("value"), s = e.getModel("title");
                if (s.get("show")) {
                    var l = s.get("offsetCenter"), d = o.cx + Nl(l[0], o.r), u = o.cy + Nl(l[1], o.r),
                        c = +e.get("min"), h = +e.get("max"), f = n(xl(e.getData().get(a, 0), [c, h], [0, 1], !0));
                    this.group.add(new Ua({
                        silent: !0,
                        style: Zs({}, s, {
                            x: d,
                            y: u,
                            text: r.getName(0),
                            textAlign: "center",
                            textVerticalAlign: "middle"
                        }, {autoColor: f, forceRich: !0})
                    }))
                }
            }, _renderDetail: function (e, t, i, n, o) {
                var r = e.getModel("detail"), a = +e.get("min"), s = +e.get("max");
                if (r.get("show")) {
                    var l = r.get("offsetCenter"), d = o.cx + Nl(l[0], o.r), u = o.cy + Nl(l[1], o.r),
                        c = Nl(r.get("width"), o.r), h = Nl(r.get("height"), o.r), f = e.getData(),
                        p = f.get(f.mapDimension("value"), 0), g = n(xl(p, [a, s], [0, 1], !0));
                    this.group.add(new Ua({
                        silent: !0,
                        style: Zs({}, r, {
                            x: d,
                            y: u,
                            text: ST(p, r.get("formatter")),
                            textWidth: isNaN(c) ? null : c,
                            textHeight: isNaN(h) ? null : h,
                            textAlign: "center",
                            textVerticalAlign: "middle"
                        }, {autoColor: g, forceRich: !0})
                    }))
                }
            }
        }), Tf({
            type: "series.funnel",
            init: function (e) {
                _T.superApply(this, "init", arguments), this.legendVisualProvider = new Fv(P(this.getData, this), P(this.getRawData, this)), this._defaultLabelLine(e)
            },
            getInitialData: function (e, t) {
                return Ov(this, {coordDimensions: ["value"], encodeDefaulter: O(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 = _T.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 AT(e, t) {
            Di.call(this);
            var i = new Xa, n = new qa, o = new Ua;
            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 DT = AT.prototype, xT = ["itemStyle", "opacity"];

        function NT(e, t, i, n, o) {
            Dg.call(this, e, t, i), this.type = n || "value", this.axisIndex = o
        }

        function ET(e, t, i, n, o, r) {
            e = e || 0;
            var a = i[1] - i[0];
            if (null != o && (o = OT(o, [0, a])), null != r && (r = Math.max(r, null != o ? o : 0)), "all" === n) {
                var s = Math.abs(t[1] - t[0]);
                o = r = OT(s = OT(s, [0, a]), [o, r]), n = 0
            }
            t[0] = OT(t[0], i), t[1] = OT(t[1], i);
            var l = PT(t, n);
            t[n] += e;
            var d = o || 0, u = i.slice();
            l.sign < 0 ? u[0] += d : u[1] -= d, t[n] = OT(t[n], u);
            var c = PT(t, n);
            return null != o && (c.sign !== l.sign || c.span < o) && (t[1 - n] = t[n] + l.sign * o), c = PT(t, n), null != r && c.span > r && (t[1 - n] = t[n] + c.sign * r), t
        }

        function PT(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 OT(e, t) {
            return Math.min(null != t[1] ? t[1] : 1 / 0, Math.max(null != t[0] ? t[0] : -1 / 0, e))
        }

        DT.updateData = function (e, t, i) {
            var n = this.childAt(0), o = e.hostModel, r = e.getItemModel(t), a = e.getItemLayout(t),
                s = e.getItemModel(t).get(xT);
            s = null == s ? 1 : s, n.useStyle({}), i ? (n.setShape({points: a.points}), n.setStyle({opacity: 0}), al(n, {style: {opacity: s}}, o, t)) : rl(n, {
                style: {opacity: s},
                shape: {points: a.points}
            }, o, t);
            var l = r.getModel("itemStyle"), d = e.getItemVisual(t, "color");
            n.setStyle(k({
                lineJoin: "round",
                fill: d
            }, l.getItemStyle(["opacity"]))), n.hoverStyle = l.getModel("emphasis").getItemStyle(), this._updateLabel(e, t), Hs(this)
        }, DT._updateLabel = function (e, t) {
            var i = this.childAt(1), n = this.childAt(2), o = e.hostModel, r = e.getItemModel(t),
                a = e.getItemLayout(t).label, s = e.getItemVisual(t, "color");
            rl(i, {shape: {points: a.linePoints || a.linePoints}}, o, t), rl(n, {
                style: {
                    x: a.x,
                    y: a.y
                }
            }, o, t), n.attr({rotation: a.rotation, origin: [a.x, a.y], z2: 10});
            var l = r.getModel("label"), d = r.getModel("emphasis.label"), u = r.getModel("labelLine"),
                c = r.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: !!a.inside
            }, {
                textAlign: a.textAlign,
                textVerticalAlign: a.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()
        }, S(AT, Di), fc.extend({
            type: "funnel", render: function (e, t, i) {
                var n = e.getData(), o = this._data, r = this.group;
                n.diff(o).add(function (e) {
                    var t = new AT(n, e);
                    n.setItemGraphicEl(e, t), r.add(t)
                }).update(function (e, t) {
                    var i = o.getItemGraphicEl(t);
                    i.updateData(n, e), r.add(i), n.setItemGraphicEl(e, i)
                }).remove(function (e) {
                    var t = o.getItemGraphicEl(e);
                    r.remove(t)
                }).execute(), this._data = n
            }, remove: function () {
                this.group.removeAll(), this._data = null
            }, dispose: function () {
            }
        }), mf(Wv("funnel")), gf(function (e, t, i) {
            e.eachSeriesByType("funnel", function (e) {
                var i = e.getData(), n = i.mapDimension("value"), o = e.get("sort"), r = function (e, t) {
                        return md(e.getBoxLayoutParams(), {width: t.getWidth(), height: t.getHeight()})
                    }(e, t), a = function (e, t) {
                        for (var i = e.mapDimension("value"), n = e.mapArray(i, function (e) {
                            return e
                        }), o = [], r = "ascending" === t, a = 0, s = e.count(); a < s; a++) o[a] = a;
                        return "function" == typeof t ? o.sort(t) : "none" !== t && o.sort(function (e, t) {
                            return r ? n[e] - n[t] : n[t] - n[e]
                        }), o
                    }(i, o), s = [Nl(e.get("minSize"), r.width), Nl(e.get("maxSize"), r.width)], l = i.getDataExtent(n),
                    d = e.get("min"), u = e.get("max");

                function c(e, t) {
                    var o, a = xl(i.get(n, e) || 0, [d, u], s, !0);
                    switch (h) {
                        case"left":
                            o = r.x;
                            break;
                        case"center":
                            o = r.x + (r.width - a) / 2;
                            break;
                        case"right":
                            o = r.x + r.width - a
                    }
                    return [[o, t], [o + a, t]]
                }

                null == d && (d = Math.min(l[0], 0)), null == u && (u = l[1]);
                var h = e.get("funnelAlign"), f = e.get("gap"), p = (r.height - f * (i.count() - 1)) / i.count(),
                    g = r.y;
                "ascending" === o && (p = -p, f = -f, g += r.height, a = a.reverse());
                for (var m = 0; m < a.length; m++) {
                    var v = a[m], y = a[m + 1], w = i.getItemModel(v).get("itemStyle.height");
                    null == w ? w = p : (w = Nl(w, r.height), "ascending" === o && (w = -w));
                    var k = c(v, g), T = c(y, g + w);
                    g += w + f, i.setItemLayout(v, {points: k.concat(T.slice().reverse())})
                }
                !function (e) {
                    e.each(function (t) {
                        var i, n, o, r, a = e.getItemModel(t), s = a.getModel("label").get("position"),
                            l = a.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"), r = [[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"), r = [[h, f], [p, f]], o = f
                        }
                        d.label = {linePoints: r, x: n, y: o, verticalAlign: "middle", textAlign: i, inside: c}
                    })
                }(i)
            })
        }), hf(qv("funnel")), NT.prototype = {
            constructor: NT, model: null, isHorizontal: function () {
                return "horizontal" !== this.coordinateSystem.getModel().get("layout")
            }
        }, S(NT, Dg);
        var MT = A, FT = Math.min, LT = Math.max, RT = Math.floor, BT = Math.ceil, UT = El, VT = Math.PI;

        function KT(e, t, i) {
            this._axesMap = $(), this._axesLayout = {}, this.dimensions = e.dimensions, this._rect, this._model = e, this._init(e, t, i)
        }

        function WT(e, t) {
            return FT(LT(e, t[0]), t[1])
        }

        KT.prototype = {
            type: "parallel", constructor: KT, _init: function (e, t, i) {
                var n = e.dimensions, o = e.parallelAxisIndex;
                MT(n, function (e, i) {
                    var n = o[i], r = t.getComponent("parallelAxis", n),
                        a = this._axesMap.set(e, new NT(e, Zp(r), [0, 0], r.get("type"), n)), s = "category" === a.type;
                    a.onBand = s && r.get("boundaryGap"), a.inverse = r.get("inverse"), (r.axis = a).model = r, a.coordinateSystem = r.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, r = e[1 - o],
                    a = e[o];
                return i <= r && r <= i + t.axisLength && n <= a && a <= 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();
                        MT(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"], r = t.get("layout"),
                    a = "horizontal" === r ? 0 : 1, s = i[o[a]], l = [0, s], d = this.dimensions.length,
                    u = WT(t.get("axisExpandWidth"), l), c = WT(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 = WT(f[1] - f[0], l), f[1] = f[0] + e) : (e = WT(u * (c - 1), l), (f = [u * (t.get("axisExpandCenter") || RT(d / 2)) - e / 2])[1] = f[0] + e);
                var p = (s - e) / (d - c);
                p < 3 && (p = 0);
                var g = [RT(UT(f[0] / u, 1)) + 1, BT(UT(f[1] / u, 1)) - 1], m = p / u * f[0];
                return {
                    layout: r,
                    pixelDimIndex: a,
                    layoutBase: i[n[a]],
                    layoutLength: s,
                    axisBase: i[n[1 - a]],
                    axisLength: i[o[1 - a]],
                    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])
                }), MT(i, function (t, i) {
                    var r = (n.axisExpandable ? function (e, t) {
                            var i, n, o = t.layoutLength, r = t.axisExpandWidth, a = 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 * r - t.axisExpandWindow[0], d = r, u = !0) : (i = o - (a - 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), a = {horizontal: {x: r.position, y: n.axisLength}, vertical: {x: 0, y: r.position}},
                        s = {horizontal: VT / 2, vertical: 0}, l = [a[o].x + e.x, a[o].y + e.y], d = s[o], u = rt();
                    ut(u, u, d), dt(u, u, l), this._axesLayout[t] = {
                        position: l,
                        rotation: d,
                        transform: u,
                        axisNameAvailableWidth: r.axisNameAvailableWidth,
                        axisLabelShow: r.axisLabelShow,
                        nameTruncateMaxWidth: r.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, r = this.dimensions, a = [], s = [];
                A(r, function (t) {
                    a.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(a, d), h = 0, f = r.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],
                    r = [0, t.axisExpandWidth * (t.axisCount - 1)];
                if (!this.containPoint(e)) return {behavior: "none", axisExpandWindow: n};
                var a, 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", a = s - o * u[2]) : c && d && s > o * (1 - u[0]) ? (l = "jump", a = s - o * (1 - u[2])) : 0 <= (a = s - o * u[1]) && (a = s - o * (1 - u[1])) <= 0 && (a = 0), (a *= t.axisExpandWidth / d) ? ET(a, n, r, "all") : l = "none") : (o = n[1] - n[0], (n = [LT(0, r[1] * s / o - o / 2)])[1] = FT(r[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 r = new KT(n, e, t);
                    r.name = "parallel_" + o, r.resize(n, t), (n.coordinateSystem = r).model = n, i.push(r)
                }), 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 jT = Id.extend({
            type: "baseParallelAxis", axis: null, activeIntervals: [], getAreaSelectStyle: function () {
                return or([["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--) Pl(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(jT.prototype, ig), Am("parallel", jT, 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
        }), Id.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 () {
                Id.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) {
                A(["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 = [];
                A(N(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 GT = O, HT = A, zT = D, XT = Math.min, qT = Math.max, YT = Math.pow, JT = 1e4, ZT = 6, QT = 6,
            $T = "globalPan", eb = {w: [0, 0], e: [0, 1], n: [1, 0], s: [1, 1]},
            tb = {w: "ew", e: "ew", n: "ns", s: "ns", ne: "nesw", sw: "nesw", nw: "nwse", se: "nwse"}, ib = {
                brushStyle: {lineWidth: 2, stroke: "rgba(0,0,0,0.3)", fill: "rgba(0,0,0,0.1)"},
                transformable: !0,
                brushMode: "single",
                removeOnClick: !1
            }, nb = 0;

        function ob(e) {
            xe.call(this), this._zr = e, this.group = new Di, this._brushType, this._brushOption, this._panels, this._track = [], this._dragging, this._covers = [], this._creatingCover, this._creatingPanel, this._enableGlobalPan, this._uid = "brushController_" + nb++, this._handlers = {}, HT(Nb, function (e, t) {
                this._handlers[t] = P(e, this)
            }, this)
        }

        function rb(e, t) {
            var i = Pb[t.brushType].createCover(e, t);
            return i.__brushOption = t, lb(i, t), e.group.add(i), i
        }

        function ab(e, t) {
            var i = ub(t);
            return i.endCreating && (i.endCreating(e, t), lb(t, t.__brushOption)), t
        }

        function sb(e, t) {
            var i = t.__brushOption;
            ub(t).updateCoverShape(e, t, i.range, i)
        }

        function lb(e, t) {
            var i = t.z;
            null == i && (i = JT), e.traverse(function (e) {
                e.z = i, e.z2 = i
            })
        }

        function db(e, t) {
            ub(t).updateCommon(e, t), sb(e, t)
        }

        function ub(e) {
            return Pb[e.__brushOption.brushType]
        }

        function cb(e, t, i) {
            var n, o = e._panels;
            if (!o) return !0;
            var r = e._transform;
            return HT(o, function (e) {
                e.isTargetByCursor(t, i, r) && (n = e)
            }), n
        }

        function hb(e, t) {
            var i = e._panels;
            if (!i) return !0;
            var n = t.__brushOption.panelId;
            return null == n || i[n]
        }

        function fb(e) {
            var t = e._covers, i = t.length;
            return HT(t, function (t) {
                e.group.remove(t)
            }, e), t.length = 0, !!i
        }

        function pb(e, t) {
            var i = zT(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 gb(e) {
            var t = e.length - 1;
            return t < 0 && (t = 0), [e[0], e[t]]
        }

        function mb(e, t, i, n) {
            var o = new Di;
            return o.add(new es({
                name: "main",
                style: kb(i),
                silent: !0,
                draggable: !0,
                cursor: "move",
                drift: GT(e, t, o, "nswe"),
                ondragend: GT(pb, t, {isEnd: !0})
            })), HT(n, function (i) {
                o.add(new es({
                    name: i,
                    style: {opacity: 0},
                    draggable: !0,
                    silent: !0,
                    invisible: !0,
                    drift: GT(e, t, o, i),
                    ondragend: GT(pb, t, {isEnd: !0})
                }))
            }), o
        }

        function vb(e, t, i, n) {
            var o = n.brushStyle.lineWidth || 0, r = qT(o, QT), a = i[0][0], s = i[1][0], l = a - o / 2, d = s - o / 2,
                u = i[0][1], c = i[1][1], h = u - r + o / 2, f = c - r + o / 2, p = u - a, g = c - s, m = p + o,
                v = g + o;
            wb(e, t, "main", a, s, p, g), n.transformable && (wb(e, t, "w", l, d, r, v), wb(e, t, "e", h, d, r, v), wb(e, t, "n", l, d, m, r), wb(e, t, "s", l, f, m, r), wb(e, t, "nw", l, d, r, r), wb(e, t, "ne", h, d, r, r), wb(e, t, "sw", l, f, r, r), wb(e, t, "se", h, f, r, r))
        }

        function yb(e, t) {
            var i = t.__brushOption, n = i.transformable, o = t.childAt(0);
            o.useStyle(kb(i)), o.attr({
                silent: !n,
                cursor: n ? "move" : "default"
            }), HT(["w", "e", "n", "s", "se", "sw", "ne", "nw"], function (i) {
                var o = t.childOfName(i), r = 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 ? tb[r] + "-resize" : null})
            })
        }

        function wb(e, t, i, n, o, r, a) {
            var s = t.childOfName(i);
            s && s.setShape(function (e) {
                var t = XT(e[0][0], e[1][0]), i = XT(e[0][1], e[1][1]), n = qT(e[0][0], e[1][0]),
                    o = qT(e[0][1], e[1][1]);
                return {x: t, y: i, width: n - t, height: o - i}
            }(Ib(e, t, [[n, o], [n + r, o + a]])))
        }

        function kb(e) {
            return k({strokeNoScale: !0}, e.brushStyle)
        }

        function Tb(e, t, i, n) {
            var o = [XT(e, i), XT(t, n)], r = [qT(e, i), qT(t, n)];
            return [[o[0], r[0]], [o[1], r[1]]]
        }

        function bb(e, t, i, n, o, r, a, s) {
            var l = n.__brushOption, d = e(l.range), u = Sb(i, r, a);
            HT(o.split(""), function (e) {
                var t = eb[e];
                d[t[0]][t[1]] += u[t[0]]
            }), l.range = t(Tb(d[0][0], d[1][0], d[0][1], d[1][1])), db(i, n), pb(i, {isEnd: !1})
        }

        function Cb(e, t, i, n, o) {
            var r = t.__brushOption.range, a = Sb(e, i, n);
            HT(r, function (e) {
                e[0] += a[0], e[1] += a[1]
            }), db(e, t), pb(e, {isEnd: !1})
        }

        function Sb(e, t, i) {
            var n = e.group, o = n.transformCoordToLocal(t, i), r = n.transformCoordToLocal(0, 0);
            return [o[0] - r[0], o[1] - r[1]]
        }

        function Ib(e, t, i) {
            var n = hb(e, t);
            return n && !0 !== n ? n.clipPath(i, e._transform) : m(i)
        }

        function _b(e) {
            var t = e.event;
            t.preventDefault && t.preventDefault()
        }

        function Ab(e, t, i) {
            return e.childOfName("main").contain(t, i)
        }

        function Db(e, t, i, n) {
            var o, r = e._creatingCover, a = 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], r = i[1] - n[1], a = YT(o * o + r * r, .5);
                return ZT < a
            }(e) || r) {
                if (a && !r) {
                    "single" === s.brushMode && fb(e);
                    var l = m(s);
                    l.brushType = xb(l.brushType, a), l.panelId = !0 === a ? null : a.panelId, r = e._creatingCover = rb(e, l), e._covers.push(r)
                }
                if (r) {
                    var d = Pb[xb(e._brushType, a)];
                    r.__brushOption.range = d.getCreatingRange(Ib(e, r, e._track)), n && (ab(e, r), d.updateCommon(e, r)), sb(e, r), o = {isEnd: n}
                }
            } else n && "single" === s.brushMode && s.removeOnClick && cb(e, t, i) && fb(e) && (o = {
                isEnd: n,
                removeOnClick: !0
            });
            return o
        }

        function xb(e, t) {
            return "auto" === e ? t.defaultBrushType : e
        }

        ob.prototype = {
            constructor: ob, enableBrush: function (e) {
                return this._brushType && function (e) {
                    var t = e._zr;
                    (function (e, t, i) {
                        var n = by(e);
                        n[t] === i && (n[t] = null)
                    })(t, $T, e._uid), function (e, t) {
                        HT(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) {
                        by(e).globalPan = i
                    }(i, 0, e._uid), function (e, t) {
                        HT(t, function (t, i) {
                            e.on(i, t)
                        })
                    }(i, e._handlers), e._brushType = t.brushType, e._brushOption = v(m(ib), t, !0)
                }(this, e), this
            }, setPanels: function (e) {
                if (e && e.length) {
                    var t = this._panels = {};
                    A(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) {
                HT(this._covers, e, t)
            }, updateCovers: function (e) {
                e = D(e, function (e) {
                    return v(m(ib), e, !0)
                });
                var t = "\0-brush-index-", i = this._covers, n = this._covers = [], o = this, r = this._creatingCover;
                return new Sf(i, e, function (e, t) {
                    return a(e.__brushOption, t)
                }, a).add(s).update(s).remove(function (e) {
                    i[e] !== r && o.group.remove(i[e])
                }).execute(), this;

                function a(e, i) {
                    return (null != e.id ? e.id : t + i) + "-" + e.brushType
                }

                function s(t, a) {
                    var s = e[t];
                    if (null != a && i[a] === r) n[t] = i[a]; else {
                        var l = n[t] = null != a ? (i[a].__brushOption = s, i[a]) : ab(o, rb(o, s));
                        db(o, l)
                    }
                }
            }, unmount: function () {
                return this.enableBrush(!1), fb(this), this._zr.remove(this.group), this
            }, dispose: function () {
                this.unmount(), this.off()
            }
        }, I(ob, xe);
        var Nb = {
            mousedown: function (e) {
                if (this._dragging) Eb(this, e); else if (!e.target || !e.target.draggable) {
                    _b(e);
                    var t = this.group.transformCoordToLocal(e.offsetX, e.offsetY);
                    this._creatingCover = null, (this._creatingPanel = cb(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, r = cb(e, t, i);
                        if (!e._dragging) for (var a = 0; a < o.length; a++) {
                            var s = o[a].__brushOption;
                            if (r && (!0 === r || s.panelId === r.panelId) && Pb[s.brushType].contain(o[a], i[0], i[1])) return
                        }
                        r && n.setCursorStyle("crosshair")
                    }
                }(this, e, n), this._dragging) {
                    _b(e);
                    var o = Db(this, e, n, !1);
                    o && pb(this, o)
                }
            }, mouseup: function (e) {
                Eb(this, e)
            }
        };

        function Eb(e, t) {
            if (e._dragging) {
                _b(t);
                var i = t.offsetX, n = t.offsetY, o = e.group.transformCoordToLocal(i, n), r = Db(e, t, o, !0);
                e._dragging = !1, e._track = [], e._creatingCover = null, r && pb(e, r)
            }
        }

        var Pb = {
            lineX: Ob(0), lineY: Ob(1), rect: {
                createCover: function (e, t) {
                    return mb(GT(bb, function (e) {
                        return e
                    }, function (e) {
                        return e
                    }), e, t, ["w", "e", "n", "s", "se", "sw", "ne", "nw"])
                }, getCreatingRange: function (e) {
                    var t = gb(e);
                    return Tb(t[1][0], t[1][1], t[0][0], t[0][1])
                }, updateCoverShape: function (e, t, i, n) {
                    vb(e, t, i, n)
                }, updateCommon: yb, contain: Ab
            }, polygon: {
                createCover: function (e, t) {
                    var i = new Di;
                    return i.add(new qa({name: "main", style: kb(t), silent: !0})), i
                }, getCreatingRange: function (e) {
                    return e
                }, endCreating: function (e, t) {
                    t.remove(t.childAt(0)), t.add(new Xa({
                        name: "main",
                        draggable: !0,
                        drift: GT(Cb, e, t),
                        ondragend: GT(pb, e, {isEnd: !0})
                    }))
                }, updateCoverShape: function (e, t, i, n) {
                    t.childAt(0).setShape({points: Ib(e, t, i)})
                }, updateCommon: yb, contain: Ab
            }
        };

        function Ob(e) {
            return {
                createCover: function (t, i) {
                    return mb(GT(bb, 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 = gb(t);
                    return [XT(i[0][e], i[1][e]), qT(i[0][e], i[1][e])]
                }, updateCoverShape: function (t, i, n, o) {
                    var r, a = hb(t, i);
                    if (!0 !== a && a.getLinearBrushOtherExtent) r = a.getLinearBrushOtherExtent(e, t._transform); else {
                        var s = t._zr;
                        r = [0, [s.getWidth(), s.getHeight()][1 - e]]
                    }
                    var l = [n, r];
                    e && l.reverse(), vb(t, i, l, o)
                }, updateCommon: yb, contain: Ab
            }
        }

        function Mb(e) {
            return e = Rb(e), function (t, i) {
                return cl(t, e)
            }
        }

        function Fb(e, t) {
            return e = Rb(e), function (i) {
                var n = null != t ? t : i, o = n ? e.width : e.height, r = n ? e.x : e.y;
                return [r, r + (o || 0)]
            }
        }

        function Lb(e, t, i) {
            return e = Rb(e), function (n, o, r) {
                return e.contain(o[0], o[1]) && !Fy(n, t, i)
            }
        }

        function Rb(e) {
            return Ai.create(e)
        }

        var Bb = ["axisLine", "axisTickLabel", "axisName"], Ub = kf({
            type: "parallelAxis", init: function (e, t) {
                Ub.superApply(this, "init", arguments), (this._brushController = new ob(t.getZr())).on("brush", P(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 Di, this.group.add(this._axisGroup), e.get("show")) {
                        var r = function (e, t) {
                                return t.getComponent("parallel", e.get("parallelIndex"))
                            }(e, t), a = r.coordinateSystem, s = e.getAreaSelectStyle(), l = s.width, d = e.axis.dim,
                            u = w({strokeContainThreshold: l}, a.getAxisLayout(d)), c = new Vm(e, u);
                        A(Bb, c.add, c), this._axisGroup.add(c.getGroup()), this._refreshBrushController(u, s, e, r, l, i);
                        var h = n && !1 === n.animation ? null : e;
                        ul(o, this._axisGroup, h)
                    }
                }
            }, _refreshBrushController: function (e, t, i, n, o, r) {
                var a = i.axis.getExtent(), s = a[1] - a[0], l = Math.min(30, .1 * Math.abs(s)),
                    d = Ai.create({x: a[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: Mb(d),
                    isTargetByCursor: Lb(d, r, n),
                    getLinearBrushOtherExtent: Fb(d, 0)
                }]).enableBrush({brushType: "lineX", brushStyle: t, removeOnClick: !0}).updateCovers(function (e) {
                    var t = e.axis;
                    return D(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 = D(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()
            }
        });
        kf({
            type: "parallel", render: function (e, t, i) {
                this._model = e, this._api = i, this._handlers || (this._handlers = {}, A(Vb, function (e, t) {
                    i.getZr().on(t, this._handlers[t] = P(e, this))
                }, this)), Sc(this, "_throttledDispatchExpand", e.get("axisExpandRate"), "fixRate")
            }, dispose: function (e, t) {
                A(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(w({type: "parallelAxisExpand"}, e))
            }
        });
        var Vb = {
            mousedown: function (e) {
                Kb(this, "click") && (this._mouseDownPoint = [e.offsetX, e.offsetY])
            }, mouseup: function (e) {
                var t = this._mouseDownPoint;
                if (Kb(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 && Kb(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 Kb(e, t) {
            var i = e._model;
            return i.get("axisExpandable") && i.get("axisExpandTriggerOn") === t
        }

        function Wb(e, t, i, n) {
            for (var o, r = [], a = 0; a < i.length; a++) {
                var s = i[a], l = e.get(e.mapDimension(s), t);
                o = l, ("category" === n.getAxis(s).type ? null == o : null == o || isNaN(o)) || r.push(n.dataToPoint(l, s))
            }
            return r
        }

        function jb(e, t, i, n, o) {
            var r = Wb(e, i, n, o), a = new qa({shape: {points: r}, silent: !0, z2: 10});
            return t.add(a), e.setItemGraphicEl(i, a), a
        }

        function Gb(e) {
            var t = e.get("smooth", !0);
            return !0 === t && (t = .3), {lineStyle: e.getModel("lineStyle").getLineStyle(), smooth: null != t ? t : .3}
        }

        function Hb(e, t, i, n) {
            var o = n.lineStyle;
            t.hasItemOption && (o = t.getItemModel(i).getModel("lineStyle").getLineStyle()), e.useStyle(o);
            var r = e.style;
            r.fill = null, r.stroke = t.getItemVisual(i, "color"), r.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;
                    A(e.series, function (e) {
                        e && "parallel" === e.type && (t = !0)
                    }), t && (e.parallel = [{}])
                }
            }(e), A(Oo((t = e).parallelAxis), function (e) {
                if (R(e)) {
                    var i = e.parallelIndex || 0, n = Oo(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 = $();
                            A(i.dimensions, function (e) {
                                var t = function (e) {
                                    return +e.replace("dim", "")
                                }(e);
                                n.set(e, t)
                            })
                        }
                    }
                }(i, this), ap(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 Di, this.group.add(this._dataGroup), this._data, this._initialized
            }, render: function (e, t, i, n) {
                var o = this._dataGroup, r = e.getData(), a = this._data, s = e.coordinateSystem, l = s.dimensions,
                    d = Gb(e);
                if (r.diff(a).add(function (e) {
                    Hb(jb(r, o, e, l, s), r, e, d)
                }).update(function (t, i) {
                    var o = a.getItemGraphicEl(i), u = Wb(r, t, l, s);
                    r.setItemGraphicEl(t, o);
                    var c = n && !1 === n.animation ? null : e;
                    rl(o, {shape: {points: u}}, c, t), Hb(o, r, t, d)
                }).remove(function (e) {
                    var t = a.getItemGraphicEl(e);
                    o.remove(t)
                }).execute(), !this._initialized) {
                    this._initialized = !0;
                    var u = function (e, t, i) {
                        var n = e.model, o = e.getRect(),
                            r = new es({shape: {x: o.x, y: o.y, width: o.width, height: o.height}}),
                            a = "horizontal" === n.get("layout") ? "width" : "height";
                        return r.setShape(a, 0), al(r, {shape: {width: o.width, height: o.height}}, t, i), r
                    }(s, e, function () {
                        setTimeout(function () {
                            o.removeClipPath()
                        })
                    });
                    o.setClipPath(u)
                }
                this._data = r
            }, 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, r = o.dimensions, a = Gb(t), s = e.start; s < e.end; s++) {
                    var l = jb(n, this._dataGroup, s, r, o);
                    l.incremental = !0, Hb(l, n, s, a)
                }
            }, dispose: function () {
            }, remove: function () {
                this._dataGroup && this._dataGroup.removeAll(), this._data = null
            }
        });
        var zb = ["lineStyle", "normal", "opacity"];
        mf({
            seriesType: "parallel", reset: function (e, t, i) {
                var n = e.getModel("itemStyle"), o = e.getModel("lineStyle"), r = t.get("color"),
                    a = o.get("color") || n.get("color") || r[e.seriesIndex % r.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", a), {
                    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(zb, !0);
                                null != o && (n = o)
                            }
                            t.setItemVisual(i, "opacity", n)
                        }, e.start, e.end)
                    }
                }
            }
        });
        var Xb = 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, r = this.levelModels = {}, a = 0; a < o.length; a++) null != o[a].depth && 0 <= o[a].depth && (r[o[a].depth] = new Cl(o[a], this, t));
                    if (n && i) return Fk(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, r = o.source + " -- " + o.target;
                        return n.value && (r += " : " + n.value), $l(r)
                    }
                    if ("node" !== i) return Xb.superCall(this, "formatTooltip", e, t);
                    var a = this.getGraph().getNodeByIndex(e).getLayout().value, s = this.getDataParams(e, i).data.name;
                    return a && (r = s + " : " + a), $l(r)
                },
                optionUpdated: function () {
                    var e = this.option;
                    !0 === e.focusNodeAdjacency && (e.focusNodeAdjacency = "allEdges")
                },
                getDataParams: function (e, t) {
                    var i = Xb.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
                }
            }), qb = ["itemStyle", "opacity"], Yb = ["emphasis", "itemStyle", "opacity"], Jb = ["lineStyle", "opacity"],
            Zb = ["emphasis", "lineStyle", "opacity"];

        function Qb(e, t) {
            return e.getVisual("opacity") || e.getModel().get(t)
        }

        function $b(e, t, i) {
            var n = e.getGraphicEl(), o = Qb(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 eC(e, t) {
            var i = Qb(e, t), n = e.getGraphicEl();
            n.traverse(function (e) {
                "group" !== e.type && e.setStyle("opacity", i)
            }), n.highlight && n.highlight()
        }

        var tC = Cs({
            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 iC(e) {
            var t = e.hostGraph.data.getRawDataItem(e.dataIndex);
            return null != t.depth && 0 <= t.depth
        }

        function nC(e, t, i, n, o) {
            var r = "vertical" === o ? "x" : "y";
            A(e, function (e) {
                var a, s, l;
                e.sort(function (e, t) {
                    return e.getLayout()[r] - t.getLayout()[r]
                });
                for (var d = 0, u = e.length, c = "vertical" === o ? "dx" : "dy", h = 0; h < u; h++) 0 < (l = d - (s = e[h]).getLayout()[r]) && (a = s.getLayout()[r] + l, "vertical" === o ? s.setLayout({x: a}, !0) : s.setLayout({y: a}, !0)), d = s.getLayout()[r] + s.getLayout()[c] + t;
                if (0 < (l = d - t - ("vertical" === o ? n : i))) for (a = s.getLayout()[r] - l, "vertical" === o ? s.setLayout({x: a}, !0) : s.setLayout({y: a}, !0), d = a, h = u - 2; 0 <= h; --h) 0 < (l = (s = e[h]).getLayout()[r] + s.getLayout()[c] + t - d) && (a = s.getLayout()[r] - l, "vertical" === o ? s.setLayout({x: a}, !0) : s.setLayout({y: a}, !0)), d = s.getLayout()[r]
            })
        }

        function oC(e, t, i) {
            A(e.slice().reverse(), function (e) {
                A(e, function (e) {
                    if (e.outEdges.length) {
                        var n = cC(e.outEdges, rC, i) / cC(e.outEdges, uC, i);
                        if (isNaN(n)) {
                            var o = e.outEdges.length;
                            n = o ? cC(e.outEdges, aC, i) / o : 0
                        }
                        if ("vertical" === i) {
                            var r = e.getLayout().x + (n - dC(e, i)) * t;
                            e.setLayout({x: r}, !0)
                        } else {
                            var a = e.getLayout().y + (n - dC(e, i)) * t;
                            e.setLayout({y: a}, !0)
                        }
                    }
                })
            })
        }

        function rC(e, t) {
            return dC(e.node2, t) * e.getValue()
        }

        function aC(e, t) {
            return dC(e.node2, t)
        }

        function sC(e, t) {
            return dC(e.node1, t) * e.getValue()
        }

        function lC(e, t) {
            return dC(e.node1, t)
        }

        function dC(e, t) {
            return "vertical" === t ? e.getLayout().x + e.getLayout().dx / 2 : e.getLayout().y + e.getLayout().dy / 2
        }

        function uC(e) {
            return e.getValue()
        }

        function cC(e, t, i) {
            for (var n = 0, o = e.length, r = -1; ++r < o;) {
                var a = +t.call(e, e[r], i);
                isNaN(a) || (n += a)
            }
            return n
        }

        function hC(e, t, i) {
            A(e, function (e) {
                A(e, function (e) {
                    if (e.inEdges.length) {
                        var n = cC(e.inEdges, sC, i) / cC(e.inEdges, uC, i);
                        if (isNaN(n)) {
                            var o = e.inEdges.length;
                            n = o ? cC(e.inEdges, lC, i) / o : 0
                        }
                        if ("vertical" === i) {
                            var r = e.getLayout().x + (n - dC(e, i)) * t;
                            e.setLayout({x: r}, !0)
                        } else {
                            var a = e.getLayout().y + (n - dC(e, i)) * t;
                            e.setLayout({y: a}, !0)
                        }
                    }
                })
            })
        }

        bf({
            type: "sankey", _model: null, _focusAdjacencyDisabled: !1, render: function (e, t, i) {
                var n = this, o = e.getGraph(), r = this.group, a = e.layoutInfo, s = a.width, l = a.height,
                    d = e.getData(), u = e.getData("edge"), c = e.get("orient");
                this._model = e, r.removeAll(), r.attr("position", [a.x, a.y]), o.eachEdge(function (t) {
                    var i = new tC;
                    i.dataIndex = t.dataIndex, i.seriesIndex = e.seriesIndex, i.dataType = "edge";
                    var n, o, a, d, h, f, p, g, m = t.getModel("lineStyle"), v = m.get("curveness"),
                        y = t.node1.getLayout(), w = t.node1.getModel(), k = w.get("localX"), T = w.get("localY"),
                        b = t.node2.getLayout(), C = t.node2.getModel(), S = C.get("localX"), I = C.get("localY"),
                        _ = t.getLayout();
                    switch (i.shape.extent = Math.max(1, _.dy), g = "vertical" === (i.shape.orient = c) ? (n = (null != k ? k * s : y.x) + _.sy, o = (null != T ? T * l : y.y) + y.dy, a = (null != S ? S * s : b.x) + _.ty, h = n, f = o * (1 - v) + (d = null != I ? I * l : b.y) * v, p = a, o * v + d * (1 - v)) : (n = (null != k ? k * s : y.x) + y.dx, o = (null != T ? T * l : y.y) + _.sy, h = n * (1 - v) + (a = null != S ? S * s : b.x) * v, f = o, p = n * v + a * (1 - v), d = (null != I ? I * l : b.y) + _.ty), i.setShape({
                        x1: n,
                        y1: o,
                        x2: a,
                        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()), r.add(i), u.setItemGraphicEl(t.dataIndex, i)
                }), o.eachNode(function (t) {
                    var i = t.getLayout(), n = t.getModel(), o = n.get("localX"), a = 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 != a ? a * 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), r.add(h), d.setItemGraphicEl(t.dataIndex, h), h.dataType = "node"
                }), d.eachItemGraphicEl(function (t, o) {
                    var r = d.getItemModel(o);
                    r.get("draggable") && (t.drift = function (t, r) {
                        n._focusAdjacencyDisabled = !0, this.shape.x += t, this.shape.y += r, 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), r.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 r = u.getItemModel(o);
                    t.focusNodeAdjHandler && t.off("mouseover", t.focusNodeAdjHandler), t.unfocusNodeAdjHandler && t.off("mouseout", t.unfocusNodeAdjHandler), r.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") && r.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 al(n, {shape: {width: e.width + 20}}, t, function () {
                        r.removeClipPath()
                    }), n
                }(r.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(), r = o.graph, a = n.dataIndex, s = o.getItemModel(a), l = n.edgeDataIndex;
                if (null != a || null != l) {
                    var d = r.getNodeByIndex(a), u = r.getEdgeByIndex(l);
                    if (r.eachNode(function (e) {
                        $b(e, qb, .1)
                    }), r.eachEdge(function (e) {
                        $b(e, Jb, .1)
                    }), d) {
                        eC(d, Yb);
                        var c = s.get("focusNodeAdjacency");
                        "outEdges" === c ? A(d.outEdges, function (e) {
                            e.dataIndex < 0 || (eC(e, Zb), eC(e.node2, Yb))
                        }) : "inEdges" === c ? A(d.inEdges, function (e) {
                            e.dataIndex < 0 || (eC(e, Zb), eC(e.node1, Yb))
                        }) : "allEdges" === c && A(d.edges, function (e) {
                            e.dataIndex < 0 || (eC(e, Zb), e.node1 !== d && eC(e.node1, Yb), e.node2 !== d && eC(e.node2, Yb))
                        })
                    }
                    u && (eC(u, Zb), eC(u.node1, Yb), eC(u.node2, Yb))
                }
            }, unfocusNodeAdjacency: function (e, t, i, n) {
                var o = e.getGraph();
                o.eachNode(function (e) {
                    $b(e, qb)
                }), o.eachEdge(function (e) {
                    $b(e, Jb)
                })
            }
        }), 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), r = (e.layoutInfo = o).width, a = o.height, s = e.getGraph(), l = s.nodes, d = s.edges;
                !function (e) {
                    A(e, function (e) {
                        var t = cC(e.outEdges, uC), i = cC(e.inEdges, uC), n = e.getValue() || 0, o = Math.max(t, i, n);
                        e.setLayout({value: o}, !0)
                    })
                }(l), function (e, t, i, n, o, r, a, s, l) {
                    (function (e, t, i, n, o, r, a) {
                        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" === r ? g.setLayout({dy: i}, !0) : g.setLayout({dx: i}, !0);
                                for (var y = 0; y < g.outEdges.length; y++) {
                                    var w = g.outEdges[y], k = t.indexOf(w);
                                    s[k] = 0;
                                    var T = w.node2, b = e.indexOf(T);
                                    0 == --l[b] && u.indexOf(T) < 0 && u.push(T)
                                }
                            }
                            ++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 C = c - 1 < f ? f : c - 1;
                        a && "left" !== a && function (e, t, i, n) {
                            if ("right" === t) {
                                for (var o = [], r = e, a = 0; r.length;) {
                                    for (var s = 0; s < r.length; s++) {
                                        var l = r[s];
                                        l.setLayout({skNodeHeight: a}, !0);
                                        for (var d = 0; d < l.inEdges.length; d++) {
                                            var u = l.inEdges[d];
                                            o.indexOf(u.node1) < 0 && o.push(u.node1)
                                        }
                                    }
                                    r = o, o = [], ++a
                                }
                                A(e, function (e) {
                                    iC(e) || e.setLayout({depth: Math.max(0, n - e.getLayout().skNodeHeight)}, !0)
                                })
                            } else "justify" === t && function (e, t) {
                                A(e, function (e) {
                                    iC(e) || e.outEdges.length || e.setLayout({depth: t}, !0)
                                })
                            }(e, n)
                        }(e, a, 0, C), function (e, t, i) {
                            A(e, function (e) {
                                var n = e.getLayout().depth * t;
                                "vertical" === i ? e.setLayout({y: n}, !0) : e.setLayout({x: n}, !0)
                            })
                        }(e, "vertical" === r ? (o - i) / C : (n - i) / C, r)
                    })(e, t, i, o, r, s, l), function (e, t, i, n, o, r, a) {
                        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
                            }), A(o.keys, function (e) {
                                i.push(o.buckets.get(e))
                            }), i
                        }(e);
                        (function (e, t, i, n, o, r) {
                            var a = 1 / 0;
                            A(e, function (e) {
                                var t = e.length, s = 0;
                                A(e, function (e) {
                                    s += e.getLayout().value
                                });
                                var l = "vertical" === r ? (n - (t - 1) * o) / s : (i - (t - 1) * o) / s;
                                l < a && (a = l)
                            }), A(e, function (e) {
                                A(e, function (e, t) {
                                    var i = e.getLayout().value * a;
                                    "vertical" === r ? (e.setLayout({x: t}, !0), e.setLayout({dx: i}, !0)) : (e.setLayout({y: t}, !0), e.setLayout({dy: i}, !0))
                                })
                            }), A(t, function (e) {
                                var t = +e.getValue() * a;
                                e.setLayout({dy: t}, !0)
                            })
                        })(s, t, i, n, o, a), nC(s, o, i, n, a);
                        for (var l = 1; 0 < r; r--) oC(s, l *= .99, a), nC(s, o, i, n, a), hC(s, l, a), nC(s, o, i, n, a)
                    }(e, t, r, o, n, a, s), function (e, t) {
                        var i = "y";
                        A(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]
                            })
                        }), A(e, function (e) {
                            var t = 0, i = 0;
                            A(e.outEdges, function (e) {
                                e.setLayout({sy: t}, !0), t += e.getLayout().dy
                            }), A(e.inEdges, function (e) {
                                e.setLayout({ty: i}, !0), i += e.getLayout().dy
                            })
                        })
                    }(e)
                }(l, d, i, n, r, a, 0 !== N(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;
                    A(t, function (e) {
                        var t = e.getLayout().value;
                        t < i && (i = t), n < t && (n = t)
                    }), A(t, function (t) {
                        var o = new Zw({
                            type: "color",
                            mappingMethod: "linear",
                            dataExtent: [i, n],
                            visual: e.get("color")
                        }).mapValueToVisual(t.getLayout().value), r = t.getModel().get("itemStyle.color");
                        null != r ? t.setVisual("color", r) : t.setVisual("color", o)
                    })
                }
            })
        });
        var fC = {
            _baseAxisDim: null, getInitialData: function (e, t) {
                var i, n, o = t.getComponent("xAxis", this.get("xAxisIndex")),
                    r = t.getComponent("yAxis", this.get("yAxisIndex")), a = o.get("type"), s = r.get("type");
                "category" === a ? (e.layout = "horizontal", i = o.getOrdinalMeta(), n = !0) : "category" === s ? (e.layout = "vertical", i = r.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, r], f = h[d].get("type"), p = h[1 - d].get("type"), g = e.data;
                if (g && n) {
                    var m = [];
                    A(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: Df(f),
                    ordinalMeta: i,
                    otherDims: {tooltip: !1, itemName: 0},
                    dimsDef: ["base"]
                }, {name: c, type: Df(p), dimsDef: v.slice()}];
                return Ov(this, {coordDimensions: y, dimensionsCount: v.length + 1, encodeDefaulter: O(Hd, y, this)})
            }, getBaseAxis: function () {
                var e = this._baseAxisDim;
                return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis
            }
        };
        I(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
            }
        }), fC, !0);
        var pC = ["itemStyle"], gC = ["emphasis", "itemStyle"], mC = (fc.extend({
            type: "boxplot", render: function (e, t, i) {
                var n = e.getData(), o = this.group, r = this._data;
                this._data || o.removeAll();
                var a = "horizontal" === e.get("layout") ? 1 : 0;
                n.diff(r).add(function (e) {
                    if (n.hasValue(e)) {
                        var t = vC(n.getItemLayout(e), n, e, a, !0);
                        n.setItemGraphicEl(e, t), o.add(t)
                    }
                }).update(function (e, t) {
                    var i = r.getItemGraphicEl(t);
                    if (n.hasValue(e)) {
                        var s = n.getItemLayout(e);
                        i ? yC(s, i, n, e) : i = vC(s, n, e, a), o.add(i), n.setItemGraphicEl(e, i)
                    } else o.remove(i)
                }).remove(function (e) {
                    var t = r.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
        }), Ta.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 vC(e, t, i, n, o) {
            var r = e.ends, a = new mC({
                shape: {
                    points: o ? function (e, t, i) {
                        return D(e, function (e) {
                            return (e = e.slice())[t] = i.initBaseline, e
                        })
                    }(r, n, e) : r
                }
            });
            return yC(e, a, t, i, o), a
        }

        function yC(e, t, i, n, o) {
            var r = i.hostModel;
            (0, ml[o ? "initProps" : "updateProps"])(t, {shape: {points: e.ends}}, r, n);
            var a = i.getItemModel(n), s = a.getModel(pC), l = i.getItemVisual(n, "color"),
                d = s.getItemStyle(["borderColor"]);
            d.stroke = l, d.strokeNoScale = !0, t.useStyle(d), t.z2 = 100, Hs(t, a.getModel(gC).getItemStyle())
        }

        var wC = ["itemStyle", "borderColor"], kC = A;
        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(wC) || n
                }), e.isSeriesFiltered(t) || o.each(function (e) {
                    var t = o.getItemModel(e);
                    o.setItemVisual(e, {color: t.get(wC, !0)})
                })
            })
        }), gf(function (e) {
            var t = function (e) {
                var t = [], i = [];
                return e.eachSeriesByType("boxplot", function (e) {
                    var n = e.getBaseAxis(), o = C(i, n);
                    o < 0 && (o = i.length, i[o] = n, t[o] = {axis: n, seriesModels: []}), t[o].seriesModels.push(e)
                }), t
            }(e);
            kC(t, function (e) {
                var t = e.seriesModels;
                t.length && (function (e) {
                    var t, i, n = e.axis, o = e.seriesModels, r = o.length, a = e.boxWidthList = [],
                        s = e.boxOffsetList = [], l = [];
                    if ("category" === n.type) i = n.getBandWidth(); else {
                        var d = 0;
                        kC(o, function (e) {
                            d = Math.max(d, e.getData().count())
                        }), t = n.getExtent(), Math.abs(t[1] - t[0])
                    }
                    kC(o, function (e) {
                        var t = e.get("boxWidth");
                        M(t) || (t = [t, t]), l.push([Nl(t[0], i) || 0, Nl(t[1], i) || 0])
                    });
                    var u = .8 * i - 2, c = u / r * .3, h = (u - c * (r - 1)) / r, f = h / 2 - u / 2;
                    kC(o, function (e, t) {
                        s.push(f), f += c + h, a.push(Math.min(Math.max(h, l[t][0]), l[t][1]))
                    })
                }(e), kC(t, function (t, i) {
                    !function (e, t, i) {
                        var n = e.coordinateSystem, o = e.getData(), r = i / 2,
                            a = "horizontal" === e.get("layout") ? 0 : 1, s = 1 - a, l = ["x", "y"],
                            d = o.mapDimension(l[a]), 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 = w(h, u[2], c), p = w(h, u[0], c), g = w(h, u[1], c),
                                m = w(h, u[3], c), v = w(h, u[4], c), y = [];
                            k(y, g, 0), k(y, m, 1), y.push(p, g, v, m), T(y, p), T(y, v), T(y, f), o.setItemLayout(c, {
                                initBaseline: f[s],
                                ends: y
                            })
                        }

                        function w(e, i, r) {
                            var l, d = o.get(i, r), u = [];
                            return u[a] = e, u[s] = d, isNaN(e) || isNaN(d) ? l = [NaN, NaN] : (l = n.dataToPoint(u))[a] += t, l
                        }

                        function k(e, t, i) {
                            var n = t.slice(), o = t.slice();
                            n[a] += r, o[a] -= r, i ? e.push(n, o) : e.push(o, n)
                        }

                        function T(e, t) {
                            var i = t.slice(), n = t.slice();
                            i[a] -= r, n[a] += r, e.push(i, n)
                        }
                    }(t, e.boxOffsetList[i], e.boxWidthList[i])
                }))
            })
        }), I(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)
            }
        }), fC, !0);
        var TC = ["itemStyle"], bC = ["emphasis", "itemStyle"], CC = ["color", "color0", "borderColor", "borderColor0"],
            SC = (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"),
                        r = e.get("clip", !0), a = e.coordinateSystem, s = a.getArea && a.getArea();
                    this._data || n.removeAll(), t.diff(i).add(function (i) {
                        if (t.hasValue(i)) {
                            var a, l = t.getItemLayout(i);
                            if (r && _C(s, l)) return;
                            al(a = IC(l, 0, !0), {shape: {points: l.ends}}, e, i), AC(a, t, i, o), n.add(a), t.setItemGraphicEl(i, a)
                        }
                    }).update(function (a, l) {
                        var d = i.getItemGraphicEl(l);
                        if (t.hasValue(a)) {
                            var u = t.getItemLayout(a);
                            r && _C(s, u) ? n.remove(d) : (d ? rl(d, {shape: {points: u.ends}}, e, a) : d = IC(u), AC(d, t, a, o), n.add(d), t.setItemGraphicEl(a, 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(), xC(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 r;
                        AC(r = IC(n.getItemLayout(i)), n, i, o), r.incremental = !0, this.group.add(r)
                    }
                }, _incrementalRenderLarge: function (e, t) {
                    xC(t, this.group, !0)
                }, remove: function (e) {
                    this._clear()
                }, _clear: function () {
                    this.group.removeAll(), this._data = null
                }, dispose: te
            }), Ta.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 IC(e, t, i) {
            var n = e.ends;
            return new SC({
                shape: {
                    points: i ? function (e, t) {
                        return D(e, function (e) {
                            return (e = e.slice())[1] = t.initBaseline, e
                        })
                    }(n, e) : n
                }, z2: 100
            })
        }

        function _C(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 AC(e, t, i, n) {
            var o = t.getItemModel(i), r = o.getModel(TC), a = t.getItemVisual(i, "color"),
                s = t.getItemVisual(i, "borderColor") || a, l = r.getItemStyle(CC);
            e.useStyle(l), e.style.strokeNoScale = !0, e.style.fill = a, e.style.stroke = s, e.__simpleBox = n, Hs(e, o.getModel(bC).getItemStyle())
        }

        var DC = Ta.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 xC(e, t, i) {
            var n = e.getData(), o = n.getLayout("largePoints"), r = new DC({shape: {points: o}, __sign: 1});
            t.add(r);
            var a = new DC({shape: {points: o}, __sign: -1});
            t.add(a), NC(1, r, e, n), NC(-1, a, e, n), i && (r.incremental = !0, a.incremental = !0)
        }

        function NC(e, t, i, n) {
            var o = 0 < e ? "P" : "N", r = n.getVisual("borderColor" + o) || n.getVisual("color" + o),
                a = i.getModel(TC).getItemStyle(CC);
            t.useStyle(a), t.style.fill = null, t.style.stroke = r
        }

        var EC = ["itemStyle", "borderColor"], PC = ["itemStyle", "borderColor0"], OC = ["itemStyle", "color"],
            MC = ["itemStyle", "color0"], FC = {
                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 r = t.getItemModel(o), a = t.getItemLayout(o).sign;
                                t.setItemVisual(o, {color: i(a, r), borderColor: n(a, r)})
                            }
                        }
                    };

                    function i(e, t) {
                        return t.get(0 < e ? OC : MC)
                    }

                    function n(e, t) {
                        return t.get(0 < e ? EC : PC)
                    }
                }
            }, LC = "undefined" != typeof Float32Array ? Float32Array : Array, RC = {
                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()),
                                r = Nl(j(e.get("barMaxWidth"), o), o), a = Nl(j(e.get("barMinWidth"), 1), o),
                                s = e.get("barWidth");
                            return null != s ? Nl(s, o) : Math.max(Math.min(o / 2, r), a)
                        }(e, i), o = ["x", "y"], r = i.mapDimension(o[0]), a = i.mapDimension(o[1], !0), s = a[0], l = a[1],
                        d = a[2], u = a[3];
                    if (i.setLayout({candleWidth: n, isSimpleBox: n <= 1.3}), !(null == r || a.length < 4)) return {
                        progress: e.pipelineContext.large ? function (e, i) {
                            for (var n, o, a = new LC(4 * e.count), c = 0, h = [], f = []; null != (o = e.next());) {
                                var p = i.get(r, 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) ? (a[c++] = NaN, c += 3) : (a[c++] = BC(i, o, g, m, l), h[0] = p, h[1] = v, n = t.dataToPoint(h, null, f), a[c++] = n ? n[0] : NaN, a[c++] = n ? n[1] : NaN, h[1] = y, n = t.dataToPoint(h, null, f), a[c++] = n ? n[1] : NaN)
                            }
                            i.setLayout("largePoints", a)
                        } : function (e, i) {
                            for (var o; null != (o = e.next());) {
                                var a = i.get(r, 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 = b(g, a), y = b(m, a), w = b(f, a),
                                    k = b(p, a), T = [];
                                C(T, y, 0), C(T, v, 1), T.push(I(k), I(y), I(w), I(v)), i.setItemLayout(o, {
                                    sign: BC(i, o, c, h, l),
                                    initBaseline: h < c ? y[1] : v[1],
                                    ends: T,
                                    brushRect: S(f, p, a)
                                })
                            }

                            function b(e, i) {
                                var n = [];
                                return n[0] = i, n[1] = e, isNaN(i) || isNaN(e) ? [NaN, NaN] : t.dataToPoint(n)
                            }

                            function C(e, t, i) {
                                var o = t.slice(), r = t.slice();
                                o[0] = Es(o[0] + n / 2, 1, !1), r[0] = Es(r[0] - n / 2, 1, !0), i ? e.push(o, r) : e.push(r, o)
                            }

                            function S(e, t, i) {
                                var o = b(e, i), r = b(t, i);
                                return o[0] -= n / 2, r[0] -= n / 2, {x: o[0], y: o[1], width: n, height: r[1] - o[1]}
                            }

                            function I(e) {
                                return e[0] = Es(e[0], 1), e
                            }
                        }
                    }
                }
            };

        function BC(e, t, i, n, o) {
            return n < i ? -1 : i < n ? 1 : 0 < t ? e.get(o, t - 1) <= n ? 1 : -1 : 1
        }

        function UC(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 VC(e, t) {
            Di.call(this);
            var i = new Mg(e, t), n = new Di;
            this.add(i), this.add(n), n.beforeUpdate = function () {
                this.attr(i.getScale())
            }, this.updateData(e, t)
        }

        cf(function (e) {
            e && M(e.series) && A(e.series, function (e) {
                R(e) && "k" === e.type && (e.type = "candlestick")
            })
        }), mf(FC), gf(RC), ec.extend({
            type: "series.effectScatter",
            dependencies: ["grid", "polar"],
            getInitialData: function (e, t) {
                return ap(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 KC = VC.prototype;
        KC.stopEffectAnimation = function () {
            this.childAt(1).removeAll()
        }, KC.startEffectAnimation = function (e) {
            for (var t = e.symbolType, i = e.color, n = this.childAt(1), o = 0; o < 3; o++) {
                var r = cg(t, -1, -1, 2, 2, i);
                r.attr({style: {strokeNoScale: !0}, z2: 99, silent: !0, scale: [.5, .5]});
                var a = -o / 3 * e.period + e.effectOffset;
                r.animate("", !0).when(e.period, {scale: [e.rippleScale / 2, e.rippleScale / 2]}).delay(a).start(), r.animateStyle(!0).when(e.period, {opacity: 0}).delay(a).start(), n.add(r)
            }
            UC(n, e)
        }, KC.updateEffectAnimation = function (e) {
            for (var t = this._effectCfg, i = this.childAt(1), n = ["symbolType", "period", "rippleScale"], o = 0; o < n.length; o++) {
                var r = n[o];
                if (t[r] !== e[r]) return this.stopEffectAnimation(), void this.startEffectAnimation(e)
            }
            UC(i, e)
        }, KC.highlight = function () {
            this.trigger("emphasis")
        }, KC.downplay = function () {
            this.trigger("normal")
        }, KC.updateData = function (e, t) {
            var i = e.hostModel;
            this.childAt(0).updateData(e, t);
            var n = this.childAt(1), o = e.getItemModel(t), r = e.getItemVisual(t, "symbol"), a = function (e) {
                return M(e) || (e = [+e, +e]), e
            }(e.getItemVisual(t, "symbolSize")), s = e.getItemVisual(t, "color");
            n.attr("scale", a), n.traverse(function (e) {
                e.attr({fill: s})
            });
            var l = o.getShallow("symbolOffset");
            if (l) {
                var d = n.position;
                d[0] = Nl(l[0], a[0]), d[1] = Nl(l[1], a[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 = r, 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
        }, KC.fadeOut = function (e) {
            this.off("mouseover").off("mouseout").off("emphasis").off("normal"), e && e()
        }, S(VC, Di), bf({
            type: "effectScatter", init: function () {
                this._symbolDraw = new Gg(VC)
            }, 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 WC = "undefined" == typeof Uint32Array ? Array : Uint32Array,
            jC = "undefined" == typeof Float64Array ? Array : Float64Array;

        function GC(e) {
            var t = e.data;
            t && t[0] && t[0][0] && t[0][0].coord && (e.data = D(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 HC = ec.extend({
            type: "series.lines",
            dependencies: ["grid", "polar"],
            visualColorAccessPath: "lineStyle.color",
            init: function (e) {
                e.data = e.data || [], GC(e);
                var t = this._processFlatCoordsArray(e.data);
                this._flatCoords = t.flatCoords, this._flatCoordsOffset = t.flatCoordsOffset, t.flatCoords && (e.data = new Float32Array(t.count)), HC.superApply(this, "init", arguments)
            },
            mergeOption: function (e) {
                if (e.data = e.data || [], GC(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))
                }
                HC.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 r = this._getCoordsFromItemModel(e);
                for (o = 0; o < r.length; o++) t[o] = t[o] || [], t[o][0] = r[o][0], t[o][1] = r[o][1];
                return r.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 WC(i), o = new jC(i), r = 0, a = 0, s = 0, l = 0; l < i;) {
                    s++;
                    var d = e[l++];
                    n[a++] = r + t, n[a++] = d;
                    for (var u = 0; u < d; u++) {
                        var c = e[l++], h = e[l++];
                        o[r++] = c, o[r++] = h
                    }
                }
                return {flatCoordsOffset: new Uint32Array(n.buffer, 0, a), 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 r = e.value;
                    return null != r ? r instanceof Array ? r[o] : r : 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"), r = [];
                return null != n && r.push(n), null != o && r.push(o), $l(r.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 zC(e, t, i) {
            Di.call(this), this.add(this.createLine(e, t, i)), this._updateEffectSymbol(e, t)
        }

        var XC = zC.prototype;

        function qC(e, t, i) {
            Di.call(this), this._createPolyline(e, t, i)
        }

        XC.createLine = function (e, t, i) {
            return new Hk(e, t, i)
        }, XC._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 r = i.get("color") || e.getItemVisual(t, "color"), a = this.childAt(1);
            this._symbolType !== o && (this.remove(a), (a = cg(o, -.5, -.5, 1, 1, r)).z2 = 100, a.culling = !0, this.add(a)), a && (a.setStyle("shadowColor", r), a.setStyle(i.getItemStyle(["color"])), a.attr("scale", n), a.setColor(r), a.attr("scale", n), this._symbolType = o, this._symbolScale = n, this._updateEffectAnimation(e, i, t))
        }, XC._updateEffectAnimation = function (e, t, i) {
            var n = this.childAt(1);
            if (n) {
                var o = this, r = e.getItemLayout(i), a = 1e3 * t.get("period"), s = t.get("loop"),
                    l = t.get("constantSpeed"), d = W(t.get("delay"), function (t) {
                        return t / e.count() * a / 3
                    }), u = "function" == typeof d;
                if (n.ignore = !0, this.updateAnimationPoints(n, r), 0 < l && (a = this.getLineLength(n) / l * 1e3), a !== this._period || s !== this._loop) {
                    n.stopAnimation();
                    var c = d;
                    u && (c = d(i)), 0 < n.__t && (c = -a * n.__t), n.__t = 0;
                    var h = n.animate("", s).when(a, {__t: 1}).delay(c).during(function () {
                        o.updateSymbolPosition(n)
                    });
                    s || h.done(function () {
                        o.remove(n)
                    }), h.start()
                }
                this._period = a, this._loop = s
            }
        }, XC.getLineLength = function (e) {
            return ye(e.__p1, e.__cp1) + ye(e.__cp1, e.__p2)
        }, XC.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]
        }, XC.updateData = function (e, t, i) {
            this.childAt(0).updateData(e, t, i), this._updateEffectSymbol(e, t)
        }, XC.updateSymbolPosition = function (e) {
            var t = e.__p1, i = e.__p2, n = e.__cp1, o = e.__t, r = e.position, a = [r[0], r[1]], s = Sr, l = Ir;
            r[0] = s(t[0], n[0], i[0], o), r[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(a, r);
                e.attr("scale", [e.scale[0], c]), 1 === o && (r[0] = a[0] + (r[0] - a[0]) / 2, r[1] = a[1] + (r[1] - a[1]) / 2)
            } else 1 === e.__lastT ? (c = 2 * ye(t, r), e.attr("scale", [e.scale[0], c])) : e.attr("scale", this._symbolScale);
            e.__lastT = e.__t, e.ignore = !1
        }, XC.updateLayout = function (e, t) {
            this.childAt(0).updateLayout(e, t);
            var i = e.getItemModel(t).getModel("effect");
            this._updateEffectAnimation(e, i, t)
        }, S(zC, Di);
        var YC = qC.prototype;

        function JC(e, t, i) {
            zC.call(this, e, t, i), this._lastFrame = 0, this._lastFramePercent = 0
        }

        YC._createPolyline = function (e, t, i) {
            var n = e.getItemLayout(t), o = new qa({shape: {points: n}});
            this.add(o), this._updateCommonStl(e, t, i)
        }, YC.updateData = function (e, t, i) {
            var n = e.hostModel;
            rl(this.childAt(0), {shape: {points: e.getItemLayout(t)}}, n, t), this._updateCommonStl(e, t, i)
        }, YC._updateCommonStl = function (e, t, i) {
            var n = this.childAt(0), o = e.getItemModel(t), r = e.getItemVisual(t, "color"), a = i && i.lineStyle,
                s = i && i.hoverLineStyle;
            i && !e.hasItemOption || (a = o.getModel("lineStyle").getLineStyle(), s = o.getModel("emphasis.lineStyle").getLineStyle()), n.useStyle(k({
                strokeNoScale: !0,
                fill: "none",
                stroke: r
            }, a)), n.hoverStyle = s, Hs(this)
        }, YC.updateLayout = function (e, t) {
            this.childAt(0).setShape("points", e.getItemLayout(t))
        }, S(qC, Di);
        var ZC = JC.prototype;
        ZC.createLine = function (e, t, i) {
            return new qC(e, t, i)
        }, ZC.updateAnimationPoints = function (e, t) {
            this._points = t;
            for (var i = [0], n = 0, o = 1; o < t.length; o++) {
                var r = t[o - 1], a = t[o];
                n += ye(r, a), i.push(n)
            }
            if (0 !== n) {
                for (o = 0; o < i.length; o++) i[o] /= n;
                this._offsets = i, this._length = n
            }
        }, ZC.getLineLength = function (e) {
            return this._length
        }, ZC.updateSymbolPosition = function (e) {
            var t = e.__t, i = this._points, n = this._offsets, o = i.length;
            if (n) {
                var r = this._lastFrame;
                if (t < this._lastFramePercent) {
                    for (a = Math.min(r + 1, o - 1); 0 <= a && !(n[a] <= t); a--) ;
                    a = Math.min(a, o - 2)
                } else {
                    for (var a = r; a < o && !(n[a] > t); a++) ;
                    a = Math.min(a - 1, o - 2)
                }
                Te(e.position, i[a], i[a + 1], (t - n[a]) / (n[a + 1] - n[a]));
                var s = i[a + 1][0] - i[a][0], l = i[a + 1][1] - i[a][1];
                e.rotation = -Math.atan2(l, s) - Math.PI / 2, this._lastFrame = a, this._lastFramePercent = t, e.ignore = !1
            }
        }, S(JC, zC);
        var QC = Cs({
            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 r = i[o++];
                    if (0 < r) {
                        e.moveTo(i[o++], i[o++]);
                        for (var a = 1; a < r; a++) 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 r = 0, a = 0; a < n.length;) {
                    var s = n[a++];
                    if (0 < s) for (var l = n[a++], d = n[a++], u = 1; u < s; u++) if (ta(l, d, c = n[a++], h = n[a++])) return r;
                    r++
                } else for (r = 0, a = 0; a < n.length;) {
                    l = n[a++], d = n[a++];
                    var c = n[a++], h = n[a++];
                    if (0 < o) {
                        if (na(l, d, (l + c) / 2 - (d - h) * o, (d + h) / 2 - (c - l) * o, c, h)) return r
                    } else if (ta(l, d, c, h)) return r;
                    r++
                }
                return -1
            }
        });

        function $C() {
            this.group = new Di
        }

        var eS = $C.prototype;
        eS.isPersistent = function () {
            return !this._incremental
        }, eS.updateData = function (e) {
            this.group.removeAll();
            var t = new QC({rectHover: !0, cursor: "default"});
            t.setShape({segs: e.getLayout("linesPoints")}), this._setCommon(t, e), this.group.add(t), this._incremental = null
        }, eS.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
        }, eS.incrementalUpdate = function (e, t) {
            var i = new QC;
            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))
        }, eS.remove = function () {
            this._clearIncremental(), this._incremental = null, this.group.removeAll()
        }, eS._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)
            }))
        }, eS._clearIncremental = function () {
            var e = this._incremental;
            e && e.clearDisplaybles()
        };
        var tS = {
            seriesType: "lines", plan: uc(), reset: function (e) {
                var t = e.coordinateSystem, i = e.get("polyline"), n = e.pipelineContext.large;
                return {
                    progress: function (o, r) {
                        var a = [];
                        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, a);
                                i && (s[c++] = f);
                                for (var p = 0; p < f; p++) h = t.dataToPoint(a[p], !1, h), s[c++] = h[0], s[c++] = h[1]
                            }
                            r.setLayout("linesPoints", s)
                        } else for (u = o.start; u < o.end; u++) {
                            var g = r.getItemModel(u), m = (f = e.getLineCoords(u, a), []);
                            if (i) for (var v = 0; v < f; v++) m.push(t.dataToPoint(a[v])); else {
                                m[0] = t.dataToPoint(a[0]), m[1] = t.dataToPoint(a[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])
                            }
                            r.setItemLayout(u, m)
                        }
                    }
                }
            }
        };

        function iS(e) {
            return e instanceof Array || (e = [e, e]), e
        }

        bf({
            type: "lines", init: function () {
            }, render: function (e, t, i) {
                var n = e.getData(), o = this._updateLineDraw(n, e), r = e.get("zlevel"),
                    a = e.get("effect.trailLength"), s = i.getZr(), l = "svg" === s.painter.getType();
                l || s.painter.getLayer(r).clear(!0), null == this._lastZlevel || l || s.configLayer(this._lastZlevel, {motionBlur: !1}), this._showEffect(e) && a && (l || s.configLayer(r, {
                    motionBlur: !0,
                    lastFrameAlpha: Math.max(Math.min(a / 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 = r, 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 r = tS.reset(e);
                r.progress && r.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"), r = t.pipelineContext.large;
                return i && n === this._hasEffet && o === this._isPolyline && r === this._isLargeDraw || (i && i.remove(), i = this._lineDraw = r ? new $C : new Xk(o ? n ? JC : qC : n ? zC : Hk), this._hasEffet = n, this._isPolyline = o, this._isLargeDraw = r, 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 nS = "lineStyle.opacity".split("."), oS = {
            seriesType: "lines", reset: function (e, t, i) {
                var n = iS(e.get("symbol")), o = iS(e.get("symbolSize")), r = e.getData();
                return r.setVisual("fromSymbol", n && n[0]), r.setVisual("toSymbol", n && n[1]), r.setVisual("fromSymbolSize", o && o[0]), r.setVisual("toSymbolSize", o && o[1]), r.setVisual("opacity", e.get(nS)), {
                    dataEach: r.hasItemOption ? function (e, t) {
                        var i = e.getItemModel(t), n = iS(i.getShallow("symbol", !0)),
                            o = iS(i.getShallow("symbolSize", !0)), r = i.get(nS);
                        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", r)
                    } : null
                }
            }
        };

        function rS() {
            var e = T();
            this.canvas = e, this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {}
        }

        gf(tS), mf(oS), ec.extend({
            type: "series.heatmap",
            getInitialData: function (e, t) {
                return ap(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
            }
        }), rS.prototype = {
            update: function (e, t, i, n, o, r) {
                var a = 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(a, g - d, m - d)
                }
                if (!u.width || !u.height) return u;
                for (var y = c.getImageData(0, 0, u.width, u.height), w = y.data, k = 0, T = w.length, b = this.minOpacity, C = this.maxOpacity - b; k < T;) {
                    v = w[k + 3] / 256;
                    var S = 4 * Math.floor(255 * v);
                    if (0 < v) {
                        var I = r(v) ? s : l;
                        0 < v && (v = v * C + b), w[k++] = I[S], w[k++] = I[1 + S], w[k++] = I[2 + S], w[k++] = I[3 + S] * v * 256
                    } else k += 4
                }
                return c.putImageData(y, 0, 0), u
            }, _getBrush: function () {
                var e = this._brushCanvas || (this._brushCanvas = T()), 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)), r = [0, 0, 0, 0], a = 0, s = 0; s < 256; s++) t[i](s / 255, !0, r), o[a++] = r[0], o[a++] = r[1], o[a++] = r[2], o[a++] = r[3];
                return o
            }
        }, bf({
            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 r, a, s = e.coordinateSystem;
                if ("cartesian2d" === s.type) {
                    var l = s.getAxis("x"), d = s.getAxis("y");
                    r = l.getBandWidth(), a = 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, k = "cartesian2d" === y ? [c.mapDimension("x"), c.mapDimension("y"), c.mapDimension("value")] : [c.mapDimension("time"), c.mapDimension("value")], T = i; T < n; T++) {
                    var b;
                    if ("cartesian2d" === y) {
                        if (isNaN(c.get(k[2], T))) continue;
                        var C = s.dataToPoint([c.get(k[0], T), c.get(k[1], T)]);
                        b = new es({
                            shape: {
                                x: Math.floor(Math.round(C[0]) - r / 2),
                                y: Math.floor(Math.round(C[1]) - a / 2),
                                width: Math.ceil(r),
                                height: Math.ceil(a)
                            }, style: {fill: c.getItemVisual(T, "color"), opacity: c.getItemVisual(T, "opacity")}
                        })
                    } else {
                        if (isNaN(c.get(k[1], T))) continue;
                        b = new es({
                            z2: 1,
                            shape: s.dataToRect([c.get(k[0], T)]).contentShape,
                            style: {fill: c.getItemVisual(T, "color"), opacity: c.getItemVisual(T, "opacity")}
                        })
                    }
                    var S = c.getItemModel(T);
                    c.hasItemOption && (p = S.getModel("itemStyle").getItemStyle(["color"]), g = S.getModel(h).getItemStyle(), m = S.getModel("label"), v = S.getModel(f));
                    var I = e.getRawValue(T), _ = "-";
                    I && null != I[2] && (_ = I[2]), Ys(p, g, m, v, {
                        labelFetcher: e,
                        labelDataIndex: T,
                        defaultText: _,
                        isRectText: !0
                    }), b.setStyle(p), Hs(b, c.hasItemOption ? g : w({}, g)), (b.incremental = o) && (b.useHoverLayer = !0), u.add(b), c.setItemGraphicEl(T, b)
                }
            }, _renderOnGeo: function (e, t, i, n) {
                var o = i.targetVisuals.inRange, r = i.targetVisuals.outOfRange, a = t.getData(),
                    s = this._hmLayer || this._hmLayer || new rS;
                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 = [a.mapDimension("lng"), a.mapDimension("lat"), a.mapDimension("value")],
                    v = a.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(), w = "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 = D(t, function (t) {
                            return {interval: [(t.interval[0] - e[0]) / n, (t.interval[1] - e[0]) / n]}
                        })).length, r = 0;
                        return function (e) {
                            for (var n = r; n < o; n++) if ((a = t[n].interval)[0] <= e && e <= a[1]) {
                                r = n;
                                break
                            }
                            if (n === o) for (n = r - 1; 0 <= n; n--) {
                                var a;
                                if ((a = t[n].interval)[0] <= e && e <= a[1]) {
                                    r = 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: r.color.getColorMapper()
                }, w);
                var k = new Yn({style: {width: p, height: g, x: u, y: c, image: s.canvas}, silent: !0});
                this.group.add(k)
            }, dispose: function () {
            }
        });
        var aS = 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, aS.superApply(this, "getInitialData", arguments)
            }
        }), sS = ["itemStyle", "borderWidth"], lS = [{xy: "x", wh: "width", index: 0, posDesc: ["left", "right"]}, {
            xy: "y",
            wh: "height",
            index: 1,
            posDesc: ["top", "bottom"]
        }], dS = new Ka;

        function uS(e, t, i, n) {
            var o = e.getItemLayout(t), r = i.get("symbolRepeat"), a = 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: a,
                    symbolRepeat: r,
                    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 r, a = n.valueDim, s = e.get("symbolBoundingData"),
                    l = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()), d = l.toGlobalCoord(l.dataToCoord(0)),
                    u = 1 - +(i[a.wh] <= 0);
                if (M(s)) {
                    var c = [cS(l, s[0]) - d, cS(l, s[1]) - d];
                    c[1] < c[0] && c.reverse(), r = c[u]
                } else r = null != s ? cS(l, s) - d : t ? n.coordSysExtent[a.index][u] - d : i[a.wh];
                o.boundingLength = r, t && (o.repeatCutLength = i[a.wh]), o.pxSign = 0 < r ? 1 : r < 0 ? -1 : 0
            }(i, r, o, n, c), function (e, t, i, n, o, r, a, 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] = Nl(f[c.index], h), f[u.index] = Nl(f[u.index], n ? h : Math.abs(r)), d.symbolSize = f, (d.symbolScale = [f[0] / s, f[1] / s])[u.index] *= (l.isHorizontal ? -1 : 1) * a
            }(e, t, o, r, 0, c.boundingLength, c.pxSign, d, n, c), function (e, t, i, n, o) {
                var r = e.get(sS) || 0;
                r && (dS.attr({
                    scale: t.slice(),
                    rotation: i
                }), dS.updateTransform(), r /= dS.getLineScale(), r *= t[n.valueDim.index]), o.valueLineWidth = r
            }(i, c.symbolScale, l, n, c);
            var h = c.symbolSize, f = i.get("symbolOffset");
            return M(f) && (f = [Nl(f[0], h[0]), Nl(f[1], h[1])]), function (e, t, i, n, o, r, a, 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 = W(e.get("symbolMargin"), "15%") + "", k = !1;
                    y.lastIndexOf("!") === y.length - 1 && (k = !0, y = y.slice(0, y.length - 1)), y = Nl(y, t[f.index]);
                    var T = Math.max(g + 2 * y, 0), b = k ? 0 : 2 * y, C = zl(n), S = C ? n : AS((v + b) / T);
                    T = g + 2 * (y = (v - S * g) / 2 / (k ? S : S - 1)), b = k ? 0 : 2 * y, C || "fixed" === n || (S = d ? AS((Math.abs(d) + b) / T) : 0), m = S * T - b, c.repeatTimes = S, c.symbolMargin = y
                }
                var I = p * (m / 2), _ = c.pathPosition = [];
                _[h.index] = i[h.wh] / 2, _[f.index] = "start" === a ? I : "end" === a ? l - I : l / 2, r && (_[0] += r[0], _[1] += r[1]);
                var A = c.bundlePosition = [];
                A[h.index] = i[h.xy], A[f.index] = i[f.xy];
                var D = c.barRectShape = w({}, i);
                D[f.wh] = p * Math.max(Math.abs(i[f.wh]), Math.abs(_[f.index] + I)), D[h.wh] = i[h.wh];
                var x = c.clipShape = {};
                x[h.xy] = -i[h.xy], x[h.wh] = u.ecSize[h.wh], x[f.xy] = 0, x[f.wh] = i[f.wh]
            }(i, h, o, r, 0, f, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, n, c), c
        }

        function cS(e, t) {
            return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))
        }

        function hS(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 fS(e, t, i, n) {
            var o = e.__pictorialBundle, r = i.symbolSize, a = i.valueLineWidth, s = i.pathPosition, l = t.valueDim,
                d = i.repeatTimes || 0, u = 0, c = r[t.valueDim.index] + a + 2 * i.symbolMargin;
            for (SS(e, function (e) {
                e.__pictorialAnimationIndex = u, e.__pictorialRepeatTimes = d, u < d ? IS(e, null, p(u), i, n) : IS(e, null, {scale: [0, 0]}, i, n, function () {
                    o.remove(e)
                }), kS(e, i), u++
            }); u < d; u++) {
                var h = hS(i);
                h.__pictorialAnimationIndex = u, h.__pictorialRepeatTimes = d, o.add(h);
                var f = p(u);
                IS(h, {position: f.position, scale: [0, 0]}, {
                    scale: f.scale,
                    rotation: f.rotation
                }, i, n), h.on("mouseover", g).on("mouseout", m), kS(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() {
                SS(e, function (e) {
                    e.trigger("emphasis")
                })
            }

            function m() {
                SS(e, function (e) {
                    e.trigger("normal")
                })
            }
        }

        function pS(e, t, i, n) {
            var o = e.__pictorialBundle, r = e.__pictorialMainPath;
            r ? IS(r, null, {
                position: i.pathPosition.slice(),
                scale: i.symbolScale.slice(),
                rotation: i.rotation
            }, i, n) : (r = e.__pictorialMainPath = hS(i), o.add(r), IS(r, {
                position: i.pathPosition.slice(),
                scale: [0, 0],
                rotation: i.rotation
            }, {scale: i.symbolScale.slice()}, i, n), r.on("mouseover", function () {
                this.trigger("emphasis")
            }).on("mouseout", function () {
                this.trigger("normal")
            })), kS(r, i)
        }

        function gS(e, t, i) {
            var n = w({}, t.barRectShape), o = e.__pictorialBarRect;
            o ? IS(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 mS(e, t, i, n) {
            if (i.symbolClip) {
                var o = e.__pictorialClipPath, r = w({}, i.clipShape), a = t.valueDim, s = i.animationModel,
                    l = i.dataIndex;
                if (o) rl(o, {shape: r}, s, l); else {
                    r[a.wh] = 0, o = new es({shape: r}), e.__pictorialBundle.setClipPath(o), e.__pictorialClipPath = o;
                    var d = {};
                    d[a.wh] = i.clipShape[a.wh], ml[n ? "updateProps" : "initProps"](o, {shape: d}, s, l)
                }
            }
        }

        function vS(e, t) {
            var i = e.getItemModel(t);
            return i.getAnimationDelayParams = yS, i.isAnimationEnabled = wS, i
        }

        function yS(e) {
            return {index: e.__pictorialAnimationIndex, count: e.__pictorialRepeatTimes}
        }

        function wS() {
            return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation")
        }

        function kS(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 TS(e, t, i, n) {
            var o = new Di, r = new Di;
            return o.add(r), (o.__pictorialBundle = r).attr("position", i.bundlePosition.slice()), i.symbolRepeat ? fS(o, t, i) : pS(o, 0, i), gS(o, i, n), mS(o, t, i, n), o.__pictorialShapeStr = CS(e, i), o.__pictorialSymbolMeta = i, o
        }

        function bS(e, t, i, n) {
            var o = n.__pictorialBarRect;
            o && (o.style.text = null);
            var r = [];
            SS(n, function (e) {
                r.push(e)
            }), n.__pictorialMainPath && r.push(n.__pictorialMainPath), n.__pictorialClipPath && (i = null), A(r, function (e) {
                rl(e, {scale: [0, 0]}, i, t, function () {
                    n.parent && n.parent.remove(n)
                })
            }), e.setItemGraphicEl(t, null)
        }

        function CS(e, t) {
            return [e.getItemVisual(t.dataIndex, "symbol") || "none", !!t.symbolRepeat, !!t.symbolClip].join(":")
        }

        function SS(e, t, i) {
            A(e.__pictorialBundle.children(), function (n) {
                n !== e.__pictorialBarRect && t.call(i, n)
            })
        }

        function IS(e, t, i, n, o, r) {
            t && e.attr(t), n.symbolClip && !o ? i && e.attr(i) : i && ml[o ? "updateProps" : "initProps"](e, i, n.animationModel, n.dataIndex, r)
        }

        function _S(e, t, i) {
            var n = i.color, o = i.dataIndex, r = i.itemModel, a = r.getModel("itemStyle").getItemStyle(["color"]),
                s = r.getModel("emphasis.itemStyle").getItemStyle(), l = r.getShallow("cursor");
            SS(e, function (e) {
                e.setColor(n), e.setStyle(k({
                    fill: n,
                    opacity: i.opacity
                }, a)), 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, r, n, t.seriesModel, o), Hs(u, d)
        }

        function AS(e) {
            var t = Math.round(e);
            return Math.abs(e - t) < 1e-4 ? t : Math.ceil(e)
        }

        function DS(e, t, i, n, o) {
            Dg.call(this, e, t, i), this.type = n || "value", this.position = o || "bottom", this.orient = null
        }

        function xS(e, t, i) {
            this.dimension = "single", this.dimensions = ["single"], this._axis = null, this._rect, this._init(e, t, i), this.model = e
        }

        function NS(e, t) {
            t = t || {};
            var i = e.coordinateSystem, n = e.axis, o = {}, r = n.position, a = 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" === a ? d.vertical[r] : l[0], "horizontal" === a ? d.horizontal[r] : l[3]], o.rotation = Math.PI / 2 * {
                horizontal: 0,
                vertical: 1
            }[a], o.labelDirection = o.tickDirection = o.nameDirection = {
                top: -1,
                bottom: 1,
                right: 1,
                left: -1
            }[r], e.get("axisTick.inside") && (o.tickDirection = -o.tickDirection), W(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" === r ? -u : u, o.z2 = 1, o
        }

        bf({
            type: "pictorialBar", render: function (e, t, i) {
                var n = this.group, o = e.getData(), r = this._data, a = e.coordinateSystem,
                    s = !!a.getBaseAxis().isHorizontal(), l = a.grid.getRect(), d = {
                        ecSize: {width: i.getWidth(), height: i.getHeight()},
                        seriesModel: e,
                        coordSys: a,
                        coordSysExtent: [[l.x, l.x + l.width], [l.y, l.y + l.height]],
                        isHorizontal: s,
                        valueDim: lS[+s],
                        categoryDim: lS[1 - s]
                    };
                return o.diff(r).add(function (e) {
                    if (o.hasValue(e)) {
                        var t = vS(o, e), i = uS(o, e, t, d), r = TS(o, d, i);
                        o.setItemGraphicEl(e, r), n.add(r), _S(r, d, i)
                    }
                }).update(function (e, t) {
                    var i = r.getItemGraphicEl(t);
                    if (o.hasValue(e)) {
                        var a = vS(o, e), s = uS(o, e, a, d), l = CS(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;
                            rl(e.__pictorialBundle, {position: i.bundlePosition.slice()}, n, o), i.symbolRepeat ? fS(e, t, i, !0) : pS(e, 0, i, !0), gS(e, i, !0), mS(e, t, i, !0)
                        }(i, d, s) : i = TS(o, d, s, !0), o.setItemGraphicEl(e, i), i.__pictorialSymbolMeta = s, n.add(i), _S(i, d, s)
                    } else n.remove(i)
                }).remove(function (e) {
                    var t = r.getItemGraphicEl(e);
                    t && bS(r, 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) {
                    bS(n, t.dataIndex, e, t)
                }) : i.removeAll()
            }
        }), gf(O(Dp, "pictorialBar")), mf(vm("pictorialBar", "roundRect")), DS.prototype = {
            constructor: DS,
            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
        }, S(DS, Dg), iu.register("single", {
            create: function (e, t) {
                var i = [];
                return e.eachComponent("singleAxis", function (n, o) {
                    var r = new xS(n, e, t);
                    r.name = "single_" + o, r.resize(n, t), n.coordinateSystem = r, i.push(r)
                }), 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: (xS.prototype = {
                type: "singleAxis", axisPointerEnabled: !0, constructor: xS, _init: function (e, t, i) {
                    var n = this.dimension, o = new DS(n, Zp(e), [0, 0], e.get("type"), e.get("position")),
                        r = "category" === o.type;
                    o.onBand = r && 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();
                            A(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 ES = ["axisLine", "axisTickLabel", "axisName"], PS = ["splitArea", "splitLine"], OS = iv.extend({
            type: "singleAxis", axisPointerClass: "SingleAxisPointer", render: function (e, t, i, n) {
                var o = this.group;
                o.removeAll();
                var r = this._axisGroup;
                this._axisGroup = new Di;
                var a = NS(e), s = new Vm(e, a);
                A(ES, s.add, s), o.add(this._axisGroup), o.add(s.getGroup()), A(PS, function (t) {
                    e.get(t + ".show") && this["_" + t](e)
                }, this), ul(r, this._axisGroup, e), OS.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"),
                        r = n.get("color");
                    r = r instanceof Array ? r : [r];
                    for (var a = 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] = a.y, h[0] = p, h[1] = a.y + a.height) : (c[0] = a.x, c[1] = p, h[0] = a.x + a.width, h[1] = p);
                        var g = d++ % r.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(xs(l[f], {
                        style: {
                            stroke: r[f % r.length],
                            lineDash: n.getLineDash(o),
                            lineWidth: o
                        }, silent: !0
                    }))
                }
            }, _splitArea: function (e) {
                sv(this, this._axisGroup, e, e)
            }
        }), MS = Id.extend({
            type: "singleAxis",
            layoutMode: "box",
            axis: null,
            coordinateSystem: null,
            getCoordSysModel: function () {
                return this
            }
        });

        function FS(e, t) {
            var i, n = [], o = e.seriesIndex;
            if (null == o || !(i = t.getSeriesByIndex(o))) return {point: []};
            var r = i.getData(), a = Ko(r, e);
            if (null == a || a < 0 || M(a)) return {point: []};
            var s = r.getItemGraphicEl(a), l = i.coordinateSystem;
            if (i.getTooltipPosition) n = i.getTooltipPosition(a) || []; else if (l && l.dataToPoint) n = l.dataToPoint(r.getValues(D(l.dimensions, function (e) {
                return r.mapDimension(e)
            }), a, !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(MS.prototype, ig), Am("single", MS, 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 LS = A, RS = O, BS = Wo();

        function US(e, t, i, n, o) {
            var r = e.axis;
            if (!r.scale.isBlank() && r.containData(t)) if (e.involveSeries) {
                var a = function (e, t) {
                    var i = t.axis, n = i.dim, o = e, r = [], a = Number.MAX_VALUE, s = -1;
                    return LS(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 <= a && ((p < a || 0 <= f && s < 0) && (a = p, s = f, o = d, r.length = 0), LS(u, function (e) {
                                r.push({
                                    seriesIndex: t.seriesIndex,
                                    dataIndexInside: e,
                                    dataIndex: t.getData().getRawIndex(e)
                                })
                            }))
                        }
                    }), {payloadBatch: r, snapToValue: o}
                }(t, e), s = a.payloadBatch, l = a.snapToValue;
                s[0] && null == o.seriesIndex && w(o, s[0]), !n && e.snap && r.containData(l) && null != l && (t = l), i.showPointer(e, t, s, o), i.showTooltip(e, a, l)
            } else i.showPointer(e, t)
        }

        function VS(e, t, i, n) {
            e[t.key] = {value: i, payloadBatch: n}
        }

        function KS(e, t, i, n) {
            var o = i.payloadBatch, r = t.axis, a = r.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: r.dim,
                    axisIndex: a.componentIndex,
                    axisType: a.type,
                    axisId: a.id,
                    value: n,
                    valueLabelOpt: {precision: s.get("label.precision"), formatter: s.get("label.formatter")},
                    seriesDataIndices: o.slice()
                })
            }
        }

        function WS(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 jS(e) {
            return !e || null == e[0] || isNaN(e[0]) || null == e[1] || isNaN(e[1])
        }

        wf({
            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 GS = Wo(), HS = A;

        function zS(e, t, i) {
            if (!o.node) {
                var n = t.getZr();
                GS(n).records || (GS(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);
                            HS(GS(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)
                        })
                    }

                    GS(e).initialized || (GS(e).initialized = !0, i("click", O(qS, "click")), i("mousemove", O(qS, "mousemove")), i("globalout", XS))
                }(n, t), (GS(n).records[e] || (GS(n).records[e] = {})).handler = i
            }
        }

        function XS(e, t, i) {
            e.handler("leave", null, i)
        }

        function qS(e, t, i, n) {
            t.handler(e, i, n)
        }

        function YS(e, t) {
            if (!o.node) {
                var i = t.getZr();
                (GS(i).records || {})[e] && (GS(i).records[e] = null)
            }
        }

        var JS = kf({
            type: "axisPointer", render: function (e, t, i) {
                var n = t.getComponent("tooltip"),
                    o = e.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click";
                zS("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) {
                YS(t.getZr(), "axisPointer"), JS.superApply(this._model, "remove", arguments)
            }, dispose: function (e, t) {
                YS("axisPointer", t), JS.superApply(this._model, "dispose", arguments)
            }
        }), ZS = Wo(), QS = m, $S = P;

        function eI() {
        }

        function tI(e, t, i, n) {
            !function e(t, i) {
                if (R(t) && R(i)) {
                    var n = !0;
                    return A(i, function (i, o) {
                        n = n && e(t[o], i)
                    }), !!n
                }
                return t === i
            }(ZS(i).lastProp, n) && (ZS(i).lastProp = n, t ? rl(i, n, e) : (i.stopAnimation(), i.attr(n)))
        }

        function iI(e, t) {
            e[t.get("label.show") ? "show" : "hide"]()
        }

        function nI(e) {
            return {position: e.position.slice(), rotation: e.rotation || 0}
        }

        function oI(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 rI(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 aI(e, t, i, n, o) {
            var r = sI(i.get("value"), t.axis, t.ecModel, i.get("seriesDataIndices"), {
                    precision: i.get("label.precision"),
                    formatter: i.get("label.formatter")
                }), a = i.getModel("label"), s = Jl(a.get("padding") || 0), l = a.getFont(), d = cn(r, 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(), r = n.getHeight();
                e[0] = Math.min(e[0] + t, o) - t, e[1] = Math.min(e[1] + i, r) - i, e[0] = Math.max(e[0], 0), e[1] = Math.max(e[1], 0)
            }(u, c, h, n);
            var g = a.get("backgroundColor");
            g && "auto" !== g || (g = t.get("axisLine.lineStyle.color")), e.label = {
                shape: {
                    x: 0,
                    y: 0,
                    width: c,
                    height: h,
                    r: a.get("borderRadius")
                },
                position: u.slice(),
                style: {
                    text: r,
                    textFont: l,
                    textFill: a.getTextColor(),
                    textPosition: "inside",
                    textPadding: s,
                    fill: g,
                    stroke: a.get("borderColor") || "transparent",
                    lineWidth: a.get("borderWidth") || 0,
                    shadowBlur: a.get("shadowBlur"),
                    shadowColor: a.get("shadowColor"),
                    shadowOffsetX: a.get("shadowOffsetX"),
                    shadowOffsetY: a.get("shadowOffsetY")
                },
                z2: 10
            }
        }

        function sI(e, t, i, n, o) {
            e = t.scale.parse(e);
            var r = t.scale.getLabel(e, {precision: o.precision}), a = o.formatter;
            if (a) {
                var s = {value: $p(t, e), axisDimension: t.dim, axisIndex: t.index, seriesData: []};
                A(n, function (e) {
                    var t = i.getSeriesByIndex(e.seriesIndex), n = e.dataIndexInside, o = t && t.getDataParams(n);
                    o && s.seriesData.push(o)
                }), L(a) ? r = a.replace("{value}", r) : F(a) && (r = a(s))
            }
            return r
        }

        function lI(e, t, i) {
            var n = rt();
            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 dI(e, t, i, n, o, r) {
            var a = Vm.innerTextLayout(i.rotation, 0, i.labelDirection);
            i.labelMargin = o.get("label.margin"), aI(t, n, o, r, {
                position: lI(n.axis, e, i),
                align: a.textAlign,
                verticalAlign: a.textVerticalAlign
            })
        }

        function uI(e, t, i) {
            return {x1: e[i = i || 0], y1: e[1 - i], x2: t[i], y2: t[1 - i]}
        }

        function cI(e, t, i) {
            return {x: e[i = i || 0], y: e[1 - i], width: t[i], height: t[1 - i]}
        }

        function hI(e, t, i, n, o, r) {
            return {cx: e, cy: t, r0: i, r: n, startAngle: o, endAngle: r, clockwise: !0}
        }

        Qo((eI.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"), r = t.get("status");
                if (this._axisModel = e, this._axisPointerModel = t, this._api = i, n || this._lastValue !== o || this._lastStatus !== r) {
                    this._lastValue = o, this._lastStatus = r;
                    var a = this._group, s = this._handle;
                    if (!r || "hide" === r) return a && a.hide(), void (s && s.hide());
                    a && a.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 (a) {
                        var c = O(tI, t, u);
                        this.updatePointerEl(a, l, c, t), this.updateLabelEl(a, l, c, t)
                    } else a = this._group = new Di, this.createPointerEl(a, l, e, t), this.createLabelEl(a, l, e, t), i.getZr().add(a);
                    oI(a, 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, r = t.get("snap");
                if (!r && !o) return !1;
                if ("auto" !== i && null != i) return !0 === i;
                var a = this.animationThreshold;
                if (o && n.getBandWidth() > a) return !0;
                if (r) {
                    var s = $m(e).seriesDataCount, l = n.getExtent();
                    return Math.abs(l[0] - l[1]) / s > a
                }
                return !1
            },
            makeElOption: function (e, t, i, n, o) {
            },
            createPointerEl: function (e, t, i, n) {
                var o = t.pointer;
                if (o) {
                    var r = ZS(e).pointerEl = new ml[o.type](QS(t.pointer));
                    e.add(r)
                }
            },
            createLabelEl: function (e, t, i, n) {
                if (t.label) {
                    var o = ZS(e).labelEl = new es(QS(t.label));
                    e.add(o), iI(o, n)
                }
            },
            updatePointerEl: function (e, t, i) {
                var n = ZS(e).pointerEl;
                n && t.pointer && (n.setStyle(t.pointer.style), i(n, {shape: t.pointer.shape}))
            },
            updateLabelEl: function (e, t, i, n) {
                var o = ZS(e).labelEl;
                o && (o.setStyle(t.label.style), i(o, {shape: t.label.shape, position: t.label.position}), iI(o, n))
            },
            _renderHandle: function (e) {
                if (!this._dragging && this.updateHandleTransform) {
                    var t, i = this._axisPointerModel, n = this._api.getZr(), o = this._handle,
                        r = i.getModel("handle"), a = i.get("status");
                    if (!r.get("show") || !a || "hide" === a) return o && n.remove(o), void (this._handle = null);
                    this._handle || (t = !0, o = this._handle = hl(r.get("icon"), {
                        cursor: "move",
                        draggable: !0,
                        onmousemove: function (e) {
                            ze(e.event)
                        },
                        onmousedown: $S(this._onHandleDragMove, this, 0, 0),
                        drift: $S(this._onHandleDragMove, this),
                        ondragend: $S(this._onHandleDragEnd, this)
                    }), n.add(o)), oI(o, i, !1), o.setStyle(r.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
                    var s = r.get("size");
                    M(s) || (s = [s, s]), o.attr("scale", [s[0] / 2, s[1] / 2]), Sc(this, "_doDispatchAxisPointer", r.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, t)
                }
            },
            _moveHandleToValue: function (e, t) {
                tI(this._axisPointerModel, !t && this._moveAnimation, this._handle, nI(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)))
            },
            _onHandleDragMove: function (e, t) {
                var i = this._handle;
                if (i) {
                    this._dragging = !0;
                    var n = this.updateHandleTransform(nI(i), [e, t], this._axisModel, this._axisPointerModel);
                    this._payloadInfo = n, i.stopAnimation(), i.attr(nI(n)), ZS(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 = eI);
        var fI = eI.extend({
            makeElOption: function (e, t, i, n, o) {
                var r = i.axis, a = r.grid, s = n.get("type"), l = pI(a, r).getOtherAxis(r).getGlobalExtent(),
                    d = r.toGlobalCoord(r.dataToCoord(t, !0));
                if (s && "none" !== s) {
                    var u = rI(n), c = gI[s](r, d, l);
                    c.style = u, e.graphicKey = c.type, e.pointer = c
                }
                dI(t, e, av(a.model, i), i, n, o)
            }, getHandleTransform: function (e, t, i) {
                var n = av(t.axis.grid.model, t, {labelInside: !1});
                return n.labelMargin = i.get("handle.margin"), {
                    position: lI(t.axis, e, n),
                    rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
                }
            }, updateHandleTransform: function (e, t, i, n) {
                var o = i.axis, r = o.grid, a = o.getGlobalExtent(!0), s = pI(r, o).getOtherAxis(o).getGlobalExtent(),
                    l = "x" === o.dim ? 0 : 1, d = e.position;
                d[l] += t[l], d[l] = Math.min(a[1], d[l]), d[l] = Math.max(a[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 pI(e, t) {
            var i = {};
            return i[t.dim + "AxisIndex"] = t.index, e.getCartesian(i)
        }

        var gI = {
            line: function (e, t, i) {
                return {type: "Line", subPixelOptimize: !0, shape: uI([t, i[0]], [t, i[1]], mI(e))}
            }, shadow: function (e, t, i) {
                var n = Math.max(1, e.getBandWidth()), o = i[1] - i[0];
                return {type: "Rect", shape: cI([t - n / 2, i[0]], [n, o], mI(e))}
            }
        };

        function mI(e) {
            return "x" === e.dim ? 0 : 1
        }

        iv.registerAxisPointerClass("CartesianAxisPointer", fI), 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(Ch.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"), r = o.get("link", !0) || [],
                        a = [];
                    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, r) {
                                        var a = t.getModel("axisPointer"), s = {};
                                        Jm(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function (e) {
                                            s[e] = m(a.get(e))
                                        }), s.snap = "category" !== e.type && !!r, "cross" === a.get("type") && (s.type = "line");
                                        var l = s.label || (s.label = {});
                                        if (null == l.show && (l.show = !1), "cross" === o) {
                                            var d = a.get("label.show");
                                            if (l.show = null == d || d, !r) {
                                                var u = s.lineStyle = a.get("crossStyle");
                                                u && k(l, u.textStyle)
                                            }
                                        }
                                        return e.model.getModel("axisPointer", new Cl(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 r = e[o] || {};
                                        if (Qm(r[n + "AxisId"], i.id) || Qm(r[n + "AxisIndex"], i.componentIndex) || Qm(r[n + "AxisName"], i.name)) return o
                                    }
                                }(r, u);
                                if (null != y) {
                                    var w = a[y] || (a[y] = {axesInfo: {}});
                                    w.axesInfo[p] = v, w.mapper = r[y].mapper, v.linkGroup = w
                                }
                            }
                        }
                    })
                }(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], r = e, a = e.dispatchAction || P(i.dispatchAction, i),
                s = t.getComponent("axisPointer").coordSysAxesInfo;
            if (s) {
                jS(o) && (o = FS({seriesIndex: r.seriesIndex, dataIndex: r.dataIndex}, t).point);
                var l = jS(o), d = r.axesInfo, u = s.axesInfo, c = "leave" === n || jS(o), h = {}, f = {},
                    p = {list: [], map: {}}, g = {showPointer: RS(VS, f), showTooltip: RS(KS, p)};
                LS(s.coordSysMap, function (e, t) {
                    var i = l || e.containPoint(o);
                    LS(s.coordSysAxesInfo[t], function (e, t) {
                        var n = e.axis, r = 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 || r)) {
                            var a = r && r.value;
                            null != a || l || (a = n.pointToData(o)), null != a && US(e, a, g, !1, h)
                        }
                    })
                });
                var m = {};
                return LS(u, function (e, t) {
                    var i = e.linkGroup;
                    i && !f[t] && LS(i.axesInfo, function (t, n) {
                        var o = f[n];
                        if (t !== e && o) {
                            var r = o.value;
                            i.mapper && (r = e.axis.scale.parse(i.mapper(r, WS(t), WS(e)))), m[e.key] = r
                        }
                    })
                }), LS(m, function (e, t) {
                    US(u[t], e, g, !0, h)
                }), function (e, t, i) {
                    var n = i.axesInfo = [];
                    LS(t, function (t, i) {
                        var o = t.axisPointerModel.option, r = e[i];
                        r ? (t.useHandle || (o.status = "show"), o.value = r.value, o.seriesDataIndices = (r.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 (jS(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, a), function (e, t, i) {
                    var n = i.getZr(), o = "axisPointerLastHighlights", r = BS(n)[o] || {}, a = BS(n)[o] = {};
                    LS(e, function (e, t) {
                        var i = e.axisPointerModel.option;
                        "show" === i.status && LS(i.seriesDataIndices, function (e) {
                            var t = e.seriesIndex + " | " + e.dataIndex;
                            a[t] = e
                        })
                    });
                    var s = [], l = [];
                    A(r, function (e, t) {
                        a[t] || l.push(e)
                    }), A(a, function (e, t) {
                        r[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 vI = ["x", "y"], yI = ["width", "height"], wI = eI.extend({
            makeElOption: function (e, t, i, n, o) {
                var r = i.axis, a = r.coordinateSystem, s = bI(a, 1 - TI(r)), l = a.dataToPoint(t)[0],
                    d = n.get("type");
                if (d && "none" !== d) {
                    var u = rI(n), c = kI[d](r, l, s);
                    c.style = u, e.graphicKey = c.type, e.pointer = c
                }
                dI(t, e, NS(i), i, n, o)
            }, getHandleTransform: function (e, t, i) {
                var n = NS(t, {labelInside: !1});
                return n.labelMargin = i.get("handle.margin"), {
                    position: lI(t.axis, e, n),
                    rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
                }
            }, updateHandleTransform: function (e, t, i, n) {
                var o = i.axis, r = o.coordinateSystem, a = TI(o), s = bI(r, a), l = e.position;
                l[a] += t[a], l[a] = Math.min(s[1], l[a]), l[a] = Math.max(s[0], l[a]);
                var d = bI(r, 1 - a), u = (d[1] + d[0]) / 2, c = [u, u];
                return c[a] = l[a], {
                    position: l,
                    rotation: e.rotation,
                    cursorPoint: c,
                    tooltipOption: {verticalAlign: "middle"}
                }
            }
        }), kI = {
            line: function (e, t, i) {
                return {type: "Line", subPixelOptimize: !0, shape: uI([t, i[0]], [t, i[1]], TI(e))}
            }, shadow: function (e, t, i) {
                var n = e.getBandWidth(), o = i[1] - i[0];
                return {type: "Rect", shape: cI([t - n / 2, i[0]], [n, o], TI(e))}
            }
        };

        function TI(e) {
            return e.isHorizontal() ? 0 : 1
        }

        function bI(e, t) {
            var i = e.getRect();
            return [i[vI[t]], i[vI[t]] + i[yI[t]]]
        }

        iv.registerAxisPointerClass("SingleAxisPointer", wI), kf({type: "single"});
        var CI = ec.extend({
            type: "series.themeRiver",
            dependencies: ["singleAxis"],
            nameMap: null,
            init: function (e) {
                CI.superApply(this, "init", arguments), this.legendVisualProvider = new Fv(P(this.getData, this), P(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, r = -1, a = -1, s = 0; s < o; ++s) {
                    var l = n[s].dataList.length;
                    r < l && (r = l, a = s)
                }
                for (var d = 0; d < o; ++d) if (d !== a) for (var u = n[d].name, c = 0; c < r; ++c) {
                    for (var h = n[a].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 = N(e.data, function (e) {
                    return void 0 !== e[2]
                }), o = this.fixData(n || []), r = [], a = this.nameMap = $(), s = 0, l = 0; l < o.length; ++l) r.push(o[l][2]), a.get(o[l][2]) || (a.set(o[l][2], s), s++);
                var d = ep(o, {
                    coordDimensions: ["single"],
                    dimensionsDefine: [{name: "time", type: Df(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"), r = qo(i, function (t) {
                    return e.get("name", t)
                }), a = [];
                return r.buckets.each(function (t, i) {
                    t.sort(function (t, i) {
                        return e.get(o, t) - e.get(o, i)
                    }), a.push({name: i, indices: t})
                }), a
            },
            getAxisTooltipData: function (e, t, i) {
                M(e) || (e = e ? [e] : []);
                for (var n, o = this.getData(), r = this.getLayerSeries(), a = [], s = r.length, l = 0; l < s; ++l) {
                    for (var d = Number.MAX_VALUE, u = -1, c = r[l].indices.length, h = 0; h < c; ++h) {
                        var f = o.get(e[0], r[l].indices[h]), p = Math.abs(f - t);
                        p <= d && (n = f, d = p, u = r[l].indices[h])
                    }
                    a.push(u)
                }
                return {dataIndices: a, 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 SI(e, t, i) {
            if (e.count()) for (var n, o = t.coordinateSystem, r = t.getLayerSeries(), a = e.mapDimension("single"), s = e.mapDimension("value"), l = D(r, function (t) {
                return D(t.indices, function (t) {
                    var i = o.dataToPoint(e.get(a, t));
                    return i[1] = e.get(s, t), i
                })
            }), d = function (e) {
                for (var t = e.length, i = e[0].length, n = [], o = [], r = 0, a = {}, s = 0; s < i; ++s) {
                    for (var l = 0, d = 0; l < t; ++l) d += e[l][s][1];
                    r < d && (r = d), n.push(d)
                }
                for (var u = 0; u < i; ++u) o[u] = (r - n[u]) / 2;
                for (var c = r = 0; c < i; ++c) {
                    var h = n[c] + o[c];
                    r < h && (r = h)
                }
                return a.y0 = o, a.max = r, a
            }(l), u = d.y0, c = i / d.max, h = r.length, f = r[0].indices.length, p = 0; p < f; ++p) {
                n = u[p] * c, e.setItemLayout(r[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(r[g].indices[p], {
                    layerIndex: g,
                    x: l[g][p][0],
                    y0: n,
                    y: l[g][p][1] * c
                })
            }
        }

        bf({
            type: "themeRiver", init: function () {
                this._layers = []
            }, render: function (e, t, i) {
                var n = e.getData(), o = this.group, r = e.getLayerSeries(), a = n.getLayout("layoutInfo"), s = a.rect,
                    l = a.boundaryGap;

                function d(e) {
                    return e.name
                }

                o.attr("position", [0, s.y + l[0]]);
                var u = new Sf(this._layersSeries || [], r, d, d), c = {};

                function h(t, i, a) {
                    var s = this._layers;
                    if ("remove" !== t) {
                        for (var l, d, u, h = [], f = [], p = r[i].indices, g = 0; g < p.length; g++) {
                            var m = n.getItemLayout(p[g]), v = m.x, y = m.y0, k = m.y;
                            h.push([v, y]), f.push([v, y + k]), l = n.getItemVisual(p[g], "color")
                        }
                        var T = n.getItemLayout(p[0]), b = n.getItemModel(p[g - 1]), C = b.getModel("label"),
                            S = C.get("margin");
                        if ("add" === t) {
                            var I = c[i] = new Di;
                            d = new lm({
                                shape: {
                                    points: h,
                                    stackedOnPoints: f,
                                    smooth: .4,
                                    stackedOnSmooth: .4,
                                    smoothConstraint: !1
                                }, z2: 0
                            }), u = new Ua({
                                style: {
                                    x: T.x - S,
                                    y: T.y0 + T.y / 2
                                }
                            }), I.add(d), I.add(u), o.add(I), 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 al(n, {shape: {width: e.width + 20, height: e.height + 20}}, t, function () {
                                    d.removeClipPath()
                                }), n
                            }(d.getBoundingRect(), e))
                        } else I = s[a], d = I.childAt(0), u = I.childAt(1), o.add(I), c[i] = I, rl(d, {
                            shape: {
                                points: h,
                                stackedOnPoints: f
                            }
                        }, e), rl(u, {style: {x: T.x - S, y: T.y0 + T.y / 2}}, e);
                        var _ = b.getModel("emphasis.itemStyle"), A = b.getModel("itemStyle");
                        Zs(u.style, C, {
                            text: C.get("show") ? e.getFormattedLabel(p[g - 1], "normal") || n.getName(p[g - 1]) : null,
                            textVerticalAlign: "middle"
                        }), d.setStyle(w({fill: l}, A.getItemStyle(["color"]))), Hs(d, _.getItemStyle())
                    } else o.remove(s[i])
                }

                u.add(P(h, this, "add")).update(P(h, this, "update")).remove(P(h, this, "remove")).execute(), this._layersSeries = r, 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 r = e.get("boundaryGap"), a = i.getAxis();
                n.boundaryGap = r, "horizontal" === a.orient ? (r[0] = Nl(r[0], o.height), r[1] = Nl(r[1], o.height), SI(t, e, o.height - r[0] - r[1])) : (r[0] = Nl(r[0], o.width), r[1] = Nl(r[1], o.width), SI(t, e, o.width - r[0] - r[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 (r) {
                    var a = i.getName(r), s = n[(e.nameMap.get(a) - 1) % n.length];
                    i.setItemVisual(r, "color", s);
                    var l = o.get(r);
                    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;
                    A(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, uw.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 = xw(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 II = 2, _I = 4;

        function AI(e, t, i) {
            Di.call(this);
            var n = new ja({z2: II});
            n.seriesIndex = t.seriesIndex;
            var o = new Ua({z2: _I, silent: e.getModel("label").get("silent")});

            function r() {
                o.ignore = o.hoverIgnore
            }

            function a() {
                o.ignore = o.normalIgnore
            }

            this.add(n), this.add(o), this.updateData(!0, e, "normal", t, i), this.on("emphasis", r).on("normal", a).on("mouseover", r).on("mouseout", a)
        }

        var DI = AI.prototype;
        DI.updateData = function (e, t, i, n, o) {
            (this.node = t).piece = this, n = n || this._seriesModel, o = o || this._ecModel;
            var r = this.childAt(0);
            r.dataIndex = t.dataIndex;
            var a = t.getModel(), s = t.getLayout(), l = w({}, 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 r = e.getModel("itemStyle").get("color");
                if (r) return r;
                if (n) return n;
                if (0 === e.depth) return i.option.color[0];
                var a = i.option.color.length;
                return r = i.option.color[function (e) {
                    for (var t = e; 1 < t.depth;) t = t.parentNode;
                    return C(e.getAncestors()[0].children, t)
                }(e) % a]
            }(t, 0, o);
            !function (e, t, i) {
                t.getData().setItemVisual(e.dataIndex, "color", i)
            }(t, n, d);
            var u, c = a.getModel("itemStyle").getItemStyle();
            u = k({
                lineJoin: "bevel",
                fill: (u = "normal" === i ? c : v(a.getModel(i + ".itemStyle").getItemStyle(), c)).fill || d
            }, u), e ? (r.setShape(l), r.shape.r = s.r0, rl(r, {shape: {r: s.r}}, n, t.dataIndex), r.useStyle(u)) : "object" == typeof u.fill && u.fill.type || "object" == typeof r.style.fill && r.style.fill.type ? (rl(r, {shape: l}, n), r.useStyle(u)) : rl(r, {
                shape: l,
                style: u
            }, n), this._updateLabel(n, d, i);
            var h = a.getShallow("cursor");
            if (h && r.attr("cursor", h), e) {
                var f = n.getShallow("highlightPolicy");
                this._initEvents(r, t, n, f)
            }
            this._seriesModel = n || this._seriesModel, this._ecModel = o || this._ecModel, Hs(this)
        }, DI.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"))
            })
        }, DI.onNormal = function () {
            this.node.hostTree.root.eachNode(function (e) {
                e.piece && e.piece.updateData(!1, e, "normal")
            })
        }, DI.onHighlight = function () {
            this.updateData(!1, this.node, "highlight")
        }, DI.onDownplay = function () {
            this.updateData(!1, this.node, "downplay")
        }, DI._updateLabel = function (e, t, i) {
            var n = this.node.getModel(), o = n.getModel("label"),
                r = "normal" === i || "emphasis" === i ? o : n.getModel(i + ".label"), a = n.getModel("emphasis.label"),
                s = W(e.getFormattedLabel(this.node.dataIndex, i, null, null, "label"), this.node.name);
            !1 === C("show") && (s = "");
            var l = this.node.getLayout(), d = r.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, a, {
                defaultText: r.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 = C("position"),
                v = C("distance") || 0, y = C("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: C("verticalAlign") || "middle",
                opacity: C("opacity")
            });
            var w = h * p + l.cx, k = h * g + l.cy;
            c.attr("position", [w, k]);
            var T = C("rotate"), b = 0;

            function C(e) {
                var t = r.get(e);
                return null == t ? o.get(e) : t
            }

            "radial" === T ? (b = -f) < -Math.PI / 2 && (b += Math.PI) : "tangential" === T ? (b = Math.PI / 2 - f) > Math.PI / 2 ? b -= Math.PI : b < -Math.PI / 2 && (b += Math.PI) : "number" == typeof T && (b = T * Math.PI / 180), c.attr("rotation", b)
        }, DI._initEvents = function (e, t, i, n) {
            function o() {
                a.onEmphasis(n)
            }

            function r() {
                a.onNormal()
            }

            e.off("mouseover").off("mouseout").off("emphasis").off("normal");
            var a = this;
            i.isAnimationEnabled() && e.on("mouseover", o).on("mouseout", r).on("emphasis", o).on("normal", r).on("downplay", function () {
                a.onDownplay()
            }).on("highlight", function () {
                a.onHighlight()
            })
        }, S(AI, Di), 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 r = e.getData(), a = r.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 !== a && n !== a) if (n && n.piece) i ? (n.piece.updateData(!1, i, "normal", e, t), r.setItemGraphicEl(i.dataIndex, n.piece)) : function (e) {
                                e && e.piece && (l.remove(e.piece), e.piece = null)
                            }(n); else if (i) {
                                var o = new AI(i, e, t);
                                l.add(o), r.setItemGraphicEl(i.dataIndex, o)
                            }
                        }(null == o ? null : i[o], null == s ? null : n[s])
                    }

                    0 === i.length && 0 === n.length || new Sf(n, i, o, o).add(s).update(s).remove(O(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 AI(i, e, t), l.add(o.virtualPiece)), n.piece._onclickEvent && n.piece.off("click", n.piece._onclickEvent);
                        var r = function (e) {
                            o._rootToNode(n.parentNode)
                        };
                        n.piece._onclickEvent = r, o.virtualPiece.on("click", r)
                    } else o.virtualPiece && (l.remove(o.virtualPiece), o.virtualPiece = null)
                }(a, 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 && a.children.length && (f = a.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 r = n.getModel(), a = r.get("link");
                                a && dd(a, r.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, r = Math.sqrt(n * n + o * o);
                    return r <= i.r && r >= i.r0
                }
            }
        });
        var xI = "sunburstRootToNode";
        ff({type: xI, update: "updateView"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "sunburst", query: e}, function (t, i) {
                var n = _w(e, [xI], t);
                if (n) {
                    var o = t.getViewRoot();
                    o && (e.direction = Dw(o, n.node) ? "rollUp" : "drillDown"), t.resetViewRoot(n.node)
                }
            })
        });
        var NI = "sunburstHighlight";
        ff({type: NI, update: "updateView"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "sunburst", query: e}, function (t, i) {
                var n = _w(e, [NI], 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 EI = Math.PI / 180;

        function PI(e, t) {
            return t = t || [0, 0], D(["x", "y"], function (i, n) {
                var o = this.getAxis(i), r = t[n], a = e[n] / 2;
                return "category" === o.type ? o.getBandWidth() : Math.abs(o.dataToCoord(r - a) - o.dataToCoord(r + a))
            }, this)
        }

        function OI(e, t) {
            return t = t || [0, 0], D([0, 1], function (i) {
                var n = t[i], o = e[i] / 2, r = [], a = [];
                return r[i] = n - o, a[i] = n + o, r[1 - i] = a[1 - i] = t[1 - i], Math.abs(this.dataToPoint(r)[i] - this.dataToPoint(a)[i])
            }, this)
        }

        function MI(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 FI(e, t) {
            return D(["Radius", "Angle"], function (i, n) {
                var o = this["get" + i + "Axis"](), r = t[n], a = e[n] / 2, s = "dataTo" + i,
                    l = "category" === o.type ? o.getBandWidth() : Math.abs(o[s](r - a) - o[s](r + a));
                return "Angle" === i && (l = l * Math.PI / 180), l
            }, this)
        }

        mf(O(Wv, "sunburst")), gf(O(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(), r = i.getHeight(), a = Math.min(o, r), s = Nl(t[0], o), l = Nl(t[1], r),
                    d = Nl(n[0], a / 2), u = Nl(n[1], a / 2), c = -e.get("startAngle") * EI, h = e.get("minAngle") * EI,
                    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 && A(t.children, function (t) {
                        e(t, i)
                    })
                }(p, m);
                var v = 0;
                A(p.children, function (e) {
                    isNaN(e.getValue()) || v++
                });
                var y = p.getValue(), w = Math.PI / (y || v) * 2, k = 0 < p.depth, T = p.height - (k ? -1 : 1),
                    b = (u - d) / (T || 1), C = e.get("clockwise"), S = e.get("stillShowZeroSum"), I = C ? 1 : -1,
                    _ = function (e, t) {
                        if (e) {
                            var i = t;
                            if (e !== f) {
                                var n = e.getValue(), o = 0 === y && S ? w : n * w;
                                o < h && (o = h), i = t + I * o;
                                var r = e.depth - g - (k ? -1 : 1), u = d + b * r, c = d + b * (1 + r),
                                    p = e.getModel();
                                null != p.get("r0") && (u = Nl(p.get("r0"), a / 2)), null != p.get("r") && (c = Nl(p.get("r"), a / 2)), e.setLayout({
                                    angle: o,
                                    startAngle: t,
                                    endAngle: i,
                                    clockwise: C,
                                    cx: s,
                                    cy: l,
                                    r0: u,
                                    r: c
                                })
                            }
                            if (e.children && e.children.length) {
                                var m = 0;
                                A(e.children, function (e) {
                                    m += _(e, t + m)
                                })
                            }
                            return i - t
                        }
                    };
                if (k) {
                    var D = d, x = d + b, N = 2 * Math.PI;
                    f.setLayout({angle: N, startAngle: c, endAngle: c + N, clockwise: C, cx: s, cy: l, r0: D, r: x})
                }
                _(p, c)
            })
        }, "sunburst")), hf(O(qv, "sunburst"));
        var LI = vs, RI = ["itemStyle"], BI = ["emphasis", "itemStyle"], UI = ["label"], VI = ["emphasis", "label"],
            KI = "e\0\0", WI = {
                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: P(PI, 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: P(OI, 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: P(MI, 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: P(function (n) {
                                var o = t.dataToRadius(n[0]), r = i.dataToAngle(n[1]), a = e.coordToPoint([o, r]);
                                return a.push(o, r * Math.PI / 180), a
                            }), size: P(FI, 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 jI(e, t, i, n, o) {
            null == i[e] || o || (t[e] = i[e], i[e] = n[e])
        }

        function GI(e, t, i, n) {
            var o = e.get("renderItem"), r = e.coordinateSystem, a = {};
            r && (a = r.prepareCustoms ? r.prepareCustoms() : WI[r.type](r));
            var s, l, d, u, c, h = k({
                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(RI).getItemStyle();
                    null != c && (o.fill = c);
                    var r = t.getItemVisual(n, "opacity");
                    null != r && (o.opacity = r);
                    var a = i ? YI(i, d) : d;
                    return Zs(o, a, null, {
                        autoColor: c,
                        isRectText: !0
                    }), o.text = a.getShallow("show") ? j(e.getFormattedLabel(n, "normal"), Og(t, n)) : null, i && JI(o, i), o
                },
                styleEmphasis: function (i, n) {
                    null == n && (n = s), g(n);
                    var o = l.getModel(BI).getItemStyle(), r = i ? YI(i, u) : u;
                    return Zs(o, r, null, {isRectText: !0}, !0), o.text = r.getShallow("show") ? G(e.getFormattedLabel(n, "emphasis"), e.getFormattedLabel(n, "normal"), Og(t, n)) : null, i && JI(o, i), o
                },
                visual: function (e, i) {
                    return null == i && (i = s), t.getItemVisual(i, e)
                },
                barLayout: function (e) {
                    if (r.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(k({
                                bandWidth: n,
                                axisKey: "axis0",
                                stackId: kp + o
                            }, e));
                            var r = _p(t), a = [];
                            for (o = 0; o < e.count; o++) {
                                var s = r.axis0[kp + o];
                                s.offsetCenter = s.offset + s.width / 2, a.push(s)
                            }
                            return a
                        }
                    }(k({axis: r.getBaseAxis()}, e))
                },
                currentSeriesIndices: function () {
                    return i.getCurrentSeriesIndices()
                },
                font: function (e) {
                    return nl(e, i)
                }
            }, a.api || {}), f = {
                context: {},
                seriesId: e.id,
                seriesName: e.name,
                seriesIndex: e.seriesIndex,
                coordSys: a.coordSys,
                dataInsideLength: t.count(),
                encode: function (e) {
                    var t = {};
                    return A(e.dimensions, function (i, n) {
                        var o = e.getDimensionInfo(i);
                        if (!o.isExtraCoord) {
                            var r = o.coordDim;
                            (t[r] = t[r] || [])[o.coordDimIndex] = n
                        }
                    }), t
                }(e.getData())
            }, p = !0;
            return function (e, i) {
                return s = e, p = !0, o && o(k({
                    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(UI), u = l.getModel(VI), c = t.getItemVisual(e, "color"), p = !1)
            }
        }

        function HI(e, t, i, n, o, r) {
            return (e = zI(e, t, i, n, o, r, !0)) && r.setItemGraphicEl(t, e), e
        }

        function zI(e, t, i, n, o, r, a) {
            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) && QI(d) !== e.__customPathData || "image" === l && $I(u, "image") && u.image !== e.__customImagePath || "text" === l && $I(d, "text") && u.text !== e.__customText) && (o.remove(e), e = null), !s) {
                var c = !e;
                return function (e, t, i, n, o, r, a) {
                    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 = {};
                        A(["x", "y", "width", "height"], function (t) {
                            jI(t, d, l, e.style, r)
                        })
                    }
                    if ("text" === e.type && i.style && (d = s.style = {}, A(["x", "y"], function (t) {
                        jI(t, d, l, e.style, r)
                    }), !l.hasOwnProperty("textFill") && l.fill && (l.textFill = l.fill), !l.hasOwnProperty("textStroke") && l.stroke && (l.textStroke = l.stroke)), "group" !== e.type && (e.useStyle(l), r)) {
                        e.style.opacity = 0;
                        var u = l.opacity;
                        null == u && (u = 1), al(e, {style: {opacity: u}}, n, t)
                    }
                    r ? e.attr(s) : rl(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), a && 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, r = QI(n);
                        (t = _s(r, null, o, n.layout || "center")).__customPathData = r
                    } else if ("image" === i) (t = new Yn({})).__customImagePath = e.style.image; else if ("text" === i) (t = new Ua({})).__customText = e.style.text; else if ("group" === i) t = new Di; else {
                        if ("compoundPath" === i) throw new Error('"compoundPath" is not supported yet.');
                        t = new (Is(i))
                    }
                    return t.__customGraphicType = i, t.name = e.name, t
                }(i), t, i, n, 0, c, a), "group" === l && function (e, t, i, n, o) {
                    var r = i.children, a = r ? r.length : 0, s = i.$mergeChildren,
                        l = "byName" === s || i.diffChildrenByName, d = !1 === s;
                    if (a || l || d) {
                        if (l) return function (e) {
                            new Sf(e.oldChildren, e.newChildren, XI, XI, e).add(qI).update(qI).remove(ZI).execute()
                        }({
                            oldChildren: e.children() || [],
                            newChildren: r || [],
                            dataIndex: t,
                            animatableModel: n,
                            group: e,
                            data: o
                        });
                        d && e.removeAll();
                        for (var u = 0; u < a; u++) r[u] && zI(e.childAt(u), t, r[u], n, e, o)
                    }
                }(e, t, i, n, r), o.add(e), e
            }
        }

        function XI(e, t) {
            var i = e && e.name;
            return null != i ? i : KI + t
        }

        function qI(e, t) {
            var i = this.context, n = null != e ? i.newChildren[e] : null;
            zI(null != t ? i.oldChildren[t] : null, i.dataIndex, n, i.animatableModel, i.group, i.data)
        }

        function YI(e, t) {
            var i = new Cl({}, t);
            return A(LI, function (t, n) {
                e.hasOwnProperty(t) && (i.option[n] = e[t])
            }), i
        }

        function JI(e, t) {
            for (var i in t) !t.hasOwnProperty(i) && LI.hasOwnProperty(i) || (e[i] = t[i])
        }

        function ZI(e) {
            var t = this.context, i = t.oldChildren[e];
            i && t.group.remove(i)
        }

        function QI(e) {
            return e && (e.pathData || e.d)
        }

        function $I(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) {
            Dg.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 ap(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, r = e.getData(), a = this.group, s = GI(e, r, t, i);
                r.diff(o).add(function (t) {
                    HI(null, t, s(t, n), e, a, r)
                }).update(function (t, i) {
                    HI(o.getItemGraphicEl(i), t, s(t, n), e, a, r)
                }).remove(function (e) {
                    var t = o.getItemGraphicEl(e);
                    t && a.remove(t)
                }).execute();
                var l = e.get("clip", !0) ? cm(e.coordinateSystem, !1, e) : null;
                l ? a.setClipPath(l) : a.removeClipPath(), this._data = r
            }, incrementalPrepareRender: function (e, t, i) {
                this.group.removeAll(), this._data = null
            }, incrementalRender: function (e, t, i, n, o) {
                var r = t.getData(), a = GI(t, r, i, n);

                function s(e) {
                    e.isGroup || (e.incremental = !0, e.useHoverLayer = !0)
                }

                for (var l = e.start; l < e.end; l++) HI(null, l, a(l, o), t, this.group, r).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: Dg.prototype.dataToCoord, radiusToData: Dg.prototype.coordToData
        }, S(i_, Dg);
        var n_ = Wo();

        function o_(e, t) {
            t = t || [0, 360], Dg.call(this, "angle", e, t), this.type = "category"
        }

        function r_(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: Dg.prototype.dataToCoord,
            angleToData: Dg.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], r = this.dataToCoord(o + 1) - this.dataToCoord(o), a = Math.abs(r),
                    s = cn(o, e.getFont(), "center", "top"), l = Math.max(s.height, 7) / a;
                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
            }
        }, S(o_, Dg), r_.prototype = {
            type: "polar",
            axisPointerEnabled: !0,
            constructor: r_,
            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(),
                    r = Math.min(o[0], o[1]), a = Math.max(o[0], o[1]);
                n.inverse ? r = a - 360 : a = r + 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 < r ? 1 : -1; l < r || a < 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, r = this.r, a = this.r0;
                        return o <= r * r && a * a <= o
                    }
                }
            }
        };
        var a_ = Id.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();
                    A(t.mapDimension("radius", !0), function (e) {
                        o.scale.unionExtentFromData(t, rp(t, e))
                    }), A(t.mapDimension("angle", !0), function (e) {
                        n.scale.unionExtentFromData(t, rp(t, e))
                    })
                }
            }), Jp(n.scale, n.model), Jp(o.scale, o.model), "category" === n.type && !n.onBand) {
                var r = n.getExtent(), a = 360 / n.scale.count();
                n.inverse ? r[1] += a : r[1] -= a, n.setExtent(r[0], r[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(a_.prototype, ig), Am("angle", a_, s_, {
            startAngle: 90,
            clockwise: !0,
            splitNumber: 12,
            axisLabel: {rotate: !1}
        }), Am("radius", a_, s_, {splitNumber: 5}), wf({
            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: r_.prototype.dimensions, create: function (e, t) {
                var i = [];
                return e.eachComponent("polar", function (e, n) {
                    var o = new r_(n);
                    o.update = l_;
                    var r = o.getRadiusAxis(), a = o.getAngleAxis(), s = e.findAxisModel("radiusAxis"),
                        l = e.findAxisModel("angleAxis");
                    d_(r, s), d_(a, l), function (e, t, i) {
                        var n = t.get("center"), o = i.getWidth(), r = i.getHeight();
                        e.cx = Nl(n[0], o), e.cy = Nl(n[1], r);
                        var a = e.getRadiusAxis(), s = Math.min(o, r) / 2, l = t.get("radius");
                        null == l ? l = [0, "100%"] : M(l) || (l = [0, l]), l = [Nl(l[0], s), Nl(l[1], s)], a.inverse ? a.setExtent(l[1], l[0]) : a.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(), r = i.getTicksCoords(),
                        a = i.getMinorTicksCoords(), s = D(i.getViewLabels(), function (e) {
                            return (e = m(e)).coord = i.dataToCoord(e.tickValue), e
                        });
                    f_(s), f_(r), A(u_, function (t) {
                        !e.get(t + ".show") || i.scale.isBlank() && "axisLine" !== t || this["_" + t](e, n, r, a, o, s)
                    }, this)
                }
            }, _axisLine: function (e, t, i, n, o) {
                var r, a = e.getModel("axisLine.lineStyle"), s = h_(t), l = s ? 0 : 1;
                (r = 0 === o[l] ? new Ka({
                    shape: {cx: t.cx, cy: t.cy, r: o[s]},
                    style: a.getLineStyle(),
                    z2: 1,
                    silent: !0
                }) : new Ga({
                    shape: {cx: t.cx, cy: t.cy, r: o[s], r0: o[l]},
                    style: a.getLineStyle(),
                    z2: 1,
                    silent: !0
                })).style.fill = null, this.group.add(r)
            }, _axisTick: function (e, t, i, n, o) {
                var r = e.getModel("axisTick"), a = (r.get("inside") ? -1 : 1) * r.get("length"), s = o[h_(t)],
                    l = D(i, function (e) {
                        return new is({shape: c_(t, [s, s + a], e.coord)})
                    });
                this.group.add(xs(l, {style: k(r.getModel("lineStyle").getLineStyle(), {stroke: e.get("axisLine.lineStyle.color")})}))
            }, _minorTick: function (e, t, i, n, o) {
                if (n.length) {
                    for (var r = e.getModel("axisTick"), a = e.getModel("minorTick"), s = (r.get("inside") ? -1 : 1) * a.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(xs(d, {style: k(a.getModel("lineStyle").getLineStyle(), k(r.getLineStyle(), {stroke: e.get("axisLine.lineStyle.color")}))}))
                }
            }, _axisLabel: function (e, t, i, n, o, r) {
                var a = e.getCategories(!0), s = e.getModel("axisLabel"), l = s.get("margin"),
                    d = e.get("triggerEvent");
                A(r, function (i, n) {
                    var r = 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";
                    a && a[u] && a[u].textStyle && (r = new Cl(a[u].textStyle, s, s.ecModel));
                    var v = new Ua({silent: Vm.isLabelSilent(e)});
                    this.group.add(v), Zs(v.style, r, {
                        x: h[0],
                        y: h[1],
                        textFill: r.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 r = e.getModel("splitLine").getModel("lineStyle"), a = r.get("color"), s = 0;
                a = a instanceof Array ? a : [a];
                for (var l = [], d = 0; d < i.length; d++) {
                    var u = s++ % a.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(xs(l[d], {
                    style: k({stroke: a[d % a.length]}, r.getLineStyle()),
                    silent: !0,
                    z: e.get("z")
                }))
            }, _minorSplitLine: function (e, t, i, n, o) {
                if (n.length) {
                    for (var r = e.getModel("minorSplitLine").getModel("lineStyle"), a = [], s = 0; s < n.length; s++) for (var l = 0; l < n[s].length; l++) a.push(new is({shape: c_(t, o, n[s][l].coord)}));
                    this.group.add(xs(a, {style: r.getLineStyle(), silent: !0, z: e.get("z")}))
                }
            }, _splitArea: function (e, t, i, n, o) {
                if (i.length) {
                    var r = e.getModel("splitArea").getModel("areaStyle"), a = r.get("color"), s = 0;
                    a = a instanceof Array ? a : [a];
                    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++ % a.length;
                        l[g] = l[g] || [], l[g].push(new ja({
                            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(xs(l[p], {
                        style: k({fill: a[p % a.length]}, r.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(), r = i.getTicksCoords(),
                        a = 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);
                    A(p_, u.add, u), this.group.add(u.getGroup()), A(g_, function (t) {
                        e.get(t + ".show") && !i.scale.isBlank() && this["_" + t](e, n, s, l, r, a)
                    }, this)
                }
            }, _splitLine: function (e, t, i, n, o) {
                var r = e.getModel("splitLine").getModel("lineStyle"), a = r.get("color"), s = 0;
                a = a instanceof Array ? a : [a];
                for (var l = [], d = 0; d < o.length; d++) {
                    var u = s++ % a.length;
                    l[u] = l[u] || [], l[u].push(new Ka({shape: {cx: t.cx, cy: t.cy, r: o[d].coord}}))
                }
                for (d = 0; d < l.length; d++) this.group.add(xs(l[d], {
                    style: k({
                        stroke: a[d % a.length],
                        fill: null
                    }, r.getLineStyle()), silent: !0
                }))
            }, _minorSplitLine: function (e, t, i, n, o, r) {
                if (r.length) {
                    for (var a = e.getModel("minorSplitLine").getModel("lineStyle"), s = [], l = 0; l < r.length; l++) for (var d = 0; d < r[l].length; d++) s.push(new Ka({
                        shape: {
                            cx: t.cx,
                            cy: t.cy,
                            r: r[l][d].coord
                        }
                    }));
                    this.group.add(xs(s, {style: k({fill: null}, a.getLineStyle()), silent: !0}))
                }
            }, _splitArea: function (e, t, i, n, o) {
                if (o.length) {
                    var r = e.getModel("splitArea").getModel("areaStyle"), a = r.get("color"), s = 0;
                    a = a instanceof Array ? a : [a];
                    for (var l = [], d = o[0].coord, u = 1; u < o.length; u++) {
                        var c = s++ % a.length;
                        l[c] = l[c] || [], l[c].push(new ja({
                            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(xs(l[u], {
                        style: k({fill: a[u % a.length]}, r.getAreaStyle()),
                        silent: !0
                    }))
                }
            }
        });
        var m_ = eI.extend({
            makeElOption: function (e, t, i, n, o) {
                var r = i.axis;
                "angle" === r.dim && (this.animationThreshold = Math.PI / 18);
                var a, s = r.polar, l = s.getOtherAxis(r).getExtent();
                a = r["dataTo" + sd(r.dim)](t);
                var d = n.get("type");
                if (d && "none" !== d) {
                    var u = rI(n), c = v_[d](r, s, a, l, u);
                    c.style = u, e.graphicKey = c.type, e.pointer = c
                }
                var h = n.get("label.margin");
                aI(e, i, n, o, function (e, t, i, n, o) {
                    var r = t.axis, a = r.dataToCoord(e), s = n.getAngleAxis().getExtent()[0];
                    s = s / 180 * Math.PI;
                    var l, d, u, c = n.getRadiusAxis().getExtent();
                    if ("radius" === r.dim) {
                        var h = rt();
                        ut(h, h, s), dt(h, h, [n.cx, n.cy]), l = ll([a, -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, a]);
                        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: uI(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 r = Math.max(1, e.getBandWidth()), a = Math.PI / 180;
                return "angle" === e.dim ? {
                    type: "Sector",
                    shape: hI(t.cx, t.cy, n[0], n[1], (-i - r / 2) * a, (r / 2 - i) * a)
                } : {type: "Sector", shape: hI(t.cx, t.cy, i - r / 2, i + r / 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), A(i.coordinateSystem.regions, function (e) {
                        n[e.name] = i.isSelected(e.name) || !1
                    })
                }), {selected: n, name: t.name}
            })
        }

        function w_(e, t, i) {
            this._model = e
        }

        function k_(e, t, i, n) {
            var o = i.calendarModel, r = i.seriesModel, a = o ? o.coordinateSystem : r ? r.coordinateSystem : null;
            return a === this ? a[e](n) : null
        }

        iv.registerAxisPointerClass("PolarAxisPointer", m_), gf(O(function (e, t, i) {
            var n = {}, o = function (e) {
                var t = {};
                A(e, function (e, i) {
                    var n = e.getData(), o = e.coordinateSystem, r = o.getBaseAxis(), a = t_(o, r), s = r.getExtent(),
                        l = "category" === r.type ? r.getBandWidth() : Math.abs(s[1] - s[0]) / n.count(), d = t[a] || {
                            bandWidth: l,
                            remainedWidth: l,
                            autoWidthCount: 0,
                            categoryGap: "20%",
                            gap: "30%",
                            stacks: {}
                        }, u = d.stacks;
                    t[a] = d;
                    var c = e_(e);
                    u[c] || d.autoWidthCount++, u[c] = u[c] || {width: 0, maxWidth: 0};
                    var h = Nl(e.get("barWidth"), l), f = Nl(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 A(t, function (e, t) {
                    i[t] = {};
                    var n = e.stacks, o = e.bandWidth, r = Nl(e.categoryGap, o), a = Nl(e.gap, 1), s = e.remainedWidth,
                        l = e.autoWidthCount, d = (s - r) / (l + (l - 1) * a);
                    d = Math.max(d, 0), A(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 - r) / (l + (l - 1) * a), d = Math.max(d, 0);
                    var u, c = 0;
                    A(n, function (e, t) {
                        e.width || (e.width = d), c += (u = e).width * (1 + a)
                    }), u && (c -= u.width * a);
                    var h = -c / 2;
                    A(n, function (e, n) {
                        i[t][n] = i[t][n] || {offset: h, width: e.width}, h += e.width * (1 + a)
                    })
                }), i
            }(N(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, r = i.getBaseAxis(), a = t_(i, r), s = e_(e),
                        l = o[a][s], d = l.offset, u = l.width, c = i.getOtherAxis(r), 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(r.dim), y = op(t, m), w = "radius" !== r.dim || !e.get("roundCap", !0), k = c.getExtent()[0], T = 0, b = t.count(); T < b; T++) {
                        var C, S, I, _, A = t.get(m, T), D = t.get(v, T), x = 0 <= A ? "p" : "n", N = k;
                        if (y && (n[s][D] || (n[s][D] = {p: k, n: k}), N = n[s][D][x]), "radius" === c.dim) {
                            var E = c.dataToRadius(A) - k, P = r.dataToAngle(D);
                            Math.abs(E) < p && (E = (E < 0 ? -1 : 1) * p), S = (C = N) + E, _ = (I = P - d) - u, y && (n[s][D][x] = S)
                        } else {
                            var O = c.dataToAngle(A, w) - k, M = r.dataToRadius(D);
                            Math.abs(O) < g && (O = (O < 0 ? -1 : 1) * g), S = (C = M + d) + u, _ = (I = N) + O, y && (n[s][D][x] = _)
                        }
                        t.setItemLayout(T, {
                            cx: h,
                            cy: f,
                            r0: C,
                            r: S,
                            startAngle: -I * Math.PI / 180,
                            endAngle: -_ * Math.PI / 180
                        })
                    }
                }
            }, this)
        }, "bar")), kf({type: "polar"}), I(Id.extend({
            type: "geo",
            coordinateSystem: null,
            layoutMode: "box",
            init: function (e) {
                Id.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 = x(e.regions || [], function (e, i) {
                    return i.name && e.set(i.name, new Cl(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 Cl(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), kf({
            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"}), w_.prototype = {
            constructor: w_,
            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(),
                    r = this._model.getBoxLayoutParams(), a = "horizontal" === this._orient ? [i, 7] : [7, i];
                A([0, 1], function (e) {
                    d(o, e) && (r[n[e]] = o[e] * a[e])
                });
                var s = {width: t.getWidth(), height: t.getHeight()}, l = this._rect = md(r, s);

                function d(e, t) {
                    return null != e[t] && "auto" !== e[t]
                }

                A([0, 1], function (e) {
                    d(o, e) || (o[e] = l[n[e]] / a[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 r = i.day, a = this._getRangeInfo([n.start.time, o]).nthWeek;
                return "vertical" === this._orient ? [this._rect.x + r * this._sw + this._sw / 2, this._rect.y + a * this._sh + this._sh / 2] : [this._rect.x + a * this._sw + this._sw / 2, this._rect.y + r * 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: O(k_, "dataToPoint"),
            convertFromPixel: O(k_, "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 r = this._getRangeInfo(e);
                return r.start.time > r.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(), r = e[1].date.getDate();
                n.setDate(o + i - 1);
                var a = n.getDate();
                if (a !== r) for (var s = 0 < n.getTime() - e[1].time ? 1 : -1; (a = n.getDate()) !== r && 0 < (n.getTime() - e[1].time) * s;) i -= s, n.setDate(a - 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, r = new Date(n.start.time);
                return r.setDate(n.start.d + o), this.getDateInfo(r)
            }
        }, w_.dimensions = w_.prototype.dimensions, w_.getDimensionsInfo = w_.prototype.getDimensionsInfo, w_.create = function (e, t) {
            var i = [];
            return e.eachComponent("calendar", function (n) {
                var o = new w_(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", w_);
        var T_ = Id.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 = wd(e);
                T_.superApply(this, "init", arguments), b_(e, o)
            },
            mergeOption: function (e, t) {
                T_.superApply(this, "mergeOption", arguments), b_(this.option, e)
            }
        });

        function b_(e, t) {
            var i = e.cellSize;
            M(i) ? 1 === i.length && (i[1] = i[0]) : i = e.cellSize = [i, i];
            var n = D([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 C_ = {
            EN: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
            CN: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
        }, S_ = {EN: ["S", "M", "T", "W", "T", "F", "S"], CN: ["日", "一", "二", "三", "四", "五", "六"]};
        kf({
            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, r = o.getRangeInfo(), a = o.getOrient();
                this._renderDayRect(e, r, n), this._renderLines(e, r, a, n), this._renderYearText(e, r, a, n), this._renderMonthText(e, a, n), this._renderWeekText(e, r, a, n)
            },
            _renderDayRect: function (e, t, i) {
                for (var n = e.coordinateSystem, o = e.getModel("itemStyle").getItemStyle(), r = n.getCellWidth(), a = 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: r, height: a}, cursor: "default", style: o});
                    i.add(d)
                }
            },
            _renderLines: function (e, t, i, n) {
                var o = this, r = e.coordinateSystem, a = e.getModel("splitLine.lineStyle").getLineStyle(),
                    s = e.get("splitLine.show"), l = a.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 = r.getDateInfo(t.start.y + "-" + t.start.m));
                    var c = d.date;
                    c.setMonth(c.getMonth() + 1), d = r.getDateInfo(c)
                }

                function h(t) {
                    o._firstDayOfMonth.push(r.getDateInfo(t)), o._firstDayPoints.push(r.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, a, n)
                }

                h(r.getNextNDay(t.end.time, 1).formatedDate), s && this._drawSplitline(o._getEdgesPoints(o._tlpoints, l, i), a, n), s && this._drawSplitline(o._getEdgesPoints(o._blpoints, l, i), a, 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 qa({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 = [], r = 0; r < 7; r++) {
                    var a = n.getNextNDay(t.time, r), s = n.dataToRect([a.time], !1);
                    o[2 * a.day] = s.tl, o[2 * a.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 r = ["center", "bottom"];
                "bottom" === n ? (t[1] += o, r = ["center", "top"]) : "left" === n ? t[0] -= o : "right" === n ? (t[0] += o, r = ["center", "top"]) : t[1] -= o;
                var a = 0;
                return "left" !== n && "right" !== n || (a = Math.PI / 2), {
                    rotation: a,
                    position: t,
                    style: {textAlign: r[0], textVerticalAlign: r[1]}
                }
            },
            _renderYearText: function (e, t, i, n) {
                var o = e.getModel("yearLabel");
                if (o.get("show")) {
                    var r = o.get("margin"), a = o.get("position");
                    a = a || ("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 Ua({z2: 30});
                    Zs(m.style, o, {text: g}), m.attr(this._yearTextPositionControl(m, c[a], i, a, r)), n.add(m)
                }
            },
            _monthTextPositionControl: function (e, t, i, n, o) {
                var r = "left", a = "top", s = e[0], l = e[1];
                return "horizontal" === i ? (l += o, t && (r = "center"), "start" === n && (a = "bottom")) : (s += o, t && (a = "middle"), "start" === n && (r = "right")), {
                    x: s,
                    y: l,
                    textAlign: r,
                    textVerticalAlign: a
                }
            },
            _renderMonthText: function (e, t, i) {
                var n = e.getModel("monthLabel");
                if (n.get("show")) {
                    var o = n.get("nameMap"), r = n.get("margin"), a = n.get("position"), s = n.get("align"),
                        l = [this._tlpoints, this._blpoints];
                    L(o) && (o = C_[o.toUpperCase()] || []);
                    var d = "start" === a ? 0 : 1, u = "horizontal" === t ? 0 : 1;
                    r = "start" === a ? -r : r;
                    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},
                            k = this._formatterLabel(m, y), T = new Ua({z2: 30});
                        w(Zs(T.style, n, {text: k}), this._monthTextPositionControl(f, c, t, a, r)), i.add(T)
                    }
                }
            },
            _weekTextPositionControl: function (e, t, i, n, o) {
                var r = "center", a = "middle", s = e[0], l = e[1], d = "start" === i;
                return "horizontal" === t ? (s = s + n + (d ? 1 : -1) * o[0] / 2, r = d ? "right" : "left") : (l = l + n + (d ? 1 : -1) * o[1] / 2, a = d ? "bottom" : "top"), {
                    x: s,
                    y: l,
                    textAlign: r,
                    textVerticalAlign: a
                }
            },
            _renderWeekText: function (e, t, i, n) {
                var o = e.getModel("dayLabel");
                if (o.get("show")) {
                    var r = e.coordinateSystem, a = o.get("position"), s = o.get("nameMap"), l = o.get("margin"),
                        d = r.getFirstDayOfWeek();
                    L(s) && (s = S_[s.toUpperCase()] || []);
                    var u = r.getNextNDay(t.end.time, 7 - t.lweek).time, c = [r.getCellWidth(), r.getCellHeight()];
                    l = Nl(l, c["horizontal" === i ? 0 : 1]), "start" === a && (u = r.getNextNDay(t.start.time, -(7 + t.fweek)).time, l = -l);
                    for (var h = 0; h < 7; h++) {
                        var f, p = r.getNextNDay(u, h), g = r.dataToRect([p.time], !1).center;
                        f = Math.abs((h + d) % 7);
                        var m = new Ua({z2: 30});
                        w(Zs(m.style, o, {text: s[f]}), this._weekTextPositionControl(g, i, a, l, c)), n.add(m)
                    }
                }
            }
        });
        var I_ = {path: null, compoundPath: null, group: Di, image: Yn, text: Ua};
        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 __ = wf({
            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, r = [];
                this._flatten(n, r);
                var a = Ro(o, r);
                Bo(a);
                var s = this._elOptionsToUpdate = [];
                A(a, 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 = w({}, i), o = e[t], r = i.$action || "merge";
                        "merge" === r ? o ? (v(o, n, !0), yd(o, n, {ignoreSize: !0}), kd(i, o)) : e[t] = n : "replace" === r ? e[t] = n : "remove" === r && o && (e[t] = null)
                    }(o, t, i), function (e, t) {
                        e && (e.hv = t.hv = [x_(t, ["left", "right"]), x_(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) {
                A(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 A_(e, t, i, n) {
            var o = i.type, r = new (I_.hasOwnProperty(o) ? I_[o] : Is(o))(i);
            t.add(r), n.set(e, r), r.__ecGraphicId = e
        }

        function D_(e, t) {
            var i = e && e.parent;
            i && ("group" === e.type && e.traverse(function (e) {
                D_(e, t)
            }), t.removeKey(e.__ecGraphicId), i.remove(e))
        }

        function x_(e, t) {
            var i;
            return A(t, function (t) {
                null != e[t] && "auto" !== e[t] && (i = !0)
            }), i
        }

        kf({
            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;
                    A(t, function (t) {
                        var o = t.$action, r = t.id, a = i.get(r), 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 = w({}, e), A(["id", "parentId", "$action", "hv", "bounding"].concat(hd), function (t) {
                                delete e[t]
                            }), e
                        }(t);
                        o && "merge" !== o ? "replace" === o ? (D_(a, i), A_(r, l, u, i)) : "remove" === o && D_(a, i) : a ? a.attr(u) : A_(r, l, u, i);
                        var c = i.get(r);
                        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, r = t.getWidth(), a = 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 = Nl(u.__ecGraphicWidthOption, d ? r : c.__ecGraphicWidth) || 0, u.__ecGraphicHeight = Nl(u.__ecGraphicHeightOption, d ? a : 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: r,
                        height: a
                    } : {width: c.__ecGraphicWidth, height: c.__ecGraphicHeight}, null, {
                        hv: l.hv,
                        boundingMode: l.bounding
                    })
                }
            }, _clear: function () {
                var e = this._elMap;
                e.each(function (t) {
                    D_(t, e)
                }), this._elMap = $()
            }, dispose: function () {
                this._clear()
            }
        });
        var N_ = {};

        function E_(e, t) {
            N_[e] = t
        }

        function P_(e) {
            return N_[e]
        }

        var O_ = wf({
            type: "toolbox",
            layoutMode: {type: "box", ignoreSize: !0},
            optionUpdated: function () {
                O_.superApply(this, "optionUpdated", arguments), A(this.option.feature, function (e, t) {
                    var i = P_(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
            })
        }

        kf({
            type: "toolbox", render: function (e, t, i, n) {
                var o = this.group;
                if (o.removeAll(), e.get("show")) {
                    var r = +e.get("itemSize"), a = e.get("feature") || {}, s = this._features || (this._features = {}),
                        l = [];
                    A(a, function (e, t) {
                        l.push(t)
                    }), new Sf(this._featureNames || [], l).add(d).update(d).remove(O(d, null)).execute(), this._featureNames = l, function (e, t, i) {
                        var n = t.getBoxLayoutParams(), o = t.get("padding"),
                            r = {width: i.getWidth(), height: i.getHeight()}, a = md(n, r, o);
                        gd(t.get("orient"), e, t.get("itemGap"), a.width, a.height), vd(e, n, r, 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 a = cn(t, Cn(n)), s = e.position[0] + o.position[0], l = !1;
                            e.position[1] + o.position[1] + r + a.height > i.getHeight() && (n.textPosition = "top", l = !0);
                            var d = l ? -5 - a.height : r + 8;
                            s + a.width / 2 > i.getWidth() ? (n.textPosition = ["100%", d], n.textAlign = "right") : s - a.width / 2 < 0 && (n.textPosition = [0, d], n.textAlign = "left")
                        }
                    })
                }

                function d(d, u) {
                    var c, h = l[d], f = l[u], p = a[h], g = new Cl(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 = P_(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, a, s) {
                        var l = n.getModel("iconStyle"), d = n.getModel("emphasis.iconStyle"),
                            u = a.getIcons ? a.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 = {};
                        A(u, function (s, u) {
                            var h = hl(s, {}, {x: -r / 2, y: -r / 2, width: r, height: r});
                            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", w({
                                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", P(a.onclick, a, 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) {
                A(this._features, function (e) {
                    e.updateView && e.updateView(e.model, t, i, n)
                })
            }, remove: function (e, t) {
                A(this._features, function (i) {
                    i.remove && i.remove(e, t)
                }), this.group.removeAll()
            }, dispose: function (e, t) {
                A(this._features, function (i) {
                    i.dispose && i.dispose(e, t)
                })
            }
        });
        var F_ = Ac.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",
                r = "svg" === t.getZr().painter.getType() ? "svg" : i.get("type", !0) || "png",
                a = t.getConnectedDataURL({
                    type: r,
                    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(a.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 + "." + r)
            } else {
                var c = i.get("lang"),
                    h = '<body style="margin:0;"><img src="' + a + '" style="max-width:100%;" title="' + (c && c[0] || "") + '" /></body>';
                window.open().document.write(h)
            } else {
                var f = document.createElement("a");
                f.download = n + "." + r, f.target = "_blank", f.href = a;
                var p = new MouseEvent("click", {view: window, bubbles: !0, cancelable: !1});
                f.dispatchEvent(p)
            }
        }, E_("saveAsImage", L_);
        var R_ = Ac.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 A(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)
            }
        }, W_ = [["line", "bar"], ["stack"]];
        V_.onclick = function (e, t, i) {
            var n = this.model, o = n.get("seriesIndex." + i);
            if (K_[i]) {
                var r, a = {series: []};
                A(W_, function (e) {
                    0 <= C(e, i) && A(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, r = t.id, s = K_[i](o, r, t, n);
                    s && (k(s, t.option), a.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;
                            a[u] = a[u] || [];
                            for (var h = 0; h <= c; h++) a[u][c] = a[u][c] || {};
                            a[u][c].boundaryGap = "bar" === i
                        }
                    }
                }), "stack" === i && (r = a.series && a.series[0] && a.series[0].stack === B_ ? v({stack: R_.title.tiled}, R_.title) : m(R_.title)), t.dispatchAction({
                    type: "changeMagicType",
                    currentType: i,
                    newOption: a,
                    newTitle: r,
                    featureName: "magicType"
                })
            }
        }, ff({type: "changeMagicType", event: "magicTypeChanged", update: "prepareAndUpdate"}, function (e, t) {
            t.mergeOption(e.newOption)
        }), E_("magicType", U_);
        var j_ = Ac.toolbox.dataView, G_ = 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(j_.title),
            lang: m(j_.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 r = document.createElement("h4"), a = n.get("lang") || [];
            r.innerHTML = a[0] || n.get("title"), r.style.cssText = "margin: 10px 20px;", r.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 r = o.getBaseAxis();
                            if ("category" === r.type) {
                                var a = r.dim + "_" + r.index;
                                t[a] || (t[a] = {
                                    categoryAxis: r,
                                    valueAxis: o.getOtherAxis(r),
                                    series: []
                                }, n.push({axisDim: r.dim, axisIndex: r.index})), t[a].series.push(e)
                            } else i.push(e)
                        }
                    }), {seriesGroupByCategoryAxis: t, other: i, meta: n}
                }(e);
                return {
                    value: N([function (e) {
                        var t = [];
                        return A(e, function (e, i) {
                            var n = e.categoryAxis, o = e.valueAxis.dim, r = [" "].concat(D(e.series, function (e) {
                                return e.name
                            })), a = [n.model.getCategories()];
                            A(e.series, function (e) {
                                a.push(e.getRawData().mapArray(o, function (e) {
                                    return e
                                }))
                            });
                            for (var s = [r.join(H_)], l = 0; l < a[0].length; l++) {
                                for (var d = [], u = 0; u < a.length; u++) d.push(a[u][l]);
                                s.push(d.join(H_))
                            }
                            t.push(s.join("\n"))
                        }), t.join("\n\n" + G_ + "\n\n")
                    }(t.seriesGroupByCategoryAxis), function (e) {
                        return D(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], r = t.getName(o), a = 0; a < e - 1; a++) n[a] = arguments[a];
                                i.push((r ? r + H_ : "") + n.join(H_))
                            }), i.join("\n")
                        }).join("\n\n" + G_ + "\n\n")
                    }(t.other)], function (e) {
                        return e.replace(/[\n\t\s]/g, "")
                    }).join("\n\n" + G_ + "\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 w() {
                i.removeChild(o), y._dom = null
            }

            He(m, "click", w), He(v, "click", function () {
                var e;
                try {
                    e = "function" == typeof u ? u(s, t.getOption()) : function (e, t) {
                        var i = {series: []};
                        return A(e.split(new RegExp("\n*" + G_ + "\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 = D(z_(t.shift()).split(X_), function (e) {
                                        return {name: e, data: []}
                                    }), o = 0; o < t.length; o++) {
                                        var r = z_(t[o]).split(X_);
                                        i.push(r.shift());
                                        for (var a = 0; a < r.length; a++) n[a] && (n[a].data[o] = r[a])
                                    }
                                    return {series: n, categories: i}
                                }(e), r = t[n], a = r.axisDim + "Axis";
                                r && (i[a] = i[a] || [], i[a][r.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 r, a = z_(t[o]).split(X_), s = "", l = !1;
                                    r = isNaN(a[0]) ? (l = !0, s = a[0], a = a.slice(1), n[o] = {
                                        name: s,
                                        value: []
                                    }, n[o].value) : n[o] = [];
                                    for (var d = 0; d < a.length; d++) r.push(+a[d]);
                                    1 === r.length && (l ? n[o].value = r[0] : n[o] = r[0])
                                }
                                return {name: i, data: n}
                            }(e), i.series.push(o)
                        }), i
                    }(l.value, f)
                } catch (e) {
                    throw w(), new Error("Data view format error " + e)
                }
                e && t.dispatchAction({type: "changeDataView", newOption: e}), w()
            }), m.innerHTML = a[1], v.innerHTML = a[2], v.style.cssText = g, m.style.cssText = g, n.get("readOnly") || p.appendChild(v), p.appendChild(m), o.appendChild(r), 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 = [];
            A(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 D(e, function (e, i) {
                                var n = t && t[i];
                                return R(n) && !M(n) ? (R(e) && !M(e) && (e = e.value), k({value: e}, n)) : e
                            })
                        }(e.data, o)
                    })
                } else i.push(w({type: "scatter"}, e))
            }), t.mergeOption(k({series: i}, e.newOption))
        });
        var Y_ = A, J_ = C, Z_ = O, Q_ = ["dataToPoint", "pointToData"],
            $_ = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"];

        function eA(e, t, i) {
            var n = this._targetInfoList = [], o = {}, r = nA(t, e);
            Y_(oA, function (e, t) {
                i && i.include && !(0 <= J_(i.include, t)) || e(r, n, o)
            })
        }

        var tA = eA.prototype;

        function iA(e) {
            return e[0] > e[1] && e.reverse(), e
        }

        function nA(e, t) {
            return Go(e, t, {includeMainTypes: $_})
        }

        tA.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 = sA[e.brushType](0, i, t);
                    e.__rangeOffset = {offset: dA[e.brushType](n.values, e.range, [1, 1]), xyMinMax: n.xyMinMax}
                }
            })
        }, tA.matchOutputRanges = function (e, t, i) {
            Y_(e, function (e) {
                var n = this.findTargetInfo(e, t);
                n && !0 !== n && A(n.coordSyses, function (n) {
                    var o = sA[e.brushType](1, n, e.range);
                    i(e, o.values, n, t)
                })
            }, this)
        }, tA.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 = sA[e.brushType](0, i.coordSys, e.coordRange), o = e.__rangeOffset;
                    e.range = o ? dA[e.brushType](n.values, o.offset, function (e, t) {
                        var i = cA(e), n = cA(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)
        }, tA.makePanelOpts = function (e, t) {
            return D(this._targetInfoList, function (i) {
                var n = i.getPanelRect();
                return {
                    panelId: i.panelId,
                    defaultBrushType: t && t(i),
                    clipPath: Mb(n),
                    isTargetByCursor: Lb(n, e, i.coordSysModel),
                    getLinearBrushOtherExtent: Fb(n)
                }
            })
        }, tA.controlSeries = function (e, t, i) {
            var n = this.findTargetInfo(e, i);
            return !0 === n || n && 0 <= J_(n.coordSyses, t.coordinateSystem)
        }, tA.findTargetInfo = function (e, t) {
            for (var i = this._targetInfoList, n = nA(t, e), o = 0; o < i.length; o++) {
                var r = i[o], a = e.panelId;
                if (a) {
                    if (r.panelId === a) return r
                } else for (o = 0; o < rA.length; o++) if (rA[o](n, r)) return r
            }
            return !0
        };
        var oA = {
            grid: function (e, t) {
                var i = e.xAxisModels, n = e.yAxisModels, o = e.gridModels, r = $(), a = {}, s = {};
                (i || n || o) && (Y_(i, function (e) {
                    var t = e.axis.grid.model;
                    r.set(t.id, t), a[t.id] = !0
                }), Y_(n, function (e) {
                    var t = e.axis.grid.model;
                    r.set(t.id, t), s[t.id] = !0
                }), Y_(o, function (e) {
                    r.set(e.id, e), a[e.id] = !0, s[e.id] = !0
                }), r.each(function (e) {
                    var o = e.coordinateSystem, r = [];
                    Y_(o.getCartesians(), function (e, t) {
                        (0 <= J_(i, e.getAxis("x").model) || 0 <= J_(n, e.getAxis("y").model)) && r.push(e)
                    }), t.push({
                        panelId: "grid--" + e.id,
                        gridModel: e,
                        coordSysModel: e,
                        coordSys: r[0],
                        coordSyses: r,
                        getPanelRect: aA.grid,
                        xAxisDeclared: a[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: aA.geo
                    })
                })
            }
        }, rA = [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
        }], aA = {
            grid: function () {
                return this.coordSys.grid.getRect().clone()
            }, geo: function () {
                var e = this.coordSys, t = e.getBoundingRect().clone();
                return t.applyTransform(sl(e)), t
            }
        }, sA = {
            lineX: Z_(lA, 0), lineY: Z_(lA, 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]]),
                    r = [iA([n[0], o[0]]), iA([n[1], o[1]])];
                return {values: r, xyMinMax: r}
            }, polygon: function (e, t, i) {
                var n = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
                return {
                    values: D(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 lA(e, t, i, n) {
            var o = i.getAxis(["x", "y"][e]), r = iA(D([0, 1], function (e) {
                return t ? o.coordToData(o.toLocalCoord(n[e])) : o.toGlobalCoord(o.dataToCoord(n[e]))
            })), a = [];
            return a[e] = r, a[1 - e] = [NaN, NaN], {values: r, xyMinMax: a}
        }

        var dA = {
            lineX: Z_(uA, 0), lineY: Z_(uA, 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 D(e, function (e, n) {
                    return [e[0] - i[0] * t[n][0], e[1] - i[1] * t[n][1]]
                })
            }
        };

        function uA(e, t, i, n) {
            return [t[0] - n[e] * i[0], t[1] - n[e] * i[1]]
        }

        function cA(e) {
            return e ? [e[0][1] - e[0][0], e[1][1] - e[1][0]] : [NaN, NaN]
        }

        var hA = A, fA = "\0_ec_hist_store";

        function pA(e) {
            var t = e[fA];
            return t = t || (e[fA] = [{}])
        }

        Id.registerSubTypeDefaulter("dataZoom", function () {
            return "slider"
        });
        var gA, mA, vA, yA, wA = ["cartesian2d", "polar", "singleAxis"],
            kA = (mA = ["axisIndex", "axis", "index", "id"], vA = D(gA = (gA = ["x", "y", "z", "radius", "angle", "single"]).slice(), sd), yA = D(mA = (mA || []).slice(), sd), function (e, t) {
                A(gA, function (i, n) {
                    for (var o = {name: i, capital: vA[n]}, r = 0; r < mA.length; r++) o[mA[r]] = i + yA[r];
                    e.call(t, o)
                })
            });

        function TA(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 bA = A, CA = Pl;

        function SA(e, t) {
            var i = e.getAxisModel(), n = e._percentWindow, o = e._valueWindow;
            if (n) {
                var r = Fl(o, [0, 500]);
                r = Math.min(r, 20);
                var a = t || 0 === n[0] && 100 === n[1];
                i.setRange(a ? null : +o[0].toFixed(r), a ? null : +o[1].toFixed(r))
            }
        }

        TA.prototype = {
            constructor: TA, 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 <= C(wA, 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, r = 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) === (r.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(), r = [0, 100], a = [], s = [];
                bA(["start", "end"], function (l, d) {
                    var u = e[l], c = e[l + "Value"];
                    "percent" === o[d] ? (null == u && (u = r[d]), c = n.parse(xl(u, r, i))) : (t = !0, u = xl(c = null == c ? i[d] : n.parse(c), i, r)), s[d] = c, a[d] = u
                }), CA(s), CA(a);
                var l = this._minMaxSpan;

                function d(e, t, i, o, r) {
                    var a = r ? "Span" : "ValueSpan";
                    ET(0, e, i, "all", l["min" + a], l["max" + a]);
                    for (var s = 0; s < 2; s++) t[s] = xl(e[s], i, o, !0), r && (t[s] = n.parse(t[s]))
                }

                return t ? d(s, a, i, r, !1) : d(a, s, r, i, !0), {valueWindow: s, percentWindow: a}
            }, reset: function (e) {
                if (e === this._dataZoomModel) {
                    var t = this.getTargetSeriesModels();
                    this._dataExtent = function (e, t, i) {
                        var n = [1 / 0, -1 / 0];
                        return bA(i, function (e) {
                            var i = e.getData();
                            i && bA(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"),
                                r = o && i.getCategories().length;
                            null != n && "dataMin" !== n && "function" != typeof n ? t[0] = n : o && (t[0] = 0 < r ? 0 : NaN);
                            var a = i.getMax(!0);
                            null != a && "dataMax" !== a && "function" != typeof a ? t[1] = a : o && (t[1] = 0 < r ? r - 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 = {}, r = n._dataZoomModel, a = n._dataExtent, bA(["min", "max"], function (e) {
                        var t = r.get(e + "Span"), i = r.get(e + "ValueSpan");
                        null != i && (i = n.getAxisModel().axis.scale.parse(i)), null != i ? t = xl(a[0] + i, a, [0, 100], !0) : null != t && (i = xl(t, [0, 100], a, !0) - a[0]), o[e + "Span"] = t, o[e + "ValueSpan"] = i
                    });
                    var i = this.calculateDataWindow(e.settledOption);
                    this._valueWindow = i.valueWindow, this._percentWindow = i.percentWindow, SA(this)
                }
                var n, o, r, a
            }, restore: function (e) {
                e === this._dataZoomModel && (this._valueWindow = this._percentWindow = null, SA(this, !0))
            }, filterData: function (e, t) {
                if (e === this._dataZoomModel) {
                    var i = this._dimName, n = this.getTargetSeriesModels(), o = e.get("filterMode"),
                        r = this._valueWindow;
                    "none" !== o && bA(n, function (e) {
                        var t = e.getData(), n = t.mapDimension(i, !0);
                        n.length && ("weakFilter" === o ? t.filterSelf(function (e) {
                            for (var i, o, a, s = 0; s < n.length; s++) {
                                var l = t.get(n[s], e), d = !isNaN(l), u = l < r[0], c = l > r[1];
                                if (d && !u && !c) return !0;
                                d && (a = !0), u && (i = !0), c && (o = !0)
                            }
                            return a && i && o
                        }) : bA(n, function (i) {
                            if ("empty" === o) e.setData(t = t.map(i, function (e) {
                                return function (e) {
                                    return e >= r[0] && e <= r[1]
                                }(e) ? e : NaN
                            })); else {
                                var n = {};
                                n[i] = r, t.selectRange(n)
                            }
                        }), bA(n, function (e) {
                            t.setApproximateExtent(r, e)
                        }))
                    })
                }
            }
        };
        var IA = A, _A = kA, AA = wf({
            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 = DA(e);
                this.settledOption = n, this.mergeDefaultAndTheme(e, i), this.doInit(n)
            },
            mergeOption: function (e) {
                var t = DA(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), xA(this, e);
                var i = this.settledOption;
                IA([["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 r = this.dependentModels[t.axis][i],
                        a = r.__dzAxisProxy || (r.__dzAxisProxy = new TA(t.name, i, this, o));
                    e[t.name + "_" + i] = a
                }, this)
            },
            _resetTarget: function () {
                var e = this.option, t = this._judgeAutoMode();
                _A(function (t) {
                    var i = t.axisIndex;
                    e[i] = Oo(e[i])
                }, this), "axisIndex" === t ? this._autoSetAxisIndex() : "orient" === t && this._autoSetOrient()
            },
            _judgeAutoMode: function () {
                var e = this.option, t = !1;
                _A(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) : IA(n.singleAxis, function (n) {
                        e && n.get("orient", !0) === t && (i.singleAxisIndex = [n.componentIndex], e = !1)
                    })
                }
                e && _A(function (t) {
                    if (e) {
                        var n = [], o = this.dependentModels[t.axis];
                        if (o.length && !n.length) for (var r = 0, a = o.length; r < a; r++) "category" === o[r].get("type") && n.push(r);
                        (i[t.axisIndex] = n).length && (e = !1)
                    }
                }, this), e && this.ecModel.eachSeries(function (e) {
                    this._isSeriesHasAllAxesTypeOf(e, "value") && _A(function (t) {
                        var n = i[t.axisIndex], o = e.get(t.axisIndex), r = e.get(t.axisId);
                        C(n, o = e.ecModel.queryComponents({
                            mainType: t.axis,
                            index: o,
                            id: r
                        })[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 _A(function (n) {
                    var o = e.get(n.axisIndex), r = this.dependentModels[n.axis][o];
                    r && r.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 _A(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;
                _A(function (n) {
                    IA(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;
                IA([["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), xA(this, e)
            },
            setCalculatedRange: function (e) {
                var t = this.option;
                IA(["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 DA(e) {
            var t = {};
            return IA(["start", "end", "startValue", "endValue", "throttle"], function (i) {
                e.hasOwnProperty(i) && (t[i] = e[i])
            }), t
        }

        function xA(e, t) {
            var i = e._rangePropMode, n = e.get("rangeMode");
            IA([["start", "startValue"], ["end", "endValue"]], function (e, o) {
                var r = null != t[e[0]], a = null != t[e[1]];
                r && !a ? i[o] = "percent" : !r && a ? i[o] = "value" : n ? i[o] = n[o] : r && (i[o] = "percent")
            })
        }

        var NA = 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 r = o.getCoordSysModel();
                        r && function (e, t, i, n) {
                            for (var o, r = 0; r < i.length; r++) if (i[r].model === e) {
                                o = i[r];
                                break
                            }
                            o || i.push(o = {model: e, axisModels: [], coordIndex: n}), o.axisModels.push(t)
                        }(r, o, i[r.mainType] || (i[r.mainType] = []), r.componentIndex)
                    }
                }, this), i
            }
        });
        AA.extend({type: "dataZoom.select"}), NA.extend({type: "dataZoom.select"}), hf({
            getTargetSeries: function (e) {
                var t = $();
                return e.eachComponent("dataZoom", function (e) {
                    e.eachTargetAxis(function (e, i, n) {
                        A(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 r, a = {nodes: [], records: {}};
                    if (t(function (e) {
                        a.records[e.name] = {}
                    }), !o) return a;
                    for (n(o, a); r = !1, e(s), r;) ;

                    function s(e) {
                        !function (e, t) {
                            return 0 <= C(t.nodes, e)
                        }(e, a) && function (e, n) {
                            var o = !1;
                            return t(function (t) {
                                A(i(e, t) || [], function (e) {
                                    n.records[t.name][e] && (o = !0)
                                })
                            }), o
                        }(e, a) && (n(e, a), r = !0)
                    }

                    return a
                };

                function n(e, n) {
                    n.nodes.push(e), t(function (t) {
                        A(i(e, t) || [], function (e) {
                            n.records[t.name][e] = !0
                        })
                    })
                }
            }(P(t.eachComponent, t, "dataZoom"), kA, 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)
            }), A(n, function (t, i) {
                t.setRawRange({start: e.start, end: e.end, startValue: e.startValue, endValue: e.endValue})
            })
        });
        var EA = Ac.toolbox.dataZoom, PA = A;

        function OA(e, t, i) {
            (this._brushController = new ob(i.getZr())).on("brush", P(this._onBrush, this)).mount(), this._isZoomActive
        }

        OA.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(EA.title)
        };
        var MA = OA.prototype;
        MA.render = function (e, t, i, n) {
            this.model = e, this.ecModel = t, this.api = i, function (e, t, i, n, o) {
                var r = i._isZoomActive;
                n && "takeGlobalCursor" === n.type && (r = "dataZoomSelect" === n.key && n.dataZoomSelectActive), i._isZoomActive = r, e.setIconStatus("zoom", r ? "emphasis" : "normal");
                var a = new eA(LA(e.option), t, {include: ["grid"]});
                i._brushController.setPanels(a.makePanelOpts(o, function (e) {
                    return e.xAxisDeclared && !e.yAxisDeclared ? "lineX" : !e.xAxisDeclared && e.yAxisDeclared ? "lineY" : "rect"
                })).enableBrush(!!r && {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 pA(e).length
                }(t) ? "emphasis" : "normal")
            }(e, t)
        }, MA.onclick = function (e, t, i) {
            FA[i].call(this)
        }, MA.remove = function (e, t) {
            this._brushController.unmount()
        }, MA.dispose = function (e, t) {
            this._brushController.dispose()
        };
        var FA = {
            zoom: function () {
                var e = !this._isZoomActive;
                this.api.dispatchAction({type: "takeGlobalCursor", key: "dataZoomSelect", dataZoomSelectActive: e})
            }, back: function () {
                this._dispatchZoomAction(function (e) {
                    var t = pA(e), i = t[t.length - 1];
                    1 < t.length && t.pop();
                    var n = {};
                    return hA(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 LA(e) {
            var t = {};
            return A(["xAxisIndex", "yAxisIndex"], function (i) {
                t[i] = e[i], null == t[i] && (t[i] = "all"), !1 !== t[i] && "none" !== t[i] || (t[i] = [])
            }), t
        }

        MA._onBrush = function (e, t) {
            if (t.isEnd && e.length) {
                var i = {}, n = this.ecModel;
                this._brushController.updateCovers([]), new eA(LA(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 = pA(e);
                    hA(t, function (t, n) {
                        for (var o = i.length - 1; 0 <= o && !i[o][n]; o--) ;
                        if (o < 0) {
                            var r = e.queryComponents({mainType: "dataZoom", subType: "select", id: n})[0];
                            if (r) {
                                var a = r.getPercentRange();
                                i[0][n] = {dataZoomId: n, start: a[0], end: a[1]}
                            }
                        }
                    }), i.push(t)
                }(n, i), this._dispatchZoomAction(i)
            }

            function o(e, t, o) {
                var r = t.getAxis(e), a = r.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, a, n), l = s.findRepresentativeAxisProxy(a).getMinMaxSpan();
                null == l.minValueSpan && null == l.maxValueSpan || (o = ET(0, o.slice(), r.scale.getExtent(), 0, l.minValueSpan, l.maxValueSpan)), s && (i[s.id] = {
                    dataZoomId: s.id,
                    startValue: o[0],
                    endValue: o[1]
                })
            }
        }, MA._dispatchZoomAction = function (e) {
            var t = [];
            PA(e, function (e, i) {
                t.push(m(e))
            }), t.length && this.api.dispatchAction({type: "dataZoom", from: this.uid, batch: t})
        }, E_("dataZoom", OA), 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", r = n[o];
                    null == r || "all" === r || M(r) || (r = !1 === r || "none" === r ? [] : [r]), M(a = e[i]) || (a = a ? [a] : []), PA(a, function (e, a) {
                        if (null == r || "all" === r || -1 !== C(r, a)) {
                            var s = {
                                type: "select",
                                $fromToolbox: !0,
                                filterMode: n.filterMode || "filter",
                                id: "\0_ec_\0toolbox-dataZoom_" + i + a
                            };
                            s[o] = a, t.push(s)
                        }
                    })
                }
                var a
            }
        });
        var RA = Ac.toolbox.restore;

        function BA(e) {
            this.model = e
        }

        BA.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: RA.title
        }, BA.prototype.onclick = function (e, t, i) {
            !function (e) {
                e[fA] = null
            }(e), t.dispatchAction({type: "restore", from: this.uid})
        }, E_("restore", BA), ff({type: "restore", event: "restore", update: "prepareAndUpdate"}, function (e, t) {
            t.resetOption("recreate")
        }), wf({
            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 UA = A, VA = Yl, KA = ["", "-webkit-", "-moz-", "-o-"];

        function WA(e, t, i, n, o) {
            var r = t && t.painter;
            if (i) {
                var a = r && r.getViewportRoot();
                a && function (e, t, i, n, o) {
                    Le(Fe, t, n, o, !0) && Le(e, i, Fe[0], Fe[1])
                }(e, a, document.body, n, o)
            } else {
                e[0] = n, e[1] = o;
                var s = r && r.getViewportRootOffset();
                s && (e[0] += s.offsetLeft, e[1] += s.offsetTop)
            }
        }

        function jA(e, t, i) {
            if (o.wxa) return null;
            var n = document.createElement("div");
            n.domBelongToZr = !0, this.el = n;
            var r = this._zr = t.getZr(), a = this._appendToBody = i && i.appendToBody;
            this._styleCoord = [0, 0], WA(this._styleCoord, r, a, t.getWidth() / 2, t.getHeight() / 2), a ? 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 = r.handler;
                    Ge(r.painter.getViewportRoot(), e, !0), t.dispatch("mousemove", e)
                }
            }, n.onmouseleave = function () {
                s._enterable && s._show && s.hideLater(s._hideDelay), s._inContent = !1
            }
        }

        function GA(e) {
            this._zr = e.getZr(), this._show = !1, this._hideTimeout
        }

        jA.prototype = {
            constructor: jA, _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"),
                        r = e.getModel("textStyle"), a = 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 D(KA, function (e) {
                            return e + "transition:" + i
                        }).join(";")
                    }(i)), n && (o.canvasSupported ? t.push("background-Color:" + n) : (t.push("background-Color:#" + Gt(n)), t.push("filter:alpha(opacity=70)"))), UA(["width", "color", "radius"], function (i) {
                        var n = "border-" + i, o = VA(n), r = e.get(o);
                        null != r && t.push(n + ":" + r + ("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"), UA(["decoration", "align"], function (i) {
                            var n = e.get(i);
                            n && t.push("text-" + i + ":" + n)
                        }), t.join(";")
                    }(r)), null != a && t.push("padding:" + Jl(a).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;
                WA(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(P(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}
            }
        }, GA.prototype = {
            constructor: GA, _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, r = "{marker", a = o.indexOf(r); 0 <= a;) {
                    var s = o.indexOf("|}"), l = o.substr(a + r.length, s - a - r.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]
                    }, a = (o = o.substr(s + 1)).indexOf("{marker")
                }
                this.el = new Ua({
                    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(P(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 HA = P, zA = A, XA = Nl, qA = new es({shape: {x: -1, y: -1, width: 2, height: 2}});

        function YA(e) {
            for (var t = e.pop(); e.length;) {
                var i = e.pop();
                i && (Cl.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {formatter: i}), t = new Cl(i, t, t.ecModel))
            }
            return t
        }

        function JA(e, t) {
            return e.dispatchAction || P(t.dispatchAction, t)
        }

        function ZA(e) {
            return "center" === e || "middle" === e
        }

        kf({
            type: "tooltip", init: function (e, t) {
                if (!o.node) {
                    var i, n = e.getComponent("tooltip"), r = n.get("renderMode");
                    this._renderMode = Xo(r), "html" === this._renderMode ? (i = new jA(t.getDom(), t, {appendToBody: n.get("appendToBody", !0)}), this._newLine = "<br/>") : (i = new GA(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");
                zS("itemTooltip", this._api, HA(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 r = JA(n, i);
                    this._ticket = "";
                    var a = n.dataByCoordSys;
                    if (n.tooltip && null != n.x && null != n.y) {
                        var s = qA;
                        s.position = [n.x, n.y], s.update(), s.tooltip = n.tooltip, this._tryShow({
                            offsetX: n.x,
                            offsetY: n.y,
                            target: s
                        }, r)
                    } else if (a) this._tryShow({
                        offsetX: n.x,
                        offsetY: n.y,
                        position: n.position,
                        dataByCoordSys: n.dataByCoordSys,
                        tooltipOption: n.tooltipOption
                    }, r); else if (null != n.seriesIndex) {
                        if (this._manuallyAxisShowTip(e, t, i, n)) return;
                        var l = FS(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
                        }, r)
                    } 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
                    }, r))
                }
            }, 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(JA(n, i))
            }, _manuallyAxisShowTip: function (e, t, i, n) {
                var o = n.seriesIndex, r = n.dataIndex, a = t.getComponent("axisPointer").coordSysAxesInfo;
                if (null != o && null != r && null != a) {
                    var s = t.getSeriesByIndex(o);
                    if (s && "axis" === (e = YA([s.getData().getItemModel(r), s, (s.coordinateSystem || {}).model, e])).get("trigger")) return i.dispatchAction({
                        type: "updateAxisPointer",
                        seriesIndex: o,
                        dataIndex: r,
                        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 = P(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], r = [], a = [],
                    s = YA([t.tooltipOption, n]), l = this._renderMode, d = this._newLine, u = {};
                zA(e, function (e) {
                    zA(e.dataByAxis, function (e) {
                        var t = i.getComponent(e.axisDim + "Axis", e.axisIndex), n = e.value, o = [];
                        if (t && null != n) {
                            var s = sI(n, t.axis, i, e.seriesDataIndices, e.valueLabelOpt);
                            A(e.seriesDataIndices, function (r) {
                                var d = i.getSeriesByIndex(r.seriesIndex), c = r.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) {
                                    a.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 ? r.push(o.join(d)) : r.push((c ? $l(c) + d : "") + o.join(d))
                        }
                    })
                }, this), r.reverse(), r = r.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, a) : this._showTooltipContent(s, r, a, Math.random(), o[0], o[1], c, void 0, u)
                })
            }, _showSeriesItemTooltip: function (e, t, i) {
                var n = this._ecModel, o = t.seriesIndex, r = n.getSeriesByIndex(o), a = t.dataModel || r,
                    s = t.dataIndex, l = t.dataType, d = a.getData(l),
                    u = YA([d.getItemModel(s), a, r && (r.coordinateSystem || {}).model, this._tooltipModel]),
                    c = u.get("trigger");
                if (null == c || "item" === c) {
                    var h, f, p = a.getDataParams(s, l), g = a.formatTooltip(s, !1, l, this._renderMode);
                    f = R(g) ? (h = g.html, g.markers) : (h = g, null);
                    var m = "item_" + a.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 Cl(n, this._tooltipModel, this._ecModel), r = o.get("content"), a = Math.random();
                this._showOrMove(o, function () {
                    this._showTooltipContent(o, r, o.get("formatterParams") || {}, a, e.offsetX, e.offsetY, e.position, t)
                }), i({type: "showTip", from: this.uid})
            }, _showTooltipContent: function (e, t, i, n, o, r, a, s, l) {
                if (this._ticket = "", e.get("showContent") && e.get("show")) {
                    var d = this._tooltipContent, u = e.get("formatter");
                    a = a || e.get("position");
                    var c = t;
                    if (u && "string" == typeof u) c = id(u, i, !0); else if ("function" == typeof u) {
                        var h = HA(function (t, n) {
                            t === this._ticket && (d.setContent(n, l, e), this._updatePosition(e, a, o, r, d, i, s))
                        }, this);
                        this._ticket = n, c = u(i, n, h)
                    }
                    d.setContent(c, l, e), d.show(e), this._updatePosition(e, a, o, r, d, i, s)
                }
            }, _updatePosition: function (e, t, i, n, o, r, a) {
                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 = a && a.getBoundingRect().clone();
                if (a && h.applyTransform(a.transform), "function" == typeof t && (t = t([i, n], r, o.el, h, {
                    viewSize: [s, l],
                    contentSize: d.slice()
                })), M(t)) i = XA(t[0], s), n = XA(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 && a) i = (p = function (e, t, i) {
                    var n = i[0], o = i[1], r = 0, a = 0, s = t.width, l = t.height;
                    switch (e) {
                        case"inside":
                            r = t.x + s / 2 - n / 2, a = t.y + l / 2 - o / 2;
                            break;
                        case"top":
                            r = t.x + s / 2 - n / 2, a = t.y - o - 5;
                            break;
                        case"bottom":
                            r = t.x + s / 2 - n / 2, a = t.y + l + 5;
                            break;
                        case"left":
                            r = t.x - n - 5, a = t.y + l / 2 - o / 2;
                            break;
                        case"right":
                            r = t.x + s + 5, a = t.y + l / 2 - o / 2
                    }
                    return [r, a]
                }(t, h, d))[0], n = p[1]; else {
                    var p;
                    i = (p = function (e, t, i, n, o, r, a) {
                        var s = i.getOuterSize(), l = s.width, d = s.height;
                        return null != r && (n < e + l + r ? e -= l + r : e += r), null != a && (o < t + d + a ? t -= d + a : t += a), [e, t]
                    }(i, n, o, s, l, u ? null : 20, c ? null : 20))[0], n = p[1]
                }
                u && (i -= ZA(u) ? d[0] / 2 : "right" === u ? d[0] : 0), c && (n -= ZA(c) ? d[1] / 2 : "bottom" === c ? d[1] : 0), e.get("confine") && (i = (p = function (e, t, i, n, o) {
                    var r = i.getOuterSize(), a = r.width, s = r.height;
                    return e = Math.min(e + a, n) - a, 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 && zA(t, function (t, n) {
                    var o = t.dataByAxis || {}, r = (e[n] || {}).dataByAxis || [];
                    (i &= o.length === r.length) && zA(o, function (e, t) {
                        var n = r[t] || {}, o = e.seriesDataIndices || [], a = n.seriesDataIndices || [];
                        (i &= e.value === n.value && e.axisType === n.axisType && e.axisId === n.axisId && o.length === a.length) && zA(o, function (e, t) {
                            var n = a[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(), YS("itemTooltip", t))
            }
        }), ff({type: "showTip", event: "showTip", update: "tooltip:manuallyShowTip"}, function () {
        }), ff({type: "hideTip", event: "hideTip", update: "tooltip:manuallyHideTip"}, function () {
        });
        var QA = ["rect", "polygon", "keep", "clear"], $A = A;

        function eD(e) {
            if (e) for (var t in e) if (e.hasOwnProperty(t)) return !0
        }

        function tD(e, t, i) {
            var n = {};
            return $A(t, function (t) {
                var o = n[t] = function () {
                    function e() {
                    }

                    return e.prototype.__hidden = e.prototype, new e
                }();
                $A(e[t], function (e, n) {
                    if (Zw.isValidType(n)) {
                        var r = {type: n, visual: e};
                        i && i(r, t), o[n] = new Zw(r), "opacity" === n && ((r = m(r)).type = "colorAlpha", o.__hidden.__alphaForOpacity = new Zw(r))
                    }
                })
            }), n
        }

        function iD(e, t, i) {
            var n;
            A(i, function (e) {
                t.hasOwnProperty(e) && eD(t[e]) && (n = !0)
            }), n && A(i, function (i) {
                t.hasOwnProperty(i) && eD(t[i]) ? e[i] = m(t[i]) : delete e[i]
            })
        }

        var nD = {
            lineX: oD(0), lineY: oD(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, r = e.y, a = e.width, s = e.height, l = n[0];
                    return !!(mg(n, o, r) || mg(n, o + a, r) || mg(n, o, r + s) || mg(n, o + a, r + s) || Ai.create(e).contain(l[0], l[1]) || fl(o, r, o + a, r, n) || fl(o, r, o, r + s, n) || fl(o + a, r, o + a, r + s, n) || fl(o, r + s, o + a, r + s, n)) || void 0
                }
            }
        };

        function oD(e) {
            var t = ["x", "y"], i = ["width", "height"];
            return {
                point: function (t, i, n) {
                    if (t) {
                        var o = n.range;
                        return rD(t[e], o)
                    }
                }, rect: function (n, o, r) {
                    if (n) {
                        var a = r.range, s = [n[t[e]], n[t[e]] + n[i[e]]];
                        return s[1] < s[0] && s.reverse(), rD(s[0], a) || rD(s[1], a) || rD(a[0], s) || rD(a[1], s)
                    }
                }
            }
        }

        function rD(e, t) {
            return t[0] <= e && e <= t[1]
        }

        var aD = ["inBrush", "outOfBrush"], sD = "__ecBrushSelect", lD = "__ecInBrushSelectEvent", dD = Ch.VISUAL.BRUSH;

        function uD(e) {
            e.eachComponent({mainType: "brush"}, function (t) {
                (t.brushTargetManager = new eA(t.option, e)).setInputRanges(t.areas, e)
            })
        }

        function cD(e, t) {
            if (!e.isDisposed()) {
                var i = e.getZr();
                i[lD] = !0, e.dispatchAction({type: "brushSelect", batch: t}), i[lD] = !1
            }
        }

        function hD(e, t, i, n) {
            for (var o = 0, r = t.length; o < r; o++) {
                var a = t[o];
                if (e[a.brushType](n, i, a.selectors, a)) return !0
            }
        }

        function fD(e) {
            var t = e.brushSelector;
            if (L(t)) {
                var i = [];
                return A(nD, function (e, n) {
                    i[n] = function (i, n, o, r) {
                        var a = n.getItemLayout(i);
                        return e[t](a, o, r)
                    }
                }), i
            }
            if (F(t)) {
                var n = {};
                return A(nD, function (e, i) {
                    n[i] = t
                }), n
            }
            return t
        }

        gf(dD, function (e, t, i) {
            e.eachComponent({mainType: "brush"}, function (e) {
                i && "takeGlobalCursor" === i.type && e.setBrushOption("brush" === i.key ? i.brushOption : {brushType: !1})
            }), uD(e)
        }), mf(dD, function (e, t, i) {
            var n, o, r = [];
            e.eachComponent({mainType: "brush"}, function (t, i) {
                var a = {brushId: t.id, brushIndex: i, brushName: t.name, areas: m(t.areas), selected: []};
                r.push(a);
                var s = t.option, l = s.brushLink, d = [], u = [], c = [], h = 0;
                i || (n = s.throttleType, o = s.throttleDelay);
                var f = D(t.areas, function (e) {
                    return t = k({boundingRect: pD[e.brushType](e)}, e), i = t.selectors = {}, A(nD[t.brushType], function (e, n) {
                        i[n] = function (n) {
                            return e(n, i, t)
                        }
                    }), t;
                    var t, i
                }), p = tD(t.option, aD, function (e) {
                    e.mappingMethod = "fixed"
                });

                function g(e) {
                    return "all" === l || d[e]
                }

                function v(e) {
                    return !!e.length
                }

                M(l) && A(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 r = fD(i);
                        if (r && !function (e, t) {
                            var i = e.option.seriesIndex;
                            return null != i && "all" !== i && (M(i) ? C(i, t) < 0 : t !== i)
                        }(t, n) && (A(f, function (n) {
                            r[n.brushType] && t.brushTargetManager.controlSeries(n, i, e) && o.push(n), h |= v(o)
                        }), g(n) && v(o))) {
                            var a = i.getData();
                            a.each(function (e) {
                                hD(r, o, a, e) && (u[e] = 1)
                            })
                        }
                    }(i, n, o)
                }), e.eachSeries(function (e, t) {
                    var i = {seriesId: e.id, seriesIndex: t, seriesName: e.name, dataIndex: []};
                    a.selected.push(i);
                    var n = fD(e), o = c[t], r = e.getData(), s = g(t) ? function (e) {
                        return u[e] ? (i.dataIndex.push(r.getRawIndex(e)), "inBrush") : "outOfBrush"
                    } : function (e) {
                        return hD(n, o, r, e) ? (i.dataIndex.push(r.getRawIndex(e)), "inBrush") : "outOfBrush"
                    };
                    (g(t) ? h : v(o)) && function (e, t, i, n, o, r) {
                        var a, s = {};

                        function l(e) {
                            return i.getItemVisual(a, e)
                        }

                        function d(e, t) {
                            i.setItemVisual(a, e, t)
                        }

                        function u(e, u) {
                            a = null == r ? e : u;
                            var c = i.getRawDataItem(a);
                            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)
                            }
                        }

                        A(e, function (e) {
                            var i = Zw.prepareVisualTypes(t[e]);
                            s[e] = i
                        }), null == r ? i.each(u) : i.each([r], u)
                    }(aD, p, r, s)
                })
            }), function (e, t, i, n, o) {
                if (o) {
                    var r = e.getZr();
                    r[lD] || (r[sD] || (r[sD] = cD), Sc(r, sD, i, t)(e, n))
                }
            }(t, n, o, r, i)
        });
        var pD = {
            lineX: te, lineY: te, rect: function (e) {
                return gD(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 r = i[n];
                    r[0] < t[0][0] && (t[0][0] = r[0]), r[0] > t[0][1] && (t[0][1] = r[0]), r[1] < t[1][0] && (t[1][0] = r[1]), r[1] > t[1][1] && (t[1][1] = r[1])
                }
                return t && gD(t)
            }
        };

        function gD(e) {
            return new Ai(e[0][0], e[1][0], e[0][1] - e[0][0], e[1][1] - e[1][0])
        }

        var mD = ["#ddd"];

        function vD(e, t) {
            return v({
                brushType: e.brushType,
                brushMode: e.brushMode,
                transformable: e.transformable,
                brushStyle: new Cl(e.brushStyle).getItemStyle(),
                removeOnClick: e.removeOnClick,
                z: e.z
            }, t, !0)
        }

        function yD(e, t, i, n) {
            n && n.$from === e.id || this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())
        }

        wf({
            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 || iD(i, e, ["inBrush", "outOfBrush"]);
                var n = i.inBrush = i.inBrush || {};
                i.outOfBrush = i.outOfBrush || {color: mD}, n.hasOwnProperty("liftZ") || (n.liftZ = 5)
            },
            setAreas: function (e) {
                e && (this.areas = D(e, function (e) {
                    return vD(this.option, e)
                }, this))
            },
            setBrushOption: function (e) {
                this.brushOption = vD(this.option, e), this.brushType = this.brushOption.brushType
            }
        }), kf({
            type: "brush", init: function (e, t) {
                this.ecModel = e, this.api = t, this.model, (this._brushController = new ob(t.getZr())).on("brush", P(this._onBrush, this)).mount()
            }, render: function (e) {
                return this.model = e, yD.apply(this, arguments)
            }, updateTransform: function (e, t) {
                return uD(t), yD.apply(this, arguments)
            }, updateView: yD, 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 wD = Ac.toolbox.brush;

        function kD(e, t, i) {
            this.model = e, this.ecModel = t, this.api = i, this._brushType, this._brushMode
        }

        kD.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(wD.title)
        };
        var TD = kD.prototype;

        function bD(e) {
            var t = e.itemStyle || (e.itemStyle = {}), i = t.emphasis || (t.emphasis = {}),
                n = e.label || e.label || {}, o = n.normal || (n.normal = {}), r = {normal: 1, emphasis: 1};
            A(n, function (e, t) {
                r[t] || CD(o, t) || (o[t] = e)
            }), i.label && !CD(n, "emphasis") && (n.emphasis = i.label, delete i.label)
        }

        function CD(e, t) {
            return e.hasOwnProperty(t)
        }

        TD.render = TD.updateView = function (e, t, i) {
            var n, o, r;
            t.eachComponent({mainType: "brush"}, function (e) {
                n = e.brushType, o = e.brushOption.brushMode || "single", r |= e.areas.length
            }), this._brushType = n, this._brushMode = o, A(e.get("type", !0), function (t) {
                e.setIconStatus(t, ("keep" === t ? "multiple" === o : "clear" === t ? r : t === n) ? "emphasis" : "normal")
            })
        }, TD.getIcons = function () {
            var e = this.model, t = e.get("icon", !0), i = {};
            return A(e.get("type", !0), function (e) {
                t[e] && (i[e] = t[e])
            }), i
        }, TD.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", kD), cf(function (e, t) {
            var i = e && e.brush;
            if (M(i) || (i = i ? [i] : []), i.length) {
                var n = [];
                A(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 r = o.feature || (o.feature = {}), a = r.brush || (r.brush = {}), s = a.type || (a.type = []);
                s.push.apply(s, n), function (e) {
                    var t = {};
                    A(e, function (e) {
                        t[e] = 1
                    }), e.length = 0, A(t, function (t, i) {
                        e.push(i)
                    })
                }(s), t && !s.length && s.push.apply(s, QA)
            }
        }), wf({
            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"}
            }
        }), kf({
            type: "title", render: function (e, t, i) {
                if (this.group.removeAll(), e.get("show")) {
                    var n = this.group, o = e.getModel("textStyle"), r = e.getModel("subtextStyle"),
                        a = e.get("textAlign"), s = j(e.get("textBaseline"), e.get("textVerticalAlign")), l = new Ua({
                            style: Zs({}, o, {
                                text: e.get("text"),
                                textFill: o.getTextColor()
                            }, {disableBox: !0}), z2: 10
                        }), d = l.getBoundingRect(), u = e.get("subtext"), c = new Ua({
                            style: Zs({}, r, {
                                text: u,
                                textFill: r.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"));
                    a || ("middle" === (a = e.get("left") || e.get("right")) && (a = "center"), "right" === a ? v.x += v.width : "center" === a && (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: a, textVerticalAlign: s};
                    l.setStyle(y), c.setStyle(y), g = n.getBoundingRect();
                    var w = v.margin, k = e.getItemStyle(["color", "opacity"]);
                    k.fill = e.get("backgroundColor");
                    var T = new es({
                        shape: {
                            x: g.x - w[3],
                            y: g.y - w[0],
                            width: g.width + w[1] + w[3],
                            height: g.height + w[0] + w[2],
                            r: e.get("borderRadius")
                        }, style: k, subPixelOptimize: !0, silent: !0
                    });
                    n.add(T)
                }
            }
        }), Id.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"), k({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 SD = Id.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) {
                SD.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 = [];
                    A(t, function (e, t) {
                        var i, r = Lo(e);
                        R(e) ? (i = m(e)).value = t : i = t, o.push(i), L(r) || null != r && !isNaN(r) || (r = ""), n.push(r + "")
                    }), t = o
                }
                var r = {category: "ordinal", time: "time"}[i] || "number";
                (this._data = new Vf([{name: "value", type: r}], this)).initData(t, n)
            },
            getData: function () {
                return this._data
            },
            getCategories: function () {
                if ("category" === this.get("axisType")) return this._names.slice()
            }
        });

        function ID(e, t, i, n) {
            Dg.call(this, e, t, i), this.type = n || "value", this.model = null
        }

        I(SD.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 _D = lc.extend({type: "timeline"});
        ID.prototype = {
            constructor: ID, getLabelModel: function () {
                return this.model.getModel("label")
            }, isHorizontal: function () {
                return "horizontal" === this.model.get("orient")
            }
        }, S(ID, Dg);
        var AD = P, DD = A, xD = Math.PI;

        function ND(e, t, i, n, o, r) {
            var a = t.get("color");
            o ? (o.setColor(a), i.add(o), r && r.onUpdate(o)) : ((o = cg(e.get("symbol"), -1, -1, 2, 2, a)).setStyle("strokeNoScale", !0), i.add(o), r && r.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] += Nl(d[0], l[0]), u[1] += Nl(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 ED(e, t, i, n, o) {
            if (!e.dragging) {
                var r = n.getModel("checkpointStyle"), a = i.dataToCoord(n.getData().get(["value"], t));
                o || !r.get("animation", !0) ? e.attr({position: [a, 0]}) : (e.stopAnimation(!0), e.animateTo({position: [a, 0]}, r.get("animationDuration", !0), r.get("animationEasing", !0)))
            }
        }

        _D.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), r = this._createGroup("mainGroup"), a = this._createGroup("labelGroup"),
                        s = this._axis = this._createAxis(o, e);
                    e.formatTooltip = function (e) {
                        return $l(s.scale.getLabel(e))
                    }, DD(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function (t) {
                        this["_render" + t](o, r, s, e)
                    }, this), this._renderAxisLabel(o, a, 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 r, a, s, l, d = {horizontal: "center", vertical: 0 <= i || "+" === i ? "left" : "right"},
                    u = {horizontal: 0 <= i || "+" === i ? "top" : "bottom", vertical: "middle"},
                    c = {horizontal: 0, vertical: xD / 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 * xD / 180;
                var w = f.get("position", !0), k = p && f.get("showPlayBtn", !0), T = p && f.get("showPrevBtn", !0),
                    b = p && f.get("showNextBtn", !0), C = 0, S = h;
                return "left" === w || "bottom" === w ? (k && (r = [0, 0], C += v), T && (a = [C, 0], C += v)) : (k && (r = [S - g, 0], S -= v), T && (a = [0, 0], C += v)), b && (s = [S - g, 0], S -= v), l = [C, S], 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: r,
                    prevBtnPosition: a,
                    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 r = rt(), a = o.x, s = o.y + o.height;
                    dt(r, r, [-a, -s]), ut(r, r, -xD / 2), dt(r, r, [a, s]), (o = o.clone()).applyTransform(r)
                }
                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 r = i.getDataExtent("value");
                o.setExtent(r[0], r[1]), o.niceTicks();
                var a = new ID("value", o, e.axisExtent, n);
                return a.model = t, a
            }, _createGroup: function (e) {
                var t = this["_" + e] = new Di;
                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: w({lineCap: "round"}, n.getModel("lineStyle").getLineStyle()),
                    silent: !0,
                    z2: 1
                }))
            }, _renderAxisTick: function (e, t, i, n) {
                var o = n.getData(), r = i.scale.getTicks();
                DD(r, function (e) {
                    var r = i.dataToCoord(e), a = o.getItemModel(e), s = a.getModel("itemStyle"),
                        l = a.getModel("emphasis.itemStyle"),
                        d = {position: [r, 0], onclick: AD(this._changeTimeline, this, e)}, u = ND(a, s, t, d);
                    Hs(u, l.getItemStyle()), a.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(), r = i.getViewLabels();
                    DD(r, function (n) {
                        var r = n.tickValue, a = o.getItemModel(r), s = a.getModel("label"),
                            l = a.getModel("emphasis.label"), d = i.dataToCoord(n.tickValue), u = new Ua({
                                position: [d, 0],
                                rotation: e.labelRotation - e.rotation,
                                onclick: AD(this._changeTimeline, this, r),
                                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, r = e.rotation, a = 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 Ai(i[0], i[1], i[2], i[3]), "center")
                        }(n, i, l, {
                            position: e,
                            origin: [o / 2, 0],
                            rotation: u ? -r : 0,
                            rectHover: !0,
                            style: a,
                            onclick: d
                        });
                        t.add(c), Hs(c, s)
                    }
                }

                c(e.nextBtnPosition, "controlStyle.nextIcon", AD(this._changeTimeline, this, u ? "-" : "+")), c(e.prevBtnPosition, "controlStyle.prevIcon", AD(this._changeTimeline, this, u ? "+" : "-")), c(e.playPosition, "controlStyle." + (d ? "stopIcon" : "playIcon"), AD(this._handlePlayClick, this, !d), !0)
            }, _renderCurrentPointer: function (e, t, i, n) {
                var o = n.getData(), r = n.getCurrentIndex(), a = o.getItemModel(r).getModel("checkpointStyle"),
                    s = this, l = {
                        onCreate: function (e) {
                            e.draggable = !0, e.drift = AD(s._handlePointerDrag, s), e.ondragend = AD(s._handlePointerDragend, s), ED(e, r, i, n, !0)
                        }, onUpdate: function (e) {
                            ED(e, r, i, n)
                        }
                    };
                this._currentPointer = ND(a, a, 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 = Pl(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), r = this.model;
                (t || o !== r.getCurrentIndex() && r.get("realtime")) && this._changeTimeline(o)
            }, _doPlayStop: function () {
                this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(AD(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, r) {
                    var a = o.dataToCoord(i), s = Math.abs(a - e);
                    s < n && (n = s, t = r)
                }), 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] : []), A(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), bD(e), CD(e, "controlPosition")) {
                        var n = e.controlStyle || (e.controlStyle = {});
                        CD(n, "position") || (n.position = e.controlPosition), "none" !== n.position || CD(n, "show") || (n.show = !1, delete n.position), delete e.controlPosition
                    }
                    A(e.data || [], function (e) {
                        R(e) && !M(e) && (!CD(e, "value") && CD(e, "name") && (e.value = e.name), bD(e))
                    })
                }(e)
            })
        });
        var PD = ql, OD = $l;

        function MD(e) {
            Mo(e, "label", ["show"])
        }

        var FD = wf({
            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, r = this.mainType + "Model";
                i || t.eachSeries(function (e) {
                    var i = e.get(this.mainType, !0), a = e[r];
                    i && i.data ? (a ? a._mergeOption(i, t, !0) : (n && MD(i), A(i.data, function (e) {
                        e instanceof Array ? (MD(e[0]), MD(e[1])) : MD(e)
                    }), w(a = new o(i, this, t), {
                        mainType: this.mainType,
                        seriesIndex: e.seriesIndex,
                        name: e.name,
                        createdBySelf: !0
                    }), a.__hostSeries = e), e[r] = a) : e[r] = null
                }, this)
            }, formatTooltip: function (e) {
                var t = this.getData(), i = this.getRawValue(e), n = M(i) ? D(i, PD).join(", ") : PD(i),
                    o = t.getName(e), r = OD(this.name);
                return null == i && !o || (r += "<br />"), o && (r += OD(o), null != i && (r += " : ")), null != i && (r += OD(n)), r
            }, getData: function () {
                return this._data
            }, setData: function (e) {
                this._data = e
            }
        });
        I(FD, Uu), FD.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 LD = C;

        function RD(e, t, i, n, o, r) {
            var a = [], s = op(t, n) ? t.getCalculationInfo("stackResultDimension") : n, l = GD(t, s, e),
                d = t.indicesOfNearest(s, l)[0];
            a[o] = t.get(i, d), a[r] = t.get(s, d);
            var u = t.get(n, d), c = Ol(t.get(n, d));
            return 0 <= (c = Math.min(c, 20)) && (a[r] = +a[r].toFixed(c)), [a, u]
        }

        var BD = O, UD = {min: BD(RD, "min"), max: BD(RD, "max"), average: BD(RD, "average")};

        function VD(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, r = KD(t, i, n, e);
                if ((t = m(t)).type && UD[t.type] && r.baseAxis && r.valueAxis) {
                    var a = LD(o, r.baseAxis.dim), s = LD(o, r.valueAxis.dim),
                        l = UD[t.type](i, r.baseDataDim, r.valueDataDim, a, 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++) UD[d[u]] && (d[u] = GD(i, i.mapDimension(o[u]), d[u]));
                    t.coord = d
                }
            }
            return t
        }

        function KD(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 r = i.getDimensionInfo(n[o]);
                    if (r.name === t) return r.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 WD(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 jD(e, t, i, n) {
            return n < 2 ? e.coord && e.coord[n] : e.value
        }

        function GD(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 HD = kf({
            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 zD(e, t, i) {
            var n = t.coordinateSystem;
            e.each(function (o) {
                var r, a = e.getItemModel(o), s = Nl(a.get("x"), i.getWidth()), l = Nl(a.get("y"), i.getHeight());
                if (isNaN(s) || isNaN(l)) {
                    if (t.getMarkerPosition) r = 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);
                        r = n.dataToPoint([d, u])
                    }
                } else r = [s, l];
                isNaN(s) || (r[0] = s), isNaN(l) || (r[1] = l), e.setItemLayout(o, r)
            })
        }

        function XD(e, t, i, n) {
            var o = e.getData(), r = n.type;
            if (!M(n) && ("min" === r || "max" === r || "average" === r || "median" === r || null != n.xAxis || null != n.yAxis)) {
                var a, s;
                if (null != n.yAxis || null != n.xAxis) a = t.getAxis(null != n.yAxis ? "y" : "x"), s = W(n.yAxis, n.xAxis); else {
                    var l = KD(n, o, t, e);
                    a = l.valueAxis, s = GD(o, rp(o, l.valueDataDim), r)
                }
                var d = "x" === a.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: r,
                    valueIndex: n.valueIndex,
                    value: s
                }]
            }
            return (n = [VD(e, n[0]), VD(e, n[1]), w({}, n[2])])[2].type = n[2].type || "", v(n[2], n[0]), v(n[2], n[1]), n
        }

        function qD(e) {
            return !isNaN(e) && !isFinite(e)
        }

        function YD(e, t, i, n) {
            var o = 1 - e, r = n.dimensions[e];
            return qD(t[o]) && qD(i[o]) && t[e] === i[e] && n.getAxis(r).containData(t[e])
        }

        function JD(e, t) {
            if ("cartesian2d" === e.type) {
                var i = t[0].coord, n = t[1].coord;
                if (i && n && (YD(1, i, n, e) || YD(0, i, n, e))) return !0
            }
            return WD(e, t[0]) && WD(e, t[1])
        }

        function ZD(e, t, i, n, o) {
            var r, a = n.coordinateSystem, s = e.getItemModel(t), l = Nl(s.get("x"), o.getWidth()),
                d = Nl(s.get("y"), o.getHeight());
            if (isNaN(l) || isNaN(d)) {
                if (n.getMarkerPosition) r = n.getMarkerPosition(e.getValues(e.dimensions, t)); else {
                    var u = a.dimensions, c = e.get(u[0], t), h = e.get(u[1], t);
                    r = a.dataToPoint([c, h])
                }
                if ("cartesian2d" === a.type) {
                    var f = a.getAxis("x"), p = a.getAxis("y");
                    u = a.dimensions, qD(e.get(u[0], t)) ? r[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : qD(e.get(u[1], t)) && (r[1] = p.toGlobalCoord(p.getExtent()[i ? 0 : 1]))
                }
                isNaN(l) || (r[0] = l), isNaN(d) || (r[1] = d)
            } else r = [l, d];
            e.setItemLayout(t, r)
        }

        function QD(e, t, i, n) {
            var o = VD(e, n[0]), r = VD(e, n[1]), a = W, s = o.coord, l = r.coord;
            s[0] = a(s[0], -1 / 0), s[1] = a(s[1], -1 / 0), l[0] = a(l[0], 1 / 0), l[1] = a(l[1], 1 / 0);
            var d = y([{}, o, r]);
            return d.coord = [o.coord, r.coord], d.x0 = o.x, d.y0 = o.y, d.x1 = r.x, d.y1 = r.y, d
        }

        function $D(e) {
            return !isNaN(e) && !isFinite(e)
        }

        function ex(e, t, i) {
            var n = 1 - e;
            return $D(t[n]) && $D(i[n])
        }

        function tx(e, t) {
            var i = t.coord[0], n = t.coord[1];
            return !("cartesian2d" !== e.type || !i || !n || !ex(1, i, n) && !ex(0, i, n)) || WD(e, {
                coord: i,
                x: t.x0,
                y: t.y0
            }) || WD(e, {coord: n, x: t.x1, y: t.y1})
        }

        function ix(e, t, i, n, o) {
            var r, a = n.coordinateSystem, s = e.getItemModel(t), l = Nl(s.get(i[0]), o.getWidth()),
                d = Nl(s.get(i[1]), o.getHeight());
            if (isNaN(l) || isNaN(d)) {
                if (n.getMarkerPosition) r = n.getMarkerPosition(e.getValues(i, t)); else {
                    var u = [f = e.get(i[0], t), p = e.get(i[1], t)];
                    a.clampData && a.clampData(u, u), r = a.dataToPoint(u, !0)
                }
                if ("cartesian2d" === a.type) {
                    var c = a.getAxis("x"), h = a.getAxis("y"), f = e.get(i[0], t), p = e.get(i[1], t);
                    $D(f) ? r[0] = c.toGlobalCoord(c.getExtent()["x0" === i[0] ? 0 : 1]) : $D(p) && (r[1] = h.toGlobalCoord(h.getExtent()["y0" === i[1] ? 0 : 1]))
                }
                isNaN(l) || (r[0] = l), isNaN(d) || (r[1] = d)
            } else r = [l, d];
            return r
        }

        HD.extend({
            type: "markPoint", updateTransform: function (e, t, i) {
                t.eachSeries(function (e) {
                    var t = e.markPointModel;
                    t && (zD(t.getData(), e, i), this.markerGroupMap.get(e.id).updateLayout(t))
                }, this)
            }, renderSeries: function (e, t, i, n) {
                var o = e.coordinateSystem, r = e.id, a = e.getData(), s = this.markerGroupMap,
                    l = s.get(r) || s.set(r, new Gg), d = function (e, t, i) {
                        var n;
                        n = e ? D(e && e.dimensions, function (e) {
                            return k({name: e}, t.getData().getDimensionInfo(t.getData().mapDimension(e)) || {})
                        }) : [{name: "value", type: "float"}];
                        var o = new Vf(n, i), r = D(i.get("data"), O(VD, t));
                        return e && (r = N(r, O(WD, e))), o.initData(r, null, e ? jD : function (e) {
                            return e.value
                        }), o
                    }(o, e, t);
                t.setData(d), zD(t.getData(), e, n), d.each(function (e) {
                    var i = d.getItemModel(e), n = i.getShallow("symbol"), o = i.getShallow("symbolSize"), r = F(n),
                        s = F(o);
                    if (r || s) {
                        var l = t.getRawValue(e), u = t.getDataParams(e);
                        r && (n = n(l, u)), s && (o = o(l, u))
                    }
                    d.setItemVisual(e, {
                        symbol: n,
                        symbolSize: o,
                        color: i.get("itemStyle.color") || a.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 || {}
        }), FD.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"
            }
        }), HD.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, r = t.__to;
                        o.each(function (t) {
                            ZD(o, t, !0, e, i), ZD(r, t, !1, e, i)
                        }), n.each(function (e) {
                            n.setItemLayout(e, [o.getItemLayout(e), r.getItemLayout(e)])
                        }), this.markerGroupMap.get(e.id).updateLayout()
                    }
                }, this)
            }, renderSeries: function (e, t, i, n) {
                var o = e.coordinateSystem, r = e.id, a = e.getData(), s = this.markerGroupMap,
                    l = s.get(r) || s.set(r, new Xk);
                this.group.add(l.group);
                var d = function (e, t, i) {
                    var n;
                    n = e ? D(e && e.dimensions, function (e) {
                        return k({name: e}, t.getData().getDimensionInfo(t.getData().mapDimension(e)) || {})
                    }) : [{name: "value", type: "float"}];
                    var o = new Vf(n, i), r = new Vf(n, i), a = new Vf([], i), s = D(i.get("data"), O(XD, t, e, i));
                    e && (s = N(s, O(JD, e)));
                    var l = e ? jD : function (e) {
                        return e.value
                    };
                    return o.initData(D(s, function (e) {
                        return e[0]
                    }), null, l), r.initData(D(s, function (e) {
                        return e[1]
                    }), null, l), a.initData(D(s, function (e) {
                        return e[2]
                    })), a.hasItemOption = !0, {from: o, to: r, line: a}
                }(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 r = t.getItemModel(i);
                    ZD(t, i, o, e, n), t.setItemVisual(i, {
                        symbolSize: r.get("symbolSize") || p[o ? 0 : 1],
                        symbol: r.get("symbol", !0) || f[o ? 0 : 1],
                        color: r.get("itemStyle.color") || a.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 || {}
        }), FD.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 nx = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]];
        HD.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 = D(nx, function (o) {
                                return ix(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, r = e.id, a = e.getData(), s = this.markerGroupMap,
                    l = s.get(r) || s.set(r, {group: new Di});
                this.group.add(l.group), l.__keep = !0;
                var d = function (e, t, i) {
                    var n, o;
                    o = e ? (n = D(e && e.dimensions, function (e) {
                        var i = t.getData();
                        return k({name: e}, i.getDimensionInfo(i.mapDimension(e)) || {})
                    }), new Vf(D(["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 r = D(i.get("data"), O(QD, t, e, i));
                    e && (r = N(r, O(tx, e)));
                    var a = e ? function (e, t, i, n) {
                        return e.coord[Math.floor(n / 2)][n % 2]
                    } : function (e) {
                        return e.value
                    };
                    return o.initData(r, null, a), o.hasItemOption = !0, o
                }(o, e, t);
                t.setData(d), d.each(function (t) {
                    d.setItemLayout(t, D(nx, function (i) {
                        return ix(d, t, i, e, n)
                    })), d.setItemVisual(t, {color: a.getVisual("color")})
                }), d.diff(l.__data).add(function (e) {
                    var t = new Xa({shape: {points: d.getItemLayout(e)}});
                    d.setItemGraphicEl(e, t), l.group.add(t)
                }).update(function (e, i) {
                    var n = l.__data.getItemGraphicEl(i);
                    rl(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"), r = n.getModel("emphasis.label"),
                        a = d.getItemVisual(i, "color");
                    e.useStyle(k(n.getModel("itemStyle").getItemStyle(), {
                        fill: Jt(a, .4),
                        stroke: a
                    })), e.hoverStyle = n.getModel("emphasis.itemStyle").getItemStyle(), Ys(e.style, e.hoverStyle, o, r, {
                        labelFetcher: t,
                        labelDataIndex: i,
                        defaultText: d.getName(i) || "",
                        isRectText: !0,
                        autoColor: a
                    }), 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 ox = Ac.legend.selector,
            rx = {all: {type: "all", title: m(ox.all)}, inverse: {type: "inverse", title: m(ox.inverse)}}, ax = wf({
                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) {
                    ax.superCall(this, "mergeOption", e), this._updateSelector(e)
                },
                _updateSelector: function (e) {
                    var t = e.selector;
                    !0 === t && (t = e.selector = ["all", "inverse"]), M(t) && A(t, function (e, i) {
                        L(e) && (e = {type: e}), t[i] = v(e, rx[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, r = n.name;
                        if (i.push(r), n.legendVisualProvider) {
                            var a = n.legendVisualProvider.getAllNames();
                            e.isSeriesFiltered(n) || (i = i.concat(a)), a.length ? t = t.concat(a) : o = !0
                        } else o = !0;
                        o && Uo(n) && t.push(n.name)
                    }), this._availableNames = i;
                    var n = D(this.get("data") || t, function (e) {
                        return "string" != typeof e && "number" != typeof e || (e = {name: e}), new Cl(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") && A(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;
                    A(e, function (e) {
                        t[e.get("name", !0)] = !0
                    })
                },
                inverseSelect: function () {
                    var e = this._data, t = this.option.selected;
                    A(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 <= C(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 sx(e, t, i) {
            var n, o = {}, r = "toggleSelected" === e;
            return i.eachComponent("legend", function (i) {
                r && null != n ? i[n ? "select" : "unSelect"](t.name) : "allSelect" === e || "inverseSelect" === e ? i[e]() : (i[e](t.name), n = i.isSelected(t.name)), A(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", O(sx, "toggleSelected")), ff("legendAllSelect", "legendselectall", O(sx, "allSelect")), ff("legendInverseSelect", "legendinverseselect", O(sx, "inverseSelect")), ff("legendSelect", "legendselected", O(sx, "select")), ff("legendUnSelect", "legendunselected", O(sx, "unSelect"));
        var lx = O, dx = A, ux = Di, cx = kf({
            type: "legend.plain", newlineDisabled: !1, init: function () {
                this.group.add(this._contentGroup = new ux), this._backgroundEl, this.group.add(this._selectorGroup = new ux), 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"), r = e.get("orient");
                    o && "auto" !== o || (o = "right" === e.get("left") && "vertical" === r ? "right" : "left");
                    var a = e.get("selector", !0), s = e.get("selectorPosition", !0);
                    !a || s && "auto" !== s || (s = "horizontal" === r ? "end" : "start"), this.renderInner(o, e, t, i, a, r, 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, a, s),
                        f = md(k({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, r, a) {
                var s = this.getContentGroup(), l = $(), d = t.get("selectedMode"), u = [];
                i.eachRawSeries(function (e) {
                    e.get("legendHoverLink") || u.push(e.id)
                }), dx(t.getData(), function (o, r) {
                    var a = o.get("name");
                    if (this.newlineDisabled || "" !== a && "\n" !== a) {
                        var c = i.getSeriesByName(a)[0];
                        if (!l.get(a)) 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(a, r, o, t, g, m, e, f, p, d).on("click", lx(fx, a, null, n, u)).on("mouseover", lx(px, c.name, null, n, u)).on("mouseout", lx(gx, c.name, null, n, u)), l.set(a, !0)
                        } else i.eachRawSeries(function (i) {
                            if (!l.get(a) && i.legendVisualProvider) {
                                var s = i.legendVisualProvider;
                                if (!s.containName(a)) return;
                                var c = s.indexOfName(a), h = s.getItemVisual(c, "color"),
                                    f = s.getItemVisual(c, "borderColor");
                                this._createItem(a, r, o, t, "roundRect", null, e, h, f, d).on("click", lx(fx, null, a, n, u)).on("mouseover", lx(px, null, a, n, u)).on("mouseout", lx(gx, null, a, n, u)), l.set(a, !0)
                            }
                        }, this)
                    } else s.add(new ux({newline: !0}))
                }, this), o && this._createSelector(o, t, n, r, a)
            }, _createSelector: function (e, t, i, n, o) {
                var r = this.getSelectorGroup();
                dx(e, function (e) {
                    !function (e) {
                        var n = e.type, o = new Ua({
                            style: {x: 0, y: 0, align: "center", verticalAlign: "middle"},
                            onclick: function () {
                                i.dispatchAction({type: "all" === n ? "legendAllSelect" : "legendInverseSelect"})
                            }
                        });
                        r.add(o);
                        var a = t.getModel("selectorLabel"), s = t.getModel("emphasis.selectorLabel");
                        Ys(o.style, o.hoverStyle = {}, a, s, {defaultText: e.title, isRectText: !1}), Hs(o)
                    }(e)
                })
            }, _createItem: function (e, t, i, n, o, r, a, 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 ux, y = i.getModel("textStyle"), k = i.get("icon"),
                    T = i.getModel("tooltip"), b = T.parentModel,
                    C = cg(o = k || o, 0, 0, u, c, m ? s : h, null == p || p);
                if (v.add(hx(C, o, g, l, f, m)), !k && r && (r !== o || "none" === r)) {
                    var S = .8 * c;
                    "none" === r && (r = "circle");
                    var I = cg(r, (u - S) / 2, (c - S) / 2, S, S, m ? s : h, null == p || p);
                    v.add(hx(I, r, g, l, f, m))
                }
                var _ = "left" === a ? u + 5 : -5, A = a, D = n.get("formatter"), x = e;
                "string" == typeof D && D ? x = D.replace("{name}", null != e ? e : "") : "function" == typeof D && (x = D(e)), v.add(new Ua({
                    style: Zs({}, y, {
                        text: x,
                        x: _,
                        y: c / 2,
                        textFill: m ? y.getTextColor() : h,
                        textAlign: A,
                        textVerticalAlign: "middle"
                    })
                }));
                var N = new es({
                    shape: v.getBoundingRect(),
                    invisible: !0,
                    tooltip: T.get("show") ? w({
                        content: e,
                        formatter: b.get("formatter", !0) || function () {
                            return e
                        },
                        formatterParams: {
                            componentType: "legend",
                            legendIndex: n.componentIndex,
                            name: e,
                            $vars: ["name"]
                        }
                    }, T.option) : null
                });
                return v.add(N), v.eachChild(function (e) {
                    e.silent = !0
                }), N.silent = !d, this.getContentGroup().add(v), Hs(v), v.__legendDataIndex = t, v
            }, layoutInner: function (e, t, i, n, o, r) {
                var a = this.getContentGroup(), s = this.getSelectorGroup();
                gd(e.get("orient"), a, e.get("itemGap"), i.width, i.height);
                var l = a.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" === r ? c[f] += l[p] + h : d[f] += u[p] + h, c[1 - f] += l[g] / 2 - u[g] / 2, s.attr("position", c), a.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 a.attr("position", d), this.group.getBoundingRect()
            }, remove: function () {
                this.getContentGroup().removeAll(), this._isFirstRender = !0
            }
        });

        function hx(e, t, i, n, o, r) {
            var a;
            return "line" !== t && t.indexOf("empty") < 0 ? (a = i.getItemStyle(), e.style.stroke = n, r || (a.stroke = o)) : a = i.getItemStyle(["borderWidth", "borderColor"]), e.setStyle(a)
        }

        function fx(e, t, i, n) {
            gx(e, t, i, n), i.dispatchAction({type: "legendToggleSelect", name: null != e ? e : t}), px(e, t, i, n)
        }

        function px(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 gx(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(Ch.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
            })
        }), Id.registerSubTypeDefaulter("legend", function () {
            return "plain"
        });
        var mx = ax.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 = wd(e);
                mx.superCall(this, "init", e, t, i, n), vx(this, e, o)
            },
            mergeOption: function (e, t) {
                mx.superCall(this, "mergeOption", e, t), vx(this, this.option, e)
            }
        });

        function vx(e, t, i) {
            var n = [1, 1];
            n[e.getOrient().index] = 0, yd(t, i, {type: "box", ignoreSize: n})
        }

        var yx = Di, kx = ["width", "height"], Tx = ["x", "y"], bx = cx.extend({
            type: "legend.scroll", newlineDisabled: !0, init: function () {
                bx.superCall(this, "init"), this._currentIndex = 0, this.group.add(this._containerGroup = new yx), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new yx), this._showController
            }, resetInner: function () {
                bx.superCall(this, "resetInner"), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null
            }, renderInner: function (e, t, i, n, o, r, a) {
                var s = this;
                bx.superCall(this, "renderInner", e, t, i, n, o, r, a);
                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",
                        r = hl(t.get("pageIcons", !0)[t.getOrient().name][i], {onclick: P(s._pageGo, s, o, t, n)}, {
                            x: -d[0] / 2,
                            y: -d[1] / 2,
                            width: d[0],
                            height: d[1]
                        });
                    r.name = e, l.add(r)
                }

                l.add(new Ua({
                    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, r) {
                var a = this.getSelectorGroup(), s = e.getOrient().index, l = kx[s], d = Tx[s], u = kx[1 - s],
                    c = Tx[1 - s];
                o && gd("horizontal", a, e.get("selectorItemGap", !0));
                var h = e.get("selectorButtonGap", !0), f = a.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" === r) 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]), a.attr("position", p)
                }
                return v
            }, _layoutContentAndController: function (e, t, i, n, o, r, a) {
                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 = j(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[r] / 2 - c[r] / 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[r] = Math.max(u[r], c[r]), v[a] = Math.min(0, c[a] + 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[r] = v[r], l.setClipPath(new es({shape: y})), l.__rectSize = y[o]
                } else d.eachChild(function (e) {
                    e.attr({invisible: !0, silent: !0})
                });
                var w = this._getPageInfo(e);
                return null != w.pageIndex && rl(s, {position: w.contentPosition}, h && e), this._updatePageInfoView(e, w), 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;
                A(["pagePrev", "pageNext"], function (n) {
                    var o = null != t[n + "DataIndex"], r = i.childOfName(n);
                    r && (r.setStyle("fill", o ? e.get("pageIconColor", !0) : e.get("pageIconInactiveColor", !0)), r.cursor = o ? "pointer" : "default")
                });
                var n = i.childOfName("pageText"), o = e.get("pageFormatter"), r = t.pageIndex,
                    a = null != r ? r + 1 : 0, s = t.pageCount;
                n && o && n.setStyle("text", L(o) ? o.replace("{current}", a).replace("{total}", s) : o({
                    current: a,
                    total: s
                }))
            }, _getPageInfo: function (e) {
                var t = e.get("scrollDataIndex", !0), i = this.getContentGroup(), n = this._containerGroup.__rectSize,
                    o = e.getOrient().index, r = kx[o], a = Tx[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 && !w(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])) && w(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[a] + e.position[o];
                        return {s: i, e: i + t[r], i: e.__legendDataIndex}
                    }
                }

                function w(e, t) {
                    return e.e >= t && e.s <= t + n
                }
            }, _findTargetItemIndex: function (e) {
                return this._showController ? (this.getContentGroup().eachChild(function (n, o) {
                    var r = n.__legendDataIndex;
                    null == i && null != r && (i = o), r === 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)
            })
        }), AA.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 Cx = es, Sx = xl, Ix = Pl, _x = P, Ax = A, Dx = "horizontal", xx = "vertical",
            Nx = ["line", "bar", "candlestick", "scatter"], Ex = NA.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) {
                    Ex.superApply(this, "render", arguments), Sc(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 () {
                    Ex.superApply(this, "remove", arguments), Ic(this, "_dispatchZoomAction")
                }, dispose: function () {
                    Ex.superApply(this, "dispose", arguments), Ic(this, "_dispatchZoomAction")
                }, _buildView: function () {
                    var e = this.group;
                    e.removeAll(), this._resetLocation(), this._resetInterval();
                    var t = this._displayables.barGroup = new Di;
                    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 === Dx ? {
                            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}, r = wd(e.option);
                    A(["right", "top", "width", "height"], function (e) {
                        "ph" === r[e] && (r[e] = o[e])
                    });
                    var a = md(r, n, e.padding);
                    this._location = {
                        x: a.x,
                        y: a.y
                    }, this._size = [a.width, a.height], this._orient === xx && this._size.reverse()
                }, _positionGroup: function () {
                    var e = this.group, t = this._location, i = this._orient,
                        n = this.dataZoomModel.getFirstTargetAxisModel(), o = n && n.get("inverse"),
                        r = this._displayables.barGroup, a = (this._dataShadowInfo || {}).otherAxisInverse;
                    r.attr(i !== Dx || o ? i === Dx && o ? {scale: a ? [-1, 1] : [-1, -1]} : i !== xx || o ? {
                        scale: a ? [-1, -1] : [-1, 1],
                        rotation: Math.PI / 2
                    } : {scale: a ? [1, -1] : [1, 1], rotation: Math.PI / 2} : {scale: a ? [1, 1] : [1, -1]});
                    var s = e.getBoundingRect([r]);
                    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 Cx({
                        silent: !0,
                        shape: {x: 0, y: 0, width: t[0], height: t[1]},
                        style: {fill: e.get("backgroundColor")},
                        z2: -40
                    })), i.add(new Cx({
                        shape: {x: 0, y: 0, width: t[0], height: t[1]},
                        style: {fill: "transparent"},
                        z2: 0,
                        onclick: P(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 r = n.getDataExtent(o), a = .3 * (r[1] - r[0]);
                            r = [r[0] - a, r[1] + a];
                            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 : Sx(e, r, 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 Xa({
                                shape: {points: u},
                                style: k({fill: g.get("dataBackgroundColor")}, g.getModel("dataBackground.areaStyle").getAreaStyle()),
                                silent: !0,
                                z2: -20
                            })), this._displayables.barGroup.add(new qa({
                                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, r) {
                            A(e.getAxisProxy(o.name, r).getTargetSeriesModels(), function (e) {
                                if (!(i || !0 !== t && C(Nx, e.get("type")) < 0)) {
                                    var a, s = n.getComponent(o.axis, r).axis, l = function (e) {
                                        return {x: "y", y: "x", radius: "angle", angle: "radius"}[e]
                                    }(o.name), d = e.coordinateSystem;
                                    null != l && d.getOtherAxis && (a = d.getOtherAxis(s).inverse), l = e.getData().mapDimension(l), i = {
                                        thisAxis: s,
                                        series: e,
                                        thisDim: o.name,
                                        otherDim: l,
                                        otherAxisInverse: a
                                    }
                                }
                            }, this)
                        }, this), i
                    }
                }, _renderHandle: function () {
                    var e = this._displayables, t = e.handles = [], i = e.handleLabels = [],
                        n = this._displayables.barGroup, o = this._size, r = this.dataZoomModel;
                    n.add(e.filler = new Cx({
                        draggable: !0,
                        cursor: Px(this._orient),
                        drift: _x(this._onDragMove, this, "all"),
                        ondragstart: _x(this._showDataInfo, this, !0),
                        ondragend: _x(this._onDragEnd, this),
                        onmouseover: _x(this._showDataInfo, this, !0),
                        onmouseout: _x(this._showDataInfo, this, !1),
                        style: {fill: r.get("fillerColor"), textPosition: "inside"}
                    })), n.add(new Cx({
                        silent: !0,
                        subPixelOptimize: !0,
                        shape: {x: 0, y: 0, width: o[0], height: o[1]},
                        style: {
                            stroke: r.get("dataBackgroundColor") || r.get("borderColor"),
                            lineWidth: 1,
                            fill: "rgba(0,0,0,0)"
                        }
                    })), Ax([0, 1], function (e) {
                        var o = hl(r.get("handleIcon"), {
                            cursor: Px(this._orient),
                            draggable: !0,
                            drift: _x(this._onDragMove, this, e),
                            ondragend: _x(this._onDragEnd, this),
                            onmouseover: _x(this._showDataInfo, this, !0),
                            onmouseout: _x(this._showDataInfo, this, !1)
                        }, {x: -1, y: 0, width: 2, height: 2}), a = o.getBoundingRect();
                        this._handleHeight = Nl(r.get("handleSize"), this._size[1]), this._handleWidth = a.width / a.height * this._handleHeight, o.setStyle(r.getModel("handleStyle").getItemStyle());
                        var s = r.get("handleColor");
                        null != s && (o.style.fill = s), n.add(t[e] = o);
                        var l = r.textStyleModel;
                        this.group.add(i[e] = new Ua({
                            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 = [Sx(e[0], [0, 100], t, !0), Sx(e[1], [0, 100], t, !0)]
                }, _updateInterval: function (e, t) {
                    var i = this.dataZoomModel, n = this._handleEnds, o = this._getViewExtent(),
                        r = i.findRepresentativeAxisProxy().getMinMaxSpan(), a = [0, 100];
                    ET(t, n, o, i.get("zoomLock") ? "all" : e, null != r.minSpan ? Sx(r.minSpan, a, o, !0) : null, null != r.maxSpan ? Sx(r.maxSpan, a, o, !0) : null);
                    var s = this._range, l = this._range = Ix([Sx(n[0], o, a, !0), Sx(n[1], o, a, !0)]);
                    return !s || s[0] !== l[0] || s[1] !== l[1]
                }, _updateView: function (e) {
                    var t = this._displayables, i = this._handleEnds, n = Ix(i.slice()), o = this._size;
                    Ax([0, 1], function (e) {
                        var n = t.handles[e], r = this._handleHeight;
                        n.attr({scale: [r / 2, r / 2], position: [i[e], o[1] / 2 - r / 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, r = ["", ""];
                    if (t.get("showDetail")) {
                        var a = t.findRepresentativeAxisProxy();
                        if (a) {
                            var s = a.getAxisModel().axis, l = this._range, d = e ? a.calculateDataWindow({
                                start: l[0],
                                end: l[1]
                            }).valueWindow : a.getDataValueWindow();
                            r = [this._formatLabel(d[0], s), this._formatLabel(d[1], s)]
                        }
                    }
                    var u = Ix(this._handleEnds.slice());

                    function c(e) {
                        var t = sl(i.handles[e].parent, this.group), a = 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 === Dx ? "middle" : a,
                            textAlign: o === Dx ? a : "center",
                            text: r[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 r = 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, r) : L(n) ? n.replace("{value}", r) : r
                }, _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),
                        r = this._updateInterval(e, o[0]), a = this.dataZoomModel.get("realtime");
                    this._updateView(!a), r && a && 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, r = this._updateInterval("all", i[0] - o);
                        this._updateView(), r && 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 (Ax(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 Px(e) {
            return "vertical" === e ? "ns-resize" : "ew-resize"
        }

        AA.extend({
            type: "dataZoom.inside",
            defaultOption: {
                disabled: !1,
                zoomLock: !1,
                zoomOnMouseWheel: !0,
                moveOnMouseMove: !0,
                moveOnMouseWheel: !1,
                preventDefaultMouseMove: !0
            }
        });
        var Ox = "\0_ec_dataZoom_roams";

        function Mx(e) {
            return e.type + "\0_" + e.id
        }

        function Fx(e) {
            var t = e.getZr();
            return t[Ox] || (t[Ox] = {})
        }

        function Lx(e) {
            A(e, function (t, i) {
                t.count || (t.controller.dispose(), delete e[i])
            })
        }

        function Rx(e, t) {
            e.dispatchAction({type: "dataZoom", batch: t})
        }

        var Bx = P, Ux = NA.extend({
            type: "dataZoom.inside", init: function (e, t) {
                this._range
            }, render: function (e, t, i, n) {
                Ux.superApply(this, "render", arguments), this._range = e.getPercentRange(), A(this.getTargetCoordInfo(), function (t, n) {
                    var o = D(t, function (e) {
                        return Mx(e.model)
                    });
                    A(t, function (t) {
                        var r = t.model, a = {};
                        A(["pan", "zoom", "scrollMove"], function (e) {
                            a[e] = Bx(Vx[e], this, t, n)
                        }, this), function (e, t) {
                            var i = Fx(e), n = t.dataZoomId, o = t.coordId;
                            A(i, function (e, i) {
                                var r = e.dataZoomInfos;
                                r[n] && C(t.allCoordIds, o) < 0 && (delete r[n], e.count--)
                            }), Lx(i);
                            var r = i[o];
                            r || ((r = i[o] = {coordId: o, dataZoomInfos: {}, count: 0}).controller = function (e, t) {
                                var i = new Cy(e.getZr());
                                return A(["pan", "zoom", "scrollMove"], function (e) {
                                    i.on(e, function (i) {
                                        var n = [];
                                        A(t.dataZoomInfos, function (o) {
                                            if (i.isAvailableBehavior(o.dataZoomModel.option)) {
                                                var r = (o.getRange || {})[e], a = r && r(t.controller, i);
                                                !o.dataZoomModel.get("disabled", !0) && a && n.push({
                                                    dataZoomId: o.dataZoomId,
                                                    start: a[0],
                                                    end: a[1]
                                                })
                                            }
                                        }), n.length && t.dispatchAction(n)
                                    })
                                }), i
                            }(e, r), r.dispatchAction = O(Rx, e)), r.dataZoomInfos[n] || r.count++, r.dataZoomInfos[n] = t;
                            var a = function (e) {
                                var t, i = {type_true: 2, type_move: 1, type_false: 0, type_undefined: -1}, n = !0;
                                return A(e, function (e) {
                                    var o = e.dataZoomModel,
                                        r = !o.get("disabled", !0) && (!o.get("zoomLock", !0) || "move");
                                    i["type_" + t] < i["type_" + r] && (t = r), n &= o.get("preventDefaultMouseMove", !0)
                                }), {
                                    controlType: t,
                                    opt: {
                                        zoomOnMouseWheel: !0,
                                        moveOnMouseMove: !0,
                                        moveOnMouseWheel: !0,
                                        preventDefaultMouseMove: !!n
                                    }
                                }
                            }(r.dataZoomInfos);
                            r.controller.enable(a.controlType, a.opt), r.controller.setPointerChecker(t.containsPoint), Sc(r, "dispatchAction", t.dataZoomModel.get("throttle", !0), "fixRate")
                        }(i, {
                            coordId: Mx(r), allCoordIds: o, containsPoint: function (e, t, i) {
                                return r.coordinateSystem.containPoint([t, i])
                            }, dataZoomId: e.id, dataZoomModel: e, getRange: a
                        })
                    }, this)
                }, this)
            }, dispose: function () {
                var e, t, i;
                e = this.api, t = this.dataZoomModel.id, A(i = Fx(e), function (e) {
                    e.controller.dispose();
                    var i = e.dataZoomInfos;
                    i[t] && (delete i[t], e.count--)
                }), Lx(i), Ux.superApply(this, "dispose", arguments), this._range = null
            }
        }), Vx = {
            zoom: function (e, t, i, n) {
                var o = this._range, r = o.slice(), a = e.axisModels[0];
                if (a) {
                    var s = jx[t](null, [n.originX, n.originY], a, i, e),
                        l = (0 < s.signal ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (r[1] - r[0]) + r[0],
                        d = Math.max(1 / n.scale, 0);
                    r[0] = (r[0] - l) * d + l, r[1] = (r[1] - l) * d + l;
                    var u = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
                    return ET(0, r, [0, 100], 0, u.minSpan, u.maxSpan), this._range = r, o[0] !== r[0] || o[1] !== r[1] ? r : void 0
                }
            }, pan: Kx(function (e, t, i, n, o, r) {
                var a = jx[n]([r.oldX, r.oldY], [r.newX, r.newY], t, o, i);
                return a.signal * (e[1] - e[0]) * a.pixel / a.pixelLength
            }), scrollMove: Kx(function (e, t, i, n, o, r) {
                return jx[n]([0, 0], [r.scrollDelta, r.scrollDelta], t, o, i).signal * (e[1] - e[0]) * r.scrollDelta
            })
        };

        function Kx(e) {
            return function (t, i, n, o) {
                var r = this._range, a = r.slice(), s = t.axisModels[0];
                if (s) {
                    var l = e(a, s, t, i, n, o);
                    return ET(l, a, [0, 100], "all"), this._range = a, r[0] !== a[0] || r[1] !== a[1] ? a : void 0
                }
            }
        }

        function Wx(e) {
            var t = e && e.visualMap;
            M(t) || (t = t ? [t] : []), Gx(t, function (e) {
                if (e) {
                    Hx(e, "splitList") && !Hx(e, "pieces") && (e.pieces = e.splitList, delete e.splitList);
                    var t = e.pieces;
                    t && M(t) && Gx(t, function (e) {
                        R(e) && (Hx(e, "start") && !Hx(e, "min") && (e.min = e.start), Hx(e, "end") && !Hx(e, "max") && (e.max = e.end))
                    })
                }
            })
        }

        var jx = {
            grid: function (e, t, i, n, o) {
                var r = i.axis, a = {}, s = o.model.coordinateSystem.getRect();
                return e = e || [0, 0], "x" === r.dim ? (a.pixel = t[0] - e[0], a.pixelLength = s.width, a.pixelStart = s.x, a.signal = r.inverse ? 1 : -1) : (a.pixel = t[1] - e[1], a.pixelLength = s.height, a.pixelStart = s.y, a.signal = r.inverse ? -1 : 1), a
            }, polar: function (e, t, i, n, o) {
                var r = i.axis, a = {}, 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 ? (a.pixel = t[0] - e[0], a.pixelLength = l[1] - l[0], a.pixelStart = l[0], a.signal = r.inverse ? 1 : -1) : (a.pixel = t[1] - e[1], a.pixelLength = d[1] - d[0], a.pixelStart = d[0], a.signal = r.inverse ? -1 : 1), a
            }, singleAxis: function (e, t, i, n, o) {
                var r = i.axis, a = o.model.coordinateSystem.getRect(), s = {};
                return e = e || [0, 0], "horizontal" === r.orient ? (s.pixel = t[0] - e[0], s.pixelLength = a.width, s.pixelStart = a.x, s.signal = r.inverse ? 1 : -1) : (s.pixel = t[1] - e[1], s.pixelLength = a.height, s.pixelStart = a.y, s.signal = r.inverse ? -1 : 1), s
            }
        }, Gx = A;

        function Hx(e, t) {
            return e && e.hasOwnProperty && e.hasOwnProperty(t)
        }

        Id.registerSubTypeDefaulter("visualMap", function (e) {
            return e.categories || (e.pieces ? 0 < e.pieces.length : 0 < e.splitNumber) && !e.calculable ? "piecewise" : "continuous"
        });
        var zx = Ch.VISUAL.COMPONENT;

        function Xx(e, t, i, n) {
            for (var o = t.targetVisuals[n], r = Zw.prepareVisualTypes(o), a = {color: e.getData().getVisual("color")}, s = 0, l = r.length; s < l; s++) {
                var d = r[s], u = o["opacity" === d ? "__alphaForOpacity" : d];
                u && u.applyVisual(i, c, h)
            }
            return a.color;

            function c(e) {
                return a[e]
            }

            function h(e, t) {
                a[e] = t
            }
        }

        mf(zx, {
            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 A(e, function (e) {
                            var i = Zw.prepareVisualTypes(t[e]);
                            o[e] = i
                        }), {
                            progress: function (e, r) {
                                function a(e) {
                                    return r.getItemVisual(l, e)
                                }

                                function s(e, t) {
                                    r.setItemVisual(l, e, t)
                                }

                                var l;
                                for (null != n && (n = r.getDimension(n)); null != (l = e.next());) {
                                    var d = r.getRawDataItem(l);
                                    if (!d || !1 !== d.visualMap) for (var u = null != n ? r.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, a, s)
                                    }
                                }
                            }
                        }
                    }(t.stateList, t.targetVisuals, P(t.getValueState, t), t.getDataDimension(e.getData())))
                }), i
            }
        }), mf(zx, {
            createOnAllSeries: !0, reset: function (e, t) {
                var i = e.getData(), n = [];
                t.eachComponent("visualMap", function (t) {
                    if (t.isTargetSeries(e)) {
                        var o = t.getVisualMeta(P(Xx, null, e, t)) || {stops: [], outerColors: []},
                            r = t.getDataDimension(i), a = i.getDimensionInfo(r);
                        null != a && (o.dimension = a.index, n.push(o))
                    }
                }), e.getData().setVisual("visualMeta", n)
            }
        });
        var qx = function (e, t, i) {
            var n = m((Yx[e] || {})[t]);
            return i && M(n) ? n[n.length - 1] : n
        }, Yx = {
            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]}
        }, Jx = Zw.mapVisual, Zx = Zw.eachVisual, Qx = M, $x = A, eN = Pl, tN = xl, iN = wf({
            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 || iD(i, e, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption()
            },
            resetVisual: function (e) {
                var t = this.stateList;
                e = P(e, this), this.controllerVisuals = tD(this.option.controller, t, e), this.targetVisuals = tD(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 = Oo(e), t
            },
            eachTargetSeries: function (e, t) {
                A(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, r = this.option, a = r.precision, s = this.dataBound, l = r.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(a, 20))
                }
            },
            resetExtent: function () {
                var e = this.option, t = eN([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 r = n[o];
                        if (!e.getDimensionInfo(r).isCalculationCoord) return r
                    }
                }
            },
            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 r = this.isCategory();

                function a(i) {
                    Qx(t.color) && !i.inRange && (i.inRange = {color: t.color.slice().reverse()}), i.inRange = i.inRange || {color: e.get("gradientColor")}, $x(this.stateList, function (e) {
                        var t = i[e];
                        if (L(t)) {
                            var n = qx(t, "active", r);
                            n ? (i[e] = {}, i[e][t] = n) : delete i[e]
                        }
                    }, this)
                }

                a.call(this, n), a.call(this, o), function (e, t, i) {
                    var n = e[t], o = e[i];
                    n && !o && (o = e[i] = {}, $x(n, function (e, t) {
                        if (Zw.isValidType(t)) {
                            var i = qx(t, "inactive", r);
                            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");
                    $x(this.stateList, function (o) {
                        var a = this.itemSize, s = e[o];
                        null == (s = s || (e[o] = {color: r ? n : [n]})).symbol && (s.symbol = t && m(t) || (r ? "roundRect" : ["roundRect"])), null == s.symbolSize && (s.symbolSize = i && m(i) || (r ? a[0] : [a[0], a[0]])), s.symbol = Jx(s.symbol, function (e) {
                            return "none" === e || "square" === e ? "roundRect" : e
                        });
                        var l = s.symbolSize;
                        if (null != l) {
                            var d = -1 / 0;
                            Zx(l, function (e) {
                                d < e && (d = e)
                            }), s.symbolSize = Jx(l, function (e) {
                                return tN(e, [0, d], [0, a[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
        }), nN = [20, 140], oN = iN.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) {
                oN.superApply(this, "optionUpdated", arguments), this.resetExtent(), this.resetVisual(function (e) {
                    e.mappingMethod = "linear", e.dataExtent = this.getExtent()
                }), this._resetRange()
            },
            resetItemSize: function () {
                oN.superApply(this, "resetItemSize", arguments);
                var e = this.itemSize;
                "horizontal" === this._orient && e.reverse(), null != e[0] && !isNaN(e[0]) || (e[0] = nN[0]), null != e[1] && !isNaN(e[1]) || (e[1] = nN[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 () {
                iN.prototype.completeVisualOption.apply(this, arguments), A(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 = Pl((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 = rN(0, 0, this.getExtent()), i = rN(0, 0, this.option.range.slice()), n = [];

                function o(t, i) {
                    n.push({value: t, color: e(t, i)})
                }

                for (var r = 0, a = 0, s = i.length, l = t.length; a < l && (!i.length || t[a] <= i[0]); a++) t[a] < i[r] && o(t[a], "outOfRange");
                for (var d = 1; r < s; r++, d = 0) d && n.length && o(i[r], "outOfRange"), o(i[r], "inRange");
                for (d = 1; a < l; a++) (!i.length || i[i.length - 1] < t[a]) && (d && (n.length && o(n[n.length - 1].value, "outOfRange"), d = 0), o(t[a], "outOfRange"));
                var u = n.length;
                return {stops: n, outerColors: [u ? n[0].color : "transparent", u ? n[u - 1].color : "transparent"]}
            }
        });

        function rN(e, t, i) {
            if (i[0] === i[1]) return i.slice();
            for (var n = (i[1] - i[0]) / 200, o = i[0], r = [], a = 0; a <= 200 && o < i[1]; a++) r.push(o), o += n;
            return r.push(i[1]), r
        }

        var aN = kf({
            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, r = {};
                if ("symbol" === t && (r.symbol = o.get("itemSymbol")), "color" === t) {
                    var a = o.get("contentColor");
                    r.color = a
                }

                function s(e) {
                    return r[e]
                }

                function l(e, t) {
                    r[e] = t
                }

                var d = o.controllerVisuals[n || o.getValueState(e)];
                return A(Zw.prepareVisualTypes(d), function (n) {
                    var o = d[n];
                    i.convertOpacityToAlpha && "opacity" === n && (n = "colorAlpha", o = d.__alphaForOpacity), Zw.dependsOn(n, t) && o && o.applyVisual(e, s, l)
                }), r[t]
            }, positionGroup: function (e) {
                var t = this.visualMapModel, i = this.api;
                vd(e, t.getBoxLayoutParams(), {width: i.getWidth(), height: i.getHeight()})
            }, doRender: te
        });

        function sN(e, t, i) {
            var n = e.option, o = n.align;
            if (null != o && "auto" !== o) return o;
            for (var r = {
                width: t.getWidth(),
                height: t.getHeight()
            }, a = "horizontal" === n.orient ? 1 : 0, s = [["left", "right", "width"], ["top", "bottom", "height"]], l = s[a], d = [0, null, 10], u = {}, c = 0; c < 3; c++) u[s[1 - a][c]] = d[c], u[l[c]] = 2 === c ? i[0] : n[l[c]];
            var h = [["x", "width", 3], ["y", "height", 0]][a], f = md(u, r, n.padding);
            return l[(f.margin[h[2]] || 0) + f[h[0]] + .5 * f[h[1]] < .5 * r[h[1]] ? 0 : 1]
        }

        function lN(e, t) {
            return A(e || [], function (e) {
                null != e.dataIndex && (e.dataIndexInside = e.dataIndex, e.dataIndex = null), e.highlightKey = "visualMap" + (t ? t.componentIndex : "")
            }), e
        }

        var dN = xl, uN = A, cN = Math.min, hN = Math.max, fN = aN.extend({
            type: "visualMap.continuous", init: function () {
                fN.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, r = o.get("textGap"), a = o.itemSize, s = this._shapes.barGroup,
                        l = this._applyTransform([a[0] / 2, 0 === i ? -r : a[1] + r], s),
                        d = this._applyTransform(0 === i ? "bottom" : "top", s), u = this._orient,
                        c = this.visualMapModel.textStyleModel;
                    this.group.add(new Ua({
                        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, r = this._useHandle,
                    a = sN(t, this.api, n), s = i.barGroup = this._createBarGroup(a);
                s.add(i.outOfRange = pN()), s.add(i.inRange = pN(null, r ? mN(this._orient) : null, P(this._dragHandle, this, "all", !1), P(this._dragHandle, this, "all", !0)));
                var l = t.textStyleModel.getTextRect("国"), d = hN(l.width, l.height);
                r && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(s, 0, n, d, o, a), this._createHandle(s, 1, n, d, o, a)), this._createIndicator(s, n, d, o), e.add(s)
            }, _createHandle: function (e, t, i, n, o) {
                var r = P(this._dragHandle, this, t, !1), a = P(this._dragHandle, this, t, !0), s = pN(function (e, t) {
                    return 0 === e ? [[0, 0], [t, 0], [t, -t]] : [[0, 0], [t, 0], [t, t]]
                }(t, n), mN(this._orient), r, a);
                s.position[0] = i[0], e.add(s);
                var l = this.visualMapModel.textStyleModel, d = new Ua({
                    draggable: !0,
                    drift: r,
                    onmousemove: function (e) {
                        ze(e.event)
                    },
                    ondragend: a,
                    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 = pN([[0, 0]], "move");
                o.position[0] = t[0], o.attr({invisible: !0, silent: !0}), e.add(o);
                var r = this.visualMapModel.textStyleModel, a = new Ua({
                    silent: !0,
                    invisible: !0,
                    style: {x: 0, y: 0, text: "", textFont: r.getFont(), textFill: r.getTextColor()}
                });
                this.group.add(a);
                var s = ["horizontal" === n ? i / 2 : 9, 0], l = this._shapes;
                l.indicator = o, l.indicatorLabel = a, 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() : gN(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 = [dN(t[0], i, n, !0), dN(t[1], i, n, !0)]
            }, _updateInterval: function (e, t) {
                t = t || 0;
                var i = this.visualMapModel, n = this._handleEnds, o = [0, i.itemSize[1]];
                ET(t, n, o, e, 0);
                var r = i.getExtent();
                this._dataInterval = [dN(n[0], o, r, !0), dN(n[1], o, r, !0)]
            }, _updateView: function (e) {
                var t = this.visualMapModel, i = t.getExtent(), n = this._shapes, o = [0, t.itemSize[1]],
                    r = e ? o : this._handleEnds, a = this._createBarVisual(this._dataInterval, i, r, "inRange"),
                    s = this._createBarVisual(i, i, o, "outOfRange");
                n.inRange.setStyle({
                    fill: a.barColor,
                    opacity: a.opacity
                }).setShape("points", a.barPoints), n.outOfRange.setStyle({
                    fill: s.barColor,
                    opacity: s.opacity
                }).setShape("points", s.barPoints), this._updateHandle(r, a)
            }, _createBarVisual: function (e, t, i, n) {
                var o = {forceState: n, convertOpacityToAlpha: !0}, r = this._makeColorGradient(e, o),
                    a = [this.getControllerVisual(e[0], "symbolSize", o), this.getControllerVisual(e[1], "symbolSize", o)],
                    s = this._createBarPoints(i, a);
                return {
                    barColor: new ds(0, 0, 0, 1, r),
                    barPoints: s,
                    handlesColor: [r[0].color, r[r.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 r = e[0] + n * o;
                    if (r > e[1]) break;
                    i.push({color: this.getControllerVisual(r, "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 Di("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, r = i.handleLabels;
                    uN([0, 1], function (a) {
                        var s = o[a];
                        s.setStyle("fill", t.handlesColor[a]), s.position[1] = e[a];
                        var l = ll(i.handleLabelPoints[a], sl(s, this.group));
                        r[a].setStyle({
                            x: l[0],
                            y: l[1],
                            text: n.formatValueText(this._dataInterval[a]),
                            textVerticalAlign: "middle",
                            textAlign: this._applyTransform("horizontal" === this._orient ? 0 === a ? "bottom" : "top" : "left", i.barGroup)
                        })
                    }, this)
                }
            }, _showIndicator: function (e, t, i, n) {
                var o = this.visualMapModel, r = o.getExtent(), a = o.itemSize, s = [0, a[1]], l = dN(e, r, 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, -cN(t, hN(i, 0))], [6, 0], [0, cN(t, hN(n - i, 0))]] : [[0, 0], [5, -5], [5, 5]]
                    }(!!i, n, l, a[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] = cN(hN(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]], r = i.getExtent();
                    e = cN(hN(o[0], e), o[1]);
                    var a = function (e, t, i) {
                        var n = 6, o = e.get("hoverLinkDataSize");
                        return o && (n = dN(o, t, i, !0) / 2), n
                    }(i, r, o), s = [e - a, e + a], l = dN(e, o, r, !0), d = [dN(s[0], o, r, !0), dN(s[1], o, r, !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], "< ", a) : d[1] === 1 / 0 ? this._showIndicator(l, d[0], "> ", a) : this._showIndicator(l, l, "≈ ", a));
                    this._hoverLinkDataIndices;
                    var u = [];
                    (t || gN(i)) && (u = this._hoverLinkDataIndices = i.findTargetDataIndices(d));
                    var c = function (e, t) {
                        var i = {}, n = {};
                        return o([], i), o(t || [], n, i), [r(i), r(n)];

                        function o(e, t, i) {
                            for (var n = 0, o = e.length; n < o; n++) for (var r = e[n].seriesId, a = Oo(e[n].dataIndex), s = i && i[r], l = 0, d = a.length; l < d; l++) {
                                var u = a[l];
                                s && s[u] ? s[u] = null : (t[r] || (t[r] = {}))[u] = 1
                            }
                        }

                        function r(e, t) {
                            var i = [];
                            for (var n in e) if (e.hasOwnProperty(n) && null != e[n]) if (t) i.push(+n); else {
                                var o = r(e[n], !0);
                                o.length && i.push({seriesId: n, dataIndex: o})
                            }
                            return i
                        }
                    }(0, u);
                    this._dispatchHighDown("downplay", lN(c[0], i)), this._dispatchHighDown("highlight", lN(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), r = o.get(i.getDataDimension(o), t.dataIndex, !0);
                        isNaN(r) || this._showIndicator(r, r)
                    }
                }
            }, _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", lN(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 pN(e, t, i, n) {
            return new Xa({
                shape: {points: e}, draggable: !!i, cursor: t, drift: i, onmousemove: function (e) {
                    ze(e.event)
                }, ondragend: n
            })
        }

        function gN(e) {
            var t = e.get("hoverLinkOnHandle");
            return !!(null == t ? e.get("realtime") : t)
        }

        function mN(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(Wx);
        var vN = iN.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) {
                vN.superApply(this, "optionUpdated", arguments), this._pieceList = [], this.resetExtent();
                var i = this._mode = this._determineMode();
                yN[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 = D(this._pieceList, function (e) {
                        return e = m(e), "inRange" !== t && (e.visual = null), e
                    }))
                })
            },
            completeVisualOption: function () {
                var e = this.option, t = {}, i = Zw.listVisualTypes(), n = this.isCategory();

                function o(e, t, i) {
                    return e && e[t] && (R(e[t]) ? e[t].hasOwnProperty(i) : e[t] === i)
                }

                A(e.pieces, function (e) {
                    A(i, function (i) {
                        e.hasOwnProperty(i) && (t[i] = 1)
                    })
                }), A(t, function (t, i) {
                    var r = 0;
                    A(this.stateList, function (t) {
                        r |= o(e, t, i) || o(e.target, t, i)
                    }, this), r || A(this.stateList, function (t) {
                        (e[t] || (e[t] = {}))[i] = qx(i, "inRange" === t ? "active" : "inactive", n)
                    })
                }, this), iN.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, A(n, function (e, t) {
                    var i = this.getSelectedMapKey(e);
                    o.hasOwnProperty(i) || (o[i] = !0)
                }, this), "single" === i.selectedMode) {
                    var r = !1;
                    A(n, function (e, t) {
                        var i = this.getSelectedMapKey(e);
                        o[i] && (r ? o[i] = !1 : r = !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 = Zw.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) {
                        Zw.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 r = o[0].interval[0];
                        r !== -1 / 0 && o.unshift({interval: [-1 / 0, r]}), (r = o[o.length - 1].interval[1]) !== 1 / 0 && o.push({interval: [r, 1 / 0]})
                    } else o.push({interval: [-1 / 0, 1 / 0]});
                    var a = -1 / 0;
                    return A(o, function (e) {
                        var t = e.interval;
                        t && (t[0] > a && s([a, t[0]], "outOfRange"), s(t.slice()), a = t[1])
                    }, this), {stops: t, outerColors: i}
                }

                function s(o, r) {
                    var a = n.getRepresentValue({interval: o});
                    r = r || n.getValueState(a);
                    var s = e(a, r);
                    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})
                }
            }
        }), yN = {
            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 r = (n[1] - n[0]) / o; +r.toFixed(i) !== r && i < 5;) i++;
                e.precision = i, r = +r.toFixed(i), e.minOpen && t.push({interval: [-1 / 0, n[0]], close: [0, 0]});
                for (var a = 0, s = n[0]; a < o; s += r, a++) {
                    var l = a === o - 1 ? n[1] : s + r;
                    t.push({interval: [s, l], close: [1, 1]})
                }
                e.maxOpen && t.push({interval: [n[1], 1 / 0], close: [0, 0]}), Hl(t), A(t, function (e, t) {
                    e.index = t, e.text = this.formatValueText(e.interval)
                }, this)
            }, categories: function () {
                var e = this.option;
                A(e.categories, function (e) {
                    this._pieceList.push({text: this.formatValueText(e, !0), value: e})
                }, this), wN(e, this._pieceList)
            }, pieces: function () {
                var e = this.option, t = this._pieceList;
                A(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 r = n.interval = [], a = 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 == r[u]; h++) r[u] = e[c[h]], a[u] = s[h], d[u] = 2 === h;
                            null == r[u] && (r[u] = l[u])
                        }
                        d[0] && r[1] === 1 / 0 && (a[0] = 0), d[1] && r[0] === -1 / 0 && (a[1] = 0), r[0] === r[1] && a[0] && a[1] && (n.value = r[0])
                    }
                    n.visual = Zw.retrieveVisuals(e), t.push(n)
                }, this), wN(e, t), Hl(t), A(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 wN(e, t) {
            var i = e.inverse;
            ("vertical" === e.orient ? !i : i) && t.reverse()
        }

        aN.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(),
                    r = n.getTextColor(), a = this._getItemAlign(), s = t.itemSize, l = this._getViewData(),
                    d = l.endsText, u = W(t.get("showLabel", !0), !d);
                d && this._renderEndsText(e, d[0], s, u, a), A(l.viewPieceList, function (n) {
                    var l = n.piece, d = new Di;
                    d.onclick = P(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 Ua({
                            style: {
                                x: "right" === a ? -i : s[0] + i,
                                y: s[1] / 2,
                                text: l.text,
                                textVerticalAlign: "middle",
                                textAlign: a,
                                textFont: o,
                                textFill: r,
                                opacity: "outOfRange" === h ? .5 : 1
                            }
                        }))
                    }
                    e.add(d)
                }, this), d && this._renderEndsText(e, d[1], s, u, a), 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: lN(i.findTargetDataIndices(t), i)})
                }

                e.on("mouseover", P(i, this, "highlight")).on("mouseout", P(i, this, "downplay"))
            }, _getItemAlign: function () {
                var e = this.visualMapModel, t = e.option;
                if ("vertical" === t.orient) return sN(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 r = new Di, a = this.visualMapModel.textStyleModel;
                    r.add(new Ua({
                        style: {
                            x: n ? "right" === o ? i[0] : 0 : i[0] / 2,
                            y: i[1] / 2,
                            textVerticalAlign: "middle",
                            textAlign: n ? o : "center",
                            text: t,
                            textFont: a.getFont(),
                            textFill: a.getTextColor()
                        }
                    })), e.add(r)
                }
            }, _getViewData: function () {
                var e = this.visualMapModel, t = D(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, A(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(Wx);
        var kN, TN = "urn:schemas-microsoft-com:vml", bN = "undefined" == typeof window ? null : window, CN = !1,
            SN = bN && bN.document;

        function IN(e) {
            return kN(e)
        }

        if (SN && !o.canvasSupported) try {
            SN.namespaces.zrvml || SN.namespaces.add("zrvml", TN), kN = function (e) {
                return SN.createElement("<zrvml:" + e + ' class="zrvml">')
            }
        } catch (e) {
            kN = function (e) {
                return SN.createElement("<" + e + ' xmlns="' + TN + '" class="zrvml">')
            }
        }
        var _N, AN = ea.CMD, DN = Math.round, xN = Math.sqrt, NN = Math.abs, EN = Math.cos, PN = Math.sin,
            ON = Math.max;
        if (!o.canvasSupported) {
            var MN = ",", FN = "progid:DXImageTransform.Microsoft", LN = 21600, RN = LN / 2, BN = function (e) {
                e.style.cssText = "position:absolute;left:0;top:0;width:1px;height:1px;", e.coordsize = LN + "," + LN, e.coordorigin = "0,0"
            }, UN = function (e, t, i) {
                return "rgb(" + [e, t, i].join(",") + ")"
            }, VN = function (e, t) {
                t && e && t.parentNode !== e && e.appendChild(t)
            }, KN = function (e, t) {
                t && e && t.parentNode === e && e.removeChild(t)
            }, WN = function (e, t, i) {
                return 1e5 * (parseFloat(e) || 0) + 1e3 * (parseFloat(t) || 0) + i
            }, jN = jn, GN = function (e, t, i) {
                var n = Kt(t);
                i = +i, isNaN(i) && (i = 1), n && (e.color = UN(n[0], n[1], n[2]), e.opacity = i * n[3])
            }, HN = function (e, t, i, n) {
                var o = "fill" === t, r = e.getElementsByTagName(t)[0];
                null != i[t] && "none" !== i[t] && (o || !o && i.lineWidth) ? (e[o ? "filled" : "stroked"] = "true", i[t] instanceof rs && KN(e, r), r = r || IN(t), o ? function (e, t, i) {
                    var n, o, r = t.fill;
                    if (null != r) if (r instanceof rs) {
                        var a, s = 0, l = [0, 0], d = 0, u = 1, c = i.getBoundingRect(), h = c.width, f = c.height;
                        if ("linear" === r.type) {
                            a = "gradient";
                            var p = i.transform, g = [r.x * h, r.y * f], m = [r.x2 * h, r.y2 * f];
                            p && (be(g, g, p), be(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 {
                            a = "gradientradial", g = [r.x * h, r.y * f], p = i.transform;
                            var w = i.scale, k = h, T = f;
                            l = [(g[0] - c.x) / k, (g[1] - c.y) / T], p && be(g, g, p), k /= w[0] * LN, T /= w[1] * LN;
                            var b = ON(k, T);
                            d = 0 / b, u = 2 * r.r / b - d
                        }
                        var C = r.colorStops.slice();
                        C.sort(function (e, t) {
                            return e.offset - t.offset
                        });
                        for (var S = C.length, I = [], _ = [], A = 0; A < S; A++) {
                            var D = C[A], x = (n = D.color, o = Kt(n), [UN(o[0], o[1], o[2]), o[3]]);
                            _.push(D.offset * u + d + " " + x[0]), 0 !== A && A !== S - 1 || I.push(x)
                        }
                        if (2 <= S) {
                            var N = I[0][0], E = I[1][0], P = I[0][1] * t.opacity, O = I[1][1] * t.opacity;
                            e.type = a, e.method = "none", e.focus = "100%", e.angle = s, e.color = N, e.color2 = E, e.colors = _.join(","), e.opacity = O, e.opacity2 = P
                        }
                        "radial" === a && (e.focusposition = l.join(","))
                    } else GN(e, r, t.opacity)
                }(r, i, n) : function (e, t) {
                    t.lineDash && (e.dashstyle = t.lineDash.join(" ")), null == t.stroke || t.stroke instanceof rs || GN(e, t.stroke, t.opacity)
                }(r, i), VN(e, r)) : (e[o ? "filled" : "stroked"] = "false", KN(e, r))
            }, zN = [[], [], []];
            Ta.prototype.brushVML = function (e) {
                var t = this.style, i = this._vmlEl;
                i || (i = IN("shape"), BN(i), this._vmlEl = i), HN(i, "fill", t, this), HN(i, "stroke", t, this);
                var n = this.transform, o = null != n, r = i.getElementsByTagName("stroke")[0];
                if (r) {
                    var a = t.lineWidth;
                    if (o && !t.strokeNoScale) {
                        var s = n[0] * n[3] - n[1] * n[2];
                        a *= xN(NN(s))
                    }
                    r.weight = a + "px"
                }
                var l = this.path || (this.path = new ea);
                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, r, a, s, l = AN.M, d = AN.C, u = AN.L, c = AN.A, h = AN.Q, f = [], p = e.data,
                        g = e.len();
                    for (r = 0; r < g;) {
                        switch (n = "", i = 0, o = p[r++]) {
                            case l:
                                n = " m ", i = 1, a = p[r++], s = p[r++], zN[0][0] = a, zN[0][1] = s;
                                break;
                            case u:
                                n = " l ", i = 1, a = p[r++], s = p[r++], zN[0][0] = a, zN[0][1] = s;
                                break;
                            case h:
                            case d:
                                n = " c ", i = 3;
                                var m, v, y = p[r++], w = p[r++], k = p[r++], T = p[r++];
                                o === h ? (k = ((m = k) + 2 * y) / 3, T = ((v = T) + 2 * w) / 3, y = (a + 2 * y) / 3, w = (s + 2 * w) / 3) : (m = p[r++], v = p[r++]), zN[0][0] = y, zN[0][1] = w, zN[1][0] = k, zN[1][1] = T, a = zN[2][0] = m, s = zN[2][1] = v;
                                break;
                            case c:
                                var b = 0, C = 0, S = 1, I = 1, _ = 0;
                                t && (b = t[4], C = t[5], S = xN(t[0] * t[0] + t[1] * t[1]), I = xN(t[2] * t[2] + t[3] * t[3]), _ = Math.atan2(-t[1] / I, t[0] / S));
                                var A = p[r++], D = p[r++], x = p[r++], N = p[r++], E = p[r++] + _, P = p[r++] + E + _;
                                r++;
                                var O = p[r++], M = A + EN(E) * x, F = D + PN(E) * N,
                                    L = (y = A + EN(P) * x, w = D + PN(P) * N, O ? " wa " : " at ");
                                Math.abs(M - y) < 1e-4 && (.01 < Math.abs(P - E) ? O && (M += .0125) : Math.abs(F - D) < 1e-4 ? O && M < A || !O && A < M ? w -= .0125 : w += .0125 : O && F < D || !O && D < F ? y += .0125 : y -= .0125), f.push(L, DN(((A - x) * S + b) * LN - RN), MN, DN(((D - N) * I + C) * LN - RN), MN, DN(((A + x) * S + b) * LN - RN), MN, DN(((D + N) * I + C) * LN - RN), MN, DN((M * S + b) * LN - RN), MN, DN((F * I + C) * LN - RN), MN, DN((y * S + b) * LN - RN), MN, DN((w * I + C) * LN - RN)), a = y, s = w;
                                break;
                            case AN.R:
                                var R = zN[0], B = zN[1];
                                R[0] = p[r++], R[1] = p[r++], B[0] = R[0] + p[r++], B[1] = R[1] + p[r++], t && (be(R, R, t), be(B, B, t)), R[0] = DN(R[0] * LN - RN), B[0] = DN(B[0] * LN - RN), R[1] = DN(R[1] * LN - RN), B[1] = DN(B[1] * LN - RN), f.push(" m ", R[0], MN, R[1], " l ", B[0], MN, R[1], " l ", B[0], MN, B[1], " l ", R[0], MN, B[1]);
                                break;
                            case AN.Z:
                                f.push(" x ")
                        }
                        if (0 < i) {
                            f.push(n);
                            for (var U = 0; U < i; U++) {
                                var V = zN[U];
                                t && be(V, V, t), f.push(DN(V[0] * LN - RN), MN, DN(V[1] * LN - RN), U < i - 1 ? MN : "")
                            }
                        }
                    }
                    return f.join("")
                }(l, this.transform), i.style.zIndex = WN(this.zlevel, this.z, this.z2), VN(e, i), null != t.text ? this.drawRectText(e, this.getBoundingRect()) : this.removeRectText(e)
            }, Ta.prototype.onRemove = function (e) {
                KN(e, this._vmlEl), this.removeRectText(e)
            }, Ta.prototype.onAdd = function (e) {
                VN(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 r = o.src;
                    if (r === this._imageSrc) t = this._imageWidth, i = this._imageHeight; else {
                        var a = o.runtimeStyle, s = a.width, l = a.height;
                        a.width = "auto", a.height = "auto", t = o.width, i = o.height, a.width = s, a.height = l, this._imageSrc = r, this._imageWidth = t, this._imageHeight = i
                    }
                    o = r
                } 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 = SN.createElement("div"), BN(y), this._vmlEl = y);
                    var w, k = y.style, T = !1, b = 1, C = 1;
                    if (this.transform && (w = this.transform, b = xN(w[0] * w[0] + w[1] * w[1]), C = xN(w[2] * w[2] + w[3] * w[3]), T = w[1] || w[2]), T) {
                        var S = [d, u], I = [d + c, u], _ = [d, u + h], A = [d + c, u + h];
                        be(S, S, w), be(I, I, w), be(_, _, w), be(A, A, w);
                        var D = ON(S[0], I[0], _[0], A[0]), x = ON(S[1], I[1], _[1], A[1]), N = [];
                        N.push("M11=", w[0] / b, MN, "M12=", w[2] / C, MN, "M21=", w[1] / b, MN, "M22=", w[3] / C, MN, "Dx=", DN(d * b + w[4]), MN, "Dy=", DN(u * C + w[5])), k.padding = "0 " + DN(D) + "px " + DN(x) + "px 0", k.filter = FN + ".Matrix(" + N.join("") + ", SizingMethod=clip)"
                    } else w && (d = d * b + w[4], u = u * C + w[5]), k.filter = "", k.left = DN(d) + "px", k.top = DN(u) + "px";
                    var E = this._imageEl, P = this._cropEl;
                    E || (E = SN.createElement("div"), this._imageEl = E);
                    var O = E.style;
                    if (v) {
                        if (t && i) O.width = DN(b * t * c / f) + "px", O.height = DN(C * i * h / p) + "px"; else {
                            var M = new Image, F = this;
                            M.onload = function () {
                                M.onload = null, t = M.width, i = M.height, O.width = DN(b * t * c / f) + "px", O.height = DN(C * i * h / p) + "px", F._imageWidth = t, F._imageHeight = i, F._imageSrc = o
                            }, M.src = o
                        }
                        P || ((P = SN.createElement("div")).style.overflow = "hidden", this._cropEl = P);
                        var L = P.style;
                        L.width = DN((c + g * c / f) * b), L.height = DN((h + m * h / p) * C), L.filter = FN + ".Matrix(Dx=" + -g * c / f * b + ",Dy=" + -m * h / p * C + ")", P.parentNode || y.appendChild(P), E.parentNode !== P && P.appendChild(E)
                    } else O.width = DN(b * c) + "px", O.height = DN(C * h) + "px", y.appendChild(E), P && P.parentNode && (y.removeChild(P), this._cropEl = null);
                    var R = "", B = n.opacity;
                    B < 1 && (R += ".Alpha(opacity=" + DN(100 * B) + ") "), R += FN + ".AlphaImageLoader(src=" + o + ", SizingMethod=scale)", O.filter = R, y.style.zIndex = WN(this.zlevel, this.z, this.z2), VN(e, y), null != n.text && this.drawRectText(e, this.getBoundingRect())
                }
            }, Yn.prototype.onRemove = function (e) {
                KN(e, this._vmlEl), this._vmlEl = null, this._cropEl = null, this._imageEl = null, this.removeRectText(e)
            }, Yn.prototype.onAdd = function (e) {
                VN(e, this._vmlEl), this.appendRectText(e)
            };
            var XN, qN = "normal", YN = {}, JN = 0, ZN = document.createElement("div");
            _N = function (e, t) {
                var i = SN;
                XN || ((XN = i.createElement("div")).style.cssText = "position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;", SN.body.appendChild(XN));
                try {
                    XN.style.font = t
                } catch (e) {
                }
                return XN.innerHTML = "", XN.appendChild(i.createTextNode(e)), {width: XN.offsetWidth}
            }, dn.measureText = _N;
            for (var QN = new Ai, $N = function (e, t, i, n) {
                var o = this.style;
                this.__dirty && En(o);
                var r = o.text;
                if (null != r && (r += ""), r) {
                    if (o.rich) {
                        var a = Tn(r, o);
                        r = [];
                        for (var s = 0; s < a.lines.length; s++) {
                            for (var l = a.lines[s].tokens, d = [], u = 0; u < l.length; u++) d.push(l[u].text);
                            r.push(d.join(""))
                        }
                        r = r.join("\n")
                    }
                    var c, h, f = o.textAlign, p = o.textVerticalAlign, g = function (e) {
                        var t = YN[e];
                        if (!t) {
                            100 < JN && (JN = 0, YN = {});
                            var i, n = ZN.style;
                            try {
                                n.font = e, i = n.fontFamily.split(",")[0]
                            } catch (e) {
                            }
                            t = {
                                style: n.fontStyle || qN,
                                variant: n.fontVariant || qN,
                                weight: n.fontWeight || qN,
                                size: 0 | parseFloat(n.fontSize || 12),
                                family: i || "Microsoft YaHei"
                            }, YN[e] = t, JN++
                        }
                        return t
                    }(o.font), m = g.style + " " + g.variant + " " + g.weight + " " + g.size + 'px "' + g.family + '"';
                    i = i || cn(r, m, f, p, o.textPadding, o.textLineHeight);
                    var v = this.transform;
                    if (v && !n && (QN.copy(t), QN.applyTransform(v), t = QN), n) c = t.x, h = t.y; else {
                        var y = o.textPosition;
                        if (y instanceof Array) c = t.x + jN(y[0], t.width), h = t.y + jN(y[1], t.height), f = f || "left"; else {
                            var w = this.calculateTextPosition ? this.calculateTextPosition({}, o, t) : pn({}, o, t);
                            c = w.x, h = w.y, f = f || w.textAlign, p = p || w.textVerticalAlign
                        }
                    }
                    c = hn(c, i.width, f), h = fn(h, i.height, p), h += i.height / 2;
                    var k, T, b, C = IN, S = this._textVmlEl;
                    S ? T = (k = (b = S.firstChild).nextSibling).nextSibling : (S = C("line"), k = C("path"), T = C("textpath"), b = C("skew"), T.style["v-text-align"] = "left", BN(S), k.textpathok = !0, T.on = !0, S.from = "0 0", S.to = "1000 0.05", VN(S, b), VN(S, k), VN(S, T), this._textVmlEl = S);
                    var I = [c, h], _ = S.style;
                    v && n ? (be(I, I, v), b.on = !0, b.matrix = v[0].toFixed(3) + MN + v[2].toFixed(3) + MN + v[1].toFixed(3) + MN + v[3].toFixed(3) + ",0,0", b.offset = (DN(I[0]) || 0) + "," + (DN(I[1]) || 0), b.origin = "0 0", _.left = "0px", _.top = "0px") : (b.on = !1, _.left = DN(c) + "px", _.top = DN(h) + "px"), T.string = function (e) {
                        return String(e).replace(/&/g, "&amp;").replace(/"/g, "&quot;")
                    }(r);
                    try {
                        T.style.font = m
                    } catch (e) {
                    }
                    HN(S, "fill", {fill: o.textFill, opacity: o.opacity}, this), HN(S, "stroke", {
                        stroke: o.textStroke,
                        opacity: o.opacity,
                        lineDash: o.lineDash || null
                    }, this), S.style.zIndex = WN(this.zlevel, this.z, this.z2), VN(e, S)
                }
            }, eE = function (e) {
                KN(e, this._textVmlEl), this._textVmlEl = null
            }, tE = function (e) {
                VN(e, this._textVmlEl)
            }, iE = [zn, qn, Yn, Ta, Ua], nE = 0; nE < iE.length; nE++) {
                var oE = iE[nE].prototype;
                oE.drawRectText = $N, oE.removeRectText = eE, oE.appendRectText = tE
            }
            Ua.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)
            }, Ua.prototype.onRemove = function (e) {
                this.removeRectText(e)
            }, Ua.prototype.onAdd = function (e) {
                this.appendRectText(e)
            }
        }

        function rE(e) {
            return parseInt(e, 10)
        }

        function aE(e, t) {
            !function () {
                if (!CN && SN) {
                    CN = !0;
                    var e = SN.styleSheets;
                    e.length < 31 ? SN.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, r = 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), r.call(t, e)
            }, this._firstPaint = !0
        }

        function sE(e) {
            return document.createElementNS("http://www.w3.org/2000/svg", e)
        }

        aE.prototype = {
            constructor: aE, 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 || rE(t.width)) - rE(t.paddingLeft) - rE(t.paddingRight) | 0
            }, _getHeight: function () {
                var e = this.root, t = e.currentStyle;
                return (e.clientHeight || rE(t.height)) - rE(t.paddingTop) - rE(t.paddingBottom) | 0
            }
        }, A(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function (e) {
            aE.prototype[e] = function (e) {
                return function () {
                    mi('In IE8.0 VML mode painter not support method "' + e + '"')
                }
            }(e)
        }), _o("vml", aE);
        var lE = ea.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 wE(e) {
            return e < vE && -vE < e
        }

        function kE(e, t) {
            t && TE(e, "transform", "matrix(" + dE.call(t, ",") + ")")
        }

        function TE(e, t, i) {
            i && ("linear" === i.type || "radial" === i.type) || e.setAttribute(t, i)
        }

        function bE(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;
                TE(e, "fill", o = "transparent" === o ? uE : o), TE(e, "fill-opacity", null != t.fillOpacity ? t.fillOpacity * t.opacity : t.opacity)
            } else TE(e, "fill", uE);
            if (function (e, t) {
                var i = t ? e.textStroke : e.stroke;
                return null != i && i !== uE
            }(t, i)) {
                var r = i ? t.textStroke : t.stroke;
                TE(e, "stroke", r = "transparent" === r ? uE : r), TE(e, "stroke-width", (i ? t.textStrokeWidth : t.lineWidth) / (!i && t.strokeNoScale ? n.getLineScale() : 1)), TE(e, "paint-order", i ? "stroke" : "fill"), TE(e, "stroke-opacity", null != t.strokeOpacity ? t.strokeOpacity : t.opacity), t.lineDash ? (TE(e, "stroke-dasharray", t.lineDash.join(",")), TE(e, "stroke-dashoffset", cE(t.lineDashOffset || 0))) : TE(e, "stroke-dasharray", ""), t.lineCap && TE(e, "stroke-linecap", t.lineCap), t.lineJoin && TE(e, "stroke-linejoin", t.lineJoin), t.miterLimit && TE(e, "stroke-miterlimit", t.miterLimit)
            } else TE(e, "stroke", uE)
        }

        var CE = {
                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 r = "", a = 0;
                                switch (i[o++]) {
                                    case lE.M:
                                        r = "M", a = 2;
                                        break;
                                    case lE.L:
                                        r = "L", a = 2;
                                        break;
                                    case lE.Q:
                                        r = "Q", a = 4;
                                        break;
                                    case lE.C:
                                        r = "C", a = 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 = wE(g - gE) || (p ? gE <= h : gE <= -h), v = 0 < h ? h % gE : h % gE + gE,
                                            y = !1;
                                        y = !!m || !wE(g) && pE <= v == !!p;
                                        var w = yE(s + d * fE(c)), k = yE(l + u * hE(c));
                                        m && (h = p ? gE - 1e-4 : 1e-4 - gE, y = !0, 9 === o && t.push("M", w, k));
                                        var T = yE(s + d * fE(c + h)), b = yE(l + u * hE(c + h));
                                        t.push("A", yE(d), yE(u), cE(f * mE), +y, +p, T, b);
                                        break;
                                    case lE.Z:
                                        r = "Z";
                                        break;
                                    case lE.R:
                                        T = yE(i[o++]), b = yE(i[o++]);
                                        var C = yE(i[o++]), S = yE(i[o++]);
                                        t.push("M", T, b, "L", T + C, b, "L", T + C, b + S, "L", T, b + S, "L", T, b)
                                }
                                r && t.push(r);
                                for (var I = 0; I < a; I++) t.push(yE(i[o++]))
                            }
                            return t.join(" ")
                        }(n);
                        o.indexOf("NaN") < 0 && TE(i, "d", o)
                    }
                    bE(i, t, !1, e), kE(i, e.transform), null != t.text ? NE(e, e.getBoundingRect()) : PE(e)
                }
            }, SE = {
                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, r = t.width, a = 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), TE(s, "width", r), TE(s, "height", a), TE(s, "x", n), TE(s, "y", o), kE(s, e.transform), null != t.text ? NE(e, e.getBoundingRect()) : PE(e)
                    }
                }
            }, IE = {}, _E = new Ai, AE = {}, DE = [],
            xE = {left: "start", right: "end", center: "middle", middle: "middle"}, NE = function (e, t) {
                var i = e.style, n = e.transform, o = e instanceof Ua || i.transformText;
                e.__dirty && En(i);
                var r = i.text;
                if (null != r && (r += ""), Hn(r, i)) {
                    null == r && (r = ""), !o && n && (_E.copy(t), _E.applyTransform(n), t = _E);
                    var a = e.__textSvgEl;
                    a || (a = sE("text"), e.__textSvgEl = a);
                    var s = a.style, l = i.font || ln, d = a.__computedFont;
                    l !== a.__styleFont && (s.font = a.__styleFont = l, d = a.__computedFont = s.font);
                    var u = i.textPadding, c = i.textLineHeight, h = e.__textCotentBlock;
                    h && !e.__dirtyText || (h = e.__textCotentBlock = kn(r, d, u, c, i.truncate));
                    var f = h.outerHeight, p = h.lineHeight;
                    Un(AE, e, i, t);
                    var g = AE.baseX, m = AE.baseY, v = AE.textAlign || "left", y = AE.textVerticalAlign;
                    !function (e, t, i, n, o, r, a) {
                        at(DE), t && i && st(DE, i);
                        var s = n.textRotation;
                        if (o && s) {
                            var l = n.textOrigin;
                            "center" === l ? (r = o.width / 2 + o.x, a = o.height / 2 + o.y) : l && (r = l[0] + o.x, a = l[1] + o.y), DE[4] -= r, DE[5] -= a, ut(DE, DE, s), DE[4] += r, DE[5] += a
                        }
                        kE(e, DE)
                    }(a, o, n, i, t, g, m);
                    var w = g, k = fn(m, f, y);
                    u && (w = 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), k += u[0]), k += p / 2, bE(a, i, !0, e);
                    var T = h.canCacheByTextString, b = e.__tspanList || (e.__tspanList = []), C = b.length;
                    if (T && e.__canCacheByTextString && e.__text === r) {
                        if (e.__dirtyText && C) for (var S = 0; S < C; ++S) EE(b[S], v, w, k + S * p)
                    } else {
                        e.__text = r, e.__canCacheByTextString = T;
                        var I = h.lines, _ = I.length;
                        for (S = 0; S < _; S++) {
                            var A = b[S], D = I[S];
                            A ? A.__zrText !== D && (A.innerHTML = "", A.appendChild(document.createTextNode(D))) : (A = b[S] = sE("tspan"), a.appendChild(A), A.appendChild(document.createTextNode(D))), EE(A, v, w, k + S * p)
                        }
                        if (_ < C) {
                            for (; S < C; S++) a.removeChild(b[S]);
                            b.length = _
                        }
                    }
                }
            };

        function EE(e, t, i, n) {
            TE(e, "dominant-baseline", "middle"), TE(e, "text-anchor", xE[t]), TE(e, "x", i), TE(e, "y", n)
        }

        function PE(e) {
            e && e.__textSvgEl && (e.__textSvgEl.parentNode && e.__textSvgEl.parentNode.removeChild(e.__textSvgEl), e.__textSvgEl = null, e.__tspanList = [], e.__text = null)
        }

        function OE() {
        }

        function ME(e, t) {
            for (var i = 0, n = t.length, o = 0, r = 0; i < n; i++) {
                var a = t[i];
                if (a.removed) {
                    for (s = [], l = r; l < r + a.count; l++) s.push(l);
                    a.indices = s, r += a.count
                } else {
                    for (var s = [], l = o; l < o + a.count; l++) s.push(l);
                    a.indices = s, o += a.count, a.added || (r += a.count)
                }
            }
            return t
        }

        IE.drawRectText = NE, IE.brush = function (e) {
            null != e.style.text ? NE(e, !1) : PE(e)
        }, OE.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, r = e.length, a = 1, s = o + r, l = [{newPos: -1, components: []}],
                    d = this.extractCommon(l[0], t, e, 0);
                if (l[0].newPos + 1 >= o && r <= 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 * a; i <= a; 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 < r;
                        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 && r <= c + 1) return ME(0, s.components);
                            l[i] = s
                        } else l[i] = void 0
                    }
                    var p;
                    a++
                }

                for (; a <= 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, r = i.length, a = e.newPos, s = a - n, l = 0; a + 1 < o && s + 1 < r && this.equals(t[a + 1], i[s + 1]);) a++, s++, l++;
                return l && e.components.push({count: l}), e.newPos = a, s
            }, tokenize: function (e) {
                return e.slice()
            }, join: function (e) {
                return e.slice()
            }
        };
        var FE = new OE;

        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 WE(e, t) {
            return t && e && t.parentNode !== e
        }

        function jE(e, t, i) {
            if (WE(e, t) && i) {
                var n = i.nextSibling;
                n ? e.insertBefore(t, n) : e.appendChild(t)
            }
        }

        function GE(e, t) {
            if (WE(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 = w({}, 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 r = sE("g");
            o.appendChild(r);
            var a = sE("g");
            o.appendChild(a), this.gradientManager = new RE(n, a), this.clipPathManager = new BE(n, a), this.shadowManager = new UE(n, a);
            var s = document.createElement("div");
            s.style.cssText = "overflow:hidden;position:relative", this._svgDom = o, this._svgRoot = a, this._backgroundRoot = r, 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 A(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;
            A(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;
                A(t, function (t) {
                    "1" !== t[i._markLabel] && e.removeChild(t)
                })
            }
        }, LE.prototype.getSvgProxy = function (e) {
            return e instanceof Ta ? CE : e instanceof Yn ? SE : e instanceof Ua ? IE : CE
        }, LE.prototype.getTextSvgElement = function (e) {
            return e.__textSvgEl
        }, LE.prototype.getSvgElement = function (e) {
            return e.__svgEl
        }, S(RE, LE), RE.prototype.addWithoutUpdate = function (e, t) {
            if (t && t.style) {
                var i = this;
                A(["fill", "stroke"], function (n) {
                    if (t.style[n] && ("linear" === t.style[n].type || "radial" === t.style[n].type)) {
                        var o, r = t.style[n], a = i.getDefs(!0);
                        r._dom ? (o = r._dom, a.contains(r._dom) || i.addDom(o)) : o = i.add(r), 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 r = this.createElement("stop");
                r.setAttribute("offset", 100 * i[n].offset + "%");
                var a = i[n].color;
                if (a.indexOf(!1)) {
                    var s = Kt(a)[3], l = Gt(a);
                    r.setAttribute("stop-color", "#" + l), r.setAttribute("stop-opacity", s)
                } else r.setAttribute("stop-color", i[n].color);
                t.appendChild(r)
            }
            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)
            }
        }, S(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, r = this.getDefs(!0), a = t[0], s = i ? "_textDom" : "_dom";
                a[s] ? (o = a[s].getAttribute("id"), n = a[s], r.contains(n) || r.appendChild(n)) : (o = "zr" + this._zrId + "-clip-" + this.nextId, ++this.nextId, (n = this.createElement("clipPath")).setAttribute("id", o), r.appendChild(n), a[s] = n);
                var l = this.getSvgProxy(a);
                if (a.transform && a.parent.invTransform && !i) {
                    var d = Array.prototype.slice.call(a.transform);
                    lt(a.transform, a.parent.invTransform, a.transform), l.brush(a), a.transform = d
                } else l.brush(a);
                var u = this.getSvgElement(a);
                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 && A(e.__clipPaths, function (e) {
                e._dom && LE.prototype.markUsed.call(t, e._dom), e._textDom && LE.prototype.markUsed.call(t, e._textDom)
            })
        }, S(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, r, a, 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, r = s.shadowBlur, a = s.shadowColor; else {
                if (!s.textShadowBlur) return void this.removeDom(t, s);
                n = s.textShadowOffsetX || 0, o = s.textShadowOffsetY || 0, r = s.textShadowBlur, a = s.textShadowColor
            }
            i.setAttribute("dx", n / l), i.setAttribute("dy", o / d), i.setAttribute("flood-color", a);
            var u = r / 2 / l + " " + r / 2 / d;
            i.setAttribute("stdDeviation", u), t.setAttribute("x", "-100%"), t.setAttribute("y", "-100%"), t.setAttribute("width", Math.ceil(r / 2 * 200) + "%"), t.setAttribute("height", Math.ceil(r / 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, r = e.length, a = [];
                for (t = 0; t < r; t++) {
                    var s = e[t], l = (i = s) instanceof Ta ? CE : i instanceof Yn ? SE : i instanceof Ua ? IE : CE,
                        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), a.push(s))
                }
                var u, c = function (e, t, i) {
                    return FE.diff(e, t, void 0)
                }(o, a);
                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 = a[p.indices[h]]), f = zE(s), u ? jE(n, d, u) : GE(n, d), d ? jE(n, f, d) : u ? jE(n, f, u) : GE(n, f), jE(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 = a[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 && jE(n, f, d), u = d || f || u
                }
                this.gradientManager.removeUnused(), this.clipPathManager.removeUnused(), this.shadowManager.removeUnused(), this._visibleList = a
            }, _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 r = this._svgDom;
                    r.setAttribute("width", e), r.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], r = ["paddingRight", "paddingBottom"][e];
                if (null != t[i] && "auto" !== t[i]) return parseFloat(t[i]);
                var a = this.root, s = document.defaultView.getComputedStyle(a);
                return (a[n] || KE(s[i]) || KE(a.style[i])) - (KE(s[o]) || 0) - (KE(s[r]) || 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<"))
            }
        }, A(["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 = Ch, e.init = function (e, t, i) {
            var n = df(e);
            if (n) return n;
            var o = new xh(e, t, i);
            return o.id = "ec_" + of++, tf[o.id] = o, zo(e, af, o.id), function (e) {
                var t = "__connectUpdateStatus";

                function i(e, i) {
                    for (var n = 0; n < e.length; n++) e[n][t] = i
                }

                wh(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), r = [];
                            wh(tf, function (t) {
                                t !== e && t.group === e.group && r.push(t)
                            }), i(r, 0), wh(r, function (e) {
                                1 !== e[t] && e.dispatchAction(o)
                            }), i(r, 2)
                        }
                    })
                })
            }(o), o
        }, e.connect = function (e) {
            if (M(e)) {
                var t = e;
                e = null, wh(t, function (t) {
                    null != t.group && (e = t.group)
                }), e = e || "g_" + rf++, wh(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 xh || (e = df(e)), e instanceof xh && !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 = wf, e.extendComponentView = kf, e.extendSeriesModel = Tf, e.extendChartView = bf, 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 = Do, e.number = Xl, e.format = ud, e.throttle = Cc, e.helper = fg, e.matrix = pt, e.vector = Ie, e.color = Qt, e.parseGeoJSON = wg, e.parseGeoJson = Ng, e.util = Eg, e.graphic = Pg, e.List = Vf, e.Model = Cl, e.Axis = Dg, e.env = o
    }(t)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(256);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\tabs\\task-chart-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(475), o = i(258);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(838);
    var a = i(1), s = Object(a.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(1014);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(456), o = i(260);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(457), o = i(262);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(264);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\FileList-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(470), o = i(266);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(843);
    var a = i(1), s = Object(a.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(1016);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(268);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\multi-chosen-tasks-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(471), o = i(270);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(476), o = i(272);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(274);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\comment-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(472), o = i(276);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(278);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\commentAvatar-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(482), o = i(280);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(562), o = i(565), r = i(854);

    function a(e, t) {
        return new r(t).process(e)
    }

    for (var s in(t = e.exports = a).filterXSS = a, t.FilterXSS = r, 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(563), o = i(853);
    i(564);

    function r(e) {
        return void 0 === e || null === e
    }

    function a(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
    }

    a.prototype.process = function (e) {
        if (!(e = (e = e || "").toString())) return "";
        var t = this.options, i = t.whiteList, n = t.onAttr, a = 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 ? r(h = n(o, l, f)) ? o + ":" + l : h : r(h = a(o, l, f)) ? void 0 : h
            }
        })
    }, e.exports = a
}, function (e, t, i) {
    var n = i(564);
    e.exports = function (e, t) {
        ";" !== (e = n.trimRight(e))[e.length - 1] && (e += ";");
        var i = e.length, o = !1, r = 0, a = 0, s = "";

        function l() {
            if (!o) {
                var i = n.trim(e.slice(r, a)), 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(r, s.length, d, u, i);
                        c && (s += c + "; ")
                    }
                }
            }
            r = a + 1
        }

        for (; a < i; a++) {
            var d = e[a];
            if ("/" === d && "*" === e[a + 1]) {
                var u = e.indexOf("*/", a + 2);
                if (-1 === u) break;
                r = (a = 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(410).FilterCSS, o = i(562), r = i(565), a = r.parseTag, s = r.parseAttr, l = i(411);

    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, r = 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, r);
            r = g.onIgnoreTag
        }
        var m = a(e, function (e, t, o, a, g) {
            var m, v = {sourcePosition: e, position: t, isClosing: g, isWhite: i.hasOwnProperty(o)};
            if (!d(m = n(o, a, 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}
                }(a), w = i[o], k = s(y.html, function (e, t) {
                    var i, n = -1 !== l.indexOf(w, 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
                });
                a = "<" + o;
                return k && (a += " " + k), y.closing && (a += " /"), a += ">"
            }
            return d(m = r(o, a, v)) ? f(a) : 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(483), o = i(284);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(488), o = i(286);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(489), o = i(288);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(490), o = i(290);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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, r, a) {
                    return i = t(t(i, e), t(o, a)), t(i << r | i >>> 32 - r, n)
                }

                function o(e, t, i, o, r, a, s) {
                    return n(t & i | ~t & o, e, t, r, a, s)
                }

                function r(e, t, i, o, r, a, s) {
                    return n(t & o | i & ~o, e, t, r, a, s)
                }

                function a(e, t, i, o, r, a, s) {
                    return n(t ^ i ^ o, e, t, r, a, s)
                }

                function s(e, t, i, o, r, a, s) {
                    return n(i ^ (t | ~o), e, t, r, a, 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 = r(n, l, d, u, i[1], 5, -165796510), u = r(u, n, l, d, i[6], 9, -1069501632), d = r(d, u, n, l, i[11], 14, 643717713), l = r(l, d, u, n, i[0], 20, -373897302), n = r(n, l, d, u, i[5], 5, -701558691), u = r(u, n, l, d, i[10], 9, 38016083), d = r(d, u, n, l, i[15], 14, -660478335), l = r(l, d, u, n, i[4], 20, -405537848), n = r(n, l, d, u, i[9], 5, 568446438), u = r(u, n, l, d, i[14], 9, -1019803690), d = r(d, u, n, l, i[3], 14, -187363961), l = r(l, d, u, n, i[8], 20, 1163531501), n = r(n, l, d, u, i[13], 5, -1444681467), u = r(u, n, l, d, i[2], 9, -51403784), d = r(d, u, n, l, i[7], 14, 1735328473), l = r(l, d, u, n, i[12], 20, -1926607734), n = a(n, l, d, u, i[5], 4, -378558), u = a(u, n, l, d, i[8], 11, -2022574463), d = a(d, u, n, l, i[11], 16, 1839030562), l = a(l, d, u, n, i[14], 23, -35309556), n = a(n, l, d, u, i[1], 4, -1530992060), u = a(u, n, l, d, i[4], 11, 1272893353), d = a(d, u, n, l, i[7], 16, -155497632), l = a(l, d, u, n, i[10], 23, -1094730640), n = a(n, l, d, u, i[13], 4, 681279174), u = a(u, n, l, d, i[0], 11, -358537222), d = a(d, u, n, l, i[3], 16, -722521979), l = a(l, d, u, n, i[6], 23, 76029189), n = a(n, l, d, u, i[9], 4, -640364487), u = a(u, n, l, d, i[12], 11, -421815835), d = a(d, u, n, l, i[15], 16, 530742520), l = a(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, r, a, 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})$/), r = parseInt(o[2], 16), a = parseInt(o[1], 16) || 0, n[14] = r, n[15] = a, 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, r, a, 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, r = new ArrayBuffer(o), a = new Uint8Array(r), s = new Uint8Array(this, d, o), a.set(s), r)
                    }
                }(), 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, r = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
                    for (t = 0; t < o; t += 1) r[t >> 2] |= n.charCodeAt(t) << (t % 4 << 3);
                    return this._finish(r, 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, r = t;
                    if (e[r >> 2] |= 128 << (r % 4 << 3), r > 55) for (l(this._hash, e), r = 0; r < 16; r += 1) e[r] = 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, r,
                        a = (i = this._buff.buffer, n = e, o = !0, (r = new Uint8Array(i.byteLength + n.byteLength)).set(new Uint8Array(i)), r.set(new Uint8Array(n), i.byteLength), o ? r : r.buffer),
                        s = a.length;
                    for (this._length += e.byteLength, t = 64; t <= s; t += 64) l(this._hash, u(a.subarray(t - 64, t)));
                    return this._buff = t - 64 < s ? new Uint8Array(a.buffer.slice(t - 64)) : new Uint8Array(0), this
                }, m.ArrayBuffer.prototype.end = function (e) {
                    var t, i, n = this._buff, o = n.length, r = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
                    for (t = 0; t < o; t += 1) r[t >> 2] |= n[t] << (t % 4 << 3);
                    return this._finish(r, 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), r = new Uint8Array(o);
                        for (i = 0; i < n; i += 1) r[i] = e.charCodeAt(i);
                        return t ? r : 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, r, a, 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})$/), r = parseInt(o[2], 16), a = parseInt(o[1], 16) || 0, n[14] = r, n[15] = a, 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 r = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice, a = 2097152,
                    s = Math.ceil(e.size / a), l = new t.ArrayBuffer, d = new FileReader;

                function u() {
                    const t = o * a, i = t + a >= e.size ? e.size : t + a;
                    d.readAsArrayBuffer(r.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(a, s) {
                if (!i[a]) {
                    if (!t[a]) {
                        var l = "function" == typeof require && require;
                        if (!s && l) return require(a, !0);
                        if (r) return r(a, !0);
                        var d = new Error("Cannot find module '" + a + "'");
                        throw d.code = "MODULE_NOT_FOUND", d
                    }
                    var u = i[a] = {exports: {}};
                    t[a][0].call(u.exports, function (e) {
                        var i = t[a][1][e];
                        return o(i || e)
                    }, u, u.exports, e, t, i, n)
                }
                return i[a].exports
            }

            for (var r = "function" == typeof require && require, a = 0; a < n.length; a++) o(n[a]);
            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"), r = u(o), a = e("babel-runtime/regenerator"), s = u(a),
                        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"), w = e("url"), k = e("is-type-of"), T = e("platform"),
                        b = e("utility"), C = e("urllib"), S = e("./version"), I = e("dateformat"), _ = e("bowser"),
                        A = e("../common/signUtils"), D = e("../common/utils/isIP"),
                        x = e("../common/client/initOptions"), N = new v;

                    function E(e, t) {
                        var i, n;
                        if (i = T.name, n = T.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 = C, this.agent = this.options.agent || N), 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 x(t)
                    };
                    var P = E.prototype;
                    P.debug = c, y(P, e("./object")), y(P, e("../common/bucket/getBucketWebsite")), y(P, e("../common/bucket/putBucketWebsite")), y(P, e("../common/bucket/deleteBucketWebsite")), y(P, e("../common/bucket/getBucketLifecycle")), y(P, e("../common/bucket/putBucketLifecycle")), y(P, e("../common/bucket/deleteBucketLifecycle")), y(P, e("../common/bucket/putBucketVersioning")), y(P, e("../common/bucket/getBucketVersioning")), y(P, e("./managed-upload")), y(P, e("../common/multipart")), y(P, e("../common/parallel")), P.signature = function (e) {
                        return this.debug("authorization stringToSign: %s", e, "info"), A.computeSignature(this.options.accessKeySecret, e)
                    }, P.authorization = function (e, t, i, n) {
                        var o = A.buildCanonicalString(e.toUpperCase(), t, {headers: n, parameters: i});
                        return A.authorization(this.options.accessKeyId, this.options.accessKeySecret, o)
                    }, P.createRequest = function (e) {
                        var t = {
                            "x-oss-date": I(+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 r = e.timeout || this.options.timeout, a = {
                            agent: this.agent,
                            method: e.method,
                            content: e.content,
                            stream: e.stream,
                            headers: t,
                            timeout: r,
                            writeStream: e.writeStream,
                            customResponse: e.customResponse,
                            ctx: e.ctx || this.ctx
                        };
                        return {url: o, params: a}
                    }, P.request = function (e) {
                        var t, i, n, o, r, a;
                        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 (r = 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" !== (r = l.sent).code || o) {
                                        l.next = 25;
                                        break
                                    }
                                    return this.options.amendTimeSkewed = +new Date(r.serverTime) - new Date, l.next = 24, s.default.awrap(this.request(e));
                                case 24:
                                    return l.abrupt("return", l.sent);
                                case 25:
                                    r.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:
                                    r = l.sent;
                                case 32:
                                    if (!r) {
                                        l.next = 34;
                                        break
                                    }
                                    throw r;
                                case 34:
                                    if (!e.xmlResponse) {
                                        l.next = 39;
                                        break
                                    }
                                    return l.next = 37, s.default.awrap(this.parseXML(i.data));
                                case 37:
                                    a = l.sent, i.data = a;
                                case 39:
                                    return l.abrupt("return", i);
                                case 40:
                                case"end":
                                    return l.stop()
                            }
                        }, null, this, [[5, 12]])
                    }, P._getResource = function (e) {
                        var t = "/";
                        return e.bucket && (t += e.bucket + "/"), e.object && (t += e.object), t
                    }, P._isIP = D, P._escape = function (e) {
                        return b.encodeURIComponent(e).replace(/%2F/g, "/")
                    }, P._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 r = {};
                        if (e.query && y(r, e.query), e.subres) {
                            var a = {};
                            k.string(e.subres) ? a[e.subres] = "" : k.array(e.subres) ? e.subres.forEach(function (e) {
                                a[e] = ""
                            }) : a = e.subres, y(r, a)
                        }
                        return t.query = r, w.format(t)
                    }, P._getUserAgent = function () {
                        var e = i && i.browser ? "js" : "nodejs", t = "aliyun-sdk-" + e + "/" + S.version,
                            n = T.description;
                        return !n && i && (n = "Node.js " + i.version.slice(1) + " on " + i.platform + " " + i.arch), this._checkUserAgent(t + " " + n)
                    }, P._checkUserAgent = function (e) {
                        var t = e.replace(/\u03b1/, "alpha").replace(/\u03b2/, "beta");
                        return t
                    }, P.checkBrowserAndVersion = function (e, t) {
                        return _.name === e && _.version.split(".")[0] === t
                    }, P.parseXML = function (e) {
                        return new r.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)
                            })
                        })
                    }, P.requestError = function (e) {
                        var t, i, n, o;
                        return s.default.async(function (r) {
                            for (; ;) switch (r.prev = r.next) {
                                case 0:
                                    if (t = null, e.data && e.data.length) {
                                        r.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 = ""), r.next = 33;
                                    break;
                                case 5:
                                    return i = String(e.data), this.debug("request response error data: %s", i, "error"), n = void 0, r.prev = 8, r.next = 11, s.default.awrap(this.parseXML(i));
                                case 11:
                                    if (r.t0 = r.sent, r.t0) {
                                        r.next = 14;
                                        break
                                    }
                                    r.t0 = {};
                                case 14:
                                    n = r.t0, r.next = 24;
                                    break;
                                case 17:
                                    return r.prev = 17, r.t1 = r.catch(8), this.debug(i, "error"), r.t1.message += "\nraw xml: " + i, r.t1.status = e.status, r.t1.requestId = e.headers["x-oss-request-id"], r.abrupt("return", r.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"), r.abrupt("return", t);
                                case 35:
                                case"end":
                                    return r.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), r = e("babel-runtime/core-js/promise"),
                        a = d(r), 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, r, a, 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 r = this._createStream(t, 0, o), i.contentLength = o, v.next = 18, l.default.awrap(this.putStream(e, r, i));
                                case 18:
                                    if (a = v.sent, !i || !i.progress) {
                                        v.next = 22;
                                        break
                                    }
                                    return v.next = 22, l.default.awrap(i.progress(1));
                                case 22:
                                    return s = {
                                        res: a.res,
                                        bucket: this.options.bucket,
                                        name: e,
                                        etag: a.res.headers.etag
                                    }, (i.headers && i.headers["x-oss-callback"] || i.callback) && (s.data = a.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, r, s, d, u, c, h, f, g, m, v, y, w, k, T, b, C;
                        return l.default.async(function (S) {
                            for (; ;) switch (S.prev = S.next) {
                                case 0:
                                    if (i = this, !this.isCancel()) {
                                        S.next = 3;
                                        break
                                    }
                                    throw this._makeCancelEvent();
                                case 3:
                                    return n = e.file, r = 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(r, s), g = f.length, m = !1, v = function (i, o) {
                                        var r = this;
                                        return new a.default(function (a, s) {
                                            var h, v, y, w;
                                            return l.default.async(function (r) {
                                                for (; ;) switch (r.prev = r.next) {
                                                    case 0:
                                                        if (r.prev = 0, i.isCancel()) {
                                                            r.next = 18;
                                                            break
                                                        }
                                                        return h = f[o - 1], v = {
                                                            stream: i._createStream(n, h.start, h.end),
                                                            size: h.end - h.start
                                                        }, r.next = 6, l.default.awrap(i._uploadPart(c, d, o, v));
                                                    case 6:
                                                        if (y = r.sent, i.isCancel() || m) {
                                                            r.next = 15;
                                                            break
                                                        }
                                                        if (e.doneParts.push({
                                                            number: o,
                                                            etag: y.res.headers.etag
                                                        }), !t.progress) {
                                                            r.next = 12;
                                                            break
                                                        }
                                                        return r.next = 12, l.default.awrap(t.progress(u.length / g, e, y.res));
                                                    case 12:
                                                        a({number: o, etag: y.res.headers.etag}), r.next = 16;
                                                        break;
                                                    case 15:
                                                        a();
                                                    case 16:
                                                        r.next = 19;
                                                        break;
                                                    case 18:
                                                        a();
                                                    case 19:
                                                        r.next = 30;
                                                        break;
                                                    case 21:
                                                        r.prev = 21, r.t0 = r.catch(0), (w = new Error).name = r.t0.name, w.message = r.t0.message, w.stack = r.t0.stack, w.partNum = o, p(r.t0).to(w), s(w);
                                                    case 30:
                                                    case"end":
                                                        return r.stop()
                                                }
                                            }, null, r, [[0, 21]])
                                        })
                                    }, y = (0, o.default)(new Array(g), function (e, t) {
                                        return t + 1
                                    }), w = h.map(function (e) {
                                        return e.number
                                    }), k = y.filter(function (e) {
                                        return w.indexOf(e) < 0
                                    }), T = 5, b = t.parallel || T, S.next = 17, l.default.awrap(this._parallel(k, b, function (e) {
                                        return new a.default(function (t, n) {
                                            v(i, e).then(function (e) {
                                                e && h.push(e), t()
                                            }).catch(function (e) {
                                                n(e)
                                            })
                                        })
                                    }));
                                case 17:
                                    if (C = S.sent, m = !0, !this.isCancel()) {
                                        S.next = 22;
                                        break
                                    }
                                    throw v = null, this._makeCancelEvent();
                                case 22:
                                    if (!(C && C.length > 0)) {
                                        S.next = 25;
                                        break
                                    }
                                    throw C[0].message = "Failed to upload some parts with error: " + C[0].toString() + " part_num: " + C[0].partNum, C[0];
                                case 25:
                                    return S.next = 27, l.default.awrap(this.completeMultipartUpload(c, d, h, t));
                                case 27:
                                    return S.abrupt("return", S.sent);
                                case 28:
                                case"end":
                                    return S.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"), w = y.Readable;

                    function k(e, t) {
                        if (!(this instanceof k)) return new k(e, t);
                        w.call(this, t), this.file = e, this.reader = new FileReader, this.start = 0, this.finish = !1, this.fileBuffer = null
                    }

                    c.inherits(k, w), k.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))
                        }
                    }, k.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 k(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 r = t * o, a = Math.min(r + t, e);
                            n.push({start: r, end: a})
                        }
                        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), r = e("babel-runtime/core-js/object/keys"),
                    a = c(r), 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"), w = e("../common/callback"), k = e("../common/signUtils"),
                    T = e("merge-descriptors"), b = e("../common/utils/isBlob"), C = e("../common/utils/isFile"), S = i;
                S.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)
                }, S.put = function (e, t, i) {
                    var n, o, r, a, 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 (!b(t) && !C(t)) {
                                    c.next = 29;
                                    break
                                }
                                return i.mime || (C(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 r = c.sent, c.abrupt("return", r);
                            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), a = i.method || "PUT", s = this._objectRequestParams(a, e, i), w.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]])
                }, S.putStream = function (e, t, i) {
                    var n, o, r, a;
                    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), w.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 r = s.sent, a = {
                                    name: e,
                                    url: this._objectUrl(e),
                                    res: r.res
                                }, o.headers && o.headers["x-oss-callback"] && (a.data = JSON.parse(r.data.toString())), s.abrupt("return", a);
                            case 17:
                            case"end":
                                return s.stop()
                        }
                    }, null, this)
                }, T(S, e("../common/object/copyObject")), T(S, e("../common/object/getObjectTagging")), T(S, e("../common/object/putObjectTagging")), T(S, e("../common/object/deleteObjectTagging")), T(S, e("../common/image")), T(S, e("../common/object/getBucketVersions")), T(S, e("../common/object/getACL")), T(S, e("../common/object/putACL")), T(S, e("../common/object/head")), T(S, e("../common/object/delete")), T(S, e("../common/object/get")), S.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)
                }, S.list = function (e, t) {
                    var i, n, o, r, a;
                    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, r = this, o && (Array.isArray(o) || (o = [o]), o = o.map(function (e) {
                                    return {
                                        name: e.Key,
                                        url: r._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}
                                    }
                                })), (a = n.data.CommonPrefixes || null) && (Array.isArray(a) || (a = [a]), a = a.map(function (e) {
                                    return e.Prefix
                                })), s.abrupt("return", {
                                    res: n.res,
                                    objects: o,
                                    prefixes: a,
                                    nextMarker: n.data.NextMarker || null,
                                    isTruncated: "true" === n.data.IsTruncated
                                });
                            case 13:
                            case"end":
                                return s.stop()
                        }
                    }, null, this)
                }, S.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)
                }, S.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 r = k._signatureForURL(this.options.accessKeySecret, t, o, i), a = g.parse(this._getReqUrl(n));
                    return a.query = {
                        OSSAccessKeyId: this.options.accessKeyId,
                        Expires: i,
                        Signature: r.Signature
                    }, m(r.subResource).to(a.query), a.format()
                }, S.getObjectUrl = function (e, t) {
                    return t ? "/" !== t[t.length - 1] && (t += "/") : t = this.options.endpoint.format(), t + this._escape(this._objectName(e))
                }, S._objectUrl = function (e) {
                    return this._getReqUrl({bucket: this.options.bucket, object: e})
                }, S.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))
                }, S._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
                }, S._objectName = function (e) {
                    return e.replace(/^\/+/, "")
                }, S._convertMetaToHeaders = function (e, t) {
                    e && (0, a.default)(e).forEach(function (i) {
                        t["x-oss-meta-" + i] = e[i]
                    })
                }, S._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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = e("../utils/checkBucketName"), s = i;
                s.deleteBucketLifecycle = function (e, t) {
                    var i, n;
                    return r.default.async(function (o) {
                        for (; ;) switch (o.prev = o.next) {
                            case 0:
                                return a(e), (i = this._bucketRequestParams("DELETE", e, "lifecycle", t)).successStatuses = [204], o.next = 5, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = e("../utils/checkBucketName"), s = i;
                s.deleteBucketWebsite = function (e, t) {
                    var i, n;
                    return r.default.async(function (o) {
                        for (; ;) switch (o.prev = o.next) {
                            case 0:
                                return a(e), (i = this._bucketRequestParams("DELETE", e, "website", t)).successStatuses = [204], o.next = 5, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = e("../utils/checkBucketName"), s = e("../utils/isArray"), l = e("../utils/formatObjKey"), d = i;
                d.getBucketLifecycle = function (e, t) {
                    var i, n, o;
                    return r.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                return a(e), (i = this._bucketRequestParams("GET", e, "lifecycle", t)).successStatuses = [200], i.xmlResponse = !0, d.next = 6, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = e("../utils/checkBucketName"), s = i;
                s.getBucketVersioning = function (e, t) {
                    var i, n, o;
                    return r.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return a(e), (i = this._bucketRequestParams("GET", e, "versioning", t)).xmlResponse = !0, i.successStatuses = [200], s.next = 6, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = e("../utils/checkBucketName"), s = e("../utils/isObject"), l = i;
                l.getBucketWebsite = function (e, t) {
                    var i, n, o;
                    return r.default.async(function (l) {
                        for (; ;) switch (l.prev = l.next) {
                            case 0:
                                return a(e), (i = this._bucketRequestParams("GET", e, "website", t)).successStatuses = [200], i.xmlResponse = !0, l.next = 6, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = 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 r.default.async(function (h) {
                        for (; ;) switch (h.prev = h.next) {
                            case 0:
                                if (a(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, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = 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 r.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                if (a(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, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = 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 r.default.async(function (h) {
                        for (; ;) switch (h.prev = h.next) {
                            case 0:
                                if (a(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, r.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),
                        r = e("babel-runtime/core-js/json/stringify"), a = s(r);

                    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 r = t.from((0, a.default)(n)).toString("base64");
                            if (e.headers["x-oss-callback"] = r, 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, a.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = 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, r.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 = a(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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = 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 r.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 && a(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, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = e("copy-to"), s = e("./callback"), l = e("./utils/deepCopy"), d = i;
                d.listUploads = function (e, t) {
                    var i, n, o, s;
                    return r.default.async(function (l) {
                        for (; ;) switch (l.prev = l.next) {
                            case 0:
                                return i = {}, a(t = t || {}).to(i), i.subres = "uploads", (n = this._objectRequestParams("GET", "", i)).query = e, n.xmlResponse = !0, n.successStatuses = [200], l.next = 10, r.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 r.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                return o = {}, a(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, r.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 r.default.async(function (l) {
                        for (; ;) switch (l.prev = l.next) {
                            case 0:
                                return this._stop(), n = {}, a(i = i || {}).to(n), n.subres = {uploadId: t}, (o = this._objectRequestParams("DELETE", e, n)).successStatuses = [204], l.next = 9, r.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 r.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return i = {}, a(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, r.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, a, s) {
                    var l;
                    return r.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                return l = {
                                    stream: this._createStream(n, o, a),
                                    size: a - o
                                }, d.next = 3, r.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, a, d, u, c, h, f, p;
                    return r.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
                                }), a = '<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n', d = 0; d < o.length; d++) u = o[d], a += "<Part>\n", a += "<PartNumber>" + u.number + "</PartNumber>\n", a += "<ETag>" + u.etag + "</ETag>\n", a += "</Part>\n";
                                return a += "</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 = a, h.headers && h.headers["x-oss-callback"] || (h.xmlResponse = !0), h.successStatuses = [200], g.next = 17, r.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 r.default.async(function (u) {
                        for (; ;) switch (u.prev = u.next) {
                            case 0:
                                return s = {}, a(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, r.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), r = e("babel-runtime/core-js/object/keys"), a = d(r),
                    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 r, 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, a.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, (r = this._objectRequestParams("PUT", e, n)).xmlResponse = !0, r.successStatuses = [200, 304], u.next = 14, o.default.awrap(this.request(r));
                            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), r = e("babel-runtime/core-js/object/assign"),
                    a = s(r);

                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 (r) {
                        for (; ;) switch (r.prev = r.next) {
                            case 0:
                                return n.subres = (0, a.default)({}, n.subres), n.versionId && (n.subres.versionId = n.versionId), (t = this._objectRequestParams("DELETE", e, n)).successStatuses = [204], r.next = 6, o.default.awrap(this.request(t));
                            case 6:
                                return i = r.sent, r.abrupt("return", {res: i.res});
                            case 8:
                            case"end":
                                return r.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), r = e("babel-runtime/core-js/object/assign"),
                    a = s(r);

                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 (r) {
                        for (; ;) switch (r.prev = r.next) {
                            case 0:
                                return n.subres = (0, a.default)({tagging: ""}, n.subres), n.versionId && (n.subres.versionId = n.versionId), e = this._objectName(e), (t = this._objectRequestParams("DELETE", e, n)).successStatuses = [204], r.next = 7, o.default.awrap(this.request(t));
                            case 7:
                                return i = r.sent, r.abrupt("return", {status: i.status, res: i.res});
                            case 9:
                            case"end":
                                return r.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), r = e("babel-runtime/core-js/object/assign"),
                    a = s(r);

                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, r, 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, a.default)({}, u.subres), u.versionId && (u.subres.versionId = u.versionId), u.process && (u.subres["x-oss-process"] = u.process), r = 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:
                                r = 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: r.res, content: r.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), r = e("babel-runtime/core-js/object/assign"),
                    a = s(r);

                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 (r) {
                        for (; ;) switch (r.prev = r.next) {
                            case 0:
                                return n.subres = (0, a.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, r.next = 8, o.default.awrap(this.request(t));
                            case 8:
                                return i = r.sent, r.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 r.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), r = e("babel-runtime/regenerator"), a = d(r),
                    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, r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
                        s = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                    return a.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                if (!r.versionIdMarker || void 0 !== r.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(r), d.next = 10, a.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), r = e("babel-runtime/core-js/object/assign"),
                    a = s(r);

                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, r, 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, a.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, r = (r = n.TagSet.Tag) && d(r) ? [r] : r || [], s = {}, r.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), r = e("babel-runtime/core-js/object/keys"), a = d(r),
                    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, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                    return o.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return r.subres = (0, l.default)({}, r.subres), r.versionId && (r.subres.versionId = r.versionId), (t = this._objectRequestParams("HEAD", e, r)).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, a.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), r = e("babel-runtime/core-js/object/assign"),
                    a = s(r);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = i;
                l.putACL = function (e, t, i) {
                    var n, r;
                    return o.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return (i = i || {}).subres = (0, a.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 r = s.sent, s.abrupt("return", {res: r.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), r = e("babel-runtime/core-js/object/keys"), a = d(r),
                    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, r, 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, a.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 r = d.sent, d.abrupt("return", {res: r.res, status: r.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), r = e("babel-runtime/core-js/promise"), a = s(r);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = i;
                l._parallelNode = function (e, t, i, n) {
                    var r, s, l, d, u, c, h, f;
                    return o.default.async(function (p) {
                        for (; ;) switch (p.prev = p.next) {
                            case 0:
                                r = 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 (!r.isCancel()) {
                                    p.next = 11;
                                    break
                                }
                                return p.abrupt("break", 26);
                            case 11:
                                if (n ? l.push(i(r, e[f], n)) : l.push(i(r, 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(a.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 a.default(function (o) {
                        var r = [];
                        if (t <= 0 || !e) o(r); else {
                            var a, s, l, d = (s = -1, l = (a = e).length, function () {
                                return ++s < l && !n.isCancel() ? {value: a[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, r.push(e), o(r)) : t === {} || u && c <= 0 ? (u = !0, o(r)) : h || (n.isCancel() ? o(r) : 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 || r.length > 0) return u = !0, void (c <= 0 && o(r));
                                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),
                        r = e("babel-runtime/core-js/object/keys"), a = s(r);

                    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, a.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 || {}, r = [], s = {},
                            l = [e.toUpperCase(), o["Content-Md5"] || "", o["Content-Type"] || o["Content-Type".toLowerCase()], n || o["x-oss-date"]];
                        return (0, a.default)(o).forEach(function (e) {
                            var t = e.toLowerCase();
                            0 === t.indexOf("x-oss-") && (s[t] = String(o[e]).trim())
                        }), (0, a.default)(s).sort().forEach(function (e) {
                            r.push(e + ":" + s[e])
                        }), (l = l.concat(r)).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],
                            r = 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, a.default)(i.response).forEach(function (e) {
                            var t = "response-" + e.toLowerCase();
                            d[t] = i.response[e]
                        }), (0, a.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, a.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}, r.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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = 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, r.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) {
                            a(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), r = e("babel-runtime/helpers/typeof"),
                    a = s(r);

                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, a.default)(t))) return t;
                    var n = i.filter(function (e) {
                        return e.original === t
                    })[0];
                    if (n) return n.copy;
                    var r = Array.isArray(t) ? [] : {};
                    return i.push({original: t, copy: r}), (0, o.default)(t).forEach(function (n) {
                        r[n] = e(t[n], i)
                    }), r
                }
            }, {"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), r = e("babel-runtime/helpers/typeof"),
                    a = s(r);

                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, a.default)(t))) return t;
                    var n = void 0;
                    if (Array.isArray(t)) {
                        n = [];
                        for (var r = 0; r < t.length; r++) n.push(e(t[r], 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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = 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 = a(t, "firstUpperCase")), "object" === s(t) ? (0, r.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 r = !1 !== (o = o || {}).global;
                        if (null === n && r && (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), r && (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"), r = (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, r.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), r = e("../core-js/symbol"), a = l(r),
                    s = "function" == typeof a.default && "symbol" == typeof o.default ? function (e) {
                        return typeof e
                    } : function (e) {
                        return e && "function" == typeof a.default && e.constructor === a.default && e !== a.default.prototype ? "symbol" : typeof e
                    };

                function l(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                i.default = "function" == typeof a.default && "symbol" === s(o.default) ? function (e) {
                    return void 0 === e ? "undefined" : s(e)
                } : function (e) {
                    return e && "function" == typeof a.default && e.constructor === a.default && e !== a.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], a = i[1], s = new r(function (e, t, i) {
                        return 3 * (t + i) / 4 - i
                    }(0, n, a)), l = 0, u = a > 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 === a && (t = o[e.charCodeAt(c)] << 2 | o[e.charCodeAt(c + 1)] >> 4, s[l++] = 255 & t), 1 === a && (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, r = [], a = 0, s = i - o; a < s; a += 16383) r.push(u(e, a, a + 16383 > s ? s : a + 16383));
                    return 1 === o ? (t = e[i - 1], r.push(n[t >> 2] + n[t << 4 & 63] + "==")) : 2 === o && (t = (e[i - 2] << 8) + e[i - 1], r.push(n[t >> 10] + n[t >> 4 & 63] + n[t << 2 & 63] + "=")), r.join("")
                };
                for (var n = [], o = [], r = "undefined" != typeof Uint8Array ? Uint8Array : Array, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0, l = a.length; s < l; ++s) n[s] = a[s], o[a.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, r, a = [], s = t; s < i; s += 3) o = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (255 & e[s + 2]), a.push(n[(r = o) >> 18 & 63] + n[r >> 12 & 63] + n[r >> 6 & 63] + n[63 & r]);
                    return a.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, a = 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 = !a && !h && /macintosh/i.test(t), w = !l && !f && !p && !g && /linux/i.test(t),
                            k = n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i), T = i(/version\/(\d+(\.\d+)?)/i),
                            b = /tablet/i.test(t) && !/tablet pc/i.test(t), C = !b && /[^-]mobi/i.test(t),
                            S = /xbox/i.test(t);
                        /opera/i.test(t) ? o = {
                            name: "Opera",
                            opera: e,
                            version: T || 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) || T
                        } : /SamsungBrowser/i.test(t) ? o = {
                            name: "Samsung Internet for Android",
                            samsungBrowser: e,
                            version: T || 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: T || 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: T || 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
                        }, k ? (o.msedge = e, o.version = k) : (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: k
                        } : /vivaldi/i.test(t) ? o = {
                            name: "Vivaldi",
                            vivaldi: e,
                            version: i(/vivaldi\/(\d+(\.\d+)?)/i) || T
                        } : 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: T || i(/blackberry[\d]+\/(\d+(\.\d+)?)/i)
                        } : g ? (o = {
                            name: "WebOS",
                            osname: "WebOS",
                            webos: e,
                            version: T || 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) || T
                        } : /qupzilla/i.test(t) ? o = {
                            name: "QupZilla",
                            qupzilla: e,
                            version: i(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || T
                        } : /chromium/i.test(t) ? o = {
                            name: "Chromium",
                            chromium: e,
                            version: i(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || T
                        } : /chrome|crios|crmo/i.test(t) ? o = {
                            name: "Chrome",
                            chrome: e,
                            version: i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
                        } : l ? o = {
                            name: "Android",
                            version: T
                        } : /safari|applewebkit/i.test(t) ? (o = {
                            name: "Safari",
                            safari: e
                        }, T && (o.version = T)) : a ? (o = {name: "iphone" == a ? "iPhone" : "ipad" == a ? "iPad" : "iPod"}, T && (o.version = T)) : o = /googlebot/i.test(t) ? {
                            name: "Googlebot",
                            googlebot: e,
                            version: i(/googlebot\/(\d+(\.\d+))/i) || T
                        } : {
                            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 && T && (o.version = T)) : !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 && a ? (o[a] = e, o.ios = e, o.osname = "iOS") : y ? (o.mac = e, o.osname = "macOS") : S ? (o.xbox = e, o.osname = "Xbox") : v ? (o.windows = e, o.osname = "Windows") : w && (o.linux = e, o.osname = "Linux") : (o.android = e, o.osname = "Android");
                        var I = "";
                        o.windows ? I = 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 ? I = i(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i) : o.mac ? I = (I = i(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g, ".") : a ? I = (I = i(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g, ".") : l ? I = i(/android[ \/-](\d+(\.\d+)*)/i) : o.webos ? I = i(/(?:web|hpw)os\/(\d+(\.\d+)*)/i) : o.blackberry ? I = i(/rim\stablet\sos\s(\d+(\.\d+)*)/i) : o.bada ? I = i(/bada\/(\d+(\.\d+)*)/i) : o.tizen && (I = i(/tizen[\/\s](\d+(\.\d+)*)/i)), I && (o.osversion = I);
                        var _ = !o.windows && I.split(".")[0];
                        return b || u || "ipad" == a || l && (3 == _ || _ >= 4 && !C) || o.silk ? o.tablet = e : (C || "iphone" == a || "ipod" == a || 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 === r([o.version, "1.0"]) || o.mzbrowser && 1 === r([o.version, "6.0"]) || o.focus && 1 === r([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 r(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 a(e, n, o) {
                        var a = i;
                        "string" == typeof n && (o = n, n = void 0), void 0 === n && (n = !1), o && (a = t(o));
                        var s = "" + a.version;
                        for (var l in e) if (e.hasOwnProperty(l) && a[l]) {
                            if ("string" != typeof e[l]) throw new Error("Browser version in the minVersion map should be a string: " + l + ": " + String(e));
                            return r([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 = a, i.compareVersions = r, i.check = function (e, t, i) {
                        return !a(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
                    }
                }, r = 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 = a)
                    }
                    this.charBuffer = new n(6), this.charReceived = 0, this.charLength = 0
                };

                function a(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
                }

                r.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 r = this.surrogateSize;
                        return this.charLength += r, this.charReceived += r, this.charBuffer.copy(this.charBuffer, r, 0, r), e.copy(this.charBuffer, 0, 0, r), t.substring(0, o)
                    }
                    return t
                }, r.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
                }, r.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"), r = e("isarray");

                    function a() {
                        return l.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
                    }

                    function s(e, t) {
                        if (a() < 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 && r(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 >= a()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a().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 r, a = 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;
                            a = 2, s /= 2, l /= 2, i /= 2
                        }

                        function d(e, t) {
                            return 1 === a ? e[t] : e.readUInt16BE(t * a)
                        }

                        if (o) {
                            var u = -1;
                            for (r = i; r < s; r++) if (d(e, r) === d(t, -1 === u ? 0 : r - u)) {
                                if (-1 === u && (u = r), r - u + 1 === l) return u * a
                            } else -1 !== u && (r -= r - u), u = -1
                        } else for (i + l > s && (i = s - l), r = i; r >= 0; r--) {
                            for (var c = !0, h = 0; h < l; h++) if (d(e, r + h) !== d(t, h)) {
                                c = !1;
                                break
                            }
                            if (c) return r
                        }
                        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 r = t.length;
                        if (r % 2 != 0) throw new TypeError("Invalid hex string");
                        n > r / 2 && (n = r / 2);
                        for (var a = 0; a < n; ++a) {
                            var s = parseInt(t.substr(2 * a, 2), 16);
                            if (isNaN(s)) return a;
                            e[i + a] = s
                        }
                        return a
                    }

                    function w(e, t, i, n) {
                        return K(U(t, e.length - i), e, i, n)
                    }

                    function k(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 T(e, t, i, n) {
                        return k(e, t, i, n)
                    }

                    function b(e, t, i, n) {
                        return K(V(t), e, i, n)
                    }

                    function C(e, t, i, n) {
                        return K(function (e, t) {
                            for (var i, n, o, r = [], a = 0; a < e.length && !((t -= 2) < 0); ++a) i = e.charCodeAt(a), n = i >> 8, o = i % 256, r.push(o), r.push(n);
                            return r
                        }(t, e.length - i), e, i, n)
                    }

                    function S(e, t, i) {
                        return 0 === t && i === e.length ? n.fromByteArray(e) : n.fromByteArray(e.slice(t, i))
                    }

                    function I(e, t, i) {
                        i = Math.min(e.length, i);
                        for (var n = [], o = t; o < i;) {
                            var r, a, 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 & (r = e[o + 1])) && (l = (31 & d) << 6 | 63 & r) > 127 && (u = l);
                                    break;
                                case 3:
                                    r = e[o + 1], a = e[o + 2], 128 == (192 & r) && 128 == (192 & a) && (l = (15 & d) << 12 | (63 & r) << 6 | 63 & a) > 2047 && (l < 55296 || l > 57343) && (u = l);
                                    break;
                                case 4:
                                    r = e[o + 1], a = e[o + 2], s = e[o + 3], 128 == (192 & r) && 128 == (192 & a) && 128 == (192 & s) && (l = (15 & d) << 18 | (63 & r) << 12 | (63 & a) << 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 = a(), 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, r = Math.min(i, n); o < r; ++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 (!r(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 a = e[i];
                            if (!l.isBuffer(a)) throw new TypeError('"list" argument must be an Array of Buffers');
                            a.copy(n, o), o += a.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 ? I(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 x(this, t, i);
                                case"utf8":
                                case"utf-8":
                                    return I(this, t, i);
                                case"ascii":
                                    return A(this, t, i);
                                case"latin1":
                                case"binary":
                                    return D(this, t, i);
                                case"base64":
                                    return S(this, t, i);
                                case"ucs2":
                                case"ucs-2":
                                case"utf16le":
                                case"utf-16le":
                                    return N(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 r = o - n, a = i - t, s = Math.min(r, a), d = this.slice(n, o), u = e.slice(t, i), c = 0; c < s; ++c) if (d[c] !== u[c]) {
                            r = d[c], a = u[c];
                            break
                        }
                        return r < a ? -1 : a < r ? 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 r = !1; ;) switch (n) {
                            case"hex":
                                return y(this, e, t, i);
                            case"utf8":
                            case"utf-8":
                                return w(this, e, t, i);
                            case"ascii":
                                return k(this, e, t, i);
                            case"latin1":
                            case"binary":
                                return T(this, e, t, i);
                            case"base64":
                                return b(this, e, t, i);
                            case"ucs2":
                            case"ucs-2":
                            case"utf16le":
                            case"utf-16le":
                                return C(this, e, t, i);
                            default:
                                if (r) throw new TypeError("Unknown encoding: " + n);
                                n = ("" + n).toLowerCase(), r = !0
                        }
                    }, l.prototype.toJSON = function () {
                        return {type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0)}
                    };
                    var _ = 4096;

                    function A(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 D(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 x(e, t, i) {
                        var n, o = e.length;
                        (!t || t < 0) && (t = 0), (!i || i < 0 || i > o) && (i = o);
                        for (var r = "", a = t; a < i; ++a) r += (n = e[a]) < 16 ? "0" + n.toString(16) : n.toString(16);
                        return r
                    }

                    function N(e, t, i) {
                        for (var n = e.slice(t, i), o = "", r = 0; r < n.length; r += 2) o += String.fromCharCode(n[r] + 256 * n[r + 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 P(e, t, i, n, o, r) {
                        if (!l.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
                        if (t > o || t < r) throw new RangeError('"value" argument is out of bounds');
                        if (i + n > e.length) throw new RangeError("Index out of range")
                    }

                    function O(e, t, i, n) {
                        t < 0 && (t = 65535 + t + 1);
                        for (var o = 0, r = Math.min(e.length - i, 2); o < r; ++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, r = Math.min(e.length - i, 4); o < r; ++o) e[i + o] = t >>> 8 * (n ? o : 3 - o) & 255
                    }

                    function F(e, t, i, n, o, r) {
                        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, r) {
                        return r || F(e, 0, i, 4), o.write(e, t, i, n, 23, 4), i + 4
                    }

                    function R(e, t, i, n, r) {
                        return r || 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 r = 0; r < o; ++r) i[r] = this[r + 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, r = 0; ++r < t && (o *= 256);) n += this[e + r] * 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, r = 0; ++r < t && (o *= 256);) n += this[e + r] * 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, r = this[e + --n]; n > 0 && (o *= 256);) r += this[e + --n] * o;
                        return r >= (o *= 128) && (r -= Math.pow(2, 8 * t)), r
                    }, 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;
                            P(this, e, t, i, o, 0)
                        }
                        var r = 1, a = 0;
                        for (this[t] = 255 & e; ++a < i && (r *= 256);) this[t + a] = e / r & 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;
                            P(this, e, t, i, o, 0)
                        }
                        var r = i - 1, a = 1;
                        for (this[t + r] = 255 & e; --r >= 0 && (a *= 256);) this[t + r] = e / a & 255;
                        return t + i
                    }, l.prototype.writeUInt8 = function (e, t, i) {
                        return e = +e, t |= 0, i || P(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 || P(this, e, t, 2, 65535, 0), l.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : O(this, e, t, !0), t + 2
                    }, l.prototype.writeUInt16BE = function (e, t, i) {
                        return e = +e, t |= 0, i || P(this, e, t, 2, 65535, 0), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : O(this, e, t, !1), t + 2
                    }, l.prototype.writeUInt32LE = function (e, t, i) {
                        return e = +e, t |= 0, i || P(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 || P(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);
                            P(this, e, t, i, o - 1, -o)
                        }
                        var r = 0, a = 1, s = 0;
                        for (this[t] = 255 & e; ++r < i && (a *= 256);) e < 0 && 0 === s && 0 !== this[t + r - 1] && (s = 1), this[t + r] = (e / a >> 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);
                            P(this, e, t, i, o - 1, -o)
                        }
                        var r = i - 1, a = 1, s = 0;
                        for (this[t + r] = 255 & e; --r >= 0 && (a *= 256);) e < 0 && 0 === s && 0 !== this[t + r + 1] && (s = 1), this[t + r] = (e / a >> 0) - s & 255;
                        return t + i
                    }, l.prototype.writeInt8 = function (e, t, i) {
                        return e = +e, t |= 0, i || P(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 || P(this, e, t, 2, 32767, -32768), l.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : O(this, e, t, !0), t + 2
                    }, l.prototype.writeInt16BE = function (e, t, i) {
                        return e = +e, t |= 0, i || P(this, e, t, 2, 32767, -32768), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : O(this, e, t, !1), t + 2
                    }, l.prototype.writeInt32LE = function (e, t, i) {
                        return e = +e, t |= 0, i || P(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 || P(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, r = n - i;
                        if (this === e && i < t && t < n) for (o = r - 1; o >= 0; --o) e[o + t] = this[o + i]; else if (r < 1e3 || !l.TYPED_ARRAY_SUPPORT) for (o = 0; o < r; ++o) e[o + t] = this[o + i]; else Uint8Array.prototype.set.call(e, this.subarray(i, i + r), t);
                        return r
                    }, 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 r;
                        if (t >>>= 0, i = void 0 === i ? this.length : i >>> 0, e || (e = 0), "number" == typeof e) for (r = t; r < i; ++r) this[r] = e; else {
                            var a = l.isBuffer(e) ? e : U(new l(e, n).toString()), s = a.length;
                            for (r = 0; r < i - t; ++r) this[r + t] = a[r % 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, r = [], a = 0; a < n; ++a) {
                            if ((i = e.charCodeAt(a)) > 55295 && i < 57344) {
                                if (!o) {
                                    if (i > 56319) {
                                        (t -= 3) > -1 && r.push(239, 191, 189);
                                        continue
                                    }
                                    if (a + 1 === n) {
                                        (t -= 3) > -1 && r.push(239, 191, 189);
                                        continue
                                    }
                                    o = i;
                                    continue
                                }
                                if (i < 56320) {
                                    (t -= 3) > -1 && r.push(239, 191, 189), o = i;
                                    continue
                                }
                                i = 65536 + (o - 55296 << 10 | i - 56320)
                            } else o && (t -= 3) > -1 && r.push(239, 191, 189);
                            if (o = null, i < 128) {
                                if ((t -= 1) < 0) break;
                                r.push(i)
                            } else if (i < 2048) {
                                if ((t -= 2) < 0) break;
                                r.push(i >> 6 | 192, 63 & i | 128)
                            } else if (i < 65536) {
                                if ((t -= 3) < 0) break;
                                r.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;
                                r.push(i >> 18 | 240, i >> 12 & 63 | 128, i >> 6 & 63 | 128, 63 & i | 128)
                            }
                        }
                        return r
                    }

                    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 r(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 (r(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])
                        }
                    }
                    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), r = this.src.__lookupSetter__(n);
                        o && e.__defineGetter__(n, o), r && e.__defineSetter__(n, r), o || r || (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"), r = e("./_to-absolute-index");
                t.exports = function (e) {
                    return function (t, i, a) {
                        var s, l = n(t), d = o(l.length), u = r(a, 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"), r = "Arguments" == n(function () {
                    return arguments
                }());
                t.exports = function (e) {
                    var t, i, a;
                    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 : r ? n(t) : "Object" == (a = n(t)) && "function" == typeof t.callee ? "Arguments" : a
                }
            }, {"./_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, r = n(o) && n(o.createElement);
                t.exports = function (e) {
                    return r ? 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"), r = e("./_object-pie");
                t.exports = function (e) {
                    var t = n(e), i = o.f;
                    if (i) for (var a, s = i(e), l = r.f, d = 0; s.length > d;) l.call(e, a = s[d++]) && t.push(a);
                    return t
                }
            }, {"./_object-gops": 134, "./_object-keys": 137, "./_object-pie": 138}],
            104: [function (e, t, i) {
                var n = e("./_global"), o = e("./_core"), r = e("./_ctx"), a = 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] = {}), w = y.prototype,
                            k = f ? n : p ? n[t] : (n[t] || {}).prototype;
                        for (d in f && (i = t), i) (u = !h && k && void 0 !== k[d]) && s(y, d) || (c = u ? k[d] : i[d], y[d] = f && "function" != typeof k[d] ? i[d] : m && u ? r(c, n) : v && k[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 ? r(Function.call, c) : c, g && ((y.virtual || (y.virtual = {}))[d] = c, e & l.R && w && !w[d] && a(w, 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"), r = e("./_is-array-iter"), a = 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), w = 0;
                        if ("function" != typeof v) throw TypeError(e + " is not iterable!");
                        if (r(v)) {
                            for (f = s(e.length); f > w; w++) if ((m = t ? y(a(p = e[w])[0], p[1]) : y(e[w])) === 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"), r = Array.prototype;
                t.exports = function (e) {
                    return void 0 !== e && (n.Array === e || r[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 r = e.return;
                        throw void 0 !== r && n(r.call(e)), t
                    }
                }
            }, {"./_an-object": 92}],
            118: [function (e, t, i) {
                "use strict";
                var n = e("./_object-create"), o = e("./_property-desc"), r = e("./_set-to-string-tag"), a = {};
                e("./_hide")(a, e("./_wks")("iterator"), function () {
                    return this
                }), t.exports = function (e, t, i) {
                    e.prototype = n(a, {next: o(1, i)}), r(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"), r = e("./_redefine"), a = 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, w, k, T = function (e) {
                            if (!h && e in I) return I[e];
                            switch (e) {
                                case"keys":
                                case"values":
                                    return function () {
                                        return new i(this, e)
                                    }
                            }
                            return function () {
                                return new i(this, e)
                            }
                        }, b = t + " Iterator", C = "values" == g, S = !1, I = e.prototype,
                        _ = I[c] || I["@@iterator"] || g && I[g], A = _ || T(g), D = g ? C ? T("entries") : A : void 0,
                        x = "Array" == t && I.entries || _;
                    if (x && (k = u(x.call(new e))) !== Object.prototype && k.next && (d(k, b, !0), n || "function" == typeof k[c] || a(k, c, f)), C && _ && "values" !== _.name && (S = !0, A = function () {
                        return _.call(this)
                    }), n && !v || !h && !S && I[c] || a(I, c, A), s[t] = A, s[b] = f, g) if (y = {
                        values: C ? A : T("values"),
                        keys: m ? A : T("keys"),
                        entries: D
                    }, v) for (w in y) w in I || r(I, w, y[w]); else o(o.P + o.F * (h || S), 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 r = [7][n]();
                    r.return = function () {
                        o = !0
                    }, Array.from(r, function () {
                        throw 2
                    })
                } catch (e) {
                }
                t.exports = function (e, t) {
                    if (!t && !o) return !1;
                    var i = !1;
                    try {
                        var r = [7], a = r[n]();
                        a.next = function () {
                            return {done: i = !0}
                        }, r[n] = function () {
                            return a
                        }, e(r)
                    } 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"), r = e("./_has"), a = e("./_object-dp").f, s = 0,
                    l = Object.isExtensible || function () {
                        return !0
                    }, d = !e("./_fails")(function () {
                        return l(Object.preventExtensions({}))
                    }), u = function (e) {
                        a(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 (!r(e, n)) {
                                if (!l(e)) return "F";
                                if (!t) return "E";
                                u(e)
                            }
                            return e[n].i
                        }, getWeak: function (e, t) {
                            if (!r(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) && !r(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, r = n.MutationObserver || n.WebKitMutationObserver,
                    a = n.process, s = n.Promise, l = "process" == e("./_cof")(a);
                t.exports = function () {
                    var e, t, i, d = function () {
                        var n, o;
                        for (l && (n = a.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 () {
                        a.nextTick(d)
                    }; else if (!r || 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 r(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"), r = e("./_object-pie"), a = 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 = a(e), l = arguments.length, d = 1, u = o.f, c = r.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"), r = e("./_enum-bug-keys"),
                    a = e("./_shared-key")("IE_PROTO"), s = function () {
                    }, l = function () {
                        var t, i = e("./_dom-create")("iframe"), n = r.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[r[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[a] = 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"), r = e("./_to-primitive"),
                    a = Object.defineProperty;
                i.f = e("./_descriptors") ? Object.defineProperty : function (e, t, i) {
                    if (n(e), t = r(t, !0), n(i), o) try {
                        return a(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"), r = e("./_object-keys");
                t.exports = e("./_descriptors") ? Object.defineProperties : function (e, t) {
                    o(e);
                    for (var i, a = r(t), s = a.length, l = 0; s > l;) n.f(e, i = a[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"), r = e("./_to-iobject"), a = e("./_to-primitive"),
                    s = e("./_has"), l = e("./_ie8-dom-define"), d = Object.getOwnPropertyDescriptor;
                i.f = e("./_descriptors") ? d : function (e, t) {
                    if (e = r(e), t = a(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, r = {}.toString,
                    a = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
                t.exports.f = function (e) {
                    return a && "[object Window]" == r.call(e) ? function (e) {
                        try {
                            return o(e)
                        } catch (e) {
                            return a.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"), r = e("./_shared-key")("IE_PROTO"), a = Object.prototype;
                t.exports = Object.getPrototypeOf || function (e) {
                    return e = o(e), n(e, r) ? e[r] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? a : null
                }
            }, {"./_has": 108, "./_shared-key": 148, "./_to-object": 157}],
            136: [function (e, t, i) {
                var n = e("./_has"), o = e("./_to-iobject"), r = e("./_array-includes")(!1),
                    a = e("./_shared-key")("IE_PROTO");
                t.exports = function (e, t) {
                    var i, s = o(e), l = 0, d = [];
                    for (i in s) i != a && n(s, i) && d.push(i);
                    for (; t.length > l;) n(s, i = t[l++]) && (~r(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"), r = e("./_fails");
                t.exports = function (e, t) {
                    var i = (o.Object || {})[e] || Object[e], a = {};
                    a[e] = t(i), n(n.S + n.F * r(function () {
                        i(1)
                    }), "Object", a)
                }
            }, {"./_core": 96, "./_export": 104, "./_fails": 105}],
            140: [function (e, t, i) {
                var n = e("./_object-keys"), o = e("./_to-iobject"), r = e("./_object-pie").f;
                t.exports = function (e) {
                    return function (t) {
                        for (var i, a = o(t), s = n(a), l = s.length, d = 0, u = []; l > d;) r.call(a, i = s[d++]) && u.push(e ? [i, a[i]] : a[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"), r = e("./_new-promise-capability");
                t.exports = function (e, t) {
                    if (n(e), o(t) && t.constructor === e) return t;
                    var i = r.f(e), a = i.resolve;
                    return a(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"), r = e("./_object-dp"), a = e("./_descriptors"),
                    s = e("./_wks")("species");
                t.exports = function (e) {
                    var t = "function" == typeof o[e] ? o[e] : n[e];
                    a && t && !t[s] && r.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"), r = e("./_wks")("toStringTag");
                t.exports = function (e, t, i) {
                    e && !o(e = i ? e : e.prototype, r) && n(e, r, {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"), r = o["__core-js_shared__"] || (o["__core-js_shared__"] = {});
                (t.exports = function (e, t) {
                    return r[e] || (r[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"), r = e("./_wks")("species");
                t.exports = function (e, t) {
                    var i, a = n(e).constructor;
                    return void 0 === a || void 0 == (i = n(a)[r]) ? 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 r, a, s = String(o(t)), l = n(i), d = s.length;
                        return l < 0 || l >= d ? e ? "" : void 0 : (r = s.charCodeAt(l)) < 55296 || r > 56319 || l + 1 === d || (a = s.charCodeAt(l + 1)) < 56320 || a > 57343 ? e ? s.charAt(l) : r : e ? s.slice(l, l + 2) : a - 56320 + (r - 55296 << 10) + 65536
                    }
                }
            }, {"./_defined": 99, "./_to-integer": 154}],
            152: [function (e, t, i) {
                var n, o, r, a = 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()
                        }
                    }, w = 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(a(y, e, 1))
                } : g && g.now ? n = function (e) {
                    g.now(a(y, e, 1))
                } : p ? (o = new p, r = o.port2, o.port1.onmessage = w, n = a(r.postMessage, r, 1)) : u.addEventListener && "function" == typeof postMessage && !u.importScripts ? (n = function (e) {
                    u.postMessage(e + "", "*")
                }, u.addEventListener("message", w, !1)) : n = "onreadystatechange" in d("script") ? function (e) {
                    l.appendChild(d("script")).onreadystatechange = function () {
                        l.removeChild(this), y.call(e)
                    }
                } : function (e) {
                    setTimeout(a(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, r = Math.min;
                t.exports = function (e, t) {
                    return (e = n(e)) < 0 ? o(e + t, 0) : r(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"), r = e("./_library"), a = e("./_wks-ext"),
                    s = e("./_object-dp").f;
                t.exports = function (e) {
                    var t = o.Symbol || (o.Symbol = r ? {} : n.Symbol || {});
                    "_" == e.charAt(0) || e in t || s(t, e, {value: a.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"), r = e("./_global").Symbol, a = "function" == typeof r,
                    s = t.exports = function (e) {
                        return n[e] || (n[e] = a && r[e] || (a ? r : 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"), r = e("./_iterators");
                t.exports = e("./_core").getIteratorMethod = function (e) {
                    if (void 0 != e) return e[o] || e["@@iterator"] || r[n(e)]
                }
            }, {"./_classof": 94, "./_core": 96, "./_iterators": 122, "./_wks": 163}],
            165: [function (e, t, i) {
                "use strict";
                var n = e("./_ctx"), o = e("./_export"), r = e("./_to-object"), a = 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 = r(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 ? a(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"), r = e("./_iterators"),
                    a = e("./_to-iobject");
                t.exports = e("./_iter-define")(Array, "Array", function (e, t) {
                    this._t = a(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"), r.Arguments = r.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"), r = e("./_wks")("hasInstance"),
                    a = Function.prototype;
                r in a || e("./_object-dp").f(a, r, {
                    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, r, a, 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")(),
                    w = e("./_new-promise-capability"), k = e("./_perform"), T = e("./_user-agent"),
                    b = e("./_promise-resolve"), C = l.TypeError, S = l.process, I = S && S.versions,
                    _ = I && I.v8 || "", A = l.Promise, D = "process" == u(S), x = function () {
                    }, N = o = w.f, E = !!function () {
                        try {
                            var t = A.resolve(1), i = (t.constructor = {})[e("./_wks")("species")] = function (e) {
                                e(x, x)
                            };
                            return (D || "function" == typeof PromiseRejectionEvent) && t.then(x) instanceof i && 0 !== _.indexOf("6.6") && -1 === T.indexOf("Chrome/66")
                        } catch (e) {
                        }
                    }(), P = function (e) {
                        var t;
                        return !(!h(e) || "function" != typeof (t = e.then)) && t
                    }, O = function (e, t) {
                        if (!e._n) {
                            e._n = !0;
                            var i = e._c;
                            y(function () {
                                for (var n = e._v, o = 1 == e._s, r = 0, a = function (t) {
                                    var i, r, a, 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(), a = !0)), i === t.promise ? d(C("Promise-chain cycle")) : (r = P(i)) ? r.call(i, l, d) : l(i)) : d(n)
                                    } catch (e) {
                                        u && !a && u.exit(), d(e)
                                    }
                                }; i.length > r;) a(i[r++]);
                                e._c = [], e._n = !1, t && !e._h && M(e)
                            })
                        }
                    }, M = function (e) {
                        v.call(l, function () {
                            var t, i, n, o = e._v, r = F(e);
                            if (r && (t = k(function () {
                                D ? S.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 = D || F(e) ? 2 : 1), e._a = void 0, r && 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;
                            D ? S.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()), O(t, !0))
                    }, B = function (e) {
                        var t, i = this;
                        if (!i._d) {
                            i._d = !0, i = i._w || i;
                            try {
                                if (i === e) throw C("Promise can't be resolved itself");
                                (t = P(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, O(i, !1))
                            } catch (e) {
                                R.call({_w: i, _d: !1}, e)
                            }
                        }
                    };
                E || (A = function (e) {
                    p(this, A, "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")(A.prototype, {
                    then: function (e, t) {
                        var i = N(m(this, A));
                        return i.ok = "function" != typeof e || e, i.fail = "function" == typeof t && t, i.domain = D ? S.domain : void 0, this._c.push(i), this._a && this._a.push(i), this._s && O(this, !1), i.promise
                    }, catch: function (e) {
                        return this.then(void 0, e)
                    }
                }), r = function () {
                    var e = new n;
                    this.promise = e, this.resolve = d(B, e, 1), this.reject = d(R, e, 1)
                }, w.f = N = function (e) {
                    return e === A || e === a ? new r(e) : o(e)
                }), c(c.G + c.W + c.F * !E, {Promise: A}), e("./_set-to-string-tag")(A, "Promise"), e("./_set-species")("Promise"), a = e("./_core").Promise, c(c.S + c.F * !E, "Promise", {
                    reject: function (e) {
                        var t = N(this), i = t.reject;
                        return i(e), t.promise
                    }
                }), c(c.S + c.F * (s || !E), "Promise", {
                    resolve: function (e) {
                        return b(s && this === a ? A : this, e)
                    }
                }), c(c.S + c.F * !(E && e("./_iter-detect")(function (e) {
                    A.all(e).catch(x)
                })), "Promise", {
                    all: function (e) {
                        var t = this, i = N(t), n = i.resolve, o = i.reject, r = k(function () {
                            var i = [], r = 0, a = 1;
                            g(e, !1, function (e) {
                                var s = r++, l = !1;
                                i.push(void 0), a++, t.resolve(e).then(function (e) {
                                    l || (l = !0, i[s] = e, --a || n(i))
                                }, o)
                            }), --a || n(i)
                        });
                        return r.e && o(r.v), i.promise
                    }, race: function (e) {
                        var t = this, i = N(t), n = i.reject, o = k(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"), r = String.fromCharCode,
                    a = String.fromCodePoint;
                n(n.S + n.F * (!!a && 1 != a.length), "String", {
                    fromCodePoint: function (e) {
                        for (var t, i = [], n = arguments.length, a = 0; n > a;) {
                            if (t = +arguments[a++], o(t, 1114111) !== t) throw RangeError(t + " is not a valid code point");
                            i.push(t < 65536 ? r(t) : r(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"), r = e("./_descriptors"), a = 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"),
                    w = e("./_is-object"), k = e("./_to-iobject"), T = e("./_to-primitive"), b = e("./_property-desc"),
                    C = e("./_object-create"), S = e("./_object-gopn-ext"), I = e("./_object-gopd"),
                    _ = e("./_object-dp"), A = e("./_object-keys"), D = I.f, x = _.f, N = S.f, E = n.Symbol, P = n.JSON,
                    O = P && P.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, W = n.QObject, j = !W || !W.prototype || !W.prototype.findChild,
                    G = r && d(function () {
                        return 7 != C(x({}, "a", {
                            get: function () {
                                return x(this, "a", {value: 7}).a
                            }
                        })).a
                    }) ? function (e, t, i) {
                        var n = D(V, t);
                        n && delete V[t], x(e, t, i), n && e !== V && x(V, t, n)
                    } : x, H = function (e) {
                        var t = B[e] = C(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 = T(t, !0), y(i), o(B, t) ? (i.enumerable ? (o(e, M) && e[M][t] && (e[M][t] = !1), i = C(i, {enumerable: b(0, !1)})) : (o(e, M) || x(e, M, b(1, {})), e[M][t] = !0), G(e, t, i)) : x(e, t, i)
                    }, q = function (e, t) {
                        y(e);
                        for (var i, n = m(t = k(t)), o = 0, r = n.length; r > o;) X(e, i = n[o++], t[i]);
                        return e
                    }, Y = function (e) {
                        var t = L.call(this, e = T(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 = k(e), t = T(t, !0), e !== V || !o(B, t) || o(U, t)) {
                            var i = D(e, t);
                            return !i || !o(B, t) || o(e, M) && e[M][t] || (i.enumerable = !0), i
                        }
                    }, Z = function (e) {
                        for (var t, i = N(k(e)), n = [], r = 0; i.length > r;) o(B, t = i[r++]) || t == M || t == l || n.push(t);
                        return n
                    }, Q = function (e) {
                        for (var t, i = e === V, n = N(i ? U : k(e)), r = [], a = 0; n.length > a;) !o(B, t = n[a++]) || i && !o(V, t) || r.push(B[t]);
                        return r
                    };
                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), G(this, e, b(1, i))
                    };
                    return r && j && G(V, e, {configurable: !0, set: t}), H(e)
                }).prototype, "toString", function () {
                    return this._k
                }), I.f = J, _.f = X, e("./_object-gopn").f = S.f = Z, e("./_object-pie").f = Y, e("./_object-gops").f = Q, r && !e("./_library") && s(V, "propertyIsEnumerable", Y, !0), p.f = function (e) {
                    return H(f(e))
                }), a(a.G + a.W + a.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 = A(f.store), ie = 0; te.length > ie;) g(te[ie++]);
                a(a.S + a.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 () {
                        j = !0
                    }, useSimple: function () {
                        j = !1
                    }
                }), a(a.S + a.F * !K, "Object", {
                    create: function (e, t) {
                        return void 0 === t ? C(e) : q(C(e), t)
                    },
                    defineProperty: X,
                    defineProperties: q,
                    getOwnPropertyDescriptor: J,
                    getOwnPropertyNames: Z,
                    getOwnPropertySymbols: Q
                }), P && a(a.S + a.F * (!K || d(function () {
                    var e = E();
                    return "[null]" != O([e]) || "{}" != O({a: e}) || "{}" != O(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], (w(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, O.apply(P, 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"), r = e("./_global"), a = e("./_species-constructor"),
                    s = e("./_promise-resolve");
                n(n.P + n.R, "Promise", {
                    finally: function (e) {
                        var t = a(this, o.Promise || r.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"), r = e("./_perform");
                n(n.S, "Promise", {
                    try: function (e) {
                        var t = o.f(this), i = r(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"), r = e("./_iterators"), a = 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[a] && o(c, a, d), r[d] = r.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"), r = (n = o) && n.__esModule ? n : {default: n};

                    function a(e) {
                        return Object.prototype.toString.call(e)
                    }

                    i.isArray = function (e) {
                        return Array.isArray ? Array.isArray(e) : "[object Array]" === a(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, r.default)(e))
                    }, i.isUndefined = function (e) {
                        return void 0 === e
                    }, i.isRegExp = function (e) {
                        return "[object RegExp]" === a(e)
                    }, i.isObject = function (e) {
                        return "object" === (void 0 === e ? "undefined" : (0, r.default)(e)) && null !== e
                    }, i.isDate = function (e) {
                        return "[object Date]" === a(e)
                    }, i.isError = function (e) {
                        return "[object Error]" === a(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, r.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"), r = (n = o) && n.__esModule ? n : {default: n};
                !function (e) {
                    var n, o, a,
                        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, a = /[^-+\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, r.default)(u)) ? void 0 === u ? "undefined" : (0, r.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"](),
                                w = e[h + "Seconds"](), k = e[h + "Milliseconds"](), T = i ? 0 : e.getTimezoneOffset(),
                                b = 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), C = function (e) {
                                    var t = e.getDay();
                                    return 0 === t && (t = 7), t
                                }(e), S = {
                                    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: w,
                                    ss: l(w),
                                    l: l(k, 3),
                                    L: l(Math.round(k / 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(a, ""),
                                    o: (T > 0 ? "-" : "+") + l(100 * Math.floor(Math.abs(T) / 60) + Math.abs(T) % 60, 4),
                                    S: ["th", "st", "nd", "rd"][f % 10 > 3 ? 0 : (f % 100 - f % 10 != 10) * f % 10],
                                    W: b,
                                    N: C
                                };
                            return t.replace(n, function (e) {
                                return e in S ? S[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, r.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, r = 0;
                            e[0].replace(/%[a-zA-Z%]/g, function (e) {
                                "%%" !== e && "%c" === e && (r = ++o)
                            }), e.splice(r, 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, r = o - (n || o);
                            e.diff = r, e.prev = n, e.curr = o, n = o;
                            for (var a = new Array(arguments.length), s = 0; s < a.length; s++) a[s] = arguments[s];
                            a[0] = i.coerce(a[0]), "string" != typeof a[0] && a.unshift("%O");
                            var l = 0;
                            a[0] = a[0].replace(/%([a-zA-Z%])/g, function (t, n) {
                                if ("%%" === t) return t;
                                l++;
                                var o = i.formatters[n];
                                if ("function" == typeof o) {
                                    var r = a[l];
                                    t = o.call(e, r), a.splice(l, 1), l--
                                }
                                return t
                            }), i.formatArgs.call(e, a);
                            var d = t.log || i.log || console.log.bind(console);
                            d.apply(e, a)
                        }
                    }

                    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"),
                    r = "function" == typeof Symbol && "symbol" == typeof Symbol(), a = 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]" !== a.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] : {}, a = n(t);
                        r && (a = a.concat(Object.getOwnPropertySymbols(t))), o(a, 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,
                    r = Object.getPrototypeOf || function (e) {
                        return e.__proto__
                    }, a = void 0, s = "undefined" == typeof Uint8Array ? void 0 : r(Uint8Array), l = {
                        "$ %Array%": Array,
                        "$ %ArrayBuffer%": "undefined" == typeof ArrayBuffer ? void 0 : ArrayBuffer,
                        "$ %ArrayBufferPrototype%": "undefined" == typeof ArrayBuffer ? void 0 : ArrayBuffer.prototype,
                        "$ %ArrayIteratorPrototype%": o ? r([][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%": a && o && Symbol.asyncIterator ? a[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 ? r(r([][Symbol.iterator]())) : void 0,
                        "$ %JSON%": JSON,
                        "$ %JSONParse%": JSON.parse,
                        "$ %Map%": "undefined" == typeof Map ? void 0 : Map,
                        "$ %MapIteratorPrototype%": "undefined" != typeof Map && o ? r((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 ? r((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 ? r(""[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"), r = e("object-keys"), a = 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), w = p.preventExtensions,
                    k = e("has-symbols")(), T = e("./helpers/assertRecord"), b = e("./helpers/isNaN"),
                    C = e("./helpers/isFinite"), S = Math.pow(2, 32) - 1, I = g.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1,
                    _ = e("./helpers/assign"), A = e("./helpers/sign"), D = e("./helpers/mod"),
                    x = e("./helpers/isPrimitive"), N = e("./helpers/forEach"), E = e("./helpers/every"),
                    P = e("./helpers/isSamePropertyDescriptor"), O = 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]$/), W = F(v.prototype.exec),
                    j = ["", "​", ""].join(""), G = new v("[" + j + "]", "g"), H = F(v.prototype.test, G),
                    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 = k && F(s("%SymbolPrototype%").toString), te = Math.floor, ie = Math.abs, ne = p.create,
                    oe = p.getOwnPropertyDescriptor, re = p.getOwnPropertyNames, ae = 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(a(e) + " is not a function");
                            return e.apply(t, i)
                        }, ToPrimitive: o, ToNumber: function (e) {
                            var t = x(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 (b(t) || 0 === t || !C(t)) return 0;
                            var i = A(t) * te(ie(t));
                            return D(i, 256)
                        }, ToUint8Clamp: function (e) {
                            var t = this.ToNumber(e);
                            if (b(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 > I ? I : 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: w ? function (e) {
                            return !x(e) && se(e)
                        } : function (e) {
                            return !0
                        }, IsInteger: function (e) {
                            if ("number" != typeof e || b(e) || !C(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 (k) {
                                var t = e[m.match];
                                if (void 0 !== t) return pe.ToBoolean(t)
                            }
                            return ge(e)
                        }, SameValueZero: function (e, t) {
                            return e === t || b(e) && b(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 " + a(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 = k && 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;
                            T(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 T(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 (k && "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 (!k) 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 r = this.Call(o, e, [])
                            } catch (e) {
                                throw i = n(), n = null, e
                            }
                            if (i = n(), n = null, "Object" !== this.Type(r)) 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 W(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) && k && 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), r = n && (!n.writable || !n.configurable);
                            return !(r || !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 > I) 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 r = X(e, t + 1);
                            return r < 56320 || r > 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 = O(this, i) ? i : this.ToPropertyDescriptor(i);
                            if (!O(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 r(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 (!w) throw new u("SetIntegrityLevel requires native `Object.preventExtensions` support");
                            var i = w(e);
                            if (!i) return !1;
                            if (!re) throw new u("SetIntegrityLevel requires native `Object.getOwnPropertyNames` support");
                            var n = re(e), o = this;
                            return "sealed" === t ? N(n, function (t) {
                                o.DefinePropertyOrThrow(e, t, {configurable: !1})
                            }) : "frozen" === t && N(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 = re(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 = k && 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 r = this.Type(e);
                            if ("Undefined" !== r && "Object" !== r) 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 (!O(this, n)) throw new l("Assertion failed: Desc must be a Property Descriptor");
                            if ("Undefined" !== this.Type(o) && !O(this, o)) throw new l("Assertion failed: current must be a Property Descriptor, or undefined");
                            if ("Undefined" !== r && !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" !== r && 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" !== r) return ue(this, e, t, n)
                                }
                                return !0
                            }
                            if (this.IsGenericDescriptor(n) && !("[[Configurable]]" in n) && !("[[Enumerable]]" in n)) return !0;
                            if (P(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" !== r && ue(this, e, t, {
                                    "[[Configurable]]": o["[[Configurable]]"],
                                    "[[Enumerable]]": o["[[Enumerable]]"],
                                    "[[Get]]": void 0
                                }) : "Undefined" !== r && 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" === r || 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 (!O(this, i)) throw new l("Assertion failed: Desc must be a Property Descriptor");
                            var n = oe(e, t), o = n && this.ToPropertyDescriptor(n), r = this.IsExtensible(e);
                            return this.ValidateAndApplyPropertyDescriptor(e, t, r, 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 > S) 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 (!O(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 r = this.OrdinaryGetOwnProperty(e, "length");
                            if (!this.IsDataDescriptor(r)) throw new l("Assertion failed: an array had a non-data descriptor on `length`");
                            var a, s = r["[[Value]]"];
                            if (n >= s) return this.OrdinaryDefineOwnProperty(e, "length", i);
                            if (!r["[[Writable]]"]) return !1;
                            "[[Writable]]" in i && !i["[[Writable]]"] ? (a = !1, i["[[Writable]]"] = !0) : a = !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, !a)) return i["[[Writable]]"] = !1, this.OrdinaryDefineOwnProperty(e, "length", i), !1
                            }
                            return !!a || 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), r = this.ToString(o), a = "<" + t;
                            if ("" !== i) {
                                var s = this.ToString(n), d = fe(s, /\x22/g, "&quot;");
                                a += " " + i + '="' + d + '"'
                            }
                            return a + ">" + r + "</" + t + ">"
                        }, GetOwnPropertyKeys: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if ("Symbol" === t) return k && ae ? ae(e) : [];
                            if ("String" === t) return re ? re(e) : r(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 r = 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 " + a(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 " + a(n));
                            if ("String" !== this.Type(o)) throw new l("Assertion failed: `replacement` must be a String");
                            for (var u = i + r, 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 w = v + y, k = M(w, 10) - 1;
                                            h += w <= c && "Undefined" === this.Type(n[k]) ? "" : n[k], f += 2
                                        } else h += "$"; else {
                                            var T = M(v, 10);
                                            h += T <= c && "Undefined" === this.Type(n[T - 1]) ? "" : n[T - 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%"), r = e("has-symbols")(), a = 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({}, a), {
                        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 (r) 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 = [], a = !0; a;) if (a = this.IteratorStep(n)) {
                                    var s = this.IteratorValue(a);
                                    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%"), r = n("%TypeError%"), a = 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(a.prototype.slice), w = function (e, t) {
                        return e === t || !(e.length > t.length) && y(t, 0, e.length) === e
                    }, k = {
                        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 a(e)
                        }, ToObject: function (e) {
                            return this.CheckObjectCoercible(e), o(e)
                        }, CheckObjectCoercible: function (e, t) {
                            if (null == e) throw new r(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 r("FromPropertyDescriptor must be called with a fully populated Property Descriptor")
                        }, ToPropertyDescriptor: function (e) {
                            if ("Object" !== this.Type(e)) throw new r("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 r("setter must be a function");
                                t["[[Set]]"] = n
                            }
                            if ((m(t, "[[Get]]") || m(t, "[[Set]]")) && (m(t, "[[Value]]") || m(t, "[[Writable]]"))) throw new r("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 r("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 a = "String" === this.Type(n) && "String" === this.Type(o);
                            if (!a) {
                                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 !w(o, n) && (!!w(n, o) || n < o)
                        }
                    };
                t.exports = k
            }, {
                "./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%"), r = n("%SyntaxError%"), a = 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 (a(t, n) && !i[n]) return !1;
                        var r = a(t, "[[Value]]"), s = a(t, "[[Get]]") || a(t, "[[Set]]");
                        if (r && s) throw new o("Property Descriptors may not be both accessor and data descriptors");
                        return !0
                    }
                };
                t.exports = function (e, t, i, n) {
                    var a = s[t];
                    if ("function" != typeof a) throw new r("unknown record type: " + t);
                    if (!a(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"), r = n("%Object%").assign;
                t.exports = function (e, t) {
                    if (r) return r(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"), r = o("%Function%"), a = r.apply, s = r.call;
                t.exports = function () {
                    return n.apply(s, arguments)
                }, t.exports.apply = function () {
                    return n.apply(a, 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"), r = 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 r("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, r = Object.prototype.toString, a = 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]" === r.call(e), n = a(e),
                            s = t && "[object String]" === r.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), w = 0; w < u.length; ++w) y && "constructor" === u[w] || !o.call(e, u[w]) || h.push(u[w]);
                        return h
                    }
                }
                t.exports = n
            }, {"./isArguments": 210}],
            209: [function (e, t, i) {
                "use strict";
                var n = Array.prototype.slice, o = e("./isArguments"), r = Object.keys, a = r ? function (e) {
                    return r(e)
                } : e("./implementation"), s = Object.keys;
                a.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 = a;
                    return Object.keys || a
                }, t.exports = a
            }, {"./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"), r = e("is-callable"), a = 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 (!r(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 && (a(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, a, s = "string" === t ? ["toString", "valueOf"] : ["valueOf", "toString"];
                        for (a = 0; a < s.length; ++a) if (i = e[s[a]], r(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"), r = e("is-callable"), a = {
                    "[[DefaultValue]]": function (e) {
                        var t;
                        if ((t = arguments.length > 1 ? arguments[1] : "[object Date]" === n.call(e) ? String : Number) === String || t === Number) {
                            var i, a, s = t === String ? ["toString", "valueOf"] : ["valueOf", "toString"];
                            for (a = 0; a < s.length; ++a) if (r(e[s[a]]) && (i = e[s[a]](), 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 ? a["[[DefaultValue]]"](e, arguments[1]) : a["[[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 r = "", a = 0, s = 0;
                    for (a = o.index; a < i.length; a++) {
                        switch (i.charCodeAt(a)) {
                            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 !== a && (r += i.substring(s, a)), s = a + 1, r += t
                    }
                    return s !== a ? r + i.substring(s, a) : r
                }
            }, {}],
            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 r(e) {
                    return "object" == typeof e && null !== e
                }

                function a(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 || r(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 (a(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 (r(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] ? r(this._events[e]) ? this._events[e].push(t) : this._events[e] = [this._events[e], t] : this._events[e] = t, r(this._events[e]) && !this._events[e].warned && (i = a(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, a, s;
                    if (!o(t)) throw TypeError("listener must be a function");
                    if (!this._events || !this._events[e]) return this;
                    if (i = this._events[e], a = 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 (r(i)) {
                        for (s = a; 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 r = e.length;
                    if (r === +r) for (var a = 0; a < r; a++) t.call(i, e[a], a, 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, r = n.call(arguments, 1), a = Math.max(0, t.length - r.length), s = [], l = 0; l < a; 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, r.concat(n.call(arguments)));
                            return Object(o) === o ? o : this
                        }
                        return t.apply(e, r.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 r in n) n.hasOwnProperty(r) && (o[r] = n[r]);
                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 r, a, 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, r = f & (1 << -u) - 1, f >>= -u, u += s; u > 0; r = 256 * r + e[t + c], c += h, u -= 8) ;
                    for (a = r & (1 << -u) - 1, r >>= -u, u += n; u > 0; a = 256 * a + e[t + c], c += h, u -= 8) ;
                    if (0 === r) r = 1 - d; else {
                        if (r === l) return a ? NaN : 1 / 0 * (f ? -1 : 1);
                        a += Math.pow(2, n), r -= d
                    }
                    return (f ? -1 : 1) * a * Math.pow(2, r - n)
                }, i.write = function (e, t, i, n, o, r) {
                    var a, s, l, d = 8 * r - o - 1, u = (1 << d) - 1, c = u >> 1,
                        h = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, f = n ? 0 : r - 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, a = u) : (a = Math.floor(Math.log(t) / Math.LN2), t * (l = Math.pow(2, -a)) < 1 && (a--, l *= 2), (t += a + c >= 1 ? h / l : h * Math.pow(2, 1 - c)) * l >= 2 && (a++, l /= 2), a + c >= u ? (s = 0, a = u) : a + c >= 1 ? (s = (t * l - 1) * Math.pow(2, o), a += c) : (s = t * Math.pow(2, c - 1) * Math.pow(2, o), a = 0)); o >= 8; e[i + f] = 255 & s, f += p, s /= 256, o -= 8) ;
                    for (a = a << o | s, d += o; d > 0; e[i + f] = 255 & a, f += p, a /= 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/, r = function (e) {
                        try {
                            var t = n.call(e);
                            return o.test(t)
                        } catch (e) {
                            return !1
                        }
                    }, a = 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 !r(e) && (n.call(e), !0)
                        } catch (e) {
                            return !1
                        }
                    }(e);
                    if (r(e)) return !1;
                    var t = a.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,
                    r = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
                t.exports = function (e) {
                    return "object" == typeof e && null !== e && (r ? 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, r = Object.getOwnPropertyDescriptor,
                    a = 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]" === a.call(e);
                    var t = r(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 r = Symbol.prototype.toString, a = /^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() && a.test(r.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"), r = 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 = r, 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 a = Math.pow(2, 31);
                i.int = function (e) {
                    return n.isNumber(e) && e % 1 == 0
                }, i.int32 = function (e) {
                    return i.int(e) && e < a && e >= -a
                }, i.long = function (e) {
                    return i.int(e) && (e >= a || e < -a)
                }, 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 r(e) {
                    return o(e) && "function" == typeof e._read && "object" == typeof e._readableState
                }

                function a(e) {
                    return o(e) && "function" == typeof e._write && "object" == typeof e._writableState
                }

                t.exports = o, t.exports.isReadable = r, t.exports.isWritable = a, t.exports.isDuplex = function (e) {
                    return r(e) && a(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 r = Object.getOwnPropertyDescriptor(t, o);
                            Object.defineProperty(e, o, r)
                        }
                    }), e
                };
                var n = Object.prototype.hasOwnProperty
            }, {}],
            238: [function (e, t, i) {
                var n = 1e3, o = 60 * n, r = 60 * o, a = 24 * r, s = 365.25 * a;

                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 * a;
                                    case"hours":
                                    case"hour":
                                    case"hrs":
                                    case"hr":
                                    case"h":
                                        return i * r;
                                    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, a, "day") || l(i, r, "hour") || l(i, o, "minute") || l(i, n, "second") || i + " ms" : function (e) {
                        return e >= a ? Math.round(e / a) + "d" : e >= r ? Math.round(e / r) + "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,
                    r = n && o && "function" == typeof o.get ? o.get : null, a = 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 && w(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]" === b(e)
                }

                function w(e) {
                    return "[object Symbol]" === b(e)
                }

                t.exports = function e(t, i, n, o) {
                    if (i || (i = {}), T(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, C), "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, r) {
                        return r && (o = o.slice()).push(r), 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 (w(t)) {
                        var k = Symbol.prototype.toString.call(t);
                        return "object" == typeof t ? S(k) : k
                    }
                    if ((s = t) && "object" == typeof s && ("undefined" != typeof HTMLElement && s instanceof HTMLElement || "string" == typeof s.nodeName && "function" == typeof s.getAttribute)) {
                        for (var A = "<" + String(t.nodeName).toLowerCase(), D = t.attributes || [], x = 0; x < D.length; x++) A += " " + D[x].name + "=" + m(v(D[x].value), "double", i);
                        return A += ">", t.childNodes && t.childNodes.length && (A += "..."), A += "</" + String(t.nodeName).toLowerCase() + ">"
                    }
                    if (y(t)) return 0 === t.length ? "[]" : "[ " + _(t, h).join(", ") + " ]";
                    if (function (e) {
                        return "[object Error]" === b(e)
                    }(t)) {
                        var N = _(t, h);
                        return 0 === N.length ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + N.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 (!r) return !1;
                        try {
                            r.call(e);
                            try {
                                d.call(e)
                            } catch (e) {
                                return !0
                            }
                            return e instanceof Map
                        } catch (e) {
                        }
                        return !1
                    }(t)) {
                        var N = [];
                        return a.call(t, function (e, i) {
                            N.push(h(i, t) + " => " + h(e, t))
                        }), I("Map", r.call(t), N)
                    }
                    if (function (e) {
                        if (!d) return !1;
                        try {
                            d.call(e);
                            try {
                                r.call(e)
                            } catch (e) {
                                return !0
                            }
                            return e instanceof Set
                        } catch (e) {
                        }
                        return !1
                    }(t)) {
                        var N = [];
                        return u.call(t, function (e) {
                            N.push(h(e, t))
                        }), I("Set", d.call(t), N)
                    }
                    if (function (e) {
                        return "[object Number]" === b(e)
                    }(t)) return S(h(Number(t)));
                    if (function (e) {
                        return "[object BigInt]" === b(e)
                    }(t)) return S(h(f.call(t)));
                    if (function (e) {
                        return "[object Boolean]" === b(e)
                    }(t)) return S(c.call(t));
                    if (function (e) {
                        return "[object String]" === b(e)
                    }(t)) return S(h(String(t)));
                    if (!function (e) {
                        return "[object Date]" === b(e)
                    }(t) && !function (e) {
                        return "[object RegExp]" === b(e)
                    }(t)) {
                        var E = _(t, h);
                        return 0 === E.length ? "{}" : "{ " + E.join(", ") + " }"
                    }
                    return String(t)
                };
                var k = Object.prototype.hasOwnProperty || function (e) {
                    return e in this
                };

                function T(e, t) {
                    return k.call(e, t)
                }

                function b(e) {
                    return h.call(e)
                }

                function C(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 S(e) {
                    return "Object(" + e + ")"
                }

                function I(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] = T(e, o) ? t(e[o], e) : ""
                    }
                    for (var r in e) T(e, r) && (i && String(Number(r)) === r && r < e.length || (/[^\w$]/.test(r) ? n.push(t(r, e) + ": " + t(e[r], e)) : n.push(r + ": " + t(e[r], e))));
                    return n
                }
            }, {"./util.inspect": 68}],
            240: [function (e, t, i) {
                "use strict";
                var n = Object.prototype.hasOwnProperty, o = Object.prototype.toString, r = Array.prototype.slice,
                    a = 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), r = a(e),
                            s = t && "[object String]" === o.call(e), h = [];
                        if (!t && !i && !r) 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 (r && 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), w = 0; w < u.length; ++w) y && "constructor" === u[w] || !n.call(e, u[w]) || h.push(u[w]);
                        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 a(e) ? t(r.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, r = Object.getOwnPropertyDescriptor,
                    a = 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(a(e), s(e))
                    } : a, c = n.IsCallable(r) && n.IsCallable(a);
                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, a, s, l = r(t, i);
                        return void 0 !== l && (n = e, a = i, s = l, o && a in n ? o(n, a, {
                            configurable: !0,
                            enumerable: !0,
                            value: s,
                            writable: !0
                        }) : n[a] = s), e
                    }, {})
                }
            }, {"es-abstract/es7": 195}],
            243: [function (e, t, i) {
                "use strict";
                var n = e("define-properties"), o = e("./implementation"), r = e("./polyfill"), a = e("./shim");
                n(o, {getPolyfill: r, implementation: o, shim: a}), 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, r = arguments.length - 1; r >= -1 && !o; r--) {
                            var a = r >= 0 ? arguments[r] : e.cwd();
                            if ("string" != typeof a) throw new TypeError("Arguments to path.resolve must be strings");
                            a && (i = a + "/" + i, o = "/" === a.charAt(0))
                        }
                        return i = t(n(i.split("/"), function (e) {
                            return !!e
                        }), !o).join("/"), (o ? "/" : "") + i || "."
                    }, i.normalize = function (e) {
                        var r = i.isAbsolute(e), a = "/" === o(e, -1);
                        return (e = t(n(e.split("/"), function (e) {
                            return !!e
                        }), !r).join("/")) || r || (e = "."), e && a && (e += "/"), (r ? "/" : "") + 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("/")), r = n(t.split("/")), a = Math.min(o.length, r.length), s = a, l = 0; l < a; l++) if (o[l] !== r[l]) {
                            s = l;
                            break
                        }
                        for (var d = [], l = s; l < o.length; l++) d.push("..");
                        return (d = d.concat(r.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, r = e.length - 1; r >= 1; --r) if (47 === (t = e.charCodeAt(r))) {
                            if (!o) {
                                n = r;
                                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, r = 0, a = e.length - 1; a >= 0; --a) {
                            var s = e.charCodeAt(a);
                            if (47 !== s) -1 === n && (o = !1, n = a + 1), 46 === s ? -1 === t ? t = a : 1 !== r && (r = 1) : -1 !== t && (r = -1); else if (!o) {
                                i = a + 1;
                                break
                            }
                        }
                        return -1 === t || -1 === n || 0 === r || 1 === r && 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,
                            r = n[typeof i] && i, a = n[typeof t] && t && !t.nodeType && t,
                            s = r && a && "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 = w(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 w(e) {
                            return String(e).replace(/^ +| +$/g, "")
                        }

                        var k = function e(t) {
                            var i = o, n = t && "object" == typeof t && "String" != m(t);
                            n && (i = t, t = null);
                            var r = i.navigator || {}, a = r.userAgent || "";
                            t || (t = a);
                            var s, l, u, c, f, k,
                                T = n ? !!r.likeChrome : /\bChrome\b/.test(t) && !/internal|\n/i.test(h.toString()),
                                b = n ? "Object" : "ScriptBridgingProxyObject", C = n ? "Object" : "Environment",
                                S = n && i.java ? "JavaPackage" : m(i.java), I = n ? "Object" : "RuntimeObject",
                                _ = /\bJava/.test(S) && i.java, A = _ && m(i.environment) == C, D = _ ? "a" : "α",
                                x = _ ? "b" : "β", N = i.document || {}, E = i.operamini || i.opera,
                                P = d.test(P = n && E ? E["[[Class]]"] : m(E)) ? P : E = null, O = t, M = [], F = null,
                                L = t == a, 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 = j([{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}
                                }), W = 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 j(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 = j([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"), W = "iOS" + ((s = / OS ([\d_]+)/i.exec(t)) ? " " + s[1].replace(/_/g, ".") : "")) : "Konqueror" != U || /buntu/i.test(W) ? K && "Google" != K && (/Chrome/.test(U) && !/\bMobile Safari\b/i.test(t) || /\bVita\b/.test(V)) || /\bAndroid\b/.test(W) && /^Chrome/.test(U) && /\bVersion\//i.test(t) ? (U = "Android Browser", W = /\bAndroid\b/.test(W) ? W : "Android") : "Silk" == U ? (/\bMobi/i.test(t) || (W = "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)) ? (W || (W = "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 || W) && (V || K || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(W)) && (U = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(W) ? W : s) + " Browser")) : "Electron" == U && (s = (/\bChrome\/([\d.]+)\b/.exec(t) || 0)[1]) && M.push("Chromium " + s) : W = "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" == W ? "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", W = "Windows Phone " + (/\+$/.test(s) ? s : s + ".x"), M.unshift("desktop mode")) : /\bWPDesktop\b/i.test(t) ? (U = "IE Mobile", W = "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", k = null != (c = i) ? typeof c[f] : "number", /^(?:boolean|number|string|undefined)$/.test(k) || "object" == k && !c[f]) m(s = i.runtime) == b ? (U = "Adobe AIR", W = s.flash.system.Capabilities.os) : m(s = i.phantom) == I ? (U = "PhantomJS", R = (s = s.version || null) && s.major + "." + s.minor + "." + s.patch) : "number" == typeof N.documentMode && (s = /\bTrident\/(\d+)/i.exec(t)) ? (R = [R, N.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 N.documentMode && /^(?:Chrome|Firefox)\b/.test(U) && (M.push("masking as " + U + " " + R), U = "IE", R = "11.0", B = ["Trident"], W = "Windows"); else if (_ && (s = _.lang.System, O = s.getProperty("os.arch"), W = W || s.getProperty("os.name") + " " + s.getProperty("os.version")), A) {
                                    try {
                                        R = i.require("ringo/engine").version.join("."), U = "RingoJS"
                                    } catch (e) {
                                        (s = i.system) && s.global.system == i.system && (U = "Narwhal", W || (W = 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", O = s.arch, W = s.platform, R = (R = /[\d.]+/.exec(s.version)) ? R[0] : null));
                                W = W && p(W)
                            }
                            if (R && (s = /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(R) || /(?:alpha|beta)(?: ?\d)?/i.exec(t + ";" + (L && r.appMinorVersion)) || /\bMinefield\b/i.test(t) && "a") && (F = /b/i.test(s) ? "beta" : "alpha", R = R.replace(RegExp(s + "\\+?$"), "") + ("beta" == F ? x : D) + (/\d+\+?/.exec(s) || "")), "Fennec" == U || "Firefox" == U && /\b(?:Android|Firefox OS)\b/.test(W)) U = "Firefox Mobile"; else if ("Maxthon" == U && R) R = R.replace(/\.[\d.]+/, ".x"); else if (/\bXbox\b/i.test(V)) "Xbox 360" == V && (W = 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" != W && !/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)], W = (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(W) || "IE" == U && (W && !/^Win/.test(W) && R > 5.5 || /\bWindows XP\b/.test(W) && 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" == W && (W = null), s = "identify" + s) : (s = "mask" + s, U = P ? p(P.replace(/([a-z])([A-Z])/g, "$1 $2")) : "Opera", /\bIE\b/.test(s) && (W = 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 && (T || 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(W)) ? (U += " ", M.unshift("desktop mode"), "zvav" == s ? (U += "Mini", R = null) : U += "Mobile", W = W.replace(RegExp(" *" + s + "$"), "")) : "Safari" == U && /\bChrome\b/.exec(B && B[1]) && (M.unshift("desktop mode"), U = "Chrome Mobile", R = null, /\bOS X\b/.test(W) ? (K = "Apple", W = "iOS 4.3+") : W = null), R && 0 == R.indexOf(s = /[\d.]+$/.exec(W)) && t.indexOf("/" + s + "-") > -1 && (W = w(W.replace(s, ""))), B && !/\b(?:Avant|Nook)\b/.test(U) && (/Browser|Lunascape|Maxthon/.test(U) || "Safari" != U && /^iOS/.test(W) && /\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), W && (s = / ([\d.+]+)$/.exec(W), l = s && "/" == W.charAt(W.length - s[0].length - 1), W = {
                                architecture: 32,
                                family: s && !l ? W.replace(s[0], "") : W,
                                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(O)) && !/\bi686\b/i.test(O) ? (W && (W.architecture = 64, W.family = W.family.replace(RegExp(" *" + s), "")), U && (/\bWOW64\b/i.test(t) || L && /\w(?:86|32)$/.test(r.cpuClass || r.platform) && !/\bWin64; x64\b/i.test(t)) && M.unshift("32-bit")) : W && /^OS X/.test(W.family) && "Chrome" == U && parseFloat(R) >= 39 && (W.architecture = 64), t || (t = null);
                            var G = {};
                            return G.description = t, G.layout = B && B[0], G.manufacturer = K, G.name = U, G.prerelease = F, G.product = V, G.ua = t, G.version = U && R, G.os = W || {
                                architecture: null,
                                family: null,
                                version: null,
                                toString: function () {
                                    return "null"
                                }
                            }, G.parse = e, G.toString = function () {
                                return this.description || ""
                            }, G.version && M.unshift(R), G.name && M.unshift(U), W && U && (W != String(W).split(" ")[0] || W != U.split(" ")[0] && !V) && M.push(V ? "(" + W + ")" : "on " + W), M.length && (G.description = M.join(" ")), G
                        }();
                        "function" == typeof define && "object" == typeof define.amd && define.amd ? (o.platform = k, define(function () {
                            return k
                        })) : r && a ? g(k, function (e, t) {
                            r[t] = e
                        }) : o.platform = k
                    }).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 r, a, 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 (r = new Array(s - 1), a = 0; a < r.length;) r[a++] = arguments[a];
                                    return e.nextTick(function () {
                                        t.apply(null, r)
                                    })
                            }
                        }
                    } : t.exports = e
                }).call(this, e("_process"))
            }, {_process: 249}],
            249: [function (e, t, i) {
                var n, o, r = t.exports = {};

                function a() {
                    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 === a || !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 : a
                    } catch (e) {
                        n = a
                    }
                    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() {
                }

                r.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)
                }, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version = "", r.versions = {}, r.on = m, r.addListener = m, r.once = m, r.off = m, r.removeListener = m, r.removeAllListeners = m, r.emit = m, r.prependListener = m, r.prependOnceListener = m, r.listeners = function (e) {
                    return []
                }, r.binding = function (e) {
                    throw new Error("process.binding is not supported")
                }, r.cwd = function () {
                    return "/"
                }, r.chdir = function (e) {
                    throw new Error("process.chdir is not supported")
                }, r.umask = function () {
                    return 0
                }
            }, {}],
            250: [function (e, t, i) {
                (function (e) {
                    !function (n) {
                        var o = "object" == typeof i && i && !i.nodeType && i,
                            r = "object" == typeof t && t && !t.nodeType && t, a = "object" == typeof e && e;
                        a.global !== a && a.window !== a && a.self !== a || (n = a);
                        var s, l, d = 2147483647, u = 36, c = 1, h = 26, f = 38, p = 700, g = 72, m = 128, v = "-",
                            y = /^xn--/, w = /[^\x20-\x7E]/, k = /[\x2E\u3002\uFF0E\uFF61]/g, T = {
                                overflow: "Overflow: input needs wider integers to process",
                                "not-basic": "Illegal input >= 0x80 (not a basic code point)",
                                "invalid-input": "Invalid input"
                            }, b = u - c, C = Math.floor, S = String.fromCharCode;

                        function I(e) {
                            throw new RangeError(T[e])
                        }

                        function _(e, t) {
                            for (var i = e.length, n = []; i--;) n[i] = t(e[i]);
                            return n
                        }

                        function A(e, t) {
                            var i = e.split("@"), n = "";
                            i.length > 1 && (n = i[0] + "@", e = i[1]);
                            var o = (e = e.replace(k, ".")).split("."), r = _(o, t).join(".");
                            return n + r
                        }

                        function D(e) {
                            for (var t, i, n = [], o = 0, r = e.length; o < r;) (t = e.charCodeAt(o++)) >= 55296 && t <= 56319 && o < r ? 56320 == (64512 & (i = e.charCodeAt(o++))) ? n.push(((1023 & t) << 10) + (1023 & i) + 65536) : (n.push(t), o--) : n.push(t);
                            return n
                        }

                        function x(e) {
                            return _(e, function (e) {
                                var t = "";
                                return e > 65535 && (t += S((e -= 65536) >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += S(e)
                            }).join("")
                        }

                        function N(e, t) {
                            return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
                        }

                        function E(e, t, i) {
                            var n = 0;
                            for (e = i ? C(e / p) : e >> 1, e += C(e / t); e > b * h >> 1; n += u) e = C(e / b);
                            return C(n + (b + 1) * e / (e + f))
                        }

                        function P(e) {
                            var t, i, n, o, r, a, s, l, f, p, y, w = [], k = e.length, T = 0, b = m, S = g;
                            for ((i = e.lastIndexOf(v)) < 0 && (i = 0), n = 0; n < i; ++n) e.charCodeAt(n) >= 128 && I("not-basic"), w.push(e.charCodeAt(n));
                            for (o = i > 0 ? i + 1 : 0; o < k;) {
                                for (r = T, a = 1, s = u; o >= k && I("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 > C((d - T) / a)) && I("overflow"), T += l * a, !(l < (f = s <= S ? c : s >= S + h ? h : s - S)); s += u) a > C(d / (p = u - f)) && I("overflow"), a *= p;
                                t = w.length + 1, S = E(T - r, t, 0 == r), C(T / t) > d - b && I("overflow"), b += C(T / t), T %= t, w.splice(T++, 0, b)
                            }
                            return x(w)
                        }

                        function O(e) {
                            var t, i, n, o, r, a, s, l, f, p, y, w, k, T, b, _ = [];
                            for (e = D(e), w = e.length, t = m, i = 0, r = g, a = 0; a < w; ++a) (y = e[a]) < 128 && _.push(S(y));
                            for (n = o = _.length, o && _.push(v); n < w;) {
                                for (s = d, a = 0; a < w; ++a) (y = e[a]) >= t && y < s && (s = y);
                                for (s - t > C((d - i) / (k = n + 1)) && I("overflow"), i += (s - t) * k, t = s, a = 0; a < w; ++a) if ((y = e[a]) < t && ++i > d && I("overflow"), y == t) {
                                    for (l = i, f = u; !(l < (p = f <= r ? c : f >= r + h ? h : f - r)); f += u) b = l - p, T = u - p, _.push(S(N(p + b % T, 0))), l = C(b / T);
                                    _.push(S(N(l, 0))), r = E(i, k, n == o), i = 0, ++n
                                }
                                ++i, ++t
                            }
                            return _.join("")
                        }

                        if (s = {
                            version: "1.4.1",
                            ucs2: {decode: D, encode: x},
                            decode: P,
                            encode: O,
                            toASCII: function (e) {
                                return A(e, function (e) {
                                    return w.test(e) ? "xn--" + O(e) : e
                                })
                            },
                            toUnicode: function (e) {
                                return A(e, function (e) {
                                    return y.test(e) ? P(e.slice(4).toLowerCase()) : e
                                })
                            }
                        }, "function" == typeof define && "object" == typeof define.amd && define.amd) define("punycode", function () {
                            return s
                        }); else if (o && r) if (t.exports == o) r.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, r) {
                    t = t || "&", i = i || "=";
                    var a = {};
                    if ("string" != typeof e || 0 === e.length) return a;
                    var s = /\+/g;
                    e = e.split(t);
                    var l = 1e3;
                    r && "number" == typeof r.maxKeys && (l = r.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(a, f) ? o(a[f]) ? a[f].push(p) : a[f] = [a[f], p] : a[f] = p
                    }
                    return a
                };
                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 ? r(a(e), function (a) {
                        var s = encodeURIComponent(n(a)) + i;
                        return o(e[a]) ? r(e[a], function (e) {
                            return s + encodeURIComponent(n(e))
                        }).join(t) : s + encodeURIComponent(n(e[a]))
                    }).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 r(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 a = 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"), r = (n = o) && n.__esModule ? n : {default: n},
                    a = e("process-nextick-args"), s = r.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 || a.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(), a.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 = r;
                var n = e("./_stream_transform"), o = e("core-util-is");

                function r(e) {
                    if (!(this instanceof r)) return new r(e);
                    n.call(this, e)
                }

                o.inherits = e("inherits"), o.inherits(r, n), r.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, r = e("babel-runtime/core-js/object/get-prototype-of"),
                        a = (o = r) && o.__esModule ? o : {default: o}, s = e("process-nextick-args");
                    t.exports = b;
                    var l, d = e("isarray");
                    b.ReadableState = T, 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"), w = e("./internal/streams/destroy");
                    p.inherits(b, c);
                    var k = ["error", "close", "destroy", "pause", "resume"];

                    function T(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, r = t.readableHighWaterMark, a = this.objectMode ? 16 : 16384;
                        this.highWaterMark = o || 0 === o ? o : n && (r || 0 === r) ? r : a, 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 b(t) {
                        if (l = l || e("./_stream_duplex"), !(this instanceof b)) return new b(t);
                        this._readableState = new T(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 C(e, t, i, n, o) {
                        var r, 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, A(e)
                            }
                        }(e, s)) : (o || (r = 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)), r ? e.emit("error", r) : s.objectMode || t && t.length > 0 ? ("string" == typeof t || s.objectMode || (0, a.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")) : S(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 ? S(e, s, t, !1) : x(e, s)) : S(e, s, t, !1))) : n || (s.reading = !1)), function (e) {
                            return !e.ended && (e.needReadable || e.length < e.highWaterMark || 0 === e.length)
                        }(s)
                    }

                    function S(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 && A(e)), x(e, t)
                    }

                    Object.defineProperty(b.prototype, "destroyed", {
                        get: function () {
                            return void 0 !== this._readableState && this._readableState.destroyed
                        }, set: function (e) {
                            this._readableState && (this._readableState.destroyed = e)
                        }
                    }), b.prototype.destroy = w.destroy, b.prototype._undestroy = w.undestroy, b.prototype._destroy = function (e, t) {
                        this.push(null), t(e)
                    }, b.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), C(this, e, t, !1, i)
                    }, b.prototype.unshift = function (e) {
                        return C(this, e, null, !0, !1)
                    }, b.prototype.isPaused = function () {
                        return !1 === this._readableState.flowing
                    }, b.prototype.setEncoding = function (t) {
                        return v || (v = e("string_decoder/").StringDecoder), this._readableState.decoder = new v(t), this._readableState.encoding = t, this
                    };
                    var I = 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 >= I ? e = I : (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 A(e) {
                        var t = e._readableState;
                        t.needReadable = !1, t.emittedReadable || (m("emitReadable", t.flowing), t.emittedReadable = !0, t.sync ? s.nextTick(D, e) : D(e))
                    }

                    function D(e) {
                        m("emit readable"), e.emit("readable"), O(e)
                    }

                    function x(e, t) {
                        t.readingMore || (t.readingMore = !0, s.nextTick(N, e, t))
                    }

                    function N(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 P(e, t) {
                        t.reading || (m("resume read 0"), e.read(0)), t.resumeScheduled = !1, t.awaitDrain = 0, e.emit("resume"), O(e), t.flowing && !t.reading && e.read(0)
                    }

                    function O(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 r = i.data, a = e > r.length ? r.length : e;
                                    if (a === r.length ? o += r : o += r.slice(0, e), 0 == (e -= a)) {
                                        a === r.length ? (++n, i.next ? t.head = i.next : t.head = t.tail = null) : (t.head = i, i.data = r.slice(a));
                                        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 r = n.data, a = e > r.length ? r.length : e;
                                    if (r.copy(i, i.length - e, 0, a), 0 == (e -= a)) {
                                        a === r.length ? (++o, n.next ? t.head = n.next : t.head = t.tail = null) : (t.head = n, n.data = r.slice(a));
                                        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
                    }

                    b.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) : A(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
                    }, b.prototype._read = function (e) {
                        this.emit("error", new Error("_read() is not implemented"))
                    }, b.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 r = (!t || !1 !== t.end) && e !== i.stdout && e !== i.stderr, a = r ? c : k;

                        function l(t, i) {
                            m("onunpipe"), t === n && i && !1 === i.hasUnpiped && (i.hasUnpiped = !0, m("cleanup"), e.removeListener("close", y), e.removeListener("finish", w), e.removeListener("drain", h), e.removeListener("error", v), e.removeListener("unpipe", l), n.removeListener("end", c), n.removeListener("end", k), n.removeListener("data", g), f = !0, !o.awaitDrain || e._writableState && !e._writableState.needDrain || h())
                        }

                        function c() {
                            m("onend"), e.end()
                        }

                        o.endEmitted ? s.nextTick(a) : n.once("end", a), 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, O(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), k(), e.removeListener("error", v), 0 === u(e, "error") && e.emit("error", t)
                        }

                        function y() {
                            e.removeListener("finish", w), k()
                        }

                        function w() {
                            m("onfinish"), e.removeListener("close", y), k()
                        }

                        function k() {
                            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", w), e.emit("pipe", n), o.flowing || (m("pipe resume"), n.resume()), e
                    }, b.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 r = 0; r < o; r++) n[r].emit("unpipe", this, i);
                            return this
                        }
                        var a = R(t.pipes, e);
                        return -1 === a ? this : (t.pipes.splice(a, 1), t.pipesCount -= 1, 1 === t.pipesCount && (t.pipes = t.pipes[0]), e.emit("unpipe", this, i), this)
                    }, b.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 && A(this) : s.nextTick(E, this))
                        }
                        return i
                    }, b.prototype.addListener = b.prototype.on, b.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(P, e, t))
                        }(this, e)), this
                    }, b.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
                    }, b.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 r = t.push(o);
                                r || (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 r = 0; r < k.length; r++) e.on(k[r], this.emit.bind(this, k[r]));
                        return this._read = function (t) {
                            m("wrapped _read", t), n && (n = !1, e.resume())
                        }, this
                    }, Object.defineProperty(b.prototype, "readableHighWaterMark", {
                        enumerable: !1, get: function () {
                            return this._readableState.highWaterMark
                        }
                    }), b._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 = r;
                var n = e("./_stream_duplex"), o = e("core-util-is");

                function r(e) {
                    if (!(this instanceof r)) return new r(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", a)
                }

                function a() {
                    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(r, n), r.prototype.push = function (e, t) {
                    return this._transformState.needTransform = !1, n.prototype.push.call(this, e, t)
                }, r.prototype._transform = function (e, t, i) {
                    throw new Error("_transform() is not implemented")
                }, r.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)
                    }
                }, r.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
                }, r.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"), r = h(o),
                        a = e("babel-runtime/core-js/symbol/has-instance"), s = h(a),
                        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 = I;
                    var v = e("core-util-is");
                    v.inherits = e("inherits");
                    var y, w = {deprecate: e("util-deprecate")}, k = e("./internal/streams/stream"),
                        T = e("safe-buffer").Buffer, b = n.Uint8Array || function () {
                        }, C = e("./internal/streams/destroy");

                    function S() {
                    }

                    function I(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, r = t.writableHighWaterMark, a = this.objectMode ? 16 : 16384;
                        this.highWaterMark = o || 0 === o ? o : n && (r || 0 === r) ? r : a, 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(P, e, t), e._writableState.errorEmitted = !0, e.emit("error", n)) : (o(n), e._writableState.errorEmitted = !0, e.emit("error", n), P(e, t))
                                }(e, i, n, t, o); else {
                                    var r = N(i);
                                    r || i.corked || i.bufferProcessing || !i.bufferedRequest || x(e, i), n ? m(D, e, i, r, o) : D(e, i, r, 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 I(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)), k.call(this)
                    }

                    function A(e, t, i, n, o, r, a) {
                        t.writelen = n, t.writecb = a, t.writing = !0, t.sync = !0, i ? e._writev(o, t.onwrite) : e._write(o, r, t.onwrite), t.sync = !1
                    }

                    function D(e, t, i, n) {
                        i || function (e, t) {
                            0 === t.length && t.needDrain && (t.needDrain = !1, e.emit("drain"))
                        }(e, t), t.pendingcb--, n(), P(e, t)
                    }

                    function x(e, t) {
                        t.bufferProcessing = !0;
                        var i = t.bufferedRequest;
                        if (e._writev && i && i.next) {
                            var n = t.bufferedRequestCount, o = new Array(n), r = t.corkedRequestsFree;
                            r.entry = i;
                            for (var a = 0, s = !0; i;) o[a] = i, i.isBuf || (s = !1), i = i.next, a += 1;
                            o.allBuffers = s, A(e, t, !0, t.length, o, "", r.finish), t.pendingcb++, t.lastBufferedRequest = null, r.next ? (t.corkedRequestsFree = r.next, r.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 (A(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 N(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"), P(e, t)
                        })
                    }

                    function P(e, t) {
                        var i = N(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(_, k), I.prototype.getBuffer = function () {
                        for (var e = this.bufferedRequest, t = []; e;) t.push(e), e = e.next;
                        return t
                    }, function () {
                        try {
                            Object.defineProperty(I.prototype, "buffer", {
                                get: w.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, r.default)(_, s.default, {
                        value: function (e) {
                            return !!y.call(this, e) || this === _ && e && e._writableState instanceof I
                        }
                    })) : 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, r = !1,
                            a = !o.objectMode && (n = e, T.isBuffer(n) || n instanceof b);
                        return a && !T.isBuffer(e) && (e = function (e) {
                            return T.from(e)
                        }(e)), "function" == typeof t && (i = t, t = null), a ? t = "buffer" : t || (t = o.defaultEncoding), "function" != typeof i && (i = S), o.ended ? function (e, t) {
                            var i = new Error("write after end");
                            e.emit("error", i), f.nextTick(t, i)
                        }(this, i) : (a || function (e, t, i, n) {
                            var o = !0, r = !1;
                            return null === i ? r = new TypeError("May not write null values to stream") : "string" == typeof i || void 0 === i || t.objectMode || (r = new TypeError("Invalid non-string/buffer chunk")), r && (e.emit("error", r), f.nextTick(n, r), o = !1), o
                        }(this, o, e, i)) && (o.pendingcb++, r = function (e, t, i, n, o, r) {
                            if (!i) {
                                var a = function (e, t, i) {
                                    return e.objectMode || !1 === e.decodeStrings || "string" != typeof t || (t = T.from(t, i)), t
                                }(t, n, o);
                                n !== a && (i = !0, o = "buffer", n = a)
                            }
                            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: r,
                                    next: null
                                }, d ? d.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1
                            } else A(e, t, !1, s, n, o, r);
                            return l
                        }(this, o, a, e, t, i)), r
                    }, _.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 || x(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, P(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 = C.destroy, _.prototype._undestroy = C.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, r = n.allocUnsafe(e >>> 0), a = this.head, s = 0; a;) t = a.data, i = r, o = s, t.copy(i, o), s += a.data.length, a = a.next;
                        return r
                    }, 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, r = this._readableState && this._readableState.destroyed,
                            a = this._writableState && this._writableState.destroyed;
                        return r || a ? (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,
                    r = o && n.regeneratorRuntime;
                if (n.regeneratorRuntime = void 0, t.exports = e("./runtime"), o) n.regeneratorRuntime = r; 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, r = "function" == typeof Symbol ? Symbol : {},
                        a = r.iterator || "@@iterator", s = r.asyncIterator || "@@asyncIterator",
                        l = r.toStringTag || "@@toStringTag", d = "object" == typeof t, u = e.regeneratorRuntime;
                    if (u) d && (t.exports = u); else {
                        (u = e.regeneratorRuntime = d ? t.exports : {}).wrap = k;
                        var c = "suspendedStart", h = "suspendedYield", f = "executing", p = "completed", g = {},
                            m = {};
                        m[a] = function () {
                            return this
                        };
                        var v = Object.getPrototypeOf, y = v && v(v(E([])));
                        y && y !== n && o.call(y, a) && (m = y);
                        var w = S.prototype = b.prototype = Object.create(m);
                        C.prototype = w.constructor = S, S.constructor = C, S[l] = C.displayName = "GeneratorFunction", u.isGeneratorFunction = function (e) {
                            var t = "function" == typeof e && e.constructor;
                            return !!t && (t === C || "GeneratorFunction" === (t.displayName || t.name))
                        }, u.mark = function (e) {
                            return Object.setPrototypeOf ? Object.setPrototypeOf(e, S) : (e.__proto__ = S, l in e || (e[l] = "GeneratorFunction")), e.prototype = Object.create(w), e
                        }, u.awrap = function (e) {
                            return {__await: e}
                        }, I(_.prototype), _.prototype[s] = function () {
                            return this
                        }, u.AsyncIterator = _, u.async = function (e, t, i, n) {
                            var o = new _(k(e, t, i, n));
                            return u.isGeneratorFunction(t) ? o : o.next().then(function (e) {
                                return e.done ? e.value : o.next()
                            })
                        }, I(w), w[l] = "Generator", w[a] = function () {
                            return this
                        }, w.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, N.prototype = {
                            constructor: N, 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(x), !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 r = this.tryEntries.length - 1; r >= 0; --r) {
                                    var a = this.tryEntries[r], s = a.completion;
                                    if ("root" === a.tryLoc) return n("end");
                                    if (a.tryLoc <= this.prev) {
                                        var l = o.call(a, "catchLoc"), d = o.call(a, "finallyLoc");
                                        if (l && d) {
                                            if (this.prev < a.catchLoc) return n(a.catchLoc, !0);
                                            if (this.prev < a.finallyLoc) return n(a.finallyLoc)
                                        } else if (l) {
                                            if (this.prev < a.catchLoc) return n(a.catchLoc, !0)
                                        } else {
                                            if (!d) throw new Error("try statement without catch or finally");
                                            if (this.prev < a.finallyLoc) return n(a.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 r = n;
                                        break
                                    }
                                }
                                r && ("break" === e || "continue" === e) && r.tryLoc <= t && t <= r.finallyLoc && (r = null);
                                var a = r ? r.completion : {};
                                return a.type = e, a.arg = t, r ? (this.method = "next", this.next = r.finallyLoc, g) : this.complete(a)
                            }, 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), x(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;
                                            x(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 k(e, t, i, n) {
                        var o = t && t.prototype instanceof b ? t : b, r = Object.create(o.prototype),
                            a = new N(n || []);
                        return r._invoke = function (e, t, i) {
                            var n = c;
                            return function (o, r) {
                                if (n === f) throw new Error("Generator is already running");
                                if (n === p) {
                                    if ("throw" === o) throw r;
                                    return P()
                                }
                                for (i.method = o, i.arg = r; ;) {
                                    var a = i.delegate;
                                    if (a) {
                                        var s = A(a, 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 = T(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, a), r
                    }

                    function T(e, t, i) {
                        try {
                            return {type: "normal", arg: e.call(t, i)}
                        } catch (e) {
                            return {type: "throw", arg: e}
                        }
                    }

                    function b() {
                    }

                    function C() {
                    }

                    function S() {
                    }

                    function I(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 r() {
                                return new Promise(function (t, r) {
                                    !function t(i, n, r, a) {
                                        var s = T(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, r, a)
                                            }, function (e) {
                                                t("throw", e, r, a)
                                            }) : Promise.resolve(d).then(function (e) {
                                                l.value = e, r(l)
                                            }, a)
                                        }
                                        a(s.arg)
                                    }(i, n, t, r)
                                })
                            }

                            return t = t ? t.then(r, r) : r()
                        }
                    }

                    function A(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, A(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 = T(n, e.iterator, t.arg);
                        if ("throw" === o.type) return t.method = "throw", t.arg = o.arg, t.delegate = null, g;
                        var r = o.arg;
                        return r ? r.done ? (t[e.resultName] = r.value, t.next = e.nextLoc, "return" !== t.method && (t.method = "next", t.arg = i), t.delegate = null, g) : r : (t.method = "throw", t.arg = new TypeError("iterator result is not an object"), t.delegate = null, g)
                    }

                    function D(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 x(e) {
                        var t = e.completion || {};
                        t.type = "normal", delete t.arg, e.completion = t
                    }

                    function N(e) {
                        this.tryEntries = [{tryLoc: "root"}], e.forEach(D, this), this.reset(!0)
                    }

                    function E(e) {
                        if (e) {
                            var t = e[a];
                            if (t) return t.call(e);
                            if ("function" == typeof e.next) return e;
                            if (!isNaN(e.length)) {
                                var n = -1, r = 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 r.next = r
                            }
                        }
                        return {next: P}
                    }

                    function P() {
                        return {value: i, done: !0}
                    }
                }(function () {
                    return this
                }() || Function("return this")())
            }, {}],
            269: [function (e, t, i) {
                var n = e("buffer"), o = n.Buffer;

                function r(e, t) {
                    for (var i in e) t[i] = e[i]
                }

                function a(e, t, i) {
                    return o(e, t, i)
                }

                o.from && o.alloc && o.allocUnsafe && o.allocUnsafeSlow ? t.exports = n : (r(n, i), i.Buffer = a), r(o, a), a.from = function (e, t, i) {
                    if ("number" == typeof e) throw new TypeError("Argument must not be a number");
                    return o(e, t, i)
                }, a.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
                }, a.allocUnsafe = function (e) {
                    if ("number" != typeof e) throw new TypeError("Argument must be a number");
                    return o(e)
                }, a.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),
                        r = e("babel-runtime/core-js/json/stringify"), a = g(r), 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,
                            r = ["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 = r.length; t < i; t++) e[r[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), O(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 ? (C(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 (C(n)) ; else if (_(w, 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 a = this.position - this.startTagPosition;
                                                n = new Array(a).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) : S(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 : S(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 : S(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 : C(n) ? this.state = E.PROC_INST_BODY : this.procInstName += n;
                                        continue;
                                    case E.PROC_INST_BODY:
                                        if (!this.procInstBody && C(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:
                                        _(k, n) ? this.tagName += n : (V(this), ">" === n ? j(this) : "/" === n ? this.state = E.OPEN_TAG_SLASH : (C(n) || U(this, "Invalid character in tag name"), this.state = E.ATTRIB));
                                        continue;
                                    case E.OPEN_TAG_SLASH:
                                        ">" === n ? (j(this, !0), G(this)) : (U(this, "Forward-slash in opening tag not followed by >"), this.state = E.ATTRIB);
                                        continue;
                                    case E.ATTRIB:
                                        if (C(n)) continue;
                                        ">" === n ? j(this) : "/" === n ? this.state = E.OPEN_TAG_SLASH : _(w, 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, W(this), j(this)) : C(n) ? this.state = E.ATTRIB_NAME_SAW_WHITE : _(k, 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 (C(n)) continue;
                                            U(this, "Attribute without value"), this.tag.attributes[this.attribName] = "", this.attribValue = "", M(this, "onattribute", {
                                                name: this.attribName,
                                                value: ""
                                            }), this.attribName = "", ">" === n ? j(this) : _(w, n) ? (this.attribName = n, this.state = E.ATTRIB_NAME) : (U(this, "Invalid attribute name"), this.state = E.ATTRIB)
                                        }
                                        continue;
                                    case E.ATTRIB_VALUE:
                                        if (C(n)) continue;
                                        S(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
                                        }
                                        W(this), this.q = "", this.state = E.ATTRIB_VALUE_CLOSED;
                                        continue;
                                    case E.ATTRIB_VALUE_CLOSED:
                                        C(n) ? this.state = E.ATTRIB : ">" === n ? j(this) : "/" === n ? this.state = E.OPEN_TAG_SLASH : _(w, 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 (!I(n)) {
                                            "&" === n ? this.state = E.ATTRIB_VALUE_ENTITY_U : this.attribValue += n;
                                            continue
                                        }
                                        W(this), ">" === n ? j(this) : this.state = E.ATTRIB;
                                        continue;
                                    case E.CLOSE_TAG:
                                        if (this.tagName) ">" === n ? G(this) : _(k, n) ? this.tagName += n : this.script ? (this.script += "</" + this.tagName, this.tagName = "", this.state = E.SCRIPT) : (C(n) || U(this, "Invalid tagname in closing tag"), this.state = E.CLOSE_TAG_SAW_WHITE); else {
                                            if (C(n)) continue;
                                            A(w, 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 (C(n)) continue;
                                        ">" === n ? G(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 ? b : T, 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, a = r.length; o < a; o++) {
                                        var s = e[r[o]].length;
                                        if (s > t) switch (r[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: " + r[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},
                            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]/,
                            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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,
                            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]/,
                            b = /[#:_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 C(e) {
                            return " " === e || "\n" === e || "\r" === e || "\t" === e
                        }

                        function S(e) {
                            return '"' === e || "'" === e
                        }

                        function I(e) {
                            return ">" === e || C(e)
                        }

                        function _(e, t) {
                            return e.test(t)
                        }

                        function A(e, t) {
                            return !_(e, t)
                        }

                        var D, x, N, E = 0;
                        for (var P 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[P]] = P;

                        function O(e, t, i) {
                            e[t] && e[t](i)
                        }

                        function M(e, t, i) {
                            e.textNode && F(e), O(e, t, i)
                        }

                        function F(e) {
                            e.textNode = L(e.opt, e.textNode), e.textNode && O(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, O(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, O(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], r = n[1];
                            return t && "xmlns" === e && (o = "xmlns", r = ""), {prefix: o, local: r}
                        }

                        function W(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, r = e.tags[e.tags.length - 1] || e;
                                        o.ns === r.ns && (o.ns = (0, p.default)(r.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 j(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, a.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 r = 0, s = e.attribList.length; r < s; r++) {
                                    var l = e.attribList[r], 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, a.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 G(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 r = e.tags.length; r-- > t;) {
                                var a = e.tag = e.tags.pop();
                                e.tagName = e.tag.name, M(e, "onclosetag", e.tagName);
                                var s = {};
                                for (var l in a.ns) s[l] = a.ns[l];
                                var d = e.tags[e.tags.length - 1] || e;
                                e.opt.xmlns && a.ns !== d.ns && (0, h.default)(a.ns).forEach(function (t) {
                                    var i = a.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(), r = "";
                            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), r = t.toString(16)) : (i = i.slice(1), t = parseInt(i, 10), r = t.toString(10))), i = i.replace(/^0+/, ""), isNaN(t) || r.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) : C(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 || (D = String.fromCharCode, x = Math.floor, N = function () {
                            var e, t, i = [], n = -1, o = arguments.length;
                            if (!o) return "";
                            for (var r = ""; ++n < o;) {
                                var a = Number(arguments[n]);
                                if (!isFinite(a) || a < 0 || a > 1114111 || x(a) !== a) throw RangeError("Invalid code point: " + a);
                                a <= 65535 ? i.push(a) : (e = 55296 + ((a -= 65536) >> 10), t = a % 1024 + 56320, i.push(e, t)), (n + 1 === o || i.length > 16384) && (r += D.apply(null, i), i.length = 0)
                            }
                            return r
                        }, u.default ? Object.defineProperty(String, "fromCodePoint", {
                            value: N,
                            configurable: !0,
                            writable: !0
                        }) : String.fromCodePoint = N)
                    }(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 = r;
                var n = e("events").EventEmitter, o = e("inherits");

                function r() {
                    n.call(this)
                }

                o(r, n), r.Readable = e("readable-stream/readable.js"), r.Writable = e("readable-stream/writable.js"), r.Duplex = e("readable-stream/duplex.js"), r.Transform = e("readable-stream/transform.js"), r.PassThrough = e("readable-stream/passthrough.js"), r.Stream = r, r.prototype.pipe = function (e, t) {
                    var i = this;

                    function o(t) {
                        e.writable && !1 === e.write(t) && i.pause && i.pause()
                    }

                    function r() {
                        i.readable && i.resume && i.resume()
                    }

                    i.on("data", o), e.on("drain", r), e._isStdio || t && !1 === t.end || (i.on("end", s), i.on("close", l));
                    var a = !1;

                    function s() {
                        a || (a = !0, e.end())
                    }

                    function l() {
                        a || (a = !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", r), 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"), r = e("xtend"), a = e("builtin-status-codes"),
                        s = e("url"), l = i;
                    l.request = function (e, i) {
                        e = "string" == typeof e ? s.parse(e) : r(e);
                        var o = -1 === t.location.protocol.search(/^https?:$/) ? "http:" : "", a = e.protocol || o,
                            l = e.hostname || e.host, d = e.port, u = e.path || "/";
                        l && -1 !== l.indexOf(":") && (l = "[" + l + "]"), e.url = (l ? a + "//" + 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 = a, 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 r = void 0 !== e.ArrayBuffer, a = r && s(e.ArrayBuffer.prototype.slice);

                    function s(e) {
                        return "function" == typeof e
                    }

                    i.arraybuffer = i.fetch || r && o("arraybuffer"), i.msstream = !i.fetch && a && o("ms-stream"), i.mozchunkedarraybuffer = !i.fetch && r && 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 r, a = e("babel-runtime/core-js/object/keys"), s = (r = a) && r.__esModule ? r : {default: r},
                        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, r = e._headers, a = null;
                            "GET" !== t.method && "HEAD" !== t.method && (a = l.arraybuffer ? h(o.concat(e._body)) : l.blobConstructor ? new n.Blob(e._body.map(function (e) {
                                return h(e)
                            }), {type: (r["content-type"] || {}).value || ""}) : o.concat(e._body).toString());
                            var d = [];
                            if ((0, s.default)(r).forEach(function (e) {
                                var t = r[e].name, i = r[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: a || 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(a)
                                } 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 r, a = e("babel-runtime/core-js/promise"), s = (r = a) && r.__esModule ? r : {default: r},
                        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, r, a) {
                            var d = this;
                            if (u.Readable.call(d), d._mode = r, d.headers = {}, d.rawHeaders = [], d.trailers = {}, d.rawTrailers = [], d.on("end", function () {
                                t.nextTick(function () {
                                    d.emit("close")
                                })
                            }), "fetch" === r) {
                                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(a), 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(a), 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(a), void d.push(null);
                                            d.push(new o(t.value)), e()
                                        }
                                    }).catch(function (e) {
                                        n.clearTimeout(a), 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 r = i.substr(e._pos);
                                    if ("x-user-defined" === e._charset) {
                                        for (var a = new o(r.length), s = 0; s < r.length; s++) a[s] = 255 & r.charCodeAt(s);
                                        e.push(a)
                                    } else e.push(r, 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 r(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 a(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 = r, r.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 || ""
                }, r.prototype.end = function (e) {
                    var t = e && e.length ? this.write(e) : "";
                    return this.lastNeed ? t + "�" : t
                }, r.prototype.text = function (e, t) {
                    var i = function (e, t, i) {
                        var n = t.length - 1;
                        if (n < i) return 0;
                        var o = a(t[n]);
                        return o >= 0 ? (o > 0 && (e.lastNeed = o - 1), o) : --n < i || -2 === o ? 0 : (o = a(t[n])) >= 0 ? (o > 0 && (e.lastNeed = o - 2), o) : --n < i || -2 === o ? 0 : (o = a(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)
                }, r.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, r = Function.prototype.apply, a = Array.prototype.slice,
                        s = {}, l = 0;

                    function d(e, t) {
                        this._id = e, this._clearFn = t
                    }

                    i.setTimeout = function () {
                        return new d(r.call(setTimeout, window, arguments), clearTimeout)
                    }, i.setInterval = function () {
                        return new d(r.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) && a.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 r() {
                    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 = w, i.resolve = function (e, t) {
                    return w(e, !1, !0).resolve(t)
                }, i.resolveObject = function (e, t) {
                    return e ? w(e, !1, !0).resolveObject(t) : t
                }, i.format = function (e) {
                    return o.isString(e) && (e = w(e)), e instanceof r ? e.format() : r.prototype.format.call(e)
                }, i.Url = r;
                var a = /^([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 w(e, t, i) {
                    if (e && o.isObject(e) && e instanceof r) return e;
                    var n = new r;
                    return n.parse(e, t, i), n
                }

                r.prototype.parse = function (e, t, i) {
                    if (!o.isString(e)) throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
                    var r = e.indexOf("?"), s = -1 !== r && r < e.indexOf("#") ? "?" : "#", d = e.split(s);
                    d[0] = d[0].replace(/\\/g, "/");
                    var w = e = d.join(s);
                    if (w = w.trim(), !i && 1 === e.split("#").length) {
                        var k = l.exec(w);
                        if (k) return this.path = w, this.href = w, this.pathname = k[1], k[2] ? (this.search = k[2], this.query = t ? y.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = "", this.query = {}), this
                    }
                    var T = a.exec(w);
                    if (T) {
                        var b = (T = T[0]).toLowerCase();
                        this.protocol = b, w = w.substr(T.length)
                    }
                    if (i || T || w.match(/^\/\/[^@\/]+@[^@\/]+/)) {
                        var C = "//" === w.substr(0, 2);
                        !C || T && m[T] || (w = w.substr(2), this.slashes = !0)
                    }
                    if (!m[T] && (C || T && !v[T])) {
                        for (var S, I, _ = -1, A = 0; A < h.length; A++) {
                            var D = w.indexOf(h[A]);
                            -1 !== D && (-1 === _ || D < _) && (_ = D)
                        }
                        -1 !== (I = -1 === _ ? w.lastIndexOf("@") : w.lastIndexOf("@", _)) && (S = w.slice(0, I), w = w.slice(I + 1), this.auth = decodeURIComponent(S)), _ = -1;
                        for (var A = 0; A < c.length; A++) {
                            var D = w.indexOf(c[A]);
                            -1 !== D && (-1 === _ || D < _) && (_ = D)
                        }
                        -1 === _ && (_ = w.length), this.host = w.slice(0, _), w = w.slice(_), this.parseHost(), this.hostname = this.hostname || "";
                        var x = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
                        if (!x) for (var N = this.hostname.split(/\./), A = 0, E = N.length; A < E; A++) {
                            var P = N[A];
                            if (P && !P.match(f)) {
                                for (var O = "", M = 0, F = P.length; M < F; M++) P.charCodeAt(M) > 127 ? O += "x" : O += P[M];
                                if (!O.match(f)) {
                                    var L = N.slice(0, A), R = N.slice(A + 1), B = P.match(p);
                                    B && (L.push(B[1]), R.unshift(B[2])), R.length && (w = "/" + R.join(".") + w), this.hostname = L.join(".");
                                    break
                                }
                            }
                        }
                        this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), x || (this.hostname = n.toASCII(this.hostname));
                        var U = this.port ? ":" + this.port : "", V = this.hostname || "";
                        this.host = V + U, this.href += this.host, x && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== w[0] && (w = "/" + w))
                    }
                    if (!g[b]) for (var A = 0, E = u.length; A < E; A++) {
                        var K = u[A];
                        if (-1 !== w.indexOf(K)) {
                            var W = encodeURIComponent(K);
                            W === K && (W = escape(K)), w = w.split(K).join(W)
                        }
                    }
                    var j = w.indexOf("#");
                    -1 !== j && (this.hash = w.substr(j), w = w.slice(0, j));
                    var G = w.indexOf("?");
                    if (-1 !== G ? (this.search = w.substr(G), this.query = w.substr(G + 1), t && (this.query = y.parse(this.query)), w = w.slice(0, G)) : t && (this.search = "", this.query = {}), w && (this.pathname = w), v[b] && 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
                }, r.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 || "", r = !1, a = "";
                    this.host ? r = e + this.host : this.hostname && (r = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port && (r += ":" + this.port)), this.query && o.isObject(this.query) && Object.keys(this.query).length && (a = y.stringify(this.query));
                    var s = this.search || a && "?" + a || "";
                    return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || v[t]) && !1 !== r ? (r = "//" + (r || ""), i && "/" !== i.charAt(0) && (i = "/" + i)) : r || (r = ""), 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 + r + i + s + n
                }, r.prototype.resolve = function (e) {
                    return this.resolveObject(w(e, !1, !0)).format()
                }, r.prototype.resolveObject = function (e) {
                    if (o.isString(e)) {
                        var t = new r;
                        t.parse(e, !1, !0), e = t
                    }
                    for (var i = new r, n = Object.keys(this), a = 0; a < n.length; a++) {
                        var s = n[a];
                        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 w = i.pathname && "/" === i.pathname.charAt(0),
                        k = e.host || e.pathname && "/" === e.pathname.charAt(0), T = k || w || i.host && e.pathname,
                        b = T, C = i.pathname && i.pathname.split("/") || [],
                        p = e.pathname && e.pathname.split("/") || [], S = i.protocol && !v[i.protocol];
                    if (S && (i.hostname = "", i.port = null, i.host && ("" === C[0] ? C[0] = i.host : C.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), T = T && ("" === p[0] || "" === C[0])), k) 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, C = p; else if (p.length) C || (C = []), C.pop(), C = C.concat(p), i.search = e.search, i.query = e.query; else if (!o.isNullOrUndefined(e.search)) {
                        if (S) {
                            i.hostname = i.host = C.shift();
                            var I = !!(i.host && i.host.indexOf("@") > 0) && i.host.split("@");
                            I && (i.auth = I.shift(), i.host = i.hostname = I.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 (!C.length) return i.pathname = null, i.search ? i.path = "/" + i.search : i.path = null, i.href = i.format(), i;
                    for (var _ = C.slice(-1)[0], A = (i.host || e.host || C.length > 1) && ("." === _ || ".." === _) || "" === _, D = 0, x = C.length; x >= 0; x--) "." === (_ = C[x]) ? C.splice(x, 1) : ".." === _ ? (C.splice(x, 1), D++) : D && (C.splice(x, 1), D--);
                    if (!T && !b) for (; D--; D) C.unshift("..");
                    !T || "" === C[0] || C[0] && "/" === C[0].charAt(0) || C.unshift(""), A && "/" !== C.join("/").substr(-1) && C.push("");
                    var N = "" === C[0] || C[0] && "/" === C[0].charAt(0);
                    if (S) {
                        i.hostname = i.host = N ? "" : C.length ? C.shift() : "";
                        var I = !!(i.host && i.host.indexOf("@") > 0) && i.host.split("@");
                        I && (i.auth = I.shift(), i.host = i.hostname = I.shift())
                    }
                    return (T = T || i.host && C.length) && !N && C.unshift(""), C.length ? i.pathname = C.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
                }, r.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 r = Function.call.bind(Array.prototype.slice), a = 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 = r(arguments), i = this;
                        return new Promise(function (o, l) {
                            e.apply(i, a(t, function (e) {
                                var t = arguments.length > 1 ? r(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"), r = e("./implementation"), a = e("./polyfill"), s = a(),
                    l = e("./shim"), d = function (e) {
                        return s.apply(o, arguments)
                    };
                n(d, {
                    custom: s.custom,
                    customPromisifyArgs: s.customPromisifyArgs,
                    getPolyfill: a,
                    implementation: r,
                    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, r = n.length, a = String(e).replace(o, function (e) {
                            if ("%%" === e) return "%";
                            if (i >= r) 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 < r; l = n[++i]) g(l) || !k(l) ? a += " " + l : a += " " + s(l);
                        return a
                    }, 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 r = !1;
                        return function () {
                            if (!r) {
                                if (t.throwDeprecation) throw new Error(o);
                                t.traceDeprecation ? console.trace(o) : console.error(o), r = !0
                            }
                            return e.apply(this, arguments)
                        }
                    };
                    var r, a = {};

                    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 && C(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 r = 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 (r) return r;
                        var a = Object.keys(t), s = function (e) {
                            var t = {};
                            return e.forEach(function (e, i) {
                                t[e] = !0
                            }), t
                        }(a);
                        if (e.showHidden && (a = Object.getOwnPropertyNames(t)), b(t) && (a.indexOf("message") >= 0 || a.indexOf("description") >= 0)) return c(t);
                        if (0 === a.length) {
                            if (C(t)) {
                                var l = t.name ? ": " + t.name : "";
                                return e.stylize("[Function" + l + "]", "special")
                            }
                            if (w(t)) return e.stylize(RegExp.prototype.toString.call(t), "regexp");
                            if (T(t)) return e.stylize(Date.prototype.toString.call(t), "date");
                            if (b(t)) return c(t)
                        }
                        var d, k = "", S = !1, I = ["{", "}"];
                        if (f(t) && (S = !0, I = ["[", "]"]), C(t)) {
                            var _ = t.name ? ": " + t.name : "";
                            k = " [Function" + _ + "]"
                        }
                        return w(t) && (k = " " + RegExp.prototype.toString.call(t)), T(t) && (k = " " + Date.prototype.toUTCString.call(t)), b(t) && (k = " " + c(t)), 0 !== a.length || S && 0 != t.length ? n < 0 ? w(t) ? e.stylize(RegExp.prototype.toString.call(t), "regexp") : e.stylize("[Object]", "special") : (e.seen.push(t), d = S ? function (e, t, i, n, o) {
                            for (var r = [], a = 0, s = t.length; a < s; ++a) A(t, String(a)) ? r.push(h(e, t, i, n, String(a), !0)) : r.push("");
                            return o.forEach(function (o) {
                                o.match(/^\d+$/) || r.push(h(e, t, i, n, o, !0))
                            }), r
                        }(e, t, n, s, a) : a.map(function (i) {
                            return h(e, t, n, s, i, S)
                        }), 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, k, I)) : I[0] + k + I[1]
                    }

                    function c(e) {
                        return "[" + Error.prototype.toString.call(e) + "]"
                    }

                    function h(e, t, i, n, o, r) {
                        var a, 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")), A(n, o) || (a = "[" + 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 = r ? 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(a)) {
                            if (r && o.match(/^\d+$/)) return s;
                            (a = JSON.stringify("" + o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (a = a.substr(1, a.length - 2), a = e.stylize(a, "name")) : (a = a.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), a = e.stylize(a, "string"))
                        }
                        return a + ": " + 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 w(e) {
                        return k(e) && "[object RegExp]" === S(e)
                    }

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

                    function T(e) {
                        return k(e) && "[object Date]" === S(e)
                    }

                    function b(e) {
                        return k(e) && ("[object Error]" === S(e) || e instanceof Error)
                    }

                    function C(e) {
                        return "function" == typeof e
                    }

                    function S(e) {
                        return Object.prototype.toString.call(e)
                    }

                    function I(e) {
                        return e < 10 ? "0" + e.toString(10) : e.toString(10)
                    }

                    i.debuglog = function (e) {
                        if (y(r) && (r = t.env.NODE_DEBUG || ""), e = e.toUpperCase(), !a[e]) if (new RegExp("\\b" + e + "\\b", "i").test(r)) {
                            var n = t.pid;
                            a[e] = function () {
                                var t = i.format.apply(i, arguments);
                                console.error("%s %d: %s", e, n, t)
                            }
                        } else a[e] = function () {
                        };
                        return a[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 = w, i.isObject = k, i.isDate = T, i.isError = b, i.isFunction = C, 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 A(e, t) {
                        return Object.prototype.hasOwnProperty.call(e, t)
                    }

                    i.log = function () {
                        var e, t;
                        console.log("%s - %s", (e = new Date, t = [I(e.getHours()), I(e.getMinutes()), I(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 || !k(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), r = e("babel-runtime/core-js/object/keys"),
                    a = s(r);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                (function () {
                    var t, n, r, 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[" + r(e) + "]]>"
                    }, r = 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, r, u, c, h, f;
                            return i = this.options.attrkey, r = this.options.charkey, 1 === (0, a.default)(e).length && this.options.rootName === n[.2].rootName ? (h = (0, a.default)(e)[0], e = e[h]) : h = this.options.rootName, f = this, u = function (e, t) {
                                var n, a, 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 a = t[h]) c = a[p], e = u(e.ele(p), c).up()
                                } else for (p in t) if (d.call(t, p)) if (a = t[p], p === i) {
                                    if ("object" === (void 0 === a ? "undefined" : (0, o.default)(a))) for (n in a) g = a[n], e = e.att(n, g)
                                } else if (p === r) e = f.options.cdata && s(a) ? e.raw(l(a)) : e.txt(a); else if (Array.isArray(a)) for (h in a) d.call(a, h) && (c = a[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 === a ? "undefined" : (0, o.default)(a)) ? e = u(e.ele(p), a).up() : "string" == typeof a && f.options.cdata && s(a) ? e = e.ele(p).raw(l(a)).up() : (null == a && (a = ""), e = e.ele(p, a.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),
                    r = e("babel-runtime/core-js/object/keys"), a = d(r), s = e("babel-runtime/helpers/typeof"),
                    l = d(s);

                function d(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                (function () {
                    var t, n, r, s, d, u, c, h, f, p = function (e, t) {
                        return function () {
                            return e.apply(t, arguments)
                        }
                    }, g = {}.hasOwnProperty;
                    h = e("sax"), r = 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, a.default)(e).length
                    }, d = function (e, t, i) {
                        var n, o, r;
                        for (n = 0, o = e.length; n < o; n++) r = e[n], t = r(t, i);
                        return t
                    }, i.Parser = function (e) {
                        function r(e) {
                            var t, o, r;
                            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) && (r = o[t], this.options[t] = r);
                            for (t in e) g.call(e, t) && (r = e[t], this.options[t] = r);
                            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
                        }(r, e), r.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)
                            }
                        }, r.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
                        }, r.prototype.reset = function () {
                            var e, t, i, n, r;
                            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 = (r = this, function (e) {
                                if (r.saxParser.resume(), !r.saxParser.errThrown) return r.saxParser.errThrown = !0, r.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 r, a, s, l, u;
                                    if ((s = {})[t] = "", !i.options.ignoreAttrs) for (r in u = o.attributes) g.call(u, r) && (e in s || i.options.mergeAttrs || (s[e] = {}), a = i.options.attrValueProcessors ? d(i.options.attrValueProcessors, o.attributes[r], r) : o.attributes[r], l = i.options.attrNameProcessors ? d(i.options.attrNameProcessors, r) : r, i.options.mergeAttrs ? i.assignOrPush(s, l, a) : s[e][l] = a);
                                    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, r, 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 ? (r = 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, a.default)(f).length && t in f && !e.EXPLICIT_CHARKEY && (f = f[t])), s(f) && (f = "" !== e.options.emptyTag ? e.options.emptyTag : r), 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, a.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, r;
                                    if (r = n[n.length - 1]) return r[t] += i, e.options.explicitChildren && e.options.preserveChildrenOrder && e.options.charsAsChildren && (e.options.includeWhiteChars || "" !== i.replace(/\\n/g, "").trim()) && (r[e.options.childkey] = r[e.options.childkey] || [], (o = {"#name": "__text__"})[t] = i, e.options.normalize && (o[t] = o[t].replace(/\s{2,}/g, " ").trim()), r[e.options.childkey].push(o)), r
                                }
                            }(this), this.saxParser.ontext = i, this.saxParser.oncdata = function (e) {
                                var t;
                                if (t = i(e)) return t.cdata = !0
                            }
                        }, r.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
                            }
                        }, r.prototype.parseStringPromise = function (e) {
                            return c(this.parseString)(e)
                        }, r
                    }(r), i.parseString = function (e, t, n) {
                        var o, r;
                        return null != n ? ("function" == typeof n && (o = n), "object" === (void 0 === t ? "undefined" : (0, l.default)(t)) && (r = t)) : ("function" == typeof t && (o = t), r = {}), new i.Parser(r).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, r, a = {}.hasOwnProperty;
                    n = e("./defaults"), t = e("./builder"), o = e("./parser"), r = e("./processors"), i.defaults = n.defaults, i.processors = r, i.ValidationError = function (e) {
                        function t(e) {
                            this.message = e
                        }

                        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
                    }(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),
                    r = e("babel-runtime/helpers/typeof"), a = d(r), 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, r, s, d, u, c = [].slice, h = {}.hasOwnProperty;
                    e = function () {
                        var e, t, i, n, o, r;
                        if (r = 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) && (r[t] = n[t]);
                        return r
                    }, 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, a.default)(e)) || "object" === t)
                    }, n = function (e) {
                        return s(Array.isArray) ? Array.isArray(e) : "[object Array]" === Object.prototype.toString.call(e)
                    }, r = 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 = r, 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"), r = (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, r.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"), r = (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, r.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"), r = (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, r.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"), r = (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, r.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), r = e("babel-runtime/core-js/object/create"),
                    a = s(r);

                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, a.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, r, a, 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 (!r) throw new Error("Missing DTD attribute type. " + this.debugInfo(n));
                            if (!a) throw new Error("Missing DTD attribute default. " + this.debugInfo(n));
                            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. " + this.debugInfo(n));
                            if (s && !a.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(r), s && (this.defaultValue = this.stringify.dtdAttDefault(s)), this.defaultValueType = 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
                        }(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, r = {}.hasOwnProperty;
                    o = e("./Utility").isObject, n = e("./XMLNode"), i = e("./NodeType"), t.exports = function (e) {
                        function t(e, n, r, a) {
                            if (t.__super__.constructor.call(this, e), null == r) throw new Error("Missing DTD entity name. " + this.debugInfo(r));
                            if (null == a) throw new Error("Missing DTD entity value. " + this.debugInfo(r));
                            if (this.pe = !!n, this.name = this.stringify.name(r), this.type = i.EntityDeclaration, o(a)) {
                                if (!a.pubID && !a.sysID) throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(r));
                                if (a.pubID && !a.sysID) throw new Error("System identifier is required for a public external entity. " + this.debugInfo(r));
                                if (this.internal = !1, 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. " + this.debugInfo(r))
                            } else this.value = this.stringify.dtdEntityValue(a), this.internal = !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
                        }(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, r = {}.hasOwnProperty;
                    o = e("./Utility").isObject, n = e("./XMLNode"), i = e("./NodeType"), t.exports = function (e) {
                        function t(e, n, r, a) {
                            var s;
                            t.__super__.constructor.call(this, e), o(n) && (n = (s = n).version, r = s.encoding, a = s.standalone), n || (n = "1.0"), this.type = i.Declaration, this.version = this.stringify.xmlVersion(n), null != r && (this.encoding = this.stringify.xmlEncoding(r)), null != a && (this.standalone = this.stringify.xmlStandalone(a))
                        }

                        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.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, r, a, s, l, d, u = {}.hasOwnProperty;
                    d = e("./Utility").isObject, l = e("./XMLNode"), i = e("./NodeType"), n = e("./XMLDTDAttList"), r = e("./XMLDTDEntity"), o = e("./XMLDTDElement"), a = e("./XMLDTDNotation"), s = e("./XMLNamedNodeMap"), t.exports = function (e) {
                        function t(e, n, o) {
                            var r, a, s, l, u, c;
                            if (t.__super__.constructor.call(this, e), this.type = i.DocType, e.children) for (l = e.children, a = 0, s = l.length; a < s; a++) if ((r = l[a]).type === i.Element) {
                                this.name = r.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, r;
                                for (o = {}, r = this.children, t = 0, n = r.length; t < n; t++) (e = r[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, r;
                                for (o = {}, r = this.children, t = 0, n = r.length; t < n; t++) (e = r[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, r) {
                            var a;
                            return a = new n(this, e, t, i, o, r), this.children.push(a), this
                        }, t.prototype.entity = function (e, t) {
                            var i;
                            return i = new r(this, !1, e, t), this.children.push(i), this
                        }, t.prototype.pEntity = function (e, t) {
                            var i;
                            return i = new r(this, !0, e, t), this.children.push(i), this
                        }, t.prototype.notation = function (e, t) {
                            var i;
                            return i = new a(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, r, a, s, l, d = {}.hasOwnProperty;
                    l = e("./Utility").isPlainObject, o = e("./XMLDOMImplementation"), n = e("./XMLDOMConfiguration"), r = e("./XMLNode"), i = e("./NodeType"), s = e("./XMLStringifier"), a = 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 a), 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
                    }(r)
                }).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, r, a, s, l, d, u, c, h, f, p, g, m, v, y, w, k, T, b, C, S, I = {}.hasOwnProperty;
                    S = e("./Utility"), b = S.isObject, T = S.isFunction, C = S.isPlainObject, k = S.getValue, i = e("./NodeType"), f = e("./XMLDocument"), p = e("./XMLElement"), r = e("./XMLCData"), a = e("./XMLComment"), m = e("./XMLRaw"), w = 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 ? C(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, r, a, 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) I.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, a = 0, s = d.length; a < s; a++) r = d[a], this.createChildNode(r), r.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 = k(e), null == t && (t = {}), t = k(t), b(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, r, a, s, l, d;
                            if (this.currentNode && this.currentNode.type === i.DocType) this.dtdElement.apply(this, arguments); else if (Array.isArray(e) || b(e) || T(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, r = 0, a = l.length; r < a; r++) o = l[r], 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 = k(e)), b(e)) for (i in e) I.call(e, i) && (n = e[i], this.attribute(i, n)); else T(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 w(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 r(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 a(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, r, a;
                            if (this.openCurrent(), null != e && (e = k(e)), null != t && (t = k(t)), Array.isArray(e)) for (i = 0, r = e.length; i < r; i++) n = e[i], this.instruction(n); else if (b(e)) for (n in e) I.call(e, n) && (o = e[n], this.instruction(n, o)); else T(t) && (t = t.apply()), a = new g(this, e, t), this.onData(this.writer.processingInstruction(a, 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 r;
                            return this.openCurrent(), r = new s(this, e, t, i, n, o), this.onData(this.writer.dtdAttList(r, 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, r, a;
                            if (!e.isOpen) {
                                if (this.root || 0 !== this.currentLevel || e.type !== i.Element || (this.root = e), o = "", e.type === i.Element) {
                                    for (r in this.writerOptions.state = n.OpenTag, o = this.writer.indent(e, this.writerOptions, this.currentLevel) + "<" + e.name, a = e.attribs) I.call(a, r) && (t = a[r], 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"), r = (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, r.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"), r = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n, o, a, s, l, d, u, c = {}.hasOwnProperty;
                    u = e("./Utility"), d = u.isObject, l = u.isFunction, s = u.getValue, a = e("./XMLNode"), i = e("./NodeType"), n = e("./XMLAttribute"), o = e("./XMLNamedNodeMap"), t.exports = function (e) {
                        function t(e, n, o) {
                            var r, a, 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, a = 0, s = l.length; a < s; a++) if ((r = l[a]).type === i.DocType) {
                                r.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, r.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
                    }(a)
                }).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"), r = (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, r.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, r.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, r, a, s, l, d, u, c, h, f, p, g, m, v, y, w = {}.hasOwnProperty;
                    y = e("./Utility"), v = y.isObject, m = y.isFunction, g = y.isEmpty, p = y.getValue, d = null, o = null, r = null, a = 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"), r = e("./XMLComment"), a = 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, r;
                                if (this.nodeType === n.Element || this.nodeType === n.DocumentFragment) {
                                    for (r = "", o = this.children, t = 0, i = o.length; t < i; t++) (e = o[t]).textContent && (r += e.textContent);
                                    return r
                                }
                                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, r;
                            for (this.parent = e, e && (this.options = e.options, this.stringify = e.stringify), o = this.children, r = [], i = 0, n = o.length; i < n; i++) t = o[i], r.push(t.setParent(this));
                            return r
                        }, t.prototype.element = function (e, t, i) {
                            var n, o, r, a, 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 (r = 0, d = e.length; r < d; r++) o = e[r], l = this.element(o); else if (m(e)) l = this.element(e.apply()); else if (v(e)) {
                                for (s in e) if (w.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 (a = 0, u = f.length; a < u; a++) o = f[a], (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, r, a, s;
                            if (null != e ? e.type : void 0) return a = t, (r = e).setParent(this), a ? (o = children.indexOf(a), s = children.splice(o), children.push(r), Array.prototype.push.apply(children, s)) : children.push(r), r;
                            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, r;
                            if (this.isRoot) throw new Error("Cannot insert elements at root level. " + this.debugInfo(e));
                            return o = this.parent.children.indexOf(this), r = this.parent.children.splice(o + 1), n = this.parent.element(e, t, i), Array.prototype.push.apply(this.parent.children, r), 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 r(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, r, a;
                            if (null != e && (e = p(e)), null != t && (t = p(t)), Array.isArray(e)) for (r = 0, a = e.length; r < a; r++) i = e[r], this.instruction(i); else if (v(e)) for (i in e) w.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, r;
                            return o = this.document(), r = new a(o, e, t, i), 0 === o.children.length ? o.children.unshift(r) : o.children[0].type === n.Declaration ? o.children[0] = r : o.children.unshift(r), o.root() || o
                        }, t.prototype.dtd = function (e, t) {
                            var i, o, r, a, l, d, u, c, h;
                            for (i = this.document(), o = new s(i, e, t), c = i.children, r = a = 0, d = c.length; a < d; r = ++a) if (c[r].type === n.DocType) return i.children[r] = o, o;
                            for (h = i.children, r = l = 0, u = h.length; l < u; r = ++l) if (h[r].isRoot) return i.children.splice(r, 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, r, a;
                            for (e || (e = this.document()), r = e.children, n = 0, o = r.length; n < o; n++) {
                                if (i = r[n], a = t(i)) return a;
                                if (a = this.foreachTreeNode(i, t)) return a
                            }
                        }, 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"), r = (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, r.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"), r = (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, r.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, r = {}.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) 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.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, r, a, s, l, d, u;
                            for (l = e.children, n = o = 0, a = l.length; o < a; n = ++o) (i = l[n]).isLastRootNode = n === e.children.length - 1;
                            for (t = this.filterOptions(t), d = e.children, u = [], r = 0, s = d.length; r < s; r++) i = d[r], 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, r, a, 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, r = 0, a = s.length; r < a; r++) o = s[r], 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 a, 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) r.call(f, h) && (a = f[h], this.attribute(a, 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, r, a;
                            for (t = this.filterOptions(t), r = "", a = e.children, n = 0, o = a.length; n < o; n++) i = a[n], r += this.writeChildNode(i, t, 0);
                            return t.pretty && r.slice(-t.newline.length) === t.newline && (r = r.slice(0, -t.newline.length)), r
                        }, 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, r;
                            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) && (r = o[n], this[n] = r)
                        }

                        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"), r = (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, r.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, r = {}.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 || {}) r.call(i, t) && (n = i[t], this["_" + t] = this[t], this[t] = n)
                        }

                        return e.prototype.filterOptions = function (e) {
                            var t, i, r, a, 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 != (r = e.newline) ? r : "\n", t.offset = null != (a = e.offset) ? a : 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, r, a, 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, r = 0, a = l.length; r < a; r++) o = l[r], 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 a, s, l, d, u, c, h, f, p, g, m, v, y, w;
                            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) r.call(v, p) && (a = v[p], m += this.attribute(a, 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, w = e.children, c = 0, f = w.length; c < f; c++) s = w[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, r, a, s, l, d, u, c;
                    c = e("./Utility"), d = c.assign, u = c.isFunction, o = e("./XMLDOMImplementation"), r = e("./XMLDocument"), a = e("./XMLDocumentCB"), l = e("./XMLStringWriter"), s = e("./XMLStreamWriter"), i = e("./NodeType"), n = e("./WriterState"), t.exports.create = function (e, t, i, n) {
                        var o, a;
                        if (null == e) throw new Error("Root element needs a name.");
                        return n = d({}, t, i, n), o = new r(n), a = o.element(e), n.headless || (o.declaration(n), null == n.pubID && null == n.sysID || o.dtd(n)), a
                    }, t.exports.begin = function (e, t, i) {
                        var n;
                        return u(e) && (t = (n = [e, t])[0], i = n[1], e = {}), t ? new a(e, t, i) : new r(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"), r = e("./md5"), a = {sha1: o, md5: r}, s = 64,
                    l = n.alloc(s);

                function d(e, t) {
                    var i = a[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 r = n.concat(o), a = 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), r = n.alloc(s), a = 0; a < s; a++) o[a] = 54 ^ t[a], r[a] = 92 ^ t[a];
                                var d = e(n.concat([o, i]));
                                return e(n.concat([r, d]))
                            }(i, t, r) : i(r);
                            return o = null, e ? a.toString(e) : a
                        }
                    }
                }

                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, r = n.alloc(o);
                r.fill(0);
                var a = 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), r = i ? o.writeInt32BE : o.writeInt32LE, a = 0; a < e.length; a++) r.call(o, e[a], 4 * a, !0);
                            return o
                        }(t(function (e, t) {
                            if (e.length % o != 0) {
                                var i = e.length + (o - e.length % o);
                                e = n.concat([e, r], i)
                            }
                            for (var a = [], s = t ? e.readInt32BE : e.readInt32LE, l = 0; l < e.length; l += o) a.push(s.call(e, l));
                            return a
                        }(e, s), e.length * a), 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, r = 271733878, c = 0; c < e.length; c += 16) {
                        var h = i, f = n, p = o, g = r;
                        i = a(i, n, o, r, e[c + 0], 7, -680876936), r = a(r, i, n, o, e[c + 1], 12, -389564586), o = a(o, r, i, n, e[c + 2], 17, 606105819), n = a(n, o, r, i, e[c + 3], 22, -1044525330), i = a(i, n, o, r, e[c + 4], 7, -176418897), r = a(r, i, n, o, e[c + 5], 12, 1200080426), o = a(o, r, i, n, e[c + 6], 17, -1473231341), n = a(n, o, r, i, e[c + 7], 22, -45705983), i = a(i, n, o, r, e[c + 8], 7, 1770035416), r = a(r, i, n, o, e[c + 9], 12, -1958414417), o = a(o, r, i, n, e[c + 10], 17, -42063), n = a(n, o, r, i, e[c + 11], 22, -1990404162), i = a(i, n, o, r, e[c + 12], 7, 1804603682), r = a(r, i, n, o, e[c + 13], 12, -40341101), o = a(o, r, i, n, e[c + 14], 17, -1502002290), n = a(n, o, r, i, e[c + 15], 22, 1236535329), i = s(i, n, o, r, e[c + 1], 5, -165796510), r = s(r, i, n, o, e[c + 6], 9, -1069501632), o = s(o, r, i, n, e[c + 11], 14, 643717713), n = s(n, o, r, i, e[c + 0], 20, -373897302), i = s(i, n, o, r, e[c + 5], 5, -701558691), r = s(r, i, n, o, e[c + 10], 9, 38016083), o = s(o, r, i, n, e[c + 15], 14, -660478335), n = s(n, o, r, i, e[c + 4], 20, -405537848), i = s(i, n, o, r, e[c + 9], 5, 568446438), r = s(r, i, n, o, e[c + 14], 9, -1019803690), o = s(o, r, i, n, e[c + 3], 14, -187363961), n = s(n, o, r, i, e[c + 8], 20, 1163531501), i = s(i, n, o, r, e[c + 13], 5, -1444681467), r = s(r, i, n, o, e[c + 2], 9, -51403784), o = s(o, r, i, n, e[c + 7], 14, 1735328473), n = s(n, o, r, i, e[c + 12], 20, -1926607734), i = l(i, n, o, r, e[c + 5], 4, -378558), r = l(r, i, n, o, e[c + 8], 11, -2022574463), o = l(o, r, i, n, e[c + 11], 16, 1839030562), n = l(n, o, r, i, e[c + 14], 23, -35309556), i = l(i, n, o, r, e[c + 1], 4, -1530992060), r = l(r, i, n, o, e[c + 4], 11, 1272893353), o = l(o, r, i, n, e[c + 7], 16, -155497632), n = l(n, o, r, i, e[c + 10], 23, -1094730640), i = l(i, n, o, r, e[c + 13], 4, 681279174), r = l(r, i, n, o, e[c + 0], 11, -358537222), o = l(o, r, i, n, e[c + 3], 16, -722521979), n = l(n, o, r, i, e[c + 6], 23, 76029189), i = l(i, n, o, r, e[c + 9], 4, -640364487), r = l(r, i, n, o, e[c + 12], 11, -421815835), o = l(o, r, i, n, e[c + 15], 16, 530742520), n = l(n, o, r, i, e[c + 2], 23, -995338651), i = d(i, n, o, r, e[c + 0], 6, -198630844), r = d(r, i, n, o, e[c + 7], 10, 1126891415), o = d(o, r, i, n, e[c + 14], 15, -1416354905), n = d(n, o, r, i, e[c + 5], 21, -57434055), i = d(i, n, o, r, e[c + 12], 6, 1700485571), r = d(r, i, n, o, e[c + 3], 10, -1894986606), o = d(o, r, i, n, e[c + 10], 15, -1051523), n = d(n, o, r, i, e[c + 1], 21, -2054922799), i = d(i, n, o, r, e[c + 8], 6, 1873313359), r = d(r, i, n, o, e[c + 15], 10, -30611744), o = d(o, r, i, n, e[c + 6], 15, -1560198380), n = d(n, o, r, i, e[c + 13], 21, 1309151649), i = d(i, n, o, r, e[c + 4], 6, -145523070), r = d(r, i, n, o, e[c + 11], 10, -1120210379), o = d(o, r, i, n, e[c + 2], 15, 718787259), n = d(n, o, r, i, e[c + 9], 21, -343485551), i = u(i, h), n = u(n, f), o = u(o, p), r = u(r, g)
                    }
                    return Array(i, n, o, r)
                }

                function r(e, t, i, n, o, r) {
                    return u((a = u(u(t, e), u(n, r))) << (s = o) | a >>> 32 - s, i);
                    var a, s
                }

                function a(e, t, i, n, o, a, s) {
                    return r(t & i | ~t & n, e, t, o, a, s)
                }

                function s(e, t, i, n, o, a, s) {
                    return r(t & n | i & ~n, e, t, o, a, s)
                }

                function l(e, t, i, n, o, a, s) {
                    return r(t ^ i ^ n, e, t, o, a, s)
                }

                function d(e, t, i, n, o, a, s) {
                    return r(i ^ (t | ~n), e, t, o, a, 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 w = s(s(l(n, 5), r(y, o, d, u)), s(s(c, i[y]), a(y)));
                            c = u, u = d, d = l(o, 30), o = n, n = w
                        }
                        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 r(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 a(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"), r = h(o),
                        a = e("babel-runtime/helpers/classCallCheck"), s = h(a),
                        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 r(s, l) {
                                if (!n[s]) {
                                    if (!i[s]) {
                                        var d = "function" == typeof e && e;
                                        if (!l && d) return d(s, !0);
                                        if (a) return a(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 r(t || e)
                                    }, c, c.exports, t, i, n, o)
                                }
                                return n[s].exports
                            }

                            for (var a = "function" == typeof e && e, s = 0; s < o.length; s++) r(o[s]);
                            return r
                        }({
                            1: [function (e, t, i) {
                                var n = function () {
                                    function e() {
                                        (0, s.default)(this, e), this._types = (0, r.default)(null), this._extensions = (0, r.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 r = n[o];
                                                    if (!t && r in this._types) throw new Error('Attempt to change mapping for "' + r + '" extension from "' + this._types[r] + '" to "' + i + '". Pass `force=true` to allow this, otherwise remove "' + r + '" from the list of extensions for "' + i + '".');
                                                    this._types[r] = 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.antix.game-component": ["atx"],
                                    "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"), r = l(o), a = e("babel-runtime/helpers/typeof"),
                        s = l(a);

                    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 w(e, t) {
                        return void 0 === e ? t : e
                    }

                    i.TIMEOUTS = [g("300s"), g("300s")];
                    var k = ["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, a, 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 a && (l = a, a = null), a = a || {}, m >= v && (m = 0);
                        var T = ++m;
                        a.requestUrls = a.requestUrls || [];
                        var b = {requestId: T, url: o, args: a, ctx: a.ctx};
                        a.emitter && a.emitter.emit("request", b), a.timeout = a.timeout || i.TIMEOUTS, a.maxRedirects = a.maxRedirects || 10, a.streaming = a.streaming || a.customResponse;
                        var C, S = Date.now();
                        "string" == typeof o ? (y.test(o) || (o = "http://" + o), C = c.parse(o)) : C = o;
                        var I = (a.type || a.method || C.method || "GET").toUpperCase(), _ = C.port || 80, A = h,
                            D = w(a.agent, i.agent), x = a.fixJSONCtlChars;
                        "https:" === C.protocol && (A = f, D = w(a.httpsAgent, i.httpsAgent), C.port || (_ = 443));
                        var N = {
                            host: C.hostname || C.host || "localhost",
                            path: C.path || "/",
                            method: I,
                            port: _,
                            agent: D,
                            headers: a.headers || {},
                            lookup: a.lookup
                        };
                        Array.isArray(a.timeout) ? N.requestTimeout = a.timeout[a.timeout.length - 1] : void 0 !== a.timeout && (N.requestTimeout = a.timeout);
                        for (var E = ["pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "secureProtocol", "secureOptions"], P = 0; P < E.length; P++) {
                            var O = E[P];
                            a.hasOwnProperty(O) && (N[O] = a[O])
                        }
                        !1 !== N.rejectUnauthorized || N.hasOwnProperty("secureOptions") || (N.secureOptions = e("constants").SSL_OP_NO_TLSv1_2);
                        var M = a.auth || C.auth;
                        M && (N.auth = M);
                        var F = a.content || a.data, L = "GET" === I || "HEAD" === I || a.dataAsQueryString;
                        if (!a.content && F && "string" != typeof F && !n.isBuffer(F)) if (L) F = a.nestedQuerystring ? qs.stringify(F) : querystring.stringify(F); else {
                            var R = N.headers["Content-Type"] || N.headers["content-type"];
                            R || (R = "json" === a.contentType ? "application/json" : "application/x-www-form-urlencoded", N.headers["Content-Type"] = R), F = "application/json" === parseContentType(R).type ? (0, r.default)(F) : a.nestedQuerystring ? qs.stringify(F) : querystring.stringify(F)
                        }
                        L && F && (N.path += (C.query ? "&" : "?") + F, F = null);
                        var B = 0;
                        if (F) {
                            var U = F.length;
                            n.isBuffer(F) || (U = n.byteLength(F)), B = N.headers["Content-Length"] = U
                        }
                        "json" === a.dataType && (N.headers.Accept = "application/json"), "function" == typeof a.beforeRequest && a.beforeRequest(N);
                        var V = null, K = null, W = null, j = !1, G = !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(), T, t.pid, N.method, o), void (e && console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s: %s\nstack: %s", Date(), T, 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"] && (!a.headers || !a.headers.Authorization) && a.digestAuth) {
                                var c = u["www-authenticate"];
                                if (c.indexOf("Digest ") >= 0) return p("Request#%d %s: got digest auth header WWW-Authenticate: %s", T, o, c), a.headers = a.headers || {}, a.headers.Authorization = digestAuthHeader(N.method, N.path, c, a.digestAuth), p("Request#%d %s: auth with digest header: %s", T, o, a.headers.Authorization), s.headers["set-cookie"] && (a.headers.Cookie = s.headers["set-cookie"].join(";")), i.requestWithCallback(o, a, d)
                            }
                            var h = Date.now() - S;
                            J && (J.contentDownload = h), p("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j", h, H, z, N.method, N.host, N.path, G, J);
                            var f = {
                                status: z,
                                statusCode: z,
                                headers: u,
                                size: H,
                                aborted: X,
                                rt: h,
                                keepAliveSocket: G,
                                data: n,
                                requestUrls: a.requestUrls,
                                timing: J,
                                remoteAddress: q,
                                remotePort: Y
                            };
                            if (e) {
                                var g = "";
                                D && "function" == typeof D.getCurrentStatus && (g = ", agent status: " + (0, r.default)(D.getCurrentStatus())), e.message += ", " + N.method + " " + o + " " + z + " (connected: " + j + ", keepalive socket: " + G + g + ")\nheaders: " + (0, r.default)(u), e.data = n, e.path = N.path, e.status = z, e.headers = u, e.res = f
                            }
                            d(e, n, a.streaming ? s : f), a.emitter && (b.url = o, b.socket = ne && ne.connection, b.options = N, b.size = B, a.emitter.emit("response", {
                                requestId: T,
                                error: e,
                                ctx: a.ctx,
                                req: b,
                                res: f
                            }))
                        }

                        function ee(e) {
                            var t = null;
                            if (a.followRedirect && statuses.redirect[e.statusCode]) {
                                a._followRedirectCount = (a._followRedirectCount || 0) + 1;
                                var n = e.headers.location;
                                if (n) {
                                    if (!(a._followRedirectCount > a.maxRedirects)) {
                                        var r = a.formatRedirectUrl ? a.formatRedirectUrl(o, n) : c.resolve(o, n);
                                        p("Request#%d %s: `redirected` from %s to %s", T, N.path, o, r), Q(), a.headers && a.headers.Host && y.test(n) && (a.headers.Host = null);
                                        var s = l;
                                        return l = null, i.requestWithCallback(r, a, 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}
                        }

                        a.timing && (J = {
                            queuing: 0,
                            dnslookup: 0,
                            connected: 0,
                            requestSent: 0,
                            waiting: 0,
                            contentDownload: 0
                        }), N.headers["User-Agent"] || N.headers["user-agent"] || (N.headers["User-Agent"] = navigator.userAgent), a.gzip && (N.headers["Accept-Encoding"] || N.headers["accept-encoding"] || (N.headers["Accept-Encoding"] = "gzip"));
                        var te, ie, ne, oe = a.writeStream;

                        function re() {
                            p("Response timer ticking, timeout: %d", ie), K = setTimeout(function () {
                                K = null;
                                var e = "Response timeout for " + ie + "ms";
                                (W = new Error(e)).name = "ResponseTimeoutError", W.requestId = T, p("ResponseTimeout: Request#%d %s %s: %s, connected: %s", T, o, W.name, e, j), ae()
                            }, ie)
                        }

                        p("Request#%d %s %s with headers %j, options.path: %s", T, I, o, N.headers, N.path), a.requestUrls.push(o), Array.isArray(a.timeout) ? (te = g(a.timeout[0]), ie = g(a.timeout[1])) : te = ie = g(a.timeout), p("ConnectTimeout: %d, ResponseTimeout: %d", te, ie), N.mode = a.mode ? a.mode : "";
                        try {
                            ne = A.request(N, function (e) {
                                if (J && (J.waiting = Date.now() - S), p("Request#%d %s `req response` event emit: status %d, headers: %j", T, o, e.statusCode, e.headers), a.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", T, o, H)
                                }), e.on("error", function () {
                                    p("Request#%d %s: `res error` event emit, total size %d", T, o, H)
                                }), e.on("aborted", function () {
                                    X = !0, p("Request#%d %s: `res aborted` event emit, total size %d", T, o, H)
                                }), oe) {
                                    var t = ee(e);
                                    return t.redirect ? void e.resume() : t.error ? (e.resume(), oe.end(), $(t.error, null, e)) : (!1 === a.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", T, o, n), $(W || null, null, e)
                                    }) : oe.on("close", function () {
                                        p("Request#%d %s: writeStream close event emitted", T, o), $(W || null, null, e)
                                    }), e.pipe(oe))
                                }
                                var i = [];
                                e.on("data", function (e) {
                                    p("Request#%d %s: `res data` event emit, size %d", T, 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", T, o, H, e._dumped), W) return $(W, t, e);
                                    var r = ee(e);
                                    if (r.error) return $(r.error, t, e);
                                    r.redirect || function (e, t, i) {
                                        var n = e.headers["content-encoding"];
                                        i(null, t, n)
                                    }(e, t, function (i, n, r) {
                                        if (i) return $(i, t, e);
                                        if (!r && k.indexOf(a.dataType) >= 0) {
                                            try {
                                                n = decodeBodyByCharset(n, e)
                                            } catch (t) {
                                                return p("decodeBodyByCharset error: %s", t), $(null, n, e)
                                            }
                                            if ("json" === a.dataType) if (0 === H) n = null; else {
                                                var s = parseJSON(n, x);
                                                s.error ? i = s.error : n = s.data
                                            }
                                        }
                                        X && p("Request#%d %s: Remote socket was terminated before `response.end()` was called", T, o), $(i, n, e)
                                    })
                                })
                            })
                        } catch (e) {
                            return $(e)
                        }

                        function ae() {
                            p("Request#%d %s abort, connected: %s", T, o, j), ne.socket || (W.noSocket = !0, $(W)), 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"), (W = new Error(e)).name = t, W.requestId = T, p("ConnectTimeout: Request#%d %s %s: %s, connected: %s", T, o, W.name, e, j), ae()
                        }, te)) : ne.on("requestTimeout", function () {
                            -1 === z && (z = -2);
                            var e = "Connect timeout for " + te + "ms";
                            (W = new Error(e)).name = "ConnectionTimeoutError", W.requestId = T, ae()
                        }), J && ne.on("finish", function () {
                            J.requestSent = Date.now() - S
                        }), ne.once("socket", function (e) {
                            J && (J.queuing = Date.now() - S), 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", T, o, e, t, i), J && (J.dnslookup = Date.now() - S), t && (q = t)
                            }), void e.once("connect", function () {
                                J && (J.connected = Date.now() - S), Z(), re(), p("Request#%d %s new socket connected", T, o), j = !0, q || (q = e.remoteAddress), Y = e.remotePort
                            });
                            p("Request#%d %s reuse socket connected, readyState: %s", T, o, t), j = !0, G = !0, q || (q = e.remoteAddress), Y = e.remotePort, Z(), re()
                        }), ne.on("error", function (e) {
                            "Error" !== e.name && "TypeError" !== e.name || (e.name = j ? "ResponseError" : "RequestError"), e.message += ' (req "error")', p("Request#%d %s `req error` event emit, %s: %s", T, o, e.name, e.message), $(W || e)
                        }), oe && oe.once("error", function (e) {
                            e.message += ' (writeStream "error")', W = e, p("Request#%d %s `writeStream error` event emit, %s: %s", T, o, e.name, e.message), ae()
                        }), a.stream ? (a.stream.pipe(ne), a.stream.once("error", function (e) {
                            e.message += ' (stream "error")', W = e, p("Request#%d %s `readStream error` event emit, %s: %s", T, o, e.name, e.message), ae()
                        })) : ne.end(F), ne.requestId = T, 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(477), o = i(292);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(484), o = i(294);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(485), o = i(296);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(486), o = i(298);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(478), o = i(300);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(458), o = i(302);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(869);
    var a = i(1), s = Object(a.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(1018);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1020);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(304);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\download-list-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(440), o = i(306);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(310);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\downloading-item-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(479), o = i(312);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(405), r = i(876), a = i(0), s = i(42), l = i(57), d = a.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 = r.QueryTaskInfoPackageNS.createQueryEd2kTaskInfoBuffer(e), this.post(e => {
                    let i = null;
                    200 === e.statusCode && e.body && e.body.length > 12 && (i = r.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), r = i(877), a = i(878), 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 = a.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 = a.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 = a.BufferUtilitiesNS.writeString(l, "", n, "utf-8"), s.information("createQueryP2spTaskInfoBuffer code", "-1", n), n = l.writeInt32LE(-1, n), s.information("createQueryP2spTaskInfoBuffer", "refurl", n), n = a.BufferUtilitiesNS.writeString(l, "", n, "utf-8"), s.information("createQueryP2spTaskInfoBuffer code", "-1", n), n = l.writeInt32LE(-1, n), s.information("createQueryP2spTaskInfoBuffer", o(), n), n = a.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 = r.ShubCryptoNS.encryptHttpBuffer(l)
        }, e.praseP2spTaskInfoBuffer = function (e) {
            let t = {result: 0, gcid: "", fileSize: 0, errCode: 0};
            try {
                e = r.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 = a.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 = a.BufferUtilitiesNS.readString(e, i, "hex")[0];
                    let n = a.BufferUtilitiesNS.readUInt64LE(e, i);
                    i = n[0], t.fileSize = n[1];
                    let o = a.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 = a.BufferUtilitiesNS.writeString(d, "", n, "utf-8"), s.information("createQueryEd2kTaskInfoBuffer command", "5001", n), n = d.writeUInt16LE(5001, n), s.information("createQueryEd2kTaskInfoBuffer", o(), n), n = a.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 = a.BufferUtilitiesNS.writeUInt64LE(d, u.fileSize, n), n = d.writeInt32LE(0, n), n = a.BufferUtilitiesNS.writeString(d, "", n, "utf-8"), n = d.writeInt32LE(0, n), n = a.BufferUtilitiesNS.writeString(d, e, n, "utf-8"), d = d.slice(0, n), s.information("createQueryEd2kTaskInfoBuffer before encrypt", d, n), d = r.ShubCryptoNS.encryptHttpBuffer(d)
        }, e.praseEd2kTaskInfoBuffer = function (e) {
            let t = {result: 0, hasRecord: 0, gcid: ""};
            try {
                e = r.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 = a.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 = a.BufferUtilitiesNS.readString(e, i, "utf-8")[0], i = a.BufferUtilitiesNS.readString(e, i, "utf-8")[0], i = a.BufferUtilitiesNS.readString(e, i, "hex")[0];
                    let n = a.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(96), o = i(80), r = i(71), a = i(29), s = i(0).default.getLogger("Thunder.shub-http.shub-crypto");
    !function (e) {
        function t(e) {
            let t = r.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 r = o.deflateSync(i);
                e = n.Buffer.concat([t, r])
            }
            let i = n.Buffer.alloc(8);
            e.copy(i, 0, 0, 7), i = t(i);
            let r = n.Buffer.alloc(12);
            e.copy(r, 0, 0, 11);
            let s = n.Buffer.alloc(e.length - 12);
            e.copy(s, 0, 12), s = a.ToolsUtilitiesAWNS.encryptBuffer(s, i);
            let l = n.Buffer.concat([r, s]);
            return l.writeUInt32LE(s.length, 8), l
        }, e.decryptHttpBuffer = function (e) {
            let i = null;
            try {
                let r = n.Buffer.alloc(8);
                e.copy(r, 0, 0, 7), r = t(r);
                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 = a.ToolsUtilitiesAWNS.decryptBuffer(d, r), 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 r = o.inflateSync(t);
                    i = n.Buffer.concat([e, r])
                }
            } 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 r = null;
            if ("gbk" === n) {
                let e = 936, i = o.utf8StringEncodeToBinary(t, e);
                r = Buffer.from(i, "binary")
            } else r = Buffer.from(t, n);
            return (i = e.writeUInt32LE(r.byteLength, i)) + r.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 r = void 0;
            if ("gbk" === i) {
                let i = 936, a = e.toString("binary", t, t + n);
                r = o.utf8StringDecodeFromBinary(a, i)
            } else r = e.toString(i, t, t + n);
            return [t += n, r]
        }
    }(t.BufferUtilitiesNS || (t.BufferUtilitiesNS = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(487), o = i(314);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(316);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\completed-item-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(480), o = i(318);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(320);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\recycle-item-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(481), o = i(322);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(1022);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(431), o = i(324);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(326);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\private-space-open-page-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(441), o = i(328);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(330);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\download-search-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(442), o = i(332);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(334);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var r = i(1), a = Object(r.a)(n.default, void 0, void 0, !1, null, null, null);
    a.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\setting-center-view\\index-container.vue", t.default = a.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(425), o = i(336);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(904);
    var a = i(1), s = Object(a.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(432), o = i(338);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    i(903);
    var a = i(1), s = Object(a.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(443), o = i(340);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(1024);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(462), o = i(354);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(463), o = i(356);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(449), o = i(360);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(464), o = i(362);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(450), o = i(364);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(451), o = i(366);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(452), o = i(368);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(453), o = i(370);
    for (var r in o) "default" !== r && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(r);
    var a = i(1), s = Object(a.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(1026);
    i.n(n).a
}, 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";
    var n = i(1032);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1039);
    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(1052);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1055);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1058);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1060);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1063);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1066);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1073);
    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(1077);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1080);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1082);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1084);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1086);
    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(1091);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1095);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1100);
    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(1106);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1108);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1110);
    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(1117);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1119);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1121);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1123);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1125);
    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 = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), r = i(8), a = i(4), 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 => {
                        a.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 r.FileSystemAWNS.existsAW(t)) && a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(12), a = i(4), s = i(47), l = i(13), d = i(0), u = i(7), c = i(42), h = i(3), f = i(10),
        p = i(38), g = i(33), m = i(72), v = i(81), y = i(76), w = i(518),
        k = u.default(o.join(__rootDir, "../bin/ThunderHelper.node"));

    class T {
        static getInstance() {
            return null === T.instance && (T.instance = new T), T.instance
        }
    }

    T.instance = null, function (e) {
        const t = ["http://", "https://", "ftp://"], i = "thunder://", u = "ed2k://", b = "magnet:?",
            C = [i, "thunders://", u, b];
        let S = !1;
        const I = 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 A(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 D(e) {
            let t = !1;
            return e && (t = 0 === e.indexOf(u)), t
        }

        function x(e) {
            let t = !1;
            return e && (t = 0 === e.indexOf(b)), t
        }

        function N(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 P(e) {
            let t = "", i = (e = e.trim()).substring("thunderx://".length), n = i.lastIndexOf("}");
            return n > 0 && (t = i.substring(0, n + 1)), t
        }

        function O(e) {
            let t = e, i = e.substr(b.length).split("&");
            for (let n = 0; n < i.length; ++n) {
                let o = i[n].indexOf("=");
                if (o < 0) continue;
                let r = i[n].substr(0, o);
                if ("xt" === r || 0 === r.indexOf("xt.")) {
                    const r = "urn:btih:";
                    if (i[n].substr(o + 1, r.length) !== r) break;
                    let a = i[n].substr(o + r.length + 1);
                    if (a.length <= 32) break;
                    let s = /[0-9,A-Z,a-z]{40}/;
                    if (s.test(a)) {
                        a.length > 40 && "&" !== a[40] && (I.information("reg test 40"), a = a.substr(0, 40), (o = e.indexOf(a)) >= 0 && (t = e.substr(0, o + a.length))), I.information("urlOut", t, e);
                        break
                    }
                    if ((s = /[0-9,A-Z,a-z]{32}/).test(a)) {
                        "&" !== a[32] && (I.information("reg test 32"), a = a.substr(0, 32), (o = e.indexOf(a)) >= 0 && (t = e.substr(0, o + a.length))), I.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), I.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), I.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 r = o, a = n[0];
                            o = i.lastIndex - a.length, r >= 0 && t.push(e.substr(r, o - r))
                        }
                        (n = i.exec(e)) || t.push(e.substr(o))
                    }
                    return t
                }(e);
                if (I.information("splitTextByProtocal", i), 1 === i.length) {
                    let e = i[0];
                    if (x(e)) e = O(e); else if (c.Common.isThunderPrivateUrl(e)) e = M(e); else if (D(e)) e = F(e); else {
                        let t = e.trim().match(/([\S]+)/);
                        t && t[0] && (e = t[0])
                    }
                    t.push(e)
                } else i.forEach(e => {
                    x(e = function (e) {
                        let t = e;
                        if (e) {
                            let i = /[ ,\r,\n]/g;
                            i.exec(e) && (t = e.substr(0, i.lastIndex - 1), I.information("urlOut", t, e))
                        }
                        return t
                    }(e = e.trim())) ? e = O(e) : c.Common.isThunderPrivateUrl(e) ? e = M(e) : D(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), I.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]);
                                I.information("index", o, "endIndex", n, "ext", i[t]), o >= 0 && o >= n && (n = o + i[t].length)
                            }
                            n >= 0 && (t = e.substr(0, n), I.information("urlOut", t, e))
                        }
                        return t
                    }(e)), I.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")) {
                        I.information("auto share completely url", n), a.client.callServerFunction("BringMainWndToTop").catch(), a.client.callServerFunction("OpenNewTab", n).catch();
                        break
                    }
                    let o = i.indexOf(n) + n.length, r = i.substring(o);
                    if (e !== t.length - 1) {
                        let n = t[e + 1], a = i.indexOf(n, o);
                        -1 !== a && (r = i.substring(o, a))
                    }
                    let s = /提取码.*?([a-zA-Z0-9]+)/.exec(r);
                    if (s || (s = /.*?([a-zA-Z0-9]+)/.exec(r)), I.information("auto share", s), s && s[1] && 4 === s[1].length) {
                        let e = s[1];
                        I.information("auto share", n, e), n = l.ThunderUtil.setQueryString(n, {pass_code: e}), I.information("auto share open url", n), a.client.callServerFunction("BringMainWndToTop").catch(), a.client.callServerFunction("OpenNewTab", n).catch();
                        break
                    }
                }
            }
        }

        function U(e, t) {
            return n(this, void 0, void 0, function* () {
                if (S) {
                    if (S = !1, !(yield(yield r.asyncRemoteCall.getCurrentWindow()).isVisible())) return
                }
                let i = [], n = f.ConfigNS.getValue("Monitor", "MonitorClipBoard", !0);
                do {
                    if (!n) {
                        I.information("notwatch");
                        break
                    }
                    let r = t.join("");
                    I.information("textList", t), v.URLHelperNS.isBirdKey(r) && (I.information("isbirdkey"), m.openBirdKeyDecodeDialog(r, {from: "clipboard"}));
                    let a = v.URLHelperNS.isYunFetchBackTask(r);
                    if (I.information("clipBoardText", r, "regExp", a), I.information("isYunFetchBackTask regExp", a), a && a.length > 0) {
                        let e = a[1], t = new Buffer(e, "base64").toString("utf8");
                        yield w.ThunderUnionYunFetchBackNS.createTaskFromJsonString(decodeURIComponent(t));
                        break
                    }
                    if (I.information("attachClipBoardCallback type:", e, t), null !== t && void 0 !== t && t.length > 0) {
                        let e = t.join("");
                        if (E(e)) {
                            let t = P(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),
                        k = y.BHOConfigNS.getValue("MagnetGenericSettings", "MagnetWatchLink", 1), T = {};
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        let n = R(i);
                        for (let e of n) T[e] = !0
                    }
                    let b = Object.keys(T);
                    if (!b || 0 === b.length) break;
                    B(t, b);
                    for (let e = 0; e < b.length; e++) {
                        let t = b[e];
                        if (!t) continue;
                        let n = t;
                        if (c.Common.isThunderPrivateUrl(t) && (t = c.Common.parseThunderPrivateUrl(t)), !_(t) && !A(t)) {
                            I.information("isVaildUrl && isVaildUrl url:", t);
                            continue
                        }
                        let r = g.ThunderHelper.getTaskTypeFromUrl(t);
                        if (r === h.DownloadKernel.TaskType.P2sp) {
                            if (0 === d && 0 === u) {
                                I.information("taskType: P2sp, watchTraditionLink === 0 && watchBtLink === 0");
                                continue
                            }
                            let e = s.parse(t);
                            if (null === e) continue;
                            let r = o.extname(e.pathname);
                            if (r && (r = r.toLowerCase()), 0 !== d && N(r, l)) I.information("valid watchTraditionLink"); else {
                                if (0 === u || ".torrent" !== r) {
                                    I.information("invalid ext:", r);
                                    continue
                                }
                                I.information("valid watchBtLink")
                            }
                            -1 !== n.indexOf("(*)") || i.includes(n, 0) || i.push(n)
                        } else if (r === h.DownloadKernel.TaskType.Emule) {
                            if (0 === f) {
                                I.information("taskType: Emule, watchBtLink === 0");
                                continue
                            }
                            -1 !== n.indexOf("(*)") || i.includes(n, 0) || i.push(n)
                        } else if (r === h.DownloadKernel.TaskType.Magnet || r === h.DownloadKernel.TaskType.Bt) {
                            if (0 === Number(k)) {
                                I.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) {
            S = e, k.initClipBoard(), setTimeout(() => {
                k.attachClipBoard(U)
            }, 1e3)
        }, e.getOperInfoInstance = function () {
            return T.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(19), a = i(12), s = i(2), l = i(8), d = i(13), u = i(7), c = i(14), 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 a.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 a.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, () => {
                        r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(2), a = i(7), s = i(17), l = a.default(r.join(__rootDir, "../bin/ThunderHelper.node")),
        d = o.default.getLogger("BindConfigNS");
    let u = r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(10), a = i(12), s = i(14);
    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 a.asyncRemoteCall.getProcess()).argv
            }
            return e
        })
    }

    function u() {
        return n(this, void 0, void 0, function* () {
            return new Promise(e => {
                r.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    let t = r.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 a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(36), r = i(5), a = i(15), s = i(27), l = i(541), d = i(944), u = i(406);
    !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};
                a.server.registerFunctions(e)
            }

            setSceneStatus(e, t, i, n) {
                do {
                    if (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) break;
                    if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1];
                    l.adPlatform.setSceneStatus(o, a, 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 (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) break;
                    if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1];
                    d.adTipsManager.showFunctionalTips(a, 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(83));
                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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(157), r = i(945), a = i(946), s = i(32), l = i(12), d = i(947);
    t.adTipsManager = new class {
        constructor() {
            this.marketTips = new r.AdMarketTips, this.functionalTips = new a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(73), r = i(10), a = i(78), s = i(157), l = i(17), d = i(4), u = i(0);
    t.AdMarketTips = class extends s.AdTips {
        constructor() {
            super(), this.isVip = !1, this.lastShowTime = 0, this.orderType = s.OrderType.Market, this.tipsPriority = a.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(), r.ConfigNS.getValue("AdMarketTips", "TheDate", "") === o.AdHelperNS.getCurDate() && "" !== (e = r.ConfigNS.getValue("AdMarketTips", "shownOrders", "")) && "," === e.slice(e.length - 1) && (e = e.slice(0, e.length - 1)), e
            })
        }

        saveShownOrders() {
            let e = r.ConfigNS.getValue("AdMarketTips", "TheDate", ""), t = o.AdHelperNS.getCurDate(), i = "";
            e === t ? "" !== (i = r.ConfigNS.getValue("AdMarketTips", "shownOrders", "")) && "," === i.slice(i.length - 1) && (i = i.slice(0, i.length - 1)) : r.ConfigNS.setValue("AdMarketTips", "TheDate", t), i = "" !== i ? `${i},${this.curShowOrder.orderId}` : `${this.curShowOrder.orderId}`, r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(73), a = i(29), s = i(8), l = i(78), d = i(157), u = i(67), 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(104));
                    let t = this.curSelectOrder.scenes;
                    if (!(t.length <= 0)) for (let i = 0; i < t.length; ++i) {
                        let n = t[i], r = n.url, l = n.md5, d = `${n.name}.zip`, c = o.join(this.adDataScenesDir, d);
                        this.logger.information("downloadScenes:", r, c);
                        let h = yield u.AxiosNS.downloadFileAW(r, c);
                        if (this.logger.information("下载场景包：result = ", h, ";fileName = ", d), h) {
                            if (!1 === (h = yield a.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, a = this.readyScenesMap.get(n);
                        if (null === a || void 0 === a) {
                            this.readyScenesMap.set(n, i);
                            let e = o.join(this.adDataScenesDir, n);
                            yield r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(73), r = i(10), a = i(78), s = i(157), l = i(17), d = i(4), u = i(13), c = i(82), h = i(147), 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 = a.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, ...r) => 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] = r;
                    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 r = o.materials;
                if (!r || r.length <= 0) this.logger.warning("parseOrders: has no materials"); else {
                    n.materials = [];
                    for (let e of r) {
                        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(), r.ConfigNS.getValue("AdWebPageTips", "TheDate", "") === o.AdHelperNS.getCurDate() && "" !== (e = r.ConfigNS.getValue("AdWebPageTips", "shownOrders", "")) && "," === e.slice(e.length - 1) && (e = e.slice(0, e.length - 1)), e
            })
        }

        saveShownOrders() {
            let e = r.ConfigNS.getValue("AdWebPageTips", "TheDate", ""), t = o.AdHelperNS.getCurDate(), i = "";
            e === t ? "" !== (i = r.ConfigNS.getValue("AdWebPageTips", "shownOrders", "")) && "," === i.slice(i.length - 1) && (i = i.slice(0, i.length - 1)) : r.ConfigNS.setValue("AdWebPageTips", "TheDate", t), i = "" !== i ? `${i},${this.curShowOrder.orderId}` : `${this.curShowOrder.orderId}`, r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), r = i(36), a = i(5), s = i(27), l = i(526), 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}];
                    r.NativeCallNS.registerNativeFunction(e)
                }
            }

            attachCallbackEvent(e, t, i, n) {
                if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0])) return void e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                let o = n[0], r = n[1];
                u.NativeCallModule.nativeCall.AttachNativeEvent(o, (...e) => {
                    d.NativeCallHostModule.nativeCallHost.fireNativeEvent(r, ...e)
                }), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            }

            createTipsWnd(e, t, i, n) {
                do {
                    if (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i) || a.isNullOrUndefined(n)) break;
                    if (a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], d = "", u = null, c = null;
                    a.isNullOrUndefined(n[2]) || (u = n[2]), a.isNullOrUndefined(n[3]) || (c = n[3]), a.isNullOrUndefined(n[4]) || (d = n[4]), l.TipsHelperNS.tipsUIHelper.createTipsWnd(o, r, u, c, d).catch(), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
                } while (0)
            }

            isTipsWndShow(e, t, i) {
                do {
                    if (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.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 (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) break;
                        let n = yield l.TipsHelperNS.tipsUIHelper.isMainWndShow();
                        e.callNativeFunctionCallback(t, i, n)
                    } while (0)
                })
            }

            closeTipsWnd(e, t, i) {
                do {
                    if (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.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, r = null, d = null, u = null, h = null;
                a.isNullOrUndefined(n[0]) || (o = n[0]), a.isNullOrUndefined(n[1]) || (r = n[1]), a.isNullOrUndefined(n[2]) || (d = n[2]), a.isNullOrUndefined(n[3]) || (u = n[3]), a.isNullOrUndefined(n[4]) || (h = n[4]), l.TipsHelperNS.tipsUIHelper.showOrHideTipsWnd(o, r, 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), r = i(27), a = i(28), s = i(13), l = i(147),
        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, r.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) => {
                            a.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, u, ...e)
                        })), l.NotificationHelper.notify(o, c)
                    } 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.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), r = i(17), a = i(0), s = i(13), l = i(8), d = i(534),
        u = a.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 r = yield o.client.callServerFunction("GetSuspensionSkinInfo");
            if (r && v(r) && m(r)) return void (yield w(e));
            i || (i = f ? d.SuspensionSkinHelperNS.vipSkinInfo : d.SuspensionSkinHelperNS.defaultSkinInfo), u.information("skinInfo", i);
            let a = v(i);
            (a && m(i) || !a) && (yield o.client.callServerFunction("SetSuspensionSkinInfo", i))
        })
    }

    function w(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 w(p))
            })
        })(t[0], t[1], t[2]).catch()
    }), r.NativeCallModule.nativeCall.AttachNativeEvent("OnUserLogin", e => n(this, void 0, void 0, function* () {
        yield y(e)
    })), r.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)
            }
        }
    })), r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(388), r = i(27), a = 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(387), 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, r.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0], l = n[1], d = n[2];
                a.LoginHelperNS.loginSDKHelper.saveData(o, l, d).then(n => {
                    e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
                }).catch(() => {
                    e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.CallFailed)
                })
            } while (0)
        }

        getUserID(e, t, i, n) {
            a.LoginHelperNS.loginHelper.getUserInfo("userid", function (n) {
                null !== n && void 0 !== n && "" !== n || (n = "0"), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
            })
        }

        getSessionID(e, t, i, n) {
            a.LoginHelperNS.loginHelper.getUserInfo("sessionid", function (n) {
                e.callNativeFunctionCallback(t, i, r.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, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let l = o[0], d = o[1];
                    n = "memory" === l && "initconfig" === d ? yield a.LoginHelperNS.loginSDKHelper.getInitData() : a.LoginHelperNS.loginSDKHelper.loadData(l, d), e.callNativeFunctionCallback(t, i, r.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, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if ("string" != typeof o[0]) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let n = o[0], l = o[1], d = yield a.LoginHelperNS.loginSDKHelper.fireEvent(n, l);
                    e.callNativeFunctionCallback(t, i, r.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, r.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)
            }
            a.LoginHelperNS.loginHelper.getUserInfoEx(o, function (n) {
                e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
            })
        }

        isLogined(e, t, i, n) {
            (s.isNullOrUndefined(e) || s.isNullOrUndefined(t) || s.isNullOrUndefined(i)) && e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError), a.LoginHelperNS.loginHelper.isLogined(function (n) {
                e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
            })
        }

        openNewTab(e, t, i, n) {
            do {
                if (s.isNullOrUndefined(n)) break;
                if (s.isNullOrUndefined(n[0])) break;
                let o = n[0], a = n[1];
                l.NativeCallModule.nativeCall.CallNativeFunction("OpenNewTab", o, a), e.callNativeFunctionCallback(t, i, r.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, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let n = o[0], a = 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, a, l, u, c, h, f, p, g);
                    e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, m)
                } while (0)
            })
        }

        getThunderVersion(e, t, i, n) {
            let o = u.join(__rootDir, "../../Thunder.exe"), a = y.getFileVersion(o);
            e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, a)
        }

        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]), a.LoginHelperNS.loginHelper.showLoginDlg(o, l), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
        }

        getPeerID(e, t, i, n) {
            let o = y.getPeerID();
            e.callNativeFunctionCallback(t, i, r.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, r.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0], a = n[1], l = n[2], d = h.ConfigNS.getValue(o, a, l);
                e.callNativeFunctionCallback(t, i, r.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, r.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0], a = n[1], l = n[2];
                h.ConfigNS.setValue(o, a, l), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
            } while (0)
        }

        getDeviceID(e, t, i, n) {
            let o = y.getPeerID();
            e.callNativeFunctionCallback(t, i, r.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, r.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, r.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 => {
                                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(a, ...o), e.callNativeFunctionCallback(t, i, r.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

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

        function i() {
            a.asyncFindProcess("xlbrowsershell.exe", function (e) {
                let t = o.join(__rootDir, "../../").toLocaleLowerCase();
                e.forEach(e => {
                    let i = e.path;
                    i && -1 !== i.toLocaleLowerCase().indexOf(t) && a.emptyWorkingSet(e.id)
                })
            }), a.asyncFindProcess("Thunder.exe", function (e) {
                let t = o.join(__rootDir, "../../").toLocaleLowerCase();
                e.forEach(e => {
                    let i = e.path;
                    i && -1 !== i.toLocaleLowerCase().indexOf(t) && a.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 r.asyncRemoteCall.getCurrentWindow();
                e.on("hide", i), e.on("minimize", i), e.on("restore", s), e.on("show", s)
            })
        }, e.emptyBrowserWorkingSet = function () {
            a.asyncFindProcess("xlbrowsershell.exe", function (e) {
                let t = o.join(__rootDir, "../../").toLocaleLowerCase();
                e.forEach(e => {
                    let i = e.path;
                    i && -1 !== i.toLocaleLowerCase().indexOf(t) && a.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), r = i(0), a = i(7), s = r.default.getLogger("360"),
        l = a.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 w() {
        do {
            if (v) break;
            v = !0, o.XLStatNS.trackEvent("core_event", "360desktoplite_run")
        } while (0)
    }

    function k() {
        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 r = n.toLowerCase() === d.toLowerCase(), a = n.toLowerCase() === u.toLowerCase();
            (r || a) && (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 && w()
                }), p = setInterval(() => {
                    k()
                }, 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(955), r = i(2), a = i(7), s = i(15), l = i(26), d = i(10), u = i(65), c = i(9),
        h = a.default(r.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 = r.join(__rootDir, "../../Thunder.exe"), n = {
                        appKey: "eGx4X2Rvd25sb2FkX2RpYWdub3NpcwBSAAE=",
                        appName: "xlx_download_diagnosis",
                        appVer: h.getFileVersion(i),
                        peerId: h.getPeerID(),
                        installChannel: h.getInstallChannel(),
                        configFile: r.join(i, "../detect_stat.xml"),
                        storageFile: r.join(i, "../detect_stat.dat"),
                        useServerXml: 0
                    };
                    if ((t = yield c.XLStatNS.initParam(n)) < 0) break;
                    e = !0
                } while (0);
                let a = {GetDetectStatCookie: i};
                return s.server.registerFunctions(a), 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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(0), a = i(7), s = i(94), l = i(956), d = i(957), u = i(5).promisify, c = i(44), h = i(4),
        f = i(9), p = i(8), g = a.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        m = r.default.getLogger("download-detect-tools");
    !function (e) {
        let t, r, a, v, y, w;
        !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"
        }(r = 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"
        }(a = 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"
        }(w = e.DetectEvent || (e.DetectEvent = {}));
        const k = 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 r = (new Date).getTime();
                        if (yield this.tcpConnectAW(o.address, i)) {
                            let t = (new Date).getTime() - r;
                            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(w.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 r = t[o];
                                this.setDetectDesc("开始连接" + e.name + "【" + (o + 1) + "】");
                                let a = (new Date).getTime(), s = yield d.promise.probe(r);
                                if (s && s.alive) {
                                    let t = (new Date).getTime() - a;
                                    this.setDetectDesc(e.name + "连接成功（耗时：" + t + "毫秒）"), i = !0;
                                    break
                                }
                                m.warning("detectNATServer ping failed! host:", r, ", result", s), n.length > 0 && (n += ","), n += "ping失败（" + r + "）", 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 r = 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 r.length > 0 && (r += ","), r += "options请求失败（" + e.status + "）", this.setDetectDesc("连接帐号登录服务失败（" + e.status + "）", r), t(!1)
                        } catch (e) {
                            m.information("detectAccountLogin exception! e", e), r.length > 0 && (r += ","), r += "options请求失败，" + (e || ""), this.setDetectDesc("连接帐号登录服务失败", r), 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 !== r.IF_TYPE_SOFTWARE_LOOPBACK && o.operStatus === a.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(54))).release();
                    let r = o.join(__rootDir, "../bin/SDK/DownloadSDK.dll");
                    n += ",download_engine_version=" + g.getFileVersion(r), 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(w.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(w.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(w.FinishItem, o, e, o.state)
                    }
                    yield this.getLocalIPInfoAW(), this.fireEvent(w.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 !== r.IF_TYPE_SOFTWARE_LOOPBACK && i.operStatus === a.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 k.getLocalIPInfoAW()
            })
        }, e.start = function (e) {
            k.start(e).catch()
        }, e.restart = function (e) {
            k.restart(e).catch()
        }, e.getAllDectectItems = function () {
            return k.getAllDectectItems()
        }, e.getDNSList = function () {
            return k.getDNSList()
        }, e.attachListener = function (e, t) {
            k.attachListener(e, t)
        }, e.detachListener = function (e, t) {
            k.detachListener(e, t)
        }
    }(t.DownloadDetectToolsNS || (t.DownloadDetectToolsNS = {}))
}, function (e, t) {
    e.exports = require("dns")
}, function (e, t, i) {
    var n = {};
    n.sys = i(958), n.promise = i(571), e.exports = n
}, function (e, t, i) {
    "use strict";
    var n = i(571);
    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 = T(), n = function () {
        }, o = function () {
            var e = {task: void 0, next: null}, t = e, i = !1, n = void 0, r = !1, a = [];

            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 (; a.length;) l(t = a.pop());
                i = !1
            }

            function l(e, t) {
                try {
                    e()
                } catch (e) {
                    if (r) 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: r && process.domain, next: null}, i || (i = !0, n())
            }, "object" == typeof process && "[object process]" === process.toString() && process.nextTick) r = !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) {
                a.push(e), i || (i = !0, n())
            }, o
        }(), r = Function.call;

        function a(e) {
            return function () {
                return r.apply(e, arguments)
            }
        }

        var s, l = a(Array.prototype.slice), d = a(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 = a(Array.prototype.indexOf || function (e) {
            for (var t = 0; t < this.length; t++) if (this[t] === e) return t;
            return -1
        }), c = a(Array.prototype.map || function (e, t) {
            var i = this, n = [];
            return d(i, function (o, r, a) {
                n.push(e.call(t, r, a, 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 = a(Object.prototype.hasOwnProperty), g = Object.keys || function (e) {
            var t = [];
            for (var i in e) p(e, i) && t.push(i);
            return t
        }, m = a(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 r = function (e) {
                    for (var t = e.split("\n"), i = [], n = 0; n < t.length; ++n) {
                        var o = t[n];
                        !k(o) && (-1 === (r = o).indexOf("(module.js:") && -1 === r.indexOf("(node.js:")) && o && i.push(o)
                    }
                    var r;
                    return i.join("\n")
                }(n.join("\n" + v + "\n"));
                f(t, "stack", {value: r, configurable: !0})
            }
        }

        function w(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 k(e) {
            var n = w(e);
            if (!n) return !1;
            var o = n[0], r = n[1];
            return o === t && r >= i && r <= X
        }

        function T() {
            if (e) try {
                throw new Error
            } catch (e) {
                var i = e.stack.split("\n"), n = w(i[0].indexOf("@") > 0 ? i[1] : i[2]);
                if (!n) return;
                return t = n[0], n[1]
            }
        }

        function b(e) {
            return e instanceof A ? e : E(e) ? (t = e, i = S(), b.nextTick(function () {
                try {
                    t.then(i.resolve, i.reject, i.notify)
                } catch (e) {
                    i.reject(e)
                }
            }), i.promise) : K(e);
            var t, i
        }

        b.resolve = b, b.nextTick = o, b.longStackSupport = !1;
        var C = 1;

        function S() {
            var t, i = [], n = [], o = h(S.prototype), r = h(A.prototype);
            if (r.promiseDispatch = function (e, o, r) {
                var a = l(arguments);
                i ? (i.push(a), "when" === o && r[1] && n.push(r[1])) : b.nextTick(function () {
                    t.promiseDispatch.apply(t, a)
                })
            }, r.valueOf = function () {
                if (i) return r;
                var e = x(t);
                return N(e) && (t = e), e
            }, r.inspect = function () {
                return t ? t.inspect() : {state: "pending"}
            }, b.longStackSupport && e) try {
                throw new Error
            } catch (e) {
                r.stack = e.stack.substring(e.stack.indexOf("\n") + 1), r.stackCounter = C++
            }

            function a(o) {
                t = o, b.longStackSupport && e && (r.source = o), d(i, function (e, t) {
                    b.nextTick(function () {
                        o.promiseDispatch.apply(o, t)
                    })
                }, void 0), i = void 0, n = void 0
            }

            return o.promise = r, o.resolve = function (e) {
                t || a(b(e))
            }, o.fulfill = function (e) {
                t || a(K(e))
            }, o.reject = function (e) {
                t || a(V(e))
            }, o.notify = function (e) {
                t || d(n, function (t, i) {
                    b.nextTick(function () {
                        i(e)
                    })
                }, void 0)
            }, o
        }

        function I(e) {
            if ("function" != typeof e) throw new TypeError("resolver must be a function.");
            var t = S();
            try {
                e(t.resolve, t.reject, t.notify)
            } catch (e) {
                t.reject(e)
            }
            return t.promise
        }

        function _(e) {
            return I(function (t, i) {
                for (var n = 0, o = e.length; n < o; n++) b(e[n]).then(t, i)
            })
        }

        function A(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(A.prototype);
            if (n.promiseDispatch = function (i, o, r) {
                var a;
                try {
                    a = e[o] ? e[o].apply(n, r) : t.call(n, o, r)
                } catch (e) {
                    a = V(e)
                }
                i && i(a)
            }, 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 D(e, t, i, n) {
            return b(e).then(t, i, n)
        }

        function x(e) {
            if (N(e)) {
                var t = e.inspect();
                if ("fulfilled" === t.state) return t.value
            }
            return e
        }

        function N(e) {
            return e instanceof A
        }

        function E(e) {
            return (t = e) === Object(t) && "function" == typeof e.then;
            var t
        }

        "object" == typeof process && process && process.env && process.env.Q_DEBUG && (b.longStackSupport = !0), b.defer = S, S.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)
            }
        }, b.Promise = I, b.promise = I, I.race = _, I.all = G, I.reject = V, I.resolve = b, b.passByCopy = function (e) {
            return e
        }, A.prototype.passByCopy = function () {
            return this
        }, b.join = function (e, t) {
            return b(e).join(t)
        }, A.prototype.join = function (e) {
            return b([this, e]).spread(function (e, t) {
                if (e === t) return e;
                throw new Error("Q can't join: not the same: " + e + " " + t)
            })
        }, b.race = _, A.prototype.race = function () {
            return this.then(b.race)
        }, b.makePromise = A, A.prototype.toString = function () {
            return "[object Promise]"
        }, A.prototype.then = function (e, t, i) {
            var n = this, o = S(), r = !1;
            return b.nextTick(function () {
                n.promiseDispatch(function (t) {
                    r || (r = !0, o.resolve(function (t) {
                        try {
                            return "function" == typeof e ? e(t) : t
                        } catch (e) {
                            return V(e)
                        }
                    }(t)))
                }, "when", [function (e) {
                    r || (r = !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, !b.onerror) throw e;
                    b.onerror(e)
                }
                n || o.notify(t)
            }]), o.promise
        }, b.tap = function (e, t) {
            return b(e).tap(t)
        }, A.prototype.tap = function (e) {
            return e = b(e), this.then(function (t) {
                return e.fcall(t).thenResolve(t)
            })
        }, b.when = D, A.prototype.thenResolve = function (e) {
            return this.then(function () {
                return e
            })
        }, b.thenResolve = function (e, t) {
            return b(e).thenResolve(t)
        }, A.prototype.thenReject = function (e) {
            return this.then(function () {
                throw e
            })
        }, b.thenReject = function (e, t) {
            return b(e).thenReject(t)
        }, b.nearer = x, b.isPromise = N, b.isPromiseAlike = E, b.isPending = function (e) {
            return N(e) && "pending" === e.inspect().state
        }, A.prototype.isPending = function () {
            return "pending" === this.inspect().state
        }, b.isFulfilled = function (e) {
            return !N(e) || "fulfilled" === e.inspect().state
        }, A.prototype.isFulfilled = function () {
            return "fulfilled" === this.inspect().state
        }, b.isRejected = function (e) {
            return N(e) && "rejected" === e.inspect().state
        }, A.prototype.isRejected = function () {
            return "rejected" === this.inspect().state
        };
        var P, O, M, F = [], L = [], R = [], B = !0;

        function U() {
            F.length = 0, L.length = 0, B || (B = !0)
        }

        function V(e) {
            var t = A({
                when: function (t) {
                    return t && function (e) {
                        if (B) {
                            var t = u(L, e);
                            -1 !== t && ("object" == typeof process && "function" == typeof process.emit && b.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 && b.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 A({
                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 W(e, t, i) {
            return b(e).spread(t, i)
        }

        function j(e, t, i) {
            return b(e).dispatch(t, i)
        }

        function G(e) {
            return D(e, function (e) {
                var t = 0, i = S();
                return d(e, function (n, o, r) {
                    var a;
                    N(o) && "fulfilled" === (a = o.inspect()).state ? e[r] = a.value : (++t, D(o, function (n) {
                        e[r] = n, 0 == --t && i.resolve(e)
                    }, i.reject, function (e) {
                        i.notify({index: r, value: e})
                    }))
                }, void 0), 0 === t && i.resolve(e), i.promise
            })
        }

        function H(e) {
            if (0 === e.length) return b.resolve();
            var t = b.defer(), i = 0;
            return d(e, function (n, o, r) {
                var a = e[r];
                i++, D(a, 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: r, value: e})
                })
            }, void 0), t.promise
        }

        function z(e) {
            return D(e, function (e) {
                return e = c(e, b), D(G(c(e, function (e) {
                    return D(e, n, n)
                })), function () {
                    return e
                })
            })
        }

        b.resetUnhandledRejections = U, b.getUnhandledReasons = function () {
            return F.slice()
        }, b.stopUnhandledRejectionTracking = function () {
            U(), B = !1
        }, U(), b.reject = V, b.fulfill = K, b.master = function (e) {
            return A({
                isDef: function () {
                }
            }, function (t, i) {
                return j(e, t, i)
            }, function () {
                return b(e).inspect()
            })
        }, b.spread = W, A.prototype.spread = function (e, t) {
            return this.all().then(function (t) {
                return e.apply(void 0, t)
            }, t)
        }, b.async = function (e) {
            return function () {
                function t(e, t) {
                    var r;
                    if ("undefined" == typeof StopIteration) {
                        try {
                            r = i[e](t)
                        } catch (e) {
                            return V(e)
                        }
                        return r.done ? b(r.value) : D(r.value, n, o)
                    }
                    try {
                        r = i[e](t)
                    } catch (e) {
                        return function (e) {
                            return "[object StopIteration]" === m(e) || e instanceof s
                        }(e) ? b(e.value) : V(e)
                    }
                    return D(r, n, o)
                }

                var i = e.apply(this, arguments), n = t.bind(t, "next"), o = t.bind(t, "throw");
                return n()
            }
        }, b.spawn = function (e) {
            b.done(b.async(e)())
        }, b.return = function (e) {
            throw new s(e)
        }, b.promised = function (e) {
            return function () {
                return W([this, G(arguments)], function (t, i) {
                    return e.apply(t, i)
                })
            }
        }, b.dispatch = j, A.prototype.dispatch = function (e, t) {
            var i = this, n = S();
            return b.nextTick(function () {
                i.promiseDispatch(n.resolve, e, t)
            }), n.promise
        }, b.get = function (e, t) {
            return b(e).dispatch("get", [t])
        }, A.prototype.get = function (e) {
            return this.dispatch("get", [e])
        }, b.set = function (e, t, i) {
            return b(e).dispatch("set", [t, i])
        }, A.prototype.set = function (e, t) {
            return this.dispatch("set", [e, t])
        }, b.del = b.delete = function (e, t) {
            return b(e).dispatch("delete", [t])
        }, A.prototype.del = A.prototype.delete = function (e) {
            return this.dispatch("delete", [e])
        }, b.mapply = b.post = function (e, t, i) {
            return b(e).dispatch("post", [t, i])
        }, A.prototype.mapply = A.prototype.post = function (e, t) {
            return this.dispatch("post", [e, t])
        }, b.send = b.mcall = b.invoke = function (e, t) {
            return b(e).dispatch("post", [t, l(arguments, 2)])
        }, A.prototype.send = A.prototype.mcall = A.prototype.invoke = function (e) {
            return this.dispatch("post", [e, l(arguments, 1)])
        }, b.fapply = function (e, t) {
            return b(e).dispatch("apply", [void 0, t])
        }, A.prototype.fapply = function (e) {
            return this.dispatch("apply", [void 0, e])
        }, b.try = b.fcall = function (e) {
            return b(e).dispatch("apply", [void 0, l(arguments, 1)])
        }, A.prototype.fcall = function () {
            return this.dispatch("apply", [void 0, l(arguments)])
        }, b.fbind = function (e) {
            var t = b(e), i = l(arguments, 1);
            return function () {
                return t.dispatch("apply", [this, i.concat(l(arguments))])
            }
        }, A.prototype.fbind = function () {
            var e = this, t = l(arguments);
            return function () {
                return e.dispatch("apply", [this, t.concat(l(arguments))])
            }
        }, b.keys = function (e) {
            return b(e).dispatch("keys", [])
        }, A.prototype.keys = function () {
            return this.dispatch("keys", [])
        }, b.all = G, A.prototype.all = function () {
            return G(this)
        }, b.any = H, A.prototype.any = function () {
            return H(this)
        }, b.allResolved = (P = z, O = "allResolved", M = "allSettled", function () {
            return "undefined" != typeof console && "function" == typeof console.warn && console.warn(O + " is deprecated, use " + M + " instead.", new Error("").stack), P.apply(P, arguments)
        }), A.prototype.allResolved = function () {
            return z(this)
        }, b.allSettled = function (e) {
            return b(e).allSettled()
        }, A.prototype.allSettled = function () {
            return this.then(function (e) {
                return G(c(e, function (e) {
                    function t() {
                        return e.inspect()
                    }

                    return (e = b(e)).then(t, t)
                }))
            })
        }, b.fail = b.catch = function (e, t) {
            return b(e).then(void 0, t)
        }, A.prototype.fail = A.prototype.catch = function (e) {
            return this.then(void 0, e)
        }, b.progress = function (e, t) {
            return b(e).then(void 0, void 0, t)
        }, A.prototype.progress = function (e) {
            return this.then(void 0, void 0, e)
        }, b.fin = b.finally = function (e, t) {
            return b(e).finally(t)
        }, A.prototype.fin = A.prototype.finally = function (e) {
            if (!e || "function" != typeof e.apply) throw new Error("Q can't apply finally callback");
            return e = b(e), this.then(function (t) {
                return e.fcall().then(function () {
                    return t
                })
            }, function (t) {
                return e.fcall().then(function () {
                    throw t
                })
            })
        }, b.done = function (e, t, i, n) {
            return b(e).done(t, i, n)
        }, A.prototype.done = function (e, t, i) {
            var n = function (e) {
                b.nextTick(function () {
                    if (y(e, o), !b.onerror) throw e;
                    b.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)
        }, b.timeout = function (e, t, i) {
            return b(e).timeout(t, i)
        }, A.prototype.timeout = function (e, t) {
            var i = S(), 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
        }, b.delay = function (e, t) {
            return void 0 === t && (t = e, e = void 0), b(e).delay(t)
        }, A.prototype.delay = function (e) {
            return this.then(function (t) {
                var i = S();
                return setTimeout(function () {
                    i.resolve(t)
                }, e), i.promise
            })
        }, b.nfapply = function (e, t) {
            return b(e).nfapply(t)
        }, A.prototype.nfapply = function (e) {
            var t = S(), i = l(e);
            return i.push(t.makeNodeResolver()), this.fapply(i).fail(t.reject), t.promise
        }, b.nfcall = function (e) {
            var t = l(arguments, 1);
            return b(e).nfapply(t)
        }, A.prototype.nfcall = function () {
            var e = l(arguments), t = S();
            return e.push(t.makeNodeResolver()), this.fapply(e).fail(t.reject), t.promise
        }, b.nfbind = b.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 = S();
                return i.push(n.makeNodeResolver()), b(e).fapply(i).fail(n.reject), n.promise
            }
        }, A.prototype.nfbind = A.prototype.denodeify = function () {
            var e = l(arguments);
            return e.unshift(this), b.denodeify.apply(void 0, e)
        }, b.nbind = function (e, t) {
            var i = l(arguments, 2);
            return function () {
                var n = i.concat(l(arguments)), o = S();
                return n.push(o.makeNodeResolver()), b(function () {
                    return e.apply(t, arguments)
                }).fapply(n).fail(o.reject), o.promise
            }
        }, A.prototype.nbind = function () {
            var e = l(arguments, 0);
            return e.unshift(this), b.nbind.apply(void 0, e)
        }, b.nmapply = b.npost = function (e, t, i) {
            return b(e).npost(t, i)
        }, A.prototype.nmapply = A.prototype.npost = function (e, t) {
            var i = l(t || []), n = S();
            return i.push(n.makeNodeResolver()), this.dispatch("post", [e, i]).fail(n.reject), n.promise
        }, b.nsend = b.nmcall = b.ninvoke = function (e, t) {
            var i = l(arguments, 2), n = S();
            return i.push(n.makeNodeResolver()), b(e).dispatch("post", [t, i]).fail(n.reject), n.promise
        }, A.prototype.nsend = A.prototype.nmcall = A.prototype.ninvoke = function (e) {
            var t = l(arguments, 1), i = S();
            return t.push(i.makeNodeResolver()), this.dispatch("post", [e, t]).fail(i.reject), i.promise
        }, b.nodeify = function (e, t) {
            return b(e).nodeify(t)
        }, A.prototype.nodeify = function (e) {
            if (!e) return this;
            this.then(function (t) {
                b.nextTick(function () {
                    e(null, t)
                })
            }, function (t) {
                b.nextTick(function () {
                    e(t)
                })
            })
        }, b.noConflict = function () {
            throw new Error("Q.noConflict only works when Q is used as a global")
        };
        var X = T();
        return b
    })
}, 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 = {}, r = {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] || r[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 = {}, r = {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] || r[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 = {}, r = {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] || r[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(572), r = i(965), a = i(573), s = i(966);

    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 r : o.isMacOS(e) ? t = new a : o.isLinux(e) && (t = new s), t
    }, e.exports = l
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(118), r = i(413);

    function a() {
        r.call(this), this._ipv4Regex = /^([0-9]{1,3}\.){3}[0-9]{1,3}$/
    }

    n.inherits(a, r), a.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)
    }, a.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
            }), r = /([0-9\.]+)/.exec(n);
            this._times.push(parseFloat(r[1], 10))
        }
        ":" === e.slice(-1) && this._changeState(this.STATES.FOOTER)
    }, a.prototype._processFooter = function (e) {
        if (e.indexOf("ms") >= 0) {
            var t = /([0-9\.]+)/g, i = t.exec(e), n = t.exec(e), r = t.exec(e);
            o.all([i, n, r]) && (this._response.min = parseFloat(i[1], 10), this._response.max = parseFloat(n[1], 10), this._response.avg = parseFloat(r[1], 10), this._changeState(this.STATES.END))
        }
    }, e.exports = a
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(413), r = i(573);

    function a() {
        o.call(this)
    }

    n.inherits(a, o), a.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)
    }, a.prototype._processBody = function (e) {
        r.prototype._processBody.call(this, e)
    }, a.prototype._processFooter = function (e) {
        r.prototype._processFooter.call(this, e)
    }, e.exports = a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(12), a = i(388), s = i(19), l = i(17), d = i(4), u = i(32), c = i(520), h = i(0), f = i(64),
        p = i(27), g = i(7), m = h.default.getLogger("Thunder.embedded-browser:individuation-browser"),
        v = g.default(o.join(__rootDir, "../bin/ThunderHelper.node"));

    class y {
        constructor() {
            this.browserCtr = null, this.wnd = null, this.state = void 0, this.curShowCmd = "show", this.browserEventHandler = null, this.attachListener().catch()
        }

        setBrowserEventHandler(e) {
            this.browserEventHandler = e
        }

        closeWnd() {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && this.wnd.close()
            })
        }

        showBrowser(e, t, i, o, r, a, l, d, c) {
            return n(this, void 0, void 0, function* () {
                m.information("showBrowser");
                do {
                    if (!this.browserCtr) {
                        if (!(yield this.createBrowser(e, t, i, o, r, a, l, d, c))) break
                    }
                    if ("loaded" === this.state) {
                        let e = this.browserCtr.getBrowser().getWindowHandle();
                        v.showWindow(e, f.CmdShow.SW_SHOW)
                    } else "error" === this.state && s.ipcRenderer.send(u.ThunderChannelList.channelMRIndividuationBrowserMsg, "OnLoadError")
                } while (0)
            })
        }

        hideBrowser() {
            if (m.information("hideBrowser"), this.browserCtr) {
                let e = this.browserCtr.getBrowser().getWindowHandle();
                v.showWindow(e, f.CmdShow.SW_HIDE)
            }
        }

        destroyBrowser() {
            m.information("destroyBrowser"), this.browserCtr && this.browserCtr.destroyBrowser(!1), this.browserCtr = null, this.state = void 0
        }

        isWindow() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                return this.wnd && !(yield this.wnd.isDestroyed()) && (e = !0), e
            })
        }

        createBrowser(e, t, i, o, s, l, d, u, h) {
            return n(this, void 0, void 0, function* () {
                let n = !1, p = c.CommonFunctionNs.getBrowserWindowRect(e, o, s, l, d, u, h);
                m.information("createBrowser", "hwnd", e, "url", i, "rect", p);
                let g = yield(yield r.asyncRemoteCall.getBrowserWindow()).fromId(t), y = !0;
                return g && (y = yield g.isDestroyed()), y || (this.setWnd(g), this.browserCtr = new a.BrowserCtrl, this.browserCtr.createChromiumBrowser(e, i, !1, p, this.getDefaultEvents()).catch(), this.registerNativeFunctions(this.getNativeFunctionMap()), v.setWindowLong(e, f.SetWindowType.GWL_STYLE, f.WindowStyle.WS_CLIPCHILDREN), n = !0), n
            })
        }

        refresh() {
            m.information("refresh"), this.browserCtr && (this.state = void 0, this.browserCtr.refresh(!0))
        }

        resize(e, t, i, n, o, r) {
            m.information("resize"), this.browserCtr && this.browserCtr.getBrowser() && c.CommonFunctionNs.resizeBrowserWindow(this.browserCtr.getBrowser().getWindowHandle(), e, t, i, n, o, r, "show" === this.curShowCmd ? f.Uflag.SWP_SHOWWINDOW : f.Uflag.SWP_HIDEWINDOW)
        }

        setWnd(e) {
            this.wnd = e, this.wnd.once("close", () => {
                m.information("parentWindow close"), this.destroyBrowser(), this.wnd = null
            })
        }

        closeDialog(e, t, i, n) {
            this.closeWnd().catch(), e.callNativeFunctionCallback(t, i, p.NativeFunctionErrorCode.Success)
        }

        onLoadError(e, t, i, o, r, a) {
            return n(this, void 0, void 0, function* () {
                if (m.information("OnLoadError isMainFrame, errorCode, url: ", t, o, i), (yield this.isWindow()) && t) if (-3 === o) {
                    this.state = "loaded";
                    let t = e.target.getWindowHandle();
                    v.showWindow(t, "show" === this.curShowCmd ? f.CmdShow.SW_SHOW : f.CmdShow.SW_HIDE)
                } else this.state = "error", s.ipcRenderer.send(u.ThunderChannelList.channelMRIndividuationBrowserMsg, "OnLoadError");
                this.browserEventHandler && t && this.browserEventHandler("OnLoadError", t, i, o, r, a)
            })
        }

        onLoadEnd(e, t, i, o, r) {
            return n(this, void 0, void 0, function* () {
                m.information("OnLoadEnd isMainFrame", t, i);
                do {
                    if ("error" === this.state) break;
                    if ((yield this.isWindow()) && t) {
                        this.state = "loaded";
                        let t = e.target.getWindowHandle();
                        v.showWindow(t, "show" === this.curShowCmd ? f.CmdShow.SW_SHOW : f.CmdShow.SW_HIDE)
                    }
                    this.browserEventHandler && t && this.browserEventHandler("OnLoadEnd", t, i, o, r)
                } while (0)
            })
        }

        onBeforeNavigate(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                if (m.information("OnBeforeNavigate isMainframe", t, i), (yield this.isWindow()) && t) {
                    let t = e.target.getWindowHandle();
                    v.showWindow(t, f.CmdShow.SW_HIDE)
                }
                this.browserEventHandler && this.browserEventHandler("OnBeforeNavigate", t, i, o)
            })
        }

        onNewBrowserPopup(e, t, i, n, o, r) {
            m.information("onNewBrowserPopup url", i);
            let a = !1;
            this.browserEventHandler && (a = this.browserEventHandler("OnNewBrowserPopup", i)), a || d.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)
            }]
        }

        getNativeFunctionMap() {
            return [{functionName: "CloseDialog", nativeFunc: this.closeDialog.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(u.ThunderChannelList.channelRMIndividuationBrowserMsg, (e, t, ...i) => {
                    if (m.information(".ipcMain.on:", u.ThunderChannelList.channelRMIndividuationBrowserMsg, t), "show" === t) {
                        this.curShowCmd = "show";
                        let e = i[0], t = i[1], n = i[2], o = i[3], r = i[4], a = i[5], s = i[6], l = i[7], d = i[8];
                        this.showBrowser(e, t, n, o, r, a, s, l, d).catch()
                    } else if ("hide" === t) this.curShowCmd = "hide", this.hideBrowser(); else if ("refresh" === t) this.refresh(); else if ("resize" === t || "move" === t) {
                        let e = i[0], t = i[1], n = i[2], o = i[3], r = i[4], a = i[5];
                        this.resize(e, t, n, o, r, a)
                    }
                })
            })
        }

        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)
        }
    }

    t.IndividuationBrowser = y, t.default = new y
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(0), r = i(3), a = i(16), s = i(7).default(n.join(__rootDir, "../bin/ThunderHelper.node")),
        l = o.default.getLogger("Thunder.TaskP2spAutoRename"), d = a.DownloadKernelEventManager.getEventManager();
    !function (e) {
        let t = void 0, i = void 0;

        function o(e, t) {
            do {
                if (!e) break;
                if (e.getType() !== r.DownloadKernel.TaskType.P2sp) break;
                if (0 == (t & (r.DownloadKernel.TaskDetailChangedFlags.OriginName | r.DownloadKernel.TaskDetailChangedFlags.HTTPContentType))) break;
                let i = "";
                0 != (t & r.DownloadKernel.TaskDetailChangedFlags.HTTPContentType) && (i = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.HTTPContentType), l.information("httpContentType:", i));
                let o = "", a = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskName), d = !1;
                if (1 !== e.getExtraObject().getNameFixed()) {
                    if (0 != (t & r.DownloadKernel.TaskDetailChangedFlags.OriginName)) {
                        let t = e.getTaskAttribute(r.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(a);
                    (!e || "" === e || e.length > 5) && (o = a, 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, r = "Extension",
                            a = s.readRegString(t, n, r);
                        a && "" !== a && (o = e + a)
                    }
                }
                "" !== o && o !== a && (l.information("task rename:", o, ", old name:", a), e.reName(o).catch())
            } while (0)
        }

        function a(e, t) {
            e.forEach(e => {
                o(e, t)
            })
        }

        e.init = function () {
            do {
                if (void 0 !== t && void 0 !== i) break;
                t = d.attachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    e && e[0] === r.DownloadKernel.TaskEventType.DetailChanged && a(e[1], e[2])
                }), i = d.attachTaskEvent(r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, (...e) => {
                    e && e[0] === r.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(r.DownloadKernel.TaskEventType.DetailChanged, t), t = void 0, d.detachTaskEvent(r.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), r = i(15), a = i(404), 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
                    };
                    r.server.registerFunctions(e)
                }
            }

            getDownloadCompleteTaskType(e, t, ...i) {
                let n = a.ScheduleCompleteTaskType.UnKnown;
                do {
                    if (!e) break;
                    n = a.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]), a.ScheduleTaskNS.setDownloadCompleteTaskType(i[0]), n = !0
                } while (0);
                return n
            }

            cancelDownloadCompleteTask(e, t, ...i) {
                let n = !1;
                do {
                    if (!e) break;
                    s.information("cancelDownloadCompleteTask"), a.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, r) {
            function a(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    r(e)
                }
            }

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

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

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), r = i(15), a = i(0), s = i(11), l = i(3), d = i(64), u = i(4), c = i(61), h = i(8), f = i(13),
        p = i(10), g = i(26), m = i(35), v = i(16), y = i(38), w = i(971), k = i(31),
        T = v.DownloadKernelEventManager.getEventManager(), b = s.DownloadKernelTaskManager.getTaskManager(),
        C = a.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, r.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* () {
                    C.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, r) => n(this, void 0, void 0, function* () {
                    if (this.panTasks && r) {
                        let e = this.panTasks.get(r);
                        C.information("value", e, "panFileId", "panTasks", this.panTasks), b.stopTask(e, l.DownloadKernel.TaskStopReason.Unknown), this.panTasks.delete(r)
                    }
                })))
            })
        }

        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 (C.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, r, a) => n(this, void 0, void 0, function* () {
                        i.panFileId && r === i.panFileId && (yield this.createTask(i.playUrl, i.fileName, i.panFileId, t, a), u.client.detachServerEvent("OnOpenSucceededCreateTask", this.onOpenSuccCookie), this.onOpenSuccCookie = 0)
                    }))
                } while (0);
                return e
            })
        }

        createTask(e, t, i, a, s) {
            return n(this, void 0, void 0, function* () {
                let s = g.default.getConfigInfo("xmpDoubleUrl", "close");
                if (C.information("createTask close", s), s) return C.information("xmpDoubleUrl close"), !1;
                this.taskStateChangeCookid && (T.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 (C.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)), C.information("dirPath", m);
                let v = {taskBaseInfo: {taskName: t, savePath: m, productInfo: "", origin: ""}, isBackground: !0},
                    y = {url: e, nameFixed: 1};
                v.p2spTaskInfo = y;
                let k = b.findTask(e);
                yield b.deleteTask(k, !0);
                let S = yield b.createTask(l.DownloadKernel.TaskType.P2sp, v);
                if (!S) return !1;
                if (k = S.getId(), C.information("createTask taskId", k), a) S.enableDcdnWithVipCert(a); else {
                    let e = yield r.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;
                        S.enableDcdnWithVipCert(t)
                    }
                }
                C.information("token", a);
                let I = !1;
                S.setDownloadStrategy(l.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_ONLINEPLAYING), I = yield b.startTask(k), this.setPanTask(i, k);
                let _ = "";
                return this.taskStateChangeCookid = T.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) === k && t[e].getTaskStatus() === l.DownloadKernel.TaskStatus.Started) {
                            T.detachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, this.taskStateChangeCookid), this.taskStateChangeCookid = 0, _ = yield S.getPlayUrl(-1), yield this.callXmpMainRenderer("XmpPlayerSetConfig", w.APlayerConfigId.CONFIGID_NETWORK__STUFFURL, _), yield this.callXmpMainRenderer("XmpPlayerRecordStat", "setYunDownloadId", k), C.information("OnSetAplayerConfig taskId", k, "ret", I, "playUrl", _);
                            break
                        }
                    } while (0)
                })), I
            })
        }

        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* () {
                C.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), i.height = Math.max(i.height, 296), yield this.callXmpMainRenderer("UpdateDownloadEmbedRect", i), yield this.callXmpMainProcess("UpdateDownloadEmbedRect", i)
            })
        }

        updatePanEmbedRect(e, t, i) {
            return n(this, void 0, void 0, function* () {
                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 b.deleteTask(e, !0);
                return !0
            })
        }

        thunderResize(e, t) {
            return n(this, void 0, void 0, function* () {
                yield r.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, a) {
            return n(this, void 0, void 0, function* () {
                a === d.XmpPlaySoure.PLAY_BY_PAN ? r.server.callClientFunctionByName("ThunderPanPluginWebview", "ShowFileDetail", {
                    fileId: o,
                    redirect: !0
                }).catch() : yield y.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], r = i[4], a = i[5];
                if (r) {
                    let t = b.findTask(e);
                    C.information("createYunPlayTask deleteTask taskId", t, "preUrl", r), yield b.deleteTask(t, !0)
                }
                yield this.createTask(e, t, n, o, a)
            })
        }

        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, r, a) {
            return n(this, void 0, void 0, function* () {
                i || (i = this.panTasks.get(a));
                let e = b.getTaskFromTaskId(i);
                if (!e) return;
                let t = e.getVirtualTaskId();
                o = o || -1, C.information("taskId", i, "bytesPerSecond", r, "virtualTaskId", t), k.ThunderKernel.updateTaskVideoByteRatio(t, -1, r)
            })
        }
    }
}, 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";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(4), o = i(0).default.getLogger("common/skin"), r = !0;
    let a = null;

    function s(e) {
        if (!r || null === e || void 0 === e) return;
        let t = localStorage.getItem("skin_body_classes");
        a && a.classes === e.classes || (localStorage.removeItem("skin_body_classes"), e && e.classes && (document.body.classList.add(e.classes), localStorage.setItem("skin_body_classes", e.classes)), a && a.classes ? document.body.classList.remove(a.classes) : t !== e.classes && document.body.classList.remove(t), a = 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) {
}]);