Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(kc) {
- function bc() {}
- function q() {}
- function r(a) {
- this.Na = a;
- Error.captureStackTrace && Error.captureStackTrace(this, r)
- }
- function Ua(a) {
- this.f = t.za(Ua.H);
- t.ya(this.f).get("features").textContent = a.join(", ")
- }
- function Va() {
- this.Ck = new Jb;
- this.f = t.za(Va.H);
- var a = t.ya(this.f);
- this.Uf = a.get("ping");
- this.Fo = a.get("max-ping");
- this.Fn = a.get("fps");
- t.fe(a.get("graph"), this.Ck.f)
- }
- function T(a, b, c) {
- var d = this;
- this.f = t.za(T.H);
- var e = t.ya(this.f);
- e.get("ok");
- e.get("cancel");
- this.re = e.get("content");
- for (var f =
- e.get("title"), e = e.get("buttons"), g = 0, n = 0; n < c.length;) {
- var k = c[n++],
- J = window.document.createElement("button");
- J.textContent = k;
- J.onclick = function(a) {
- return function() {
- x.i(d.Za, a[0])
- }
- }([g++]);
- e.appendChild(J)
- }
- this.re.textContent = b;
- f.textContent = a
- }
- function ba(a) {
- function b(a) {
- var b = window.document.createElement("div");
- b.className = "inputrow";
- var c = window.document.createElement("div");
- c.textContent = a;
- b.appendChild(c);
- for (var c = W.Nn(a), d = 0; d < c.length;) {
- var e = [c[d]];
- ++d;
- var f = [window.document.createElement("div")],
- g = e[0];
- H.startsWith(e[0], "Key") && (g = B.substr(e[0], 3, null));
- f[0].textContent = g;
- b.appendChild(f[0]);
- g = window.document.createElement("i");
- g.className = "icon-cancel";
- g.onclick = function(a, b) {
- return function() {
- W.Wp(b[0]);
- m.s.Wf.Ra(W);
- a[0].remove()
- }
- }(f, e);
- f[0].appendChild(g)
- }
- c = window.document.createElement("i");
- c.className = "icon-plus";
- b.appendChild(c);
- c.onclick = function() {
- p.classList.toggle("show", !0);
- p.focus();
- p.onkeydown = function(b) {
- p.classList.toggle("show", !1);
- b.stopPropagation();
- b = b.code;
- null == W.I(b) &&
- (W.Ga(b, a), m.s.Wf.Ra(W), r())
- }
- };
- return b
- }
- function c(a, b, c) {
- a = k.get(a);
- if (null == c) a.hidden = !0;
- else {
- a.innerHTML = b + ": <div class='flagico'></div> <span></span>";
- b = a.querySelector(".flagico");
- a = a.querySelector("span");
- try {
- b.classList.add("f-" + c.rb)
- } catch (pc) {}
- a.textContent = c.rb.toUpperCase()
- }
- }
- function d(a, b, c, d) {
- var e = k.get(a);
- e.selectedIndex = d(b.I());
- e.onchange = function() {
- var a = c(e.selectedIndex);
- b.Ra(a)
- }
- }
- function e(a, b, c) {
- function d(a) {
- e.classList.toggle("icon-ok", a);
- e.classList.toggle("icon-cancel",
- !a)
- }
- a = k.get(a);
- a.classList.add("toggle");
- var e = window.document.createElement("i");
- e.classList.add("icon-ok");
- a.insertBefore(e, a.firstChild);
- a.onclick = function() {
- var a = !b.I();
- b.Ra(a);
- d(a);
- null != c && c(a)
- };
- d(b.I())
- }
- function f(a) {
- var b = {
- Ul: k.get(a + "btn"),
- Eg: k.get(a + "sec")
- };
- J.push(b);
- b.Ul.onclick = function() {
- g(b)
- }
- }
- function g(a) {
- for (var b = 0, c = 0; c < J.length;) {
- var d = J[c];
- ++c;
- var e = d == a;
- e && (ba.ml = b);
- d.Eg.classList.toggle("selected", e);
- d.Ul.classList.toggle("selected", e);
- ++b
- }
- }
- null == a && (a = !1);
- var n = this;
- this.f =
- t.za(ba.H);
- var k = t.ya(this.f);
- this.Zc = k.get("close");
- var J = [];
- f("sound");
- f("video");
- f("misc");
- f("input");
- g(J[ba.ml]);
- e("tsound-main", m.s.zl, function(a) {
- m.Xa.tl(a ? 1 : 0)
- });
- e("tsound-chat", m.s.wl);
- e("tsound-highlight", m.s.yl);
- e("tsound-crowd", m.s.xl);
- d("viewmode", m.s.Nb, function(a) {
- return a - 1
- }, function(a) {
- return a + 1
- });
- d("fps", m.s.hh, function(a) {
- return a
- }, function(a) {
- return a
- });
- var h = [1, .75, .5, .25];
- d("resscale", m.s.fl, function(a) {
- return h[a]
- }, function(a) {
- for (var b = 0, c = h.length - 1; b < c && !(h[b] <= a);) ++b;
- return b
- });
- e("tvideo-teamcol", m.s.Hl);
- e("tvideo-showindicators", m.s.Qj);
- var l = null,
- l = function() {
- var b = m.s.we.I();
- c("loc", "Detected location", m.s.ve.I());
- c("loc-ovr", "Location override", b);
- var d = k.get("loc-ovr-btn");
- d.disabled = !a;
- null == b ? (d.textContent = "Override location", d.onclick = function() {
- y.i(n.No)
- }) : (d.textContent = "Remove override", d.onclick = function() {
- m.s.we.Ra(null);
- l()
- })
- };
- l();
- var W = m.s.Wf.I(),
- p = k.get("presskey"),
- r, q = k.get("inputsec");
- r = function() {
- t.gf(q);
- var a = b("Up");
- q.appendChild(a);
- a = b("Down");
- q.appendChild(a);
- a = b("Left");
- q.appendChild(a);
- a = b("Right");
- q.appendChild(a);
- a = b("Kick");
- q.appendChild(a)
- };
- r();
- this.Zc.onclick = function() {
- y.i(n.mb)
- }
- }
- function Wa(a) {
- this.xj = !1;
- this.Al = new za(p.Ea);
- this.dj = new za(p.ta);
- this.Wk = new za(p.ba);
- var b = this;
- this.f = t.za(Wa.H);
- var c = t.ya(this.f);
- this.$b = c.get("room-name");
- this.Dl = c.get("start-btn");
- this.Fl = c.get("stop-btn");
- this.Lh = c.get("pause-btn");
- this.Im = c.get("auto-btn");
- this.bk = c.get("lock-btn");
- this.el = c.get("reset-all-btn");
- this.Uk = c.get("rec-btn");
- var d = c.get("link-btn"),
- e = c.get("leave-btn"),
- f = c.get("rand-btn");
- this.$e = c.get("time-limit-sel");
- this.Ue = c.get("score-limit-sel");
- this.Bl = c.get("stadium-name");
- this.Cl = c.get("stadium-pick");
- this.Cl.onclick = function() {
- y.i(b.gp)
- };
- this.vh(c.get("red-list"), this.Wk, p.ba, a);
- this.vh(c.get("blue-list"), this.dj, p.ta, a);
- this.vh(c.get("spec-list"), this.Al, p.Ea, a);
- this.hk(this.$e, this.gk(15));
- this.hk(this.Ue, this.gk(15));
- this.$e.onchange = function() {
- x.i(b.kp, b.$e.selectedIndex)
- };
- this.Ue.onchange = function() {
- x.i(b.bp, b.Ue.selectedIndex)
- };
- this.Dl.onclick = function() {
- y.i(b.hp)
- };
- this.Fl.onclick = function() {
- y.i(b.ip)
- };
- this.Lh.onclick = function() {
- y.i(b.Vo)
- };
- this.Im.onclick = function() {
- y.i(b.Mo)
- };
- this.bk.onclick = function() {
- x.i(b.jp, !b.Ah)
- };
- this.el.onclick = function() {
- null != b.Ld && (b.Ld(p.ta), b.Ld(p.ba))
- };
- this.Uk.onclick = function() {
- y.i(b.Zo)
- };
- d.onclick = function() {
- y.i(b.fp)
- };
- e.onclick = function() {
- y.i(b.Kd)
- };
- f.onclick = function() {
- y.i(b.Yo)
- };
- this.Ui(!1);
- this.Vi(!1)
- }
- function Xa() {
- var a = this;
- this.f = t.za(Xa.H);
- var b = t.ya(this.f);
- this.yb = b.get("input");
- this.Ie = b.get("ok");
- b.get("cancel").onclick = function() {
- null != a.Za && a.Za(null)
- };
- this.yb.maxLength = 30;
- this.yb.oninput = function() {
- a.v()
- };
- this.yb.onkeydown = function(b) {
- 13 == b.keyCode && a.wc() && null != a.Za && a.Za(a.yb.value)
- };
- this.Ie.onclick = function() {
- a.wc() && null != a.Za && a.Za(a.yb.value)
- };
- this.v()
- }
- function Ya(a) {
- this.kk = a.get("notice");
- this.mn = a.get("notice-contents");
- this.Zc = a.get("notice-close");
- this.Xk()
- }
- function Aa(a) {
- function b(a) {
- function b() {
- e.className = f.Na ? "icon-ok" : "icon-cancel"
- }
- a = d.get(a);
- var e =
- a.querySelector("i"),
- f = {
- Na: !0
- };
- b();
- a.onclick = function() {
- f.Na = !f.Na;
- b();
- c.mm(c.Ai)
- };
- return f
- }
- this.Ai = [];
- var c = this;
- this.tr = a;
- this.Ba = t.za(Aa.Oi);
- var d = t.ya(this.Ba),
- e = new Ya(d);
- this.Ki = d.get("refresh");
- this.dm = d.get("join");
- a = d.get("create");
- this.pr = d.get("count");
- a.onclick = function() {
- y.i(c.Ir)
- };
- d.get("changenick").onclick = function() {
- y.i(c.Hr)
- };
- d.get("settings").onclick = function() {
- y.i(c.Kr)
- };
- var f = d.get("replayfile");
- f.onchange = function() {
- var a = f.files;
- if (!(1 > a.length)) {
- var a = a.item(0),
- b = new FileReader;
- b.onload = function() {
- x.i(c.Jr, b.result)
- };
- b.readAsArrayBuffer(a)
- }
- };
- this.sr = b("fil-full");
- this.Lr = b("fil-pass");
- this.zr = d.get("listscroll");
- this.Nr = Ba.Hf(this.zr);
- this.Di = d.get("list");
- this.Ki.onclick = function() {
- e.Xk();
- c.$l()
- };
- this.dm.onclick = function() {
- null != c.yd && x.i(c.im, c.yd.Rr)
- };
- this.$l()
- }
- function Za(a) {
- this.Ba = t.za(Za.Oi, "tbody");
- var b = t.ya(this.Ba),
- c = b.get("name"),
- d = b.get("players"),
- e = b.get("distance"),
- f = b.get("pass"),
- b = b.get("flag");
- this.Rr = a;
- var g = a.gd;
- c.textContent = g.o;
- d.textContent = "" + g.F +
- "/" + g.Ee;
- f.textContent = g.Bb ? "Yes" : "No";
- e.textContent = "" + (a.ue | 0) + "km";
- try {
- b.classList.add("f-" + g.rb.toLowerCase())
- } catch (n) {}
- 8 > a.gd.sd && this.Ba.classList.add("old")
- }
- function $a() {
- this.yj = null;
- var a = this;
- this.f = t.za($a.H);
- var b = t.ya(this.f);
- this.Ff = b.get("link");
- var c = b.get("copy"),
- b = b.get("close");
- this.Ff.onfocus = function() {
- a.Ff.select()
- };
- c.onclick = function() {
- a.Ff.select();
- return window.document.execCommand("Copy")
- };
- b.onclick = function() {
- y.i(a.mb)
- }
- }
- function ga(a) {
- function b() {
- var b = g[f];
- a.Ek = e ? b : 0;
- d.get("spd").textContent = b + "x"
- }
- this.Cf = !1;
- var c = this;
- this.f = t.za(ga.H);
- var d = t.ya(this.f);
- this.Vh = a;
- d.get("reset").onclick = function() {
- a.Wh();
- c.sk()
- };
- var e = !0,
- f = 2,
- g = [.5, .75, 1, 2, 3];
- b();
- var n = d.get("playicon");
- n.classList.add("icon-pause");
- d.get("play").onclick = function() {
- e = !e;
- var a = n.classList;
- a.toggle("icon-play", !e);
- a.toggle("icon-pause", e);
- b()
- };
- d.get("spdup").onclick = function() {
- f += 1;
- var a = g.length - 1;
- f > a && (f = a);
- b()
- };
- d.get("spddn").onclick = function() {
- --f;
- 0 > f && (f = 0);
- b()
- };
- this.Qq = d.get("time");
- var k =
- d.get("timebar");
- this.Kp = d.get("progbar");
- for (var J = d.get("timetooltip"), h = 0, l = a.ik; h < l.length;) {
- var m = l[h];
- ++h;
- var p = window.document.createElement("div");
- p.className = "marker";
- p.classList.add("k" + m.kind);
- p.style.left = 100 * m.Ji + "%";
- k.appendChild(p)
- }
- k.onclick = function(b) {
- a.rq((b.pageX - k.offsetLeft) / k.clientWidth * a.Ng * a.Te);
- c.Cf || (c.Cf = !0, c.ep(), c.sk())
- };
- k.onmousemove = function(b) {
- b = (b.pageX - k.offsetLeft) / k.clientWidth;
- J.textContent = ga.jk(a.Te * a.Ng * b);
- return J.style.left = "calc(" + 100 * b + "% - 30px)"
- };
- this.po =
- d.get("leave");
- this.po.onclick = function() {
- y.i(c.Kd)
- }
- }
- function O(a) {
- var b = this,
- c = new T("Only humans", "", []);
- this.f = c.f;
- c.re.style.minHeight = "78px";
- Ja.qo().then(function(d) {
- null == O.$f && (O.$f = window.document.createElement("div"), c.re.appendChild(O.$f), O.Pp = d.render(O.$f, {
- sitekey: a,
- callback: function(a) {
- x.i(O.Vk, a)
- },
- theme: "dark"
- }));
- d.reset(O.Pp);
- O.Vk = function(a) {
- window.setTimeout(function() {
- x.i(b.Za, a)
- }, 1E3);
- O.Vk = null
- };
- c.re.appendChild(O.$f)
- })
- }
- function za(a) {
- this.jd = new Map;
- var b = this;
- this.f = t.za(za.H);
- this.f.className += " " + a.tn;
- var c = t.ya(this.f);
- this.Ya = c.get("list");
- this.xh = c.get("join-btn");
- this.Xh = c.get("reset-btn");
- a == p.Ea && this.Xh.remove();
- this.xh.textContent = "" + a.o;
- this.f.ondragover = this.f.bs = function(a) {
- -1 != a.dataTransfer.types.indexOf("player") && a.preventDefault()
- };
- this.f.ondrop = function(c) {
- c.preventDefault();
- c = c.dataTransfer.getData("player");
- null != c && (c = K.parseInt(c), null != c && ha.i(b.Qf, c, a))
- };
- this.xh.onclick = function() {
- x.i(b.To, a)
- };
- this.Xh.onclick = function() {
- x.i(b.Ld, a)
- }
- }
- function ab(a) {
- var b =
- this;
- this.o = a.o;
- this.vb = a.vb;
- this.U = a.S;
- this.f = t.za(ab.H);
- var c = t.ya(this.f);
- this.Ge = c.get("name");
- this.Uf = c.get("ping");
- try {
- c.get("flag").classList.add("f-" + a.ud)
- } catch (d) {}
- this.Ge.textContent = this.o;
- this.Uf.textContent = "" + this.vb;
- this.f.ondragstart = function(a) {
- a.dataTransfer.setData("player", K.ge(b.U))
- };
- this.f.oncontextmenu = function(a) {
- a.preventDefault();
- x.i(b.Ne, b.U)
- };
- this.pl(a.ra)
- }
- function bb(a, b) {
- var c = this;
- this.f = t.za(bb.H);
- var d = t.ya(this.f);
- this.Ge = d.get("name");
- this.mf = d.get("admin");
- this.ze =
- d.get("kick");
- this.Zc = d.get("close");
- this.mf.onclick = function() {
- ha.i(c.Lo, c.Hb, !c.Fk)
- };
- this.ze.onclick = function() {
- x.i(c.Jh, c.Hb)
- };
- this.Zc.onclick = function() {
- y.i(c.mb)
- };
- this.Hb = a.S;
- this.Xi(a.o);
- this.Wi(a.ra);
- this.mf.disabled = !b || 0 == this.Hb;
- this.ze.disabled = !b || 0 == this.Hb
- }
- function Jb() {
- this.bh = 0;
- this.Eo = 400;
- this.Pj = 64;
- this.vi = 32;
- this.ja = window.document.createElement("canvas");
- this.wf = window.document.createElement("canvas");
- this.f = window.document.createElement("div");
- this.wf.width = this.ja.width = this.vi;
- this.wf.height = this.ja.height = this.Pj;
- this.gh = this.wf.getContext("2d", null);
- this.c = this.ja.getContext("2d", null);
- this.c.fillStyle = "green";
- for (var a = [], b = 0, c = this.vi; b < c;) ++b, a.push(0);
- this.op = a;
- this.f.appendChild(this.wf);
- this.f.className = "graph"
- }
- function cb() {
- this.gb = null;
- var a = this;
- this.f = t.za(cb.H);
- var b = t.ya(this.f);
- b.get("cancel").onclick = function() {
- y.i(a.Hh)
- };
- this.Mh = b.get("pick");
- this.tj = b.get("delete");
- this.Ij = b.get("export");
- var c = b.get("list"),
- d = b.get("file");
- this.og();
- this.Mh.onclick = function() {
- null !=
- a.gb && a.gb.zd().then(function(b) {
- x.i(a.Sf, b)
- })
- };
- this.tj.onclick = function() {
- if (null != a.gb) {
- var b = a.gb.Xl;
- null != b && (a.gb.Ba.remove(), a.gb = null, b(), a.og())
- }
- };
- this.Ij.onclick = function() {
- null != a.gb && a.gb.zd().then(function(a) {
- Ca.oq(a.$d(), a.o + ".hbs")
- })
- };
- this.Ph(c);
- this.Yf = Ba.Hf(c);
- window.setTimeout(function() {
- a.Yf.update()
- }, 0);
- d.onchange = function() {
- var b = d.files;
- if (!(1 > b.length)) {
- var b = b.item(0),
- c = new FileReader;
- c.onload = function() {
- try {
- var b = c.result,
- d = new h;
- d.$j(b);
- x.i(a.Sf, d)
- } catch (k) {
- b = k instanceof
- r ? k.Na : k, b instanceof SyntaxError ? x.i(a.Kh, "SyntaxError in line: " + K.ge(b.lineNumber)) : b instanceof ub ? x.i(a.Kh, b.Go) : x.i(a.Kh, "Error loading stadium file.")
- }
- };
- c.readAsText(b)
- }
- }
- }
- function db() {
- var a = this;
- this.f = t.za(db.H);
- var b = t.ya(this.f);
- b.get("cancel").onclick = function() {
- x.i(a.mb, !1)
- };
- b.get("leave").onclick = function() {
- x.i(a.mb, !0)
- }
- }
- function eb(a) {
- var b = this;
- this.f = t.za(eb.H);
- var c = t.ya(this.f);
- this.Ge = c.get("title");
- this.Rh = c.get("reason");
- this.Jm = c.get("ban-btn");
- this.Lm = c.get("ban-text");
- this.ze =
- c.get("kick");
- this.Zc = c.get("close");
- this.Jm.onclick = function() {
- b.Ti(!b.bj)
- };
- this.Zc.onclick = function() {
- y.i(b.mb)
- };
- this.ze.onclick = function() {
- vb.i(b.Jh, b.Hb, b.Rh.value, b.bj)
- };
- this.Rh.onkeydown = function(a) {
- return a.stopPropagation()
- };
- this.Rh.maxLength = 100;
- this.Hb = a.S;
- this.Ge.textContent = "Kick " + a.o;
- this.Ti(!1)
- }
- function ia(a) {
- this.Ab = new fb;
- this.rd = !1;
- this.Wd = new Va;
- this.Ua = new Da;
- var b = this;
- this.Qa = new Wa(a);
- this.Ab.Hb = a;
- this.f = t.za(ia.H);
- a = t.ya(this.f);
- this.lh = a.get("gameplay-section");
- this.Pe = a.get("popups");
- this.Pe.style.display = "none";
- t.fe(a.get("chatbox"), this.Ua.f);
- t.fe(a.get("stats"), this.Wd.f);
- this.Gh = a.get("menu");
- this.Gh.onclick = function() {
- b.Ud(!b.rd);
- b.Gh.blur()
- };
- a.get("settings").onclick = function() {
- var a = new ba;
- a.mb = function() {
- b.$a(null)
- };
- b.$a(a.f)
- };
- this.lh.appendChild(this.Ab.f);
- this.Qa.Kd = function() {
- var a = new db;
- a.mb = function(a) {
- b.$a(null);
- a && y.i(b.Kd)
- };
- b.$a(a.f)
- };
- this.Qa.gp = function() {
- var a = new cb;
- a.Hh = function() {
- b.$a(null)
- };
- a.Sf = function(a) {
- x.i(b.Sf, a);
- b.$a(null)
- };
- a.Kh = function(a) {
- a = new T("Error loading stadium",
- a, ["Ok"]);
- a.Za = function() {
- b.$a(null)
- };
- b.$a(a.f)
- };
- b.$a(a.f)
- }
- }
- function Kb() {
- this.xa = 0;
- this.zj = this.Aj = !1;
- this.te = 0;
- this.f = window.document.createElement("div");
- this.f.className = "game-timer-view";
- this.f.appendChild(this.lp = this.Ed("OVERTIME!", "overtime"));
- this.f.appendChild(this.Io = this.Ed("0", "digit"));
- this.f.appendChild(this.Ho = this.Ed("0", "digit"));
- this.f.appendChild(this.Ed(":", null));
- this.f.appendChild(this.qq = this.Ed("0", "digit"));
- this.f.appendChild(this.pq = this.Ed("0", "digit"))
- }
- function fb() {
- this.Hb = -1;
- this.zb = new N;
- this.pc = new Kb;
- this.f = t.za(fb.H);
- var a = t.ya(this.f);
- this.Jb = new wb(a.get("red-score"), 0);
- this.Db = new wb(a.get("blue-score"), 0);
- t.fe(a.get("timer"), this.pc.f);
- t.fe(a.get("canvas"), this.zb.ja)
- }
- function gb(a, b) {
- var c = this;
- this.f = t.za(gb.H);
- var d = t.ya(this.f);
- this.Ko = d.get("ok");
- this.Ko.onclick = function() {
- y.i(c.Za)
- };
- this.bl = d.get("replay");
- var e = null != b;
- this.bl.hidden = !e;
- e && (this.bl.onclick = function() {
- ca.kl(b)
- });
- d.get("reason").textContent = a
- }
- function hb(a) {
- var b = this;
- this.f = t.za(hb.H);
- var c = t.ya(this.f);
- this.Wg = c.get("cancel");
- this.nj = c.get("create");
- this.He = c.get("name");
- this.zk = c.get("pass");
- this.Fh = c.get("max-pl");
- this.Ol = c.get("unlisted");
- this.He.maxLength = 40;
- this.He.value = a;
- this.He.oninput = function() {
- b.v()
- };
- this.zk.maxLength = 30;
- this.Ol.onclick = function() {
- b.Yi(!b.Pl)
- };
- this.Wg.onclick = function() {
- y.i(b.Hh)
- };
- this.nj.onclick = function() {
- if (b.wc()) {
- var a = b.zk.value;
- "" == a && (a = null);
- x.i(b.So, {
- name: b.He.value,
- password: a,
- Cr: b.Fh.selectedIndex + 2,
- Wr: b.Pl
- })
- }
- };
- for (a = 2; 21 > a;) c = window.document.createElement("option"),
- c.textContent = "" + a++, this.Fh.appendChild(c);
- this.Fh.selectedIndex = 10;
- this.Yi(!1);
- this.v()
- }
- function ib() {
- this.f = t.za(ib.H);
- var a = t.ya(this.f);
- this.Vb = a.get("log");
- this.Wg = a.get("cancel")
- }
- function jb(a) {
- function b() {
- c.wc() && null != c.qk && c.qk(c.yb.value)
- }
- var c = this;
- this.f = t.za(jb.H);
- var d = t.ya(this.f);
- this.yb = d.get("input");
- this.Ie = d.get("ok");
- this.yb.maxLength = 25;
- this.yb.value = a;
- this.yb.oninput = function() {
- c.v()
- };
- this.yb.onkeydown = function(a) {
- 13 == a.keyCode && b()
- };
- this.Ie.onclick = b;
- this.v()
- }
- function kb(a,
- b) {
- this.$i = [];
- this.Vp = /[#@][^\s@#]*$/;
- this.Eb = a;
- this.$o = b;
- a.hidden = !0
- }
- function Da() {
- function a() {
- null != b.tk && "" != b.cb.value && b.tk(b.cb.value);
- b.cb.value = "";
- b.cb.blur()
- }
- var b = this;
- this.f = t.za(Da.H);
- var c = t.ya(this.f);
- this.Vb = c.get("log");
- this.Yf = Ba.Hf(this.Vb);
- this.cb = c.get("input");
- this.cb.maxLength = 140;
- c.get("send").onclick = a;
- this.uc = new kb(c.get("autocompletebox"), function(a, c) {
- b.cb.value = a;
- b.cb.setSelectionRange(c, c)
- });
- this.cb.onkeydown = function(c) {
- switch (c.keyCode) {
- case 9:
- b.uc.Eb.hidden || (b.uc.zn(),
- c.preventDefault());
- break;
- case 13:
- a();
- break;
- case 27:
- b.uc.Eb.hidden ? (b.cb.value = "", b.cb.blur()) : b.uc.sh();
- break;
- case 38:
- b.uc.ij(-1);
- break;
- case 40:
- b.uc.ij(1)
- }
- c.stopPropagation()
- };
- this.cb.onfocus = function() {
- null != b.Mf && b.Mf(!0)
- };
- this.cb.onblur = function() {
- null != b.Mf && b.Mf(!1);
- b.uc.sh()
- };
- this.cb.oninput = function() {
- b.uc.Sm(b.cb.value, b.cb.selectionStart)
- }
- }
- function lb() {
- this.Ve = null;
- var a = this;
- this.f = t.za(lb.H);
- var b = t.ya(this.f);
- b.get("cancel").onclick = function() {
- y.i(a.mb)
- };
- this.Xg = b.get("change");
- this.Xg.disabled = !0;
- this.Xg.onclick = function() {
- null != a.Ve && a.ll(a.Ve.index)
- };
- b = b.get("list");
- this.Ph(b);
- var c = Ba.Hf(b);
- window.setTimeout(function() {
- c.update()
- }, 0)
- }
- function Ea() {
- this.Df = !1;
- this.o = "";
- this.Vg = 0;
- this.qf = "";
- this.hb = new ja;
- var a = window.document.createElement("canvas");
- a.width = 64;
- a.height = 64;
- this.nb = a.getContext("2d", null);
- this.aj = this.nb.createPattern(this.nb.canvas, "no-repeat");
- this.rn()
- }
- function Lb() {
- this.pc = 0;
- this.Ya = [];
- this.Mq = new P(["Time is", "Up!"], 16777215);
- this.Tp = new P(["Red is", "Victorious!"],
- 15035990);
- this.Sp = new P(["Red", "Scores!"], 15035990);
- this.Nm = new P(["Blue is", "Victorious!"], 625603);
- this.Mm = new P(["Blue", "Scores!"], 625603);
- this.np = new P(["Game", "Paused"], 16777215)
- }
- function P(a, b) {
- for (var c = [], d = 0; d < a.length;) c.push(this.Bo(a[d++], b));
- this.De = c
- }
- function N() {
- this.Mc = window.performance.now();
- this.mg = new Map;
- this.Sc = new Map;
- this.cg = 1;
- this.af = 35;
- this.Qe = 0;
- this.Re = 1.5;
- this.ab = new L(0, 0);
- this.Tj = !1;
- this.ed = new Lb;
- this.ja = window.document.createElement("canvas");
- this.ja.mozOpaque = !0;
- this.c =
- this.ja.getContext("2d", {
- alpha: !1
- });
- this.Un = this.c.createPattern(m.Tn, null);
- this.hn = this.c.createPattern(m.gn, null);
- this.fn = this.c.createPattern(m.en, null)
- }
- function z() {
- this.fd = 0;
- this.B = 32;
- this.h = -1;
- this.l = 1;
- this.a = new L(0, 0)
- }
- function C() {
- this.kg = this.lg = this.sa = null;
- this.pj = 0;
- this.V = this.P = this.Fd = null;
- this.vc = 0;
- this.l = 1;
- this.h = -1;
- this.B = 32;
- this.sb = 1 / 0;
- this.Va = !0;
- this.X = 0
- }
- function I() {
- this.B = 32;
- this.h = -1;
- this.l = 1;
- this.Oa = 0;
- this.sa = new L(0, 0)
- }
- function Fa() {
- this.Yb = -1;
- this.Xb = null;
- this.J = []
- }
- function X() {
- this.Yb = -1;
- this.Xb = null;
- this.yk = 0;
- this.h = this.B = -1;
- this.ej = 0;
- this.X = 16777215;
- this.Aa = .99;
- this.pa = 1;
- this.l = .5;
- this.la = 10;
- this.M = new L(0, 0);
- this.a = new L(0, 0)
- }
- function ka() {
- this.ia = 0
- }
- function Ka() {
- this.ia = 0
- }
- function La() {
- this.ia = 0
- }
- function Y() {
- this.tg = !1;
- this.ia = 0
- }
- function dc() {}
- function la() {
- this.ia = 0
- }
- function Ga() {
- this.ia = 0
- }
- function Ma() {
- this.ia = 0
- }
- function Na() {
- this.ia = 0
- }
- function ma() {
- this.ia = 0
- }
- function na() {
- this.ia = 0
- }
- function Oa() {
- this.ia = 0
- }
- function oa() {
- this.ia = 0
- }
- function Q() {
- this.ia = 0
- }
- function pa() {
- this.ia =
- 0
- }
- function qa() {
- this.ia = 0
- }
- function da() {
- this.ia = 0
- }
- function Pa() {
- this.ia = 0
- }
- function ra() {
- this.ia = 0
- }
- function ea() {
- this.sc = -1;
- this.km = null;
- this.$ = p.Ea;
- this.D = null;
- this.bc = !1;
- this.lb = this.S = 0;
- this.o = "Player";
- this.xg = this.vb = 0;
- this.ud = null;
- this.vd = !1;
- this.jb = null;
- this.Cb = 0;
- this.ra = !1
- }
- function fa() {
- this.Yb = -1;
- this.T = this.Xb = null;
- this.fb = this.xa = 3;
- this.Fc = !1;
- this.G = null;
- this.F = [];
- this.$b = "";
- this.T = h.mh()[0];
- this.hb = [null, new ja, new ja];
- this.hb[1].bb.push(p.ba.X);
- this.hb[2].bb.push(p.ta.X)
- }
- function p(a, b,
- c, d, e, f, g, n) {
- this.Tf = null;
- this.U = a;
- this.X = b;
- this.eh = c;
- this.no = d;
- this.o = e;
- this.tn = f;
- this.B = n;
- this.Gl = new ja;
- this.Gl.bb.push(b)
- }
- function ja() {
- this.Tc = 16777215;
- this.bb = []
- }
- function h() {
- this.C = [];
- this.O = [];
- this.ha = [];
- this.kc = [];
- this.J = [];
- this.Od = new xb;
- this.me = this.Dh();
- this.dh = 255;
- this.oe = this.Fe = 0;
- this.sf = !0
- }
- function ub(a) {
- this.Go = a
- }
- function xb() {
- this.pa = this.l = .5;
- this.Aa = .96;
- this.ke = .1;
- this.Ae = .07;
- this.Be = .96;
- this.Id = 5
- }
- function mb() {
- this.Xd = p.Ea;
- this.V = new L(0, 0);
- this.P = new L(0, 0)
- }
- function sa() {
- this.Yb = -1;
- this.Xb = null;
- this.Jb = this.Db = this.zc = this.Fa = 0;
- this.kd = new L(0, 0);
- this.Hd = p.ba;
- this.ec = this.nc = this.xb = 0;
- this.wa = new Fa;
- this.xa = 0;
- this.fb = 5;
- this.T = null
- }
- function ta() {
- this.h = this.B = -1;
- this.X = 16777215;
- this.Aa = .99;
- this.pa = 1;
- this.l = .5;
- this.la = 10;
- this.M = new L(0, 0);
- this.a = new L(0, 0)
- }
- function Mb(a, b) {
- this.Ig = null;
- this.Vr = .025;
- this.ce = this.Fg = this.jf = 0;
- this.wg = b.createGain();
- this.wg.gain.value = 0;
- var c = b.createBufferSource();
- c.buffer = a;
- c.connect(this.wg);
- c.loop = !0;
- c.start()
- }
- function Nb(a) {
- function b(b) {
- return new Promise(function(d,
- f) {
- var e = a.file(b).asArrayBuffer();
- return c.c.decodeAudioData(e, d, f)
- })
- }
- var c = this;
- this.c = new AudioContext;
- this.Gf = this.c.createGain();
- this.tl(m.s.zl.I() ? 1 : 0);
- this.Gf.connect(this.c.destination);
- this.An = Promise.all([b("sounds/chat.ogg").then(function(a) {
- return c.Um = a
- }), b("sounds/highlight.wav").then(function(a) {
- return c.eo = a
- }), b("sounds/kick.ogg").then(function(a) {
- return c.mo = a
- }), b("sounds/goal.ogg").then(function(a) {
- return c.Rn = a
- }), b("sounds/join.ogg").then(function(a) {
- return c.lo = a
- }), b("sounds/leave.ogg").then(function(a) {
- return c.oo =
- a
- }), b("sounds/crowd.ogg").then(function(a) {
- c.sn = a;
- c.oj = new Mb(c.sn, c.c);
- c.oj.connect(c.Gf)
- })])
- }
- function Z() {}
- function ua() {}
- function yb() {}
- function Ob(a) {
- this.Mc = window.performance.now();
- this.dd = this.le = 0;
- var b = this;
- this.va = a;
- this.j = new ia(a.lc);
- var c = new zb(this.j);
- c.Th(a.L);
- window.document.addEventListener("keydown", F(this, this.nd));
- window.document.addEventListener("keyup", F(this, this.od));
- window.requestAnimationFrame(F(this, this.Je));
- this.ih = window.setInterval(function() {
- b.j.Wd.sl(b.dd);
- b.dd = 0
- },
- 1E3);
- this.Ye(m.s.Nb.I());
- this.j.f.classList.add("replayer");
- this.Rd = new ga(a);
- this.Rd.ep = function() {
- c.Xq(a.L)
- };
- this.Rd.cp = function() {
- b.j.Ud(null == a.L.G);
- c.Th(a.L)
- };
- this.Rd.sk = function() {
- b.j.Ab.zb.jq()
- };
- this.j.f.appendChild(this.Rd.f)
- }
- function w() {}
- function v() {}
- function Pb() {}
- function m() {}
- function U() {
- this.Lc = new Map
- }
- function va(a, b, c, d) {
- this.o = a;
- this.gr = d;
- this.Bh = b;
- d = null;
- null != b && (d = b.getItem(a));
- this.Rl = c(d)
- }
- function Qb() {}
- function Rb() {
- function a(a) {
- return new va(a, e, function(a) {
- if (null == a) return null;
- try {
- return R.jh(a)
- } catch (n) {
- return null
- }
- }, function(a) {
- if (null == a) return null;
- try {
- return a.$d()
- } catch (n) {
- return null
- }
- })
- }
- function b(a) {
- return new va(a, e, function(a) {
- return null != a ? "0" != a : !0
- }, function(a) {
- return a ? "1" : "0"
- })
- }
- function c(a, b) {
- return new va(a, e, function(a) {
- var c = b;
- try {
- null != a && (c = K.parseInt(a))
- } catch (J) {}
- return c
- }, function(a) {
- return "" + a
- })
- }
- function d(a, b, c) {
- return new va(a, e, function(a) {
- return null == a ? b : aa.td(a, c)
- }, function(a) {
- return a
- })
- }
- var e = Qb.am();
- this.Nd = d("player_name", "", 25);
- this.Nb =
- c("view_mode", -1);
- this.hh = c("fps_limit", 0);
- this.Tg = d("avatar", null, 2);
- this.Mp = d("rctoken", null, 1024);
- this.Hl = b("team_colors");
- this.Qj = b("show_indicators");
- this.zl = b("sound_main");
- this.wl = b("sound_chat");
- this.yl = b("sound_highlight");
- this.xl = b("sound_crowd");
- this.Zi = d("player_auth_key", null, 1024);
- this.cd = c("extrapolation", 0);
- this.fl = function(a, b) {
- return new va(a, e, function(a) {
- var c = b;
- try {
- null != a && (c = parseFloat(a))
- } catch (J) {}
- return c
- }, function(a) {
- return "" + a
- })
- }("resolution_scale", 1);
- this.ve = a("geo");
- this.we = a("geo_override");
- this.Wf = function() {
- return new va("player_keys", e, function(a) {
- if (null == a) return U.rj();
- try {
- return U.jh(a)
- } catch (g) {
- return U.rj()
- }
- }, function(a) {
- try {
- return a.$d()
- } catch (g) {
- return null
- }
- })
- }()
- }
- function R() {
- this.rb = "";
- this.xc = this.yc = 0
- }
- function Qa() {
- this.Gd = this.Ef = 0;
- window.document.addEventListener("focusout", F(this, this.nk))
- }
- function zb(a, b) {
- this.th = null;
- this.j = a;
- null != b && (this.th = "@" + H.replace(b, " ", "_"))
- }
- function ca(a) {
- this.uf = null;
- this.Xj = this.ah = !1;
- this.Mc = window.performance.now();
- this.pd = null;
- this.le = 0;
- this.Vm = new nb(3, 1E3);
- this.lb = new Qa;
- this.eg = "Waiting for link";
- this.Zh = this.nl = !1;
- this.dd = 0;
- var b = this;
- this.Yg = new ob(a, function(a) {
- b.j.Ua.Gb(a)
- });
- this.va = a;
- a.L.vn = function(c) {
- b.nl != c && (b.nl = c, c = ra.na(c), a.ma(c))
- };
- this.j = new ia(a.lc);
- this.kh = new zb(this.j, a.L.ka(a.lc).o);
- this.kh.Th(a.L);
- this.j.Ua.tk = F(this, this.Po);
- this.j.Ua.Mf = F(this, this.Oo);
- window.document.addEventListener("keydown", F(this, this.nd));
- window.document.addEventListener("keyup", F(this, this.od));
- window.onbeforeunload =
- function() {
- return "Are you sure you want to leave the room?"
- };
- this.lb.Rf = function(b) {
- a.ma(b)
- };
- this.j.Qa.kp = function(b) {
- b = da.na(1, b);
- a.ma(b)
- };
- this.j.Qa.bp = function(b) {
- b = da.na(0, b);
- a.ma(b)
- };
- this.j.Sf = function(b) {
- b = oa.na(b);
- a.ma(b)
- };
- this.j.Qa.hp = function() {
- a.ma(new La)
- };
- this.j.Qa.ip = function() {
- a.ma(new Ka)
- };
- this.j.Qa.Vo = function() {
- b.Ll()
- };
- this.j.Qa.Qf = function(b, c) {
- var d = Q.na(b, c);
- a.ma(d)
- };
- this.j.Qa.Ld = F(this, this.iq);
- this.j.Qa.Mo = function() {
- a.ma(new Pa)
- };
- this.j.Qa.Yo = function() {
- ca.Lp(a)
- };
- this.j.Qa.jp =
- function(b) {
- b = na.na(b);
- a.ma(b)
- };
- this.j.Qa.Ne = function(c) {
- var d = a.L.ka(c);
- if (null != d) {
- var e = new bb(d, b.Zh);
- e.mb = function() {
- b.j.$a(null)
- };
- e.Lo = function(b, c) {
- var d = qa.na(b, c);
- a.ma(d)
- };
- e.Jh = function() {
- b.Hq(d)
- };
- b.j.$a(e.f, function() {
- e.v(a.L, b.Zh)
- })
- }
- };
- this.j.Qa.fp = function() {
- var a = new $a;
- a.mb = function() {
- b.j.$a(null)
- };
- b.j.$a(a.f, function() {
- a.zq(b.eg)
- })
- };
- this.j.Qa.Zo = function() {
- if (null == b.pd) b.Lq();
- else {
- var a = b.pd.stop();
- b.pd = null;
- ca.kl(a)
- }
- b.j.Qa.Dq(null != b.pd)
- };
- window.requestAnimationFrame(F(this, this.Je));
- this.ih = window.setInterval(function() {
- b.j.Wd.sl(b.dd);
- b.dd = 0
- }, 1E3);
- this.br = window.setInterval(function() {
- a.v()
- }, 50);
- this.Ye();
- var c = m.s.cd.I();
- if (0 != c) {
- var d = m.s.cd.I();
- a.rl(d);
- this.j.Ua.Gb("Extrapolation set to " + c + " msec")
- }
- }
- function Ha() {}
- function ob(a, b) {
- this.va = a;
- this.fa = b
- }
- function Ab() {}
- function nb(a, b) {
- this.fj = a;
- this.si = b;
- this.dc = a;
- this.Ce = window.performance.now()
- }
- function Sb() {}
- function vb() {}
- function ha() {}
- function x() {}
- function y() {}
- function M() {}
- function L(a, b) {
- this.x = a;
- this.y = b
- }
- function Bb(a) {
- this.Qb =
- a.slice()
- }
- function Cb(a, b, c) {
- this.ik = [];
- this.Ek = 5;
- this.qd = -1;
- this.Lf = this.Kb = this.yh = this.Jj = 0;
- S.call(this, b);
- a = new D(new DataView(a.buffer), !1);
- if (1212305970 != a.eb()) throw new r("");
- b = a.eb();
- if (c != b) throw new r(new Db(b));
- this.Te = a.eb();
- c = pako.inflateRaw(a.ob());
- this.Bc = new D(new DataView(c.buffer, c.byteOffset, c.byteLength));
- this.Op(this.Bc);
- c = this.Bc.ob();
- this.Bc = new D(new DataView(c.buffer, c.byteOffset, c.byteLength), !1);
- this.Wh();
- this.yh = window.performance.now();
- this.lc = -1
- }
- function Db(a) {
- this.sd =
- a
- }
- function Tb() {}
- function Ub(a) {
- this.Qi = new Map;
- this.Qn = new nb(100, 16);
- this.ag = !1;
- this.vb = 0;
- this.ga = a;
- a = u.ca(8);
- a.w(Math.random());
- this.pe = a.Mb()
- }
- function Eb(a) {
- this.cj = new Map;
- this.Bb = null;
- this.Jf = 32;
- this.qe = new Map;
- this.Sb = [];
- this.Yh = 4;
- this.Ym = 600;
- var b = this;
- S.call(this, a.state);
- this.Co = a.Fi;
- this.dr = a.version;
- this.Do = 1;
- this.Yj = this.lc = 0;
- this.ki = window.performance.now();
- this.Pc = new Ra(this.Co, a.iceServers, Tb.Wl, a.pm);
- this.Pc.mj = F(this, this.Xn);
- this.Pc.pk = function(a) {
- b.Uo(a)
- };
- this.Pc.Of = function(a) {
- x.i(b.Of,
- a)
- };
- this.Pc.Me = function(a, d) {
- null != b.Me && b.Me(a, d)
- }
- }
- function wa(a, b) {
- this.ei = [];
- this.Sh = [];
- this.Xf = new Ia;
- this.Jo = 1;
- this.ad = this.Jl = 0;
- this.pi = new Fb(50);
- this.Vf = new Fb(50);
- this.ym = 1E3;
- this.wj = "";
- var c = this;
- S.call(this, b.state);
- this.wh = b.Yr;
- this.se = b.qr;
- var d = null,
- d = function(e) {
- c.Xe(0);
- var f = u.ca();
- f.qc(b.version);
- f.Pb(b.password);
- c.gc = new pb(b.Fi, b.iceServers, a, Tb.Wl, f, b.pm);
- c.gc.Sg = e;
- c.gc.ld = function(a) {
- c.gc = null;
- c.ga = a;
- a.Pf = function(a) {
- a = new D(new DataView(a));
- c.Ep(a)
- };
- a.Ke = function() {
- 3 != c.ad &&
- x.i(c.Le, Gb.Kg("Connection closed"));
- c.da()
- };
- a = window.setTimeout(function() {
- x.i(c.Le, Gb.Kg("Game state timeout"));
- c.da()
- }, 1E4);
- c.Yd = a;
- c.Xe(2)
- };
- c.gc.uk = function() {
- c.Xe(1)
- };
- var g = !1;
- c.gc.lk = function() {
- return g = !0
- };
- c.gc.Qc = function(a) {
- if (!e && 1 == c.ad && g) y.i(c.ap), d(!0);
- else {
- var b = pb.Mn(a);
- switch (a.ub) {
- case 1:
- a = Gb.Mg(a.code);
- break;
- case 2:
- a = Gb.Jg;
- break;
- default:
- a = Gb.Kg(b)
- }
- x.i(c.Le, a);
- c.da(b)
- }
- }
- };
- d(null != b.nm && b.nm)
- }
- function S(a) {
- this.ri = new Ia;
- this.ae = this.Ub = 0;
- this.Td = new Ia;
- this.lc = this.Tb = this.cd = 0;
- this.tc =
- .06;
- this.Ng = 16.666666666666668;
- this.kf = 120;
- qb.call(this, a)
- }
- function xa() {}
- function rb() {}
- function Vb(a, b) {
- this.hm = 0;
- this.version = 1;
- this.Dg = 0;
- this.xd = u.ca(1E3);
- this.hf = u.ca(16384);
- var c = this;
- this.version = b;
- var d = this.Dg = a.R;
- this.Ei = a;
- a.L.aa(this.hf);
- a.Wb = function(b) {
- var e = a.R;
- c.hf.ib(e - d);
- d = e;
- c.hf.qc(b.oa);
- l.Ii(b, c.hf)
- };
- this.xd.qc(0);
- var e = this.Dg;
- a.L.ul(function(b) {
- var d = a.R;
- c.xd.ib(d - e);
- c.xd.u(b);
- c.hm++;
- e = d
- })
- }
- function Wb() {}
- function Fb(a) {
- this.Dr = a;
- this.Wa = []
- }
- function Xb() {}
- function Sa() {
- this.ia =
- 0
- }
- function qb(a) {
- this.R = 0;
- this.L = a
- }
- function Ia() {
- this.list = []
- }
- function l() {
- this.ia = 0
- }
- function ec() {}
- function sb() {}
- function t() {}
- function wb(a, b) {
- this.Ba = a;
- this.value = b;
- a.textContent = "" + b
- }
- function Ca() {}
- function fc() {}
- function Ba() {}
- function Ja() {}
- function G() {}
- function u(a, b) {
- null == b && (b = !1);
- this.m = a;
- this.Ia = b;
- this.a = 0
- }
- function D(a, b) {
- null == b && (b = !1);
- this.m = a;
- this.Ia = b;
- this.a = 0
- }
- function Hb(a) {
- this.Vc = null;
- this.Rp = 1E4;
- this.hd = !0;
- var b = this;
- a.kj();
- this.Ha = a.Ha;
- this.Ic = a.Ic;
- this.Vd = a.Vd;
- this.Vc = a.Vc;
- this.Il = window.performance.now();
- var c = null,
- c = function() {
- var a = b.Rp - b.Nq();
- 0 >= a ? b.da() : (window.clearTimeout(b.Kl), a = window.setTimeout(c, a + 1E3), b.Kl = a)
- };
- c();
- this.Ha.oniceconnectionstatechange = function() {
- var a = b.Ha.iceConnectionState;
- "closed" != a && "failed" != a || b.da()
- };
- a = 0;
- for (var d = this.Ic; a < d.length;) {
- var e = d[a];
- ++a;
- e.onmessage = function(a) {
- b.hd && (b.Il = window.performance.now(), null != b.Pf && b.Pf(a.data))
- };
- e.onclose = function() {
- b.da()
- }
- }
- }
- function gc() {}
- function Ra(a, b, c, d) {
- this.Ug = new Set;
- this.pf = new Set;
- this.dg = !1;
- this.Cc = null;
- this.U = "";
- this.mq = 5E4;
- this.lq = 1E4;
- this.$c = new Map;
- this.Jq = a;
- this.Bf = b;
- this.Tm = c;
- this.gg = d;
- null == this.gg && (this.gg = "");
- this.ii()
- }
- function Ta(a, b, c) {
- this.Vc = this.Yd = null;
- this.Vd = [];
- this.sj = 0;
- this.wk = !1;
- this.Af = [];
- this.Ic = [];
- var d = this;
- this.Ha = new RTCPeerConnection({
- iceServers: b
- }, Ta.kn);
- this.uh = new Promise(function(a) {
- d.fo = a
- });
- this.Ha.onicecandidate = function(a) {
- null == a.candidate ? d.fo(d.Af) : (a = a.candidate, null != d.Nf && d.Nf(a), d.Af.push(a))
- };
- for (b = 0; b < c.length;) this.pn(c[b++]);
- this.U =
- a
- }
- function pb(a, b, c, d, e, f) {
- this.Sg = this.$g = !1;
- var g = this;
- this.ga = new Ta(0, b, d);
- this.ga.Qc = function() {
- g.xe(Ib.sm)
- };
- this.ga.ld = function() {
- null != g.ld && g.ld(new Hb(g.ga));
- g.ga = null;
- g.lj()
- };
- this.ga.Ih = function(b) {
- g.wq = b;
- g.Y = new WebSocket(a + "client?id=" + c + (null == f ? "" : "&token=" + f));
- g.Y.binaryType = "arraybuffer";
- g.Y.onclose = function(a) {
- g.$g || g.xe(Ib.Mg(a.code))
- };
- g.Y.onerror = function() {
- g.$g || g.xe(Ib.Error)
- };
- g.Y.onmessage = F(g, g.rh);
- g.Y.onopen = function() {
- null != g.uk && g.uk();
- g.ga.li();
- g.ci(g.wq, g.ga.Af, e);
- g.ga.Nf =
- F(g, g.$h);
- g.ga.uh.then(function() {
- g.Dc(0, null)
- })
- }
- };
- this.ga.qn()
- }
- function Yb() {
- this.hash = 0
- }
- function aa() {}
- function H() {}
- function K() {}
- function Zb() {}
- function B() {}
- function $b(a, b) {
- this.r = new RegExp(a, b.split("u").join(""))
- }
- function ya() {
- return q.je(this, "")
- }
- function E(a, b) {
- var c = Object.create(a),
- d;
- for (d in b) c[d] = b[d];
- b.toString !== Object.prototype.toString && (c.toString = b.toString);
- return c
- }
- function F(a, b) {
- if (null == b) return null;
- null == b.Pg && (b.Pg = lc++);
- var c;
- null == a.Bi ? a.Bi = {} : c = a.Bi[b.Pg];
- null == c &&
- (c = b.bind(a), a.Bi[b.Pg] = c);
- return c
- }
- var tb = tb || {},
- V;
- $b.b = !0;
- $b.prototype = {
- match: function(a) {
- this.r.global && (this.r.lastIndex = 0);
- this.r.cc = this.r.exec(a);
- this.r.Eg = a;
- return null != this.r.cc
- },
- gm: function(a) {
- if (null != this.r.cc && 0 <= a && a < this.r.cc.length) return this.r.cc[a];
- throw new r("EReg::matched");
- },
- Br: function() {
- if (null == this.r.cc) throw new r("No string matched");
- return {
- Ji: this.r.cc.index,
- yr: this.r.cc[0].length
- }
- },
- Ar: function(a, b, c) {
- null == c && (c = -1);
- if (this.r.global) {
- this.r.lastIndex = b;
- this.r.cc = this.r.exec(0 >
- c ? a : B.substr(a, 0, b + c));
- if (b = null != this.r.cc) this.r.Eg = a;
- return b
- }
- if (c = this.match(0 > c ? B.substr(a, b, null) : B.substr(a, b, c))) this.r.Eg = a, this.r.cc.index += b;
- return c
- },
- g: $b
- };
- B.b = !0;
- B.yi = function(a, b) {
- var c = a.charCodeAt(b);
- if (c == c) return c
- };
- B.substr = function(a, b, c) {
- if (null == c) c = a.length;
- else if (0 > c)
- if (0 == b) c = a.length + c;
- else return "";
- return a.substr(b, c)
- };
- B.remove = function(a, b) {
- var c = a.indexOf(b);
- if (-1 == c) return !1;
- a.splice(c, 1);
- return !0
- };
- Math.b = !0;
- Zb.b = !0;
- Zb.Yl = function(a) {
- var b = [];
- if (null != a) {
- var c = Object.prototype.hasOwnProperty,
- d;
- for (d in a) "__id__" != d && "hx__closures__" != d && c.call(a, d) && b.push(d)
- }
- return b
- };
- K.b = !0;
- K.ge = function(a) {
- return q.je(a, "")
- };
- K.parseInt = function(a) {
- a = parseInt(a, !a || "0" != a[0] || "x" != a[1] && "X" != a[1] ? 10 : 16);
- return isNaN(a) ? null : a
- };
- H.b = !0;
- H.startsWith = function(a, b) {
- return a.length >= b.length ? B.substr(a, 0, b.length) == b : !1
- };
- H.xr = function(a, b) {
- var c = B.yi(a, b);
- return 8 < c && 14 > c ? !0 : 32 == c
- };
- H.Sr = function(a) {
- for (var b = a.length, c = 0; c < b && H.xr(a, b - c - 1);) ++c;
- return 0 < c ? B.substr(a, 0, b - c) : a
- };
- H.df = function(a) {
- var b, c = "";
- for (b = 2 - a.length; c.length < b;) c += "0";
- return c + (null == a ? "null" : "" + a)
- };
- H.replace = function(a, b, c) {
- return a.split(b).join(c)
- };
- H.yg = function(a, b) {
- for (var c = ""; c = "0123456789ABCDEF".charAt(a & 15) + c, a >>>= 4, 0 < a;);
- if (null != b)
- for (; c.length < b;) c = "0" + c;
- return c
- };
- aa.b = !0;
- aa.td = function(a, b) {
- return a.length <= b ? a : B.substr(a, 0, b)
- };
- aa.lr = function(a) {
- for (var b = "", c = 0, d = a.byteLength; c < d;) b += H.yg(a[c++], 2);
- return b
- };
- Yb.b = !0;
- Yb.prototype = {
- kr: function(a) {
- for (var b = 0, c = a.length; b < c;) this.hash += a[b++], this.hash += this.hash <<
- 10, this.hash ^= this.hash >>> 6
- },
- g: Yb
- };
- var Ib = tb["bas.basnet.FailReason"] = {
- lf: !0,
- Og: ["PeerFailed", "Rejected", "Cancelled", "Error"],
- sm: {
- ub: 0,
- qb: "bas.basnet.FailReason",
- toString: ya
- },
- Mg: (V = function(a) {
- return {
- ub: 1,
- code: a,
- qb: "bas.basnet.FailReason",
- toString: ya
- }
- }, V.ie = ["code"], V),
- Jg: {
- ub: 2,
- qb: "bas.basnet.FailReason",
- toString: ya
- },
- Error: {
- ub: 3,
- qb: "bas.basnet.FailReason",
- toString: ya
- }
- };
- pb.b = !0;
- pb.Mn = function(a) {
- switch (a.ub) {
- case 0:
- return "Failed";
- case 1:
- return jc.description(a.code);
- case 2:
- return "";
- case 3:
- return "Master connection error"
- }
- };
- pb.prototype = {
- Rm: function() {
- this.xe(Ib.Jg)
- },
- lj: function() {
- null != this.Y && (this.Y.onclose = null, this.Y.onmessage = null, this.Y.onerror = null, this.Y.onopen = null, this.Y.close(), this.Y = null);
- null != this.ga && (this.ga.da(), this.ga = null)
- },
- xe: function(a) {
- null != this.Qc && this.Qc(a);
- this.lj()
- },
- rh: function(a) {
- a = new D(new DataView(a.data));
- var b = a.K();
- 0 < a.m.byteLength - a.a && (a = new D(new DataView(pako.inflateRaw(a.ob()).buffer), !1));
- switch (b) {
- case 1:
- for (var b = a.mc(), c = a.Zf(), d = [], e = 0; e < c.length;) d.push(new RTCIceCandidate(c[e++]));
- this.qh(b, d, a);
- break;
- case 4:
- this.ph(new RTCIceCandidate(a.Zf()))
- }
- },
- qh: function(a, b) {
- var c = this;
- this.ga.li(this.Sg ? 1E4 : 4E3);
- this.$g = !0;
- null != this.lk && this.lk();
- this.ga.Ha.setRemoteDescription(new RTCSessionDescription({
- sdp: a,
- type: "answer"
- }), function() {
- for (var a = 0; a < b.length;) c.ga.Ha.addIceCandidate(b[a++])
- }, function() {
- c.xe(Ib.Error)
- })
- },
- ph: function(a) {
- this.ga.Ha.addIceCandidate(a)
- },
- Dc: function(a, b) {
- if (null != this.Y) {
- var c = u.ca(32, !1);
- c.u(a);
- null != b && c.Ob(pako.deflateRaw(b.Mb()));
- this.Y.send(c.Zd())
- }
- },
- ci: function(a, b, c) {
- var d = u.ca(32, !1);
- d.u(this.Sg ? 1 : 0);
- d.rc(a.sdp);
- d.qg(b);
- null != c && d.Ob(c.Mb());
- this.Dc(1, d)
- },
- $h: function(a) {
- var b = u.ca(32, !1);
- b.qg(a);
- this.Dc(4, b)
- },
- g: pb
- };
- Ta.b = !0;
- Ta.prototype = {
- li: function(a) {
- null == a && (a = 1E4);
- window.clearTimeout(this.Yd);
- this.Yd = window.setTimeout(F(this, this.bo), a)
- },
- on: function(a, b) {
- var c = this;
- this.uj(this.Ha.setRemoteDescription(a).then(function() {
- return c.Ha.createAnswer()
- }), b, 500)
- },
- qn: function() {
- this.uj(this.Ha.createOffer(), [], 1E3)
- },
- uj: function(a, b, c) {
- var d = this;
- a.then(function(a) {
- return d.Ha.setLocalDescription(a).then(function() {
- return a
- })
- }).then(function(a) {
- function e() {
- return a
- }
- for (var g = 0; g < b.length;) d.Ri(b[g++]);
- return ec.Pq(d.uh, c).then(e, e)
- }).then(function(a) {
- d.Ih(a)
- })["catch"](function() {
- d.zf()
- })
- },
- pn: function(a) {
- var b = this,
- c = {
- id: this.Ic.length,
- negotiated: !0,
- ordered: a.Hi
- };
- a.reliable || (c.maxRetransmits = 0);
- a = this.Ha.createDataChannel(a.name, c);
- a.binaryType = "arraybuffer";
- a.onopen = function() {
- for (var a = 0, c = b.Ic; a < c.length;)
- if ("open" != c[a++].readyState) return;
- null != b.ld && b.ld()
- };
- a.onclose = function() {
- b.zf()
- };
- a.onmessage = function() {
- b.zf()
- };
- this.Ic.push(a)
- },
- Ri: function(a) {
- var b = this;
- window.setTimeout(function() {
- return b.Ha.addIceCandidate(a)
- }, this.sj)
- },
- bo: function() {
- this.zf()
- },
- zf: function() {
- null != this.Qc && this.Qc();
- this.da()
- },
- da: function() {
- this.kj();
- this.Ha.close()
- },
- kj: function() {
- window.clearTimeout(this.Yd);
- this.Ih = this.ld = this.Nf = this.Qc = null;
- this.Ha.onicecandidate = null;
- this.Ha.ondatachannel = null;
- this.Ha.onsignalingstatechange = null;
- this.Ha.oniceconnectionstatechange =
- null;
- for (var a = 0, b = this.Ic; a < b.length;) {
- var c = b[a];
- ++a;
- c.onopen = null;
- c.onclose = null;
- c.onmessage = null
- }
- },
- g: Ta
- };
- var ac = tb["bas.basnet.ConnectionRequestResponse"] = {
- lf: !0,
- Og: ["Accept", "Reject"],
- rm: {
- ub: 0,
- qb: "bas.basnet.ConnectionRequestResponse",
- toString: ya
- },
- Lg: (V = function(a) {
- return {
- ub: 1,
- reason: a,
- qb: "bas.basnet.ConnectionRequestResponse",
- toString: ya
- }
- }, V.ie = ["reason"], V)
- };
- Ra.b = !0;
- Ra.Mj = function(a) {
- try {
- var b = gc.Oe(a.candidate);
- if ("srflx" == b.Vq) return b.io
- } catch (c) {}
- return null
- };
- Ra.prototype = {
- da: function() {
- window.clearTimeout(this.hl);
- window.clearTimeout(this.Sd);
- this.Sd = null;
- window.clearInterval(this.Dk);
- this.Y.onmessage = null;
- this.Y.onerror = null;
- this.Y.onclose = null;
- this.Y.onopen = null;
- this.Y.close();
- this.Y = null;
- this.Hj()
- },
- fi: function(a) {
- var b = this;
- if (null != this.Cc || null != a) {
- if (null != this.Cc && null != a && this.Cc.byteLength == a.byteLength) {
- for (var c = new Uint8Array(this.Cc), d = new Uint8Array(a), e = !1, f = 0, g = this.Cc.byteLength; f < g;) {
- var n = f++;
- if (c[n] != d[n]) {
- e = !0;
- break
- }
- }
- if (!e) return
- }
- this.Cc = a.slice(0);
- this.dg = !0;
- null != this.Y && 1 == this.Y.readyState &&
- null == this.Sd && (this.bi(), this.Sd = window.setTimeout(function() {
- b.Sd = null;
- 1 == b.Y.readyState && b.dg && b.bi()
- }, 1E4))
- }
- },
- ii: function(a) {
- function b(a) {
- a = a.sitekey;
- if (null == a) throw new r(null);
- null != d.Me && d.Me(a, function(a) {
- d.ii(a)
- })
- }
- function c(a) {
- var b = a.url;
- if (null == b) throw new r(null);
- a = a.token;
- if (null == a) throw new r(null);
- d.Y = new WebSocket(b + "?token=" + a);
- d.Y.binaryType = "arraybuffer";
- d.Y.onopen = function() {
- d.ao()
- };
- d.Y.onclose = function(a) {
- d.oh(4001 != a.code)
- };
- d.Y.onerror = function() {
- d.oh(!0)
- };
- d.Y.onmessage =
- F(d, d.rh)
- }
- null == a && (a = "");
- var d = this;
- M.wp(this.Jq, "token=" + this.gg + "&rcr=" + a, M.vm).then(function(a) {
- switch (a.action) {
- case "connect":
- c(a);
- break;
- case "recaptcha":
- b(a)
- }
- })["catch"](function() {
- d.oh(!0)
- })
- },
- ao: function() {
- var a = this;
- null != this.Cc && this.bi();
- this.Dk = window.setInterval(function() {
- a.ai()
- }, 4E4)
- },
- rh: function(a) {
- a = new D(new DataView(a.data), !1);
- switch (a.K()) {
- case 1:
- this.qh(a);
- break;
- case 4:
- this.ph(a);
- break;
- case 5:
- this.Wn(a);
- break;
- case 6:
- this.Zn(a)
- }
- },
- qh: function(a) {
- var b = a.eb(),
- c = aa.lr(a.ob(a.K())),
- d, e, f;
- try {
- a = new D(new DataView(pako.inflateRaw(a.ob()).buffer), !1);
- d = 0 != a.K();
- e = a.mc();
- for (var g = a.Zf(), n = [], k = 0; k < g.length;) n.push(new RTCIceCandidate(g[k++]));
- f = n
- } catch (J) {
- this.We(b, 0);
- return
- }
- this.$n(b, c, e, f, a, d)
- },
- $n: function(a, b, c, d, e, f) {
- var g = this;
- if (16 <= this.$c.size) this.We(a, 4104);
- else if (this.Ug.has(b)) this.We(a, 4102);
- else {
- for (var n = [], k = 0; k < d.length;) {
- var J = Ra.Mj(d[k++]);
- if (null != J) {
- if (this.pf.has(J)) {
- this.We(a, 4102);
- return
- }
- n.push(J)
- }
- }
- if (null != this.mj && (k = new D(e.m), k.a = e.a, e = this.mj(b, k),
- 1 == e.ub)) {
- this.We(a, e.reason);
- return
- }
- var h = new Ta(a, this.Bf, this.Tm);
- f && (h.sj = 2500);
- h.Vd = n;
- h.Vc = b;
- this.$c.set(a, h);
- h.Qc = function() {
- g.Dc(0, h, null);
- g.$c["delete"](h.U)
- };
- h.ld = function() {
- g.$c["delete"](h.U);
- g.Dc(0, h, null);
- null != g.pk && g.pk(new Hb(h))
- };
- h.Ih = function(a) {
- g.ci(h, a, h.Af, null);
- h.uh.then(function() {
- g.Dc(0, h, null)
- });
- h.Nf = function(a) {
- g.$h(h, a)
- }
- };
- h.li();
- h.on(new RTCSessionDescription({
- sdp: c,
- type: "offer"
- }), d)
- }
- },
- ph: function(a) {
- var b = a.eb(),
- c;
- try {
- a = new D(new DataView(pako.inflateRaw(a.ob()).buffer),
- !1), c = new RTCIceCandidate(a.Zf())
- } catch (d) {
- return
- }
- this.Vn(b, c)
- },
- Vn: function(a, b) {
- var c = this.$c.get(a);
- if (null != c) {
- var d = Ra.Mj(b);
- if (null != d && (c.Vd.push(d), this.pf.has(d))) return;
- c.Ri(b)
- }
- },
- Wn: function(a) {
- this.U = a.Qd(a.K());
- null != this.Of && this.Of(this.U)
- },
- Zn: function(a) {
- this.gg = a.Qd(a.m.byteLength - a.a)
- },
- Dc: function(a, b, c) {
- if (!b.wk) {
- 0 == a && (b.wk = !0);
- b = b.U;
- var d = u.ca(32, !1);
- d.u(a);
- d.pb(b);
- null != c && d.Ob(pako.deflateRaw(c.Mb()));
- this.Y.send(d.Zd())
- }
- },
- We: function(a, b) {
- var c = u.ca(16, !1);
- c.u(0);
- c.pb(a);
- c.qc(b);
- this.Y.send(c.Zd())
- },
- ai: function() {
- var a = u.ca(1, !1);
- a.u(8);
- this.Y.send(a.Zd())
- },
- bi: function() {
- this.dg = !1;
- var a = u.ca(256, !1);
- a.u(7);
- null != this.Cc && a.pg(this.Cc);
- this.Y.send(a.Zd())
- },
- ci: function(a, b, c, d) {
- var e = u.ca(32, !1);
- e.rc(b.sdp);
- e.qg(c);
- null != d && e.Ob(d.Mb());
- this.Dc(1, a, e)
- },
- $h: function(a, b) {
- var c = u.ca(32, !1);
- c.qg(b);
- this.Dc(4, a, c)
- },
- Hj: function() {
- for (var a = this.$c.values(), b = a.next(); !b.done;) {
- var c = b.value,
- b = a.next();
- c.da()
- }
- this.$c.clear()
- },
- oh: function(a) {
- var b = this;
- this.Hj();
- window.clearTimeout(this.Sd);
- this.Sd = null;
- this.dg = !1;
- window.clearInterval(this.Dk);
- window.clearTimeout(this.hl);
- a && (this.hl = window.setTimeout(function() {
- b.ii()
- }, this.lq + Math.random() * this.mq | 0))
- },
- Km: function(a) {
- for (var b = 0, c = a.Vd; b < c.length;) this.pf.add(c[b++]);
- null != a.Vc && this.Ug.add(a.Vc);
- return {
- cs: a.Vd,
- as: a.Vc
- }
- },
- Dd: function() {
- this.pf.clear();
- this.Ug.clear()
- },
- g: Ra
- };
- gc.b = !0;
- gc.Oe = function(a) {
- a = a.split(" ");
- if ("typ" != a[6]) throw new r(null);
- return {
- Vq: a[7],
- io: a[4]
- }
- };
- Hb.b = !0;
- Hb.prototype = {
- Nq: function() {
- return window.performance.now() -
- this.Il
- },
- Lb: function(a, b) {
- if (this.hd) {
- var c = this.Ic[a];
- if ("open" == c.readyState) {
- var d = b.ng();
- try {
- c.send(d)
- } catch (e) {
- window.console.log(e instanceof r ? e.Na : e)
- }
- }
- }
- },
- da: function() {
- window.clearTimeout(this.Kl);
- this.hd && (this.hd = !1, this.Ha.close(), null != this.Ke && this.Ke())
- },
- g: Hb
- };
- var jc = {
- b: !0,
- description: function(a) {
- switch (a) {
- case 4100:
- return "The room is full.";
- case 4101:
- return "Wrong password.";
- case 4102:
- return "You are banned from this room.";
- case 4103:
- return "Incompatible game version.";
- default:
- return "Connection closed (" +
- a + ")"
- }
- }
- };
- D.b = !0;
- D.un = function(a, b) {
- var c = a.getUint8(b),
- d, e, f, g, n, k = b;
- if (0 == (c & 128)) ++b;
- else if (192 == (c & 224)) d = a.getUint8(b + 1), c = (c & 31) << 6 | d & 63, b += 2;
- else if (224 == (c & 240)) d = a.getUint8(b + 1), e = a.getUint8(b + 2), c = (c & 15) << 12 | (d & 63) << 6 | e & 63, b += 3;
- else if (240 == (c & 248)) d = a.getUint8(b + 1), e = a.getUint8(b + 2), f = a.getUint8(b + 3), c = (c & 7) << 18 | (d & 63) << 12 | (e & 63) << 6 | f & 63, b += 4;
- else if (248 == (c & 252)) d = a.getUint8(b + 1), e = a.getUint8(b + 2), f = a.getUint8(b + 3), g = a.getUint8(b + 4), c = (c & 3) << 24 | (d & 63) << 18 | (e & 63) << 12 | (f & 63) << 6 | g & 63, b +=
- 5;
- else if (252 == (c & 254)) d = a.getUint8(b + 1), e = a.getUint8(b + 2), f = a.getUint8(b + 3), g = a.getUint8(b + 4), n = a.getUint8(b + 5), c = (c & 1) << 30 | (d & 63) << 24 | (e & 63) << 18 | (f & 63) << 12 | (g & 63) << 6 | n & 63, b += 6;
- else throw new r("Cannot decode UTF8 character at offset " + b + ": charCode (" + c + ") is invalid");
- return {
- "char": c,
- length: b - k
- }
- };
- D.prototype = {
- ob: function(a) {
- null == a && (a = this.m.byteLength - this.a);
- if (this.a + a > this.m.byteLength) throw new r("Read too much");
- var b = new Uint8Array(this.m.buffer, this.m.byteOffset + this.a, a);
- this.a += a;
- return b
- },
- Qk: function(a) {
- var b = this.ob(a);
- a = new ArrayBuffer(a);
- (new Uint8Array(a)).set(b);
- return a
- },
- Se: function() {
- return this.m.getInt8(this.a++)
- },
- K: function() {
- return this.m.getUint8(this.a++)
- },
- Np: function() {
- var a = this.m.getInt16(this.a, this.Ia);
- this.a += 2;
- return a
- },
- Zb: function() {
- var a = this.m.getUint16(this.a, this.Ia);
- this.a += 2;
- return a
- },
- W: function() {
- var a = this.m.getInt32(this.a, this.Ia);
- this.a += 4;
- return a
- },
- eb: function() {
- var a = this.m.getUint32(this.a, this.Ia);
- this.a += 4;
- return a
- },
- Rk: function() {
- var a = this.m.getFloat32(this.a,
- this.Ia);
- this.a += 4;
- return a
- },
- A: function() {
- var a = this.m.getFloat64(this.a, this.Ia);
- this.a += 8;
- return a
- },
- wb: function() {
- for (var a = this.a, b = 0, c, d = 0; c = this.m.getUint8(a + b), 5 > b && (d |= (c & 127) << 7 * b >>> 0), ++b, 0 != (c & 128););
- this.a += b;
- return d | 0
- },
- Qd: function(a) {
- var b = this.a,
- c, d = "";
- for (a = b + a; b < a;) c = D.un(this.m, b), b += c.length, d += String.fromCodePoint(c["char"]);
- if (b != a) throw new r("Actual string length differs from the specified: " + (b - a) + " bytes");
- this.a = b;
- return d
- },
- Ib: function() {
- var a = this.wb();
- return 0 >= a ? null : this.Qd(a -
- 1)
- },
- mc: function() {
- return this.Qd(this.wb())
- },
- Tk: function() {
- return this.Qd(this.K())
- },
- Zf: function() {
- var a = this.mc();
- return JSON.parse(a)
- },
- g: D
- };
- u.b = !0;
- u.ca = function(a, b) {
- null == b && (b = !1);
- null == a && (a = 16);
- return new u(new DataView(new ArrayBuffer(a)), b)
- };
- u.Dn = function(a, b, c) {
- var d = c;
- if (0 > a) throw new r("Cannot encode UTF8 character: charCode (" + a + ") is negative");
- if (128 > a) b.setUint8(c, a & 127), ++c;
- else if (2048 > a) b.setUint8(c, a >> 6 & 31 | 192), b.setUint8(c + 1, a & 63 | 128), c += 2;
- else if (65536 > a) b.setUint8(c, a >> 12 & 15 |
- 224), b.setUint8(c + 1, a >> 6 & 63 | 128), b.setUint8(c + 2, a & 63 | 128), c += 3;
- else if (2097152 > a) b.setUint8(c, a >> 18 & 7 | 240), b.setUint8(c + 1, a >> 12 & 63 | 128), b.setUint8(c + 2, a >> 6 & 63 | 128), b.setUint8(c + 3, a & 63 | 128), c += 4;
- else if (67108864 > a) b.setUint8(c, a >> 24 & 3 | 248), b.setUint8(c + 1, a >> 18 & 63 | 128), b.setUint8(c + 2, a >> 12 & 63 | 128), b.setUint8(c + 3, a >> 6 & 63 | 128), b.setUint8(c + 4, a & 63 | 128), c += 5;
- else if (-2147483648 > a) b.setUint8(c, a >> 30 & 1 | 252), b.setUint8(c + 1, a >> 24 & 63 | 128), b.setUint8(c + 2, a >> 18 & 63 | 128), b.setUint8(c + 3, a >> 12 & 63 | 128), b.setUint8(c +
- 4, a >> 6 & 63 | 128), b.setUint8(c + 5, a & 63 | 128), c += 6;
- else throw new r("Cannot encode UTF8 character: charCode (" + a + ") is too large (>= 0x80000000)");
- return c - d
- };
- u.Pm = function(a) {
- if (0 > a) throw new r("Cannot calculate length of UTF8 character: charCode (" + a + ") is negative");
- if (128 > a) return 1;
- if (2048 > a) return 2;
- if (65536 > a) return 3;
- if (2097152 > a) return 4;
- if (67108864 > a) return 5;
- if (-2147483648 > a) return 6;
- throw new r("Cannot calculate length of UTF8 character: charCode (" + a + ") is too large (>= 0x80000000)");
- };
- u.rf =
- function(a) {
- for (var b = 0, c = a.length, d = 0; d < c;) b += u.Pm(B.yi(a, d++));
- return b
- };
- u.Qm = function(a) {
- a >>>= 0;
- return 128 > a ? 1 : 16384 > a ? 2 : 2097152 > a ? 3 : 268435456 > a ? 4 : 5
- };
- u.prototype = {
- ng: function() {
- var a = new ArrayBuffer(this.a),
- b = new Uint8Array(this.m.buffer, this.m.byteOffset, this.a);
- (new Uint8Array(a)).set(b);
- return a
- },
- Mb: function() {
- return new Uint8Array(this.m.buffer, this.m.byteOffset, this.a)
- },
- Zd: function() {
- return new DataView(this.m.buffer, this.m.byteOffset, this.a)
- },
- Sq: function() {
- return new D(this.Zd(), this.Ia)
- },
- ic: function(a) {
- this.m.byteLength < a && this.kq(2 * this.m.byteLength >= a ? 2 * this.m.byteLength : a)
- },
- kq: function(a) {
- if (1 > a) throw new r("Can't resize buffer to a capacity lower than 1");
- if (this.m.byteLength < a) {
- var b = new Uint8Array(this.m.buffer);
- a = new ArrayBuffer(a);
- (new Uint8Array(a)).set(b);
- this.m = new DataView(a)
- }
- },
- u: function(a) {
- var b = this.a++;
- this.ic(this.a);
- this.m.setUint8(b, a)
- },
- fr: function(a) {
- var b = this.a;
- this.a += 2;
- this.ic(this.a);
- this.m.setInt16(b, a, this.Ia)
- },
- qc: function(a) {
- var b = this.a;
- this.a += 2;
- this.ic(this.a);
- this.m.setUint16(b, a, this.Ia)
- },
- Z: function(a) {
- var b = this.a;
- this.a += 4;
- this.ic(this.a);
- this.m.setInt32(b, a, this.Ia)
- },
- pb: function(a) {
- var b = this.a;
- this.a += 4;
- this.ic(this.a);
- this.m.setUint32(b, a, this.Ia)
- },
- Sl: function(a) {
- var b = this.a;
- this.a += 4;
- this.ic(this.a);
- this.m.setFloat32(b, a, this.Ia)
- },
- w: function(a) {
- var b = this.a;
- this.a += 8;
- this.ic(this.a);
- this.m.setFloat64(b, a, this.Ia)
- },
- Ob: function(a) {
- var b = this.a;
- this.a += a.byteLength;
- this.ic(this.a);
- (new Uint8Array(this.m.buffer, this.m.byteOffset, this.m.byteLength)).set(a,
- b)
- },
- pg: function(a) {
- this.Ob(new Uint8Array(a))
- },
- rc: function(a) {
- this.ib(u.rf(a));
- this.rg(a)
- },
- Pb: function(a) {
- null == a ? this.ib(0) : (this.ib(u.rf(a) + 1), this.rg(a))
- },
- Tl: function(a) {
- var b = u.rf(a);
- if (255 < b) throw new r(null);
- this.u(b);
- this.rg(a)
- },
- qg: function(a) {
- this.rc(JSON.stringify(a))
- },
- rg: function(a) {
- var b = this.a;
- this.ic(b + u.rf(a));
- for (var c = a.length, d = 0; d < c;) b += u.Dn(B.yi(a, d++), this.m, b);
- this.a = b
- },
- ib: function(a) {
- var b = this.a;
- a >>>= 0;
- this.ic(b + u.Qm(a));
- this.m.setUint8(b, a | 128);
- 128 <= a ? (this.m.setUint8(b + 1,
- a >> 7 | 128), 16384 <= a ? (this.m.setUint8(b + 2, a >> 14 | 128), 2097152 <= a ? (this.m.setUint8(b + 3, a >> 21 | 128), 268435456 <= a ? (this.m.setUint8(b + 4, a >> 28 & 127), a = 5) : (this.m.setUint8(b + 3, this.m.getUint8(b + 3) & 127), a = 4)) : (this.m.setUint8(b + 2, this.m.getUint8(b + 2) & 127), a = 3)) : (this.m.setUint8(b + 1, this.m.getUint8(b + 1) & 127), a = 2)) : (this.m.setUint8(b, this.m.getUint8(b) & 127), a = 1);
- this.a += a
- },
- g: u
- };
- G.b = !0;
- G.Hn = function() {
- try {
- return window.crypto.subtle.generateKey(G.Rg, !0, ["sign", "verify"]).then(function(a) {
- var b = a.privateKey;
- return window.crypto.subtle.exportKey("jwk",
- b).then(function(a) {
- var c = a.y,
- e = a.d,
- f = new G;
- f.wi = a.x;
- f.xi = c;
- f.qj = e;
- f.Ok = b;
- return f
- })
- })
- } catch (a) {
- return Promise.reject(a instanceof r ? a.Na : a)
- }
- };
- G.Gn = function(a) {
- a = a.split(".");
- if (4 != a.length || "idkey" != a[0]) return Promise.reject("Invalid id format");
- var b = a[1],
- c = a[2],
- d = a[3];
- return G.jr(b, c, d).then(function(a) {
- var e = new G;
- e.wi = b;
- e.xi = c;
- e.qj = d;
- e.Ok = a;
- return e
- })
- };
- G.cr = function(a, b) {
- try {
- var c = new D(new DataView(a.buffer, a.byteOffset, a.byteLength), !1);
- c.K();
- var d = c.ob(c.Zb()),
- e = c.ob(),
- f = new D(new DataView(d.buffer,
- d.byteOffset, d.byteLength), !1),
- g = f.mc(),
- n = f.mc(),
- k = f.ob();
- if (k.byteLength != b.byteLength) return Promise.reject(null);
- for (var c = 0, h = k.byteLength; c < h;) {
- var l = c++;
- if (k[l] != b[l]) return Promise.reject(null)
- }
- return G.ir(g, n).then(function(a) {
- return window.crypto.subtle.verify(G.vl, a, e, d)
- }).then(function(a) {
- if (!a) throw new r(null);
- return g
- })
- } catch (cc) {
- return Promise.reject(cc instanceof r ? cc.Na : cc)
- }
- };
- G.jr = function(a, b, c) {
- try {
- return window.crypto.subtle.importKey("jwk", {
- crv: "P-256",
- ext: !0,
- key_ops: ["sign"],
- kty: "EC",
- d: c,
- x: a,
- y: b
- }, G.Rg, !0, ["sign"])
- } catch (d) {
- return Promise.reject(d instanceof r ? d.Na : d)
- }
- };
- G.ir = function(a, b) {
- try {
- return window.crypto.subtle.importKey("jwk", {
- crv: "P-256",
- ext: !0,
- key_ops: ["verify"],
- kty: "EC",
- x: a,
- y: b
- }, G.Rg, !0, ["verify"])
- } catch (c) {
- return Promise.reject(c instanceof r ? c.Na : c)
- }
- };
- G.prototype = {
- Uq: function() {
- return "idkey." + this.wi + "." + this.xi + "." + this.qj
- },
- Iq: function(a) {
- try {
- var b = u.ca(1024);
- b.u(1);
- var c = b.a;
- b.qc(0);
- var d = b.a;
- b.rc(this.wi);
- b.rc(this.xi);
- b.Ob(a);
- var e = b.a - d;
- b.m.setUint16(c,
- e, b.Ia);
- var f = new Uint8Array(b.m.buffer, b.m.byteOffset + d, e);
- return window.crypto.subtle.sign(G.vl, this.Ok, f).then(function(a) {
- b.pg(a);
- return b.Mb()
- })
- } catch (g) {
- return Promise.reject(g instanceof r ? g.Na : g)
- }
- },
- g: G
- };
- Ja.b = !0;
- Ja.qo = function() {
- if (null != Ja.Qh) return Ja.Qh;
- Ja.Qh = new Promise(function(a, b) {
- var c = window.grecaptcha;
- null != c ? a(c) : (c = window.document.createElement("script"), c.src = "https://www.google.com/recaptcha/api.js?onload=___recaptchaload&render=explicit", window.document.head.appendChild(c), window.___recaptchaload =
- function() {
- a(window.grecaptcha)
- }, c.onerror = function() {
- b(null)
- })
- });
- return Ja.Qh
- };
- Ba.b = !0;
- Ba.Hf = function(a) {
- return new PerfectScrollbar(a, {
- handlers: Ba.co
- })
- };
- fc.b = !0;
- fc.Fr = function() {
- var a = window;
- a.RTCPeerConnection = a.webkitRTCPeerConnection || a.mozRTCPeerConnection || a.RTCPeerConnection;
- a.RTCIceCandidate = a.webkitRTCIceCandidate || a.mozRTCIceCandidate || a.RTCIceCandidate;
- a.RTCSessionDescription = a.webkitRTCSessionDescription || a.mozRTCSessionDescription || a.RTCSessionDescription;
- var b = new RTCPeerConnection({
- iceServers: []
- });
- try {
- b.createAnswer()["catch"](function() {})
- } catch (e) {
- var a = a.RTCPeerConnection.prototype,
- c = a.createOffer,
- d = a.createAnswer;
- a.createOffer = function(a) {
- var b = this;
- return new Promise(function(d, e) {
- c.call(b, d, e, a)
- })
- };
- a.createAnswer = function(a) {
- var b = this;
- return new Promise(function(c, e) {
- d.call(b, c, e, a)
- })
- }
- }
- };
- Ca.b = !0;
- Ca.nq = function(a, b) {
- Ca.jl(new Blob([a], {
- type: "octet/stream"
- }), b)
- };
- Ca.oq = function(a, b) {
- Ca.jl(new Blob([a], {
- type: "text/plain"
- }), b)
- };
- Ca.jl = function(a, b) {
- var c = window.document.createElement("a");
- c.style.display = "display: none";
- window.document.body.appendChild(c);
- var d = URL.createObjectURL(a);
- c.href = d;
- c.download = b;
- c.click();
- URL.revokeObjectURL(d);
- c.remove()
- };
- wb.b = !0;
- wb.prototype = {
- set: function(a) {
- this.value != a && (this.value = a, this.Ba.textContent = "" + this.value)
- },
- g: wb
- };
- t.b = !0;
- t.ya = function(a) {
- var b = new Map,
- c = 0;
- for (a = a.querySelectorAll("[data-hook]"); c < a.length;) {
- var d = a[c++];
- b.set(d.getAttribute("data-hook"), d)
- }
- return b
- };
- t.za = function(a, b) {
- null == b && (b = "div");
- var c = window.document.createElement(b);
- c.innerHTML = a;
- return c.firstElementChild
- };
- t.fe = function(a, b) {
- a.parentElement.replaceChild(b, a)
- };
- t.gf = function(a) {
- for (var b = a.firstChild; null != b;) a.removeChild(b), b = a.firstChild
- };
- sb.b = !0;
- sb.Gg = function(a) {
- return new Promise(function(b, c) {
- a.onsuccess = function() {
- b(a.result)
- };
- a.onerror = c
- })
- };
- ec.b = !0;
- ec.Pq = function(a, b) {
- return new Promise(function(c, d) {
- var e = window.setTimeout(function() {
- d("Timed out")
- }, b);
- a.then(function(a) {
- window.clearTimeout(e);
- c(a)
- }, function(a) {
- window.clearTimeout(e);
- d(a)
- })
- })
- };
- l.b = !0;
- l.Sa = function(a) {
- null == a.Ka && (a.Ka = !0);
- null == a.La && (a.La = !0);
- return a
- };
- l.Ta = function(a) {
- a.zm = l.bf;
- if (null == a.Ja) throw new r("Class doesn't have a config");
- a.prototype.cf = a.Ja;
- l.bm.set(l.bf, a);
- l.bf++
- };
- l.Ii = function(a, b) {
- var c = (null == a ? null : q.Zl(a)).zm;
- if (null == c) throw new r("Tried to pack unregistered action");
- b.u(c);
- a.Ca(b)
- };
- l.Hg = function(a) {
- var b = a.K(),
- b = Object.create(l.bm.get(b).prototype);
- b.ia = 0;
- b.kb = 0;
- b.Da(a);
- return b
- };
- l.prototype = {
- jm: function() {
- return !0
- },
- apply: function() {
- throw new r("missing implementation");
- },
- Da: function() {
- throw new r("missing implementation");
- },
- Ca: function() {
- throw new r("missing implementation");
- },
- g: l
- };
- Ia.b = !0;
- Ia.Er = function(a, b, c) {
- if (0 == a.length)
- for (a = 0; a < b.length;) c.push(b[a++]);
- else if (0 == b.length)
- for (b = 0; b < a.length;) c.push(a[b++]);
- else
- for (var d = 0, e = a.length, f = 0, g = b.length;;) {
- var n = a[d],
- k = b[f];
- if (n.kb <= k.kb) {
- if (c.push(n), ++d, d >= e) {
- for (; f < g;) c.push(b[f++]);
- break
- }
- } else if (c.push(k), ++f, f >= g) {
- for (; d < e;) c.push(a[d++]);
- break
- }
- }
- };
- Ia.prototype = {
- cm: function(a) {
- for (var b = 0, c = a.kb, d = a.ia,
- e = 0, f = this.list; e < f.length;) {
- var g = f[e];
- ++e;
- var n = g.kb;
- if (n > c) break;
- if (n == c) {
- g = g.ia;
- if (g > d) break;
- g == d && ++d
- }++b
- }
- a.ia = d;
- this.list.splice(b, 0, a)
- },
- Or: function(a) {
- for (var b = 0, c = 0, d = this.list; c < d.length && !(d[c++].kb >= a);) ++b;
- this.list.splice(0, b)
- },
- nr: function(a, b) {
- for (var c = this.list; 0 < c.length;) c.pop();
- Ia.Er(a.list, b.list, this.list)
- },
- Pr: function(a) {
- for (var b = 0, c = this.list, d = 0, e = c.length; d < e;) {
- var f = c[d++];
- f.be != a && (c[b] = f, ++b)
- }
- for (; c.length > b;) c.pop()
- },
- or: function(a) {
- for (var b = 0, c = 0, d = this.list; c < d.length &&
- !(d[c++].kb >= a);) ++b;
- return b
- },
- g: Ia
- };
- qb.b = !0;
- qb.prototype = {
- g: qb
- };
- Sa.b = !0;
- Sa.ua = l;
- Sa.prototype = E(l.prototype, {
- apply: function(a) {
- a.dn(this.ug)
- },
- Ca: function(a) {
- a.ib(this.ug.byteLength);
- a.pg(this.ug)
- },
- Da: function(a) {
- this.ug = a.Qk(a.wb())
- },
- g: Sa
- });
- Xb.b = !0;
- Xb.prototype = {
- g: Xb
- };
- Fb.b = !0;
- Fb.prototype = {
- add: function(a) {
- for (var b = this.Wa.length, c = 0, d = this.Ad = 0; d < b;) {
- var e = d++,
- f = this.Wa[e];
- f.index++;
- f.weight *= .97;
- this.Wa[c].index < f.index && (c = e);
- this.Ad += f.weight
- }
- b >= this.Dr ? (b = this.Wa[c], this.Ad -= b.weight, this.Wa.splice(c,
- 1)) : b = new Wb;
- b.value = a;
- b.weight = 1;
- b.index = 0;
- this.Ad += b.weight;
- for (a = 0; a < this.Wa.length && this.Wa[a].value <= b.value;) ++a;
- this.Wa.splice(a, 0, b)
- },
- Cg: function(a) {
- if (0 == this.Wa.length) return 0;
- if (1 == this.Wa.length) return this.Wa[0].value;
- a *= this.Ad;
- for (var b = this.Wa[0].weight, c = 0; c < this.Wa.length - 1 && !(b >= a);) ++c, b += this.Wa[c].weight;
- return this.Wa[c].value
- },
- max: function() {
- return 0 == this.Wa.length ? 0 : this.Wa[this.Wa.length - 1].value
- },
- g: Fb
- };
- Wb.b = !0;
- Wb.prototype = {
- g: Wb
- };
- Vb.b = !0;
- Vb.prototype = {
- stop: function() {
- this.Ei.Wb =
- null;
- this.Ei.L.ul(null);
- this.xd.m.setUint16(0, this.hm, this.xd.Ia);
- this.xd.Ob(this.hf.Mb());
- var a = pako.deflateRaw(this.xd.Mb()),
- b = u.ca(a.byteLength + 32);
- b.rg("HBR2");
- b.pb(this.version);
- b.pb(this.Ei.R - this.Dg);
- b.Ob(a);
- return b.Mb()
- },
- g: Vb
- };
- rb.b = !0;
- xa.b = !0;
- S.b = !0;
- S.ua = qb;
- S.prototype = E(qb.prototype, {
- ma: function() {
- throw new r("missing implementation");
- },
- yf: function() {
- throw new r("missing implementation");
- },
- v: function() {
- throw new r("missing implementation");
- },
- Si: function(a) {
- for (var b = this.Td.list, c = 0, d = b.length,
- e = 0; e < a;) {
- for (++e; c < d;) {
- var f = b[c];
- if (f.kb != this.R) break;
- f.apply(this.L);
- null != this.Wb && this.Wb(f);
- this.Ub++;
- ++c
- }
- this.L.v(1);
- this.ae += this.Ub;
- this.Ub = 0;
- this.R++
- }
- for (; c < d;) {
- a = b[c];
- if (a.kb != this.R || a.ia != this.Ub) break;
- a.apply(this.L);
- null != this.Wb && this.Wb(a);
- this.Ub++;
- ++c
- }
- b.splice(0, c)
- },
- fg: function(a) {
- a.kb == this.R && a.ia <= this.Ub ? (a.ia = this.Ub++, a.apply(this.L), null != this.Wb && this.Wb(a)) : this.Td.cm(a)
- },
- Nj: function(a, b) {
- if (0 >= a) return this.L;
- a > this.kf && (a = this.kf);
- xa.sc++;
- var c = this.L.jc(),
- d;
- null != b ?
- (this.ri.nr(this.Td, b), d = this.ri) : d = this.Td;
- d = d.list;
- for (var e = 0, f = d.length, g = this.R, n = a | 0, k = g + n; g <= k;) {
- for (; e < f;) {
- var h = d[e];
- if (h.kb > g) break;
- h.cf.La && h.apply(c);
- ++e
- }
- c.v(g != k ? 1 : a - n);
- ++g
- }
- for (d = this.ri.list; 0 < d.length;) d.pop();
- return c
- },
- xq: function(a) {
- 300 < a && (a = 300);
- 0 > a && (a = 0);
- this.Tb = this.tc * a | 0
- },
- rl: function(a) {
- this.cd = this.tc * (-200 > a ? -200 : 200 < a ? 200 : a)
- },
- g: S
- });
- var Gb = tb["bas.marf.net.ConnFailReason"] = {
- lf: !0,
- Og: ["Cancelled", "Rejected", "Other"],
- Jg: {
- ub: 0,
- qb: "bas.marf.net.ConnFailReason",
- toString: ya
- },
- Mg: (V =
- function(a) {
- return {
- ub: 1,
- reason: a,
- qb: "bas.marf.net.ConnFailReason",
- toString: ya
- }
- }, V.ie = ["reason"], V),
- Kg: (V = function(a) {
- return {
- ub: 2,
- description: a,
- qb: "bas.marf.net.ConnFailReason",
- toString: ya
- }
- }, V.ie = ["description"], V)
- };
- wa.b = !0;
- wa.Zg = function(a) {
- switch (a.ub) {
- case 0:
- return "Cancelled";
- case 1:
- return jc.description(a.reason);
- case 2:
- return a.description
- }
- };
- wa.ua = S;
- wa.prototype = E(S.prototype, {
- da: function(a) {
- null != this.gc && (this.gc.Qc = null, this.gc.Rm(), this.gc = null);
- window.clearTimeout(this.Yd);
- null != this.ga &&
- (this.ga.Ke = null, this.ga.da(), this.ga = null);
- this.wj = null == a ? "Connection closed" : a;
- this.Xe(4)
- },
- Xe: function(a) {
- this.ad != a && (this.ad = a, null != this.md && this.md(a))
- },
- hd: function() {
- return 3 == this.ad
- },
- v: function() {
- this.hd() && window.performance.now() - this.Jl > this.ym && this.ai();
- this.Kc = window.performance.now() * this.tc + this.pi.Cg(.5) - this.R;
- this.gj()
- },
- yf: function() {
- return this.hd() ? (0 > this.Tb && (this.Tb = 0), this.Nj(window.performance.now() * this.tc + this.pi.Cg(.5) - this.R + this.Tb + this.cd, this.Xf)) : this.L
- },
- gj: function() {
- 0 >
- this.Kc && (this.Kc = 0);
- this.Kc > this.kf && (this.Kc = this.kf)
- },
- Ep: function(a) {
- switch (a.K()) {
- case 0:
- this.Bp(a);
- break;
- case 1:
- this.Ap(a);
- break;
- case 2:
- this.xp(a);
- break;
- case 3:
- this.Gp(a);
- break;
- case 4:
- this.Dp(a);
- break;
- case 5:
- this.zp(a);
- break;
- case 6:
- this.Fp(a)
- }
- },
- Bp: function(a) {
- var b = this;
- a = a.ob(a.wb());
- var c = Promise.resolve(null);
- null != this.se && (c = this.se.Iq(a));
- c["catch"](function() {
- return null
- }).then(function(a) {
- b.vq(a)
- })
- },
- Ap: function(a) {
- a = pako.inflateRaw(a.ob());
- a = new D(new DataView(a.buffer, a.byteOffset, a.byteLength));
- this.lc = a.Zb();
- this.R = a.eb();
- this.ae = a.eb();
- this.Ub = a.wb();
- this.Kc = 10;
- for (this.L.ea(a); 0 < a.m.byteLength - a.a;) this.fg(this.Ql(a));
- window.clearTimeout(this.Yd);
- this.Xe(3)
- },
- vq: function(a) {
- var b = u.ca();
- b.u(0);
- null != a ? (b.ib(a.byteLength), b.Ob(a)) : b.ib(0);
- b.ib(this.wh.byteLength);
- b.pg(this.wh);
- this.Lb(b);
- this.wh = null
- },
- Lb: function(a, b) {
- null == b && (b = 0);
- this.ga.Lb(b, a)
- },
- Ql: function(a) {
- var b = a.eb(),
- c = a.wb(),
- d = a.Zb(),
- e = a.eb();
- a = l.Hg(a);
- a.oa = d;
- a.be = e;
- a.kb = b;
- a.ia = c;
- return a
- },
- xp: function(a) {
- a = this.Ql(a);
- this.fg(a);
- a.oa == this.lc && this.Xf.Pr(a.be);
- this.Pk()
- },
- Fp: function(a) {
- a = l.Hg(a);
- a.oa = 0;
- a.be = 0;
- a.apply(this.L);
- null != this.Wb && this.Wb(a)
- },
- Gp: function(a) {
- var b = a.eb();
- a = a.eb();
- this.Sh.push({
- frame: b,
- bf: a
- });
- this.Pk()
- },
- Pk: function() {
- if (3 == this.ad) {
- for (var a = 0, b = this.Sh; a < b.length;) {
- var c = b[a];
- ++a;
- c.frame <= this.R || c.bf == this.ae + this.Ub + this.Td.or(c.frame) && this.Gm(c.frame - this.R)
- }
- for (var a = 0, b = this.Sh, c = 0, d = b.length; c < d;) {
- var e = b[c++];
- e.frame > this.R && (b[a] = e, ++a)
- }
- for (; b.length > a;) b.pop();
- this.Xf.Or(this.R)
- }
- },
- zp: function(a) {
- var b =
- 0 != a.K(),
- c = a.mc(),
- d = "";
- 0 < a.m.byteLength - a.a && (d = a.mc());
- a = b ? "You were banned" : "You were kicked";
- "" != d && (a += " by " + d);
- "" != c && (a += " (" + c + ")");
- this.da(a)
- },
- Dp: function(a) {
- var b = a.A();
- a = a.A();
- var c = window.performance.now() - a;
- this.pi.add(b - a * this.tc);
- this.Vf.add(c);
- for (var d = b = 0, e = this.ei; d < e.length;) {
- var f = e[d];
- ++d;
- if (f > a) break;
- f < a ? x.i(this.rk, -1) : x.i(this.rk, c);
- ++b
- }
- this.ei.splice(0, b)
- },
- ai: function() {
- var a = window.performance.now();
- this.Jl = a;
- this.ei.push(a);
- var b = this.Vf.Cg(.5) | 0,
- c = u.ca();
- c.u(2);
- c.w(a);
- c.ib(b);
- this.Lb(c, 2)
- },
- Gm: function(a) {
- this.Si(a);
- this.Kc -= a;
- this.gj()
- },
- ma: function(a) {
- if (3 == this.ad) {
- var b = this.Jo++,
- c = 0;
- 0 > this.Tb && (this.Tb = 0);
- a.cf.Ka && (c = this.R + (this.Kc | 0) + this.Tb);
- var d = u.ca();
- d.u(1);
- d.pb(c);
- d.pb(b);
- l.Ii(a, d);
- this.Lb(d);
- a.cf.La && (a.be = b, a.oa = this.lc, a.kb = c, this.Xf.cm(a))
- }
- },
- g: wa
- });
- Eb.b = !0;
- Eb.ua = S;
- Eb.prototype = E(S.prototype, {
- da: function() {
- this.Pc.da();
- for (var a = 0, b = this.Sb; a < b.length;) {
- var c = b[a++].ga;
- c.Ke = null;
- c.Pf = null;
- c.da()
- }
- },
- Cn: function(a, b, c, d) {
- var e = this.qe.get(a);
- if (null !=
- e) {
- if (d) {
- var f = this.Pc.Km(e.ga);
- this.cj.set(a, f)
- }
- a = u.ca();
- a.u(5);
- a.u(d ? 1 : 0);
- a.rc(b);
- null == c && (c = "");
- a.rc(c);
- e.Lb(a);
- e.ga.da()
- }
- },
- Dd: function() {
- this.Pc.Dd();
- this.cj.clear()
- },
- fi: function(a) {
- this.Pc.fi(a)
- },
- ma: function(a) {
- a.oa = 0;
- var b = this.R + this.Yh + this.Tb;
- a.cf.Ka || (b = this.R);
- a.kb = b;
- this.fg(a);
- this.di();
- 0 < this.Sb.length && this.hg(this.Ch(a), 1)
- },
- v: function() {
- var a = ((window.performance.now() - this.ki) * this.tc | 0) - this.R;
- 0 < a && this.Si(a);
- 7 <= this.R - this.Zj && this.di();
- this.R - this.Yj >= this.Ym && (this.di(), this.tq())
- },
- yf: function() {
- 0 > this.Tb && (this.Tb = 0);
- return this.Nj((window.performance.now() - this.ki) * this.tc - this.R + this.Yh + this.Tb + this.cd)
- },
- Xn: function(a, b) {
- if (this.Sb.length >= this.Jf) return ac.Lg(4100);
- try {
- if (b.Zb() != this.dr) throw new r(null);
- } catch (d) {
- return ac.Lg(4103)
- }
- try {
- var c = b.Ib();
- if (null != this.Bb && c != this.Bb) throw new r(null);
- } catch (d) {
- return ac.Lg(4101)
- }
- return ac.rm
- },
- Uo: function(a) {
- var b = this;
- if (this.Sb.length >= this.Jf) a.da();
- else {
- var c = new Ub(a);
- this.Sb.push(c);
- a.Pf = function(a) {
- a = new D(new DataView(a));
- b.yp(a, c)
- };
- a.Ke = function() {
- B.remove(b.Sb, c);
- b.qe["delete"](c.U);
- x.i(b.Ro, c.U)
- };
- a = u.ca(1 + c.pe.byteLength);
- a.u(0);
- a.ib(c.pe.byteLength);
- a.Ob(c.pe);
- c.Lb(a)
- }
- },
- Ch: function(a) {
- var b = u.ca();
- b.u(2);
- this.xk(a, b);
- return b
- },
- xk: function(a, b) {
- b.pb(a.kb);
- b.ib(a.ia);
- b.qc(a.oa);
- b.pb(a.be);
- l.Ii(a, b)
- },
- di: function() {
- if (!(0 >= this.R - this.Zj) && 0 != this.Sb.length) {
- var a = u.ca();
- a.u(3);
- a.pb(this.R);
- a.pb(this.ae);
- this.hg(a, 2);
- this.Zj = this.R
- }
- },
- hg: function(a, b) {
- null == b && (b = 0);
- for (var c = 0, d = this.Sb; c < d.length;) {
- var e = d[c];
- ++c;
- e.ag && e.Lb(a, b)
- }
- },
- uq: function(a) {
- var b = u.ca();
- b.u(1);
- var c = u.ca();
- c.qc(a.U);
- c.pb(this.R);
- c.pb(this.ae);
- c.ib(this.Ub);
- this.L.aa(c);
- for (var d = this.Td.list, e = 0, f = d.length; e < f;) this.xk(d[e++], c);
- b.Ob(pako.deflateRaw(c.Mb()));
- a.Lb(b)
- },
- tq: function() {
- this.Yj = this.R;
- if (0 != this.Sb.length) {
- var a = new Sa;
- a.kb = this.R;
- a.ia = this.Ub++;
- a.oa = 0;
- a.ug = this.L.Jn();
- this.hg(this.Ch(a))
- }
- },
- Ip: function(a, b) {
- var c = this,
- d = a.ob(a.wb()),
- e = a.ob(a.wb()),
- f = b.pe;
- b.pe = null;
- G.cr(d, f)["catch"](function() {
- return null
- }).then(function(a) {
- try {
- if (-1 !=
- c.Sb.indexOf(b)) {
- b.Zr = a;
- var d = c.Do++;
- b.U = d;
- c.qe.set(d, b);
- ha.i(c.Qo, d, new D(new DataView(e.buffer, e.byteOffset, e.byteLength), !1));
- b.ag = !0;
- c.uq(b)
- }
- } catch (k) {
- c.Oj(b, k instanceof r ? k.Na : k)
- }
- })
- },
- yp: function(a, b) {
- this.v();
- try {
- if (!b.Qn.Ml()) throw new r(1);
- var c = a.K();
- if (b.ag) switch (c) {
- case 1:
- this.Jp(a, b);
- break;
- case 2:
- this.Cp(a, b);
- break;
- default:
- throw new r(0);
- } else if (0 == c) this.Ip(a, b);
- else throw new r(0);
- if (0 < a.m.byteLength - a.a) throw new r(2);
- } catch (d) {
- this.Oj(b, d instanceof r ? d.Na : d)
- }
- },
- Oj: function(a, b) {
- window.console.log(b);
- this.qe["delete"](a.U);
- B.remove(this.Sb, a);
- a.ag && null != this.mk && this.mk(a.U);
- a.ga.da()
- },
- Cp: function(a, b) {
- var c = a.A();
- b.vb = a.wb();
- var d = u.ca();
- d.u(4);
- d.w((window.performance.now() - this.ki) * this.tc + this.Yh);
- d.w(c);
- b.Lb(d, 2)
- },
- Jp: function(a, b) {
- var c = a.eb(),
- d = a.eb(),
- e = l.Hg(a),
- f = e.cf.lm;
- if (null != f) {
- var g = b.Qi.get(f);
- null == g && (g = new nb(f.Vl, f.qm), b.Qi.set(f, g));
- if (!g.Ml()) throw new r(3);
- }
- f = this.R;
- g = this.R + 120;
- e.be = d;
- e.oa = b.U;
- e.kb = c < f ? f : c > g ? g : c;
- e.jm(this.L) && (this.fg(e), this.hg(this.Ch(e), 1))
- },
- g: Eb
- });
- Ub.b = !0;
- Ub.prototype = {
- Lb: function(a, b) {
- null == b && (b = 0);
- this.ga.Lb(b, a)
- },
- g: Ub
- };
- Tb.b = !0;
- Db.b = !0;
- Db.prototype = {
- g: Db
- };
- Cb.b = !0;
- Cb.ua = S;
- Cb.prototype = E(S.prototype, {
- Op: function(a) {
- for (var b = a.Zb(), c = 0, d = 0; d < b;) {
- ++d;
- var c = c + a.wb(),
- e = a.K();
- this.ik.push({
- Ji: c / this.Te,
- kind: e
- })
- }
- },
- Sk: function() {
- var a = this.Bc;
- 0 < a.m.byteLength - a.a ? (a = this.Bc.wb(), this.Lf += a, a = this.Bc.Zb(), this.Kf = l.Hg(this.Bc), this.Kf.oa = a) : this.Kf = null
- },
- Pn: function() {
- return this.R / this.Te
- },
- ma: function() {},
- yf: function() {
- this.v();
- xa.sc++;
- var a = this.L.jc();
- a.v(this.Jj);
- return a
- },
- v: function() {
- var a = window.performance.now(),
- b = a - this.yh;
- this.yh = a;
- 0 < this.qd ? (this.Kb += 1E4, this.Kb > this.qd && (this.Kb = this.qd, this.qd = -1)) : this.Kb += b * this.Ek;
- a = this.Te * this.Ng;
- this.Kb > a && (this.Kb = a);
- b = this.Kb * this.tc;
- a = b | 0;
- for (this.Jj = b - a; this.R < a;) {
- for (; null != this.Kf && this.Lf == this.R;) b = this.Kf, b.apply(this.L), null != this.Wb && this.Wb(b), this.Sk();
- this.R++;
- this.L.v(1)
- }
- },
- rq: function(a) {
- this.qd = a;
- a < this.Kb && this.Wh()
- },
- Wh: function() {
- this.Lf = 0;
- this.Kb = this.R = this.Bc.a = 0;
- this.L.ea(this.Bc);
- this.Sk()
- },
- g: Cb
- });
- Bb.b = !0;
- Bb.prototype = {
- eval: function(a) {
- var b = this.Qb.length - 1;
- if (a <= this.Qb[0]) return this.Qb[1];
- if (a >= this.Qb[b]) return this.Qb[b - 2];
- for (var c = 0, b = b / 5 | 0;;) {
- var d = b + c >>> 1;
- a > this.Qb[5 * d] ? c = d + 1 : b = d - 1;
- if (!(c <= b)) break
- }
- c = 5 * b;
- b = this.Qb[c];
- a = (a - b) / (this.Qb[c + 5] - b);
- b = a * a;
- d = b * a;
- return (2 * d - 3 * b + 1) * this.Qb[c + 1] + (d - 2 * b + a) * this.Qb[c + 2] + (-2 * d + 3 * b) * this.Qb[c + 3] + (d - b) * this.Qb[c + 4]
- },
- g: Bb
- };
- L.b = !0;
- L.prototype = {
- g: L
- };
- M.b = !0;
- M.dl = function(a, b, c, d, e) {
- return new Promise(function(f, g) {
- var n = new XMLHttpRequest;
- n.open(b, a);
- n.responseType = c;
- n.onload = function() {
- 200 <= n.status && 300 > n.status ? null != n.response ? f(n.response) : g(null) : g("status: " + n.status)
- };
- n.onerror = function(a) {
- g(a)
- };
- null != e && n.setRequestHeader("Content-type", e);
- n.send(d)
- })
- };
- M.I = function(a, b) {
- return M.dl(a, "GET", b, null)
- };
- M.Kj = function(a) {
- return M.I(a, "json").then(function(a) {
- var b = a.error;
- if (null != b) throw new r(b);
- return a.data
- })
- };
- M.vp = function(a, b, c) {
- return M.dl(a, "POST", "json", b, c)
- };
- M.wp = function(a, b, c) {
- return M.vp(a, b, c).then(function(a) {
- var b =
- a.error;
- if (null != b) throw new r(b);
- return a.data
- })
- };
- y.b = !0;
- y.i = function(a) {
- null != a && a()
- };
- x.b = !0;
- x.i = function(a, b) {
- null != a && a(b)
- };
- ha.b = !0;
- ha.i = function(a, b, c) {
- null != a && a(b, c)
- };
- vb.b = !0;
- vb.i = function(a, b, c, d) {
- null != a && a(b, c, d)
- };
- Sb.b = !0;
- Sb.i = function(a, b, c, d, e) {
- null != a && a(b, c, d, e)
- };
- nb.b = !0;
- nb.prototype = {
- Ml: function(a) {
- null == a && (a = 1);
- this.v();
- return a <= this.dc ? (this.dc -= a, !0) : !1
- },
- Oq: function(a) {
- this.v();
- a -= this.dc;
- return 0 >= a ? 0 : this.Ce + a * this.si - window.performance.now()
- },
- ln: function(a, b) {
- var c = this.Oq(a);
- this.dc -= a;
- window.setTimeout(b, c | 0)
- },
- v: function() {
- var a = window.performance.now(),
- b = Math.floor((a - this.Ce) / this.si);
- this.Ce += b * this.si;
- this.dc += b;
- this.dc >= this.fj && (this.dc = this.fj, this.Ce = a)
- },
- g: nb
- };
- Ab.b = !0;
- Ab.Oe = function(a) {
- var b = new $b("([^&=]+)=?([^&]*)", "g");
- a = a.substring(1);
- for (var c = 0, d = new Map; b.Ar(a, c);) {
- var c = b.gm(1),
- c = decodeURIComponent(c.split("+").join(" ")),
- e = b.gm(2);
- d.set(c, decodeURIComponent(e.split("+").join(" ")));
- c = b.Br();
- c = c.Ji + c.yr
- }
- return d
- };
- Ab.I = function() {
- return Ab.Oe(window.top.location.search)
- };
- ob.b = !0;
- ob.mp = function(a) {
- if (3 > a.length) throw new r("Not enough arguments");
- if (7 < a.length) throw new r("Too many arguments");
- var b = new Oa,
- c = new ja;
- b.vg = c;
- switch (a[1]) {
- case "blue":
- c.bb = [p.ta.X];
- b.$ = p.ta;
- break;
- case "red":
- c.bb = [p.ba.X];
- b.$ = p.ba;
- break;
- default:
- throw new r('First argument must be either "red" or "blue"');
- }
- if ("clear" == a[2]) return b;
- c.Wc = 256 * K.parseInt(a[2]) / 360 | 0;
- c.Tc = K.parseInt("0x" + a[3]);
- if (4 < a.length) {
- c.bb = [];
- for (var d = 4, e = a.length; d < e;) c.bb.push(K.parseInt("0x" + a[d++]))
- }
- return b
- };
- ob.prototype = {
- Oe: function(a) {
- var b = this;
- if ("/" != a.charAt(0)) return !1;
- if (1 == a.length) return !0;
- a = H.Sr(B.substr(a, 1, null)).split(" ");
- var c = a[0];
- switch (c) {
- case "avatar":
- 2 == a.length && (this.ql(a[1]), this.fa("Avatar set"));
- break;
- case "checksum":
- a = this.va.L.T;
- var d = a.o;
- a.ye() ? this.fa('Current stadium is original: "' + d + '"') : (a = H.yg(a.jj(), 8), this.fa('Stadium: "' + d + '" (checksum: ' + a + ")"));
- break;
- case "clear_avatar":
- this.ql(null);
- this.fa("Avatar cleared");
- break;
- case "clear_bans":
- null == this.Dd ? this.fa("Only the host can clear bans") :
- (this.Dd(), this.fa("All bans have been cleared"));
- break;
- case "clear_password":
- null == this.ig ? this.fa("Only the host can change the password") : (this.ig(null), this.fa("Password cleared"));
- break;
- case "colors":
- try {
- d = ob.mp(a), this.va.ma(d)
- } catch (f) {
- d = f instanceof r ? f.Na : f, "string" == typeof d && this.fa(d)
- }
- break;
- case "extrapolation":
- 2 == a.length ? (d = K.parseInt(a[1]), null != d && -200 <= d && 200 >= d ? (m.s.cd.Ra(d), this.va.rl(d), this.fa("Extrapolation set to " + d + " msec")) : this.fa("Extrapolation must be a value between -200 and 200 milliseconds")) :
- this.fa("Extrapolation requires a value in milliseconds.");
- break;
- case "handicap":
- 2 == a.length ? (d = K.parseInt(a[1]), null != d && 0 <= d && 300 >= d ? (this.va.xq(d), this.fa("Ping handicap set to " + d + " msec")) : this.fa("Ping handicap must be a value between 0 and 300 milliseconds")) : this.fa("Ping handicap requires a value in milliseconds.");
- break;
- case "set_password":
- 2 == a.length && (null == this.ig ? this.fa("Only the host can change the password") : (this.ig(a[1]), this.fa("Password set")));
- break;
- case "store":
- var e = this.va.L.T;
- e.ye() ? this.fa("Can't store default stadium.") : Z.Qr().then(function() {
- return Z.add(e)
- }).then(function() {
- b.fa("Stadium stored")
- }, function() {
- b.fa("Couldn't store stadium")
- });
- break;
- default:
- this.fa('Unrecognized command: "' + c + '"')
- }
- return !0
- },
- ql: function(a) {
- null != a && (a = aa.td(a, 2));
- m.s.Tg.Ra(a);
- this.va.ma(pa.na(a))
- },
- g: ob
- };
- Ha.b = !0;
- ca.b = !0;
- ca.kl = function(a) {
- var b = new Date;
- Ca.nq(a, "HBReplay-" + b.getFullYear() + "-" + H.df("" + (b.getMonth() + 1)) + "-" + H.df("" + b.getDate()) + "-" + H.df("" + b.getHours()) + "h" + H.df("" + b.getMinutes()) +
- "m.hbr2")
- };
- ca.Lp = function(a) {
- for (var b = a.L.F, c = [], d = 0, e = 0, f = 0; f < b.length;) {
- var g = b[f];
- ++f;
- g.$ == p.Ea && c.push(g.S);
- g.$ == p.ba ? ++d : g.$ == p.ta && ++e
- }
- f = c.length;
- 0 != f && (b = function() {
- return c.splice(Math.random() * c.length | 0, 1)[0]
- }, e == d ? 2 > f || (a.ma(Q.na(b(), p.ba)), a.ma(Q.na(b(), p.ta))) : (d = e > d ? p.ba : p.ta, a.ma(Q.na(b(), d))))
- };
- ca.prototype = {
- Lq: function() {
- this.pd = new Vb(this.va, 2)
- },
- Hq: function(a) {
- var b = this;
- a = new eb(a);
- a.mb = function() {
- b.j.$a(null)
- };
- a.Jh = function(a, d, e) {
- b.va.ma(Y.na(a, d, e));
- b.j.$a(null)
- };
- this.j.$a(a.f)
- },
- da: function() {
- window.document.removeEventListener("keydown", F(this, this.nd));
- window.document.removeEventListener("keyup", F(this, this.od));
- window.onbeforeunload = null;
- window.cancelAnimationFrame(this.le);
- this.lb.da();
- window.clearInterval(this.ih);
- window.clearInterval(this.br);
- window.clearTimeout(this.uf)
- },
- iq: function(a) {
- for (var b = [], c = 0, d = this.va.L.F; c < d.length;) {
- var e = d[c];
- ++c;
- e.$ == a && b.push(Q.na(e.S, p.Ea))
- }
- for (a = 0; a < b.length;) this.va.ma(b[a++])
- },
- Je: function() {
- this.le = window.requestAnimationFrame(F(this,
- this.Je));
- this.lb.v();
- this.va.v();
- this.Ac()
- },
- Ac: function() {
- var a = window.performance.now();
- 1 == m.s.hh.I() && 28.333333333333336 > a - this.Mc || (this.Mc = a, this.dd++, this.Ye(), a = this.va.L.ka(this.va.lc), null != a && (this.Zh = a.ra), this.j.v(this.va))
- },
- Po: function(a) {
- var b = this;
- this.Yg.Oe(a) || this.Vm.ln(1, function() {
- var c = new Ma;
- c.ef = a;
- b.va.ma(c)
- })
- },
- Oo: function(a) {
- var b = this;
- this.ah = a;
- null == this.uf && (this.uf = window.setTimeout(function() {
- b.uf = null;
- b.ol(b.ah)
- }, 1E3), this.ol(this.ah))
- },
- ol: function(a) {
- a != this.Xj && (this.va.ma(la.na(a ?
- 0 : 1)), this.Xj = a)
- },
- Ll: function() {
- if (null != this.va.L.G) {
- var a = new Na;
- a.ff = 120 != this.va.L.G.Fa;
- this.va.ma(a)
- }
- },
- nd: function(a) {
- switch (a.keyCode) {
- case 9:
- case 13:
- this.j.Ua.cb.focus();
- a.preventDefault();
- break;
- case 27:
- if (this.j.ko()) this.j.$a(null);
- else {
- var b = this.j;
- b.Ud(!b.rd)
- }
- a.preventDefault();
- break;
- case 49:
- m.s.Nb.Ra(1);
- break;
- case 50:
- m.s.Nb.Ra(2);
- break;
- case 51:
- m.s.Nb.Ra(3);
- break;
- case 52:
- m.s.Nb.Ra(0);
- break;
- case 80:
- this.Ll();
- break;
- default:
- this.lb.nd(a.code)
- }
- },
- Ye: function() {
- var a = m.s.Nb.I(),
- b = this.j.Ab,
- c =
- b.zb;
- c.cg = m.s.fl.I();
- 0 == a ? (b.jg(!0), c.Re = 1, c.Qe = 0, c.af = 0) : (b.jg(!1), c.af = 35, -1 == a ? c.Qe = 450 : (c.Qe = 0, c.Re = 1 + .25 * (a - 1)))
- },
- od: function(a) {
- this.lb.od(a.code)
- },
- g: ca
- };
- zb.b = !0;
- zb.prototype = {
- ti: function(a) {
- var b = this.j.Ua.uc,
- c = [],
- d = 0;
- for (a = a.F; d < a.length;) {
- var e = a[d];
- ++d;
- c.push({
- o: e.o,
- U: e.S
- })
- }
- b.$i = c
- },
- Th: function(a) {
- var b = this;
- this.ti(a);
- a.Ik = function(c) {
- b.j.Ua.Gb("" + c.o + " has joined");
- m.Xa.Md(m.Xa.lo);
- b.ti(a)
- };
- a.Jk = function(c, d, e, f) {
- x.i(b.Xo, c.S);
- null == d ? c = "" + c.o + " has left" : (f = f.o, Sb.i(b.Wo, c.S, d, f, e), c =
- "" + c.o + " was " + (e ? "banned" : "kicked") + " by " + f + " " + ("" != d ? " (" + d + ")" : ""));
- b.j.Ua.Gb(c);
- m.Xa.Md(m.Xa.oo);
- b.ti(a)
- };
- a.Gk = function(a, d) {
- var c = null != b.th && -1 != d.indexOf(b.th);
- b.j.Ua.fa("" + a.o + ": " + d, c ? "highlight" : null);
- m.s.yl.I() && c ? m.Xa.Md(m.Xa.eo) : m.s.wl.I() && m.Xa.Md(m.Xa.Um)
- };
- a.Oh = function() {
- m.Xa.Md(m.Xa.mo)
- };
- a.mi = function(a) {
- m.Xa.Md(m.Xa.Rn);
- var c = b.j.Ab.zb.ed;
- c.Ga(a == p.ba ? c.Sp : c.Mm)
- };
- a.ni = function(a) {
- var c = b.j.Ab.zb.ed;
- c.Ga(a == p.ba ? c.Tp : c.Nm);
- b.j.Ua.Gb("" + a.o + " team won the match")
- };
- a.Bk = function(a,
- d, e) {
- d && !e && b.j.Ua.Gb("Game paused by " + a.o)
- };
- a.oi = function() {
- var a = b.j.Ab.zb.ed;
- a.Ga(a.Mq)
- };
- a.ji = function(a) {
- b.j.Ud(!1);
- b.j.Ab.zb.ed.Zm();
- b.j.Ua.Gb("Game started by " + a.o)
- };
- a.Ze = function(a) {
- null != a && b.j.Ua.Gb("Game stopped by " + a.o)
- };
- a.hi = function(a, d) {
- if (!d.ye()) {
- var c = H.yg(d.jj(), 8);
- b.j.Ua.Gb("" + a.o + ' loaded "' + d.o + '" (' + c + ")")
- }
- };
- a.Hk = function(a) {
- b.j.Ua.Gb("" + a.o + " " + (a.vd ? "has desynchronized" : "is back in sync"))
- };
- a.Mk = function(c, d, e) {
- null != a.G && b.j.Ua.Gb("" + d.o + " was moved to " + e.o + " by " + c.o)
- };
- a.Nh = function(a, d) {
- var c = d.o,
- f = a.o;
- b.j.Ua.Gb(d.ra ? "" + c + " was given admin rights by " + f : "" + c + "'s admin rights were taken away by " + f)
- };
- a.Lk = function(a, d) {
- b.j.Ab.zb.Yn(a, d)
- }
- },
- Xq: function(a) {
- a.Ik = null;
- a.Jk = null;
- a.Gk = null;
- a.Oh = null;
- a.mi = null;
- a.ni = null;
- a.Bk = null;
- a.oi = null;
- a.ji = null;
- a.Ze = null;
- a.hi = null;
- a.Hk = null;
- a.Mk = null;
- a.Nh = null;
- a.Lk = null
- },
- g: zb
- };
- Qa.b = !0;
- Qa.Vj = function(a) {
- switch (m.s.Wf.I().I(a)) {
- case "Down":
- return 2;
- case "Kick":
- return 16;
- case "Left":
- return 4;
- case "Right":
- return 8;
- case "Up":
- return 1;
- default:
- return 0
- }
- };
- Qa.prototype = {
- da: function() {
- window.document.removeEventListener("focusout", F(this, this.nk))
- },
- v: function() {
- var a = this.Gd;
- if (null != this.Rf && a != this.Ef) {
- this.Ef = a;
- var b = new Ga;
- b.input = a;
- this.Rf(b)
- }
- },
- nd: function(a) {
- this.Gd |= Qa.Vj(a)
- },
- od: function(a) {
- this.Gd &= ~Qa.Vj(a)
- },
- nk: function() {
- if (null != this.Rf && 0 != this.Ef) {
- this.Ef = this.Gd = 0;
- var a = new Ga;
- a.input = 0;
- this.Rf(a)
- }
- },
- g: Qa
- };
- R.b = !0;
- R.jh = function(a) {
- return R.xf(JSON.parse(a))
- };
- R.xf = function(a) {
- var b = new R;
- b.xc = a.lat;
- b.yc = a.lon;
- b.rb = a.code.toLowerCase();
- return b
- };
- R.On = function() {
- return M.Kj(m.nf + "api/geo").then(function(a) {
- return R.xf(a)
- })
- };
- R.prototype = {
- $d: function() {
- return JSON.stringify({
- lat: this.xc,
- lon: this.yc,
- code: this.rb
- })
- },
- g: R
- };
- Rb.b = !0;
- Rb.prototype = {
- nh: function() {
- return null != this.we.I() ? this.we.I() : null != this.ve.I() ? this.ve.I() : new R
- },
- g: Rb
- };
- Qb.b = !0;
- Qb.am = function() {
- try {
- var a = window.localStorage;
- a.getItem("");
- if (0 == a.length) {
- var b = "_hx_" + Math.random();
- a.setItem(b, b);
- a.removeItem(b)
- }
- return a
- } catch (c) {
- return null
- }
- };
- va.b = !0;
- va.prototype = {
- I: function() {
- return this.Rl
- },
- Ra: function(a) {
- this.Rl = a;
- if (null != this.Bh) try {
- var b = this.gr(a);
- null == b ? this.Bh.removeItem(this.o) : this.Bh.setItem(this.o, b)
- } catch (c) {}
- },
- g: va
- };
- U.b = !0;
- U.xf = function(a) {
- for (var b = new U, c = Zb.Yl(a), d = 0; d < c.length;) {
- var e = c[d];
- ++d;
- b.Lc.set(e, a[e])
- }
- return b
- };
- U.jh = function(a) {
- return U.xf(JSON.parse(a))
- };
- U.rj = function() {
- var a = new U;
- a.Ga("ArrowUp", "Up");
- a.Ga("KeyW", "Up");
- a.Ga("ArrowDown", "Down");
- a.Ga("KeyS", "Down");
- a.Ga("ArrowLeft", "Left");
- a.Ga("KeyA", "Left");
- a.Ga("ArrowRight", "Right");
- a.Ga("KeyD", "Right");
- a.Ga("KeyX", "Kick");
- a.Ga("Space", "Kick");
- a.Ga("ControlLeft", "Kick");
- a.Ga("ControlRight", "Kick");
- a.Ga("ShiftLeft", "Kick");
- a.Ga("ShiftRight", "Kick");
- a.Ga("Numpad0", "Kick");
- return a
- };
- U.prototype = {
- Ga: function(a, b) {
- this.Lc.set(a, b)
- },
- I: function(a) {
- return this.Lc.get(a)
- },
- Wp: function(a) {
- this.Lc["delete"](a)
- },
- Nn: function(a) {
- for (var b = [], c = this.Lc.keys(), d = c.next(); !d.done;) {
- var e = d.value,
- d = c.next();
- this.Lc.get(e) == a && b.push(e)
- }
- return b
- },
- $d: function() {
- for (var a = {}, b = this.Lc.keys(), c = b.next(); !c.done;) {
- var d =
- c.value,
- c = b.next();
- a[d] = this.Lc.get(d)
- }
- return JSON.stringify(a)
- },
- g: U
- };
- m.b = !0;
- Pb.b = !0;
- Pb.prototype = {
- g: Pb
- };
- v.b = !0;
- v.yo = function() {
- fc.Fr();
- w.Ci(function() {
- v.Bj(v.Hp)
- });
- v.ro()
- };
- v.ro = function() {
- var a = m.s.Zi.I();
- if (null == a) G.Hn().then(function(a) {
- v.se = a;
- m.s.Zi.Ra(a.Uq())
- })["catch"](function() {
- return {}
- });
- else G.Gn(a).then(function(a) {
- return v.se = a
- })["catch"](function() {
- return {}
- })
- };
- v.Kn = function() {
- var a = Qb.am();
- return null != a ? null != a.getItem("crappy_router") : !1
- };
- v.Bj = function(a) {
- var b = new jb(m.s.Nd.I());
- b.qk = function(b) {
- m.s.Nd.Ra(b);
- m.Xa.gl();
- a()
- };
- w.Ma(b.f);
- b.yb.focus()
- };
- v.Cj = function(a, b) {
- var c = new O(a);
- c.Za = b;
- w.Ma(c.f)
- };
- v.Hp = function() {
- var a = Ab.I(),
- b = a.get("c"),
- c = a.get("p");
- a.get("v");
- null != b ? null != c ? v.fh(b) : v.vf(b) : v.Fb()
- };
- v.Fb = function() {
- var a = new Aa(m.s.nh());
- w.Ma(a.Ba);
- a.im = function(b) {
- if (8 != b.gd.sd) {
- var c;
- 8 > b.gd.sd ? (b = "Old version room", c = "The room is running an older version, an update must have happened recently.") : (b = "New version", c = "The room is running a new version of haxball, refresh the site to update.");
- var d = new T(b, c, ["Ok"]);
- w.Ma(d.f);
- d.Za = function() {
- w.Ma(a.Ba);
- return d.Za = null
- }
- } else b.gd.Bb ? v.fh(b.U) : v.vf(b.U)
- };
- a.Ir = function() {
- v.xn()
- };
- a.Hr = function() {
- v.Bj(v.Fb)
- };
- a.Kr = function() {
- v.Ej()
- };
- a.Jr = function(a) {
- v.yn(a)
- }
- };
- v.Ej = function() {
- var a = new ba(!0),
- b = window.document.createElement("div");
- b.className = "view-wrapper";
- b.appendChild(a.f);
- w.Ma(b);
- a.mb = function() {
- v.Fb()
- };
- a.No = function() {
- var a = new lb,
- b = window.document.createElement("div");
- b.className = "view-wrapper";
- b.appendChild(a.f);
- w.Ma(b);
- return a.mb = function() {
- v.Ej()
- }
- }
- };
- v.Eh = function(a, b) {
- return "" + window.location.origin + "/play?c=" + a + (b ? "&p=1" : "")
- };
- v.xn = function() {
- var a = m.s.Nd.I(),
- b = new hb("" + a + "'s room");
- w.Ma(b.f);
- b.Hh = function() {
- v.Fb()
- };
- b.So = function(b) {
- function c() {
- if (!b.Wr) {
- var a = new yb;
- a.sd = 8;
- a.o = g.$b;
- a.F = g.F.length;
- a.Ee = k.Jf + 1;
- a.rb = f.rb;
- a.Bb = null != k.Bb;
- a.xc = f.xc;
- a.yc = f.yc;
- var c = u.ca(16);
- a.aa(c);
- a = c.ng();
- k.fi(a)
- }
- }
- w.Ma((new T("Creating room", "Connecting...", [])).f);
- var e = null,
- f = m.s.nh(),
- g = new fa;
- g.$b = b.name;
- var n = new ea;
- n.o = a;
- n.ra = !0;
- n.ud = f.rb;
- n.jb = m.s.Tg.I();
- g.F.push(n);
- var k = new Eb({
- iceServers: m.Bf,
- Fi: m.nf + "api/host",
- state: g,
- version: 8
- });
- k.Jf = b.Cr - 1;
- k.Bb = b.password;
- c();
- var h = new ca(k),
- l = !1;
- k.Me = function(a, b) {
- v.Cj(a, function(a) {
- b(a);
- w.Ma(h.j.f);
- return l = !0
- })
- };
- var p = window.setInterval(function() {
- var a = ka.na(k);
- k.ma(a)
- }, 3E3);
- k.mk = function(a) {
- null != g.ka(a) && (a = Y.na(a, "Bad actor", !1), k.ma(a))
- };
- k.Qo = function(a, b) {
- var d = b.mc();
- if (25 < d.length) throw new r("name too long");
- var e = b.mc();
- if (3 < e.length) throw new r("country too long");
- var f = b.Ib();
- if (null != f && 2 < f.length) throw new r("avatar too long");
- d = ma.na(a, d, e, f);
- k.ma(d);
- c()
- };
- k.Ro = function(a) {
- null != g.ka(a) && (a = Y.na(a, null, !1), k.ma(a))
- };
- k.Of = function(a) {
- e = a;
- h.eg = v.Eh(a, null != k.Bb);
- l || (l = !0, w.Ma(h.j.f))
- };
- h.kh.Wo = function(a, b, c, d) {
- k.Cn(a, b, c, d)
- };
- h.kh.Xo = function() {
- c()
- };
- h.j.Kd = function() {
- k.da();
- h.da();
- v.Fb();
- window.clearInterval(p)
- };
- h.Yg.ig = function(a) {
- k.Bb = a;
- c();
- null != e && (h.eg = v.Eh(e, null != k.Bb))
- };
- h.Yg.Dd = F(k, k.Dd)
- }
- };
- v.fh = function(a) {
- var b = new Xa;
- w.Ma(b.f);
- b.Za = function(b) {
- null == b ? v.Fb() : v.vf(a, b)
- }
- };
- v.yn = function(a) {
- try {
- var b = new Ob(new Cb(new Uint8Array(a),
- new fa, 2));
- b.Rd.Kd = function() {
- b.da();
- v.Fb()
- };
- w.Ma(b.j.f)
- } catch (e) {
- var c = e instanceof r ? e.Na : e;
- if (c instanceof Db) a = new T("Incompatible replay version", "The replay file is of a different version", ["Open player", "Cancel"]), w.Ma(a.f), a.Za = function(a) {
- 0 == a ? (a = window.top.location, window.top.open(a.protocol + "//" + a.hostname + (null != a.port ? ":" + a.port : "") + "/replay?v=" + c.sd, "_self")) : v.Fb()
- };
- else {
- var d = new T("Replay error", "Couldn't load the file.", ["Ok"]);
- w.Ma(d.f);
- d.Za = function() {
- d.Za = null;
- v.Fb()
- }
- }
- }
- };
- v.vf =
- function(a, b) {
- try {
- var c = v.Kn(),
- d = new fa,
- e = u.ca();
- e.rc(m.s.Nd.I());
- e.rc(m.s.nh().rb);
- e.Pb(m.s.Tg.I());
- var f = m.Bf,
- g = m.hr,
- n = e.ng(),
- k = new wa(a, {
- iceServers: f,
- Fi: g,
- state: d,
- version: 8,
- Yr: n,
- password: b,
- nm: c,
- pm: m.s.Mp.I(),
- qr: v.se
- }),
- h = new ib;
- h.fa("Connecting to master...");
- h.Wg.onclick = function() {
- k.md = null;
- k.Le = null;
- k.da();
- v.Fb()
- };
- w.Ma(h.f);
- var l = function(a, b) {
- var c = new gb(a, b);
- c.Za = function() {
- v.Fb()
- };
- w.Ma(c.f)
- },
- p = function() {
- var b = new ca(k);
- k.rk = function(a) {
- b.j.Wd.Cq((10 * k.Vf.Cg(.5) | 0) / 10);
- b.j.Wd.Aq((10 * k.Vf.max() |
- 0) / 10);
- b.j.Wd.Ck.Em(a)
- };
- b.eg = v.Eh(a, !1);
- w.Ma(b.j.f);
- b.j.Kd = function() {
- k.md = null;
- k.da();
- b.da();
- v.Fb()
- };
- k.md = function() {
- k.md = null;
- b.da();
- var a = null == b.pd ? null : b.pd.stop();
- l(k.wj, a)
- }
- };
- k.Le = function(c) {
- k.Le = null;
- k.md = null;
- if (1 == c.ub) switch (c.reason) {
- case 4002:
- v.Cj(m.Qp, function() {
- v.vf(a, b)
- });
- break;
- case 4101:
- null == b ? v.fh(a) : l(wa.Zg(c), null);
- break;
- default:
- l(wa.Zg(c), null)
- } else l(wa.Zg(c), null)
- };
- k.md = function(a) {
- switch (a) {
- case 1:
- h.fa("Connecting to peer...");
- break;
- case 2:
- h.fa("Awaiting state...");
- break;
- case 3:
- p()
- }
- };
- k.ap = function() {
- h.fa("Trying reverse connection...")
- }
- } catch (W) {
- window.console.log(W instanceof r ? W.Na : W), c = new T("Unexpected Error", "", []), c.re.innerHTML = "An error ocurred while attempting to join the room.<br><br>This might be caused by a browser extension, try disabling all extensions and refreshing the site.<br><br>The error has been printed to the inspector console.", w.Ma(c.f)
- }
- };
- w.b = !0;
- w.wr = function() {
- try {
- return window.self != window.top
- } catch (a) {
- return !0
- }
- };
- w.zg = function(a) {
- return new Promise(function(b,
- c) {
- var d = window.document.createElement("img");
- d.onload = function() {
- URL.revokeObjectURL(d.src);
- d.onload = null;
- b(d)
- };
- d.onerror = function() {
- URL.revokeObjectURL(d.src);
- c(null)
- };
- return d.src = URL.createObjectURL(new Blob([a], {
- type: "image/png"
- }))
- })
- };
- w.Ci = function(a) {
- w.wr() && w.rr(function() {
- dc.Ci();
- var b;
- null == m.s.ve.I() ? R.On().then(function(a) {
- m.s.ve.Ra(a)
- }, function() {
- return {}
- }) : b = Promise.resolve(null);
- return Promise.all([M.I("res.dat", "arraybuffer").then(function(a) {
- a = new JSZip(a);
- m.Xa = new Nb(a);
- return Promise.all([m.Xa.An,
- w.zg(a.file("images/grass.png").asArrayBuffer()).then(function(a) {
- return m.Tn = a
- }), w.zg(a.file("images/concrete.png").asArrayBuffer()).then(function(a) {
- return m.gn = a
- }), w.zg(a.file("images/concrete2.png").asArrayBuffer()).then(function(a) {
- return m.en = a
- }), w.zg(a.file("images/typing.png").asArrayBuffer()).then(function(a) {
- return m.Nl = a
- })
- ])
- }), b]).then(function() {
- w.Gr(a)
- })
- })
- };
- w.rr = function(a) {
- for (var b = Modernizr, c = "canvas datachannel dataview es6collections peerconnection promises websockets".split(" "),
- d = [], e = 0; e < c.length;) {
- var f = c[e];
- ++e;
- b[f] || d.push(f)
- }
- 0 != d.length ? (window.document.body.innerHTML = "", w.sg = window.document.createElement("div"), window.document.body.appendChild(w.sg), a = new Ua(d), w.Ma(a.f)) : a()
- };
- w.Gr = function(a) {
- window.document.body.innerHTML = "";
- w.sg = window.document.createElement("div");
- window.document.body.appendChild(w.sg);
- var b = null,
- b = function() {
- m.Xa.gl();
- window.document.removeEventListener("click", b, !0)
- };
- window.document.addEventListener("click", b, !0);
- a()
- };
- w.Ma = function(a) {
- null !=
- w.fm && w.fm.remove();
- null != a && (w.sg.appendChild(a), w.fm = a)
- };
- Ob.b = !0;
- Ob.prototype = {
- da: function() {
- window.document.removeEventListener("keydown", F(this, this.nd));
- window.document.removeEventListener("keyup", F(this, this.od));
- window.onbeforeunload = null;
- window.cancelAnimationFrame(this.le);
- window.clearInterval(this.ih)
- },
- Je: function() {
- this.le = window.requestAnimationFrame(F(this, this.Je));
- this.va.v();
- this.Ac()
- },
- Ac: function() {
- this.Rd.v();
- var a = window.performance.now();
- 1 == m.s.hh.I() && 28.333333333333336 > a - this.Mc ||
- (this.Mc = a, this.dd++, this.Ye(m.s.Nb.I()), 0 < this.va.qd || this.j.v(this.va))
- },
- nd: function(a) {
- switch (a.keyCode) {
- case 27:
- var b = this.j;
- b.Ud(!b.rd);
- a.preventDefault();
- break;
- case 49:
- m.s.Nb.Ra(1);
- break;
- case 50:
- m.s.Nb.Ra(2);
- break;
- case 51:
- m.s.Nb.Ra(3);
- break;
- case 52:
- m.s.Nb.Ra(0)
- }
- },
- Ye: function(a) {
- var b = this.j.Ab;
- 0 >= a ? (b.jg(!0), b.zb.Re = 1, b.zb.af = 0) : (b.jg(!1), b.zb.af = 35, b.zb.Re = 1 + .25 * (a - 1))
- },
- od: function() {},
- g: Ob
- };
- yb.b = !0;
- yb.prototype = {
- hj: function() {
- this.o = aa.td(this.o, 40);
- this.rb = aa.td(this.rb, 3)
- },
- aa: function(a) {
- this.hj();
- a.Ia = !0;
- a.qc(this.sd);
- a.Tl(this.o);
- a.Tl(this.rb);
- a.Sl(this.xc);
- a.Sl(this.yc);
- a.u(this.Bb ? 1 : 0);
- a.u(this.Ee);
- a.u(this.F);
- a.Ia = !1
- },
- ea: function(a) {
- a.Ia = !0;
- this.sd = a.Zb();
- this.o = a.Tk();
- this.rb = a.Tk();
- this.xc = a.Rk();
- this.yc = a.Rk();
- this.Bb = 0 != a.K();
- this.Ee = a.K();
- this.F = a.K();
- a.Ia = !1;
- if (30 < this.F || 30 < this.Ee) throw new r(null);
- this.hj()
- },
- g: yb
- };
- ua.b = !0;
- ua.parse = function(a) {
- a.K();
- for (var b = []; 0 != a.m.byteLength - a.a;) {
- var c = a.Qd(a.Zb()),
- d = a.Qk(a.Zb());
- try {
- var e = new yb;
- e.ea(new D(new DataView(d), !1));
- var f = new Pb;
- f.gd = e;
- f.U = c;
- b.push(f)
- } catch (g) {}
- }
- return b
- };
- ua.vr = function(a, b, c, d) {
- return Math.acos(Math.sin(a) * Math.sin(c) + Math.cos(a) * Math.cos(c) * Math.cos(b - d))
- };
- ua.Tr = function(a, b) {
- for (var c = a.xc, d = a.yc, e = 0; e < b.length;) {
- var f = b[e];
- ++e;
- var g = f.gd;
- f.ue = 6378 * ua.vr(.017453292519943295 * g.xc, .017453292519943295 * g.yc, .017453292519943295 * c, .017453292519943295 * d);
- isFinite(f.ue) || (f.ue = 22E3)
- }
- };
- ua.get = function() {
- return M.I(m.nf + "api/list", "arraybuffer").then(function(a) {
- return ua.parse(new D(new DataView(a), !1))
- })
- };
- Z.b = !0;
- Z["delete"] = function(a) {
- return null == window.indexedDB ? Promise.reject("IndexedDB not supported by browser.") : new Promise(function(b, c) {
- var d = window.indexedDB.open("stadiums", 1);
- d.onblocked = d.onerror = c;
- d.onupgradeneeded = function(a) {
- var b = d.result;
- b.onerror = c;
- 1 > a.oldVersion && (b.createObjectStore("files", {
- autoIncrement: !0
- }), b.createObjectStore("meta", {
- keyPath: "id"
- }))
- };
- d.onsuccess = function() {
- var e = d.result;
- e.onerror = c;
- var f = e.transaction(["meta", "files"], "readwrite");
- f.onerror = f.onabort = function(a) {
- c(a);
- e.close()
- };
- f.oncomplete = function() {
- b(0);
- e.close()
- };
- f.objectStore("files")["delete"](a);
- f.objectStore("meta")["delete"](a)
- }
- })
- };
- Z.get = function(a) {
- return null == window.indexedDB ? Promise.reject("IndexedDB not supported by browser.") : new Promise(function(b, c) {
- var d = window.indexedDB.open("stadiums", 1);
- d.onblocked = d.onerror = c;
- d.onupgradeneeded = function(a) {
- var b = d.result;
- b.onerror = c;
- 1 > a.oldVersion && (b.createObjectStore("files", {
- autoIncrement: !0
- }), b.createObjectStore("meta", {
- keyPath: "id"
- }))
- };
- d.onsuccess = function() {
- var e =
- d.result;
- e.onerror = c;
- var f = e.transaction(["files"]);
- f.onerror = f.onabort = function(a) {
- c(a);
- e.close()
- };
- f.oncomplete = function() {
- e.close()
- };
- sb.Gg(f.objectStore("files").get(a)).then(function(a) {
- try {
- var d = new h;
- d.$j(a);
- b(d)
- } catch (k) {
- c(k instanceof r ? k.Na : k)
- }
- }, c)
- }
- })
- };
- Z.getAll = function() {
- return null == window.indexedDB ? Promise.reject("IndexedDB not supported by browser.") : new Promise(function(a, b) {
- var c = window.indexedDB.open("stadiums", 1);
- c.onblocked = c.onerror = b;
- c.onupgradeneeded = function(a) {
- var d = c.result;
- d.onerror = b;
- 1 > a.oldVersion && (d.createObjectStore("files", {
- autoIncrement: !0
- }), d.createObjectStore("meta", {
- keyPath: "id"
- }))
- };
- c.onsuccess = function() {
- var d = c.result;
- d.onerror = b;
- var e = d.transaction(["meta"]);
- e.onerror = e.onabort = function(a) {
- b(a);
- d.close()
- };
- e.oncomplete = function() {
- d.close()
- };
- sb.Gg(e.objectStore("meta").getAll()).then(a, b)
- }
- })
- };
- Z.Qr = function() {
- var a = window.navigator.storage;
- if (null == a || null == a.persist) return Promise.resolve(!1);
- try {
- return a.persisted().then(function(b) {
- return b ? !0 : a.persist()
- })["catch"](function() {
- return !1
- })
- } catch (b) {
- return Promise.resolve(!1)
- }
- };
- Z.add = function(a) {
- return null == window.indexedDB ? Promise.reject("IndexedDB not supported by browser.") : new Promise(function(b, c) {
- var d = window.indexedDB.open("stadiums", 1);
- d.onblocked = d.onerror = c;
- d.onupgradeneeded = function(a) {
- var b = d.result;
- b.onerror = c;
- 1 > a.oldVersion && (b.createObjectStore("files", {
- autoIncrement: !0
- }), b.createObjectStore("meta", {
- keyPath: "id"
- }))
- };
- d.onsuccess = function() {
- var e = d.result;
- e.onerror = c;
- var f = e.transaction(["files", "meta"], "readwrite");
- f.onerror = f.onabort = function(a) {
- c(a);
- e.close()
- };
- f.oncomplete = function() {
- b(0);
- e.close()
- };
- try {
- sb.Gg(f.objectStore("files").add(a.$d())).then(function(b) {
- b = {
- name: a.o,
- id: b
- };
- return sb.Gg(f.objectStore("meta").add(b))
- })["catch"](c)
- } catch (g) {
- c(0)
- }
- }
- })
- };
- Nb.b = !0;
- Nb.prototype = {
- gl: function() {
- this.c.resume()
- },
- Md: function(a) {
- var b = this.c.createBufferSource();
- b.buffer = a;
- b.connect(this.Gf);
- b.start()
- },
- tl: function(a) {
- this.Gf.gain.value = a
- },
- g: Nb
- };
- Mb.b = !0;
- Mb.prototype = {
- update: function() {
- var a = window.performance.now(),
- b = a - this.em;
- this.em = a;
- this.ce += (this.Fg - this.ce) *
- this.Vr;
- this.jf -= b;
- 0 >= this.jf && (this.jf = this.Fg = 0);
- 0 >= this.Fg && .05 > this.ce && (window.clearInterval(this.Ig), this.Ig = null, this.ce = 0);
- this.wg.gain.value = m.s.xl.I() ? this.ce : 0
- },
- Li: function(a) {
- var b = this;
- this.Fg = a;
- this.jf = 166.66666666666666;
- null == this.Ig && (this.Ig = window.setInterval(function() {
- b.update()
- }, 17), this.em = window.performance.now())
- },
- connect: function(a) {
- this.wg.connect(a)
- },
- Xr: function(a) {
- var b = a.G;
- if (null != b)
- if (2 == b.xb) 0 >= b.Fa && this.Li(1);
- else if (1 == b.xb) {
- var c = b.wa.J[b.ec],
- d = null,
- e = null,
- f = null,
- g = 0,
- n = null,
- k = null,
- h = null,
- l = 0,
- m = p.ba.eh,
- r = 0;
- for (a = a.F; r < a.length;) {
- var q = a[r];
- ++r;
- if (null != q.D) {
- var t = q.D.a,
- v = c.a,
- u = t.x - v.x,
- t = t.y - v.y,
- u = u * u + t * t;
- if (q.$ == p.ba) {
- if (null == d || d.a.x * m < q.D.a.x * m) d = q.D;
- if (null == e || e.a.x * m > q.D.a.x * m) e = q.D;
- if (null == f || u < g) f = q.D, g = u
- } else if (q.$ == p.ta) {
- if (null == n || n.a.x * m < q.D.a.x * m) n = q.D;
- if (null == k || k.a.x * m > q.D.a.x * m) k = q.D;
- if (null == h || u < l) h = q.D, l = u
- }
- }
- }
- null != k && null != e && 0 >= b.Fa && (f.a.x > k.a.x && c.a.x > k.a.x && 20 < c.a.x && this.Li(.3), h.a.x < e.a.x && c.a.x < e.a.x && -20 > c.a.x && this.Li(.3))
- }
- },
- g: Mb
- };
- ta.b = !0;
- ta.prototype = {
- aa: function(a) {
- var b = this.a;
- a.w(b.x);
- a.w(b.y);
- b = this.M;
- a.w(b.x);
- a.w(b.y);
- a.w(this.la);
- a.w(this.l);
- a.w(this.pa);
- a.w(this.Aa);
- a.pb(this.X);
- a.Z(this.h);
- a.Z(this.B)
- },
- ea: function(a) {
- var b = this.a;
- b.x = a.A();
- b.y = a.A();
- b = this.M;
- b.x = a.A();
- b.y = a.A();
- this.la = a.A();
- this.l = a.A();
- this.pa = a.A();
- this.Aa = a.A();
- this.X = a.eb();
- this.h = a.W();
- this.B = a.W()
- },
- Ao: function() {
- var a = new X;
- this.Rj(a);
- return a
- },
- Rj: function(a) {
- var b = a.a,
- c = this.a;
- b.x = c.x;
- b.y = c.y;
- b = a.M;
- c = this.M;
- b.x = c.x;
- b.y = c.y;
- a.la = this.la;
- a.l = this.l;
- a.pa = this.pa;
- a.Aa = this.Aa;
- a.X = this.X;
- a.h = this.h;
- a.B = this.B
- },
- g: ta
- };
- sa.b = !0;
- sa.he = [rb];
- sa.bd = function(a, b) {
- a.Pa = b.Pa.jc();
- a.fb = b.fb;
- a.xa = b.xa;
- a.wa = b.wa.jc();
- a.ec = b.ec;
- a.nc = b.nc;
- a.xb = b.xb;
- a.Jb = b.Jb;
- a.Db = b.Db;
- a.zc = b.zc;
- a.Fa = b.Fa;
- a.T = b.T;
- a.Hd = b.Hd;
- var c = a.kd,
- d = b.kd;
- c.x = d.x;
- c.y = d.y
- };
- sa.prototype = {
- ho: function(a) {
- this.Pa = a;
- this.zo();
- this.fb = a.fb;
- this.xa = a.xa;
- this.T = a.T;
- this.wa.C = this.T.C;
- this.wa.ha = this.T.ha;
- this.wa.O = this.T.O;
- a = 0;
- for (var b = this.T.J; a < b.length;) this.wa.J.push(b[a++].Ao());
- this.Wj()
- },
- zo: function() {
- var a = new X;
- this.ec = this.wa.J.length;
- this.wa.J.push(a)
- },
- Sj: function(a) {
- if (a.$ == p.Ea) a.D = null;
- else {
- a.lb = 0;
- var b = a.D;
- null == b && (b = new X, a.D = b, this.wa.J.push(b));
- var c = this.T.Od;
- b.X = 0;
- b.la = 15;
- b.pa = c.pa;
- b.Aa = c.Aa;
- b.l = c.l;
- b.h = 39;
- b.B = a.$.B;
- b.a.x = a.$.eh * this.T.Rb;
- b.a.y = 0;
- a = b.M;
- a.x = 0;
- a.y = 0
- }
- },
- v: function(a) {
- if (0 < this.Fa) 120 > this.Fa && this.Fa--;
- else {
- var b = this.Pa.$r;
- null != b && b();
- for (var c = this.Pa.F, b = this.wa.J[this.ec], d = 0; d < c.length;) {
- var e = c[d];
- ++d;
- if (null != e.D) {
- var f = b.a,
- g = e.D.a,
- n = f.x - g.x,
- g = f.y -
- g.y,
- k = Math.sqrt(n * n + g * g) - b.la - e.D.la;
- 0 == (e.lb & 16) && (e.bc = !1);
- f = this.T.Od;
- if (e.bc && 4 > k) {
- if (0 != f.Id) {
- var k = Math.sqrt(n * n + g * g),
- h = f.Id,
- l = b.M,
- m = b.M,
- q = b.pa;
- l.x = m.x + n / k * h * q;
- l.y = m.y + g / k * h * q;
- null != this.Pa.Oh && this.Pa.Oh(e)
- }
- e.bc = !1
- }
- k = e.lb;
- g = n = 0;
- 0 != (k & 1) && --g;
- 0 != (k & 2) && ++g;
- 0 != (k & 4) && --n;
- 0 != (k & 8) && ++n;
- 0 != n && 0 != g && (k = Math.sqrt(n * n + g * g), n /= k, g /= k);
- k = e.D.M;
- h = e.bc ? f.Ae : f.ke;
- k.x += n * h;
- k.y += g * h;
- e.D.Aa = e.bc ? f.Be : f.Aa
- }
- }
- this.wa.v(a);
- if (0 == this.xb) {
- for (a = 0; a < c.length;) d = c[a], ++a, null != d.D && (d.D.h = 39 | this.Hd.no);
- c = b.M;
- 0 <
- c.x * c.x + c.y * c.y && (this.xb = 1, c = this.kd, b = b.a, c.x = b.x, c.y = b.y)
- } else if (1 == this.xb) {
- this.zc += .016666666666666666;
- for (a = 0; a < c.length;) d = c[a], ++a, null != d.D && (d.D.h = 39);
- c = this.T.Wm(b.a, this.kd);
- c != p.Ea ? (this.xb = 2, this.nc = 150, this.Hd = c, c == p.ba ? this.Db++ : this.Jb++, null != this.Pa.mi && this.Pa.mi(c.Tf), null != this.Pa.cl && this.Pa.cl(c.U)) : 0 < this.xa && this.zc >= 60 * this.xa && this.Jb != this.Db && (null != this.Pa.oi && this.Pa.oi(), this.El());
- c = this.kd;
- b = b.a;
- c.x = b.x;
- c.y = b.y
- } else if (2 == this.xb) this.nc--, 0 >= this.nc && (0 < this.fb &&
- (this.Jb >= this.fb || this.Db >= this.fb) || 0 < this.xa && this.zc >= 60 * this.xa && this.Jb != this.Db ? this.El() : (this.Wj(), null != this.Pa.up && this.Pa.up()));
- else if (3 == this.xb && (this.nc--, 0 >= this.nc && (b = this.Pa, null != b.G))) {
- b.G = null;
- c = 0;
- for (a = b.F; c < a.length;) d = a[c], ++c, d.D = null, d.Cb = 0;
- null != b.Ze && b.Ze(null)
- }
- }
- },
- El: function() {
- this.nc = 300;
- this.xb = 3;
- null != this.Pa.ni && this.Pa.ni(this.Jb > this.Db ? p.ba : p.ta)
- },
- Wj: function() {
- var a = this.Pa.F;
- this.xb = 0;
- this.T.me.Rj(this.wa.J[this.ec]);
- for (var b = [0, 0, 0], c = 0; c < a.length;) {
- var d =
- a[c];
- ++c;
- this.Sj(d);
- var e = d.$;
- if (e != p.Ea) {
- var f = d.D.a,
- g = b[e.U],
- n = g + 1 >> 1;
- 0 == (g & 1) && (n = -n);
- f.x = this.T.ac * e.eh;
- f.y = 55 * n;
- b[e.U]++;
- d.Cb = b[e.U]
- }
- }
- },
- aa: function(a) {
- this.wa.aa(a);
- a.Z(this.ec);
- a.Z(this.nc);
- a.Z(this.xb);
- var b = this.kd;
- a.w(b.x);
- a.w(b.y);
- a.Z(this.Jb);
- a.Z(this.Db);
- a.w(this.zc);
- a.Z(this.Fa);
- a.u(this.Hd.U)
- },
- ea: function(a, b) {
- this.wa.ea(a);
- this.ec = a.W();
- this.nc = a.W();
- this.xb = a.W();
- var c = this.kd;
- c.x = a.A();
- c.y = a.A();
- this.Jb = a.W();
- this.Db = a.W();
- this.zc = a.A();
- this.Fa = a.W();
- c = a.Se();
- this.Hd = 1 == c ? p.ba : 2 ==
- c ? p.ta : p.Ea;
- this.Pa = b;
- this.fb = b.fb;
- this.xa = b.xa;
- this.T = b.T;
- this.wa.C = this.T.C;
- this.wa.O = this.T.O;
- this.wa.ha = this.T.ha
- },
- jc: function() {
- var a = xa.sc,
- b = this.Xb;
- this.Yb != a && (null == b && (this.Xb = b = new sa), this.Yb = a, sa.bd(b, this));
- return b
- },
- g: sa
- };
- mb.b = !0;
- mb.prototype = {
- aa: function(a) {
- var b = this.P;
- a.w(b.x);
- a.w(b.y);
- b = this.V;
- a.w(b.x);
- a.w(b.y);
- a.u(this.Xd.U)
- },
- ea: function(a) {
- var b = this.P;
- b.x = a.A();
- b.y = a.A();
- b = this.V;
- b.x = a.A();
- b.y = a.A();
- a = a.Se();
- this.Xd = 1 == a ? p.ba : 2 == a ? p.ta : p.Ea
- },
- g: mb
- };
- xb.b = !0;
- xb.prototype = {
- aa: function(a) {
- a.w(this.l);
- a.w(this.pa);
- a.w(this.Aa);
- a.w(this.ke);
- a.w(this.Ae);
- a.w(this.Be);
- a.w(this.Id)
- },
- ea: function(a) {
- this.l = a.A();
- this.pa = a.A();
- this.Aa = a.A();
- this.ke = a.A();
- this.Ae = a.A();
- this.Be = a.A();
- this.Id = a.A()
- },
- g: xb
- };
- ub.b = !0;
- ub.prototype = {
- g: ub
- };
- h.b = !0;
- h.ea = function(a) {
- var b = a.K();
- return 255 == b ? (b = new h, b.Wq(a), b) : h.mh()[b]
- };
- h.mh = function() {
- if (null == h.tb) {
- h.tb = [];
- var a = new h;
- a.Oc("Classic", 420, 200, 370, 170, 64, 75);
- h.tb.push(a);
- a = new h;
- a.Oc("Easy", 420, 200, 370, 170, 90, 75);
- h.tb.push(a);
- a = new h;
- a.Oc("Small", 420, 200, 320, 130,
- 55, 70);
- h.tb.push(a);
- a = new h;
- a.Oc("Big", 600, 270, 550, 240, 80, 80);
- h.tb.push(a);
- a = new h;
- a.Oc("Rounded", 420, 200, 370, 170, 64, 75, 75);
- h.tb.push(a);
- a = new h;
- a.dk("Hockey", 420, 204, 398, 182, 68, 120, 75, 100);
- h.tb.push(a);
- a = new h;
- a.dk("Big Hockey", 600, 270, 550, 240, 90, 160, 75, 150);
- h.tb.push(a);
- a = new h;
- a.Oc("Big Easy", 600, 270, 550, 240, 95, 80);
- h.tb.push(a);
- a = new h;
- a.Oc("Big Rounded", 600, 270, 550, 240, 80, 75, 100);
- h.tb.push(a);
- a = new h;
- a.Oc("Huge", 750, 350, 700, 320, 100, 80);
- h.tb.push(a);
- for (var a = 0, b = h.tb.length; a < b;) {
- var c = a++;
- h.tb[c].dh =
- c
- }
- }
- return h.tb
- };
- h.Hm = function(a, b) {
- if (null != a.trait) {
- var c = b[q.N(a.trait, String)];
- if (null != c)
- for (var d = 0, e = Zb.Yl(c); d < e.length;) {
- var f = e[d];
- ++d;
- null == a[f] && (a[f] = c[f])
- }
- }
- };
- h.Om = function(a) {
- if (-1 == a) return ["all"];
- var b = [];
- 0 != (a & 2) && b.push("red");
- 0 != (a & 4) && b.push("blue");
- 0 != (a & 1) && b.push("ball");
- 0 != (a & 8) && b.push("redKO");
- 0 != (a & 16) && b.push("blueKO");
- 0 != (a & 32) && b.push("wall");
- return b
- };
- h.Nc = function(a) {
- a = q.N(a, Array);
- for (var b = 0, c = 0; c < a.length;) switch (a[c++]) {
- case "all":
- b = -1;
- break;
- case "ball":
- b |= 1;
- break;
- case "blue":
- b |= 4;
- break;
- case "blueKO":
- b |= 16;
- break;
- case "red":
- b |= 2;
- break;
- case "redKO":
- b |= 8;
- break;
- case "wall":
- b |= 32
- }
- return b
- };
- h.Rc = function(a, b, c, d) {
- c != d && (a[b] = h.Om(c))
- };
- h.vk = function(a, b, c) {
- b != c && (a.color = h.cn(b))
- };
- h.cn = function(a) {
- return H.yg(a)
- };
- h.zh = function(a) {
- if ("string" == typeof a) return K.parseInt("0x" + K.ge(a));
- if (a instanceof Array && null == a.qb) return ((a[0] | 0) << 16) + ((a[1] | 0) << 8) + (a[2] | 0);
- throw new r("Bad color");
- };
- h.er = function(a) {
- var b = {
- x: a.a.x,
- y: a.a.y
- };
- h.qa(b, "bCoef", a.l, 1);
- h.Rc(b, "cMask",
- a.h, -1);
- h.Rc(b, "cGroup", a.B, 32);
- return b
- };
- h.wo = function(a) {
- var b = new z;
- b.a.x = q.N(a.x, A);
- b.a.y = q.N(a.y, A);
- var c = a.bCoef;
- null != c && (b.l = q.N(c, A));
- c = a.cMask;
- null != c && (b.h = h.Nc(c));
- a = a.cGroup;
- null != a && (b.B = h.Nc(a));
- return b
- };
- h.sq = function(a, b) {
- var c = {
- v0: a.P.fd,
- v1: a.V.fd
- };
- h.qa(c, "bias", a.vc, b.vc);
- h.qa(c, "bCoef", a.l, b.l);
- var d = a.Ln();
- h.qa(c, "curve", d, 0);
- 0 != d && (c.curveF = a.sb);
- h.qa(c, "vis", a.Va, b.Va);
- h.Rc(c, "cMask", a.h, b.h);
- h.Rc(c, "cGroup", a.B, b.B);
- h.vk(c, a.X, b.X);
- return c
- };
- h.vo = function(a, b) {
- var c = new C,
- d = q.N(a.v1, hc);
- c.P = b[q.N(a.v0, hc)];
- c.V = b[d];
- var d = a.bias,
- e = a.bCoef,
- f = a.curve,
- g = a.curveF,
- n = a.vis,
- k = a.cMask,
- l = a.cGroup,
- m = a.color;
- null != d && (c.vc = q.N(d, A));
- null != e && (c.l = q.N(e, A));
- null != g ? c.sb = q.N(g, A) : null != f && c.Ec(q.N(f, A));
- null != n && (c.Va = q.N(n, ic));
- null != k && (c.h = h.Nc(k));
- null != l && (c.B = h.Nc(l));
- null != m && (c.X = h.zh(m));
- return c
- };
- h.pp = function(a) {
- var b = {
- normal: [a.sa.x, a.sa.y],
- dist: a.Oa
- };
- h.qa(b, "bCoef", a.l, 1);
- h.Rc(b, "cMask", a.h, -1);
- h.Rc(b, "cGroup", a.B, 32);
- return b
- };
- h.to = function(a) {
- var b = new I,
- c = q.N(a.normal,
- Array),
- d = q.N(c[0], A),
- c = q.N(c[1], A),
- e = b.sa,
- f = Math.sqrt(d * d + c * c);
- e.x = d / f;
- e.y = c / f;
- b.Oa = q.N(a.dist, A);
- d = a.bCoef;
- c = a.cMask;
- a = a.cGroup;
- null != d && (b.l = q.N(d, A));
- null != c && (b.h = h.Nc(c));
- null != a && (b.B = h.Nc(a));
- return b
- };
- h.Sn = function(a) {
- return {
- p0: [a.P.x, a.P.y],
- p1: [a.V.x, a.V.y],
- team: a.Xd == p.ba ? "red" : "blue"
- }
- };
- h.so = function(a) {
- var b = new mb,
- c = q.N(a.p0, Array),
- d = q.N(a.p1, Array),
- e = b.P;
- e.x = c[0];
- e.y = c[1];
- c = b.V;
- c.x = d[0];
- c.y = d[1];
- switch (a.team) {
- case "blue":
- a = p.ta;
- break;
- case "red":
- a = p.ba;
- break;
- default:
- throw new r("Bad team value");
- }
- b.Xd = a;
- return b
- };
- h.sp = function(a) {
- var b = {};
- h.qa(b, "bCoef", a.l, .5);
- h.qa(b, "invMass", a.pa, .5);
- h.qa(b, "damping", a.Aa, .96);
- h.qa(b, "acceleration", a.ke, .1);
- h.qa(b, "kickingAcceleration", a.Ae, .07);
- h.qa(b, "kickingDamping", a.Be, .96);
- h.qa(b, "kickStrength", a.Id, 5);
- return b
- };
- h.uo = function(a) {
- var b = new xb,
- c = a.bCoef,
- d = a.invMass,
- e = a.damping,
- f = a.acceleration,
- g = a.kickingAcceleration,
- n = a.kickingDamping;
- a = a.kickStrength;
- null != c && (b.l = q.N(c, A));
- null != d && (b.pa = q.N(d, A));
- null != e && (b.Aa = q.N(e, A));
- null != f && (b.ke = q.N(f, A));
- null != g && (b.Ae = q.N(g, A));
- null != n && (b.Be = q.N(n, A));
- null != a && (b.Id = q.N(a, A));
- return b
- };
- h.vj = function(a, b) {
- var c = {};
- if (a.a.x != b.a.x || a.a.y != b.a.y) c.pos = [a.a.x, a.a.y];
- if (a.M.x != b.M.x || a.M.y != b.M.y) c.speed = [a.M.x, a.M.y];
- h.qa(c, "radius", a.la, b.la);
- h.qa(c, "bCoef", a.l, b.l);
- h.qa(c, "invMass", a.pa, b.pa);
- h.qa(c, "damping", a.Aa, b.Aa);
- h.vk(c, a.X, b.X);
- h.Rc(c, "cMask", a.h, b.h);
- h.Rc(c, "cGroup", a.B, b.B);
- return c
- };
- h.ak = function(a, b) {
- var c = a.pos,
- d = a.speed,
- e = a.radius,
- f = a.bCoef,
- g = a.invMass,
- n = a.damping,
- k = a.color,
- l = a.cMask,
- m = a.cGroup;
- if (null != c) {
- var p = b.a;
- p.x = c[0];
- p.y = c[1]
- }
- null != d && (c = b.M, c.x = d[0], c.y = d[1]);
- null != e && (b.la = q.N(e, A));
- null != f && (b.l = q.N(f, A));
- null != g && (b.pa = q.N(g, A));
- null != n && (b.Aa = q.N(n, A));
- null != k && (b.X = h.zh(k));
- null != l && (b.h = h.Nc(l));
- null != m && (b.B = h.Nc(m));
- return b
- };
- h.qa = function(a, b, c, d) {
- c != d && (a[b] = c)
- };
- h.prototype = {
- Dh: function() {
- var a = new ta;
- a.X = 16777215;
- a.h = -1;
- a.B = 1;
- a.la = 10;
- a.Aa = .99;
- a.pa = 1;
- a.l = .5;
- return a
- },
- aa: function(a) {
- a.u(this.dh);
- if (!this.ye()) {
- a.Pb(this.o);
- a.Z(this.Yc);
- a.w(this.Cd);
- a.w(this.Bd);
- a.w(this.Xc);
- a.w(this.Hc);
- a.w(this.ne);
- a.Z(this.fc);
- a.w(this.Rb);
- a.w(this.hc);
- a.w(this.ac);
- this.Od.aa(a);
- this.me.aa(a);
- a.qc(this.Fe);
- a.u(this.oe);
- a.u(this.C.length);
- for (var b = 0, c = this.C.length; b < c;) {
- var d = b++,
- e = this.C[d];
- e.fd = d;
- e.aa(a)
- }
- a.u(this.O.length);
- b = 0;
- for (c = this.O; b < c.length;) c[b++].aa(a);
- a.u(this.ha.length);
- b = 0;
- for (c = this.ha; b < c.length;) c[b++].aa(a);
- a.u(this.kc.length);
- b = 0;
- for (c = this.kc; b < c.length;) c[b++].aa(a);
- a.u(this.J.length);
- b = 0;
- for (c = this.J; b < c.length;) c[b++].aa(a)
- }
- },
- Wq: function(a) {
- this.o =
- a.Ib();
- this.Yc = a.W();
- this.Cd = a.A();
- this.Bd = a.A();
- this.Xc = a.A();
- this.Hc = a.A();
- this.ne = a.A();
- this.fc = a.W();
- this.Rb = a.A();
- this.hc = a.A();
- this.ac = a.A();
- this.Od.ea(a);
- this.me.ea(a);
- this.Fe = a.Zb();
- this.oe = a.K();
- this.sf = 704643072 != (this.fc & -16777216);
- this.C = [];
- for (var b = a.K(), c = 0; c < b;) {
- var d = new z;
- d.ea(a);
- d.fd = c++;
- this.C.push(d)
- }
- this.O = [];
- b = a.K();
- for (c = 0; c < b;) ++c, d = new C, d.ea(a, this.C), this.O.push(d);
- this.ha = [];
- b = a.K();
- for (c = 0; c < b;) ++c, d = new I, d.ea(a), this.ha.push(d);
- this.kc = [];
- b = a.K();
- for (c = 0; c < b;) ++c, d =
- new mb, d.ea(a), this.kc.push(d);
- this.J = [];
- b = a.K();
- for (c = 0; c < b;) ++c, d = new ta, d.ea(a), this.J.push(d);
- this.Pd()
- },
- Pd: function() {
- for (var a = 0, b = this.O; a < b.length;) b[a++].Pd()
- },
- ye: function() {
- return 255 != this.dh
- },
- Jd: function(a, b, c) {
- a = a[b];
- return null != a ? q.N(a, A) : c
- },
- xo: function(a, b, c) {
- a = a[b];
- return null != a ? q.N(a, ic) : c
- },
- $d: function() {
- return JSON.stringify(this.Tq())
- },
- Tq: function() {
- if (!this.sf) throw new r(0);
- for (var a = {}, b = 0, c = [], d = 0, e = this.C; d < e.length;) {
- var f = e[d];
- ++d;
- f.fd = b++;
- c.push(h.er(f))
- }
- d = new C;
- b = [];
- e = 0;
- for (f = this.O; e < f.length;) b.push(h.sq(f[e++], d));
- d = [];
- e = 0;
- for (f = this.ha; e < f.length;) d.push(h.pp(f[e++]));
- for (var e = [], f = 0, g = this.kc; f < g.length;) e.push(h.Sn(g[f++]));
- for (var f = h.sp(this.Od), n = new ta, g = [], k = 0, l = this.J; k < l.length;) g.push(h.vj(l[k++], n));
- n = h.vj(this.me, this.Dh());
- c = {
- name: this.o,
- width: this.Rb,
- height: this.hc,
- bg: a,
- vertexes: c,
- segments: b,
- planes: d,
- goals: e,
- discs: g,
- playerPhysics: f,
- ballPhysics: n
- };
- h.qa(c, "maxViewWidth", this.Fe, 0);
- h.qa(c, "cameraFollow", 1 == this.oe ? "player" : "", "");
- h.qa(c, "spawnDistance",
- this.ac, 200);
- switch (this.Yc) {
- case 1:
- b = "grass";
- break;
- case 2:
- b = "hockey";
- break;
- default:
- b = "none"
- }
- h.qa(a, "type", b, "none");
- h.qa(a, "width", this.Cd, 0);
- h.qa(a, "height", this.Bd, 0);
- h.qa(a, "kickOffRadius", this.Xc, 0);
- h.qa(a, "cornerRadius", this.Hc, 0);
- h.qa(a, "color", this.fc, 7441498);
- h.qa(a, "goalLine", this.ne, 0);
- return c
- },
- $j: function(a) {
- function b(a, b, c) {
- var e = q.N(d[b], Array);
- if (null != e)
- for (var g = 0; g < e.length;) {
- var k = e[g];
- ++g;
- try {
- h.Hm(k, f), a.push(c(k))
- } catch (W) {
- throw new r(new ub('Error in "' + b + '" index: ' + a.length));
- }
- }
- }
- var c = this,
- d = JSON5.parse(a);
- this.C = [];
- this.O = [];
- this.ha = [];
- this.kc = [];
- this.J = [];
- this.o = q.N(d.name, String);
- this.Rb = q.N(d.width, A);
- this.hc = q.N(d.height, A);
- this.Fe = this.Jd(d, "maxViewWidth", 0) | 0;
- "player" == d.cameraFollow && (this.oe = 1);
- this.ac = 200;
- a = d.spawnDistance;
- null != a && (this.ac = q.N(a, A));
- a = d.bg;
- var e;
- switch (a.type) {
- case "grass":
- e = 1;
- break;
- case "hockey":
- e = 2;
- break;
- default:
- e = 0
- }
- this.Yc = e;
- this.Cd = this.Jd(a, "width", 0);
- this.Bd = this.Jd(a, "height", 0);
- this.Xc = this.Jd(a, "kickOffRadius", 0);
- this.Hc = this.Jd(a,
- "cornerRadius", 0);
- this.fc = 7441498;
- null != a.color && (this.fc = h.zh(a.color));
- this.ne = this.Jd(a, "goalLine", 0);
- this.sf = this.xo(d, "canBeStored", !0);
- this.fc = this.fc & 16777215 | (this.sf ? 0 : 42) << 24;
- var f = d.traits;
- b(this.C, "vertexes", h.wo);
- b(this.O, "segments", function(a) {
- return h.vo(a, c.C)
- });
- b(this.kc, "goals", h.so);
- b(this.J, "discs", function(a) {
- return h.ak(a, new ta)
- });
- b(this.ha, "planes", h.to);
- a = d.playerPhysics;
- null != a && (this.Od = h.uo(a));
- a = d.ballPhysics;
- null != a && (this.me = h.ak(a, this.Dh()));
- if (255 < this.C.length ||
- 255 < this.O.length || 255 < this.ha.length || 255 < this.kc.length || 255 < this.J.length) throw new r("Error");
- this.Pd()
- },
- jj: function() {
- var a = h.Rq;
- a.a = 0;
- this.aa(a);
- var b = new Yb;
- b.kr(a.Mb());
- b.hash = (b.hash += b.hash << 3) ^ b.hash >>> 11;
- b.hash += b.hash << 15;
- return b.hash | 0
- },
- Wm: function(a, b) {
- for (var c = 0, d = this.kc; c < d.length;) {
- var e = d[c];
- ++c;
- var f = e.P,
- g = e.V,
- n = b.x - a.x,
- k = b.y - a.y;
- 0 < -(f.y - a.y) * n + (f.x - a.x) * k == 0 < -(g.y - a.y) * n + (g.x - a.x) * k ? f = !1 : (n = g.x - f.x, g = g.y - f.y, f = 0 < -(a.y - f.y) * n + (a.x - f.x) * g == 0 < -(b.y - f.y) * n + (b.x - f.x) * g ? !1 : !0);
- if (f) return e.Xd
- }
- return p.Ea
- },
- Oc: function(a, b, c, d, e, f, g, n) {
- null == n && (n = 0);
- this.o = a;
- this.Rb = b;
- this.hc = c;
- this.Yc = 1;
- this.fc = 7441498;
- this.Cd = d;
- this.Bd = e;
- this.Xc = g;
- this.Hc = n;
- this.ac = .75 * d;
- 400 < this.ac && (this.ac = 400);
- a = new I;
- var k = a.sa;
- k.x = 0;
- k.y = 1;
- a.Oa = -c;
- a.l = 0;
- this.ha.push(a);
- a = new I;
- k = a.sa;
- k.x = 0;
- k.y = -1;
- a.Oa = -c;
- a.l = 0;
- this.ha.push(a);
- a = new I;
- k = a.sa;
- k.x = 1;
- k.y = 0;
- a.Oa = -b;
- a.l = 0;
- this.ha.push(a);
- a = new I;
- k = a.sa;
- k.x = -1;
- k.y = 0;
- a.Oa = -b;
- a.l = 0;
- this.ha.push(a);
- this.If(d, 1, f, 13421823, p.ta);
- this.If(-d, -1, f, 16764108, p.ba);
- this.ek(g, c);
- b = new I;
- c = b.sa;
- c.x = 0;
- c.y = 1;
- b.Oa = -e;
- b.h = 1;
- this.ha.push(b);
- b = new I;
- c = b.sa;
- c.x = 0;
- c.y = -1;
- b.Oa = -e;
- b.h = 1;
- this.ha.push(b);
- b = new z;
- c = b.a;
- c.x = -d;
- c.y = -e;
- b.h = 0;
- c = new z;
- g = c.a;
- g.x = d;
- g.y = -e;
- c.h = 0;
- g = new z;
- a = g.a;
- a.x = d;
- a.y = -f;
- g.h = 0;
- a = new z;
- k = a.a;
- k.x = d;
- k.y = f;
- a.h = 0;
- var k = new z,
- h = k.a;
- h.x = d;
- h.y = e;
- k.h = 0;
- var h = new z,
- l = h.a;
- l.x = -d;
- l.y = e;
- h.h = 0;
- var l = new z,
- m = l.a;
- m.x = -d;
- m.y = f;
- l.h = 0;
- var m = new z,
- q = m.a;
- q.x = -d;
- q.y = -f;
- m.h = 0;
- f = new C;
- f.P = c;
- f.V = g;
- f.h = 1;
- f.Va = !1;
- q = new C;
- q.P = a;
- q.V = k;
- q.h = 1;
- q.Va = !1;
- var r = new C;
- r.P = h;
- r.V = l;
- r.h = 1;
- r.Va = !1;
- var t = new C;
- t.P =
- m;
- t.V = b;
- t.h = 1;
- t.Va = !1;
- this.C.push(b);
- this.C.push(c);
- this.C.push(g);
- this.C.push(a);
- this.C.push(k);
- this.C.push(h);
- this.C.push(l);
- this.C.push(m);
- this.O.push(f);
- this.O.push(q);
- this.O.push(r);
- this.O.push(t);
- this.ck(d, e, n);
- this.Pd()
- },
- dk: function(a, b, c, d, e, f, g, n, k) {
- this.o = a;
- this.Rb = b;
- this.hc = c;
- this.Yc = 2;
- this.Cd = d;
- this.Bd = e;
- this.Xc = n;
- this.Hc = k;
- this.ne = g;
- this.ac = .75 * (d - g);
- 400 < this.ac && (this.ac = 400);
- a = new I;
- var h = a.sa;
- h.x = 0;
- h.y = 1;
- a.Oa = -c;
- a.l = 0;
- this.ha.push(a);
- a = new I;
- h = a.sa;
- h.x = 0;
- h.y = -1;
- a.Oa = -c;
- a.l = 0;
- this.ha.push(a);
- a = new I;
- h = a.sa;
- h.x = 1;
- h.y = 0;
- a.Oa = -b;
- a.l = 0;
- this.ha.push(a);
- a = new I;
- h = a.sa;
- h.x = -1;
- h.y = 0;
- a.Oa = -b;
- a.l = 0;
- this.ha.push(a);
- this.If(d - g, 1, f, 13421823, p.ta, -1);
- this.If(-d + g, -1, f, 16764108, p.ba, -1);
- this.ek(n, c);
- b = new I;
- c = b.sa;
- c.x = 0;
- c.y = 1;
- b.Oa = -e;
- b.h = 1;
- this.ha.push(b);
- b = new I;
- c = b.sa;
- c.x = 0;
- c.y = -1;
- b.Oa = -e;
- b.h = 1;
- this.ha.push(b);
- b = new I;
- c = b.sa;
- c.x = 1;
- c.y = 0;
- b.Oa = -d;
- b.h = 1;
- this.ha.push(b);
- b = new I;
- c = b.sa;
- c.x = -1;
- c.y = 0;
- b.Oa = -d;
- b.h = 1;
- this.ha.push(b);
- this.ck(d, e, k);
- this.Pd()
- },
- If: function(a, b, c, d, e, f, g) {
- null == g && (g = 32);
- null ==
- f && (f = 1);
- var n = new z,
- k = n.a;
- k.x = a + 8 * b;
- k.y = -c;
- var k = new z,
- h = k.a;
- h.x = a + 8 * b;
- h.y = c;
- var l = new z,
- h = l.a;
- h.x = n.a.x + 22 * b;
- h.y = n.a.y + 22;
- var m = new z,
- h = m.a;
- h.x = k.a.x + 22 * b;
- h.y = k.a.y - 22;
- h = new C;
- h.P = n;
- h.V = l;
- h.Ec(90 * b);
- var p = new C;
- p.P = m;
- p.V = l;
- var q = new C;
- q.P = m;
- q.V = k;
- q.Ec(90 * b);
- b = this.C.length;
- this.C.push(n);
- this.C.push(k);
- this.C.push(l);
- this.C.push(m);
- n = b;
- for (b = this.C.length; n < b;) k = n++, this.C[k].h = f, this.C[k].B = g, this.C[k].l = .1;
- b = this.O.length;
- this.O.push(h);
- this.O.push(p);
- this.O.push(q);
- n = b;
- for (b = this.O.length; n <
- b;) k = n++, this.O[k].h = f, this.O[k].B = g, this.O[k].l = .1;
- f = new ta;
- g = f.a;
- g.x = a;
- g.y = -c;
- f.pa = 0;
- f.la = 8;
- f.X = d;
- this.J.push(f);
- f = new ta;
- g = f.a;
- g.x = a;
- g.y = c;
- f.pa = 0;
- f.la = 8;
- f.X = d;
- this.J.push(f);
- d = new mb;
- f = d.P;
- f.x = a;
- f.y = -c;
- f = d.V;
- f.x = a;
- f.y = c;
- d.Xd = e;
- this.kc.push(d)
- },
- ek: function(a, b) {
- var c = new z,
- d = c.a;
- d.x = 0;
- d.y = -b;
- c.l = .1;
- c.B = 24;
- c.h = 6;
- var d = new z,
- e = d.a;
- e.x = 0;
- e.y = -a;
- d.l = .1;
- d.B = 24;
- d.h = 6;
- var e = new z,
- f = e.a;
- f.x = 0;
- f.y = a;
- e.l = .1;
- e.B = 24;
- e.h = 6;
- var f = new z,
- g = f.a;
- g.x = 0;
- g.y = b;
- f.l = .1;
- f.B = 24;
- f.h = 6;
- g = new C;
- g.P = c;
- g.V = d;
- g.B = 24;
- g.h = 6;
- g.Va = !1;
- g.l = .1;
- var n = new C;
- n.P = e;
- n.V = f;
- n.B = 24;
- n.h = 6;
- n.Va = !1;
- n.l = .1;
- var k = new C;
- k.P = d;
- k.V = e;
- k.B = 8;
- k.h = 6;
- k.Va = !1;
- k.Ec(180);
- k.l = .1;
- var h = new C;
- h.P = e;
- h.V = d;
- h.B = 16;
- h.h = 6;
- h.Va = !1;
- h.Ec(180);
- h.l = .1;
- this.C.push(c);
- this.C.push(d);
- this.C.push(e);
- this.C.push(f);
- this.O.push(g);
- this.O.push(n);
- this.O.push(k);
- this.O.push(h)
- },
- ck: function(a, b, c) {
- if (!(0 >= c)) {
- var d = new z,
- e = d.a;
- e.x = -a + c;
- e.y = -b;
- d.h = 0;
- var e = new z,
- f = e.a;
- f.x = -a;
- f.y = -b + c;
- e.h = 0;
- var f = new z,
- g = f.a;
- g.x = -a + c;
- g.y = b;
- f.h = 0;
- var g = new z,
- h = g.a;
- h.x = -a;
- h.y = b - c;
- g.h = 0;
- var h =
- new z,
- k = h.a;
- k.x = a - c;
- k.y = b;
- h.h = 0;
- var k = new z,
- l = k.a;
- l.x = a;
- l.y = b - c;
- k.h = 0;
- var l = new z,
- m = l.a;
- m.x = a - c;
- m.y = -b;
- l.h = 0;
- var m = new z,
- p = m.a;
- p.x = a;
- p.y = -b + c;
- m.h = 0;
- a = new C;
- a.P = d;
- a.V = e;
- a.h = 1;
- a.Va = !1;
- a.l = 1;
- a.Ec(-90);
- b = new C;
- b.P = f;
- b.V = g;
- b.h = 1;
- b.Va = !1;
- b.l = 1;
- b.Ec(90);
- c = new C;
- c.P = h;
- c.V = k;
- c.h = 1;
- c.Va = !1;
- c.l = 1;
- c.Ec(-90);
- p = new C;
- p.P = l;
- p.V = m;
- p.h = 1;
- p.Va = !1;
- p.l = 1;
- p.Ec(90);
- this.C.push(d);
- this.C.push(e);
- this.C.push(f);
- this.C.push(g);
- this.C.push(h);
- this.C.push(k);
- this.C.push(l);
- this.C.push(m);
- this.O.push(a);
- this.O.push(b);
- this.O.push(c);
- this.O.push(p)
- }
- },
- g: h
- };
- ja.b = !0;
- ja.prototype = {
- aa: function(a) {
- a.u(this.Wc);
- a.Z(this.Tc);
- a.u(this.bb.length);
- for (var b = 0, c = this.bb; b < c.length;) a.Z(c[b++])
- },
- ea: function(a) {
- this.Wc = a.K();
- this.Tc = a.W();
- var b = a.K();
- if (3 < b) throw new r("too many");
- this.bb = [];
- for (var c = 0; c < b;) ++c, this.bb.push(a.W())
- },
- g: ja
- };
- p.b = !0;
- p.prototype = {
- g: p
- };
- fa.b = !0;
- fa.he = [rb, Xb];
- fa.bd = function(a, b) {
- a.$b = b.$b;
- if (null == b.F) a.F = null;
- else {
- null == a.F && (a.F = []);
- for (var c = a.F, d = b.F, e = d.length; c.length > e;) c.pop();
- for (var e = 0, f = d.length; e < f;) {
- var g =
- e++;
- c[g] = d[g].ur()
- }
- }
- a.G = null == b.G ? null : b.G.jc();
- a.Fc = b.Fc;
- a.fb = b.fb;
- a.xa = b.xa;
- a.T = b.T;
- a.hb = b.hb
- };
- fa.prototype = {
- Kq: function(a) {
- if (null == this.G) {
- this.G = new sa;
- for (var b = 0, c = this.F; b < c.length;) {
- var d = c[b];
- ++b;
- d.D = null;
- d.Cb = 0
- }
- this.G.ho(this);
- null != this.ji && this.ji(a)
- }
- },
- tf: function(a, b, c) {
- if (b.$ != c) {
- b.$ = c;
- B.remove(this.F, b);
- this.F.push(b);
- if (null != this.G) {
- null != b.D && (B.remove(this.G.wa.J, b.D), b.D = null);
- this.G.Sj(b);
- for (var d = 0, e = !1; !e;) {
- ++d;
- for (var e = !0, f = 0, g = this.F; f < g.length;) {
- var h = g[f];
- ++f;
- if (h != b &&
- h.$ == b.$ && h.Cb == d) {
- e = !1;
- break
- }
- }
- }
- b.Cb = d
- }
- vb.i(this.Mk, a, b, c)
- }
- },
- ka: function(a) {
- for (var b = 0, c = this.F; b < c.length;) {
- var d = c[b];
- ++b;
- if (d.S == a) return d
- }
- return null
- },
- v: function(a) {
- null != this.G && this.G.v(a)
- },
- aa: function(a) {
- a.Pb(this.$b);
- a.u(this.Fc ? 1 : 0);
- a.Z(this.fb);
- a.Z(this.xa);
- this.T.aa(a);
- a.u(null != this.G ? 1 : 0);
- null != this.G && this.G.aa(a);
- a.u(this.F.length);
- for (var b = 0, c = this.F; b < c.length;) c[b++].Ca(a);
- this.hb[1].aa(a);
- this.hb[2].aa(a)
- },
- ea: function(a) {
- this.$b = a.Ib();
- this.Fc = 0 != a.K();
- this.fb = a.W();
- this.xa =
- a.W();
- this.T = h.ea(a);
- var b = 0 != a.K();
- this.G = null;
- b && (this.G = new sa, this.G.ea(a, this));
- for (var b = null == this.G ? null : this.G.wa.J, c = a.K(), d = this.F; d.length > c;) d.pop();
- for (d = 0; d < c;) {
- var e = new ea;
- e.Da(a, b);
- this.F[d++] = e
- }
- this.hb[1].ea(a);
- this.hb[2].ea(a)
- },
- Lj: function() {
- var a = 0,
- b = u.ca();
- this.aa(b);
- for (b = b.Sq(); 4 <= b.m.byteLength - b.a;) a ^= b.W();
- return a
- },
- Jn: function() {
- var a = u.ca(4);
- a.Z(this.Lj());
- return a.ng()
- },
- dn: function(a) {
- a = (new D(new DataView(a))).W();
- x.i(this.vn, this.Lj() != a)
- },
- ul: function(a) {
- this.cl = a
- },
- jc: function() {
- var a = xa.sc,
- b = this.Xb;
- this.Yb != a && (null == b && (this.Xb = b = new fa), this.Yb = a, fa.bd(b, this));
- return b
- },
- g: fa
- };
- ea.b = !0;
- ea.he = [rb];
- ea.mr = function(a, b) {
- a.ra = b.ra;
- a.Cb = b.Cb;
- a.jb = b.jb;
- a.vd = b.vd;
- a.ud = b.ud;
- a.xg = b.xg;
- a.vb = b.vb;
- a.o = b.o;
- a.lb = b.lb;
- a.S = b.S;
- a.bc = b.bc;
- a.D = null == b.D ? null : b.D.jc();
- a.$ = b.$
- };
- ea.prototype = {
- Ca: function(a) {
- a.u(this.ra ? 1 : 0);
- a.Z(this.Cb);
- a.Pb(this.jb);
- a.u(this.vd ? 1 : 0);
- a.Pb(this.ud);
- a.Z(this.xg);
- a.Pb(this.o);
- a.Z(this.lb);
- a.ib(this.S);
- a.u(this.bc ? 1 : 0);
- a.u(this.$.U);
- a.fr(null == this.D ?
- -1 : this.D.yk)
- },
- Da: function(a, b) {
- this.ra = 0 != a.K();
- this.Cb = a.W();
- this.jb = a.Ib();
- this.vd = 0 != a.K();
- this.ud = a.Ib();
- this.xg = a.W();
- this.o = a.Ib();
- this.lb = a.W();
- this.S = a.wb();
- this.bc = 0 != a.K();
- var c = a.Se();
- this.$ = 1 == c ? p.ba : 2 == c ? p.ta : p.Ea;
- c = a.Np();
- this.D = 0 > c ? null : b[c]
- },
- ur: function() {
- var a = xa.sc,
- b = this.km;
- this.sc != a && (null == b && (this.km = b = new ea), this.sc = a, ea.mr(b, this));
- return b
- },
- g: ea
- };
- ra.b = !0;
- ra.na = function(a) {
- var b = new ra;
- b.Bg = a;
- return b
- };
- ra.ua = l;
- ra.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- null != b && this.Bg != b.vd && (b.vd = this.Bg, x.i(a.Hk, b))
- },
- Ca: function(a) {
- a.u(this.Bg ? 1 : 0)
- },
- Da: function(a) {
- this.Bg = 0 != a.K()
- },
- g: ra
- });
- Pa.b = !0;
- Pa.ua = l;
- Pa.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- if (null != b && b.ra) {
- for (var c = a.F, d = [], e = 0, f = 0, g = 0; g < c.length;) {
- var h = c[g];
- ++g;
- h.$ == p.Ea && d.push(h);
- h.$ == p.ba ? ++e : h.$ == p.ta && ++f
- }
- c = d.length;
- 0 != c && (f == e ? 2 > c || (a.tf(b, d[0], p.ba), a.tf(b, d[1], p.ta)) : a.tf(b, d[0], f > e ? p.ba : p.ta))
- }
- },
- Ca: function() {},
- Da: function() {},
- g: Pa
- });
- da.b = !0;
- da.na = function(a, b) {
- var c =
- new da;
- c.Mi = a;
- c.newValue = b;
- return c
- };
- da.ua = l;
- da.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- if (null != b && b.ra && null == a.G) switch (this.Mi) {
- case 0:
- b = this.newValue;
- a.fb = 0 > b ? 0 : 99 < b ? 99 : b;
- break;
- case 1:
- b = this.newValue, a.xa = 0 > b ? 0 : 99 < b ? 99 : b
- }
- },
- Ca: function(a) {
- a.Z(this.Mi);
- a.Z(this.newValue)
- },
- Da: function(a) {
- this.Mi = a.W();
- this.newValue = a.W()
- },
- g: da
- });
- qa.b = !0;
- qa.na = function(a, b) {
- var c = new qa;
- c.wd = a;
- c.Ag = b;
- return c
- };
- qa.ua = l;
- qa.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- if (null !=
- b && b.ra) {
- var c = a.ka(this.wd);
- null != c && 0 != c.S && c.ra != this.Ag && (c.ra = this.Ag, null != a.Nh && a.Nh(b, c))
- }
- },
- Ca: function(a) {
- a.Z(this.wd);
- a.u(this.Ag ? 1 : 0)
- },
- Da: function(a) {
- this.wd = a.W();
- this.Ag = 0 != a.K()
- },
- g: qa
- });
- pa.b = !0;
- pa.na = function(a) {
- var b = new pa;
- b.de = a;
- return b
- };
- pa.ua = l;
- pa.prototype = E(l.prototype, {
- apply: function(a) {
- a = a.ka(this.oa);
- null != a && (a.jb = this.de)
- },
- Ca: function(a) {
- a.Pb(this.de)
- },
- Da: function(a) {
- this.de = a.Ib();
- null != this.de && (this.de = aa.td(this.de, 2))
- },
- g: pa
- });
- Q.b = !0;
- Q.na = function(a, b) {
- var c = new Q;
- c.wd =
- a;
- c.Gi = b;
- return c
- };
- Q.ua = l;
- Q.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa),
- c = a.ka(this.wd);
- if (null != b && null != c) {
- var d = b.ra;
- (d = d || c == b && !a.Fc && null == a.G) && a.tf(b, c, this.Gi)
- }
- },
- Ca: function(a) {
- a.Z(this.wd);
- a.u(this.Gi.U)
- },
- Da: function(a) {
- this.wd = a.W();
- a = a.Se();
- this.Gi = 1 == a ? p.ba : 2 == a ? p.ta : p.Ea
- },
- g: Q
- });
- oa.b = !0;
- oa.na = function(a) {
- var b = new oa;
- b.zd = a;
- return b
- };
- oa.ua = l;
- oa.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- null != b && b.ra && null == a.G && (a.T = this.zd, null != a.hi && a.hi(b, this.zd))
- },
- Ca: function(a) {
- var b = u.ca();
- this.zd.aa(b);
- b = pako.deflateRaw(b.Mb());
- a.qc(b.byteLength);
- a.Ob(b)
- },
- Da: function(a) {
- a = pako.inflateRaw(a.ob(a.Zb()));
- this.zd = h.ea(new D(new DataView(a.buffer, a.byteOffset, a.byteLength)))
- },
- g: oa
- });
- Oa.b = !0;
- Oa.ua = l;
- Oa.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- null != b && b.ra && this.$ != p.Ea && (a.hb[this.$.U] = this.vg)
- },
- Ca: function(a) {
- a.u(this.$.U);
- this.vg.aa(a)
- },
- Da: function(a) {
- var b = a.Se();
- this.$ = 1 == b ? p.ba : 2 == b ? p.ta : p.Ea;
- this.vg = new ja;
- this.vg.ea(a)
- },
- g: Oa
- });
- na.b = !0;
- na.na = function(a) {
- var b = new na;
- b.newValue = a;
- return b
- };
- na.ua = l;
- na.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- null != b && b.ra && (a.Fc = this.newValue)
- },
- Ca: function(a) {
- a.u(this.newValue ? 1 : 0)
- },
- Da: function(a) {
- this.newValue = 0 != a.K()
- },
- g: na
- });
- ma.b = !0;
- ma.na = function(a, b, c, d) {
- var e = new ma;
- e.S = a;
- e.name = b;
- e.zi = c;
- e.jb = d;
- return e
- };
- ma.ua = l;
- ma.prototype = E(l.prototype, {
- apply: function(a) {
- if (0 == this.oa) {
- var b = new ea;
- b.S = this.S;
- b.o = this.name;
- b.ud = this.zi;
- b.jb = this.jb;
- a.F.push(b);
- a = a.Ik;
- null != a && a(b)
- }
- },
- Ca: function(a) {
- a.Z(this.S);
- a.Pb(this.name);
- a.Pb(this.zi);
- a.Pb(this.jb)
- },
- Da: function(a) {
- this.S = a.W();
- this.name = a.Ib();
- this.zi = a.Ib();
- this.jb = a.Ib()
- },
- g: ma
- });
- Na.b = !0;
- Na.ua = l;
- Na.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.G;
- if (null != b) {
- var c = a.ka(this.oa);
- if (null != c && c.ra) {
- var d = 120 == b.Fa,
- e = 0 < b.Fa;
- this.ff ? b.Fa = 120 : 120 == b.Fa && (b.Fa = 119);
- d != this.ff && vb.i(a.Bk, c, this.ff, e)
- }
- }
- },
- Ca: function(a) {
- a.u(this.ff ? 1 : 0)
- },
- Da: function(a) {
- this.ff = 0 != a.K()
- },
- g: Na
- });
- Ma.b = !0;
- Ma.ua = l;
- Ma.prototype = E(l.prototype, {
- jm: function(a) {
- if (null !=
- a.qp) {
- var b = a.ka(this.oa);
- return null == b ? !1 : a.qp(b, this.ef)
- }
- return !0
- },
- apply: function(a) {
- var b = a.ka(this.oa);
- null != b && ha.i(a.Gk, b, this.ef)
- },
- Ca: function(a) {
- a.rc(aa.td(this.ef, 140))
- },
- Da: function(a) {
- this.ef = a.mc();
- if (140 < this.ef.length) throw new r("message too long");
- },
- g: Ma
- });
- Ga.b = !0;
- Ga.ua = l;
- Ga.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- if (null != b) {
- var c = this.input;
- 0 == (b.lb & 16) && 0 != (c & 16) && (b.bc = !0);
- b.lb = c;
- null != a.rp && a.rp(b)
- }
- },
- Ca: function(a) {
- a.pb(this.input)
- },
- Da: function(a) {
- this.input =
- a.eb()
- },
- g: Ga
- });
- la.b = !0;
- la.na = function(a) {
- var b = new la;
- b.Ni = a;
- return b
- };
- la.ua = l;
- la.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- null != b && ha.i(a.Lk, b, this.Ni)
- },
- Ca: function(a) {
- a.u(this.Ni)
- },
- Da: function(a) {
- this.Ni = a.K()
- },
- g: la
- });
- dc.b = !0;
- dc.Ci = function() {
- l.Ta(la);
- l.Ta(Sa);
- l.Ta(Ga);
- l.Ta(Ma);
- l.Ta(ma);
- l.Ta(Y);
- l.Ta(La);
- l.Ta(Ka);
- l.Ta(Na);
- l.Ta(da);
- l.Ta(oa);
- l.Ta(Q);
- l.Ta(na);
- l.Ta(qa);
- l.Ta(Pa);
- l.Ta(ra);
- l.Ta(ka);
- l.Ta(pa);
- l.Ta(Oa)
- };
- Y.b = !0;
- Y.na = function(a, b, c) {
- var d = new Y;
- d.S = a;
- d.Uc = b;
- d.tg = c;
- return d
- };
- Y.ua = l;
- Y.prototype = E(l.prototype, {
- apply: function(a) {
- if (0 != this.S) {
- var b = a.ka(this.oa);
- if (null != b && b.ra) {
- var c = a.ka(this.S);
- null != c && (B.remove(a.F, c), null != a.G && B.remove(a.G.wa.J, c.D), Sb.i(a.Jk, c, this.Uc, this.tg, b))
- }
- }
- },
- Ca: function(a) {
- null != this.Uc && (this.Uc = aa.td(this.Uc, 100));
- a.Z(this.S);
- a.Pb(this.Uc);
- a.u(this.tg ? 1 : 0)
- },
- Da: function(a) {
- this.S = a.W();
- this.Uc = a.Ib();
- this.tg = 0 != a.K();
- if (null != this.Uc && 100 < this.Uc.length) throw new r("string too long");
- },
- g: Y
- });
- La.b = !0;
- La.ua = l;
- La.prototype = E(l.prototype, {
- apply: function(a) {
- var b =
- a.ka(this.oa);
- null != b && b.ra && a.Kq(b, 0)
- },
- Ca: function() {},
- Da: function() {},
- g: La
- });
- Ka.b = !0;
- Ka.ua = l;
- Ka.prototype = E(l.prototype, {
- apply: function(a) {
- var b = a.ka(this.oa);
- if (null != b && b.ra && null != a.G) {
- a.G = null;
- for (var c = 0, d = a.F; c < d.length;) {
- var e = d[c];
- ++c;
- e.D = null;
- e.Cb = 0
- }
- null != a.Ze && a.Ze(b)
- }
- },
- Ca: function() {},
- Da: function() {},
- g: Ka
- });
- ka.b = !0;
- ka.na = function(a) {
- for (var b = new ka, c = a.L.F, d = [], e = 0; e < c.length;) {
- var f = a.qe.get(c[e++].S);
- d.push(null == f ? 0 : f.vb)
- }
- b.ee = d;
- return b
- };
- ka.ua = l;
- ka.prototype = E(l.prototype, {
- apply: function(a) {
- if (0 ==
- this.oa) {
- a = a.F;
- for (var b = 0, c = a.length; b < c;) {
- var d = b++;
- if (d >= this.ee.length) break;
- a[d].vb = this.ee[d]
- }
- }
- },
- Ca: function(a) {
- a.ib(this.ee.length);
- for (var b = 0, c = this.ee; b < c.length;) a.ib(c[b++])
- },
- Da: function(a) {
- this.ee = [];
- for (var b = a.wb(), c = 0; c < b;) ++c, this.ee.push(a.wb())
- },
- g: ka
- });
- X.b = !0;
- X.he = [rb];
- X.bd = function(a, b) {
- a.la = b.la;
- a.l = b.l;
- a.pa = b.pa;
- a.Aa = b.Aa;
- a.X = b.X;
- a.ej = b.ej;
- a.h = b.h;
- a.B = b.B;
- var c = a.a,
- d = b.a;
- c.x = d.x;
- c.y = d.y;
- c = a.M;
- d = b.M;
- c.x = d.x;
- c.y = d.y
- };
- X.prototype = {
- aa: function(a) {
- var b = this.a;
- a.w(b.x);
- a.w(b.y);
- b =
- this.M;
- a.w(b.x);
- a.w(b.y);
- a.w(this.la);
- a.w(this.l);
- a.w(this.pa);
- a.w(this.Aa);
- a.pb(this.X);
- a.Z(this.h);
- a.Z(this.B)
- },
- ea: function(a) {
- var b = this.a;
- b.x = a.A();
- b.y = a.A();
- b = this.M;
- b.x = a.A();
- b.y = a.A();
- this.la = a.A();
- this.l = a.A();
- this.pa = a.A();
- this.Aa = a.A();
- this.X = a.eb();
- this.h = a.W();
- this.B = a.W()
- },
- an: function(a) {
- var b = this.a,
- c = a.a,
- d = b.x - c.x,
- b = b.y - c.y,
- e = a.la + this.la,
- f = d * d + b * b;
- if (0 < f && f <= e * e) {
- var f = Math.sqrt(f),
- d = d / f,
- b = b / f,
- c = this.pa / (this.pa + a.pa),
- e = e - f,
- f = e * c,
- g = this.a,
- h = this.a;
- g.x = h.x + d * f;
- g.y = h.y + b * f;
- h = g = a.a;
- e -=
- f;
- g.x = h.x - d * e;
- g.y = h.y - b * e;
- e = this.M;
- f = a.M;
- e = d * (e.x - f.x) + b * (e.y - f.y);
- 0 > e && (e *= this.l * a.l + 1, c *= e, g = f = this.M, f.x = g.x - d * c, f.y = g.y - b * c, a = f = a.M, c = e - c, f.x = a.x + d * c, f.y = a.y + b * c)
- }
- },
- bn: function(a) {
- var b, c, d;
- if (0 != 0 * a.sb) {
- b = a.P.a;
- var e = a.V.a;
- c = e.x - b.x;
- var f = e.y - b.y,
- g = this.a;
- d = g.x - e.x;
- e = g.y - e.y;
- g = this.a;
- if (0 >= (g.x - b.x) * c + (g.y - b.y) * f || 0 <= d * c + e * f) return;
- c = a.sa;
- b = c.x;
- c = c.y;
- d = b * d + c * e
- } else {
- c = a.Fd;
- d = this.a;
- b = d.x - c.x;
- c = d.y - c.y;
- d = a.kg;
- e = a.lg;
- if ((0 < d.x * b + d.y * c && 0 < e.x * b + e.y * c) == 0 >= a.sb) return;
- e = Math.sqrt(b * b + c * c);
- if (0 ==
- e) return;
- d = e - a.pj;
- b /= e;
- c /= e
- }
- e = a.vc;
- if (0 == e) 0 > d && (d = -d, b = -b, c = -c);
- else if (0 > e && (e = -e, d = -d, b = -b, c = -c), d < -e) return;
- d >= this.la || (d = this.la - d, f = e = this.a, e.x = f.x + b * d, e.y = f.y + c * d, d = this.M, d = b * d.x + c * d.y, 0 > d && (d *= this.l * a.l + 1, e = a = this.M, a.x = e.x - b * d, a.y = e.y - c * d))
- },
- jc: function() {
- var a = xa.sc,
- b = this.Xb;
- this.Yb != a && (null == b && (this.Xb = b = new X), this.Yb = a, X.bd(b, this));
- return b
- },
- g: X
- };
- Fa.b = !0;
- Fa.he = [rb];
- Fa.bd = function(a, b) {
- if (null == b.J) a.J = null;
- else {
- null == a.J && (a.J = []);
- for (var c = a.J, d = b.J, e = d.length; c.length > e;) c.pop();
- for (var e = 0, f = d.length; e < f;) {
- var g = e++;
- c[g] = d[g].jc()
- }
- }
- a.C = b.C;
- a.O = b.O;
- a.ha = b.ha
- };
- Fa.prototype = {
- aa: function(a) {
- a.u(this.J.length);
- for (var b = 0, c = this.J.length; b < c;) {
- var d = b++,
- e = this.J[d];
- e.yk = d;
- e.aa(a)
- }
- },
- ea: function(a) {
- this.J = [];
- for (var b = a.K(), c = 0; c < b;) {
- ++c;
- var d = new X;
- d.ea(a);
- this.J.push(d)
- }
- },
- v: function(a) {
- for (var b = 0, c = this.J; b < c.length;) {
- var d = c[b];
- ++b;
- var e = d.a,
- f = d.a,
- g = d.M;
- e.x = f.x + g.x * a;
- e.y = f.y + g.y * a;
- f = e = d.M;
- d = d.Aa;
- e.x = f.x * d;
- e.y = f.y * d
- }
- a = 0;
- for (b = this.J.length; a < b;) {
- d = a++;
- c = this.J[d];
- d += 1;
- for (e =
- this.J.length; d < e;) f = this.J[d++], 0 != (f.h & c.B) && 0 != (f.B & c.h) && c.an(f);
- if (0 != c.pa) {
- d = 0;
- for (e = this.ha; d < e.length;)
- if (f = e[d], ++d, 0 != (f.h & c.B) && 0 != (f.B & c.h)) {
- var g = f.sa,
- h = c.a,
- g = f.Oa - (g.x * h.x + g.y * h.y) + c.la;
- if (0 < g) {
- var k = h = c.a,
- l = f.sa;
- h.x = k.x + l.x * g;
- h.y = k.y + l.y * g;
- g = c.M;
- h = f.sa;
- g = g.x * h.x + g.y * h.y;
- 0 > g && (g *= c.l * f.l + 1, k = h = c.M, f = f.sa, h.x = k.x - f.x * g, h.y = k.y - f.y * g)
- }
- } d = 0;
- for (e = this.O; d < e.length;) f = e[d], ++d, 0 != (f.h & c.B) && 0 != (f.B & c.h) && c.bn(f);
- d = 0;
- for (e = this.C; d < e.length;)
- if (f = e[d], ++d, 0 != (f.h & c.B) && 0 != (f.B & c.h) && (h = c.a,
- k = f.a, g = h.x - k.x, h = h.y - k.y, k = g * g + h * h, 0 < k && k <= c.la * c.la)) {
- var k = Math.sqrt(k),
- g = g / k,
- h = h / k,
- k = c.la - k,
- m = l = c.a;
- l.x = m.x + g * k;
- l.y = m.y + h * k;
- k = c.M;
- k = g * k.x + h * k.y;
- 0 > k && (k *= c.l * f.l + 1, l = f = c.M, f.x = l.x - g * k, f.y = l.y - h * k)
- }
- }
- }
- },
- jc: function() {
- var a = xa.sc,
- b = this.Xb;
- this.Yb != a && (null == b && (this.Xb = b = new Fa), this.Yb = a, Fa.bd(b, this));
- return b
- },
- g: Fa
- };
- I.b = !0;
- I.prototype = {
- aa: function(a) {
- var b = this.sa;
- a.w(b.x);
- a.w(b.y);
- a.w(this.Oa);
- a.w(this.l);
- a.Z(this.h);
- a.Z(this.B)
- },
- ea: function(a) {
- var b = this.sa;
- b.x = a.A();
- b.y = a.A();
- this.Oa = a.A();
- this.l = a.A();
- this.h = a.W();
- this.B = a.W()
- },
- g: I
- };
- C.b = !0;
- C.prototype = {
- aa: function(a) {
- var b = 0,
- c = a.a;
- a.u(0);
- a.u(this.P.fd);
- a.u(this.V.fd);
- 0 != this.vc && (b = 1, a.w(this.vc));
- this.sb != 1 / 0 && (b |= 2, a.w(this.sb));
- 0 != this.X && (b |= 4, a.Z(this.X));
- this.Va && (b |= 8);
- a.m.setUint8(c, b);
- a.w(this.l);
- a.Z(this.h);
- a.Z(this.B)
- },
- ea: function(a, b) {
- var c = a.K();
- this.P = b[a.K()];
- this.V = b[a.K()];
- this.vc = 0 != (c & 1) ? a.A() : 0;
- this.sb = 0 != (c & 2) ? a.A() : 1 / 0;
- this.X = 0 != (c & 4) ? a.W() : 0;
- this.Va = 0 != (c & 8);
- this.l = a.A();
- this.h = a.W();
- this.B = a.W()
- },
- Ec: function(a) {
- a *=
- .017453292519943295;
- if (0 > a) {
- a = -a;
- var b = this.P;
- this.P = this.V;
- this.V = b;
- this.vc = -this.vc
- }
- a > C.xm && a < C.wm && (this.sb = 1 / Math.tan(a / 2))
- },
- Ln: function() {
- return 0 != 0 * this.sb ? 0 : 114.59155902616465 * Math.atan(1 / this.sb)
- },
- Pd: function() {
- if (0 == 0 * this.sb) {
- var a = this.V.a,
- b = this.P.a,
- c = .5 * (a.x - b.x),
- a = .5 * (a.y - b.y),
- b = this.P.a,
- d = this.sb;
- this.Fd = new L(b.x + c + -a * d, b.y + a + c * d);
- a = this.P.a;
- b = this.Fd;
- c = a.x - b.x;
- a = a.y - b.y;
- this.pj = Math.sqrt(c * c + a * a);
- c = this.P.a;
- a = this.Fd;
- this.kg = new L(-(c.y - a.y), c.x - a.x);
- c = this.Fd;
- a = this.V.a;
- this.lg =
- new L(-(c.y - a.y), c.x - a.x);
- 0 >= this.sb && (a = c = this.kg, c.x = -a.x, c.y = -a.y, a = c = this.lg, c.x = -a.x, c.y = -a.y)
- } else a = this.P.a, b = this.V.a, c = a.x - b.x, a = -(a.y - b.y), b = Math.sqrt(a * a + c * c), this.sa = new L(a / b, c / b)
- },
- g: C
- };
- z.b = !0;
- z.prototype = {
- aa: function(a) {
- var b = this.a;
- a.w(b.x);
- a.w(b.y);
- a.w(this.l);
- a.Z(this.h);
- a.Z(this.B)
- },
- ea: function(a) {
- var b = this.a;
- b.x = a.A();
- b.y = a.A();
- this.l = a.A();
- this.h = a.W();
- this.B = a.W()
- },
- g: z
- };
- N.b = !0;
- N.Gc = function(a) {
- return "rgba(" + [(a & 16711680) >>> 16, (a & 65280) >>> 8, a & 255].join() + ",255)"
- };
- N.gi = function(a,
- b) {
- a.imageSmoothingEnabled = b;
- a.mozImageSmoothingEnabled = b
- };
- N.prototype = {
- Yn: function(a, b) {
- var c = this.Sc.get(a.S);
- if (null != c) switch (b) {
- case 0:
- c.Df = !0;
- break;
- case 1:
- c.Df = !1
- }
- },
- ar: function() {
- if (null != this.ja.parentElement) {
- var a = window.devicePixelRatio * this.cg,
- b = this.ja.getBoundingClientRect(),
- c = Math.round(b.width * a),
- a = Math.round(b.height * a);
- if (this.ja.width != c || this.ja.height != a) this.ja.width = c, this.ja.height = a
- }
- },
- Ac: function(a, b) {
- var c = window.performance.now(),
- d = (c - this.Mc) / 1E3;
- this.Mc = c;
- this.mg.clear();
- this.ar();
- N.gi(this.c, !0);
- this.c.resetTransform();
- if (null != a.G) {
- var c = a.G,
- e = c.wa,
- f = a.ka(b),
- g = null != f ? f.D : null,
- h = 0 != this.Qe ? this.ja.height / this.Qe : this.Re * window.devicePixelRatio * this.cg,
- k = this.af * this.cg,
- l = c.T.Fe,
- m = this.ja.width / h;
- 0 < l && m > l && (m = l, h = this.ja.width / l);
- l = (this.ja.height - k) / h;
- this.Yq(c, g, m, l);
- for (var p = 0, q = a.F; p < q.length;) {
- var r = q[p];
- ++p;
- if (null != r.D) {
- var t = this.Sc.get(r.S);
- null == t && (t = new Ea, this.Sc.set(r.S, t));
- t.v(r, a);
- this.mg.set(r.D, t)
- }
- }
- this.c.translate(this.ja.width / 2, (this.ja.height +
- k) / 2);
- this.c.scale(h, h);
- this.c.translate(-this.ab.x, -this.ab.y);
- this.c.lineWidth = 3;
- this.eq(c.T);
- this.cq(c.T);
- this.Yp(a, m, l);
- this.Zp(a, f);
- null != g && this.aq(g.a);
- this.c.lineWidth = 2;
- f = 0;
- for (g = a.F; f < g.length;) h = g[f], ++f, k = h.D, null != k && this.$k(k, this.Sc.get(h.S));
- f = 0;
- for (e = e.J; f < e.length;) g = e[f], ++f, null == this.mg.get(g) && this.$k(g, null);
- this.c.lineWidth = 3;
- this.c.resetTransform();
- this.c.translate(this.ja.width / 2, this.ja.height / 2);
- this.$p(c);
- 0 >= c.Fa && (this.ed.v(d), this.ed.Ac(this.c));
- this.mg.clear();
- this.Xp(a)
- }
- },
- Xp: function(a) {
- var b = new Set,
- c = 0;
- for (a = a.F; c < a.length;) b.add(a[c++].S);
- c = this.Sc.keys();
- for (a = c.next(); !a.done;) {
- var d = a.value;
- a = c.next();
- if (!b.has(d)) this.Sc["delete"](d)
- }
- },
- Yq: function(a, b, c, d) {
- var e, f;
- if (null != b && 1 == a.T.oe) f = b.a, e = f.x, f = f.y;
- else if (f = a.wa.J[a.ec].a, e = f.x, f = f.y, null != b) {
- var g = b.a;
- e = .5 * (e + g.x);
- f = .5 * (f + g.y);
- var h = .5 * c,
- k = .5 * d;
- b = g.x - h + 50;
- var l = g.y - k + 50,
- h = g.x + h - 50,
- g = g.y + k - 50;
- e = e > h ? h : e < b ? b : e;
- f = f > g ? g : f < l ? l : f
- }
- h = b = this.ab;
- l = h.x;
- h = h.y;
- b.x = l + .04 * (e - l);
- b.y = h + .04 * (f - h);
- this.jn(c, d, a.T)
- },
- jn: function(a,
- b, c) {
- a > 2 * c.Rb ? this.ab.x = 0 : this.ab.x + .5 * a > c.Rb ? this.ab.x = c.Rb - .5 * a : this.ab.x - .5 * a < -c.Rb && (this.ab.x = -c.Rb + .5 * a);
- b > 2 * c.hc ? this.ab.y = 0 : this.ab.y + .5 * b > c.hc ? this.ab.y = c.hc - .5 * b : this.ab.y - .5 * b < -c.hc && (this.ab.y = -c.hc + .5 * b)
- },
- aq: function(a) {
- this.c.beginPath();
- this.c.strokeStyle = "white";
- this.c.globalAlpha = .3;
- this.c.arc(a.x, a.y, 25, 0, 2 * Math.PI, !1);
- this.c.stroke();
- this.c.globalAlpha = 1
- },
- $p: function(a) {
- var b = 0 < a.Fa;
- this.yq(b);
- b && (120 != a.Fa && (a = a.Fa / 120 * 200, this.c.fillStyle = "white", this.c.fillRect(.5 * -a, 100, a, 20)),
- this.ed.np.fq(this.c))
- },
- yq: function(a) {
- this.Tj != a && (this.ja.style.filter = a ? "grayscale(70%)" : "", this.Tj = a)
- },
- il: function(a, b, c, d, e, f) {
- d = b + d;
- e = c + e;
- a.beginPath();
- a.moveTo(d - f, c);
- a.arcTo(d, c, d, c + f, f);
- a.lineTo(d, e - f);
- a.arcTo(d, e, d - f, e, f);
- a.lineTo(b + f, e);
- a.arcTo(b, e, b, e - f, f);
- a.lineTo(b, c + f);
- a.arcTo(b, c, b + f, c, f);
- a.closePath()
- },
- eq: function(a) {
- var b = this;
- N.gi(this.c, !1);
- var c = a.Cd,
- d = a.Bd;
- if (1 == a.Yc) this.c.save(), this.c.resetTransform(), this.c.fillStyle = N.Gc(a.fc), this.c.fillRect(0, 0, this.ja.width, this.ja.height),
- this.c.restore(), this.c.strokeStyle = "#C7E6BD", this.c.fillStyle = this.Un, this.il(this.c, -c, -d, 2 * c, 2 * d, a.Hc), this.c.save(), this.c.scale(2, 2), this.c.fill(), this.c.restore(), this.c.moveTo(0, -d), this.c.lineTo(0, d), this.c.stroke(), this.c.beginPath(), this.c.arc(0, 0, a.Xc, 0, 2 * Math.PI), this.c.stroke();
- else if (2 == a.Yc) {
- this.c.strokeStyle = "#E9CC6E";
- this.c.save();
- this.il(this.c, -c, -d, 2 * c, 2 * d, a.Hc);
- this.c.scale(2, 2);
- this.c.fillStyle = this.fn;
- this.c.fillRect(-1E4, -1E4, 2E4, 2E4);
- this.c.fillStyle = this.hn;
- this.c.fill();
- this.c.restore();
- this.c.stroke();
- this.c.beginPath();
- this.c.moveTo(0, -d);
- this.c.setLineDash([15, 15]);
- this.c.lineTo(0, d);
- this.c.stroke();
- this.c.setLineDash([]);
- var e = a.ne,
- c = c - e;
- e < a.Hc && (c = 0);
- e = function(c, e, h) {
- b.c.beginPath();
- b.c.strokeStyle = c;
- b.c.arc(0, 0, a.Xc, -1.5707963267948966, 1.5707963267948966, h);
- 0 != e && (b.c.moveTo(e, -d), b.c.lineTo(e, d));
- b.c.stroke()
- };
- e("#85ACF3", c, !1);
- e("#E18977", -c, !0)
- } else this.c.save(), this.c.resetTransform(), this.c.fillStyle = N.Gc(a.fc), this.c.fillRect(0, 0, this.ja.width, this.ja.height),
- this.c.restore();
- N.gi(this.c, !0)
- },
- Zp: function(a, b) {
- for (var c = m.s.Qj.I(), d = 0, e = a.F; d < e.length;) {
- var f = e[d];
- ++d;
- var g = f.D;
- if (null != g) {
- var g = g.a,
- h = this.Sc.get(f.S);
- c && h.Df && this.c.drawImage(m.Nl, g.x - .5 * m.Nl.width, g.y - 35);
- f != b && h.Bn(this.c, g.x, g.y + 50)
- }
- }
- },
- $k: function(a, b) {
- this.c.beginPath();
- null == b ? (this.c.fillStyle = N.Gc(a.X), this.c.strokeStyle = "black") : (this.c.fillStyle = b.aj, this.c.strokeStyle = b.wn);
- this.c.beginPath();
- this.c.arc(a.a.x, a.a.y, a.la, 0, 2 * Math.PI, !1);
- if (null != b) {
- this.c.save();
- var c = a.la / 32;
- this.c.translate(a.a.x, a.a.y);
- this.c.scale(c, c);
- this.c.translate(-32, -32);
- this.c.fill();
- this.c.restore()
- } else 2147483647 >= a.X && this.c.fill();
- this.c.stroke()
- },
- cq: function(a) {
- if (null != a) {
- var b = 0;
- for (a = a.O; b < a.length;) this.bq(a[b++])
- }
- },
- bq: function(a) {
- if (a.Va) {
- this.c.beginPath();
- this.c.strokeStyle = N.Gc(a.X);
- var b = a.P.a,
- c = a.V.a;
- if (0 != 0 * a.sb) this.c.moveTo(b.x, b.y), this.c.lineTo(c.x, c.y);
- else {
- a = a.Fd;
- var d = b.x - a.x,
- b = b.y - a.y;
- this.c.arc(a.x, a.y, Math.sqrt(d * d + b * b), Math.atan2(b, d), Math.atan2(c.y - a.y, c.x - a.x))
- }
- this.c.stroke()
- }
- },
- Yp: function(a, b, c) {
- var d = a.G;
- if (null != d)
- for (d = d.wa.J[d.ec], this.Fj(d.a, d.X, b, c), d = 0, a = a.F; d < a.length;) {
- var e = a[d];
- ++d;
- null != e.D && this.Fj(e.D.a, e.$.X, b, c)
- }
- },
- Fj: function(a, b, c, d) {
- c = .5 * c - 25;
- d = .5 * d - 25;
- var e = this.ab,
- f = a.x - e.x,
- e = a.y - e.y,
- g = -c,
- h = -d,
- k = this.ab;
- c = k.x + (f > c ? c : f < g ? g : f);
- d = k.y + (e > d ? d : e < h ? h : e);
- f = a.x - c;
- a = a.y - d;
- 900 < f * f + a * a && (this.c.fillStyle = "rgba(0,0,0,0.5)", this.Gj(c + 2, d + 2, Math.atan2(a, f)), this.c.fillStyle = N.Gc(b), this.Gj(c - 2, d - 2, Math.atan2(a, f)))
- },
- Gj: function(a, b, c) {
- this.c.save();
- this.c.translate(a,
- b);
- this.c.rotate(c);
- this.c.beginPath();
- this.c.moveTo(15, 0);
- this.c.lineTo(0, 7);
- this.c.lineTo(0, -7);
- this.c.closePath();
- this.c.fill();
- this.c.restore()
- },
- jq: function() {
- for (var a = this.Sc.values(), b = a.next(); !b.done;) {
- var c = b.value,
- b = a.next();
- c.Df = !1
- }
- },
- g: N
- };
- P.b = !0;
- P.prototype = {
- In: function() {
- return 2.31 + .1155 * (this.De.length - 1)
- },
- Ac: function(a, b) {
- var c = b / 2.31,
- d = 0;
- a.imageSmoothingEnabled = !0;
- for (var e = 0, f = this.De; e < f.length;) {
- var g = f[e];
- ++e;
- var h = c - .05 * d,
- k = 180 * P.um.eval(h) * (0 != (d & 1) ? -1 : 1);
- a.globalAlpha = P.tm.eval(h);
- a.drawImage(g, k - .5 * g.width, 35 * -(this.De.length - 1) + 70 * d - .5 * g.height);
- a.globalAlpha = 1;
- ++d
- }
- a.imageSmoothingEnabled = !1
- },
- fq: function(a) {
- var b = 0;
- a.imageSmoothingEnabled = !0;
- for (var c = 0, d = this.De; c < d.length;) {
- var e = d[c];
- ++c;
- a.drawImage(e, .5 * -e.width, 35 * -(this.De.length - 1) + 70 * b - .5 * e.height);
- ++b
- }
- a.imageSmoothingEnabled = !1
- },
- Gc: function(a) {
- return "rgba(" + [(a & 16711680) >>> 16, (a & 65280) >>> 8, a & 255].join() + ",255)"
- },
- Bo: function(a, b) {
- var c = window.document.createElement("canvas"),
- d = c.getContext("2d", null);
- d.font = "900 70px Arial Black,Arial Bold,Gadget,sans-serif";
- c.width = Math.ceil(d.measureText(a).width) + 7;
- c.height = 90;
- d.font = "900 70px Arial Black,Arial Bold,Gadget,sans-serif";
- d.textAlign = "left";
- d.textBaseline = "middle";
- d.fillStyle = "black";
- d.fillText(a, 7, 52);
- d.fillStyle = this.Gc(b);
- d.fillText(a, 0, 45);
- return c
- },
- g: P
- };
- Lb.b = !0;
- Lb.prototype = {
- Ga: function(a) {
- this.Ya.push(a)
- },
- Zm: function() {
- this.Ya = [];
- this.pc = 0
- },
- v: function(a) {
- 0 < this.Ya.length && (this.pc += a, this.pc > this.Ya[0].In() && (this.pc = 0, this.Ya.shift()))
- },
- Ac: function(a) {
- 0 < this.Ya.length && this.Ya[0].Ac(a, this.pc)
- },
- g: Lb
- };
- Ea.b = !0;
- Ea.Xm = function(a, b) {
- if (a.Wc != b.Wc || a.Tc != b.Tc) return !1;
- var c = a.bb,
- d = b.bb;
- if (c.length != d.length) return !1;
- for (var e = 0, f = c.length; e < f;) {
- var g = e++;
- if (c[g] != d[g]) return !1
- }
- return !0
- };
- Ea.nn = function(a, b) {
- a.Wc = b.Wc;
- a.Tc = b.Tc;
- a.bb = b.bb.slice(0)
- };
- Ea.prototype = {
- rn: function() {
- var a = window.document.createElement("canvas");
- a.width = 160;
- a.height = 34;
- this.Kk = a.getContext("2d", null)
- },
- $q: function() {
- var a = this.Kk;
- a.resetTransform();
- a.clearRect(0, 0, 160, 34);
- a.font = "26px sans-serif";
- a.fillStyle = "white";
- 160 <
- a.measureText(this.o).width ? (a.textAlign = "left", a.translate(2, 29)) : (a.textAlign = "center", a.translate(80, 29));
- a.fillText(this.o, 0, 0)
- },
- Bn: function(a, b, c) {
- a.drawImage(this.Kk.canvas, 0, 0, 160, 34, b - 40, c - 34, 80, 17)
- },
- v: function(a, b) {
- if (null != a.D) {
- var c = m.s.Hl.I() ? b.hb[a.$.U] : a.$.Gl;
- if (!Ea.Xm(this.hb, c) || null == a.jb && a.Cb != this.Vg || null != a.jb && this.qf != a.jb) Ea.nn(this.hb, c), null == a.jb ? (this.qf = "" + a.Cb, this.Vg = a.Cb) : (this.qf = a.jb, this.Vg = -1), this.Up(this.qf)
- }
- this.wn = 0 >= b.G.Fa && a.bc ? "white" : "black";
- a.o != this.o &&
- (this.o = a.o, this.$q())
- },
- Up: function(a) {
- var b = this.hb.bb;
- if (!(1 > b.length)) {
- this.nb.save();
- this.nb.translate(32, 32);
- this.nb.rotate(3.141592653589793 * this.hb.Wc / 128);
- for (var c = -32, d = 64 / b.length, e = 0; e < b.length;) this.nb.fillStyle = N.Gc(b[e++]), this.nb.fillRect(c, -32, d + 4, 64), c += d;
- this.nb.restore();
- this.nb.fillStyle = N.Gc(this.hb.Tc);
- this.nb.textAlign = "center";
- this.nb.textBaseline = "alphabetic";
- this.nb.font = "900 34px 'Arial Black','Arial Bold',Gadget,sans-serif";
- this.nb.fillText(a, 32, 44);
- this.aj = this.nb.createPattern(this.nb.canvas,
- "no-repeat")
- }
- },
- g: Ea
- };
- lb.b = !0;
- lb.prototype = {
- Ph: function(a) {
- for (var b = this, c = 0, d = Ha.Ya.length >> 2; c < d;) {
- var e = c++,
- f = [e],
- g = Ha.Ya[e << 2],
- e = Ha.Ya[(e << 2) + 1].toLowerCase(),
- h = [window.document.createElement("div")];
- h[0].className = "elem";
- h[0].innerHTML = '<div class="flagico f-' + e + '"></div> ' + g;
- a.appendChild(h[0]);
- h[0].onclick = function(a, c) {
- return function() {
- null != b.Ve && b.Ve.Ba.classList.remove("selected");
- b.Xg.disabled = !1;
- b.Ve = {
- Ba: a[0],
- index: c[0]
- };
- a[0].classList.add("selected")
- }
- }(h, f);
- h[0].ondblclick = function(a) {
- return function() {
- b.ll(a[0])
- }
- }(f)
- }
- },
- ll: function(a) {
- var b = new R;
- b.rb = Ha.Ya[(a << 2) + 1].toLowerCase();
- b.xc = Ha.Ya[(a << 2) + 2];
- b.yc = Ha.Ya[(a << 2) + 3];
- m.s.we.Ra(b);
- y.i(this.mb)
- },
- g: lb
- };
- Da.b = !0;
- Da.jo = function(a) {
- return a.parentElement.querySelector(":hover") == a
- };
- Da.prototype = {
- fa: function(a, b) {
- var c = window.document.createElement("p");
- null != b && (c.className = b);
- c.textContent = a;
- var d = this.Vb.clientHeight,
- d = this.Vb.scrollTop + d - this.Vb.scrollHeight >= .5 * -d || !Da.jo(this.Vb);
- this.Vb.appendChild(c);
- d && (this.Vb.scrollTop = c.offsetTop);
- for (c = d ? 50 : 100; this.Vb.childElementCount >
- c;) this.Vb.firstElementChild.remove();
- this.Yf.update()
- },
- Gb: function(a) {
- this.fa(a, "notice")
- },
- g: Da
- };
- kb.b = !0;
- kb.En = function(a) {
- return -1 != ".$^{[(|)*+?\\".indexOf(a) ? "\\" + a : a
- };
- kb.prototype = {
- sh: function() {
- this.ui(null)
- },
- Sm: function(a, b) {
- var c = this.Vp.exec(B.substr(a, 0, b));
- if (null != c) {
- var d = c[0],
- e = new RegExp(".*" + B.substr(d, 1, null).split("").map(kb.En).join(".*") + ".*", "i");
- this.Uj = "#" == d.charAt(0);
- this.Uh = c.index;
- this.hq = d.length;
- this.al = a;
- this.ui(this.$i.filter(function(a) {
- return e.test(a.o)
- }))
- } else this.ui(null)
- },
- Dj: function(a) {
- a = this.Uj ? "#" + a.U : "@" + H.replace(a.o, " ", "_");
- this.$o(B.substr(this.al, 0, this.Uh) + a + " " + B.substr(this.al, this.Uh + this.hq, null), this.Uh + a.length + 1)
- },
- ui: function(a) {
- var b = this,
- c = null != a && 0 != a.length;
- this.Eb.hidden || t.gf(this.Eb);
- this.Jc = null;
- this.Eb.hidden = !c;
- if (c) {
- for (var c = [], d = 0; d < a.length;) {
- var e = [a[d]];
- ++d;
- var f = window.document.createElement("div"),
- g = e[0].o;
- this.Uj && (g = "(" + e[0].U + ") " + g);
- f.textContent = g;
- this.Eb.appendChild(f);
- f.onclick = function(a) {
- return function() {
- b.Dj(a[0])
- }
- }(e);
- c.push({
- item: e[0],
- Ba: f
- })
- }
- this.Jc = c;
- this.Jc[0].Ba.classList.toggle("selected", !0);
- this.oc = 0
- }
- },
- ij: function(a) {
- if (null != this.Jc) {
- var b = this.oc;
- this.oc += a;
- a = this.Jc.length - 1;
- 0 > this.oc ? this.oc = a : this.oc > a && (this.oc = 0);
- a = this.Jc[this.oc];
- b != this.oc && (a.Ba.classList.toggle("selected", !0), this.Jc[b].Ba.classList.toggle("selected", !1));
- a = a.Ba;
- b = a.offsetTop;
- a = b + a.offsetHeight;
- var c = this.Eb.scrollTop + this.Eb.clientHeight;
- b < this.Eb.scrollTop ? this.Eb.scrollTop = b : a > c && (this.Eb.scrollTop = a - this.Eb.clientHeight)
- }
- },
- zn: function() {
- null != this.Jc && (this.Dj(this.Jc[this.oc].item), this.sh())
- },
- g: kb
- };
- jb.b = !0;
- jb.prototype = {
- wc: function() {
- var a = this.yb.value;
- return 25 >= a.length ? 0 < a.length : !1
- },
- v: function() {
- this.Ie.disabled = !this.wc()
- },
- g: jb
- };
- ib.b = !0;
- ib.prototype = {
- fa: function(a) {
- var b = window.document.createElement("p");
- b.textContent = a;
- this.Vb.appendChild(b)
- },
- g: ib
- };
- hb.b = !0;
- hb.prototype = {
- Yi: function(a) {
- this.Pl = a;
- this.Ol.textContent = "Show in room list: " + (a ? "No" : "Yes")
- },
- wc: function() {
- var a = this.He.value;
- return 40 >= a.length ?
- 0 < a.length : !1
- },
- v: function() {
- this.nj.disabled = !this.wc()
- },
- g: hb
- };
- gb.b = !0;
- gb.prototype = {
- g: gb
- };
- fb.b = !0;
- fb.prototype = {
- jg: function(a) {
- this.f.classList.toggle("restricted", a)
- },
- v: function(a) {
- var b = a.G;
- null != b && (this.pc.Fq(60 * a.xa), this.pc.Eq(b.zc | 0), this.Db.set(b.Db), this.Jb.set(b.Jb), this.zb.Ac(a, this.Hb))
- },
- g: fb
- };
- Kb.b = !0;
- Kb.prototype = {
- Ed: function(a, b) {
- var c = window.document.createElement("span");
- c.textContent = a;
- c.className = b;
- return c
- },
- Eq: function(a) {
- if (a != this.te) {
- var b = a % 60,
- c = a / 60 | 0;
- this.pq.textContent =
- "" + b % 10;
- this.qq.textContent = "" + (b / 10 | 0) % 10;
- this.Ho.textContent = "" + c % 10;
- this.Io.textContent = "" + (c / 10 | 0) % 10;
- this.te = a
- }
- this.Yk();
- this.Zk()
- },
- Fq: function(a) {
- this.xa = a;
- this.Yk();
- this.Zk()
- },
- Yk: function() {
- this.Bq(0 != this.xa && this.te > this.xa)
- },
- Zk: function() {
- this.Gq(this.te < this.xa && this.te > this.xa - 30)
- },
- Bq: function(a) {
- a != this.zj && (this.lp.className = a ? "overtime on" : "overtime", this.zj = a)
- },
- Gq: function(a) {
- a != this.Aj && (this.f.className = a ? "game-timer-view time-warn" : "game-timer-view", this.Aj = a)
- },
- g: Kb
- };
- ia.b = !0;
- ia.prototype = {
- v: function(a) {
- null == a.L.G && this.Ud(!0);
- y.i(this.Nk);
- this.Gh.disabled = null == a.L.G;
- this.rd ? this.Qa.v(a.L, a.L.ka(a.lc)) : (a = a.yf(), this.Ab.v(a), m.Xa.oj.Xr(a))
- },
- Ud: function(a) {
- this.rd != a && ((this.rd = a) ? (this.lh.appendChild(this.Qa.f), this.Ab.f.remove()) : (this.lh.appendChild(this.Ab.f), this.Qa.f.remove()))
- },
- ko: function() {
- return null != ia.tp
- },
- $a: function(a, b) {
- t.gf(this.Pe);
- ia.tp = a;
- null != a ? (this.Pe.style.display = "flex", this.Pe.appendChild(a), this.Nk = b) : (this.Pe.style.display = "none", this.Nk = null)
- },
- g: ia
- };
- eb.b = !0;
- eb.prototype = {
- Ti: function(a) {
- this.bj = a;
- this.Lm.textContent = a ? "Yes" : "No"
- },
- g: eb
- };
- db.b = !0;
- db.prototype = {
- g: db
- };
- cb.b = !0;
- cb.prototype = {
- og: function() {
- this.Mh.disabled = null == this.gb;
- this.tj.disabled = null == this.gb || null == this.gb.Xl;
- this.Ij.disabled = null == this.gb
- },
- fk: function(a, b, c) {
- var d = this,
- e = window.document.createElement("div");
- e.textContent = a;
- e.className = "elem";
- null != c && e.classList.add("custom");
- var f = {
- Ba: e,
- zd: b,
- Xl: c
- };
- e.onclick = function() {
- null != d.gb && d.gb.Ba.classList.remove("selected");
- d.gb = f;
- e.classList.add("selected");
- d.og()
- };
- e.ondblclick = function() {
- d.gb = f;
- d.og();
- return d.Mh.onclick()
- };
- return e
- },
- Ph: function(a) {
- for (var b = this, c = h.mh(), d = 0; d < c.length;) {
- var e = [c[d]];
- ++d;
- e = this.fk(e[0].o, function(a) {
- return function() {
- return Promise.resolve(a[0])
- }
- }(e), null);
- a.appendChild(e)
- }
- Z.getAll().then(function(c) {
- for (var d = 0; d < c.length;) {
- var e = c[d];
- ++d;
- var f = [e.id],
- e = b.fk(e.name, function(a) {
- return function() {
- return Z.get(a[0])
- }
- }(f), function(a) {
- return function() {
- return Z["delete"](a[0])
- }
- }(f));
- a.appendChild(e)
- }
- b.Yf.update()
- })
- },
- g: cb
- };
- Jb.b = !0;
- Jb.prototype = {
- Em: function(a) {
- 0 > a ? (a = 150, this.c.fillStyle = "#c13535") : this.c.fillStyle = "green";
- var b = this.vi,
- c = this.Pj,
- d = this.bh++;
- this.bh >= b && (this.bh = 0);
- this.op[d] = a;
- this.c.clearRect(d, 0, 1, c);
- a = a * c / this.Eo;
- this.c.fillRect(d, c - a, 1, a);
- this.gh.clearRect(0, 0, b, c);
- this.gh.drawImage(this.ja, b - d - 1, 0);
- this.gh.drawImage(this.ja, -d - 1, 0)
- },
- g: Jb
- };
- bb.b = !0;
- bb.prototype = {
- v: function(a, b) {
- var c = a.ka(this.Hb);
- null == c ? y.i(this.mb) : (this.Zq(c), this.mf.disabled = !b || 0 == this.Hb, this.ze.disabled = !b || 0 == this.Hb)
- },
- Zq: function(a) {
- this.Nd != a.o && this.Xi(a.o);
- this.Fk != a.ra && this.Wi(a.ra)
- },
- Xi: function(a) {
- this.Nd = a;
- this.Ge.textContent = a
- },
- Wi: function(a) {
- this.Fk = a;
- this.mf.textContent = a ? "Remove Admin" : "Give Admin"
- },
- g: bb
- };
- ab.b = !0;
- ab.prototype = {
- v: function(a, b) {
- this.f.draggable = b;
- this.vb != a.vb && (this.vb = a.vb, this.Uf.textContent = "" + this.vb);
- this.Fm != a.ra && this.pl(a.ra)
- },
- pl: function(a) {
- this.Fm = a;
- this.f.className = "player-list-item" + (a ? " admin" : "")
- },
- g: ab
- };
- za.b = !0;
- za.prototype = {
- v: function(a, b, c, d) {
- var e = this;
- this.xh.disabled =
- b || c;
- this.Xh.disabled = c;
- b = new Set;
- c = this.jd.keys();
- for (var f = c.next(); !f.done;) {
- var g = f.value,
- f = c.next();
- b.add(g)
- }
- for (c = 0; c < a.length;) f = a[c], ++c, g = this.jd.get(f.S), null == g && (g = new ab(f), g.Ne = function(a) {
- x.i(e.Ne, a)
- }, this.jd.set(f.S, g), this.Ya.appendChild(g.f)), g.v(f, d), b["delete"](f.S);
- d = b.values();
- for (b = d.next(); !b.done;) c = b.value, b = d.next(), this.jd.get(c).f.remove(), this.jd["delete"](c);
- d = 0;
- for (b = a.length - 1; d < b;) f = d++, c = this.jd.get(a[f].S).f, f = this.jd.get(a[f + 1].S).f, c.nextSibling != f && this.Ya.insertBefore(c,
- f)
- },
- g: za
- };
- O.b = !0;
- O.prototype = {
- g: O
- };
- ga.b = !0;
- ga.jk = function(a) {
- a = a / 1E3 | 0;
- return (a / 60 | 0) + ":" + H.df(K.ge(a % 60))
- };
- ga.prototype = {
- v: function() {
- this.Qq.textContent = ga.jk(this.Vh.Kb);
- this.Kp.style.width = 100 * this.Vh.Pn() + "%";
- !this.Cf || 0 < this.Vh.qd || (this.Cf = !1, this.cp())
- },
- g: ga
- };
- $a.b = !0;
- $a.prototype = {
- zq: function(a) {
- this.yj != a && (this.yj = a, this.Ff.value = a)
- },
- g: $a
- };
- Za.b = !0;
- Za.prototype = {
- g: Za
- };
- Aa.b = !0;
- Aa.Mr = function(a) {
- return Promise.race([new Promise(function(a, c) {
- return window.setTimeout(function() {
- c(null)
- }, 5E3)
- }),
- a
- ])
- };
- Aa.prototype = {
- $l: function() {
- function a() {
- b.Ki.disabled = !1;
- b.mm(c)
- }
- var b = this;
- this.om(null);
- this.Ki.disabled = !0;
- t.gf(this.Di);
- var c = [];
- this.Ai = [];
- Aa.Mr(ua.get().then(function(a) {
- return c = a
- }, function() {
- return {}
- })).then(a, a)
- },
- mm: function(a) {
- var b = this;
- this.Ai = a;
- ua.Tr(this.tr, a);
- a.sort(function(a, b) {
- return a.ue - b.ue
- });
- t.gf(this.Di);
- for (var c = 0, d = 0, e = !this.sr.Na, f = !this.Lr.Na, g = 0; g < a.length;) {
- var h = [a[g]];
- ++g;
- var k = h[0].gd;
- if (!(e && k.F >= k.Ee || f && k.Bb)) {
- var l = [new Za(h[0])];
- l[0].Ba.ondblclick = function(a) {
- return function() {
- x.i(b.im,
- a[0])
- }
- }(h);
- l[0].Ba.onclick = function(a) {
- return function() {
- b.om(a[0])
- }
- }(l);
- this.Di.appendChild(l[0].Ba);
- c += k.F;
- ++d
- }
- }
- this.pr.textContent = "" + c + " players in " + d + " rooms";
- this.Nr.update()
- },
- om: function(a) {
- null != this.yd && this.yd.Ba.classList.remove("selected");
- this.yd = a;
- null != this.yd && this.yd.Ba.classList.add("selected");
- this.dm.disabled = null == this.yd
- },
- g: Aa
- };
- Ya.b = !0;
- Ya.prototype = {
- Xk: function() {
- var a = this;
- M.Kj(m.nf + "api/notice").then(function(b) {
- var c = b.content;
- null != c && "" != c && Ya.$m != c && (a.mn.innerHTML = c,
- a.kk.hidden = !1, a.Zc.onclick = function() {
- Ya.$m = c;
- return a.kk.hidden = !0
- })
- })
- },
- g: Ya
- };
- Xa.b = !0;
- Xa.prototype = {
- wc: function() {
- var a = this.yb.value;
- return 30 >= a.length ? 0 < a.length : !1
- },
- v: function() {
- this.Ie.disabled = !this.wc()
- },
- g: Xa
- };
- Wa.b = !0;
- Wa.prototype = {
- vh: function(a, b, c, d) {
- var e = this;
- t.fe(a, b.f);
- b.Qf = function(a, b) {
- ha.i(e.Qf, a, b)
- };
- b.Ld = function(a) {
- x.i(e.Ld, a)
- };
- b.To = function(a) {
- ha.i(e.Qf, d, a)
- };
- b.Ne = function(a) {
- x.i(e.Ne, a)
- }
- },
- gk: function(a) {
- for (var b = [], c = 0; c < a;) {
- var d = c++;
- b.push(null == d ? "null" : "" + d)
- }
- return b
- },
- hk: function(a,
- b) {
- for (var c = 0; c < b.length;) {
- var d = b[c++],
- e = window.document.createElement("option");
- e.textContent = d;
- a.appendChild(e)
- }
- },
- Dq: function(a) {
- this.Uk.classList.toggle("active", a)
- },
- v: function(a, b) {
- this.gq != a.$b && (this.gq = a.$b, this.$b.textContent = a.$b);
- var c = null == b ? !1 : b.ra;
- this.xj != c && (this.f.className = "room-view" + (c ? " admin" : ""), this.xj = c);
- var d = !c || null != a.G;
- this.$e.disabled = d;
- this.Ue.disabled = d;
- this.Cl.disabled = d;
- d = null != a.G;
- this.Dl.hidden = d;
- this.Fl.hidden = !d;
- this.Lh.hidden = !d;
- this.$e.selectedIndex = a.xa;
- this.Ue.selectedIndex = a.fb;
- this.Bl.textContent = a.T.o;
- this.Bl.classList.toggle("custom", !a.T.ye());
- var e = a.Fc;
- this.Wk.v(a.F.filter(function(a) {
- return a.$ == p.ba
- }), e, d, c);
- this.dj.v(a.F.filter(function(a) {
- return a.$ == p.ta
- }), e, d, c);
- this.Al.v(a.F.filter(function(a) {
- return a.$ == p.Ea
- }), e, d, c);
- this.el.disabled = d;
- this.Ah != a.Fc && this.Ui(a.Fc);
- d && (c = 120 == a.G.Fa, this.Ak != c && this.Vi(c))
- },
- Ui: function(a) {
- this.Ah = a;
- this.bk.innerHTML = this.Ah ? "<i class='icon-lock'></i>Unlock" : "<i class='icon-lock-open'></i>Lock"
- },
- Vi: function(a) {
- this.Ak =
- a;
- this.Lh.innerHTML = "<i class='icon-pause'></i>" + (this.Ak ? "Resume (P)" : "Pause (P)")
- },
- g: Wa
- };
- ba.b = !0;
- ba.prototype = {
- g: ba
- };
- T.b = !0;
- T.prototype = {
- g: T
- };
- Va.b = !0;
- Va.prototype = {
- Cq: function(a) {
- this.Uf.textContent = null == a ? "null" : "" + a
- },
- Aq: function(a) {
- this.Fo.textContent = "" + a
- },
- sl: function(a) {
- this.Fn.textContent = null == a ? "null" : "" + a
- },
- g: Va
- };
- Ua.b = !0;
- Ua.prototype = {
- g: Ua
- };
- r.b = !0;
- r.ua = Error;
- r.prototype = E(Error.prototype, {
- g: r
- });
- q.b = !0;
- q.Zl = function(a) {
- if (a instanceof Array && null == a.qb) return Array;
- var b = a.g;
- if (null != b) return b;
- a = q.Pi(a);
- return null != a ? q.Cm(a) : null
- };
- q.je = function(a, b) {
- if (null == a) return "null";
- if (5 <= b.length) return "<...>";
- var c = typeof a;
- "function" == c && (a.b || a.lf) && (c = "object");
- switch (c) {
- case "function":
- return "<function>";
- case "object":
- if (a.qb) {
- var d = tb[a.qb],
- c = d.Og[a.ub],
- e = d[c];
- if (e.ie) {
- b += "\t";
- for (var c = c + "(", d = [], f = 0, e = e.ie; f < e.length;) {
- var g = e[f];
- ++f;
- d.push(q.je(a[g], b))
- }
- return c + d.join(",") + ")"
- }
- return c
- }
- if (a instanceof Array) {
- c = a.length;
- d = "[";
- b += "\t";
- for (f = 0; f < c;) e = f++, d += (0 < e ? "," : "") + q.je(a[e], b);
- return d +
- "]"
- }
- try {
- d = a.toString
- } catch (n) {
- return "???"
- }
- if (null != d && d != Object.toString && "function" == typeof d && (c = a.toString(), "[object Object]" != c)) return c;
- c = null;
- d = "{\n";
- b += "\t";
- f = null != a.hasOwnProperty;
- for (c in a) f && !a.hasOwnProperty(c) || "prototype" == c || "__class__" == c || "__super__" == c || "__interfaces__" == c || "__properties__" == c || (2 != d.length && (d += ", \n"), d += b + c + " : " + q.je(a[c], b));
- b = b.substring(1);
- return d + ("\n" + b + "}");
- case "string":
- return a;
- default:
- return String(a)
- }
- };
- q.Qg = function(a, b) {
- if (null == a) return !1;
- if (a ==
- b) return !0;
- var c = a.he;
- if (null != c)
- for (var d = 0, e = c.length; d < e;) {
- var f = c[d++];
- if (f == b || q.Qg(f, b)) return !0
- }
- return q.Qg(a.ua, b)
- };
- q.Am = function(a, b) {
- if (null == b) return !1;
- switch (b) {
- case Array:
- return a instanceof Array ? null == a.qb : !1;
- case ic:
- return "boolean" == typeof a;
- case mc:
- return !0;
- case A:
- return "number" == typeof a;
- case hc:
- return "number" == typeof a ? (a | 0) === a : !1;
- case String:
- return "string" == typeof a;
- default:
- if (null != a)
- if ("function" == typeof b) {
- if (a instanceof b || q.Qg(q.Zl(a), b)) return !0
- } else {
- if ("object" == typeof b &&
- q.Bm(b) && a instanceof b) return !0
- }
- else return !1;
- return b == nc && null != a.b || b == oc && null != a.lf ? !0 : tb[a.qb] == b
- }
- };
- q.N = function(a, b) {
- if (q.Am(a, b)) return a;
- throw new r("Cannot cast " + K.ge(a) + " to " + K.ge(b));
- };
- q.Pi = function(a) {
- a = q.Dm.call(a).slice(8, -1);
- return "Object" == a || "Function" == a || "Math" == a || "JSON" == a ? null : a
- };
- q.Bm = function(a) {
- return null != q.Pi(a)
- };
- q.Cm = function(a) {
- return kc[a]
- };
- bc.b = !0;
- bc.Ur = function(a, b) {
- var c = new Uint8Array(this, a, null == b ? null : b - a),
- d = new Uint8Array(c.byteLength);
- d.set(c);
- return d.buffer
- };
- var lc = 0;
- null == String.fromCodePoint && (String.fromCodePoint = function(a) {
- return 65536 > a ? String.fromCharCode(a) : String.fromCharCode((a >> 10) + 55232) + String.fromCharCode((a & 1023) + 56320)
- });
- String.prototype.g = String;
- String.b = !0;
- Array.b = !0;
- Date.prototype.g = Date;
- Date.b = "Date";
- var hc = {},
- mc = {},
- A = Number,
- ic = Boolean,
- nc = {},
- oc = {};
- p.Ea = new p(0, 16777215, 0, -1, "Spectators", "t-spec", 0, 0);
- p.ba = new p(1, 15035990, -1, 8, "Red", "t-red", 0, 2);
- p.ta = new p(2, 5671397, 1, 16, "Blue", "t-blue", 0, 4);
- p.Ea.Tf = p.Ea;
- p.ba.Tf = p.ta;
- p.ta.Tf = p.ba;
- Object.defineProperty(r.prototype, "message", {
- get: function() {
- return String(this.Na)
- }
- });
- null == ArrayBuffer.prototype.slice && (ArrayBuffer.prototype.slice = bc.Ur);
- Ta.kn = {
- mandatory: {
- OfferToReceiveAudio: !1,
- OfferToReceiveVideo: !1
- }
- };
- G.Rg = {
- name: "ECDSA",
- namedCurve: "P-256"
- };
- G.vl = {
- name: "ECDSA",
- hash: {
- name: "SHA-256"
- }
- };
- Ba.co = ["click-rail", "drag-thumb", "wheel", "touch"];
- l.bm = new Map;
- l.bf = 0;
- Sa.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- xa.sc = 0;
- Tb.Wl = [{
- name: "ro",
- reliable: !0,
- Hi: !0
- }, {
- name: "ru",
- reliable: !0,
- Hi: !1
- }, {
- name: "uu",
- reliable: !1,
- Hi: !1
- }];
- M.vm = "application/x-www-form-urlencoded";
- Ha.Ya = ["Afghanistan", "AF", 33.3, 65.1, "Albania", "AL", 41.1, 20.1, "Algeria", "DZ", 28, 1.6, "American Samoa", "AS", -14.2, -170.1, "Andorra", "AD", 42.5, 1.6, "Angola", "AO", -11.2, 17.8, "Anguilla", "AI", 18.2, -63, "Antigua and Barbuda", "AG", 17, -61.7, "Argentina", "AR", -34.5, -58.4, "Armenia", "AM", 40, 45, "Aruba", "AW", 12.5, -69.9, "Australia", "AU", -25.2, 133.7, "Austria", "AT", 47.5, 14.5, "Azerbaijan", "AZ", 40.1, 47.5, "Bahamas", "BS", 25, -77.3, "Bahrain", "BH", 25.9, 50.6, "Bangladesh", "BD", 23.6, 90.3,
- "Barbados", "BB", 13.1, -59.5, "Belarus", "BY", 53.7, 27.9, "Belgium", "BE", 50.5, 4.4, "Belize", "BZ", 17.1, -88.4, "Benin", "BJ", 9.3, 2.3, "Bermuda", "BM", 32.3, -64.7, "Bhutan", "BT", 27.5, 90.4, "Bolivia", "BO", -16.2, -63.5, "Bosnia and Herzegovina", "BA", 43.9, 17.6, "Botswana", "BW", -22.3, 24.6, "Bouvet Island", "BV", -54.4, 3.4, "Brazil", "BR", -14.2, -51.9, "British Indian Ocean Territory", "IO", -6.3, 71.8, "British Virgin Islands", "VG", 18.4, -64.6, "Brunei", "BN", 4.5, 114.7, "Bulgaria", "BG", 42.7, 25.4, "Burkina Faso", "BF", 12.2, -1.5, "Burundi",
- "BI", -3.3, 29.9, "Cambodia", "KH", 12.5, 104.9, "Cameroon", "CM", 7.3, 12.3, "Canada", "CA", 56.1, -106.3, "Cape Verde", "CV", 16, -24, "Cayman Islands", "KY", 19.5, -80.5, "Central African Republic", "CF", 6.6, 20.9, "Chad", "TD", 15.4, 18.7, "Chile", "CL", -35.6, -71.5, "China", "CN", 35.8, 104.1, "Christmas Island", "CX", -10.4, 105.6, "Colombia", "CO", 4.5, -74.2, "Comoros", "KM", -11.8, 43.8, "Congo [DRC]", "CD", -4, 21.7, "Congo [Republic]", "CG", -.2, 15.8, "Cook Islands", "CK", -21.2, -159.7, "Costa Rica", "CR", 9.7, -83.7, "Croatia", "HR", 45.1, 15.2, "Cuba",
- "CU", 21.5, -77.7, "Cyprus", "CY", 35.1, 33.4, "Czech Republic", "CZ", 49.8, 15.4, "C\u00f4te d'Ivoire", "CI", 7.5, -5.5, "Denmark", "DK", 56.2, 9.5, "Djibouti", "DJ", 11.8, 42.5, "Dominica", "DM", 15.4, -61.3, "Dominican Republic", "DO", 18.7, -70.1, "Ecuador", "EC", -1.8, -78.1, "Egypt", "EG", 26.8, 30.8, "El Salvador", "SV", 13.7, -88.8, "Equatorial Guinea", "GQ", 1.6, 10.2, "Eritrea", "ER", 15.1, 39.7, "Estonia", "EE", 58.5, 25, "Ethiopia", "ET", 9.1, 40.4, "Faroe Islands", "FO", 61.8, -6.9, "Fiji", "FJ", -16.5, 179.4, "Finland", "FI", 61.9, 25.7, "France", "FR",
- 46.2, 2.2, "French Guiana", "GF", 3.9, -53.1, "French Polynesia", "PF", -17.6, -149.4, "Gabon", "GA", -.8, 11.6, "Gambia", "GM", 13.4, -15.3, "Georgia", "GE", 42.3, 43.3, "Germany", "DE", 51.1, 10.4, "Ghana", "GH", 7.9, -1, "Gibraltar", "GI", 36.1, -5.3, "Greece", "GR", 39, 21.8, "Greenland", "GL", 71.7, -42.6, "Grenada", "GD", 12.2, -61.6, "Guadeloupe", "GP", 16.9, -62, "Guam", "GU", 13.4, 144.7, "Guatemala", "GT", 15.7, -90.2, "Guinea", "GN", 9.9, -9.6, "Guinea-Bissau", "GW", 11.8, -15.1, "Guyana", "GY", 4.8, -58.9, "Haiti", "HT", 18.9, -72.2, "Honduras", "HN", 15.1, -86.2,
- "Hong Kong", "HK", 22.3, 114.1, "Hungary", "HU", 47.1, 19.5, "Iceland", "IS", 64.9, -19, "India", "IN", 20.5, 78.9, "Indonesia", "ID", -.7, 113.9, "Iran", "IR", 32.4, 53.6, "Iraq", "IQ", 33.2, 43.6, "Ireland", "IE", 53.4, -8.2, "Israel", "IL", 31, 34.8, "Italy", "IT", 41.8, 12.5, "Jamaica", "JM", 18.1, -77.2, "Japan", "JP", 36.2, 138.2, "Jordan", "JO", 30.5, 36.2, "Kazakhstan", "KZ", 48, 66.9, "Kenya", "KE", -0, 37.9, "Kiribati", "KI", -3.3, -168.7, "Kosovo", "XK", 42.6, 20.9, "Kuwait", "KW", 29.3, 47.4, "Kyrgyzstan", "KG", 41.2, 74.7, "Laos", "LA", 19.8, 102.4, "Latvia", "LV",
- 56.8, 24.6, "Lebanon", "LB", 33.8, 35.8, "Lesotho", "LS", -29.6, 28.2, "Liberia", "LR", 6.4, -9.4, "Libya", "LY", 26.3, 17.2, "Liechtenstein", "LI", 47.1, 9.5, "Lithuania", "LT", 55.1, 23.8, "Luxembourg", "LU", 49.8, 6.1, "Macau", "MO", 22.1, 113.5, "Macedonia [FYROM]", "MK", 41.6, 21.7, "Madagascar", "MG", -18.7, 46.8, "Malawi", "MW", -13.2, 34.3, "Malaysia", "MY", 4.2, 101.9, "Maldives", "MV", 3.2, 73.2, "Mali", "ML", 17.5, -3.9, "Malta", "MT", 35.9, 14.3, "Marshall Islands", "MH", 7.1, 171.1, "Martinique", "MQ", 14.6, -61, "Mauritania", "MR", 21, -10.9, "Mauritius",
- "MU", -20.3, 57.5, "Mayotte", "YT", -12.8, 45.1, "Mexico", "MX", 23.6, -102.5, "Micronesia", "FM", 7.4, 150.5, "Moldova", "MD", 47.4, 28.3, "Monaco", "MC", 43.7, 7.4, "Mongolia", "MN", 46.8, 103.8, "Montenegro", "ME", 42.7, 19.3, "Montserrat", "MS", 16.7, -62.1, "Morocco", "MA", 31.7, -7, "Mozambique", "MZ", -18.6, 35.5, "Myanmar [Burma]", "MM", 21.9, 95.9, "Namibia", "NA", -22.9, 18.4, "Nauru", "NR", -.5, 166.9, "Nepal", "NP", 28.3, 84.1, "Netherlands", "NL", 52.1, 5.2, "Netherlands Antilles", "AN", 12.2, -69, "New Caledonia", "NC", -20.9, 165.6, "New Zealand", "NZ",
- -40.9, 174.8, "Nicaragua", "NI", 12.8, -85.2, "Niger", "NE", 17.6, 8, "Nigeria", "NG", 9, 8.6, "Niue", "NU", -19, -169.8, "Norfolk Island", "NF", -29, 167.9, "North Korea", "KP", 40.3, 127.5, "Northern Mariana Islands", "MP", 17.3, 145.3, "Norway", "NO", 60.4, 8.4, "Oman", "OM", 21.5, 55.9, "Pakistan", "PK", 30.3, 69.3, "Palau", "PW", 7.5, 134.5, "Palestinian Territories", "PS", 31.9, 35.2, "Panama", "PA", 8.5, -80.7, "Papua New Guinea", "PG", -6.3, 143.9, "Paraguay", "PY", -23.4, -58.4, "Peru", "PE", -9.1, -75, "Philippines", "PH", 12.8, 121.7, "Pitcairn Islands",
- "PN", -24.7, -127.4, "Poland", "PL", 51.9, 19.1, "Portugal", "PT", 39.3, -8.2, "Puerto Rico", "PR", 18.2, -66.5, "Qatar", "QA", 25.3, 51.1, "Romania", "RO", 45.9, 24.9, "Russia", "RU", 61.5, 105.3, "Rwanda", "RW", -1.9, 29.8, "R\u00e9union", "RE", -21.1, 55.5, "Saint Helena", "SH", -24.1, -10, "Saint Kitts", "KN", 17.3, -62.7, "Saint Lucia", "LC", 13.9, -60.9, "Saint Pierre", "PM", 46.9, -56.2, "Saint Vincent", "VC", 12.9, -61.2, "Samoa", "WS", -13.7, -172.1, "San Marino", "SM", 43.9, 12.4, "Saudi Arabia", "SA", 23.8, 45, "Senegal", "SN", 14.4, -14.4, "Serbia", "RS",
- 44, 21, "Seychelles", "SC", -4.6, 55.4, "Sierra Leone", "SL", 8.4, -11.7, "Singapore", "SG", 1.3, 103.8, "Slovakia", "SK", 48.6, 19.6, "Slovenia", "SI", 46.1, 14.9, "Solomon Islands", "SB", -9.6, 160.1, "Somalia", "SO", 5.1, 46.1, "South Africa", "ZA", -30.5, 22.9, "South Georgia", "GS", -54.4, -36.5, "South Korea", "KR", 35.9, 127.7, "Spain", "ES", 40.4, -3.7, "Sri Lanka", "LK", 7.8, 80.7, "Sudan", "SD", 12.8, 30.2, "Suriname", "SR", 3.9, -56, "Svalbard and Jan Mayen", "SJ", 77.5, 23.6, "Swaziland", "SZ", -26.5, 31.4, "Sweden", "SE", 60.1, 18.6, "Switzerland", "CH",
- 46.8, 8.2, "Syria", "SY", 34.8, 38.9, "S\u00e3o Tom\u00e9 and Pr\u00edncipe", "ST", .1, 6.6, "Taiwan", "TW", 23.6, 120.9, "Tajikistan", "TJ", 38.8, 71.2, "Tanzania", "TZ", -6.3, 34.8, "Thailand", "TH", 15.8, 100.9, "Timor-Leste", "TL", -8.8, 125.7, "Togo", "TG", 8.6, .8, "Tokelau", "TK", -8.9, -171.8, "Tonga", "TO", -21.1, -175.1, "Trinidad and Tobago", "TT", 10.6, -61.2, "Tunisia", "TN", 33.8, 9.5, "Turkey", "TR", 38.9, 35.2, "Turkmenistan", "TM", 38.9, 59.5, "Turks and Caicos Islands", "TC", 21.6, -71.7, "Tuvalu", "TV", -7.1, 177.6, "U.S. Minor Outlying Islands",
- "UM", 0, 0, "U.S. Virgin Islands", "VI", 18.3, -64.8, "Uganda", "UG", 1.3, 32.2, "Ukraine", "UA", 48.3, 31.1, "United Arab Emirates", "AE", 23.4, 53.8, "United Kingdom", "GB", 55.3, -3.4, "United States", "US", 37, -95.7, "Uruguay", "UY", -32.5, -55.7, "Uzbekistan", "UZ", 41.3, 64.5, "Vanuatu", "VU", -15.3, 166.9, "Vatican City", "VA", 41.9, 12.4, "Venezuela", "VE", 6.4, -66.5, "Vietnam", "VN", 14, 108.2, "Wallis and Futuna", "WF", -13.7, -177.1, "Western Sahara", "EH", 24.2, -12.8, "Yemen", "YE", 15.5, 48.5, "Zambia", "ZM", -13.1, 27.8, "Zimbabwe", "ZW", -19, 29.1
- ];
- m.hr = "wss://p2p.haxball.com/";
- m.nf = "https://www.haxball.com/rs/";
- m.Bf = [{
- urls: "stun:stun.l.google.com:19302"
- }];
- m.Qp = "6LfMLFIUAAAAAC54jquwTXtcGDc_dPbJm9WtRMSz";
- m.s = new Rb;
- h.Rq = u.ca(1024);
- ra.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- Pa.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- da.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- qa.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- pa.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- Q.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- oa.Ja = l.Sa({
- La: !1,
- Ka: !1,
- lm: {
- Vl: 10,
- qm: 2E3
- }
- });
- Oa.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- na.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- ma.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- Na.Ja = l.Sa({});
- Ma.Ja = l.Sa({
- La: !1,
- Ka: !1,
- lm: {
- Vl: 10,
- qm: 900
- }
- });
- Ga.Ja = l.Sa({});
- la.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- Y.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- La.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- Ka.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- ka.Ja = l.Sa({
- La: !1,
- Ka: !1
- });
- C.xm = .17435839227423353;
- C.wm = 5.934119456780721;
- P.tm = new Bb([0, 0, 2, 1, 0, .35, 1, 0, 1, 0, .7, 1, 0, 0, 0, 1]);
- P.um = new Bb([0, -1, 3, 0, 0, .35, 0, 0, 0, 0, .65, 0, 0, 1, 3, 1]);
- lb.H = "<div class='dialog change-location-view'><h1>Change Location</h1><div class='splitter'><div class='list' data-hook='list'></div><div class='buttons'><button data-hook='change'>Change</button><button data-hook='cancel'>Cancel</button></div></div></div>";
- Da.H = "<div class='chatbox-view'><div data-hook='log' class='log'><p>Controls:<br/>Move: WASD or Arrows<br/>Kick: X, Space, Ctrl, Shift, Numpad 0<br/>View: Numbers 1 to 4</p></div><div class='autocompletebox' data-hook='autocompletebox'></div><div class='input'><input data-hook='input' type='text' /><button data-hook='send'>Send</button></div></div>";
- jb.H = "<div class='choose-nickname-view'><img src=\"images/haxball.png\" /><div class='dialog'><h1>Choose nickname</h1><div class='label-input'><label>Nick:</label><input data-hook='input' type='text' /></div><button data-hook='ok'>Ok</button></div></div>";
- ib.H = "<div class='connecting-view'><div class='dialog'><h1>Connecting</h1><div class='connecting-view-log' data-hook='log'></div><button data-hook='cancel'>Cancel</button></div></div>";
- hb.H = "<div class='create-room-view'><div class='dialog'><h1>Create room</h1><div class='label-input'><label>Room name:</label><input data-hook='name' required /></div><div class='label-input'><label>Password:</label><input data-hook='pass' /></div><div class='label-input'><label>Max players:</label><select data-hook='max-pl'></select></div><button data-hook='unlisted'></button><div class='row'><button data-hook='cancel'>Cancel</button><button data-hook='create'>Create</button></div></div></div>";
- gb.H = "<div class='disconnected-view'><div class='dialog basic-dialog'><h1>Disconnected</h1><p data-hook='reason'></p><div class='buttons'><button data-hook='ok'>Ok</button><button data-hook='replay'>Save replay</button></div></div></div>";
- fb.H = "<div class='game-state-view'><div class='bar-container'><div class='bar'><div class='scoreboard'><div class='teamicon red'></div><div class='score' data-hook='red-score'>0</div><div>-</div><div class='score' data-hook='blue-score'>0</div><div class='teamicon blue'></div></div><div data-hook='timer'></div></div></div><div class='canvas' data-hook='canvas'></div></div>";
- ia.H = "<div class='game-view' tabindex='-1'><div class='top-section' data-hook='gameplay-section'></div><div class='bottom-section'><div data-hook='stats'></div><div data-hook='chatbox'></div><div class='buttons'><button data-hook='menu'><i class='icon-menu'></i>Menu<span class='tooltip'>Toggle room menu [Escape]</span></button><button data-hook='settings'><i class='icon-cog'></i>Settings</button></div></div><div data-hook='popups'></div></div>";
- eb.H = "<div class='dialog kick-player-view'><h1 data-hook='title'></h1><div class=label-input><label>Reason: </label><input type='text' data-hook='reason' /></div><button data-hook='ban-btn'><i class='icon-block'></i>Ban from rejoining: <span data-hook='ban-text'></span></button><div class=\"row\"><button data-hook='close'>Cancel</button><button data-hook='kick'>Kick</button></div></div>";
- db.H = "<div class='dialog basic-dialog leave-room-view'><h1>Leave room?</h1><p>Are you sure you want to leave the room?</p><div class='buttons'><button data-hook='cancel'>Cancel</button><button data-hook='leave'><i class='icon-logout'></i>Leave</button></div></div>";
- cb.H = "<div class='dialog pick-stadium-view'><h1>Pick a stadium</h1><div class='splitter'><div class='list' data-hook='list'></div><div class='buttons'><button data-hook='pick'>Pick</button><button data-hook='delete'>Delete</button><div class='file-btn'><label for='stadfile'>Load</label><input id='stadfile' type='file' accept='.hbs' data-hook='file'/></div><button data-hook='export'>Export</button><div class='spacer'></div><button data-hook='cancel'>Cancel</button></div></div></div>";
- bb.H = "<div class='dialog' style='min-width:200px'><h1 data-hook='name'></h1><button data-hook='admin'></button><button data-hook='kick'>Kick</button><button data-hook='close'>Close</button></div>";
- ab.H = "<div class='player-list-item'><div data-hook='flag' class='flagico'></div><div data-hook='name'></div><div data-hook='ping'></div></div>";
- za.H = "<div class='player-list-view'><div class='buttons'><button data-hook='join-btn'>Join</button><button data-hook='reset-btn' class='admin-only'></button></div><div class='list' data-hook='list'></div></div>";
- ga.H = "<div class='replay-controls-view'><button data-hook='reset'><i class='icon-to-start'></i></button><button data-hook='play'><i data-hook='playicon'></i></button><div data-hook='spd'>1x</div><button data-hook='spddn'>-</button><button data-hook='spdup'>+</button><div data-hook='time'>00:00</div><div class='timebar' data-hook='timebar'><div class='barbg'><div class='bar' data-hook='progbar'></div></div><div class='timetooltip' data-hook='timetooltip'></div></div><button data-hook='leave'>Leave</button></div>";
- $a.H = "<div class='dialog basic-dialog room-link-view'><h1>Room link</h1><p>Use this url to link others directly into this room.</p><input data-hook='link' readonly></input><div class='buttons'><button data-hook='close'>Close</button><button data-hook='copy'>Copy to clipboard</button></div></div>";
- Za.Oi = "<tr><td><span data-hook='tag'></span><span data-hook='name'></span></td><td data-hook='players'></td><td data-hook='pass'></td><td><div data-hook='flag' class='flagico'></div><span data-hook='distance'></span></td></tr>";
- Aa.Oi = "<div class='roomlist-view'><div class='notice' data-hook='notice' hidden><div data-hook='notice-contents'>Testing the notice.</div><div data-hook='notice-close'><i class='icon-cancel'></i></div></div><div class='dialog'><h1>Room list</h1><p>Tip: Join rooms near you to reduce lag.</p><div class='splitter'><div class='list'><table class='header'><colgroup><col><col><col><col></colgroup><thead><tr><td>Name</td><td>Players</td><td>Pass</td><td>Distance</td></tr></thead></table><div class='separator'></div><div class='content' data-hook='listscroll'><table><colgroup><col><col><col><col></colgroup><tbody data-hook='list'></tbody></table></div><div class='filters'><span class='bool' data-hook='fil-pass'>Show locked <i></i></span><span class='bool' data-hook='fil-full'>Show full <i></i></span></div></div><div class='buttons'><button data-hook='refresh'><i class='icon-cw'></i><div>Refresh</div></button><button data-hook='join'><i class='icon-login'></i><div>Join Room</div></button><button data-hook='create'><i class='icon-plus'></i><div>Create Room</div></button><div class='spacer'></div><div class='file-btn'><label for='replayfile'><i class='icon-play'></i><div>Replays</div></label><input id='replayfile' type='file' accept='.hbr2' data-hook='replayfile'/></div><button data-hook='settings'><i class='icon-cog'></i><div>Settings</div></button><button data-hook='changenick'><i class='icon-cw'></i><div>Change Nick</div></button></div></div><p data-hook='count'></p></div></div>";
- Xa.H = "<div class='room-password-view'><div class='dialog'><h1>Password required</h1><div class='label-input'><label>Password:</label><input data-hook='input' /></div><div class='buttons'><button data-hook='cancel'>Cancel</button><button data-hook='ok'>Ok</button></div></div></div>";
- Wa.H = "<div class='room-view'><div class='container'><h1 data-hook='room-name'></h1><div class='header-btns'><button data-hook='rec-btn'><i class='icon-circle'></i>Rec</button><button data-hook='link-btn'><i class='icon-link'></i>Link</button><button data-hook='leave-btn'><i class='icon-logout'></i>Leave</button></div><div class='teams'><div class='tools admin-only'><button data-hook='auto-btn'>Auto</button><button data-hook='rand-btn'>Rand</button><button data-hook='lock-btn'>Lock</button><button data-hook='reset-all-btn'>Reset</button></div><div data-hook='red-list'></div><div data-hook='spec-list'></div><div data-hook='blue-list'></div><div class='spacer admin-only'></div></div><div class='settings'><div><label class='lbl'>Time limit</label><select data-hook='time-limit-sel'></select></div><div><label class='lbl'>Score limit</label><select data-hook='score-limit-sel'></select></div><div><label class='lbl'>Stadium</label><label class='val' data-hook='stadium-name'>testing the stadium name</label><button class='admin-only' data-hook='stadium-pick'>Pick</button></div></div><div class='controls admin-only'><button data-hook='start-btn'><i class='icon-play'></i>Start game</button><button data-hook='stop-btn'><i class='icon-stop'></i>Stop game</button><button data-hook='pause-btn'><i class='icon-pause'></i>Pause</button></div></div></div>";
- ba.H = "<div class='dialog settings-view'><h1>Settings</h1><button data-hook='close'>Close</button><div class='tabs'><button data-hook='soundbtn'>Sound</button><button data-hook='videobtn'>Video</button><button data-hook='inputbtn'>Input</button><button data-hook='miscbtn'>Misc</button></div><div data-hook='presskey' tabindex='-1'><div>Press a key</div></div><div class='tabcontents'><div class='section' data-hook='miscsec'><div class='loc' data-hook='loc'></div><div class='loc' data-hook='loc-ovr'></div><button data-hook='loc-ovr-btn'></button></div><div class='section' data-hook='soundsec'><div data-hook=\"tsound-main\">Sounds enabled</div><div data-hook=\"tsound-chat\">Chat sound enabled</div><div data-hook=\"tsound-highlight\">Nick highlight sound enabled</div><div data-hook=\"tsound-crowd\">Crowd sound enabled</div></div><div class='section' data-hook='inputsec'></div><div class='section' data-hook='videosec'><div>Viewport Mode:<select data-hook='viewmode'><option>Dynamic</option><option>Restricted 840x410</option><option>Full 1x Zoom</option><option>Full 1.25x Zoom</option><option>Full 1.5x Zoom</option><option>Full 1.75x Zoom</option><option>Full 2x Zoom</option><option>Full 2.25x Zoom</option><option>Full 2.5x Zoom</option></select></div><div>FPS Limit:<select data-hook='fps'><option>None (Recommended)</option><option>30</option></select></div><div>Resolution Scaling:<select data-hook='resscale'><option>100%</option><option>75%</option><option>50%</option><option>25%</option></select></div><div data-hook=\"tvideo-teamcol\">Custom team colors enabled</div><div data-hook=\"tvideo-showindicators\">Show chat indicators</div></div></div></div>";
- ba.ml = 0;
- T.H = "<div class='simple-dialog-view'><div class='dialog basic-dialog'><h1 data-hook='title'></h1><p data-hook='content'></p><div class='buttons' data-hook='buttons'></div></div></div>";
- Va.H = "<div class='stats-view'><p>Ping: <span data-hook='ping'></span></p><p>Max Ping: <span data-hook='max-ping'></span></p><p>Fps: <span data-hook='fps'></span></p><div data-hook='graph'></div></div>";
- Ua.H = '<div class=\'unsupported-browser-view\'><div class=\'dialog\'><h1>Unsupported Browser</h1><p>Sorry! Your browser doesn\'t yet implement some features which are required for HaxBall to work.</p><p>The missing features are: <span data-hook=\'features\'></span></p><h2>Recommended browsers:</h2><div><a href="https://www.mozilla.org/firefox/new/"><img src="images/firefox-icon.png"/>Firefox</a></div><div><a href="https://www.google.com/chrome/"><img src="images/chrome-icon.png"/>Chrome</a></div><div><a href="http://www.opera.com/"><img src="images/opera-icon.png"/>Opera</a></div></div></div>';
- q.Dm = {}.toString;
- v.yo()
- })("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this);
Advertisement
Comments
-
- Why does the script not save when reloading the game?
Add Comment
Please, Sign In to add comment
Advertisement