! 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.withCredentials = !0, 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 r;
            for (var i in o)
                if (o[i].indexOf("i18n/" + t.languageCode.toLowerCase() + ".json") >= 0) {
                    r = i.substring(i.lastIndexOf("/") + 1, i.lastIndexOf("."));
                    break
                }
            if (!r)
                for (var i in o)
                    if (o[i].indexOf("i18n/default.json") >= 0) {
                        r = i.substring(i.lastIndexOf("/") + 1, i.lastIndexOf("."));
                        break
                    }
            if (!r)
                for (var i in o)
                    if (o[i].indexOf("i18n/en.json") >= 0) {
                        r = i.substring(i.lastIndexOf("/") + 1, i.lastIndexOf("."));
                        break
                    }
            return !!r && (t.languageCode = r, !0)
        }

        function n(e) {
            var t = e.gameFolder,
                o = !1;
            if (window.location.search.match(/&?custom=true&?/) && (o = !0), window.gtk && window.gtk.jLottery && window.gtk.jLottery.embeddedParams && window.gtk.jLottery.embeddedParams.custom && (o = !0), o) {
                var n = e.gameFolder.match(/\/([^\/]+\/)$/)[1];
                t = "/custom_lang/" + e.skinCode + "/" + n
            }
            return t
        }
        var r = new t;
        return r.handle = function(t) {
            t.languageCode = t.languageCode || "default", t.languageCode = t.languageCode.toLowerCase();
            var i = t.assetPackUrl.substring(0, t.assetPackUrl.lastIndexOf("/"));
            t.gameFolder = i.substring(0, i.lastIndexOf("/") + 1), t.i18nParent = n(t), e.httpGetJson(t.i18nParent + "i18n.json" + t.queryStr, function(e) {
                o(e.i18n, t) ? r.next.handle(t) : t.onLoadFailed()
            }, t.onLoadFailed)
        }, r
    }), 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 r = t.i18nParent + "i18n/" + t.languageCode + ".json" + t.queryStr;
            e.httpGetJson(r, 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 r = 0; r < t.length; r++) n.fileListMap[e][t[r]] = o
        }

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

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

        function i(t) {
            var r = t.i18nParent + "i18n/",
                i = r + t.languageCode + "/",
                a = i + t.skinCode + ".json" + t.queryStr;
            e.httpGetJson(a, function(e) {
                o("i18n", e[t.skinCode], i, t), n(t, e.assetPacks)
            }, t.onLoadFailed)
        }
        var a = new t;
        return a.handle = i, 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 r in e.fileListMap) e.subLoaderMap[r] && (t += e.subLoaderMap[r].getTotal(), o += e.subLoaderMap[r].getCurrent(), n = n && e.subLoaderMap[r].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, r, i) {
        function a(e, a, s) {
            this.context = new t(e, a, s), this.loadChain = [o, n, r, i]
        }
        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) {
            i.addSubLoader(this.context, e, t)
        }, a.prototype.currentProgress = function() {
            return i.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
    }), 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 r = [];
            for (var i in o)
                if (o[i]) {
                    if (this.options.fileExtFilterList) {
                        var a = e.getFileExt(i, !0);
                        if (this.options.fileExtFilterList.indexOf(a) < 0) continue
                    }
                    this._count.total++, r.push(i)
                }
            if (0 === this._count.total) return this._count.complete = !0, void this.options.onFileLoaded();
            for (var s = this, d = 0; d < r.length; d++) {
                var i = r[d];
                this._doLoadFile(o[i] + i + 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(i)), 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 r in this.options.tagAttributes) n.setAttribute(r, this.options.tagAttributes[r]);
            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(n) {
            var r = window.location.search.match(/&?assetPack=(\w+)&?/)[1],
                i = window.location.search.match(/&?language=([^&]+)&?/)[1],
                a = window.location.search.match(/&?skincode=(\w+)&?/)[1];
            e.initDefault("assetPacks/" + r, i, a);
            var s = e.getDefault(),
                d = new o({
                    type: "i18n",
                    parseJson: !0
                });
            d.origLoad = d.load, d.load = function(e, t) {
                for (var o in e) o.match(/splash\.json$/) || delete e[o];
                this.origLoad(e, t)
            }, s.addSubLoader("i18n", d), s.addSubLoader("splash", new t({
                type: "splash",
                tagName: "img"
            })), s.load(function() {
                s.currentProgress().complete && n && n()
            }, function() {})
        }
        return {
            load: n
        }
    }), define("splash", ["skbJet/component/resourceLoader/resourceLib", "skbJet/componentCRDC/splash/splashLoadController"], function(e, t) {
        function o() {
            p.style.backgroundImage = "url(" + e.splash.loading.src + ")", f.innerHTML = e.i18n.splash.splashScreen.loadingpic["EXPLORE THE RICHES OF"], h.innerHTML = e.i18n.splash.splashScreen.loadingpic["FEATURING TUMBLE THRU"], L.innerHTML = e.i18n.splash.splashScreen.footer.shortVersion
        }

        function n(e) {
            var t = e.data.loaded || null;
            null !== t && (document.getElementById("progressDiv").style.width = t + "%")
        }

        function r(e) {
            return Math.round(e * s) + "px"
        }

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

        function a() {
            o(), i(), window.addEventListener("resize", i), window.addEventListener("message", n, !1)
        }
        var s = 1,
            d = {
                boxDiv: {
                    width: 1920,
                    height: 960
                },
                loadDiv: {
                    width: 1040,
                    height: 960,
                    left: 440
                },
                imgBoxDiv: {
                    width: 1040,
                    height: 700,
                    top: 100
                },
                exploreTextDiv: {
                    top: 46,
                    fontSize: 32
                },
                featureTextDiv: {
                    bottom: 100,
                    fontSize: 28
                },
                progressBarDiv: {
                    width: 820,
                    height: 8,
                    padding: 4,
                    marginTop: 44
                },
                copyRightDiv: {
                    bottom: 20,
                    fontSize: 28
                }
            },
            l = document.getElementById("boxDiv"),
            u = document.getElementById("loadDiv"),
            c = document.getElementById("imgBoxDiv"),
            p = document.getElementById("gameImgDiv"),
            h = document.getElementById("featureTextDiv"),
            f = document.getElementById("exploreTextDiv"),
            g = document.getElementById("progressBarDiv"),
            L = document.getElementById("copyRightDiv");
        return t.load(a), {}
    })
}();