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AAO,OAAS,GAC/B,EAAK,EAAM,IAAM,EACjB,EAAS,EAAO,OAcpB,GAbA,EAAM,OAAS,EACf,EAAM,UAAU,MAAM,CAClB,WAAY,EAAO,WACnB,MAAO,EACP,aAAc,EACd,SAAU,EAAO,QACjB,MAAO,KAAK,IAAI,EAAO,OAAS,EAAG,GACnC,OAAQ,EAAM,OACd,iBAAkB,EAAO,YAE7B,EAAM,UAAU,GAAG,kBAAc,GAAY,GAAG,MAAK,WACjD,EAAM,QAAQ,qBAClB,IACI,IAAO,EAIP,OAHA,EAAM,UAAU,UAAU,QACtB,GACA,EAAM,UAAU,GAAG,IAGvB,GACA,EAAM,UAAU,GAAG,EAC3B,IAAG,OAAM,WACL,EAAM,QAAQ,MAAM,sCAAuC,WAAY,GAC3E,GACJ,EACA,EAAY,UAAU,MAAQ,WAC1B,KAAK,YACL,KAAK,iBACL,KAAK,aACT,EACO,CACX,CA9JgC,CA8J9B,iBAEE,YAAc,IAAI,YAEtB,QAAQ,YAAc,YACtB,QAAQ,YAAc","file":"/npm/web-portals@0.0.1/dist/index.common.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/web-portals@0.0.1/dist/index.common.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nfunction __spreadArray(to, from) {\r\n    for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n        to[j] = from[i];\r\n    return to;\r\n}\n\nvar ModuleProptey = /** @class */ (function () {\r\n    function ModuleProptey(id, model, application) {\r\n        this.param = {};\r\n        this.events = {\r\n            transformStart: function () { return undefined; },\r\n            transformEnd: function () { return undefined; },\r\n            start: function () { return undefined; },\r\n            load: function () { return undefined; },\r\n            loadError: function () { return undefined; },\r\n            preload: function () { return undefined; },\r\n            destroy: function () { return undefined; }\r\n        };\r\n        this.createTime = Date.now();\r\n        this.transient = false;\r\n        this.shadowView = null;\r\n        this.shadowViewType = null;\r\n        this.status = {\r\n            init: false,\r\n            preload: false,\r\n            prefetch: false,\r\n            prerender: false\r\n        };\r\n        this.config = {\r\n            title: '',\r\n            rel: 'module',\r\n            level: 0,\r\n            source: {},\r\n            prerender: [],\r\n            apply: ['smart-setTimeout', 'link-in-new-window', ['tap-highlight', 'tap-highlight data-appeared']],\r\n            free: true,\r\n            background: 'auto'\r\n        };\r\n        this.resources = {\r\n            script: [],\r\n            image: [],\r\n            worker: [],\r\n            video: [],\r\n            audio: [],\r\n            font: [],\r\n            style: []\r\n        };\r\n        this.elements = {\r\n            container: document.body\r\n        };\r\n        this.id = id;\r\n        this.param = {};\r\n        this.application = application;\r\n        var _a = this.setDefaultConfig(model), config = _a.config, resources = _a.resources, events = _a.events;\r\n        Object.assign(this.config, config);\r\n        Object.assign(this.resources, resources);\r\n        Object.assign(this.events, events);\r\n    }\r\n    ModuleProptey.prototype.setDefaultConfig = function (manifest) {\r\n        var _a, _b, _c;\r\n        if (((_a = manifest.config) === null || _a === void 0 ? void 0 : _a.rel) === 'frameworks') ;\r\n        if ((_b = manifest.config) === null || _b === void 0 ? void 0 : _b.portal) {\r\n            if (!manifest.config.free) {\r\n                console.error('Module.config[free & portal] conflit!');\r\n            }\r\n        }\r\n        if (isNaN((_c = manifest.config) === null || _c === void 0 ? void 0 : _c.level)) {\r\n            manifest.config.level = 0;\r\n        }\r\n        if (manifest.config.level > 10000) {\r\n            console.error('Module.confi.level <= 9999!');\r\n        }\r\n        return manifest;\r\n    };\r\n    return ModuleProptey;\r\n}());\n\nvar ModuleState = /** @class */ (function (_super) {\r\n    __extends(ModuleState, _super);\r\n    function ModuleState(id, model, application) {\r\n        return _super.call(this, id, model, application) || this;\r\n    }\r\n    Object.defineProperty(ModuleState.prototype, \"sameOrigin\", {\r\n        get: function () {\r\n            if (!this.uri)\r\n                return true;\r\n            var link = document.createElement('a');\r\n            link.href = this.uri;\r\n            var isSameOrigin = link.host === location.host;\r\n            return isSameOrigin;\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    Object.defineProperty(ModuleState.prototype, \"level\", {\r\n        get: function () {\r\n            var _a;\r\n            var level = this.config.level || (((_a = this.application.activeModule) === null || _a === void 0 ? void 0 : _a.config.level) || 1) + 1;\r\n            var baseLevel = this.config.free ? 20000 : 10000;\r\n            return baseLevel + level;\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    Object.defineProperty(ModuleState.prototype, \"rel\", {\r\n        get: function () {\r\n            if (this.id === 'system')\r\n                return 'system';\r\n            if (this.id === 'frameworks')\r\n                return 'frameworks';\r\n            return this.config.rel || 'module';\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    Object.defineProperty(ModuleState.prototype, \"uri\", {\r\n        get: function () {\r\n            var _a, _b;\r\n            return ((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.source) === null || _b === void 0 ? void 0 : _b.src) || '';\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    Object.defineProperty(ModuleState.prototype, \"viewType\", {\r\n        get: function () {\r\n            var _a;\r\n            if (this.rel !== 'module')\r\n                return 'shadow';\r\n            if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.portal) || !this.uri)\r\n                return 'iframe';\r\n            if (!this.shadowViewType) {\r\n                var type = ('HTMLPortalElement' in window) && this.sameOrigin ? 'portal' : 'iframe';\r\n                this.shadowViewType = type;\r\n            }\r\n            return this.shadowViewType;\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    return ModuleState;\r\n}(ModuleProptey));\n\nvar ModuleMount = /** @class */ (function (_super) {\r\n    __extends(ModuleMount, _super);\r\n    function ModuleMount(id, model, application) {\r\n        return _super.call(this, id, model, application) || this;\r\n    }\r\n    ModuleMount.prototype.timeTick = function () {\r\n        if (Date.now() - this.createTime > (this.config.timeout || 3600000)) {\r\n            if (this.shadowView)\r\n                this.destroy();\r\n        }\r\n    };\r\n    ModuleMount.prototype.show = function () {\r\n        if (this.viewType !== 'iframe')\r\n            return;\r\n        var sandbox = this.shadowView;\r\n        var contentWindow = sandbox === null || sandbox === void 0 ? void 0 : sandbox.contentWindow;\r\n        if (contentWindow) {\r\n            contentWindow.window.postMessage({\r\n                type: 'module-visible',\r\n                historyDirection: this.application.transform.historyDirection\r\n            }, '*');\r\n            if (this.sameOrigin) {\r\n                contentWindow.window['moduleVisibilityState'] = 'visible';\r\n            }\r\n        }\r\n    };\r\n    ModuleMount.prototype.hide = function () {\r\n        var _a;\r\n        if (this.viewType !== 'iframe')\r\n            return;\r\n        var sandbox = this.shadowView;\r\n        var contentWindow = (_a = sandbox === null || sandbox === void 0 ? void 0 : sandbox.contentWindow) === null || _a === void 0 ? void 0 : _a.window;\r\n        if (contentWindow) {\r\n            contentWindow.postMessage({\r\n                type: 'module-hidden',\r\n                historyDirection: this.application.transform.historyDirection\r\n            }, '*');\r\n            if (this.sameOrigin) {\r\n                contentWindow['moduleVisibilityState'] = 'visible';\r\n            }\r\n        }\r\n    };\r\n    ModuleMount.prototype.destroy = function () {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            var _a, _b, _c;\r\n            if (_this.rel !== 'module')\r\n                return reject();\r\n            if (((_a = _this.application.transform) === null || _a === void 0 ? void 0 : _a.id) === _this.id)\r\n                return reject();\r\n            if (_this.viewType === 'iframe')\r\n                _this.unload().catch(reject);\r\n            (_b = _this.elements.container.parentElement) === null || _b === void 0 ? void 0 : _b.removeChild(_this.elements.container);\r\n            _this.status.prefetch = _this.status.preload = _this.status.prerender = false;\r\n            _this.shadowView = null;\r\n            _this.status.init = false;\r\n            (_c = _this.events) === null || _c === void 0 ? void 0 : _c.destroy.bind(_this)();\r\n            resolve();\r\n        });\r\n    };\r\n    ModuleMount.prototype.fate = function () {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            var _a;\r\n            if (_this.rel !== 'module')\r\n                return reject();\r\n            if (_this.config.background === false)\r\n                return resolve();\r\n            if (_this.viewType !== 'iframe')\r\n                return resolve();\r\n            if (_this.sameOrigin === false)\r\n                return resolve();\r\n            var sandbox = _this.shadowView;\r\n            if (!sandbox)\r\n                return;\r\n            try {\r\n                var contentDocumentElement = (_a = sandbox.contentDocument) === null || _a === void 0 ? void 0 : _a.documentElement;\r\n                if (document.getElementsByTagName('video')[0])\r\n                    return resolve();\r\n                if (document.getElementsByTagName('source')[0])\r\n                    return resolve();\r\n                if (document.getElementsByTagName('object')[0])\r\n                    return resolve();\r\n                if (document.getElementsByTagName('audio')[0])\r\n                    return resolve();\r\n                if (document.getElementsByTagName('embed')[0])\r\n                    return resolve();\r\n                if (document.getElementsByTagName('applet')[0])\r\n                    return resolve();\r\n                if (document.getElementsByTagName('iframe')[0])\r\n                    return resolve();\r\n                if (contentDocumentElement) {\r\n                    var counter_1 = {\r\n                        times: 0\r\n                    };\r\n                    _this.mutationObserver = new MutationObserver(function () {\r\n                        counter_1.times++;\r\n                        if (counter_1.times > 1000) {\r\n                            resolve();\r\n                            _this.mutationObserver.disconnect();\r\n                        }\r\n                    });\r\n                    _this.mutationObserver.observe(contentDocumentElement, {\r\n                        subtree: true,\r\n                        attributes: true,\r\n                        childList: true,\r\n                        characterData: true,\r\n                        attributeOldValue: true,\r\n                        characterDataOldValue: true\r\n                    });\r\n                    setTimeout(function () {\r\n                        if (counter_1.times > 10)\r\n                            resolve();\r\n                    }, 3000);\r\n                }\r\n                else {\r\n                    reject();\r\n                }\r\n            }\r\n            catch (error) {\r\n                reject();\r\n            }\r\n        });\r\n    };\r\n    ModuleMount.prototype.unfate = function () {\r\n        var _a;\r\n        (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\r\n    };\r\n    ModuleMount.prototype.unload = function () {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            var _a, _b;\r\n            _this.unfate();\r\n            var sandbox = _this.shadowView;\r\n            if (!sandbox)\r\n                return resolve();\r\n            sandbox.style.display = 'none';\r\n            sandbox.src = 'about:blank';\r\n            try {\r\n                var contentWindow = (_a = sandbox.contentWindow) === null || _a === void 0 ? void 0 : _a.window;\r\n                var contentDocument = sandbox.contentDocument;\r\n                contentWindow === null || contentWindow === void 0 ? void 0 : contentWindow.location.reload();\r\n                contentDocument === null || contentDocument === void 0 ? void 0 : contentDocument.open();\r\n                contentDocument === null || contentDocument === void 0 ? void 0 : contentDocument.write('');\r\n                contentDocument === null || contentDocument === void 0 ? void 0 : contentDocument.close();\r\n            }\r\n            catch (error) {\r\n                reject();\r\n            }\r\n            (_b = sandbox.parentElement) === null || _b === void 0 ? void 0 : _b.removeChild(sandbox);\r\n            resolve();\r\n        });\r\n    };\r\n    return ModuleMount;\r\n}(ModuleState));\n\nvar ModulePrefetch = /** @class */ (function (_super) {\r\n    __extends(ModulePrefetch, _super);\r\n    function ModulePrefetch(id, model, application) {\r\n        return _super.call(this, id, model, application) || this;\r\n    }\r\n    ModulePrefetch.prototype.prefetch = function () {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            Promise.all([\r\n                _this.prefetchStatic(_this.resources.script, 'script'),\r\n                _this.prefetchStatic(_this.resources.image, 'image'),\r\n                _this.prefetchStatic(_this.resources.worker, 'worker'),\r\n                _this.prefetchStatic(_this.resources.video, 'video'),\r\n                _this.prefetchStatic(_this.resources.audio, 'audio'),\r\n                _this.prefetchStatic(_this.resources.font, 'font'),\r\n                _this.prefetchStatic(_this.resources.style, 'style')\r\n            ]).then(function () {\r\n                _this.status.prefetch = true;\r\n                resolve(true);\r\n            }).catch(reject);\r\n        });\r\n    };\r\n    ModulePrefetch.prototype.prefetchStatic = function (list, as) {\r\n        var _this = this;\r\n        if (list === void 0) { list = []; }\r\n        if (as === void 0) { as = 'script'; }\r\n        return new Promise(function (resolve, reject) {\r\n            Promise.all([].concat(list).map(function (url) { return _this.beforehandLink(url, 'preload', as); })).then(resolve).catch(reject);\r\n        });\r\n    };\r\n    ModulePrefetch.prototype.beforehandLink = function (url, rel, as) {\r\n        if (rel === void 0) { rel = 'preload'; }\r\n        if (as === void 0) { as = 'worker | video | audio | font | script | style | image | document'; }\r\n        if (!url)\r\n            return Promise.reject();\r\n        return new Promise(function (resolve, reject) {\r\n            var _a;\r\n            var link = document.createElement('link');\r\n            link.rel = rel;\r\n            link.href = url;\r\n            link.as = as;\r\n            link.onload = resolve;\r\n            link.onerror = reject;\r\n            if (!((_a = link.relList) === null || _a === void 0 ? void 0 : _a.supports(rel))) {\r\n                reject();\r\n            }\r\n            document.getElementsByTagName('head')[0].appendChild(link);\r\n        });\r\n    };\r\n    return ModulePrefetch;\r\n}(ModuleMount));\n\nvar windowOpen = (function (moduleWindow, application) {\r\n    var realOpen = moduleWindow.open;\r\n    moduleWindow.addEventListener('click', function (event) {\r\n        var path = event['path'] || [];\r\n        var anchor = (function () {\r\n            for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\r\n                var el = path_1[_i];\r\n                if (el.tagName === 'A')\r\n                    return el;\r\n            }\r\n        })();\r\n        if ((anchor === null || anchor === void 0 ? void 0 : anchor.target) === '_bank') {\r\n            var href_1 = anchor.href;\r\n            var title = anchor.title || '';\r\n            var preset = anchor.getAttribute('preset');\r\n            if (href_1) {\r\n                application.pushWindow(href_1, title, preset).catch(function () {\r\n                    realOpen(href_1);\r\n                });\r\n                event.stopPropagation();\r\n                event.preventDefault();\r\n            }\r\n        }\r\n    });\r\n    moduleWindow.open = function (url, target, features) {\r\n        if (typeof url !== 'string' || target || features) {\r\n            return realOpen(url, target, features);\r\n        }\r\n        if (typeof url === 'string') {\r\n            application.pushWindow(url, '').catch(function () {\r\n                realOpen(url);\r\n            });\r\n        }\r\n        return null;\r\n    };\r\n});\n\nvar getTimerHandler = function (handler, moduleWindow) {\r\n    return function () {\r\n        var _args = [];\r\n        for (var _i = 0; _i < arguments.length; _i++) {\r\n            _args[_i] = arguments[_i];\r\n        }\r\n        if (moduleWindow['moduleVisibilityState'] === 'visible') {\r\n            if (typeof handler === 'function') {\r\n                handler.apply(void 0, _args);\r\n            }\r\n            else if (typeof handler === 'string') {\r\n                var evalHander = new moduleWindow['Function'](\"return \" + handler);\r\n                evalHander.apply(void 0, _args);\r\n            }\r\n        }\r\n    };\r\n};\r\nvar smartSetTimeout = function (moduleWindow) {\r\n    var realSetTimeout = moduleWindow.setTimeout;\r\n    moduleWindow.setInterval = function (handler, timeout) {\r\n        var args = [];\r\n        for (var _i = 2; _i < arguments.length; _i++) {\r\n            args[_i - 2] = arguments[_i];\r\n        }\r\n        var fn = getTimerHandler(handler, moduleWindow);\r\n        var intervalId = realSetTimeout.apply(void 0, __spreadArray([fn, timeout], args));\r\n        return intervalId;\r\n    };\r\n};\r\nvar smartSetInterval = function (moduleWindow) {\r\n    var realSetInterval = moduleWindow.setInterval;\r\n    moduleWindow.setInterval = function (handler, timeout) {\r\n        var args = [];\r\n        for (var _i = 2; _i < arguments.length; _i++) {\r\n            args[_i - 2] = arguments[_i];\r\n        }\r\n        var fn = getTimerHandler(handler, moduleWindow);\r\n        var intervalId = realSetInterval.apply(void 0, __spreadArray([fn, timeout], args));\r\n        return intervalId;\r\n    };\r\n};\n\nvar tapHighlight = (function (moduleWindow, capture) {\r\n    var touchActive = {\r\n        element: null,\r\n        oldStyle: ''\r\n    };\r\n    var addHighlight = function (event) {\r\n        var captureList = capture ? typeof capture === 'string' ? capture.split(' ') : capture : null;\r\n        var path = event['path'] || event.composedPath() || [];\r\n        path.splice(-3);\r\n        var anchor = (function () {\r\n            var _a, _b, _c;\r\n            for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\r\n                var el = path_1[_i];\r\n                if (!((_a = el.children) === null || _a === void 0 ? void 0 : _a.length))\r\n                    continue;\r\n                if (el.tagName === 'A')\r\n                    return el;\r\n                if (captureList) {\r\n                    for (var _d = 0, captureList_1 = captureList; _d < captureList_1.length; _d++) {\r\n                        var attr = captureList_1[_d];\r\n                        if (el === null || el === void 0 ? void 0 : el.getAttribute(attr))\r\n                            return el;\r\n                    }\r\n                }\r\n            }\r\n            return (((_c = (_b = path[0]) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c.length) ? path[0] : path[1]) || event.target;\r\n        })();\r\n        if (!anchor)\r\n            return;\r\n        touchActive.element = anchor;\r\n        touchActive.oldStyle = anchor.style.filter;\r\n        setTimeout(function () {\r\n            if (touchActive.element === anchor)\r\n                anchor.style.filter = touchActive.oldStyle + ' brightness(.8)';\r\n            var continueCheck = function () {\r\n                setTimeout(function () {\r\n                    if (touchActive.element !== anchor) {\r\n                        anchor.style.filter = touchActive.oldStyle;\r\n                    }\r\n                    else {\r\n                        continueCheck();\r\n                    }\r\n                }, 600);\r\n            };\r\n            continueCheck();\r\n        }, 60);\r\n    };\r\n    var cancelHighlight = function () {\r\n        var _a, _b;\r\n        if ((_b = (_a = touchActive.element) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.filter) {\r\n            touchActive.element.style.filter = touchActive.oldStyle;\r\n        }\r\n        touchActive.element = null;\r\n        touchActive.oldStyle = '';\r\n    };\r\n    var delayCancelHighlight = function () {\r\n        setTimeout(function () {\r\n            cancelHighlight();\r\n        }, 600);\r\n    };\r\n    moduleWindow.document.addEventListener('touchstart', addHighlight);\r\n    moduleWindow.addEventListener('touchstart', addHighlight);\r\n    moduleWindow.addEventListener('touchmove', cancelHighlight);\r\n    moduleWindow.addEventListener('touchcancel', cancelHighlight);\r\n    moduleWindow.addEventListener('touchend', delayCancelHighlight);\r\n});\n\nvar inject = (function (moduleWindow, module) {\r\n    var config = module.config, application = module.application;\r\n    var apply = config.apply || [];\r\n    if (Array.isArray(apply)) {\r\n        for (var _i = 0, apply_1 = apply; _i < apply_1.length; _i++) {\r\n            var item = apply_1[_i];\r\n            switch (item) {\r\n                case 'link-in-new-window':\r\n                    windowOpen(moduleWindow, application);\r\n                    break;\r\n                case 'smart-setTimeout':\r\n                    smartSetTimeout(moduleWindow);\r\n                    break;\r\n                case 'smart-setInterval':\r\n                    smartSetInterval(moduleWindow);\r\n                    break;\r\n                case 'tap-highlight':\r\n                    tapHighlight(moduleWindow);\r\n                    break;\r\n                default:\r\n                    if (Array.isArray(item)) {\r\n                        switch (item[0]) {\r\n                            case 'tap-highlight':\r\n                                tapHighlight(moduleWindow, item[1]);\r\n                                break;\r\n                        }\r\n                    }\r\n                    break;\r\n            }\r\n        }\r\n    }\r\n    if (typeof config.inject === 'function') {\r\n        config.inject(moduleWindow, module);\r\n    }\r\n});\n\nvar ModuleView = /** @class */ (function (_super) {\r\n    __extends(ModuleView, _super);\r\n    function ModuleView(id, model, application) {\r\n        return _super.call(this, id, model, application) || this;\r\n    }\r\n    ModuleView.prototype.rigesterElement = function (name, element) {\r\n        this.elements[name] = element;\r\n        if (name === 'container' && element) {\r\n            this.status.init = true;\r\n            this.addPanMoveHolder(element);\r\n        }\r\n    };\r\n    ModuleView.prototype.addPanMoveHolder = function (container) {\r\n        var touchBorder = this.config.touchBorder;\r\n        if (!touchBorder)\r\n            return;\r\n        var threshold = 12;\r\n        var topHolder = document.createElement('div');\r\n        var rightHolder = document.createElement('div');\r\n        var bottomHolder = document.createElement('div');\r\n        var leftHolder = document.createElement('div');\r\n        var mainHolder = document.createElement('div');\r\n        topHolder.style.cssText = \"position: absolute; top: 0; right: 0; left: 0; z-index: 1; height: \" + threshold + \"px;\";\r\n        rightHolder.style.cssText = \"position: absolute; top: 0; right: 0; bottom: 0; z-index: 1; width: \" + threshold + \"px;\";\r\n        bottomHolder.style.cssText = \"position: absolute; right: 0; bottom: 0; left: 0; z-index: 1; height: \" + threshold + \"px;\";\r\n        leftHolder.style.cssText = \"position: absolute; top: 0; bottom: 0; left: 0; z-index: 1; width: \" + threshold + \"px;\";\r\n        mainHolder.style.cssText = \"display: none; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2;\";\r\n        container.appendChild(topHolder);\r\n        container.appendChild(rightHolder);\r\n        container.appendChild(bottomHolder);\r\n        container.appendChild(leftHolder);\r\n        container.appendChild(mainHolder);\r\n        touchBorder({\r\n            topHolder: topHolder,\r\n            rightHolder: rightHolder,\r\n            bottomHolder: bottomHolder,\r\n            leftHolder: leftHolder,\r\n            mainHolder: mainHolder\r\n        }, this, this.application);\r\n    };\r\n    ModuleView.prototype.createSandbox = function (uri, config) {\r\n        var sandbox = document.createElement('iframe');\r\n        if (config !== undefined)\r\n            sandbox.setAttribute('sandbox', config);\r\n        if (uri)\r\n            sandbox.src = uri;\r\n        return sandbox;\r\n    };\r\n    ModuleView.prototype.writeSandbox = function (sandbox, container) {\r\n        var _a, _b;\r\n        sandbox.src = 'about:blank';\r\n        sandbox.setAttribute('seamless', 'seamless');\r\n        container.appendChild(sandbox);\r\n        var contentDocument = sandbox.contentDocument;\r\n        var contentWindow = sandbox.contentWindow;\r\n        if (contentWindow && contentDocument) {\r\n            contentDocument.open();\r\n            contentDocument.write(((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.source) === null || _b === void 0 ? void 0 : _b.html) || '<head><meta charset=\"utf-8\"></head>');\r\n            contentDocument.close();\r\n            inject(contentWindow === null || contentWindow === void 0 ? void 0 : contentWindow.window, this);\r\n        }\r\n    };\r\n    ModuleView.prototype.createShadowbox = function (render) {\r\n        var shadowbox = document.createElement('div');\r\n        var shadowboxInner = document.createElement('div');\r\n        shadowbox === null || shadowbox === void 0 ? void 0 : shadowbox.attachShadow({ mode: 'open' });\r\n        var shadowRoot = shadowbox.shadowRoot ? shadowbox.shadowRoot : shadowbox;\r\n        shadowRoot.appendChild(shadowboxInner);\r\n        render(shadowboxInner);\r\n        this.elements.container.appendChild(shadowbox);\r\n        return shadowbox;\r\n    };\r\n    ModuleView.prototype.createPortals = function (uri) {\r\n        var portal = document.createElement('portal');\r\n        portal.src = uri;\r\n        return portal;\r\n    };\r\n    ModuleView.prototype.createShadowView = function () {\r\n        if (this.shadowView)\r\n            return this.shadowView;\r\n        if (this.config.render) {\r\n            return this.shadowView = this.createShadowbox(this.config.render);\r\n        }\r\n        if (this.rel !== 'module')\r\n            return;\r\n        return this.shadowView = this.viewType === 'portal' ? this.createPortals(this.uri) : this.createSandbox(this.uri, this.config.sandbox);\r\n    };\r\n    ModuleView.prototype.loadShadowView = function () {\r\n        var container = this.elements.container;\r\n        var shadowView = this.shadowView;\r\n        if (!shadowView)\r\n            return;\r\n        switch (this.viewType) {\r\n            case 'portal':\r\n                container.appendChild(shadowView);\r\n                break;\r\n            case 'iframe':\r\n            default:\r\n                if (this.uri) {\r\n                    container.appendChild(shadowView);\r\n                    var contentWindow = shadowView.contentWindow;\r\n                    if (contentWindow && this.sameOrigin) {\r\n                        inject(contentWindow === null || contentWindow === void 0 ? void 0 : contentWindow.window, this);\r\n                        contentWindow === null || contentWindow === void 0 ? void 0 : contentWindow.window.postMessage({\r\n                            type: 'container-ready'\r\n                        }, '*');\r\n                    }\r\n                }\r\n                else {\r\n                    this.writeSandbox(shadowView, container);\r\n                }\r\n                break;\r\n        }\r\n    };\r\n    ModuleView.prototype.create = function (prepare) {\r\n        var _this = this;\r\n        if (prepare === void 0) { prepare = true; }\r\n        this.unfate();\r\n        this.timeTick();\r\n        if (this.status.prerender) {\r\n            return Promise.resolve('prerender');\r\n        }\r\n        return new Promise(function (resolve, reject) {\r\n            _this.createTime = Date.now();\r\n            var shadowView = _this.createShadowView();\r\n            if (!shadowView) {\r\n                return resolve('null');\r\n            }\r\n            if (_this.viewType === 'shadow') {\r\n                return resolve('shadow');\r\n            }\r\n            shadowView.style.cssText = \"\\n        position: absolute;\\n        z-index: 0;\\n        width: 100%;\\n        height: 100%;\\n        border: 0;\\n        transform: translate3d(0, 0, 0);\\n      \";\r\n            shadowView.onload = function (e) {\r\n                var _a;\r\n                _this.status.prerender = true;\r\n                (_a = _this.events) === null || _a === void 0 ? void 0 : _a.load.bind(_this)();\r\n                resolve(e);\r\n            };\r\n            shadowView.onerror = function (e) {\r\n                var _a;\r\n                (_a = _this.events) === null || _a === void 0 ? void 0 : _a.loadError.bind(_this)();\r\n                reject(e);\r\n            };\r\n            _this.loadShadowView();\r\n            if (prepare === false || _this.config.animation === false) {\r\n                return resolve('instant');\r\n            }\r\n            setTimeout(function () {\r\n                resolve('timeout');\r\n            }, _this.status.preload ? 800 : 200);\r\n        });\r\n    };\r\n    ModuleView.prototype.preload = function () {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            var uri = _this.uri;\r\n            var head = document.head;\r\n            var sandbox = _this.createSandbox('', '');\r\n            sandbox.style.display = 'none';\r\n            sandbox.onload = function (e) {\r\n                var _a;\r\n                _this.status.preload = true;\r\n                head.removeChild(sandbox);\r\n                (_a = _this.events) === null || _a === void 0 ? void 0 : _a.preload.bind(_this)();\r\n                resolve(e);\r\n            };\r\n            sandbox.onerror = function (e) {\r\n                head.removeChild(sandbox);\r\n                reject(e);\r\n            };\r\n            if (uri) {\r\n                sandbox.src = _this.uri;\r\n                head.appendChild(sandbox);\r\n            }\r\n            else {\r\n                _this.writeSandbox(sandbox, head);\r\n            }\r\n        });\r\n    };\r\n    ModuleView.prototype.prerender = function () {\r\n        var _this = this;\r\n        if (this.status.preload || this.status.prerender) {\r\n            return Promise.resolve();\r\n        }\r\n        return new Promise(function (resolve, reject) {\r\n            _this.preload().then(resolve).catch(reject);\r\n            _this.beforehandLink(_this.uri, 'prerender', 'document');\r\n        });\r\n    };\r\n    return ModuleView;\r\n}(ModulePrefetch));\n\nvar Module = /** @class */ (function (_super) {\r\n    __extends(Module, _super);\r\n    function Module(id, model, application) {\r\n        var _this = _super.call(this, id, model, application) || this;\r\n        _this.events.start.bind(_this)();\r\n        return _this;\r\n    }\r\n    return Module;\r\n}(ModuleView));\n\nvar ease = {\r\n    'in': 'ease-in',\r\n    'out': 'ease-out',\r\n    'in-out': 'ease-in-out',\r\n    'snap': 'cubic-bezier(0, 1, .5, 1)',\r\n    'linear': 'cubic-bezier(0.250, 0.250, 0.750, 0.750)',\r\n    'ease-in-quad': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\r\n    'ease-in-cubic': 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\r\n    'ease-in-quart': 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\r\n    'ease-in-quint': 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\r\n    'ease-in-sine': 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\r\n    'ease-in-expo': 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\r\n    'ease-in-circ': 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\r\n    'ease-in-back': 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\r\n    'ease-out-quad': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\r\n    'ease-out-cubic': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\r\n    'ease-out-quart': 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\r\n    'ease-out-quint': 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\r\n    'ease-out-sine': 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\r\n    'ease-out-expo': 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\r\n    'ease-out-circ': 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\r\n    'ease-out-back': 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\r\n    'ease-in-out-quad': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\r\n    'ease-in-out-cubic': 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\r\n    'ease-in-out-quart': 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\r\n    'ease-in-out-quint': 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\r\n    'ease-in-out-sine': 'cubic-bezier(0.445, 0.050, 0.550, 0.950)',\r\n    'ease-in-out-expo': 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\r\n    'ease-in-out-circ': 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\r\n    'ease-in-out-back': 'cubic-bezier(0.680, -0.550, 0.265, 1.550)'\r\n};\n\nvar EventProvider = /** @class */ (function () {\r\n    function EventProvider() {\r\n        this._events = {};\r\n    }\r\n    EventProvider.prototype.on = function (type, fn) {\r\n        var _this = this;\r\n        var types = type.split(' ');\r\n        types.forEach(function (typ) {\r\n            if (!_this._events[typ]) {\r\n                _this._events[typ] = [fn];\r\n            }\r\n            else {\r\n                _this._events[typ].push(fn);\r\n            }\r\n        });\r\n        return this;\r\n    };\r\n    EventProvider.prototype.one = function (type, fn) {\r\n        var _this = this;\r\n        var once = function () {\r\n            var args = [];\r\n            for (var _i = 0; _i < arguments.length; _i++) {\r\n                args[_i] = arguments[_i];\r\n            }\r\n            fn.apply(null, args);\r\n            _this.off(type, once);\r\n        };\r\n        var types = type.split(' ');\r\n        types.forEach(function (typ) {\r\n            if (!_this._events[typ]) {\r\n                _this._events[typ] = [once];\r\n            }\r\n            else {\r\n                _this._events[typ].push(once);\r\n            }\r\n        });\r\n        return this;\r\n    };\r\n    EventProvider.prototype.off = function (type, fn) {\r\n        var _this = this;\r\n        var types = type.split(' ');\r\n        types.forEach(function (typ) {\r\n            if (!_this._events[typ])\r\n                return;\r\n            var index = _this._events[typ].indexOf(fn);\r\n            if (index > -1) {\r\n                _this._events[typ].splice(index, 1);\r\n            }\r\n        });\r\n        return this;\r\n    };\r\n    EventProvider.prototype.trigger = function (type) {\r\n        var _this = this;\r\n        var args = [];\r\n        for (var _i = 1; _i < arguments.length; _i++) {\r\n            args[_i - 1] = arguments[_i];\r\n        }\r\n        if (!this._events[type])\r\n            return;\r\n        this._events[type].forEach(function (fn) {\r\n            try {\r\n                fn.apply(null, args);\r\n            }\r\n            catch (e) {\r\n                _this.off(type, fn);\r\n                _this.trigger('error', \"Error by event[\" + type + \"]\");\r\n            }\r\n        });\r\n        return this;\r\n    };\r\n    return EventProvider;\r\n}());\n\nvar rAF = requestAnimationFrame;\r\nvar gCS = getComputedStyle;\r\n/* Animate */\r\nvar Animate = /** @class */ (function (_super) {\r\n    __extends(Animate, _super);\r\n    function Animate(el) {\r\n        var _this = _super.call(this) || this;\r\n        _this._props = {};\r\n        _this._transforms = {};\r\n        _this._transforming = false;\r\n        _this._proper = [];\r\n        _this._caller = [];\r\n        _this._transitionProps = [];\r\n        _this.translate = _this.to;\r\n        _this.translate3d = _this.to;\r\n        _this.translateX = _this.x;\r\n        _this.translateY = _this.y;\r\n        _this.translateZ = _this.z;\r\n        if (!el)\r\n            return _this;\r\n        _this.el = el;\r\n        _this.el.style.setProperty('transition-duration', '0ms');\r\n        return _this;\r\n    }\r\n    Animate.prototype.transform = function (transform) {\r\n        this.transition('transform');\r\n        var propName = (transform.match(/\\w+\\b/) || [])[0];\r\n        if (propName)\r\n            this._transforms[propName] = transform;\r\n        return this;\r\n    };\r\n    Animate.prototype.skew = function (x, y) {\r\n        return this.transform('skew(' + x + 'deg, ' + (y || 0) + 'deg)');\r\n    };\r\n    Animate.prototype.skewX = function (n) {\r\n        return this.transform('skewX(' + n + 'deg)');\r\n    };\r\n    Animate.prototype.skewY = function (n) {\r\n        return this.transform('skewY(' + n + 'deg)');\r\n    };\r\n    Animate.prototype.to = function (x, y, z) {\r\n        if (x === void 0) { x = 0; }\r\n        if (y === void 0) { y = 0; }\r\n        if (z === void 0) { z = 0; }\r\n        // 3d set\r\n        this.transform('translate3d(' + (x ? x + 'px' : 0) + ',' + (y ? y + 'px' : 0) + ',' + (z ? z + 'px' : 0) + ')');\r\n        return this;\r\n    };\r\n    Animate.prototype.x = function (n) {\r\n        return this.transform('translateX(' + n + 'px)');\r\n    };\r\n    Animate.prototype.y = function (n) {\r\n        return this.transform('translateY(' + n + 'px)');\r\n    };\r\n    Animate.prototype.z = function (z) {\r\n        return this.transform('translateZ(' + z + 'px)');\r\n    };\r\n    Animate.prototype.scale = function (x, y) {\r\n        return this.transform('scale(' +\r\n            x + ', ' +\r\n            (y || x) +\r\n            ')');\r\n    };\r\n    Animate.prototype.opacity = function (o) {\r\n        this.transition('opacity');\r\n        return this.style('opacity', o);\r\n    };\r\n    Animate.prototype.scaleX = function (n) {\r\n        return this.transform('scaleX(' + n + ')');\r\n    };\r\n    Animate.prototype.matrix = function (m11, m12, m21, m22, m31, m32) {\r\n        return this.transform('matrix(' + [m11, m12, m21, m22, m31, m32].join(',') + ')');\r\n    };\r\n    Animate.prototype.scaleY = function (n) {\r\n        return this.transform('scaleY(' + n + ')');\r\n    };\r\n    Animate.prototype.rotate = function (n) {\r\n        return this.transform('rotate(' + n + 'deg)');\r\n    };\r\n    Animate.prototype.rotateX = function (n) {\r\n        return this.transform('rotateX(' + n + 'deg)');\r\n    };\r\n    Animate.prototype.rotateY = function (n) {\r\n        return this.transform('rotateY(' + n + 'deg)');\r\n    };\r\n    Animate.prototype.rotateZ = function (n) {\r\n        return this.transform('rotateZ(' + n + 'deg)');\r\n    };\r\n    Animate.prototype.rotate3d = function (x, y, z, d) {\r\n        return this.transform('rotate3d(' + x + ', ' + y + ',' + z + ',' + d + 'deg)');\r\n    };\r\n    Animate.prototype.perspective = function (z) {\r\n        var box = this.el.parentElement;\r\n        if (box) {\r\n            box.style.setProperty('transform-style', 'preserve-3d');\r\n            box.style.setProperty('perspective', z + 'px');\r\n        }\r\n        return this;\r\n    };\r\n    Animate.prototype.backface = function (visibility) {\r\n        if (visibility === void 0) { visibility = true; }\r\n        return this.style('backface-visibility', visibility ? 'visible' : 'hidden');\r\n    };\r\n    Animate.prototype.ease = function (s) {\r\n        s = ease[s] || s || 'ease';\r\n        return this.style('transition-timing-function', s);\r\n    };\r\n    Animate.prototype.animate = function (name, props) {\r\n        for (var i in props) {\r\n            if (props.hasOwnProperty(i)) {\r\n                this.style('animation-' + i, props[i]);\r\n            }\r\n        }\r\n        return this.style('animation-name', name);\r\n    };\r\n    Animate.prototype.duration = function (n) {\r\n        n = 'string' === typeof n ?\r\n            parseFloat(n) * 1000 :\r\n            n;\r\n        return this.style('transition-duration', n + 'ms');\r\n    };\r\n    Animate.prototype.getDuration = function () {\r\n        return !!parseFloat(gCS(this.el).transitionDuration);\r\n    };\r\n    Animate.prototype.delay = function (n) {\r\n        n = 'string' === typeof n ?\r\n            parseFloat(n) * 1000 :\r\n            n;\r\n        return this.style('transition-delay', n + 'ms');\r\n    };\r\n    Animate.prototype.origin = function (x, y) {\r\n        var n = 'center';\r\n        if (typeof x === 'object') {\r\n            y = x[1] || 0;\r\n            x = x[0] || 0;\r\n        }\r\n        if (!isNaN(x) && !isNaN(y)) {\r\n            n = x + 'px' + ' ' + y + 'px';\r\n        }\r\n        else if (y) {\r\n            n = x + ' ' + y;\r\n        }\r\n        return this.style('transform-origin', n);\r\n    };\r\n    Animate.prototype.width = function (val) {\r\n        this.transition('width');\r\n        return this.style('width', val === undefined ? '' : val + 'px');\r\n    };\r\n    Animate.prototype.height = function (val) {\r\n        this.transition('height');\r\n        return this.style('height', val === undefined ? '' : val + 'px');\r\n    };\r\n    Animate.prototype.add = function (prop, val) {\r\n        var _this = this;\r\n        return this.on('start', function () {\r\n            var curr = parseInt(_this.current(prop), 10);\r\n            _this.style(prop, curr + val + 'px');\r\n        });\r\n    };\r\n    Animate.prototype.subc = function (prop, val) {\r\n        var _this = this;\r\n        return this.on('start', function () {\r\n            var curr = parseInt(_this.current(prop), 10);\r\n            _this.style(prop, curr - val + 'px');\r\n        });\r\n    };\r\n    Animate.prototype.current = function (prop) {\r\n        return gCS(this.el).getPropertyValue(prop);\r\n    };\r\n    Animate.prototype.transition = function (prop) {\r\n        if (this._transitionProps.indexOf(prop) === -1)\r\n            this._transitionProps.push(prop);\r\n        return this;\r\n    };\r\n    Animate.prototype.filter = function (val) {\r\n        this.style('filter', val);\r\n        this.transition('filter');\r\n        return this;\r\n    };\r\n    Animate.prototype.style = function (prop, val) {\r\n        this._props[prop] = val === undefined ? '' : val;\r\n        return this;\r\n    };\r\n    Animate.prototype._transitionend = function (fn) {\r\n        var _this = this;\r\n        if (!this.getDuration())\r\n            return setTimeout(fn, 0);\r\n        var onec = function (e) {\r\n            if (e.target !== _this.el)\r\n                return false;\r\n            fn(e);\r\n            _this.el.removeEventListener('transitionend', onec, false);\r\n        };\r\n        this.el.addEventListener('transitionend', onec, false);\r\n    };\r\n    Animate.prototype._applyTransform = function () {\r\n        var transform = [];\r\n        if (!this._transforms['translate3d'] && !this._transforms['translateZ']) {\r\n            this._transforms['translateZ'] = 'translateZ(0)';\r\n        }\r\n        for (var i in this._transforms) {\r\n            transform.push(this._transforms[i]);\r\n        }\r\n        if (transform.length) {\r\n            this.style('transform', transform.join(' '));\r\n        }\r\n        return this;\r\n    };\r\n    Animate.prototype.applyProperties = function () {\r\n        var _this = this;\r\n        var prop = this._proper.shift();\r\n        this._transforming = true;\r\n        for (var name_1 in prop) {\r\n            this.el.style.setProperty(name_1, prop[name_1]);\r\n        }\r\n        this._transitionend(function () {\r\n            _this.clear();\r\n            _this.next();\r\n        });\r\n        return this;\r\n    };\r\n    Animate.prototype.next = function () {\r\n        var _this = this;\r\n        if (this._caller.length) {\r\n            var fn = this._caller.shift();\r\n            fn && fn();\r\n        }\r\n        if (this._caller.length === 0) {\r\n            this.init();\r\n        }\r\n        else {\r\n            rAF(function () { _this.applyProperties(); });\r\n        }\r\n    };\r\n    Animate.prototype.clear = function () {\r\n        this._transforms = {};\r\n    };\r\n    Animate.prototype.init = function () {\r\n        if (this.getDuration()) {\r\n            this.el.style.setProperty('transition-duration', '0ms');\r\n        }\r\n        this.clear();\r\n        this._transforming = false;\r\n        return this;\r\n    };\r\n    Animate.prototype.then = function (fn) {\r\n        var _this = this;\r\n        this._applyTransform();\r\n        this.style('transition-property', this._transitionProps.join(', '));\r\n        this._proper.push(this._props);\r\n        this._props = {};\r\n        this._caller.push(function () { return fn && fn.call(_this); });\r\n        return this;\r\n    };\r\n    Animate.prototype.end = function (fn) {\r\n        var _this = this;\r\n        this.then(fn);\r\n        if (this._transforming)\r\n            return this;\r\n        rAF(function () { _this.applyProperties(); });\r\n        return this;\r\n    };\r\n    return Animate;\r\n}(EventProvider));\n\nvar flip = (function (e) {\r\n    e.in.duration(0).ease('ease-out-expo').perspective(1000).to(0, 0, 0).opacity(0).rotate3d(0, 1, 0, 90 * e.direction).scale(.92).end(function () {\r\n        e.out.duration(400).ease('ease-out-expo').perspective(1000).rotate3d(0, 1, 0, -90 * e.direction).scale(.92).end(function () {\r\n            e.out.duration(0).opacity(0).end();\r\n            e.in.duration(0).to(0, 0, 0).opacity(1).rotate3d(0, 1, 0, 90 * e.direction).scale(1).end(function () {\r\n                e.in.duration(400).rotate3d(0, 1, 0, 0).end(function () {\r\n                    e.callback(false);\r\n                });\r\n            });\r\n        });\r\n    });\r\n});\n\nvar fade = (function (type) {\r\n    return function (e) {\r\n        var inO, outO, inV, outV;\r\n        switch (type) {\r\n            case 0:\r\n                inO = 1;\r\n                outO = 0;\r\n                inV = e.in;\r\n                outV = e.out;\r\n                break;\r\n            case 1:\r\n            default:\r\n                inO = 0;\r\n                outO = 1;\r\n                inV = outV = e.in;\r\n        }\r\n        inV.duration(0).ease('ease-out-expo').to(0, 0, 0).opacity(inO).end(function () {\r\n            outV.duration(300).opacity(outO).end(function () {\r\n                e.callback(false);\r\n            });\r\n        });\r\n    };\r\n});\n\nvar zoom = (function (type) {\r\n    return function (e) {\r\n        e.in.origin(type === 0 ? e.attach : e.origin).ease('ease-out-expo').duration(0).to(0, 0, 0).scale(type === 0 ? 2.5 : 0).end(function () {\r\n            e.out.origin(type === 1 ? e.attach : e.origin).ease('ease-in-expo').duration(0).to(0, 0, 0).opacity(1).scale(1).end(function () {\r\n                e.in.duration(767).to(0, 0, 0).scale(1).end();\r\n                e.out.duration(400).opacity(type === 0 ? 0 : 1).scale(type === 0 ? 0 : 2.5).end(function () {\r\n                    e.callback(false);\r\n                });\r\n            });\r\n        });\r\n    };\r\n});\n\nvar slide = (function (type) {\r\n    return function (e) {\r\n        var inX = 0;\r\n        var outX = 0;\r\n        var inY = 0;\r\n        var outY = 0;\r\n        switch (type) {\r\n            case 0:\r\n                outY = e.height;\r\n                inY = -outY;\r\n                inX = outX = 0;\r\n                break;\r\n            case 1:\r\n                inX = e.width;\r\n                outX = -inX;\r\n                inY = outY = 0;\r\n                break;\r\n            case 2:\r\n                inY = e.height;\r\n                outY = -inY;\r\n                inX = outX = 0;\r\n                break;\r\n            case 3:\r\n                outX = e.width;\r\n                inX = -outX;\r\n                inY = outY = 0;\r\n                break;\r\n        }\r\n        if (e.reverse) {\r\n            e.in.duration(0).filter('brightness(0.5)').to(inX * .1, inY * .1, 0).end(function () {\r\n                e.out.duration(767).ease('ease-out-expo').to(outX, outY, 0).end();\r\n                e.in.duration(767).filter('brightness(1)').to(0, 0, 0).end(function () {\r\n                    e.callback(false);\r\n                });\r\n            });\r\n        }\r\n        else {\r\n            e.in.duration(0).to(inX, inY, 0).end(function () {\r\n                e.in.duration(767).ease('ease-out-expo').to(0, 0, 0).end(function () {\r\n                    e.callback(false);\r\n                });\r\n                e.out.duration(767).filter('brightness(0.5)').to(outX * .5, outY * .5, 0).end();\r\n            });\r\n        }\r\n    };\r\n});\n\nvar effectTypes = {\r\n    flip: flip,\r\n    fade: fade,\r\n    zoom: zoom,\r\n    slide: slide\r\n};\n\nvar TransformProptey = /** @class */ (function () {\r\n    function TransformProptey(app) {\r\n        this.id = '';\r\n        this.od = '';\r\n        this.ids = [];\r\n        this.param = '';\r\n        this.animation = false;\r\n        this.switchover = false;\r\n        this.relativeViewport = document.createElement('relative-windows');\r\n        this.absoluteViewport = document.createElement('absolute-windows');\r\n        this.fixedViewport = document.createElement('fixed-windows');\r\n        this.target = this.relativeViewport;\r\n        this.app = app;\r\n        this.setupViewport();\r\n    }\r\n    TransformProptey.prototype.setupViewport = function () {\r\n        var _a, _b;\r\n        this.relativeViewport.id = 'relative-viewport';\r\n        (_a = this.relativeViewport) === null || _a === void 0 ? void 0 : _a.attachShadow({ mode: 'open' });\r\n        this.absoluteViewport.id = 'absolute-viewport';\r\n        (_b = this.absoluteViewport) === null || _b === void 0 ? void 0 : _b.attachShadow({ mode: 'open' });\r\n        this.resetViewport();\r\n        this.fixedViewport.id = 'fixed-viewport';\r\n        this.fixedViewport.style.position = 'fixed';\r\n        this.fixedViewport.style.zIndex = '3';\r\n        this.fixedViewport.style.width = '100%';\r\n        this.fixedViewport.style.height = '0';\r\n        this.fixedViewport.style.contain = 'strict';\r\n        this.fixedViewport.style.overflow = 'visible';\r\n        document.body.appendChild(this.relativeViewport);\r\n        document.body.appendChild(this.absoluteViewport);\r\n        document.body.appendChild(this.fixedViewport);\r\n    };\r\n    TransformProptey.prototype.resetViewport = function () {\r\n        this.relativeViewport.style.cssText = '';\r\n        this.relativeViewport.style.position = 'absolute';\r\n        this.relativeViewport.style.zIndex = '1';\r\n        this.relativeViewport.style.width = this.relativeViewport.style.height = '100%';\r\n        this.relativeViewport.style.overflow = 'hidden';\r\n        this.relativeViewport.style.contain = 'strict';\r\n        this.absoluteViewport.style.cssText = '';\r\n        this.absoluteViewport.style.position = 'absolute';\r\n        this.absoluteViewport.style.zIndex = '2';\r\n        this.absoluteViewport.style.width = this.absoluteViewport.style.height = '100%';\r\n        this.absoluteViewport.style.overflow = 'visible';\r\n        this.absoluteViewport.style.contain = 'strict';\r\n    };\r\n    return TransformProptey;\r\n}());\n\nvar TransformHistory = /** @class */ (function (_super) {\r\n    __extends(TransformHistory, _super);\r\n    function TransformHistory(app) {\r\n        var _this = _super.call(this, app) || this;\r\n        _this.history = 0;\r\n        _this.historyIndex = history.length;\r\n        _this.historyDirection = 0;\r\n        _this.backoutCount = 0;\r\n        _this.bindHistoryState();\r\n        return _this;\r\n    }\r\n    TransformHistory.prototype.bindHistoryState = function () {\r\n        addEventListener('popstate', this.popstate.bind(this));\r\n    };\r\n    TransformHistory.prototype.popstate = function (event) {\r\n        var state = event.state;\r\n        var historyIndex = state.historyIndex;\r\n        if (historyIndex < this.historyIndex) {\r\n            this.historyDirection = -1;\r\n        }\r\n        else {\r\n            this.historyDirection = 1;\r\n        }\r\n        this.historyIndex = historyIndex;\r\n        this.back(event);\r\n    };\r\n    TransformHistory.prototype.pushState = function (id, title, search, param) {\r\n        if (id === void 0) { id = ''; }\r\n        if (title === void 0) { title = ''; }\r\n        if (search === void 0) { search = location.search; }\r\n        if (param === void 0) { param = ''; }\r\n        id = encodeURIComponent(id);\r\n        history.pushState({\r\n            id: id,\r\n            title: title,\r\n            time: Date.now(),\r\n            search: search,\r\n            historyIndex: history.length + 1\r\n        }, title, location.pathname + search + '#' + id + '/' + param);\r\n        this.historyIndex = history.length;\r\n        this.historyDirection = 1;\r\n    };\r\n    TransformHistory.prototype.replaceState = function (id, title, search, param) {\r\n        if (id === void 0) { id = ''; }\r\n        if (title === void 0) { title = ''; }\r\n        if (search === void 0) { search = location.search; }\r\n        if (param === void 0) { param = ''; }\r\n        id = encodeURIComponent(id);\r\n        history.replaceState({\r\n            id: id,\r\n            title: title,\r\n            time: Date.now(),\r\n            search: search,\r\n            historyIndex: history.length\r\n        }, title, location.pathname + search + '#' + id + '/' + param);\r\n        this.historyIndex = history.length;\r\n        this.historyDirection = 1;\r\n    };\r\n    TransformHistory.prototype.back = function (event) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var options, route, id, search, module;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        options = this.options;\r\n                        route = event.state || this.app.route;\r\n                        id = decodeURIComponent(route.id) || options.index || 'frameworks';\r\n                        search = route.search;\r\n                        return [4 /*yield*/, this.app.get(id)];\r\n                    case 1:\r\n                        module = _a.sent();\r\n                        if (!module)\r\n                            return [2 /*return*/];\r\n                        /**\r\n                         * 如果设置了单向锁，且回退时模块层级为 0 时\r\n                         * 阻止返回，并发送事件\r\n                         */\r\n                        if (this.checkSingleLock()) {\r\n                            this.backoutCount++;\r\n                            this.pushState(id, module.config.title, search);\r\n                            this.app.trigger('exit', {\r\n                                backoutCount: this.backoutCount\r\n                            });\r\n                            return [2 /*return*/];\r\n                        }\r\n                        else {\r\n                            this.backoutCount = 0;\r\n                        }\r\n                        if (options.singleFlow && module.config.level !== 0 && module.config.level >= this.module.config.level) {\r\n                            return [2 /*return*/, history.back()];\r\n                        }\r\n                        this.app.transform.to(id, search, -1);\r\n                        this.app.trigger('back', {\r\n                            id: id,\r\n                            module: module\r\n                        });\r\n                        return [2 /*return*/];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    TransformHistory.prototype.checkSingleLock = function () {\r\n        return this.options.singleLock && this.module.config.level === 0 ? true : false;\r\n    };\r\n    return TransformHistory;\r\n}(TransformProptey));\n\nvar TransformAnimation = /** @class */ (function (_super) {\r\n    __extends(TransformAnimation, _super);\r\n    function TransformAnimation(app) {\r\n        return _super.call(this, app) || this;\r\n    }\r\n    TransformAnimation.prototype.getAnimationGroup = function () {\r\n        if (!this.modulu || this.modulu.rel !== 'module')\r\n            return false;\r\n        var animationFunction;\r\n        var animationNames = this[this.history !== 1 && this.historyDirection === -1 ? 'modulu' : 'module'].config.animation;\r\n        if (animationNames === true || animationNames === 'inherit') {\r\n            animationNames = this.options.defaultAnimation;\r\n        }\r\n        if (typeof animationNames === 'string') {\r\n            animationFunction = this.getAnimationByName(animationNames);\r\n        }\r\n        else if (typeof (animationNames === null || animationNames === void 0 ? void 0 : animationNames[0]) !== 'function') {\r\n            return animationNames;\r\n        }\r\n        if (typeof (animationFunction === null || animationFunction === void 0 ? void 0 : animationFunction[0]) !== 'function') {\r\n            return false;\r\n        }\r\n        return animationFunction;\r\n    };\r\n    TransformAnimation.prototype.getAnimationOneSide = function (backset) {\r\n        var animationGroup = this.animation;\r\n        if (backset >= 0) {\r\n            switch (typeof animationGroup) {\r\n                case 'function':\r\n                    return animationGroup;\r\n                case 'object':\r\n                    return animationGroup[animationGroup.length === 2 ? backset : 0];\r\n                default:\r\n                    return;\r\n            }\r\n        }\r\n        return;\r\n    };\r\n    TransformAnimation.prototype.getAnimationByName = function (type) {\r\n        switch (type) {\r\n            case 'flip':\r\n                return [effectTypes.flip, effectTypes.flip];\r\n            case 'fade':\r\n                return [effectTypes.fade(1), effectTypes.fade(0)];\r\n            case 'zoom':\r\n                return [effectTypes.zoom(1), effectTypes.zoom(0)];\r\n            case 'slide':\r\n            case 'slideLeft':\r\n            case 'slideleft':\r\n            case 'slide-left':\r\n                return [effectTypes.slide(1), effectTypes.slide(3)];\r\n            case 'slideRight':\r\n            case 'slideright':\r\n            case 'slide-right':\r\n                return [effectTypes.slide(3), effectTypes.slide(1)];\r\n            case 'slideUp':\r\n            case 'slideup':\r\n            case 'slide-up':\r\n                return [effectTypes.slide(0), effectTypes.slide(2)];\r\n            case 'slideDown':\r\n            case 'slidedown':\r\n            case 'slide-down':\r\n                return [effectTypes.slide(2), effectTypes.slide(0)];\r\n            default:\r\n                return;\r\n        }\r\n    };\r\n    return TransformAnimation;\r\n}(TransformHistory));\n\nvar TransformSwitch = /** @class */ (function (_super) {\r\n    __extends(TransformSwitch, _super);\r\n    function TransformSwitch(app) {\r\n        var _this = _super.call(this, app) || this;\r\n        _this.windowSet = [];\r\n        _this.promiseQueue = [];\r\n        _this.promiseParamQueue = [];\r\n        return _this;\r\n    }\r\n    TransformSwitch.prototype.checkSingleLock = function () {\r\n        return this.options.singleLock && this.module.config.level === 0 ? true : false;\r\n    };\r\n    TransformSwitch.prototype.createContainer = function (module) {\r\n        if (module.status.init)\r\n            return;\r\n        var container = document.createElement('module-container');\r\n        container.setAttribute('name', this.id);\r\n        container.setAttribute('type', ['frameworks', 'system'].indexOf(this.id) !== -1 ? this.id : 'module');\r\n        module.rigesterElement('container', container);\r\n        this.resetContainer(module, this.switchover || !this.animation);\r\n        this.getViewport(module).appendChild(container);\r\n    };\r\n    TransformSwitch.prototype.resetContainer = function (module, situ) {\r\n        if (situ === void 0) { situ = false; }\r\n        var config = module.config;\r\n        var container = module.elements.container;\r\n        var systemLevel = ['frameworks', 'system'].includes(module.rel);\r\n        var isDarkModel = this.app.properties.darkTheme;\r\n        container.style.cssText = '';\r\n        if (!systemLevel) {\r\n            container.style.cssText = \"\\n        position: absolute;\\n        z-index: \" + ((Number(module.level) || 0) + 1) + \";\\n        width: 100%;\\n        height: 100%;\\n        background: \" + (config.color || (isDarkModel ? '#000' : '#fff')) + \";\\n        transform: \" + (situ ? 'translate3d(0, 0, 0)' : 'translate3d(200%, 200%, 0)') + \";\\n        contain: strict;\\n      \";\r\n        }\r\n    };\r\n    TransformSwitch.prototype.getViewport = function (module) {\r\n        if (module === void 0) { module = this.module; }\r\n        return module.rel === 'system' ? this.fixedViewport : module.config.free === false ? (this.relativeViewport.shadowRoot || this.relativeViewport) : (this.absoluteViewport.shadowRoot || this.absoluteViewport);\r\n    };\r\n    TransformSwitch.prototype.checkSwitchover = function (modulu, module) {\r\n        if (modulu === void 0) { modulu = this.modulu; }\r\n        if (module === void 0) { module = this.module; }\r\n        return (modulu === null || modulu === void 0 ? void 0 : modulu.rel) === 'module' && module.config.free !== modulu.config.free ? true : false;\r\n    };\r\n    TransformSwitch.prototype.to = function () {\r\n        var args = [];\r\n        for (var _i = 0; _i < arguments.length; _i++) {\r\n            args[_i] = arguments[_i];\r\n        }\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            return __generator(this, function (_a) {\r\n                return [2 /*return*/, this.pushPromise(this.next() || this.promise.apply(this, args), args)];\r\n            });\r\n        });\r\n    };\r\n    TransformSwitch.prototype.prev = function () {\r\n        return this.promiseQueue[0];\r\n    };\r\n    TransformSwitch.prototype.next = function () {\r\n        var _this = this;\r\n        var prev = this.prev();\r\n        if (prev) {\r\n            return new Promise(function (resolve, reject) {\r\n                prev.then(function () {\r\n                    if (_this.promiseParamQueue[0]) {\r\n                        _this.promise.apply(_this, _this.promiseParamQueue[0]).then(resolve).catch(reject);\r\n                    }\r\n                });\r\n            });\r\n        }\r\n        return;\r\n    };\r\n    TransformSwitch.prototype.pushPromise = function (promise, param) {\r\n        this.promiseParamQueue.push(param);\r\n        this.promiseQueue.push(promise);\r\n        return promise;\r\n    };\r\n    TransformSwitch.prototype.shiftPromise = function () {\r\n        this.promiseParamQueue.shift();\r\n        this.promiseQueue.shift();\r\n    };\r\n    TransformSwitch.prototype.limit = function (id) {\r\n        var _a, _b;\r\n        var limit = Math.max(((_a = this === null || this === void 0 ? void 0 : this.options) === null || _a === void 0 ? void 0 : _a.limit) || 3, 2);\r\n        var index = this.windowSet.indexOf(id);\r\n        if (this.module.rel !== 'module' || this.module.config.background === true)\r\n            return;\r\n        if (index !== -1)\r\n            this.windowSet.splice(index, 1);\r\n        this.windowSet.push(id);\r\n        if (this.windowSet.length > limit) {\r\n            (_b = this.app.modules[this.windowSet.splice(0, 1)[0]]) === null || _b === void 0 ? void 0 : _b.destroy();\r\n        }\r\n    };\r\n    TransformSwitch.prototype.destroy = function (module) {\r\n        var _this = this;\r\n        if (module.transient && this.history === -1) {\r\n            this.app.del(module).then(function () {\r\n                var index = _this.windowSet.indexOf(module.id);\r\n                _this.windowSet.splice(index, 1);\r\n            });\r\n        }\r\n        else {\r\n            module.fate().then(function () {\r\n                module.destroy().then(function () {\r\n                    var index = _this.windowSet.indexOf(module.id);\r\n                    _this.windowSet.splice(index, 1);\r\n                });\r\n            });\r\n        }\r\n    };\r\n    TransformSwitch.prototype.beforehandDependencies = function (dependencies) {\r\n        var _this = this;\r\n        if (dependencies === void 0) { dependencies = []; }\r\n        var allPromise = [];\r\n        var _loop_1 = function (dep) {\r\n            allPromise.push(new Promise(function (resolve, reject) {\r\n                _this.app.get(dep).then(function (module) {\r\n                    module.prerender().then(resolve).catch(resolve);\r\n                }).catch(reject);\r\n            }));\r\n        };\r\n        for (var _i = 0, dependencies_1 = dependencies; _i < dependencies_1.length; _i++) {\r\n            var dep = dependencies_1[_i];\r\n            _loop_1(dep);\r\n        }\r\n        return new Promise(function (resolve, reject) {\r\n            Promise.all(allPromise).then(resolve).catch(reject);\r\n        });\r\n    };\r\n    TransformSwitch.prototype.checkPushState = function () {\r\n        return this.history !== -1 && this.module.viewType !== 'portal';\r\n    };\r\n    TransformSwitch.prototype.promise = function (id, param, history, touches) {\r\n        var _this = this;\r\n        if (param === void 0) { param = location.search; }\r\n        if (history === void 0) { history = 1; }\r\n        return new Promise(function (resolve, reject) {\r\n            var od = _this.od;\r\n            var ids = od ? [id, od] : [id];\r\n            var module = _this.app.modules[id];\r\n            var modulu = _this.app.modules[od];\r\n            var moduli = od ? [module, modulu] : [module];\r\n            if (!module) {\r\n                return _this.app.get(id).then(function () {\r\n                    _this.promise(id, param, history).then(function () {\r\n                        _this.shiftPromise();\r\n                        resolve();\r\n                    }).catch(function () {\r\n                        reject();\r\n                    });\r\n                });\r\n            }\r\n            _this.id = id;\r\n            _this.ids = ids;\r\n            _this.param = param;\r\n            _this.module = module;\r\n            _this.modulu = modulu;\r\n            _this.moduli = moduli;\r\n            _this.history = history;\r\n            _this.touches = touches;\r\n            _this.animation = _this.getAnimationGroup();\r\n            _this.switchover = _this.checkSwitchover();\r\n            _this.target = _this.getViewport();\r\n            _this.createContainer(module);\r\n            _this.start().then(function () {\r\n                _this.hintWillTrans(_this.viewport);\r\n                if (_this.checkPushState() === true) {\r\n                    _this.pushState(id, module.config.title, param);\r\n                }\r\n                module.create(!!_this.animation).then(function () {\r\n                    var _a;\r\n                    document.title = module.config.title;\r\n                    _this.transform().then(function (stillness) {\r\n                        _this.od = id;\r\n                        _this.end(stillness);\r\n                        _this.shiftPromise();\r\n                        _this.limit(_this.id);\r\n                        resolve();\r\n                    });\r\n                    _this.beforehandDependencies((_a = module.config) === null || _a === void 0 ? void 0 : _a.prerender).then(function () {\r\n                        _this.app.trigger('prerenderComplete');\r\n                    });\r\n                });\r\n            });\r\n        });\r\n    };\r\n    TransformSwitch.prototype.pos = function () {\r\n        var x = 0;\r\n        var y = 0;\r\n        var attach = 'center';\r\n        var origin = 'center';\r\n        var width = this.relativeViewport.offsetWidth;\r\n        var height = this.relativeViewport.offsetHeight;\r\n        var event = this.touches ? this.touches['srcEvent'] : {};\r\n        if (event.changedTouches) {\r\n            x = event.changedTouches[0].pageX;\r\n            y = event.changedTouches[0].pageY;\r\n        }\r\n        else {\r\n            x = event.x;\r\n            y = event.y;\r\n        }\r\n        if (x && y) {\r\n            origin = [x, y];\r\n            if (x < width / 4) {\r\n                x = 0;\r\n            }\r\n            else if (x > width * 3 / 4) {\r\n                x = width;\r\n            }\r\n            if (y < height / 4) {\r\n                y = 0;\r\n            }\r\n            else if (y > height * 3 / 4) {\r\n                y = height;\r\n            }\r\n            attach = [x, y];\r\n        }\r\n        return {\r\n            x: x,\r\n            y: y,\r\n            width: width,\r\n            height: height,\r\n            attach: attach,\r\n            origin: origin\r\n        };\r\n    };\r\n    Object.defineProperty(TransformSwitch.prototype, \"backsetState\", {\r\n        get: function () {\r\n            return (this.moduli.length === 1 || this.module.level === this.modulu.level) ? -1 : (this.module.level > this.modulu.level ? 0 : 1);\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    Object.defineProperty(TransformSwitch.prototype, \"viewport\", {\r\n        get: function () {\r\n            var _a, _b;\r\n            return this.switchover ? [\r\n                this.module.config.free === false ? this.relativeViewport : this.absoluteViewport,\r\n                ((_a = this.modulu) === null || _a === void 0 ? void 0 : _a.config.free) === false ? this.relativeViewport : this.absoluteViewport\r\n            ] : [\r\n                this.module.elements.container,\r\n                (_b = this.modulu) === null || _b === void 0 ? void 0 : _b.elements.container\r\n            ];\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    TransformSwitch.prototype.modulation = function (callback) {\r\n        var viewport = this.viewport;\r\n        var backset = this.backsetState;\r\n        var reverse = backset === 0 ? false : true;\r\n        var pos = this.pos();\r\n        var animateEvent = {\r\n            x: pos.x,\r\n            y: pos.y,\r\n            in: new Animate(viewport[0]),\r\n            out: new Animate(viewport[1]),\r\n            view: viewport,\r\n            width: pos.width,\r\n            height: pos.height,\r\n            viewport: [this.relativeViewport, this.absoluteViewport],\r\n            modules: this.moduli,\r\n            reverse: reverse,\r\n            direction: reverse ? -1 : 1,\r\n            backset: backset,\r\n            origin: origin,\r\n            attach: pos.attach,\r\n            touches: this.touches,\r\n            callback: callback\r\n        };\r\n        return animateEvent;\r\n    };\r\n    TransformSwitch.prototype.transform = function () {\r\n        var _this = this;\r\n        return new Promise(function (resolve) {\r\n            if (!_this.animation) {\r\n                _this.switchViewport();\r\n                resolve(true);\r\n                return;\r\n            }\r\n            var backset = _this.backsetState;\r\n            var animation = _this.getAnimationOneSide(backset);\r\n            var end = function (stillness) { return resolve(stillness); };\r\n            if (!animation)\r\n                return end(true);\r\n            var prosise = animation(_this.modulation(end));\r\n            if (prosise instanceof Promise)\r\n                prosise.then(end);\r\n        });\r\n    };\r\n    TransformSwitch.prototype.hintWillTrans = function (viewport) {\r\n        viewport[0].style.willChange = 'transform, opacity';\r\n        if (viewport[1]) {\r\n            viewport[1].style.willChange = 'transform, opacity';\r\n        }\r\n    };\r\n    TransformSwitch.prototype.removeTransHint = function (viewport) {\r\n        viewport[0].style.willChange = 'auto';\r\n        if (viewport[1]) {\r\n            viewport[1].style.willChange = 'auto';\r\n        }\r\n    };\r\n    TransformSwitch.prototype.start = function () {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            _this.app.trigger('transformStart', _this.moduli);\r\n            var transformStart = _this.module.events.transformStart;\r\n            if (typeof transformStart === 'function') {\r\n                if (transformStart.call(_this.module) === false)\r\n                    return reject();\r\n            }\r\n            if (!_this.animation || _this.switchover) {\r\n                _this.module.elements.container.style.transform = 'translate3d(0, 0, 0)';\r\n            }\r\n            resolve();\r\n        });\r\n    };\r\n    TransformSwitch.prototype.end = function (stillness) {\r\n        if (stillness === void 0) { stillness = false; }\r\n        var transformEnd = this.module.events.transformEnd;\r\n        this.removeTransHint(this.viewport);\r\n        if (this.switchover) {\r\n            this.switchViewport();\r\n        }\r\n        if (this.modulu) {\r\n            if (!this.animation || !stillness) {\r\n                if (this.modulu.rel === 'module') {\r\n                    this.modulu.elements.container.style.transform = 'translate3d(200%, 200%, 0)';\r\n                }\r\n                this.resetContainer(this.module, true);\r\n            }\r\n            this.modulu.elements.container.style.transitionDuration = '0ms';\r\n            if (this.modulu.config.background === true) {\r\n                this.modulu.hide();\r\n            }\r\n            else {\r\n                this.destroy(this.modulu);\r\n            }\r\n        }\r\n        this.module.show();\r\n        if (typeof transformEnd === 'function') {\r\n            transformEnd.call(this.module);\r\n        }\r\n        this.app.trigger('transformEnd', this.moduli);\r\n    };\r\n    TransformSwitch.prototype.switchViewport = function () {\r\n        var _a, _b;\r\n        this.resetViewport();\r\n        if (((_b = (_a = this.module) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.free) === false) {\r\n            this.absoluteViewport.style.transform = 'translate3d(200%, 200%, 0)';\r\n            this.relativeViewport.style.transform = 'translate3d(0, 0, 0)';\r\n        }\r\n        else {\r\n            this.relativeViewport.style.transform = 'translate3d(200%, 200%, 0)';\r\n            this.absoluteViewport.style.transform = 'translate3d(0, 0, 0)';\r\n        }\r\n    };\r\n    return TransformSwitch;\r\n}(TransformAnimation));\n\nvar Transform = /** @class */ (function (_super) {\r\n    __extends(Transform, _super);\r\n    function Transform(app) {\r\n        return _super.call(this, app) || this;\r\n    }\r\n    Transform.prototype.setup = function (options) {\r\n        this.options = options;\r\n    };\r\n    return Transform;\r\n}(TransformSwitch));\n\nvar ApplicationProptey = /** @class */ (function (_super) {\r\n    __extends(ApplicationProptey, _super);\r\n    function ApplicationProptey() {\r\n        var _this = _super.call(this) || this;\r\n        _this.modules = {};\r\n        _this.historyNodeLocation = history.length;\r\n        _this.routerRegExp = /([^#\\/]+)(.+)?/;\r\n        _this.options = {\r\n            modules: {}\r\n        };\r\n        return _this;\r\n    }\r\n    ApplicationProptey.prototype.setting = function (options) {\r\n        this.options = options;\r\n    };\r\n    return ApplicationProptey;\r\n}(EventProvider));\n\nvar BASE_CSS = \"\\n* { box-sizing: border-box; margin: 0; padding: 0; text-size-adjust: 100%; tap-highlight-color: rgba(0, 0, 0, 0)  } \\n\\nhtml, body { position: absolute; width: 100%; height: 100%; background: #fff; overflow: hidden; overscroll-behavior: none } \\n\\nmodule-mask, module-view { position: absolute; width: 100%; height: 100%; overflow: hidden } \\n\\nmodule-container[type=module] { display: block; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100% } \\n\\niframe { width: 100%; height: 100%; border: 0 } \\n\\n\";\n\nvar ApplicationBase = /** @class */ (function (_super) {\r\n    __extends(ApplicationBase, _super);\r\n    function ApplicationBase() {\r\n        var _a, _b;\r\n        var _this = _super.call(this) || this;\r\n        _this.properties = {\r\n            darkTheme: (_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(prefers-color-scheme: dark)')) === null || _b === void 0 ? void 0 : _b.matches\r\n        };\r\n        _this.console = {\r\n            echo: function (type, pre, mid, suf) {\r\n                console[type]('%c ' +\r\n                    (pre[0] ? pre[0] + ' ' : '') +\r\n                    '%c ' + (mid[0] ? mid[0] + ' ' : '') +\r\n                    '%c ' + (suf[0] ? suf[0] + ' ' : ''), 'color: #ffffff; background:' + pre[1], 'color: #ffffff; background:' + mid[1], 'color: #ffffff; background:' + (suf[0] ? suf[1] : mid[1]));\r\n            },\r\n            log: function (message, title, description) {\r\n                _this.console.echo('log', [title, '#999'], [message, '#333'], [description, '#666']);\r\n            },\r\n            info: function (message, title, description) {\r\n                _this.console.echo('info', [title, '#0cf'], [message, '#06c'], [description, '#0c0']);\r\n            },\r\n            warn: function (message, title, description) {\r\n                _this.console.echo('warn', [title, '#f60'], [message, '#f30'], [description, '#f90']);\r\n            },\r\n            error: function (message, title, description) {\r\n                _this.console.echo('warn', [title, '#f06'], [message, '#903'], [description, '#993']);\r\n            }\r\n        };\r\n        _this.setBaseCSS();\r\n        return _this;\r\n    }\r\n    Object.defineProperty(ApplicationBase.prototype, \"route\", {\r\n        get: function () {\r\n            var router = this.routerRegExp.exec(location.hash) || [];\r\n            var id = router[1];\r\n            var param = router[2];\r\n            var search = location.search;\r\n            return {\r\n                id: id ? decodeURIComponent(id) : '',\r\n                param: param ? decodeURIComponent(param) : '',\r\n                search: search\r\n            };\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    ApplicationBase.prototype.setBaseCSS = function () {\r\n        var style = document.createElement('style');\r\n        style.innerHTML = BASE_CSS;\r\n        document.getElementsByTagName('head')[0].appendChild(style);\r\n    };\r\n    ApplicationBase.prototype.resolveURL = function (url) {\r\n        var link = document.createElement('a');\r\n        link.href = url;\r\n        var path = link.origin + link.pathname;\r\n        return {\r\n            path: path,\r\n            origin: link.origin,\r\n            host: link.host,\r\n            search: link.search\r\n        };\r\n    };\r\n    ApplicationBase.prototype.promiseModule = function (promise) {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {\r\n            var _a, error_1;\r\n            return __generator(this, function (_b) {\r\n                switch (_b.label) {\r\n                    case 0:\r\n                        _b.trys.push([0, 2, , 3]);\r\n                        _a = resolve;\r\n                        return [4 /*yield*/, promise()];\r\n                    case 1:\r\n                        _a.apply(void 0, [_b.sent()]);\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        error_1 = _b.sent();\r\n                        reject(error_1);\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); });\r\n    };\r\n    ApplicationBase.prototype.moduleSrcVerify = function (url) {\r\n        var allowHosts = this.config.allowHosts;\r\n        if (!Array.isArray(allowHosts)) {\r\n            this.console.warn('Module.config.allowHosts is not defined', 'Security risks exist: ', '');\r\n            return true;\r\n        }\r\n        var link = document.createElement('a');\r\n        link.href = decodeURIComponent(url);\r\n        var linkHost = link.host;\r\n        for (var _i = 0, allowHosts_1 = allowHosts; _i < allowHosts_1.length; _i++) {\r\n            var host = allowHosts_1[_i];\r\n            if (linkHost === host)\r\n                return true;\r\n        }\r\n        return false;\r\n    };\r\n    ApplicationBase.prototype.getModuleByURL = function (url) {\r\n        var modules = this.modules;\r\n        var resolve = this.resolveURL(url);\r\n        var path = resolve.path;\r\n        for (var id in modules) {\r\n            var module_1 = modules[id];\r\n            var capture = module_1.config.capture;\r\n            if (typeof capture === 'string') {\r\n                if (capture === path)\r\n                    return module_1;\r\n            }\r\n            else if (typeof capture === 'function') {\r\n                if (capture(resolve, url))\r\n                    return module_1;\r\n            }\r\n            if (module_1.uri === path)\r\n                return module_1;\r\n        }\r\n        return;\r\n    };\r\n    ApplicationBase.prototype.setExists = function () {\r\n        return new Promise(function (resolve, reject) {\r\n            try {\r\n                sessionStorage.setItem('__EXISTS', String(history.length));\r\n                resolve();\r\n            }\r\n            catch (e) {\r\n                reject();\r\n            }\r\n        });\r\n    };\r\n    Object.defineProperty(ApplicationBase.prototype, \"exists\", {\r\n        get: function () {\r\n            try {\r\n                return parseInt(sessionStorage.getItem('__EXISTS') || '-1', 10) === history.length;\r\n            }\r\n            catch (e) {\r\n                return false;\r\n            }\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    return ApplicationBase;\r\n}(ApplicationProptey));\n\nvar provider = (function (app) {\r\n    window.addEventListener('message', function (event) {\r\n        var data = event.data;\r\n        var action = data.action;\r\n        switch (action) {\r\n            case 'to':\r\n                app.transform.to(data.module, data.query, data.history);\r\n                break;\r\n            case 'back':\r\n                history.back();\r\n                break;\r\n            case 'forward':\r\n                history.forward();\r\n                break;\r\n        }\r\n    });\r\n    return;\r\n});\n\nvar Application = /** @class */ (function (_super) {\r\n    __extends(Application, _super);\r\n    function Application() {\r\n        var _this = _super.call(this) || this;\r\n        _this.transform = new Transform(_this);\r\n        provider(_this);\r\n        return _this;\r\n    }\r\n    Object.defineProperty(Application.prototype, \"activeModule\", {\r\n        get: function () {\r\n            var id = this.transform.id;\r\n            var module = this.modules[id];\r\n            return module;\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    Application.prototype.add = function (id, manifest) {\r\n        return this.modules[id] = new Module(id, manifest, this);\r\n    };\r\n    Application.prototype.del = function (module) {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            delete _this.modules[module.id];\r\n            if (module.status.init) {\r\n                module.destroy().then(resolve).catch(reject);\r\n            }\r\n            else {\r\n                resolve();\r\n            }\r\n        });\r\n    };\r\n    Application.prototype.get = function (id) {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            if (!id)\r\n                return reject();\r\n            if (typeof _this.modules[id] === 'object')\r\n                return resolve(_this.modules[id]);\r\n            var modulePromise = _this.options.modules[id];\r\n            switch (typeof modulePromise) {\r\n                case 'function':\r\n                    _this.promiseModule(modulePromise).then(function (manifest) {\r\n                        resolve(_this.add(id, manifest));\r\n                    }).catch(reject);\r\n                    break;\r\n                case 'object':\r\n                    resolve(_this.add(id, modulePromise));\r\n                    break;\r\n                default:\r\n                    var url = id;\r\n                    if (!_this.moduleSrcVerify(url)) {\r\n                        reject();\r\n                        break;\r\n                    }\r\n                    var module_1 = _this.createModuleByURL(url);\r\n                    if (module_1) {\r\n                        resolve(module_1);\r\n                    }\r\n                    else {\r\n                        reject();\r\n                    }\r\n                    break;\r\n            }\r\n        });\r\n    };\r\n    Application.prototype.createModuleByURL = function (url, config) {\r\n        var _a, _b;\r\n        var newModuleId = decodeURIComponent(url);\r\n        var modules = this.modules;\r\n        if (modules[newModuleId])\r\n            return modules[newModuleId];\r\n        var sameModule = this.getModuleByURL(url);\r\n        if (sameModule)\r\n            return sameModule;\r\n        return this.add(newModuleId, {\r\n            config: Object.assign({\r\n                title: '',\r\n                rel: 'module',\r\n                level: ((_b = (_a = this.activeModule) === null || _a === void 0 ? void 0 : _a.config.level) !== null && _b !== void 0 ? _b : 0) + 1,\r\n                free: true,\r\n                source: {\r\n                    src: url\r\n                },\r\n                background: 'auto',\r\n                timeout: 0,\r\n                animation: 'inherit',\r\n                transient: true\r\n            }, config)\r\n        });\r\n    };\r\n    Application.prototype.pushWindow = function (url, title, preset) {\r\n        var _this = this;\r\n        if (title === void 0) { title = ''; }\r\n        if (preset === void 0) { preset = 'slide'; }\r\n        var resolve = this.resolveURL(url);\r\n        var search = resolve.search;\r\n        if (!this.moduleSrcVerify(url)) {\r\n            return Promise.reject('Illegal');\r\n        }\r\n        return new Promise(function (resolve, reject) {\r\n            var module = _this.createModuleByURL(url, {\r\n                title: title,\r\n                animation: preset\r\n            });\r\n            if (module) {\r\n                _this.transform.to(module.id, module.config.source.html ? search : '').then(resolve).catch(reject);\r\n            }\r\n        });\r\n    };\r\n    Application.prototype.mountSystem = function () {\r\n        var _this = this;\r\n        if (this.options.modules['system']) {\r\n            this.get('system').then(function () {\r\n                _this.transform.to('system', undefined, -1).then(function () {\r\n                    _this.trigger('systemDidMount');\r\n                });\r\n            });\r\n        }\r\n    };\r\n    Application.prototype.mountFramework = function () {\r\n        var _this = this;\r\n        this.get('frameworks').then(function (module) {\r\n            var route = _this.route;\r\n            var index = module.config.index || '';\r\n            var id = route.id || index;\r\n            var config = module.config;\r\n            _this.config = config;\r\n            _this.transform.setup({\r\n                singleFlow: config.singleFlow,\r\n                index: index,\r\n                defaultIndex: id,\r\n                notFound: config.notFind,\r\n                limit: Math.max(config.limit || 7, 2),\r\n                exists: _this.exists,\r\n                defaultAnimation: config.animation\r\n            });\r\n            _this.transform.to('frameworks', undefined, -1).then(function () {\r\n                _this.trigger('frameworksDidMount');\r\n            });\r\n            if (id !== index) {\r\n                _this.transform.pushState(index);\r\n                if (id)\r\n                    _this.transform.to(id);\r\n                return;\r\n            }\r\n            if (id)\r\n                _this.transform.to(id);\r\n        }).catch(function () {\r\n            _this.console.error('Module frameworks must be included!', 'Serious!', '');\r\n        });\r\n    };\r\n    Application.prototype.start = function () {\r\n        this.setExists();\r\n        this.mountFramework();\r\n        this.mountSystem();\r\n    };\r\n    return Application;\r\n}(ApplicationBase));\n\nvar application = new Application();\n\nexports.Application = Application;\nexports.application = application;\n"]}