! function() {
    define("skbJet/component/resourceLoader/resourceLib", [], function() {
        return {}
    }), define("skbJet/component/resourceLoader/Util", [], function() {
        var e = {};
        return e.httpGetJson = function(t, o, n) {
            e.httpGetText(t, function(e) {
                o(JSON.parse(e))
            }, n)
        }, e.httpGetText = function(e, t, o) {
            var n = new XMLHttpRequest;
            n.addEventListener("load", function(e) {
                e.target.status >= 200 && e.target.status < 300 ? t(e.target.responseText) : o()
            }), n.addEventListener("error", o), n.addEventListener("timeout", o), n.open("GET", e), n.send()
        }, e.removeQueryStr = function(e) {
            var t = e.match(/(.*)\?/);
            return t ? t[1] : e
        }, e.getFileNameFromPath = function(e) {
            var t = e.match(/\/?([^\/]+)$/);
            return t ? t[1] : e
        }, e.getFileExt = function(t, o) {
            t = e.removeQueryStr(t), t = e.getFileNameFromPath(t);
            var n = t.match(/\.(\w+)$/);
            return n && n[1] ? o ? n[1].toLowerCase() : n[1] : null
        }, e.getFileNameWithoutExt = function(t) {
            t = e.removeQueryStr(t), t = e.getFileNameFromPath(t);
            var o = t.match(/(.*)(\.\w+)+$/);
            return o ? o[1] : t
        }, e.getParentFolder = function(t) {
            t = e.removeQueryStr(t);
            var o = e.getFileNameFromPath(t);
            return t.substring(0, t.length - o.length)
        }, e
    }), define("skbJet/component/resourceLoader/LoaderContext", [], function() {
        function e(e, t, o) {
            this.assetPackUrl = e, this.languageCode = t, this.skinCode = o, this.totalResAmount = 0, this.currentLoaded = 0, this.gameFolder = null, this.i18nParent = null, this.queryStr = "", window._cacheFlag && window._cacheFlag.queryStr && (this.queryStr = window._cacheFlag.queryStr), this.fileListMap = {
                i18n: null
            }, this.subLoaderMap = {}, this.onFileLoaded = function() {}, this.onLoadFailed = function() {}
        }
        return e
    }), define("skbJet/component/resourceLoader/LoaderChainHandler", [], function() {
        function e() {}
        return e.prototype.next = null, e.prototype.handle = null, e
    }), define("skbJet/component/resourceLoader/handlers/languageListHandler", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/LoaderChainHandler"], function(e, t) {
        function o(e, t) {
            for (var o = {}, n = 0; n < e.length; n++) o[e[n]] = [e[n].toLowerCase()], e[n].indexOf("_") > -1 ? o[e[n]].push(e[n].replace("_", "-").toLowerCase()) : e[n].indexOf("-") > -1 && o[e[n]].push(e[n].replace("-", "_").toLowerCase());
            var i;
            for (var r in o)
                if (o[r].indexOf("i18n/" + t.languageCode.toLowerCase() + ".json") >= 0) {
                    i = r.substring(r.lastIndexOf("/") + 1, r.lastIndexOf("."));
                    break
                }
            if (!i)
                for (var r in o)
                    if (o[r].indexOf("i18n/default.json") >= 0) {
                        i = r.substring(r.lastIndexOf("/") + 1, r.lastIndexOf("."));
                        break
                    }
            if (!i)
                for (var r in o)
                    if (o[r].indexOf("i18n/en.json") >= 0) {
                        i = r.substring(r.lastIndexOf("/") + 1, r.lastIndexOf("."));
                        break
                    }
            return !!i && (t.languageCode = i, !0)
        }

        function n(t) {
            var o = t.gameFolder,
                n = !1;
            if (window.location.search.match(/&?custom=true&?/) && (n = !0), window.gtk && window.gtk.jLottery && window.gtk.jLottery.embeddedParams && window.gtk.jLottery.embeddedParams.custom && (n = !0), n) {
                var i, r = window.location.pathname;
                r.match(/\/splash\.html$/) || r.match(/\/launcher\.html$/) ? (i = e.getParentFolder(r), i = i.match(/\/([^\/]+\/)$/)[1]) : i = t.gameFolder.match(/\/([^\/]+\/)$/)[1], o = "/custom_lang/" + t.skinCode + "/" + i
            }
            return o
        }
        var i = new t;
        return i.handle = function(t) {
            t.languageCode = t.languageCode || "default", t.languageCode = t.languageCode.toLowerCase();
            var r = t.assetPackUrl.substring(0, t.assetPackUrl.lastIndexOf("/"));
            t.gameFolder = r.substring(0, r.lastIndexOf("/") + 1), t.i18nParent = n(t), e.httpGetJson(t.i18nParent + "i18n.json" + t.queryStr, function(e) {
                o(e.i18n, t) ? i.next.handle(t) : t.onLoadFailed()
            }, t.onLoadFailed)
        }, i
    }), define("skbJet/component/resourceLoader/handlers/skinListHandler", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/LoaderChainHandler"], function(e, t) {
        function o(e, t) {
            for (var o = 0; o < e.length; o++) {
                var n = e[o];
                if (n = n.substring(n.lastIndexOf("/") + 1, n.lastIndexOf(".")), t.skinCode.toLowerCase() === n.toLowerCase()) return
            }
            t.skinCode = "default"
        }
        var n = new t;
        return n.handle = function(t) {
            t.skinCode = t.skinCode || "default";
            var i = t.i18nParent + "i18n/" + t.languageCode + ".json" + t.queryStr;
            e.httpGetJson(i, function(e) {
                o(e[t.languageCode], t), n.next.handle(t)
            }, t.onLoadFailed)
        }, n
    }), define("skbJet/component/resourceLoader/handlers/fileListHandler", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/LoaderChainHandler"], function(e, t) {
        function o(e, t, o, n) {
            n.fileListMap[e] || (n.fileListMap[e] = {});
            for (var i = 0; i < t.length; i++) n.fileListMap[e][t[i]] = o
        }

        function n(t, n) {
            var r = t.assetPackUrl + ".json" + t.queryStr;
            e.httpGetJson(r, function(e) {
                for (var r in e) o(r, e[r], t.gameFolder + "assetPacks/", t);
                var s = t.assetPackUrl.substring(t.assetPackUrl.lastIndexOf("assetPacks"));
                n && n.indexOf(t.skinCode + "/" + s + ".json") > -1 ? i(t, s) : a.next.handle(t)
            }, t.onLoadFailed)
        }

        function i(t, n) {
            var i = t.i18nParent + "i18n/" + t.languageCode + "/" + t.skinCode + "/",
                r = i + n + ".json" + t.queryStr;
            e.httpGetJson(r, function(e) {
                for (var n in e) o(n, e[n], i + "assetPacks/", t);
                a.next.handle(t)
            }, t.onLoadFailed)
        }

        function r(t) {
            var i = t.i18nParent + "i18n/",
                r = i + t.languageCode + "/",
                a = r + t.skinCode + ".json" + t.queryStr;
            e.httpGetJson(a, function(e) {
                o("i18n", e[t.skinCode], r, t), n(t, e.assetPacks)
            }, t.onLoadFailed)
        }
        var a = new t;
        return a.handle = r, a
    }), define("skbJet/component/resourceLoader/handlers/fileLoadHandler", ["skbJet/component/resourceLoader/LoaderChainHandler"], function(e) {
        function t(e, t, o) {
            setTimeout(function() {
                e.load(t, o)
            }, 1)
        }
        var o = new e;
        return o.handle = function(e) {
            for (var o in e.fileListMap) e.subLoaderMap[o] && t(e.subLoaderMap[o], e.fileListMap[o], {
                onFileLoaded: e.onFileLoaded,
                onLoadFailed: e.onLoadFailed,
                queryStr: e.queryStr
            })
        }, o.addSubLoader = function(e, t, o) {
            e.subLoaderMap[t] = o
        }, o.summary = function(e) {
            var t = 0,
                o = 0,
                n = !0;
            for (var i in e.fileListMap) e.subLoaderMap[i] && (t += e.subLoaderMap[i].getTotal(), o += e.subLoaderMap[i].getCurrent(), n = n && e.subLoaderMap[i].isComplete());
            return {
                total: t,
                current: o,
                complete: n
            }
        }, o
    }), define("skbJet/component/resourceLoader/ResourceLoader", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/LoaderContext", "skbJet/component/resourceLoader/handlers/languageListHandler", "skbJet/component/resourceLoader/handlers/skinListHandler", "skbJet/component/resourceLoader/handlers/fileListHandler", "skbJet/component/resourceLoader/handlers/fileLoadHandler"], function(e, t, o, n, i, r) {
        function a(e, a, s) {
            this.context = new t(e, a, s), this.loadChain = [o, n, i, r]
        }
        var s;
        return a.prototype.load = function(e, t) {
            for (var o = 0; o < this.loadChain.length - 1; o++) this.loadChain[o].next = this.loadChain[o + 1];
            this.context.onFileLoaded = e, this.context.onLoadFailed = t, this.loadChain[0].handle(this.context)
        }, a.prototype.addSubLoader = function(e, t) {
            r.addSubLoader(this.context, e, t)
        }, a.prototype.currentProgress = function() {
            return r.summary(this.context)
        }, a.initDefault = function(e, t, o) {
            if (s) throw "Default loader already inited.";
            s = new a(e, t, o)
        }, a.getDefault = function() {
            return s
        }, a.prototype.addHeartBeat = function(e, t) {
            function o() {
                var t = i.currentProgress();
                if (t.complete) return void clearInterval(n);
                e(t)
            }
            var n, i = this;
            t || (t = 5e3), n = setInterval(o, t)
        }, a
    }), define("skbJet/component/resourceLoader/AbstractSubLoader", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/resourceLib"], function(e, t) {
        function o() {}

        function n() {}
        return n.prototype._initOptions = function(e, o) {
            this._count = {
                total: 0,
                current: 0,
                complete: !1
            }, this.options = o || {}, this.options.type = this.options.type || e, t[this.options.type] || (t[this.options.type] = {})
        }, n.prototype.getTotal = function() {
            return this._count.total
        }, n.prototype.getCurrent = function() {
            return this._count.current
        }, n.prototype.isComplete = function() {
            return this._count.complete
        }, n.prototype._prepareLoad = function(e) {
            e = e || {}, this._count.total = 0, this._count.current = 0, e.queryStr = e.queryStr ? e.queryStr : "", e.onFileLoaded = e.onFileLoaded ? e.onFileLoaded : o, e.onLoadFailed = e.onLoadFailed ? e.onLoadFailed : o;
            for (var t in e) this.options[t] = e[t]
        }, n.prototype.load = function(o, n) {
            this._prepareLoad(n);
            var i = [];
            for (var r in o)
                if (o[r]) {
                    if (this.options.fileExtFilterList) {
                        var a = e.getFileExt(r, !0);
                        if (this.options.fileExtFilterList.indexOf(a) < 0) continue
                    }
                    this._count.total++, i.push(r)
                }
            if (0 === this._count.total) return this._count.complete = !0, void this.options.onFileLoaded();
            for (var s = this, d = 0; d < i.length; d++) {
                var r = i[d];
                this._doLoadFile(o[r] + r + this.options.queryStr, function(e) {
                    return function(o) {
                        s._count.current++, s._count.current === s._count.total && (s._count.complete = !0), t[s.options.type] = t[s.options.type] || {}, t[s.options.type][e] = o, s.options.onFileLoaded()
                    }
                }(e.getFileNameWithoutExt(r)), this.options.onLoadFailed)
            }
        }, n.prototype._doLoadFile = function(e, t, o) {
            throw "Not implemented yet. Params: url:" + e + "   success:" + t + "   fail:" + o
        }, n
    }), define("skbJet/component/resourceLoader/subLoaders/HtmlTagSubLoader", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/AbstractSubLoader"], function(e, t) {
        function o(e) {
            this._initOptions("_html_tags", e)
        }
        return o.prototype = new t, o.prototype._doLoadFile = function(e, t, o) {
            var n = document.createElement(this.options.tagName);
            if (n.onload = function() {
                    t(n)
                }, n.onerror = o, this.options.parentTag && this.options.parentTag.appendChild(n), this.options.tagAttributes)
                for (var i in this.options.tagAttributes) n.setAttribute(i, this.options.tagAttributes[i]);
            n.src = e
        }, o
    }), define("skbJet/component/resourceLoader/subLoaders/TextFilesSubLoader", ["skbJet/component/resourceLoader/Util", "skbJet/component/resourceLoader/AbstractSubLoader"], function(e, t) {
        function o(e) {
            this._initOptions("_text_files", e)
        }
        return o.prototype = new t, o.prototype._doLoadFile = function(t, o, n) {
            "json" === e.getFileExt(t, !0) && this.options.parseJson ? e.httpGetJson(t, o, n) : e.httpGetText(t, o, n)
        }, o
    }), define("skbJet/componentCRDC/splash/splashLoadController", ["skbJet/component/resourceLoader/ResourceLoader", "skbJet/component/resourceLoader/subLoaders/HtmlTagSubLoader", "skbJet/component/resourceLoader/subLoaders/TextFilesSubLoader"], function(e, t, o) {
        function n(e, n) {
            var i = new o({
                type: "i18n",
                parseJson: !0
            });
            i.origLoad = i.load, i.load = function(e, t) {
                for (var o in e) o.match(/splash\.json$/) || delete e[o];
                this.origLoad(e, t)
            }, n.addSubLoader("i18n", i), n.addSubLoader("splash", new t({
                type: "splash",
                tagName: "img"
            })), n.load(function() {
                n.currentProgress().complete && e && e()
            }, function() {})
        }

        function i(t) {
            var o = window.location.search.match(/&?assetPack=(\w+)&?/)[1],
                i = window.location.search.match(/&?language=([^&]+)&?/)[1],
                r = window.location.search.match(/&?skincode=(\w+)&?/)[1];
            e.initDefault("assetPacks/" + o, i, r), n(t, e.getDefault())
        }
        return {
            load: i,
            loadByLoader: n
        }
    }), define("skbJet/componentCRDC/splash/splashUIController", [], function() {
        function e() {
            var e = Math.floor(Number(window.innerWidth)),
                t = Math.floor(Number(window.innerHeight));
            g = e >= t ? h : p
        }

        function t(e) {
            return Math.round(e * u) + "px"
        }

        function o() {
            e();
            var o = g[c],
                n = Math.floor(Number(window.innerWidth)),
                s = Math.floor(Number(window.innerHeight));
            document.documentElement.style.width = n + "px", document.documentElement.style.height = s + "px", document.body.style.width = n + "px", document.body.style.height = s + "px";
            var h, p, f, m, L = o.loadDiv.width + (n > s ? 2 * o.loadDiv.landscapeMargin : 0),
                v = o.loadDiv.height,
                y = L / v;
            n / s > y ? (h = Math.floor(s * y), p = s, f = Math.floor((n - h) / 2), m = 0) : (h = n, p = Math.floor(n / y), f = 0, m = Math.floor((s - p) / 2)), i.style.width = h + "px", i.style.height = p + "px", i.style.left = f + "px", i.style.top = m + "px", u = h / L, i.style.margin = "0 " + t(n > s ? o.loadDiv.landscapeMargin : 0), r.style.top = t(o.gameImgDiv.top), r.style.width = t(o.gameImgDiv.width), r.style.height = t(o.gameImgDiv.height), d.style.top = t(o.gameImgDiv.top + o.gameImgDiv.height), d.style.width = t(o.loadDiv.width), d.style.height = t(o.featureTextDiv.height), d.style.padding = t(o.featureTextDiv.padding), d.style.fontSize = t(o.featureTextDiv.fontSize), a.style.top = t(o.gameImgDiv.top + o.gameImgDiv.height + o.featureTextDiv.height + 2 * o.featureTextDiv.padding), a.style.left = t((o.loadDiv.width - o.progressBarDiv.width) / 2), a.style.width = t(o.progressBarDiv.width), a.style.height = t(o.progressBarDiv.height), a.style.padding = t(o.progressBarDiv.padding), l.style.bottom = t(o.copyRightDiv.bottom), l.style.fontSize = t(o.copyRightDiv.fontSize)
        }

        function n(e) {
            var t = e.data.loaded || null;
            null !== t && (s.style.width = t + "%")
        }
        var i, r, a, s, d, l, u = 1,
            c = "slot",
            h = {
                slot: {
                    loadDiv: {
                        width: 1040,
                        height: 960,
                        landscapeMargin: 440
                    },
                    gameImgDiv: {
                        width: 1040,
                        height: 700,
                        top: 100
                    },
                    featureTextDiv: {
                        height: 44,
                        padding: 4,
                        fontSize: 36
                    },
                    progressBarDiv: {
                        width: 820,
                        height: 16,
                        padding: 4
                    },
                    progressDiv: {},
                    copyRightDiv: {
                        bottom: 20,
                        fontSize: 28,
                        fontFamily: 'Arial, "San serif"'
                    }
                },
                IW: {
                    loadDiv: {
                        width: 960,
                        height: 600,
                        landscapeMargin: 0
                    },
                    gameImgDiv: {
                        width: 960,
                        height: 500,
                        top: 0
                    },
                    featureTextDiv: {
                        height: 40,
                        padding: 4,
                        fontSize: 32
                    },
                    progressBarDiv: {
                        width: 416,
                        height: 8,
                        padding: 0
                    },
                    progressDiv: {},
                    copyRightDiv: {
                        bottom: 20,
                        fontSize: 20,
                        fontFamily: '"Roboto Condenced"'
                    }
                }
            },
            p = {
                slot: {
                    loadDiv: {
                        width: 1040,
                        height: 960,
                        landscapeMargin: 440
                    },
                    gameImgDiv: {
                        width: 1040,
                        height: 700,
                        top: 100
                    },
                    featureTextDiv: {
                        height: 44,
                        padding: 4,
                        fontSize: 36
                    },
                    progressBarDiv: {
                        width: 820,
                        height: 16,
                        padding: 4
                    },
                    progressDiv: {},
                    copyRightDiv: {
                        bottom: 20,
                        fontSize: 28,
                        fontFamily: 'Arial, "San serif"'
                    }
                },
                IW: {
                    loadDiv: {
                        width: 600,
                        height: 960,
                        landscapeMargin: 0
                    },
                    gameImgDiv: {
                        width: 600,
                        height: 840,
                        top: 0
                    },
                    featureTextDiv: {
                        height: 40,
                        padding: 4,
                        fontSize: 32
                    },
                    progressBarDiv: {
                        width: 416,
                        height: 8,
                        padding: 0
                    },
                    progressDiv: {},
                    copyRightDiv: {
                        bottom: 20,
                        fontSize: 20,
                        fontFamily: '"Roboto Condenced"'
                    }
                }
            },
            g = h;
        return function() {
            e(), i = document.createElement("div"), i.id = "loadDiv", document.body.appendChild(i), i.style.position = "absolute", r = document.createElement("div"), r.id = "gameImgDiv", i.appendChild(r), r.style.position = "absolute", r.style.backgroundSize = "contain", r.style.backgroundRepeat = "no-repeat", r.style.left = 0, d = document.createElement("div"), d.id = "featureTextDiv", i.appendChild(d), d.style.position = "absolute", d.style.textAlign = "center", a = document.createElement("div"), a.id = "progressBarDiv", i.appendChild(a), a.style.position = "absolute", a.style.backgroundSize = "cover", s = document.createElement("div"), s.id = "progressDiv", a.appendChild(s), s.style.width = "0", s.style.height = "100%", s.style.position = "absolute", s.style.backgroundSize = "cover", l = document.createElement("div"), l.id = "copyRightDiv", document.body.appendChild(l), l.style.position = "absolute", l.style.width = "100%", l.style.textAlign = "center", l.style.fontFamily = g[c].copyRightDiv.fontFamily
        }(), {
            onSplashLoadDone: function() {
                e(), window.addEventListener("message", n, !1)
            },
            init: function(e) {
                c = e && e.layoutType ? e.layoutType : "slot", o(), window.addEventListener("resize", o)
            },
            scale: t
        }
    }), define("splash", ["skbJet/component/resourceLoader/resourceLib", "skbJet/componentCRDC/splash/splashLoadController", "skbJet/componentCRDC/splash/splashUIController"], function(e, t, o) {
        function n() {
            var t = window.location.search.match(/&?assetPack=([^&]+)&?/)[1],
                n = document.getElementById("copyRightDiv");
            n.innerHTML = e.i18n.splash.splashScreen.footer.shortVersion, n.style.color = "#FFFFFF", -1 !== t.indexOf("mini") && (n.style.fontSize = "14px"), o.onSplashLoadDone()
        }
        return function() {
            var e = window.location.search.match(/&?assetPack=(\w+)&?/)[1].toLowerCase(),
                i = document.getElementById("gameImgDiv");
            i.style.backgroundImage = 'url("assetPacks/' + e + '/splash/loading.png")', i.style.backgroundPosition = "center";
            var r = document.createElement("div");
            r.style.width = "100%", r.style.height = "30%", r.style.position = "absolute", r.style.backgroundSize = "cover", r.style.backgroundColor = "#000", r.style.left = "0", r.style.top = "0";
            var a = document.getElementById("progressBarDiv");
            a.insertBefore(r, a.childNodes[0]), document.getElementById("progressDiv").style.backgroundColor = "#FF9900", document.getElementById("progressDiv").style.height = "30%", document.getElementById("progressDiv").style.left = "0", document.getElementById("progressDiv").style.top = "0", o.init(), t.load(n)
        }(), {}
    })
}();