! function() {
    define("splash", [], function() {
        function e(e) {
            var t, a = window.location.search.match(/&?language=(\w+)&?/)[1],
                o = window.location.search.match(/&?skincode=(\w+)&?/)[1];
            n("i18n/" + a + ".json", function(n) {
                var s = n.target;
                if (404 !== s.status) {
                    var i = JSON.parse(s.responseText),
                        d = i[a];
                    t = d.indexOf(a + "/" + o + ".json") > -1 ? "i18n/" + a + "/" + o : "i18n/" + a + "/default"
                }
                e(t)
            })
        }

        function t(e) {
            var t = e.target;
            if (404 !== t.status) {
                var n = JSON.parse(t.responseText);
                Object.freeze(n)
            }
        }

        function n(e, t) {
            var n = new XMLHttpRequest;
            n.withCredentials = !0, n.addEventListener("load", function(e) {
                e.target.status >= 200 && e.target.status < 300 && t(e)
            }), n.open("GET", e), n.send()
        }

        function a(e) {
            n(e, function(e) {
                var t = e.target;
                if (404 !== t.status) {
                    var n = JSON.parse(t.responseText);
                    Object.freeze(n), document.getElementById("LoaderMessage").innerHTML = n.splashScreen.footer
                }
            })
        }

        function o() {
            document.documentElement.style.width = window.innerWidth + "px", document.documentElement.style.height = window.innerHeight + "px";
            var e, t, n, a, o = window.innerWidth,
                s = window.innerHeight;
            o - s / 9 * 16 > 0 ? (a = s, t = 0, n = a / 9 * 16, e = (o - n) / 2 / a * 9, document.getElementsByTagName("html")[0].style.fontSize = s / 9 + "px") : (n = o, e = 0, a = o / 16 * 9, t = (s - a) / n * 8, document.getElementsByTagName("html")[0].style.fontSize = o / 16 + "px"), document.getElementById("loadingImgContainer").style.top = t + .8333 + "rem", document.getElementById("loadingImgContainer").style.left = e + 3.667 + "rem", document.getElementById("loadingImgContainerLogo").style.top = t + .8333 + "rem", document.getElementById("loadingImgContainerLogo").style.left = e + 5.156 + "rem", document.getElementById("progressBar").style.top = t + 7.0333 + "rem", document.getElementById("progressBar").style.left = e + 4.513 + "rem", document.getElementById("LoaderMessage").style.top = t + 8 + "rem"
        }
        var s = window._cacheFlag.queryStr,
            i = window.location.search.match(/&?assetPack=([^&]+)&?/)[1];
        document.children ? document.children[0].style = "width:" + document.body.clientWidth + "px; height:" + document.body.clientHeight + "px;" : document.documentElement.style = "width:" + document.documentElement.lastChild.clientWidth + "px; height:" + document.documentElement.lastChild.clientHeight + "px;",
            function(t, a) {
                var o = "assetPacks/" + t;
                e(function(e) {
                    n(e + ".json", function(s) {
                        var d = s.target;
                        if (404 !== d.status) {
                            var r = JSON.parse(d.responseText);
                            if (r.assetPacks) {
                                var l = e.substring(e.lastIndexOf("/") + 1);
                                r.assetPacks.indexOf(l + "/assetPacks/" + i + ".json") > -1 && n(e + "/assetPacks/" + i + ".json", function(n) {
                                    var s = n.target;
                                    if (404 !== s.status) {
                                        var i = JSON.parse(s.responseText);
                                        for (var d in i)
                                            if (i[d].indexOf(t) > -1) {
                                                o = e + "/assetPacks/" + t;
                                                break
                                            }
                                    }
                                    a(o)
                                })
                            } else a(o)
                        }
                    })
                })
            }(i + "/splash/loadingI.png", function(e) {
                document.getElementById("loadingImgContainerLogo").style.backgroundImage = 'url("' + e + s + '")'
            }), document.getElementById("loadingImgContainer").style.backgroundImage = 'url("assetPacks/' + i + "/splash/loading.png" + s + '")', n("i18n/" + window.location.search.match(/&?language=([^&]+)&?/)[1] + ".json", t),
            function() {
                var e = window.location.search.match(/&?language=([^&]+)&?/)[1],
                    t = window.location.search.match(/&?skincode=([^&]+)&?/)[1];
                n("i18n/" + e + ".json", function(n) {
                    var o = n.target;
                    if (404 !== o.status) {
                        for (var s = "i18n/" + e + "/default/splash.json", i = JSON.parse(o.responseText), d = i[e], r = 0; r < d.length; r++)
                            if (d[r].indexOf(e + "/" + t + ".json") > -1) {
                                s = "i18n/" + e + "/" + t + "/splash.json";
                                break
                            }
                        a(s)
                    }
                })
            }(), window.addEventListener("message", function(e) {
                var t = e.data.loaded || null;
                null !== t && (document.getElementById("loadProgress").style.width = t + "%")
            }, !1), o(), window.addEventListener("load", o), window.addEventListener("resize", o)
    })
}();