Skip to content

Instantly share code, notes, and snippets.

@rainb3rry
Last active October 13, 2020 10:41
Show Gist options
  • Save rainb3rry/07e10ca3e6f11fa73045928ee7e83899 to your computer and use it in GitHub Desktop.
Save rainb3rry/07e10ca3e6f11fa73045928ee7e83899 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
(function (document, window) {
/*
stats.js - http://github.com/mrdoob/stats.js
Copyright (c) 2009-2016 stats.js authors
MIT License
This program uses code provided under the MIT License.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
howler.js v1.1.14
howlerjs.com
(c) 2013, James Simpson of GoldFire Studios
goldfirestudios.com
pixi.js - v2.2.0
Copyright (c) 2012-2014, Mat Groves
http://goodboydigital.com/
Compiled: 2018-10-08
pixi.js is licensed under the MIT License.
http://www.opensource.org/licenses/mit-license.php
Font.js v2012.01.25
(c) Mike "Pomax" Kamermans, 2012
Licensed under MIT ("expat" flavour) license.
Hosted on http://github.com/Pomax/Font.js
*/
(function () {
var a = a || {};
a.WEBGL_RENDERER = 0;
a.CANVAS_RENDERER = 1;
a.VERSION = "v2.2.0";
a.blendModes = {
NORMAL: 0,
ADD: 1,
MULTIPLY: 2,
SCREEN: 3,
OVERLAY: 4,
DARKEN: 5,
LIGHTEN: 6,
COLOR_DODGE: 7,
COLOR_BURN: 8,
HARD_LIGHT: 9,
SOFT_LIGHT: 10,
DIFFERENCE: 11,
EXCLUSION: 12,
HUE: 13,
SATURATION: 14,
COLOR: 15,
LUMINOSITY: 16,
};
a.scaleModes = { DEFAULT: 0, LINEAR: 0, NEAREST: 1 };
a._UID = 0;
"undefined" != typeof Float32Array ? ((a.Float32Array = Float32Array), (a.Uint16Array = Uint16Array)) : ((a.Float32Array = Array), (a.Uint16Array = Array));
a.INTERACTION_FREQUENCY = 30;
a.AUTO_PREVENT_DEFAULT = !0;
a.PI_2 = 2 * Math.PI;
a.RAD_TO_DEG = 180 / Math.PI;
a.DEG_TO_RAD = Math.PI / 180;
a.RETINA_PREFIX = "@2x";
a.dontSayHello = !0;
a.defaultRenderOptions = { view: null, transparent: !1, antialias: !1, preserveDrawingBuffer: !1, resolution: 1, clearBeforeRender: !0, autoResize: !1 };
a.sayHello = function (a) {};
a.Point = function (a, d) {
this.x = a || 0;
this.y = d || 0;
};
a.Point.prototype.clone = function () {
return new a.Point(this.x, this.y);
};
a.Point.prototype.set = function (a, d) {
this.x = a || 0;
this.y = d || (0 !== d ? this.x : 0);
};
a.Point.prototype.constructor = a.Point;
a.Rectangle = function (a, d, e, f) {
this.x = a || 0;
this.y = d || 0;
this.width = e || 0;
this.height = f || 0;
};
a.Rectangle.prototype.clone = function () {
return new a.Rectangle(this.x, this.y, this.width, this.height);
};
a.Rectangle.prototype.contains = function (a, d) {
if (0 >= this.width || 0 >= this.height) return !1;
var e = this.x;
return a >= e && a <= e + this.width && ((e = this.y), d >= e && d <= e + this.height) ? !0 : !1;
};
a.Rectangle.prototype.constructor = a.Rectangle;
a.EmptyRectangle = new a.Rectangle(0, 0, 0, 0);
a.Polygon = function (b) {
b instanceof Array || (b = Array.prototype.slice.call(arguments));
if (b[0] instanceof a.Point) {
for (var d = [], e = 0, f = b.length; e < f; e++) d.push(b[e].x, b[e].y);
b = d;
}
this.closed = !0;
this.points = b;
};
a.Polygon.prototype.clone = function () {
var b = this.points.slice();
return new a.Polygon(b);
};
a.Polygon.prototype.contains = function (a, d) {
for (var e = !1, f = this.points.length / 2, g = 0, k = f - 1; g < f; k = g++) {
var m = this.points[2 * g],
n = this.points[2 * g + 1],
p = this.points[2 * k],
k = this.points[2 * k + 1];
n > d !== k > d && a < ((p - m) * (d - n)) / (k - n) + m && (e = !e);
}
return e;
};
a.Polygon.prototype.constructor = a.Polygon;
a.Circle = function (a, d, e) {
this.x = a || 0;
this.y = d || 0;
this.radius = e || 0;
};
a.Circle.prototype.clone = function () {
return new a.Circle(this.x, this.y, this.radius);
};
a.Circle.prototype.contains = function (a, d) {
if (0 >= this.radius) return !1;
var e = this.x - a,
f = this.y - d,
g = this.radius * this.radius;
return e * e + f * f <= g;
};
a.Circle.prototype.getBounds = function () {
return new a.Rectangle(this.x - this.radius, this.y - this.radius, 2 * this.radius, 2 * this.radius);
};
a.Circle.prototype.constructor = a.Circle;
a.RoundedRectangle = function (a, d, e, f, g) {
this.x = a || 0;
this.y = d || 0;
this.width = e || 0;
this.height = f || 0;
this.radius = g || 20;
};
a.RoundedRectangle.prototype.clone = function () {
return new a.RoundedRectangle(this.x, this.y, this.width, this.height, this.radius);
};
a.RoundedRectangle.prototype.contains = function (a, d) {
if (0 >= this.width || 0 >= this.height) return !1;
var e = this.x;
return a >= e && a <= e + this.width && ((e = this.y), d >= e && d <= e + this.height) ? !0 : !1;
};
a.RoundedRectangle.prototype.constructor = a.RoundedRectangle;
a.MultiRectangle = function (b) {
this.type = a.Graphics.MRECT;
this.points = b || [];
};
a.MultiRectangle.prototype.constructor = a.MultiRectangle;
a.Matrix = function () {
this.a = 1;
this.c = this.b = 0;
this.d = 1;
this.ty = this.tx = 0;
};
a.Matrix.prototype.fromArray = function (a) {
this.a = a[0];
this.b = a[1];
this.c = a[3];
this.d = a[4];
this.tx = a[2];
this.ty = a[5];
};
a.Matrix.prototype.toArray = function (b) {
this.array || (this.array = new a.Float32Array(9));
var d = this.array;
b
? ((d[0] = this.a), (d[1] = this.b), (d[2] = 0), (d[3] = this.c), (d[4] = this.d), (d[5] = 0), (d[6] = this.tx), (d[7] = this.ty))
: ((d[0] = this.a), (d[1] = this.c), (d[2] = this.tx), (d[3] = this.b), (d[4] = this.d), (d[5] = this.ty), (d[6] = 0), (d[7] = 0));
d[8] = 1;
return d;
};
a.Matrix.prototype.apply = function (b, d) {
d = d || new a.Point();
d.x = this.a * b.x + this.c * b.y + this.tx;
d.y = this.b * b.x + this.d * b.y + this.ty;
return d;
};
a.Matrix.prototype.applyInverse = function (b, d) {
d = d || new a.Point();
var e = 1 / (this.a * this.d + this.c * -this.b);
d.x = this.d * e * b.x + -this.c * e * b.y + (this.ty * this.c - this.tx * this.d) * e;
d.y = this.a * e * b.y + -this.b * e * b.x + (-this.ty * this.a + this.tx * this.b) * e;
return d;
};
a.Matrix.prototype.translate = function (a, d) {
this.tx += a;
this.ty += d;
return this;
};
a.Matrix.prototype.scale = function (a, d) {
this.a *= a;
this.d *= d;
this.c *= a;
this.b *= d;
this.tx *= a;
this.ty *= d;
return this;
};
a.Matrix.prototype.rotate = function (a) {
var d = Math.cos(a);
a = Math.sin(a);
var e = this.a,
f = this.c,
g = this.tx;
this.a = e * d - this.b * a;
this.b = e * a + this.b * d;
this.c = f * d - this.d * a;
this.d = f * a + this.d * d;
this.tx = g * d - this.ty * a;
this.ty = g * a + this.ty * d;
return this;
};
a.Matrix.prototype.append = function (a) {
var d = this.a,
e = this.b,
f = this.c,
g = this.d;
this.a = a.a * d + a.b * f;
this.b = a.a * e + a.b * g;
this.c = a.c * d + a.d * f;
this.d = a.c * e + a.d * g;
this.tx = a.tx * d + a.ty * f + this.tx;
this.ty = a.tx * e + a.ty * g + this.ty;
return this;
};
a.Matrix.prototype.identity = function () {
this.a = 1;
this.c = this.b = 0;
this.d = 1;
this.ty = this.tx = 0;
return this;
};
a.identityMatrix = new a.Matrix();
a.DisplayObject = function () {
this._initialized = 0;
this.position = new a.Point();
this.scale = new a.Point(1, 1);
this.pivot = new a.Point(0, 0);
this.rotation = 0;
this.alpha = 1;
this.visible = !0;
this.hitArea = null;
this.renderable = this.buttonMode = !1;
this.stage = this.parent = null;
this.worldAlpha = 1;
this._interactive = !1;
this.defaultCursor = "pointer";
this.worldTransform = new a.Matrix();
this._sr = 0;
this._cr = 1;
this.filterArea = null;
this._bounds = new a.Rectangle(0, 0, 1, 1);
this._mask = this._currentBounds = null;
this._cacheIsDirty = this._cacheAsBitmap = !1;
this._initialized = 1;
};
a.DisplayObject.prototype.constructor = a.DisplayObject;
Object.defineProperty(a.DisplayObject.prototype, "interactive", {
get: function () {
return this._interactive;
},
set: function (a) {
this._interactive = a;
this.stage && (this.stage.dirty = !0);
},
});
Object.defineProperty(a.DisplayObject.prototype, "worldVisible", {
get: function () {
var a = this;
do {
if (!a.visible) return !1;
a = a.parent;
} while (a);
return !0;
},
});
Object.defineProperty(a.DisplayObject.prototype, "mask", {
get: function () {
return this._mask;
},
set: function (a) {
this._mask && (this._mask.isMask = !1);
if ((this._mask = a)) this._mask.isMask = !0;
},
});
Object.defineProperty(a.DisplayObject.prototype, "filters", {
get: function () {
return this._filters;
},
set: function (a) {
if (a) {
for (var d = [], e = 0; e < a.length; e++) for (var f = a[e].passes, g = 0; g < f.length; g++) d.push(f[g]);
this._filterBlock = { target: this, filterPasses: d };
}
this._filters = a;
},
});
Object.defineProperty(a.DisplayObject.prototype, "cacheAsBitmap", {
get: function () {
return this._cacheAsBitmap;
},
set: function (a) {
this._cacheAsBitmap !== a && (a ? this._generateCachedSprite() : this._destroyCachedSprite(), (this._cacheAsBitmap = a));
},
});
a.DisplayObject.prototype.updateTransform = function () {
var b = this.parent.worldTransform,
d = this.worldTransform,
e,
f,
g,
k,
m,
n;
if (this.rotation % a.PI_2 || (this.greentube_matrix_apply && this.greentube_matrix && 3 < this.greentube_matrix.length)) {
if (this.rotation !== this.rotationCache || this._sr !== this._srCache || this._cr !== this._crCache)
(this.rotationCache = this.rotation), (this._sr = Math.sin(this.rotation)), (this._cr = Math.cos(this.rotation)), (this._srCache = this._sr), (this._crCache = this._cr);
this.greentube_matrix && 3 < this.greentube_matrix.length
? ((e = this.greentube_matrix[0]),
(f = this.greentube_matrix[1]),
(g = this.greentube_matrix[2]),
(k = this.greentube_matrix[3]),
this.gt_overridewidth_factor && ((e *= this.gt_overridewidth_factor), (g *= this.gt_overridewidth_factor)),
this.gt_overrideheight_factor && ((f *= this.gt_overrideheight_factor), (k *= this.gt_overrideheight_factor)))
: ((e = this._cr * this.scale.x), (f = this._sr * this.scale.x), (g = -this._sr * this.scale.y), (k = this._cr * this.scale.y));
m = this.position.x;
n = this.position.y;
if (this.pivot.x || this.pivot.y) (m -= this.pivot.x * e + this.pivot.y * g), (n -= this.pivot.x * f + this.pivot.y * k);
d.a = e * b.a + f * b.c;
d.b = e * b.b + f * b.d;
d.c = g * b.a + k * b.c;
d.d = g * b.b + k * b.d;
} else (e = this.scale.x), (k = this.scale.y), (m = this.position.x - this.pivot.x * e), (n = this.position.y - this.pivot.y * k), (d.a = e * b.a), (d.b = e * b.b), (d.c = k * b.c), (d.d = k * b.d);
d.tx = m * b.a + n * b.c + b.tx;
d.ty = m * b.b + n * b.d + b.ty;
this.worldAlpha = this.alpha * this.parent.worldAlpha;
};
a.DisplayObject.prototype.displayObjectUpdateTransform = a.DisplayObject.prototype.updateTransform;
a.DisplayObject.prototype.getBounds = function (b) {
return a.EmptyRectangle;
};
a.DisplayObject.prototype.getLocalBounds = function () {
return this.getBounds(a.identityMatrix);
};
a.DisplayObject.prototype.setStageReference = function (a) {
this.stage = a;
this._interactive && (this.stage.dirty = !0);
};
a.DisplayObject.prototype.generateTexture = function (b, d, e) {
var f = this.getLocalBounds();
b = new a.RenderTexture(f.width | 0, f.height | 0, e, d, b);
a.DisplayObject._tempMatrix.tx = -f.x;
a.DisplayObject._tempMatrix.ty = -f.y;
b.render(this, a.DisplayObject._tempMatrix);
return b;
};
a.DisplayObject.prototype.updateCache = function () {
this._generateCachedSprite();
};
a.DisplayObject.prototype.toGlobal = function (a) {
this.updateTransform();
return this.worldTransform.apply(a);
};
a.DisplayObject.prototype.toLocal = function (a, d) {
d && (a = d.toGlobal(a));
this.updateTransform();
return this.worldTransform.applyInverse(a);
};
a.DisplayObject.prototype._renderCachedSprite = function (b) {
this._cachedSprite.worldAlpha = this.worldAlpha;
b.gl ? a.Sprite.prototype._renderWebGL.call(this._cachedSprite, b) : a.Sprite.prototype._renderCanvas.call(this._cachedSprite, b);
};
a.DisplayObject.prototype._generateCachedSprite = function () {
this._cacheAsBitmap = !1;
var b = this.getLocalBounds();
if (this._cachedSprite) this._cachedSprite.texture.resize(b.width | 0, b.height | 0);
else {
var d = new a.RenderTexture(b.width | 0, b.height | 0);
this._cachedSprite = new a.Sprite(d);
this._cachedSprite.worldTransform = this.worldTransform;
}
d = this._filters;
this._filters = null;
this._cachedSprite.filters = d;
a.DisplayObject._tempMatrix.tx = -b.x;
a.DisplayObject._tempMatrix.ty = -b.y;
this._cachedSprite.texture.render(this, a.DisplayObject._tempMatrix);
this._cachedSprite.anchor.x = -(b.x / b.width);
this._cachedSprite.anchor.y = -(b.y / b.height);
this._filters = d;
this._cacheAsBitmap = !0;
};
a.DisplayObject.prototype._destroyCachedSprite = function () {
this._cachedSprite && (this._cachedSprite.texture.destroy(!0), (this._cachedSprite = null));
};
a.DisplayObject.prototype._renderWebGL = function (a) {};
a.DisplayObject.prototype._renderCanvas = function (a) {};
a.DisplayObject._tempMatrix = new a.Matrix();
Object.defineProperty(a.DisplayObject.prototype, "x", {
get: function () {
return this.position.x;
},
set: function (a) {
this.position.x = a;
},
});
Object.defineProperty(a.DisplayObject.prototype, "y", {
get: function () {
return this.position.y;
},
set: function (a) {
this.position.y = a;
},
});
a.DisplayObjectContainer = function () {
a.DisplayObject.call(this);
this.children = [];
this.mustUpdateBounds = !0;
};
a.DisplayObjectContainer.prototype = Object.create(a.DisplayObject.prototype);
a.DisplayObjectContainer.prototype.constructor = a.DisplayObjectContainer;
Object.defineProperty(a.DisplayObjectContainer.prototype, "width", {
get: function () {
return this._width && !this.mustUpdateBounds ? this._width : this.scale.x * this.getLocalBounds().width;
},
set: function (a) {
var d = this.getLocalBounds().width;
this.scale.x = 0 !== d ? a / d : 1;
this._width = a;
},
});
Object.defineProperty(a.DisplayObjectContainer.prototype, "height", {
get: function () {
return this._height && !this.mustUpdateBounds ? this._height : this.scale.y * this.getLocalBounds().height;
},
set: function (a) {
var d = this.getLocalBounds().height;
this.scale.y = 0 !== d ? a / d : 1;
this._height = a;
},
});
a.DisplayObjectContainer.prototype.addChild = function (a) {
this.mustUpdateBounds = !0;
return this.addChildAt(a, this.children.length);
};
a.DisplayObjectContainer.prototype.addChildAt = function (a, d) {
this.mustUpdateBounds = !0;
if (0 <= d && d <= this.children.length) return a.parent && a.parent.removeChild(a), (a.parent = this), this.children.splice(d, 0, a), this.stage && a.setStageReference(this.stage), a;
throw Error(a + "addChildAt: The index " + d + " supplied is out of bounds " + this.children.length);
};
a.DisplayObjectContainer.prototype.swapChildren = function (a, d) {
if (a !== d) {
var e = this.getChildIndex(a),
f = this.getChildIndex(d);
if (0 > e || 0 > f) throw Error("swapChildren: Both the supplied DisplayObjects must be a child of the caller.");
this.children[e] = d;
this.children[f] = a;
}
};
a.DisplayObjectContainer.prototype.getChildIndex = function (a) {
a = this.children.indexOf(a);
if (-1 === a) throw Error("The supplied DisplayObject must be a child of the caller");
return a;
};
a.DisplayObjectContainer.prototype.setChildIndex = function (a, d) {
if (0 > d || d >= this.children.length) throw Error("The supplied index is out of bounds");
var e = this.getChildIndex(a);
this.children.splice(e, 1);
this.children.splice(d, 0, a);
};
a.DisplayObjectContainer.prototype.getChildAt = function (a) {
if (0 > a || a >= this.children.length) throw Error("getChildAt: Supplied index " + a + " does not exist in the child list, or the supplied DisplayObject must be a child of the caller");
return this.children[a];
};
a.DisplayObjectContainer.prototype.removeChild = function (a) {
a = this.children.indexOf(a);
if (-1 !== a) return this.removeChildAt(a);
};
a.DisplayObjectContainer.prototype.removeChildAt = function (a) {
this.mustUpdateBounds = !0;
var d = this.getChildAt(a);
this.stage && d.removeStageReference();
d.parent = void 0;
this.children.splice(a, 1);
return d;
};
a.DisplayObjectContainer.prototype.removeChildren = function (a, d) {
this.mustUpdateBounds = !0;
var e = a || 0,
f = "number" === typeof d ? d : this.children.length,
g = f - e;
if (0 < g && g <= f) {
e = this.children.splice(e, g);
for (f = 0; f < e.length; f++) (g = e[f]), this.stage && g.removeStageReference(), (g.parent = void 0);
return e;
}
if (0 === g && 0 === this.children.length) return [];
throw Error("removeChildren: Range Error, numeric values are outside the acceptable range");
};
a.DisplayObjectContainer.prototype.updateTransform = function () {
if (!1 !== this.visible && (this.displayObjectUpdateTransform(), !this._cacheAsBitmap)) for (var a = 0, d = this.children.length; a < d; a++) this.children[a].updateTransform();
};
a.DisplayObjectContainer.prototype.displayObjectContainerUpdateTransform = a.DisplayObjectContainer.prototype.updateTransform;
a.DisplayObjectContainer.prototype.getBounds = function () {
if (0 === this.children.length) return a.EmptyRectangle;
for (var b = Infinity, d = Infinity, e = -Infinity, f = -Infinity, g, k, m = !1, n = 0, p = this.children.length; n < p; n++)
(k = this.children[n]) && k.visible && ((m = !0), (g = this.children[n].getBounds()), (b = b < g.x ? b : g.x), (d = d < g.y ? d : g.y), (k = g.width + g.x), (g = g.height + g.y), (e = e > k ? e : k), (f = f > g ? f : g));
if (!m) return a.EmptyRectangle;
m = this._bounds;
m.x = b;
m.y = d;
m.width = e - b;
m.height = f - d;
this.mustUpdateBounds = !1;
return m;
};
a.DisplayObjectContainer.prototype.getLocalBounds = function () {
var b = this.worldTransform;
this.worldTransform = a.identityMatrix;
for (var d = 0, e = this.children.length; d < e; d++) this.children[d].updateTransform();
d = this.getBounds();
this.worldTransform = b;
return d;
};
a.DisplayObjectContainer.prototype.setStageReference = function (a) {
this.stage = a;
this._interactive && (this.stage.dirty = !0);
for (var d = 0, e = this.children.length; d < e; d++) this.children[d].setStageReference(a);
};
a.DisplayObjectContainer.prototype.removeStageReference = function () {
for (var a = 0, d = this.children.length; a < d; a++) this.children[a].removeStageReference();
this._interactive && (this.stage.dirty = !0);
this.stage = null;
};
a.DisplayObjectContainer.prototype._renderWebGL = function (a) {
if (!(!1 === this.visible || 0 >= this.alpha)) {
var d = JSUTIL.GLUtil.currentParallaxDepth;
-1e5 < this.parallaxDepth && (JSUTIL.GLUtil.currentParallaxDepth = this.parallaxDepth);
if (this._cacheAsBitmap) this._renderCachedSprite(a), (JSUTIL.GLUtil.currentParallaxDepth = d);
else if (!(1 > this.children.length)) {
var e, f;
if (this.maskdata) {
e = this.maskdata;
f = this.pivot.x;
var g = this.pivot.y,
k = e[2],
m = e[3];
e = k * (1 - f);
k *= -f;
f = m * (1 - g);
var g = m * -g,
n = this.worldTransform,
m = n.a,
p = n.b,
q = n.c,
r = n.d,
t = n.tx,
n = n.ty;
if (CONFIG.CLIENTSLOTAPPLET.orientationSensorManager && -1e5 < JSUTIL.GLUtil.currentParallaxDepth)
var u = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getX_0() * JSUTIL.GLUtil.currentParallaxDepth,
B = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getY_0() * JSUTIL.GLUtil.currentParallaxDepth,
t = t + u,
n = n + B;
u = m * k + q * g + t;
k = r * g + p * k + n;
JSUTIL.GLUtil.applyClip_4(u, k, m * e + q * g + t - u, r * f + p * e + n - k);
}
if (!this.maskdata || !JSUTIL.GLUtil.isClipEmpty_0()) {
this._filters && (a.spriteBatch.flush(), a.filterManager.pushFilter(this._filterBlock));
this._mask && (a.spriteBatch.stop(), a.maskManager.pushMask(this.mask, a), a.spriteBatch.start());
e = 0;
for (f = this.children.length; e < f; e++) this.children[e]._renderWebGL(a);
if (this._mask || this._filters) a.spriteBatch.stop(), this._mask && a.maskManager.popMask(this._mask, a), this._filters && a.filterManager.popFilter(), a.spriteBatch.start();
}
this.maskdata && JSUTIL.GLUtil.popClip_0();
JSUTIL.GLUtil.currentParallaxDepth = d;
}
}
};
a.DisplayObjectContainer.prototype._renderCanvas = function (a) {
if (!1 !== this.visible && 0 !== this.alpha) {
var d = JSUTIL.GLUtil.currentParallaxDepth;
-1e5 < this.parallaxDepth && (JSUTIL.GLUtil.currentParallaxDepth = this.parallaxDepth);
if (this._cacheAsBitmap) this._renderCachedSprite(a);
else {
this._mask && a.maskManager.pushMask(this._mask, a);
for (var e = 0, f = this.children.length; e < f; e++) this.children[e]._renderCanvas(a);
this._mask && a.maskManager.popMask(a);
}
JSUTIL.GLUtil.currentParallaxDepth = d;
}
};
a.Sprite = function (b) {
a.DisplayObjectContainer.call(this);
this.anchor = new a.Point();
this.texture = b;
this._height = this._width = 0;
this.tint = 16777215;
this.blendMode = a.blendModes.NORMAL;
this.shader = null;
if (b.baseTexture.hasLoaded) this.onTextureUpdate();
else this.texture.on("update", this.onTextureUpdate.bind(this));
this.renderable = !0;
};
a.Sprite.prototype = Object.create(a.DisplayObjectContainer.prototype);
a.Sprite.prototype.constructor = a.Sprite;
Object.defineProperty(a.Sprite.prototype, "width", {
get: function () {
return this.scale.x * this.texture.frame.width;
},
set: function (a) {
this.scale.x = a / this.texture.frame.width;
this._width = a;
},
});
Object.defineProperty(a.Sprite.prototype, "height", {
get: function () {
return this.scale.y * this.texture.frame.height;
},
set: function (a) {
this.scale.y = a / this.texture.frame.height;
this._height = a;
},
});
a.Sprite.prototype.setTexture = function (a) {
this.texture = a;
this.cachedTint = 16777215;
};
a.Sprite.prototype.onTextureUpdate = function () {
this._width && (this.scale.x = this._width / this.texture.frame.width);
this._height && (this.scale.y = this._height / this.texture.frame.height);
};
a.Sprite.prototype.getBounds = function (a) {
var d = this.texture ? this.texture.frame.width : 0,
e = this.texture ? this.texture.frame.height : 0,
f = d * (1 - this.anchor.x),
g = d * -this.anchor.x,
k = e * (1 - this.anchor.y),
m = e * -this.anchor.y;
a = a || this.worldTransform;
var n = a.a,
p = a.b,
q = a.c,
r = a.d,
t = a.tx,
u = a.ty;
a = n * g + q * m + t;
var e = r * m + p * g + u,
d = n * f + q * m + t,
m = r * m + p * f + u,
B = n * f + q * k + t,
f = r * k + p * f + u,
n = n * g + q * k + t,
g = r * k + p * g + u,
p = (k = -Infinity),
q = (r = Infinity),
r = a < r ? a : r,
r = d < r ? d : r,
r = B < r ? B : r,
r = n < r ? n : r,
q = e < q ? e : q,
q = m < q ? m : q,
q = f < q ? f : q,
q = g < q ? g : q,
k = a > k ? a : k,
k = d > k ? d : k,
k = B > k ? B : k,
p = e > p ? e : p,
p = m > p ? m : p,
p = f > p ? f : p;
a = this._bounds;
a.x = r;
a.width = (n > k ? n : k) - r;
a.y = q;
a.height = (g > p ? g : p) - q;
return (this._currentBounds = a);
};
a.Sprite.prototype._renderWebGL = function (a) {
if (this.visible && !(0 >= this.alpha) && this.texture && !this.texture.isDummyFrame) {
var d,
e,
f = JSUTIL.GLUtil.currentParallaxDepth;
-1e5 < this.parallaxDepth && (JSUTIL.GLUtil.currentParallaxDepth = this.parallaxDepth);
if (this._mask || this._filters) {
var g = a.spriteBatch;
this._filters && (g.flush(), a.filterManager.pushFilter(this._filterBlock));
this._mask && (g.stop(), a.maskManager.pushMask(this.mask, a), g.start());
g.render(this);
d = 0;
for (e = this.children.length; d < e; d++) this.children[d]._renderWebGL(a);
g.stop();
this._mask && a.maskManager.popMask(this._mask, a);
this._filters && a.filterManager.popFilter();
g.start();
} else for (a.spriteBatch.render(this), d = 0, e = this.children.length; d < e; d++) this.children[d]._renderWebGL(a);
JSUTIL.GLUtil.currentParallaxDepth = f;
}
};
a.Sprite.prototype._renderCanvas = function (b) {
if (!(!1 === this.visible || 0 === this.alpha || !this.texture || this.texture.isDummyFrame || 0 >= this.texture.crop.width || 0 >= this.texture.crop.height)) {
var d = JSUTIL.GLUtil.currentParallaxDepth;
-1e5 < this.parallaxDepth && (JSUTIL.GLUtil.currentParallaxDepth = this.parallaxDepth);
this.blendMode !== b.currentBlendMode && ((b.currentBlendMode = this.blendMode), (b.context.globalCompositeOperation = a.blendModesCanvas[b.currentBlendMode]));
this._mask && b.maskManager.pushMask(this._mask, b);
if (this.texture.valid) {
var e = this.texture.baseTexture.resolution / b.resolution;
b.context.globalAlpha = this.worldAlpha;
var f = 0,
g = 0;
CONFIG.CLIENTSLOTAPPLET.orientationSensorManager &&
-1e5 < JSUTIL.GLUtil.currentParallaxDepth &&
((f = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getX_0() * JSUTIL.GLUtil.currentParallaxDepth), (g = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getY_0() * JSUTIL.GLUtil.currentParallaxDepth));
b.roundPixels
? b.context.setTransform(
this.worldTransform.a,
this.worldTransform.b,
this.worldTransform.c,
this.worldTransform.d,
((this.worldTransform.tx + f) * b.resolution) | 0,
((this.worldTransform.ty + g) * b.resolution) | 0
)
: b.context.setTransform(this.worldTransform.a, this.worldTransform.b, this.worldTransform.c, this.worldTransform.d, (this.worldTransform.tx + f) * b.resolution, (this.worldTransform.ty + g) * b.resolution);
b.smoothProperty && b.scaleMode !== this.texture.baseTexture.scaleMode && ((b.scaleMode = this.texture.baseTexture.scaleMode), (b.context[b.smoothProperty] = b.scaleMode === a.scaleModes.LINEAR));
var f = this.texture.trim ? this.texture.trim.x - this.anchor.x * this.texture.trim.width : this.anchor.x * -this.texture.frame.width,
g = this.texture.trim ? this.texture.trim.y - this.anchor.y * this.texture.trim.height : this.anchor.y * -this.texture.frame.height,
k = !0 === this.horizontalFlip ? -1 : 1,
m = !0 === this.verticalFlip ? -1 : 1;
(!0 !== this.horizontalFlip && !0 !== this.verticalFlip) || b.context.scale(k, m);
try {
16777215 !== this.tint
? (this.cachedTint !== this.tint && ((this.cachedTint = this.tint), (this.tintedTexture = a.CanvasTinter.getTintedTexture(this, this.tint))),
b.context.drawImage(this.tintedTexture, 0, 0, this.texture.crop.width, this.texture.crop.height, f / e, g / e, (k * this.texture.crop.width) / e, (m * this.texture.crop.height) / e))
: b.context.drawImage(
this.texture.baseTexture.source,
this.texture.crop.x,
this.texture.crop.y,
this.texture.crop.width,
this.texture.crop.height,
f / e,
g / e,
(k * this.texture.crop.width) / e,
(m * this.texture.crop.height) / e
);
} catch (n) {
console.log("Error: " + n.message);
}
(!0 !== this.horizontalFlip && !0 !== this.verticalFlip) || b.context.scale(k, m);
}
e = 0;
for (f = this.children.length; e < f; e++) this.children[e]._renderCanvas(b);
this._mask && b.maskManager.popMask(b);
JSUTIL.GLUtil.currentParallaxDepth = d;
}
};
a.Sprite.fromFrame = function (b) {
var d = a.TextureCache[b];
if (!d) throw Error('The frameId "' + b + '" does not exist in the texture cache' + this);
return new a.Sprite(d);
};
a.Sprite.fromImage = function (b, d, e) {
b = a.Texture.fromImage(b, d, e);
return new a.Sprite(b);
};
a.SpriteBatch = function (b) {
a.DisplayObjectContainer.call(this);
this.textureThing = b;
this.ready = !1;
};
a.SpriteBatch.prototype = Object.create(a.DisplayObjectContainer.prototype);
a.SpriteBatch.prototype.constructor = a.SpriteBatch;
a.SpriteBatch.prototype.initWebGL = function (b) {
this.fastSpriteBatch = new a.WebGLFastSpriteBatch(b);
this.ready = !0;
};
a.SpriteBatch.prototype.updateTransform = function () {
a.DisplayObject.prototype.updateTransform.call(this);
};
a.SpriteBatch.prototype._renderWebGL = function (a) {
!this.visible ||
0 >= this.alpha ||
!this.children.length ||
(this.ready || this.initWebGL(a.gl), a.spriteBatch.stop(), a.shaderManager.setShader(a.shaderManager.fastShader), this.fastSpriteBatch.begin(this, a), this.fastSpriteBatch.render(this), a.spriteBatch.start());
};
a.SpriteBatch.prototype._renderCanvas = function (b) {
if (this.visible && !(0 >= this.alpha) && this.children.length) {
var d = b.context;
d.globalAlpha = this.worldAlpha;
a.DisplayObject.prototype.updateTransform.call(this);
for (var e = this.worldTransform, f = !0, g = 0; g < this.children.length; g++) {
var k = this.children[g];
if (k.visible) {
var m = k.texture,
n = m.frame;
d.globalAlpha = this.worldAlpha * k.alpha;
if (0 === k.rotation % (2 * Math.PI))
f && (d.setTransform(e.a, e.b, e.c, e.d, e.tx, e.ty), (f = !1)),
d.drawImage(
m.baseTexture.source,
n.x,
n.y,
n.width,
n.height,
(k.anchor.x * -n.width * k.scale.x + k.position.x + 0.5) | 0,
(k.anchor.y * -n.height * k.scale.y + k.position.y + 0.5) | 0,
n.width * k.scale.x,
n.height * k.scale.y
);
else {
f || (f = !0);
a.DisplayObject.prototype.updateTransform.call(k);
var p = k.worldTransform;
b.roundPixels ? d.setTransform(p.a, p.b, p.c, p.d, p.tx | 0, p.ty | 0) : d.setTransform(p.a, p.b, p.c, p.d, p.tx, p.ty);
d.drawImage(m.baseTexture.source, n.x, n.y, n.width, n.height, (k.anchor.x * -n.width + 0.5) | 0, (k.anchor.y * -n.height + 0.5) | 0, n.width, n.height);
}
}
}
}
};
a.MovieClip = function (b) {
a.Sprite.call(this, b[0]);
this.textures = b;
this.animationSpeed = 1;
this.loop = !0;
this.onComplete = null;
this.currentFrame = 0;
this.playing = !1;
};
a.MovieClip.prototype = Object.create(a.Sprite.prototype);
a.MovieClip.prototype.constructor = a.MovieClip;
Object.defineProperty(a.MovieClip.prototype, "totalFrames", {
get: function () {
return this.textures.length;
},
});
a.MovieClip.prototype.stop = function () {
this.playing = !1;
};
a.MovieClip.prototype.play = function () {
this.playing = !0;
};
a.MovieClip.prototype.gotoAndStop = function (a) {
this.playing = !1;
this.currentFrame = a;
this.setTexture(this.textures[((this.currentFrame + 0.5) | 0) % this.textures.length]);
};
a.MovieClip.prototype.gotoAndPlay = function (a) {
this.currentFrame = a;
this.playing = !0;
};
a.MovieClip.prototype.updateTransform = function () {
a.Sprite.prototype.updateTransform.call(this);
if (this.playing) {
this.currentFrame += this.animationSpeed;
var b = (this.currentFrame + 0.5) | 0;
this.currentFrame %= this.textures.length;
if (this.loop || b < this.textures.length) this.setTexture(this.textures[b % this.textures.length]);
else if (b >= this.textures.length && (this.gotoAndStop(this.textures.length - 1), this.onComplete)) this.onComplete();
}
};
a.MovieClip.fromFrames = function (b) {
for (var d = [], e = 0; e < b.length; e++) d.push(new a.Texture.fromFrame(b[e]));
return new a.MovieClip(d);
};
a.MovieClip.fromImages = function (b) {
for (var d = [], e = 0; e < b.length; e++) d.push(new a.Texture.fromImage(b[e]));
return new a.MovieClip(d);
};
a.FilterBlock = function () {
this.renderable = this.visible = !0;
};
a.FilterBlock.prototype.constructor = a.FilterBlock;
a.Text = function (b, d) {
this.canvas = document.createElement("canvas");
this.context = this.canvas.getContext("2d");
this.resolution = 1;
a.Sprite.call(this, a.Texture.fromCanvas(this.canvas));
this.setText(b);
this.setStyle(d);
};
a.Text.prototype = Object.create(a.Sprite.prototype);
a.Text.prototype.constructor = a.Text;
Object.defineProperty(a.Text.prototype, "width", {
get: function () {
this.dirty && (this.updateText(), (this.dirty = !1));
return this.scale.x * this.texture.frame.width;
},
set: function (a) {
this.scale.x = a / this.texture.frame.width;
this._width = a;
},
});
Object.defineProperty(a.Text.prototype, "height", {
get: function () {
this.dirty && (this.updateText(), (this.dirty = !1));
return this.scale.y * this.texture.frame.height;
},
set: function (a) {
this.scale.y = a / this.texture.frame.height;
this._height = a;
},
});
a.Text.prototype.setStyle = function (a) {
a = a || {};
a.font = a.font || "bold 20pt Arial";
a.fill = a.fill || "black";
a.align = a.align || "left";
a.stroke = a.stroke || "black";
a.strokeThickness = a.strokeThickness || 0;
a.wordWrap = a.wordWrap || !1;
a.wordWrapWidth = a.wordWrapWidth || 100;
a.dropShadow = a.dropShadow || !1;
a.dropShadowAngle = a.dropShadowAngle || Math.PI / 6;
a.dropShadowDistance = a.dropShadowDistance || 4;
a.dropShadowColor = a.dropShadowColor || "black";
this.style = a;
this.dirty = !0;
};
a.Text.prototype.setText = function (a) {
this.text = a.toString() || " ";
this.dirty = !0;
};
a.Text.prototype.updateText = function () {
this.texture.baseTexture.resolution = this.resolution;
this.context.font = this.style.font;
var b = this.text;
this.style.wordWrap && (b = this.wordWrap(this.text));
var b = b.split(/(?:\r\n|\r|\n)/),
d = [],
e = 0,
f = null,
g = 0,
k = !0,
m = null,
n = JSUTIL.getOpenTypeCustomFont(this.style.name, this.style.bold, this.style.italic);
if (null !== n)
for (var k = !1, p = this.style.size, m = { kerning: !0 }, f = a.Text.prototype.determineFontProperties(this.style.font, n, p), q = 0; q < b.length; q++) {
var r = b[q],
t = 0,
u = 0,
B = 0;
n.forEachGlyph(r, 0, 0, p, m, function (a, b, d, e) {
t = b;
B = a.advanceWidth;
});
t += (1 / n.unitsPerEm) * B * p;
g = u = t - 0;
d[q] = g;
e = Math.max(e, g);
}
if (!0 === k) for (f = a.Text.prototype.determineFontProperties(this.style.font), q = 0; q < b.length; q++) (g = this.context.measureText(b[q]).width), (d[q] = g), (e = Math.max(e, g));
g = f.fontSize;
u = e + 2 * this.style.strokeThickness;
this.style.dropShadow && (u += Math.abs(this.style.dropShadowDistance));
this.canvas.width = (u + this.context.lineWidth) * this.resolution + (0 <= this.style.font.indexOf_1("italic") ? 5 : 0);
var g = g + this.style.strokeThickness,
A = !0 === k ? 15 : 0,
C = g * b.length;
this.style.dropShadow && (C += Math.abs(this.style.dropShadowDistance));
this.canvas.height = C * this.resolution + A;
!0 === k && f.leading < f.descent && (A += Math.floor(-f.leading + (4 * f.descent) / 3));
this.context.scale(this.resolution, this.resolution);
navigator.isCocoonJS && this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.context.font = this.style.font;
this.context.lineWidth = this.style.strokeThickness;
this.context.textBaseline = "top";
var E;
if (this.style.dropShadow) {
this.context.fillStyle = this.style.dropShadowColor;
this.context.strokeStyle = this.style.dropShadowColor;
for (var F = Math.sin(this.style.dropShadowAngle) * this.style.dropShadowDistance, D = Math.cos(this.style.dropShadowAngle) * this.style.dropShadowDistance, q = 0; q < b.length; q++)
if (((E = this.style.strokeThickness), (r = this.style.strokeThickness / 2 + q * g + A), "right" === this.style.align ? (E += e - d[q]) : "center" === this.style.align && (E += (e - d[q]) / 2), !0 === k))
this.style.stroke && this.style.strokeThickness && ((this.context.lineJoin = "round"), this.context.strokeText(b[q], E + F, r + D), (this.context.lineJoin = "miter")),
this.style.fill && this.context.fillText(b[q], E + F, r + D);
else {
p = this.style.size;
E += F;
var H = r + f.ascent + D,
r = b[q];
this.context.lineJoin = "round";
if (this.style.stroke && this.style.strokeThickness) {
var I = n.getPath(r, E, H, p, m);
I.fill = this.style.dropShadowColor;
I.stroke = this.style.dropShadowColor;
I.strokeWidth = 1.1 * this.style.strokeThickness;
I.draw(this.context);
}
p = n.getPath(r, E, H, p, m);
p.fill = this.style.dropShadowColor;
p.stroke = null;
p.strokeWidth = 1;
p.draw(this.context);
this.context.lineJoin = "miter";
}
}
F = null;
if ("undefined" !== typeof this.style.gradient && null !== this.style.gradient) {
var p = this.style.gradient,
D = p.gradient.rotation,
q = p.boxwidth,
u = (u - q) / 2,
F = Math.sin(D),
D = Math.cos(D),
I = 0.5 * q,
L = 0.5 * C,
r = 2 * Math.max(q, C);
E = H = 0;
E = D * r;
var J = F * r,
r = I - E,
H = L - J,
I = I + E - r,
L = L + J - H,
M = q,
N = 0,
P = 0,
O = C,
J = (-L * (r - M) + I * (H - N)) / (-P * L + I * O),
M = (P * (H - N) - O * (r - M)) / (-P * L + I * O);
E = 0 <= J && 1 >= J && 0 <= M && 1 >= M ? H + M * L : 0 < F ? C : 0;
M = 0;
N = C;
P = q;
O = 0;
J = (-L * (r - M) + I * (H - N)) / (-P * L + I * O);
M = (P * (H - N) - O * (r - M)) / (-P * L + I * O);
H = 0 <= J && 1 >= J && 0 <= M && 1 >= M ? r + M * I : 0 < D ? q : 0;
F = this.context.createLinearGradient(u + (q - H), C - E + A, u + H, E + A);
for (q = 0; q < p.gradient.fractions.length; ++q) F.addColorStop(p.gradient.fractions[q], p.gradient.colors[q].getRGBString_0());
this.context.fillStyle = F;
} else this.context.fillStyle = this.style.fill;
this.context.strokeStyle = this.style.stroke;
for (q = 0; q < b.length; q++)
(E = this.style.strokeThickness),
(r = this.style.strokeThickness / 2 + q * g + A),
"right" === this.style.align ? (E += e - d[q]) : "center" === this.style.align && (E += (e - d[q]) / 2),
!0 === k
? (this.style.stroke && this.style.strokeThickness && ((this.context.lineJoin = "round"), this.context.strokeText(b[q], E, r), (this.context.lineJoin = "miter")), this.style.fill && this.context.fillText(b[q], E, r))
: ((p = this.style.size),
(H = r + f.ascent),
(r = b[q]),
(this.context.lineJoin = "round"),
this.style.stroke &&
this.style.strokeThickness &&
((I = n.getPath(r, E, H, p, m)), (I.fill = this.style.fill), (I.stroke = this.style.stroke), (I.strokeWidth = 1.1 * this.style.strokeThickness), I.draw(this.context)),
(p = n.getPath(r, E, H, p, m)),
(p.fill = null !== F ? F : this.style.fill),
(p.stroke = null),
(p.strokeWidth = 1),
p.draw(this.context),
(this.context.lineJoin = "miter"));
this.updateTexture();
};
a.Text.prototype.updateTexture = function () {
this.texture.baseTexture.width = this.canvas.width;
this.texture.baseTexture.height = this.canvas.height;
this.texture.crop.width = this.texture.frame.width = this.canvas.width;
this.texture.crop.height = this.texture.frame.height = this.canvas.height;
this._width = this.canvas.width;
this._height = this.canvas.height;
this.texture.baseTexture.dirty();
};
a.Text.prototype._renderWebGL = function (b) {
this.dirty && ((this.resolution = b.resolution), this.updateText(), (this.dirty = !1));
a.Sprite.prototype._renderWebGL.call(this, b);
};
a.Text.prototype._renderCanvas = function (b) {
this.dirty && ((this.resolution = b.resolution), this.updateText(), (this.dirty = !1));
a.Sprite.prototype._renderCanvas.call(this, b);
};
a.Text.getTextHeight = function (a, d, e, f, g) {
a.fillStyle = "#f00";
a.fillRect(0, 0, e, f);
a.fillStyle = "#000";
a.fillText(d, 0, 0);
a = a.getImageData(0, 0, e, f).data;
d = a.length;
e *= 4;
var k,
m = 0,
n = 0,
p = !1;
if (g) {
for (g = 0; g < f; g++) {
for (k = 0; k < e; k += 4)
if (255 !== a[m + k]) {
p = !0;
break;
}
if (p) break;
else m += e;
}
n = g;
}
m = d - e;
p = !1;
for (g = f; 0 < g; g--) {
for (k = 0; k < e; k += 4)
if (255 !== a[m + k]) {
p = !0;
break;
}
if (p) break;
else m -= e;
}
return [n, g];
};
a.Text.prototype.determineFontProperties = function (b, d, e) {
var f = "undefined" === typeof d,
g = b + "_" + (f ? "ntiv" : "cstm"),
k = a.Text.fontPropertiesCache[g];
if (!k) {
k = {};
if (!0 === f) {
var m = a.Text.fontPropertiesCanvas;
d = a.Text.fontPropertiesContext;
d.font = b;
d.textBaseline = "top";
e = Math.ceil(d.measureText("Mg|").width);
f = 3 * Math.ceil(d.measureText("M").width);
m.width = e;
m.height = f;
d.font = b;
d.textBaseline = "top";
m = a.Text.getTextHeight(d, "M", e, f, !0);
b = m[0];
m = m[1];
d = a.Text.getTextHeight(d, "Mg|", e, f, !1)[1] - m;
k.ascent = m;
k.descent = d;
k.leading = b;
k.fontSize = b < d ? m - b + (7 / 3) * d : m + d;
} else (b = (1 / d.unitsPerEm) * e), (k.ascent = d.ascender * b), (k.descent = Math.abs(d.descender) * b), (k.leading = 0), (k.fontSize = Math.ceil(k.ascent + k.descent));
a.Text.fontPropertiesCache[g] = k;
}
return k;
};
a.Text.prototype.determineFontHeight = function (b) {
var d = a.Text.heightCache[b];
if (!d) {
var e = document.getElementsByTagName("body")[0],
f = document.createElement("div"),
d = document.createTextNode("M");
f.appendChild(d);
f.setAttribute("style", b + ";position:absolute;top:0;left:0");
e.appendChild(f);
d = f.offsetHeight;
a.Text.heightCache[b] = d;
e.removeChild(f);
}
return d;
};
a.Text.prototype.wordWrap = function (a) {
var d = "";
a = a.split("\n");
for (var e = 0; e < a.length; e++) {
for (var f = this.style.wordWrapWidth, g = a[e].split(" "), k = 0; k < g.length; k++) {
var m = this.context.measureText(g[k]).width,
n = m + this.context.measureText(" ").width;
0 === k || n > f ? (0 < k && (d += "\n"), (d += g[k]), (f = this.style.wordWrapWidth - m)) : ((f -= n), (d += " " + g[k]));
}
e < a.length - 1 && (d += "\n");
}
return d;
};
a.Text.prototype.getBounds = function (b) {
this.dirty && (this.updateText(), (this.dirty = !1));
return a.Sprite.prototype.getBounds.call(this, b);
};
a.Text.prototype.destroy = function (a) {
this.canvas = this.context = null;
this.texture.destroy(void 0 === a ? !0 : a);
};
a.Text.fontPropertiesCache = {};
a.Text.heightCache = {};
a.Text.fontPropertiesCanvas = document.createElement("canvas");
a.Text.fontPropertiesContext = a.Text.fontPropertiesCanvas.getContext("2d");
a.BitmapText = function (b, d) {
a.DisplayObjectContainer.call(this);
this.textHeight = this.textWidth = 0;
this._pool = [];
this.setText(b);
this.setStyle(d);
this.updateText();
this.dirty = !1;
};
a.BitmapText.prototype = Object.create(a.DisplayObjectContainer.prototype);
a.BitmapText.prototype.constructor = a.BitmapText;
a.BitmapText.prototype.setText = function (a) {
this.text = a || " ";
this.dirty = !0;
};
a.BitmapText.prototype.setStyle = function (b) {
b = b || {};
b.align = b.align || "left";
this.style = b;
var d = b.font.split(" ");
this.fontName = d[d.length - 1];
this.fontSize = 2 <= d.length ? parseInt(d[d.length - 2], 10) : a.BitmapText.fonts[this.fontName].size;
this.dirty = !0;
this.tint = b.tint;
};
a.BitmapText.prototype.updateText = function () {
for (var b = a.BitmapText.fonts[this.fontName], d = new a.Point(), e = null, f = [], g = 0, k = [], m = 0, n = this.fontSize / b.size, p = 0; p < this.text.length; p++) {
var q = this.text.charCodeAt(p);
if (/(?:\r\n|\r|\n)/.test(this.text.charAt(p))) k.push(d.x), (g = Math.max(g, d.x)), m++, (d.x = 0), (d.y += b.lineHeight), (e = null);
else {
var r = b.chars[q];
r && (e && r.kerning[e] && (d.x += r.kerning[e]), f.push({ texture: r.texture, line: m, charCode: q, position: new a.Point(d.x + r.xOffset, d.y + r.yOffset) }), (d.x += r.xAdvance), (e = q));
}
}
k.push(d.x);
g = Math.max(g, d.x);
e = [];
for (p = 0; p <= m; p++) (q = 0), "right" === this.style.align ? (q = g - k[p]) : "center" === this.style.align && (q = (g - k[p]) / 2), e.push(q);
m = this.children.length;
k = f.length;
q = this.tint || 16777215;
for (p = 0; p < k; p++)
(r = p < m ? this.children[p] : this._pool.pop()) ? r.setTexture(f[p].texture) : (r = new a.Sprite(f[p].texture)),
(r.position.x = (f[p].position.x + e[f[p].line]) * n),
(r.position.y = f[p].position.y * n),
(r.scale.x = r.scale.y = n),
(r.tint = q),
r.parent || this.addChild(r);
for (; this.children.length > k; ) (f = this.getChildAt(this.children.length - 1)), this._pool.push(f), this.removeChild(f);
this.textWidth = g * n;
this.textHeight = (d.y + b.lineHeight) * n;
};
a.BitmapText.prototype.updateTransform = function () {
this.dirty && (this.updateText(), (this.dirty = !1));
a.DisplayObjectContainer.prototype.updateTransform.call(this);
};
a.BitmapText.fonts = {};
a.InteractionManager = function () {};
a.InteractionManager.prototype.collectInteractiveSprite = function () {};
a.InteractionManager.prototype.setTarget = function () {};
a.InteractionManager.prototype.setTargetDomElement = function () {};
a.InteractionManager.prototype.removeEvents = function () {};
a.InteractionManager.prototype.update = function () {};
a.Stage = function (b) {
a.DisplayObjectContainer.call(this);
this.worldTransform = new a.Matrix();
this.interactive = !0;
this.interactionManager = new a.InteractionManager(this);
this.dirty = !0;
this.stage = this;
this.stage.hitArea = new a.Rectangle(0, 0, 1e5, 1e5);
this.setBackgroundColor(b);
};
a.Stage.prototype = Object.create(a.DisplayObjectContainer.prototype);
a.Stage.prototype.constructor = a.Stage;
a.Stage.prototype.setInteractionDelegate = function (a) {
this.interactionManager.setTargetDomElement(a);
};
a.Stage.prototype.updateTransform = function () {
this.worldAlpha = 1;
for (var a = 0, d = this.children.length; a < d; a++) this.children[a].updateTransform();
this.dirty && ((this.dirty = !1), (this.interactionManager.dirty = !0));
this.interactive && this.interactionManager.update();
};
a.Stage.prototype.setBackgroundColor = function (b) {
this.backgroundColor = b || 0;
this.backgroundColorSplit = a.hex2rgb(this.backgroundColor);
b = this.backgroundColor.toString(16);
b = "000000".substr(0, 6 - b.length) + b;
this.backgroundColorString = "#" + b;
};
a.Stage.prototype.getMousePosition = function () {
return this.interactionManager.mouse.global;
};
(function (a) {
for (var d = 0, e = ["ms", "moz", "webkit", "o"], f = 0; f < e.length && !a.requestAnimationFrame; ++f)
(a.requestAnimationFrame = a[e[f] + "RequestAnimationFrame"]), (a.cancelAnimationFrame = a[e[f] + "CancelAnimationFrame"] || a[e[f] + "CancelRequestAnimationFrame"]);
a.requestAnimationFrame ||
(a.requestAnimationFrame = function (e) {
var f = new Date().getTime(),
m = Math.max(0, 16 - (f - d)),
n = a.setTimeout(function () {
e(f + m);
}, m);
d = f + m;
return n;
});
a.cancelAnimationFrame ||
(a.cancelAnimationFrame = function (a) {
clearTimeout(a);
});
a.requestAnimFrame = a.requestAnimationFrame;
})(this);
a.hex2rgb = function (a) {
return [((a >> 16) & 255) / 255, ((a >> 8) & 255) / 255, (a & 255) / 255];
};
a.rgb2hex = function (a) {
return ((255 * a[0]) << 16) + ((255 * a[1]) << 8) + 255 * a[2];
};
"function" !== typeof Function.prototype.bind &&
(Function.prototype.bind = (function () {
return function (a) {
function d() {
for (var f = arguments.length, m = Array(f); f--; ) m[f] = arguments[f];
m = g.concat(m);
return e.apply(this instanceof d ? this : a, m);
}
var e = this,
f = arguments.length - 1,
g = [];
if (0 < f) for (g.length = f; f--; ) g[f] = arguments[f + 1];
if ("function" !== typeof e) throw new TypeError();
d.prototype = (function m(a) {
a && (m.prototype = a);
if (!(this instanceof m)) return new m();
})(e.prototype);
return d;
};
})());
a.AjaxRequest = function () {
var a = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Microsoft.XMLHTTP"];
if (window.ActiveXObject)
for (var d = 0; d < a.length; d++)
try {
return new window.ActiveXObject(a[d]);
} catch (e) {}
else return window.XMLHttpRequest ? new window.XMLHttpRequest() : !1;
};
a.canUseNewCanvasBlendModes = function () {
if ("undefined" === typeof document) return !1;
var a = document.createElement("canvas");
a.width = 1;
a.height = 1;
a = a.getContext("2d");
a.fillStyle = "#000";
a.fillRect(0, 0, 1, 1);
a.globalCompositeOperation = "multiply";
a.fillStyle = "#fff";
a.fillRect(0, 0, 1, 1);
return 0 === a.getImageData(0, 0, 1, 1).data[0];
};
a.getNextPowerOfTwo = function (a) {
if (0 < a && 0 === (a & (a - 1))) return a;
for (var d = 1; d < a; ) d <<= 1;
return d;
};
a.EventTarget = {
call: function (b) {
b && ((b = b.prototype || b), a.EventTarget.mixin(b));
},
mixin: function (b) {
b.listeners = function (a) {
this._listeners = this._listeners || {};
return this._listeners[a] ? this._listeners[a].slice() : [];
};
b.emit = b.dispatchEvent = function (b, e) {
this._listeners = this._listeners || {};
"object" === typeof b && ((e = b), (b = b.type));
(e && !0 === e.__isEventObject) || (e = new a.Event(this, b, e));
if (this._listeners && this._listeners[b]) {
var f = this._listeners[b].slice(0),
g = f.length,
k = f[0],
m;
for (m = 0; m < g; k = f[++m]) if ((k.call(this, e), e.stoppedImmediate)) return this;
if (e.stopped) return this;
}
this.parent && this.parent.emit && this.parent.emit.call(this.parent, b, e);
return this;
};
b.on = b.addEventListener = function (a, b) {
this._listeners = this._listeners || {};
(this._listeners[a] = this._listeners[a] || []).push(b);
return this;
};
b.once = function (a, b) {
function f() {
b.apply(g.off(a, f), arguments);
}
this._listeners = this._listeners || {};
var g = this;
f._originalHandler = b;
return this.on(a, f);
};
b.off = b.removeEventListener = function (a, b) {
this._listeners = this._listeners || {};
if (!this._listeners[a]) return this;
for (var f = this._listeners[a], g = b ? f.length : 0; 0 < g--; ) (f[g] !== b && f[g]._originalHandler !== b) || f.splice(g, 1);
0 === f.length && delete this._listeners[a];
return this;
};
b.removeAllListeners = function (a) {
this._listeners = this._listeners || {};
if (!this._listeners[a]) return this;
delete this._listeners[a];
return this;
};
},
};
a.Event = function (a, d, e) {
this.__isEventObject = !0;
this.stoppedImmediate = this.stopped = !1;
this.target = a;
this.type = d;
this.content = this.data = e;
this.timeStamp = Date.now();
};
a.Event.prototype.stopPropagation = function () {
this.stopped = !0;
};
a.Event.prototype.stopImmediatePropagation = function () {
this.stoppedImmediate = !0;
};
a.autoDetectRenderer = function (b, d, e) {
b || (b = 800);
d || (d = 600);
var f;
try {
var g = document.createElement("canvas");
g.width = 8;
g.height = 8;
var k = g.getContext("webgl", { stencil: !0 }) || g.getContext("experimental-webgl", { stencil: !0 }),
m = !!window.WebGLRenderingContext && k;
if (m) {
var n = k.getContextAttributes();
if ((m = m && n.stencil)) {
program = a.compileProgram(k, ["attribute vec2 a_position; void main(){gl_Position=vec4(a_position,0,1);}"], ["void main(){gl_FragColor=vec4(1,0,0,1);}"]);
k.useProgram(program);
var p = k.getAttribLocation(program, "a_position"),
q = k.createBuffer();
k.bindBuffer(k.ARRAY_BUFFER, q);
k.bufferData(k.ARRAY_BUFFER, new Float32Array([-1, -1, 0, -1, -1, 1, -1, 1, 0, -1, 0, 1]), k.STATIC_DRAW);
k.enableVertexAttribArray(p);
k.vertexAttribPointer(p, 2, k.FLOAT, !1, 0, 0);
k.enable(k.STENCIL_TEST);
k.clear(k.STENCIL_BUFFER_BIT);
k.colorMask(!1, !1, !1, !1);
k.stencilFunc(k.EQUAL, 0, 255);
k.stencilOp(k.KEEP, k.KEEP, k.INCR);
k.drawArrays(k.TRIANGLES, 0, 6);
k.stencilFunc(k.EQUAL, 1, 255);
k.colorMask(!0, !0, !0, !0);
k.stencilOp(k.KEEP, k.KEEP, k.KEEP);
k.bufferData(k.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]), k.STATIC_DRAW);
k.drawArrays(k.TRIANGLES, 0, 6);
var r = new Uint8Array(256);
k.readPixels(0, 0, 8, 8, k.RGBA, k.UNSIGNED_BYTE, r);
m = 255 == r[132] && 0 == r[152];
}
}
f = m;
} catch (t) {
f = !1;
}
return f ? new a.WebGLRenderer(b, d, e) : new a.CanvasRenderer(b, d, e);
};
a.autoDetectRecommendedRenderer = function (b, d, e) {
b || (b = 800);
d || (d = 600);
var f;
try {
var g = document.createElement("canvas");
f = !!window.WebGLRenderingContext && (g.getContext("webgl") || g.getContext("experimental-webgl"));
} catch (k) {
f = !1;
}
g = /Android/i.test(navigator.userAgent);
return f && !g ? new a.WebGLRenderer(b, d, e) : new a.CanvasRenderer(b, d, e);
};
a.PolyK = {};
a.PolyK.Triangulate = function (b) {
var d = !0,
e = b.length >> 1;
if (3 > e) return [];
for (var f = [], g = [], k = 0; k < e; k++) g.push(k);
for (var k = 0, m = e; 3 < m; ) {
var n = g[(k + 0) % m],
p = g[(k + 1) % m],
q = g[(k + 2) % m],
r = b[2 * n],
t = b[2 * n + 1],
u = b[2 * p],
B = b[2 * p + 1],
A = b[2 * q],
C = b[2 * q + 1],
E = !1;
if (a.PolyK._convex(r, t, u, B, A, C, d))
for (var E = !0, F = 0; F < m; F++) {
var D = g[F];
if (D !== n && D !== p && D !== q && a.PolyK._PointInTriangle(b[2 * D], b[2 * D + 1], r, t, u, B, A, C)) {
E = !1;
break;
}
}
if (E) f.push(n, p, q), g.splice((k + 1) % m, 1), m--, (k = 0);
else if (k++ > 3 * m)
if (d) {
f = [];
g = [];
for (k = 0; k < e; k++) g.push(k);
k = 0;
m = e;
d = !1;
} else return null;
}
f.push(g[0], g[1], g[2]);
return f;
};
a.PolyK._PointInTriangle = function (a, d, e, f, g, k, m, n) {
m -= e;
n -= f;
g -= e;
k -= f;
a -= e;
e = d - f;
d = m * m + n * n;
f = m * g + n * k;
m = m * a + n * e;
n = g * g + k * k;
g = g * a + k * e;
k = 1 / (d * n - f * f);
n = (n * m - f * g) * k;
m = (d * g - f * m) * k;
return 0 <= n && 0 <= m && 1 > n + m;
};
a.PolyK._convex = function (a, d, e, f, g, k, m) {
return 0 <= (d - f) * (g - e) + (e - a) * (k - f) === m;
};
a.initDefaultShaders = function () {};
a.CompileVertexShader = function (b, d) {
return a._CompileShader(b, d, b.VERTEX_SHADER);
};
a.CompileFragmentShader = function (b, d) {
return a._CompileShader(b, d, b.FRAGMENT_SHADER);
};
a._CompileShader = function (a, d, e) {
d = d.join("\n");
e = a.createShader(e);
a.shaderSource(e, d);
a.compileShader(e);
return a.getShaderParameter(e, a.COMPILE_STATUS) ? e : (window.console.log(a.getShaderInfoLog(e)), null);
};
a.compileProgram = function (b, d, e) {
e = a.CompileFragmentShader(b, e);
d = a.CompileVertexShader(b, d);
var f = b.createProgram();
b.attachShader(f, d);
b.attachShader(f, e);
b.linkProgram(f);
b.getProgramParameter(f, b.LINK_STATUS) || window.console.log("Could not initialise shaders");
return f;
};
a.PixiShader = function (b) {
this._UID = a._UID++;
this.gl = b;
this.program = null;
this.fragmentSrc = ["precision lowp float;", "varying vec2 vTextureCoord;", "varying vec4 vColor;", "uniform sampler2D uSampler;", "void main(void) {", " gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;", "}"];
this.textureCount = 0;
this.dirty = this.firstRun = !0;
this.attributes = [];
this.init();
};
a.PixiShader.prototype.constructor = a.PixiShader;
a.PixiShader.prototype.init = function () {
var b = this.gl,
d = a.compileProgram(b, this.vertexSrc || a.PixiShader.defaultVertexSrc, this.fragmentSrc);
b.useProgram(d);
this.uSampler = b.getUniformLocation(d, "uSampler");
this.projectionVector = b.getUniformLocation(d, "projectionVector");
this.offsetVector = b.getUniformLocation(d, "offsetVector");
this.dimensions = b.getUniformLocation(d, "dimensions");
this.aVertexPosition = b.getAttribLocation(d, "aVertexPosition");
this.aTextureCoord = b.getAttribLocation(d, "aTextureCoord");
this.colorAttribute = b.getAttribLocation(d, "aColor");
0 > this.colorAttribute && ((this.colorAttribute = Math.max(this.aVertexPosition, this.aTextureCoord) + 1), (this.colorAttributeError = !0), console.log("Warning: Shader.colorAttribute location is wrong!"));
this.attributes = [this.aVertexPosition, this.aTextureCoord, this.colorAttribute];
for (var e in this.uniforms) this.uniforms[e].uniformLocation = b.getUniformLocation(d, e);
this.initUniforms();
this.program = d;
};
a.PixiShader.prototype.initUniforms = function () {
this.textureCount = 1;
var a = this.gl,
d,
e;
for (e in this.uniforms) {
d = this.uniforms[e];
var f = d.type;
"sampler2D" === f
? ((d._init = !1), null !== d.value && this.initSampler2D(d))
: "mat2" === f || "mat3" === f || "mat4" === f
? ((d.glMatrix = !0), (d.glValueLength = 1), "mat2" === f ? (d.glFunc = a.uniformMatrix2fv) : "mat3" === f ? (d.glFunc = a.uniformMatrix3fv) : "mat4" === f && (d.glFunc = a.uniformMatrix4fv))
: ((d.glFunc = a["uniform" + f]), (d.glValueLength = "2f" === f || "2i" === f ? 2 : "3f" === f || "3i" === f ? 3 : "4f" === f || "4i" === f ? 4 : 1));
}
};
a.PixiShader.prototype.initSampler2D = function (a) {
if (a.value && a.value.baseTexture && a.value.baseTexture.hasLoaded) {
var d = this.gl;
d.activeTexture(d["TEXTURE" + this.textureCount]);
d.bindTexture(d.TEXTURE_2D, a.value.baseTexture._glTextures[d.id]);
if (a.textureData) {
var e = a.textureData,
f = e.magFilter ? e.magFilter : d.LINEAR,
g = e.minFilter ? e.minFilter : d.LINEAR,
k = e.wrapS ? e.wrapS : d.CLAMP_TO_EDGE,
m = e.wrapT ? e.wrapT : d.CLAMP_TO_EDGE,
n = e.luminance ? d.LUMINANCE : d.RGBA;
e.repeat && (m = k = d.REPEAT);
d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL, !!e.flipY);
e.width
? d.texImage2D(d.TEXTURE_2D, 0, n, e.width ? e.width : 512, e.height ? e.height : 2, e.border ? e.border : 0, n, d.UNSIGNED_BYTE, null)
: d.texImage2D(d.TEXTURE_2D, 0, n, d.RGBA, d.UNSIGNED_BYTE, a.value.baseTexture.source);
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER, f);
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MIN_FILTER, g);
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_S, k);
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_T, m);
}
d.uniform1i(a.uniformLocation, this.textureCount);
a._init = !0;
this.textureCount++;
}
};
a.PixiShader.prototype.syncUniforms = function () {
this.textureCount = 1;
var b,
d = this.gl,
e;
for (e in this.uniforms)
(b = this.uniforms[e]),
1 === b.glValueLength
? !0 === b.glMatrix
? b.glFunc.call(d, b.uniformLocation, b.transpose, b.value)
: b.glFunc.call(d, b.uniformLocation, b.value)
: 2 === b.glValueLength
? b.glFunc.call(d, b.uniformLocation, b.value.x, b.value.y)
: 3 === b.glValueLength
? b.glFunc.call(d, b.uniformLocation, b.value.x, b.value.y, b.value.z)
: 4 === b.glValueLength
? b.glFunc.call(d, b.uniformLocation, b.value.x, b.value.y, b.value.z, b.value.w)
: "sampler2D" === b.type &&
(b._init
? (d.activeTexture(d["TEXTURE" + this.textureCount]),
b.value.baseTexture._dirty[d.id] ? a.instances[d.id].updateTexture(b.value.baseTexture) : d.bindTexture(d.TEXTURE_2D, b.value.baseTexture._glTextures[d.id]),
d.uniform1i(b.uniformLocation, this.textureCount),
this.textureCount++)
: this.initSampler2D(b));
};
a.PixiShader.prototype.destroy = function () {
this.gl.deleteProgram(this.program);
this.attributes = this.gl = this.uniforms = null;
};
a.PixiShader.defaultVertexSrc = [
"attribute vec2 aVertexPosition;",
"attribute vec2 aTextureCoord;",
"attribute vec4 aColor;",
"uniform vec2 projectionVector;",
"uniform vec2 offsetVector;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"const vec2 center = vec2(-1.0, 1.0);",
"void main(void) {",
"gl_Position = vec4( ((aVertexPosition + offsetVector) / projectionVector) + center , 0.0, 1.0);",
"vTextureCoord = aTextureCoord;",
"vec3 color = mod(vec3(aColor.y/65536.0, aColor.y/256.0, aColor.y), 256.0) / 256.0;",
"vColor = vec4(color, aColor.x);",
"if (aColor.x < 0. && aColor.y < 0.)",
"vColor = vec4(1., 1., 1., 1.);",
"}",
];
a.PixiFastShader = function (b) {
this._UID = a._UID++;
this.gl = b;
this.program = null;
this.fragmentSrc = ["precision lowp float;", "varying vec2 vTextureCoord;", "varying float vColor;", "uniform sampler2D uSampler;", "void main(void) {", " gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;", "}"];
this.vertexSrc = [
"attribute vec2 aVertexPosition;",
"attribute vec2 aPositionCoord;",
"attribute vec2 aScale;",
"attribute float aRotation;",
"attribute vec2 aTextureCoord;",
"attribute float aColor;",
"uniform vec2 projectionVector;",
"uniform vec2 offsetVector;",
"uniform mat3 uMatrix;",
"varying vec2 vTextureCoord;",
"varying float vColor;",
"const vec2 center = vec2(-1.0, 1.0);",
"void main(void) {",
" vec2 v;",
" vec2 sv = aVertexPosition * aScale;",
" v.x = (sv.x) * cos(aRotation) - (sv.y) * sin(aRotation);",
" v.y = (sv.x) * sin(aRotation) + (sv.y) * cos(aRotation);",
" v = ( uMatrix * vec3(v + aPositionCoord , 1.0) ).xy ;",
" gl_Position = vec4( ( v / projectionVector) + center , 0.0, 1.0);",
" vTextureCoord = aTextureCoord;",
" vColor = aColor;",
"}",
];
this.textureCount = 0;
this.init();
};
a.PixiFastShader.prototype.constructor = a.PixiFastShader;
a.PixiFastShader.prototype.init = function () {
var b = this.gl,
d = a.compileProgram(b, this.vertexSrc, this.fragmentSrc);
b.useProgram(d);
this.uSampler = b.getUniformLocation(d, "uSampler");
this.projectionVector = b.getUniformLocation(d, "projectionVector");
this.offsetVector = b.getUniformLocation(d, "offsetVector");
this.dimensions = b.getUniformLocation(d, "dimensions");
this.uMatrix = b.getUniformLocation(d, "uMatrix");
this.aVertexPosition = b.getAttribLocation(d, "aVertexPosition");
this.aPositionCoord = b.getAttribLocation(d, "aPositionCoord");
this.aScale = b.getAttribLocation(d, "aScale");
this.aRotation = b.getAttribLocation(d, "aRotation");
this.aTextureCoord = b.getAttribLocation(d, "aTextureCoord");
this.colorAttribute = b.getAttribLocation(d, "aColor");
-1 === this.colorAttribute && (this.colorAttribute = 2);
this.attributes = [this.aVertexPosition, this.aPositionCoord, this.aScale, this.aRotation, this.aTextureCoord, this.colorAttribute];
this.program = d;
};
a.PixiFastShader.prototype.destroy = function () {
this.gl.deleteProgram(this.program);
this.attributes = this.gl = this.uniforms = null;
};
a.StripShader = function (b) {
this._UID = a._UID++;
this.gl = b;
this.program = null;
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"uniform float alpha;",
"uniform sampler2D uSampler;",
"void main(void) {",
" gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y)) * alpha;",
"}",
];
this.vertexSrc = [
"attribute vec2 aVertexPosition;",
"attribute vec2 aTextureCoord;",
"uniform mat3 translationMatrix;",
"uniform vec2 projectionVector;",
"uniform vec2 offsetVector;",
"varying vec2 vTextureCoord;",
"void main(void) {",
" vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);",
" v -= offsetVector.xyx;",
" gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);",
" vTextureCoord = aTextureCoord;",
"}",
];
this.init();
};
a.StripShader.prototype.constructor = a.StripShader;
a.StripShader.prototype.init = function () {
var b = this.gl,
d = a.compileProgram(b, this.vertexSrc, this.fragmentSrc);
b.useProgram(d);
this.uSampler = b.getUniformLocation(d, "uSampler");
this.projectionVector = b.getUniformLocation(d, "projectionVector");
this.offsetVector = b.getUniformLocation(d, "offsetVector");
this.colorAttribute = b.getAttribLocation(d, "aColor");
this.aVertexPosition = b.getAttribLocation(d, "aVertexPosition");
this.aTextureCoord = b.getAttribLocation(d, "aTextureCoord");
this.attributes = [this.aVertexPosition, this.aTextureCoord];
this.translationMatrix = b.getUniformLocation(d, "translationMatrix");
this.alpha = b.getUniformLocation(d, "alpha");
this.program = d;
};
a.StripShader.prototype.destroy = function () {
this.gl.deleteProgram(this.program);
this.attribute = this.gl = this.uniforms = null;
};
a.PrimitiveShader = function (b) {
this._UID = a._UID++;
this.gl = b;
this.program = null;
this.fragmentSrc = ["precision mediump float;", "varying vec4 vColor;", "void main(void) {", " gl_FragColor = vColor;", "}"];
this.vertexSrc = [
"attribute vec2 aVertexPosition;",
"attribute vec4 aColor;",
"uniform mat3 translationMatrix;",
"uniform vec2 projectionVector;",
"uniform vec2 offsetVector;",
"uniform float alpha;",
"uniform vec3 tint;",
"uniform float hasColorMatrix;",
"uniform mat4 colorMatrix;",
"varying vec4 vColor;",
"void main(void) {",
" vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);",
" v -= offsetVector.xyx;",
" gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);",
" vec4 color = aColor * vec4(tint, alpha);",
" if(hasColorMatrix > 0.)",
" color *= colorMatrix;",
" vColor = color;",
"}",
];
this.init();
};
a.PrimitiveShader.prototype.constructor = a.PrimitiveShader;
a.PrimitiveShader.prototype.init = function () {
var b = this.gl,
d = a.compileProgram(b, this.vertexSrc, this.fragmentSrc);
b.useProgram(d);
this.projectionVector = b.getUniformLocation(d, "projectionVector");
this.offsetVector = b.getUniformLocation(d, "offsetVector");
this.tintColor = b.getUniformLocation(d, "tint");
this.aVertexPosition = b.getAttribLocation(d, "aVertexPosition");
this.colorAttribute = b.getAttribLocation(d, "aColor");
this.attributes = [this.aVertexPosition, this.colorAttribute];
this.translationMatrix = b.getUniformLocation(d, "translationMatrix");
this.alpha = b.getUniformLocation(d, "alpha");
this.colorMatrix = b.getUniformLocation(d, "colorMatrix");
this.hasColorMatrix = b.getUniformLocation(d, "hasColorMatrix");
this.program = d;
};
a.PrimitiveShader.prototype.destroy = function () {
this.gl.deleteProgram(this.program);
this.attributes = this.gl = this.uniforms = null;
};
a.ComplexPrimitiveShader = function (b) {
this._UID = a._UID++;
this.gl = b;
this.program = null;
this.fragmentSrc = ["precision mediump float;", "varying vec4 vColor;", "void main(void) {", " gl_FragColor = vColor;", "}"];
this.vertexSrc = [
"attribute vec2 aVertexPosition;",
"uniform mat3 translationMatrix;",
"uniform vec2 projectionVector;",
"uniform vec2 offsetVector;",
"uniform vec3 tint;",
"uniform float alpha;",
"uniform vec3 color;",
"varying vec4 vColor;",
"void main(void) {",
" vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);",
" v -= offsetVector.xyx;",
" gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);",
" vColor = vec4(color * alpha * tint, alpha);",
"}",
];
this.init();
};
a.ComplexPrimitiveShader.prototype.constructor = a.ComplexPrimitiveShader;
a.ComplexPrimitiveShader.prototype.init = function () {
var b = this.gl,
d = a.compileProgram(b, this.vertexSrc, this.fragmentSrc);
b.useProgram(d);
this.projectionVector = b.getUniformLocation(d, "projectionVector");
this.offsetVector = b.getUniformLocation(d, "offsetVector");
this.tintColor = b.getUniformLocation(d, "tint");
this.color = b.getUniformLocation(d, "color");
this.aVertexPosition = b.getAttribLocation(d, "aVertexPosition");
this.attributes = [this.aVertexPosition, this.colorAttribute];
this.translationMatrix = b.getUniformLocation(d, "translationMatrix");
this.alpha = b.getUniformLocation(d, "alpha");
this.program = d;
};
a.ComplexPrimitiveShader.prototype.destroy = function () {
this.gl.deleteProgram(this.program);
this.attribute = this.gl = this.uniforms = null;
};
a.ParticleContainerShader = function (b) {
this._UID = a._UID++;
this.gl = b;
this.program = null;
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"varying vec3 vPos;",
"uniform vec4 uClipRect;",
"uniform sampler2D uSampler;",
"uniform float hasColorMatrix;",
"uniform mat4 colorMatrix;",
"void main(void) {",
" if (vColor.a == 0.0 || (uClipRect.z > 0.0 && (vPos.x < uClipRect.x || vPos.x > uClipRect.z || vPos.y < uClipRect.y || vPos.y > uClipRect.w))) discard;",
" vec4 color = texture2D(uSampler, vTextureCoord);",
" if (color.a == 0.0) discard;",
" color = color * vColor;",
" if(hasColorMatrix > 0.0) color = color * colorMatrix;",
" gl_FragColor = color;",
"}",
];
this.vertexSrc = [
"attribute vec2 aVertexPosition;",
"attribute vec2 aTextureCoord;",
"attribute vec2 aPositionCoord;",
"attribute vec2 aScale;",
"attribute float aRotation;",
"attribute float aAlpha;",
"attribute vec4 aColor;",
"uniform mat3 translationMatrix;",
"uniform vec2 projectionVector;",
"uniform vec2 offsetVector;",
"uniform float worldalpha;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"varying vec3 vPos;",
"void main(void) {",
" vec3 v = vec3(0.0, 0.0, 1.0);",
" vec2 sv = aVertexPosition * aScale;",
"\tif (aRotation == 0.0) {",
" \tv.x = sv.x;",
" \tv.y = sv.y;",
"\t} else {",
" \tv.x = sv.x * cos(aRotation) - sv.y * sin(aRotation);",
" \tv.y = sv.x * sin(aRotation) + sv.y * cos(aRotation);",
"\t}",
" v += aPositionCoord.xyx;",
"\tv.x *= translationMatrix[0][0];",
"\tv.y *= translationMatrix[1][1];",
"\tv.x += translationMatrix[2][0];",
"\tv.y += translationMatrix[2][1];",
" v -= offsetVector.xyx;",
" gl_Position = vec4( (v.x / projectionVector.x - 1.0), (v.y / -projectionVector.y + 1.0), 0.0, 1.0);",
" vTextureCoord = aTextureCoord;",
" vColor = aColor;",
" vColor.a *= worldalpha * aAlpha;",
" vPos = v;",
"}",
];
this.init();
};
a.ParticleContainerShader.prototype.constructor = a.ParticleContainerShader;
a.ParticleContainerShader.prototype.init = function () {
var b = this.gl,
d = a.compileProgram(b, this.vertexSrc, this.fragmentSrc);
b.useProgram(d);
this.uSampler = b.getUniformLocation(d, "uSampler");
this.projectionVector = b.getUniformLocation(d, "projectionVector");
this.offsetVector = b.getUniformLocation(d, "offsetVector");
this.aVertexPosition = b.getAttribLocation(d, "aVertexPosition");
this.aTextureCoord = b.getAttribLocation(d, "aTextureCoord");
this.aPositionCoord = b.getAttribLocation(d, "aPositionCoord");
this.aScale = b.getAttribLocation(d, "aScale");
this.aRotation = b.getAttribLocation(d, "aRotation");
this.aAlpha = b.getAttribLocation(d, "aAlpha");
this.aColor = b.getAttribLocation(d, "aColor");
this.attributes = [this.aVertexPosition, this.aTextureCoord, this.aPositionCoord, this.aScale, this.aRotation, this.aAlpha, this.aColor];
this.translationMatrix = b.getUniformLocation(d, "translationMatrix");
this.worldalpha = b.getUniformLocation(d, "worldalpha");
this.colorMatrix = b.getUniformLocation(d, "colorMatrix");
this.hasColorMatrix = b.getUniformLocation(d, "hasColorMatrix");
this.clipRect = b.getUniformLocation(d, "uClipRect");
this.program = d;
};
a.ParticleContainerShader.prototype.destroy = function () {
this.gl.deleteProgram(this.program);
this.attribute = this.gl = this.uniforms = null;
};
Object.defineProperty(a.ParticleContainerShader.prototype, "matrix", {
get: function () {
return this.uniforms.colorMatrix.value;
},
set: function (a) {
null != a
? ((this.uniforms.colorMatrix.value = a), (this.uniforms.hasColorMatrix.value = 1))
: ((this.uniforms.hasColorMatrix.value = 0), (this.uniforms.colorMatrix.value = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]));
},
});
a.PolygonShader = function (b) {
this._UID = a._UID++;
this.gl = b;
this.program = null;
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"varying vec3 vPos;",
"uniform sampler2D uSampler;",
"uniform float hasColorMatrix;",
"uniform mat4 colorMatrix;",
"uniform vec4 uClipRect;",
"void main(void) {",
" if (vColor.a == 0.0 || (uClipRect.z > 0.0 && (vPos.x < uClipRect.x || vPos.x > uClipRect.z || vPos.y < uClipRect.y || vPos.y > uClipRect.w))) discard;",
" vec4 color = texture2D(uSampler, vTextureCoord);",
" if (color.a == 0.0) discard;",
" color = color * vColor;",
" if(hasColorMatrix > 0.0) color = color * colorMatrix;",
" gl_FragColor = color;",
"}",
];
this.vertexSrc = [
"attribute vec2 aVertexPosition;",
"attribute vec2 aTextureCoord;",
"attribute vec4 aColor;",
"uniform mat3 translationMatrix;",
"uniform vec2 projectionVector;",
"uniform vec2 offsetVector;",
"uniform float worldalpha;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"varying vec3 vPos;",
"void main(void) {",
" vec3 v = vec3(aVertexPosition, 1.0);",
"\tv.x *= translationMatrix[0][0];",
"\tv.y *= translationMatrix[1][1];",
"\tv.x += translationMatrix[2][0];",
"\tv.y += translationMatrix[2][1];",
" v -= offsetVector.xyx;",
" gl_Position = vec4( (v.x / projectionVector.x - 1.0), (v.y / -projectionVector.y + 1.0), 0.0, 1.0);",
" vTextureCoord = aTextureCoord;",
" vColor = aColor;",
" vColor.a *= worldalpha;",
" vPos = v;",
"}",
];
this.init();
};
a.PolygonShader.prototype.constructor = a.PolygonShader;
a.PolygonShader.prototype.init = function () {
var b = this.gl,
d = a.compileProgram(b, this.vertexSrc, this.fragmentSrc);
b.useProgram(d);
this.uSampler = b.getUniformLocation(d, "uSampler");
this.projectionVector = b.getUniformLocation(d, "projectionVector");
this.offsetVector = b.getUniformLocation(d, "offsetVector");
this.aVertexPosition = b.getAttribLocation(d, "aVertexPosition");
this.aTextureCoord = b.getAttribLocation(d, "aTextureCoord");
this.aColor = b.getAttribLocation(d, "aColor");
this.attributes = [this.aVertexPosition, this.aTextureCoord, this.aColor];
this.translationMatrix = b.getUniformLocation(d, "translationMatrix");
this.worldalpha = b.getUniformLocation(d, "worldalpha");
this.colorMatrix = b.getUniformLocation(d, "colorMatrix");
this.hasColorMatrix = b.getUniformLocation(d, "hasColorMatrix");
this.clipRect = b.getUniformLocation(d, "uClipRect");
this.program = d;
};
a.PolygonShader.prototype.destroy = function () {
this.gl.deleteProgram(this.program);
this.attribute = this.gl = this.uniforms = null;
};
Object.defineProperty(a.PolygonShader.prototype, "matrix", {
get: function () {
return this.uniforms.colorMatrix.value;
},
set: function (a) {
null != a
? ((this.uniforms.colorMatrix.value = a), (this.uniforms.hasColorMatrix.value = 1))
: ((this.uniforms.hasColorMatrix.value = 0), (this.uniforms.colorMatrix.value = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]));
},
});
a.WebGLGraphics = function () {};
a.WebGLGraphics.renderGraphics = function (b, d) {
var e = d.gl,
f = d.projection,
g = d.offset,
k = d.shaderManager.primitiveShader,
m;
b.clearDirty = !0;
b.dirty = !0;
b.dirty && a.WebGLGraphics.updateGraphics(b, e);
for (var n = b._webGL[e.id], p = 0; p < n.data.length; p++)
1 === n.data[p].mode
? ((m = n.data[p]), d.stencilManager.pushStencil(b, m, d), e.drawElements(e.TRIANGLE_FAN, 4, e.UNSIGNED_SHORT, 2 * (m.indices.length - 4)), d.stencilManager.popStencil(b, m, d))
: ((m = n.data[p]),
d.shaderManager.setShader(k),
(k = d.shaderManager.primitiveShader),
e.uniformMatrix3fv(k.translationMatrix, !1, b.worldTransform.toArray(!0)),
e.uniform2f(k.projectionVector, f.x, -f.y),
e.uniform2f(k.offsetVector, -g.x, -g.y),
e.uniform3fv(k.tintColor, a.hex2rgb(b.tint)),
e.uniform1f(k.alpha, b.worldAlpha),
b.gt_colormatrix ? (e.uniformMatrix4fv(k.colorMatrix, !1, b.gt_colormatrix), e.uniform1f(k.hasColorMatrix, 1)) : e.uniform1f(k.hasColorMatrix, 0),
e.bindBuffer(e.ARRAY_BUFFER, m.buffer),
e.vertexAttribPointer(k.aVertexPosition, 2, e.FLOAT, !1, 24, 0),
e.vertexAttribPointer(k.colorAttribute, 4, e.FLOAT, !1, 24, 8),
e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, m.indexBuffer),
e.drawElements(e.TRIANGLE_STRIP, m.indices.length, e.UNSIGNED_SHORT, 0));
};
a.WebGLGraphics.updateGraphics = function (b, d) {
var e = b._webGL[d.id];
e || (e = b._webGL[d.id] = { lastIndex: 0, data: [], gl: d });
b.dirty = !1;
var f;
if (b.clearDirty) {
b.clearDirty = !1;
for (f = 0; f < e.data.length; f++) {
var g = e.data[f];
g.reset();
a.WebGLGraphics.graphicsDataPool.push(g);
}
e.data = [];
e.lastIndex = 0;
}
for (f = e.lastIndex; f < b.graphicsData.length; f++) {
var k = b.graphicsData[f];
b.gradient && null != b.gradient && (k.gradient = b.gradient);
k.type === a.Graphics.POLY
? ((k.points = k.shape.points.slice()),
k.shape.closed && k.points[0] !== k.points[k.points.length - 2] && k.points[1] !== k.points[k.points.length - 1] && k.points.push(k.points[0], k.points[1]),
k.fill &&
6 <= k.points.length &&
(12 > k.points.length
? ((g = a.WebGLGraphics.switchMode(e, 0)), a.WebGLGraphics.buildPoly(k, g) || ((g = a.WebGLGraphics.switchMode(e, 1)), a.WebGLGraphics.buildComplexPoly(k, g)))
: ((g = a.WebGLGraphics.switchMode(e, 1)), a.WebGLGraphics.buildComplexPoly(k, g))),
0 < k.lineWidth && ((g = a.WebGLGraphics.switchMode(e, 0)), a.WebGLGraphics.buildLine(k, g)))
: ((g = a.WebGLGraphics.switchMode(e, 0)),
k.type === a.Graphics.RECT
? a.WebGLGraphics.buildMaskAppliedRectangle(k, g, b)
: k.type === a.Graphics.CIRC || k.type === a.Graphics.ELIP
? a.WebGLGraphics.buildCircle(k, g)
: k.type === a.Graphics.RREC
? a.WebGLGraphics.buildRoundedRectangle(k, g)
: k.type === a.Graphics.MRECT && a.WebGLGraphics.buildMultipleRectangles(k, g));
e.lastIndex++;
}
for (f = 0; f < e.data.length; f++) (g = e.data[f]), g.dirty && g.upload();
};
a.WebGLGraphics.switchMode = function (b, d) {
var e;
if (b.data.length) {
if (((e = b.data[b.data.length - 1]), e.mode !== d || 1 === d)) (e = a.WebGLGraphics.graphicsDataPool.pop() || new a.WebGLGraphicsData(b.gl)), (e.mode = d), b.data.push(e);
} else (e = a.WebGLGraphics.graphicsDataPool.pop() || new a.WebGLGraphicsData(b.gl)), (e.mode = d), b.data.push(e);
e.dirty = !0;
return e;
};
a.WebGLGraphics.buildRectangle = function (b, d) {
var e = b.shape,
f = e.x,
g = e.y,
k = e.width,
e = e.height;
if (b.fill) {
var m = a.hex2rgb(b.fillColor),
n = b.fillAlpha,
p = m[0] * n,
q = m[1] * n,
m = m[2] * n,
r = d.points,
t = d.indices,
u = r.length / 6;
r.push(f, g);
r.push(p, q, m, n);
r.push(f + k, g);
r.push(p, q, m, n);
r.push(f, g + e);
r.push(p, q, m, n);
r.push(f + k, g + e);
r.push(p, q, m, n);
t.push(u, u, u + 1, u + 2, u + 3, u + 3);
}
b.lineWidth && ((n = b.points), (b.points = [f, g, f + k, g, f + k, g + e, f, g + e, f, g]), a.WebGLGraphics.buildLine(b, d), (b.points = n));
};
a.WebGLGraphics.buildMaskAppliedRectangle = function (b, d, e) {
var f = e.worldTransform,
g = b.shape;
e = g.x * f.a + f.tx;
var k = e + g.width * f.a,
m = g.y * f.d + f.ty,
g = m + g.height * f.d,
n = JSUTIL.GLUtil.getClip_0();
if (n.isAxisAlignedRect_0() && n.intersects_4(e, m, k, g)) {
var p = GTObjPool.getTempRect_4(e, m, k, g);
if (JSUTIL.clipper.clipRect_RRC_3(p, null, n)) {
e = (p.x - f.tx) / f.a;
k = e + p.width / f.a;
m = (p.y - f.ty) / f.d;
g = m + p.height / f.d;
if (b.fill) {
var q = a.hex2rgb(b.fillColor),
f = b.fillAlpha,
n = q[0] * f,
r = q[1] * f,
q = q[2] * f,
t = d.points,
u = d.indices,
B = t.length / 6;
t.push(e, m);
t.push(n, r, q, f);
t.push(k, m);
t.push(n, r, q, f);
t.push(e, g);
t.push(n, r, q, f);
t.push(k, g);
t.push(n, r, q, f);
u.push(B, B, B + 1, B + 2, B + 3, B + 3);
}
b.lineWidth && ((f = b.points), (b.points = [e, m, k, m, k, g, e, g, e, m]), a.WebGLGraphics.buildLine(b, d), (b.points = f));
}
GTObjPool.recycleTempRect(p);
}
};
a.WebGLGraphics.buildMultipleRectangles = function (b, d) {
for (var e = b.shape.points, f = 0; f < e.length; f += 4) {
var g = e[f],
k = e[f + 1],
m = e[f + 2],
n = e[f + 3];
if (b.fill) {
var p = a.hex2rgb(b.fillColor),
q = b.fillAlpha,
r = p[0] * q,
t = p[1] * q,
p = p[2] * q,
u = d.points,
B = d.indices,
A = u.length / 6;
u.push(g, k);
u.push(r, t, p, q);
u.push(g + m, k);
u.push(r, t, p, q);
u.push(g, k + n);
u.push(r, t, p, q);
u.push(g + m, k + n);
u.push(r, t, p, q);
B.push(A, A, A + 1, A + 2, A + 3, A + 3);
}
b.lineWidth && ((q = b.points), (b.points = [g, k, g + m, k, g + m, k + n, g, k + n, g, k]), a.WebGLGraphics.buildLine(b, d), (b.points = q));
}
};
a.WebGLGraphics.buildRoundedRectangle = function (b, d) {
var e = b.shape,
f = e.x,
g = e.y,
k = e.width,
m = e.height,
n = e.radius,
e = [];
e.push(f, g + n);
e = e.concat(a.WebGLGraphics.quadraticBezierCurve(f, g + m - n, f, g + m, f + n, g + m));
e = e.concat(a.WebGLGraphics.quadraticBezierCurve(f + k - n, g + m, f + k, g + m, f + k, g + m - n));
e = e.concat(a.WebGLGraphics.quadraticBezierCurve(f + k, g + n, f + k, g, f + k - n, g));
e = e.concat(a.WebGLGraphics.quadraticBezierCurve(f + n, g, f, g, f, g + n));
if (b.fill) {
for (var m = a.hex2rgb(b.fillColor), f = b.fillAlpha, g = m[0] * f, k = m[1] * f, m = m[2] * f, n = d.points, p = d.indices, q = n.length / 6, r = a.PolyK.Triangulate(e), t = 0, t = 0; t < r.length; t += 3)
p.push(r[t] + q), p.push(r[t] + q), p.push(r[t + 1] + q), p.push(r[t + 2] + q), p.push(r[t + 2] + q);
for (t = 0; t < e.length; t++) n.push(e[t], e[++t], g, k, m, f);
}
b.lineWidth && ((f = b.points), (b.points = e), a.WebGLGraphics.buildLine(b, d), (b.points = f));
};
a.WebGLGraphics.quadraticBezierCurve = function (a, d, e, f, g, k) {
for (var m, n, p, q, r = [], t = 0, u = 0; 20 >= u; u++) (t = u / 20), (m = a + (e - a) * t), (n = d + (f - d) * t), (p = e + (g - e) * t), (q = f + (k - f) * t), (m += (p - m) * t), (n += (q - n) * t), r.push(m, n);
return r;
};
a.WebGLGraphics.buildCircle = function (b, d) {
var e = b.shape,
f = e.x,
g = e.y,
k;
b.type === a.Graphics.CIRC ? (e = k = e.radius) : ((k = e.width), (e = e.height));
var m = (2 * Math.PI) / 40,
n = 0;
if (b.fill) {
var n = a.hex2rgb(b.fillColor),
p = b.fillAlpha,
q = n[0] * p,
r = n[1] * p,
t = n[2] * p,
u = d.points,
B = d.indices,
A = u.length / 6;
B.push(A);
for (n = 0; 41 > n; n++) u.push(f, g, q, r, t, p), u.push(f + Math.sin(m * n) * k, g + Math.cos(m * n) * e, q, r, t, p), B.push(A++, A++);
B.push(A - 1);
}
if (b.lineWidth) {
p = b.points;
b.points = [];
for (n = 0; 41 > n; n++) b.points.push(f + Math.sin(m * n) * k, g + Math.cos(m * n) * e);
a.WebGLGraphics.buildLine(b, d);
b.points = p;
}
};
a.WebGLGraphics.buildLine = function (b, d) {
var e = 0,
f = b.points;
if (0 !== f.length) {
if (b.lineWidth % 2) for (e = 0; e < f.length; e++) f[e] += 0.5;
var g = new a.Point(f[0], f[1]),
k = new a.Point(f[f.length - 2], f[f.length - 1]);
if (g.x === k.x && g.y === k.y) {
f = f.slice();
f.pop();
f.pop();
var k = new a.Point(f[f.length - 2], f[f.length - 1]),
m = k.x + 0.5 * (g.x - k.x),
g = k.y + 0.5 * (g.y - k.y);
f.unshift(m, g);
f.push(m, g);
}
var m = d.points,
g = d.indices,
k = f.length / 2,
n = f.length,
p = m.length / 6,
q = b.lineWidth / 2,
e = a.hex2rgb(b.lineColor),
r = b.lineAlpha,
t = e[0] * r,
u = e[1] * r,
B = e[2] * r,
A,
C,
E,
F,
D,
H,
I,
L,
J,
M,
N,
P,
O;
E = f[0];
F = f[1];
D = f[2];
H = f[3];
J = -(F - H);
M = E - D;
C = Math.sqrt(J * J + M * M);
J = (J / C) * q;
M = (M / C) * q;
m.push(E - J, F - M, t, u, B, r);
m.push(E + J, F + M, t, u, B, r);
for (e = 1; e < k - 1; e++)
(E = f[2 * (e - 1)]),
(F = f[2 * (e - 1) + 1]),
(D = f[2 * e]),
(H = f[2 * e + 1]),
(I = f[2 * (e + 1)]),
(L = f[2 * (e + 1) + 1]),
(J = -(F - H)),
(M = E - D),
(C = Math.sqrt(J * J + M * M)),
(J /= C),
(M /= C),
(J *= q),
(M *= q),
(N = -(H - L)),
(P = D - I),
(C = Math.sqrt(N * N + P * P)),
(N /= C),
(P /= C),
(N *= q),
(P *= q),
(C = -M + F - (-M + H)),
(A = -J + D - (-J + E)),
(E = (-J + E) * (-M + H) - (-J + D) * (-M + F)),
(F = -P + L - (-P + H)),
(O = -N + D - (-N + I)),
(I = (-N + I) * (-P + H) - (-N + D) * (-P + L)),
(L = C * O - F * A),
0.1 > Math.abs(L)
? (m.push(D - J, H - M, t, u, B, r), m.push(D + J, H + M, t, u, B, r))
: ((A = (A * I - O * E) / L),
(C = (F * E - C * I) / L),
(I = (A - D) * (A - D) + (C - H) + (C - H)),
19600 < I
? ((J -= N),
(M -= P),
(C = Math.sqrt(J * J + M * M)),
(J /= C),
(M /= C),
(J *= q),
(M *= q),
m.push(D - J, H - M),
m.push(t, u, B, r),
m.push(D + J, H + M),
m.push(t, u, B, r),
m.push(D - J, H - M),
m.push(t, u, B, r),
n++)
: (m.push(A, C), m.push(t, u, B, r), m.push(D - (A - D), H - (C - H)), m.push(t, u, B, r)));
E = f[2 * (k - 2)];
F = f[2 * (k - 2) + 1];
D = f[2 * (k - 1)];
H = f[2 * (k - 1) + 1];
J = -(F - H);
M = E - D;
C = Math.sqrt(J * J + M * M);
J /= C;
M /= C;
J *= q;
M *= q;
m.push(D - J, H - M);
m.push(t, u, B, r);
m.push(D + J, H + M);
m.push(t, u, B, r);
g.push(p);
for (e = 0; e < n; e++) g.push(p++);
g.push(p - 1);
}
};
a.WebGLGraphics.buildComplexPoly = function (b, d) {
var e = b.points.slice();
if (!(6 > e.length)) {
var f = d.indices;
d.points = e;
d.alpha = b.fillAlpha;
d.color = a.hex2rgb(b.fillColor);
for (var g = Infinity, k = -Infinity, m = Infinity, n = -Infinity, p, q, r = 0; r < e.length; r += 2) (p = e[r]), (q = e[r + 1]), (g = p < g ? p : g), (k = p > k ? p : k), (m = q < m ? q : m), (n = q > n ? q : n);
e.push(g, m, k, m, k, n, g, n);
e = e.length / 2;
for (r = 0; r < e; r++) f.push(r);
}
};
a.WebGLGraphics.buildPoly = function (b, d) {
var e = b.points;
if (!(6 > e.length)) {
var f = d.points,
g = d.indices,
k = e.length / 2,
m = a.hex2rgb(b.fillColor),
n = b.fillAlpha,
p = m[0] * n,
q = m[1] * n,
m = m[2] * n,
r = a.PolyK.Triangulate(e);
if (!r) return !1;
for (var t = f.length / 6, u = 0, u = 0; u < r.length; u += 3) g.push(r[u] + t), g.push(r[u] + t), g.push(r[u + 1] + t), g.push(r[u + 2] + t), g.push(r[u + 2] + t);
g = 4 == k && b.gradient;
for (u = 0; u < k; u++)
if (g) {
var B = b.gradient.colors[2 > u ? 0 : 1],
r = B.getRed_0() / 255,
t = B.getGreen_0() / 255,
B = B.getBlue_0() / 255;
f.push(e[2 * u], e[2 * u + 1], r, t, B, n);
} else f.push(e[2 * u], e[2 * u + 1], p, q, m, n);
return !0;
}
};
a.WebGLGraphics.graphicsDataPool = [];
a.WebGLGraphicsData = function (a) {
this.gl = a;
this.color = [0, 0, 0];
this.points = [];
this.indices = [];
this.lastIndex = 0;
this.buffer = a.createBuffer();
this.indexBuffer = a.createBuffer();
this.alpha = this.mode = 1;
this.dirty = !0;
};
a.WebGLGraphicsData.prototype.reset = function () {
this.points = [];
this.indices = [];
this.lastIndex = 0;
};
a.WebGLGraphicsData.prototype.upload = function () {
var b = this.gl;
this.glPoints = new a.Float32Array(this.points);
b.bindBuffer(b.ARRAY_BUFFER, this.buffer);
b.bufferData(b.ARRAY_BUFFER, this.glPoints, b.STATIC_DRAW);
this.glIndicies = new a.Uint16Array(this.indices);
b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
b.bufferData(b.ELEMENT_ARRAY_BUFFER, this.glIndicies, b.STATIC_DRAW);
this.dirty = !1;
};
a.glContexts = [];
a.instances = [];
a.WebGLRenderer = function (b, d, e) {
if (e) for (var f in a.defaultRenderOptions) "undefined" === typeof e[f] && (e[f] = a.defaultRenderOptions[f]);
else e = a.defaultRenderOptions;
a.defaultRenderer || (a.sayHello("webGL"), (a.defaultRenderer = this));
this.type = a.WEBGL_RENDERER;
this.resolution = e.resolution;
this.transparent = e.transparent;
this.autoResize = e.autoResize || !1;
this.preserveDrawingBuffer = e.preserveDrawingBuffer;
this.clearBeforeRender = e.clearBeforeRender;
this.width = b || 800;
this.height = d || 600;
this.view = e.view || document.createElement("canvas");
this.contextLostBound = this.handleContextLost.bind(this);
this.contextRestoredBound = this.handleContextRestored.bind(this);
this.view.addEventListener("webglcontextlost", this.contextLostBound, !1);
this.view.addEventListener("webglcontextrestored", this.contextRestoredBound, !1);
this._contextOptions = { alpha: this.transparent, antialias: e.antialias, premultipliedAlpha: this.transparent && "notMultiplied" !== this.transparent, stencil: !0, preserveDrawingBuffer: e.preserveDrawingBuffer };
this.projection = new a.Point();
this.offset = new a.Point(0, 0);
this.shaderManager = new a.WebGLShaderManager();
this.spriteBatch = new a.WebGLSpriteBatch();
this.maskManager = new a.WebGLMaskManager();
this.filterManager = new a.WebGLFilterManager();
this.stencilManager = new a.WebGLStencilManager();
this.blendModeManager = new a.WebGLBlendModeManager();
this.renderSession = {};
this.renderSession.gl = this.gl;
this.renderSession.drawCount = 0;
this.renderSession.shaderManager = this.shaderManager;
this.renderSession.maskManager = this.maskManager;
this.renderSession.filterManager = this.filterManager;
this.renderSession.blendModeManager = this.blendModeManager;
this.renderSession.spriteBatch = this.spriteBatch;
this.renderSession.stencilManager = this.stencilManager;
this.renderSession.renderer = this;
this.renderSession.resolution = this.resolution;
this.initContext();
this.mapBlendModes();
};
a.WebGLRenderer.prototype.constructor = a.WebGLRenderer;
a.WebGLRenderer.prototype.initContext = function () {
var b = this.view.getContext("webgl", this._contextOptions) || this.view.getContext("experimental-webgl", this._contextOptions);
this.gl = b;
if (!b) throw Error("This browser does not support webGL. Try using the canvas renderer");
this.glContextId = b.id = a.WebGLRenderer.glContextId++;
a.glContexts[this.glContextId] = b;
a.instances[this.glContextId] = this;
b.disable(b.DEPTH_TEST);
b.disable(b.CULL_FACE);
b.enable(b.BLEND);
this.shaderManager.setContext(b);
this.spriteBatch.setContext(b);
this.maskManager.setContext(b);
this.filterManager.setContext(b);
this.blendModeManager.setContext(b);
this.stencilManager.setContext(b);
this.renderSession.gl = this.gl;
this.resize(this.width, this.height);
};
a.WebGLRenderer.prototype.render = function (a) {
if (!this.contextLost) {
this.__stage !== a && (a.interactive && a.interactionManager.removeEvents(), (this.__stage = a));
a.updateTransform();
var d = this.gl;
a._interactive ? a._interactiveEventsAdded || ((a._interactiveEventsAdded = !0), a.interactionManager.setTarget(this)) : a._interactiveEventsAdded && ((a._interactiveEventsAdded = !1), a.interactionManager.setTarget(this));
d.viewport(0, 0, this.width, this.height);
d.bindFramebuffer(d.FRAMEBUFFER, null);
this.clearBeforeRender && (this.transparent ? d.clearColor(0, 0, 0, 0) : d.clearColor(a.backgroundColorSplit[0], a.backgroundColorSplit[1], a.backgroundColorSplit[2], 1), d.clear(d.COLOR_BUFFER_BIT));
this.renderDisplayObject(a, this.projection);
}
};
a.WebGLRenderer.prototype.renderDisplayObject = function (b, d, e) {
this.renderSession.blendModeManager.setBlendMode(a.blendModes.NORMAL);
this.renderSession.drawCount = 0;
this.renderSession.projection = d;
this.renderSession.offset = this.offset;
this.spriteBatch.begin(this.renderSession);
this.filterManager.begin(this.renderSession, e);
b._renderWebGL(this.renderSession);
this.spriteBatch.end();
};
a.WebGLRenderer.prototype.resize = function (a, d) {
this.width = a * this.resolution;
this.height = d * this.resolution;
this.view.width = this.width;
this.view.height = this.height;
this.autoResize && ((this.view.style.width = this.width / this.resolution + "px"), (this.view.style.height = this.height / this.resolution + "px"));
this.gl.viewport(0, 0, this.width, this.height);
this.projection.x = this.width / 2 / this.resolution;
this.projection.y = -this.height / 2 / this.resolution;
};
a.WebGLRenderer.prototype.updateTexture = function (b) {
if (b.hasLoaded) {
var d = this.gl;
b._glTextures[d.id] || (b._glTextures[d.id] = d.createTexture());
if (b.useMipMapping && (b._powerOf2 || (0 < b.width && !(b.width & (b.width - 1)) && 0 < b.height && !(b.height & (b.height - 1))))) {
try {
d.bindTexture(d.TEXTURE_2D, b._glTextures[d.id]),
d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL, b.premultipliedAlpha),
d.texImage2D(d.TEXTURE_2D, 0, d.RGBA, d.RGBA, d.UNSIGNED_BYTE, b.source),
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER, b.scaleMode === a.scaleModes.LINEAR ? d.LINEAR : d.NEAREST),
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MIN_FILTER, d.LINEAR_MIPMAP_LINEAR),
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_S, d.REPEAT),
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_T, d.REPEAT),
d.generateMipmap(d.TEXTURE_2D),
(b._dirty[d.id] = !1);
} catch (e) {
"1" == CONFIG.get("debug") && console.log("ERROR! WebGLRenderer.updateTexture failed: " + e.message);
}
return b._glTextures[d.id];
}
try {
this.ensureCanvasRenderComplete ||
((this.ensureCanvasRenderComplete = CONFIG.get("webglensurecanvasrendercomplete") ? parseInt(CONFIG.get("webglensurecanvasrendercomplete")) : 0), (this.ensureCanvasRenderCompleteCounter = 0)),
0 < this.ensureCanvasRenderComplete &&
(++this.ensureCanvasRenderCompleteCounter,
this.ensureCanvasRenderCompleteCounter >= this.ensureCanvasRenderComplete && ((this.ensureCanvasRenderCompleteCounter = 0), b.source && b.source.getContext && b.source.getContext("2d").getImageData(0, 0, 1, 1))),
d.bindTexture(d.TEXTURE_2D, b._glTextures[d.id]),
d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL, b.premultipliedAlpha),
d.texImage2D(d.TEXTURE_2D, 0, d.RGBA, d.RGBA, d.UNSIGNED_BYTE, b.source),
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER, b.scaleMode === a.scaleModes.LINEAR ? d.LINEAR : d.NEAREST),
d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MIN_FILTER, b.scaleMode === a.scaleModes.LINEAR ? d.LINEAR : d.NEAREST),
b._powerOf2
? (d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_S, d.REPEAT), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_T, d.REPEAT))
: (d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE)),
(b._dirty[d.id] = !1);
} catch (f) {
"1" == CONFIG.get("debug") && console.log("ERROR! WebGLRenderer.updateTexture failed: " + f.message);
}
return b._glTextures[d.id];
}
};
a.WebGLRenderer.prototype.handleContextLost = function (a) {
a.preventDefault();
this.contextLost = !0;
};
a.WebGLRenderer.prototype.handleContextRestored = function () {
this.initContext();
for (var b in a.TextureCache) a.TextureCache[b].baseTexture._glTextures = [];
this.contextLost = !1;
};
a.WebGLRenderer.prototype.destroy = function () {
this.view.removeEventListener("webglcontextlost", this.contextLostBound);
this.view.removeEventListener("webglcontextrestored", this.contextRestoredBound);
this.offset = this.projection = a.glContexts[this.glContextId] = null;
this.shaderManager.destroy();
this.spriteBatch.destroy();
this.maskManager.destroy();
this.filterManager.destroy();
this.renderSession = this.gl = this.filterManager = this.maskManager = this.spriteBatch = this.shaderManager = null;
};
a.WebGLRenderer.prototype.mapBlendModes = function () {
var b = this.gl;
a.blendModesWebGL ||
((a.blendModesWebGL = []),
(a.blendModesWebGL[a.blendModes.NORMAL] = [b.SRC_ALPHA, b.ONE_MINUS_SRC_ALPHA, b.ONE, b.ONE]),
(a.blendModesWebGL[a.blendModes.ADD] = [b.SRC_ALPHA, b.DST_ALPHA]),
(a.blendModesWebGL[a.blendModes.ADD_INTENSIVE] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.MULTIPLY] = [b.DST_COLOR, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.SCREEN] = [b.SRC_ALPHA, b.ONE]),
(a.blendModesWebGL[a.blendModes.OVERLAY] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.DARKEN] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.LIGHTEN] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.COLOR_DODGE] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.COLOR_BURN] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.HARD_LIGHT] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.SOFT_LIGHT] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.DIFFERENCE] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.EXCLUSION] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.HUE] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.SATURATION] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.COLOR] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]),
(a.blendModesWebGL[a.blendModes.LUMINOSITY] = [b.ONE, b.ONE_MINUS_SRC_ALPHA]));
};
a.WebGLRenderer.glContextId = 0;
a.WebGLBlendModeManager = function () {
this.currentBlendMode = 99999;
};
a.WebGLBlendModeManager.prototype.constructor = a.WebGLBlendModeManager;
a.WebGLBlendModeManager.prototype.setContext = function (a) {
this.gl = a;
};
a.WebGLBlendModeManager.prototype.setBlendMode = function (b) {
if (this.currentBlendMode === b) return !1;
this.currentBlendMode = b;
b = a.blendModesWebGL[this.currentBlendMode];
4 == b.length ? this.gl.blendFuncSeparate(b[0], b[1], b[2], b[3]) : this.gl.blendFunc(b[0], b[1]);
return !0;
};
a.WebGLBlendModeManager.prototype.destroy = function () {
this.gl = null;
};
a.WebGLMaskManager = function () {};
a.WebGLMaskManager.prototype.constructor = a.WebGLMaskManager;
a.WebGLMaskManager.prototype.setContext = function (a) {
this.gl = a;
};
a.WebGLMaskManager.prototype.pushMask = function (b, d) {
var e = d.gl;
b.dirty && a.WebGLGraphics.updateGraphics(b, e);
b._webGL[e.id].data.length && d.stencilManager.pushStencil(b, b._webGL[e.id].data[0], d);
};
a.WebGLMaskManager.prototype.popMask = function (a, d) {
d.stencilManager.popStencil(a, a._webGL[this.gl.id].data[0], d);
};
a.WebGLMaskManager.prototype.destroy = function () {
this.gl = null;
};
a.WebGLStencilManager = function () {
this.stencilStack = [];
this.reverse = !0;
this.count = 0;
};
a.WebGLStencilManager.prototype.setContext = function (a) {
this.gl = a;
};
a.WebGLStencilManager.prototype.pushStencil = function (a, d, e) {
var f = this.gl;
this.bindGraphics(a, d, e);
0 === this.stencilStack.length && (f.enable(f.STENCIL_TEST), f.clear(f.STENCIL_BUFFER_BIT), (this.reverse = !0), (this.count = 0));
this.stencilStack.push(d);
a = this.count;
f.colorMask(!1, !1, !1, !1);
f.stencilFunc(f.ALWAYS, 0, 255);
f.stencilOp(f.KEEP, f.KEEP, f.INVERT);
1 === d.mode
? (f.drawElements(f.TRIANGLE_FAN, d.indices.length - 4, f.UNSIGNED_SHORT, 0),
this.reverse ? (f.stencilFunc(f.EQUAL, 255 - a, 255), f.stencilOp(f.KEEP, f.KEEP, f.DECR)) : (f.stencilFunc(f.EQUAL, a, 255), f.stencilOp(f.KEEP, f.KEEP, f.INCR)),
f.drawElements(f.TRIANGLE_FAN, 4, f.UNSIGNED_SHORT, 2 * (d.indices.length - 4)),
this.reverse ? f.stencilFunc(f.EQUAL, 255 - (a + 1), 255) : f.stencilFunc(f.EQUAL, a + 1, 255),
(this.reverse = !this.reverse))
: (this.reverse ? (f.stencilFunc(f.EQUAL, a, 255), f.stencilOp(f.KEEP, f.KEEP, f.INCR)) : (f.stencilFunc(f.EQUAL, 255 - a, 255), f.stencilOp(f.KEEP, f.KEEP, f.DECR)),
f.drawElements(f.TRIANGLE_STRIP, d.indices.length, f.UNSIGNED_SHORT, 0),
this.reverse ? f.stencilFunc(f.EQUAL, a + 1, 255) : f.stencilFunc(f.EQUAL, 255 - (a + 1), 255));
f.colorMask(!0, !0, !0, !0);
f.stencilOp(f.KEEP, f.KEEP, f.KEEP);
this.count++;
};
a.WebGLStencilManager.prototype.bindGraphics = function (b, d, e) {
this._currentGraphics = b;
var f = this.gl,
g = e.projection,
k = e.offset,
m;
1 === d.mode
? ((m = e.shaderManager.complexPrimitiveShader),
e.shaderManager.setShader(m),
f.uniformMatrix3fv(m.translationMatrix, !1, b.worldTransform.toArray(!0)),
f.uniform2f(m.projectionVector, g.x, -g.y),
f.uniform2f(m.offsetVector, -k.x, -k.y),
f.uniform3fv(m.tintColor, a.hex2rgb(b.tint)),
f.uniform3fv(m.color, d.color),
f.uniform1f(m.alpha, b.worldAlpha * d.alpha),
f.bindBuffer(f.ARRAY_BUFFER, d.buffer),
f.vertexAttribPointer(m.aVertexPosition, 2, f.FLOAT, !1, 8, 0))
: ((m = e.shaderManager.primitiveShader),
e.shaderManager.setShader(m),
f.uniformMatrix3fv(m.translationMatrix, !1, b.worldTransform.toArray(!0)),
f.uniform2f(m.projectionVector, g.x, -g.y),
f.uniform2f(m.offsetVector, -k.x, -k.y),
f.uniform3fv(m.tintColor, a.hex2rgb(b.tint)),
f.uniform1f(m.alpha, b.worldAlpha),
f.bindBuffer(f.ARRAY_BUFFER, d.buffer),
f.vertexAttribPointer(m.aVertexPosition, 2, f.FLOAT, !1, 24, 0),
f.vertexAttribPointer(m.colorAttribute, 4, f.FLOAT, !1, 24, 8));
f.bindBuffer(f.ELEMENT_ARRAY_BUFFER, d.indexBuffer);
};
a.WebGLStencilManager.prototype.popStencil = function (a, d, e) {
var f = this.gl;
this.stencilStack.pop();
this.count--;
if (0 === this.stencilStack.length) f.disable(f.STENCIL_TEST);
else {
var g = this.count;
this.bindGraphics(a, d, e);
f.colorMask(!1, !1, !1, !1);
1 === d.mode
? ((this.reverse = !this.reverse) ? (f.stencilFunc(f.EQUAL, 255 - (g + 1), 255), f.stencilOp(f.KEEP, f.KEEP, f.INCR)) : (f.stencilFunc(f.EQUAL, g + 1, 255), f.stencilOp(f.KEEP, f.KEEP, f.DECR)),
f.drawElements(f.TRIANGLE_FAN, 4, f.UNSIGNED_SHORT, 2 * (d.indices.length - 4)),
f.stencilFunc(f.ALWAYS, 0, 255),
f.stencilOp(f.KEEP, f.KEEP, f.INVERT),
f.drawElements(f.TRIANGLE_FAN, d.indices.length - 4, f.UNSIGNED_SHORT, 0))
: (this.reverse ? (f.stencilFunc(f.EQUAL, g + 1, 255), f.stencilOp(f.KEEP, f.KEEP, f.DECR)) : (f.stencilFunc(f.EQUAL, 255 - (g + 1), 255), f.stencilOp(f.KEEP, f.KEEP, f.INCR)),
f.drawElements(f.TRIANGLE_STRIP, d.indices.length, f.UNSIGNED_SHORT, 0));
this.reverse ? f.stencilFunc(f.EQUAL, g, 255) : f.stencilFunc(f.EQUAL, 255 - g, 255);
f.colorMask(!0, !0, !0, !0);
f.stencilOp(f.KEEP, f.KEEP, f.KEEP);
}
};
a.WebGLStencilManager.prototype.destroy = function () {
this.gl = this.stencilStack = null;
};
a.WebGLShaderManager = function () {
this.maxAttibs = 10;
this.attribState = [];
this.tempAttribState = [];
for (var a = 0; a < this.maxAttibs; a++) this.attribState[a] = !1;
this.stack = [];
};
a.WebGLShaderManager.prototype.constructor = a.WebGLShaderManager;
a.WebGLShaderManager.prototype.setContext = function (b) {
this.gl = b;
this.primitiveShader = new a.PrimitiveShader(b);
this.complexPrimitiveShader = new a.ComplexPrimitiveShader(b);
this.defaultShader = new a.PixiShader(b);
this.fastShader = new a.PixiFastShader(b);
this.stripShader = new a.StripShader(b);
this.particleContainerShader = new a.ParticleContainerShader(b);
this.polygonShader = new a.PolygonShader(b);
this.setShader(this.defaultShader);
};
a.WebGLShaderManager.prototype.setAttribs = function (a) {
var d;
for (d = 0; d < this.tempAttribState.length; d++) this.tempAttribState[d] = !1;
for (d = 0; d < a.length; d++) this.tempAttribState[a[d]] = !0;
a = this.gl;
for (d = 0; d < this.attribState.length; d++)
this.attribState[d] !== this.tempAttribState[d] && ((this.attribState[d] = this.tempAttribState[d]), this.tempAttribState[d] ? a.enableVertexAttribArray(d) : a.disableVertexAttribArray(d));
};
a.WebGLShaderManager.prototype.setShader = function (a) {
if (this._currentId === a._UID) return !1;
this._currentId = a._UID;
this.currentShader = a;
this.gl.useProgram(a.program);
this.setAttribs(a.attributes);
return !0;
};
a.WebGLShaderManager.prototype.destroy = function () {
this.tempAttribState = this.attribState = null;
this.primitiveShader.destroy();
this.complexPrimitiveShader.destroy();
this.defaultShader.destroy();
this.fastShader.destroy();
this.stripShader.destroy();
this.particleContainerShader.destroy();
this.polygonShader.destroy();
this.gl = null;
};
a.WebGLSpriteBatch = function () {
this.vertSize = 6;
this.size = 2e3;
var b = 6 * this.size;
this.vertices = new a.Float32Array(4 * this.size * this.vertSize);
this.indices = new a.Uint16Array(b);
for (var d = (this.lastIndexCount = 0), e = 0; d < b; d += 6, e += 4)
(this.indices[d + 0] = e + 0), (this.indices[d + 1] = e + 1), (this.indices[d + 2] = e + 2), (this.indices[d + 3] = e + 0), (this.indices[d + 4] = e + 2), (this.indices[d + 5] = e + 3);
this.drawing = !1;
this.currentBatchVerticiesSize = this.currentBatchSize = 0;
this.currentBaseTexture = null;
this.dirty = !0;
this.textures = [];
this.blendModes = [];
this.shaders = [];
this.sprites = [];
this.defaultShader = new a.AbstractFilter([
DEVICE.ios ? "precision highp float;" : "precision lowp float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform sampler2D uSampler;",
"void main(void) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor;",
"}",
]);
};
a.WebGLSpriteBatch.prototype.setContext = function (b) {
this.gl = b;
this.vertexBuffer = b.createBuffer();
this.indexBuffer = b.createBuffer();
b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
b.bufferData(b.ELEMENT_ARRAY_BUFFER, this.indices, b.DYNAMIC_DRAW);
b.bindBuffer(b.ARRAY_BUFFER, this.vertexBuffer);
b.bufferData(b.ARRAY_BUFFER, this.vertices, b.DYNAMIC_DRAW);
this.currentBlendMode = 99999;
var d = new a.PixiShader(b);
d.fragmentSrc = this.defaultShader.fragmentSrc;
d.uniforms = {};
d.init();
this.defaultShader.shaders[b.id] = d;
};
a.WebGLSpriteBatch.prototype.begin = function (a) {
this.renderSession = a;
this.shader = this.renderSession.shaderManager.defaultShader;
this.start();
};
a.WebGLSpriteBatch.prototype.end = function () {
this.flush();
};
a.WebGLSpriteBatch.prototype.render = function (b) {
var d = b.texture;
this.currentBatchSize >= this.size && (this.flush(), (this.currentBaseTexture = d.baseTexture));
var e = d._uvs;
if (e) {
if (!0 === b.horizontalFlip || !0 === b.verticalFlip) {
var f = !1;
!0 === b.horizontalFlip && !0 === b.verticalFlip
? d._hfvfuvs
? (e = d._hfvfuvs)
: ((d._hfvfuvs = new a.TextureUvs()), (e = d._hfvfuvs), (f = !0))
: !0 === b.horizontalFlip
? d._hfuvs
? (e = d._hfuvs)
: ((d._hfuvs = new a.TextureUvs()), (e = d._hfuvs), (f = !0))
: d._vfuvs
? (e = d._vfuvs)
: ((d._vfuvs = new a.TextureUvs()), (e = d._vfuvs), (f = !0));
!0 === f &&
(!0 === b.horizontalFlip ? ((e.x0 = d._uvs.x1), (e.x1 = d._uvs.x0), (e.x2 = d._uvs.x3), (e.x3 = d._uvs.x2)) : ((e.x0 = d._uvs.x0), (e.x1 = d._uvs.x1), (e.x2 = d._uvs.x2), (e.x3 = d._uvs.x3)),
!0 === b.verticalFlip ? ((e.y0 = d._uvs.y3), (e.y1 = d._uvs.y2), (e.y2 = d._uvs.y1), (e.y3 = d._uvs.y0)) : ((e.y0 = d._uvs.y0), (e.y1 = d._uvs.y1), (e.y2 = d._uvs.y2), (e.y3 = d._uvs.y3)));
}
var g = b.worldAlpha,
k = b.tint,
f = this.vertices,
m = b.anchor.x,
n = b.anchor.y,
p,
q,
r,
t;
if (d.trim) {
var u = d.trim;
q = u.x - m * u.width;
p = q + d.crop.width;
t = u.y - n * u.height;
r = t + d.crop.height;
} else (p = d.frame.width * (1 - m)), (q = d.frame.width * -m), (r = d.frame.height * (1 - n)), (t = d.frame.height * -n);
var u = (n = this.currentBatchVerticiesSize),
B = d.baseTexture.resolution,
d = b.worldTransform,
A = d.a / B,
m = d.b / B,
C = d.c / B,
B = d.d / B,
E = d.tx,
F = d.ty;
if (CONFIG.CLIENTSLOTAPPLET.orientationSensorManager && -1e5 < JSUTIL.GLUtil.currentParallaxDepth)
var d = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getX_0() * JSUTIL.GLUtil.currentParallaxDepth,
D = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getY_0() * JSUTIL.GLUtil.currentParallaxDepth,
E = E + d,
F = F + D;
d = n;
f[n++] = A * q + C * t + E;
f[n++] = B * t + m * q + F;
f[n++] = e.x0;
f[n++] = e.y0;
f[n++] = g;
f[n++] = k;
f[n++] = A * p + C * t + E;
f[n++] = B * t + m * p + F;
f[n++] = e.x1;
f[n++] = e.y1;
f[n++] = g;
f[n++] = k;
f[n++] = A * p + C * r + E;
f[n++] = B * r + m * p + F;
f[n++] = e.x2;
f[n++] = e.y2;
f[n++] = g;
f[n++] = k;
f[n++] = A * q + C * r + E;
f[n++] = B * r + m * q + F;
f[n++] = e.x3;
f[n++] = e.y3;
f[n++] = g;
f[n++] = k;
p = JSUTIL.GLUtil.getClip_0();
q = !1;
t = 1e5;
A = -1e5;
B = 1e5;
E = -1e5;
r = d;
F = d + 24;
for (D = 0; r < F; r += 6) t > f[r] && (t = f[r]), A < f[r] && (A = f[r]), (D = f[r + 1]), B > D && (B = D), E < D && (E = D);
if (p.intersects_4(t, B, A, E)) {
t = GTObjPool.getTempRect_4(t, B, A, E);
e = GTObjPool.getTempRect_4(e.x0, e.y0, e.x2, e.y2);
C = 0 != b.rotation || f[d] !== f[d + 18] || f[d + 1] !== f[d + 7] || (0 !== m && 0 !== C);
r = G.isNotNullAndDefined(b.scale) && (0 > b.scale.x || 0 > b.scale.y);
if (p.isAxisAlignedRect_0() && !1 === C && !1 === r)
JSUTIL.clipper.clipRect_RRC_3(t, e, p) &&
((n = d),
(m = e.x),
(C = e.y),
(p = e.x + e.width),
(q = e.y + e.height),
(f[n++] = t.x),
(f[n++] = t.y),
(f[n++] = m),
(f[n++] = C),
(f[n++] = g),
(f[n++] = k),
(f[n++] = t.x + t.width),
(f[n++] = t.y),
(f[n++] = p),
(f[n++] = C),
(f[n++] = g),
(f[n++] = k),
(f[n++] = t.x + t.width),
(f[n++] = t.y + t.height),
(f[n++] = p),
(f[n++] = q),
(f[n++] = g),
(f[n++] = k),
(f[n++] = t.x),
(f[n++] = t.y + t.height),
(f[n++] = m),
(f[n++] = q),
(f[n++] = g),
(f[n++] = k),
(q = !0));
else if (((m = null), (m = !0 === C || !0 === r ? JSUTIL.clipper.clip_CAR_3(p, [f[d], f[d + 1], f[d + 6], f[d + 7], f[d + 12], f[d + 13], f[d + 18], f[d + 19]], e) : JSUTIL.clipper.clip_CRR_3(p, t, e)), null != m)) {
n = d;
C = m.length;
for (r = 0; r < C; r++) (p = m[r]), (f[n++] = p.pos.x), (f[n++] = p.pos.y), (f[n++] = p.uv.x), (f[n++] = p.uv.y), (f[n++] = g), (f[n++] = k);
q = !0;
}
GTObjPool.recycleTempRect(e);
GTObjPool.recycleTempRect(t);
}
if (!0 !== q) {
for (g = 0; g < n; ++g) f[d + g] = 0;
n = d;
}
this.currentBatchVerticiesSize = n;
b.verticesNumber = (n - u) / 6;
2 < b.verticesNumber && (this.sprites[this.currentBatchSize++] = b);
}
};
a.WebGLSpriteBatch.prototype.renderTilingSprite = function (b) {
var d = b.tilingTexture;
this.currentBatchSize >= this.size && (this.flush(), (this.currentBaseTexture = d.baseTexture));
b._uvs || (b._uvs = new a.TextureUvs());
var e = b._uvs;
b.tilePosition.x %= d.baseTexture.width * b.tileScaleOffset.x;
b.tilePosition.y %= d.baseTexture.height * b.tileScaleOffset.y;
var f = b.tilePosition.x / (d.baseTexture.width * b.tileScaleOffset.x),
g = b.tilePosition.y / (d.baseTexture.height * b.tileScaleOffset.y),
k = b.width / d.baseTexture.width / (b.tileScale.x * b.tileScaleOffset.x),
m = b.height / d.baseTexture.height / (b.tileScale.y * b.tileScaleOffset.y);
e.x0 = 0 - f;
e.y0 = 0 - g;
e.x1 = 1 * k - f;
e.y1 = 0 - g;
e.x2 = 1 * k - f;
e.y2 = 1 * m - g;
e.x3 = 0 - f;
e.y3 = 1 * m - g;
var f = b.worldAlpha,
g = b.tint,
k = this.vertices,
n = b.width,
p = b.height,
q = b.anchor.x,
r = b.anchor.y,
m = n * (1 - q),
n = n * -q,
q = p * (1 - r),
p = p * -r,
r = 4 * this.currentBatchSize * this.vertSize,
t = d.baseTexture.resolution,
u = b.worldTransform,
d = u.a / t,
B = u.b / t,
A = u.c / t,
t = u.d / t,
C = u.tx,
u = u.ty;
k[r++] = d * n + A * p + C;
k[r++] = t * p + B * n + u;
k[r++] = e.x0;
k[r++] = e.y0;
k[r++] = f;
k[r++] = g;
k[r++] = d * m + A * p + C;
k[r++] = t * p + B * m + u;
k[r++] = e.x1;
k[r++] = e.y1;
k[r++] = f;
k[r++] = g;
k[r++] = d * m + A * q + C;
k[r++] = t * q + B * m + u;
k[r++] = e.x2;
k[r++] = e.y2;
k[r++] = f;
k[r++] = g;
k[r++] = d * n + A * q + C;
k[r++] = t * q + B * n + u;
k[r++] = e.x3;
k[r++] = e.y3;
k[r++] = f;
k[r++] = g;
this.sprites[this.currentBatchSize++] = b;
};
a.WebGLSpriteBatch.prototype.flush = function () {
if (0 !== this.currentBatchSize) {
var b = this.gl,
d;
if (this.dirty) {
this.dirty = !1;
b.activeTexture(b.TEXTURE0);
b.bindBuffer(b.ARRAY_BUFFER, this.vertexBuffer);
b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
d = this.defaultShader.shaders[b.id];
var e = 4 * this.vertSize;
b.vertexAttribPointer(d.aVertexPosition, 2, b.FLOAT, !1, e, 0);
b.vertexAttribPointer(d.aTextureCoord, 2, b.FLOAT, !1, e, 8);
b.vertexAttribPointer(d.colorAttribute, 2, b.FLOAT, !1, e, 16);
}
e = "1" == CONFIG.webgluploadsubarray ? this.vertices.subarray(0, this.currentBatchVerticiesSize) : this.vertices;
b.bufferSubData(b.ARRAY_BUFFER, 0, e);
for (var f = 0, g = 0, k = (e = 0); e < this.currentBatchSize; e++) {
f = this.sprites[e].verticesNumber;
if (2 < f && ((this.indices[g++] = k + 0), (this.indices[g++] = k + 1), (this.indices[g++] = k + 2), 3 < f && ((this.indices[g++] = k + 0), (this.indices[g++] = k + 2), (this.indices[g++] = k + 3), 4 < f)))
for (var m = 4; m < f; m++) (this.indices[g++] = k + 0), (this.indices[g++] = k + m - 1), (this.indices[g++] = k + m);
k += f;
}
e = "1" == CONFIG.webgluploadsubarray ? this.indices.subarray(0, g) : this.indices;
b.bufferSubData(b.ELEMENT_ARRAY_BUFFER, 0, e);
for (var n, p, m = (g = f = 0), q = null, r = this.renderSession.blendModeManager.currentBlendMode, t = null, u = !1, B = !1, A, e = 0, k = this.currentBatchSize; e < k; e++) {
A = this.sprites[e];
d = A.texture.baseTexture;
n = A.blendMode;
p = A.shader || this.defaultShader;
var u = r !== n,
B = t !== p,
C = A.gt_colormatrix || A.gt_separatedAlpha || (G.isNotNullAndDefined(A.gt_shaderContrast) && 0 != A.gt_shaderContrast);
C ? ((p = JSUTIL.webGLGlobalShader.getGlobalShader()), (B = !0)) : !B && t.shaders[b.id] && t.shaders[b.id].uniforms.matrix && (B = !0);
if (q !== d || u || B)
this.renderCustomBatch(q, g, m),
(f = 0),
(q = d),
(m += g),
(g = 0),
u && ((r = n), this.renderSession.blendModeManager.setBlendMode(r)),
B &&
((t = p),
(d = t.shaders[b.id]),
d ||
((d = new a.PixiShader(b)),
(d.fragmentSrc = t.fragmentSrc),
(d.uniforms = t.uniforms),
d.init(),
d.colorAttributeError &&
C &&
((JSUTIL.webGLGlobalShader._globalshaderObj = null),
(a.GreentubeGlobalShader.prototype.colorAttributeError = !0),
(t = p = JSUTIL.webGLGlobalShader.getGlobalShader()),
(d = new a.PixiShader(b)),
(d.fragmentSrc = t.fragmentSrc),
(d.uniforms = t.uniforms),
d.init()),
(t.shaders[b.id] = d)),
d.uniforms.matrix &&
(A.gt_colormatrix
? ((d.uniforms.matrix.value = A.gt_colormatrix), (d.uniforms.hasMatrix.value = 1))
: ((d.uniforms.hasMatrix.value = 0), (d.uniforms.matrix.value = JSUTIL.webGLGlobalShader.getGlobalShaderDefaultColorTransformationMatrix()))),
d.uniforms.hasSeparatedAlpha &&
(A.gt_separatedAlpha
? ((d.uniforms.paddingHalfHeight.value = (4 / A.texture.baseTexture.height) * 0.5),
(d.uniforms.alphaseparateYfactor.value = 0.5 - d.uniforms.paddingHalfHeight.value),
(d.uniforms.hasSeparatedAlpha.value = 1))
: ((d.uniforms.hasSeparatedAlpha.value = 0), (d.uniforms.paddingHalfHeight.value = 0), (d.uniforms.alphaseparateYfactor.value = 0))),
d.uniforms.contrastFactor &&
(G.isNotNullAndDefined(A.gt_shaderContrast) && 0 != A.gt_shaderContrast
? (d.uniforms.contrastFactor.value = (259 * (A.gt_shaderContrast + 255)) / (255 * (259 - A.gt_shaderContrast)))
: (d.uniforms.contrastFactor.value = 0)),
this.renderSession.shaderManager.setShader(d),
d.dirty && d.syncUniforms(),
(C = this.renderSession.projection),
b.uniform2f(d.projectionVector, C.x, C.y),
(C = this.renderSession.offset),
b.uniform2f(d.offsetVector, C.x, C.y));
g += 3 * (A.verticesNumber - 2);
f++;
}
this.renderCustomBatch(q, g, m);
this.currentBatchVerticiesSize = this.currentBatchSize = 0;
}
};
a.WebGLSpriteBatch.prototype.renderBatch = function (a, d, e) {
if (0 !== d) {
var f = this.gl;
a._dirty[f.id] ? this.renderSession.renderer.updateTexture(a) : f.bindTexture(f.TEXTURE_2D, a._glTextures[f.id]);
f.drawElements(f.TRIANGLES, 6 * d, f.UNSIGNED_SHORT, 12 * e);
this.renderSession.drawCount++;
}
};
a.WebGLSpriteBatch.prototype.renderCustomBatch = function (a, d, e) {
if (0 !== d) {
var f = this.gl;
a._dirty[f.id] ? this.renderSession.renderer.updateTexture(a) : f.bindTexture(f.TEXTURE_2D, a._glTextures[f.id]);
f.drawElements(f.TRIANGLES, d, f.UNSIGNED_SHORT, 2 * e);
this.renderSession.drawCount++;
}
};
a.WebGLSpriteBatch.prototype.stop = function () {
this.flush();
this.dirty = !0;
};
a.WebGLSpriteBatch.prototype.start = function () {
this.dirty = !0;
};
a.WebGLSpriteBatch.prototype.destroy = function () {
this.indices = this.vertices = null;
this.gl.deleteBuffer(this.vertexBuffer);
this.gl.deleteBuffer(this.indexBuffer);
this.gl = this.currentBaseTexture = null;
};
a.WebGLFastSpriteBatch = function (b) {
this.vertSize = 10;
this.size = this.maxSize = 6e3;
var d = 6 * this.maxSize;
this.vertices = new a.Float32Array(4 * this.size * this.vertSize);
this.indices = new a.Uint16Array(d);
this.indexBuffer = this.vertexBuffer = null;
for (var e = (this.lastIndexCount = 0), f = 0; e < d; e += 6, f += 4)
(this.indices[e + 0] = f + 0), (this.indices[e + 1] = f + 1), (this.indices[e + 2] = f + 2), (this.indices[e + 3] = f + 0), (this.indices[e + 4] = f + 2), (this.indices[e + 5] = f + 3);
this.drawing = !1;
this.currentBatchSize = 0;
this.currentBaseTexture = null;
this.currentBlendMode = 0;
this.matrix = this.shader = this.renderSession = null;
this.setContext(b);
};
a.WebGLFastSpriteBatch.prototype.constructor = a.WebGLFastSpriteBatch;
a.WebGLFastSpriteBatch.prototype.setContext = function (a) {
this.gl = a;
this.vertexBuffer = a.createBuffer();
this.indexBuffer = a.createBuffer();
a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.indices, a.STATIC_DRAW);
a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer);
a.bufferData(a.ARRAY_BUFFER, this.vertices, a.DYNAMIC_DRAW);
};
a.WebGLFastSpriteBatch.prototype.begin = function (a, d) {
this.renderSession = d;
this.shader = this.renderSession.shaderManager.fastShader;
this.matrix = a.worldTransform.toArray(!0);
this.start();
};
a.WebGLFastSpriteBatch.prototype.end = function () {
this.flush();
};
a.WebGLFastSpriteBatch.prototype.render = function (a) {
a = a.children;
var d = a[0];
if (d.texture._uvs) {
this.currentBaseTexture = d.texture.baseTexture;
d.blendMode !== this.renderSession.blendModeManager.currentBlendMode && (this.flush(), this.renderSession.blendModeManager.setBlendMode(d.blendMode));
for (var d = 0, e = a.length; d < e; d++) this.renderSprite(a[d]);
this.flush();
}
};
a.WebGLFastSpriteBatch.prototype.renderSprite = function (a) {
if (a.visible) {
if (a.texture.baseTexture !== this.currentBaseTexture && (this.flush(), (this.currentBaseTexture = a.texture.baseTexture), !a.texture._uvs)) return;
var d,
e = this.vertices,
f,
g,
k,
m,
n;
d = a.texture._uvs;
a.texture.trim
? ((k = a.texture.trim), (g = k.x - a.anchor.x * k.width), (f = g + a.texture.crop.width), (m = k.y - a.anchor.y * k.height), (k = m + a.texture.crop.height))
: ((f = a.texture.frame.width * (1 - a.anchor.x)), (g = a.texture.frame.width * -a.anchor.x), (k = a.texture.frame.height * (1 - a.anchor.y)), (m = a.texture.frame.height * -a.anchor.y));
n = 4 * this.currentBatchSize * this.vertSize;
e[n++] = g;
e[n++] = m;
e[n++] = a.position.x;
e[n++] = a.position.y;
e[n++] = a.scale.x;
e[n++] = a.scale.y;
e[n++] = a.rotation;
e[n++] = d.x0;
e[n++] = d.y1;
e[n++] = a.alpha;
e[n++] = f;
e[n++] = m;
e[n++] = a.position.x;
e[n++] = a.position.y;
e[n++] = a.scale.x;
e[n++] = a.scale.y;
e[n++] = a.rotation;
e[n++] = d.x1;
e[n++] = d.y1;
e[n++] = a.alpha;
e[n++] = f;
e[n++] = k;
e[n++] = a.position.x;
e[n++] = a.position.y;
e[n++] = a.scale.x;
e[n++] = a.scale.y;
e[n++] = a.rotation;
e[n++] = d.x2;
e[n++] = d.y2;
e[n++] = a.alpha;
e[n++] = g;
e[n++] = k;
e[n++] = a.position.x;
e[n++] = a.position.y;
e[n++] = a.scale.x;
e[n++] = a.scale.y;
e[n++] = a.rotation;
e[n++] = d.x3;
e[n++] = d.y3;
e[n++] = a.alpha;
this.currentBatchSize++;
this.currentBatchSize >= this.size && this.flush();
}
};
a.WebGLFastSpriteBatch.prototype.flush = function () {
if (0 !== this.currentBatchSize) {
var a = this.gl;
this.currentBaseTexture._glTextures[a.id] || this.renderSession.renderer.updateTexture(this.currentBaseTexture, a);
a.bindTexture(a.TEXTURE_2D, this.currentBaseTexture._glTextures[a.id]);
if (this.currentBatchSize > 0.5 * this.size) a.bufferSubData(a.ARRAY_BUFFER, 0, this.vertices);
else {
var d = this.vertices.subarray(0, 4 * this.currentBatchSize * this.vertSize);
a.bufferSubData(a.ARRAY_BUFFER, 0, d);
}
a.drawElements(a.TRIANGLES, 6 * this.currentBatchSize, a.UNSIGNED_SHORT, 0);
this.currentBatchSize = 0;
this.renderSession.drawCount++;
}
};
a.WebGLFastSpriteBatch.prototype.stop = function () {
this.flush();
};
a.WebGLFastSpriteBatch.prototype.start = function () {
var a = this.gl;
a.activeTexture(a.TEXTURE0);
a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer);
a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
var d = this.renderSession.projection;
a.uniform2f(this.shader.projectionVector, d.x, d.y);
a.uniformMatrix3fv(this.shader.uMatrix, !1, this.matrix);
d = 4 * this.vertSize;
a.vertexAttribPointer(this.shader.aVertexPosition, 2, a.FLOAT, !1, d, 0);
a.vertexAttribPointer(this.shader.aPositionCoord, 2, a.FLOAT, !1, d, 8);
a.vertexAttribPointer(this.shader.aScale, 2, a.FLOAT, !1, d, 16);
a.vertexAttribPointer(this.shader.aRotation, 1, a.FLOAT, !1, d, 24);
a.vertexAttribPointer(this.shader.aTextureCoord, 2, a.FLOAT, !1, d, 28);
a.vertexAttribPointer(this.shader.colorAttribute, 1, a.FLOAT, !1, d, 36);
};
a.WebGLFilterManager = function () {
this.filterStack = [];
this.offsetY = this.offsetX = 0;
};
a.WebGLFilterManager.prototype.constructor = a.WebGLFilterManager;
a.WebGLFilterManager.prototype.setContext = function (a) {
this.gl = a;
this.texturePool = [];
this.initShaderBuffers();
};
a.WebGLFilterManager.prototype.begin = function (a, d) {
this.renderSession = a;
this.defaultShader = a.shaderManager.defaultShader;
var e = this.renderSession.projection;
this.width = 2 * e.x;
this.height = 2 * -e.y;
this.buffer = d;
};
a.WebGLFilterManager.prototype.pushFilter = function (b) {
var d = this.gl,
e = this.renderSession.projection,
f = this.renderSession.offset;
b._filterArea = b.target.filterArea || b.target.getBounds();
this.filterStack.push(b);
var g = b.filterPasses[0];
this.offsetX += b._filterArea.x;
this.offsetY += b._filterArea.y;
var k = this.texturePool.pop();
k ? k.resize(this.width, this.height) : (k = new a.FilterTexture(this.gl, this.width, this.height));
d.bindTexture(d.TEXTURE_2D, k.texture);
var m = b._filterArea,
g = g.padding;
m.x -= g;
m.y -= g;
m.width += 2 * g;
m.height += 2 * g;
0 > m.x && (m.x = 0);
m.width > this.width && (m.width = this.width);
0 > m.y && (m.y = 0);
m.height > this.height && (m.height = this.height);
d.bindFramebuffer(d.FRAMEBUFFER, k.frameBuffer);
d.viewport(0, 0, m.width, m.height);
e.x = m.width / 2;
e.y = -m.height / 2;
f.x = -m.x;
f.y = -m.y;
d.colorMask(!0, !0, !0, !0);
d.clearColor(0, 0, 0, 0);
d.clear(d.COLOR_BUFFER_BIT);
b._glFilterTexture = k;
};
a.WebGLFilterManager.prototype.popFilter = function () {
var b = this.gl,
d = this.filterStack.pop(),
e = d._filterArea,
f = d._glFilterTexture,
g = this.renderSession.projection,
k = this.renderSession.offset;
if (1 < d.filterPasses.length) {
b.viewport(0, 0, e.width, e.height);
b.bindBuffer(b.ARRAY_BUFFER, this.vertexBuffer);
this.vertexArray[0] = 0;
this.vertexArray[1] = e.height;
this.vertexArray[2] = e.width;
this.vertexArray[3] = e.height;
this.vertexArray[4] = 0;
this.vertexArray[5] = 0;
this.vertexArray[6] = e.width;
this.vertexArray[7] = 0;
b.bufferSubData(b.ARRAY_BUFFER, 0, this.vertexArray);
b.bindBuffer(b.ARRAY_BUFFER, this.uvBuffer);
this.uvArray[2] = e.width / this.width;
this.uvArray[5] = e.height / this.height;
this.uvArray[6] = e.width / this.width;
this.uvArray[7] = e.height / this.height;
b.bufferSubData(b.ARRAY_BUFFER, 0, this.uvArray);
var m = this.texturePool.pop();
m || (m = new a.FilterTexture(this.gl, this.width, this.height));
m.resize(this.width, this.height);
b.bindFramebuffer(b.FRAMEBUFFER, m.frameBuffer);
b.clear(b.COLOR_BUFFER_BIT);
b.disable(b.BLEND);
for (var n = 0; n < d.filterPasses.length - 1; n++) {
var p = d.filterPasses[n];
b.bindFramebuffer(b.FRAMEBUFFER, m.frameBuffer);
b.activeTexture(b.TEXTURE0);
b.bindTexture(b.TEXTURE_2D, f.texture);
this.applyFilterPass(p, e, e.x, e.y, e.width, e.height);
p = f;
f = m;
m = p;
}
b.enable(b.BLEND);
this.texturePool.push(m);
}
m = d.filterPasses[d.filterPasses.length - 1];
this.offsetX -= e.x;
this.offsetY -= e.y;
var n = this.width,
p = this.height,
q = 0,
r = 0,
t = this.buffer,
u = e.x,
B = e.y;
0 === this.filterStack.length
? b.colorMask(!0, !0, !0, !0)
: ((t = this.filterStack[this.filterStack.length - 1]),
(e = t._filterArea),
(n = e.width),
(p = e.height),
(q = e.x),
(r = e.y),
(t = t._glFilterTexture.frameBuffer),
m instanceof a.Transform3DFilter && ((u -= e.x), (B -= e.y)));
g.x = n / 2;
g.y = -p / 2;
k.x = q;
k.y = r;
e = d._filterArea;
g = e.x - q;
k = e.y - r;
b.bindBuffer(b.ARRAY_BUFFER, this.vertexBuffer);
this.vertexArray[0] = g;
this.vertexArray[1] = k + e.height;
this.vertexArray[2] = g + e.width;
this.vertexArray[3] = k + e.height;
this.vertexArray[4] = g;
this.vertexArray[5] = k;
this.vertexArray[6] = g + e.width;
this.vertexArray[7] = k;
b.bufferSubData(b.ARRAY_BUFFER, 0, this.vertexArray);
b.bindBuffer(b.ARRAY_BUFFER, this.uvBuffer);
this.uvArray[2] = e.width / this.width;
this.uvArray[5] = e.height / this.height;
this.uvArray[6] = e.width / this.width;
this.uvArray[7] = e.height / this.height;
b.bufferSubData(b.ARRAY_BUFFER, 0, this.uvArray);
b.viewport(0, 0, n, p);
b.bindFramebuffer(b.FRAMEBUFFER, t);
this.renderSession.blendModeManager.setBlendMode(a.blendModes.ADD_INTENSIVE);
b.activeTexture(b.TEXTURE0);
b.bindTexture(b.TEXTURE_2D, f.texture);
this.applyFilterPass(m, e, u, B, n, p);
this.texturePool.push(f);
d._glFilterTexture = null;
};
a.WebGLFilterManager.prototype.applyFilterPass = function (b, d, e, f, g, k) {
var m = this.gl,
n = b.shaders[m.id];
n || ((n = new a.PixiShader(m)), (n.fragmentSrc = b.fragmentSrc), (n.uniforms = b.uniforms), b.vertexSrc && (n.vertexSrc = b.vertexSrc), n.init(), (b.shaders[m.id] = n));
this.renderSession.shaderManager.setShader(n);
m.uniform2f(n.projectionVector, g / 2, -k / 2);
m.uniform2f(n.offsetVector, 0, 0);
b.uniforms.dimensions &&
((b.uniforms.dimensions.value[0] = this.width), (b.uniforms.dimensions.value[1] = this.height), (b.uniforms.dimensions.value[2] = this.vertexArray[0]), (b.uniforms.dimensions.value[3] = this.vertexArray[5]));
b.uniforms.aspectratio && ((g = Math.abs(this.vertexArray[6] - this.vertexArray[0])), (k = Math.abs(this.vertexArray[7] - this.vertexArray[1])), (b.aspectratio = g / k));
b.uniforms.halfUVSize && ((b.uniforms.halfUVSize.value[0] = 0.5 * Math.abs(this.uvArray[6] - this.uvArray[0])), (b.uniforms.halfUVSize.value[1] = 0.5 * Math.abs(this.uvArray[7] - this.uvArray[1])));
b.uniforms.filterArea && ((b.uniforms.filterArea.value[0] = e), (b.uniforms.filterArea.value[1] = f), (b.uniforms.filterArea.value[2] = d.width), (b.uniforms.filterArea.value[3] = d.height));
b.uniforms.normalMap &&
CONFIG.CLIENTSLOTAPPLET.orientationSensorManager &&
-1e5 < JSUTIL.GLUtil.currentParallaxDepth &&
0 != JSUTIL.GLUtil.currentParallaxDepth &&
((e = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getX_0() * JSUTIL.GLUtil.currentParallaxDepth),
(f = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getY_0() * JSUTIL.GLUtil.currentParallaxDepth),
(b.uniforms.offset.value[0] = e / d.width),
(b.uniforms.offset.value[1] = f / d.height),
(b.offset = b.uniforms.offset.value));
b.uniforms.uvData &&
((b.uniforms.uvData.value[0] = d.width / this.width),
(b.uniforms.uvData.value[1] = d.height / this.height),
(b.uniforms.uvData.value[2] = (1 / this.width) * b.direction.x * b.texelStep),
(b.uniforms.uvData.value[3] = (1 / this.height) * b.direction.y * b.texelStep));
b.update && b.update();
n.syncUniforms();
m.bindBuffer(m.ARRAY_BUFFER, this.vertexBuffer);
m.vertexAttribPointer(n.aVertexPosition, 2, m.FLOAT, !1, 0, 0);
m.bindBuffer(m.ARRAY_BUFFER, this.uvBuffer);
m.vertexAttribPointer(n.aTextureCoord, 2, m.FLOAT, !1, 0, 0);
m.bindBuffer(m.ARRAY_BUFFER, this.colorBuffer);
m.vertexAttribPointer(n.colorAttribute, 2, m.FLOAT, !1, 0, 0);
m.bindBuffer(m.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
m.drawElements(m.TRIANGLES, 6, m.UNSIGNED_SHORT, 0);
this.renderSession.drawCount++;
};
a.WebGLFilterManager.prototype.initShaderBuffers = function () {
var b = this.gl;
this.vertexBuffer = b.createBuffer();
this.uvBuffer = b.createBuffer();
this.colorBuffer = b.createBuffer();
this.indexBuffer = b.createBuffer();
this.vertexArray = new a.Float32Array([0, 0, 1, 0, 0, 1, 1, 1]);
b.bindBuffer(b.ARRAY_BUFFER, this.vertexBuffer);
b.bufferData(b.ARRAY_BUFFER, this.vertexArray, b.STATIC_DRAW);
this.uvArray = new a.Float32Array([0, 0, 1, 0, 0, 1, 1, 1]);
b.bindBuffer(b.ARRAY_BUFFER, this.uvBuffer);
b.bufferData(b.ARRAY_BUFFER, this.uvArray, b.STATIC_DRAW);
this.colorArray = new a.Float32Array([1, 16777215, 1, 16777215, 1, 16777215, 1, 16777215]);
b.bindBuffer(b.ARRAY_BUFFER, this.colorBuffer);
b.bufferData(b.ARRAY_BUFFER, this.colorArray, b.STATIC_DRAW);
b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
b.bufferData(b.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 1, 3, 2]), b.STATIC_DRAW);
};
a.WebGLFilterManager.prototype.destroy = function () {
var a = this.gl;
this.filterStack = null;
for (var d = (this.offsetY = this.offsetX = 0); d < this.texturePool.length; d++) this.texturePool[d].destroy();
this.texturePool = null;
a.deleteBuffer(this.vertexBuffer);
a.deleteBuffer(this.uvBuffer);
a.deleteBuffer(this.colorBuffer);
a.deleteBuffer(this.indexBuffer);
};
a.FilterTexture = function (b, d, e, f) {
this.gl = b;
this.frameBuffer = b.createFramebuffer();
this.texture = b.createTexture();
f = f || a.scaleModes.DEFAULT;
b.bindTexture(b.TEXTURE_2D, this.texture);
b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, f === a.scaleModes.LINEAR ? b.LINEAR : b.NEAREST);
b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, f === a.scaleModes.LINEAR ? b.LINEAR : b.NEAREST);
b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.CLAMP_TO_EDGE);
b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.CLAMP_TO_EDGE);
b.bindFramebuffer(b.FRAMEBUFFER, this.frameBuffer);
b.bindFramebuffer(b.FRAMEBUFFER, this.frameBuffer);
b.framebufferTexture2D(b.FRAMEBUFFER, b.COLOR_ATTACHMENT0, b.TEXTURE_2D, this.texture, 0);
this.renderBuffer = b.createRenderbuffer();
b.bindRenderbuffer(b.RENDERBUFFER, this.renderBuffer);
b.framebufferRenderbuffer(b.FRAMEBUFFER, b.DEPTH_STENCIL_ATTACHMENT, b.RENDERBUFFER, this.renderBuffer);
this.resize(d, e);
};
a.FilterTexture.prototype.constructor = a.FilterTexture;
a.FilterTexture.prototype.clear = function () {
var a = this.gl;
a.clearColor(0, 0, 0, 0);
a.clear(a.COLOR_BUFFER_BIT);
};
a.FilterTexture.prototype.resize = function (a, d) {
if (this.width !== a || this.height !== d) {
this.width = a;
this.height = d;
var e = this.gl;
e.bindTexture(e.TEXTURE_2D, this.texture);
e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, a, d, 0, e.RGBA, e.UNSIGNED_BYTE, null);
e.bindRenderbuffer(e.RENDERBUFFER, this.renderBuffer);
e.renderbufferStorage(e.RENDERBUFFER, e.DEPTH_STENCIL, a, d);
}
};
a.FilterTexture.prototype.destroy = function () {
var a = this.gl;
a.deleteFramebuffer(this.frameBuffer);
a.deleteTexture(this.texture);
this.texture = this.frameBuffer = null;
};
a.CanvasBuffer = function (a, d) {
this.width = a;
this.height = d;
this.canvas = document.createElement("canvas");
this.context = this.canvas.getContext("2d");
this.canvas.width = a;
this.canvas.height = d;
};
a.CanvasBuffer.prototype.constructor = a.CanvasBuffer;
a.CanvasBuffer.prototype.clear = function () {
this.context.setTransform(1, 0, 0, 1, 0, 0);
this.context.clearRect(0, 0, this.width, this.height);
};
a.CanvasBuffer.prototype.resize = function (a, d) {
this.width = this.canvas.width = a;
this.height = this.canvas.height = d;
};
a.CanvasMaskManager = function () {};
a.CanvasMaskManager.prototype.constructor = a.CanvasMaskManager;
a.CanvasMaskManager.prototype.pushMask = function (b, d) {
var e = d.context;
e.save();
var f = b.alpha,
g = b.worldTransform,
k = d.resolution,
m = 0,
n = 0;
CONFIG.CLIENTSLOTAPPLET.orientationSensorManager &&
-1e5 < JSUTIL.GLUtil.currentParallaxDepth &&
((m = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getX_0() * JSUTIL.GLUtil.currentParallaxDepth), (n = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getY_0() * JSUTIL.GLUtil.currentParallaxDepth));
e.setTransform(g.a * k, g.b * k, g.c * k, g.d * k, (g.tx + m) * k, (g.ty + n) * k);
a.CanvasGraphics.renderGraphicsMask(b, e);
e.clip();
b.worldAlpha = f;
};
a.CanvasMaskManager.prototype.popMask = function (a) {
a.context.restore();
};
a.CanvasTinter = function () {};
a.CanvasTinter.getTintedTexture = function (b, d) {
var e = b.texture;
d = a.CanvasTinter.roundColor(d);
var f = "#" + ("00000" + (d | 0).toString(16)).substr(-6);
e.tintCache = e.tintCache || {};
if (e.tintCache[f]) return e.tintCache[f];
var g = a.CanvasTinter.canvas || document.createElement("canvas");
a.CanvasTinter.tintMethod(e, d, g);
if (a.CanvasTinter.convertTintToImage) {
var k = new Image();
k.src = g.toDataURL();
e.tintCache[f] = k;
} else (e.tintCache[f] = g), (a.CanvasTinter.canvas = null);
return g;
};
a.CanvasTinter.tintWithMultiply = function (a, d, e) {
var f = e.getContext("2d"),
g = a.crop;
e.width = g.width;
e.height = g.height;
f.fillStyle = "#" + ("00000" + (d | 0).toString(16)).substr(-6);
f.fillRect(0, 0, g.width, g.height);
f.globalCompositeOperation = "multiply";
f.drawImage(a.baseTexture.source, g.x, g.y, g.width, g.height, 0, 0, g.width, g.height);
f.globalCompositeOperation = "destination-atop";
f.drawImage(a.baseTexture.source, g.x, g.y, g.width, g.height, 0, 0, g.width, g.height);
};
a.CanvasTinter.tintWithOverlay = function (a, d, e) {
var f = e.getContext("2d"),
g = a.crop;
e.width = g.width;
e.height = g.height;
f.globalCompositeOperation = "copy";
f.fillStyle = "#" + ("00000" + (d | 0).toString(16)).substr(-6);
f.fillRect(0, 0, g.width, g.height);
f.globalCompositeOperation = "destination-atop";
f.drawImage(a.baseTexture.source, g.x, g.y, g.width, g.height, 0, 0, g.width, g.height);
};
a.CanvasTinter.tintWithPerPixel = function (b, d, e) {
var f = e.getContext("2d"),
g = b.crop;
e.width = g.width;
e.height = g.height;
f.globalCompositeOperation = "copy";
f.drawImage(b.baseTexture.source, g.x, g.y, g.width, g.height, 0, 0, g.width, g.height);
e = a.hex2rgb(d);
b = e[0];
d = e[1];
e = e[2];
for (var g = f.getImageData(0, 0, g.width, g.height), k = g.data, m = 0; m < k.length; m += 4) (k[m + 0] *= b), (k[m + 1] *= d), (k[m + 2] *= e);
f.putImageData(g, 0, 0);
};
a.CanvasTinter.roundColor = function (b) {
var d = a.CanvasTinter.cacheStepsPerColorChannel;
b = a.hex2rgb(b);
b[0] = Math.min(255, (b[0] / d) * d);
b[1] = Math.min(255, (b[1] / d) * d);
b[2] = Math.min(255, (b[2] / d) * d);
return a.rgb2hex(b);
};
a.CanvasTinter.cacheStepsPerColorChannel = 8;
a.CanvasTinter.convertTintToImage = !1;
a.CanvasTinter.canUseMultiply = a.canUseNewCanvasBlendModes();
a.CanvasTinter.tintMethod = a.CanvasTinter.canUseMultiply ? a.CanvasTinter.tintWithMultiply : a.CanvasTinter.tintWithPerPixel;
a.CanvasRenderer = function (b, d, e) {
if (e) for (var f in a.defaultRenderOptions) "undefined" === typeof e[f] && (e[f] = a.defaultRenderOptions[f]);
else e = a.defaultRenderOptions;
a.defaultRenderer || (a.sayHello("Canvas"), (a.defaultRenderer = this));
this.type = a.CANVAS_RENDERER;
this.resolution = e.resolution;
this.clearBeforeRender = e.clearBeforeRender;
this.transparent = e.transparent;
this.autoResize = e.autoResize || !1;
this.width = b || 800;
this.height = d || 600;
this.width *= this.resolution;
this.height *= this.resolution;
this.view = e.view || document.createElement("canvas");
this.context = this.view.getContext("2d", { alpha: this.transparent });
this.refresh = !0;
this.view.width = this.width * this.resolution;
this.view.height = this.height * this.resolution;
this.count = 0;
this.maskManager = new a.CanvasMaskManager();
this.renderSession = { context: this.context, maskManager: this.maskManager, scaleMode: null, smoothProperty: null, roundPixels: !1 };
this.mapBlendModes();
this.resize(b, d);
"imageSmoothingEnabled" in this.context
? (this.renderSession.smoothProperty = "imageSmoothingEnabled")
: "webkitImageSmoothingEnabled" in this.context
? (this.renderSession.smoothProperty = "webkitImageSmoothingEnabled")
: "mozImageSmoothingEnabled" in this.context
? (this.renderSession.smoothProperty = "mozImageSmoothingEnabled")
: "oImageSmoothingEnabled" in this.context
? (this.renderSession.smoothProperty = "oImageSmoothingEnabled")
: "msImageSmoothingEnabled" in this.context && (this.renderSession.smoothProperty = "msImageSmoothingEnabled");
};
a.CanvasRenderer.prototype.constructor = a.CanvasRenderer;
a.CanvasRenderer.prototype.render = function (b) {
b.updateTransform();
this.context.setTransform(1, 0, 0, 1, 0, 0);
this.context.globalAlpha = 1;
this.renderSession.currentBlendMode = a.blendModes.NORMAL;
this.context.globalCompositeOperation = a.blendModesCanvas[a.blendModes.NORMAL];
navigator.isCocoonJS && this.view.screencanvas && ((this.context.fillStyle = "black"), this.context.clear());
this.clearBeforeRender && (this.transparent ? this.context.clearRect(0, 0, this.width, this.height) : ((this.context.fillStyle = b.backgroundColorString), this.context.fillRect(0, 0, this.width, this.height)));
this.renderDisplayObject(b);
b.interactive && !b._interactiveEventsAdded && ((b._interactiveEventsAdded = !0), b.interactionManager.setTarget(this));
};
a.CanvasRenderer.prototype.destroy = function (a) {
"undefined" === typeof a && (a = !0);
a && this.view.parent && this.view.parent.removeChild(this.view);
this.renderSession = this.maskManager = this.context = this.view = null;
};
a.CanvasRenderer.prototype.resize = function (a, d) {
this.width = a * this.resolution;
this.height = d * this.resolution;
this.view.width = this.width;
this.view.height = this.height;
this.autoResize && ((this.view.style.width = this.width / this.resolution + "px"), (this.view.style.height = this.height / this.resolution + "px"));
};
a.CanvasRenderer.prototype.renderDisplayObject = function (a, d) {
this.renderSession.context = d || this.context;
this.renderSession.resolution = this.resolution;
a._renderCanvas(this.renderSession);
};
a.CanvasRenderer.prototype.mapBlendModes = function () {
a.blendModesCanvas ||
((a.blendModesCanvas = []),
a.canUseNewCanvasBlendModes()
? ((a.blendModesCanvas[a.blendModes.NORMAL] = "source-over"),
(a.blendModesCanvas[a.blendModes.ADD] = "lighter"),
(a.blendModesCanvas[a.blendModes.ADD_INTENSIVE] = "lighter"),
(a.blendModesCanvas[a.blendModes.MULTIPLY] = "multiply"),
(a.blendModesCanvas[a.blendModes.SCREEN] = "screen"),
(a.blendModesCanvas[a.blendModes.OVERLAY] = "overlay"),
(a.blendModesCanvas[a.blendModes.DARKEN] = "darken"),
(a.blendModesCanvas[a.blendModes.LIGHTEN] = "lighten"),
(a.blendModesCanvas[a.blendModes.COLOR_DODGE] = "color-dodge"),
(a.blendModesCanvas[a.blendModes.COLOR_BURN] = "color-burn"),
(a.blendModesCanvas[a.blendModes.HARD_LIGHT] = "hard-light"),
(a.blendModesCanvas[a.blendModes.SOFT_LIGHT] = "soft-light"),
(a.blendModesCanvas[a.blendModes.DIFFERENCE] = "difference"),
(a.blendModesCanvas[a.blendModes.EXCLUSION] = "exclusion"),
(a.blendModesCanvas[a.blendModes.HUE] = "hue"),
(a.blendModesCanvas[a.blendModes.SATURATION] = "saturation"),
(a.blendModesCanvas[a.blendModes.COLOR] = "color"),
(a.blendModesCanvas[a.blendModes.LUMINOSITY] = "luminosity"))
: ((a.blendModesCanvas[a.blendModes.NORMAL] = "source-over"),
(a.blendModesCanvas[a.blendModes.ADD] = "lighter"),
(a.blendModesCanvas[a.blendModes.ADD_INTENSIVE] = "lighter"),
(a.blendModesCanvas[a.blendModes.MULTIPLY] = "source-over"),
(a.blendModesCanvas[a.blendModes.SCREEN] = "source-over"),
(a.blendModesCanvas[a.blendModes.OVERLAY] = "source-over"),
(a.blendModesCanvas[a.blendModes.DARKEN] = "source-over"),
(a.blendModesCanvas[a.blendModes.LIGHTEN] = "source-over"),
(a.blendModesCanvas[a.blendModes.COLOR_DODGE] = "source-over"),
(a.blendModesCanvas[a.blendModes.COLOR_BURN] = "source-over"),
(a.blendModesCanvas[a.blendModes.HARD_LIGHT] = "source-over"),
(a.blendModesCanvas[a.blendModes.SOFT_LIGHT] = "source-over"),
(a.blendModesCanvas[a.blendModes.DIFFERENCE] = "source-over"),
(a.blendModesCanvas[a.blendModes.EXCLUSION] = "source-over"),
(a.blendModesCanvas[a.blendModes.HUE] = "source-over"),
(a.blendModesCanvas[a.blendModes.SATURATION] = "source-over"),
(a.blendModesCanvas[a.blendModes.COLOR] = "source-over"),
(a.blendModesCanvas[a.blendModes.LUMINOSITY] = "source-over")));
};
a.CanvasGraphics = function () {};
a.CanvasGraphics.renderGraphics = function (b, d) {
for (var e = b.worldAlpha, f = b.gradient && null != b.gradient, g = 0; g < b.graphicsData.length; g++) {
var k = b.graphicsData[g],
m = k.shape;
d.strokeStyle = "#" + ("00000" + (k.lineColor | 0).toString(16)).substr(-6);
d.lineWidth = k.lineWidth;
if (k.type === a.Graphics.POLY) {
d.beginPath();
var n = m.points;
d.moveTo(n[0], n[1]);
for (var p = 1; p < n.length / 2; p++) d.lineTo(n[2 * p], n[2 * p + 1]);
m.closed && d.lineTo(n[0], n[1]);
n[0] === n[n.length - 2] && n[1] === n[n.length - 1] && d.closePath();
k.fill && ((d.globalAlpha = k.fillAlpha * e), (d.fillStyle = f ? b.gradient : "#" + ("00000" + (k.fillColor | 0).toString(16)).substr(-6)), d.fill());
k.lineWidth && ((d.globalAlpha = k.lineAlpha * e), d.stroke());
} else if (k.type === a.Graphics.RECT) {
if (k.fillColor || 0 === k.fillColor) (d.globalAlpha = k.fillAlpha * e), (d.fillStyle = f ? b.gradient : "#" + ("00000" + (k.fillColor | 0).toString(16)).substr(-6)), d.fillRect(m.x, m.y, m.width, m.height);
k.lineWidth && ((d.globalAlpha = k.lineAlpha * e), d.strokeRect(m.x, m.y, m.width, m.height));
} else if (k.type === a.Graphics.MRECT) {
if (k.fillColor || 0 === k.fillColor)
if (((d.globalAlpha = k.fillAlpha * e), (d.fillStyle = "#" + ("00000" + (k.fillColor | 0).toString(16)).substr(-6)), (n = k.shape.points), d.fillRect(n[0], n[1], n[2], n[3]), 4 < n.length))
for (p = 4; p < n.length; p += 4) 0 < n[p + 2] && 0 < n[p + 3] && d.fillRect(n[p], n[p + 1], n[p + 2], n[p + 3]);
if (k.lineWidth && ((d.globalAlpha = k.lineAlpha * e), (n = k.shape.points), d.strokeRect(n[0], n[1], n[2], n[3]), 4 < n.length))
for (p = 4; p < n.length; p += 4) 0 < n[p + 2] && 0 < n[p + 3] && d.strokeRect(n[p], n[p + 1], n[p + 2], n[p + 3]);
} else if (k.type === a.Graphics.CIRC)
d.beginPath(),
d.arc(m.x, m.y, m.radius, 0, 2 * Math.PI),
d.closePath(),
k.fill && ((d.globalAlpha = k.fillAlpha * e), (d.fillStyle = "#" + ("00000" + (k.fillColor | 0).toString(16)).substr(-6)), d.fill()),
k.lineWidth && ((d.globalAlpha = k.lineAlpha * e), d.stroke());
else if (k.type === a.Graphics.ELIP) {
var q = 2 * m.width,
p = 2 * m.height,
n = m.x - q / 2,
m = m.y - p / 2;
d.beginPath();
var r = (q / 2) * 0.5522848,
t = (p / 2) * 0.5522848,
u = n + q,
B = m + p,
q = n + q / 2,
p = m + p / 2;
d.moveTo(n, p);
d.bezierCurveTo(n, p - t, q - r, m, q, m);
d.bezierCurveTo(q + r, m, u, p - t, u, p);
d.bezierCurveTo(u, p + t, q + r, B, q, B);
d.bezierCurveTo(q - r, B, n, p + t, n, p);
d.closePath();
k.fill && ((d.globalAlpha = k.fillAlpha * e), (d.fillStyle = "#" + ("00000" + (k.fillColor | 0).toString(16)).substr(-6)), d.fill());
k.lineWidth && ((d.globalAlpha = k.lineAlpha * e), d.stroke());
} else if (k.type === a.Graphics.RREC) {
n = m.x;
p = m.y;
r = m.width;
t = m.height;
m = m.radius;
u = (Math.min(r, t) / 2) | 0;
m = m > u ? u : m;
d.beginPath();
d.moveTo(n, p + m);
d.lineTo(n, p + t - m);
d.quadraticCurveTo(n, p + t, n + m, p + t);
d.lineTo(n + r - m, p + t);
d.quadraticCurveTo(n + r, p + t, n + r, p + t - m);
d.lineTo(n + r, p + m);
d.quadraticCurveTo(n + r, p, n + r - m, p);
d.lineTo(n + m, p);
d.quadraticCurveTo(n, p, n, p + m);
d.closePath();
if (k.fillColor || 0 === k.fillColor) (d.globalAlpha = k.fillAlpha * e), (d.fillStyle = "#" + ("00000" + (k.fillColor | 0).toString(16)).substr(-6)), d.fill();
k.lineWidth && ((d.globalAlpha = k.lineAlpha * e), d.stroke());
}
}
};
a.CanvasGraphics.renderGraphicsMask = function (b, d) {
var e = b.graphicsData.length;
if (0 !== e)
for (1 < e && window.console.log("Pixi.js warning: masks in canvas can only mask using the first path in the graphics object"), e = 0; 1 > e; e++) {
var f = b.graphicsData[e],
g = f.shape;
if (f.type === a.Graphics.POLY) {
d.beginPath();
f = g.points;
d.moveTo(f[0], f[1]);
for (var k = 1; k < f.length / 2; k++) d.lineTo(f[2 * k], f[2 * k + 1]);
f[0] === f[f.length - 2] && f[1] === f[f.length - 1] && d.closePath();
} else if (f.type === a.Graphics.RECT) d.beginPath(), d.rect(g.x, g.y, g.width, g.height), d.closePath();
else if (f.type === a.Graphics.MRECT) {
d.beginPath();
f = f.shape.points;
d.rect(f[0], f[1], f[2], f[3]);
if (4 < f.length) for (k = 4; k < f.length; k += 4) 0 < f[k + 2] && 0 < f[k + 3] && d.rect(f[k], f[k + 1], f[k + 2], f[k + 3]);
d.closePath();
} else if (f.type === a.Graphics.CIRC) d.beginPath(), d.arc(g.x, g.y, g.radius, 0, 2 * Math.PI), d.closePath();
else if (f.type === a.Graphics.ELIP) {
var m = 2 * g.width,
k = 2 * g.height,
f = g.x - m / 2,
g = g.y - k / 2;
d.beginPath();
var n = (m / 2) * 0.5522848,
p = (k / 2) * 0.5522848,
q = f + m,
r = g + k,
m = f + m / 2,
k = g + k / 2;
d.moveTo(f, k);
d.bezierCurveTo(f, k - p, m - n, g, m, g);
d.bezierCurveTo(m + n, g, q, k - p, q, k);
d.bezierCurveTo(q, k + p, m + n, r, m, r);
d.bezierCurveTo(m - n, r, f, k + p, f, k);
d.closePath();
} else
f.type === a.Graphics.RREC &&
((p = g.points),
(f = p[0]),
(k = p[1]),
(g = p[2]),
(n = p[3]),
(p = p[4]),
(q = (Math.min(g, n) / 2) | 0),
(p = p > q ? q : p),
d.beginPath(),
d.moveTo(f, k + p),
d.lineTo(f, k + n - p),
d.quadraticCurveTo(f, k + n, f + p, k + n),
d.lineTo(f + g - p, k + n),
d.quadraticCurveTo(f + g, k + n, f + g, k + n - p),
d.lineTo(f + g, k + p),
d.quadraticCurveTo(f + g, k, f + g - p, k),
d.lineTo(f + p, k),
d.quadraticCurveTo(f, k, f, k + p),
d.closePath());
}
};
a.Graphics = function () {
a.DisplayObjectContainer.call(this);
this.renderable = !0;
this.fillAlpha = 1;
this.lineColor = this.lineWidth = 0;
this.graphicsData = [];
this.tint = 16777215;
this.blendMode = a.blendModes.NORMAL;
this.currentPath = null;
this._webGL = [];
this.isMask = !1;
this.boundsPadding = 0;
this._localBounds = new a.Rectangle(0, 0, 1, 1);
this.dirty = !0;
this.cachedSpriteDirty = this.webGLDirty = !1;
};
a.Graphics.prototype = Object.create(a.DisplayObjectContainer.prototype);
a.Graphics.prototype.constructor = a.Graphics;
Object.defineProperty(a.Graphics.prototype, "cacheAsBitmap", {
get: function () {
return this._cacheAsBitmap;
},
set: function (a) {
(this._cacheAsBitmap = a) ? this._generateCachedSprite() : (this.destroyCachedSprite(), (this.dirty = !0));
},
});
a.Graphics.prototype.lineStyle = function (b, d, e) {
this.lineWidth = b || 0;
this.lineColor = d || 0;
this.lineAlpha = 3 > arguments.length ? 1 : e;
if (this.currentPath) {
if (this.currentPath.shape.points.length) return this.drawShape(new a.Polygon(this.currentPath.shape.points.slice(-2))), this;
this.currentPath.lineWidth = this.lineWidth;
this.currentPath.lineColor = this.lineColor;
this.currentPath.lineAlpha = this.lineAlpha;
}
return this;
};
a.Graphics.prototype.moveTo = function (b, d) {
this.drawShape(new a.Polygon([b, d]));
return this;
};
a.Graphics.prototype.lineTo = function (a, d) {
this.currentPath.shape.points.push(a, d);
this.dirty = !0;
return this;
};
a.Graphics.prototype.quadraticCurveTo = function (a, d, e, f) {
this.currentPath ? 0 === this.currentPath.shape.points.length && (this.currentPath.shape.points = [0, 0]) : this.moveTo(0, 0);
var g,
k,
m = this.currentPath.shape.points;
0 === m.length && this.moveTo(0, 0);
for (var n = m[m.length - 2], p = m[m.length - 1], q = 0, r = 1; 20 >= r; r++) (q = r / 20), (g = n + (a - n) * q), (k = p + (d - p) * q), m.push(g + (a + (e - a) * q - g) * q, k + (d + (f - d) * q - k) * q);
this.dirty = !0;
return this;
};
a.Graphics.prototype.bezierCurveTo = function (a, d, e, f, g, k) {
this.currentPath ? 0 === this.currentPath.shape.points.length && (this.currentPath.shape.points = [0, 0]) : this.moveTo(0, 0);
for (var m, n, p, q, r, t = this.currentPath.shape.points, u = t[t.length - 2], B = t[t.length - 1], A = 0, C = 1; 20 >= C; C++)
(A = C / 20), (m = 1 - A), (n = m * m), (p = n * m), (q = A * A), (r = q * A), t.push(p * u + 3 * n * A * a + 3 * m * q * e + r * g, p * B + 3 * n * A * d + 3 * m * q * f + r * k);
this.dirty = !0;
return this;
};
a.Graphics.prototype.arcTo = function (a, d, e, f, g) {
this.currentPath ? 0 === this.currentPath.shape.points.length && this.currentPath.shape.points.push(a, d) : this.moveTo(a, d);
var k = this.currentPath.shape.points,
m = k[k.length - 1] - d,
n = k[k.length - 2] - a;
f -= d;
e -= a;
var p = Math.abs(m * e - n * f);
if (1e-8 > p || 0 === g) (k[k.length - 2] === a && k[k.length - 1] === d) || k.push(a, d);
else {
var q = m * m + n * n,
r = f * f + e * e,
t = m * f + n * e,
k = (g * Math.sqrt(q)) / p,
p = (g * Math.sqrt(r)) / p,
q = (k * t) / q,
u = (p * t) / r,
r = k * e + p * n,
t = k * f + p * m,
B = e * (k + u),
k = f * (k + u),
p = Math.atan2(m * (p + q) - t, n * (p + q) - r),
k = Math.atan2(k - t, B - r);
this.arc(r + a, t + d, g, p, k, n * f > e * m);
}
this.dirty = !0;
return this;
};
a.Graphics.prototype.arc = function (a, d, e, f, g, k) {
var m = a + Math.cos(f) * e,
n = d + Math.sin(f) * e,
p = this.currentPath.shape.points;
0 === p.length ? (this.moveTo(m, n), (p = this.currentPath.shape.points)) : (p[p.length - 2] === m && p[p.length - 1] === n) || p.push(m, n);
if (f === g) return this;
!k && g <= f ? (g += 2 * Math.PI) : k && f <= g && (f += 2 * Math.PI);
g = k ? -1 * (f - g) : g - f;
var q = (Math.abs(g) / (2 * Math.PI)) * 40;
if (0 === g) return this;
g /= 2 * q;
k = 2 * g;
for (var m = Math.cos(g), n = Math.sin(g), q = q - 1, r = (q % 1) / q, t = 0; t <= q; t++) {
var u = g + f + k * (t + r * t),
B = Math.cos(u),
u = -Math.sin(u);
p.push((m * B + n * u) * e + a, (m * -u + n * B) * e + d);
}
this.dirty = !0;
return this;
};
a.Graphics.prototype.beginFill = function (a, d) {
this.filling = !0;
this.fillColor = a || 0;
this.fillAlpha = void 0 === d ? 1 : d;
this.currentPath &&
("undefined" == typeof this.currentPath.shape || 2 >= this.currentPath.shape.points.length) &&
((this.currentPath.fill = this.filling), (this.currentPath.fillColor = this.fillColor), (this.currentPath.fillAlpha = this.fillAlpha));
return this;
};
a.Graphics.prototype.beginFillGradient = function (a, d) {
this.filling = !0;
this.gradient = a;
this.fillColor = 0;
this.fillAlpha = void 0 === d ? 1 : d;
this.currentPath &&
("undefined" == typeof this.currentPath.shape || 2 >= this.currentPath.shape.points.length) &&
((this.currentPath.fill = this.filling), (this.currentPath.fillColor = this.fillColor), (this.currentPath.fillAlpha = this.fillAlpha));
return this;
};
a.Graphics.prototype.endFill = function () {
this.filling = !1;
this.fillColor = null;
this.fillAlpha = 1;
return this;
};
a.Graphics.prototype.drawRect = function (b, d, e, f) {
this.drawShape(new a.Rectangle(b, d, e, f));
return this;
};
a.Graphics.prototype.drawMultiRects = function (b) {
this.drawShape(new a.MultiRectangle(b));
return this;
};
a.Graphics.prototype.drawRoundedRect = function (b, d, e, f, g) {
this.drawShape(new a.RoundedRectangle(b, d, e, f, g));
return this;
};
a.Graphics.prototype.drawMultipleRects = function (b) {
this.currentPath = { lineWidth: this.lineWidth, lineColor: this.lineColor, lineAlpha: this.lineAlpha, fillColor: this.fillColor, fillAlpha: this.fillAlpha, fill: this.filling, points: b, type: a.Graphics.RECT };
this.graphicsData.push(this.currentPath);
this.dirty = !0;
return this;
};
a.Graphics.prototype.drawCircle = function (b, d, e) {
this.drawShape(new a.Circle(b, d, e));
return this;
};
a.Graphics.prototype.drawEllipse = function (b, d, e, f) {
this.drawShape(new a.Ellipse(b, d, e, f));
return this;
};
a.Graphics.prototype.drawPolygon = function (b) {
b instanceof Array || (b = Array.prototype.slice.call(arguments));
this.drawShape(new a.Polygon(b));
return this;
};
a.Graphics.prototype.clear = function () {
this.lineWidth = 0;
this.filling = !1;
this.clearDirty = this.dirty = !0;
this.graphicsData = [];
return this;
};
a.Graphics.prototype.generateTexture = function (b, d) {
b = b || 1;
var e = this.getBounds(),
f = new a.CanvasBuffer(e.width * b, e.height * b),
g = a.Texture.fromCanvas(f.canvas, d);
g.baseTexture.resolution = b;
f.context.scale(b, b);
f.context.translate(-e.x, -e.y);
a.CanvasGraphics.renderGraphics(this, f.context);
return g;
};
a.Graphics.prototype._renderWebGL = function (b) {
if (!1 !== this.visible && 0 !== this.alpha && !0 !== this.isMask)
if ((CONFIG.STATS.PIXIGRAPHICS++, this._cacheAsBitmap)) {
if (this.dirty || this.cachedSpriteDirty) this._generateCachedSprite(), this.updateCachedSpriteTexture(), (this.dirty = this.cachedSpriteDirty = !1);
this._cachedSprite.worldAlpha = this.worldAlpha;
a.Sprite.prototype._renderWebGL.call(this._cachedSprite, b);
} else {
b.spriteBatch.stop();
b.blendModeManager.setBlendMode(this.blendMode);
this._mask && b.maskManager.pushMask(this._mask, b);
this._filters && b.filterManager.pushFilter(this._filterBlock);
if (this.blendMode !== b.spriteBatch.currentBlendMode) {
b.spriteBatch.currentBlendMode = this.blendMode;
var d = a.blendModesWebGL[b.spriteBatch.currentBlendMode];
b.spriteBatch.gl.blendFunc(d[0], d[1]);
}
this.webGLDirty && ((this.dirty = !0), (this.webGLDirty = !1));
a.WebGLGraphics.renderGraphics(this, b);
if (this.children.length) {
b.spriteBatch.start();
for (var d = 0, e = this.children.length; d < e; d++) this.children[d]._renderWebGL(b);
b.spriteBatch.stop();
}
this._filters && b.filterManager.popFilter();
this._mask && b.maskManager.popMask(this.mask, b);
b.drawCount++;
b.spriteBatch.start();
}
};
a.Graphics.prototype._renderCanvas = function (b) {
if (!1 !== this.visible && 0 !== this.alpha && !0 !== this.isMask)
if (this._cacheAsBitmap) {
if (this.dirty || this.cachedSpriteDirty) this._generateCachedSprite(), this.updateCachedSpriteTexture(), (this.dirty = this.cachedSpriteDirty = !1);
this._cachedSprite.alpha = this.alpha;
a.Sprite.prototype._renderCanvas.call(this._cachedSprite, b);
} else {
var d = JSUTIL.GLUtil.currentParallaxDepth;
-1e5 < this.parallaxDepth && (JSUTIL.GLUtil.currentParallaxDepth = this.parallaxDepth);
var e = b.context,
f = this.worldTransform;
this.blendMode !== b.currentBlendMode && ((b.currentBlendMode = this.blendMode), (e.globalCompositeOperation = a.blendModesCanvas[b.currentBlendMode]));
this._mask && b.maskManager.pushMask(this._mask, b);
var g = 0,
k = 0;
CONFIG.CLIENTSLOTAPPLET.orientationSensorManager &&
-1e5 < JSUTIL.GLUtil.currentParallaxDepth &&
((g = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getX_0() * JSUTIL.GLUtil.currentParallaxDepth), (k = CONFIG.CLIENTSLOTAPPLET.orientationSensorManager.getY_0() * JSUTIL.GLUtil.currentParallaxDepth));
var m = b.resolution;
e.setTransform(f.a * m, f.b * m, f.c * m, f.d * m, (f.tx + g) * m, (f.ty + k) * m);
a.CanvasGraphics.renderGraphics(this, e);
e = 0;
for (f = this.children.length; e < f; e++) this.children[e]._renderCanvas(b);
this._mask && b.maskManager.popMask(b);
JSUTIL.GLUtil.currentParallaxDepth = d;
}
};
a.Graphics.prototype.getBounds = function (b) {
if (this.isMask) return a.EmptyRectangle;
this.dirty && (this.updateLocalBounds(), (this.cachedSpriteDirty = this.webGLDirty = !0), (this.dirty = !1));
var d = this._localBounds,
e = d.x,
f = d.width + d.x,
g = d.y,
k = d.height + d.y;
b = b || this.worldTransform;
var m = b.a,
n = b.b,
p = b.c,
q = b.d,
r = b.tx,
t = b.ty,
u = m * f + p * k + r,
d = q * k + n * f + t;
b = m * e + p * k + r;
var k = q * k + n * e + t,
B = m * e + p * g + r,
e = q * g + n * e + t,
m = m * f + p * g + r,
f = q * g + n * f + t,
g = u,
n = d,
u = b < u ? b : u,
u = B < u ? B : u,
u = m < u ? m : u,
d = k < d ? k : d,
d = e < d ? e : d,
d = f < d ? f : d,
g = b > g ? b : g,
g = B > g ? B : g,
n = k > n ? k : n,
n = e > n ? e : n;
this._bounds.x = u;
this._bounds.width = (m > g ? m : g) - u;
this._bounds.y = d;
this._bounds.height = (f > n ? f : n) - d;
return this._bounds;
};
a.Graphics.prototype.updateLocalBounds = function () {
var b = Infinity,
d = -Infinity,
e = Infinity,
f = -Infinity;
if (this.graphicsData.length)
for (var g, k, m, n, p, q = 0; q < this.graphicsData.length; q++)
if (((m = this.graphicsData[q]), (k = m.type), (p = m.lineWidth), (g = m.shape), k === a.Graphics.RECT || k === a.Graphics.RREC))
(k = g.x - p / 2), (m = g.y - p / 2), (n = g.width + p), (p = g.height + p), (b = k < b ? k : b), (d = k + n > d ? k + n : d), (e = m < e ? m : e), (f = m + p > f ? m + p : f);
else if (k === a.Graphics.CIRC) (k = g.x), (m = g.y), (n = g.radius + p / 2), (p = g.radius + p / 2), (b = k - n < b ? k - n : b), (d = k + n > d ? k + n : d), (e = m - p < e ? m - p : e), (f = m + p > f ? m + p : f);
else if (k === a.Graphics.ELIP) (k = g.x), (m = g.y), (n = g.width + p / 2), (p = g.height + p / 2), (b = k - n < b ? k - n : b), (d = k + n > d ? k + n : d), (e = m - p < e ? m - p : e), (f = m + p > f ? m + p : f);
else for (g = g.points, n = 0; n < g.length; n += 2) (k = g[n]), (m = g[n + 1]), (b = k - p < b ? k - p : b), (d = k + p > d ? k + p : d), (e = m - p < e ? m - p : e), (f = m + p > f ? m + p : f);
else f = e = d = b = 0;
q = this.boundsPadding;
this._localBounds.x = b - q;
this._localBounds.width = d - b + 2 * q;
this._localBounds.y = e - q;
this._localBounds.height = f - e + 2 * q;
};
a.Graphics.prototype._generateCachedSprite = function () {
var b = this.getLocalBounds(),
d = Math.ceil(b.width),
e = Math.ceil(b.height);
if (this._cachedSprite) this._cachedSprite.buffer.resize(d, e);
else {
var f = new a.CanvasBuffer(d, e),
g = a.Texture.fromCanvas(f.canvas);
this._cachedSprite = new a.Sprite(g);
this._cachedSprite.buffer = f;
this._cachedSprite.worldTransform = this.worldTransform;
}
this._cachedSprite.anchor.x = -(b.x / d);
this._cachedSprite.anchor.y = -(b.y / e);
this._cachedSprite.buffer.context.translate(-b.x, -b.y);
b = this.worldAlpha;
this.worldAlpha = 1;
a.CanvasGraphics.renderGraphics(this, this._cachedSprite.buffer.context);
this.worldAlpha = b;
this._cachedSprite.alpha = this.alpha;
};
a.Graphics.prototype.updateCachedSpriteTexture = function () {
var a = this._cachedSprite,
d = a.texture,
e = a.buffer.canvas;
d.baseTexture.width = e.width;
d.baseTexture.height = e.height;
d.crop.width = d.frame.width = e.width;
d.crop.height = d.frame.height = e.height;
a._width = e.width;
a._height = e.height;
d.baseTexture.dirty();
};
a.Graphics.prototype.destroyCachedSprite = function () {
this._cachedSprite.texture.destroy(!0);
this._cachedSprite = null;
};
a.Graphics.prototype.drawShape = function (b) {
this.currentPath && 2 >= this.currentPath.shape.points.length && this.graphicsData.pop();
this.currentPath = null;
b = new a.GraphicsData(this.lineWidth, this.lineColor, this.lineAlpha, this.fillColor, this.fillAlpha, this.filling, b);
this.graphicsData.push(b);
b.type === a.Graphics.POLY && ((b.shape.closed = this.filling), (this.currentPath = b));
this.dirty = !0;
return b;
};
a.GraphicsData = function (a, d, e, f, g, k, m) {
this.lineWidth = a;
this.lineColor = d;
this.lineAlpha = e;
this.fillColor = f;
this.fillAlpha = g;
this.fill = k;
this.shape = m;
this.type = m.type;
};
a.Graphics.POLY = 0;
a.Graphics.RECT = 1;
a.Graphics.CIRC = 2;
a.Graphics.ELIP = 3;
a.Graphics.RREC = 4;
a.Graphics.MRECT = 150;
a.Polygon.prototype.type = a.Graphics.POLY;
a.Rectangle.prototype.type = a.Graphics.RECT;
a.Circle.prototype.type = a.Graphics.CIRC;
a.RoundedRectangle.prototype.type = a.Graphics.RREC;
a.MultiRectangle.prototype.type = a.Graphics.MREC;
a.Strip = function (b) {
a.DisplayObjectContainer.call(this);
this.texture = b;
this.uvs = new a.Float32Array([0, 1, 1, 1, 1, 0, 0, 1]);
this.verticies = new a.Float32Array([0, 0, 100, 0, 100, 100, 0, 100]);
this.colors = new a.Float32Array([1, 1, 1, 1]);
this.indices = new a.Uint16Array([0, 1, 2, 3]);
this.dirty = !0;
this.blendMode = a.blendModes.NORMAL;
this.padding = 0;
};
a.Strip.prototype = Object.create(a.DisplayObjectContainer.prototype);
a.Strip.prototype.constructor = a.Strip;
a.Strip.prototype._renderWebGL = function (a) {
!this.visible || 0 >= this.alpha || (a.spriteBatch.stop(), this._vertexBuffer || this._initWebGL(a), a.shaderManager.setShader(a.shaderManager.stripShader), this._renderStrip(a), a.spriteBatch.start());
};
a.Strip.prototype._initWebGL = function (a) {
a = a.gl;
this._vertexBuffer = a.createBuffer();
this._indexBuffer = a.createBuffer();
this._uvBuffer = a.createBuffer();
this._colorBuffer = a.createBuffer();
a.bindBuffer(a.ARRAY_BUFFER, this._vertexBuffer);
a.bufferData(a.ARRAY_BUFFER, this.verticies, a.DYNAMIC_DRAW);
a.bindBuffer(a.ARRAY_BUFFER, this._uvBuffer);
a.bufferData(a.ARRAY_BUFFER, this.uvs, a.STATIC_DRAW);
a.bindBuffer(a.ARRAY_BUFFER, this._colorBuffer);
a.bufferData(a.ARRAY_BUFFER, this.colors, a.STATIC_DRAW);
a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.indices, a.STATIC_DRAW);
};
a.Strip.prototype._renderStrip = function (a) {
var d = a.gl,
e = a.projection,
f = a.offset,
g = a.shaderManager.stripShader;
a.blendModeManager.setBlendMode(this.blendMode);
d.uniformMatrix3fv(g.translationMatrix, !1, this.worldTransform.toArray(!0));
d.uniform2f(g.projectionVector, e.x, -e.y);
d.uniform2f(g.offsetVector, -f.x, -f.y);
d.uniform1f(g.alpha, this.worldAlpha);
this.dirty
? ((this.dirty = !1),
d.bindBuffer(d.ARRAY_BUFFER, this._vertexBuffer),
d.bufferData(d.ARRAY_BUFFER, this.verticies, d.STATIC_DRAW),
d.vertexAttribPointer(g.aVertexPosition, 2, d.FLOAT, !1, 0, 0),
d.bindBuffer(d.ARRAY_BUFFER, this._uvBuffer),
d.bufferData(d.ARRAY_BUFFER, this.uvs, d.STATIC_DRAW),
d.vertexAttribPointer(g.aTextureCoord, 2, d.FLOAT, !1, 0, 0),
d.activeTexture(d.TEXTURE0),
this.texture.baseTexture._dirty[d.id] ? a.renderer.updateTexture(this.texture.baseTexture) : d.bindTexture(d.TEXTURE_2D, this.texture.baseTexture._glTextures[d.id]),
d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, this._indexBuffer),
d.bufferData(d.ELEMENT_ARRAY_BUFFER, this.indices, d.STATIC_DRAW))
: (d.bindBuffer(d.ARRAY_BUFFER, this._vertexBuffer),
d.bufferSubData(d.ARRAY_BUFFER, 0, this.verticies),
d.vertexAttribPointer(g.aVertexPosition, 2, d.FLOAT, !1, 0, 0),
d.bindBuffer(d.ARRAY_BUFFER, this._uvBuffer),
d.vertexAttribPointer(g.aTextureCoord, 2, d.FLOAT, !1, 0, 0),
d.activeTexture(d.TEXTURE0),
this.texture.baseTexture._dirty[d.id] ? a.renderer.updateTexture(this.texture.baseTexture) : d.bindTexture(d.TEXTURE_2D, this.texture.baseTexture._glTextures[d.id]),
d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, this._indexBuffer));
d.drawElements(d.TRIANGLE_STRIP, this.indices.length, d.UNSIGNED_SHORT, 0);
};
a.Strip.prototype._renderCanvas = function (a) {
var d = a.context,
e = this.worldTransform;
a.roundPixels ? d.setTransform(e.a, e.b, e.c, e.d, e.tx | 0, e.ty | 0) : d.setTransform(e.a, e.b, e.c, e.d, e.tx, e.ty);
a = this.verticies;
var e = this.uvs,
f = a.length / 2;
this.count++;
for (var g = 0; g < f - 2; g++) {
var k = 2 * g,
m = a[k],
n = a[k + 2],
p = a[k + 4],
q = a[k + 1],
r = a[k + 3],
t = a[k + 5];
if (0 < this.padding)
var u = (m + n + p) / 3,
B = (q + r + t) / 3,
A = m - u,
C = q - B,
E = Math.sqrt(A * A + C * C),
m = u + (A / E) * (E + 3),
q = B + (C / E) * (E + 3),
A = n - u,
C = r - B,
E = Math.sqrt(A * A + C * C),
n = u + (A / E) * (E + 3),
r = B + (C / E) * (E + 3),
A = p - u,
C = t - B,
E = Math.sqrt(A * A + C * C),
p = u + (A / E) * (E + 3),
t = B + (C / E) * (E + 3);
u = e[k] * this.texture.width;
B = e[k + 2] * this.texture.width;
A = e[k + 4] * this.texture.width;
C = e[k + 1] * this.texture.height;
E = e[k + 3] * this.texture.height;
k = e[k + 5] * this.texture.height;
d.save();
d.beginPath();
d.moveTo(m, q);
d.lineTo(n, r);
d.lineTo(p, t);
d.closePath();
d.clip();
var F = u * E + C * A + B * k - E * A - C * B - u * k;
d.transform(
(m * E + C * p + n * k - E * p - C * n - m * k) / F,
(q * E + C * t + r * k - E * t - C * r - q * k) / F,
(u * n + m * A + B * p - n * A - m * B - u * p) / F,
(u * r + q * A + B * t - r * A - q * B - u * t) / F,
(u * E * p + C * n * A + m * B * k - m * E * A - C * B * p - u * n * k) / F,
(u * E * t + C * r * A + q * B * k - q * E * A - C * B * t - u * r * k) / F
);
d.drawImage(this.texture.baseTexture.source, 0, 0);
d.restore();
}
};
a.Strip.prototype.renderStripFlat = function (a) {
var d = this.context;
a = a.verticies;
var e = a.length / 2;
this.count++;
d.beginPath();
for (var f = 1; f < e - 2; f++) {
var g = 2 * f,
k = a[g + 2],
m = a[g + 4],
n = a[g + 3],
p = a[g + 5];
d.moveTo(a[g], a[g + 1]);
d.lineTo(k, n);
d.lineTo(m, p);
}
d.fillStyle = "#FF0000";
d.fill();
d.closePath();
};
a.Strip.prototype.onTextureUpdate = function () {
this.updateFrame = !0;
};
a.TilingSprite = function (b, d, e) {
a.Sprite.call(this, b);
this._width = d || 100;
this._height = e || 100;
this.tileScale = new a.Point(1, 1);
this.tileScaleOffset = new a.Point(1, 1);
this.tilePosition = new a.Point(0, 0);
this.renderable = !0;
this.tint = 16777215;
this.blendMode = a.blendModes.NORMAL;
};
a.TilingSprite.prototype = Object.create(a.Sprite.prototype);
a.TilingSprite.prototype.constructor = a.TilingSprite;
Object.defineProperty(a.TilingSprite.prototype, "width", {
get: function () {
return this._width;
},
set: function (a) {
this._width = a;
},
});
Object.defineProperty(a.TilingSprite.prototype, "height", {
get: function () {
return this._height;
},
set: function (a) {
this._height = a;
},
});
a.TilingSprite.prototype.setTexture = function (a) {
this.texture !== a && ((this.texture = a), (this.refreshTexture = !0), (this.cachedTint = 16777215));
};
a.TilingSprite.prototype._renderWebGL = function (b) {
if (!1 !== this.visible && 0 !== this.alpha) {
var d, e;
this._mask && (b.spriteBatch.stop(), b.maskManager.pushMask(this.mask, b), b.spriteBatch.start());
this._filters && (b.spriteBatch.flush(), b.filterManager.pushFilter(this._filterBlock));
!this.tilingTexture || this.refreshTexture
? (this.generateTilingTexture(!0), this.tilingTexture && this.tilingTexture.needsUpdate && (a.updateWebGLTexture(this.tilingTexture.baseTexture, b.gl), (this.tilingTexture.needsUpdate = !1)))
: b.spriteBatch.renderTilingSprite(this);
d = 0;
for (e = this.children.length; d < e; d++) this.children[d]._renderWebGL(b);
b.spriteBatch.stop();
this._filters && b.filterManager.popFilter();
this._mask && b.maskManager.popMask(this._mask, b);
b.spriteBatch.start();
}
};
a.TilingSprite.prototype._renderCanvas = function (b) {
if (!1 !== this.visible && 0 !== this.alpha) {
var d = b.context;
this._mask && b.maskManager.pushMask(this._mask, d);
d.globalAlpha = this.worldAlpha;
var e = this.worldTransform,
f = b.resolution;
d.setTransform(e.a * f, e.c * f, e.b * f, e.d * f, e.tx * f, e.ty * f);
if (!this.__tilePattern || this.refreshTexture)
if ((this.generateTilingTexture(!1), this.tilingTexture)) this.__tilePattern = d.createPattern(this.tilingTexture.baseTexture.source, "repeat");
else return;
this.blendMode !== b.currentBlendMode && ((b.currentBlendMode = this.blendMode), (d.globalCompositeOperation = a.blendModesCanvas[b.currentBlendMode]));
e = this.tilePosition;
f = this.tileScale;
e.x %= this.tilingTexture.baseTexture.width;
e.y %= this.tilingTexture.baseTexture.height;
d.scale(f.x, f.y);
d.translate(e.x + this.anchor.x * -this._width, e.y + this.anchor.y * -this._height);
d.fillStyle = this.__tilePattern;
d.fillRect(-e.x, -e.y, this._width / f.x, this._height / f.y);
d.scale(1 / f.x, 1 / f.y);
d.translate(-e.x + this.anchor.x * this._width, -e.y + this.anchor.y * this._height);
this._mask && b.maskManager.popMask(b.context);
d = 0;
for (e = this.children.length; d < e; d++) this.children[d]._renderCanvas(b);
}
};
a.TilingSprite.prototype.getBounds = function () {
var a = this._width,
d = this._height,
e = a * (1 - this.anchor.x),
f = a * -this.anchor.x,
g = d * (1 - this.anchor.y),
k = d * -this.anchor.y,
d = this.worldTransform,
m = d.a,
n = d.b,
p = d.c,
q = d.d,
r = d.tx,
t = d.ty,
d = m * f + p * k + r,
a = q * k + n * f + t,
u = m * e + p * k + r,
k = q * k + n * e + t,
B = m * e + p * g + r,
e = q * g + n * e + t,
m = m * f + p * g + r,
f = q * g + n * f + t,
n = (g = -Infinity),
p = (q = Infinity),
q = d < q ? d : q,
q = u < q ? u : q,
q = B < q ? B : q,
q = m < q ? m : q,
p = a < p ? a : p,
p = k < p ? k : p,
p = e < p ? e : p,
p = f < p ? f : p,
g = d > g ? d : g,
g = u > g ? u : g,
g = B > g ? B : g,
n = a > n ? a : n,
n = k > n ? k : n,
n = e > n ? e : n,
d = this._bounds;
d.x = q;
d.width = (m > g ? m : g) - q;
d.y = p;
d.height = (f > n ? f : n) - p;
return (this._currentBounds = d);
};
a.TilingSprite.prototype.onTextureUpdate = function () {};
a.TilingSprite.prototype.generateTilingTexture = function (b) {
if (this.texture.baseTexture.hasLoaded) {
var d = this.originalTexture || this.texture,
e = d.frame,
f,
g,
k = e.width !== d.baseTexture.width || e.height !== d.baseTexture.height,
m = !1;
if (b) {
if (((f = a.getNextPowerOfTwo(e.width)), (g = a.getNextPowerOfTwo(e.height)), e.width !== f || e.height !== g)) m = !0;
} else k && ((f = e.width), (g = e.height), (m = !0));
m
? (this.tilingTexture && this.tilingTexture.isTiling
? ((b = this.tilingTexture.canvasBuffer), b.resize(f, g), (this.tilingTexture.baseTexture.width = f), (this.tilingTexture.baseTexture.height = g), (this.tilingTexture.needsUpdate = !0))
: ((b = new a.CanvasBuffer(f, g)), (this.tilingTexture = a.Texture.fromCanvas(b.canvas)), (this.tilingTexture.canvasBuffer = b), (this.tilingTexture.isTiling = !0)),
b.context.drawImage(d.baseTexture.source, d.crop.x, d.crop.y, d.crop.width, d.crop.height, 0, 0, f, g),
(this.tileScaleOffset.x = e.width / f),
(this.tileScaleOffset.y = e.height / g))
: (this.tilingTexture && this.tilingTexture.isTiling && this.tilingTexture.destroy(!0), (this.tileScaleOffset.x = 1), (this.tileScaleOffset.y = 1), (this.tilingTexture = d));
this.refreshTexture = !1;
this.originalTexture = this.texture;
this.texture = this.tilingTexture;
this.tilingTexture.baseTexture._powerOf2 = !0;
}
};
a.ParticleContainer = function (b, d, e, f, g, k, m, n, p) {
a.DisplayObjectContainer.call(this);
this.maxParticles = b;
this.indicesPerParticle = 6;
this.dataPerVertex = 2;
this.particlesNumber = 0;
this.colorDirty = this.uvDirty = this.alphaDirty = this.rotationDirty = this.scaleDirty = this.posDirty = this.vertexDirty = !0;
this.forceFullUpdateStart = 0;
var q = 4 * this.maxParticles * this.dataPerVertex;
b = this.maxParticles * this.indicesPerParticle;
var r = 8 * this.maxParticles,
t = 8 * this.maxParticles,
u = 8 * this.maxParticles,
B = 4 * this.maxParticles,
A = 4 * this.maxParticles,
C = 16 * this.maxParticles;
this.dynamicPosition = f;
this.dynamicScale = g;
this.dynamicRotation = k;
this.dynamicUV = m;
this.dynamicAlpha = n;
this.dynamicColor = p;
this.texture = d;
this.texture.baseTexture.useMipMapping = e;
this.uvs = new a.Float32Array(r);
for (d = 0; d < r; d += 8) (this.uvs[d] = 0), (this.uvs[d + 1] = 0), (this.uvs[d + 2] = 1), (this.uvs[d + 3] = 0), (this.uvs[d + 4] = 1), (this.uvs[d + 5] = 1), (this.uvs[d + 6] = 0), (this.uvs[d + 7] = 1);
this.verticies = new a.Float32Array(q);
for (d = 0; d < q; d += 8)
(this.verticies[d] = -0.5),
(this.verticies[d + 1] = -0.5),
(this.verticies[d + 2] = 0.5),
(this.verticies[d + 3] = -0.5),
(this.verticies[d + 4] = 0.5),
(this.verticies[d + 5] = 0.5),
(this.verticies[d + 6] = -0.5),
(this.verticies[d + 7] = 0.5);
this.indices = new a.Uint16Array(b);
for (e = d = 0; d < b; d += 6, e += 4) (this.indices[d + 0] = e + 0), (this.indices[d + 1] = e + 1), (this.indices[d + 2] = e + 2), (this.indices[d + 3] = e + 0), (this.indices[d + 4] = e + 2), (this.indices[d + 5] = e + 3);
this.positions = new a.Float32Array(t);
for (d = 0; d < t; d += 2) (this.positions[d] = 0), (this.positions[d + 1] = 0);
this.scales = new a.Float32Array(u);
for (d = 0; d < u; d += 2) (this.scales[d] = 1), (this.scales[d + 1] = 1);
this.rotations = new a.Float32Array(B);
for (d = 0; d < B; d += 4) (this.rotations[d] = 0), (this.rotations[d + 1] = 0), (this.rotations[d + 2] = 0), (this.rotations[d + 3] = 0);
this.alphas = new a.Float32Array(A);
for (d = 0; d < A; d += 4) (this.alphas[d] = 1), (this.alphas[d + 1] = 1), (this.alphas[d + 2] = 1), (this.alphas[d + 3] = 1);
this.colors = new a.Float32Array(C);
for (d = 0; d < C; d += 16)
(this.colors[d] = 1),
(this.colors[d + 1] = 1),
(this.colors[d + 2] = 1),
(this.colors[d + 3] = 1),
(this.colors[d + 4] = 1),
(this.colors[d + 5] = 1),
(this.colors[d + 6] = 1),
(this.colors[d + 7] = 1),
(this.colors[d + 8] = 1),
(this.colors[d + 9] = 1),
(this.colors[d + 10] = 1),
(this.colors[d + 11] = 1),
(this.colors[d + 12] = 1),
(this.colors[d + 13] = 1),
(this.colors[d + 14] = 1),
(this.colors[d + 15] = 1);
this.blendMode = a.blendModes.NORMAL;
this.isDirty = this.dirty = !0;
};
a.ParticleContainer.prototype = Object.create(a.DisplayObjectContainer.prototype);
a.ParticleContainer.prototype.constructor = a.ParticleContainer;
a.ParticleContainer.prototype.applyChanges = function (a) {
this.isDirty = !1;
this.particlesNumber = Math.min(a.size_0(), this.maxParticles);
for (var d = a.getFirstElement_0(), e = 0; e < this.particlesNumber; ++e) {
0 < e && (d = a.getNextElement_1(d));
d.isForceFullUpdateStart_0() && (d.setForceFullUpdateStart_1(!1), (this.forceFullUpdateStart = e));
var f = -1 < this.forceFullUpdateStart && e >= this.forceFullUpdateStart;
if (f || d.isDirty_0()) {
d.isDirty_0() && d.resetDirty_0();
if (d.isRotationDirty_0() || f) {
d.resetRotationDirty_0();
var g = 4 * e,
k = -d.getRotation_0();
this.rotations[g] = k;
this.rotations[g + 1] = k;
this.rotations[g + 2] = k;
this.rotations[g + 3] = k;
this.rotationDirty || (this.rotationDirty = !0);
}
if (d.isAlphaDirty_0() || f)
d.resetAlphaDirty_0(), (g = 4 * e), (k = d.getAlpha_0()), (this.alphas[g] = k), (this.alphas[g + 1] = k), (this.alphas[g + 2] = k), (this.alphas[g + 3] = k), this.alphaDirty || (this.alphaDirty = !0);
if (d.isSizeDirty_0() || d.isAnchorDirty_0() || f) {
d.resetSizeDirty_0();
d.resetAnchorDirty_0();
var g = 8 * e,
k = d.getWidth_0() * CONFIG.SCALINGFACTOR,
m = d.getHeight_0() * CONFIG.SCALINGFACTOR,
n = d.getAnchorX_0(),
p = d.getAnchorY_0();
this.verticies[g] = -k * n;
this.verticies[g + 1] = -m * p;
this.verticies[g + 2] = k * (1 - n);
this.verticies[g + 3] = -m * p;
this.verticies[g + 4] = k * (1 - n);
this.verticies[g + 5] = m * (1 - p);
this.verticies[g + 6] = -k * n;
this.verticies[g + 7] = m * (1 - p);
this.vertexDirty || (this.vertexDirty = !0);
}
if (d.isScaleDirty_0() || f)
d.resetScaleDirty_0(),
(g = 8 * e),
(k = d.getScaleX_0()),
(m = d.getScaleY_0()),
(this.scales[g] = k),
(this.scales[g + 1] = m),
(this.scales[g + 2] = k),
(this.scales[g + 3] = m),
(this.scales[g + 4] = k),
(this.scales[g + 5] = m),
(this.scales[g + 6] = k),
(this.scales[g + 7] = m),
this.scaleDirty || (this.scaleDirty = !0);
if (d.isPosDirty_0() || f)
d.resetPosDirty_0(),
(g = 8 * e),
(k = d.getX_0() * CONFIG.SCALINGFACTOR),
(m = d.getY_0() * CONFIG.SCALINGFACTOR),
(this.positions[g] = k),
(this.positions[g + 1] = m),
(this.positions[g + 2] = k),
(this.positions[g + 3] = m),
(this.positions[g + 4] = k),
(this.positions[g + 5] = m),
(this.positions[g + 6] = k),
(this.positions[g + 7] = m),
this.posDirty || (this.posDirty = !0);
if (d.isUVDirty_0() || f)
d.resetUVDirty_0(),
(g = 8 * e),
(this.uvs[g] = d.getU0_0()),
(this.uvs[g + 1] = d.getV0_0()),
(this.uvs[g + 2] = d.getU1_0()),
(this.uvs[g + 3] = d.getV1_0()),
(this.uvs[g + 4] = d.getU2_0()),
(this.uvs[g + 5] = d.getV2_0()),
(this.uvs[g + 6] = d.getU3_0()),
(this.uvs[g + 7] = d.getV3_0()),
this.uvDirty || (this.uvDirty = !0);
if (d.isColorDirty_0() || f)
d.resetColorDirty_0(),
(f = d.getColorR_0()),
(k = d.getColorG_0()),
(m = d.getColorB_0()),
(n = d.getColorA_0()),
(g = 16 * e),
(this.colors[g] = f),
(this.colors[g + 1] = k),
(this.colors[g + 2] = m),
(this.colors[g + 3] = n),
(this.colors[g + 4] = f),
(this.colors[g + 5] = k),
(this.colors[g + 6] = m),
(this.colors[g + 7] = n),
(this.colors[g + 8] = f),
(this.colors[g + 9] = k),
(this.colors[g + 10] = m),
(this.colors[g + 11] = n),
(this.colors[g + 12] = f),
(this.colors[g + 13] = k),
(this.colors[g + 14] = m),
(this.colors[g + 15] = n),
this.colorDirty || (this.colorDirty = !0);
}
}
this.forceFullUpdateStart = -1;
};
a.ParticleContainer.prototype.setAlphaBlendMode = function (b) {
this.blendMode =
b === GT1323.prototype.ADD
? a.blendModes.ADD
: b === GT1323.prototype.ADD_INTENSIVE
? a.blendModes.ADD_INTENSIVE
: b === GT1323.prototype.MULTIPLY
? a.blendModes.MULTIPLY
: b === GT1323.prototype.SCREEN
? a.blendModes.SCREEN
: a.blendModes.NORMAL;
};
a.ParticleContainer.prototype._renderWebGL = function (a) {
!this.visible || 0 >= this.worldalpha || (a.spriteBatch.stop(), this._vertexBuffer || this._initWebGL(a), a.shaderManager.setShader(a.shaderManager.particleContainerShader), this._renderParticles(a), a.spriteBatch.start());
};
a.ParticleContainer.prototype._initWebGL = function (a) {
a = a.gl;
this._indexBuffer = a.createBuffer();
this._vertexBuffer = a.createBuffer();
this._uvBuffer = a.createBuffer();
this._positionBuffer = a.createBuffer();
this._scaleBuffer = a.createBuffer();
this._rotationBuffer = a.createBuffer();
this._alphaBuffer = a.createBuffer();
this._colorBuffer = a.createBuffer();
this._vertexBuffer_drawMode = this._indexBuffer_drawMode = a.STATIC_DRAW;
this._uvBuffer_drawMode = this.dynamicUV ? a.STREAM_DRAW : a.STATIC_DRAW;
this._positionBuffer_drawMode = this.dynamicPosition ? a.STREAM_DRAW : a.STATIC_DRAW;
this._scaleBuffer_drawMode = this.dynamicScale ? a.STREAM_DRAW : a.STATIC_DRAW;
this._rotationBuffer_drawMode = this.dynamicRotation ? a.STREAM_DRAW : a.STATIC_DRAW;
this._alphaBuffer_drawMode = this.dynamicAlpha ? a.STREAM_DRAW : a.STATIC_DRAW;
this._colorBuffer_drawMode = this.dynamicColor ? a.STREAM_DRAW : a.STATIC_DRAW;
a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.indices, this._indexBuffer_drawMode);
a.bindBuffer(a.ARRAY_BUFFER, this._vertexBuffer);
a.bufferData(a.ARRAY_BUFFER, this.verticies, this._vertexBuffer_drawMode);
a.bindBuffer(a.ARRAY_BUFFER, this._uvBuffer);
a.bufferData(a.ARRAY_BUFFER, this.uvs, this._uvBuffer_drawMode);
a.bindBuffer(a.ARRAY_BUFFER, this._positionBuffer);
a.bufferData(a.ARRAY_BUFFER, this.positions, this._positionBuffer_drawMode);
a.bindBuffer(a.ARRAY_BUFFER, this._scaleBuffer);
a.bufferData(a.ARRAY_BUFFER, this.scales, this._scaleBuffer_drawMode);
a.bindBuffer(a.ARRAY_BUFFER, this._rotationBuffer);
a.bufferData(a.ARRAY_BUFFER, this.rotations, this._rotationBuffer_drawMode);
a.bindBuffer(a.ARRAY_BUFFER, this._alphaBuffer);
a.bufferData(a.ARRAY_BUFFER, this.alphas, this._alphaBuffer_drawMode);
a.bindBuffer(a.ARRAY_BUFFER, this._colorBuffer);
a.bufferData(a.ARRAY_BUFFER, this.colors, this._colorBuffer_drawMode);
};
a.ParticleContainer.prototype._renderParticles = function (a) {
if (this.particles && !(1 > this.particles.size_0())) {
this.isDirty && this.applyChanges(this.particles);
var d = a.gl,
e = a.projection,
f = a.offset,
g = a.shaderManager.particleContainerShader;
a.blendModeManager.setBlendMode(this.blendMode);
d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
this.dirty && ((this.dirty = !1), this.parent.getBounds(), d.bufferSubData(d.ARRAY_BUFFER, 0, this.indices));
d.uniformMatrix3fv(g.translationMatrix, !1, this.worldTransform.toArray(!0));
d.uniform2f(g.projectionVector, e.x, -e.y);
d.uniform2f(g.offsetVector, -f.x, -f.y);
d.uniform1f(g.worldalpha, this.worldAlpha);
this.clippingEnabled
? d.uniform4f(g.clipRect, this.parent.worldTransform.tx, this.parent.worldTransform.ty, this.parent.worldTransform.tx + this.parent.width, this.parent.worldTransform.ty + this.parent.height)
: d.uniform4f(g.clipRect, 0, 0, 0, 0);
this.gt_colormatrix
? (d.uniformMatrix4fv(g.colorMatrix, !1, this.gt_colormatrix), d.uniform1f(g.hasColorMatrix, 1))
: this.parent.gt_colormatrix
? (d.uniformMatrix4fv(g.colorMatrix, !1, this.parent.gt_colormatrix), d.uniform1f(g.hasColorMatrix, 1))
: d.uniform1f(g.hasColorMatrix, 0);
d.bindBuffer(d.ARRAY_BUFFER, this._rotationBuffer);
this.rotationDirty && ((this.rotationDirty = !1), d.bufferSubData(d.ARRAY_BUFFER, 0, this.rotations));
d.vertexAttribPointer(g.aRotation, 1, d.FLOAT, !1, 0, 0);
d.bindBuffer(d.ARRAY_BUFFER, this._scaleBuffer);
this.scaleDirty && ((this.scaleDirty = !1), d.bufferSubData(d.ARRAY_BUFFER, 0, this.scales));
d.vertexAttribPointer(g.aScale, 2, d.FLOAT, !1, 0, 0);
d.bindBuffer(d.ARRAY_BUFFER, this._alphaBuffer);
this.alphaDirty && ((this.alphaDirty = !1), d.bufferSubData(d.ARRAY_BUFFER, 0, this.alphas));
d.vertexAttribPointer(g.aAlpha, 1, d.FLOAT, !1, 0, 0);
d.bindBuffer(d.ARRAY_BUFFER, this._positionBuffer);
this.posDirty && ((this.posDirty = !1), d.bufferSubData(d.ARRAY_BUFFER, 0, this.positions));
d.vertexAttribPointer(g.aPositionCoord, 2, d.FLOAT, !1, 0, 0);
d.bindBuffer(d.ARRAY_BUFFER, this._colorBuffer);
this.colorDirty && ((this.colorDirty = !1), d.bufferSubData(d.ARRAY_BUFFER, 0, this.colors));
d.vertexAttribPointer(g.aColor, 4, d.FLOAT, !1, 0, 0);
d.bindBuffer(d.ARRAY_BUFFER, this._uvBuffer);
this.uvDirty && ((this.uvDirty = !1), d.bufferSubData(d.ARRAY_BUFFER, 0, this.uvs));
d.vertexAttribPointer(g.aTextureCoord, 2, d.FLOAT, !1, 0, 0);
d.bindBuffer(d.ARRAY_BUFFER, this._vertexBuffer);
d.bufferSubData(d.ARRAY_BUFFER, 0, this.verticies);
d.vertexAttribPointer(g.aVertexPosition, 2, d.FLOAT, !1, 0, 0);
d.activeTexture(d.TEXTURE0);
this.texture.baseTexture._dirty[d.id] ? a.renderer.updateTexture(this.texture.baseTexture) : d.bindTexture(d.TEXTURE_2D, this.texture.baseTexture._glTextures[d.id]);
d.drawElements(d.TRIANGLES, this.particlesNumber * this.indicesPerParticle, d.UNSIGNED_SHORT, 0);
}
};
a.ParticleContainer.prototype._renderCanvas = function (b) {
if (this.particles && !(1 > this.particles.size_0())) {
this.isDirty && this.applyChanges(this.particles);
var d = b.context,
e = this.worldTransform;
d.setTransform(e.a, e.b, e.c, e.d, e.tx, e.ty);
this.clippingEnabled && (d.save(), d.beginPath(), d.rect(0, 0, this.parent.width, this.parent.height), d.closePath(), d.clip());
this.blendMode !== b.currentBlendMode && ((b.currentBlendMode = this.blendMode), (b.context.globalCompositeOperation = a.blendModesCanvas[b.currentBlendMode]));
b = !0;
for (var f = this.verticies, g = this.uvs, k = 0; k < this.particlesNumber; k++) {
var m = 4 * k,
n = 2 * m;
if (0 != this.worldAlpha && 0 != this.alphas[m]) {
var p = f[n],
q = f[n + 4],
r = f[n + 1],
t = f[n + 5],
u = g[n + 4] < g[n],
B = (u ? g[n + 4] : g[n]) * this.texture.width,
A = g[n + 5] < g[n + 1],
C = (A ? g[n + 5] : g[n + 1]) * this.texture.height,
E = (u ? g[n] : g[n + 4]) * this.texture.width - B,
F = (A ? g[n + 1] : g[n + 5]) * this.texture.height - C,
D = Math.abs(q - p) * this.scales[n],
H = Math.abs(t - r) * this.scales[n + 1],
p = Math.abs(p / Math.abs(q - p)),
r = Math.abs(r / Math.abs(t - r)),
q = this.rotations[m],
t = this.positions[n],
n = this.positions[n + 1];
d.globalAlpha = this.worldAlpha * this.alphas[m];
0 === q % (2 * Math.PI)
? b && ((b = !1), d.setTransform(e.a, e.b, e.c, e.d, e.tx, e.ty))
: (b || (b = !0), (m = Math.cos(q)), (q = Math.sin(q)), d.setTransform(e.a, e.b, e.c, e.d, e.tx, e.ty), d.transform(m, q, -q, m, t, n), (n = t = 0));
d.scale(u ? -1 : 1, A ? -1 : 1);
d.drawImage(this.texture.baseTexture.source, B, C, E, F, (u ? -t : t) - D * (u ? -p + 1 : p), (A ? -n : n) - H * (A ? -r + 1 : r), D, H);
d.scale(u ? -1 : 1, A ? -1 : 1);
}
}
this.clippingEnabled && d.restore();
d.globalAlpha = this.worldAlpha;
}
};
a.ParticleContainer.prototype.onTextureUpdate = function () {
this.updateFrame = !0;
};
a.GreentubeSpine = function () {
a.DisplayObjectContainer.call(this);
this.size = 2048;
this.maxVerts = 8 * this.size;
this.maxIndices = 6 * this.size;
this.vertSize = 8;
this.stride = 4 * this.vertSize;
this.vertexPositionIndex = 0;
this.vertexColorIndex = 8;
this.vertexTextureCoordIndex = 24;
this.vertices = new a.Float32Array(this.maxVerts);
this.indices = new a.Uint16Array(this.maxIndices);
this.numIndices = this.numVertices = 0;
this.webGLTexture = null;
this.verticesDoubleArray = new GT1176(this.maxVerts);
this.clipper = new GT803();
this.tempVector = new GT1370();
this.tempVector2 = new GT1370();
this.tempColor1 = new GT1477();
this.tempColor2 = new GT1477();
this.tempColor3 = new GT1477();
this.tempColor4 = new GT1477();
this.vertexEffect = null;
this.premultipliedAlpha = !1;
this.dirty = !0;
};
a.GreentubeSpine.prototype = Object.create(a.DisplayObjectContainer.prototype);
a.GreentubeSpine.prototype.constructor = a.GreentubeSpine;
a.GreentubeSpine.prototype.applyChanges = function (a) {
var d = this._nativeSpinePlayer,
e = d.getSkeleton_0(),
f = !1;
d.isHorizontallyFlipped_0() != e.getFlipX_0() && (e.setFlipX_1(d.isHorizontallyFlipped_0()), (f = !0));
d.isVerticallyFlipped_0() != e.getFlipY_0() && (e.setFlipY_1(d.isVerticallyFlipped_0()), (f = !0));
f && e.updateWorldTransform_0();
this.drawPolygonSpriteBatch(a, e);
};
a.GreentubeSpine.prototype.drawPolygonSpriteBatch = function (b, d) {
var e = this._nativeSpinePlayer.getOpenGLAlpha_0(),
f = new GT1477(),
g = this.tempVector,
k = this.tempVector2,
m = this.tempColor1,
n = this.tempColor2,
p = this.tempColor3,
q = this.tempColor4,
r = this.vertexEffect;
null != r && r.begin_1(d);
for (
var t = this.premultipliedAlpha,
u = null,
B = 0,
A = null,
C = null,
E = null,
F = null,
D = d.getColor_0(),
H = D.getRed_0(),
I = D.getGreen_0(),
L = D.getBlue_0(),
D = D.getAlpha_0(),
J = d.getDrawOrder_0(),
M = 0,
N = J.size;
M < N;
M++
) {
var P = J.get_1(M),
O = null,
K = this.clipper.isClipping_0() ? 2 : this.vertSize,
Q = P.getAttachment_0();
if (instanceOf(Q, GT500))
(F = Q), (B = K << 2), (A = this.verticesDoubleArray.items), F.computeWorldVertices_4(P.getBone_0(), A, 0, K), (E = [0, 1, 2, 2, 3, 0]), (O = F.getRegion_0().getTexture_0()), (C = F.getUVs_0()), (F = F.getColor_0());
else if (instanceOf(Q, GT595))
(F = Q),
(C = F.getWorldVerticesLength_0()),
(B = (C >> 1) * K),
(A = this.verticesDoubleArray.setSize_1(B)),
F.computeWorldVertices_6(P, 0, C, A, 0, K),
(E = F.getTriangles_0()),
(O = F.getRegion_0().getTexture_0()),
(C = F.getUVs_0()),
(F = F.getColor_0());
else if (instanceOf(Q, GT403)) {
this.clipper.clipStart_2(P, Q);
continue;
} else instanceOf(Q, GT404) && ((K = Q.getSkeleton_0()), null != K && this.drawPolygonSpriteBatch(b, K));
if (null != O) {
var S = P.getColor_0(),
T = D * S.getAlpha_0() * F.getAlpha_0() * 255,
R = t ? T : 255,
K = P.getData_0().getBlendMode_0();
K != u &&
(K == GT1478.prototype.additive && t && ((K = GT1478.prototype.normal), (T = 0)),
(u = K),
(K = u.name_0()),
(K = K.equals_1("additive") ? a.blendModes.ADD : K.equals_1("multiply") ? a.blendModes.MULTIPLY : a.blendModes.NORMAL),
this.appliedBlendingMode != K && (this._flush(b), this._setAlphaBlendMode(b, K, !1)));
K = (H * S.getRed_0() * F.getRed_0() * R) / 255;
Q = (I * S.getGreen_0() * F.getGreen_0() * R) / 255;
S = (L * S.getBlue_0() * F.getBlue_0() * R) / 255;
T /= 255;
if (this.clipper.isClipping_0()) {
this.clipper.clipTriangles_9(A, B, E, E.length, C, K, Q, S, T);
var R = this.clipper.getClippedVertices_0(),
V = this.clipper.getClippedTriangles_0();
null != r && this.applyVertexEffect(R.items, R.size, this.vertSize, K, Q, S, T, 0, 0, 0, 0);
f.set_4(K, Q, S, T);
this.webGLTexture && this.webGLTexture != O.texture && this._flush(b);
this.webGLTexture = O.texture;
this.drawSpinePolygon(R.items, V.items, V.size, Math.div(R.size, this.vertSize), e);
} else {
if (null != r)
for (p.set_4(K, Q, S, T), q.set_4(0, 0, 0, 0), V = R = 0; R < B; R += this.vertSize, V += 2)
(g.x = A[R]),
(g.y = A[R + 1]),
m.set_1(p),
n.set_1(q),
(k.x = C[V]),
(k.y = C[V + 1]),
r.transform_4(g, k, m, n),
(A[R] = g.x),
(A[R + 1] = g.y),
(A[R + 2] = m.getRed_0()),
(A[R + 3] = m.getGreen_0()),
(A[R + 4] = m.getBlue_0()),
(A[R + 5] = m.getAlpha_0()),
(A[R + 6] = k.x),
(A[R + 7] = k.y);
else for (R = 2, V = 0; R < B; R += this.vertSize, V += 2) (A[R] = K), (A[R + 1] = Q), (A[R + 2] = S), (A[R + 3] = T), (A[R + 4] = C[V]), (A[R + 5] = C[V + 1]);
this.webGLTexture && this.webGLTexture != O.texture && this._flush(b);
this.webGLTexture = O.texture;
this.drawSpinePolygon(A, E, E.length, Math.div(B, this.vertSize), e);
}
}
this.clipper.clipEnd_1(P);
}
this.clipper.clipEnd_0();
null != r && r.end_0();
};
a.GreentubeSpine.prototype.applyVertexEffect = function (a, d, e, f, g, k, m, n, p, q, r) {
var t = this.tempVector,
u = this.tempVector2,
B = this.tempColor1,
A = this.tempColor2,
C = this.tempColor3,
E = this.tempColor4,
F = this.vertexEffect;
this.tempColor3.set_4(f, g, k, m);
E.set_4(n, p, q, r);
for (f = 0; f < d; f += e)
(t.x = a[f]),
(t.y = a[f + 1]),
(u.x = a[f + 3]),
(u.y = a[f + 4]),
B.set_1(C),
A.set_1(E),
F.transform_4(t, u, B, A),
(a[f] = t.x),
(a[f + 1] = t.y),
(a[f + 2] = B.getRed_0()),
(a[f + 3] = B.getGreen_0()),
(a[f + 4] = B.getBlue_0()),
(a[f + 5] = B.getAlpha_0()),
(a[f + 6] = u.x),
(a[f + 7] = u.y);
};
a.GreentubeSpine.prototype.drawSpinePolygon = function (a, d, e, f, g) {
if (d && !(2 > f)) {
(this.maxVerts - this.numVertices < f * this.vertSize || this.maxIndices - this.numIndices < e) && this._flush();
for (
var k = this._nativeSpinePlayer.getContentX_0(),
m = this._nativeSpinePlayer.getContentY_0(),
n = this._nativeSpinePlayer.getScaleX_0(),
p = this._nativeSpinePlayer.getScaleY_0(),
q = this.numVertices * this.vertSize,
r = 0,
t = 0;
t < f;
++t
)
(this.vertices[q++] = (a[r++] * n + k) * CONFIG.SCALINGFACTOR),
(this.vertices[q++] = (a[r++] * p + m) * CONFIG.SCALINGFACTOR),
(this.vertices[q++] = a[r++]),
(this.vertices[q++] = a[r++]),
(this.vertices[q++] = a[r++]),
(this.vertices[q++] = a[r++] * g),
(this.vertices[q++] = a[r++]),
(this.vertices[q++] = a[r++]);
r = this.numIndices;
for (t = 0; t < e; ++t) this.indices[r++] = this.numVertices + d[t];
this.numVertices += f;
this.numIndices += e;
}
};
a.GreentubeSpine.prototype._setAlphaBlendMode = function (a, d, e) {
if (this.appliedBlendingMode !== d || e) (this.appliedBlendingMode = d), a.blendModeManager.setBlendMode(d);
};
a.GreentubeSpine.prototype._initWebGL = function (a) {
a = this.gl = a.gl;
this._indexBuffer = a.createBuffer();
this._vertexBuffer = a.createBuffer();
a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.indices, a.DYNAMIC_DRAW);
a.bindBuffer(a.ARRAY_BUFFER, this._vertexBuffer);
a.bufferData(a.ARRAY_BUFFER, this.vertices, a.DYNAMIC_DRAW);
};
a.GreentubeSpine.prototype._updateUniforms = function (a) {
var d = a.gl,
e = a.shaderManager.polygonShader;
d.uniformMatrix3fv(e.translationMatrix, !1, this.worldTransform.toArray(!0));
d.uniform2f(e.projectionVector, a.projection.x, -a.projection.y);
d.uniform2f(e.offsetVector, -a.offset.x, -a.offset.y);
d.uniform1f(e.worldalpha, this.worldAlpha);
var f = this.parent,
g = f.parent,
k = g.worldTransform.tx,
m = g.worldTransform.ty,
n = f.worldTransform.tx,
p = f.worldTransform.ty;
a = Math.max(n, k);
var q = Math.max(p, m),
k = Math.min(n + f.width * f.worldTransform.a, k + g.width * g.worldTransform.a),
f = Math.min(p + f.height * f.worldTransform.d, m + g.height * g.worldTransform.d);
d.uniform4f(e.clipRect, a, q, k, f);
this.gt_colormatrix
? (d.uniformMatrix4fv(e.colorMatrix, !1, this.gt_colormatrix), d.uniform1f(e.hasColorMatrix, 1))
: this.parent.gt_colormatrix
? (d.uniformMatrix4fv(e.colorMatrix, !1, this.parent.gt_colormatrix), d.uniform1f(e.hasColorMatrix, 1))
: d.uniform1f(e.hasColorMatrix, 0);
};
a.GreentubeSpine.prototype._flush = function (a) {
var d = a.gl,
e = a.shaderManager.polygonShader;
this.dirty
? (d.bindBuffer(d.ARRAY_BUFFER, this._vertexBuffer),
d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, this._indexBuffer),
d.vertexAttribPointer(e.aVertexPosition, 2, d.FLOAT, !1, this.stride, this.vertexPositionIndex),
d.vertexAttribPointer(e.aColor, 4, d.FLOAT, !1, this.stride, this.vertexColorIndex),
d.vertexAttribPointer(e.aTextureCoord, 2, d.FLOAT, !1, this.stride, this.vertexTextureCoordIndex),
"1" == CONFIG.webgluploadsubarray
? ((e = this.vertices.subarray(0, this.numVertices * this.vertSize)), d.bufferSubData(d.ARRAY_BUFFER, 0, e), (e = this.indices.subarray(0, this.numIndices)), d.bufferSubData(d.ELEMENT_ARRAY_BUFFER, 0, e))
: (d.bufferSubData(d.ARRAY_BUFFER, 0, this.vertices), d.bufferSubData(d.ELEMENT_ARRAY_BUFFER, 0, this.indices)))
: d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
d.activeTexture(d.TEXTURE0);
this.webGLTexture.baseTexture._dirty[d.id] ? a.renderer.updateTexture(this.webGLTexture.baseTexture) : d.bindTexture(d.TEXTURE_2D, this.webGLTexture.baseTexture._glTextures[d.id]);
d.drawElements(d.TRIANGLES, this.numIndices, d.UNSIGNED_SHORT, 0);
this.numIndices = this.numVertices = 0;
};
a.GreentubeSpine.prototype._renderWebGL = function (b) {
!this.visible ||
!this._nativeSpinePlayer.canRenderer_0() ||
0 >= this.worldalpha ||
(b.spriteBatch.stop(),
this._vertexBuffer || this._initWebGL(b),
b.shaderManager.setShader(b.shaderManager.polygonShader),
this._setAlphaBlendMode(b, a.blendModes.NORMAL, !0),
this._updateUniforms(b),
this.dirty && this.applyChanges(b),
this._flush(b),
b.spriteBatch.start());
};
a.GreentubeSpine.prototype._renderCanvas = function (a) {};
a.GreentubeSpine.prototype.destroy = function () {
this.indices = this.vertices = null;
this.gl && (this.gl.deleteBuffer(this._vertexBuffer), this.gl.deleteBuffer(this._indexBuffer), (this.gl = null));
};
a.GreentubeSpine.prototype.onTextureUpdate = function () {
this.updateFrame = !0;
};
a.BaseTextureCache = {};
a.BaseTextureCacheIdGenerator = 0;
a.BaseTexture = function (b, d) {
this.resolution = 1;
this.height = this.width = 100;
this.scaleMode = d || a.scaleModes.DEFAULT;
this.hasLoaded = !1;
this.source = b;
this._UID = a._UID++;
this.premultipliedAlpha = !1;
this._glTextures = [];
this._dirty = [!0, !0, !0, !0];
if (b) {
if ((this.source.complete || this.source.getContext) && this.source.width && this.source.height)
(this.hasLoaded = !0), (this.width = this.source.naturalWidth || this.source.width), (this.height = this.source.naturalHeight || this.source.height), this.dirty();
else {
var e = this;
this.source.onload = function () {
e.hasLoaded = !0;
e.width = e.source.naturalWidth || e.source.width;
e.height = e.source.naturalHeight || e.source.height;
e.dirty();
e.dispatchEvent({ type: "loaded", content: e });
};
this.source.onerror = function () {
e.source && e.dispatchEvent({ type: "error", content: e });
};
}
this.imageUrl = null;
this._powerOf2 = !1;
}
};
a.BaseTexture.prototype.constructor = a.BaseTexture;
a.EventTarget.mixin(a.BaseTexture.prototype);
a.BaseTexture.prototype.destroy = function () {
this.imageUrl
? (delete a.BaseTextureCache[this.imageUrl], delete a.TextureCache[this.imageUrl], (this.imageUrl = null), navigator.isCocoonJS || (this.source.src = ""))
: this.source && this.source._pixiId && delete a.BaseTextureCache[this.source._pixiId];
this.source = null;
this.unloadFromGPU();
};
a.BaseTexture.prototype.updateSourceImage = function (a) {
this.hasLoaded = !1;
this.source.src = null;
this.source.src = a;
};
a.BaseTexture.prototype.dirty = function () {
for (var a = 0; a < this._glTextures.length; a++) this._dirty[a] = !0;
};
a.BaseTexture.prototype.unloadFromGPU = function () {
this.dirty();
for (var b = this._glTextures.length - 1; 0 <= b; b--) {
var d = this._glTextures[b],
e = a.glContexts[b];
e && d && e.deleteTexture(d);
}
this._glTextures.length = 0;
this.dirty();
};
a.BaseTexture.fromImage = function (b, d, e) {
var f = a.BaseTextureCache[b];
void 0 === d && -1 === b.indexOf("data:") && (d = !0);
f || ((f = new Image()), d && (f.crossOrigin = ""), (f.src = b), (f = new a.BaseTexture(f, e)), (f.imageUrl = b), (a.BaseTextureCache[b] = f), -1 !== b.indexOf(a.RETINA_PREFIX + ".") && (f.resolution = 2));
return f;
};
a.BaseTexture.fromCanvas = function (b, d) {
b._pixiId || (b._pixiId = "canvas_" + a.TextureCacheIdGenerator++);
var e = a.BaseTextureCache[b._pixiId];
e || ((e = new a.BaseTexture(b, d)), (a.BaseTextureCache[b._pixiId] = e));
return e;
};
a.TextureCache = {};
a.FrameCache = {};
a.TextureCacheIdGenerator = 0;
a.Texture = function (b, d, e, f) {
this.noFrame = !1;
d || ((this.noFrame = !0), (d = new a.Rectangle(0, 0, 1, 1)));
b instanceof a.Texture && (b = b.baseTexture);
this.baseTexture = b;
this.frame = d;
this.trim = f;
this.requiresUpdate = this.valid = !1;
this._uvs = null;
this.height = this.width = 0;
this.crop = e || new a.Rectangle(0, 0, 1, 1);
b.hasLoaded ? (this.noFrame && (d = new a.Rectangle(0, 0, b.width, b.height)), this.setFrame(d)) : b.addEventListener("loaded", this.onBaseTextureLoaded.bind(this));
};
a.Texture.prototype.constructor = a.Texture;
a.EventTarget.mixin(a.Texture.prototype);
a.Texture.prototype.onBaseTextureLoaded = function () {
var b = this.baseTexture;
b.removeEventListener("loaded", this.onLoaded);
this.noFrame && (this.frame = new a.Rectangle(0, 0, b.width, b.height));
this.setFrame(this.frame);
this.dispatchEvent({ type: "update", content: this });
};
a.Texture.prototype.destroy = function (a) {
a && this.baseTexture.destroy();
this.valid = !1;
};
a.Texture.prototype.setFrame = function (a) {
this.noFrame = !1;
this.frame = a;
this.width = a.width;
this.height = a.height;
this.crop.x = a.x;
this.crop.y = a.y;
this.crop.width = a.width;
this.crop.height = a.height;
if (!this.trim && (a.x + a.width > this.baseTexture.width || a.y + a.height > this.baseTexture.height)) throw Error("Texture Error: frame does not fit inside the base Texture dimensions " + this);
this.valid = a && a.width && a.height && this.baseTexture.source && this.baseTexture.hasLoaded;
this.trim && ((this.width = this.trim.width), (this.height = this.trim.height), (this.frame.width = this.trim.width), (this.frame.height = this.trim.height));
this.valid && this._updateUvs();
};
a.Texture.prototype._updateUvs = function () {
this._uvs || (this._uvs = new a.TextureUvs());
var b = this.crop,
d = this.baseTexture.width,
e = this.baseTexture.height;
this._uvs.x0 = b.x / d;
this._uvs.y0 = b.y / e;
this._uvs.x1 = (b.x + b.width) / d;
this._uvs.y1 = b.y / e;
this._uvs.x2 = (b.x + b.width) / d;
this._uvs.y2 = (b.y + b.height) / e;
this._uvs.x3 = b.x / d;
this._uvs.y3 = (b.y + b.height) / e;
};
a.Texture.fromImage = function (b, d, e) {
var f = a.TextureCache[b];
f || ((f = new a.Texture(a.BaseTexture.fromImage(b, d, e))), (a.TextureCache[b] = f));
return f;
};
a.Texture.fromFrame = function (b) {
var d = a.TextureCache[b];
if (!d) throw Error('The frameId "' + b + '" does not exist in the texture cache ');
return d;
};
a.Texture.fromCanvas = function (b, d) {
var e = a.BaseTexture.fromCanvas(b, d);
return new a.Texture(e);
};
a.Texture.addTextureToCache = function (b, d) {
a.TextureCache[d] = b;
};
a.Texture.removeTextureFromCache = function (b) {
var d = a.TextureCache[b];
delete a.TextureCache[b];
delete a.BaseTextureCache[b];
return d;
};
a.TextureUvs = function () {
this.y3 = this.x3 = this.y2 = this.x2 = this.y1 = this.x1 = this.y0 = this.x0 = 0;
};
a.Texture.emptyTexture = new a.Texture(new a.BaseTexture());
a.RenderTexture = function (b, d, e, f, g) {
this.width = b || 100;
this.height = d || 100;
this.resolution = g || 1;
this.frame = new a.Rectangle(0, 0, this.width * this.resolution, this.height * this.resolution);
this.crop = new a.Rectangle(0, 0, this.width * this.resolution, this.height * this.resolution);
this.baseTexture = new a.BaseTexture();
this.baseTexture.width = this.width * this.resolution;
this.baseTexture.height = this.height * this.resolution;
this.baseTexture._glTextures = [];
this.baseTexture.resolution = this.resolution;
this.baseTexture.scaleMode = f || a.scaleModes.DEFAULT;
this.baseTexture.hasLoaded = !0;
a.Texture.call(this, this.baseTexture, new a.Rectangle(0, 0, this.width, this.height));
this.renderer = e || a.defaultRenderer;
this.renderer.type === a.WEBGL_RENDERER
? ((b = this.renderer.gl),
(this.baseTexture._dirty[b.id] = !1),
(this.textureBuffer = new a.FilterTexture(b, this.width * this.resolution, this.height * this.resolution, this.baseTexture.scaleMode)),
(this.baseTexture._glTextures[b.id] = this.textureBuffer.texture),
(this.render = this.renderWebGL),
(this.projection = new a.Point(0.5 * this.width, 0.5 * -this.height)))
: ((this.render = this.renderCanvas), (this.textureBuffer = new a.CanvasBuffer(this.width * this.resolution, this.height * this.resolution)), (this.baseTexture.source = this.textureBuffer.canvas));
this.valid = !0;
this._updateUvs();
};
a.RenderTexture.prototype = Object.create(a.Texture.prototype);
a.RenderTexture.prototype.constructor = a.RenderTexture;
a.RenderTexture.prototype.resize = function (b, d, e) {
if (b !== this.width || d !== this.height)
(this.valid = 0 < b && 0 < d),
(this.width = this.frame.width = this.crop.width = b),
(this.height = this.frame.height = this.crop.height = d),
e && ((this.baseTexture.width = this.width), (this.baseTexture.height = this.height)),
this.renderer.type === a.WEBGL_RENDERER && ((this.projection.x = this.width / 2), (this.projection.y = -this.height / 2)),
this.valid && this.textureBuffer.resize(this.width * this.resolution, this.height * this.resolution);
};
a.RenderTexture.prototype.clear = function () {
this.valid && (this.renderer.type === a.WEBGL_RENDERER && this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER, this.textureBuffer.frameBuffer), this.textureBuffer.clear());
};
a.RenderTexture.prototype.renderWebGL = function (a, d, e) {
if (this.valid) {
var f = a.worldTransform;
f.identity();
f.translate(0, 2 * this.projection.y);
d && f.append(d);
f.scale(1, -1);
a.worldAlpha = 1;
d = a.children;
for (var f = 0, g = d.length; f < g; f++) d[f].updateTransform();
d = this.renderer.gl;
d.viewport(0, 0, this.width * this.resolution, this.height * this.resolution);
d.bindFramebuffer(d.FRAMEBUFFER, this.textureBuffer.frameBuffer);
e && this.textureBuffer.clear();
this.renderer.spriteBatch.dirty = !0;
this.renderer.renderDisplayObject(a, this.projection, this.textureBuffer.frameBuffer);
this.renderer.spriteBatch.dirty = !0;
}
};
a.RenderTexture.prototype.renderCanvas = function (a, d, e) {
if (this.valid) {
var f = a.worldTransform;
f.identity();
d && f.append(d);
a.worldAlpha = 1;
d = a.children;
for (var f = 0, g = d.length; f < g; f++) d[f].updateTransform();
e && this.textureBuffer.clear();
e = this.textureBuffer.context;
d = this.renderer.resolution;
this.renderer.resolution = this.resolution;
this.renderer.renderDisplayObject(a, e);
this.renderer.resolution = d;
}
};
a.RenderTexture.prototype.getImage = function () {
var a = new Image();
a.src = this.getBase64();
return a;
};
a.RenderTexture.prototype.getBase64 = function () {
return this.getCanvas().toDataURL();
};
a.RenderTexture.prototype.getCanvas = function () {
if (this.renderer.type === a.WEBGL_RENDERER) {
var b = this.renderer.gl,
d = this.textureBuffer.width,
e = this.textureBuffer.height,
f = new Uint8Array(4 * d * e);
b.bindFramebuffer(b.FRAMEBUFFER, this.textureBuffer.frameBuffer);
b.readPixels(0, 0, d, e, b.RGBA, b.UNSIGNED_BYTE, f);
b.bindFramebuffer(b.FRAMEBUFFER, null);
b = new a.CanvasBuffer(d, e);
d = b.context.getImageData(0, 0, d, e);
d.data.set(f);
b.context.putImageData(d, 0, 0);
return b.canvas;
}
return this.textureBuffer.canvas;
};
a.RenderTexture.tempMatrix = new a.Matrix();
a.VideoTexture = function (b, d) {
if (!b) throw Error("No video source element specified.");
(b.readyState === b.HAVE_ENOUGH_DATA || b.readyState === b.HAVE_FUTURE_DATA) && b.width && b.height && (b.complete = !0);
a.BaseTexture.call(this, b, d);
this.autoUpdate = !1;
this.updateBound = this._onUpdate.bind(this);
b.complete ||
((this._onCanPlay = this.onCanPlay.bind(this)),
b.addEventListener("canplay", this._onCanPlay),
b.addEventListener("canplaythrough", this._onCanPlay),
b.addEventListener("play", this.onPlayStart.bind(this)),
b.addEventListener("pause", this.onPlayStop.bind(this)));
};
a.VideoTexture.prototype = Object.create(a.BaseTexture.prototype);
a.VideoTexture.constructor = a.VideoTexture;
a.VideoTexture.prototype._onUpdate = function () {};
a.VideoTexture.prototype.onPlayStart = function () {};
a.VideoTexture.prototype.onPlayStop = function () {};
a.VideoTexture.prototype.onCanPlay = function (a) {
"canplaythrough" === a.type &&
((this.hasLoaded = !0),
this.source &&
(this.source.removeEventListener("canplay", this._onCanPlay),
this.source.removeEventListener("canplaythrough", this._onCanPlay),
(this.width = this.source.videoWidth),
(this.height = this.source.videoHeight),
this.__loaded || ((this.__loaded = !0), this.dispatchEvent({ type: "loaded", content: this }))));
};
a.VideoTexture.baseTextureFromVideo = function (b, d) {
b._pixiId || (b._pixiId = "video_" + a.TextureCacheIdGenerator++);
var e = a.BaseTextureCache[b._pixiId];
e || ((e = new a.VideoTexture(b, d)), (a.BaseTextureCache[b._pixiId] = e));
return e;
};
a.VideoTexture.prototype.destroy = function () {
this.source && this.source._pixiId && ((a.BaseTextureCache[this.source._pixiId] = null), delete a.BaseTextureCache[this.source._pixiId], (this.source._pixiId = null), delete this.source._pixiId);
a.BaseTexture.prototype.destroy.call(this);
};
a.VideoTexture.textureFromVideo = function (b, d) {
var e = a.VideoTexture.baseTextureFromVideo(b, d);
return new a.Texture(e);
};
a.VideoTexture.fromUrl = function (b, d) {
var e = document.createElement("video");
e.src = b;
e.autoPlay = !0;
e.play();
return a.VideoTexture.textureFromVideo(e, d);
};
a.AssetLoader = function (b, d) {
this.assetURLs = b;
this.crossorigin = d;
this.loadersByType = {
jpg: a.ImageLoader,
jpeg: a.ImageLoader,
png: a.ImageLoader,
gif: a.ImageLoader,
webp: a.ImageLoader,
json: a.JsonLoader,
atlas: a.AtlasLoader,
anim: a.SpineLoader,
xml: a.BitmapFontLoader,
fnt: a.BitmapFontLoader,
};
};
a.EventTarget.mixin(a.AssetLoader.prototype);
a.AssetLoader.prototype.constructor = a.AssetLoader;
a.AssetLoader.prototype._getDataType = function (a) {
if ("data:" === a.slice(0, 5).toLowerCase()) {
a = a.slice(5);
var d = a.indexOf(",");
return -1 === d ? null : (a = a.slice(0, d).split(";")[0]) && "text/plain" !== a.toLowerCase() ? a.split("/").pop().toLowerCase() : "txt";
}
return null;
};
a.AssetLoader.prototype.load = function () {
function a(b) {
e.onAssetLoaded(b.data.content);
}
function d() {
e.onAssetLoadingFailed();
}
var e = this;
this.loadCount = this.assetURLs.length;
for (var f = 0; f < this.assetURLs.length; f++) {
var g = this.assetURLs[f],
k = this._getDataType(g);
k || (k = g.split("?").shift().split(".").pop().toLowerCase());
var m = this.loadersByType[k];
if (!m) throw Error(k + " is an unsupported file type");
g = new m(g, this.crossorigin);
g.on("loaded", a);
g.on("error", d);
g.load();
}
};
a.AssetLoader.prototype.onAssetLoaded = function (a) {
this.loadCount--;
this.emit("onProgress", { content: this, loader: a });
if (this.onProgress) this.onProgress(a);
if (!this.loadCount && (this.emit("onComplete", { content: this }), this.onComplete)) this.onComplete();
};
a.AssetLoader.prototype.onAssetLoadingFailed = function () {
this.onLoadingFailed();
};
a.JsonLoader = function (a, d) {
this.url = a;
this.crossorigin = d;
this.baseUrl = a.replace(/[^\/]*$/, "");
this.loaded = !1;
};
a.JsonLoader.prototype.constructor = a.JsonLoader;
a.EventTarget.mixin(a.JsonLoader.prototype);
a.JsonLoader.prototype.load = function () {
window.XDomainRequest && this.crossorigin
? ((this.ajaxRequest = new window.XDomainRequest()),
(this.ajaxRequest.timeout = 3e3),
(this.ajaxRequest.onerror = this.onError.bind(this)),
(this.ajaxRequest.ontimeout = this.onError.bind(this)),
(this.ajaxRequest.onprogress = function () {}))
: (this.ajaxRequest = window.XMLHttpRequest ? new window.XMLHttpRequest() : new window.ActiveXObject("Microsoft.XMLHTTP"));
this.ajaxRequest.onload = this.onJSONLoaded.bind(this);
this.ajaxRequest.open("GET", this.url, !0);
this.ajaxRequest.send();
};
a.JsonLoader.prototype.onJSONLoaded = function () {
if (this.ajaxRequest.responseText)
if (((this.json = JSON.parse(this.ajaxRequest.responseText)), this.json.frames && this.json.meta && this.json.meta.image)) {
var b = new a.ImageLoader(this.baseUrl + this.json.meta.image, this.crossorigin),
d = this.json.frames;
this.texture = b.texture.baseTexture;
b.addEventListener("loaded", this.onLoaded.bind(this));
b.addEventListener("error", this.onError.bind(this));
for (var e in d) {
var f = d[e].frame;
if (f) {
var f = new a.Rectangle(f.x, f.y, f.w, f.h),
g = f.clone(),
k = null;
if (d[e].trimmed)
var k = d[e].sourceSize,
m = d[e].spriteSourceSize,
k = new a.Rectangle(m.x, m.y, k.w, k.h);
a.TextureCache[e] = new a.Texture(this.texture, f, g, k);
}
}
b.load();
} else this.json.bones && ((b = new spine.SkeletonJson().readSkeletonData(this.json)), (a.AnimCache[this.url] = b)), this.onLoaded();
else this.onError();
};
a.JsonLoader.prototype.onLoaded = function () {
this.loaded = !0;
this.dispatchEvent({ type: "loaded", content: this });
};
a.JsonLoader.prototype.onError = function () {
this.dispatchEvent({ type: "error", content: this });
};
a.ImageLoader = function (b, d) {
this.texture = a.Texture.fromImage(b, d);
this.frames = [];
};
a.ImageLoader.prototype.constructor = a.ImageLoader;
a.EventTarget.mixin(a.ImageLoader.prototype);
a.ImageLoader.prototype.load = function () {
if (this.texture.baseTexture.hasLoaded) this.onLoaded();
else this.texture.baseTexture.on("loaded", this.onLoaded.bind(this)), this.texture.baseTexture.on("error", this.onLoadingFailed.bind(this));
};
a.ImageLoader.prototype.onLoaded = function () {
this.emit("loaded", { content: this });
};
a.ImageLoader.prototype.onLoadingFailed = function () {
this.emit("error", { content: this });
};
a.ImageLoader.prototype.loadFramedSpriteSheet = function (b, d, e) {
this.frames = [];
for (var f = Math.floor(this.texture.width / b), g = Math.floor(this.texture.height / d), k = 0, m = 0; m < g; m++)
for (var n = 0; n < f; n++, k++) {
var p = new a.Texture(this.texture.baseTexture, { x: n * b, y: m * d, width: b, height: d });
this.frames.push(p);
e && (a.TextureCache[e + "-" + k] = p);
}
this.load();
};
a.BitmapFontLoader = function (a, d) {
this.url = a;
this.crossorigin = d;
this.baseUrl = a.replace(/[^\/]*$/, "");
this.texture = null;
};
a.BitmapFontLoader.prototype.constructor = a.BitmapFontLoader;
a.EventTarget.mixin(a.BitmapFontLoader.prototype);
a.BitmapFontLoader.prototype.load = function () {
this.ajaxRequest = new a.AjaxRequest();
this.ajaxRequest.onreadystatechange = this.onXMLLoaded.bind(this);
this.ajaxRequest.open("GET", this.url, !0);
this.ajaxRequest.overrideMimeType && this.ajaxRequest.overrideMimeType("application/xml");
this.ajaxRequest.send(null);
};
a.BitmapFontLoader.prototype.onXMLLoaded = function () {
if (4 === this.ajaxRequest.readyState && (200 === this.ajaxRequest.status || -1 === window.location.protocol.indexOf("http"))) {
var b = this.ajaxRequest.responseXML;
if (!b || /MSIE 9/i.test(navigator.userAgent) || navigator.isCocoonJS)
if ("function" === typeof window.DOMParser) b = new DOMParser().parseFromString(this.ajaxRequest.responseText, "text/xml");
else {
var d = document.createElement("div");
d.innerHTML = this.ajaxRequest.responseText;
b = d;
}
d = this.baseUrl + b.getElementsByTagName("page")[0].getAttribute("file");
d = new a.ImageLoader(d, this.crossorigin);
this.texture = d.texture.baseTexture;
var e = {},
f = b.getElementsByTagName("info")[0],
g = b.getElementsByTagName("common")[0];
e.font = f.getAttribute("face");
e.size = parseInt(f.getAttribute("size"), 10);
e.lineHeight = parseInt(g.getAttribute("lineHeight"), 10);
e.chars = {};
g = b.getElementsByTagName("char");
for (f = 0; f < g.length; f++) {
var k = parseInt(g[f].getAttribute("id"), 10),
m = new a.Rectangle(parseInt(g[f].getAttribute("x"), 10), parseInt(g[f].getAttribute("y"), 10), parseInt(g[f].getAttribute("width"), 10), parseInt(g[f].getAttribute("height"), 10));
e.chars[k] = {
xOffset: parseInt(g[f].getAttribute("xoffset"), 10),
yOffset: parseInt(g[f].getAttribute("yoffset"), 10),
xAdvance: parseInt(g[f].getAttribute("xadvance"), 10),
kerning: {},
texture: (a.TextureCache[k] = new a.Texture(this.texture, m)),
};
}
b = b.getElementsByTagName("kerning");
for (f = 0; f < b.length; f++) (g = parseInt(b[f].getAttribute("first"), 10)), (k = parseInt(b[f].getAttribute("second"), 10)), (m = parseInt(b[f].getAttribute("amount"), 10)), (e.chars[k].kerning[g] = m);
a.BitmapText.fonts[e.font] = e;
d.addEventListener("loaded", this.onLoaded.bind(this));
d.load();
}
};
a.BitmapFontLoader.prototype.onLoaded = function () {
this.emit("loaded", { content: this });
};
a.AbstractFilter = function (a, d) {
this.passes = [this];
this.shaders = [];
this.dirty = !0;
this.padding = 0;
this.uniforms = d || {};
this.fragmentSrc = a || [];
};
a.AbstractFilter.prototype.constructor = a.AbstractFilter;
a.AbstractFilter.prototype.syncUniforms = function () {
for (var a = 0, d = this.shaders.length; a < d; a++) this.shaders[a].dirty = !0;
};
a.GreentubeGlobalShader = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
contrastFactor: { type: "1f", value: 0 },
hasSeparatedAlpha: { type: "1f", value: 0 },
paddingHalfHeight: { type: "1f", value: 0 },
alphaseparateYfactor: { type: "1f", value: 0 },
hasMatrix: { type: "1f", value: 0 },
matrix: { type: "mat4", value: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform float invert;",
"uniform float paddingHalfHeight;",
"uniform float alphaseparateYfactor;",
"uniform float hasSeparatedAlpha;",
"uniform float hasMatrix;",
"uniform float contrastFactor;",
"uniform mat4 matrix;",
"uniform sampler2D uSampler;",
"void main(void) {",
"vec4 col;",
"if(hasSeparatedAlpha > 0.) {",
"vec2 newTC = vec2(vTextureCoord.x, vTextureCoord.y * alphaseparateYfactor);",
"col = texture2D(uSampler, newTC);",
"newTC.y = newTC.y + paddingHalfHeight + .5;",
"col.a = texture2D(uSampler, newTC).r" + (DEVICE.chrome || DEVICE.opera || DEVICE.mozilla || DEVICE.msie ? "* 1.1;" : ";"),
"if(col.a == 0.0)",
"\tdiscard;",
"col.a*=col.a;",
"col.rgb*=col.a;",
"} else {",
"col = texture2D(uSampler, vTextureCoord);",
"if(col.a == 0.0)",
"\tdiscard;",
"}",
a.GreentubeGlobalShader.prototype.colorAttributeError ? "" : "col = col * vColor;",
"if(hasMatrix > 0.)",
"col = col * matrix;",
"if(contrastFactor > 0.)",
"col.rgb = contrastFactor * (col.rgb - .5) + .5;",
"gl_FragColor = col;",
"}",
];
};
a.GreentubeGlobalShader.prototype = Object.create(a.AbstractFilter.prototype);
a.GreentubeGlobalShader.prototype.constructor = a.GreentubeGlobalShader;
Object.defineProperty(a.GreentubeGlobalShader.prototype, "matrix", {
get: function () {
return this.uniforms.matrix.value;
},
set: function (a) {
null != a ? ((this.uniforms.matrix.value = a), (this.uniforms.hasMatrix.value = 1)) : ((this.uniforms.hasMatrix.value = 0), (this.uniforms.matrix.value = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]));
},
});
Object.defineProperty(a.GreentubeGlobalShader.prototype, "alphaSeparatedImagePaddingHeight", {
get: function () {
return this.uniforms.paddingHeight.value;
},
set: function (a) {
this.uniforms.paddingHeight.value = a;
},
});
Object.defineProperty(a.GreentubeGlobalShader.prototype, "hasSeparatedAlpha", {
get: function () {
return this.uniforms.hasSeparatedAlpha.value;
},
set: function (a) {
this.uniforms.hasSeparatedAlpha.value = a;
},
});
a.DisplacementFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
displacementMap: { type: "sampler2D", value: null },
scale: { type: "2f", value: { x: 30, y: 30 } },
offset: { type: "2f", value: { x: 0, y: 0 } },
mapDimensions: { type: "2f", value: { x: 1, y: 5112 } },
dimensions: { type: "4fv", value: [0, 0, 0, 0] },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform sampler2D displacementMap;",
"uniform sampler2D uSampler;",
"uniform vec2 scale;",
"uniform vec2 offset;",
"uniform vec4 dimensions;",
"uniform vec2 mapDimensions;",
"uniform sampler2D uMaskTexture;",
"uniform vec2 halfUVSize;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"void main(void) {",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map == 0.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"} else {",
"vec2 mapCords = vTextureCoord.xy;",
"mapCords += (dimensions.zw + offset)/ dimensions.xy ;",
"mapCords.y *= -1.0;",
"mapCords.y += 1.0;",
"mapCords.x -= floor(mapCords.x);",
"mapCords.y -= floor(mapCords.y);",
"vec2 matSample = texture2D(displacementMap, mapCords).xy;",
"matSample -= 0.5;",
"matSample *= scale;",
"matSample /= mapDimensions;",
"vec2 newCoord = vec2(vTextureCoord.x + matSample.x, vTextureCoord.y + matSample.y);",
"if(newCoord.x < 0.0 || newCoord.y < 0.0)",
"discard;",
"vec4 col = texture2D(uSampler, newCoord);",
"if(col.a == 0.0)",
"discard;",
"gl_FragColor = col;",
"if(map < 1.0)",
"gl_FragColor = gl_FragColor * map + texture2D(uSampler, vTextureCoord) * (1.0 - map);",
"}",
"}",
];
};
a.DisplacementFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.DisplacementFilter.prototype.constructor = a.DisplacementFilter;
a.DisplacementFilter.prototype.onTextureLoaded = function () {
this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction);
};
Object.defineProperty(a.DisplacementFilter.prototype, "map", {
get: function () {
return this.uniforms.displacementMap.value;
},
set: function (a) {
this.uniforms.displacementMap.value = a;
this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
},
});
Object.defineProperty(a.DisplacementFilter.prototype, "scale", {
get: function () {
return this.uniforms.scale.value;
},
set: function (a) {
this.uniforms.scale.value = a;
},
});
Object.defineProperty(a.DisplacementFilter.prototype, "offset", {
get: function () {
return this.uniforms.offset.value;
},
set: function (a) {
this.uniforms.offset.value = a;
},
});
Object.defineProperty(a.DisplacementFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.DisplacementFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.DisplacementFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.DisplacementFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
a.PixelateFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
invert: { type: "1f", value: 0 },
dimensions: { type: "4fv", value: new a.Float32Array([1e4, 100, 10, 10]) },
pixelSize: { type: "2f", value: { x: 10, y: 10 } },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform vec2 testDim;",
"uniform vec4 dimensions;",
"uniform vec2 pixelSize;",
"uniform sampler2D uSampler;",
"uniform sampler2D uMaskTexture;",
"uniform vec2 halfUVSize;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"void main(void) {",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map == 0.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"} else {",
"vec2 size = dimensions.xy/pixelSize;",
"vec2 color = floor( ( vTextureCoord * size ) ) / size + pixelSize/dimensions.xy * 0.5;",
"gl_FragColor = texture2D(uSampler, color);",
"if(map < 1.0)",
"gl_FragColor = gl_FragColor * map + texture2D(uSampler, vTextureCoord) * (1.0 - map);",
"}",
"}",
];
};
a.PixelateFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.PixelateFilter.prototype.constructor = a.PixelateFilter;
Object.defineProperty(a.PixelateFilter.prototype, "size", {
get: function () {
return this.uniforms.pixelSize.value;
},
set: function (a) {
this.dirty = !0;
this.uniforms.pixelSize.value = a;
},
});
Object.defineProperty(a.PixelateFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.PixelateFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.PixelateFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.PixelateFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
a.BlurXFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
blur: { type: "1f", value: 1 / 512 },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform float blur;",
"uniform sampler2D uSampler;",
"uniform sampler2D uMaskTexture;",
"uniform vec2 halfUVSize;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"void main(void) {",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map == 0.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"} else {",
"vec4 sum = vec4(0.0);",
"sum += texture2D(uSampler, vec2(vTextureCoord.x - 4.0*blur, vTextureCoord.y)) * 0.05;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x - 3.0*blur, vTextureCoord.y)) * 0.09;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x - 2.0*blur, vTextureCoord.y)) * 0.12;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x - blur, vTextureCoord.y)) * 0.15;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y)) * 0.18;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x + blur, vTextureCoord.y)) * 0.15;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x + 2.0*blur, vTextureCoord.y)) * 0.12;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x + 3.0*blur, vTextureCoord.y)) * 0.09;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x + 4.0*blur, vTextureCoord.y)) * 0.05;",
"gl_FragColor = sum;",
"if(map < 1.0)",
"gl_FragColor = gl_FragColor * map + texture2D(uSampler, vTextureCoord) * (1.0 - map);",
"}",
"}",
];
};
a.BlurXFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.BlurXFilter.prototype.constructor = a.BlurXFilter;
Object.defineProperty(a.BlurXFilter.prototype, "blur", {
get: function () {
return this.uniforms.blur.value / (1 / 7e3);
},
set: function (a) {
this.dirty = !0;
this.uniforms.blur.value = (1 / 7e3) * a;
},
});
Object.defineProperty(a.BlurXFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.BlurXFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.BlurXFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.BlurXFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
a.BlurYFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
blur: { type: "1f", value: 1 / 512 },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform float blur;",
"uniform sampler2D uSampler;",
"uniform sampler2D uMaskTexture;",
"uniform vec2 halfUVSize;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"void main(void) {",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map == 0.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"} else {",
"vec4 sum = vec4(0.0);",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - 4.0*blur)) * 0.05;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - 3.0*blur)) * 0.09;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - 2.0*blur)) * 0.12;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - blur)) * 0.15;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y)) * 0.18;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + blur)) * 0.15;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 2.0*blur)) * 0.12;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 3.0*blur)) * 0.09;",
"sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 4.0*blur)) * 0.05;",
"gl_FragColor = sum;",
"if(map < 1.0)",
"gl_FragColor = gl_FragColor * map + texture2D(uSampler, vTextureCoord) * (1.0 - map);",
"}",
"}",
];
};
a.BlurYFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.BlurYFilter.prototype.constructor = a.BlurYFilter;
Object.defineProperty(a.BlurYFilter.prototype, "blur", {
get: function () {
return this.uniforms.blur.value / (1 / 7e3);
},
set: function (a) {
this.uniforms.blur.value = (1 / 7e3) * a;
},
});
Object.defineProperty(a.BlurYFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.BlurYFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.BlurYFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.BlurYFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
a.BlurFilter = function () {
this.blurXFilter = new a.BlurXFilter();
this.blurYFilter = new a.BlurYFilter();
this.passes = [this.blurXFilter, this.blurYFilter];
};
a.BlurFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.BlurFilter.prototype.constructor = a.BlurFilter;
Object.defineProperty(a.BlurFilter.prototype, "blur", {
get: function () {
return this.blurXFilter.blur;
},
set: function (a) {
this.blurXFilter.blur = this.blurYFilter.blur = a;
},
});
Object.defineProperty(a.BlurFilter.prototype, "blurX", {
get: function () {
return this.blurXFilter.blur;
},
set: function (a) {
this.blurXFilter.blur = a;
},
});
Object.defineProperty(a.BlurFilter.prototype, "blurY", {
get: function () {
return this.blurYFilter.blur;
},
set: function (a) {
this.blurYFilter.blur = a;
},
});
Object.defineProperty(a.BlurFilter.prototype, "maskTexture", {
get: function () {
return this.blurXFilter.maskTexture;
},
set: function (a) {
this.blurXFilter.maskTexture = a;
this.blurYFilter.maskTexture = a;
},
});
Object.defineProperty(a.BlurFilter.prototype, "maskTextureInvert", {
get: function () {
return this.blurXFilter.maskTextureInvert;
},
set: function (a) {
this.blurXFilter.maskTextureInvert = a;
this.blurYFilter.maskTextureInvert = a;
},
});
Object.defineProperty(a.BlurFilter.prototype, "maskTextureOffset", {
get: function () {
return this.blurXFilter.maskTextureOffset;
},
set: function (a) {
this.blurXFilter.maskTextureOffset = a;
this.blurYFilter.maskTextureOffset = a;
},
});
Object.defineProperty(a.BlurFilter.prototype, "maskTextureScale", {
get: function () {
return this.blurXFilter.maskTextureScale;
},
set: function (a) {
this.blurXFilter.maskTextureScale = a;
this.blurYFilter.maskTextureScale = a;
},
});
a.MotionBlurFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this._lowPassFilterFactor = this._blur = this.rawBlurBackup = 0;
this._texelStep = 1 / 2048;
this.direction = null;
this.appliedBlur = -1;
this.smoothedBlur = 0;
this.uniforms = { blur: { type: "1f", value: 1 }, uvData: { type: "4fv", value: [0, 0, 0, 0] } };
this.fragmentSrcPart1 = "precision mediump float;}uniform sampler2D uSampler;}uniform float blur;}uniform vec4 uvData;}varying vec2 vTextureCoord;}varying vec4 vColor;}void main(void) {}vec2 texCoord = vTextureCoord;}vec2 texCoordNegative = texCoord.xy;}vec4 col = texture2D(uSampler, texCoord);}int len = int(blur * 0.5) - 1;}float countFloat = float(len + 1);}float count = 1.;}for(int i = 0; i < 1000; ++i) {}if(i > len)}break;".split(
"}"
);
this.fragmentSrcPart2_Horizontal = "texCoord.x += uvData.z;{if(texCoord.x <= uvData.y){col +=texture2D(uSampler, texCoord);{texCoordNegative.x -= uvData.z;{if(texCoordNegative.x >= 0.0){col += texture2D(uSampler, texCoordNegative);".split(
"{"
);
this.fragmentSrcPart2_Vertical = "texCoord.y += uvData.w;{if(texCoord.y <= uvData.y){col +=texture2D(uSampler, texCoord);{texCoordNegative.y -= uvData.w;{if(texCoordNegative.y >= 0.0){col += texture2D(uSampler, texCoordNegative);".split(
"{"
);
this.fragmentSrcPart2_DirectionVector = "texCoord.xy += uvData.zw;{if(texCoord.x >= 0.0 && texCoord.x <= uvData.x && texCoord.y >= 0.0 && texCoord.y <= uvData.y){col +=texture2D(uSampler, texCoord);{texCoordNegative.xy -= uvData.zw;{if(texCoordNegative.x >= 0.0 && texCoordNegative.x <= uvData.x && texCoordNegative.y >= 0.0 && texCoordNegative.y <= uvData.y){col += texture2D(uSampler, texCoordNegative);".split(
"{"
);
this.fragmentSrcPart3 = ["count += 2.;", "}", "gl_FragColor = col / count;", "}"];
this.fragmentSrc = null;
this.update = function () {
this.smoothedBlur += this._lowPassFilterFactor * (this.blur - this.smoothedBlur);
this.smoothedBlur != this.appliedBlur && ((this.appliedBlur = this.smoothedBlur), (this.uniforms.blur.value = this.appliedBlur));
};
};
a.MotionBlurFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.MotionBlurFilter.prototype.constructor = a.MotionBlurFilter;
Object.defineProperty(a.MotionBlurFilter.prototype, "blur", {
get: function () {
return this._blur;
},
set: function (a) {
this.rawBlurBackup = a;
this._blur = a / this.texelStep;
},
});
Object.defineProperty(a.MotionBlurFilter.prototype, "texelStep", {
get: function () {
return this._texelStep;
},
set: function (a) {
this._texelStep = a;
0 < this.rawBlurBackup && (this.blur = this.rawBlurBackup);
},
});
Object.defineProperty(a.MotionBlurFilter.prototype, "motionBlurDirection", {
get: function () {
return this.direction;
},
set: function (a) {
this.direction = a;
0 != this.direction.y && (this.direction.y *= -1);
0 == this.direction.x && 0 != this.direction.y && (this.fragmentSrc = [].concat(this.fragmentSrcPart1).concat(this.fragmentSrcPart2_Vertical).concat(this.fragmentSrcPart3));
this.fragmentSrc =
0 != this.direction.x && 0 == this.direction.y
? [].concat(this.fragmentSrcPart1).concat(this.fragmentSrcPart2_Horizontal).concat(this.fragmentSrcPart3)
: [].concat(this.fragmentSrcPart1).concat(this.fragmentSrcPart2_DirectionVector).concat(this.fragmentSrcPart3);
},
});
Object.defineProperty(a.MotionBlurFilter.prototype, "lowPassFilterFactor", {
get: function () {
return this._lowPassFilterFactor;
},
set: function (a) {
this._lowPassFilterFactor = 1 - a;
},
});
a.InvertFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
invert: { type: "1f", value: 1 },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform float invert;",
"uniform sampler2D uSampler;",
"uniform sampler2D uMaskTexture;",
"uniform vec2 halfUVSize;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"void main(void) {",
"vec4 diffuse = texture2D(uSampler, vTextureCoord);",
"gl_FragColor = diffuse;",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map == 0.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"} else {",
"gl_FragColor.rgb = mix( (vec3(1) - gl_FragColor.rgb) * gl_FragColor.a, gl_FragColor.rgb, 1.0 - invert);",
"if(map < 1.0)",
"gl_FragColor.rgb = gl_FragColor.rgb * map + (1.0 - map) * diffuse.rgb;",
"}",
"}",
];
};
a.InvertFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.InvertFilter.prototype.constructor = a.InvertFilter;
Object.defineProperty(a.InvertFilter.prototype, "invert", {
get: function () {
return this.uniforms.invert.value;
},
set: function (a) {
this.uniforms.invert.value = a;
},
});
Object.defineProperty(a.InvertFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.InvertFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.InvertFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.InvertFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
a.FishEyeFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
scaleX: { type: "1f", value: 1 },
scaleY: { type: "1f", value: 1 },
distortion: { type: "2f", value: { x: 0, y: 0 } },
aspectratio: { type: "1f", value: 1 },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform float aspectratio;",
"uniform vec2 distortion;",
"uniform float scaleX;",
"uniform float scaleY;",
"uniform sampler2D uSampler;",
"uniform sampler2D uMaskTexture;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"uniform vec2 halfUVSize;",
"void main(void) {",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map == 0.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"} else {",
"float rsq = 0.0;",
"if (aspectratio < 1.0) {",
"rsq = pow((vTextureCoord.x - halfUVSize.x) * aspectratio, 2.0) + pow(vTextureCoord.y - halfUVSize.y, 2.0);",
"} else {",
"rsq = pow(vTextureCoord.x - halfUVSize.x, 2.0) + pow((vTextureCoord.y - halfUVSize.y) / aspectratio, 2.0);",
"}",
"vec2 coord = vec2(halfUVSize.x + (vTextureCoord.x - halfUVSize.x) * (1.0 + distortion.x * rsq) / scaleX,",
"halfUVSize.y + (vTextureCoord.y - halfUVSize.y) * (1.0 + distortion.y * rsq) / scaleY);",
"if (coord.x >= 0.0 && coord.x <= 1.0 && coord.y >= 0.0 && coord.y <= 1.0) {",
"gl_FragColor = texture2D(uSampler, coord);",
"if(map < 1.0)",
"gl_FragColor = gl_FragColor * map + texture2D(uSampler, vTextureCoord) * (1.0 - map);",
"} else if(map < 1.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord) * (1.0 - map);",
"} else {",
"discard;",
"}",
"}",
"}",
];
};
a.FishEyeFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.FishEyeFilter.prototype.constructor = a.FishEyeFilter;
Object.defineProperty(a.FishEyeFilter.prototype, "aspectratio", {
get: function () {
return this.uniforms.aspectratio.value;
},
set: function (a) {
this.uniforms.aspectratio.value = a;
var d = 0,
e = this.uniforms.distortion.value,
d = 1 > a ? (Math.pow(0.5 * a, 2) + Math.pow(0.5, 2)) / (2 / a) : (Math.pow(0.5, 2) + Math.pow(0.5 / a, 2)) / (2 * a);
scaleX = 0 > e.x ? (1 / (1 - e.x * d)) * this.scale.x : (1 + e.x * d) * this.scale.x;
scaleY = 0 > e.y ? (1 / (1 - e.y * d)) * this.scale.y : (1 + e.y * d) * this.scale.y;
this.uniforms.scaleX.value = scaleX;
this.uniforms.scaleY.value = scaleY;
this.dirty = !0;
},
});
Object.defineProperty(a.FishEyeFilter.prototype, "distortion", {
get: function () {
return this.uniforms.distortion.value;
},
set: function (a) {
this.uniforms.distortion.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.FishEyeFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.FishEyeFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.FishEyeFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.FishEyeFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
a.ColorTransformFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
hasMatrix: { type: "1f", value: 0 },
matrix: { type: "mat4", value: [0.33, 0.33, 0.33, 0, 0.33, 0.33, 0.33, 0, 0.33, 0.33, 0.33, 0, 0, 0, 0, 1] },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform sampler2D uSampler;",
"uniform float hasMatrix;",
"uniform mat4 matrix;",
"uniform sampler2D uMaskTexture;",
"uniform vec2 halfUVSize;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"void main(void) {",
"vec4 c = texture2D(uSampler, vTextureCoord);",
"if(c.a == 0.0)",
"discard;",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map > 0.0 && hasMatrix > 0.0) {",
"gl_FragColor = c * matrix;",
"if(map < 1.0)",
"gl_FragColor = gl_FragColor * map + c * (1.0 - map);",
"} else {",
"gl_FragColor = c;",
"}",
"}",
];
};
a.ColorTransformFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.ColorTransformFilter.prototype.constructor = a.ColorTransformFilter;
Object.defineProperty(a.ColorTransformFilter.prototype, "matrix", {
get: function () {
return this.uniforms.matrix.value;
},
set: function (a) {
null != a
? ((this.uniforms.matrix.value = a), (this.uniforms.hasMatrix.value = 1))
: ((this.uniforms.hasMatrix.value = 0), (this.uniforms.matrix.value = [0.33, 0.33, 0.33, 0, 0.33, 0.33, 0.33, 0, 0.33, 0.33, 0.33, 0, 0, 0, 0, 1]));
},
});
Object.defineProperty(a.ColorTransformFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.ColorTransformFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.ColorTransformFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.ColorTransformFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
a.Transform3DFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = { tMatrix: { type: "mat4", value: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, filterArea: { type: "4fv", value: new a.Float32Array([0, 0, 0, 0]) }, tMatrixIsFinal: { type: "1f", value: 0 } };
this.vertexSrc = [
"attribute vec2 aVertexPosition;",
"attribute vec2 aTextureCoord;",
"attribute vec4 aColor;",
"uniform vec2 projectionVector;",
"uniform vec2 offsetVector;",
"uniform mat4 tMatrix;",
"uniform vec4 filterArea;",
"uniform float tMatrixIsFinal;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"const vec2 center = vec2(-1.0, 1.0);",
"void main(void) {",
"if(tMatrixIsFinal == 1.0) {",
"gl_Position = tMatrix * vec4(aVertexPosition, 0.0, 1.0);",
"} else {",
"vec2 axisOffset = vec2((projectionVector.x - (filterArea.x + (filterArea.z * 0.5))) / (projectionVector.x * 2.0) * 2.0, -((-projectionVector.y - (filterArea.y + (filterArea.w * 0.5))) / (-projectionVector.y * 2.0) * 2.0));",
"vec4 temp = tMatrix * vec4(((aVertexPosition + offsetVector) / projectionVector) + center + axisOffset, 0.0, 1.0);",
"temp.xy -= axisOffset.xy;",
"gl_Position = temp;",
"}",
"vTextureCoord = aTextureCoord;",
"vec3 color = mod(vec3(aColor.y/65536.0, aColor.y/256.0, aColor.y), 256.0) / 256.0;",
"vColor = vec4(color * aColor.x, aColor.x);",
"}",
];
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform vec4 dimensions;",
"uniform sampler2D uSampler;",
"void main(void) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"}",
];
this.mat4_multiply = function (a, d, e) {
var f = d[0],
g = d[1],
k = d[2],
m = d[3],
n = d[4],
p = d[5],
q = d[6],
r = d[7],
t = d[8],
u = d[9],
B = d[10],
A = d[11],
C = d[12],
E = d[13],
F = d[14];
d = d[15];
var D = e[0],
H = e[1],
I = e[2],
L = e[3];
a[0] = D * f + H * n + I * t + L * C;
a[1] = D * g + H * p + I * u + L * E;
a[2] = D * k + H * q + I * B + L * F;
a[3] = D * m + H * r + I * A + L * d;
D = e[4];
H = e[5];
I = e[6];
L = e[7];
a[4] = D * f + H * n + I * t + L * C;
a[5] = D * g + H * p + I * u + L * E;
a[6] = D * k + H * q + I * B + L * F;
a[7] = D * m + H * r + I * A + L * d;
D = e[8];
H = e[9];
I = e[10];
L = e[11];
a[8] = D * f + H * n + I * t + L * C;
a[9] = D * g + H * p + I * u + L * E;
a[10] = D * k + H * q + I * B + L * F;
a[11] = D * m + H * r + I * A + L * d;
D = e[12];
H = e[13];
I = e[14];
L = e[15];
a[12] = D * f + H * n + I * t + L * C;
a[13] = D * g + H * p + I * u + L * E;
a[14] = D * k + H * q + I * B + L * F;
a[15] = D * m + H * r + I * A + L * d;
return a;
};
this.mat4_project = function (a, d, e, f, g) {
d = 1 / Math.tan_1(0.5 * d);
g /= g - f;
a[0] = d;
a[1] = 0;
a[2] = 0;
a[3] = 0;
a[4] = 0;
a[5] = d / e;
a[6] = 0;
a[7] = 0;
a[8] = 0;
a[9] = 0;
a[10] = g;
a[11] = 1;
a[12] = 0;
a[13] = 0;
a[14] = -g * f;
a[15] = 0;
return a;
};
};
a.Transform3DFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.Transform3DFilter.prototype.constructor = a.Transform3DFilter;
Object.defineProperty(a.Transform3DFilter.prototype, "fov", {
get: function () {
return this._fov;
},
set: function (a) {
this.dirty = !0;
this._fov = a;
this._transformMatrix && (this.transformMatrix = this._transformMatrix);
},
});
Object.defineProperty(a.Transform3DFilter.prototype, "transformMatrix", {
get: function () {
return this._transformMatrix;
},
set: function (a) {
this.dirty = !0;
this._transformMatrix = a;
a = this._transformMatrix.slice();
if (this.preappliedProjectionMatrix) (this.uniforms.tMatrix.value = a), (this.uniforms.tMatrixIsFinal.value = 1);
else {
a[14] = 1;
var d = this.uniforms.tMatrix.value || [];
if (!this.projectMatrix || this._lastFov != this._fov) {
var e = RENDERER.width / RENDERER.height;
this._lastFov = this._fov;
this.projectMatrix = this.mat4_project([], this._fov, 1 / e, 1e-4, 1e3);
var f = Math.tan(0.5 * this._fov) * (1 / e);
this.scaleMatrix = [f * e, 0, 0, 0, 0, f, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1];
}
this.mat4_multiply(d, this.projectMatrix, a);
this.mat4_multiply(d, d, this.scaleMatrix);
this.uniforms.tMatrix.value = d;
this.uniforms.tMatrixIsFinal.value = 0;
}
},
});
a.NormalMapFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
normalMap: { type: "sampler2D", value: null },
lightColor: { type: "4fv", value: [1, 1, 1, 1] },
ambientColor: { type: "4fv", value: [1, 1, 1, 0.4] },
offset: { type: "2fv", value: [0, 0] },
lightPos: { type: "3fv", value: [0.5, 0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
mapSet: { type: "1f", value: 0 },
mapRotation: { type: "1f", value: 0 },
};
this.fragmentSrc = [
"precision mediump float;",
"uniform vec4 lightColor;",
"uniform vec4 ambientColor;",
"varying vec2 vTextureCoord;",
"uniform sampler2D normalMap;",
"uniform sampler2D uSampler;",
"uniform vec2 halfUVSize;",
"uniform vec2 offset;",
"uniform vec3 lightPos;",
"uniform float mapSet;",
"uniform float mapRotation;",
"const vec3 falloff = vec3(0.0, 1.0, 0.2);",
"void main(void) {",
"if(mapSet == 0.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"} else {",
"vec2 mapCords = vTextureCoord.xy;",
"vec4 color = texture2D(uSampler, vTextureCoord);",
"vec3 nColor = texture2D(normalMap, vTextureCoord).rgb;",
"mapCords = vec2(vTextureCoord.x / (halfUVSize.x * 2.0), 1.0-vTextureCoord.y / (halfUVSize.y * 2.0));",
"float rsin = 0.0;",
"float rcos = 0.0;",
"if(mapRotation != 0.0) {",
"rsin = sin(mapRotation);",
"rcos = cos(mapRotation);",
"float x = mapCords.x - 0.5;",
"float y = mapCords.y - 0.5;",
"mapCords.x = x * rcos - y * rsin + 0.5;",
"mapCords.y = x * rsin + y * rcos + 0.5;",
"}",
"mapCords -= offset;",
"vec3 NormalMap = texture2D(normalMap, mapCords).rgb;vec2 lightP = lightPos.xy;if(mapRotation != 0.0) {float x = lightP.x - 0.5;float y = lightP.y - 0.5;lightP.x = x * rcos - y * rsin + 0.5;lightP.y = x * rsin + y * rcos + 0.5;}vec4 diffuseColor = texture2D(uSampler, vTextureCoord);vec3 LightDir = vec3(lightP.x - mapCords.x, lightP.y - mapCords.y, lightPos.z);float D = length(LightDir);",
"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
"vec3 L = normalize(LightDir);",
"vec3 diffuse = (lightColor.rgb * lightColor.a) * max(dot(N, L), 0.0);",
"vec3 ambient = ambientColor.rgb * ambientColor.a;",
"float attenuation = 1.0 / ( falloff.x + (falloff.y*D) + (falloff.z*D*D) );",
"vec3 intensity = ambient + diffuse * attenuation;",
"vec3 FinalColor = diffuseColor.rgb * intensity;",
"gl_FragColor = vec4(FinalColor, diffuseColor.a);",
"}",
"}",
];
};
a.NormalMapFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.NormalMapFilter.prototype.constructor = a.NormalMapFilter;
Object.defineProperty(a.NormalMapFilter.prototype, "lightPos", {
set: function (a) {
this.uniforms.lightPos.value[0] = a[0];
this.uniforms.lightPos.value[1] = a[1];
this.uniforms.lightPos.value[2] = a[2];
this.dirty = !0;
},
});
Object.defineProperty(a.NormalMapFilter.prototype, "lightColor", {
set: function (a) {
this.uniforms.lightColor.value[0] = a[0];
this.uniforms.lightColor.value[1] = a[1];
this.uniforms.lightColor.value[2] = a[2];
this.uniforms.lightColor.value[3] = a[3];
this.dirty = !0;
},
});
Object.defineProperty(a.NormalMapFilter.prototype, "ambientColor", {
set: function (a) {
this.uniforms.ambientColor.value[0] = a[0];
this.uniforms.ambientColor.value[1] = a[1];
this.uniforms.ambientColor.value[2] = a[2];
this.uniforms.ambientColor.value[3] = a[3];
this.dirty = !0;
},
});
Object.defineProperty(a.NormalMapFilter.prototype, "map", {
set: function (a) {
this.uniforms.normalMap.value = a;
this.uniforms.mapSet.value = null != a ? 1 : 0;
null != a ? ((this.mapDimensionsX = a.width), (this.mapDimensionsY = a.height)) : (this.mapDimensionsY = this.mapDimensionsX = 0);
this.dirty = !0;
},
});
Object.defineProperty(a.NormalMapFilter.prototype, "mapRotation", {
set: function (a) {
this.uniforms.mapRotation.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.NormalMapFilter.prototype, "offset", {
set: function (a) {
this.uniforms.offset.value[0] = a[0];
this.uniforms.offset.value[1] = a[1];
this.dirty = !0;
},
});
a.TwistFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
radius: { type: "1f", value: 0.5 },
angle: { type: "1f", value: 5 },
offset: { type: "2f", value: { x: 0.5, y: 0.5 } },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform vec4 dimensions;",
"uniform sampler2D uSampler;",
"uniform sampler2D uMaskTexture;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"uniform vec2 halfUVSize;",
"uniform float radius;",
"uniform float angle;",
"uniform vec2 offset;",
"void main(void) {",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map == 0.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
"} else {",
"vec2 ofst = offset * halfUVSize * 2.0;",
"vec2 coord = vTextureCoord - ofst;",
"float distance = length(coord);",
"if (distance < radius) {",
"float ratio = (radius - distance) / radius;",
"float angleMod = ratio * ratio * angle;",
"float s = sin(angleMod);",
"float c = cos(angleMod);",
"coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);",
"}",
"if (coord.x + ofst.x >= 0.0 && coord.x + ofst.x <= 1.0 && coord.y + ofst.y >= 0.0 && coord.y + ofst.y <= 1.0) {",
"gl_FragColor = texture2D(uSampler, coord + ofst);",
"if(map < 1.0)",
"gl_FragColor = gl_FragColor * map + texture2D(uSampler, vTextureCoord) * (1.0 - map);",
"} else if(map < 1.0) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord) * (1.0 - map);",
"} else {",
"discard;",
"}",
"}",
"}",
];
};
a.TwistFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.TwistFilter.prototype.constructor = a.TwistFilter;
Object.defineProperty(a.TwistFilter.prototype, "offset", {
get: function () {
return this.uniforms.offset.value;
},
set: function (a) {
this.dirty = !0;
this.uniforms.offset.value = a;
},
});
Object.defineProperty(a.TwistFilter.prototype, "radius", {
get: function () {
return this.uniforms.radius.value;
},
set: function (a) {
this.dirty = !0;
this.uniforms.radius.value = a;
},
});
Object.defineProperty(a.TwistFilter.prototype, "angle", {
get: function () {
return this.uniforms.angle.value;
},
set: function (a) {
this.dirty = !0;
this.uniforms.angle.value = a;
},
});
Object.defineProperty(a.TwistFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.TwistFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.TwistFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.TwistFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
a.DotScreenFilter = function () {
a.AbstractFilter.call(this);
this.passes = [this];
this.uniforms = {
uMaskTexture: { type: "sampler2D", value: null },
uMaskTextureSet: { type: "1f", value: 0 },
uMaskTextureInvert: { type: "1f", value: 0 },
uMaskTextureScale: { type: "2fv", value: [1, 1] },
uMaskTextureOffset: { type: "2fv", value: [0.5, 0.5] },
halfUVSize: { type: "2fv", value: [0, 0] },
scale: { type: "1f", value: 1.047 },
angle: { type: "1f", value: 5 },
dimensions: { type: "4fv", value: [0, 0, 0, 0] },
};
this.fragmentSrc = [
"precision mediump float;",
"varying vec2 vTextureCoord;",
"varying vec4 vColor;",
"uniform vec4 dimensions;",
"uniform sampler2D uSampler;",
"uniform sampler2D uMaskTexture;",
"uniform float uMaskTextureSet;",
"uniform float uMaskTextureInvert;",
"uniform vec2 uMaskTextureScale;",
"uniform vec2 uMaskTextureOffset;",
"uniform vec2 halfUVSize;",
"uniform float angle;",
"uniform float scale;",
"float pattern() {",
"float s = sin(angle), c = cos(angle);",
"vec2 tex = vTextureCoord * dimensions.xy;",
"vec2 point = vec2(",
"c * tex.x - s * tex.y,",
"s * tex.x + c * tex.y",
") * scale;",
"return (sin(point.x) * sin(point.y)) * 4.0;",
"}",
"void main() {",
"vec4 color = texture2D(uSampler, vTextureCoord);",
"float map = 1.0;",
"if(uMaskTextureSet == 1.0) {",
"float mapRangeX = 1.0 / uMaskTextureScale.x;",
"float mapLeft = (1.0 - mapRangeX) * 0.5;",
"float mapRangeY = 1.0 / uMaskTextureScale.y;",
"float mapTop = (1.0 - mapRangeY) * 0.5;",
"map = texture2D(uMaskTexture, vec2(mapLeft - ((uMaskTextureOffset.x - 0.5) / uMaskTextureScale.x) + ((vTextureCoord.x / (halfUVSize.x * 2.0)) * mapRangeX), mapTop + ((uMaskTextureOffset.y - 0.5) / uMaskTextureScale.y) + ((vTextureCoord.y / (halfUVSize.y * 2.0)) * mapRangeY))).r;",
"if(uMaskTextureInvert == 1.0) map = 1.0 - map;",
"}",
"if(map == 0.0) {",
"gl_FragColor = color;",
"} else {",
"float average = (color.r + color.g + color.b) / 3.0;",
"gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);",
"if(map < 1.0)",
"gl_FragColor = gl_FragColor * map + color * (1.0 - map);",
"}",
"}",
];
};
a.DotScreenFilter.prototype = Object.create(a.AbstractFilter.prototype);
a.DotScreenFilter.prototype.constructor = a.DotScreenFilter;
Object.defineProperty(a.DotScreenFilter.prototype, "scale", {
get: function () {
return this.uniforms.scale.value;
},
set: function (a) {
this.dirty = !0;
this.uniforms.scale.value = Math.PI / a;
},
});
Object.defineProperty(a.DotScreenFilter.prototype, "angle", {
get: function () {
return this.uniforms.angle.value;
},
set: function (a) {
this.dirty = !0;
this.uniforms.angle.value = a;
},
});
Object.defineProperty(a.DotScreenFilter.prototype, "maskTexture", {
get: function () {
return this.uniforms.uMaskTexture.value;
},
set: function (a) {
this.uniforms.uMaskTexture.value = a;
this.uniforms.uMaskTextureSet.value = null != a ? 1 : 0;
},
});
Object.defineProperty(a.DotScreenFilter.prototype, "maskTextureInvert", {
get: function () {
return this.uniforms.uMaskTextureInvert.value;
},
set: function (a) {
this.uniforms.uMaskTextureInvert.value = a;
},
});
Object.defineProperty(a.DotScreenFilter.prototype, "maskTextureOffset", {
get: function () {
return this.uniforms.uMaskTextureOffset.value;
},
set: function (a) {
this.uniforms.uMaskTextureOffset.value = a;
this.dirty = !0;
},
});
Object.defineProperty(a.DotScreenFilter.prototype, "maskTextureScale", {
get: function () {
return this.uniforms.uMaskTextureScale.value;
},
set: function (a) {
this.uniforms.uMaskTextureScale.value = a;
this.dirty = !0;
},
});
"undefined" !== typeof exports ? ("undefined" !== typeof module && module.exports && (exports = module.exports = a), (exports.PIXI = a)) : "undefined" !== typeof define && define.amd ? define(a) : (this.PIXI = a);
}.call(this));
(function (a) {
function b() {
this.fontFamily = "fjs" + ((999999 * Math.random()) | 0);
}
if (!Object.defineProperty) throw "Font.js requires Object.defineProperty, which this browser does not support.";
if (!document.createElement("canvas").getContext) throw "Font.js requires <canvas> and the Canvas2D API, which this browser does not support.";
(function (a) {
function b(a, d) {
return this.slice(a, d);
}
function f(a, b) {
var d,
e = a.length;
2 > arguments.length && (b = 0);
for (d = 0; d < e; ++d, ++b) this[b] = a[d] & 255;
}
function g(a) {
var d, g;
if ("number" === typeof a) for (d = Array(a), g = 0; g < a; ++g) d[g] = 0;
else d = a.slice(0);
d.subarray = b;
d.buffer = d;
d.byteLength = d.length;
d.set = f;
"object" === typeof a && a.buffer && (d.buffer = a.buffer);
return d;
}
try {
new Uint8Array(1);
return;
} catch (k) {}
a.Uint8Array = g;
a.Uint32Array = g;
a.Int32Array = g;
})(a);
(function (a) {
a.opera ||
"response" in XMLHttpRequest.prototype ||
"mozResponseArrayBuffer" in XMLHttpRequest.prototype ||
"mozResponse" in XMLHttpRequest.prototype ||
"responseArrayBuffer" in XMLHttpRequest.prototype ||
Object.defineProperty(XMLHttpRequest.prototype, "response", {
get: a.VBArray
? function () {
return new Uint8Array(new VBArray(this.responseBody).toArray());
}
: function () {
this.responseBody;
},
});
})(a);
a.btoa ||
(a.btoa = function (a) {
var b,
f,
g,
k,
m = 0,
n = 0,
p = "",
p = [];
if (!a) return a;
do
(b = a.charCodeAt(m++)),
(f = a.charCodeAt(m++)),
(g = a.charCodeAt(m++)),
(k = (b << 16) | (f << 8) | g),
(b = (k >> 18) & 63),
(f = (k >> 12) & 63),
(g = (k >> 6) & 63),
(k &= 63),
(p[n++] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b) +
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f) +
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g) +
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(k));
while (m < a.length);
p = p.join("");
a = a.length % 3;
return (a ? p.slice(0, a - 3) : p) + "===".slice(a || 3);
});
b.prototype.url = "";
b.prototype.format = "";
b.prototype.data = "";
b.prototype.base64 =
"AAEAAAAKAIAAAwAgT1MvMgAAAAAAAACsAAAAWGNtYXAAAAAAAAABBAAAACxnbHlmAAAAAAAAATAAAAAQaGVhZAAAAAAAAAFAAAAAOGhoZWEAAAAAAAABeAAAACRobXR4AAAAAAAAAZwAAAAIbG9jYQAAAAAAAAGkAAAACG1heHAAAAAAAAABrAAAACBuYW1lAAAAAAAAAcwAAAAgcG9zdAAAAAAAAAHsAAAAEAAEAAEAZAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABAAMAAQAAAAwABAAgAAAABAAEAAEAAABB//8AAABB////wAABAAAAAAABAAAAAAAAAAAAAAAAMQAAAQAAAAAAAAAAAABfDzz1AAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAEAAgAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAIAAAAAQAAAAIAAQABAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAIAHgADAAEECQABAAAAAAADAAEECQACAAIAAAAAAAEAAAAAAAAAAAAAAAAAAA==";
b.prototype.metrics = { quadsize: 0, leading: 0, ascent: 0, descent: 0, weightclass: 400 };
b.prototype.systemfont = !1;
b.prototype.loaded = !1;
b.prototype.onload = function () {};
b.prototype.onerror = function () {};
b.prototype.canvas = !1;
b.prototype.context = !1;
b.prototype.validate = function (a, b, f, g, k) {
if (!1 !== k && 0 > k) this.onerror("Requested system font '" + this.fontFamily + "' could not be loaded (it may not be installed).");
else
0 < getComputedStyle(a, null).getPropertyValue("width").replace("px", "")
? (document.head.removeChild(b), document.body.removeChild(a), (this.loaded = !0), this.onload())
: (console.log("timing out"),
setTimeout(function () {
g.validate(a, b, f, g, !1 === k ? !1 : k - 50);
}, 1e3));
};
b.prototype.ondownloaded = function () {
var a = this,
b = function (a) {
return String.fromCharCode(a);
},
f = function (a) {
if (256 > a) return b(0) + b(a);
var d = a & 255;
return b(a >> 8) + b(d);
},
g = function (a, b) {
var d = 1 === a >> 7,
e;
e = 256 * (a & 127) + b;
return d ? e - 32768 : e;
},
k = b(0) + b(1) + b(0) + b(0),
m = this.data,
n = b(m[0]) + b(m[1]) + b(m[2]) + b(m[3]),
n = (k = n === k) ? !1 : "OTTO" === n;
if (k) this.format = "truetype";
else if (n) this.format = "opentype";
else {
a.onerror("Error: file at " + this.url + " cannot be interpreted as OpenType font.");
return;
}
for (var n = 256 * m[4] + m[5], p = 12 + 16 * n, q = {}, k = 12; k < p; k += 16)
(n = b(m[k]) + b(m[k + 1]) + b(m[k + 2]) + b(m[k + 3])),
(q[n] = {
name: n,
checksum: 16777216 * m[k + 4] + 65536 * m[k + 5] + 256 * m[k + 6] + m[k + 7],
offset: 16777216 * m[k + 8] + 65536 * m[k + 9] + 256 * m[k + 10] + m[k + 11],
length: 16777216 * m[k + 12] + 65536 * m[k + 13] + 256 * m[k + 14] + m[k + 15],
});
p = function (b) {
return q[b] ? b : (a.onerror("Error: font is missing the required OpenType '" + b + "' table."), !1);
};
n = p("head");
if (!1 !== n) {
k = q[n].offset;
q[n].version = "" + m[k] + m[k + 1] + m[k + 2] + m[k + 3];
var r = 256 * m[k + 18] + m[k + 19];
this.metrics.quadsize = r;
n = p("hhea");
if (
!1 !== n &&
((k = q[n].offset),
(q[n].version = "" + m[k] + m[k + 1] + m[k + 2] + m[k + 3]),
(this.metrics.ascent = g(m[k + 4], m[k + 5]) / r),
(this.metrics.descent = g(m[k + 6], m[k + 7]) / r),
(this.metrics.leading = g(m[k + 8], m[k + 9]) / r),
(n = p("OS/2")),
!1 !== n && ((k = q[n].offset), (q[n].version = "" + m[k] + m[k + 1]), (this.metrics.weightclass = 256 * m[k + 4] + m[k + 5]), (n = p("cmap")), !1 !== n))
) {
k = q[n].offset;
q[n].version = "" + m[k] + m[k + 1];
for (var n = 256 * m[k + 2] + m[k + 3], t, u, p = !1, g = 0; g < n; g++)
(t = k + 4 + 8 * g), (r = 256 * m[t] + m[t + 1]), (u = 256 * m[t + 2] + m[t + 3]), (t = 16777216 * m[t + 4] + 65536 * m[t + 5] + 256 * m[t + 6] + m[t + 7]), 3 === r && 1 === u && (p = t);
g = "A";
if (!1 !== p && ((k += p), (n = 256 * m[k] + m[k + 1]), 4 === n)) {
n = k + 14;
p = k + 14 + ((256 * m[k + 6] + m[k + 7]) / 2) * 2;
for (k = !1; n < p; n += 2) {
k = 256 * m[n] + m[n + 1];
if (-1 === [9, 10, 11, 12, 13, 32, 133, 160, 5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288].indexOf(k)) break;
k = !1;
}
0 != k &&
((g = String.fromCharCode(k)),
(m = (-(k - 1) + 65536) % 65536),
(f = b(0) + f(k) + f(65535) + f(0) + f(k) + f(65535) + f(m) + f(1)),
(f = btoa(f)),
(this.base64 = this.base64.substring(0, 380) + f + this.base64.substring(380 + f.length)));
}
this.bootstrapValidation(g, 150);
}
}
};
b.prototype.bootstrapValidation = function (a, b) {
var f = this.fontFamily + " testfont",
g = document.createElement("style");
g.setAttribute("type", "text/css");
g.innerHTML = "@font-face {\n font-family: '" + f + "';\n src: url('data:application/x-font-ttf;base64," + this.base64 + "')\n format('truetype');}";
document.head.appendChild(g);
var k = !1;
this.systemfont || ((k = this.toStyleNode()), document.head.appendChild(k));
var m = document.createElement("p");
m.style.cssText = "position: absolute; top: 0; left: 0; opacity: 0;";
m.style.fontFamily = "'" + this.fontFamily + "', '" + f + "'";
m.innerHTML = a + a + a + a + a + a + a + a + a + a;
document.body.appendChild(m);
if ("undefined" === typeof getComputedStyle) this.onload(), error("Error: getComputedStyle is not supported by this browser.\nConsequently, Font.onload() cannot be trusted.");
else {
var f = this.systemfont ? 1e3 : this.metrics.quadsize,
n = document.createElement("canvas");
n.width = f;
n.height = f;
this.canvas = n;
n = n.getContext("2d");
n.font = "1em '" + this.fontFamily + "'";
n.fillStyle = "white";
n.fillRect(-1, -1, f + 2, f + 2);
n.fillStyle = "black";
n.fillText("test text", 50, f / 2);
this.context = n;
var p = this;
setTimeout(
function () {
p.validate(m, g, k, p, b);
},
DEVICE.mobile ? 3e3 : 1e3
);
}
};
b.prototype.processSystemFont = function () {
this.systemfont = !0;
this.metrics = !1;
this.bootstrapValidation("A", 10);
};
b.prototype.loadFont = function () {
var a = this;
if (-1 === this.url.indexOf("."))
setTimeout(function () {
a.processSystemFont();
}, 10);
else {
var b = new XMLHttpRequest();
b.open("GET", a.url, !0);
b.responseType = "arraybuffer";
b.onload = function (f) {
if ((f = b.response)) (a.data = new Uint8Array(f)), a.ondownloaded();
else a.onerror("Error downloading font resource from " + a.url);
};
b.send(null);
}
};
b.prototype.styleNode = !1;
b.prototype.toStyleNode = function () {
if (this.styleNode) return this.styleNode;
this.styleNode = document.createElement("style");
this.styleNode.type = "text/css";
var a;
a = "@font-face {\n" + (" font-family: '" + this.fontFamily + "';\n");
a += " src: url('" + this.url + "') format('" + this.format + "');\n";
this.styleNode.innerHTML = a + "}";
return this.styleNode;
};
b.prototype.measureText = function (a, b) {
if (!this.loaded) return this.onerror("measureText() was called while the font was not yet loaded"), !1;
this.context.font = b + "px '" + this.fontFamily + "'";
var f = this.context.measureText(a);
f.fontsize = b;
f.ascent = 0;
f.descent = 0;
f.bounds = { minx: 0, maxx: f.width, miny: 0, maxy: 0 };
f.height = 0;
var g = [];
g.push(a);
var k = g.length,
m;
for (m = 0; m < k; m++) this.measureSegment(g[m], b, f);
return f;
};
b.prototype.measureSegment = function (a, b, f) {
var g,
k = document.createElement("div");
k.style.position = "absolute";
k.style.opacity = 0;
k.style.font = b + "px '" + this.fontFamily + "'";
k.innerHTML = a;
for (g = 1; 10 > g; g++) k.innerHTML += "<br/>" + a;
document.body.appendChild(k);
f.leading = 1.2 * b;
g = document.defaultView.getComputedStyle(k, null).getPropertyValue("height");
g = g.replace("px", "");
g >= 10 * b && (f.leading = (g / 10) | 0);
document.body.removeChild(k);
if (/^\s*$/.test(a)) return f;
g = this.context;
var m = this.systemfont ? 1e3 : this.metrics.quadsize,
k = m / 2,
n = (m - f.width) / 2;
n !== (n | 0) && (n |= 0);
g.fillStyle = "white";
g.fillRect(-50, -50, m + 100, m + 100);
g.fillStyle = "black";
g.fillText(a, n, k);
a = (f.width + 50) | 0;
var p = 4 * b;
b = g.getImageData(n - 25, k - p / 2, a, p).data;
k = g = 0;
n = 4 * a;
m = b.length;
for (p /= 2; ++g < m && 255 === b[g]; );
var q = (g / n) | 0;
for (g = m - 1; 0 < --g && 255 === b[g]; );
for (var r = (g / n) | 0, k = (g = 0); k < a && 255 === b[g]; ) (g += n), g >= m && (k++, (g = g - m + 4));
var t = k,
u = 1;
g = m - 3;
for (k = 0; k < a && 255 === b[g]; ) (g -= n), 0 > g && (k++, (g = m - 3 - 4 * u++));
f.ascent = p - q;
f.descent = r - p;
f.bounds = { minx: t - 25, maxx: a - k - 25, miny: -f.descent, maxy: f.ascent };
f.height = 1 + (r - q);
return f;
};
Object.defineProperty(b.prototype, "src", {
set: function (a) {
this.url = a;
this.loadFont();
},
});
"undefined" !== typeof define
? define(function () {
return b;
})
: (a.Font = b);
})(window);
function AppMeasurement() {
var a = this;
a.version = "1.3.2";
var b = window;
b.s_c_in || ((b.s_c_il = []), (b.s_c_in = 0));
a._il = b.s_c_il;
a._in = b.s_c_in;
a._il[a._in] = a;
b.s_c_in++;
a._c = "s_c";
var d = b.ob;
d || (d = null);
var e = b,
f,
g;
try {
for (f = e.parent, g = e.location; f && f.location && g && "" + f.location != "" + g && e.location && "" + f.location != "" + e.location && f.location.host == g.host; ) (e = f), (f = e.parent);
} catch (k) {}
a.Za = function (a) {
try {
console.log(a);
} catch (b) {}
};
a.oa = function (a) {
return "" + parseInt(a) == "" + a;
};
a.replace = function (a, b, d) {
return !a || 0 > a.indexOf(b) ? a : a.split(b).join(d);
};
a.escape = function (b) {
var d, e;
if (!b) return b;
b = encodeURIComponent(b);
for (d = 0; 7 > d; d++) (e = "+~!*()'".substring(d, d + 1)), 0 <= b.indexOf(e) && (b = a.replace(b, e, "%" + e.charCodeAt(0).toString(16).toUpperCase()));
return b;
};
a.unescape = function (b) {
if (!b) return b;
b = 0 <= b.indexOf("+") ? a.replace(b, "+", " ") : b;
try {
return decodeURIComponent(b);
} catch (d) {}
return unescape(b);
};
a.Qa = function () {
var d = b.location.hostname,
e = a.fpCookieDomainPeriods,
f;
e || (e = a.cookieDomainPeriods);
if (d && !a.ha && !/^[0-9.]+$/.test(d) && ((e = e ? parseInt(e) : 2), (e = 2 < e ? e : 2), (f = d.lastIndexOf(".")), 0 <= f)) {
for (; 0 <= f && 1 < e; ) (f = d.lastIndexOf(".", f - 1)), e--;
a.ha = 0 < f ? d.substring(f) : d;
}
return a.ha;
};
a.c_r = a.cookieRead = function (b) {
b = a.escape(b);
var d = " " + a.d.cookie,
e = d.indexOf(" " + b + "="),
f = 0 > e ? e : d.indexOf(";", e);
b = 0 > e ? "" : a.unescape(d.substring(e + 2 + b.length, 0 > f ? d.length : f));
return "[[B]]" != b ? b : "";
};
a.c_w = a.cookieWrite = function (b, d, e) {
var f = a.Qa(),
g = a.cookieLifetime,
k;
d = "" + d;
g = g ? ("" + g).toUpperCase() : "";
e &&
"SESSION" != g &&
"NONE" != g &&
((k = "" != d ? parseInt(g ? g : 0) : -60) ? ((e = new Date()), e.setTime(e.getTime() + 1e3 * k)) : 1 == e && ((e = new Date()), (k = e.getYear()), e.setYear(k + 5 + (1900 > k ? 1900 : 0))));
return b && "NONE" != g ? ((a.d.cookie = b + "=" + a.escape("" != d ? d : "[[B]]") + "; path=/;" + (e && "SESSION" != g ? " expires=" + e.toGMTString() + ";" : "") + (f ? " domain=" + f + ";" : "")), a.cookieRead(b) == d) : 0;
};
a.D = [];
a.C = function (b, d, e) {
if (a.ia) return 0;
a.maxDelay || (a.maxDelay = 250);
var f = 0,
g = new Date().getTime() + a.maxDelay,
k = a.d.mb,
m = ["webkitvisibilitychange", "visibilitychange"];
k || (k = a.d.nb);
if (k && "prerender" == k) {
if (!a.V)
for (a.V = 1, e = 0; e < m.length; e++)
a.d.addEventListener(m[e], function () {
var b = a.d.mb;
b || (b = a.d.nb);
"visible" == b && ((a.V = 0), a.delayReady());
});
f = 1;
g = 0;
} else e || (a.r("_d") && (f = 1));
f && (a.D.push({ m: b, a: d, t: g }), a.V || setTimeout(a.delayReady, a.maxDelay));
return f;
};
a.delayReady = function () {
var b = new Date().getTime(),
d = 0,
e;
for (a.r("_d") && (d = 1); 0 < a.D.length; ) {
e = a.D.shift();
if (d && !e.t && e.t > b) {
a.D.unshift(e);
setTimeout(a.delayReady, parseInt(a.maxDelay / 2));
break;
}
a.ia = 1;
a[e.m].apply(a, e.a);
a.ia = 0;
}
};
a.setAccount = a.sa = function (b) {
var d, e;
if (!a.C("setAccount", arguments))
if (((a.account = b), a.allAccounts)) for (d = a.allAccounts.concat(b.split(",")), a.allAccounts = [], d.sort(), e = 0; e < d.length; e++) (0 != e && d[e - 1] == d[e]) || a.allAccounts.push(d[e]);
else a.allAccounts = b.split(",");
};
a.foreachVar = function (b, d) {
var e,
f,
g,
k,
m = "";
g = f = "";
if (a.lightProfileID) (e = a.H), (m = a.lightTrackVars) && (m = "," + m + "," + a.Y.join(",") + ",");
else {
e = a.c;
if (a.pe || a.linkType) if (((m = a.linkTrackVars), (f = a.linkTrackEvents), a.pe && ((g = a.pe.substring(0, 1).toUpperCase() + a.pe.substring(1)), a[g]))) (m = a[g].lb), (f = a[g].kb);
m && (m = "," + m + "," + a.A.join(",") + ",");
f && m && (m += ",events,");
}
d && (d = "," + d + ",");
for (f = 0; f < e.length; f++) (g = e[f]), (k = a[g]) && (!m || 0 <= m.indexOf("," + g + ",")) && (!d || 0 <= d.indexOf("," + g + ",")) && b(g, k);
};
a.J = function (b, d, e, f, g) {
var k = "",
m,
A,
C,
E,
F = 0;
"contextData" == b && (b = "c");
if (d) {
for (m in d)
if (!(Object.prototype[m] || (g && m.substring(0, g.length) != g)) && d[m] && (!e || 0 <= e.indexOf("," + (f ? f + "." : "") + m + ","))) {
C = !1;
if (F) for (A = 0; A < F.length; A++) m.substring(0, F[A].length) == F[A] && (C = !0);
if (!C && ("" == k && (k += "&" + b + "."), (A = d[m]), g && (m = m.substring(g.length)), 0 < m.length))
if (((C = m.indexOf(".")), 0 < C)) (A = m.substring(0, C)), (C = (g ? g : "") + A + "."), F || (F = []), F.push(C), (k += a.J(A, d, e, f, C));
else if (("boolean" == typeof A && (A = A ? "true" : "false"), A)) {
if ("retrieveLightData" == f && 0 > g.indexOf(".contextData."))
switch (((C = m.substring(0, 4)), (E = m.substring(4)), m)) {
case "transactionID":
m = "xact";
break;
case "channel":
m = "ch";
break;
case "campaign":
m = "v0";
break;
default:
a.oa(E) && ("prop" == C ? (m = "c" + E) : "eVar" == C ? (m = "v" + E) : "list" == C ? (m = "l" + E) : "hier" == C && ((m = "h" + E), (A = A.substring(0, 255))));
}
k += "&" + a.escape(m) + "=" + a.escape(A);
}
}
"" != k && (k += "&." + b);
}
return k;
};
a.Sa = function () {
var b = "",
d,
e,
f,
g,
k,
m,
A,
C,
E = "",
F = "",
D = (e = "");
if (a.lightProfileID) (d = a.H), (E = a.lightTrackVars) && (E = "," + E + "," + a.Y.join(",") + ",");
else {
d = a.c;
if (a.pe || a.linkType) if (((E = a.linkTrackVars), (F = a.linkTrackEvents), a.pe && ((e = a.pe.substring(0, 1).toUpperCase() + a.pe.substring(1)), a[e]))) (E = a[e].lb), (F = a[e].kb);
E && (E = "," + E + "," + a.A.join(",") + ",");
F && ((F = "," + F + ","), E && (E += ",events,"));
a.events2 && (D += ("" != D ? "," : "") + a.events2);
}
a.AudienceManagement && a.AudienceManagement.isReady() && (b += a.J("d", a.AudienceManagement.getEventCallConfigParams()));
for (e = 0; e < d.length; e++) {
g = d[e];
k = a[g];
f = g.substring(0, 4);
m = g.substring(4);
!k && "events" == g && D && ((k = D), (D = ""));
if (k && (!E || 0 <= E.indexOf("," + g + ","))) {
switch (g) {
case "supplementalDataID":
g = "sdid";
break;
case "timestamp":
g = "ts";
break;
case "dynamicVariablePrefix":
g = "D";
break;
case "visitorID":
g = "vid";
break;
case "marketingCloudVisitorID":
g = "mid";
break;
case "analyticsVisitorID":
g = "aid";
break;
case "audienceManagerLocationHint":
g = "aamlh";
break;
case "audienceManagerBlob":
g = "aamb";
break;
case "pageURL":
g = "g";
255 < k.length && ((a.pageURLRest = k.substring(255)), (k = k.substring(0, 255)));
break;
case "pageURLRest":
g = "-g";
break;
case "referrer":
g = "r";
break;
case "vmk":
case "visitorMigrationKey":
g = "vmt";
break;
case "visitorMigrationServer":
g = "vmf";
a.ssl && a.visitorMigrationServerSecure && (k = "");
break;
case "visitorMigrationServerSecure":
g = "vmf";
!a.ssl && a.visitorMigrationServer && (k = "");
break;
case "charSet":
g = "ce";
break;
case "visitorNamespace":
g = "ns";
break;
case "cookieDomainPeriods":
g = "cdp";
break;
case "cookieLifetime":
g = "cl";
break;
case "variableProvider":
g = "vvp";
break;
case "currencyCode":
g = "cc";
break;
case "channel":
g = "ch";
break;
case "transactionID":
g = "xact";
break;
case "campaign":
g = "v0";
break;
case "resolution":
g = "s";
break;
case "colorDepth":
g = "c";
break;
case "javascriptVersion":
g = "j";
break;
case "javaEnabled":
g = "v";
break;
case "cookiesEnabled":
g = "k";
break;
case "browserWidth":
g = "bw";
break;
case "browserHeight":
g = "bh";
break;
case "connectionType":
g = "ct";
break;
case "homepage":
g = "hp";
break;
case "plugins":
g = "p";
break;
case "events":
D && (k += ("" != k ? "," : "") + D);
if (F)
for (m = k.split(","), k = "", f = 0; f < m.length; f++)
(A = m[f]), (C = A.indexOf("=")), 0 <= C && (A = A.substring(0, C)), (C = A.indexOf(":")), 0 <= C && (A = A.substring(0, C)), 0 <= F.indexOf("," + A + ",") && (k += (k ? "," : "") + m[f]);
break;
case "events2":
k = "";
break;
case "contextData":
b += a.J("c", a[g], E, g);
k = "";
break;
case "lightProfileID":
g = "mtp";
break;
case "lightStoreForSeconds":
g = "mtss";
a.lightProfileID || (k = "");
break;
case "lightIncrementBy":
g = "mti";
a.lightProfileID || (k = "");
break;
case "retrieveLightProfiles":
g = "mtsr";
break;
case "deleteLightProfiles":
g = "mtsd";
break;
case "retrieveLightData":
a.retrieveLightProfiles && (b += a.J("mts", a[g], E, g));
k = "";
break;
default:
a.oa(m) && ("prop" == f ? (g = "c" + m) : "eVar" == f ? (g = "v" + m) : "list" == f ? (g = "l" + m) : "hier" == f && ((g = "h" + m), (k = k.substring(0, 255))));
}
k && (b += "&" + g + "=" + ("pev" != g.substring(0, 3) ? a.escape(k) : k));
}
"pev3" == g && a.g && (b += a.g);
}
return b;
};
a.v = function (a) {
var b = a.tagName;
if ("undefined" != "" + a.sb || ("undefined" != "" + a.eb && "HTML" != ("" + a.eb).toUpperCase())) return "";
b = b && b.toUpperCase ? b.toUpperCase() : "";
"SHAPE" == b && (b = "");
b && (("INPUT" == b || "BUTTON" == b) && a.type && a.type.toUpperCase ? (b = a.type.toUpperCase()) : !b && a.href && (b = "A"));
return b;
};
a.ka = function (a) {
var b = a.href ? a.href : "",
d,
e,
f;
d = b.indexOf(":");
e = b.indexOf("?");
f = b.indexOf("/");
b &&
(0 > d || (0 <= e && d > e) || (0 <= f && d > f)) &&
((e = a.protocol && 1 < a.protocol.length ? a.protocol : l.protocol ? l.protocol : ""),
(d = l.pathname.lastIndexOf("/")),
(b = (e ? e + "//" : "") + (a.host ? a.host : l.host ? l.host : "") + ("/" != h.substring(0, 1) ? l.pathname.substring(0, 0 > d ? 0 : d) + "/" : "") + b));
return b;
};
a.F = function (b) {
var d = a.v(b),
e,
f,
g = "",
k = 0;
return d &&
((e = b.protocol),
(f = b.onclick),
!b.href || ("A" != d && "AREA" != d) || (f && e && !(0 > e.toLowerCase().indexOf("javascript")))
? f
? ((g = a.replace(a.replace(a.replace(a.replace("" + f, "\r", ""), "\n", ""), "\t", ""), " ", "")), (k = 2))
: "INPUT" == d || "SUBMIT" == d
? (b.value ? (g = b.value) : b.innerText ? (g = b.innerText) : b.textContent && (g = b.textContent), (k = 3))
: b.src && "IMAGE" == d && (g = b.src)
: (g = a.ka(b)),
g)
? { id: g.substring(0, 100), type: k }
: 0;
};
a.pb = function (b) {
for (var d = a.v(b), e = a.F(b); b && !e && "BODY" != d; ) if ((b = b.parentElement ? b.parentElement : b.parentNode)) (d = a.v(b)), (e = a.F(b));
(e && "BODY" != d) || (b = 0);
b && ((d = b.onclick ? "" + b.onclick : ""), 0 <= d.indexOf(".tl(") || 0 <= d.indexOf(".trackLink(")) && (b = 0);
return b;
};
a.bb = function () {
var d,
e,
f = a.linkObject,
g = a.linkType,
k = a.linkURL,
m,
B;
a.Z = 1;
f || ((a.Z = 0), (f = a.j));
if (f) {
d = a.v(f);
for (e = a.F(f); f && !e && "BODY" != d; ) if ((f = f.parentElement ? f.parentElement : f.parentNode)) (d = a.v(f)), (e = a.F(f));
(e && "BODY" != d) || (f = 0);
if (f) {
var A = f.onclick ? "" + f.onclick : "";
if (0 <= A.indexOf(".tl(") || 0 <= A.indexOf(".trackLink(")) f = 0;
}
} else a.Z = 1;
!k && f && (k = a.ka(f));
k && !a.linkLeaveQueryString && ((m = k.indexOf("?")), 0 <= m && (k = k.substring(0, m)));
if (!g && k) {
var C = 0,
E = 0,
F;
if (a.trackDownloadLinks && a.linkDownloadFileTypes)
for (
A = k.toLowerCase(), m = A.indexOf("?"), B = A.indexOf("#"), 0 <= m ? 0 <= B && B < m && (m = B) : (m = B), 0 <= m && (A = A.substring(0, m)), m = a.linkDownloadFileTypes.toLowerCase().split(","), B = 0;
B < m.length;
B++
)
(F = m[B]) && A.substring(A.length - (F.length + 1)) == "." + F && (g = "d");
if (
a.trackExternalLinks &&
!g &&
((A = k.toLowerCase()), a.na(A)) &&
(a.linkInternalFilters || (a.linkInternalFilters = b.location.hostname),
(m = 0),
a.linkExternalFilters ? ((m = a.linkExternalFilters.toLowerCase().split(",")), (C = 1)) : a.linkInternalFilters && (m = a.linkInternalFilters.toLowerCase().split(",")),
m)
) {
for (B = 0; B < m.length; B++) (F = m[B]), 0 <= A.indexOf(F) && (E = 1);
E ? C && (g = "e") : C || (g = "e");
}
}
a.linkObject = f;
a.linkURL = k;
a.linkType = g;
if (a.trackClickMap || a.trackInlineStats)
if (((a.g = ""), f))
(g = a.pageName),
(k = 1),
(f = f.sourceIndex),
g || ((g = a.pageURL), (k = 0)),
b.s_objectID && ((e.id = b.s_objectID), (f = e.type = 1)),
g && e && e.id && d && (a.g = "&pid=" + a.escape(g.substring(0, 255)) + (k ? "&pidt=" + k : "") + "&oid=" + a.escape(e.id.substring(0, 100)) + (e.type ? "&oidt=" + e.type : "") + "&ot=" + d + (f ? "&oi=" + f : ""));
};
a.Ta = function () {
var b = a.Z,
d = a.linkType,
e = a.linkURL,
f = a.linkName;
d && (e || f) && ((d = d.toLowerCase()), "d" != d && "e" != d && (d = "o"), (a.pe = "lnk_" + d), (a.pev1 = e ? a.escape(e) : ""), (a.pev2 = f ? a.escape(f) : ""), (b = 1));
a.abort && (b = 0);
if (a.trackClickMap || a.trackInlineStats) {
var d = {},
e = 0,
g = a.cookieRead("s_sq"),
k = g ? g.split("&") : 0,
m,
A,
C,
g = 0;
if (k) for (m = 0; m < k.length; m++) (A = k[m].split("=")), (f = a.unescape(A[0]).split(",")), (A = a.unescape(A[1])), (d[A] = f);
f = a.account.split(",");
if (b || a.g) {
b && !a.g && (g = 1);
for (A in d)
if (!Object.prototype[A])
for (m = 0; m < f.length; m++)
for (g && ((C = d[A].join(",")), C == a.account && ((a.g += ("&" != A.charAt(0) ? "&" : "") + A), (d[A] = []), (e = 1))), k = 0; k < d[A].length; k++)
(C = d[A][k]), C == f[m] && (g && (a.g += "&u=" + a.escape(C) + ("&" != A.charAt(0) ? "&" : "") + A + "&u=0"), d[A].splice(k, 1), (e = 1));
b || (e = 1);
if (e) {
g = "";
m = 2;
!b && a.g && ((g = a.escape(f.join(",")) + "=" + a.escape(a.g)), (m = 1));
for (A in d) !Object.prototype[A] && 0 < m && 0 < d[A].length && ((g += (g ? "&" : "") + a.escape(d[A].join(",")) + "=" + a.escape(A)), m--);
a.cookieWrite("s_sq", g);
}
}
}
return b;
};
a.Ua = function () {
if (!a.jb) {
var b = new Date(),
d = e.location,
f,
g,
k,
m = (f = ""),
B = "",
A = "",
C = "1.2",
E = a.cookieWrite("s_cc", "true", 0) ? "Y" : "N",
F = "",
D = "",
H = 0;
if (b.setUTCDate && ((C = "1.3"), H.toPrecision && ((C = "1.5"), (f = []), f.forEach))) {
C = "1.6";
k = 0;
g = {};
try {
(k = new Iterator(g)), k.next && ((C = "1.7"), f.reduce && ((C = "1.8"), C.trim && ((C = "1.8.1"), Date.parse && ((C = "1.8.2"), Object.create && (C = "1.8.5")))));
} catch (I) {}
}
f = screen.width + "x" + screen.height;
k = navigator.javaEnabled() ? "Y" : "N";
g = screen.pixelDepth ? screen.pixelDepth : screen.colorDepth;
B = a.w.innerWidth ? a.w.innerWidth : a.d.documentElement.offsetWidth;
A = a.w.innerHeight ? a.w.innerHeight : a.d.documentElement.offsetHeight;
b = navigator.plugins;
try {
a.b.addBehavior("#default#homePage"), (F = a.b.qb(d) ? "Y" : "N");
} catch (L) {}
try {
a.b.addBehavior("#default#clientCaps"), (D = a.b.connectionType);
} catch (J) {}
if (b)
for (; H < b.length && 30 > H; ) {
if ((d = b[H].name)) (d = d.substring(0, 100) + ";"), 0 > m.indexOf(d) && (m += d);
H++;
}
a.resolution = f;
a.colorDepth = g;
a.javascriptVersion = C;
a.javaEnabled = k;
a.cookiesEnabled = E;
a.browserWidth = B;
a.browserHeight = A;
a.connectionType = D;
a.homepage = F;
a.plugins = m;
a.jb = 1;
}
};
a.I = {};
a.loadModule = function (d, e) {
var f = a.I[d];
if (!f) {
f = b["AppMeasurement_Module_" + d] ? new b["AppMeasurement_Module_" + d](a) : {};
a.I[d] = a[d] = f;
f.Ba = function () {
return f.Ea;
};
f.Fa = function (b) {
if ((f.Ea = b)) (a[d + "_onLoad"] = b), a.C(d + "_onLoad", [a, f], 1) || b(a, f);
};
try {
Object.defineProperty ? Object.defineProperty(f, "onLoad", { get: f.Ba, set: f.Fa }) : (f._olc = 1);
} catch (g) {
f._olc = 1;
}
}
e && ((a[d + "_onLoad"] = e), a.C(d + "_onLoad", [a, f], 1) || e(a, f));
};
a.r = function (b) {
var d, e;
for (d in a.I) if (!Object.prototype[d] && (e = a.I[d]) && (e._olc && e.onLoad && ((e._olc = 0), e.onLoad(a, e)), e[b] && e[b]())) return 1;
return 0;
};
a.Xa = function () {
var b = Math.floor(1e13 * Math.random()),
d = a.visitorSampling,
e = a.visitorSamplingGroup,
e = "s_vsn_" + (a.visitorNamespace ? a.visitorNamespace : a.account) + (e ? "_" + e : ""),
f = a.cookieRead(e);
if (d) {
f && (f = parseInt(f));
if (!f) {
if (!a.cookieWrite(e, b)) return 0;
f = b;
}
if (f % 1e4 > v) return 0;
}
return 1;
};
a.K = function (b, d) {
var e, f, g, k, m, A;
for (e = 0; 2 > e; e++)
for (f = 0 < e ? a.ea : a.c, g = 0; g < f.length; g++)
if (((k = f[g]), (m = b[k]) || b["!" + k])) {
if (!d && ("contextData" == k || "retrieveLightData" == k) && a[k]) for (A in a[k]) m[A] || (m[A] = a[k][A]);
a[k] = m;
}
};
a.wa = function (b, d) {
var e, f, g, k;
for (e = 0; 2 > e; e++) for (f = 0 < e ? a.ea : a.c, g = 0; g < f.length; g++) (k = f[g]), (b[k] = a[k]), d || b[k] || (b["!" + k] = 1);
};
a.Pa = function (a) {
var b,
d,
e,
f,
g,
k = 0,
m,
C = "",
E = "";
if (
a &&
255 < a.length &&
((b = "" + a),
(d = b.indexOf("?")),
0 < d &&
((m = b.substring(d + 1)),
(b = b.substring(0, d)),
(f = b.toLowerCase()),
(e = 0),
"http://" == f.substring(0, 7) ? (e += 7) : "https://" == f.substring(0, 8) && (e += 8),
(d = f.indexOf("/", e)),
0 < d && ((f = f.substring(e, d)), (g = b.substring(d)), (b = b.substring(0, d)), 0 <= f.indexOf("google") ? (k = ",q,ie,start,search_key,word,kw,cd,") : 0 <= f.indexOf("yahoo.co") && (k = ",p,ei,"), k && m)))
) {
if ((a = m.split("&")) && 1 < a.length) {
for (e = 0; e < a.length; e++) (f = a[e]), (d = f.indexOf("=")), 0 < d && 0 <= k.indexOf("," + f.substring(0, d) + ",") ? (C += (C ? "&" : "") + f) : (E += (E ? "&" : "") + f);
C && E ? (m = C + "&" + E) : (E = "");
}
d = 253 - (m.length - E.length) - b.length;
a = b + (0 < d ? g.substring(0, d) : "") + "?" + m;
}
return a;
};
a.S = !1;
a.O = !1;
a.Da = function (b) {
a.marketingCloudVisitorID = b;
a.O = !0;
a.l();
};
a.P = !1;
a.L = !1;
a.ya = function (b) {
a.analyticsVisitorID = b;
a.L = !0;
a.l();
};
a.R = !1;
a.N = !1;
a.Aa = function (b) {
a.audienceManagerLocationHint = b;
a.N = !0;
a.l();
};
a.Q = !1;
a.M = !1;
a.za = function (b) {
a.audienceManagerBlob = b;
a.M = !0;
a.l();
};
a.isReadyToTrack = function () {
var b = !0,
d = a.visitor;
d &&
d.isAllowed() &&
(!a.S && !a.marketingCloudVisitorID && d.getMarketingCloudVisitorID && ((a.S = !0), (a.marketingCloudVisitorID = d.getMarketingCloudVisitorID([a, a.Da])), a.marketingCloudVisitorID) && (a.O = !0),
!a.P && !a.analyticsVisitorID && d.getAnalyticsVisitorID && ((a.P = !0), (a.analyticsVisitorID = d.getAnalyticsVisitorID([a, a.ya])), a.analyticsVisitorID) && (a.L = !0),
!a.R && !a.audienceManagerLocationHint && d.getAudienceManagerLocationHint && ((a.R = !0), (a.audienceManagerLocationHint = d.getAudienceManagerLocationHint([a, a.Aa])), a.audienceManagerLocationHint) && (a.N = !0),
!a.Q && !a.audienceManagerBlob && d.getAudienceManagerBlob && ((a.Q = !0), (a.audienceManagerBlob = d.getAudienceManagerBlob([a, a.za])), a.audienceManagerBlob) && (a.M = !0),
(a.S && !a.O && !a.marketingCloudVisitorID) || (a.P && !a.L && !a.analyticsVisitorID) || (a.R && !a.N && !a.audienceManagerLocationHint) || (a.Q && !a.M && !a.audienceManagerBlob)) &&
(b = !1);
return b;
};
a.k = d;
a.o = 0;
a.callbackWhenReadyToTrack = function (b, e, f) {
var g;
g = {};
g.Ja = b;
g.Ia = e;
g.Ga = f;
a.k == d && (a.k = []);
a.k.push(g);
0 == a.o && (a.o = setInterval(a.l, 100));
};
a.l = function () {
var b;
if (a.isReadyToTrack() && (a.o && (clearInterval(a.o), (a.o = 0)), a.k != d)) for (; 0 < a.k.length; ) (b = a.k.shift()), b.Ia.apply(b.Ja, b.Ga);
};
a.Ca = function (b) {
var e,
f,
g = d,
k = d;
if (!a.isReadyToTrack()) {
e = [];
if (b != d) for (f in ((g = {}), b)) g[f] = b[f];
k = {};
a.wa(k, !0);
e.push(g);
e.push(k);
a.callbackWhenReadyToTrack(a, a.track, e);
return !0;
}
return !1;
};
a.Ra = function () {
var b = a.cookieRead("s_fid"),
d = "",
e = "",
f;
f = 8;
var g = 4;
if (!b || 0 > b.indexOf("-")) {
for (b = 0; 16 > b; b++) (f = Math.floor(Math.random() * f)), (d += "0123456789ABCDEF".substring(f, f + 1)), (f = Math.floor(Math.random() * g)), (e += "0123456789ABCDEF".substring(f, f + 1)), (f = g = 16);
b = d + "-" + e;
}
a.cookieWrite("s_fid", b, 1) || (b = 0);
return b;
};
a.t = a.track = function (d, f) {
var g,
k = new Date(),
m = "s" + (Math.floor(k.getTime() / 108e5) % 10) + Math.floor(1e13 * Math.random()),
u = k.getYear(),
u = "t=" + a.escape(k.getDate() + "/" + k.getMonth() + "/" + (1900 > u ? u + 1900 : u) + " " + k.getHours() + ":" + k.getMinutes() + ":" + k.getSeconds() + " " + k.getDay() + " " + k.getTimezoneOffset());
!a.supplementalDataID && a.visitor && a.visitor.getSupplementalDataID && (a.supplementalDataID = a.visitor.getSupplementalDataID("AppMeasurement:" + a._in, a.expectSupplementalData ? !1 : !0));
a.r("_s");
a.C("track", arguments) ||
(a.Ca(d) ||
(f && a.K(f),
d && ((g = {}), a.wa(g, 0), a.K(d)),
a.Xa() &&
(a.analyticsVisitorID || a.marketingCloudVisitorID || (a.fid = a.Ra()),
a.bb(),
a.usePlugins && a.doPlugins && a.doPlugins(a),
a.account &&
(a.abort ||
(a.trackOffline && !a.timestamp && (a.timestamp = Math.floor(k.getTime() / 1e3)),
(k = b.location),
a.pageURL || (a.pageURL = k.href ? k.href : k),
a.referrer || a.xa || ((a.referrer = e.document.referrer), (a.xa = 1)),
(a.referrer = a.Pa(a.referrer)),
a.r("_g")),
a.Ta() && !a.abort && (a.Ua(), (u += a.Sa()), a.ab(m, u), a.r("_t"), (a.referrer = "")))),
d && a.K(g, 1)),
(a.abort = a.supplementalDataID = a.timestamp = a.pageURLRest = a.linkObject = a.j = a.linkURL = a.linkName = a.linkType = b.rb = a.pe = a.pev1 = a.pev2 = a.pev3 = a.g = 0));
};
a.tl = a.trackLink = function (b, d, e, f, g) {
a.linkObject = b;
a.linkType = d;
a.linkName = e;
g && ((a.i = b), (a.q = g));
return a.track(f);
};
a.trackLight = function (b, d, e, f) {
a.lightProfileID = b;
a.lightStoreForSeconds = d;
a.lightIncrementBy = e;
return a.track(f);
};
a.clearVars = function () {
var b, d;
for (b = 0; b < a.c.length; b++)
if (
((d = a.c[b]),
"prop" == d.substring(0, 4) ||
"eVar" == d.substring(0, 4) ||
"hier" == d.substring(0, 4) ||
"list" == d.substring(0, 4) ||
"channel" == d ||
"events" == d ||
"eventList" == d ||
"products" == d ||
"productList" == d ||
"purchaseID" == d ||
"transactionID" == d ||
"state" == d ||
"zip" == d ||
"campaign" == d)
)
a[d] = void 0;
};
a.ab = function (b, d) {
var e,
f = a.trackingServer;
e = "";
var g = a.dc,
k = "sc.",
m = a.visitorNamespace;
f
? a.trackingServerSecure && a.ssl && (f = a.trackingServerSecure)
: (m || ((m = a.account), (f = m.indexOf(",")), 0 <= f && (m = m.substring(0, f)), (m = m.replace(/[^A-Za-z0-9]/g, ""))),
e || (e = "2o7.net"),
(g = g ? ("" + g).toLowerCase() : "d1"),
"2o7.net" == e && ("d1" == g ? (g = "112") : "d2" == g && (g = "122"), (k = "")),
(f = m + "." + g + "." + k + e));
e = a.ssl ? "https://" : "http://";
g = a.AudienceManagement && a.AudienceManagement.isReady();
e +=
f +
"/b/ss/" +
a.account +
"/" +
(a.mobile ? "5." : "") +
(g ? "10" : "1") +
"/JS-" +
a.version +
(a.ib ? "T" : "") +
"/" +
b +
"?AQB=1&ndh=1&" +
(g ? "callback=s_c_il[" + a._in + "].AudienceManagement.passData&" : "") +
d +
"&AQE=1";
a.Wa && (e = e.substring(0, 2047));
a.Na(e);
a.W();
};
a.Na = function (b) {
a.e || a.Va();
a.e.push(b);
a.X = a.u();
a.va();
};
a.Va = function () {
a.e = a.Ya();
a.e || (a.e = []);
};
a.Ya = function () {
var d, e;
if (a.ba()) {
try {
(e = b.localStorage.getItem(a.$())) && (d = b.JSON.parse(e));
} catch (f) {}
return d;
}
};
a.ba = function () {
var d = !0;
(a.trackOffline && a.offlineFilename && b.localStorage && b.JSON) || (d = !1);
return d;
};
a.la = function () {
var b = 0;
a.e && (b = a.e.length);
a.z && b++;
return b;
};
a.W = function () {
if (!a.z)
if (((a.ma = d), a.aa)) a.X > a.G && a.ta(a.e), a.da(500);
else {
var b = a.Ha();
if (0 < b) a.da(b);
else if ((b = a.ja())) (a.z = 1), a.$a(b), a.fb(b);
}
};
a.da = function (b) {
a.ma || (b || (b = 0), (a.ma = setTimeout(a.W, b)));
};
a.Ha = function () {
var b;
if (!a.trackOffline || 0 >= a.offlineThrottleDelay) return 0;
b = a.u() - a.ra;
return a.offlineThrottleDelay < b ? 0 : a.offlineThrottleDelay - b;
};
a.ja = function () {
if (0 < a.e.length) return a.e.shift();
};
a.$a = function (b) {
if (a.debugTracking) {
var d = "AppMeasurement Debug: " + b;
b = b.split("&");
var e;
for (e = 0; e < b.length; e++) d += "\n\t" + a.unescape(b[e]);
a.Za(d);
}
};
a.fb = function (d) {
var e, f, g;
!e &&
a.d.createElement &&
a.AudienceManagement &&
a.AudienceManagement.isReady() &&
(e = a.d.createElement("SCRIPT")) &&
"async" in e &&
((g = (g = a.d.getElementsByTagName("HEAD")) && g[0] ? g[0] : a.d.body) ? ((e.type = "text/javascript"), e.setAttribute("async", "async"), (f = 3)) : (e = 0));
e || ((e = new Image()), (e.alt = ""));
e.ga = function () {
try {
a.ca && (clearTimeout(a.ca), (a.ca = 0)), e.timeout && (clearTimeout(e.timeout), (e.timeout = 0));
} catch (b) {}
};
e.onload = e.hb = function () {
e.ga();
a.Ma();
a.T();
a.z = 0;
a.W();
};
e.onabort = e.onerror = e.Oa = function () {
e.ga();
(a.trackOffline || a.aa) && a.z && a.e.unshift(a.La);
a.z = 0;
a.X > a.G && a.ta(a.e);
a.T();
a.da(500);
};
e.onreadystatechange = function () {
4 == e.readyState && (200 == e.status ? e.hb() : e.Oa());
};
a.ra = a.u();
if (1 == f) e.open("GET", d, !0), e.send();
else if (2 == f) e.open("GET", d), e.send();
else if (((e.src = d), 3 == f)) {
if (a.pa)
try {
g.removeChild(a.pa);
} catch (k) {}
g.firstChild ? g.insertBefore(e, g.firstChild) : g.appendChild(e);
a.pa = a.Ka;
}
e.abort && (a.ca = setTimeout(e.abort, 5e3));
a.La = d;
a.Ka = b["s_i_" + a.replace(a.account, ",", "_")] = e;
if ((a.useForcedLinkTracking && a.B) || a.q) a.forcedLinkTrackingTimeout || (a.forcedLinkTrackingTimeout = 250), (a.U = setTimeout(a.T, a.forcedLinkTrackingTimeout));
};
a.Ma = function () {
if (a.ba() && !(a.qa > a.G))
try {
b.localStorage.removeItem(a.$()), (a.qa = a.u());
} catch (d) {}
};
a.ta = function (d) {
if (a.ba()) {
a.va();
try {
b.localStorage.setItem(a.$(), b.JSON.stringify(d)), (a.G = a.u());
} catch (e) {}
}
};
a.va = function () {
if (a.trackOffline) {
if (!a.offlineLimit || 0 >= a.offlineLimit) a.offlineLimit = 10;
for (; a.e.length > a.offlineLimit; ) a.ja();
}
};
a.forceOffline = function () {
a.aa = !0;
};
a.forceOnline = function () {
a.aa = !1;
};
a.$ = function () {
return a.offlineFilename + "-" + a.visitorNamespace + a.account;
};
a.u = function () {
return new Date().getTime();
};
a.na = function (a) {
a = a.toLowerCase();
return 0 != a.indexOf("#") && 0 != a.indexOf("about:") && 0 != a.indexOf("opera:") && 0 != a.indexOf("javascript:") ? !0 : !1;
};
a.setTagContainer = function (b) {
var d, e, f;
a.ib = b;
for (d = 0; d < a._il.length; d++)
if ((e = a._il[d]) && "s_l" == e._c && e.tagContainerName == b) {
a.K(e);
if (e.lmq) for (d = 0; d < e.lmq.length; d++) (f = e.lmq[d]), a.loadModule(f.n);
if (e.ml) for (f in e.ml) if (a[f]) for (d in ((b = a[f]), (f = e.ml[f]), f)) !Object.prototype[d] && ("function" != typeof f[d] || 0 > ("" + f[d]).indexOf("s_c_il")) && (b[d] = f[d]);
if (e.mmq) for (d = 0; d < e.mmq.length; d++) (f = e.mmq[d]), a[f.m] && ((b = a[f.m]), b[f.f] && "function" == typeof b[f.f] && (f.a ? b[f.f].apply(b, f.a) : b[f.f].apply(b)));
if (e.tq) for (d = 0; d < e.tq.length; d++) a.track(e.tq[d]);
e.s = a;
break;
}
};
a.Util = {
urlEncode: a.escape,
urlDecode: a.unescape,
cookieRead: a.cookieRead,
cookieWrite: a.cookieWrite,
getQueryParam: function (d, e, f) {
var g;
e || (e = a.pageURL ? a.pageURL : b.location);
f || (f = "&");
return d &&
e &&
((e = "" + e),
(g = e.indexOf("?")),
0 <= g && ((e = f + e.substring(g + 1) + f), (g = e.indexOf(f + d + "=")), 0 <= g && ((e = e.substring(g + f.length + d.length + 1)), (g = e.indexOf(f)), 0 <= g && (e = e.substring(0, g)), 0 < e.length)))
? a.unescape(e)
: "";
},
};
a.A = "supplementalDataID timestamp dynamicVariablePrefix visitorID marketingCloudVisitorID analyticsVisitorID audienceManagerLocationHint fid vmk visitorMigrationKey visitorMigrationServer visitorMigrationServerSecure charSet visitorNamespace cookieDomainPeriods fpCookieDomainPeriods cookieLifetime pageName pageURL referrer contextData currencyCode lightProfileID lightStoreForSeconds lightIncrementBy retrieveLightProfiles deleteLightProfiles retrieveLightData pe pev1 pev2 pev3 pageURLRest".split(
" "
);
a.c = a.A.concat("purchaseID variableProvider channel server pageType transactionID campaign state zip events events2 products audienceManagerBlob tnt".split(" "));
a.Y = "timestamp charSet visitorNamespace cookieDomainPeriods cookieLifetime contextData lightProfileID lightStoreForSeconds lightIncrementBy".split(" ");
a.H = a.Y.slice(0);
a.ea = "account allAccounts debugTracking visitor trackOffline offlineLimit offlineThrottleDelay offlineFilename usePlugins doPlugins configURL visitorSampling visitorSamplingGroup linkObject linkURL linkName linkType trackDownloadLinks trackExternalLinks trackClickMap trackInlineStats linkLeaveQueryString linkTrackVars linkTrackEvents linkDownloadFileTypes linkExternalFilters linkInternalFilters useForcedLinkTracking forcedLinkTrackingTimeout trackingServer trackingServerSecure ssl abort mobile dc lightTrackVars maxDelay expectSupplementalData AudienceManagement".split(
" "
);
for (f = 0; 75 >= f; f++) a.c.push("prop" + f), a.H.push("prop" + f), a.c.push("eVar" + f), a.H.push("eVar" + f), 6 > f && a.c.push("hier" + f), 4 > f && a.c.push("list" + f);
f = "resolution colorDepth javascriptVersion javaEnabled cookiesEnabled browserWidth browserHeight connectionType homepage plugins".split(" ");
a.c = a.c.concat(f);
a.A = a.A.concat(f);
a.ssl = 0 <= b.location.protocol.toLowerCase().indexOf("https");
a.charSet = "UTF-8";
a.contextData = {};
a.offlineThrottleDelay = 0;
a.offlineFilename = "AppMeasurement.offline";
a.ra = 0;
a.X = 0;
a.G = 0;
a.qa = 0;
a.linkDownloadFileTypes = "exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx";
a.w = b;
a.d = b.document;
try {
a.Wa = "Microsoft Internet Explorer" == navigator.appName;
} catch (m) {}
a.T = function () {
a.U && (b.clearTimeout(a.U), (a.U = d));
a.i && a.B && a.i.dispatchEvent(a.B);
a.q && ("function" == typeof a.q ? a.q() : a.i && a.i.href && (a.d.location = a.i.href));
a.i = a.B = a.q = 0;
};
a.ua = function () {
a.b = a.d.body;
a.b
? ((a.p = function (d) {
var e, f, g, k, m;
if (!((a.d && a.d.getElementById("cppXYctnr")) || (d && d.cb))) {
if (a.fa)
if (a.useForcedLinkTracking) a.b.removeEventListener("click", a.p, !1);
else {
a.b.removeEventListener("click", a.p, !0);
a.fa = a.useForcedLinkTracking = 0;
return;
}
else a.useForcedLinkTracking = 0;
a.j = d.srcElement ? d.srcElement : d.target;
try {
if (a.j && (a.j.tagName || a.j.parentElement || a.j.parentNode) && ((g = a.la()), a.track(), g < a.la() && a.useForcedLinkTracking && d.target)) {
for (k = d.target; k && k != a.b && "A" != k.tagName.toUpperCase() && "AREA" != k.tagName.toUpperCase(); ) k = k.parentNode;
if (k && ((m = k.href), a.na(m) || (m = 0), (f = k.target), d.target.dispatchEvent && m && (!f || "_self" == f || "_top" == f || "_parent" == f || (b.name && f == b.name)))) {
try {
e = a.d.createEvent("MouseEvents");
} catch (B) {
e = new b.MouseEvent();
}
if (e) {
try {
e.initMouseEvent("click", d.bubbles, d.cancelable, d.view, d.detail, d.screenX, d.screenY, d.clientX, d.clientY, d.ctrlKey, d.altKey, d.shiftKey, d.metaKey, d.button, d.relatedTarget);
} catch (A) {
e = 0;
}
e && ((e.cb = 1), d.stopPropagation(), d.gb && d.gb(), d.preventDefault(), (a.i = d.target), (a.B = e));
}
}
}
} catch (C) {}
a.j = 0;
}
}),
a.b && a.b.attachEvent)
? a.b.attachEvent("onclick", a.p)
: a.b &&
a.b.addEventListener &&
(navigator &&
((0 <= navigator.userAgent.indexOf("WebKit") && a.d.createEvent) || (0 <= navigator.userAgent.indexOf("Firefox/2") && b.MouseEvent)) &&
((a.fa = 1), (a.useForcedLinkTracking = 1), a.b.addEventListener("click", a.p, !0)),
a.b.addEventListener("click", a.p, !1))
: setTimeout(a.ua, 30);
};
a.ua();
}
function s_gi(a) {
var b,
d = window.s_c_il,
e,
f,
g = a.split(","),
k,
m,
n = 0;
if (d)
for (e = 0; !n && e < d.length; ) {
b = d[e];
if ("s_c" == b._c && (b.account || b.oun))
if (b.account && b.account == a) n = 1;
else for (f = b.account ? b.account : b.oun, f = b.allAccounts ? b.allAccounts : f.split(","), k = 0; k < g.length; k++) for (m = 0; m < f.length; m++) g[k] == f[m] && (n = 1);
e++;
}
n || (b = new AppMeasurement());
b.setAccount ? b.setAccount(a) : b.sa && b.sa(a);
return b;
}
AppMeasurement.getInstance = s_gi;
window.s_objectID || (window.s_objectID = 0);
function s_pgicq() {
var a = window,
b = a.s_giq,
d,
e,
f;
if (b) for (d = 0; d < b.length; d++) (e = b[d]), (f = s_gi(e.oun)), f.setAccount(e.un), f.setTagContainer(e.tagContainerName);
a.s_giq = 0;
}
s_pgicq();
var Stats = function () {
function a(a) {
e.appendChild(a.dom);
return a;
}
function b(a) {
for (var b = 0; b < e.children.length; b++) e.children[b].style.display = b === a ? "block" : "none";
d = a;
}
var d = 0,
e = document.createElement("div");
e.style.cssText = "position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000";
e.addEventListener(
"click",
function (a) {
a.preventDefault();
b(++d % e.children.length);
},
!1
);
var f = Date.now(),
g = f,
k = 0,
m = a(new Stats.Panel("FPS", "#0ff", "#002", !1)),
n = a(new Stats.Panel("MS", "#0f0", "#020", !1)),
p = a(new Stats.Panel("GUIObj.", "#0ff", "#002", !0)),
q = a(new Stats.Panel("Pixels", "#0f0", "#020", !0)),
r = a(new Stats.Panel("Sound length", "#0ff", "#002", !0)),
t = a(new Stats.Panel("PGraphics", "#0f0", "#020", !0));
if (self.performance && self.performance.memory) var u = a(new Stats.Panel("MB", "#0ff", "#002", !0));
b(0);
return {
REVISION: 17,
dom: e,
addPanel: a,
showPanel: b,
begin: function () {
f = Date.now();
},
end: function () {
k++;
var a = Date.now();
n.update(a - f, 200);
if (
a > g + 1e3 &&
(2 === d && p.update(CONFIG.CLIENTSLOTAPPLET.getTopContainer_0().count_0(), 1200),
q.update(CONFIG.STATS.PIXELS, 25e6),
t.update(CONFIG.STATS.PIXIGRAPHICS, 100),
r.update(CONFIG.STATS.SOUNDLENGTH, 200),
m.update((1e3 * k) / (a - g), 100),
(g = a),
(k = 0),
u)
) {
var b = performance.memory;
u.update(b.usedJSHeapSize / 1048576, b.jsHeapSizeLimit / 1048576);
}
return a;
},
update: function () {
f = this.end();
},
domElement: e,
setMode: b,
};
};
Stats.Panel = function (a, b, d, e) {
var f = Infinity,
g = 0,
k = Math.round,
m = k(window.devicePixelRatio || 1),
n = null,
p = 0,
q = 120 * m,
r = 55 * m,
t = 3 * m,
u = 2 * m,
B = 3 * m,
A = 15 * m,
C = 114 * m,
E = 37 * m,
F = document.createElement("canvas");
F.width = q;
F.height = r;
F.style.cssText = "width:120px;height:55px";
var D = F.getContext("2d");
D.font = "bold " + 9 * m + "px Helvetica,Arial,sans-serif";
D.textBaseline = "top";
D.fillStyle = d;
D.fillRect(0, 0, q, r);
D.fillStyle = b;
D.fillText(a, t, u);
D.fillRect(B, A, C, E);
D.fillStyle = d;
D.globalAlpha = 0.9;
D.fillRect(B, A, C, E);
return {
dom: F,
update: function (r, I) {
f = Math.min(f, r);
g = Math.max(g, r);
n = n || I;
p = e ? Math.max(1.1 * g, n) : I;
D.fillStyle = d;
D.globalAlpha = 1;
D.fillRect(0, 0, q, A);
D.fillStyle = b;
D.fillText(k(r) + " " + a + " (" + k(f) + "-" + k(g) + ")", t, u);
n != p
? (D.drawImage(F, B + m, A, C - m, E, B, A + E * (1 - n / p), C - m, (E * n) / p), (D.fillStyle = d), D.fillRect(B, A, C - m, E * (1 - n / p)), (D.fillStyle = b), (n = p))
: D.drawImage(F, B + m, A, C - m, E, B, A, C - m, E);
D.fillRect(B + C - m, A, m, E);
D.fillStyle = d;
D.globalAlpha = 0.9;
D.fillRect(B + C - m, A, m, k((1 - r / p) * E));
},
};
};
var _rollbarConfig = { accessToken: "setByParameter", captureUncaught: !0, payload: { environment: "production" } };
initRollbar = function (a, b) {
function d(b) {
this.shimId = ++k;
this.notifier = null;
this.parentShim = b;
this.logger = function () {};
a.console && void 0 === a.console.shimId && (this.logger = a.console.log);
}
function e(b) {
return g(function () {
if (this.notifier) return this.notifier[b].apply(this.notifier, arguments);
var e = this,
f = "scope" === b;
f && (e = new d(this));
var g = Array.prototype.slice.call(arguments, 0);
return a._rollbarShimQueue.push({ shim: e, method: b, args: g, ts: new Date() }), f ? e : void 0;
});
}
function f(a, b) {
if (b.hasOwnProperty && b.hasOwnProperty("addEventListener")) {
var d = b.addEventListener;
b.addEventListener = function (b, e, f) {
d.call(this, b, a.wrap(e), f);
};
var e = b.removeEventListener;
b.removeEventListener = function (a, b, d) {
e.call(this, a, b && b._wrapped ? b._wrapped : b, d);
};
}
}
function g(a, b) {
return (
(b = b || this.logger),
function () {
try {
return a.apply(this, arguments);
} catch (d) {
b("Rollbar internal error:", d);
}
}
);
}
var k = 0;
d.init = function (b, e) {
var k = e.globalAlias || "Rollbar";
if ("object" == typeof b[k]) return b[k];
b._rollbarShimQueue = [];
b._rollbarWrappedError = null;
e = e || {};
var m = new d();
return g(function () {
if ((m.configure(e), e.captureUncaught)) {
var d = b.onerror;
b.onerror = function () {
var b = Array.prototype.slice.call(arguments, 0);
a._rollbarWrappedError && (b[4] || (b[4] = a._rollbarWrappedError), b[5] || (b[5] = a._rollbarWrappedError._rollbarContext), (a._rollbarWrappedError = null));
m.uncaughtError.apply(m, b);
d && d.apply(a, b);
};
var g,
n,
C = "EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload".split(
" "
);
for (g = 0; g < C.length; ++g) (n = C[g]), b[n] && b[n].prototype && f(m, b[n].prototype);
}
return (b[k] = m), m;
}, m.logger)();
};
d.prototype.loadFull = function (a, b, d, e, f) {
var k = g(function () {
var a = b.createElement("script"),
f = b.getElementsByTagName("script")[0];
a.src = e.rollbarJsUrl;
a.async = !d;
a.onload = m;
f.parentNode.insertBefore(a, f);
}, this.logger),
m = g(function () {
var b;
if (void 0 === a._rollbarPayloadQueue) {
var d, e, g;
for (b = Error("rollbar.js did not load"); (d = a._rollbarShimQueue.shift()); )
for (d = d.args, g = 0; g < d.length; ++g)
if (((e = d[g]), "function" == typeof e)) {
e(b);
break;
}
}
"function" == typeof f && f(b);
}, this.logger);
g(function () {
d ? k() : a.addEventListener ? a.addEventListener("load", k, !1) : a.attachEvent("onload", k);
}, this.logger)();
};
d.prototype.wrap = function (b, d) {
try {
var e;
if (
((e =
"function" == typeof d
? d
: function () {
return d || {};
}),
"function" != typeof b) ||
b._isWrap
)
return b;
if (!b._wrapped) {
b._wrapped = function () {
try {
return b.apply(this, arguments);
} catch (d) {
throw ((d._rollbarContext = e()), (d._rollbarContext._wrappedSource = b.toString()), (a._rollbarWrappedError = d), d);
}
};
b._wrapped._isWrap = !0;
for (var f in b) b.hasOwnProperty(f) && (b._wrapped[f] = b[f]);
}
return b._wrapped;
} catch (g) {
return b;
}
};
for (var m = "log debug info warn warning error critical global configure scope uncaughtError".split(" "), n = 0; n < m.length; ++n) d.prototype[m[n]] = e(m[n]);
_rollbarConfig.rollbarJsUrl = _rollbarConfig.rollbarJsUrl || "//d37gvrvc0wt4s1.cloudfront.net/js/v1.1/rollbar.min.js";
d.init(a, _rollbarConfig).loadFull(a, b, 1, _rollbarConfig);
};
(function (a) {
(a.__greentube_games && a.__greentube_games.SLOT) || (a.__greentube_games = { SLOT: {} });
})(window);
"undefined" === typeof Promise &&
(function () {
function a(a, b) {
return function () {
a.apply(b, arguments);
};
}
function b(b) {
if ("object" !== typeof this) throw new TypeError("Promises must be constructed via new");
if ("function" !== typeof b) throw new TypeError("not a function");
this._value = this._state = null;
this._deferreds = [];
m(b, a(e, this), a(f, this));
}
function d(a) {
var b = this;
null === this._state
? this._deferreds.push(a)
: p(function () {
var d = b._state ? a.onFulfilled : a.onRejected;
if (null === d) (b._state ? a.resolve : a.reject)(b._value);
else {
var e;
try {
e = d(b._value);
} catch (f) {
a.reject(f);
return;
}
a.resolve(e);
}
});
}
function e(b) {
try {
if (b === this) throw new TypeError("A promise cannot be resolved with itself.");
if (b && ("object" === typeof b || "function" === typeof b)) {
var d = b.then;
if ("function" === typeof d) {
m(a(d, b), a(e, this), a(f, this));
return;
}
}
this._state = !0;
this._value = b;
g.call(this);
} catch (k) {
f.call(this, k);
}
}
function f(a) {
this._state = !1;
this._value = a;
g.call(this);
}
function g() {
for (var a = 0, b = this._deferreds.length; a < b; a++) d.call(this, this._deferreds[a]);
this._deferreds = null;
}
function k(a, b, d, e) {
this.onFulfilled = "function" === typeof a ? a : null;
this.onRejected = "function" === typeof b ? b : null;
this.resolve = d;
this.reject = e;
}
function m(a, b, d) {
var e = !1;
try {
a(
function (a) {
e || ((e = !0), b(a));
},
function (a) {
e || ((e = !0), d(a));
}
);
} catch (f) {
e || ((e = !0), d(f));
}
}
var n;
n = "object" === typeof window && window ? window : global;
var p =
n.setImmediate ||
function (a) {
setTimeout(a, 1);
},
q =
Array.isArray ||
function (a) {
return "[object Array]" === Object.prototype.toString.call(a);
};
n.Promise = b;
b.prototype["catch"] = function (a) {
return this.then(null, a);
};
b.prototype.then = function (a, e) {
var f = this;
return new b(function (b, g) {
d.call(f, new k(a, e, b, g));
});
};
b.all = function () {
var a = Array.prototype.slice.call(1 === arguments.length && q(arguments[0]) ? arguments[0] : arguments);
return new b(function (b, d) {
function e(g, k) {
try {
if (k && ("object" === typeof k || "function" === typeof k)) {
var m = k.then;
if ("function" === typeof m) {
m.call(
k,
function (a) {
e(g, a);
},
d
);
return;
}
}
a[g] = k;
0 === --f && b(a);
} catch (n) {
d(n);
}
}
if (0 === a.length) return b([]);
for (var f = a.length, g = 0; g < a.length; g++) e(g, a[g]);
});
};
b.resolve = function (a) {
return a && "object" === typeof a && a.constructor === b
? a
: new b(function (b) {
b(a);
});
};
b.reject = function (a) {
return new b(function (b, d) {
d(a);
});
};
b.race = function (a) {
return new b(function (b, d) {
for (var e = 0, f = a.length; e < f; e++) a[e].then(b, d);
});
};
})();
(function (a, b) {
var d = function () {
this._listeners = {};
};
d.prototype = {
constructor: d,
addListener: function (a, b) {
"undefined" == typeof this._listeners[a] && (this._listeners[a] = []);
this._listeners[a].push(b);
},
isUndefined: function (a) {
return void 0 === a;
},
isDefined: function (a) {
return void 0 !== a;
},
isNotNullAndDefined: function (a) {
return void 0 !== a && null !== a;
},
fire: function (a) {
"string" == typeof a && (a = { type: a });
a.target || (a.target = this);
if (!a.type) throw Error("Event object missing 'type' property.");
if (this._listeners[a.type] instanceof Array) for (var b = this._listeners[a.type], d = 0, e = b.length; d < e; d++) b[d].call(this, a);
},
removeListener: function (a, b) {
if (this._listeners[a] instanceof Array)
for (var d = this._listeners[a], e = 0, n = d.length; e < n; e++)
if (d[e] === b) {
d.splice(e, 1);
break;
}
},
};
new d();
var e = function (a, b) {
this._window = a;
this._document = b;
this._body = this.query("body");
this._html = this.query("html");
this._eventStorage = [];
var d = this;
"Arguments Function String Number Date RegExp Error".split(" ").forEach(function (a) {
d["is" + a] = function (b) {
return Object.prototype.toString.call(b) === "[object " + a + "]";
};
});
};
e.prototype = new d();
e.prototype.constructor = e;
e.prototype.body = function () {
return this._body;
};
e.prototype.isArray = function (a) {
return (
Array.isArray ||
function (a) {
return "[object Array]" === Object.prototype.toString.call(a);
}
)(a);
};
e.prototype.isEmpty = function (a) {
return null == a ? !0 : this.isArray(a) || this.isString(a) || this.isArguments(a) ? 0 === a.length : 0 === this.keys(a).length;
};
e.prototype.isObject = function (a) {
var b = typeof a;
return "function" === b || ("object" === b && !!a);
};
e.prototype.isElement = function (a) {
return !(!a || 1 !== a.nodeType);
};
e.prototype.has = function (a, b) {
return null != a && hasOwnProperty.call(a, b);
};
e.prototype.keys = function (a) {
var b = Object.keys;
if (!this.isObject(a)) return [];
if (b) return b(a);
var b = [],
d;
for (d in a) this.has(a, d) && b.push(d);
return b;
};
e.prototype.extend = function (a) {
a = a || {};
for (var b = 1; b < arguments.length; b++) {
var d = arguments[b];
if (d) for (var e in d) d.hasOwnProperty(e) && ("object" === typeof d[e] ? this.extend(a[e], d[e]) : (a[e] = d[e]));
}
return a;
};
e.prototype.create = function (a, d) {
var e = b.createElement(a),
m;
for (m in d) e[m] = d[m];
return e;
};
e.prototype.parent = function (a) {
return (a = a.parentNode) && 11 !== a.nodeType ? a : null;
};
e.prototype.loadJSON = function (a) {
return this.get(a);
};
e.prototype.queryAllSelector = function (a) {
return b.querySelectorAll(a);
};
e.prototype.query = function (a) {
a = this.queryAllSelector(a);
return 0 != a.length ? a[0] : [];
};
e.prototype.unbind = function () {};
e.prototype.trigger = function () {};
e.prototype.append = function (a, b) {
"string" === typeof a ? this.query(a).appendChild(b) : a.appendChild(b);
return this;
};
e.prototype.remove = function (a, b) {
b.removeChild(a);
return this;
};
e.prototype.addClass = function (a, b) {
if (a) return (a.className += " " + b), a;
};
e.prototype.css = function (a, b) {
if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) {
var d = function (a) {
return a.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function (a, b) {
return b.toUpperCase();
});
},
e = function (a, b) {
var d = ["Webkit", "O", "Moz", "ms"];
if (b in a) return b;
for (var e = b[0].toUpperCase() + b.slice(1), f = b, g = d.length; g--; ) if (((b = d[g] + e), b in a)) return b;
return f;
},
n = a.style,
p;
for (p in b)
if (b.hasOwnProperty(p)) {
var q = d(p);
n[e(n, q)] = b[p];
}
return this;
}
};
e.prototype.offsetParent = function (a) {
return this.offset(a.offsetParent);
};
e.prototype.offset = function (a) {
a = a.getBoundingClientRect();
return { top: a.top + b.body.scrollTop, left: a.left + b.body.scrollLeft };
};
e.prototype.scrollLeft = function () {
var a = Array.prototype.slice.call(arguments, 0);
a.push("scrollLeft");
return this.scrollTo.apply(this, a);
};
e.prototype.scrollTop = function () {
var a = Array.prototype.slice.call(arguments, 0);
a.push("scrollTop");
return this.scrollTo.apply(this, a);
};
e.prototype.scrollTo = function () {
var a, b, d;
1 === arguments.length
? (d = arguments[0])
: 2 === arguments.length
? ((d = arguments[0]), "number" === typeof d && (b = d), "object" === typeof d && (a = d), (d = arguments[1]))
: 3 === arguments.length && ((a = arguments[0]), (b = arguments[1]), (d = arguments[2]));
i = { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }[d];
var e = "pageYOffset" === i;
if (void 0 === b) return void 0 === a ? this._window[i] : a[d];
void 0 === a ? this._window.scrollTo(e ? this._window.pageXOffset : b, e ? b : this._window.pageYOffset) : (a[d] = b);
};
e.prototype.bind = function (a, b, d) {
b === this._window || b === this._body ? b.addEventListener(a, d.bind(this), !1) : "object" === typeof b && ((d = b.addEventListener(a, d.bind(this), !1)), this._eventStorage.push({ el: b, type: a, event: d }));
};
e.prototype.ready = function () {
var a = this;
return "complete" !== b.readyState
? new Promise(function (b, d) {
try {
a.bind("load", a._window, function () {
b();
}),
a.bind("DOMContentLoaded", a._document, function () {
b();
});
} catch (e) {
d(e);
}
})
: new Promise(function (a, b) {
a();
});
};
e.prototype.get = function (a) {
return new Promise(function (b, d) {
request = new XMLHttpRequest();
request.open("GET", a, !0);
request.onload = function () {
(200 <= this.status && 400 > this.status) || 0 == this.status ? b(this.responseText) : d(Error("Could not open " + a));
};
request.onerror = function () {
d(Error("Could not open " + a));
};
request.send();
});
};
d = new e(a, b);
d.isUndefined(a.__greentube_games) && (a.__greentube_games = { G: d });
a.G = d;
})(window, document);
(function (a, b) {
var d = !1,
e = !0,
f = null,
g = function (a) {
return new Promise(function (b, d) {
var f = new Image();
f.onload = function () {
e = 0 < f.width && 0 < f.height;
b();
};
f.onerror = function () {
e = !1;
b();
};
f.src =
"data:image/webp;base64," +
{
lossy: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",
lossless: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",
alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",
animation: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",
}[a];
});
},
d = (function () {
try {
var d = b.createElement("canvas");
d.width = 8;
d.height = 8;
var e = { stencil: !0, antialias: !1 },
g = d.getContext("webgl", e) || d.getContext("experimental-webgl", e),
k = !!a.WebGLRenderingContext && g;
if (k) {
var r = g.getContextAttributes();
if ((k = k && r.stencil)) {
var t = PIXI.compileProgram(g, ["attribute vec2 a_position; void main(){gl_Position=vec4(a_position,0,1);}"], ["void main(){gl_FragColor=vec4(1,0,0,1);}"]);
g.useProgram(t);
var u = g.getAttribLocation(t, "a_position"),
B = g.createBuffer();
g.bindBuffer(g.ARRAY_BUFFER, B);
g.bufferData(g.ARRAY_BUFFER, new Float32Array([-1, -1, 0, -1, -1, 1, -1, 1, 0, -1, 0, 1]), g.STATIC_DRAW);
g.enableVertexAttribArray(u);
g.vertexAttribPointer(u, 2, g.FLOAT, !1, 0, 0);
g.enable(g.STENCIL_TEST);
g.clear(g.STENCIL_BUFFER_BIT);
g.colorMask(!1, !1, !1, !1);
g.stencilFunc(g.EQUAL, 0, 255);
g.stencilOp(g.KEEP, g.KEEP, g.INCR);
g.drawArrays(g.TRIANGLES, 0, 6);
g.stencilFunc(g.EQUAL, 1, 255);
g.colorMask(!0, !0, !0, !0);
g.stencilOp(g.KEEP, g.KEEP, g.KEEP);
g.bufferData(g.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]), g.STATIC_DRAW);
g.drawArrays(g.TRIANGLES, 0, 6);
var A = new Uint8Array(256);
g.readPixels(0, 0, 8, 8, g.RGBA, g.UNSIGNED_BYTE, A);
var k = 255 == A[132] && 0 == A[152],
C = g.getExtension("WEBGL_debug_renderer_info");
C && (f = g.getParameter(C.UNMASKED_RENDERER_WEBGL));
}
}
return !0 === k;
} catch (E) {
return !1;
}
})(),
k = function (b) {
var d = this;
this.pixelRatio = function (b) {
return a.devicePixelRatio === b;
};
this._screenSize = function (b, d) {
return a.screen.height === b && a.screen.width === d;
};
this._test = function (a, d) {
return new RegExp(a, d || "i").test(b);
};
this._match = function (a) {
return b.match(a);
};
this.devicePixelRatio = G.isNotNullAndDefined(a.devicePixelRatio) && 1 <= a.devicePixelRatio ? a.devicePixelRatio : 1;
this.userAgent = b;
this._webkit_minimum_webaudio = 535;
this.settings = {};
this.regExAppleWebKit = new RegExp(/AppleWebKit\/([\d.]+)/);
this.regExChromeVersion = this._match(/Chrome\/(.*?)\./);
this.regExMozillaVersion = this._match(/Firefox\/(.*?)\./);
this.resultAppleWebKitRegEx = this.regExAppleWebKit.exec(b);
this.chromeVersion = null === this.regExChromeVersion ? 0 : parseInt(this.regExChromeVersion[1]);
this.mozillaVersion = null === this.regExMozillaVersion ? 0 : parseInt(this.regExMozillaVersion[1]);
this._webkit_version = 537;
this.appleWebKitVersion = null === this.resultAppleWebKitRegEx ? null : parseFloat(this.regExAppleWebKit.exec(b)[1]);
this.webkit = this._test("webkit");
this.opera = this._test("Opera|OPR", "g");
this.operaMobile = this._test("Opera Mobi");
this.msie = this._test("msie") || this._test("trident");
this.msieMobile = this._test("IEMobile");
this.msieVersion = function () {
var a = this._match(/MSIE(?:[\/ ]([0-9.]+))?/i);
!a && this._test("trident") && (a = this._match(/rv:([0-9]{1,}[\.0-9]{0,})/i));
return parseFloat(a[1]);
};
this.msedge = this._test("edge");
this.mozilla = this._test("mozilla") && !this.msie && !this.webkit;
var e = function (a) {
return d._test("OS " + a + "_\\w*\\d like Mac OS X");
},
g = function (a) {
return d._test("OS " + a + "_\\d(_d)? like Mac OS X");
};
this.ios = this._match(/(iphone|ipad|ipod)/i);
this.phanthomjs = this._test("PhantomJS");
this.ios5 = e("[2-5]");
this.ios7 = e("7");
this.ios6 = e("6");
this.ios8 = e("8");
this.ios9 = e("9");
this.ios10 = e("10");
this.ios11 = e("11");
this.ios7_1 = this.ios && (g("7_1") || this._test("OS 7_1? like Mac OS X"));
this.ios7_0 = this.ios && (g("7_0") || this._test("OS 7_0? like Mac OS X"));
this.ios8_0 = this.ios && (g("8_0") || this._test("OS 8_0? like Mac OS X"));
this.ios8_0_2 = this.ios && (g("8_0_2") || this._test("OS 8_0_2? like Mac OS X"));
this.ios8_1 = this.ios && (g("8_1") || this._test("OS 8_1? like Mac OS X"));
this.ios8_2 = this.ios && (g("8_2") || this._test("OS 8_2? like Mac OS X"));
this.android = b.match(/(android)/i);
this.androidVersion = function () {
var a = this._match(/Android\s([0-9\.]*)/);
if (a && 2 === a.length) return a[1];
};
this.iosVersion = function () {
if (d.ios)
return parseFloat(
this._match(/(\d+)_(\d+)/)[0]
.replace("_", ".")
.trim()
);
};
this.androidTablet = this.android && !this._find("Mobile");
this.androidMobile = this.android && (this._find("Mobile") || (this.opera && (this._find("Mobi") || this._find("Mini"))));
this.stock = this.android && this.webkit && null !== this.appleWebKitVersion && (537 > this.appleWebKitVersion || 29 >= this.chromeVersion) && 29 >= this.chromeVersion;
this.chrome = !0 !== this.msedge && this._test("chrome") && this.webkit && !this.stock && 31 <= this.chromeVersion;
this.safari = !this.chrome && this._test("Safari");
this.androidchrome = this.android && this.chrome;
this.mobile = null !== this.ios || null !== this.android || (this.msie && this.msieMobile) || (this.opera && this.operaMobile);
this.ipad = this._match(/(ipad)/i);
this.ipadmini = (null === this.ipad ? !1 : !0) && this.pixelRatio(1) && this._screenSize(1024, 768);
this.iphone = this._match(/(iphone)/i);
this.iphone6 = (null === this.iphone ? !1 : !0) && this.pixelRatio(2) && this._screenSize(667, 375);
this.iphone6Plus = (null === this.iphone ? !1 : !0) && this.pixelRatio(3) && this._screenSize(736, 414);
this.desktop = !this.mobile;
this.gpuString = f;
this.__e = function (a) {
return void 0 !== a;
};
this._visible();
};
k.prototype = {
ready: function () {
return Promise.all([g("alpha"), G.ready()]);
},
version: function () {
if (this.ios) return this.iosVersion();
if (this.stock) return this.androidVersion();
if (this.chrome) return this.chromeVersion;
if (this.mozilla) return this.mozillaVersion;
if (this.msie) return this.msieVersion();
},
isTouch: function () {
return "ontouchstart" in a || 0 < navigator.MaxTouchPoints || 0 < navigator.msMaxTouchPoints;
},
matchResolutions: function (b) {
for (var d = 0, e = 0; e < b.length; e++) {
var f = 10 * Math.floor(b[e] / this.devicePixelRatio / 10);
if (a.matchMedia("(min-device-width: " + f + "px)").matches || a.matchMedia("(min-device-height: " + f + "px)").matches) d = b[e];
else break;
}
return d;
},
screenSize: function () {
return { width: a.innerWidth, height: a.innerHeight };
},
iPhoneSmallScreen: function () {
var a = DEVICE.orientation("L"),
b = DEVICE.screenSize();
return (a && 235 >= b.height) || (DEVICE.ios9 && a && 284 >= b.height);
},
orientation: function (b) {
var d = a.orientation;
switch (b) {
case "P":
return 0 === d || 180 === d;
case "L":
return -90 === d || 90 === d;
}
},
webkitVersion: function () {
return this.mozilla ? this.mozillaVersion : this.appleWebKitVersion;
},
_find: function (a) {
return -1 !== this.userAgent.indexOf(a);
},
canIplay: function () {
var a = b.createElement("audio"),
d = {};
try {
return (
(d.ogg = !(!a.canPlayType || !a.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/, ""))),
(d.mp3 = !(!a.canPlayType || !a.canPlayType("audio/mpeg;").replace(/no/, ""))),
(d.wav = !(!a.canPlayType || !a.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""))),
(d.m4a = !(!a.canPlayType || !(a.canPlayType("audio/x-m4a;") || a.canPlayType("audio/aac;")).replace(/^no$/, ""))),
d
);
} catch (e) {
return console.error(e), {};
}
},
webgl: function () {
return d;
},
fullscreen: function () {
return b.exitFullscreen || b.webkitExitFullscreen || b.mozCancelFullScreen || (null != b.msExitFullscreen && (DEVICE.androidchrome || (DEVICE.mozilla && 34 <= DEVICE.version())));
},
webp: function () {
return e;
},
webaudio: function () {
return ("webkitAudioContext" in a || "AudioContext" in a) && (null === this.appleWebKitVersion || this.appleWebKitVersion > this._webkit_minimum_webaudio);
},
_visible: function () {
var d;
d = {
b: null,
q: b,
p: void 0,
prefixes: ["webkit", "ms", "moz", ""],
props: ["visibilityState", "visibilitychange", "Hidden"],
m: ["focus", "blur"],
visibleCallbacks: [],
hiddenCallbacks: [],
_callbacks: [],
visible: !0,
visbilityStateSupported: !1,
onVisible: function (a) {
this.visibleCallbacks.push(a);
},
onHidden: function (a) {
this.hiddenCallbacks.push(a);
},
isSupported: function () {
for (var a = this.prefixes.length; a--; ) if (this._supports(a)) return (this.b = this.prefixes[a]);
return !1;
},
_supports: function (a) {
var b = this.prefixes[a] + this.props[2] in this.q;
b || (this.visbilityStateSupported = this.prefixes[a] + this.props[0] in this.q);
return b || this.visbilityStateSupported;
},
runCallbacks: function (a) {
if (a) for (this._callbacks = 1 === a ? this.visibleCallbacks : this.hiddenCallbacks, a = 0; a < this._callbacks.length; a++) this._callbacks[a]();
},
_visible: function () {
this.visible = !0;
d.runCallbacks(1);
},
_hidden: function () {
this.visible = !1;
d.runCallbacks(2);
},
_nativeSwitch: function () {
this.visbilityStateSupported ? ("hidden" === this.q[this.b + this.props[0]] ? this._hidden() : this._visible()) : !0 === this.q[this.b + this.props[2]] ? this._hidden() : this._visible();
},
listen: function () {
try {
!1 === this.isSupported()
? b.addEventListener
? (a.addEventListener(this.m[0], this._visible, 1), a.addEventListener(this.m[1], this._hidden, 1))
: (this.q.attachEvent("onfocusin", this._visible), this.q.attachEvent("onfocusout", this._hidden))
: this.q.addEventListener(
this.b + this.props[1],
function () {
d._nativeSwitch.apply(d, arguments);
},
1
);
} catch (e) {}
},
init: function () {
this.listen();
},
};
d.init();
this._visibly = d;
},
visible: function () {
return this._visibly;
},
};
a.DETECTION = k;
})(window, document);
(function (a) {
a.DEVICE = new a.DETECTION(navigator.userAgent);
})(window);
(function (a) {
var b = a.__greentube_games,
d = {
MESSAGETARGET: "top",
STATS: { PIXELS: 0, SOUNDLENGTH: 0, PIXIGRAPHICS: 0 },
SOUNDS: {},
fullscreen: !0,
generate_containers: !1,
fixedContainer: !1,
IMAGES: {},
VIDEOS: {},
QUERY_URL: {},
SCALINGFACTOR: null,
REQUESTAFID: null,
CURRENTSOUND: null,
TOPCONTAINEROFFSET: 100,
BUILDTYPE: "EMBEDDED",
FEATURELEVEL: "MOBILEFEATUREBUILD",
CONTAINERS: { fullscreen: "fullscreen", container: "container", cheat_container: "d_cheat", audio_container: "splayer", fixedContainer: !1 },
SOUNDPLAYER: null,
STARVEGAS: !1,
CLIENTSLOTAPPLET: null,
TARGETSYMBOLWIDTH: parseFloat("152.0"),
APPLETNAME: "%APPLETNAME%",
PACKAGE: "%PACKAGE%",
featuresupport: { FILTERS: "OK", PARTICLES: "OK" },
},
e = {},
e = {
get: function (a) {
if (G.isNotNullAndDefined(a)) return "boolean" === typeof e[a] ? e[a] : "" === e[a] ? "" : "undefined" === typeof e[a] ? null : e[a];
},
is: function (a, b) {
return a in CONFIG ? CONFIG.get(a) == b : !1;
},
set: function (a, b) {
G.isNotNullAndDefined(b) && (e[a] = b);
},
merge: function (a) {
if (a) for (var b in a) e[b] = a[b];
},
__init: function (a) {
b.SLOT.PARAMS.initParams({}, a, b.SLOT.CONFIG);
},
},
e = (function (a, b) {
var d = {},
e;
for (e in a) d[e] = a[e];
for (var n in b) d[n] = b[n];
return d;
})(e, d);
b.SLOT.CONFIG = e;
a.CONFIG = e;
})(window);
(function (a, b) {
var d,
e = {},
f = null,
g = function (a) {
var d = {};
a = G.isDefined(a) ? a : b.location.href.substr(b.location.href.indexOf("?") + 1);
if (!G.isEmpty(a)) {
a = a.split("&");
for (var e = 0; e < a.length; e++) {
var f = a[e].split("=");
d[f[0]] = decodeURIComponent(f[1]);
}
return d;
}
return {};
};
__greentube_games.SLOT.PARAMS = d = {
initParams: function (a, d, f) {
var g = !1,
q = function () {
g = d.iphone || 400 > Math.min(d.screenSize().width, d.screenSize().height);
f.set("devicetype", "handheld");
f.set("mobilegamble", "1");
f.set("hidecurrencysymbols", "1");
f.set("hidecurrencysymbolsongamblescreen", "1");
f.set("forceEnableClick", "0");
f.set("autopayin", "1");
f.set("nolobby", "1");
f.set("h265video", "0");
f.set("vectortext", "0");
f.set("maxvideodecoders", 5);
d.mobile ? (f.set("notooltip", "1"), f.set("disablecursor", "1")) : f.set("simulatetouchevents", "1");
};
switch (f.FEATURELEVEL) {
case "FULLFEATUREBUILD":
g = !1;
f.set("devicetype", "desktop");
f.set("h265video", "1");
f.set("vectortext", "1");
f.set("videoondemand", "1");
f.set("maxvideodecoders", 20);
break;
case "MOBILEFEATUREBUILDBIGBUTTONCONSOLE":
q();
f.set("bigbutton", "1");
f.set("bigmenubutton", "1");
break;
default:
q(), f.set("onebutton", "1"), f.set("reducedsounds", "1"), f.set("reducedgraphics", "1"), f.set("improvedreadability", "1");
}
"MOBILEWEB" === f.BUILDTYPE && f.set("button.touch2start.show", "1");
e = a || e;
f.merge(e);
f.set("screensize", g ? "small" : "large");
a = "desktop";
d.android ? (a = "android") : d.ios && (a = "ios");
f.set("operatingsystem", a);
f.set("devicepixelratio", b.devicePixelRatio + "");
f.set("deviceres", d.matchResolutions(["800", "1280", "1920", "2048"]) + "");
f.set("stock", (1 == d.stock) + "");
f.set("chromeversion", d.chromeVersion + "");
f.set("gpu", d.gpuString + "");
f.set("iphone", d.iphone ? "1" : "0");
return f;
},
stringURLParamsToObject: function (a) {
return null === f || G.isDefined(a) ? (G.isString(a) ? g(a) : G.isUndefined(a) ? g() : a) : f;
},
mergeGetParams: function (a, b) {
var d = __greentube_games.SLOT.UTIL;
f = G.isEmpty(b) ? f : this.stringURLParamsToObject(b);
a.merge(f);
a.set("webaudio", DEVICE.webaudio());
var e = DEVICE.webaudio() ? "1" : "0";
null === a.get("usingwebaudio") ? (e = null != f.usingwebaudio ? f.usingwebaudio : e) : "1" === a.get("usingwebaudio") && "1" === e ? (e = "1") : "0" === a.get("usingwebaudio") && (e = "0");
JSUTIL.noaudio() && (a.set("noaudio", "1"), "FULLFEATUREBUILD" === a.FEATURELEVEL && (a.set("button.music.show", "0"), a.set("button.sound.show", "0")));
a.set("usingwebaudio", 1 == e || 1 == a.get("slotparkaudio") ? "1" : "0");
"ios" === a.operatingsystem || (1 != JSUTIL.getParameter("webp") && null !== JSUTIL.getParameter("webp")) ? a.set("webp", !1) : a.set("webp", DEVICE.webp());
e = ("webgl" in f && 0 == f.webgl) || "0" === a.get("webgl") || !1 === DEVICE.webgl();
a.set("webgl", !0 === e ? "0" : "1");
a.set("canvasrenderer", !0 === e ? "1" : "0");
"1" == d.getParameter("starvegasmobile") && "FULLFEATUREBUILD" != a.FEATURELEVEL && (a.set("STARVEGAS", !0), a.set("bottominset", "1"), a.set("skin", a.get("skin") + ",starvegas"));
1 == f.showpayindialog && 1 != f.autopayin && a.set("autopayin", "0");
return a;
},
setParams: function (a) {
e = a;
},
getParams: function () {
return e;
},
parseUrlToObject: g,
};
f = d.stringURLParamsToObject();
})(window.__greentube_games, window);
(function (a) {
a.performance = a.performance || {};
var b = a.__greentube_games;
basedir = null;
var d = [],
d = [],
e = function (a, b) {
if (null == a) return void 0 == b;
if (null == b) return !1;
if ("string" !== typeof b) return a instanceof b ? !0 : !1;
if (void 0 !== a.interfaces) for (var d = 0, e = a.interfaces.length; d < e; ++d) if (a.interfaces[d] == b) return !0;
return !1;
},
f = function (a) {
return G.isDefined(a);
},
g = function (a, b, d) {
if (a === b) return !0;
if (!(a instanceof Object && b instanceof Object) || a.constructor !== b.constructor) return !1;
for (var e in a)
if (a.hasOwnProperty(e)) {
if (!b.hasOwnProperty(e)) return !1;
if (a[e] !== b[e] && "function" !== typeof a[e]) {
if ("object" !== typeof a[e] || -1 !== d.indexOf(a[e])) return !1;
d.push(a[e]);
if (!g(a[e], b[e], d)) return !1;
}
}
for (e in b) if (b.hasOwnProperty(e) && !a.hasOwnProperty(e)) return !1;
return !0;
},
k = function (a, b) {
return CONFIG.get(a || null);
},
m = function (a, b) {
var d = new RegExp(a, "i"),
e = b.userAgent.toLowerCase();
return d.test(e);
},
n = function (a, b, d) {
if (d[a]) return !0;
if (void 0 === d[a]) return (a = m(a, d)) && f(b) && (a = a && !m(b, d)), a;
},
p = function (a, b) {
var d = new RegExp(a, "i"),
e = b.gpuString.toLowerCase();
return d.test(e);
},
q = function (a, b) {
if (!a || 0 == a.length || "all" === a) return !0;
var d = b.version(),
e = a.indexOf("-");
if (0 > e) return a == d;
var f = a.length;
if (0 == e) return d <= parseFloat(a.substring(1, f));
if (e == f - 1) return d >= parseFloat(a.substring(0, e));
var g = parseFloat(a.substring(0, e)),
e = parseFloat(a.substring(e + 1, f));
return d >= g && d <= e;
},
r = function (a, b) {
f(a.blacklisted) && (b.blacklisted = !0);
f(a.whitelisted) && (b.whitelisted = !0);
f(a.scrolltoy) && (b.scrollToY = a.scrolltoy);
f(a.webp) && (b.webp = a.webp);
f(a.smartrepaint) && (b.smartrepaint = a.smartrepaint);
f(a.fullscreen) && (b.fullscreen = a.fullscreen);
f(a.clearbeforerender) && (b.clearbeforerender = a.clearbeforerender);
f(a.webgl) && (b.webgl = a.webgl);
f(a.webglsmartrepaint) && (b.webglsmartrepaint = a.webglsmartrepaint);
f(a.webglpreservebuffer) && (b.webglpreservebuffer = a.webglpreservebuffer);
f(a.webglflush) && (b.webglflush = a.webglflush);
f(a.webgluploadsubarray) && (b.webgluploadsubarray = a.webgluploadsubarray);
f(a.webglensurecanvasrendercomplete) && (b.webglensurecanvasrendercomplete = a.webglensurecanvasrendercomplete);
f(a.webgltransparentbg) && (b.webgltransparentbg = a.webgltransparentbg);
f(a.streamvideo) && (b.streamvideoformat = a.streamvideo);
f(a.sound) && (f(a.sound.audioformat) && (b.audioformat = a.sound.audioformat), f(a.sound.usingwebaudio) && (CONFIG.set("usingwebaudio", a.sound.usingwebaudio), CONFIG.set("webaudio", 1 == a.sound.usingwebaudio)));
f(a.touchinterval) && (b.touchinterval = a.touchinterval);
return b;
},
t = function (a) {
return (
"MOBILEFEATUREBUILD" == CONFIG.FEATURELEVEL &&
!CONFIG.is("swipeupanimation.show", 0) &&
(G.isDefined(a) ? a : !0) &&
(DEVICE.ios7_0 || ((DEVICE.ios11 || DEVICE.ios10 || DEVICE.ios9 || DEVICE.ios8) && !DEVICE.iphone6 && !DEVICE.iphone6Plus && null === DEVICE.ipad))
);
},
u = function () {
for (var a = G.query("#dots-scrollup"), b = 0; 10 > b; b++) {
var d = G.create("div", { id: "particleBorder000" + b });
G.addClass(d, "swipe_up_border");
var e = G.create("div", { id: "particleCore000" + b });
G.addClass(e, "swipe_up_dot");
G.append(a, e);
G.append(a, d);
}
a = G.query("#finger-dots");
G.addClass(a, "scrollAnimationContainer scrollup_animation");
},
B = {
scrollNode: null,
scrollDotChilds: function () {
return 0 < G.query("#dots-scrollup").childNodes.length;
},
enabled: !1,
createAnimations: u,
disableAnimations: function () {
var a = G.query("#dots-scrollup");
for (a.childNodes; a.firstChild; ) a.removeChild(a.firstChild);
G.query("#finger-dots").className = "";
},
isScrollAnimatedEnabled: t,
generateScrollAnimationBody: function (a) {
if (t() && G.isElement(a)) {
var b;
b = G.query("#cover-scrollup");
var d;
d = G.query("#cover-scrollup");
d = "[object Array]" === Object.prototype.toString.call(d) ? 0 < d.length : null !== d;
b = d ? b : G.create("div", { id: "cover-scrollup" });
d = G.create("div", { id: "dots-scrollup" });
var e = G.create("div", { id: "scrollup" });
G.addClass(e, "scrollup");
G.css(d, { top: "22px", position: "absolute" });
var f = G.create("div", { id: "finger-dots" });
G.css(b, { visibility: "hidden" });
G.append(e, f);
G.append(b, d);
G.append(b, e);
G.append(b, f);
G.append(a, b);
B.scrollNode = b;
u();
}
},
isReady: function () {
return null !== B.scrollNode;
},
},
A = {
_globalshaderObjDefaultMatrix: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
getGlobalShader: function () {
A._globalshaderObj || (A._globalshaderObj = new PIXI.GreentubeGlobalShader());
return A._globalshaderObj;
},
getGlobalShaderDefaultColorTransformationMatrix: function () {
return A._globalshaderObjDefaultMatrix;
},
convertToWebGLColorTransformationMatrix: function (a, b) {
(G.isNotNullAndDefined(a) && 16 === a.length) || (a = Array(16));
a[0] = 0.01 * b.percentageRedFromRed;
a[1] = 0.01 * b.percentageRedFromGreen;
a[2] = 0.01 * b.percentageRedFromBlue;
a[3] = b.offsetRed / 255;
a[4] = 0.01 * b.percentageGreenFromRed;
a[5] = 0.01 * b.percentageGreenFromGreen;
a[6] = 0.01 * b.percentageGreenFromBlue;
a[7] = b.offsetGreen / 255;
a[8] = 0.01 * b.percentageBlueFromRed;
a[9] = 0.01 * b.percentageBlueFromGreen;
a[10] = 0.01 * b.percentageBlueFromBlue;
a[11] = b.offsetBlue / 255;
a[12] = 0;
a[13] = 0;
a[14] = 0;
a[15] = 1;
return a;
},
hasColorTransformation: function (a) {
for (; G.isNotNullAndDefined(a); ) {
if (G.isNotNullAndDefined(a.colortransformation) || G.isNotNullAndDefined(a.intrinsiccolortransformation)) return !0;
a = a.parent;
}
return !1;
},
getFinalColorTransformation: function (a) {
for (
var b = null,
d = (GRA = BRA = ORA = RGA = GGA = BGA = OGA = RBA = GBA = BBA = OBA = -1),
e = (GRB = BRB = ORB = RGB = GGB = BGB = OGB = RBB = GBB = BBB = OBB = -1),
f = (GRT = BRT = ORT = RGT = GGT = BGT = OGT = RBT = GBT = BBT = OBT = -1);
G.isNotNullAndDefined(a);
) {
if ((b = G.isNotNullAndDefined(a.colortransformation)) || G.isNotNullAndDefined(a.intrinsiccolortransformation))
(b = b ? a.colortransformation : a.intrinsiccolortransformation),
-1 === d
? ((f = d = b.percentageRedFromRed),
(GRT = GRA = b.percentageGreenFromRed),
(BRT = BRA = b.percentageBlueFromRed),
(ORT = ORA = b.offsetRed),
(RGT = RGA = b.percentageRedFromGreen),
(GGT = GGA = b.percentageGreenFromGreen),
(BGT = BGA = b.percentageBlueFromGreen),
(OGT = OGA = b.offsetGreen),
(RBT = RBA = b.percentageRedFromBlue),
(GBT = GBA = b.percentageGreenFromBlue),
(BBT = BBA = b.percentageBlueFromBlue),
(OBT = OBA = b.offsetBlue))
: ((e = b.percentageRedFromRed),
(GRB = b.percentageGreenFromRed),
(BRB = b.percentageBlueFromRed),
(ORB = b.offsetRed),
(RGB = b.percentageRedFromGreen),
(GGB = b.percentageGreenFromGreen),
(BGB = b.percentageBlueFromGreen),
(OGB = b.offsetGreen),
(RBB = b.percentageRedFromBlue),
(GBB = b.percentageGreenFromBlue),
(BBB = b.percentageBlueFromBlue),
(OBB = b.offsetBlue)),
-1 !== d &&
-1 !== e &&
((f = 0.01 * (e * d + RGB * GRA + RBB * BRA)),
(GRT = 0.01 * (GRB * d + GGB * GRA + GBB * BRA)),
(BRT = 0.01 * (BRB * d + BGB * GRA + BBB * BRA)),
(ORT = 0.01 * (e * ORA + RGB * OGA + RBB * OBA) + ORB),
(RGT = 0.01 * (e * RGA + RGB * GGA + RBB * BGA)),
(GGT = 0.01 * (GRB * RGA + GGB * GGA + GBB * BGA)),
(BGT = 0.01 * (BRB * RGA + BGB * GGA + BBB * BGA)),
(OGT = 0.01 * (GRB * ORA + GGB * OGA + GBB * OBA) + OGB),
(RBT = 0.01 * (e * RBA + RGB * GBA + RBB * BBA)),
(GBT = 0.01 * (GRB * RBA + GGB * GBA + GBB * BBA)),
(BBT = 0.01 * (BRB * RBA + BGB * GBA + BBB * BBA)),
(OBT = 0.01 * (BRB * ORA + BGB * OGA + BBB * OBA) + OBB),
(d = f),
(GRA = GRT),
(BRA = BRT),
(ORA = ORT),
(RGA = RGT),
(GGA = GGT),
(BGA = BGT),
(OGA = OGT),
(RBA = RBT),
(GBA = GBT),
(BBA = BBT),
(OBA = OBT));
a = a.parent;
}
return (b = new GT1063(f, RGT, RBT, ORT, GRT, GGT, GBT, OGT, BRT, BGT, BBT, OBT));
},
updateObjectColorTransformation: function (a, b, d) {
if (null !== a && "1" === CONFIG.webgl) {
b = a._displayObject._cachedSprite ? a._displayObject._cachedSprite : a._graphicsDisplayObject && a._graphicsDisplayObject._cachedSprite ? a._graphicsDisplayObject._cachedSprite : a._displayObject;
if (this.hasColorTransformation(a)) {
var e = this.getFinalColorTransformation(a);
b.gt_colormatrix = JSUTIL.webGLGlobalShader.convertToWebGLColorTransformationMatrix(b.gt_colormatrix, e);
if (d) for (d = 0; d < b.children.length; ++d) b.children[d] && b.children[d] instanceof PIXI.Text && (b.children[d].gt_colormatrix = b.gt_colormatrix);
} else if (((b.gt_colormatrix = null), d)) for (d = 0; d < b.children.length; ++d) b.children[d] && b.children[d] instanceof PIXI.Text && (b.children[d].gt_colormatrix = null);
a.setAsDirtyArea_1(a);
}
},
},
C = {
signedByte: new Int8Array(1),
signedShort: new Int16Array(1),
unsignedShort: new Uint16Array(1),
signedInt: new Int32Array(1),
castToByte: function (a) {
return (this.signedByte[0] = a);
},
castToShort: function (a) {
return (this.signedShort[0] = a);
},
castToInt: function (a) {
return (this.signedInt[0] = a);
},
castToChar: function (a) {
return (this.unsignedShort[0] = a);
},
};
b.SLOT.UTIL = {
getBasedir: function () {
if (null == basedir) {
var a = k("basedir", !0);
if (null === a) (a = b.SLOT.PARAMS.stringURLParamsToObject()), "basedir" in a ? ((basedir = a.basedir), CONFIG.set("basedir", basedir)) : (basedir = "");
else return a;
}
return basedir;
},
addOpenTypeCustomFont: function (a, b, e, f) {
d.length += 1;
d[b + (e ? "_bold" : "_plain") + (f ? "_italic" : "_normal")] = a;
},
getOpenTypeCustomFont: function (a, b, e) {
return 0 < d.length && ((a = d[a + (b ? "_bold" : "_plain") + (e ? "_italic" : "_normal")]), G.isNotNullAndDefined(a)) ? a : null;
},
e: f,
setParams: function (a) {
b.SLOT.PARAMS.setParams(a);
},
webaudio: function () {
return 0 != CONFIG.get("usingwebaudio") && DEVICE.webaudio();
},
noaudio: function () {
return 0 == CONFIG.get("usingwebaudio") || !DEVICE.webaudio() || 1 == CONFIG.get("noaudio");
},
equals_2: function (a, b) {
return g(a, b, []);
},
merge: function (a, b) {
var d = {};
G.extend(d, a, b);
return d;
},
loadCSS: function (a) {
var b = G.create("style", { type: "text/css" });
b.innerHTML = "@import url(' " + a + " ');";
G.append(G.query("head"), b);
},
load: function (a, b) {
var d = {},
e;
for (e in a.os) {
var g = a.os[e];
if (n(g.fingerprint, g.negfingerprint, b) && (r(g, d), f(g.browser)))
for (var k in g.browser)
if (g.browser.hasOwnProperty(k)) {
var m = g.browser[k];
if (n(m.fingerprint, m.negfingerprint, b) && q(m.browserversion, b)) {
r(m, d);
if (f(m.device))
for (var t in m.device)
if (m.device.hasOwnProperty(t)) {
var u = m.device[t];
n(u.fingerprint, u.negfingerprint, b) && r(u, d);
}
if (f(m.gpu))
for (t in m.gpu)
if (m.gpu.hasOwnProperty(t)) {
var u = m.gpu[t],
B;
var A = u.fingerprint;
B = u.negfingerprint;
var C = b;
C[A] ? (B = !0) : void 0 === C[A] ? ((A = p(A, C)) && f(B) && (A = A && !p(B, C)), (B = A)) : (B = void 0);
B && q(u.browserversion, b) && r(u, d);
}
}
}
}
for (var Q in a.device) (e = a.device[Q]), f(e) && a.device.hasOwnProperty(Q) && n(e.fingerprint, e.negfingerprint, b) && r(e, d);
if ("1" == CONFIG.get("debug")) for (var S in d) d.hasOwnProperty(S) && console.log("_settings: " + S + ": " + d[S]);
return d;
},
setupContainers: function (a, d) {
CONFIG.CONTAINERS = JSUTIL.merge(CONFIG.CONTAINERS, a);
var e = null,
f = null,
g = G.query("body"),
k = null;
CONFIG.get("autoload_style") && JSUTIL.loadCSS(JSUTIL.getBasedir() + "slot_style.css");
if (d) {
G.query("html");
G.css({ height: "100%", width: "100%" });
G.css({ height: "auto", width: "100%" });
k = G.create("div", { id: CONFIG.CONTAINERS.fullscreen });
G.css(k, { "background-color": "rgb(0,0,0)", position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%" });
0 === k.length && CONFIG.get("fullscreen") && (console.warn("the fullscreen mode container is missing and the feature is enable, it'll be disable automatically"), CONFIG.set("fullscreen", !1));
var f = G.create("audio", { id: CONFIG.CONTAINERS.audio_container, preload: "auto" }),
e = G.create("div", { id: CONFIG.CONTAINERS.container }),
m = G.create("div", { id: CONFIG.CONTAINERS.cheat_container });
G.append(k, f);
G.append(k, e);
G.append(k, m);
G.append(g, k);
}
e = G.query("div#" + CONFIG.CONTAINERS.container);
G.css(e, { "background-color": "rgb(0,0,0)", position: "absolute" });
CONFIG.CONTAINERS.container = e;
CONFIG.CONTAINERS.audio_container = G.query("audio#" + CONFIG.CONTAINERS.audio_container);
CONFIG.CONTAINERS.cheat_container = G.query("div#" + CONFIG.CONTAINERS.cheat_container);
e = function (a) {
if (G.isElement(a)) return !1;
if (G.isArray(a)) return G.isEmpty(a);
};
e(CONFIG.CONTAINERS.audio_container) && console.error("audio container is missing, this could cause issues in old devices");
if (e(CONFIG.CONTAINERS.container)) throw (console.error("slot container is missing"), Error("slot container is missing"));
f = b.SLOT.PARAMS.parseUrlToObject();
G.has(f, "debug") &&
"1" === f.debug &&
(e(CONFIG.CONTAINERS.cheat_container) ? console.warn("cheat container is missing") : G.css(CONFIG.CONTAINERS.cheat_container, { width: "250px", height: "75px", position: "absolute" }));
CONFIG.CONTAINERS.fullscreen_container = G.query("div#" + CONFIG.CONTAINERS.fullscreen);
G.isElement(CONFIG.CONTAINERS.fullscreen_container) || (console.info("fullscreen mode has been disabled, container is missing"), CONFIG.set("fullscreen", !1));
},
GLUtil: {
mCurrentHierarchy: 0,
mClip: [],
checkArraySize_0: function () {
var a = Math.max(64, this.mCurrentHierarchy + 1);
if (this.mClip.length < a) {
var b = this.mClip.length;
for (this.mClip.length = a; b < a; b++) (this.mClip[b] = new ClipRegion()), 0 == b && this.updateMainClipRegion_0();
128 < a && console.warn("ClipRegion stack is too large! length: " + a);
}
},
updateMainClipRegion_0: function () {
null != this.mClip[0] && this.mClip[0].setClip_4(0, 0, RENDERER.width, RENDERER.height);
},
pushClip_0: function () {
++this.mCurrentHierarchy;
this.checkArraySize_0();
this.mClip[this.mCurrentHierarchy].set_1(this.mClip[this.mCurrentHierarchy - 1]);
},
popClip_0: function () {
--this.mCurrentHierarchy;
0 > this.mCurrentHierarchy && (this.mCurrentHierarchy = 0);
},
getClip_0: function () {
this.checkArraySize_0();
return this.mClip[this.mCurrentHierarchy];
},
applyClip_4: function (a, b, d, e) {
this.pushClip_0();
a = GTObjPool.getTempRect_4(a, b, a + d, b + e);
this.getClip_0().clip_1(a);
GTObjPool.recycleTempRect(a);
return null;
},
isClipEmpty_0: function () {
return this.getClip_0().isEmpty_0();
},
revertClip_1: function (a) {
if (null == a || a instanceof ClipRegion) null != a ? this.getClip_0().set_1(a) : this.popClip_0();
},
},
MathUtil: C,
not: function (a) {
return G.isUndefined(a);
},
getReplacedVideoName: function (a) {
var b = a.substring_2(0, a.length - 4),
d = !1;
JSUTIL.e(CONFIG.VIDEOS[b]) && JSUTIL.e(CONFIG.VIDEOS[b].format) && ((a = a.replace(".flv", "." + CONFIG.VIDEOS[b].format)), (d = !0));
d || (a = a.replace(".flv", ".jpg"));
return a;
},
isArray: function (a) {
return "[object Array]" === Object.prototype.toString.call(a);
},
scrollAnimatorController: B,
webGLGlobalShader: A,
getAccurateTime: function () {
performance.now = (function () {
return (
performance.now ||
performance.mozNow ||
performance.msNow ||
performance.oNow ||
performance.webkitNow ||
function () {
return new Date().getTime();
}
);
})();
return performance.now();
},
instanceOf: e,
setFullscreenMode: function (a) {
if (a) {
var b = CONFIG.get("CONTAINERS").fullscreen_container;
b.requestFullscreen
? b.requestFullscreen()
: b.mozRequestFullScreen
? b.mozRequestFullScreen()
: b.webkitRequestFullScreen
? b.webkitRequestFullScreen()
: b.msRequestFullScreen
? b.msRequestFullScreen()
: b.msRequestFullscreen && b.msRequestFullscreen();
} else
document.cancelFullscreen
? document.cancelFullscreen()
: document.mozCancelFullScreen
? document.mozCancelFullScreen()
: document.webkitCancelFullScreen
? document.webkitCancelFullScreen()
: document.msCancelFullScreen
? document.msCancelFullScreen()
: document.msExitFullscreen && document.msExitFullscreen();
null != CONFIG &&
null != CONFIG.OBSERVER &&
(CONFIG.OBSERVER.hasOwnProperty && CONFIG.OBSERVER.hasOwnProperty("requestFullScreenMode") ? CONFIG.OBSERVER.requestFullScreenMode(a) : console.warn("observer is set, but requestFullScreenMode function doesn't exist"));
},
fullscreenActive: function () {
return (
document.fullScreen ||
document.mozFullScreen ||
document.webkitIsFullScreen ||
(document.fullscreenElement && null != document.fullscreenElement) ||
(document.msFullscreenElement && null != document.msFullscreenElement) ||
!1
);
},
blockKey: function (b) {
a.addEventListener("keydown", function (a) {
for (var d = 0; d < b.length; d++) if (a.keyCode === b[d]) return a.preventDefault(), !1;
});
},
getParameter: k,
isSlot: function () {
return "undefined" !== typeof GT1479 && (null == CONFIG.CLIENTSLOTAPPLET || e(CONFIG.CLIENTSLOTAPPLET, GT1479));
},
soundlazyloadingPossible: function () {
return 1 == CONFIG.CLIENTSLOTAPPLET.getParameter_1("html5mobileseparatesounds") && 1 != CONFIG.get("slotparkaudio") && !this.noaudio();
},
};
})(window);
function initHowler() {
var a = {},
b = null;
"undefined" !== typeof AudioContext ? (b = new AudioContext()) : "undefined" !== typeof webkitAudioContext && (b = new webkitAudioContext());
var d = "undefined" === typeof b.createGain ? b.createGainNode() : b.createGain();
d.gain.value = 1;
d.connect(b.destination);
var e = function () {
this._volume = 1;
this._muted = !1;
this.usingWebAudio = !0;
this._howls = [];
};
e.prototype = {
volume: function (a) {
return (a = parseFloat(a)) && 0 <= a && 1 >= a ? ((this._volume = a), (d.gain.value = a), this) : d.gain.value;
},
mute: function () {
this._setMuted(!0);
return this;
},
unmute: function () {
this._setMuted(!1);
return this;
},
_setMuted: function (a) {
this._muted = a;
d.gain.value = a ? 0 : this._volume;
},
};
var f = new e(),
e = null,
e = new Audio(),
g = {
mp3: !!e.canPlayType("audio/mpeg;").replace(/^no$/, ""),
opus: !!e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""),
ogg: !!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
wav: !!e.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""),
m4a: !!(e.canPlayType("audio/x-m4a;") || e.canPlayType("audio/aac;")).replace(/^no$/, ""),
weba: !!e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, ""),
},
e = function (a) {
this._dataarray = a.dataarray || !1;
this._autoplay = a.autoplay || !1;
this._buffer = a.buffer || !1;
this._duration = a.duration || 0;
this._format = a.format || null;
this._loop = a.loop || !1;
this._loaded = !1;
this._sprite = a.sprite || {};
this._src = a.src || "";
this._pos3d = a.pos3d || [0, 0, -0.5];
this._volume = a.volume || 1;
this._urls = a.urls || [];
this._rate = a.rate || 1;
this._onload = [a.onload || function () {}];
this._onloaderror = [a.onloaderror || function () {}];
this._onend = [a.onend || function () {}];
this._onpause = [a.onpause || function () {}];
this._onplay = [a.onplay || function () {}];
this._onendTimer = [];
this._audioNode = [];
this._setupAudioNode();
f._howls.push(this);
this.load();
};
e.prototype = {
load: function () {
for (var a = null, b = 0; b < this._urls.length; b++) {
var d, e;
if (this._format) d = this._format;
else if (((e = this._urls[b].toLowerCase().split("?")[0]), (d = (d = e.match(/.+\.([^?]+)(\?|$)/)) && 2 <= d.length ? d : e.match(/data\:audio\/([^?]+);/)))) d = d[1];
else {
this.on("loaderror");
return;
}
if (g[d]) {
a = this._urls[b];
break;
}
}
if (a) return (this._src = a), m(this, a), this;
this.on("loaderror");
},
urls: function (a) {
return a ? (this.stop(), (this._urls = "string" === typeof a ? [a] : a), (this._loaded = !1), this.load(), this) : this._urls;
},
getContextState: function () {
return b.state;
},
getContext: function () {
return b;
},
getCache: function () {
return a;
},
play: function (a, d, e, f, g) {
var k = this;
"function" === typeof a && (d = a);
(a && "function" !== typeof a) || (a = "_default");
if (!k._loaded)
return (
k.on("load", function () {
k.play(a, d);
}),
k
);
if (!k._sprite[a]) return "function" === typeof d && d(), k;
k._inactiveNode(function (m) {
m._sprite = a;
var n = 0 < m._pos ? m._pos : k._sprite[a][0] / 1e3 + g / 1e3,
p = f / 1e3 - g / 1e3 - m._pos,
H = !(!k._loop && !k._sprite[a][2]),
I = "string" === typeof d ? d : Math.round(Date.now() * Math.random()) + "",
L;
(function () {
L = setTimeout(function () {
H || (k._nodeById(I).paused = !0);
k.on("end", I);
}, 1e3 * p);
k._onendTimer.push(L);
})();
var J = k._sprite[a][0] / 1e3,
M = k._sprite[a][1] / 1e3;
JSUTIL.e(e) && -1 < e && ((J = k._sprite[a][0] / 1e3 + e / 1e3), (M = f / 1e3 - e / 1e3));
m.id = I;
m.paused = !1;
q(k, [H, J, M], I);
m = k._nodeById(I);
k._playStart = b.currentTime;
m.gain.value = k._volume;
"undefined" === typeof m.bufferSource.start
? H
? m.bufferSource.noteGrainOn(0, k._sprite[a][0] / 1e3 + e / 1e3 + 0.015, f / 1e3 - e / 1e3 - 0.075)
: k._loop
? m.bufferSource.noteGrainOn(0, n, p + 1e3)
: m.bufferSource.noteGrainOn(0, n, p)
: k._loop
? m.bufferSource.start(0, n, 86400)
: m.bufferSource.start(0, n, p);
k.on("play");
"function" === typeof d && d(I, L);
return k;
});
return k;
},
pause: function (a, b) {
var d = this;
if (!d._loaded)
return (
d.on("play", function () {
d.pause(a);
}),
d
);
d._clearEndTimer(b || 0);
var e = a ? d._nodeById(a) : d._activeNode();
if (e) {
e._pos = d.pos(null, a);
if (!e.bufferSource) return d;
e.paused = !0;
if ("undefined" === typeof e.bufferSource.stop) e.bufferSource.noteOff(0);
else
try {
e.bufferSource.stop(0);
} catch (f) {}
}
d.on("pause");
return d;
},
stop: function (a, b) {
var d = this;
if (!d._loaded)
return (
d.on("play", function () {
d.stop(a);
}),
d
);
d._clearEndTimer(b || 0);
var e = a ? d._nodeById(a) : d._activeNode();
if (e) {
e._pos = 0;
if (!e.bufferSource) return d;
e.paused = !0;
if ("undefined" === typeof e.bufferSource.stop) e.bufferSource.noteOff(0);
else
try {
e.bufferSource.stop(0);
} catch (f) {}
}
return d;
},
mute: function (a) {
var b = this;
if (!b._loaded)
return (
b.on("play", function () {
b.mute(a);
}),
b
);
var d = a ? b._nodeById(a) : b._activeNode();
d && (d.gain.value = 0);
return b;
},
unmute: function (a) {
var b = this;
if (!b._loaded)
return (
b.on("play", function () {
b.unmute(a);
}),
b
);
var d = a ? b._nodeById(a) : b._activeNode();
d && (d.gain.value = b._volume);
return b;
},
volume: function (a, b) {
var d = this;
a = parseFloat(a);
if (0 <= a && 1 >= a) {
if (!d._loaded)
return (
d.on("play", function () {
d.volume(a, b);
}),
d
);
var e = b ? d._nodeById(b) : d._activeNode();
e ? (e.gain.value = a) : (d._volume = a);
return d;
}
return d._volume;
},
loop: function (a) {
return "boolean" === typeof a ? ((this._loop = a), this) : this._loop;
},
sprite: function (a) {
return "object" === typeof a ? ((this._sprite = a), this) : this._sprite;
},
pos: function (a, d) {
var e = this;
if (!e._loaded)
return (
e.on("load", function () {
e.pos(a);
}),
"number" === typeof a ? e : e._pos || 0
);
a = parseFloat(a);
var f = d ? e._nodeById(d) : e._activeNode();
if (f) return 0 <= a ? ((f._pos = a), e.pause(d).play(f._sprite, d), e) : f._pos + (b.currentTime - e._playStart);
if (0 <= a) return e;
for (f = 0; f < e._audioNode.length; f++) if (e._audioNode[f].paused && 4 === e._audioNode[f].readyState) return e._audioNode[f]._pos;
},
pos3d: function (a, b, d, e) {
var f = this;
b = "undefined" !== typeof b && b ? b : 0;
d = "undefined" !== typeof d && d ? d : -0.5;
if (!f._loaded)
return (
f.on("play", function () {
f.pos3d(a, b, d, e);
}),
f
);
if (0 <= a || 0 > a) {
var g = e ? f._nodeById(e) : f._activeNode();
g && ((f._pos3d = [a, b, d]), g.panner.setPosition(a, b, d));
} else return f._pos3d;
return f;
},
fade: function (a, b, d, e, f) {
a = Math.round(100 * a) / 100;
var g = this,
k = Math.abs(a - b),
m = a > b ? "down" : "up",
k = Math.round(k / 0.01),
n = d / k;
if (!g._loaded)
return (
g.on("load", function () {
g.fade(a, b, d, e, f);
}),
g
);
g.volume(a, f);
for (var p = 1; p <= k; p++)
(function () {
var d = Math.round(1e3 * (a + ("up" === m ? 0.01 : -0.01) * p)) / 1e3;
setTimeout(function () {
g.volume(d, f);
d === b && e && e();
}, n * p);
})();
},
fadeIn: function (a, b, d) {
return this.volume(0).play().fade(0, a, b, d);
},
fadeOut: function (a, b, d, e) {
var f = this,
g = null != f._nodeById(e) ? f._nodeById(e).gain.value : f._volume;
return f.fade(
g,
a,
b,
function () {
d && d();
f.pause(e);
f.on("end");
},
e
);
},
_nodeById: function (a) {
for (var b = this._audioNode[0], d = 0; d < this._audioNode.length; d++)
if (this._audioNode[d].id === a) {
b = this._audioNode[d];
break;
}
return b;
},
_activeNode: function () {
for (var a = null, b = 0; b < this._audioNode.length; b++)
if (!this._audioNode[b].paused) {
a = this._audioNode[b];
break;
}
this._drainPool();
return a;
},
_inactiveNode: function (a) {
this._drainPool();
var b;
b = this._setupAudioNode();
a(b);
},
_drainPool: function () {
var a = 0,
b;
for (b = 0; b < this._audioNode.length; b++) this._audioNode[b].paused && a++;
for (b = this._audioNode.length - 1; 0 <= b && !(20 >= a); b--) this._audioNode[b].paused && (this._audioNode[b].disconnect(0), a--, this._audioNode.splice(b, 1));
},
_clearEndTimer: function (a) {
a = this._onendTimer.indexOf(a);
a = 0 <= a ? a : 0;
this._onendTimer[a] && (clearTimeout(this._onendTimer[a]), this._onendTimer.splice(a, 1));
},
_setupAudioNode: function () {
var a = this._audioNode,
e = this._audioNode.length;
a[e] = "undefined" === typeof b.createGain ? b.createGainNode() : b.createGain();
a[e].gain.value = this._volume;
a[e].paused = !0;
a[e]._pos = 0;
a[e].readyState = 4;
a[e].connect(d);
a[e].panner = b.createPanner();
a[e].panner.setPosition(this._pos3d[0], this._pos3d[1], this._pos3d[2]);
a[e].panner.connect(a[e]);
return a[e];
},
on: function (a, b) {
var d = this["_on" + a];
if ("function" === typeof b) d.push(b);
else for (var e = 0; e < d.length; e++) b ? d[e].call(this, b) : d[e].call(this);
return this;
},
off: function (a, b) {
for (var d = this["_on" + a], e = b.toString(), f = 0; f < d.length; f++)
if (e === d[f].toString()) {
d.splice(f, 1);
break;
}
return this;
},
unload: function () {
CONFIG.STATS.SOUNDLENGTH -= this._duration;
for (var b = this._audioNode, d = 0; d < this._audioNode.length; d++) this.stop(b[d].id), b[d].disconnect(0);
(b = f._howls.indexOf(this)) && f._howls.splice(b, 1);
delete a[this._src];
},
};
var k = 0,
m = function (b, d) {
if (d in a) (b._duration = a[d].duration), n(b);
else if (b._dataarray) p(b._dataarray, d, b);
else {
var e = new XMLHttpRequest();
e.open("GET", d, !0);
e.responseType = "arraybuffer";
e.onload = function () {
var a = (e.status + "")[0];
if ("0" !== a && "2" !== a && "3" !== a) b.on("loaderror");
else p(e.response, d, b);
};
e.onerror = function () {
b._buffer = !0;
b._audioNode = [];
delete b._gainNode;
5 > k ? (k++, b.load()) : console.warn("it was not possible to retrieve the audio file");
};
try {
e.send();
} catch (f) {
e.onerror();
}
}
},
n = function (a, b) {
a._duration = b ? b.duration : a._duration;
CONFIG.STATS.SOUNDLENGTH += a._duration;
0 === Object.getOwnPropertyNames(a._sprite).length && (a._sprite = { _default: [0, 1e3 * a._duration] });
a._loaded || ((a._loaded = !0), a.on("load"));
a._autoplay && a.play();
},
p = function (d, e, f) {
b.decodeAudioData(
d,
function (b) {
b && ((a[e] = b), f._dataarray && (f._dataarray = void 0), n(f, b));
},
function (a) {
10 > (f.decodingRetries || 0) ? (p(d, e, f), (f.decodingRetries = 1 + f.decodingRetries || 0)) : (console.warn("not possible to decode: " + e), f.on("load"));
}
);
},
q = function (e, f, g) {
var k = e._nodeById(g);
"undefined" === typeof this.contextCurrentTime && (this.contextCurrentTime = -1);
"undefined" === typeof this.contextTimeStamp && (this.contextTimeStamp = Date.now());
if (this.contextCurrentTime == b.currentTime) {
if (this.contextTimeStamp + 1e3 < Date.now()) {
this.contextTimeStamp = Date.now();
console.log("AudioContext recreated");
if ("undefined" !== typeof b.close)
try {
b.close();
} catch (m) {}
if ("undefined" !== typeof AudioContext) b = new AudioContext();
else if ("undefined" !== typeof webkitAudioContext)
try {
b = new webkitAudioContext();
} catch (n) {
console.warn("Error: " + n);
}
k = "undefined" === typeof b.createGain ? b.createGainNode() : b.createGain();
k.gain.value = d.gain.value;
k.connect(b.destination);
d = k;
for (var p = 0; p < e._audioNode.length; p++) {
var q = e._audioNode[p],
D = "undefined" === typeof b.createGain ? b.createGainNode() : b.createGain();
D.gain.value = q.gain.value;
D.paused = q.paused;
D._pos = q._pos;
D.readyState = q.readyState;
D.connect(k);
"undefined" != typeof q.bufferSource && (D.bufferSource = q.bufferSource);
var H = b.createPanner();
H.setPosition(e._pos3d[0], e._pos3d[1], e._pos3d[2]);
H.connect(D);
D.panner = H;
"undefined" != typeof q.id && (D.id = q.id);
e._audioNode[p] = D;
}
k = e._nodeById(g);
}
} else this.contextTimeStamp = Date.now();
this.contextCurrentTime = b.currentTime;
k.bufferSource = b.createBufferSource();
k.bufferSource.buffer = a[e._src];
k.bufferSource.connect(k.panner);
k.bufferSource.loop = f[0];
f[0] && ((k.bufferSource.loopStart = f[1]), (k.bufferSource.loopEnd = f[1] + f[2]));
k.bufferSource.playbackRate.value = e._rate;
};
window.Howler = f;
window.Howl = e;
}
(function (a, b) {
a.SLOT.EVENTS = {
execute: function () {
var a = 0,
e = null,
f = G.body(),
g = DEVICE.screenSize().height,
k = null;
G.addListener("resize-game", function () {
null !== CONFIG.CLIENTSLOTAPPLET && m();
});
var m = function (a) {
a && a.preventDefault();
if (null !== CONFIG.CLIENTSLOTAPPLET) {
var b = CONFIG.CLIENTSLOTAPPLET.getTopContainer_0(),
d = function () {
var a = CONFIG.CLIENTSLOTAPPLET.getSize_0();
if (null === k || k.width !== a.width || k.height !== a.height) (k = a), G.scrollLeft(0), b.setRealSize_2(a.width, a.height);
};
null != b &&
(!0 === DEVICE.mozilla || !0 === DEVICE.desktop
? d()
: ((a = !0 === DEVICE.stock ? 1500 : 1),
null !== e && clearTimeout(e),
(e = setTimeout(function () {
d();
}, a))));
JSUTIL.scrollAnimatorController.isScrollAnimatedEnabled() && n();
}
},
n = function () {
if (JSUTIL.scrollAnimatorController.isReady()) {
var a = JSUTIL.scrollAnimatorController.scrollNode;
DEVICE.iPhoneSmallScreen()
? ((a.style.visibility = "visible"), JSUTIL.scrollAnimatorController.scrollDotChilds() || JSUTIL.scrollAnimatorController.createAnimations())
: ((a.style.visibility = "hidden"), JSUTIL.scrollAnimatorController.scrollDotChilds() && JSUTIL.scrollAnimatorController.disableAnimations());
}
DEVICE.ios7 &&
setTimeout(function () {
n();
}, 100);
};
b.addEventListener(
"gesturestart",
function (b) {
var e = new Date().getTime();
e - a < CONFIG.get("touchinterval") && b.preventDefault();
a = e;
null !== DEVICE && (DEVICE.ios7_0 || (DEVICE.iphone6Plus && g > DEVICE.screenSize().height)) && (G.fire("resize-game"), (g = DEVICE.screenSize().height));
},
!1
);
b.addEventListener(
"orientationchange",
function (a) {
m(a);
},
!1
);
b.addEventListener(
"resize",
function (a) {
(null !== DEVICE && DEVICE.mozilla && DEVICE.mobile) || G.fire("resize-game");
},
!1
);
b.addEventListener("blur", function () {}, !1);
b.addEventListener(
"focus",
function () {
null !== DEVICE && DEVICE.mozilla ? G.css(f, { height: "100%" }) : G.css(f, { height: "150%" });
null !== CONFIG.CLIENTSLOTAPPLET && CONFIG.CLIENTSLOTAPPLET.restartTimerLoopIfNeeded_0();
G.fire("resize-game");
},
!1
);
b.addEventListener(
"mozfullscreenchange",
function (a) {
G.fire("resize-game");
},
!1
);
DEVICE.mobile || JSUTIL.blockKey([39, 9]);
DEVICE.mozilla &&
!DEVICE.webkit &&
b.matchMedia("(orientation: portrait)").addListener(function () {
m();
});
b.addEventListener("message", function (a) {
if ("string" == typeof a.data) {
var d = a.data.startsWith_1("!") ? a.data.substr(1) : a.data,
e = "";
0 < d.indexOf(":") &&
((e = d.split(":")),
GT1677.prototype.equalsIgnoreCaseAZ_2(e[0], GT697.prototype.KEY_OVERRIDE_MAXBET) &&
CONFIG.CLIENTSLOTAPPLET.notifyPropertyChangedImpl_2(GT697.prototype.KEY_EXTERNALLOGGING, "message eventlistener (before checking source): " + a.data));
(a.source == b[CONFIG.MESSAGETARGET] && b[CONFIG.MESSAGETARGET] != b.self) || a.data.startsWith_1("!")
? "doStop" == d
? CONFIG.CLIENTSLOTAPPLET.doStop_0()
: 0 < d.indexOf(":") &&
(GT1677.prototype.equalsIgnoreCaseAZ_2(e[0], GT697.prototype.KEY_OVERRIDE_MAXBET) &&
CONFIG.CLIENTSLOTAPPLET.notifyPropertyChangedImpl_2(GT697.prototype.KEY_EXTERNALLOGGING, "message eventlistener: " + e[0] + "," + e[1]),
CONFIG.CLIENTSLOTAPPLET.setProperty_2(e[0], e[1]))
: a.source == b.self && ((e = a.data.split(":")), "GAMEGUICREATED" === e[0] && m());
}
});
"FULLFEATUREBUILD" != CONFIG.FEATURELEVEL &&
(JSUTIL.scrollAnimatorController.enabled ? b.scrollTo(0, b.scrollY) : b.scrollTo(0, CONFIG.get("scrollToY")),
setInterval(function () {
JSUTIL.scrollAnimatorController.enabled ? b.scrollTo(0, b.scrollY) : b.scrollTo(0, CONFIG.get("scrollToY"));
if ((DEVICE.iphone6Plus && 0 != b.orientation) || DEVICE.mozilla) g != DEVICE.screenSize().height && G.fire("resize-game"), (g = DEVICE.screenSize().height);
}, 100));
DEVICE.ios7 && JSUTIL.scrollAnimatorController.isScrollAnimatedEnabled() && n();
},
};
})(window.__greentube_games, window);
(function (a, b) {
var d = G.body(),
e = a.SLOT.CONFIG,
f = b.DEVICE;
b.JSUTIL = a.SLOT.UTIL;
var g = function (a, d) {
b[e.MESSAGETARGET].postMessage("!" + a + ":" + (d ? d : ""), "*");
},
k = {
custom: function (a, b) {
g(a);
},
sound: function (a) {
g("SOUND", a);
},
spin: function () {
g("STARTSPIN");
},
balance: function () {
g("BALANCE");
},
collect: function () {
g("COLLECT");
},
leave: function () {
g("LEAVE_GAME");
},
auto: function () {
return {
toogle: function () {
g("AUTOPLAYTOGGLE");
},
off: function () {
g("AUTOPLAYOFF");
},
};
},
bet: function () {
return {
set: function (a) {
g("BET", a);
},
up: function () {
g("BET_UP");
},
down: function () {
g("BET_DOWN");
},
max: function () {
g("MAXBET");
},
min: function () {
g("MINBET");
},
};
},
paytable: function () {
return {
call: function () {
g("PAYTABLE");
},
next: function () {
g("PAYTABLE_NEXT");
},
};
},
line: function () {
return {
up: function () {
g("LINE_UP");
},
down: function () {
g("LINE_DOWN");
},
};
},
replay: function () {
g("REPLAY");
},
override: function () {
return {
maxbet: function (a) {
g("OVERRIDE_MAXBET", a);
},
lines: function (a) {
g("OVERRIDE_LINES", a);
},
};
},
modalDialog: function (a) {
g("MODAL_DIALOG", a);
},
gamble: function () {
return {
start: function () {
g("GAMBLE");
},
red: function () {
g("GAMBLE_RED");
},
black: function () {
g("GAMBLE_BLACK");
},
};
},
},
m = function () {
var a = e.get("pregamewrapperurl");
if (a) {
var b = document.createElement("script");
b.src = a + "/pregamewrapper.js";
document.head.appendChild(b);
}
},
n = function () {
var b = e.get("pregamewrapperurls");
if (b)
for (var d = b.split(","), b = 0; b < d.length; b++) {
var f = document.createElement("script");
(function (b) {
var e = d[b].substring(d[b].lastIndexOf("/") + 1, d[b].lastIndexOf(".")).toUpperCase();
f.onload = function () {
a[e].init(d[b].substring(0, d[b].lastIndexOf("/")));
};
})(b);
f.src = d[b];
document.head.appendChild(f);
}
},
p = function () {
var d = JSUTIL.getBasedir(),
g = function (a) {
return G.get(a).then(JSON.parse);
},
k = function (a, b) {
Promise.all([
("FULLFEATUREBUILD" == e.FEATURELEVEL && JSUTIL.webaudio()) || JSUTIL.noaudio() || 1 == JSUTIL.getParameter("slotparkaudio") || (1 == JSUTIL.getParameter("html5mobileseparatesounds") && JSUTIL.webaudio())
? null
: g(d + "sound" + e.get("soundfilesuffix") + ".json").then(function (a) {
e.SOUNDS = a.sounds;
}),
g(d + "sound_multiple.json").then(function (a) {
e.SOUNDSSEPARATE = a.sounds;
}),
g(d + (G.isDefined(e.IMAGE_SCALE) ? "images_" + e.IMAGE_SCALE + "/" : "") + "images.json").then(function (a) {
e.IMAGES = a.images;
}),
g(d + (G.isDefined(e.VIDEO_SCALE) ? "videos_" + e.VIDEO_SCALE + "/" : "") + "video.json").then(function (a) {
e.VIDEOS = a.videos;
}),
]).then(
function () {
a();
},
function (a) {
console.error(a);
b(Error("An error while reading essential JSON files keeps the game from starting."));
}
);
};
return new Promise(function (p, q) {
g(d + "deviceconfig.json").then(
function (r) {
r = JSUTIL.load(r.config, f);
e.merge(r);
r = a.SLOT.PARAMS;
e = r.mergeGetParams(e, r.getParams());
m();
n();
null != e.get("postmessagetarget") &&
((e.MESSAGETARGET = e.get("postmessagetarget")), null == b[e.MESSAGETARGET] && (console.warn("postmessagetarget is set, but target doesn't exist"), (e.MESSAGETARGET = "top")));
JSUTIL.webaudio() || !JSUTIL.isSlot() || 1 == JSUTIL.getParameter("slotparkaudio") ? e.set("soundfilesuffix", "") : e.set("soundfilesuffix", "_small");
e.get("webp") && f.stock && JSUTIL.e(e.get("webp")) && !e.get("webp") && e.get("webp", !1);
"MOBILEFEATUREBUILDBIGBUTTONCONSOLE" != e.FEATURELEVEL && (e.set("html5", "0"), e.set("bigbutton", "0"), e.set("bigmenubutton", "0"));
"FULLFEATUREBUILD" === e.FEATURELEVEL && f.msie && !f.msieMobile && ((r = f.msieVersion()), 1 < r && 11 >= r && e.set("h265video", "0"));
JSUTIL.scrollAnimatorController.generateScrollAnimationBody(e.CONTAINERS.fullscreen_container);
g(d + "asset_scales.json")
.then(function (a) {
e.ASSET_SCALES = a;
e.ASSET_SCALES.hasOwnProperty("images") &&
null != e.ASSET_SCALES.images &&
("high" == e.get("assetsquality") && 0 < e.ASSET_SCALES.images.length ? (e.IMAGE_SCALE = e.ASSET_SCALES.images[1]) : (e.IMAGE_SCALE = e.ASSET_SCALES.images[0]));
e.ASSET_SCALES.hasOwnProperty("videos") &&
null != e.ASSET_SCALES.images &&
("high" == e.get("assetsquality") && 0 < e.ASSET_SCALES.videos.length ? (e.VIDEO_SCALE = e.ASSET_SCALES.videos[1]) : (e.VIDEO_SCALE = e.ASSET_SCALES.videos[0]));
k(p, q);
})
.catch(function () {
console.log("This was just a check whether asset_scales.json even exists. Resuming non-multiscale loading...");
k(p, q);
});
},
function (a) {
console.error(a);
q(Error("An error while reading essential JSON files keeps the game from starting."));
}
);
});
},
q = function (a) {
var b = f.canIplay().ogg,
d = f.canIplay().mp3,
g = JSUTIL.getParameter("audioformat");
if (f.opera && !f.mobile) return a + "." + g;
1 == e.CLIENTSLOTAPPLET.getParameter_1("html5mobileseparatesounds") || "FULLFEATUREBUILD" == e.FEATURELEVEL
? (a = "oggandroid" == g ? a + ".ogg" : a + ".mp3")
: JSUTIL.e(g) && f.canIplay()[g]
? (a = a + "." + g)
: d
? (a += ".mp3")
: b
? (a += ".ogg")
: console.warn("mp3 and ogg not supported!");
return a;
},
r = function () {
var a = {
_storage: [],
events: function (b) {
b.call(a);
return this;
},
add: function (a, b) {
this._storage.push({ key: a, fn: b.bind(this) });
return this;
},
get: function (a) {
for (var b = 0; b < this._storage.length; b++) if (this._storage[b].key === a) return this._storage[b].fn;
return function () {};
},
};
u.wrapper = JSUTIL.merge(a, k);
b.addEventListener("message", function (b) {
var d = b.data;
if (0 !== d.indexOf("!")) {
var e = d.indexOf(":");
b = d.substr(0, e);
d = d.substr(e + 1);
"GAME_MODE" === b ? a.get(d)(d) : a.get(b)(d);
}
});
},
t = function () {
var g = a.SLOT.UTIL;
g.getParameter("gamename") && (document.title = JSUTIL.getParameter("gamename"));
f.ios6 ? G.css(d, { height: "auto" }) : f.mozilla ? G.css(d, { height: "100%" }) : G.css(d, { height: "150%" });
if (1 == g.getParameter("debug") && 0 != e.get("debugvisuals")) {
var k = e.CONTAINERS.fullscreen_container;
G.isElement(k) || (k = d);
b.STATS = new Stats();
STATS.setMode(0);
STATS.domElement.style.position = "absolute";
STATS.domElement.style.top = "0px";
G.append(k, STATS.domElement);
}
if (e.get("blacklisted")) alert("BLACKLISTED!");
else {
e.get("whitelisted");
if (G.isDefined(e.IMAGE_SCALE)) {
var k = parseFloat(e.IMAGE_SCALE),
m = parseFloat(e.ASSET_SCALES.images[0]);
e.SCALINGFACTOR = k + (k / m) * (e.TARGETSYMBOLWIDTH / 222 - m);
} else e.SCALINGFACTOR = e.TARGETSYMBOLWIDTH / 222;
e.CLIENTSLOTAPPLET = new com_greentube_slot_client_bookofradeluxe_BookOfRaDeluxeSlotApplet();
e.CLIENTSLOTAPPLET.setObserver(e.OBSERVER);
e.CLIENTSLOTAPPLET.setViewConfiguration_1(new GT916());
1 != g.getParameter("html5") || g.isSlot() || (e.TOPCONTAINEROFFSET = 0);
e.CLIENTSLOTAPPLET.setGameWrapperInterface_1(u.gameWrapperInterface);
k = g.getBasedir() + q("sound" + e.get("soundfilesuffix"));
1 == JSUTIL.getParameter("slotparkaudio")
? ((e.SOUNDS = e.SOUNDSSEPARATE), (e.SOUNDPLAYER = new SlotparkAudioController()), e.SOUNDPLAYER.setup(e.SOUNDS, { url: g.getBasedir() + "sounds_" + (f.ios ? "mp3" : "ogg") }))
: JSUTIL.noaudio()
? ((e.SOUNDS = e.SOUNDSSEPARATE), (e.SOUNDPLAYER = new NoAudioController()))
: JSUTIL.webaudio() &&
(initHowler(),
1 == e.CLIENTSLOTAPPLET.getParameter_1("html5mobileseparatesounds") || 1 == e.CLIENTSLOTAPPLET.getParameter_1("html5mobilezipsounds") || "FULLFEATUREBUILD" == e.FEATURELEVEL
? ((e.SOUNDS = e.SOUNDSSEPARATE), (e.SOUNDPLAYER = new WebAudioControllerSeparateFiles(e.SOUNDS, { url: k })))
: (e.SOUNDPLAYER = new WebAudioController(e.SOUNDS, { url: k })),
e.SOUNDPLAYER.setup());
1 == e.CLIENTSLOTAPPLET.getParameter_1("videoondemand") && e.set("videoondemand", "1");
g = e.CLIENTSLOTAPPLET.getSize_0();
e.set("orientation", (g.width > g.height ? GT1371.prototype.ORIENTATION_LANDSCAPE : GT1371.prototype.ORIENTATION_PORTRAIT) + "");
setTimeout(
function () {
e.CLIENTSLOTAPPLET.start_0();
},
f.stock ? 2500 : 0
);
}
},
u;
b.SLOT = a.SLOT.core = u = {
initializeGameWrapperInterface: function () {
null == this.gameWrapperInterface && ((this.gameWrapperInterface = new GT306()), (this.gameWrapperInterface.fireWithoutListeners = !0));
},
start: function (d, g, k) {
d.wrapper && r();
this.initializeGameWrapperInterface();
return f.ready().then(function () {
return new Promise(function (m, n) {
e = a.SLOT.PARAMS.initParams(g, f, e);
b.JSUTIL = a.SLOT.UTIL;
d = d || {};
d.__ignore_events || b.__greentube_games.SLOT.EVENTS.execute();
var q = a.SLOT.UTIL;
d.FEATURES = d.features || d.FEATURES;
e.set("features", d.FEATURES || {});
e.set("fullscreen", G.isDefined(e.get("features").fullscreen) ? e.get("features").fullscreen : !0);
e.set("autoload_style", G.isDefined(e.get("features").autoload_style) ? e.get("features").autoload_style : !0);
e.set("generate_containers", G.isDefined(e.get("features").generate_containers) ? e.get("features").generate_containers : !1);
d.CONTAINERS = d.CONTAINERS || d.container || {};
e.set("CONTAINERS", q.merge(e.CONTAINERS, d.CONTAINERS));
e.set("fixedContainer", G.isDefined(d.CONTAINERS.fixedContainer) ? d.CONTAINERS.fixedContainer : !1);
JSUTIL.setupContainers(e.CONTAINERS, e.get("generate_containers") || !1);
e.OBSERVER = k;
p().then(t).then(m, n);
});
});
},
pauseRendering: function () {
this.renderingPaused = !0;
},
resumeRendering: function () {
this.renderingPaused = !1;
},
getReservedAreaCoordinates: function () {
var a = { x: 0, y: 0, width: 0, height: 0 };
"undefined" != typeof GT1618 && (a = e.CLIENTSLOTAPPLET.getTopContainer_0().getNativeCoordinatesOfObject_1(GT1618.prototype.RESERVED_AREA_CONTAINER));
if (null == a || (0 == a.width && 0 == a.height)) a = e.CLIENTSLOTAPPLET.getTopContainer_0().getNativeCoordinatesOfObject_1(GT307.prototype.RESERVED_AREA_CONTAINER);
return a;
},
registerScreenSizeChangedEventHandler: function (a) {
a.interfaces = GT961;
e.CLIENTSLOTAPPLET.getEventDispatcher_0().registerHandler_2(GT1371.prototype.SCREENSIZE_CHANGED, a);
},
doStop: function () {
e.CLIENTSLOTAPPLET.doStop_0();
},
setProperty: function (a, b) {
GT1677.prototype.equalsIgnoreCaseAZ_2(a, GT697.prototype.KEY_OVERRIDE_MAXBET) && e.CLIENTSLOTAPPLET.notifyPropertyChangedImpl_2(GT697.prototype.KEY_EXTERNALLOGGING, "SLOT.setProperty(" + a + "," + b + ")");
e.CLIENTSLOTAPPLET.setProperty_2(a, b);
},
};
})(window.__greentube_games, window);
(function (a, b, d) {
a.WebAudioController = a = function (a, b) {
var d = this;
this._initialized = !1;
if (!Howl) throw Error("howler is not present");
this.onload = b.onload || function () {};
this.howl = new Howl({
urls: [b.url],
sprite: this._createSprites(a),
onload: function () {
d._initialized = !0;
d.onload();
},
});
};
a.prototype = {
_createSprites: function (a) {
var b = {},
d;
for (d in a)
if (a.hasOwnProperty(d)) {
var k = a[d],
m = 1e3 * k.start;
b[d] = [m, 1e3 * k.end - m];
}
return b;
},
setup: function () {},
initialized: function () {
return this._initialized;
},
useMultipleSounds: function () {
return !1;
},
isReady: function () {
var a = this.howl.getContextState();
return null == a ? this._initialized && (this._unlocked || !DEVICE.mobile) : this._initialized && "running" == a;
},
getContext: function () {
return this.howl;
},
play: function (a, b, d, k, m) {
try {
this.howl.play(a, m || function () {}, b, d, k);
} catch (n) {}
},
volume: function (a, b) {
this.howl.volume(a, b);
},
mute: function () {
Howler.mute();
},
unmute: function () {
CONFIG.CLIENTSLOTAPPLET.getSoundPlayer_0().isActive_0() && Howler.unmute();
},
panning: function (a, b) {
this.howl.pos3d(a, 0, 0, b);
},
stop: function (a, b, d, k) {
if (this.isReady())
try {
a && (0 < k ? this.howl.fadeOut(0, k, null, a) : this.howl.stop(a, d));
} catch (m) {}
},
};
})(window, document, JSUTIL);
(function (a, b, d) {
a.NoAudioController = a = function () {};
a.prototype = {
initialized: function () {
return !0;
},
isReady: function () {
return !0;
},
play: function (a, b, d, k, m, n, p, q) {
q && q(a);
},
volume: function (a, b) {},
mute: function () {},
unmute: function () {},
stop: function (a, b, d, k) {},
};
})(window, document, JSUTIL);
(function (a) {
var b = function () {
this._PixiTextObjectsPool = [];
this._PixiTextObjectsCache = [];
this._PixiTextObjectsCacheObjectLifeTime = 3e4;
this._RectObjectsPool = [];
this._PixiTextObjectsPoolMaxSize = 100;
this._ClipRegionObjectsPool = [];
this._Vec2ObjectsPool = [];
this._StreamVideoObjectsPool = [];
};
a.GTObjectsPool = b;
b.prototype = {
recycleStreamVideoObject: function (a) {
40 > this._StreamVideoObjectsPool.length && this._StreamVideoObjectsPool.push(a);
},
getStreamVideoObject: function () {
return 0 < this._StreamVideoObjectsPool.length ? this._StreamVideoObjectsPool.pop() : document.createElement("video");
},
recyclePixiTextObject: function (a) {
var b = Date.now(),
f = null;
if (Object.values) f = Object.values(this._PixiTextObjectsCache);
else
var g = this,
f = Object.keys(g._PixiTextObjectsCache).map(function (a) {
return g._PixiTextObjectsCache[a];
});
for (var k = 0; k < f.length; ++k) {
var m = f[k];
m && 0 < m.cacheDestroyTime && m.cacheDestroyTime < b && (delete this._PixiTextObjectsCache[m.cacheKey], this.addPixiTextObjectToPool(m));
}
a.cacheDestroyTime = b + this._PixiTextObjectsCacheObjectLifeTime;
this._PixiTextObjectsCache[a.cacheKey] ? this.addPixiTextObjectToPool(a) : (this._PixiTextObjectsCache[a.cacheKey] = a);
},
addPixiTextObjectToPool: function (a) {
this._PixiTextObjectsPool.length > this._PixiTextObjectsPoolMaxSize
? (GT1650.prototype.debugMode && console.log("PixiTextObjectsPool has reached the maximum size (" + this._PixiTextObjectsPoolMaxSize + ")! The passed object will be destroyed!"), a.destroy())
: ((a.canvas.width = 0), (a.canvas.height = 0), a.updateTexture(), (a.requiresUpdate = !1), (a.gt_colormatrix = null), (a.gt_separatedAlpha = !1), this._PixiTextObjectsPool.push(a));
},
getPixiTextObject_2: function (a, b) {
var f = a + "#" + b.font + "#" + b.fill + "#" + b.strokeThickness + "#" + b.stroke + "#" + b.dropShadowDistance + "#" + b.dropShadowColor + "#" + b.dropShadowAngle;
if (b.gradient) {
for (var g = b.gradient.gradient, f = f + ("#" + g.getRotation_0()), k = 0; k < g.getColors_0().length; ++k) f += "#" + g.getColors_0()[k].getRGB_0();
for (k = 0; k < g.getFractions_0().length; ++k) f += "#" + g.getFractions_0()[k];
}
if ((g = this._PixiTextObjectsCache[f])) return delete this._PixiTextObjectsCache[f], g;
0 < this._PixiTextObjectsPool.length ? ((g = this._PixiTextObjectsPool.pop()), g.setText(a), g.setStyle(b)) : (g = new PIXI.Text(a, b));
g.cacheKey = f;
g.cacheDestroyTime = 0;
return g;
},
getTempRect: function () {
return 0 < this._RectObjectsPool.length ? this._RectObjectsPool.pop() : new GT1553(0, 0, 0, 0);
},
getTempRect_1: function (a) {
return this.getTempRect_4(a.x, a.y, a.x + a.width, a.y + a.height);
},
getTempRect_4: function (a, b, f, g) {
if (0 < this._RectObjectsPool.length) {
var k = this._RectObjectsPool.pop();
k.setBounds_4(a, b, f - a, g - b);
return k;
}
return new GT1553(a, b, f - a, g - b);
},
recycleTempRect: function (a) {
128 > this._RectObjectsPool.length && this._RectObjectsPool.push(a);
},
getClipRegionObject: function () {
return 0 < this._ClipRegionObjectsPool.length ? this._ClipRegionObjectsPool.pop() : new ClipRegion();
},
getClipRegionObject_1: function (a) {
var b = getClipRegionObject();
b.set_1(a);
return b;
},
recycleClipRegionObject: function (a) {
32 < this._RectObjectsPool.length ? a.clear_0() : this._ClipRegionObjectsPool.push(a);
},
getVec2Object: function () {
return 0 < this._Vec2ObjectsPool.length ? this._Vec2ObjectsPool.pop() : new GT1631();
},
getVec2Object_1: function (a) {
var b = this.getVec2Object();
b.set_1(a);
return b;
},
recycleVec2Object: function (a) {
32 > this._Vec2ObjectsPool.length && this._Vec2ObjectsPool.push(a);
},
};
})(this);
"undefined" === typeof window.GTObjPool && (window.GTObjPool = new GTObjectsPool());
"undefined" !== typeof Object.prototype.watch && (Object.prototype.watch = void 0);
"undefined" !== typeof Object.prototype.unwatch && (Object.prototype.unwatch = void 0);
Array.prototype.createArray = function (a) {
var b = Array(a || 0);
if (1 < arguments.length) for (var d = Array.prototype.slice.call(arguments, 1), e = 0; e < a; e++) b[e] = d && 0 < d.length && null !== d[0] ? Array.prototype.createArray.apply(this, d) : null;
return b;
};
Array.prototype.init = function (a) {
for (var b = 0; b < this.length; b++) void 0 === this[b] ? (this[b] = a) : null !== this[b] && (this[b] = this[b].init(a));
return this;
};
Array.prototype.equals_1 = function (a) {
return this == a;
};
Array.prototype.toString = function () {
return "[" + this.join();
};
function instanceOf(a, b) {
if (null == a) return void 0 == b;
if (null == b) return !1;
var d = b instanceof Array;
if ("string" === typeof b || d) {
if (void 0 !== a.interfaces) for (var e = 0, f = a.interfaces.length; e < f; ++e) if (a.interfaces[e] == (d ? b[0] : b)) return !0;
return !1;
}
return a instanceof b ? !0 : !1;
}
(function () {
var a = !1;
Class = function () {};
Class.extend = function (b, d, e) {
function f() {
if (!a) {
var b = "initialConstructor_" + arguments.length;
this[b] && this[b].apply(this, arguments);
}
}
var g = this.prototype;
a = !0;
var k = new this();
a = !1;
for (var m in b) k[m] = b[m];
k.classname = d;
k.interfaces = void 0 !== g.interfaces ? g.interfaces.slice() : null;
if (null != e) for (k.interfaces || (k.interfaces = []), g = 0; g < e.length; ++g) k.interfaces = k.interfaces.concat(e[g]);
f.prototype = k;
f.prototype.constructor = f;
f.extend = arguments.callee;
return f;
};
})();
Class.prototype.initialConstructor_0 = function () {};
var ClassName = Class.extend(
{
initialConstructor_1: function (a) {
this.name = a;
},
getName_0: function () {
return this.name.replace_2("_", ".");
},
},
"ClassName",
[]
);
function PrintStream() {}
function Double() {}
function Float() {}
Class.prototype.getClass_0 = function () {
return new ClassName(this.classname);
};
Class.prototype.equals_1 = function (a) {
return this == a;
};
var GT1177 = ["GT1177"],
GT1554 = ["GT1554"],
GT1651 = ["GT1651"],
GT1619 = ["GT1619"],
GT1603 = ["GT1603"],
GT1582 = ["GT1582"],
GT804 = ["GT804"],
GT452 = ["GT452"],
GT860 = ["GT860"],
GT596 = ["GT596"],
GT1425 = ["GT1425"],
GT1426 = ["GT1426"],
GT1583 = ["GT1583"],
GT698 = ["GT698"],
GT337 = ["GT337", "GT1064"],
GT405 = ["GT405"],
GT917 = ["GT917"],
GT918 = ["GT918"],
GT263 = ["GT263"],
GT264 = ["GT264"],
GT754 = ["GT754"],
GT1008 = ["GT1008"],
GT1604 = ["GT1604"],
GT1065 = ["GT1065"],
GT919 = ["GT919"],
GT805 = ["GT805", "GT1064"],
GT1178 = ["GT1178"],
GT1372 = ["GT1372"],
GT1324 = ["GT1324"],
GT755 = ["GT755"],
GT806 = ["GT806"],
GT1009 = ["GT1009"],
GT1325 = ["GT1325"],
GT1271 = ["GT1271"],
GT1272 = ["GT1272"],
GT962 = ["GT962", "GT1064"],
GT1113 = ["GT1113"],
GT1273 = ["GT1273", "GT1064"],
GT1064 = ["GT1064"],
GT453 = ["GT453", "GT1064"],
GT920 = ["GT920", "GT1064"],
GT597 = ["GT597", "GT1064"],
GT1114 = ["GT1114", "GT1064"],
GT1010 = ["GT1010", "GT1064"],
GT1011 = ["GT1011", "GT1064"],
GT756 = ["GT756", "GT1064"],
GT961 = ["GT961", "GT1064"],
GT1012 = ["GT1012", "GT1064"],
GT231 = ["GT231", "GT1064"],
GT1326 = ["GT1326"],
GT861 = ["GT861"],
GT862 = ["GT862"],
GT1524 = ["GT1524"],
GT1229 = "GT1229",
GT1115 = ["GT1115"],
GT963 = ["GT963"],
GT1427 = ["GT1427"],
GT1274 = ["GT1274"],
GT699 = ["GT699"],
GT1116 = ["GT1116"],
GT1179 = ["GT1179"],
GT1525 = ["GT1525"],
GT1275 = ["GT1275"],
GT863 = ["GT863"],
GT1555 = ["GT1555"],
GT646 = ["GT646"],
GT205 = ["GT205"],
GT1117 = ["GT1117"],
GT1230 = ["GT1230"],
GT1584 = ["GT1584"],
GT1428 = ["GT1428"],
GT1373 = ["GT1373"],
GT1429 = ["GT1429"],
GT1480 = ["GT1480"],
GT1231 = ["GT1231"],
GT864 = ["GT864"],
GT807 = ["GT807"],
GT1066 = ["GT1066"],
GT757 = ["GT757"],
GT123 = ["GT123"],
GT700 = ["GT700"],
GT921 = ["GT921"],
GT1067 = ["GT1067"],
GT308 = ["GT308"],
GT1013 = ["GT1013"],
GT808 = ["GT808"],
GT501 = ["GT501"],
GT1430 = ["GT1430", "GT1481"],
GT1374 = ["GT1374"],
GT1526 = ["GT1526"],
GT1527 = ["GT1527"],
GT1481 = ["GT1481"],
GT1327 = ["GT1327"],
GT1375 = ["GT1375"],
GT454 = ["GT454"],
GT1431 = ["GT1431"],
GT1528 = ["GT1528"],
GT1432 = ["GT1432"],
GT1620 = ["GT1620"],
GT1556 = ["GT1556"],
GT1670 = ["GT1670"],
GT1585 = ["GT1585"],
GT1433 = ["GT1433"],
GT1482 = ["GT1482"],
GT1376 = ["GT1376"],
GT1276 = ["GT1276"],
GT865 = ["GT865"],
GT1232 = ["GT1232"],
GT1483 = ["GT1483"],
GT1014 = ["GT1014"],
GT1068 = ["GT1068"],
GT758 = ["GT758"],
GT809 = ["GT809"],
GT964 = ["GT964"],
GT1277 = ["GT1277"],
GT1069 = ["GT1069"],
GT1015 = ["GT1015"],
GT1118 = ["GT1118"],
GT701 = ["GT701"],
GT1434 = ["GT1434"],
GT1529 = ["GT1529"],
GT1119 = ["GT1119"],
GT1586 = ["GT1586"],
GT810 = ["GT810"],
GT124 = ["GT124"],
GT174 = ["GT174"],
GT455 = ["GT455"],
GT139 = ["GT139"],
GT647 = ["GT647"],
GT547 = ["GT547"],
GT265 = ["GT265"],
GT811 = ["GT811"],
GT1120 = ["GT1120"],
GT702 = ["GT702"],
GT759 = ["GT759"],
GT1530 = ["GT1530"],
GT1484 = ["GT1484"],
GT1070 = ["GT1070"],
GT922 = ["GT922"],
GT548 = ["GT548"],
GT549 = ["GT549"],
GT550 = ["GT550"],
GT760 = ["GT760"],
GT364 = ["GT364"],
GT1180 = ["GT1180"],
GT923 = ["GT923", "GT1180", "GT760"],
GT1071 = ["GT1071"],
GT812 = ["GT812", "GT1071", "GT760"],
GT1016 = ["GT1016", "GT1071"],
GT965 = ["GT965", "GT1180"],
GT966 = ["GT966"],
GT703 = ["GT703", "GT549"],
GT648 = ["GT648"],
GT551 = ["GT551"],
GT649 = ["GT649"],
GT598 = ["GT598", "GT649", "GT703", "GT206"],
GT599 = ["GT599", "GT649", "GT648"],
GT704 = ["GT704", "GT649", "GT1180", "GT1071"],
GT456 = ["GT456", "GT704", "GT812", "GT923"],
GT206 = ["GT206", "GT364"],
GT266 = ["GT266", "GT704"],
GT41 = ["GT41", "GT456"],
GT125 = ["GT125", "GT206"],
GT924 = ["GT924"],
GT365 = ["GT365"],
GT1017 = ["GT1017", "GT1064"],
GT1632 = ["GT1632"],
GT1587 = ["GT1587"];
function java_awt_geom_AffineTransform() {}
var java_awt_event_FocusListener = "java_awt_event_FocusListener",
java_awt_image_ImageObserver = "java_awt_image_ImageObserver",
java_awt_event_KeyListener = "java_awt_event_KeyListener",
java_awt_event_MouseListener = "java_awt_event_MouseListener",
java_awt_event_MouseMotionListener = "java_awt_event_MouseMotionListener",
java_awt_event_MouseWheelListener = "java_awt_event_MouseWheelListener";
function PrintStream() {}
PrintStream.println_1 = function (a) {
(GT1650.prototype.debugMode || ("string" === typeof a && -1 == a.indexOf_1("Assertion failed"))) && console.log(a);
};
PrintStream.println_0 = function () {};
PrintStream.print_1 = function (a) {
(GT1650.prototype.debugMode || ("string" === typeof a && -1 == a.indexOf_1("Assertion failed"))) && console.log(a);
};
PrintStream.flush_0 = function () {};
var java_io_Serializable = "java_io_Serializable";
Boolean.prototype.booleanValue_0 = function () {
return this.valueOf();
};
Boolean.prototype.equals_1 = function (a) {
return a instanceof Boolean ? this.valueOf() === a.booleanValue_0() : !1;
};
Boolean.prototype.TRUE = new Boolean(!0);
Boolean.prototype.FALSE = new Boolean(!1);
Boolean.prototype.toString_1 = function (a) {
return new Boolean(a).toString();
};
Boolean.prototype.valueOf_1 = function (a) {
return new Boolean(a).valueOf();
};
var JavaScriptString = function () {
var a = arguments;
if (null != a[0] && a[0] instanceof Array) {
var b = 0,
d = arguments[0].length;
"undefined" != typeof a[1] && (b = a[1]);
"undefined" != typeof a[2] && (d = a[2]);
for (var e = new StringBuffer(), f = 0; f < d; f++) e.append_1(String.fromCharCode(a[0][b + f]));
a[0] = e.toString_0();
}
this.value = String.apply(String, a);
};
String.prototype.toCharArray_0 = function () {
var a = this.split(""),
b = 0;
a.forEach(function (d) {
a[b] = d.charCodeAt();
b++;
});
return a;
};
String.prototype.rtrim = function () {
return this.length ? this.replace(/\s+$/g, "") : "";
};
String.prototype.ltrim = function () {
return this.length ? this.replace(/^\s+/g, "") : "";
};
String.prototype.charAt_1 = function (a) {
return this.charAt(a).charCodeAt();
};
String.prototype.compareTo_1 = function (a) {
return this < a ? -1 : this > a ? 1 : 0;
};
String.prototype.concat_1 = String.prototype.concat;
String.prototype.endsWith_1 = function (a) {
return -1 !== this.indexOf(a, this.length - a.length);
};
String.prototype.equals_1 = function (a) {
return this == (G.isNotNullAndDefined(a) && G.isNotNullAndDefined(a.value) ? a.value : a);
};
String.prototype.toLowerCase_0 = String.prototype.toLowerCase;
String.prototype.toUpperCase_0 = String.prototype.toUpperCase;
String.prototype.equalsIgnoreCase_1 = function (a) {
return this.toLowerCase() === (G.isNotNullAndDefined(a) && G.isNotNullAndDefined(a.value) ? a.value.toLowerCase() : a.toLowerCase());
};
String.prototype.indexOf_1 = function (a) {
return "string" === typeof a ? this.indexOf(a) : a instanceof JavaScriptString ? this.indexOf(a.value) : this.indexOf(String.fromCharCode(a));
};
String.prototype.indexOf_2 = function (a, b) {
return "string" === typeof a ? this.indexOf(a, b) : a instanceof JavaScriptString ? this.indexOf(a.value, b) : this.indexOf(String.fromCharCode(a), b);
};
String.prototype.lastIndexOf_1 = function (a) {
return "string" === typeof a ? this.lastIndexOf(a) : a instanceof JavaScriptString ? this.lastIndexOf(a.value) : this.lastIndexOf(String.fromCharCode(a));
};
String.prototype.lastIndexOf_2 = function (a, b) {
return "string" === typeof a ? this.lastIndexOf(a, b) : a instanceof JavaScriptString ? this.lastIndexOf(a.value, b) : this.lastIndexOf(String.fromCharCode(a), b);
};
String.prototype.length_0 = function () {
return this.length;
};
String.prototype.startsWith_1 = function (a) {
return 0 === this.indexOf(a);
};
String.prototype.substring_1 = String.prototype.substring;
String.prototype.substring_2 = String.prototype.substring;
String.prototype.trim_0 = String.prototype.trim;
String.prototype.getBytes_0 = function (a) {
return "getBytes_0 not supported";
};
String.prototype.replace_2 = function (a, b) {
"number" === typeof a && (a = String.fromCharCode(a));
"number" === typeof b && (b = String.fromCharCode(b));
"." == a && (a = "\\.");
return this.replace(new RegExp(a, "g"), b);
};
String.valueOf_1 = function (a) {
return String.fromCharCode(a);
};
String.prototype.regionMatches_4 = function () {
return !1;
};
String.prototype.regionMatches_5 = function () {
return !1;
};
String.prototype.toString_0 = String.prototype.toString;
String.prototype.isEmpty_0 = function () {
return null == this ? !0 : 0 == this.length ? !0 : !1;
};
JavaScriptString.prototype.toCharArray_0 = function () {
return this.value.toCharArray_0();
};
JavaScriptString.prototype.rtrim = function () {
return this.value.rtrim();
};
JavaScriptString.prototype.ltrim = function () {
return this.value.ltrim();
};
JavaScriptString.prototype.charAt_1 = function (a) {
return this.value.charAt_1(a);
};
JavaScriptString.prototype.compareTo_1 = function (a) {
return this.value.compareTo_1(a);
};
JavaScriptString.prototype.concat_1 = function (a) {
return this.value.concat_1(a);
};
JavaScriptString.prototype.endsWith_1 = function (a) {
return this.value.endsWith_1(a);
};
JavaScriptString.prototype.equals_1 = function (a) {
return this.value.equals_1(a);
};
JavaScriptString.prototype.toLowerCase_0 = function () {
return this.value.toLowerCase_0();
};
JavaScriptString.prototype.toUpperCase_0 = function () {
return this.value.toUpperCase_0();
};
JavaScriptString.prototype.equalsIgnoreCase_1 = function (a) {
return this.value.equalsIgnoreCase_1(a);
};
JavaScriptString.prototype.indexOf_1 = function (a) {
return this.value.indexOf_1(a);
};
JavaScriptString.prototype.indexOf_2 = function (a, b) {
return this.value.indexOf_2(a, b);
};
JavaScriptString.prototype.lastIndexOf_1 = function (a) {
return this.value.lastIndexOf_1(a);
};
JavaScriptString.prototype.lastIndexOf_2 = function (a, b) {
return this.value.lastIndexOf_2(a, b);
};
JavaScriptString.prototype.length_0 = function () {
return this.value.length_0();
};
JavaScriptString.prototype.startsWith_1 = function (a) {
return this.value.startsWith_1(a);
};
JavaScriptString.prototype.substring_1 = function (a) {
return this.value.substring_1(a);
};
JavaScriptString.prototype.substring_2 = function (a, b) {
return this.value.substring_2(a, b);
};
JavaScriptString.prototype.trim_0 = function () {
return this.value.trim_0();
};
JavaScriptString.prototype.getBytes_0 = function () {
return "getBytes_0 not supported";
};
JavaScriptString.prototype.replace_2 = function (a, b) {
return this.value.replace_2(a, b);
};
JavaScriptString.prototype.valueOf_1 = function (a) {
return String.fromCharCode(a);
};
JavaScriptString.prototype.regionMatches_4 = function () {
return !1;
};
JavaScriptString.prototype.regionMatches_5 = function () {
return !1;
};
JavaScriptString.prototype.toString_0 = function () {
return this.value.toString();
};
JavaScriptString.prototype.toString = function () {
return this.value.toString();
};
JavaScriptString.prototype.hashCode_0 = function () {
for (var a = 0, b = 0, d = this.value.length; b < d; b++) a = (31 * a + this.value.charCodeAt(b)) << 0;
return a;
};
JavaScriptString.prototype.isEmpty_0 = function () {
return this.value.isEmpty_0();
};
JavaScriptString.prototype.split = function (a, b) {
return this.value.split(a, b);
};
Math.div = function (a, b) {
return (a - (a % b)) / b;
};
Math.log10_1 =
"function" === typeof Math.log10
? Math.log10
: function (a) {
a = Math.log(a) * Math.LOG10E;
var b = Math.round(a);
return 1e-14 > Math.abs(Math.round(a) - a) ? b : a;
};
Math.abs_1 = Math.abs;
Math.acos_1 = Math.acos;
Math.asin_1 = Math.asin;
Math.atan_1 = Math.atan;
Math.atan2_2 = Math.atan2;
Math.ceil_1 = Math.ceil;
Math.cos_1 = Math.cos;
Math.exp_1 = Math.exp;
Math.floor_1 = Math.floor;
Math.log_1 = Math.log;
Math.max_2 = Math.max;
Math.min_2 = Math.min;
Math.round_1 = Math.round;
Math.sin_1 = Math.sin;
Math.sqrt_1 = Math.sqrt;
Math.tan_1 = Math.tan;
Math.pow_2 = Math.pow;
var Runnable = "Runnable",
GT1277 = "GT1277";
function java_lang_System() {}
java_lang_System.prototype.out = PrintStream;
java_lang_System.prototype.err = PrintStream;
java_lang_System.prototype.currentTimeMillis_0 = function () {
return Date.now();
};
java_lang_System.prototype.arraycopy_5 = function (a, b, d, e, f) {
var g = a;
a === d && (g = a.slice(0));
for (a = 0; a < f; a++) d[a + e] = g[a + b];
};
java_lang_System.prototype.getProperty_2 = function (a, b) {};
java_lang_System.prototype.exit_1 = function (a) {
console.log("System exit");
};
Number.prototype.intValue_0 = function () {
return this;
};
Number.prototype.doubleValue_0 = function () {
return this;
};
var java_net_MalformedURLException = function (a) {
console.error("java_net_MalformedURLException", a);
},
java_util_Comparator = "java_util_Comparator";
function java_util_JavaScriptVector(a) {
function b(a) {
try {
return this.data[a];
} catch (b) {
return "Exception " + b + " occured when accessing " + a;
}
}
function d(a) {
this.size_0() == this.data.length && this.resize_0();
this.data[this.size++] = a;
}
function e(a, b) {
if (null == a) return -1;
for (var d = void 0 === b ? 0 : b; d < this.size_0(); d++) if (null != this.data[d] && this.data[d].equals_1(a)) return d;
return -1;
}
function f(a, b) {
if (null == a) return -1;
for (var d = void 0 === b ? this.size_0() : b; 0 < d; d--) if (null != this.data[d] && null != a && this.data[d].equals_1(a)) return d;
return -1;
}
if (0 >= a || void 0 === a) a = 50;
this.data = Array(a);
this.increment = a;
this.size = 0;
this.getCapacity_0 = function () {
return this.data.length;
};
this.size_0 = function () {
return this.size;
};
this.isEmpty_0 = function () {
return 0 == this.size_0();
};
this.lastElement_0 = function () {
if (null != this.data[this.size_0() - 1]) return this.data[this.size_0() - 1];
};
this.firstElement_0 = function () {
if (null != this.data[0]) return this.data[0];
};
this.get_1 = this.elementAt_1 = b;
this.add_1 = this.addElement_1 = d;
this.add_2 = function (a, b) {
try {
this.size == this.data.length && this.resize_0();
for (var d = this.size_0(); d > a; d--) this.data[d] = this.data[d - 1];
this.data[a] = b;
this.size++;
} catch (e) {
return "Invalid index " + d;
}
};
this.insertElementAt_2 = function (a, b) {
try {
this.size == this.data.length && this.resize_0();
for (var d = this.size_0(); d > b; d--) this.data[d] = this.data[d - 1];
this.data[b] = a;
this.size++;
} catch (e) {
return "Invalid index " + d;
}
};
this.removeElement_1 = function (a) {
if (null != a) {
a = this.indexOf_1(a);
if (0 <= a) {
for (; a < this.size_0() - 1; a++) this.data[a] = this.data[a + 1];
this.data[this.size_0() - 1] = null;
this.size--;
return !0;
}
return !1;
}
};
this.removeElementAt_1 = function (a) {
try {
for (var b = a; b < this.size_0() - 1; b++) this.data[b] = this.data[b + 1];
this.data[this.size_0() - 1] = null;
this.size--;
} catch (d) {
return "Invalid index " + a;
}
};
this.removeAllElements_0 = function () {
this.size = 0;
this.data.length = 0;
};
this.indexOf_2 = this.indexOf_1 = e;
this.lastIndexOf_2 = this.lastIndexOf_1 = f;
this.contains_1 = function (a) {
return 0 <= this.indexOf_1(a);
};
this.resize_0 = function () {
this.data.length += this.increment;
};
this.toString = function () {
for (var a = "[", b = 0; b < this.size; b++) (a += this.data[b]), b < this.size - 1 && (a += ", ");
return a + "]";
};
this.sort_0 = function (a) {
var b, d, e, f, q;
for (b = 1; b < this.size_0(); b++) {
f = this.data[b];
e = f[a];
d = b - 1;
q = this.data[d];
for (q = q[a]; 0 <= d && q > e; ) (this.data[d + 1] = this.data[d]), d--, 0 <= d && ((q = this.data[d]), (q = q[a]));
this.data[d + 1] = f;
}
};
this.trimToSize_0 = function () {
for (var a = Array(this.size_0()), b = 0; b < this.size_0(); b++) a[b] = this.data[b];
this.data = a;
};
this.toArray_0 = function () {
for (var a = Array(this.size_0()), b = 0; b < this.size_0(); b++) a[b] = this.data[b];
return a;
};
this.clone_0 = function () {
0 > this.size && console.log("inc: " + this.size);
for (var a = new java_util_JavaScriptVector(this.size), b = 0; b < this.size; b++) a.addElement_1(this.data[b]);
a.size = this.size;
a.increment = this.increment;
return a;
};
this.setElementAt_2 = function (a, b) {
this.data[b] = a;
};
this.copyInto_1 = function (a) {
for (var b = 0; b < a.length; b++) a[b] = this.elementAt_1(b);
};
this.equals_1 = function (a) {
return JSUTIL.equals_2(this, a);
};
this.setSize_1 = function (a) {
var b = a - this.size;
if (0 !== b)
if (0 == a) this.removeAllElements_0();
else if (0 < b) for (a = 0; a < b; a++) this.addElement_1(null);
else this.size = this.data.length = a;
};
this.clear_0 = function (a) {
if (0 == a || void 0 === a) a = 100;
this.data = Array(a);
this.increment = a;
this.size = 0;
};
this.set_2 = function (a, b) {
this.data[a] = b;
};
}
(function (a, b, d) {
a.SlotparkAudioController = b = function () {
this._initialized = !1;
this.MAX_ID = 65535;
this._idCounter = 0;
this.spritesdata = {};
};
b.prototype = {
setup: function (a, b) {
this.spritesdata = a;
var d = {},
k;
for (k in a)
if (a.hasOwnProperty(k)) {
var m = a[k],
n = 1e3 * m.start;
d[k] = [n, 1e3 * m.end - n];
}
this._postMessage({ action: "setup", url: b.url, sprites: d });
this._initialized = !0;
},
loadFile: function (a, b) {
b();
},
initialized: function () {
return this._initialized;
},
isReady: function () {
return this._initialized;
},
play: function (a, b, d, k, m, n, p, q) {
if (this.isReady()) {
var r = this._createId(a);
this._postMessage({ action: "play", key: a, id: r, startpos: k, endpos: d, loop: m, restartpos: b, volume: n, pan: p, wavsourceformat: this.spritesdata.hasOwnProperty(a) && "wav" === this.spritesdata[a].sourceformat });
q(r);
}
},
volume: function (a, b) {
this._postMessage({ action: "volume", id: b, volume: a });
},
mute: function () {
void 0 != GT1377.prototype.STARTSOUNDTIMEOUT && null !== GT1377.prototype.STARTSOUNDTIMEOUT && clearTimeout(GT1377.prototype.STARTSOUNDTIMEOUT);
},
unmute: function () {},
stop: function (a, b, d, k) {
this.isReady() && this._postMessage({ action: "stop", id: a, fadeout: k });
},
_createId: function (a) {
this._idCounter = (this._idCounter + 1) % this.MAX_ID;
return a + ":" + this._idCounter;
},
_postMessage: function (b) {
b = "SPSP->" + JSON.stringify(b);
a.top.postMessage(b, "*");
},
};
})(window, document, JSUTIL);
(function (a, b, d) {
a.WebAudioControllerSeparateFiles = a = function (a, b) {
this.soundFormat = b.url.substring(b.url.lastIndexOf_1(".") + 1);
this.soundPath = b.url.substring(0, b.url.lastIndexOf_1("/") + 1);
var d = function (a, b, d, e) {
a = { urls: a, sprite: b, onload: e || function () {} };
d && (a.dataarray = d);
return new Howl(a);
};
this.howlSounds = [];
this.sounds = a;
if (!Howl) throw Error("howler is not present");
var k = this,
m = {};
this.finalEncoderDecoderDelay = 0;
if ("mp3" === this.soundFormat && !CONFIG.get("slotparkaudio")) {
var n = "FULLFEATUREBUILD" == CONFIG.FEATURELEVEL ? "44100" : "24000",
p = [];
p.mp3DelayTestSound = [0, 1e3];
var q = this.soundPath + "SilenceSounds/100ms_" + n + ".mp3",
r = d([q], p, null, function () {
for (var a = r.getCache()[q], b = a.getChannelData(0), d = 0; d < b.length; d++)
if (0.3 < Math.abs(b[d])) {
k.finalEncoderDecoderDelay = Math.floor((d / a.sampleRate) * 1e3);
GT1650.prototype.debugMode && console.log("INFO: WebAudio context sample rate: " + a.sampleRate + "; first valid sample: " + d + "; final applied delay in milliseconds: " + k.finalEncoderDecoderDelay);
break;
}
r.unload();
});
}
if ("1" == CONFIG.CLIENTSLOTAPPLET.getParameter_1("html5mobileseparatesounds"))
this.sounds.hasOwnProperty("silence") &&
((n = this.sounds.silence),
(m.silence = [0, 1e3 * n.end - 1e3 * n.start]),
(n = []),
(n.silence = m.silence),
(this.howlSounds.silence = d([this.soundPath + "sounds_" + this.soundFormat + "/silence." + this.soundFormat], n, null, null)));
else {
var t = new XMLHttpRequest();
t.open("GET", this.soundPath + "sounds_" + this.soundFormat + ".zip", !0);
t.responseType = "arraybuffer";
var u = null;
t.onload = function (a) {
a = new Uint8Array(t.response);
u = new JSUnzip(a);
if (u.isZipFile()) {
u.readEntries();
for (var b in k.sounds)
if (k.sounds.hasOwnProperty(b)) {
a = [];
a[b] = [0];
for (var e = b, f = 0; f < u.entries.length; f++) {
var m = u.entries[f];
if (m.fileName.substring(0, m.fileName.lastIndexOf(".")) === e) {
e = !1;
0 === m.compressionMethod ? (e = m.data) : 8 === m.compressionMethod && (e = JSInflate.inflate(m.data));
if (e) {
for (var m = new ArrayBuffer(e.length), f = new Uint8Array(m), n = 0, p = e.length; n < p; n++) f[n] = e.charCodeAt(n);
k.howlSounds[b] = d([b + "." + k.soundFormat], a, m, null);
}
break;
}
}
}
}
};
t.send();
}
};
a.prototype = {
loadFile: function (a, b, d) {
a = a.substring(a.lastIndexOf("/") + 1, a.lastIndexOf("."));
if (this.sounds.hasOwnProperty(a)) {
var k = this.sounds[a],
m = [];
m[a] = [0, 1e3 * k.end - 1e3 * k.start];
this.howlSounds[a] = new Howl({ urls: [this.soundPath + "sounds_" + this.soundFormat + "/" + a + "." + this.soundFormat], sprite: m, onload: b, onloaderror: d });
} else d();
},
setup: function () {},
useMultipleSounds: function () {
return !0;
},
isReady: function (a) {
if (null == a) return !0;
if (null == this.howlSounds[a] || 0 == this.howlSounds[a]._loaded) return !1;
a = this.howlSounds[a].getContextState();
return null == a ? this._unlocked || !DEVICE.mobile : "running" == a;
},
getContext: function (a) {
return this.howlSounds[a];
},
play: function (a, b, d, k, m) {
if (this.firstSoundAfterMuting) {
this.firstSoundAfterMuting = !1;
this.howlSounds.silence.play("silence", function () {}, -1, 100, 0);
var n = this;
setTimeout(function () {
try {
0 < n.finalEncoderDecoderDelay && "wav" === n.sounds[a].sourceformat
? n.howlSounds[a].play(a, m || function () {}, b + n.finalEncoderDecoderDelay, d + n.finalEncoderDecoderDelay, k + n.finalEncoderDecoderDelay)
: n.howlSounds[a].play(a, m || function () {}, b, d, k);
} catch (p) {}
}, 100);
} else
try {
0 < this.finalEncoderDecoderDelay && "wav" === this.sounds[a].sourceformat
? this.howlSounds[a].play(a, m || function () {}, b + this.finalEncoderDecoderDelay, d + this.finalEncoderDecoderDelay, k + this.finalEncoderDecoderDelay)
: this.howlSounds[a].play(a, m || function () {}, b, d, k);
} catch (p) {}
},
volume: function (a, b, d) {
this.howlSounds[d] && null != this.howlSounds[d] && this.howlSounds[d].volume(a, b);
},
mute: function () {
DEVICE.chrome && !Howler._muted && (this.firstSoundAfterMuting = !0);
Howler.mute();
},
unmute: function () {
this.firstSoundAfterMuting = !1;
null != CONFIG.CLIENTSLOTAPPLET.getSoundPlayer_0() && CONFIG.CLIENTSLOTAPPLET.getSoundPlayer_0().isActive_0() && Howler.unmute();
},
panning: function (a, b, d) {
this.howlSounds[d] && null != this.howlSounds[d] && this.howlSounds[d].pos3d(a, 0, 0, b);
},
unload: function (a) {
this.howlSounds[a] && null != this.howlSounds[a] && this.howlSounds[a].unload();
},
stop: function (a, b, d, k) {
if (this.isReady(b))
try {
a && (0 < k ? this.howlSounds[b].fadeOut(0, k, null, a) : this.howlSounds[b].stop(a, d));
} catch (m) {}
},
};
})(window, document, JSUTIL);
(function (a) {
var b = a.DEVICE;
a.__greentube_games.SLOT.SOUND = {
init: function () {
this.initPageSoundStopsEvents();
},
initPageSoundStopsEvents: function () {
b.visible().onVisible(function () {
if (CONFIG.SOUNDPLAYER && (CONFIG.SOUNDPLAYER.unmute(), !(CONFIG.SOUNDPLAYER instanceof NoAudioController) && CONFIG.CLIENTSLOTAPPLET)) {
var a = CONFIG.CLIENTSLOTAPPLET.getSoundPlayer_0();
if (a && a.isActive_0() && a.activeStateListeners)
for (var b = 0; b < a.activeStateListeners.size_0(); b++) a.activeStateListeners.elementAt_1(b) && a.activeStateListeners.elementAt_1(b).notifySoundPlayerActiveState_2(!0, a.getMasterVolume_0());
}
G.fire("resize-game");
});
b.visible().onHidden(function () {
if (CONFIG.SOUNDPLAYER && (CONFIG.SOUNDPLAYER.mute(), !(CONFIG.SOUNDPLAYER instanceof NoAudioController) && CONFIG.CLIENTSLOTAPPLET)) {
var a = CONFIG.CLIENTSLOTAPPLET.getSoundPlayer_0();
if (a && a.isActive_0() && a.activeStateListeners)
for (var b = 0; b < a.activeStateListeners.size_0(); b++) a.activeStateListeners.elementAt_1(b) && a.activeStateListeners.elementAt_1(b).notifySoundPlayerActiveState_2(!1, a.getMasterVolume_0());
}
G.fire("resize-game");
});
if (b.ios6 || b.ios7 || b.ios7_1)
a.addEventListener("pagehide", function (a) {
CONFIG.SOUNDPLAYER && CONFIG.SOUNDPLAYER.mute();
}),
a.addEventListener("pageshow", function (a) {
CONFIG.SOUNDPLAYER && CONFIG.SOUNDPLAYER.unmute();
});
a.addEventListener(
"blur",
function () {
null !== CONFIG.SOUNDPLAYER && b.mobile && CONFIG.SOUNDPLAYER.mute();
},
!1
);
a.addEventListener(
"focus",
function () {
null !== CONFIG.SOUNDPLAYER && b.mobile && (CONFIG.SOUNDPLAYER.unmute(), JSUTIL.webaudio() && 1 != JSUTIL.getParameter("slotparkaudio") && CONFIG.SOUNDPLAYER.play("silence", -1, 400, 100));
},
!1
);
},
};
__greentube_games.SLOT.SOUND.init();
})(window);
(function (a) {
function b() {
this.list = this.next = null;
}
function d() {
this.n = this.b = this.e = 0;
this.t = null;
}
function e(a, e, f, g, k, m) {
this.BMAX = 16;
this.N_MAX = 288;
this.status = 0;
this.root = null;
this.m = 0;
var n = Array(this.BMAX + 1),
p,
q,
r,
t,
u,
A,
B,
C = Array(this.BMAX + 1),
D,
E,
F,
H = new d(),
I = Array(this.BMAX);
t = Array(this.N_MAX);
var J,
K = Array(this.BMAX + 1),
L,
M,
N;
N = this.root = null;
for (u = 0; u < n.length; u++) n[u] = 0;
for (u = 0; u < C.length; u++) C[u] = 0;
for (u = 0; u < I.length; u++) I[u] = null;
for (u = 0; u < t.length; u++) t[u] = 0;
for (u = 0; u < K.length; u++) K[u] = 0;
p = 256 < e ? a[256] : this.BMAX;
D = a;
E = 0;
u = e;
do n[D[E]]++, E++;
while (0 < --u);
if (n[0] == e) (this.root = null), (this.status = this.m = 0);
else {
for (A = 1; A <= this.BMAX && 0 == n[A]; A++);
B = A;
m < A && (m = A);
for (u = this.BMAX; 0 != u && 0 == n[u]; u--);
r = u;
m > u && (m = u);
for (L = 1 << A; A < u; A++, L <<= 1)
if (0 > (L -= n[A])) {
this.status = 2;
this.m = m;
return;
}
if (0 > (L -= n[u])) (this.status = 2), (this.m = m);
else {
n[u] += L;
K[1] = A = 0;
D = n;
E = 1;
for (F = 2; 0 < --u; ) K[F++] = A += D[E++];
D = a;
u = E = 0;
do 0 != (A = D[E++]) && (t[K[A]++] = u);
while (++u < e);
e = K[r];
K[0] = u = 0;
D = t;
E = 0;
t = -1;
J = C[0] = 0;
F = null;
for (M = 0; B <= r; B++)
for (a = n[B]; 0 < a--; ) {
for (; B > J + C[1 + t]; ) {
J += C[1 + t];
t++;
M = (M = r - J) > m ? m : M;
if ((q = 1 << (A = B - J)) > a + 1) for (q -= a + 1, F = B; ++A < M && !((q <<= 1) <= n[++F]); ) q -= n[F];
J + A > p && J < p && (A = p - J);
M = 1 << A;
C[1 + t] = A;
F = Array(M);
for (q = 0; q < M; q++) F[q] = new d();
N = null == N ? (this.root = new b()) : (N.next = new b());
N.next = null;
N.list = F;
I[t] = F;
0 < t && ((K[t] = u), (H.b = C[t]), (H.e = 16 + A), (H.t = F), (A = (u & ((1 << J) - 1)) >> (J - C[t])), (I[t - 1][A].e = H.e), (I[t - 1][A].b = H.b), (I[t - 1][A].n = H.n), (I[t - 1][A].t = H.t));
}
H.b = B - J;
E >= e ? (H.e = 99) : D[E] < f ? ((H.e = 256 > D[E] ? 16 : 15), (H.n = D[E++])) : ((H.e = k[D[E] - f]), (H.n = g[D[E++] - f]));
q = 1 << (B - J);
for (A = u >> J; A < M; A += q) (F[A].e = H.e), (F[A].b = H.b), (F[A].n = H.n), (F[A].t = H.t);
for (A = 1 << (B - 1); 0 != (u & A); A >>= 1) u ^= A;
for (u ^= A; (u & ((1 << J) - 1)) != K[t]; ) (J -= C[t]), t--;
}
this.m = C[1];
this.status = 0 != L && 1 != r ? 1 : 0;
}
}
}
function f(a) {
for (; F < a; ) {
var b = E,
d;
d = O.length == K ? -1 : O.charCodeAt(K++) & 255;
E = b | (d << F);
F += 8;
}
}
function g(a) {
return E & Q[a];
}
function k(a) {
E >>= a;
F -= a;
}
function m(a, b, d) {
var e, m, n;
if (0 == d) return 0;
for (n = 0; ; ) {
f(N);
m = J.list[g(N)];
for (e = m.e; 16 < e; ) {
if (99 == e) return -1;
k(m.b);
e -= 16;
f(e);
m = m.t[g(e)];
e = m.e;
}
k(m.b);
if (16 == e) (u &= 32767), (a[b + n++] = t[u++] = m.n);
else {
if (15 == e) break;
f(e);
I = m.n + g(e);
k(e);
f(P);
m = M.list[g(P)];
for (e = m.e; 16 < e; ) {
if (99 == e) return -1;
k(m.b);
e -= 16;
f(e);
m = m.t[g(e)];
e = m.e;
}
k(m.b);
f(e);
L = u - m.n - g(e);
for (k(e); 0 < I && n < d; ) I--, (L &= 32767), (u &= 32767), (a[b + n++] = t[u++] = t[L++]);
}
if (n == d) return d;
}
D = -1;
return n;
}
function n(a, b, d) {
var n,
p,
q,
r,
t,
u,
A,
B = Array(316);
for (n = 0; n < B.length; n++) B[n] = 0;
f(5);
u = 257 + g(5);
k(5);
f(5);
A = 1 + g(5);
k(5);
f(4);
n = 4 + g(4);
k(4);
if (286 < u || 30 < A) return -1;
for (p = 0; p < n; p++) f(3), (B[Z[p]] = g(3)), k(3);
for (; 19 > p; p++) B[Z[p]] = 0;
N = 7;
p = new e(B, 19, 19, null, null, N);
if (0 != p.status) return -1;
J = p.root;
N = p.m;
r = u + A;
for (n = q = 0; n < r; )
if ((f(N), (t = J.list[g(N)]), (p = t.b), k(p), (p = t.n), 16 > p)) B[n++] = q = p;
else if (16 == p) {
f(2);
p = 3 + g(2);
k(2);
if (n + p > r) return -1;
for (; 0 < p--; ) B[n++] = q;
} else {
17 == p ? (f(3), (p = 3 + g(3)), k(3)) : (f(7), (p = 11 + g(7)), k(7));
if (n + p > r) return -1;
for (; 0 < p--; ) B[n++] = 0;
q = 0;
}
N = 9;
p = new e(B, u, 257, S, T, N);
0 == N && (p.status = 1);
if (0 != p.status) return -1;
J = p.root;
N = p.m;
for (n = 0; n < A; n++) B[n] = B[n + u];
P = 6;
p = new e(B, A, 0, R, V, P);
M = p.root;
P = p.m;
return (0 == P && 257 < u) || 0 != p.status ? -1 : m(a, b, d);
}
function p() {
null == t && (t = Array(65536));
F = E = u = 0;
D = -1;
H = !1;
I = L = 0;
J = null;
}
function q(a, b, d) {
var p, q;
for (p = 0; p < d && (!H || -1 != D); ) {
if (0 < I) {
if (0 != D) for (; 0 < I && p < d; ) I--, (L &= 32767), (u &= 32767), (a[b + p++] = t[u++] = t[L++]);
else {
for (; 0 < I && p < d; ) I--, (u &= 32767), f(8), (a[b + p++] = t[u++] = g(8)), k(8);
0 == I && (D = -1);
}
if (p == d) break;
}
if (-1 == D) {
if (H) break;
f(1);
0 != g(1) && (H = !0);
k(1);
f(2);
D = g(2);
k(2);
J = null;
I = 0;
}
switch (D) {
case 0:
q = a;
var r = b + p,
K = d - p,
O = void 0,
O = F & 7;
k(O);
f(16);
O = g(16);
k(16);
f(16);
if (O != (~E & 65535)) q = -1;
else {
k(16);
I = O;
for (O = 0; 0 < I && O < K; ) I--, (u &= 32767), f(8), (q[r + O++] = t[u++] = g(8)), k(8);
0 == I && (D = -1);
q = O;
}
break;
case 1:
if (null != J) q = m(a, b + p, d - p);
else
a: {
q = a;
r = b + p;
K = d - p;
if (null == B) {
for (var Q = void 0, O = Array(288), Q = void 0, Q = 0; 144 > Q; Q++) O[Q] = 8;
for (; 256 > Q; Q++) O[Q] = 9;
for (; 280 > Q; Q++) O[Q] = 7;
for (; 288 > Q; Q++) O[Q] = 8;
C = 7;
Q = new e(O, 288, 257, S, T, C);
if (0 != Q.status) {
alert("HufBuild error: " + Q.status);
q = -1;
break a;
}
B = Q.root;
C = Q.m;
for (Q = 0; 30 > Q; Q++) O[Q] = 5;
zip_fixed_bd = 5;
Q = new e(O, 30, 0, R, V, zip_fixed_bd);
if (1 < Q.status) {
B = null;
alert("HufBuild error: " + Q.status);
q = -1;
break a;
}
A = Q.root;
zip_fixed_bd = Q.m;
}
J = B;
M = A;
N = C;
P = zip_fixed_bd;
q = m(q, r, K);
}
break;
case 2:
q = null != J ? m(a, b + p, d - p) : n(a, b + p, d - p);
break;
default:
q = -1;
}
if (-1 == q) return H ? 0 : -1;
p += q;
}
return p;
}
function r(a, b) {
var d = q(b, 0, b.length);
if (0 < d) {
var e = "";
for (j = 0; j < d; j++) e += String.fromCharCode(b[j]);
a.write(e);
}
return d;
}
var t,
u,
B = null,
A,
C,
E,
F,
D,
H,
I,
L,
J,
M,
N,
P,
O,
K,
Q = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535],
S = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0],
T = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99],
R = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577],
V = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13],
Z = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
W = {};
if ("object" == typeof module) {
module.exports = W;
var ba = require("fs");
} else a.JSInflate = W;
W.inflate = function (a) {
var b, d, e;
p();
O = a;
K = 0;
b = Array(1024);
for (a = ""; 0 < (d = q(b, 0, b.length)); ) for (e = 0; e < d; e++) a += String.fromCharCode(b[e]);
O = null;
return a;
};
W.inflateStream = function (a, b, d) {
var e, f;
p();
O = a;
f = K = 0;
var g = ba.createWriteStream(b);
e = Array(1024);
var k = 0;
g.on("drain", function () {
k = r(g, e);
0 < k ? (f += k) : ((O = null), d(f));
});
f += r(g, e);
};
})(this);
(function (a) {
var b = function (a) {
this.fileContents = new b.BigEndianBinaryStream(a);
};
a.JSUnzip = b;
b.MAGIC_NUMBER = 67324752;
b.prototype = {
readEntries: function () {
if (!this.isZipFile()) throw Error("File is not a Zip file.");
this.entries = [];
for (var a = new b.ZipEntry(this.fileContents); "string" === typeof a.data; ) this.entries.push(a), (a = new b.ZipEntry(this.fileContents));
},
isZipFile: function () {
return this.fileContents.getByteRangeAsNumber(0, 4) === b.MAGIC_NUMBER;
},
};
b.ZipEntry = function (a) {
this.signature = a.getNextBytesAsNumber(4);
if (this.signature === b.MAGIC_NUMBER) {
this.versionNeeded = a.getNextBytesAsNumber(2);
this.bitFlag = a.getNextBytesAsNumber(2);
this.compressionMethod = a.getNextBytesAsNumber(2);
this.timeBlob = a.getNextBytesAsNumber(4);
if (this.isEncrypted()) throw "File contains encrypted entry. Not supported.";
if (this.isUsingUtf8()) throw "File is using UTF8. Not supported.";
this.crc32 = a.getNextBytesAsNumber(4);
this.compressedSize = a.getNextBytesAsNumber(4);
this.uncompressedSize = a.getNextBytesAsNumber(4);
if (this.isUsingZip64()) throw "File is using Zip64 (4gb+ file size). Not supported";
this.fileNameLength = a.getNextBytesAsNumber(2);
this.extraFieldLength = a.getNextBytesAsNumber(2);
this.fileName = a.getNextBytesAsString(this.fileNameLength);
this.extra = a.getNextBytesAsString(this.extraFieldLength);
this.data = a.getNextBytesAsString(this.compressedSize);
this.isUsingBit3TrailingDataDescriptor() && ("undefined" !== typeof console && console.log("File is using bit 3 trailing data descriptor. Not supported."), a.getNextBytesAsNumber(16));
}
};
b.ZipEntry.prototype = {
isEncrypted: function () {
return 1 === (this.bitFlag & 1);
},
isUsingUtf8: function () {
return 2048 === (this.bitFlag & 2048);
},
isUsingBit3TrailingDataDescriptor: function () {
return 8 === (this.bitFlag & 8);
},
isUsingZip64: function () {
4294967295 === this.compressedSize || 4294967295 === this.uncompressedSize;
},
};
b.BigEndianBinaryStream = function (a) {
this.stream = a;
this.resetByteIndex();
};
b.BigEndianBinaryStream.prototype = {
resetByteIndex: function () {
this.currentByteIndex = 0;
},
getByteAt: function (a) {
return this.stream[a];
},
getNextBytesAsNumber: function (a) {
var b = this.getByteRangeAsNumber(this.currentByteIndex, a);
this.currentByteIndex += a;
return b;
},
getNextBytesAsString: function (a) {
var b = this.getByteRangeAsString(this.currentByteIndex, a);
this.currentByteIndex += a;
return b;
},
getByteRangeAsNumber: function (a, b) {
for (var f = 0, g = a + b - 1; g >= a; ) (f = (f << 8) + this.getByteAt(g)), g--;
return f;
},
getByteRangeAsString: function (a, b) {
for (var f = "", g = a + b, k = a; k < g; ) {
var m = this.getByteAt(k),
f = f + String.fromCharCode(m),
g = g - Math.floor(m / 256);
k++;
}
return f;
},
};
})(this);
var Utf8 = {
encode: function (a) {
for (var b = "", d = 0; d < a.length; d++) {
var e = a.charCodeAt(d);
128 > e
? (b += String.fromCharCode(e))
: (127 < e && 2048 > e ? (b += String.fromCharCode((e >> 6) | 192)) : ((b += String.fromCharCode((e >> 12) | 224)), (b += String.fromCharCode(((e >> 6) & 63) | 128))), (b += String.fromCharCode((e & 63) | 128)));
}
return b;
},
decode: function (a) {
for (var b = "", d, e, f, g = 0; g < a.length; )
(d = a.charCodeAt(g) & 255),
128 > d
? ((b += String.fromCharCode(d)), g++)
: 191 < d && 224 > d
? ((e = a.charCodeAt(g + 1) & 255), (b += String.fromCharCode(((d & 31) << 6) | (e & 63))), (g += 2))
: ((e = a.charCodeAt(g + 1) & 255), (f = a.charCodeAt(g + 2) & 255), (b += String.fromCharCode(((d & 15) << 12) | ((e & 63) << 6) | (f & 63))), (g += 3));
return b;
},
decode_3: function (a, b, d) {
var e = "",
f,
g;
d = b + d;
for (var k = b; k < d; k++)
(b = a[k] & 255),
128 > b
? (e += String.fromCharCode(b))
: 191 < b && 224 > b
? ((f = a[k + 1] & 255), (e += String.fromCharCode(((b & 31) << 6) | (f & 63))), k++)
: ((f = a[k + 1] & 255), (g = a[k + 2] & 255), (e += String.fromCharCode(((b & 15) << 12) | ((f & 63) << 6) | (g & 63))), (k += 2));
return e;
},
},
GT1531 = Class.extend(
{
initialConstructor_0: function () {
this._complete = this._initialized = !1;
this._onCompleteCallbacks = null;
this._diff = this._previousFrame = 0;
this._gfx = null;
this._startTime = this._updateTime = 0;
this._onCompleteCallbacks = new java_util_JavaScriptVector();
this._initialized = !1;
this._previousFrame = -1;
},
init_4: function (a, b, d, e) {
this._updateTime = e;
this._complete = !1;
this._previousFrame = -1;
this._gfx = a.getGraphics_0();
},
reset_0: function () {
this._updateTime = 0;
this._complete = !1;
this._previousFrame = -1;
},
update_1: function (a) {
this._updateTime = a;
this._initialized && this._initialized && ((this._diff = 0), -1 != this._previousFrame && (this._diff = Integer.truncate_1(a - this._previousFrame)), (this._previousFrame = a));
},
getFrameTimeDiffInMs_0: function () {
return this._diff;
},
getFrameTimeDiffInSeconds_0: function () {
return this._diff / 1e3;
},
getElapsedTime_0: function () {
return this._updateTime - this._startTime;
},
addAnimCallback_1: function (a) {
this._onCompleteCallbacks.contains_1(a) || this._onCompleteCallbacks.add_1(a);
},
removeAnimCallback_1: function (a) {
this._onCompleteCallbacks.removeElement_1(a);
},
render_1: function (a) {
this._gfx = a;
},
getGfx_0: function () {
return this._gfx;
},
setAnimationComplete_0: function () {
if (!this._complete) {
this._complete = !0;
for (var a = 0; a < this._onCompleteCallbacks.size_0(); a++) this._onCompleteCallbacks.get_1(a).onAnimComplete_0();
}
},
setInitialized_1: function (a) {
if ((this._initialized = a)) this._startTime = this._updateTime;
},
isInitialized_0: function () {
return this._initialized;
},
isComplete_0: function () {
return this._complete;
},
triggerAnimEvent_1: function (a) {
for (var b = 0; b < this._onCompleteCallbacks.size_0(); b++) this._onCompleteCallbacks.get_1(b).onAnimEvent_1(a);
},
},
"GT1531",
[]
),
GT1646 = Class.extend(
{
initialConstructor_0: function () {
this._audio = this._gfx = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this._audio = this._gfx = null;
this._gfx = a;
this._audio = b;
},
getGraphics_0: function () {
return this._gfx;
},
getAudio_0: function () {
return this._audio;
},
},
"GT1646",
[]
),
GT1588 = Class.extend(
{
initialConstructor_0: function () {
this.sprite = null;
this.endValue = this.startValue = this.duration = this.endTime = this.startTime = this.currentTime = 0;
this.equation = this.onComplete = null;
Class.prototype.initialConstructor_0.call(this);
},
update_1: function (a) {
var b = !1;
this.currentTime += a;
this.currentTime >= this.endTime && (this.apply_1(this.endValue), null != this.onComplete && this.onComplete.run_0(), (b = !0));
this.startTime <= this.currentTime &&
this.currentTime < this.endTime &&
((a = Math.div(this.currentTime - this.startTime, this.duration)), null != this.equation && (a = this.equation.compute_1(a)), this.apply_1((this.endValue - this.startValue) * a + this.startValue));
return b;
},
},
"GT1588",
[]
),
GT1435 = Class.extend(
{
initialConstructor_0: function () {
this._toDelete = this._entries = null;
this._entries = new java_util_JavaScriptVector();
this._toDelete = new java_util_JavaScriptVector();
},
tween_6: function (a, b, d, e, f, g) {
this.tween_7(a, b, d, e, f, g, null);
},
tween_7: function (a, b, d, e, f, g, k) {
this.tween_8(a, b, d, e, f, g, k, null);
},
tween_8: function (a, b, d, e, f, g, k, m) {
var n = null;
switch (a) {
case GT1435.prototype.TYPE_ALPHA:
n = new GT1378();
break;
case GT1435.prototype.TYPE_ROTATION:
n = new GT1233();
break;
case GT1435.prototype.TYPE_WIDTH:
n = new GT1379();
break;
case GT1435.prototype.TYPE_HEIGHT:
n = new GT1328();
break;
case GT1435.prototype.TYPE_CUSTOM1:
n = new GT1278();
break;
case GT1435.prototype.TYPE_CUSTOM2:
n = new GT1279();
}
n.sprite = b;
n.startTime = d;
n.endTime = e;
n.duration = e - d;
n.startValue = f;
n.endValue = g;
n.currentTime = 0;
n.onComplete = k;
n.equation = m;
this._entries.add_1(n);
},
tweenMulti_4: function (a, b, d, e) {
var f = new GT1380();
f.sprite = a;
f.startTime = b;
f.endTime = d;
f.duration = d - b;
f.currentTime = 0;
f.onComplete = e;
this._entries.add_1(f);
return f;
},
update_1: function (a) {
for (var b = this._entries.size_0(), d = 0; d < b; d++) {
var e = this._entries.get_1(d);
e.update_1(a) && this._toDelete.add_1(e);
}
a = this._toDelete.size_0();
if (0 < a) {
for (b = 0; b < a; b++) this._entries.removeElement_1(this._toDelete.get_1(b));
this._toDelete.clear_0();
}
},
},
"GT1435",
[]
),
GT1378 = GT1588.extend(
{
initialConstructor_0: function () {
GT1588.prototype.initialConstructor_0.call(this);
},
apply_1: function (a) {
this.sprite.setAlpha_1(a);
},
},
"GT1378",
[]
),
GT1233 = GT1588.extend(
{
initialConstructor_0: function () {
GT1588.prototype.initialConstructor_0.call(this);
},
apply_1: function (a) {
this.sprite.setRotation_1(a);
},
},
"GT1233",
[]
),
GT1379 = GT1588.extend(
{
initialConstructor_0: function () {
GT1588.prototype.initialConstructor_0.call(this);
},
apply_1: function (a) {
this.sprite.setWidth_1(a);
},
},
"GT1379",
[]
),
GT1328 = GT1588.extend(
{
initialConstructor_0: function () {
GT1588.prototype.initialConstructor_0.call(this);
},
apply_1: function (a) {
this.sprite.setHeight_1(a);
},
},
"GT1328",
[]
),
GT1278 = GT1588.extend(
{
initialConstructor_0: function () {
GT1588.prototype.initialConstructor_0.call(this);
},
apply_1: function (a) {
this.sprite.setCustomValue1_1(a);
},
},
"GT1278",
[]
),
GT1279 = GT1588.extend(
{
initialConstructor_0: function () {
GT1588.prototype.initialConstructor_0.call(this);
},
apply_1: function (a) {
this.sprite.setCustomValue2_1(a);
},
},
"GT1279",
[]
);
GT1435.prototype.TYPE_ALPHA = 1;
GT1435.prototype.TYPE_ROTATION = 2;
GT1435.prototype.TYPE_WIDTH = 4;
GT1435.prototype.TYPE_HEIGHT = 8;
GT1435.prototype.TYPE_CUSTOM1 = 16;
GT1435.prototype.TYPE_CUSTOM2 = 32;
GT1435.prototype.TYPE_COUNT = 6;
var GT1380 = GT1588.extend(
{
initialConstructor_0: function () {
this.type = 0;
this.endValues = this.startValues = null;
GT1588.prototype.initialConstructor_0.call(this);
},
log2_1: function (a) {
GT1650.prototype.assertExp_2(0 < a, "Illegal argument. v must be > 0");
return 31 - GT1677.prototype.numberOfLeadingZeros_1(a);
},
add_3: function (a, b, d) {
this.type |= a;
null == this.startValues && ((this.startValues = [].createArray(GT1435.prototype.TYPE_COUNT).init(0)), (this.endValues = [].createArray(GT1435.prototype.TYPE_COUNT).init(0)));
this.startValues[this.log2_1(a)] = b;
this.endValues[this.log2_1(a)] = d;
return this;
},
update_1: function (a) {
var b = !1;
this.currentTime += a;
this.currentTime >= this.endTime && (this.apply_1(this.endValue), null != this.onComplete && this.onComplete.run_0(), (b = !0));
this.startTime <= this.currentTime && this.currentTime < this.endTime && this.applyAtTime_1(this.currentTime - this.startTime);
return b;
},
apply_1: function (a) {},
applyAtTime_1: function (a) {
for (var b = 0; b < GT1435.prototype.TYPE_COUNT; ++b) {
var d = 1 << b;
if (0 != (d & this.type)) {
var e = Math.div((this.endValues[b] - this.startValues[b]) * a, this.duration) + this.startValues[b];
switch (d) {
case GT1435.prototype.TYPE_ALPHA:
this.sprite.setAlpha_1(e);
break;
case GT1435.prototype.TYPE_ROTATION:
this.sprite.setRotation_1(e);
break;
case GT1435.prototype.TYPE_WIDTH:
this.sprite.setWidth_1(e);
break;
case GT1435.prototype.TYPE_HEIGHT:
this.sprite.setHeight_1(e);
break;
case GT1435.prototype.TYPE_CUSTOM1:
this.sprite.setCustomValue1_1(e);
break;
case GT1435.prototype.TYPE_CUSTOM2:
this.sprite.setCustomValue2_1(e);
}
}
}
},
},
"GT1380",
[]
),
GT1659 = Class.extend(
{
initialConstructor_0: function () {
this.height = this.width = 0;
Class.prototype.initialConstructor_0.call(this);
},
},
"GT1659",
[]
),
GT1621 = Class.extend(
{
initialConstructor_0: function () {
this._tmp = this.trn = this.ay = this.ax = null;
this.ax = new GT1631(1, 0);
this.ay = new GT1631(0, 1);
this.trn = new GT1631();
},
createTempMatrix_0: function () {
null == this._tmp && (this._tmp = new GT1621());
},
setIdentity_0: function () {
this.ax.set_1(new GT1631(1, 0));
this.ay.set_1(new GT1631(0, 1));
this.trn.set_2(0, 0);
},
isIdentity_0: function () {
return 1 != this.ax.x || 0 != this.ax.y || 0 != this.ay.x || 1 != this.ay.y || 0 != this.trn.x || 0 != this.trn.y ? !1 : !0;
},
toString: function () {
return "Matrix23{ax=" + this.ax + ", ay=" + this.ay + ", trn=" + this.trn + 125;
},
set_3: function (a, b, d) {
this.ax.set_1(a);
this.ay.set_1(b);
this.trn.set_1(d);
},
setTranslation_2: function (a, b) {
this.trn.set_2(a, b);
},
set_1: function (a) {
this.ax.set_1(a.ax);
this.ay.set_1(a.ay);
this.trn.set_1(a.trn);
},
set_2: function (a, b) {
this.ax.x = a[b++];
this.ax.y = a[b++];
this.ay.x = a[b++];
this.ay.y = a[b++];
this.trn.x = a[b++];
this.trn.y = a[b++];
},
store_1: function (a) {
var b;
b = this.ax;
a[GT1621.prototype.AXIS_X][GT1621.prototype.AXIS_X] = b.x;
a[GT1621.prototype.AXIS_X][GT1621.prototype.AXIS_Y] = b.y;
b = this.ay;
a[GT1621.prototype.AXIS_Y][GT1621.prototype.AXIS_X] = b.x;
a[GT1621.prototype.AXIS_Y][GT1621.prototype.AXIS_Y] = b.y;
b = this.trn;
a[GT1621.prototype.AXIS_Z][GT1621.prototype.AXIS_X] = b.x;
a[GT1621.prototype.AXIS_Z][GT1621.prototype.AXIS_Y] = b.y;
},
toDoubleArray_1: function (a) {
if (6 == a.length) {
var b;
b = this.ax;
a[0] = b.x;
a[1] = b.y;
b = this.ay;
a[2] = b.x;
a[3] = b.y;
b = this.trn;
a[4] = b.x;
a[5] = b.y;
} else 9 == a.length && ((a[0] = this.ax.x), (a[1] = this.ay.x), (a[2] = this.trn.x), (a[3] = this.ax.y), (a[4] = this.ay.y), (a[5] = this.trn.y), (a[6] = 0), (a[7] = 0), (a[8] = 1));
},
blend_2: function (a, b) {
this.ax.blend_2(a.ax, b);
this.ay.blend_2(a.ay, b);
this.trn.blend_2(a.trn, b);
},
setRotation_2: function (a, b) {
this.ax.x = a;
this.ax.y = b;
this.ay.x = -b;
this.ay.y = a;
this.trn.set_2(0, 0);
},
setRotation_1: function (a) {
this.setRotation_2(Math.cos_1(a), Math.sin_1(a));
},
addRotation_1: function (a) {
this.createTempMatrix_0();
this._tmp.setRotation_1(a);
this.append_1(this._tmp);
},
setScale_2: function (a, b) {
this.ax.set_2(a, 0);
this.ay.set_2(0, b);
},
setScale_1: function (a) {
this.setScale_2(a, a);
},
transform_1: function (a) {
var b = a.x,
d = a.y;
a.x = b * this.ax.x + d * this.ay.x + this.trn.x;
a.y = b * this.ax.y + d * this.ay.y + this.trn.y;
},
append_1: function (a) {
a.transform_1(this.ax);
a.transform_1(this.ay);
a.transform_1(this.trn);
},
prepend_1: function (a) {
this.createTempMatrix_0();
this._tmp.set_1(a);
this._tmp.append_1(this);
this.set_1(this._tmp);
},
multiply_2: function (a, b) {
this.ax.x = a.ax.x * b.ax.x + a.ay.x * b.ax.y;
this.ay.x = a.ax.x * b.ay.x + a.ay.x * b.ay.y;
this.trn.x = a.ax.x * b.trn.x + a.ay.x * b.trn.y + a.trn.x;
this.ax.y = a.ax.y * b.ax.x + a.ay.y * b.ax.y;
this.ay.y = a.ax.y * b.ay.x + a.ay.y * b.ay.y;
this.trn.y = a.ax.y * b.trn.x + a.ay.y * b.trn.y + a.trn.y;
},
multiply_1: function (a) {
this.createTempMatrix_0();
this._tmp.set_1(this);
this.multiply_2(this._tmp, a);
},
equals_1: function (a) {
return this == a ? !0 : null != a && instanceOf(a, GT1621) && this.ax.equals_1(a.ax) && this.ay.equals_1(a.ay) && this.trn.equals_1(a.trn) ? !0 : !1;
},
hashCode_0: function () {
var a = this.ax.hashCode_0(),
a = 31 * a + this.ay.hashCode_0();
return (a = 31 * a + this.trn.hashCode_0());
},
},
"GT1621",
[GT1433]
);
GT1621.prototype.AXIS_X = 0;
GT1621.prototype.AXIS_Y = 1;
GT1621.prototype.AXIS_Z = 2;
var GT1329 = Class.extend(
{
initialConstructor_1: function (a) {
this._tmp2 = this._tmp = this._matrix = null;
this._matrix = a;
this._matrix.setIdentity_0();
this._tmp = new GT1621();
this._tmp2 = new GT1621();
},
initialConstructor_0: function () {
GT1329.prototype.initialConstructor_1.call(this, new GT1621());
},
init_0: function () {
this._matrix.setIdentity_0();
return this;
},
addRotation_1: function (a) {
this._tmp.setRotation_1(a);
this.apply_1(this._tmp);
return this;
},
addScale_2: function (a, b) {
this._tmp.setScale_2(a, b);
this._tmp.setTranslation_2(0, 0);
this.apply_1(this._tmp);
return this;
},
addTranslation_2: function (a, b) {
this._tmp.setScale_2(1, 1);
this._tmp.setTranslation_2(a, b);
this.apply_1(this._tmp);
return this;
},
apply_1: function (a) {
this._tmp2.multiply_2(a, this._matrix);
this._matrix.set_1(this._tmp2);
},
get_0: function () {
return this._matrix;
},
},
"GT1329",
[]
),
GT1660 = Class.extend(
{
initialConstructor_0: function () {
this.bottom = this.right = this.top = this.left = 0;
},
initialConstructor_4: function (a, b, d, e) {
this.bottom = this.right = this.top = this.left = 0;
this.left = a;
this.top = b;
this.right = d;
this.bottom = e;
},
initialConstructor_1: function (a) {
this.bottom = this.right = this.top = this.left = 0;
null == a ? (this.left = this.top = this.right = this.bottom = 0) : ((this.left = a.left), (this.top = a.top), (this.right = a.right), (this.bottom = a.bottom));
},
equals_1: function (a) {
return this == a ? !0 : null != a && instanceOf(a, GT1660) ? this.left == a.left && this.top == a.top && this.right == a.right && this.bottom == a.bottom : !1;
},
hashCode_0: function () {
var a = this.left,
a = 31 * a + this.top,
a = 31 * a + this.right;
return (a = 31 * a + this.bottom);
},
isEmpty_0: function () {
return this.left >= this.right || this.top >= this.bottom;
},
getWidth_0: function () {
return this.right - this.left;
},
getHeight_0: function () {
return this.bottom - this.top;
},
centerX_0: function () {
return (this.left + this.right) >> 1;
},
centerY_0: function () {
return (this.top + this.bottom) >> 1;
},
exactCenterX_0: function () {
return 0.5 * (this.left + this.right);
},
exactCenterY_0: function () {
return 0.5 * (this.top + this.bottom);
},
setEmpty_0: function () {
this.left = this.right = this.top = this.bottom = 0;
},
set_4: function (a, b, d, e) {
this.left = a;
this.top = b;
this.right = d;
this.bottom = e;
},
set_1: function (a) {
this.left = a.left;
this.top = a.top;
this.right = a.right;
this.bottom = a.bottom;
},
offset_2: function (a, b) {
this.left += a;
this.top += b;
this.right += a;
this.bottom += b;
},
offsetTo_2: function (a, b) {
this.right += a - this.left;
this.bottom += b - this.top;
this.left = a;
this.top = b;
},
inset_2: function (a, b) {
this.left += a;
this.top += b;
this.right -= a;
this.bottom -= b;
},
contains_2: function (a, b) {
return this.left < this.right && this.top < this.bottom && a >= this.left && a < this.right && b >= this.top && b < this.bottom;
},
contains_4: function (a, b, d, e) {
return this.left < this.right && this.top < this.bottom && this.left <= a && this.top <= b && this.right >= d && this.bottom >= e;
},
contains_1: function (a) {
return this.left < this.right && this.top < this.bottom && this.left <= a.left && this.top <= a.top && this.right >= a.right && this.bottom >= a.bottom;
},
intersect_4: function (a, b, d, e) {
return this.left < d && a < this.right && this.top < e && b < this.bottom
? (this.left < a && (this.left = a), this.top < b && (this.top = b), this.right > d && (this.right = d), this.bottom > e && (this.bottom = e), !0)
: !1;
},
intersect_1: function (a) {
return this.intersect_4(a.left, a.top, a.right, a.bottom);
},
setIntersect_2: function (a, b) {
return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom
? ((this.left = Math.max_2(a.left, b.left)), (this.top = Math.max_2(a.top, b.top)), (this.right = Math.min_2(a.right, b.right)), (this.bottom = Math.min_2(a.bottom, b.bottom)), !0)
: !1;
},
intersects_4: function (a, b, d, e) {
return this.left < d && a < this.right && this.top < e && b < this.bottom;
},
scaleFromCenter_1: function (a) {
if (1 != a) {
var b = this.getWidth_0(),
d = this.getHeight_0(),
e = this.left + Math.div(b, 2),
f = this.top + Math.div(d, 2),
b = b * a;
a *= d;
this.left = Integer.truncate_1(e - Math.div(b, 2));
this.top = Integer.truncate_1(f - Math.div(a, 2));
this.right = Integer.truncate_1(e + Math.div(b, 2));
this.bottom = Integer.truncate_1(f + Math.div(a, 2));
}
},
union_4: function (a, b, d, e) {
a < d &&
b < e &&
(this.left < this.right && this.top < this.bottom
? (this.left > a && (this.left = a), this.top > b && (this.top = b), this.right < d && (this.right = d), this.bottom < e && (this.bottom = e))
: ((this.left = a), (this.top = b), (this.right = d), (this.bottom = e)));
},
union_1: function (a) {
this.union_4(a.left, a.top, a.right, a.bottom);
},
union_2: function (a, b) {
a < this.left ? (this.left = a) : a > this.right && (this.right = a);
b < this.top ? (this.top = b) : b > this.bottom && (this.bottom = b);
},
sort_0: function () {
if (this.left > this.right) {
var a = this.left;
this.left = this.right;
this.right = a;
}
this.top > this.bottom && ((a = this.top), (this.top = this.bottom), (this.bottom = a));
},
describeContents_0: function () {
return 0;
},
scale_1: function (a) {
1 != a &&
((this.left = Integer.truncate_1(this.left * a + 0.5)),
(this.top = Integer.truncate_1(this.top * a + 0.5)),
(this.right = Integer.truncate_1(this.right * a + 0.5)),
(this.bottom = Integer.truncate_1(this.bottom * a + 0.5)));
},
scaleRoundIn_1: function (a) {
1 != a &&
((this.left = Integer.truncate_1(Math.ceil_1(this.left * a))),
(this.top = Integer.truncate_1(Math.ceil_1(this.top * a))),
(this.right = Integer.truncate_1(Math.floor_1(this.right * a))),
(this.bottom = Integer.truncate_1(Math.floor_1(this.bottom * a))));
},
},
"GT1660",
[]
);
GT1660.prototype.intersects_2 = function (a, b) {
return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
};
var GT1652 = Class.extend(
{
initialConstructor_0: function () {
this.bottom = this.right = this.top = this.left = 0;
},
initialConstructor_4: function (a, b, d, e) {
this.bottom = this.right = this.top = this.left = 0;
this.left = a;
this.top = b;
this.right = d;
this.bottom = e;
},
initialConstructor_1: function (a) {
this.bottom = this.right = this.top = this.left = 0;
null == a ? (this.left = this.top = this.right = this.bottom = 0) : ((this.left = a.left), (this.top = a.top), (this.right = a.right), (this.bottom = a.bottom));
},
initialConstructor_1: function (a) {
this.bottom = this.right = this.top = this.left = 0;
null == a ? (this.left = this.top = this.right = this.bottom = 0) : ((this.left = a.left), (this.top = a.top), (this.right = a.right), (this.bottom = a.bottom));
},
equals_1: function (a) {
return this == a ? !0 : null != a && instanceOf(a, GT1652) ? this.left == a.left && this.top == a.top && this.right == a.right && this.bottom == a.bottom : !1;
},
toString: function () {
return "RectD(" + this.left + ", " + this.top + ", " + this.right + ", " + this.bottom + ")";
},
isEmpty_0: function () {
return this.left >= this.right || this.top >= this.bottom;
},
getWidth_0: function () {
return this.right - this.left;
},
getHeight_0: function () {
return this.bottom - this.top;
},
centerX_0: function () {
return 0.5 * (this.left + this.right);
},
centerY_0: function () {
return 0.5 * (this.top + this.bottom);
},
setEmpty_0: function () {
this.left = this.right = this.top = this.bottom = 0;
},
set_4: function (a, b, d, e) {
this.left = a;
this.top = b;
this.right = d;
this.bottom = e;
},
set_1: function (a) {
this.left = a.left;
this.top = a.top;
this.right = a.right;
this.bottom = a.bottom;
},
set_1: function (a) {
this.left = a.left;
this.top = a.top;
this.right = a.right;
this.bottom = a.bottom;
},
offset_2: function (a, b) {
this.left += a;
this.top += b;
this.right += a;
this.bottom += b;
},
offsetTo_2: function (a, b) {
this.right += a - this.left;
this.bottom += b - this.top;
this.left = a;
this.top = b;
},
inset_2: function (a, b) {
this.left += a;
this.top += b;
this.right -= a;
this.bottom -= b;
},
contains_2: function (a, b) {
return this.left < this.right && this.top < this.bottom && a >= this.left && a < this.right && b >= this.top && b < this.bottom;
},
contains_4: function (a, b, d, e) {
return this.left < this.right && this.top < this.bottom && this.left <= a && this.top <= b && this.right >= d && this.bottom >= e;
},
contains_1: function (a) {
return this.left < this.right && this.top < this.bottom && this.left <= a.left && this.top <= a.top && this.right >= a.right && this.bottom >= a.bottom;
},
intersect_4: function (a, b, d, e) {
return this.left < d && a < this.right && this.top < e && b < this.bottom
? (this.left < a && (this.left = a), this.top < b && (this.top = b), this.right > d && (this.right = d), this.bottom > e && (this.bottom = e), !0)
: !1;
},
intersect_1: function (a) {
return this.intersect_4(a.left, a.top, a.right, a.bottom);
},
setIntersect_2: function (a, b) {
return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom
? ((this.left = Math.max_2(a.left, b.left)), (this.top = Math.max_2(a.top, b.top)), (this.right = Math.min_2(a.right, b.right)), (this.bottom = Math.min_2(a.bottom, b.bottom)), !0)
: !1;
},
intersects_4: function (a, b, d, e) {
return this.left < d && a < this.right && this.top < e && b < this.bottom;
},
round_1: function (a) {
a.set_4(Integer.truncate_1(Math.round_1(this.left)), Integer.truncate_1(Math.round_1(this.top)), Integer.truncate_1(Math.round_1(this.right)), Integer.truncate_1(Math.round_1(this.bottom)));
},
roundOut_1: function (a) {
a.set_4(Integer.truncate_1(Math.floor_1(this.left)), Integer.truncate_1(Math.floor_1(this.top)), Integer.truncate_1(Math.ceil_1(this.right)), Integer.truncate_1(Math.ceil_1(this.bottom)));
},
scaleFromCenter_1: function (a) {
if (1 != a) {
var b = this.getWidth_0(),
d = this.getHeight_0(),
e = this.left + Math.div(b, 2),
f = this.top + Math.div(d, 2),
b = b * a;
a *= d;
this.left = e - Math.div(b, 2);
this.top = f - Math.div(a, 2);
this.right = e + Math.div(b, 2);
this.bottom = f + Math.div(a, 2);
}
},
union_4: function (a, b, d, e) {
a < d &&
b < e &&
(this.left < this.right && this.top < this.bottom
? (this.left > a && (this.left = a), this.top > b && (this.top = b), this.right < d && (this.right = d), this.bottom < e && (this.bottom = e))
: ((this.left = a), (this.top = b), (this.right = d), (this.bottom = e)));
},
union_1: function (a) {
this.union_4(a.left, a.top, a.right, a.bottom);
},
union_2: function (a, b) {
a < this.left ? (this.left = a) : a > this.right && (this.right = a);
b < this.top ? (this.top = b) : b > this.bottom && (this.bottom = b);
},
sort_0: function () {
if (this.left > this.right) {
var a = this.left;
this.left = this.right;
this.right = a;
}
this.top > this.bottom && ((a = this.top), (this.top = this.bottom), (this.bottom = a));
},
describeContents_0: function () {
return 0;
},
},
"GT1652",
[]
);
GT1652.prototype.intersects_2 = function (a, b) {
return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
};
var GT1661 = Class.extend(
{
initialConstructor_2: function (a, b) {
this.height = this.width = 0;
this.width = a;
this.height = b;
},
initialConstructor_0: function () {
this.width = this.height = this.height = this.width = 0;
},
toString: function () {
return "Size{width=" + this.width + ", height=" + this.height + 125;
},
equals_1: function (a) {
return this == a ? !0 : null != a && instanceOf(a, GT1661) && this.width == a.width ? this.height == a.height : !1;
},
hashCode_0: function () {
var a = this.width;
return (a = 31 * a + this.height);
},
},
"GT1661",
[]
),
GT1622 = Class.extend(
{
initialConstructor_0: function () {
this.acceleration = this.velocity = this.dampingK = this.springK = this.position = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.acceleration = this.velocity = this.dampingK = this.springK = this.position = 0;
Class.prototype.initialConstructor_0.call(this);
this.position = 0;
this.springK = a;
this.dampingK = b;
this.velocity = 0;
},
initialConstructor_1: function (a) {
GT1622.prototype.initialConstructor_2.call(this, a, 2 * Math.sqrt_1(a));
},
update_2: function (a, b) {
var d = this.position - a,
d = d * -this.springK - this.velocity * this.dampingK;
this.velocity += d * b;
if (this.velocity < Double.MIN_VALUE || this.velocity > Double.MAX_VALUE) this.velocity = 0;
this.position += this.velocity * b;
java_lang_System.prototype.out.println_1("time: " + b);
java_lang_System.prototype.out.println_1("pos: " + this.position);
java_lang_System.prototype.out.println_1("vel: " + this.velocity);
},
getDampingK_0: function () {
return this.dampingK;
},
setDampingK_1: function (a) {
this.dampingK = a;
},
getPosition_0: function () {
return this.position;
},
setPosition_1: function (a) {
this.position = a;
},
getSpringK_0: function () {
return this.springK;
},
setSpringK_1: function (a) {
this.springK = a;
},
getVelocity_0: function () {
return this.velocity;
},
setVelocity_1: function (a) {
this.velocity = a;
},
},
"GT1622",
[]
),
GT866 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
},
"GT866",
[]
);
GT866.prototype.X = 1;
GT866.prototype.Y = 2;
GT866.prototype.WIDTH = 3;
GT866.prototype.HEIGHT = 4;
GT866.prototype.XYWH = 5;
GT866.prototype.XY = 6;
GT866.prototype.ALPHA = 7;
GT866.prototype.ROTATION = 8;
GT866.prototype.SCALE_X = 9;
GT866.prototype.SCALE_Y = 10;
GT866.prototype.SCALE = 11;
GT866.prototype.CUSTOM1 = 12;
GT866.prototype.CUSTOM2 = 13;
GT866.prototype.CUSTOM3 = 14;
GT866.prototype.CUSTOM4 = 15;
var GT925 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
getValues_3: function (a, b, d) {
return a.canHandleType_1(b) && b == GT866.prototype.ALPHA ? ((d[0] = a.getAlpha_0()), 1) : -1;
},
setValues_3: function (a, b, d) {
return a.canHandleType_1(b) && b == GT866.prototype.ALPHA ? (a.setAlpha_1(d[0]), !0) : !1;
},
canHandle_1: function (a) {
return null != a && GT867.prototype.ALPHA.equals_1(a);
},
},
"GT925",
[GT1425]
);
GT925.prototype.canHandleType_1 = function (a) {
return GT866.prototype.ALPHA == a;
};
var GT552 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
getValues_3: function (a, b, d) {
if (!a.canHandleType_1(b)) return -1;
switch (b) {
case GT866.prototype.CUSTOM1:
return (d[0] = a.getCustomValue1_0()), 1;
case GT866.prototype.CUSTOM2:
return (d[0] = a.getCustomValue2_0()), 1;
case GT866.prototype.CUSTOM3:
return (d[0] = a.getCustomValue3_0()), 1;
case GT866.prototype.CUSTOM4:
return (d[0] = a.getCustomValue4_0()), 1;
default:
return -1;
}
},
setValues_3: function (a, b, d) {
if (!a.canHandleType_1(b)) return !1;
switch (b) {
case GT866.prototype.CUSTOM1:
return a.setCustomValue1_1(d[0]), !0;
case GT866.prototype.CUSTOM2:
return a.setCustomValue2_1(d[0]), !0;
case GT866.prototype.CUSTOM3:
return a.setCustomValue3_1(d[0]), !0;
case GT866.prototype.CUSTOM4:
return a.setCustomValue4_1(d[0]), !0;
}
return !1;
},
canHandle_1: function (a) {
return null != a && GT867.prototype.CUSTOM_FIELDS.equals_1(a);
},
},
"GT552",
[GT1425]
);
GT552.prototype.canHandleType_1 = function (a) {
return GT866.prototype.CUSTOM1 == a || GT866.prototype.CUSTOM2 == a || GT866.prototype.CUSTOM3 == a || GT866.prototype.CUSTOM4 == a;
};
var GT967 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
getValues_3: function (a, b, d) {
if (!a.canHandleType_1(b)) return -1;
switch (b) {
case GT866.prototype.X:
return (d[0] = a.getX_0()), 1;
case GT866.prototype.Y:
return (d[0] = a.getY_0()), 1;
case GT866.prototype.WIDTH:
return (d[0] = a.getWidth_0()), 1;
case GT866.prototype.HEIGHT:
return (d[0] = a.getHeight_0()), 1;
case GT866.prototype.XYWH:
return (d[0] = a.getX_0()), (d[1] = a.getY_0()), (d[2] = a.getWidth_0()), (d[3] = a.getHeight_0()), 4;
case GT866.prototype.XY:
return (d[0] = a.getX_0()), (d[1] = a.getY_0()), 2;
default:
return -1;
}
},
setValues_3: function (a, b, d) {
if (!a.canHandleType_1(b)) return !1;
switch (b) {
case GT866.prototype.X:
return a.setX_1(d[0]), !0;
case GT866.prototype.Y:
return a.setY_1(d[0]), !0;
case GT866.prototype.WIDTH:
return a.setWidth_1(d[0]), !0;
case GT866.prototype.HEIGHT:
return a.setHeight_1(d[0]), !0;
case GT866.prototype.XYWH:
return a.setX_1(d[0]), a.setY_1(d[1]), a.setWidth_1(d[2]), a.setHeight_1(d[3]), !0;
case GT866.prototype.XY:
return a.setX_1(d[0]), a.setY_1(d[1]), !0;
default:
return !1;
}
},
canHandle_1: function (a) {
return null != a && GT867.prototype.RECT.equals_1(a);
},
},
"GT967",
[GT1425]
);
GT967.prototype.canHandleType_1 = function (a) {
return GT866.prototype.X == a || GT866.prototype.Y == a || GT866.prototype.WIDTH == a || GT866.prototype.HEIGHT == a || GT866.prototype.XYWH == a || GT866.prototype.XY == a;
};
var GT705 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
getValues_3: function (a, b, d) {
if (!a.canHandleType_1(b)) return -1;
switch (b) {
case GT866.prototype.ROTATION:
return (d[0] = a.getRotation_0()), 1;
case GT866.prototype.SCALE:
return (d[0] = a.getScaleX_0()), (d[1] = a.getScaleY_0()), 2;
case GT866.prototype.SCALE_X:
return (d[0] = a.getScaleX_0()), 1;
case GT866.prototype.SCALE_Y:
return (d[0] = a.getScaleY_0()), 1;
default:
return -1;
}
},
setValues_3: function (a, b, d) {
if (!a.canHandleType_1(b)) return !1;
switch (b) {
case GT866.prototype.ROTATION:
return a.setRotation_1(d[0]), !0;
case GT866.prototype.SCALE:
return a.setScaleX_1(d[0]), a.setScaleY_1(d[1]), !0;
case GT866.prototype.SCALE_X:
return a.setScaleX_1(d[0]), !0;
case GT866.prototype.SCALE_Y:
return a.setScaleY_1(d[0]), !0;
}
return !1;
},
canHandle_1: function (a) {
return null != a && GT867.prototype.TRANSFORM.equals_1(a);
},
},
"GT705",
[GT1425]
);
GT705.prototype.canHandleType_1 = function (a) {
return GT866.prototype.ROTATION == a || GT866.prototype.SCALE == a || GT866.prototype.SCALE_Y == a || GT866.prototype.SCALE_X == a;
};
var GT867 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
},
"GT867",
[]
);
GT867.prototype.RECT = "_tween_rect_";
GT867.prototype.TRANSFORM = "_tween_transform_";
GT867.prototype.ALPHA = "_tween_alpha_";
GT867.prototype.CUSTOM_FIELDS = "_tween_custom_fields_";
var GT1381 = Class.extend(
{
initialConstructor_0: function () {
this.rotation = this.alpha = this.height = this.width = this.y = this.x = this.scaleY = this.scaleX = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_4: function (a, b, d, e) {
this.rotation = this.alpha = this.height = this.width = this.y = this.x = this.scaleY = this.scaleX = 0;
this.set_4(a, b, d, e);
this.alpha = this.scaleY = this.scaleX = 1;
},
getX_0: function () {
return this.x;
},
setX_1: function (a) {
this.x = a;
},
getY_0: function () {
return this.y;
},
setY_1: function (a) {
this.y = a;
},
getWidth_0: function () {
return this.width;
},
setWidth_1: function (a) {
this.width = a;
},
getHeight_0: function () {
return this.height;
},
setHeight_1: function (a) {
this.height = a;
},
getAlpha_0: function () {
return this.alpha;
},
setAlpha_1: function (a) {
this.alpha = a;
},
getRotation_0: function () {
return this.rotation;
},
setRotation_1: function (a) {
this.rotation = a;
},
setScaleX_1: function (a) {
this.scaleX = a;
},
getScaleX_0: function () {
return this.scaleX;
},
setScaleY_1: function (a) {
this.scaleY = a;
},
getScaleY_0: function () {
return this.scaleY;
},
set_4: function (a, b, d, e) {
this.x = a;
this.y = b;
this.width = d;
this.height = e;
},
getTweenAccessorKeys_0: function () {
return [GT867.prototype.RECT, GT867.prototype.TRANSFORM, GT867.prototype.ALPHA];
},
canHandleType_1: function (a) {
return GT925.prototype.canHandleType_1(a) || GT705.prototype.canHandleType_1(a) || GT967.prototype.canHandleType_1(a);
},
},
"GT1381",
[GT860, GT804, GT596, GT1582]
),
GT1280 = GT1381.extend(
{
initialConstructor_0: function () {
this._custom4 = this._custom3 = this._custom2 = this._custom1 = 0;
GT1381.prototype.initialConstructor_0.call(this);
},
initialConstructor_4: function (a, b, d, e) {
this._custom4 = this._custom3 = this._custom2 = this._custom1 = 0;
GT1381.prototype.initialConstructor_4.call(this, a, b, d, e);
},
getCustomValue1_0: function () {
return this._custom1;
},
setCustomValue1_1: function (a) {
this._custom1 = a;
},
getCustomValue2_0: function () {
return this._custom2;
},
setCustomValue2_1: function (a) {
this._custom2 = a;
},
getCustomValue3_0: function () {
return this._custom3;
},
setCustomValue3_1: function (a) {
this._custom3 = a;
},
getCustomValue4_0: function () {
return this._custom4;
},
setCustomValue4_1: function (a) {
this._custom4 = a;
},
getTweenAccessorKeys_0: function () {
return [GT867.prototype.RECT, GT867.prototype.TRANSFORM, GT867.prototype.ALPHA, GT867.prototype.CUSTOM_FIELDS];
},
canHandleType_1: function (a) {
return GT1381.prototype.canHandleType_1.call(this, a) || GT552.prototype.canHandleType_1(a);
},
},
"GT1280",
[GT452]
),
GT1589 = Class.extend(
{
initialConstructor_0: function () {
this.repeatCnt = this.step = 0;
this.mIsYoyo = this.isIterationStep = !1;
this.deltaTime = this.currentTime = this.repeatDelay = this.duration = this.mDelay = 0;
this.mIsPaused = this.mIsKilled = this.mIsFinished = this.mIsInitialized = this.mIsStarted = !1;
this.callback = null;
this.callbackTriggers = 0;
this.userData = null;
this.isAutoStartEnabled = this.isAutoRemoveEnabled = !1;
Class.prototype.initialConstructor_0.call(this);
},
reset_0: function () {
this.step = -2;
this.repeatCnt = 0;
this.isIterationStep = this.mIsYoyo = !1;
this.mDelay = this.duration = this.repeatDelay = this.currentTime = this.deltaTime = 0;
this.mIsStarted = this.mIsInitialized = this.mIsFinished = this.mIsKilled = this.mIsPaused = !1;
this.callback = null;
this.callbackTriggers = GT1181.prototype.COMPLETE;
this.userData = null;
this.isAutoRemoveEnabled = this.isAutoStartEnabled = !0;
},
build_0: function () {
return this;
},
start_0: function () {
this.build_0();
this.currentTime = 0;
this.mIsStarted = !0;
return this;
},
start_1: function (a) {
a.add_1(this);
return this;
},
delay_1: function (a) {
this.mDelay += a;
return this;
},
kill_0: function () {
this.mIsKilled = !0;
},
free_0: function () {},
pause_0: function () {
this.mIsPaused = !0;
},
resume_0: function () {
this.mIsPaused = !1;
},
repeat_2: function (a, b) {
this.mIsStarted && GT1650.prototype.assertFailed_1("You can't change the repetitions of a tween or timeline once it is started");
this.repeatCnt = a;
this.repeatDelay = 0 <= b ? b : 0;
this.mIsYoyo = !1;
return this;
},
repeatYoyo_2: function (a, b) {
this.mIsStarted && GT1650.prototype.assertFailed_1("You can't change the repetitions of a tween or timeline once it is started");
this.repeatCnt = a;
this.repeatDelay = 0 <= b ? b : 0;
this.mIsYoyo = !0;
return this;
},
setCallback_1: function (a) {
this.callback = a;
return this;
},
setCallbackTriggers_1: function (a) {
this.callbackTriggers = a;
return this;
},
setUserData_1: function (a) {
this.userData = a;
return this;
},
getDelay_0: function () {
return this.mDelay;
},
getDuration_0: function () {
return this.duration;
},
getRepeatCount_0: function () {
return this.repeatCnt;
},
getRepeatDelay_0: function () {
return this.repeatDelay;
},
getFullDuration_0: function () {
return 0 > this.repeatCnt ? -1 : this.mDelay + this.duration + (this.repeatDelay + this.duration) * this.repeatCnt;
},
getUserData_0: function () {
return this.userData;
},
getStep_0: function () {
return this.step;
},
getCurrentTime_0: function () {
return this.currentTime;
},
isStarted_0: function () {
return this.mIsStarted;
},
isInitialized_0: function () {
return this.mIsInitialized;
},
isFinished_0: function () {
return this.mIsFinished || this.mIsKilled;
},
isYoyo_0: function () {
return this.mIsYoyo;
},
isPaused_0: function () {
return this.mIsPaused;
},
initializeOverride_0: function () {},
updateOverride_4: function (a, b, d, e) {},
forceToStart_0: function () {
this.currentTime = -this.mDelay;
this.step = -1;
this.isIterationStep = !1;
this.isReverse_1(0) ? this.forceEndValues_0() : this.forceStartValues_0();
},
forceToEnd_1: function (a) {
this.currentTime = a - this.getFullDuration_0();
this.step = 2 * this.repeatCnt + 1;
this.isIterationStep = !1;
this.isReverse_1(2 * this.repeatCnt) ? this.forceStartValues_0() : this.forceEndValues_0();
},
callCallback_1: function (a) {
if (null != this.callback && 0 < (this.callbackTriggers & a)) this.callback.onEvent_2(a, this);
},
isReverse_1: function (a) {
return this.mIsYoyo && 2 == Math.abs_1(a % 4);
},
isValid_1: function (a) {
return (0 <= a && a <= 2 * this.repeatCnt) || 0 > this.repeatCnt;
},
killTarget_1: function (a) {
this.containsTarget_1(a) && this.kill_0();
},
killTarget_2: function (a, b) {
this.containsTarget_2(a, b) && this.kill_0();
},
update_1: function (a) {
!this.mIsStarted ||
this.mIsPaused ||
this.mIsKilled ||
((this.deltaTime = a),
this.mIsInitialized || this.initialize_0(),
this.mIsInitialized && (this.testRelaunch_0(), this.updateStep_0(), this.testCompletion_0()),
(this.currentTime += this.deltaTime),
(this.deltaTime = 0));
},
initialize_0: function () {
this.currentTime + this.deltaTime >= this.mDelay &&
(this.initializeOverride_0(),
(this.isIterationStep = this.mIsInitialized = !0),
(this.step = 0),
(this.deltaTime -= this.mDelay - this.currentTime),
(this.currentTime = 0),
this.callCallback_1(GT1181.prototype.BEGIN),
this.callCallback_1(GT1181.prototype.START));
},
testRelaunch_0: function () {
if (!this.isIterationStep && 0 <= this.repeatCnt && 0 > this.step && 0 <= this.currentTime + this.deltaTime) {
-1 != this.step && GT1650.prototype.assertFailed_1("step must be -1 or >= 0");
this.isIterationStep = !0;
this.step = 0;
var a = 0 - this.currentTime;
this.deltaTime -= a;
this.currentTime = 0;
this.callCallback_1(GT1181.prototype.BEGIN);
this.callCallback_1(GT1181.prototype.START);
this.updateOverride_4(this.step, this.step - 1, this.isIterationStep, a);
} else
!this.isIterationStep &&
0 <= this.repeatCnt &&
this.step > 2 * this.repeatCnt &&
0 > this.currentTime + this.deltaTime &&
(this.step != 2 * this.repeatCnt + 1 && GT1650.prototype.assertFailed_1("step must be repeatCnt*2 + 1"),
(this.isIterationStep = !0),
(this.step = 2 * this.repeatCnt),
(a = 0 - this.currentTime),
(this.deltaTime -= a),
(this.currentTime = this.duration),
this.callCallback_1(GT1181.prototype.BACK_BEGIN),
this.callCallback_1(GT1181.prototype.BACK_START),
this.updateOverride_4(this.step, this.step + 1, this.isIterationStep, a));
},
updateStep_0: function () {
for (; this.isValid_1(this.step); )
if (!this.isIterationStep && 0 >= this.currentTime + this.deltaTime) {
this.isIterationStep = !0;
--this.step;
var a = 0 - this.currentTime;
this.deltaTime -= a;
this.currentTime = this.duration;
this.isReverse_1(this.step) ? this.forceStartValues_0() : this.forceEndValues_0();
this.callCallback_1(GT1181.prototype.BACK_START);
this.updateOverride_4(this.step, this.step + 1, this.isIterationStep, a);
} else if (!this.isIterationStep && this.currentTime + this.deltaTime >= this.repeatDelay)
(this.isIterationStep = !0),
(this.step += 1),
(a = this.repeatDelay - this.currentTime),
(this.deltaTime -= a),
(this.currentTime = 0),
this.isReverse_1(this.step) ? this.forceEndValues_0() : this.forceStartValues_0(),
this.callCallback_1(GT1181.prototype.START),
this.updateOverride_4(this.step, this.step - 1, this.isIterationStep, a);
else if (this.isIterationStep && 0 > this.currentTime + this.deltaTime)
(this.isIterationStep = !1),
--this.step,
(a = 0 - this.currentTime),
(this.deltaTime -= a),
(this.currentTime = 0),
this.updateOverride_4(this.step, this.step + 1, this.isIterationStep, a),
this.callCallback_1(GT1181.prototype.BACK_END),
0 > this.step && 0 <= this.repeatCnt ? this.callCallback_1(GT1181.prototype.BACK_COMPLETE) : (this.currentTime = this.repeatDelay);
else if (this.isIterationStep && this.currentTime + this.deltaTime > this.duration)
(this.isIterationStep = !1),
(this.step += 1),
(a = this.duration - this.currentTime),
(this.deltaTime -= a),
(this.currentTime = this.duration),
this.updateOverride_4(this.step, this.step - 1, this.isIterationStep, a),
this.callCallback_1(GT1181.prototype.END),
this.step > 2 * this.repeatCnt && 0 <= this.repeatCnt && this.callCallback_1(GT1181.prototype.COMPLETE),
(this.currentTime = 0);
else {
this.isIterationStep
? ((a = this.deltaTime), (this.deltaTime -= a), (this.currentTime += a), this.updateOverride_4(this.step, this.step, this.isIterationStep, a))
: ((a = this.deltaTime), (this.deltaTime -= a), (this.currentTime += a));
break;
}
},
testCompletion_0: function () {
this.mIsFinished = 0 <= this.repeatCnt && (this.step > 2 * this.repeatCnt || 0 > this.step);
},
},
"GT1589",
[]
),
GT1281 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
compute_3: function (a, b, d) {
var e = Integer.truncate_1(Math.floor_1((d - 1) * a)),
e = Math.max_2(e, 0),
e = Math.min_2(e, d - 2);
a = a * (d - 1) - e;
return 0 == e ? this.catmullRomSpline_5(b[0], b[0], b[1], b[2], a) : e == d - 2 ? this.catmullRomSpline_5(b[d - 3], b[d - 2], b[d - 1], b[d - 1], a) : this.catmullRomSpline_5(b[e - 1], b[e], b[e + 1], b[e + 2], a);
},
catmullRomSpline_5: function (a, b, d, e, f) {
return b * (2 * f * f * f - 3 * f * f + 1) + d * (-2 * f * f * f + 3 * f * f) + 0.5 * (d - a) * (f * f * f - 2 * f * f + f) + 0.5 * (e - b) * (f * f * f - f * f);
},
},
"GT1281",
[GT1583]
),
GT1485 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
compute_3: function (a, b, d) {
var e = Integer.truncate_1(Math.floor_1((d - 1) * a)),
e = Math.max_2(e, 0),
e = Math.min_2(e, d - 2);
return b[e] + (a * (d - 1) - e) * (b[e + 1] - b[e]);
},
},
"GT1485",
[GT1583]
),
GT1653 = Class.extend(
{
initialConstructor_0: function () {
this.callback = this.objects = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.callback = this.objects = null;
this.objects = new java_util_JavaScriptVector();
this.callback = b;
},
get_0: function () {
var a = this.objects.isEmpty_0() ? this.create_0() : this.objects.get_1(this.objects.size_0() - 1);
this.objects.isEmpty_0() || this.objects.removeElementAt_1(this.objects.size_0() - 1);
if (null != this.callback) this.callback.onUnPool_1(a);
return a;
},
free_1: function (a) {
if (!this.objects.contains_1(a)) {
if (null != this.callback) this.callback.onPool_1(a);
this.objects.add_1(a);
}
},
clear_0: function () {
this.objects.clear_0();
},
size_0: function () {
return this.objects.size_0();
},
ensureCapacity_1: function (a) {},
},
"GT1653",
[]
),
GT868 = Class.extend(
{
initialConstructor_0: function () {
this.value = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.value = 0;
this.value = a;
},
setValue_1: function (a) {
this.value = a;
},
intValue_0: function () {
return Integer.truncate_1(this.value);
},
doubleValue_0: function () {
return this.value;
},
getValues_3: function (a, b, d) {
d[0] = a.value;
return 1;
},
setValues_3: function (a, b, d) {
a.value = d[0];
return !0;
},
canHandle_1: function (a) {
return !1;
},
},
"GT868",
[GT1425]
),
GT813 = Class.extend(
{
initialConstructor_0: function () {
this.value = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.value = 0;
this.value = a;
},
setValue_1: function (a) {
this.value = a;
},
intValue_0: function () {
return Integer.truncate_1(this.value);
},
doubleValue_0: function () {
return this.value;
},
getValues_3: function (a, b, d) {
d[0] = a.value;
return 1;
},
setValues_3: function (a, b, d) {
a.value = Integer.truncate_1(d[0]);
return !0;
},
canHandle_1: function (a) {
return !1;
},
},
"GT813",
[GT1425]
),
GT1486 = GT1653.extend(
{
initialConstructor_0: function () {
GT1653.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
GT1653.prototype.initialConstructor_2.call(this, a, b);
},
create_0: function () {
return new GT1605();
},
},
"GT1486",
[]
),
GT1072 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
onPool_1: function (a) {
a.reset_0();
},
onUnPool_1: function (a) {
a.reset_0();
},
},
"GT1072",
[GT1603]
),
GT1181 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
},
"GT1181",
[]
);
GT1181.prototype.BEGIN = 1;
GT1181.prototype.START = 2;
GT1181.prototype.END = 4;
GT1181.prototype.COMPLETE = 8;
GT1181.prototype.BACK_BEGIN = 16;
GT1181.prototype.BACK_START = 32;
GT1181.prototype.BACK_END = 64;
GT1181.prototype.BACK_COMPLETE = 128;
GT1181.prototype.ANY_FORWARD = 15;
GT1181.prototype.ANY_BACKWARD = 240;
GT1181.prototype.ANY = 255;
var GT1436 = Class.extend(
{
initialConstructor_0: function () {},
isValueOf_1: function (a) {
return a.equals_1(this.toString());
},
},
"GT1436",
[]
),
GT1487 = Class.extend(
{
initialConstructor_0: function () {
this.objects = null;
this.mIsPaused = !1;
this.objects = new java_util_JavaScriptVector();
this.mIsPaused = !1;
},
add_1: function (a) {
this.objects.contains_1(a) || this.objects.add_1(a);
a.isAutoStartEnabled && a.start_0();
return this;
},
containsTarget_1: function (a) {
for (var b = 0; b < this.objects.size_0(); b++) if (this.objects.get_1(b).containsTarget_1(a)) return !0;
return !1;
},
containsTarget_2: function (a, b) {
for (var d = 0; d < this.objects.size_0(); d++) if (this.objects.get_1(d).containsTarget_2(a, b)) return !0;
return !1;
},
containsTween_1: function (a) {
return this.objects.contains_1(a);
},
killAll_0: function () {
for (var a = 0; a < this.objects.size_0(); a++) this.objects.get_1(a).kill_0();
},
killTarget_1: function (a) {
for (var b = 0; b < this.objects.size_0(); b++) this.objects.get_1(b).killTarget_1(a);
},
killTarget_2: function (a, b) {
for (var d = 0; d < this.objects.size_0(); d++) this.objects.get_1(d).killTarget_2(a, b);
},
ensureCapacity_1: function (a) {},
pause_0: function () {
this.mIsPaused = !0;
},
isPaused_0: function () {
return this.mIsPaused;
},
resume_0: function () {
this.mIsPaused = !1;
},
update_1: function (a) {
for (var b = this.objects.size_0() - 1; 0 <= b; b--) {
var d = this.objects.get_1(b);
d.isFinished_0() && d.isAutoRemoveEnabled && (this.objects.removeElementAt_1(b), d.free_0());
}
if (!this.mIsPaused)
if (0 <= a) for (b = 0; b < this.objects.size_0(); b++) this.objects.get_1(b).update_1(a);
else for (b = this.objects.size_0() - 1; 0 <= b; b--) this.objects.get_1(b).update_1(a);
},
size_0: function () {
return this.objects.size_0();
},
getRunningTweensCount_0: function () {
return this.getTweensCount_1(this.objects);
},
getRunningTimelinesCount_0: function () {
return this.getTimelinesCount_1(this.objects);
},
getObjects_0: function () {
return this.objects;
},
},
"GT1487",
[]
);
GT1487.prototype.getTimelinesCount_1 = function (a) {
for (var b = 0, d = 0; d < a.size_0(); d++) {
var e = a.get_1(d);
instanceOf(e, GT1605) && (b += 1 + this.getTimelinesCount_1(e.getChildren_0()));
}
return b;
};
GT1487.prototype.getTweensCount_1 = function (a) {
for (var b = 0, d = 0; d < a.size_0(); d++) var e = a.get_1(d), b = instanceOf(e, GT1647) ? b + 1 : b + this.getTweensCount_1(e.getChildren_0());
return b;
};
GT1487.prototype.setAutoStart_2 = function (a, b) {
a.isAutoStartEnabled = b;
};
GT1487.prototype.setAutoRemove_2 = function (a, b) {
a.isAutoRemoveEnabled = b;
};
var GT1557 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
},
"GT1557",
[]
);
GT1557.prototype.linear = new GT1485();
GT1557.prototype.catmullRom = new GT1281();
var GT1590 = GT1653.extend(
{
initialConstructor_0: function () {
GT1653.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
GT1653.prototype.initialConstructor_2.call(this, a, b);
},
create_0: function () {
return new GT1647();
},
},
"GT1590",
[]
),
GT1234 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
onPool_1: function (a) {
a.reset_0();
},
onUnPool_1: function (a) {
a.reset_0();
},
},
"GT1234",
[GT1603]
),
GT1558 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
},
"GT1558",
[]
);
GT1558.prototype.parseEasing_1 = function (a) {
null == GT1558.prototype.easings &&
(GT1558.prototype.easings = [
GT1282.prototype.INOUT,
GT1382.prototype.IN,
GT1382.prototype.OUT,
GT1382.prototype.INOUT,
GT1330.prototype.IN,
GT1330.prototype.OUT,
GT1330.prototype.INOUT,
GT1331.prototype.IN,
GT1331.prototype.OUT,
GT1331.prototype.INOUT,
GT1332.prototype.IN,
GT1332.prototype.OUT,
GT1332.prototype.INOUT,
GT1383.prototype.IN,
GT1383.prototype.OUT,
GT1383.prototype.INOUT,
GT1384.prototype.IN,
GT1384.prototype.OUT,
GT1384.prototype.INOUT,
GT1385.prototype.IN,
GT1385.prototype.OUT,
GT1385.prototype.INOUT,
GT1386.prototype.IN,
GT1386.prototype.OUT,
GT1386.prototype.INOUT,
GT1283.prototype.IN,
GT1283.prototype.OUT,
GT1283.prototype.INOUT,
GT1235.prototype.IN,
GT1235.prototype.OUT,
GT1235.prototype.INOUT,
]);
for (var b = 0; b < GT1558.prototype.easings.length; b++) if (a.equals_1(GT1558.prototype.easings[b].toString())) return GT1558.prototype.easings[b];
return null;
};
GT1558.prototype.easings = null;
var GT553 = Class.extend(
{
initialConstructor_0: function () {
this.measurement = this.casinoapplet = null;
this.flushinterval = 0;
this.collectedevents = null;
this.didPayinFullStake = this.didPlay = this.didWatch = !1;
this.gameVariationName = this.playerID = this.usedMachineNumbers = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.measurement = this.casinoapplet = null;
this.flushinterval = 0;
this.collectedevents = null;
this.didPayinFullStake = this.didPlay = this.didWatch = !1;
this.gameVariationName = this.playerID = this.usedMachineNumbers = null;
this.casinoapplet = a;
this.measurement = new GT1333(a, a.getParameter_1("omnitureserver"), a.getParameter_1("omnitureaccount"));
this.flushinterval = a.getIntParameter_2("omnitureinterval", GT553.prototype.DEFAULTFLUSHINTERVAL);
this.collectedevents = new java_util_JavaScriptVector();
this.didPayinFullStake = this.didPlay = this.didWatch = !1;
this.usedMachineNumbers = new java_util_JavaScriptVector();
this.playerID = a.getPlayerID_0();
this.gameVariationName = null;
this.casinoapplet.getEventDispatcher_0().registerHandler_2(GT1387.prototype.BUTTON_CLICKED, this);
this.addOmnitureEvent_1(1);
this.addOmnitureEvent_1(2);
},
close_0: function () {
null != this.gameVariationName && this.flush_0();
this.casinoapplet.getEventDispatcher_0().unregisterHandler_1(this);
this.measurement = this.casinoapplet = null;
},
addOmnitureEvent_1: function (a) {
this.collectedevents.size_0() <= a && this.collectedevents.setSize_1(a + 1);
var b = this.collectedevents.elementAt_1(a);
null == b && (b = new Integer(0));
this.collectedevents.setElementAt_2(new Integer(b.intValue_0() + 1), a);
},
flush_0: function () {
var a = new java_util_JavaScriptVector();
a.setSize_1(60);
a.setElementAt_2("" + this.flushinterval, 50);
a.setElementAt_2(this.didWatch ? (this.didPlay ? "PlayerAndWatcher" : "Watcher") : this.didPlay ? "Player" : "none", 51);
a.setElementAt_2(this.didPayinFullStake ? "FullStake" : "NotFullStake", 52);
for (var b = new StringBuffer(), d = 0; d < this.usedMachineNumbers.size_0(); d++) {
0 < b.length_0() && b.append_1(",");
var e = "" + this.usedMachineNumbers.elementAt_1(d);
b.append_1(e);
}
a.setElementAt_2(b.toString(), 53);
a.setElementAt_2(this.playerID, 54);
null != this.gameVariationName && a.setElementAt_2(this.gameVariationName, 55);
b = 76 < this.collectedevents.size_0() && null != this.collectedevents.elementAt_1(76) && 0 < this.collectedevents.elementAt_1(76).intValue_0();
d = 81 < this.collectedevents.size_0() && null != this.collectedevents.elementAt_1(81) && 0 < this.collectedevents.elementAt_1(81).intValue_0();
a.setElementAt_2((b ? "Lines" : "") + (b && d ? "," : "") + (d ? "Bets" : ""), 56);
a.setElementAt_2(0 == this.casinoapplet.getSessionCurrencySymbol_0().length_0() ? "VirtualGoods" : this.casinoapplet.getSessionCurrencySymbol_0(), 57);
this.measurement.track_3(this.collectedevents, a, a);
this.collectedevents.setSize_1(0);
this.didPayinFullStake = this.didPlay = this.didWatch = !1;
this.usedMachineNumbers.setSize_1(0);
},
handleButtonEvent_1: function (a) {
a = a.getSender_0();
if (instanceOf(a, GT1559)) {
var b = a.getApplicationID_0();
b == GT307.prototype.ACTION_BUYTICKETS
? this.addOmnitureEvent_1(50)
: b == GT307.prototype.ACTION_PAYIN
? this.addOmnitureEvent_1(51)
: b == GT307.prototype.ACTION_PAYINACCOUNT2
? this.addOmnitureEvent_1(52)
: b == GT307.prototype.ACTION_PAYINACCOUNT
? this.addOmnitureEvent_1(53)
: b == GT307.prototype.ACTION_ACCOUNT
? this.addOmnitureEvent_1(54)
: b == GT554.prototype.ACTION_BTNACCOUNT
? this.addOmnitureEvent_1(55)
: b == GT307.prototype.ACTION_HELP
? this.addOmnitureEvent_1(56)
: b == GT554.prototype.ACTION_BTNHELP
? this.addOmnitureEvent_1(57)
: b == GT554.prototype.ACTION_ENTERTABLE
? (this.addOmnitureEvent_1(58), (a = GT1672.prototype.stringToInt_1(a.getApplicationData_0().toString())), this.memorizeMachineNumber_1(a + 1))
: b == GT554.prototype.ACTION_PLAYNOW
? this.addOmnitureEvent_1(59)
: b == GT307.prototype.ACTION_LEAVETABLE
? this.addOmnitureEvent_1(60)
: b == GT554.prototype.ACTION_QUITPROGRAM
? this.addOmnitureEvent_1(61)
: b == GT554.prototype.ACTION_SOUND_ON || b == GT554.prototype.ACTION_SOUND_OFF
? this.addOmnitureEvent_1(62)
: b == GT307.prototype.ACTION_SOUNDON
? this.addOmnitureEvent_1(63)
: b == GT307.prototype.ACTION_SOUNDOFF
? this.addOmnitureEvent_1(63)
: b == GT307.prototype.ACTION_MUSICON
? this.addOmnitureEvent_1(64)
: b == GT307.prototype.ACTION_MUSICOFF
? this.addOmnitureEvent_1(64)
: b == GT554.prototype.ACTION_BTNFULLSCREEN
? this.addOmnitureEvent_1(65)
: b == GT307.prototype.ACTION_FULLSCREEN && this.addOmnitureEvent_1(66);
}
return !1;
},
run_0: function () {
null != this.casinoapplet && null != this.measurement && (this.flush_0(), this.casinoapplet.getTimer_0().triggerCallbackAfter_2(this, 1e3 * this.flushinterval));
},
memorizeDidWatch_0: function () {
this.didWatch = !0;
},
memorizeDidPlay_0: function () {
this.didPlay = !0;
},
memorizeDidPayinFullStake_0: function () {
this.didPayinFullStake = !0;
},
memorizeMachineNumber_1: function (a) {
a = new Integer(a);
0 > this.usedMachineNumbers.indexOf_1(a) && this.usedMachineNumbers.addElement_1(a);
},
memorizeGameVariationName_1: function (a) {
null != a && (null == this.gameVariationName && this.casinoapplet.getTimer_0().triggerCallbackAfter_2(this, 1), (this.gameVariationName = a));
},
},
"GT553",
[GT962, Runnable]
);
GT553.prototype.DEFAULTFLUSHINTERVAL = 60;
var GT761 = Class.extend(
{
initialConstructor_0: function () {
this.ticketsatstart = this.singlewin = this.losslimit = this.rounds = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_4: function (a, b, d, e) {
this.ticketsatstart = this.singlewin = this.losslimit = this.rounds = 0;
this.rounds = a;
this.losslimit = b;
this.singlewin = d;
this.ticketsatstart = e;
},
getRoundsLeft_0: function () {
return this.rounds;
},
decRounds_0: function () {
this.rounds--;
},
getLossLimit_0: function () {
return this.losslimit;
},
getSingleWinLimit_0: function () {
return this.singlewin;
},
getTicketsAtStart_0: function () {
return this.ticketsatstart;
},
},
"GT761",
[]
),
GT175 = Class.extend(
{
initialConstructor_0: function () {
this.applet = null;
this.assertOnScreenDiff = !1;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.applet = null;
this.assertOnScreenDiff = !1;
this.applet = a;
this.assertOnScreenDiff = b;
},
notifyEvent_1: function (a) {
if (instanceOf(a, GT650)) this.applet.getEventDispatcher_0().raiseEvent_1(a.createMouseEvent_0());
else if (instanceOf(a, GT406)) this.applet.getEventDispatcher_0().raiseEvent_1(a.createMouseWheelEvent_0());
else if (instanceOf(a, GT651)) this.applet.getEventDispatcher_0().raiseEvent_1(a.createTouchEvent_0());
else if (instanceOf(a, GT407)) this.applet.keyPressed_3(null, a.getKeyname_0(), a.getModifiers_0());
else if (instanceOf(a, GT309)) this.applet.getConnection_0().processPackets_1(a.getPackets_0());
else if (instanceOf(a, GT338)) {
var b = a.getKey_0();
a = a.getValue_0();
this.applet.setProperty_2(b, a);
} else if (instanceOf(a, GT293)) (b = a.getWrapperEvent_0()), (a = this.applet.getGameWrapperInterface_0()), instanceOf(a, GT600) && a.fireActionImpl_1(b);
else if (instanceOf(a, GT408) && this.assertOnScreenDiff) {
b = this.applet.getScreenShot_0();
a = a.getImageData_0();
for (var d = 0; d < b.length; d++) b[d] != a[d] && GT1650.prototype.assertExp_2(!1, "Screenshots not matching");
}
},
notifyFinished_2: function (a, b) {
this.applet.getEventDispatcher_0().raiseEvent_1(new GT555(a, b));
},
},
"GT175",
[GT365]
),
GT409 = Class.extend({ initialConstructor_0: function () {} }, "GT409", []),
GT207 = GT409.extend(
{
initialConstructor_0: function () {
this.applet = null;
GT409.prototype.initialConstructor_0.call(this);
},
setApplet_1: function (a) {
this.applet = a;
},
showExitButtonInPayInDialog_0: function () {
return null != this.applet && (!this.applet.hasOpenSession_0() || (this.applet.getTickets_0() < this.applet.getMinBuyIn_EuroCent_0() && this.applet.hasTooLittleMoneyToPlay_0())) ? !0 : !1;
},
checkCustomPayInDialogCondition_0: function () {
return !1;
},
},
"GT207",
[]
),
GT706 = Class.extend(
{
initialConstructor_0: function () {
this.oldnumplayers = this.numplayers = 0;
this.payouttext = this.tableindex = this.nicknames = this.address = this.snapshot = null;
this.useSpinAnim = this.useSwitchAnim = !1;
this.numplayers = this.listpos = this.lastframe = this.timeOfLastTableInfo = 0;
this.address = this.nicknames = this.snapshot = "";
this.lastframe = 0;
},
getLastPayout_0: function () {
for (var a = GT1677.prototype.tokenize_2(this.snapshot, ","), b = 0; b < a.length; b++) if (76 == a[b].charAt_1(0)) return a[b].substring_1(1);
return "";
},
getLastPayoutTime_0: function () {
for (var a = GT1677.prototype.tokenize_2(this.snapshot, ","), b = 0; b < a.length; b++) if (84 == a[b].charAt_1(0)) return GT1672.prototype.stringToInt_1(a[b].substring_1(1));
return 0;
},
hasWinningUser_0: function () {
return 0 <= this.snapshot.indexOf_1("W,");
},
getBetLevel_1: function (a) {
var b = this.snapshot.indexOf_1("B");
if (0 > b) return 0;
b = this.snapshot.charAt_1(b + 1) - 48;
return b >= a ? a - 1 : b;
},
},
"GT706",
[]
),
GT1121 = Class.extend(
{
initialConstructor_0: function () {
GT1650.prototype.assertExp_2(!1, "static class - do not instanciate or subclass");
},
},
"GT1121",
[]
);
GT1121.prototype.STARTROOMINFO = 1;
GT1121.prototype.FINISHROOMINFO = 2;
GT1121.prototype.TABLEINFO = 3;
GT1121.prototype.GAMESTATE = 6;
GT1121.prototype.PLAYERATTRIBUTES = 7;
GT1121.prototype.SERVERVERSION = 8;
GT1121.prototype.UPDATETABLE = 9;
GT1121.prototype.JACKPOTFACTOR = 10;
GT1121.prototype.ROOMATTRIBUTES = 11;
GT1121.prototype.CURRENCYSYMBOLS = 12;
GT1121.prototype.ROUNDHISTORY = 13;
GT1121.prototype.TIMESTAMPFORSTEP = 14;
GT1121.prototype.DEMOMODEGAMECHANGE = 15;
GT1121.prototype.CLIENTDATA = 16;
GT1121.prototype.GAMEACTIONDATA = 17;
GT1121.prototype.ENTERTABLE = 33;
GT1121.prototype.SUBROOMINFO = 34;
GT1121.prototype.SUBROOMUPDATE = 35;
GT1121.prototype.JACKPOTFACTOR_MULTI = 36;
GT1121.prototype.SERVER_RESPONSETIME = 37;
GT1121.prototype.SHOW_SESSIONSETTINGS_DIALOG = 38;
GT1121.prototype.SHOW_RESPONSIBLE_GAMING_INFO = 39;
GT1121.prototype.SUBROOM_TABLEINFO = 40;
GT1121.prototype.START_GAMESTATE = 41;
GT1121.prototype.END_GAMESTATE = 48;
GT1121.prototype.PART_GAMESTATE = 49;
GT1121.prototype.START_ROUNDHISTORY = 42;
GT1121.prototype.END_ROUNDHISTORY = 43;
GT1121.prototype.PART_ROUNDHISTORY = 44;
var GT814 = Class.extend(
{
initialConstructor_0: function () {
this.symbolToCode = this.codeToSymbol = null;
this.codeToSymbol = new java_util_JavaScriptHashtable();
this.symbolToCode = new java_util_JavaScriptHashtable();
},
add_2: function (a, b) {
0 < a.length_0() && 0 < b.length_0() && (this.codeToSymbol.put_2(a, b), this.symbolToCode.put_2(b, a));
},
getSymbol_1: function (a) {
var b = this.codeToSymbol.get_1(a);
return null != b ? b : a;
},
getCode_1: function (a) {
var b = this.symbolToCode.get_1(a);
return null != b ? b : a;
},
},
"GT814",
[]
),
GT968 = Class.extend(
{
initialConstructor_0: function () {
this.applet = null;
this.orientation = 0;
this.screenRotationPossible = !1;
this.orientationSensorManager = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.applet = null;
this.orientation = 0;
this.screenRotationPossible = !1;
this.orientationSensorManager = null;
this.applet = a;
this.screenRotationPossible = !0;
},
getOrientation_0: function () {
return this.orientation;
},
setOrientation_1: function (a) {
this.orientation = a;
},
isScreenRotationPossible_0: function () {
return this.screenRotationPossible;
},
setScreenRotationPossible_1: function (a) {
(this.screenRotationPossible = a) && this.applet.getTimer_0().triggerCallbackAfter_2(new GT556(this.applet), 1);
},
setOrientationSensorManager_1: function (a) {
this.orientationSensorManager = a;
},
getOrientationSensorManager_0: function () {
return this.orientationSensorManager;
},
},
"GT968",
[]
),
GT556 = Class.extend(
{
initialConstructor_0: function () {
this.applet = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.applet = null;
this.applet = a;
},
run_0: function () {
this.applet.switchLayout_0();
},
},
"GT556",
[Runnable]
),
GT457 = Class.extend(
{
initialConstructor_0: function () {
this.timer = this.moveAnim = this.cntSubRooms = this.cntTablesPrev = this.cntTablesNext = this.cntTables = this.disp = this.cntLobby = null;
this.tablesY = this.tablesX_prev = this.tablesX_next = this.tablesX = 0;
this.tablesPrev = this.tablesNext = null;
this.isLastSubRoom = this.isFirstSubRoom = !1;
this.myroomid = 0;
this.connection = null;
this.blockEvents = !1;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_4: function (a, b, d, e) {
this.timer = this.moveAnim = this.cntSubRooms = this.cntTablesPrev = this.cntTablesNext = this.cntTables = this.disp = this.cntLobby = null;
this.tablesY = this.tablesX_prev = this.tablesX_next = this.tablesX = 0;
this.tablesPrev = this.tablesNext = null;
this.isLastSubRoom = this.isFirstSubRoom = !1;
this.myroomid = 0;
this.connection = null;
this.blockEvents = !1;
this.cntLobby = a;
this.disp = b;
this.timer = d;
this.connection = e;
},
init_3: function (a, b, d) {
this.disp.registerHandler_2(GT1387.prototype.BUTTON_CLICKED, this);
this.disp.registerHandler_2(GT1371.prototype.SCREENSIZE_CHANGED, this);
this.disp.registerHandler_2(GT969.prototype.ID, this);
this.disp.registerHandler_2(GT926.prototype.ID, this);
this.disp.registerHandler_2(GT458.prototype.ID, this);
this.disp.registerHandler_2(GT652.prototype.ID, this);
this.disp.registerHandler_2(GT459.prototype.ID, this);
this.cntTables = this.cntLobby.findDescendant_1(GT554.prototype.ID_CONTAINER_TABLEVIEW);
this.cntSubRooms = this.cntLobby.findDescendant_1(GT554.prototype.ID_CONTAINER_SUBROOMVIEW);
this.tablesX = this.cntTables.getX_0();
this.tablesY = this.cntTables.getY_0();
this.cntTablesNext = this.cntLobby.findDescendant_1(GT366.prototype.ID_TABLES_NEXT);
this.cntTablesNext.setAllButtonsActive_1(!1);
this.tablesNext = new java_util_JavaScriptVector();
for (var e = 0; 18 > e; e++) {
var f = new GT706();
f.tableindex = new Integer(e);
f.numplayers = 0;
f.address = "";
this.tablesNext.addElement_1(f);
}
this.cntTablesNext.attachTablesVector_1(this.tablesNext);
this.cntTablesNext.updateAllVisibleItems_0();
this.tablesX_next = this.cntTablesNext.getX_0();
this.cntTablesPrev = this.cntLobby.findDescendant_1(GT366.prototype.ID_TABLES_PREV);
this.cntTablesPrev.setAllButtonsActive_1(!1);
this.tablesPrev = new java_util_JavaScriptVector();
for (e = 0; 18 > e; e++) (f = new GT706()), (f.tableindex = new Integer(e)), (f.numplayers = 0), (f.address = ""), this.tablesPrev.addElement_1(f);
this.cntTablesPrev.attachTablesVector_1(this.tablesPrev);
this.cntTablesPrev.updateAllVisibleItems_0();
this.tablesX_prev = this.cntTablesPrev.getX_0();
this.myroomid = d;
this.isFirstSubRoom = a;
this.isLastSubRoom = b;
this.isFirstSubRoom || this.connection.sendPacket_1(GT1388.prototype.composePacket_2(GT1122.prototype.SUBROOM_TABLES, ["" + (this.myroomid - 1)]));
this.isLastSubRoom || this.connection.sendPacket_1(GT1388.prototype.composePacket_2(GT1122.prototype.SUBROOM_TABLES, ["" + (this.myroomid + 1)]));
this.blockEvents = !1;
},
reset_0: function () {
this.cntTables.move_2(this.tablesX, this.tablesY);
this.cntTablesNext.move_2(this.tablesX_next, this.tablesY);
this.cntTablesPrev.move_2(this.tablesX_prev, this.tablesY);
this.blockEvents = !1;
},
updateSwipeFeature_3: function (a, b, d) {
this.isFirstSubRoom = a;
this.isLastSubRoom = b;
this.myroomid = d;
this.isFirstSubRoom || this.connection.sendPacket_1(GT1388.prototype.composePacket_2(GT1122.prototype.SUBROOM_TABLES, ["" + (this.myroomid - 1)]));
this.isLastSubRoom || this.connection.sendPacket_1(GT1388.prototype.composePacket_2(GT1122.prototype.SUBROOM_TABLES, ["" + (this.myroomid + 1)]));
},
switchToSubRoom_1: function (a) {
if (!(0 > a)) {
this.blockEvents = !0;
var b = this.cntTables.getAdapter_0().getListElements_0();
b.setSize_1(0);
if (a == this.myroomid + 1) for (var d = 0; d < this.tablesNext.size_0(); d++) b.addElement_1(this.tablesNext.elementAt_1(d));
else if (a == this.myroomid - 1) for (d = 0; d < this.tablesPrev.size_0(); d++) b.addElement_1(this.tablesPrev.elementAt_1(d));
this.connection.sendPacket_1(GT1388.prototype.composePacket_2(GT1122.prototype.SELECTSUBROOM, ["" + a, "0"]));
this.connection.sendPacket_1(GT1388.prototype.composePacket_2(GT1122.prototype.SUBROOM_TABLES, ["" + a]));
this.cntTables.setAllButtonsActive_1(!1);
a = this.cntLobby.findDescendant_1(GT554.prototype.ACTION_PLAYNOW);
GT1560.prototype.isAlive_1(a) && a.setActive_1(!1);
this.cntSubRooms.setAllButtonsActive_2(!1, !0);
}
},
receivedTables_2: function (a, b) {
var d = GT1672.prototype.stringToInt_1(a[0]);
if (d == this.myroomid) {
this.cntTables.updateViewToNewData_1(!1);
for (var e = this.cntTables.getAdapter_0().getListElements_0(), d = 1, f = 0; f < e.size_0() && d + 4 < a.length; f++) {
var g = e.elementAt_1(f);
1 < a.length && ((g.oldnumplayers = g.numplayers), (g.numplayers = GT1672.prototype.stringToInt_1(a[d + 1])));
g.snapshot = a[d + 2];
g.address = a[d + 3];
b && (g.nicknames = a[d + 4]);
d += 5;
}
this.reset_0();
this.cntTables.updateAllVisibleItems_0();
this.cntTables.setAllButtonsActive_1(!0);
e = this.cntLobby.findDescendant_1(GT554.prototype.ACTION_PLAYNOW);
GT1560.prototype.isAlive_1(e) && e.setActive_1(!0);
} else {
e = null;
d == this.myroomid + 1 ? (e = this.tablesNext) : d == this.myroomid - 1 && (e = this.tablesPrev);
if (null != e)
for (e.setSize_1(0), f = 1; f + 4 < a.length; f += 5)
(g = new GT706()),
(g.tableindex = new Integer(e.size_0())),
(g.listpos = e.size_0()),
(g.numplayers = GT1672.prototype.stringToInt_1(a[f + 1])),
(g.snapshot = a[f + 2]),
(g.address = a[f + 3]),
(g.nicknames = a[f + 4]),
e.addElement_1(g);
d == this.myroomid + 1
? (this.cntTablesNext.updateViewToNewData_1(!1), this.cntTablesNext.setAllButtonsActive_1(!1))
: d == this.myroomid - 1 && (this.cntTablesPrev.updateViewToNewData_1(!1), this.cntTablesPrev.setAllButtonsActive_1(!1));
}
},
destroy_0: function () {
this.disp.unregisterHandler_1(this);
},
handleButtonEvent_1: function (a) {
return a.getId_0() == GT1387.prototype.BUTTON_CLICKED && ((a = a.getSender_0()), a.getApplicationID_0() == GT366.prototype.ID_BUTTON_MENU)
? ((a = a.getParent_0().getParent_0().findDescendant_1(GT366.prototype.ID_CONTAINER_MENU)), GT1560.prototype.isAlive_1(a) && a.hide_1(!a.isHidden_0()), !0)
: !1;
},
handleScreenEvent_1: function (a) {
this.alignContainers_2(a.getVisibleAreaX_0(), a.getVisibleAreaWidth_0());
return !1;
},
alignContainers_2: function (a, b) {
var d = this.cntLobby.findDescendant_1(GT366.prototype.ID_CONTAINER_RIGHTALIGN);
GT1560.prototype.isAlive_1(d) && d.move_2(a + b - d.getWidth_0(), d.getY_0());
},
handleGestureEvent_1: function (a) {
if ((null != this.moveAnim && this.moveAnim.isRunning_0()) || this.blockEvents) return !1;
if (a.getId_0() == GT969.prototype.ID) {
if (this.cntLobby.isAbsPositionInside_2(a.getDownEvent_0().getX_0(), a.getDownEvent_0().getY_0())) {
var b = Math.abs_1(a.getUpEvent_0().getX_0() - a.getDownEvent_0().getX_0()),
d = a.getVelocityX_0();
java_lang_System.prototype.out.println_1(b);
java_lang_System.prototype.out.println_1(d);
if (-1e3 > d && 200 < b && !this.isLastSubRoom)
return (
this.switchToSubRoom_1(this.myroomid + 1),
(this.moveAnim = new GT653(this.timer, this.cntTables, this.tablesX_prev, this.tablesY, 300, !0)),
this.moveAnim.start_0(),
new GT653(this.timer, this.cntTablesNext, this.tablesX, this.tablesY, 300, !0).start_0(),
new GT653(this.timer, this.cntTablesPrev, this.tablesX_prev - this.cntTablesPrev.getWidth_0(), this.tablesY, 300, !0).start_0(),
!0
);
1e3 < a.getVelocityX_0() &&
200 < b &&
!this.isFirstSubRoom &&
(this.switchToSubRoom_1(this.myroomid - 1),
(this.moveAnim = new GT653(this.timer, this.cntTables, this.tablesX_next, this.tablesY, 300, !0)),
this.moveAnim.start_0(),
new GT653(this.timer, this.cntTablesPrev, this.tablesX, this.tablesY, 300, !0).start_0(),
new GT653(this.timer, this.cntTablesNext, this.tablesX_next + this.cntTablesNext.getWidth_0(), this.tablesY, 300, !0).start_0());
}
} else {
if (a.getId_0() == GT926.prototype.ID || a.getId_0() == GT458.prototype.ID)
return (
a.isLastEvent_0()
? this.cntTables.getX_0() - a.getDistanceX_0() <= this.tablesX && Math.abs_1(this.cntTablesNext.getX_0() - this.tablesX) < Math.div(this.cntTablesNext.getWidth_0(), 2)
? (this.switchToSubRoom_1(this.myroomid + 1),
(this.moveAnim = new GT653(this.timer, this.cntTables, this.tablesX_prev, this.tablesY, 400, !0)),
this.moveAnim.start_0(),
new GT653(this.timer, this.cntTablesNext, this.tablesX, this.tablesY, 400, !0).start_0())
: this.cntTables.getX_0() - a.getDistanceX_0() >= this.tablesX && Math.abs_1(this.cntTablesPrev.getX_0() - this.tablesX) < Math.div(this.cntTablesPrev.getWidth_0(), 2)
? (this.switchToSubRoom_1(this.myroomid - 1),
(this.moveAnim = new GT653(this.timer, this.cntTables, this.tablesX_next, this.tablesY, 400, !0)),
this.moveAnim.start_0(),
new GT653(this.timer, this.cntTablesPrev, this.tablesX, this.tablesY, 400, !0).start_0())
: ((this.moveAnim = new GT653(this.timer, this.cntTables, this.tablesX, this.tablesY, 400, !0)),
this.moveAnim.start_0(),
new GT653(this.timer, this.cntTablesNext, this.tablesX_next, this.tablesY, 400, !0).start_0(),
new GT653(this.timer, this.cntTablesPrev, this.tablesX_prev, this.tablesY, 400, !0).start_0())
: ((b = this.cntTablesNext.getX_0() - this.cntTables.getX_0()),
(d = this.cntTables.getX_0() - this.cntTablesPrev.getX_0()),
this.cntTables.getX_0() - a.getDistanceX_0() >= this.tablesX + 50 && this.isFirstSubRoom
? this.cntTables.move_2(this.tablesX + 50, this.tablesY)
: this.cntTables.getX_0() - a.getDistanceX_0() <= this.tablesX - 50 && this.isLastSubRoom
? this.cntTables.move_2(this.tablesX - 50, this.tablesY)
: this.cntTables.move_2(this.cntTables.getX_0() - a.getDistanceX_0(), this.tablesY),
this.cntTablesNext.move_2(this.cntTables.getX_0() + b, this.tablesY),
this.cntTablesPrev.move_2(this.cntTables.getX_0() - d, this.tablesY)),
!0
);
a.getId_0();
}
return !1;
},
},
"GT457",
[GT962, GT961, GT920]
),
GT460 = Class.extend(
{
initialConstructor_0: function () {
this.timer = this.moveAnim = this.cntIntro = this.disp = null;
this.currentIntroPage = 0;
this.timeoutfinishedCallback = this.introTimeoutCallback = this.animVisCurrentPageNr = null;
this.timeout = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_5: function (a, b, d, e, f) {
this.timer = this.moveAnim = this.cntIntro = this.disp = null;
this.currentIntroPage = 0;
this.timeoutfinishedCallback = this.introTimeoutCallback = this.animVisCurrentPageNr = null;
this.timeout = 0;
this.disp = a;
this.timer = d;
this.cntIntro = b;
this.introTimeoutCallback = e;
this.timeout = f;
},
create_0: function () {
this.disp.registerHandler_2(GT969.prototype.ID, this);
this.disp.registerHandler_2(GT926.prototype.ID, this);
this.disp.registerHandler_2(GT458.prototype.ID, this);
this.disp.registerHandler_4(GT652.prototype.ID, null, this, -1);
this.disp.registerHandler_2(GT1387.prototype.BUTTON_CLICKED, this);
this.disp.registerHandler_2(GT1532.prototype.KEY_PRESS, this);
this.showFirstIntroPage_0();
for (var a = this.cntIntro.findDescendant_1(GT554.prototype.ID_INFOPAGES_INDICATOR), b = a.getChildCount_0() - 1; b > 2 * this.countIntroPages_0() - 1 && 0 <= b; b--) a.getChild_1(b).destroy_0();
a.reflow_0();
this.updateIndicator_0();
this.timeoutfinishedCallback = new GT267(this);
this.timer.triggerCallbackAfter_2(this.timeoutfinishedCallback, this.timeout);
},
destroy_0: function () {
this.disp.unregisterHandler_1(this);
this.disp = null;
},
handleGestureEvent_1: function (a) {
if (null != this.moveAnim && this.moveAnim.isRunning_0()) return !1;
this.resetTimeout_0();
if (a.getId_0() == GT969.prototype.ID) {
if (!this.cntIntro.isHidden_0()) {
var b = this.countIntroPages_0();
if (this.cntIntro.isAbsPositionInside_2(a.getDownEvent_0().getX_0(), a.getDownEvent_0().getY_0())) {
var d = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0()),
e = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() + 1),
f = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() - 1);
null == e && 1 < b && (e = this.getIntroPageByIdx_1(0));
null != e && e.hide_1(!1);
null == f && 1 < b && (f = this.getIntroPageByIdx_1(b - 1));
null != f && f.hide_1(!1);
if (0 > a.getVelocityX_0() && null != e)
return (
e.getX_0() < d.getWidth_0() && this.incCurrentIntroPage_0(),
this.updateIndicator_0(),
(this.moveAnim = new GT653(this.timer, d, -d.getWidth_0(), 0, 300)),
this.moveAnim.start_0(),
e.move_2(d.getX_0() + d.getWidth_0(), d.getY_0()),
new GT653(this.timer, e, 0, 0, 300).start_0(),
null != f && f != e && new GT653(this.timer, f, -d.getWidth_0() - f.getWidth_0(), 0, 300).start_0(),
!0
);
if (0 < a.getVelocityX_0() && null != f)
return (
f.getX_0() > -f.getWidth_0() && this.decCurrentIntroPage_0(),
this.updateIndicator_0(),
(this.moveAnim = new GT653(this.timer, d, f.getWidth_0(), 0, 300)),
this.moveAnim.start_0(),
f.move_2(d.getX_0() - f.getWidth_0(), d.getY_0()),
new GT653(this.timer, f, 0, 0, 300).start_0(),
null != e && e != f && new GT653(this.timer, e, f.getWidth_0() + d.getWidth_0(), 0, 300).start_0(),
!0
);
}
}
} else if (a.getId_0() == GT926.prototype.ID || a.getId_0() == GT458.prototype.ID) {
if (!this.cntIntro.isHidden_0())
return (
(b = this.countIntroPages_0()),
(d = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0())),
(e = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() + 1)),
(f = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() - 1)),
null == e && 1 < b && (e = this.getIntroPageByIdx_1(0)),
null == f && 1 < b && (f = this.getIntroPageByIdx_1(b - 1)),
null != e && (e.hide_1(!1), (0 >= d.getX_0() - a.getDistanceX_0() || f != e) && e.move_2(d.getX_0() + d.getWidth_0(), d.getY_0())),
null != f && (f.hide_1(!1), (0 <= d.getX_0() - a.getDistanceX_0() || f != e) && f.move_2(d.getX_0() - f.getWidth_0(), d.getY_0())),
a.isLastEvent_0()
? Math.abs_1(d.getX_0()) < Math.div(d.getWidth_0(), 2)
? ((this.moveAnim = new GT653(this.timer, d, 0, 0, 200)),
this.moveAnim.start_0(),
null != e && 0 > d.getX_0() && new GT653(this.timer, e, d.getWidth_0(), 0, 200).start_0(),
null != f && 0 < d.getX_0() && new GT653(this.timer, f, -f.getWidth_0(), 0, 200).start_0())
: null != e && 0 >= d.getX_0() - a.getDistanceX_0() && e.getX_0() < Math.div(e.getWidth_0(), 2)
? ((e.getX_0() < e.getWidth_0() || 2 < b) && this.incCurrentIntroPage_0(),
this.updateIndicator_0(),
(this.moveAnim = new GT653(this.timer, d, -d.getWidth_0(), 0, 200)),
this.moveAnim.start_0(),
new GT653(this.timer, e, 0, 0, 200).start_0(),
null != f && f != e && new GT653(this.timer, f, -d.getWidth_0() - f.getWidth_0(), 0, 200).start_0())
: null != f &&
0 <= d.getX_0() - a.getDistanceX_0() &&
f.getX_0() < Math.div(-f.getWidth_0(), 2) &&
((f.getX_0() > -f.getWidth_0() || 2 < b) && this.decCurrentIntroPage_0(),
this.updateIndicator_0(),
(this.moveAnim = new GT653(this.timer, d, f.getWidth_0(), 0, 200)),
this.moveAnim.start_0(),
new GT653(this.timer, f, 0, 0, 200).start_0(),
null != e && e != f && new GT653(this.timer, e, f.getWidth_0() + d.getWidth_0(), 0, 200).start_0())
: ((0 <= d.getX_0() - a.getDistanceX_0() && null == f) || (0 >= d.getX_0() - a.getDistanceX_0() && null == e) ? d.move_2(0, 0) : d.move_2(d.getX_0() - a.getDistanceX_0(), d.getY_0()),
(d.getX_0() > d.getWidth_0() || d.getX_0() < -d.getWidth_0()) && d.move_2(d.getX_0() > d.getWidth_0() ? d.getWidth_0() : -d.getWidth_0(), d.getY_0()),
null != e && 0 >= d.getX_0() - a.getDistanceX_0() && e.move_2(d.getX_0() + d.getWidth_0(), d.getY_0()),
null != f && 0 <= d.getX_0() - a.getDistanceX_0() && f.move_2(d.getX_0() - f.getWidth_0(), d.getY_0())),
!0
);
} else
a.getId_0() != GT652.prototype.ID ||
this.cntIntro.isHidden_0() ||
((b = this.countIntroPages_0()),
(d = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0())),
(e = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() + 1)),
(f = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() - 1)),
null == e && 1 < b && (e = this.getIntroPageByIdx_1(0)),
null == f && 1 < b && (f = this.getIntroPageByIdx_1(b - 1)),
null != e && e.hide_1(!1),
null != f && f.hide_1(!1),
(this.moveAnim = new GT653(this.timer, d, 0, 0, 200)),
this.moveAnim.start_0(),
null != e && (0 > d.getX_0() ? new GT653(this.timer, e, d.getWidth_0(), 0, 200).start_0() : e != f && e.hide_1(!0)),
null != f && (0 < d.getX_0() ? new GT653(this.timer, f, -f.getWidth_0(), 0, 200).start_0() : e != f && f.hide_1(!0)));
return !1;
},
moveToNextPage_0: function () {
var a = this.countIntroPages_0(),
b = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0()),
d = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() - 1),
e = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() + 1);
null == e && 1 < a && (e = this.getIntroPageByIdx_1(0));
null != e &&
(e.hide_1(!1),
e.move_2(b.getX_0() + b.getWidth_0(), b.getY_0()),
this.incCurrentIntroPage_0(),
this.updateIndicator_0(),
(this.moveAnim = new GT653(this.timer, b, -b.getWidth_0(), 0, 400)),
this.moveAnim.start_0(),
new GT653(this.timer, e, 0, 0, 400).start_0());
null == d && 1 < a && (d = this.getIntroPageByIdx_1(a - 1));
null != d && d != e && (d.hide_1(!1), d.move_2(b.getX_0() - d.getWidth_0(), b.getY_0()), new GT653(this.timer, d, -d.getWidth_0() - b.getWidth_0(), 0, 400).start_0());
},
moveToPrevPage_0: function () {
var a = this.countIntroPages_0(),
b = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0()),
d = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() - 1),
e = this.getIntroPageByIdx_1(this.getCurrentIntroPage_0() + 1);
null == d && 1 < a && (d = this.getIntroPageByIdx_1(a - 1));
null != d &&
(d.hide_1(!1),
d.move_2(b.getX_0() - d.getWidth_0(), b.getY_0()),
this.decCurrentIntroPage_0(),
this.updateIndicator_0(),
(this.moveAnim = new GT653(this.timer, b, d.getWidth_0(), 0, 400)),
this.moveAnim.start_0(),
new GT653(this.timer, d, 0, 0, 400).start_0());
null == e && 1 < a && (e = this.getIntroPageByIdx_1(0));
null != e && e != d && (e.hide_1(!1), e.move_2(b.getX_0() + e.getWidth_0(), b.getY_0()), new GT653(this.timer, e, d.getWidth_0() + b.getWidth_0(), 0, 400).start_0());
},
handleButtonEvent_1: function (a) {
a.getId_0() == GT1387.prototype.BUTTON_CLICKED &&
a.getSender_0().getApplicationID_0() == GT554.prototype.ID_INFOPAGES_CLOSE &&
(this.timer.removeCallback_2(this.timeoutfinishedCallback, !1), this.introTimeoutCallback.run_0());
if (null != this.moveAnim && this.moveAnim.isRunning_0()) return !1;
a.getId_0() == GT1387.prototype.BUTTON_CLICKED && a.getSender_0().getApplicationID_0() == GT554.prototype.ID_INFOPAGES_PREV && (this.moveToPrevPage_0(), this.resetTimeout_0());
a.getId_0() == GT1387.prototype.BUTTON_CLICKED && a.getSender_0().getApplicationID_0() == GT554.prototype.ID_INFOPAGES_NEXT && (this.moveToNextPage_0(), this.resetTimeout_0());
return !1;
},
handleKeyEvent_1: function (a) {
if (null != this.moveAnim && this.moveAnim.isRunning_0()) return !1;
a.getKeyName_0().equals_1("left") ? (this.moveToPrevPage_0(), this.resetTimeout_0()) : a.getKeyName_0().equals_1("right") && (this.moveToNextPage_0(), this.resetTimeout_0());
return !1;
},
showFirstIntroPage_0: function () {
var a = this.cntIntro.findDescendant_1(GT554.prototype.ID_INFOPAGES_CONTENT);
GT1560.prototype.isAlive_1(a) && ((this.currentIntroPage = 0), this.showPageOfIntro_2(a, this.currentIntroPage));
},
showNextIntroPage_0: function () {
var a = this.cntIntro.findDescendant_1(GT554.prototype.ID_INFOPAGES_CONTENT);
GT1560.prototype.isAlive_1(a) && (this.incCurrentIntroPage_0(), this.showPageOfIntro_2(a, this.currentIntroPage));
},
incCurrentIntroPage_0: function () {
this.currentIntroPage = (this.currentIntroPage + 1) % this.countIntroPages_0();
},
countIntroPages_0: function () {
var a = this.cntIntro.findDescendant_1(GT554.prototype.ID_INFOPAGES_CONTENT);
if (!GT1560.prototype.isAlive_1(a)) return 0;
for (var b = 0, d = 0; d < a.getChildCount_0(); d++) instanceOf(a.getChild_1(d), GT1437) && b++;
return b;
},
showPrevIntroPage_0: function () {
var a = this.cntIntro.findDescendant_1(GT554.prototype.ID_INFOPAGES_CONTENT);
GT1560.prototype.isAlive_1(a) && (this.decCurrentIntroPage_0(), this.showPageOfIntro_2(a, this.currentIntroPage));
},
decCurrentIntroPage_0: function () {
var a = this.countIntroPages_0();
this.currentIntroPage = (this.currentIntroPage - 1 + a) % a;
},
getCurrentIntroPage_0: function () {
return this.currentIntroPage;
},
getIntroPageByIdx_1: function (a) {
var b = this.cntIntro.findDescendant_1(GT554.prototype.ID_INFOPAGES_CONTENT);
if (!GT1560.prototype.isAlive_1(b) || 0 > a) return null;
for (var d = 0; d < b.getChildCount_0(); d++) {
var e = b.getChild_1(d);
if (instanceOf(e, GT1437)) {
if (0 == a) return e.hide_1(!1), e;
a--;
}
}
return null;
},
showPageOfIntro_2: function (a, b) {
if (!(0 > b)) {
for (var d = 0; d < a.getChildCount_0(); d++) {
var e = a.getChild_1(d);
e.hide_1(!0);
}
for (d = 0; d < a.getChildCount_0(); d++) {
e = a.getChild_1(d);
if (0 == b) {
e.hide_1(!1);
break;
}
b--;
}
}
},
updateIndicator_0: function () {
null != this.animVisCurrentPageNr && this.animVisCurrentPageNr.isRunning_0() && this.animVisCurrentPageNr.kill_0();
for (var a = this.getCurrentIntroPage_0(), b = this.cntIntro.findDescendant_1(GT554.prototype.ID_INFOPAGES_INDICATOR), d = 0, e = 0; e < b.getChildCount_0(); e++) {
var f = b.getChild_1(e);
instanceOf(f, GT1437) && 2 <= f.getChildCount_0() && (f.getChild_1(0).hide_1(d == a), f.getChild_1(1).hide_1(d != a), d++);
}
},
resetTimeout_0: function () {
this.timer.removeCallback_2(this.timeoutfinishedCallback, !1);
this.timer.triggerCallbackAfter_2(this.timeoutfinishedCallback, this.timeout);
},
triggerTimeoutFinished_0: function () {
0 == this.getIntroPageByIdx_1(this.getCurrentIntroPage_0()).getX_0() ? this.introTimeoutCallback.run_0() : this.resetTimeout_0();
},
},
"GT460",
[GT920, GT962, GT1114]
),
GT267 = Class.extend(
{
initialConstructor_0: function () {
this.intropageshandler = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.intropageshandler = null;
this.intropageshandler = a;
},
run_0: function () {
this.intropageshandler.triggerTimeoutFinished_0();
},
},
"GT267",
[Runnable]
),
GT410 = Class.extend(
{
initialConstructor_0: function () {
this.multiplier = null;
this.maxBet_orig = this.maxBet_eff = 0;
this.jackpotValueTexts = this.jackpotWins = null;
this.triggerProbabilitySet = !1;
this.maxBaseBet = this.maxBetMulti = this.minBetPrecise = 0;
this.overrideBaseBets = this.overrideLines = this.lines = this.betMultiplier = null;
this.currencyFactor = this.maxBet = this.minBet = this.independentSetting = 0;
this.forceIntegerWinsAndBet = !1;
this.allWinsGCD = 0;
this.jackpotwinsString = null;
this.jackpotContribution = 0;
this.showJackpotContribution = !1;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_13: function (a, b, d, e, f, g, k, m, n, p, q, r, t) {
this.multiplier = null;
this.maxBet_orig = this.maxBet_eff = 0;
this.jackpotValueTexts = this.jackpotWins = null;
this.triggerProbabilitySet = !1;
this.maxBaseBet = this.maxBetMulti = this.minBetPrecise = 0;
this.overrideBaseBets = this.overrideLines = this.lines = this.betMultiplier = null;
this.currencyFactor = this.maxBet = this.minBet = this.independentSetting = 0;
this.forceIntegerWinsAndBet = !1;
this.allWinsGCD = 0;
this.jackpotwinsString = null;
this.jackpotContribution = 0;
this.showJackpotContribution = !1;
this.jackpotWins = GT1678.prototype.deserializeList_1(q);
this.currencyFactor = m;
1 == this.currencyFactor && (this.currencyFactor = 100);
this.betMultiplier = a;
this.lines = b;
this.overrideLines = d;
this.overrideBaseBets = e;
this.independentSetting = f;
this.minBet = g;
this.maxBet = k;
this.forceIntegerWinsAndBet = n;
this.allWinsGCD = p;
this.jackpotwinsString = q;
this.jackpotContribution = r;
this.showJackpotContribution = t;
this.update_0();
},
determineValidMultiplier_3: function (a, b, d) {
if (null == d) return a;
for (var e = 0, f = 0; f < b.length; f++)
for (var g = 0; g < d.length; g++)
if (b[f] == d[g]) {
e++;
break;
}
for (var k = [].createArray(e).init(0), f = (e = 0); f < b.length; f++)
for (g = 0; g < d.length; g++)
if (b[f] == d[g]) {
k[e] = a[f];
e++;
break;
}
return k;
},
setProgressive_2: function (a, b) {
var d = this.getJackpots_1(a);
if (null == d) return !1;
for (var e = 0; e < d.length; e++) d[e].put_2("j", new Double(b * this.maxBet_orig));
return !0;
},
calculateJackpotWin_1: function (a) {
return this.calculateJackpotWin_3(GT1672.prototype.doubleToInt_1(this.maxBet_eff / this.maxBetMulti), this.maxBetMulti, a);
},
calculateJackpotWin_2: function (a, b) {
return this.calculateJackpotWin_4(GT1672.prototype.doubleToInt_1(this.maxBet_eff / this.maxBetMulti), this.maxBetMulti, a, b);
},
calculateJackpotWin_3: function (a, b, d) {
return this.calculateJackpotWin_4(a, b, d, this.getPercentage_1(0));
},
calculateJackpotWin_4: function (a, b, d, e) {
d = this.getJackpot_2(d, e);
return this.getJackpotWinFor_3(a, b, d);
},
getJackpotWinFor_3: function (a, b, d) {
if (null == d) return 0;
var e = d.get_1("s").booleanValue_0(),
f = d.get_1("b").doubleValue_0(),
g = d.get_1("p").doubleValue_0(),
k = d.get_1("t").doubleValue_0();
d = (100 * (null == d.get_1("j") ? 0 : d.get_1("j").doubleValue_0())) / this.currencyFactor;
var m = (100 * this.maxBet_orig) / this.currencyFactor;
return 0 < k ? f * this.minBetPrecise * GT1677.prototype.getRoundedValue_2(1 / k, 3) + d : Math.round_1((e ? a * b : a) * f + (g * a * b * d * 1) / m);
},
getJackpots_1: function (a) {
for (var b = 0, d = 0; d < this.jackpotWins.size_0(); d++) {
var e = this.jackpotWins.get_1(d),
f = e.get_1("n");
GT1677.prototype.equalsIgnoreCaseAZ_2(f, a) && b++;
}
if (0 == b) return null;
for (var g = [].createArray(b), d = (b = 0); d < this.jackpotWins.size_0(); d++) (e = this.jackpotWins.get_1(d)), (f = e.get_1("n")), GT1677.prototype.equalsIgnoreCaseAZ_2(f, a) && ((g[b] = e), b++);
return g;
},
getJackpot_2: function (a, b) {
for (var d = 0; d < this.jackpotWins.size_0(); d++) {
var e = this.jackpotWins.get_1(d),
f = e.get_1("n"),
g = e.get_1("p").doubleValue_0();
if (GT1677.prototype.equalsIgnoreCaseAZ_2(f, a) && g == b) return e;
}
if ("" == a) for (d = 0; d < this.jackpotWins.size_0(); d++) if (((e = this.jackpotWins.get_1(d)), e.get_1("p").doubleValue_0() == b)) return e;
return null;
},
getPercentage_1: function (a) {
if (a >= this.jackpotWins.size_0()) return 0;
for (var b = [].createArray(this.jackpotWins.size_0()).init(0), d = 0; d < this.jackpotWins.size_0(); d++) {
var e = this.jackpotWins.get_1(d);
b[d] = e.get_1("p").doubleValue_0();
}
GT1679.prototype.sortDoubleArray_2(b, !0);
return b[a];
},
getEffectiveMaxBet_0: function () {
return this.maxBet_eff;
},
setCurrencyFactor_1: function (a) {
this.currencyFactor = a;
1 == this.currencyFactor && (this.currencyFactor = 100);
this.update_0();
},
getContribution_0: function () {
return this.jackpotContribution;
},
isShowJackpotContribution_0: function () {
return this.showJackpotContribution;
},
update_0: function () {
this.minBetPrecise = (100 * this.minBet) / this.currencyFactor;
this.multiplier = this.determineValidMultiplier_3(this.betMultiplier, this.lines, this.overrideLines);
this.maxBetMulti = this.multiplier[0];
for (var a = this.multiplier[0], b = 1; b < this.multiplier.length; b++) this.multiplier[b] < a && (a = this.multiplier[b]), this.multiplier[b] > this.maxBetMulti && (this.maxBetMulti = this.multiplier[b]);
var b = GT1672.prototype.doubleToInt_1((100 * this.minBet) / this.currencyFactor),
d = GT1672.prototype.doubleToInt_1((100 * this.maxBet) / this.currencyFactor),
a = new GT707(b, d, this.independentSetting, this.maxBetMulti, a);
null != this.overrideBaseBets && a.setOverrideBets_1(this.overrideBaseBets);
this.forceIntegerWinsAndBet && a.setForceIntegerValues_1(Math.div(100, this.allWinsGCD));
a.calculatePossibeBaseBets_0();
a = a.getPossiblebets_0();
this.maxBet_orig = this.maxBet;
this.maxBet_eff = 0 == a.length ? 0 : this.maxBetMulti * a[a.length - 1];
},
calculateJackpotWin_5: function (a, b, d, e, f) {
return this.calculateJackpotWin_4(a, b, d, e);
},
generateJackpotValueTexts_1: function (a) {
var b = this.jackpotWins.clone_0();
GT1679.prototype.sortVector_3(b, new GT708(), !0);
this.jackpotValueTexts = new java_util_JavaScriptVector();
for (var d = !1, e = 0; e < b.size_0(); e++) {
var f = b.get_1(e);
f.get_1("n").equals_1("") || (d = !0);
}
for (var g = new java_util_JavaScriptVector(), e = 0; e < b.size_0(); e++)
if (((f = b.get_1(e)), (!g.contains_1(f.get_1("n")) && !f.get_1("n").equals_1("") && d) || (!g.contains_1(f.get_1("b") + "" + f.get_1("p")) && !d))) {
d ? g.add_1(f.get_1("n")) : g.add_1(f.get_1("b") + "" + f.get_1("p"));
var k = f.get_1("b").doubleValue_0(),
m = f.get_1("t").doubleValue_0();
0 >= m
? ((f = f.get_1("s").booleanValue_0()), (k = Integer.truncate_1(f ? k : Math.div(k, this.maxBetMulti))), 0 < k && this.jackpotValueTexts.addElement_1(new Integer(k)), (this.triggerProbabilitySet = !1))
: ((this.triggerProbabilitySet = !0),
(k = k * this.minBet * GT1677.prototype.getRoundedValue_2(1 / m, 3)),
(f = a.getPlayerAttribute_2("NATIVEJACKPOTCURRENCY", null)),
(m = GT1672.prototype.stringToDouble_1(a.getPlayerAttribute_2("NATIVEJACKPOTCURRENCYFACTOR", "100"))),
null == f &&
((f = "\u20ac"),
null != a.getSkinManager_0().getParameter_1("nativejackpotcurrencyid") &&
(a.getSkinManager_0().getParameter_1("nativejackpotcurrencyid").equals_1("3") && (f = "\u00a3"),
a.getSkinManager_0().getParameter_1("nativejackpotcurrencyid").equals_1("6") && (f = "Ft"),
a.getPlayerAttribute_2("CURRENCY", "").equals_1("") && ((f = ""), (m = 1 == this.currencyFactor ? this.currencyFactor : m)))),
0 < k && this.jackpotValueTexts.addElement_1(a.getCurrencyMoneyString_5(this.roundDouble_1(k), f, m, !1, !0)));
}
},
roundDouble_1: function (a) {
return Math.floor_1(a + 0.5);
},
getJackpotValueTexts_0: function () {
return this.jackpotValueTexts;
},
isTriggerProbabilitySet_0: function () {
return this.triggerProbabilitySet;
},
},
"GT410",
[GT698]
),
GT708 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
compare_2: function (a, b) {
var d = a.get_1("b").doubleValue_0(),
e = b.get_1("b").doubleValue_0();
return d < e ? -1 : d > e ? 1 : 0;
},
},
"GT708",
[java_util_Comparator]
),
GT294 = Class.extend(
{
initialConstructor_0: function () {
this.jackpotFactor = this.jackpotBaseWin = this.maxBet = 0;
this.updateforclient = !1;
this.maxBet_eff = this.maxLines = 0;
this.averagePayout = null;
this.payOnMinBet = 0;
this.multiplyByLines = !1;
this.percentages = null;
this.jackpotMinBet = this.currencyFactor = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_7: function (a, b, d, e, f, g, k) {
this.jackpotFactor = this.jackpotBaseWin = this.maxBet = 0;
this.updateforclient = !1;
this.maxBet_eff = this.maxLines = 0;
this.averagePayout = null;
this.payOnMinBet = 0;
this.multiplyByLines = !1;
this.percentages = null;
this.jackpotMinBet = this.currencyFactor = 0;
this.updateforclient = !1;
this.jackpotMinBet = b;
this.jackpotBaseWin = g;
this.jackpotFactor = k;
this.maxBet = 1;
b = 1 == f ? f : f / 100;
f = 1;
if (d) this.maxBet = e;
else
for (; f * b <= a; )
1 * f * b <= a && (this.maxBet = 1 * f),
2 * f * b <= a && (this.maxBet = 2 * f),
3 * f * b <= a && (this.maxBet = 3 * f),
4 * f * b <= a && (this.maxBet = 4 * f),
5 * f * b <= a && (this.maxBet = 5 * f),
8 * f * b <= a && (this.maxBet = 8 * f),
(f *= 10);
this.maxBet_eff = this.maxBet;
this.percentages = [1];
},
updateForClient_6: function (a, b, d, e, f, g) {
this.updateforclient = !0;
this.maxLines = f;
this.maxBet_eff = g;
this.averagePayout = a;
this.payOnMinBet = b;
this.multiplyByLines = d;
this.percentages = e;
},
setProgressive_2: function (a, b) {
this.jackpotFactor = b;
return !0;
},
calculateJackpotWin_1: function (a) {
return this.calculateJackpotWin_2(a, this.getPercentage_1(0));
},
calculateJackpotWin_2: function (a, b) {
for (var d = !1, e = 0; e < this.percentages.length; e++) this.percentages[e] == b && (d = !0);
return d
? this.updateforclient
? this.calculateJackpotWin_4(GT1672.prototype.doubleToInt_1(this.maxBet_eff / this.maxLines), this.maxLines, a, b)
: Math.round_1(this.maxBet * this.jackpotFactor * b) + this.maxBet * this.jackpotBaseWin
: 0;
},
calculateJackpotWin_3: function (a, b, d) {
return this.calculateJackpotWin_4(a, b, d, this.getPercentage_1(0));
},
getEffectiveMaxBet_0: function () {
return this.maxBet_eff;
},
calculateJackpotWin_4: function (a, b, d, e) {
return this.calculateJackpotWin_5(a, b, d, e, this.multiplyByLines);
},
calculateJackpotWin_5: function (a, b, d, e, f) {
b *= a;
if (0 < this.payOnMinBet) return Math.round_1(((100 * this.jackpotMinBet) / this.currencyFactor) * this.payOnMinBet) + this.maxBet * this.jackpotFactor;
if (null == this.percentages || null == this.averagePayout) return 0;
d = !1;
for (var g = 0, k = 0; k < this.percentages.length; k++) this.percentages[k] == e && ((d = !0), (g = this.averagePayout[k]));
return d ? b * this.jackpotFactor * e + g * (f ? b : a) : 0;
},
setCurrencyFactor_1: function (a) {
this.currencyFactor = a;
},
getPercentage_1: function (a) {
return a >= this.percentages.length ? 0 : this.percentages[a];
},
getContribution_0: function () {
return 0;
},
isShowJackpotContribution_0: function () {
return !1;
},
},
"GT294",
[GT698]
),
GT601 = Class.extend(
{
initialConstructor_0: function () {
this.payindialog = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.payindialog = null;
this.payindialog = a;
},
sliderValueChanged_1: function (a) {
this.payindialog.payInSliderValueChanged_0();
},
sliderDropped_1: function (a) {
this.payindialog.payInSliderDropped_0();
},
},
"GT601",
[GT1067]
),
GT557 = Class.extend(
{
initialConstructor_0: function () {
this.applet = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.applet = null;
this.applet = a;
},
sliderValueChanged_1: function (a) {
this.applet.replaySliderValueChanged_1(a.getValue_0());
},
sliderDropped_1: function (a) {
this.applet.replaySliderDropped_1(a.getValue_0());
},
},
"GT557",
[GT1067]
),
GT1122 = Class.extend(
{
initialConstructor_0: function () {
GT1650.prototype.assertExp_2(!1, "static class - do not instanciate or subclass");
},
},
"GT1122",
[]
);
GT1122.prototype.LOGON = 1;
GT1122.prototype.JOINGAME = 2;
GT1122.prototype.LEAVEGAME = 3;
GT1122.prototype.STORECALLPARAMETER = 5;
GT1122.prototype.RELOADATTRIBUTES = 6;
GT1122.prototype.LOGON_JOINGAME = 7;
GT1122.prototype.GETROUNDHISTORY = 9;
GT1122.prototype.REPLAYROUND = 8;
GT1122.prototype.GAMESTATE = 10;
GT1122.prototype.LOGON_REPLAY = 11;
GT1122.prototype.LOGON_DEMO = 12;
GT1122.prototype.LEAVEGAME_AND_LOGOUT = 13;
GT1122.prototype.STORERESPONSETIMING = 24;
GT1122.prototype.PAYIN = 25;
GT1122.prototype.REFRESHUSER = 27;
GT1122.prototype.WATCHOTHERTABLE = 28;
GT1122.prototype.PLAYNOW = 29;
GT1122.prototype.SETDUMMYDBTICKETS = 30;
GT1122.prototype.SELECTSUBROOM = 31;
GT1122.prototype.WINTICKETS = 32;
GT1122.prototype.CLIENTVERSION = 33;
GT1122.prototype.ADDDUMMYPLAYERS = 34;
GT1122.prototype.IMPATIENCE = 35;
GT1122.prototype.SESSIONSETTINGS = 36;
GT1122.prototype.SUBROOM_TABLES = 37;
GT1122.prototype.MAX_WIN = 38;
GT1122.prototype.DBSETTINGS = 39;
GT1122.prototype.GETALLDATA = 40;
GT1122.prototype.MYSTERY_PAYOUT_STEPS = 41;
var GT558 = Class.extend(
{
initialConstructor_0: function () {
this.decorationOrder = 0;
this.decorationOrder = GT558.prototype.ORDER_GAME;
},
initialConstructor_1: function (a) {
this.decorationOrder = 0;
this.decorationOrder = a;
},
getDecorationOrder_0: function () {
return this.decorationOrder;
},
setDecorationOrder_1: function (a) {
this.decorationOrder = a;
},
},
"GT558",
[]
);
GT558.prototype.ORDER_BEFORE_GAME = 1e5;
GT558.prototype.ORDER_GAME = 2e5;
GT558.prototype.ORDER_AFTER_GAME = 3e5;
GT558.prototype.ORDER_EXTERNAL = 4e5;
var GT186 = GT558.extend(
{
initialConstructor_0: function () {
GT558.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
GT558.prototype.initialConstructor_1.call(this, a);
},
loadResources_1: function (a) {},
buttonMenuFullscreen_2: function (a, b) {
return a;
},
buttonMenuWindowed_2: function (a, b) {
return a;
},
buttonMenuSoundOn_2: function (a, b) {
return a;
},
buttonMenuSoundOff_2: function (a, b) {
return a;
},
buttonMenuMusicOn_2: function (a, b) {
return a;
},
buttonMenuMusicOff_2: function (a, b) {
return a;
},
buttonMenuWideAspect_2: function (a, b) {
return a;
},
buttonMenuNormalAspect_2: function (a, b) {
return a;
},
buttonMenuAccount_2: function (a, b) {
return a;
},
buttonMenuHelp_2: function (a, b) {
return a;
},
buttonMenuLeaveTable_2: function (a, b) {
return a;
},
buttonMenuPayIn_2: function (a, b) {
return a;
},
textTime_2: function (a, b) {
return a;
},
textSessionTime_2: function (a, b) {
return a;
},
textBalance_2: function (a, b) {
return a;
},
textRoundId_2: function (a, b) {
return a;
},
textAdminInfo_2: function (a, b) {
return a;
},
buttonOpenReplay_2: function (a, b) {
return a;
},
containerReplayDialog_2: function (a, b) {
return a;
},
containerSessionSummary_2: function (a, b) {
return a;
},
isReplayDialogModal_2: function (a, b) {
return a;
},
isSpectatorModeBlockingInput_2: function (a, b) {
return a;
},
containerPayInDialog_2: function (a, b) {
return a;
},
containerSessionSettingsDialog_2: function (a, b) {
return a;
},
containerRCSettingsDialog_2: function (a, b) {
return a;
},
containerAutoplaySettingsDialog_2: function (a, b) {
return a;
},
containerWatcherInfo_2: function (a, b) {
return a;
},
containerRealityCheckDialogIntervalTime_2: function (a, b) {
return a;
},
containerRealityCheckDialogLeavingGame_2: function (a, b) {
return a;
},
containerRealityCheckDialogIntervalRounds_2: function (a, b) {
return a;
},
containerErrorDialog_2: function (a, b) {
return a;
},
containerMaximumWinReachedDialog_2: function (a, b) {
return a;
},
containerResponsibleGamingInfoDialog_2: function (a, b) {
return a;
},
containerClientVersionInfo_2: function (a, b) {
return a;
},
hasReplayFeature_2: function (a, b) {
return a;
},
buttonOpenContextMenu_2: function (a, b) {
return a;
},
buttonCloseContextMenu_2: function (a, b) {
return a;
},
layoutSafeAreaHeightTop_2: function (a, b) {
return a;
},
containerGameMenu_2: function (a, b) {
return a;
},
containerGameMenuExtended_2: function (a, b) {
return a;
},
containerClock_2: function (a, b) {
return a;
},
containerPortraitModeOverlay_2: function (a, b) {
return a;
},
textClientVersion_2: function (a, b) {
return a;
},
containerDisableGamblingDialog_2: function (a, b) {
return a;
},
},
"GT186",
[]
),
GT339 = GT558.extend(
{
initialConstructor_0: function () {
GT558.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
GT558.prototype.initialConstructor_1.call(this, a);
},
loadResources_1: function (a) {},
buttonMenuAccount_2: function (a, b) {
return a;
},
buttonMenuFullscreen_2: function (a, b) {
return a;
},
buttonMenuHelp_2: function (a, b) {
return a;
},
buttonMenuNormalAspect_2: function (a, b) {
return a;
},
buttonMenuQuit_2: function (a, b) {
return a;
},
buttonMenuSoundOff_2: function (a, b) {
return a;
},
buttonMenuSoundOn_2: function (a, b) {
return a;
},
buttonMenuWideAspect_2: function (a, b) {
return a;
},
buttonMenuWindowed_2: function (a, b) {
return a;
},
buttonPlayNow_2: function (a, b) {
return a;
},
dropDownFilter_2: function (a, b) {
return a;
},
fontTooltip_2: function (a, b) {
return a;
},
imageBorder_2: function (a, b) {
return a;
},
imageJackpotLogo_2: function (a, b) {
return a;
},
imageLobbyBanner_2: function (a, b) {
return a;
},
containerLobbyBanner_2: function (a, b) {
return a;
},
layoutDesignedHeight_2: function (a, b) {
return a;
},
layoutDesignedWidth_2: function (a, b) {
return a;
},
layoutHorizontalAdjustment_2: function (a, b) {
return a;
},
layoutOverscanLeft_2: function (a, b) {
return a;
},
layoutOverscanRight_2: function (a, b) {
return a;
},
layoutOverscanTop_2: function (a, b) {
return a;
},
layoutOverscanBottom_2: function (a, b) {
return a;
},
layoutSafeAreaHeightTop_2: function (a, b) {
return a;
},
layoutWideAspect_2: function (a, b) {
return a;
},
lobbyJackpotBaseWin_2: function (a, b) {
return a;
},
maintenanceInfo_2: function (a, b) {
return a;
},
scrollBarTables_2: function (a, b) {
return a;
},
scrollBarRooms_2: function (a, b) {
return a;
},
showAspectButton_2: function (a, b) {
return a;
},
soundLobby_2: function (a, b) {
return a;
},
soundLobbyLoopEnd_2: function (a, b) {
return a;
},
soundLobbyLoopStart_2: function (a, b) {
return a;
},
subRoomView_2: function (a, b) {
return a;
},
tableView_2: function (a, b) {
return a;
},
tableViewBackColor_2: function (a, b) {
return a;
},
tableViewBackColor2_2: function (a, b) {
return a;
},
textJackpotMaxBetInfo_2: function (a, b) {
return a;
},
textJackpotMaxJackpotInfo_2: function (a, b) {
return a;
},
jackpotCounterReel_2: function (a, b) {
return a;
},
textPlayerAccount_2: function (a, b) {
return a;
},
containerErrorScreen_2: function (a, b) {
return a;
},
progressBar_2: function (a, b) {
return a;
},
disclaimer_2: function (a, b) {
return a;
},
textSplashScreen_2: function (a, b) {
return a;
},
containerInfoPages_2: function (a, b) {
return a;
},
containerInfoPagesToggleAndCloseButton_2: function (a, b) {
return a;
},
infoPagesTimeout_2: function (a, b) {
return a;
},
containerSplashScreen_2: function (a, b) {
return a;
},
containerCustomLoadingScreen_2: function (a, b) {
return a;
},
customLoadingScreenPostDelay_2: function (a, b) {
return a;
},
casinoProgressBar_2: function (a, b) {
return a;
},
containerDeveloperLogo_2: function (a, b) {
return a;
},
containerIntroVideo_2: function (a, b) {
return a;
},
buttonIntroVideoSkip_2: function (a, b) {
return a;
},
containerInfoPagesBackground_2: function (a, b) {
return a;
},
containerLobbyIndented_2: function (a, b) {
return a;
},
containerLobby_2: function (a, b) {
return a;
},
containerInfoPagesIndicators_2: function (a, b) {
return a;
},
buttonInfoPagesClose_2: function (a, b) {
return a;
},
buttonInfoPagesNext_2: function (a, b) {
return a;
},
buttonInfoPagesToggle_2: function (a, b) {
return a;
},
textInfoPagesToggleMessage_2: function (a, b) {
return a;
},
buttonInfoPagesPrev_2: function (a, b) {
return a;
},
containerOneInfoPageIndicator_2: function (a, b) {
return a;
},
},
"GT339",
[]
),
GT140 = Class.extend(
{
initialConstructor_0: function () {
this.clock_show = this.button_contextmenu_show = this.field_currenttime_show = this.field_sessiontime_show = this.field_roundid_show = this.button_replay_show = this.button_fullscreen_show = this.button_widescreen_show = this.button_sound_show = this.button_music_show = this.field_balance_show = this.button_playnow_show = this.button_exit_show = this.button_help_show = this.button_payin_show = this.button_topup_show = this.isShowSessionTime = this.isShowingClock = this.smallScreen = this.useHtml5Lobby = this.noPayin = this.noGameMenuEnabled = this.isRecorderUsed = this.areTopButtonsEnabled = this.isDeepWalletUserSkinEnabled = !1;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.isDeepWalletUserSkinEnabled = this.clock_show = this.button_contextmenu_show = this.field_currenttime_show = this.field_sessiontime_show = this.field_roundid_show = this.button_replay_show = this.button_fullscreen_show = this.button_widescreen_show = this.button_sound_show = this.button_music_show = this.field_balance_show = this.button_playnow_show = this.button_exit_show = this.button_help_show = this.button_payin_show = this.button_topup_show = this.isShowSessionTime = this.isShowingClock = this.smallScreen = this.useHtml5Lobby = this.noPayin = this.noGameMenuEnabled = this.isRecorderUsed = this.areTopButtonsEnabled = this.isDeepWalletUserSkinEnabled = !1;
this.areTopButtonsEnabled = !0;
this.isRecorderUsed = null != a.getParameter_1("playrecord") || null != a.getParameter_1("record");
this.noPayin = this.noGameMenuEnabled = !1;
this.smallScreen = null != a.getParameter_1("screensize") && a.getParameter_1("screensize").equals_1("small");
var b = a.getParameter_1("html5lobby");
this.useHtml5Lobby = null != b && (b.equals_1("1") || b.equals_1("true"));
this.hasSkinId_2(a, "deepwalletuser") || this.hasSkinId_2(a, "chartwell")
? (this.isDeepWalletUserSkinEnabled = !0)
: this.hasSkinId_2(a, "notopbuttons")
? (this.areTopButtonsEnabled = !1)
: this.hasSkinId_2(a, "nogamemenu")
? (this.noGameMenuEnabled = !0)
: this.hasSkinId_2(a, "nopayinbutton") && (this.noPayin = !0);
b = this.isShowParameterEnabled_3(a, "gamemenu.show", !this.noGameMenuEnabled);
this.setShowClock_1(this.isParameterEnabled_2(a, "showclock"));
this.setShowSessionTime_1(this.isParameterEnabled_2(a, "showsessiontime"));
this.setTopUpButtonShow_1(this.isShowParameterEnabled_3(a, "button.topup.show", b && this.areTopButtonsEnabled));
this.setPayInButtonShow_1(this.isShowParameterEnabled_3(a, "button.payin.show", b && this.areTopButtonsEnabled && !this.noPayin));
this.setHelpButtonShow_1(this.isShowParameterEnabled_3(a, "button.help.show", b && this.areTopButtonsEnabled));
this.setExitButtonShow_1(this.isShowParameterEnabled_3(a, "button.exit.show", b && this.areTopButtonsEnabled));
this.isDeepWalletUserSkinEnabled && (this.setTopUpButtonShow_1(!1), this.setPayInButtonShow_1(!1), this.setHelpButtonShow_1(!1), this.setExitButtonShow_1(!1));
this.setPlayNowButtonShow_1(this.isShowParameterEnabled_3(a, "button.playnow.show", !0));
this.setBalanceFieldShow_1(this.isShowParameterEnabled_3(a, "field.balance.show", b));
this.setMusicButtonShow_1(this.isShowParameterEnabled_3(a, "button.music.show", b));
this.setSoundButtonShow_1(this.isShowParameterEnabled_3(a, "button.sound.show", b));
this.setWidescreenButtonShow_1(this.isShowParameterEnabled_3(a, "button.widescreen.show", b));
this.setFullscreenButtonShow_1(this.isShowParameterEnabled_3(a, "button.fullscreen.show", b));
this.isDeepWalletUserSkinEnabled && this.setFullscreenButtonShow_1(!1);
this.setReplayButtonShow_1(this.isShowParameterEnabled_3(a, "button.replay.show", b));
this.setRoundIdFieldShow_1(this.isShowParameterEnabled_3(a, "field.roundid.show", b));
this.setSessionTimeFieldShow_1(this.isShowParameterEnabled_3(a, "field.sessiontime.show", !1) || this.isShowSessionTime);
this.setCurrentTimeFieldShow_1(this.isShowParameterEnabled_3(a, "field.currenttime.show", b));
this.isRecorderUsed && (this.setSessionTimeFieldShow_1(!1), this.setCurrentTimeFieldShow_1(!1));
this.setContextMenuButtonShow_1(this.isShowParameterEnabled_3(a, "button.contextmenu.show", b));
this.setClockShow_1(this.isShowParameterEnabled_3(a, "clock.show", !1) || this.isShowingClock);
},
hasSkinId_2: function (a, b) {
var d = a.getParameter_1("skin");
if (null == d) return !1;
for (var d = GT1677.prototype.tokenize_2(d, ",.:; "), e = 0; e < d.length; e++) if (GT1677.prototype.equalsIgnoreCaseAZ_2(d[e], b)) return !0;
return !1;
},
setShowSessionTime_1: function (a) {
this.isShowSessionTime = a;
},
setShowClock_1: function (a) {
this.isShowingClock = a;
},
setTopUpButtonShow_1: function (a) {
this.button_topup_show = a;
},
setPayInButtonShow_1: function (a) {
this.button_payin_show = a;
},
setHelpButtonShow_1: function (a) {
this.button_help_show = a;
},
setExitButtonShow_1: function (a) {
this.button_exit_show = a;
},
setPlayNowButtonShow_1: function (a) {
this.button_playnow_show = a;
},
setBalanceFieldShow_1: function (a) {
this.field_balance_show = a;
},
setMusicButtonShow_1: function (a) {
this.button_music_show = a;
},
setSoundButtonShow_1: function (a) {
this.button_sound_show = a;
},
setWidescreenButtonShow_1: function (a) {
this.button_widescreen_show = a;
},
setFullscreenButtonShow_1: function (a) {
this.button_fullscreen_show = a;
},
setReplayButtonShow_1: function (a) {
this.button_replay_show = a;
},
setRoundIdFieldShow_1: function (a) {
this.field_roundid_show = a;
},
setSessionTimeFieldShow_1: function (a) {
this.field_sessiontime_show = a;
},
setCurrentTimeFieldShow_1: function (a) {
this.field_currenttime_show = a;
},
setContextMenuButtonShow_1: function (a) {
this.button_contextmenu_show = a;
},
setClockShow_1: function (a) {
this.clock_show = a;
},
decorateCasinoGameOverlaySkin_1: function (a) {
a.addDecorator_1(
new GT42(
Integer.MAX_VALUE,
this.button_topup_show,
this.button_payin_show,
this.button_help_show,
this.button_exit_show,
this.field_balance_show,
this.button_music_show,
this.button_sound_show,
this.button_widescreen_show,
this.button_fullscreen_show,
this.button_replay_show,
this.field_roundid_show,
this.field_sessiontime_show,
this.field_currenttime_show,
this.clock_show,
this.button_contextmenu_show
)
);
},
decorateCasinoLobbySkin_1: function (a) {
this.useHtml5Lobby && a.addDecorator_1(new GT366(GT558.prototype.ORDER_AFTER_GAME, this.smallScreen));
a.addDecorator_1(
new GT93(
Integer.MAX_VALUE,
this.button_topup_show,
this.button_help_show,
this.button_exit_show,
this.button_playnow_show,
this.field_balance_show,
this.button_sound_show,
this.button_widescreen_show,
this.button_fullscreen_show
)
);
},
},
"GT140",
[]
);
GT140.prototype.isShowParameterEnabled_3 = function (a, b, d) {
return null != a.getParameter_1(b) ? this.isParameterEnabled_2(a, b) : d;
};
GT140.prototype.isParameterEnabled_2 = function (a, b) {
return 1 == GT1672.prototype.stringToInt_1(a.getParameter_1(b));
};
var GT49 = GT186.extend(
{
initialConstructor_0: function () {
GT186.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
GT186.prototype.initialConstructor_1.call(this, a);
},
buttonMenuFullscreen_2: function (a, b) {
return null;
},
buttonMenuWindowed_2: function (a, b) {
return null;
},
},
"GT49",
[]
),
GT109 = GT186.extend(
{
initialConstructor_0: function () {
GT186.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
GT186.prototype.initialConstructor_1.call(this, a);
},
buttonMenuPayIn_2: function (a, b) {
return null;
},
buttonMenuLeaveTable_2: function (a, b) {
return null;
},
buttonMenuAccount_2: function (a, b) {
return null;
},
buttonMenuHelp_2: function (a, b) {
return null;
},
},
"GT109",
[]
),
GT42 = GT186.extend(
{
initialConstructor_0: function () {
this.showContextMenuButtons = this.showClock = this.showCurrentTime = this.showSessionTime = this.showRoundId = this.showReplayButton = this.showFullscreenButtons = this.showWidescreenButtons = this.showSoundButtons = this.showMusicButtons = this.showBalance = this.showExitButton = this.showHelpButton = this.showPayInButton = this.showTopUpButton = !1;
GT186.prototype.initialConstructor_0.call(this);
},
initialConstructor_16: function (a, b, d, e, f, g, k, m, n, p, q, r, t, u, B, A) {
this.showContextMenuButtons = this.showClock = this.showCurrentTime = this.showSessionTime = this.showRoundId = this.showReplayButton = this.showFullscreenButtons = this.showWidescreenButtons = this.showSoundButtons = this.showMusicButtons = this.showBalance = this.showExitButton = this.showHelpButton = this.showPayInButton = this.showTopUpButton = !1;
GT186.prototype.initialConstructor_1.call(this, a);
this.showTopUpButton = b;
this.showPayInButton = d;
this.showHelpButton = e;
this.showExitButton = f;
this.showBalance = g;
this.showMusicButtons = k;
this.showSoundButtons = m;
this.showWidescreenButtons = n;
this.showFullscreenButtons = p;
this.showReplayButton = q;
this.showRoundId = r;
this.showSessionTime = t;
this.showCurrentTime = u;
this.showClock = B;
this.showContextMenuButtons = A;
},
buttonMenuAccount_2: function (a, b) {
return this.showTopUpButton ? a : null;
},
buttonMenuPayIn_2: function (a, b) {
return this.showPayInButton ? a : null;
},
buttonMenuHelp_2: function (a, b) {
return this.showHelpButton ? a : null;
},
buttonMenuLeaveTable_2: function (a, b) {
return this.showExitButton ? a : null;
},
textBalance_2: function (a, b) {
return this.showBalance ? a : null;
},
buttonMenuMusicOff_2: function (a, b) {
return this.showMusicButtons ? a : null;
},
buttonMenuMusicOn_2: function (a, b) {
return this.showMusicButtons ? a : null;
},
buttonMenuSoundOff_2: function (a, b) {
return this.showSoundButtons ? a : null;
},
buttonMenuSoundOn_2: function (a, b) {
return this.showSoundButtons ? a : null;
},
buttonMenuWideAspect_2: function (a, b) {
return this.showWidescreenButtons ? a : null;
},
buttonMenuNormalAspect_2: function (a, b) {
return this.showWidescreenButtons ? a : null;
},
buttonMenuFullscreen_2: function (a, b) {
return this.showFullscreenButtons ? a : null;
},
buttonMenuWindowed_2: function (a, b) {
return this.showFullscreenButtons ? a : null;
},
buttonOpenReplay_2: function (a, b) {
return this.showReplayButton ? a : null;
},
hasReplayFeature_2: function (a, b) {
return a;
},
textRoundId_2: function (a, b) {
return this.showRoundId ? a : null;
},
textSessionTime_2: function (a, b) {
return this.showSessionTime ? a : null;
},
textTime_2: function (a, b) {
return this.showCurrentTime ? a : null;
},
containerClock_2: function (a, b) {
return this.showClock ? a : null;
},
buttonOpenContextMenu_2: function (a, b) {
return this.showContextMenuButtons ? a : null;
},
buttonCloseContextMenu_2: function (a, b) {
return this.showContextMenuButtons ? a : null;
},
},
"GT42",
[]
),
GT93 = GT339.extend(
{
initialConstructor_0: function () {
this.showFullscreenButtons = this.showWidescreenButtons = this.showSoundButtons = this.showBalance = this.showPlayNowButton = this.showExitButton = this.showHelpButton = this.showTopUpButton = !1;
GT339.prototype.initialConstructor_0.call(this);
},
initialConstructor_9: function (a, b, d, e, f, g, k, m, n) {
this.showFullscreenButtons = this.showWidescreenButtons = this.showSoundButtons = this.showBalance = this.showPlayNowButton = this.showExitButton = this.showHelpButton = this.showTopUpButton = !1;
GT339.prototype.initialConstructor_1.call(this, a);
this.showTopUpButton = b;
this.showHelpButton = d;
this.showExitButton = e;
this.showPlayNowButton = f;
this.showBalance = g;
this.showSoundButtons = k;
this.showWidescreenButtons = m;
this.showFullscreenButtons = n;
},
buttonMenuAccount_2: function (a, b) {
return this.showTopUpButton ? a : null;
},
buttonMenuHelp_2: function (a, b) {
return this.showHelpButton ? a : null;
},
buttonMenuQuit_2: function (a, b) {
return this.showExitButton ? a : null;
},
textPlayerAccount_2: function (a, b) {
return this.showBalance ? a : null;
},
buttonMenuSoundOff_2: function (a, b) {
return this.showSoundButtons ? a : null;
},
buttonMenuSoundOn_2: function (a, b) {
return this.showSoundButtons ? a : null;
},
buttonMenuWideAspect_2: function (a, b) {
return this.showWidescreenButtons ? a : null;
},
buttonMenuNormalAspect_2: function (a, b) {
return this.showWidescreenButtons ? a : null;
},
buttonMenuFullscreen_2: function (a, b) {
return this.showFullscreenButtons ? a : null;
},
buttonMenuWindowed_2: function (a, b) {
return this.showFullscreenButtons ? a : null;
},
buttonPlayNow_2: function (a, b) {
return this.showPlayNowButton ? a : null;
},
},
"GT93",
[]
),
GT970 = Class.extend(
{
initialConstructor_0: function () {
this.elements = this.tvc = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.elements = this.tvc = null;
this.tvc = a;
},
setListElements_1: function (a) {
this.elements = a;
for (a = 0; a < this.elements.size_0(); a++) this.elements.elementAt_1(a).listpos = a;
this.tvc.updateViewToNewData_1(!0);
},
getListElements_0: function () {
return this.elements;
},
createGUI_1: function (a) {
var b = 150,
d = 150;
null != this.tvc.imageLobbyTable && ((b = this.tvc.imageLobbyTable.getWidth_0()), (d = this.tvc.imageLobbyTable.getHeight_0()));
a = new GT1182(this.tvc, a, b, d);
a.btnEnter = new GT1559(a, 0, 0, b, d);
null != this.tvc.tablehighlight
? (new GT1437(a),
new GT1591(a.btnEnter, 0, 0, this.tvc.imageLobbyTable),
(b = new GT1437(a.btnEnter)),
new GT1591(b, 0, 0, this.tvc.imageLobbyTable),
b.setColorTransformation_1(this.tvc.tablehighlight),
a.btnEnter.setChildForState_2(GT1236.prototype.DEFAULT, 0),
a.btnEnter.setChildForState_2(GT1236.prototype.PRESSED, 1),
a.btnEnter.setChildForState_2(GT1236.prototype.MOUSEOVER, 1),
a.btnEnter.finishButton_0())
: new GT1591(a, 0, 0, this.tvc.imageLobbyTable);
a.txtAddress = new GT1606(
a,
this.tvc.addressx,
this.tvc.addressy,
this.tvc.addressAlign | GT1606.prototype.VALIGN_TOP,
"",
this.tvc.fontAddress,
this.tvc.colorAddress,
this.tvc.outlineRadiusAddress,
this.tvc.outlineColorAddress
);
a.cntPayoutText = new GT1437(a);
null != this.tvc.imageLobbyTableDetail &&
((a.imgDetail = new GT1591(a, this.tvc.detailx, this.tvc.detaily, this.tvc.imageLobbyTableDetail, 0, 0)), (a.unhidecallback = new GT869(a.imgDetail, !1)), a.imgDetail.hide_1(!0));
a.cntUserPic = new GT1437(a);
a.cntNicknames = new GT1437(a);
if (null != this.tvc.imageTableOccupied)
for (a.imgUserPics = [].createArray(this.tvc.imageTableOccupied.length), b = 0; b < a.imgUserPics.length; b++)
(a.imgUserPics[b] = new GT1591(a.cntUserPic, this.tvc.occupiedx, this.tvc.occupiedy, this.tvc.imageTableOccupied[b])), a.imgUserPics[b].hide_1(!0);
if (null != this.tvc.imageTableOccupiedWinning)
for (a.imgUserPicsWinning = [].createArray(this.tvc.imageTableOccupiedWinning.length), b = 0; b < a.imgUserPicsWinning.length; b++)
(a.imgUserPicsWinning[b] = new GT1591(a.cntUserPic, this.tvc.occupiedwinx, this.tvc.occupiedwiny, this.tvc.imageTableOccupiedWinning[b])), a.imgUserPicsWinning[b].hide_1(!0);
var b = this.tvc.occupiedx,
d = this.tvc.occupiedy,
e = a.imgUserPics[0];
a.standupanim = new GT653(this.tvc.timer, e, b, d + 90, 500, !0);
a.standupanim.addStartCallback_1(new GT870(e, b, d));
a.standupanim.addStartCallback_1(new GT869(e, !1));
a.standupanim.addFinishCallback_1(new GT869(e, !0));
a.standupanim.addFinishCallback_1(new GT870(e, b, d));
a.sitdownanim = new GT653(this.tvc.timer, e, b, d, 500, !0);
a.sitdownanim.addStartCallback_1(new GT870(e, b, d + 90));
a.sitdownanim.addStartCallback_1(new GT869(e, !1));
a.sitdownanim.addFinishCallback_1(new GT870(e, b, d));
this.tvc.showlastpayout &&
((a.txtPayout = new GT1123(
a.cntPayoutText,
this.tvc.detailx,
this.tvc.detaily,
this.tvc.imageLobbyTableDetail.getWidth_0(),
Math.div(this.tvc.imageLobbyTableDetail.getHeight_0(), this.tvc.imageLobbyTableDetail.getRows_0()),
this.tvc.fontPayout,
this.tvc.colorPayout
)),
a.txtPayout.setHAlign_1(GT1488.prototype.CENTER),
a.txtPayout.setVAlign_1(GT1489.prototype.CENTER),
a.txtPayout.hide_1(!0));
return a;
},
deactivateGUI_1: function (a) {
a.cntNicknames.destroyChildren_0();
a.sitdownanim.reset_0();
a.standupanim.reset_0();
for (var b = 0; b < a.imgUserPics.length; b++) a.imgUserPics[b].hide_1(!0);
if (null != a.imgUserPicsWinning) for (b = 0; b < a.imgUserPicsWinning.length; b++) a.imgUserPicsWinning[b].hide_1(!0);
null != a.txtPayout && a.txtPayout.hide_1(!0);
null != a.unhideanim && a.unhideanim.killAndTrigger_1(!1);
this.tvc.tablebuttons.removeElement_1(a.btnEnter);
null != a.switchanim && (a.switchanim.stop_0(), (a.switchanim = null));
},
activateGUI_2: function (a, b) {
var d = this.elements.elementAt_1(b);
null != a.switchanim && (a.switchanim.stop_0(), (a.switchanim = null));
0 < a.tvc.numberOfDetailFrames_0() && ((a.switchanim = new GT187(a.tvc.timer, a.tvc.tableDetailSwitchRandom, d, a.tvc.numberOfDetailFrames_0(), this.tvc)), a.switchanim.start_0(), a.switchanim.setFrame_0());
a.txtAddress.setText_1(d.address);
a.tvc.updateTablePayoutText_1(d);
a.cntNicknames.destroyChildren_0();
0 < d.numplayers &&
(null != a.imgUserPicsWinning && 0 < a.imgUserPicsWinning.length && d.hasWinningUser_0()
? a.imgUserPicsWinning[d.getBetLevel_1(a.imgUserPicsWinning.length)].hide_1(!1)
: a.imgUserPics[d.getBetLevel_1(a.imgUserPics.length)].hide_1(!1),
0 < d.nicknames.length_0() && a.tvc.addNicknames_2(a.cntNicknames, d.nicknames));
a.btnEnter.setApplicationData_2(a.tvc.actionID, d.tableindex);
a.btnEnter.setActive_1(!0);
this.tvc.tablebuttons.addElement_1(a.btnEnter);
d.useSpinAnim && a.imgDetail.setSourcePoint_2(0, a.imgDetail.getHeight_0() * d.lastframe);
},
updateGUI_2: function (a, b) {
var d = this.elements.elementAt_1(b);
d.useSpinAnim = !1;
d.useSwitchAnim = !1;
if (null != a.tvc.imageLobbyTable) {
a.tvc.updateTablePayoutText_1(d);
a.cntNicknames.destroyChildren_0();
for (var e = 0; e < a.imgUserPics.length; e++) a.imgUserPics[e].hide_1(!0);
if (null != a.imgUserPicsWinning) for (e = 0; e < a.imgUserPicsWinning.length; e++) a.imgUserPicsWinning[e].hide_1(!0);
0 < d.numplayers
? (d.hasWinningUser_0()
? null != a.imgUserPicsWinning && a.imgUserPicsWinning[d.getBetLevel_1(a.imgUserPicsWinning.length)].hide_1(!1)
: 0 == d.oldnumplayers
? (a.standupanim.reset_0(), a.sitdownanim.start_0())
: a.imgUserPics[d.getBetLevel_1(a.imgUserPics.length)].hide_1(!1),
0 < d.nicknames.length_0() && ((d = a.tvc.addNicknames_2(a.cntNicknames, d.nicknames)), null != d && a.sitdownanim.isRunning_0() && (d.hide_1(!0), a.tvc.timer.triggerCallbackAfter_2(new GT869(d, !1), 400))))
: 0 == d.numplayers && 0 < d.oldnumplayers && (a.sitdownanim.reset_0(), a.standupanim.start_0());
}
},
measureGUI_2: function (a, b) {},
getElementCount_0: function () {
return this.elements.size_0();
},
getElement_1: function (a) {
return this.elements.elementAt_1(a);
},
isActiveElement_1: function (a) {
return 0 >= this.elements.elementAt_1(a).numplayers || 1 != this.tvc.dropDownSelection;
},
},
"GT970",
[GT646]
),
GT762 = Class.extend(
{
initialConstructor_0: function () {
this.request = this.applet = null;
this.timeout = 0;
this.response = null;
this.responseCode = 0;
this.finished = this.running = !1;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.request = this.applet = null;
this.timeout = 0;
this.response = null;
this.responseCode = 0;
this.finished = this.running = !1;
this.applet = a;
this.request = "";
this.timeout = 0;
this.response = "";
this.responseCode = 0;
this.finished = this.running = !1;
},
setURLRequest_2: function (a, b) {
this.running || ((this.request = a), (this.timeout = b), (this.finished = !1));
},
runURLRequest_0: function () {
this.running || this.finished || this.applet.getURLRequester_1(this.timeout).request_3(this.request, null, this);
},
urlRequestCompleted_2: function (a, b) {
this.response = a;
this.responseCode = b;
this.running = !1;
this.finished = !0;
this.applet.urlRequestHelperCompleted_1(this);
},
getRequest_0: function () {
return this.request;
},
getTimeout_0: function () {
return this.timeout;
},
getResponse_0: function () {
return this.response;
},
getResponseCode_0: function () {
return this.responseCode;
},
isRunning_0: function () {
return this.running;
},
isFinished_0: function () {
return this.finished;
},
},
"GT762",
[GT865]
),
GT697 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
},
"GT697",
[]
);
GT697.prototype.KEY_LOADING_PROGRESS = "LOADING_PROGRESS";
GT697.prototype.KEY_ERROR_DESCRIPTION = "ERROR_DESCRIPTION";
GT697.prototype.VALUE_ERROR_DESCRIPTION_DISCONNECTED = "DISCONNECTED";
GT697.prototype.VALUE_ERROR_DESCRIPTION_NO_CONNECTION = "NO CONNECTION";
GT697.prototype.VALUEPREFIX_ERROR_DESCRIPTION_RESOURCE = "RESOURCE:";
GT697.prototype.KEY_KICK_REASON = "KICK_REASON";
GT697.prototype.VALUE_KICK_REASON_INACTIVITY = "1";
GT697.prototype.KEY_ERROR_CODE = "ERROR_CODE";
GT697.prototype.KEY_GAME_MODE = "GAME_MODE";
GT697.prototype.VALUE_GAME_MODE_READY = "READY";
GT697.prototype.VALUE_GAME_MODE_ERROR = "ERROR";
GT697.prototype.VALUE_GAME_MODE_LOBBY = "LOBBY";
GT697.prototype.VALUE_GAME_MODE_SPECTATOR = "SPECTATOR";
GT697.prototype.VALUE_GAME_MODE_SPINNING = "SPINNING";
GT697.prototype.VALUE_GAME_MODE_CLOSED = "CLOSED";
GT697.prototype.VALUE_GAME_MODE_LOADING = "LOADING";
GT697.prototype.VALUE_GAME_MODE_CONNECTING = "CONNECTING";
GT697.prototype.VALUE_GAME_MODE_PAYIN = "PAYIN";
GT697.prototype.VALUE_GAME_MODE_REPLAY = "REPLAY";
GT697.prototype.KEY_STATE = "STATE";
GT697.prototype.KEY_CLIENTVERSION = "CLIENTVERSION";
GT697.prototype.KEY_SERVERVERSION = "SERVERVERSION";
GT697.prototype.KEY_CLOSE = "CLOSE";
GT697.prototype.VALUE_CLOSE_ERR_LOGINFAILED = "ERR_LOGINFAILED";
GT697.prototype.VALUE_CLOSE_CommandID_SERVERVERSION = "CommandID.SERVERVERSION";
GT697.prototype.KEY_SOUND = "SOUND";
GT697.prototype.KEY_MUSIC = "MUSIC";
GT697.prototype.VALUE_TRUE = "TRUE";
GT697.prototype.VALUE_FALSE = "FALSE";
GT697.prototype.KEY_TOOLITTLEMONEY = "TOOLITTLEMONEY";
GT697.prototype.KEY_GAME_ID = "GAME_ID";
GT697.prototype.KEY_CURRENCY = "CURRENCY";
GT697.prototype.KEY_CURRENCYFACTOR = "CURRENCYFACTOR";
GT697.prototype.KEY_BALANCE = "BALANCE";
GT697.prototype.KEY_PAID = "PAID";
GT697.prototype.KEY_BET = "BET";
GT697.prototype.KEY_GAMEGUICREATED = "GAMEGUICREATED";
GT697.prototype.KEY_ENTITYSESSIONID = "ENTITYSESSIONID";
GT697.prototype.KEY_ENTITYPARTICIPATIONID = "ENTITYPARTICIPATIONID";
GT697.prototype.KEY_INCREASESTAKE = "INCREASESTAKE";
GT697.prototype.KEY_INCREASEWIN = "INCREASEWIN";
GT697.prototype.KEY_OPENSHOP = "OPENSHOP";
GT697.prototype.KEY_OPENHELP = "OPENHELP";
GT697.prototype.KEY_OPEN_STARVEGAS_AAMS = "OPEN_STARVEGAS_AAMS";
GT697.prototype.KEY_OPEN_STARVEGAS_AAMSTWO = "OPEN_STARVEGAS_AAMS2";
GT697.prototype.KEY_OPEN_STARVEGAS_EIGHTEENPLUS = "OPEN_STARVEGAS_EIGHTEENPLUS";
GT697.prototype.KEY_OPEN_STARVEGAS_RESPONSIBLEGAMING = "OPEN_STARVEGAS_MENU_RESPONSIBLEGAMING";
GT697.prototype.KEY_OPEN_STARVEGAS_PRIVACY = "OPEN_STARVEGAS_MENU_PRIVACY";
GT697.prototype.KEY_OPEN_STARVEGAS_AGB = "OPEN_STARVEGAS_MENU_AGB";
GT697.prototype.KEY_OPEN_RESPONSIBLEGAMING_DIALOG_MOREINFO = "OPEN_RESPONSIBLEGAMING_DIALOG_MOREINFO";
GT697.prototype.KEY_RECOVERABLE_ERROR_MESSAGE = "RECOVERABLE_ERROR_MESSAGE";
GT697.prototype.KEY_LEAVE_GAME = "LEAVE_GAME";
GT697.prototype.KEY_OVERRIDE_MAXBET = "OVERRIDE_MAXBET";
GT697.prototype.KEY_OVERRIDE_MINBET = "OVERRIDE_MINBET";
GT697.prototype.KEY_MINBET = "MINBET";
GT697.prototype.KEY_MAXBET = "MAXBET";
GT697.prototype.KEY_MAXIMUMROUNDWIN = "MAXIMUMROUNDWIN";
GT697.prototype.KEY_WAITINGFORSERVER = "WAITINGFORSERVER";
GT697.prototype.KEY_EXTERNALLOGGING = "EXTERNALLOGGING";
GT697.prototype.KEY_OPEN_PLURIUS_SETTINGS = "OPEN_PLURIUSSETTINGS";
GT697.prototype.KEY_JACKPOT_SERVICE_EVENT = "GJS";
GT697.prototype.WRAPPERV2_PROTOCOL_VERSION = "0.2";
GT697.prototype.IDENTIFIER_STATE = "state";
GT697.prototype.IDENTIFIER_EVENT = "event";
GT697.prototype.IDENTIFIER_ACTION = "action";
GT697.prototype.IDENTIFIER_ERROR = "error";
GT697.prototype.IDENTIFIER_CONFIG = "config";
GT697.prototype.ERROR_RESOURCELOADINGFAILED = "resourceLoadingFailed";
GT697.prototype.ERROR_ENTRY_DESCRIPTION = "description";
GT697.prototype.STATE_LOADING = "Loading";
GT697.prototype.STATE_LOBBY = "Lobby";
GT697.prototype.STATE_INIT = "Init";
GT697.prototype.STATE_BEFORESPIN = "BeforeSpin";
GT697.prototype.STATE_SPINNING = "Spinning";
GT697.prototype.STATE_WINANIMATIONS = "WinAnimations";
GT697.prototype.STATE_BEFOREGAMBLE = "BeforeGamble";
GT697.prototype.STATE_GAMBLE = "Gamble";
GT697.prototype.STATE_COLLECTWIN = "CollectWin";
GT697.prototype.STATE_FREEGAMESSTART = "FreeGamesStart";
GT697.prototype.STATE_FREEGAMESBEFORESPIN = "FreeGamesBeforeSpin";
GT697.prototype.STATE_FREEGAMESSPINNING = "FreeGamesSpinning";
GT697.prototype.STATE_FREEGAMESMORE = "FreeGamesMore";
GT697.prototype.STATE_FREEGAMESEND = "FreeGamesEnd";
GT697.prototype.STATE_COLLECTVISUALIZATION = "CollectVisualization";
GT697.prototype.STATE_SPECIALWINVISUALIZATION = "SpecialWinVisualization";
GT697.prototype.STATE_SUPERGAMES = "SuperGames";
GT697.prototype.STATE_UNDEFINED = "Undefined";
GT697.prototype.STATE_ENTRY_TOTALBET = "totalBet";
GT697.prototype.STATE_ENTRY_WIN = "win";
GT697.prototype.STATE_ENTRY_BALANCE = "balance";
GT697.prototype.STATE_ENTRY_AUTOPLAY = "autoplay";
GT697.prototype.STATE_ENTRY_FREESPINSWON = "freespinsWon";
GT697.prototype.STATE_ENTRY_FREESPINSPLAYED = "freespinsPlayed";
GT697.prototype.STATE_ENTRY_HASSPECIALWINVIS = "hasSpecialWinVisualization";
GT697.prototype.STATE_ENTRY_ISSPECTATOR = "isSpectator";
GT697.prototype.STATE_ENTRY_ISREPLAY = "isReplay";
GT697.prototype.STATE_ENTRY_TOOLITTLEMONEYTOPLAY = "hasTooLittleMoneyToPlay";
GT697.prototype.STATE_ENTRY_HASOPENROUND = "hasOpenRound";
GT697.prototype.STATE_ENTRY_GAMEMODE = "gameMode";
GT697.prototype.CONFIG_ENTRY_BALANCE = "balance";
GT697.prototype.CONFIG_ENTRY_TOTALBET = "totalBet";
GT697.prototype.CONFIG_ENTRY_MINBET = "minBet";
GT697.prototype.CONFIG_ENTRY_MAXBET = "maxBet";
GT697.prototype.CONFIG_ENTRY_MAXLINES = "maxLines";
GT697.prototype.CONFIG_ENTRY_LINES = "lines";
GT697.prototype.CONFIG_ENTRY_GAMEMODE = "gameMode";
GT697.prototype.CONFIG_ENTRY_BASEBET = "baseBet";
GT697.prototype.CONFIG_ENTRY_CURRENCY = "currency";
GT697.prototype.CONFIG_ENTRY_CURRENCYFACTOR = "currencyFactor";
GT697.prototype.CONFIG_ENTRY_HASJACKPOT = "hasJackpot";
GT697.prototype.CONFIG_ENTRY_VERSION = "version";
GT697.prototype.EVENT_LOADINGPROGRESS = "loadingProgress";
GT697.prototype.EVENT_BETCHANGE = "betChange";
GT697.prototype.EVENT_LINECHANGE = "linesChange";
GT697.prototype.EVENT_GAMEMODECHANGE = "gameModeChange";
GT697.prototype.EVENT_KICKEDBYSERVER = "kickedByServer";
GT697.prototype.EVENT_WAITINGFORSERVER = "waitingForServer";
GT697.prototype.EVENT_PAYTABLE = "paytable";
GT697.prototype.EVENT_PAYTABLE_UPDATE = "paytable_update";
GT697.prototype.EVENT_PAYTABLENEXTBUTTONPRESSED = "paytableNextButtonPressed";
GT697.prototype.EVENT_DISCONNECT = "disconnect";
GT697.prototype.EVENT_GAMBLEWIN = "gambleWin";
GT697.prototype.EVENT_GAMBLELOSS = "gambleLoss";
GT697.prototype.EVENT_GAMECLOSING = "gameClosing";
GT697.prototype.EVENT_OVERRIDEMAXBET = "overrideMaxbet";
GT697.prototype.EVENT_OVERRIDEMINBET = "overrideMinbet";
GT697.prototype.EVENT_TOOLITTLEMONEY = "tooLittleMoneyToPlay";
GT697.prototype.EVENT_ENTITYSESSIONID = "entitySessionId";
GT697.prototype.EVENT_ENTITYPARTICIPATIONID = "entityParticipationId";
GT697.prototype.EVENT_SESSIONTIME = "sessionTime";
GT697.prototype.EVENT_SESSIONSUMMARY = "sessionSummary";
GT697.prototype.EVENT_VIEWACCOUNTHISTORY = "viewAccountHistory";
GT697.prototype.EVENT_AUTOPLAY = "autoPlayValues";
GT697.prototype.EVENT_AUTOPLAYMETERCHANGE = "autoPlayMeterChange";
GT697.prototype.EVENT_AUTOPLAYMETERCANCELBUTTON = "autoPlayMeterCancelButton";
GT697.prototype.EVENT_GAMBLESTEPS = "gambleSteps";
GT697.prototype.EVENT_WAITFORCOLLECT = "waitForCollect";
GT697.prototype.EVENT_TOTALROUNDWINCHANGED = "totalRoundWinChanged";
GT697.prototype.EVENT_INGAMETRACKING = "inGameTracking";
GT697.prototype.EVENT_VIEWDATA = "viewdata";
GT697.prototype.EVENT_FREEROUNDSFINISHED = "freeSpinsFinished";
GT697.prototype.EVENT_REALITYCHECKSHOWN = "realityCheckShown";
GT697.prototype.EVENT_RECONNECTREQUESTED = "reconnectRequested";
GT697.prototype.EVENT_ENTRY_VALUE = "value";
GT697.prototype.EVENT_ENTRY_BASEBET = "baseBet";
GT697.prototype.EVENT_ENTRY_LINES = "lines";
GT697.prototype.EVENT_ENTRY_GAMEMODE = "gameMode";
GT697.prototype.EVENT_ENTRY_BETMULTIPLIER = "betMultiplier";
GT697.prototype.EVENT_ENTRY_WASMAXBETREQUESTED = "wasMaxBetRequested";
GT697.prototype.EVENT_ENTRY_WASMINBETREQUESTED = "wasMinBetRequested";
GT697.prototype.EVENT_ENTRY_KICKREASON = "kickReason";
GT697.prototype.EVENT_ENTRY_DESCRIPTION = "description";
GT697.prototype.EVENT_ENTRY_SHOWN = "shown";
GT697.prototype.EVENT_ENTRY_HIDDEN = "hidden";
GT697.prototype.EVENT_ENTRY_MOVEIN = "movein";
GT697.prototype.EVENT_ENTRY_MOVEOUT = "moveout";
GT697.prototype.EVENT_ENTRY_BALANCE = "balance";
GT697.prototype.EVENT_ENTRY_SUMSTAKES = "sumStakes";
GT697.prototype.EVENT_ENTRY_SUMWINNINGS = "sumWinnings";
GT697.prototype.EVENT_ENTRY_WINLOSSBALANCE = "winlossbalance";
GT697.prototype.EVENT_ENTRY_OLDPAGE = "oldPage";
GT697.prototype.EVENT_ENTRY_NEWPAGE = "newPage";
GT697.prototype.EVENT_ENTRY_TOTALPAGES = "totalPages";
GT697.prototype.EVENT_ENTRY_POSSIBLEGAMBLESTEPS = "possibleGambleSteps";
GT697.prototype.EVENT_ENTRY_POSSIBLEGAMBLEAMOUNT = "possibleGambleAmount";
GT697.prototype.EVENT_ENTRY_POSSIBLEGAMBLEWIN = "possibleGambleWin";
GT697.prototype.EVENT_ENTRY_NUMBEROFGAMBLEWINS = "numberOfGambleWins";
GT697.prototype.EVENT_ENTRY_GAMBLEHISTORY = "gambleHistory";
GT697.prototype.EVENT_ENTRY_ANIMATIONDURATION = "animationDuration";
GT697.prototype.EVENT_ENTRY_ROUNDID = "roundID";
GT697.prototype.EVENT_IGT_ID = "id";
GT697.prototype.EVENT_IGT_DATA = "data";
GT697.prototype.ACTION_NAME_OVERRIDEMAXBET = "overrideMaxbet";
GT697.prototype.ACTION_NAME_OVERRIDEMINBET = "overrideMinbet";
GT697.prototype.ACTION_NAME_PAYTABLE = "paytable";
GT697.prototype.ACTION_NAME_PAYTABLENEXT = "paytableNext";
GT697.prototype.ACTION_NAME_RECONNECT = "reconnect";
GT697.prototype.ACTION_NAME_AUTOPLAYON = "autoplayOn";
GT697.prototype.ACTION_NAME_AUTOPLAYOFF = "autoplayOff";
GT697.prototype.ACTION_NAME_AUTOPLAYMETER = "autoplayMeter";
GT697.prototype.ACTION_NAME_AUTOPLAYMETERRESET = "autoplayMeterReset";
GT697.prototype.ACTION_NAME_BET = "bet";
GT697.prototype.ACTION_NAME_GAMEMODE = "gameMode";
GT697.prototype.ACTION_NAME_DOSTOP = "doStop";
GT697.prototype.ACTION_NAME_PAUSERENDERING = "pauseRendering";
GT697.prototype.ACTION_NAME_RESUMERENDERING = "resumeRendering";
GT697.prototype.ACTION_NAME_REQUESTLEAVEGAME = "requestLeaveGame";
GT697.prototype.ACTION_NAME_RECONNECTWITHNEWLOGINTOKEN = "reconnectWithNewLoginToken";
GT697.prototype.ACTION_NAME_STOPAUTOPLAYATROUNDFINISH = "stopAutoplayAtRoundFinish";
GT697.prototype.ACTION_NAME_COLLECT = "collect";
GT697.prototype.ACTION_NAME_COLLECTCONFIRM = "collectConfirm";
GT697.prototype.ACTION_NAME_COLLECTHANDPAY = "collectHandpay";
GT697.prototype.ACTION_NAME_SOUND_OFF = "soundOff";
GT697.prototype.ACTION_NAME_SOUND_ON = "soundOn";
GT697.prototype.ACTION_NAME_MUSIC_OFF = "musicOff";
GT697.prototype.ACTION_NAME_MUSIC_ON = "musicOn";
GT697.prototype.ACTION_NAME_TOTALROUNDWIN = "totalRoundWin";
GT697.prototype.ACTION_ENTRY_VALUE = "value";
GT697.prototype.ACTION_ENTRY_BETMODE = "mode";
GT697.prototype.ACTION_ENTRY_LOGINTOKEN = "loginToken";
GT697.prototype.ACTION_ENTRY_TRANSACTIONTYPE = "transactionType";
var GT707 = Class.extend(
{
initialConstructor_0: function () {
this.factor = 0;
this.bets = null;
this.minb = this.minbetmulti = this.maxbetmulti = this.independentSetting = this.maxTotalBet = this.minTotalBet = 0;
this.possiblebasebet = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_5: function (a, b, d, e, f) {
this.factor = 0;
this.bets = null;
this.minb = this.minbetmulti = this.maxbetmulti = this.independentSetting = this.maxTotalBet = this.minTotalBet = 0;
this.possiblebasebet = null;
this.minTotalBet = a;
this.maxTotalBet = b;
this.independentSetting = d;
this.maxbetmulti = e;
this.minbetmulti = f;
this.minb = 0;
this.possiblebasebet = null;
this.factor = 1;
this.bets = [
1,
2,
3,
4,
5,
8,
10,
15,
20,
30,
40,
50,
80,
100,
150,
200,
300,
400,
500,
800,
1e3,
1500,
2e3,
3e3,
4e3,
5e3,
8e3,
1e4,
15e3,
2e4,
3e4,
4e4,
5e4,
8e4,
1e5,
15e4,
2e5,
3e5,
4e5,
5e5,
8e5,
1e6,
15e5,
2e6,
3e6,
4e6,
5e6,
8e6,
1e7,
15e6,
2e7,
3e7,
4e7,
5e7,
8e7,
1e8,
15e7,
2e8,
3e8,
4e8,
5e8,
8e8,
1e9,
15e8,
2e9,
];
},
setOverrideBets_1: function (a) {
this.bets = a;
},
setForceIntegerValues_1: function (a) {
this.factor = a;
},
calculatePossibeBaseBets_0: function () {
var a = [].createArray(this.bets.length).init(0);
java_lang_System.prototype.arraycopy_5(this.bets, 0, a, 0, this.bets.length);
if (1 < this.factor)
for (var b = 0; b < a.length; )
if (0 != a[b] % this.factor) {
var d = [].createArray(a.length - 1).init(0);
java_lang_System.prototype.arraycopy_5(a, 0, d, 0, b);
java_lang_System.prototype.arraycopy_5(a, b + 1, d, b, a.length - b - 1);
a = [].createArray(d.length).init(0);
java_lang_System.prototype.arraycopy_5(d, 0, a, 0, d.length);
} else b++;
d = this.minb = 0;
0 == this.independentSetting
? ((this.minb = (1 * this.minTotalBet) / this.maxbetmulti), (d = (1 * this.maxTotalBet) / this.minbetmulti))
: ((this.minb = 1 == this.independentSetting ? (1 * this.minTotalBet) / this.minbetmulti : (1 * this.minTotalBet) / this.maxbetmulti), (d = (1 * this.maxTotalBet) / this.maxbetmulti));
for (var e = 0, b = 0; b < a.length; b++) {
var f = a[b];
f >= this.minb && f <= d && e++;
}
this.possiblebasebet = [].createArray(e).init(0);
for (b = e = 0; b < a.length; b++) (f = a[b]), f >= this.minb && f <= d && ((this.possiblebasebet[e] = Integer.truncate_1(f)), e++);
},
getMinTotalBet_2: function (a, b) {
if (null == this.possiblebasebet || 0 == this.possiblebasebet.length) return 0;
var d = Integer.MAX_VALUE;
if (1 < this.factor || 0 == a) {
for (var e = 0; e < b.length; e++)
for (var f = this.ggT_2(100, b[e]), g = 0; g < this.possiblebasebet.length; g++) {
var k = this.possiblebasebet[g] * b[e];
((0 == this.possiblebasebet[g] % f && 0 == k % 100) || 0 == a) && k < d && (2 == a || k >= this.minTotalBet) && (d = k);
}
return d;
}
return 0 == a ? Integer.truncate_1(Math.floor_1(this.possiblebasebet[0] * this.maxbetmulti)) : Integer.truncate_1(Math.floor_1(this.possiblebasebet[0] * this.minbetmulti));
},
getPossiblebets_0: function () {
return this.possiblebasebet;
},
ggT_2: function (a, b) {
if (0 == a) return b;
for (; 0 != b; ) a > b ? (a -= b) : (b -= a);
return a;
},
},
"GT707",
[]
),
GT709 = Class.extend(
{
initialConstructor_0: function () {
this.topLeft = this.root = this.parent = null;
this.borderThickness = this.cornerRadius = this.actualHeight = this.actualWidth = this.maxHeight = this.minHeight = this.maxWidth = this.minWidth = 0;
this.concreteObject = null;
this.factor = 0;
this.name = null;
this.componentSpacing = this.resizePriority = this.order = 0;
this.soundResources = this.imageResources = this.listenedComponentKeys = this.placeHolder = null;
this.placeholder = !1;
this.clickArea = this.componentFactory = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.topLeft = this.root = this.parent = null;
this.borderThickness = this.cornerRadius = this.actualHeight = this.actualWidth = this.maxHeight = this.minHeight = this.maxWidth = this.minWidth = 0;
this.concreteObject = null;
this.factor = 0;
this.name = null;
this.componentSpacing = this.resizePriority = this.order = 0;
this.soundResources = this.imageResources = this.listenedComponentKeys = this.placeHolder = null;
this.placeholder = !1;
this.clickArea = this.componentFactory = null;
this.name = a;
this.topLeft = new GT1633();
this.imageResources = new java_util_JavaScriptVector();
this.soundResources = new java_util_JavaScriptVector();
this.borderThickness = 3;
},
initialConstructor_3: function (a, b, d) {
GT709.prototype.initialConstructor_1.call(this, a);
this.parent = b;
this.root = d;
this.order = 0;
},
requestLayout_0: function () {
this.setComponentSize_2(this.getMaxWidth_0(), this.getMaxHeight_0());
},
getName_0: function () {
return this.name;
},
getTopLeft_0: function () {
return this.topLeft;
},
getComponentX_0: function () {
return this.topLeft.x;
},
setComponentX_1: function (a) {
this.topLeft.x = a;
null != this.concreteObject && this.concreteObject.setLocation_2(a, this.topLeft.y);
return this;
},
getComponentY_0: function () {
return this.topLeft.y;
},
setComponentY_1: function (a) {
this.topLeft.y = a;
null != this.concreteObject && this.concreteObject.setLocation_2(this.topLeft.x, a);
return this;
},
getMinWidth_0: function () {
return this.minWidth;
},
setMinWidth_1: function (a) {
this.minWidth = a;
return this;
},
getMaxWidth_0: function () {
return this.maxWidth;
},
setMaxWidth_1: function (a) {
this.maxWidth = a;
return this;
},
getMinHeight_0: function () {
return this.minHeight;
},
setMinHeight_1: function (a) {
this.minHeight = a;
return this;
},
getMaxHeight_0: function () {
return this.maxHeight;
},
setMaxHeight_1: function (a) {
this.maxHeight = a;
return this;
},
getFactor_0: function () {
return this.factor;
},
setFactor_1: function (a) {
this.factor = a;
},
getMinMaxWidth_0: function () {
return new GT1438(this.minWidth, this.maxWidth);
},
setComponentSize_2: function (a, b) {
null == this.concreteObject || (this.actualHeight == b && this.actualWidth == a) || this.concreteObject.setSize_2(a, b);
this.actualWidth = a;
this.actualHeight = b;
0 == this.minWidth && 0 == this.maxWidth && (this.maxWidth = this.minWidth = a);
0 == this.minHeight && 0 == this.maxHeight && (this.maxHeight = this.minHeight = b);
return this;
},
getComponentHeight_0: function () {
return this.actualHeight;
},
getComponentWidth_0: function () {
return this.actualWidth;
},
setObject_1: function (a) {
this.concreteObject = a;
},
getObject_0: function () {
return this.concreteObject;
},
setParent_1: function (a) {
this.parent = a;
},
getParent_0: function () {
return this.parent;
},
setRoot_1: function (a) {
this.root = a;
},
getRoot_0: function () {
return this.root;
},
getDragArea_0: function () {
if (null != this.concreteObject && null != this.concreteObject.getDragArea_0()) return this.concreteObject.getDragArea_0();
var a = this.getTopLeft_0().x,
b = this.getTopLeft_0().y,
d = this.getComponentWidth_0(),
e = this.getComponentHeight_0();
return new GT1124([a, b, a + d, b, a + d, b + e, a, b + e]);
},
getPlaceHolder_0: function () {
return this.placeHolder;
},
createPlaceHolder_0: function () {
return (this.placeHolder = new GT815(this));
},
destroy_0: function () {
null != this.concreteObject && (this.concreteObject.destroyObject_0(), (this.concreteObject = null));
},
getOrder_0: function () {
return this.order;
},
setOrder_1: function (a) {
this.order = a;
return this;
},
getResizePriority_0: function () {
return this.resizePriority;
},
setResizePriority_1: function (a) {
this.resizePriority = a;
},
getComponentSpacing_0: function () {
return this.componentSpacing;
},
setComponentSpacing_1: function (a) {
this.componentSpacing = a;
return this;
},
wrapNumber_1: function (a) {
return new Double(a);
},
generateSaveState_2: function (a, b) {
var d = new java_util_JavaScriptHashtable();
d.put_2("order", this.wrapNumber_1(this.getOrder_0()));
d.put_2("x", this.wrapNumber_1(this.topLeft.x));
d.put_2("y", this.wrapNumber_1(this.topLeft.y));
a.put_2("" + this.name, d);
},
toString: function () {
var a = "[".concat_1("ConsoleComponentImpl"),
a = a.concat_1(", name=" + this.name),
a = a
.concat_1(", topLeft=(")
.concat_1("" + this.topLeft.x)
.concat_1(", ")
.concat_1("" + this.topLeft.y)
.concat_1(")"),
a = a
.concat_1(", minWidht=")
.concat_1("" + this.minWidth)
.concat_1(", minHeight=")
.concat_1("" + this.minHeight),
a = a
.concat_1(", maxWidht=")
.concat_1("" + this.maxWidth)
.concat_1(", maxHeight=")
.concat_1("" + this.maxHeight);
return (a = a.concat_1(", order=" + this.order + ")"));
},
notifyDragStart_0: function () {
this.concreteObject.notifyDragStart_0();
GT1389.prototype.getInstance_0().removeMask_0();
},
notifyDragEnd_0: function () {
this.concreteObject.notifyDragEnd_0();
},
isDropSupported_0: function () {
return !1;
},
notifyLayoutAreaLeave_0: function () {
this.concreteObject.notifyLayoutAreaLeave_0();
},
notifyLayoutAreaEnter_0: function () {
this.concreteObject.notifyLayoutAreaEnter_0();
},
setListenedComponentKeys_1: function (a) {
this.listenedComponentKeys = a;
return this;
},
getListenedComponentKeys_0: function () {
return null == this.listenedComponentKeys ? this.getName_0() : this.listenedComponentKeys;
},
addImageResource_1: function (a) {
GT1650.prototype.assertExp_2(null != a, "resource cannot be null");
this.imageResources.contains_1(a) || this.imageResources.addElement_1(a);
return this;
},
removeImageResource_1: function (a) {
GT1650.prototype.assertExp_2(null != a, "resource cannot be null");
this.imageResources.contains_1(a) && this.imageResources.removeElement_1(a);
return this;
},
addSoundResource_1: function (a) {
GT1650.prototype.assertExp_2(null != a, "resource cannot be null");
this.soundResources.addElement_1(a);
return this;
},
removeSoundResource_1: function (a) {
GT1650.prototype.assertExp_2(null != a, "resource cannot be null");
this.soundResources.contains_1(a) && this.soundResources.removeElement_1(a);
return this;
},
getImageResources_0: function () {
return this.imageResources.clone_0();
},
getSoundResources_0: function () {
return this.soundResources.clone_0();
},
setPlaceholder_1: function (a) {
this.placeholder = a;
return this;
},
isPlaceholder_0: function () {
return this.placeholder;
},
setCornerRadius_1: function (a) {
this.cornerRadius = a;
return this;
},
getCornerRadius_0: function () {
return this.cornerRadius;
},
setBorderThickness_1: function (a) {
this.borderThickness = a;
return this;
},
getBorderThickness_0: function () {
return this.borderThickness;
},
isAutoLayoutingSupported_0: function () {
return !1;
},
setComponentFactory_1: function (a) {
this.componentFactory = a;
return this;
},
getComponentFactory_0: function () {
return this.componentFactory;
},
getClickArea_0: function () {
return this.clickArea;
},
setClickArea_1: function (a) {
this.clickArea = a;
},
},
"GT709",
[GT918]
),
GT1018 = GT709.extend(
{
initialConstructor_0: function () {
this.closeButtonImage = this.pagingNextButtonImage = this.pagingBackButtonImage = this.backgroundImageFileFreeGames = this.backgroundImageFile = this.values = this.labels = null;
GT709.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.closeButtonImage = this.pagingNextButtonImage = this.pagingBackButtonImage = this.backgroundImageFileFreeGames = this.backgroundImageFile = this.values = this.labels = null;
GT709.prototype.initialConstructor_1.call(this, a);
this.labels = new java_util_JavaScriptVector();
this.values = new java_util_JavaScriptVector();
},
addLabel_1: function (a) {
null == a || this.labels.contains_1(a) ? GT1650.prototype.assertFailed_1("Trying to insert null or duplicate label into ConsoleDisplay:" + a) : this.labels.addElement_1(a);
return this;
},
addValue_1: function (a) {
null == a || this.values.contains_1(a) ? GT1650.prototype.assertFailed_1("Trying to insert null or duplicate value into ConsoleDisplay: " + a) : this.values.addElement_1(a);
return this;
},
getLabels_0: function () {
return this.labels;
},
getValues_0: function () {
return this.values;
},
setBackgroundImageFile_1: function (a) {
this.backgroundImageFile = a;
return this;
},
getBackgroundImageFile_0: function () {
return this.backgroundImageFile;
},
setBackgroundImageFileFreeGames_1: function (a) {
this.backgroundImageFileFreeGames = a;
return this;
},
getBackgroundImageFileFreeGames_0: function () {
return this.backgroundImageFileFreeGames;
},
setPagingBackButtonImage_1: function (a) {
this.pagingBackButtonImage = a;
return this;
},
getPagingBackButtonImage_0: function () {
return this.pagingBackButtonImage;
},
setPagingNextButtonImage_1: function (a) {
this.pagingNextButtonImage = a;
return this;
},
getPagingNextButtonImage_0: function () {
return this.pagingNextButtonImage;
},
setCloseButtonImage_1: function (a) {
this.closeButtonImage = a;
return this;
},
getCloseButtonImage_0: function () {
return this.closeButtonImage;
},
getImageResources_0: function () {
var a = GT709.prototype.getImageResources_0.call(this);
a.addElement_1(this.backgroundImageFile);
a.addElement_1(this.backgroundImageFileFreeGames);
a.addElement_1(this.pagingBackButtonImage);
a.addElement_1(this.pagingNextButtonImage);
a.addElement_1(this.closeButtonImage);
return a;
},
},
"GT1018",
[]
),
GT1125 = Class.extend(
{
initialConstructor_0: function () {
this.textAttributes = this.locationSizeAttributes = this.labelText = this.identifier = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_4: function (a, b, d, e) {
this.textAttributes = this.locationSizeAttributes = this.labelText = this.identifier = null;
this.identifier = a;
this.textAttributes = e;
this.locationSizeAttributes = d;
this.labelText = b;
},
getTextAttributes_0: function () {
return this.textAttributes;
},
setTextAttributes_1: function (a) {
this.textAttributes = a;
return this;
},
getLocationSizeAttributes_0: function () {
return this.locationSizeAttributes;
},
setLocationSizeAttributes_1: function (a) {
this.locationSizeAttributes = a;
return this;
},
getLabelText_0: function () {
return this.labelText;
},
setLabelText_1: function (a) {
this.labelText = a;
return this;
},
getIdentifier_0: function () {
return this.identifier;
},
setIdentifier_1: function (a) {
this.identifier = a;
return this;
},
},
"GT1125",
[]
),
GT815 = GT709.extend(
{
initialConstructor_0: function () {
this.forComponent = null;
GT709.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.forComponent = null;
GT709.prototype.initialConstructor_1.call(this, a.getName_0().concat_1("'s placeholder"));
this.forComponent = a;
this.setComponentX_1(a.getComponentX_0());
this.setComponentY_1(a.getComponentY_0());
this.setComponentSize_2(a.getComponentWidth_0(), a.getComponentHeight_0());
this.setMaxWidth_1(a.getMinMaxWidth_0().getMax_0());
this.setMinWidth_1(a.getMinMaxWidth_0().getMin_0());
this.setParent_1(a.getParent_0());
this.setRoot_1(a.getRoot_0());
this.setResizePriority_1(a.getResizePriority_0());
a.setPlaceholder_1(!0);
},
getForComponent_0: function () {
return this.forComponent;
},
setForComponent_1: function (a) {
this.forComponent = a;
},
setComponentSize_2: function (a, b) {
GT709.prototype.setComponentSize_2.call(this, a, b);
null != this.forComponent && this.forComponent.setComponentSize_2(a, b);
return this;
},
},
"GT815",
[]
),
GT502 = GT709.extend(
{
initialConstructor_0: function () {
this.gambling = this.panelClose = this.soundAndMusic = this.soundOnly = this.soundOff = null;
this.spacerY = this.spacerX = 0;
GT709.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.gambling = this.panelClose = this.soundAndMusic = this.soundOnly = this.soundOff = null;
this.spacerY = this.spacerX = 0;
GT709.prototype.initialConstructor_1.call(this, a);
},
getSoundOffButton_0: function () {
return this.soundOff;
},
setSoundOffButton_1: function (a) {
this.soundOff = a;
return this;
},
getSoundOnlyButton_0: function () {
return this.soundOnly;
},
setSoundOnlyButton_1: function (a) {
this.soundOnly = a;
return this;
},
getSoundAndMusicButton_0: function () {
return this.soundAndMusic;
},
setSoundAndMusicButton_1: function (a) {
this.soundAndMusic = a;
return this;
},
getGamblingButton_0: function () {
return this.gambling;
},
setGamblingButton_1: function (a) {
this.gambling = a;
return this;
},
getPanelCloseButton_0: function () {
return this.panelClose;
},
setPanelCloseButton_1: function (a) {
this.panelClose = a;
return this;
},
getSpacerX_0: function () {
return this.spacerX;
},
setSpacerX_1: function (a) {
this.spacerX = a;
return this;
},
getSpacerY_0: function () {
return this.spacerY;
},
setSpacerY_1: function (a) {
this.spacerY = a;
return this;
},
getImageResources_0: function () {
for (var a = GT709.prototype.getImageResources_0.call(this), b = this.getButtons_0(), d = 0; d < b.length; d++) null != b[d] && GT1533.prototype.vectorCopy_2(b[d].getImageResources_0(), a);
return a;
},
getSoundResources_0: function () {
for (var a = GT709.prototype.getSoundResources_0.call(this), b = this.getButtons_0(), d = 0; d < b.length; d++) null != b[d] && GT1533.prototype.vectorCopy_2(b[d].getSoundResources_0(), a);
return a;
},
getButtons_0: function () {
return [this.panelClose, this.soundAndMusic, this.soundOff, this.soundOnly, this.gambling];
},
},
"GT502",
[]
),
GT411 = GT502.extend(
{
initialConstructor_0: function () {
this.layoutRight = this.layoutLeft = null;
GT502.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.layoutRight = this.layoutLeft = null;
GT502.prototype.initialConstructor_1.call(this, a);
},
getLayoutLeftButton_0: function () {
return this.layoutLeft;
},
setLayoutLeftButton_1: function (a) {
this.layoutLeft = a;
return this;
},
getLayoutRightButton_0: function () {
return this.layoutRight;
},
setLayoutRightButton_1: function (a) {
this.layoutRight = a;
return this;
},
getImageResources_0: function () {
var a = GT502.prototype.getImageResources_0.call(this);
null != this.layoutLeft && GT1533.prototype.vectorCopy_2(this.layoutLeft.getImageResources_0(), a);
null != this.layoutRight && GT1533.prototype.vectorCopy_2(this.layoutRight.getImageResources_0(), a);
return a;
},
getSoundResources_0: function () {
var a = GT502.prototype.getSoundResources_0.call(this);
null != this.layoutLeft && GT1533.prototype.vectorCopy_2(this.layoutLeft.getSoundResources_0(), a);
null != this.layoutRight && GT1533.prototype.vectorCopy_2(this.layoutRight.getSoundResources_0(), a);
return a;
},
},
"GT411",
[]
),
GT1183 = GT709.extend(
{
initialConstructor_0: function () {
GT709.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
GT709.prototype.initialConstructor_1.call(this, a);
},
},
"GT1183",
[]
),
GT1126 = Class.extend(
{
initialConstructor_0: function () {
this.textAttributes = this.locationSizeAttributes = this.identifier = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_3: function (a, b, d) {
this.textAttributes = this.locationSizeAttributes = this.identifier = null;
this.identifier = a;
this.textAttributes = d;
this.locationSizeAttributes = b;
},
getTextAttributes_0: function () {
return this.textAttributes;
},
setTextAttributes_1: function (a) {
this.textAttributes = a;
return this;
},
getLocationSizeAttributes_0: function () {
return this.locationSizeAttributes;
},
setLocationSizeAttributes_1: function (a) {
this.locationSizeAttributes = a;
return this;
},
getIdentifier_0: function () {
return this.identifier;
},
setIdentifier_1: function (a) {
this.identifier = a;
return this;
},
},
"GT1126",
[]
),
GT268 = Class.extend(
{
initialConstructor_0: function () {
this.buttons = null;
this.lastDown = this.lastClick = 0;
this.mousedown = !1;
this.idPrefix = null;
this.keepChangedOnUp = !1;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
GT268.prototype.initialConstructor_3.call(this, a, b, !1);
},
initialConstructor_3: function (a, b, d) {
this.buttons = null;
this.lastDown = this.lastClick = 0;
this.mousedown = !1;
this.idPrefix = null;
this.keepChangedOnUp = !1;
this.buttons = a;
this.idPrefix = b;
this.keepChangedOnUp = d;
},
mouseEnter_1: function (a) {
this.mousedown && this.lastDown == a.getApplicationID_0() && this.setColorAndGradient_3(a.getApplicationID_0(), GT1634.prototype.black, null);
},
mouseLeave_1: function (a) {
this.mousedown &&
this.setColorAndGradient_3(
a.getApplicationID_0(),
GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getNormalButtonColor_0().create_0(),
GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getNormalButtonGradient_0().create_0()
);
},
down_1: function (a) {
this.mousedown = !0;
this.lastDown = a.getApplicationID_0();
this.setColorAndGradient_3(a.getApplicationID_0(), GT1634.prototype.black, null);
},
up_1: function (a) {
this.mousedown = !1;
(a.getApplicationID_0() == this.lastClick && this.keepChangedOnUp) ||
this.setColorAndGradient_3(
a.getApplicationID_0(),
GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getNormalButtonColor_0().create_0(),
GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getNormalButtonGradient_0().create_0()
);
},
setColorAndGradient_3: function (a, b, d) {
a = this.buttons.get_1(this.idPrefix + a);
null != a && ((a = a.getGuiTextObject_0()), a.setColor_1(b), a.setGradient_1(d));
},
drag_1: function (a) {},
click_1: function (a) {
this.lastClick = a.getApplicationID_0();
},
},
"GT268",
[GT1066]
),
GT188 = Class.extend(
{
initialConstructor_0: function () {
this.mainContainer = this.componentFactory = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.mainContainer = this.componentFactory = null;
this.componentFactory = new GT189(a);
this.mainContainer = a;
},
createUIComponents_1: function (a) {
a.setMinWidth_1(this.mainContainer.getWidth_0());
a.setMaxWidth_1(this.mainContainer.getWidth_0());
a.setMinHeight_1(this.mainContainer.getHeight_0());
a.setMaxHeight_1(this.mainContainer.getHeight_0());
var b = this.componentFactory.createConsoleTopContainer_1(a);
this.convertContainer_2(b.getGUIObject_0(), a.getChildren_0());
a.requestLayout_0();
},
convertContainer_2: function (a, b) {
for (var d = 0; d < b.size_0(); d++) {
var e = b.get_1(d);
if (instanceOf(e, GT461)) {
if (instanceOf(e, GT412)) {
var f = e;
this.componentFactory.createLayoutAreaVisual_4(f.getComponentX_0(), f.getComponentY_0(), f.getComponentWidth_0(), f.getComponentHeight_0());
} else instanceOf(e, GT559) && ((f = e), this.componentFactory.createOverlayAreaVisual_4(f.getComponentX_0(), f.getComponentY_0(), f.getComponentWidth_0(), f.getComponentHeight_0()));
this.convertContainer_2(a, e.getChildren_0());
} else this.createUIComponent_1(e);
}
},
createUIComponent_1: function (a) {
instanceOf(a, GT816)
? this.componentFactory.createConsoleOverlayText_1(a)
: instanceOf(a, GT1183)
? this.componentFactory.createConsoleText_1(a)
: instanceOf(a, GT710)
? this.componentFactory.createConsoleOverlayButton_1(a)
: instanceOf(a, GT1073)
? this.componentFactory.createConsoleButton_1(a)
: instanceOf(a, GT1018)
? this.componentFactory.createConsoleDisplay_1(a)
: instanceOf(a, GT502)
? this.componentFactory.createConsoleComponent_1(a)
: instanceOf(a, GT269) && ((a = a.getAdaptee_0()), this.createUIComponent_1(a));
},
getFactory_0: function () {
return this.componentFactory;
},
},
"GT188",
[GT263]
),
GT367 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
updateUi_1: function (a) {},
notifyDragStart_0: function () {},
notifyDragEnd_0: function () {},
handleDragStartAnimationFinished_0: function () {},
notifyLayoutAreaEnter_0: function () {},
notifyLayoutAreaLeave_0: function () {},
updateUiTime_1: function (a) {},
setComponentActive_1: function (a) {},
drawMask_1: function (a) {},
getDragArea_0: function () {
return null;
},
},
"GT367",
[GT754]
),
GT340 = GT367.extend(
{
initialConstructor_0: function () {
this.betItems = this.closePanel = this.betButtonConfig = this.betButton = this.betContainerBg = this.betContainer = null;
this.height = this.width = 0;
this.visibleArea = null;
this.previousLineSetting = 0;
this.previousBaseBets = null;
this.betItemImageHeight = this.previousBaseBet = 0;
this.betInfoContainer = null;
this.previousBetMultiplier = 0;
GT367.prototype.initialConstructor_0.call(this);
},
initialConstructor_3: function (a, b, d) {
this.betItems = this.closePanel = this.betButtonConfig = this.betButton = this.betContainerBg = this.betContainer = null;
this.height = this.width = 0;
this.visibleArea = null;
this.previousLineSetting = 0;
this.previousBaseBets = null;
this.betItemImageHeight = this.previousBaseBet = 0;
this.betInfoContainer = null;
this.previousBetMultiplier = 0;
GT367.prototype.initialConstructor_0.call(this);
this.betItems = new java_util_JavaScriptHashtable();
this.betButton = b;
this.betButtonConfig = d;
var e = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getFonts_1(GT1237.prototype.FCK_LABEL_LARGE),
f = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getLabelColor_0().create_0();
a = GT1389.prototype.getInstance_0().getDeviceStrategy_0();
var g = GT1533.prototype.getGradient_1(a.getConsoleTheme_0().getLabelGradient_0());
a = b.getX_0();
var k = b.getY_0();
this.betContainer = new GT1437(b.getParent_0(), a, k, 600, 100);
this.height = a = 2 * d.getSpacerY_0();
this.width = d.getGridButtonCols_0() * (d.getGridButtonTemplate_0().getComponentWidth_0() + d.getSpacerX_0()) + 3 * d.getSpacerX_0();
this.height += this.addCaption_3(e, f, g);
this.height += this.addBetElements_3(e, f, g);
d = new GT1073(d.getPanelCloseButton_0().getName_0(), d.getPanelCloseButton_0());
e = d.getButtonImage_0().create_1(GT1389.prototype.getInstance_0().getResourceManager_0());
f = this.width - e.getColumnWidth_0() - Math.div(3 * a, 2);
g = Math.div(a, 2);
d.setComponentX_1(f);
d.setComponentY_1(g);
d.setComponentSize_2(e.getColumnWidth_0() + a, e.getRowHeight_0() + a);
d.setSuppressBackground_1(!0);
this.closePanel = new GT413(this.betContainer, d);
this.closePanel.getGuiButtonObject_0().addButtonClickListener_1(b);
this.betContainer.resize_2(this.width, this.height);
this.createBackground_0();
b = new GT1559(this.betContainer, 0, 0, this.width, this.height);
b.setActive_1(!1);
b.setConsumingMouseEventsWhenInactive_1(!0);
b.reorderToPosition_1(0);
this.moveToProperPlace_0();
this.betContainer.hide_1(!0);
},
createBackground_0: function () {
GT1560.prototype.destroyIfAlive_1(this.betContainerBg);
var a = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0();
this.betContainerBg = new GT1439(
this.betContainer,
0,
0,
this.width,
this.height,
1,
a.getPopupRadius_0(),
a.getPopupEdges_0(),
a.getPopupBgColor_0().create_0(),
a.getPopupBorderColor_0().create_0(),
a.getPopupBgAlpha_0().create_0(),
a.getPopupBorderAlpha_0().create_0()
);
this.betContainerBg.reorderToPosition_1(0);
},
addCaption_3: function (a, b, d) {
var e = this.betButtonConfig.getGridButtonTemplate_0().getComponentHeight_0(),
f = this.betButtonConfig.getGridButtonTemplate_0().getComponentWidth_0(),
g = e + this.betButtonConfig.getSpacerY_0(),
k = new GT1437(this.betContainer, 2 * this.betButtonConfig.getSpacerX_0(), this.betButtonConfig.getSpacerY_0(), this.width - 4 * this.betButtonConfig.getSpacerX_0(), g);
a = new GT1123(k, 0, 0, 3 * f, e, a, b);
a.setGradient_1(d);
a.setVAlign_1(GT1489.prototype.CENTER);
a.setText_1(GT1389.prototype.getInstance_0().getText_1(GT1607.prototype.TT_TOTAL_BET));
this.betItems.put_2(GT340.prototype.CAPTION, a);
return g;
},
updateSizeFromImageAndPos_4: function (a, b, d, e) {
a.setComponentX_1(d);
a.setComponentY_1(e);
null != b && a.setComponentSize_2(b.getColumnWidth_0(), b.getRowHeight_0());
return a;
},
addBetElements_3: function (a, b, d) {
var e = this.betButtonConfig.getSpacerX_0(),
f = this.betButtonConfig.getSpacerY_0(),
g = this.betButtonConfig.getGridButtonRows_0(),
k = this.betButtonConfig.getGridButtonCols_0(),
m = this.betButtonConfig.getGridButtonTemplate_0().getComponentWidth_0(),
n = this.betButtonConfig.getGridButtonTemplate_0().getComponentHeight_0();
this.betItemImageHeight = n;
for (
var p = (g + 1) * (this.betItemImageHeight + f) + f, q = new GT1437(this.betContainer, 2 * e, this.height, this.width - 4 * e, p), r = new GT268(this.betItems, GT1607.prototype.BETMENU_BET, !0), t = 0, u = 0;
u < g;
u++
)
for (var B = 0; B < k; B++) {
t = u * k + B;
if (t >= this.betButtonConfig.getMaxNumberofGridButtons_0()) break;
var A = GT1607.prototype.BETMENU_BET + t,
C = this.updateSizeFromImageAndPos_4(this.betButtonConfig.getGridButtonTemplate_0(), null, B * (m + e), 0 + u * (n + f));
C.setFontKey_1(GT1237.prototype.FCK_BET_LINES_PANEL_BUTTON);
C.setButtonText_1("");
C.setTextAttributes_1(new GT817().insets_1(5));
C = new GT413(q, new GT1073(A, C));
C.getGuiTextObject_0().setBreakLines_1(!1);
C.getGuiButtonObject_0().addButtonListener_1(r);
C.getGuiButtonObject_0().setApplicationID_1(t);
this.betItems.put_2(A, C);
}
this.betInfoContainer = new GT1437(q, 0, p - n - f, q.getWidth_0(), n);
e = Integer.truncate_1(f);
f = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_DISPLAY);
new GT1440(this.betInfoContainer, 0, 0, q.getWidth_0(), 2, GT1634.prototype.white).setAlpha_1(f.getActive_0().getBorderAlpha_0());
f = new GT1123(this.betInfoContainer, 0, e, Math.div(q.getWidth_0(), 2), n - 15, a, b);
f.setGradient_1(d);
f.setVAlign_1(GT1489.prototype.CENTER);
this.betItems.put_2(GT340.prototype.TOTAL_BET, f);
g = GT1389.prototype.getInstance_0().getText_1(GT1607.prototype.TT_TOTAL_BET);
k = GT1389.prototype.getInstance_0().getFormatter_0();
instanceOf(k, GT414) && (k.getCurrencySymbol_0().isEmpty_0() || (g = g.concat_1(" (").concat_1(k.getCurrencySymbol_0()).concat_1(")")));
f.setText_1(g);
this.isBaseBetDisplayNeeded_0() &&
((f = Math.div(q.getWidth_0(), 2)),
(a = new GT1123(this.betInfoContainer, f, e, Math.div(q.getWidth_0(), 2), n - 15, a, b)),
a.setGradient_1(d),
a.setVAlign_1(GT1489.prototype.CENTER),
a.setHAlign_1(GT1488.prototype.RIGHT),
this.betItems.put_2(GT340.prototype.BET_PER_LINE, a));
return p;
},
isBaseBetDisplayNeeded_0: function () {
return !0;
},
ensureCommonTitleFonts_0: function () {
for (var a = 0, b = [GT340.prototype.CAPTION, GT340.prototype.BET_PER_LINE, GT340.prototype.TOTAL_BET], d = 0; d < b.length; d++) {
var e = this.betItems.get_1(b[d]);
null != e && (a = Math.max_2(a, e.getUsedFontIndex_0()));
}
for (d = 0; d < b.length; d++) (e = this.betItems.get_1(b[d])), null != e && e.getUsedFontIndex_0() != a && e.setFontSearchStartIndex_1(a);
},
moveToProperPlace_0: function () {
var a = 0,
b = 0;
null == this.visibleArea && (this.visibleArea = new GT1553(this.betContainer.getParent_0().getWidth_0(), this.betContainer.getParent_0().getHeight_0()));
a = Math.max_2(Math.div(this.visibleArea.width - this.betContainer.getWidth_0(), 2), 0);
b = Math.max_2(Math.div(this.visibleArea.height - this.betContainer.getHeight_0(), 2), 0);
this.betContainer.move_2(a, b);
},
setLocation_2: function (a, b) {},
setSize_2: function (a, b) {
GT1560.prototype.isAlive_1(this.betContainer) && this.betContainer.resize_2(a, b);
},
destroyObject_0: function () {
GT1560.prototype.destroyIfAlive_1(this.betContainer);
},
updateUi_1: function (a) {
var b = a.getViewData_1(GT1184.prototype.TRIGGERING_EVENT),
d = a.getViewData_1(GT1184.prototype.KEEP_DIALOGS_OPEN);
null == b ||
this.betContainer.isHidden_0() ||
b.getConsoleComponentKey_0().startsWith_1(GT1607.prototype.BETMENU_PREFIX) ||
(null != d && d.booleanValue_0()) ||
(b.getId_0() == GT1284.prototype.BET_MENU_BUTTON_PRESSED && (b.getId_0() != GT1284.prototype.BET_MENU_BUTTON_PRESSED || this.betButton == b.getSender_0())) ||
this.hide_0();
if (!this.betContainer.isHidden_0()) {
GT1389.prototype.getInstance_0().enableCatcher_0();
this.visibleArea = a.getViewData_1(GT1184.prototype.VISIBLE_AREA);
var e = a.getViewData_1(GT1184.prototype.NUMBER_OF_LINES),
f = !1,
g = 1;
null != e && e.intValue_0() != this.previousLineSetting && ((f = !0), (this.previousLineSetting = e.intValue_0()), (b = a.getViewData_1(GT1184.prototype.PLAYLINES)), (g = b.get_1(b.size_0() - 1)));
var k = a.getViewData_1(GT1184.prototype.BET_MULTIPLIERS).toArray_0(),
m = GT1389.prototype.getInstance_0().getDeviceStrategy_0().isBetSettingsChangeGameMode_0(),
b = m ? a.getViewData_1(GT1184.prototype.GAMEMODES) : a.getViewData_1(GT1184.prototype.BASE_BETS),
d = a.getViewData_1(GT1184.prototype.BASE_BET).intValue_0();
a = a.getViewData_1(GT1184.prototype.BET_MULTIPLIER).intValue_0();
if (m) {
var n = d,
d = a;
a = n;
}
var p = this.previousBaseBet != d,
q = this.previousBetMultiplier != a;
if (this.isBaseBetDisplayNeeded_0() && (p || q || f)) {
var e = GT1389.prototype.getInstance_0().getBetInfo_4(this.betButtonConfig.getBetInfoType_0(), d, a, e.intValue_0()),
n = this.betItems.get_1(GT340.prototype.BET_PER_LINE),
r = this.betItems.get_1(GT340.prototype.TOTAL_BET);
n.setText_1(e);
e = Math.max_2(r.getUsedFontIndex_0(), n.getUsedFontIndex_0());
r.setFontSearchStartIndex_1(e);
n.setFontSearchStartIndex_1(e);
}
if (null != b) {
n = this.hasBaseBetsChanged_1(b);
if ((f = f || n || q) || p) {
g = f ? this.getSmallestCommonFont_2(g, b[b.length - 1]) : 0;
for (p = 0; p < b.length; p++)
if (((q = b[p]), m && (q = k[p]), (e = this.formatMoney_1((a * q) / 1)), (r = GT1607.prototype.BETMENU_BET + p), (r = this.betItems.get_1(r)), null != r)) {
r.hide_1(!1);
var t = r.getGuiTextObject_0();
null != t &&
(f && t.setText_1(null),
d == q
? (t.setText_1(null), t.setGradient_1(null), t.setColor_1(GT1634.prototype.black))
: (this.previousBaseBet == q || n) && t.setGradient_1(GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getNormalButtonGradient_0().create_0()),
f || d == q) &&
(t.setFontSearchStartIndex_1(g), t.setText_1(e));
e = r.getGuiButtonObject_0();
if (null != e)
if (d == q) e.setChildForState_2(GT1236.prototype.INACTIVE, 2), e.setActive_1(!1);
else if (this.previousBaseBet == q || n) e.setChildForState_2(GT1236.prototype.INACTIVE, 3), e.setActive_1(!0);
}
for (p = b.length; p < this.betButtonConfig.getMaxNumberofGridButtons_0(); p++) (r = GT1607.prototype.BETMENU_BET + p), (r = this.betItems.get_1(r)), null != r && r.hide_1(!0);
n &&
0 < b.length &&
0 != d &&
((k = null == this.previousBaseBets ? this.betButtonConfig.getMaxNumberofGridButtons_0() - 1 : this.previousBaseBets.length),
(k = Math.div(k, this.betButtonConfig.getGridButtonCols_0()) - (0 == k % this.betButtonConfig.getGridButtonCols_0() ? 1 : 0)),
(m = Math.div(b.length, this.betButtonConfig.getGridButtonCols_0()) - (0 == b.length % this.betButtonConfig.getGridButtonCols_0() ? 1 : 0)),
(k -= m),
0 != k &&
((k *= this.betItemImageHeight + this.betButtonConfig.getSpacerY_0()),
(this.height -= k),
this.betContainer.resize_2(this.width, this.height),
this.moveObjectVertically_2(this.betInfoContainer, k),
this.createBackground_0()));
}
this.previousBetMultiplier = a;
this.previousBaseBet = d;
this.previousBaseBets = [].createArray(b.length).init(0);
java_lang_System.prototype.arraycopy_5(b, 0, this.previousBaseBets, 0, b.length);
this.ensureCommonTitleFonts_0();
}
}
},
moveObjectVertically_2: function (a, b) {
null != a && a.move_2(a.getX_0(), a.getY_0() - b);
},
hasBaseBetsChanged_1: function (a) {
if (null == a && null == this.previousBaseBets) return !1;
if ((null != a && null == this.previousBaseBets) || (null == a && null != this.previousBaseBets) || a.length != this.previousBaseBets.length) return !0;
for (var b = 0; b < a.length; b++) if (a[b] != this.previousBaseBets[b]) return !0;
return !1;
},
formatMoney_1: function (a) {
return this.formatMoney_2(a, !1);
},
formatMoney_2: function (a, b) {
var d = GT1389.prototype.getInstance_0().getFormatter_0();
return instanceOf(d, GT414) ? d.format_3(a, GT711.prototype.OMIT_CENT_FOR_WEAK_CURRENCIES_IF_ZERO, b) : d.format_1(a);
},
getSmallestCommonFont_2: function (a, b) {
var d = "",
d = (a * b) / 1,
e = GT1389.prototype.getInstance_0().getFormatter_0(),
d = instanceOf(e, GT414) ? e.format_3(d, GT711.prototype.OMIT_CENT_NEVER, !1) : e.format_1(d),
e = this.betItems.get_1(GT1607.prototype.BETMENU_BET + 0),
f = 0;
if (null != e) {
var g = e.getGuiTextObject_0();
null != g && (g.setText_1(d), (f = e.getGuiTextObject_0().getUsedFontIndex_0()), g.setText_1(""));
}
return f;
},
toggle_0: function () {
this.betContainer.hide_1(!this.betContainer.isHidden_0());
this.betContainer.isHidden_0() || this.betContainer.reorder_1(!0);
},
hide_0: function () {
this.betContainer.hide_1(!0);
},
isVisible_0: function () {
return !this.betContainer.isHidden_0();
},
drawMask_1: function (a) {},
},
"GT340",
[]
);
GT340.prototype.CAPTION = "caption";
GT340.prototype.BET_PER_LINE = "bet_per_line";
GT340.prototype.TOTAL_BET = "total_bet";
var GT310 = GT367.extend(
{
initialConstructor_0: function () {
this.guiContainer = null;
GT367.prototype.initialConstructor_0.call(this);
},
initialConstructor_5: function (a, b, d, e, f) {
this.guiContainer = null;
GT367.prototype.initialConstructor_0.call(this);
0 == e && 0 == f && ((e = a.getWidth_0()), (f = a.getHeight_0()));
this.guiContainer = new GT1437(a, b, d, e, f);
},
getGUIObject_0: function () {
return this.guiContainer;
},
setLocation_2: function (a, b) {
GT1560.prototype.isAlive_1(this.guiContainer) && this.guiContainer.move_2(a, b);
},
setSize_2: function (a, b) {
GT1560.prototype.isAlive_1(this.guiContainer) && this.guiContainer.resize_2(a, b);
},
destroyObject_0: function () {
GT1560.prototype.destroyIfAlive_1(this.guiContainer);
},
isVisible_0: function () {
return !this.guiContainer.isHidden_0();
},
drawMask_1: function (a) {},
},
"GT310",
[]
),
GT311 = GT367.extend(
{
initialConstructor_0: function () {
this.lineItems = this.closePanel = this.lineButtonConfig = this.lineButton = this.lineContainerBg = this.customContainer = this.lineContainer = null;
this.height = this.width = 0;
this.visibleArea = null;
this.lineItemImageHeight = this.previousBaseBet = 0;
this.lineGroupPanel = this.previousPlayLines = null;
this.offsetHasChanged = !1;
this.lineButtonsContainers = null;
this.borderSpacer = 0;
this.lineInfoContainer = null;
this.needToCreateButtons = this.resizeOnce = !1;
this.changeTextColorListener = null;
this.previousGameMode = this.previousBetMultiplier = 0;
GT367.prototype.initialConstructor_0.call(this);
},
initialConstructor_3: function (a, b, d) {
this.lineItems = this.closePanel = this.lineButtonConfig = this.lineButton = this.lineContainerBg = this.customContainer = this.lineContainer = null;
this.height = this.width = 0;
this.visibleArea = null;
this.lineItemImageHeight = this.previousBaseBet = 0;
this.lineGroupPanel = this.previousPlayLines = null;
this.offsetHasChanged = !1;
this.lineButtonsContainers = null;
this.borderSpacer = 0;
this.lineInfoContainer = null;
this.needToCreateButtons = this.resizeOnce = !1;
this.changeTextColorListener = null;
this.previousGameMode = this.previousBetMultiplier = 0;
GT367.prototype.initialConstructor_0.call(this);
this.lineItems = new java_util_JavaScriptHashtable();
this.lineButton = b;
this.lineButtonConfig = d;
a = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getFonts_1(GT1237.prototype.FCK_LABEL_LARGE);
var e = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getLabelColor_0().create_0(),
f = GT1389.prototype.getInstance_0().getDeviceStrategy_0(),
f = GT1533.prototype.getGradient_1(f.getConsoleTheme_0().getLabelGradient_0()),
g = b.getX_0(),
k = b.getY_0();
this.lineContainer = new GT1437(b.getParent_0(), g, k, 600, 100);
this.height = this.borderSpacer = this.getBorderSpacer_0();
this.width = d.getGridButtonCols_0() * (d.getGridButtonTemplate_0().getComponentWidth_0() + this.getSpacerX_0()) + 3 * this.getSpacerX_0();
g = new GT1073(d.getPanelCloseButton_0().getName_0(), d.getPanelCloseButton_0());
k = g.getButtonImage_0().create_1(GT1389.prototype.getInstance_0().getResourceManager_0());
this.height += k.getRowHeight_0() + this.borderSpacer;
this.height += this.addLineElements_0();
this.height += this.addCustomElements_3(this.lineContainer, this.width, this.height);
this.lineGroupPanel = new GT190(this.lineContainer, this, d, this.lineItems, this.width, this.height);
this.height += this.lineGroupPanel.getHeight_0();
this.height += this.makeInfoPanel_4(a, e, f, this.lineContainer);
d = this.width - k.getColumnWidth_0() - Math.div(3 * this.borderSpacer, 2);
var m = Math.div(this.borderSpacer, 2);
g.setComponentX_1(d);
g.setComponentY_1(m);
g.setComponentSize_2(k.getColumnWidth_0() + this.borderSpacer, k.getRowHeight_0() + this.borderSpacer);
g.setSuppressBackground_1(!0);
this.closePanel = new GT413(this.lineContainer, g);
this.closePanel.getGuiButtonObject_0().addButtonClickListener_1(b);
b = new GT1123(
this.lineContainer,
this.borderSpacer,
Math.div(this.borderSpacer, 2),
3 * this.lineButtonConfig.getGridButtonTemplate_0().getComponentWidth_0(),
this.lineButtonConfig.getGridButtonTemplate_0().getComponentHeight_0(),
a,
e
);
b.setGradient_1(f);
b.setVAlign_1(GT1489.prototype.CENTER);
b.setText_1(GT1389.prototype.getInstance_0().getText_1(null == this.lineButtonConfig.getButtonText_0() ? GT1607.prototype.TT_LINES : this.lineButtonConfig.getButtonText_0()));
this.lineItems.put_2(GT311.prototype.LINES_LABEL, b);
this.lineContainer.resize_2(this.width, this.height);
this.createBackground_2(this.width, this.height);
b = new GT1559(this.lineContainer, 0, 0, this.width, this.height);
b.setActive_1(!1);
b.setConsumingMouseEventsWhenInactive_1(!0);
b.reorderToPosition_1(0);
this.moveToProperPlace_0();
this.lineContainer.hide_1(!0);
this.needToCreateButtons = !0;
},
createBackground_2: function (a, b) {
GT1560.prototype.destroyIfAlive_1(this.lineContainerBg);
var d = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0();
this.lineContainerBg = new GT1439(
this.lineContainer,
0,
0,
a,
b,
1,
d.getPopupRadius_0(),
d.getPopupEdges_0(),
d.getPopupBgColor_0().create_0(),
d.getPopupBorderColor_0().create_0(),
d.getPopupBgAlpha_0().create_0(),
d.getPopupBorderAlpha_0().create_0()
);
this.lineContainerBg.reorderToPosition_1(0);
},
updateSizeFromImageAndPos_4: function (a, b, d, e) {
a.setComponentX_1(d);
a.setComponentY_1(e);
null != b && a.setComponentSize_2(b.getColumnWidth_0(), b.getRowHeight_0());
return a;
},
getSpacerX_0: function () {
return this.lineButtonConfig.getSpacerX_0();
},
getSpacerY_0: function () {
return this.lineButtonConfig.getSpacerY_0();
},
getBorderSpacer_0: function () {
return 2 * this.getSpacerY_0();
},
getLineItemImageHeight_0: function () {
return this.lineItemImageHeight;
},
getButtonByKey_1: function (a) {
return this.lineItems.get_1(a);
},
setButtonByKey_2: function (a, b) {
GT1650.prototype.assertExp_2(null != a && null != b, "Parameters must be provided, cannot be null.");
this.lineItems.put_2(a, b);
},
addCustomElements_3: function (a, b, d) {
return 0;
},
addLineElements_0: function () {
var a = this.getSpacerX_0(),
b = this.getSpacerY_0(),
d = this.lineButtonConfig.getGridButtonRows_0(),
e = this.lineButtonConfig.getGridButtonCols_0();
this.lineItemImageHeight = this.lineButtonConfig.getGridButtonTemplate_0().getComponentHeight_0();
var b = d * (this.lineItemImageHeight + b),
f = new GT1437(this.lineContainer, 2 * a, this.height, this.width - 4 * a, b);
this.changeTextColorListener = new GT268(this.lineItems, GT1607.prototype.LINEMENU_LINE);
var g = this.calcMaxNumberOfContainers_0();
this.lineButtonsContainers = [].createArray(g);
for (g = 0; g < this.lineButtonsContainers.length; g++) this.lineButtonsContainers[g] = new GT1437(f, 0, 0, this.width - 4 * a, b);
this.createButtonArray_3(d, e, 1);
return b;
},
createButtonArray_3: function (a, b, d) {
for (
var e = this.lineButtonConfig.getSpacerX_0(),
f = this.lineButtonConfig.getSpacerY_0(),
g = this.lineButtonConfig.getGridButtonTemplate_0().getComponentWidth_0(),
k = this.lineButtonConfig.getGridButtonTemplate_0().getComponentHeight_0(),
m = 0,
n = 0;
n < a * d;
n++
)
for (var p = 0; p < b; p++) {
m = n * b + p;
if (m >= GT311.prototype.MAX_LINE_BUTTONS) break;
var q = GT1607.prototype.LINEMENU_LINE + m;
if (!this.lineItems.containsKey_1(q)) {
var r = Math.div(m, this.lineButtonConfig.getMaxNumberofGridButtons_0()),
t = p * (g + e),
u = 0 + (n - r * a) * (k + f);
GT1650.prototype.assertExp_2(0 <= u, "Wrong configuration. Please check grid rows, columns and max settings.");
m = this.makeGuiComponentButton_5(m, q, this.lineButtonsContainers[r], t, u);
this.lineItems.put_2(q, m);
}
}
},
makeGuiComponentButton_5: function (a, b, d, e, f) {
e = this.updateSizeFromImageAndPos_4(this.lineButtonConfig.getGridButtonTemplate_0(), null, e, f);
e.setFontKey_1(GT1237.prototype.FCK_BET_LINES_PANEL_BUTTON);
e.setButtonText_1(null);
f = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getNormalButtonColor_0().create_0();
e.setTextAttributes_1(new GT817().insets_1(5).color_1(f));
b = new GT413(d, new GT1073(b, e));
b.getGuiTextObject_0().setBreakLines_1(!1);
b.getGuiButtonObject_0().addButtonListener_1(this.changeTextColorListener);
b.getGuiButtonObject_0().setApplicationID_1(a);
return b;
},
makeInfoPanel_4: function (a, b, d, e) {
var f = this.width - 4 * this.lineButtonConfig.getSpacerX_0(),
g = this.lineItemImageHeight + Integer.truncate_1(1.5 * this.lineButtonConfig.getSpacerY_0());
this.lineInfoContainer = new GT1437(e, 2 * this.lineButtonConfig.getSpacerX_0(), this.height, f, g);
e = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_DISPLAY);
new GT1440(this.lineInfoContainer, 0, 0, f, 2, GT1634.prototype.white).setAlpha_1(e.getActive_0().getBorderAlpha_0());
f = new GT1123(this.lineInfoContainer, 0, Math.div(this.lineButtonConfig.getSpacerY_0(), 2), Math.div(this.lineInfoContainer.getWidth_0(), 2), this.lineItemImageHeight, a, b);
f.setGradient_1(d);
f.setVAlign_1(GT1489.prototype.CENTER);
this.lineItems.put_2(GT311.prototype.TOTAL_BET, f);
e = GT1389.prototype.getInstance_0().getText_1(GT1607.prototype.TT_TOTAL_BET);
f.setText_1(e);
this.isBaseBetDisplayNeeded_0() &&
((f = Math.div(this.lineInfoContainer.getWidth_0(), 2)),
(e = Math.div(this.lineButtonConfig.getSpacerY_0(), 2)),
(a = new GT1123(this.lineInfoContainer, f, e, Math.div(this.lineInfoContainer.getWidth_0(), 2), this.lineItemImageHeight, a, b)),
a.setGradient_1(d),
a.setVAlign_1(GT1489.prototype.CENTER),
a.setHAlign_1(GT1488.prototype.RIGHT),
this.lineItems.put_2(GT311.prototype.BET_PER_LINE, a));
return g;
},
calcMaxNumberOfContainers_0: function () {
return Math.div(Math.max_2(GT311.prototype.MAX_LINE_BUTTONS - 1, 0), this.lineButtonConfig.getMaxNumberofGridButtons_0()) + 1;
},
isBaseBetDisplayNeeded_0: function () {
return !0;
},
ensureCommonTitleFonts_0: function () {
for (var a = 0, b = [GT311.prototype.LINES_LABEL, GT311.prototype.BET_PER_LINE, GT311.prototype.TOTAL_BET], d = 0; d < b.length; d++) {
var e = this.lineItems.get_1(b[d]);
null != e && (a = Math.max_2(a, e.getUsedFontIndex_0()));
}
for (d = 0; d < b.length; d++) (e = this.lineItems.get_1(b[d])), null != e && e.getUsedFontIndex_0() != a && e.setFontSearchStartIndex_1(a);
},
moveToProperPlace_0: function () {
var a = 0,
b = 0;
null == this.visibleArea && (this.visibleArea = new GT1553(this.lineContainer.getParent_0().getWidth_0(), this.lineContainer.getParent_0().getHeight_0()));
a = Math.max_2(Math.div(this.visibleArea.width - this.lineContainer.getWidth_0(), 2), 0);
b = Math.max_2(Math.div(this.visibleArea.height - this.lineContainer.getHeight_0(), 2), 0);
this.lineContainer.move_2(a, b);
},
setLocation_2: function (a, b) {},
setSize_2: function (a, b) {
GT1560.prototype.isAlive_1(this.lineContainer) && this.lineContainer.resize_2(a, b);
},
destroyObject_0: function () {
GT1560.prototype.destroyIfAlive_1(this.lineContainer);
},
shallBeHidden_1: function (a) {
var b = a.getViewData_1(GT1184.prototype.TRIGGERING_EVENT),
d = a.getViewData_1(GT1184.prototype.KEEP_DIALOGS_OPEN);
a = a.getViewData_1(GT1184.prototype.UPDATE_REASON);
return null != b &&
!this.lineContainer.isHidden_0() &&
((!GT1607.prototype.UNDEFINED_KEY.equals_1(b.getConsoleComponentKey_0()) &&
(b.getId_0() != GT1284.prototype.LINE_MENU_BUTTON_PRESSED || (b.getId_0() == GT1284.prototype.LINE_MENU_BUTTON_PRESSED && this.lineButton != b.getSender_0()))) ||
(null != d && !d.booleanValue_0() && GT1184.prototype.UR_MODAL_OPEN.equals_1(a)))
? !0
: !1;
},
updateUi_1: function (a) {
a.getViewData_1(GT1184.prototype.TRIGGERING_EVENT);
this.shallBeHidden_1(a) && this.hide_0();
if (!this.lineContainer.isHidden_0()) {
GT1389.prototype.getInstance_0().enableCatcher_0();
this.visibleArea = a.getViewData_1(GT1184.prototype.VISIBLE_AREA);
var b = a.getViewData_1(GT1184.prototype.NUMBER_OF_LINES),
d = a.getViewData_1(GT1184.prototype.GAMEMODE),
e = a.getViewData_1(GT1184.prototype.PLAYLINES);
if (null != b && null != e) {
var f = e.toArray_0(),
g = a.getViewData_1(GT1184.prototype.GAMEMODES);
if (this.needToCreateButtons) {
var k = this.lineButtonConfig.getGridButtonRows_0(),
m = this.lineButtonConfig.getGridButtonCols_0();
this.createButtonArray_3(k, m, Math.div(Math.max_2(f.length - 1, 0), this.lineButtonConfig.getMaxNumberofGridButtons_0()) + 1);
this.needToCreateButtons = !1;
}
m = this.lineGroupPanel.isVisible_0();
this.lineGroupPanel.updateUi_1(a);
k = this.lineGroupPanel.isVisible_0();
m != k &&
((m = this.lineGroupPanel.getHeight_0() - this.lineButtonConfig.getSpacerY_0()),
k
? (this.lineInfoContainer.move_2(this.lineInfoContainer.getX_0(), this.lineInfoContainer.getY_0() + m), this.lineContainer.resize_2(this.lineContainer.getWidth_0(), this.lineContainer.getHeight_0() + m))
: (this.lineInfoContainer.move_2(this.lineInfoContainer.getX_0(), this.lineInfoContainer.getY_0() - m), this.lineContainer.resize_2(this.lineContainer.getWidth_0(), this.lineContainer.getHeight_0() - m)),
this.createBackground_2(this.lineContainer.getWidth_0(), this.lineContainer.getHeight_0()));
m = a.getViewData_1(GT1184.prototype.BASE_BET).intValue_0();
a = a.getViewData_1(GT1184.prototype.BET_MULTIPLIER).intValue_0();
var b = b.intValue_0(),
d = d.intValue_0(),
n = this.previousBaseBet != m,
k = this.previousBetMultiplier != a;
if (this.isBaseBetDisplayNeeded_0() && (n || k)) {
var k = GT1389.prototype.getInstance_0().getBetInfo_4(this.lineButtonConfig.getBetInfoType_0(), m, a, b),
p = this.lineItems.get_1(GT311.prototype.BET_PER_LINE),
q = this.lineItems.get_1(GT311.prototype.TOTAL_BET);
p.setText_1(k);
k = GT1389.prototype.getInstance_0().getBetInfo_4(GT1533.prototype.INFO_TOTAL_BET, m, a, b);
q.setText_1(k);
k = Math.max_2(q.getUsedFontIndex_0(), p.getUsedFontIndex_0());
q.setFontSearchStartIndex_1(k);
p.setFontSearchStartIndex_1(k);
}
if (null != f) {
if (n || this.offsetHasChanged) {
this.offsetHasChanged = !1;
for (n = m = 0; n < f.length; n++)
(p = f[n]),
(k = this.lineButton.getLineValueText_3(p, n, e)),
p == b && (m = Math.div(n, this.lineButtonConfig.getMaxNumberofGridButtons_0())),
(p = GT1607.prototype.LINEMENU_LINE + n),
(p = this.lineItems.get_1(p)),
null != p &&
(p.hide_1(!1),
(q = p.getGuiTextObject_0()),
null != q && (this.updateButtonState_5(p.getGuiButtonObject_0(), p.getGuiTextObject_0(), d, this.previousGameMode, g[n]), null == q.getText_0() && q.setText_1(k)));
this.setGridVisible_1(m);
0 != Math.div(f.length, this.lineButtonConfig.getMaxNumberofGridButtons_0()) ||
this.resizeOnce ||
((e = Math.div(this.lineButtonConfig.getMaxNumberofGridButtons_0() - f.length, this.lineButtonConfig.getGridButtonCols_0())),
0 < e &&
((this.resizeOnce = !0),
(e *= this.lineItemImageHeight + this.lineButtonConfig.getSpacerY_0()),
this.lineInfoContainer.move_2(this.lineInfoContainer.getX_0(), this.lineInfoContainer.getY_0() - e),
null != this.customContainer && this.customContainer.move_2(this.customContainer.getX_0(), this.customContainer.getY_0() - e),
this.lineContainer.resize_2(this.lineContainer.getWidth_0(), this.lineContainer.getHeight_0() - e),
this.lineContainer.move_2(this.lineContainer.getX_0(), this.lineContainer.getY_0() + Math.div(e, 2)),
this.createBackground_2(this.lineContainer.getWidth_0(), this.lineContainer.getHeight_0())));
for (n = f.length; n < GT311.prototype.MAX_LINE_BUTTONS; n++) (p = GT1607.prototype.LINEMENU_LINE + n), (p = this.lineItems.get_1(p)), null != p && p.hide_1(!0);
}
this.previousGameMode = d;
this.previousBetMultiplier = a;
this.previousPlayLines = [].createArray(f.length).init(0);
java_lang_System.prototype.arraycopy_5(f, 0, this.previousPlayLines, 0, f.length);
this.ensureCommonTitleFonts_0();
}
}
}
},
updateButtonState_5: function (a, b, d, e, f) {
if (null != a) {
if (e == f || -1 == e)
a.setChildForState_2(GT1236.prototype.INACTIVE, 0),
a.setActive_1(!0),
null != b && b.setGradient_1(GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getNormalButtonGradient_0().create_0());
d == f && (a.setChildForState_2(GT1236.prototype.INACTIVE, 2), a.setActive_1(!1), null != b && ((a = b.getText_0()), b.setText_1(null), b.setGradient_1(null), b.setColor_1(GT1634.prototype.black), b.setText_1(a)));
}
},
toggle_0: function () {
this.lineContainer.hide_1(!this.lineContainer.isHidden_0());
this.lineContainer.isHidden_0() || this.lineContainer.reorder_1(!0);
},
hide_0: function () {
this.lineContainer.hide_1(!0);
},
isVisible_0: function () {
return !this.lineContainer.isHidden_0();
},
drawMask_1: function (a) {},
switchGroupPanelTo_1: function (a) {
this.offsetHasChanged = !0;
this.lineGroupPanel.setLineGroupSelection_1(a);
this.setGridVisible_1(a);
},
setGridVisible_1: function (a) {
for (var b = 0; b < this.lineButtonsContainers.length; b++) b == a ? this.lineButtonsContainers[b].hide_1(!1) : this.lineButtonsContainers[b].hide_1(!0);
},
},
"GT311",
[]
),
GT190 = GT367.extend(
{
initialConstructor_0: function () {
this.lineItems = this.lineButtonConfig = this.linePanel = this.lineGroupContainer = null;
this.currentMaxGrid = this.lineGroupSelection = this.y_offset = this.height = this.width = 0;
GT367.prototype.initialConstructor_0.call(this);
},
initialConstructor_6: function (a, b, d, e, f, g) {
this.lineItems = this.lineButtonConfig = this.linePanel = this.lineGroupContainer = null;
this.currentMaxGrid = this.lineGroupSelection = this.y_offset = this.height = this.width = 0;
GT367.prototype.initialConstructor_0.call(this);
this.lineItems = e;
this.linePanel = b;
this.lineButtonConfig = d;
this.width = f;
this.y_offset = g;
this.height += this.addLineGroupElements_1(a);
this.lineGroupSelection = -1;
},
addLineGroupElements_1: function (a) {
var b = this.lineButtonConfig.getGridButtonTemplate_0().getComponentHeight_0(),
d = this.lineButtonConfig.getGridButtonTemplate_0().getComponentWidth_0(),
b = b + 2 * this.lineButtonConfig.getSpacerY_0(),
e = this.width - 4 * this.lineButtonConfig.getSpacerX_0();
this.lineGroupContainer = new GT1437(a, 2 * this.lineButtonConfig.getSpacerX_0(), this.y_offset + this.lineButtonConfig.getSpacerY_0(), e, b);
a = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_DISPLAY);
new GT1440(this.lineGroupContainer, 0, 0, e, 2, GT1634.prototype.white).setAlpha_1(a.getActive_0().getBorderAlpha_0());
a = this.lineButtonConfig.getSpacerY_0() - 5;
for (var e = this.calcMaxGrid_0(), f = 0; f < e; f++) {
var g = Math.max_2(f - 1, 0) * this.lineButtonConfig.getMaxNumberofGridButtons_0() + 1,
k = Math.max_2(f, 1) * this.lineButtonConfig.getMaxNumberofGridButtons_0();
this.makePagingButton_8(0, a, GT1607.prototype.LINEMENU_GROUP_BACK + f, this.lineButtonConfig.getButtonImagePagingBack_0(), GT1073.prototype.IMAGE_LEFT, g, k, Math.max_2(f - 1, 0));
g = Math.min_2(f + 1, e) * this.lineButtonConfig.getMaxNumberofGridButtons_0() + 1;
k = Math.min_2(f + 2, e) * this.lineButtonConfig.getMaxNumberofGridButtons_0();
k = Math.min_2(GT311.prototype.MAX_LINE_BUTTONS, k);
this.makePagingButton_8(
this.width - 4 * this.lineButtonConfig.getSpacerX_0() - d,
a,
GT1607.prototype.LINEMENU_GROUP_NEXT + f,
this.lineButtonConfig.getButtonImagePagingNext_0(),
GT1073.prototype.IMAGE_RIGHT,
g,
k,
Math.min_2(f + 1, e - 1)
);
}
return b;
},
click_1: function (a) {
a = a.getApplicationID_0();
this.linePanel.switchGroupPanelTo_1(a);
},
makePagingButton_8: function (a, b, d, e, f, g, k, m) {
var n = e.create_1(GT1389.prototype.getInstance_0().getResourceManager_0()),
p = new GT1073(d, this.lineButtonConfig.getGridButtonTemplate_0());
p.setButtonImage_1(e);
p.setImagePosition_1(f);
p.setComponentX_1(a);
p.setComponentY_1(b);
p.setSuppressBackground_1(!0);
p.setSuppressColorTransformation_1(!1);
p.setColorSetKey_1(GT1019.prototype.CCK_BUTTON_DEFAULT);
p.setButtonText_1("" + g + "-" + k);
a = f == GT1073.prototype.IMAGE_LEFT ? new GT817().insets_4(n.getColumnWidth_0(), 0, 0, 0) : new GT817().insets_4(0, n.getColumnWidth_0(), 0, 0);
p.setTextAttributes_1(a);
p = new GT413(this.lineGroupContainer, p);
p.getGuiButtonObject_0().removeButtonClickListener_1(p);
p.getGuiButtonObject_0().addButtonClickListener_1(this);
p.getGuiButtonObject_0().setApplicationID_1(m);
this.lineItems.put_2(d, p);
},
calcMaxGrid_0: function () {
return Math.div(GT311.prototype.MAX_LINE_BUTTONS, this.lineButtonConfig.getMaxNumberofGridButtons_0());
},
getHeight_0: function () {
return this.height;
},
setLineGroupSelection_1: function (a) {
this.lineGroupSelection = a;
for (a = 0; a < this.calcMaxGrid_0(); a++)
this.updatePagingButtons_3(GT1607.prototype.LINEMENU_GROUP_BACK, a, 0 < this.lineGroupSelection), this.updatePagingButtons_3(GT1607.prototype.LINEMENU_GROUP_NEXT, a, this.lineGroupSelection < this.currentMaxGrid);
},
updatePagingButtons_3: function (a, b, d) {
a = this.lineItems.get_1(a + b);
null != a && ((b = b != this.lineGroupSelection), a.hide_1(b), a.getGuiButtonObject_0().hide_1(b), a.setComponentActive_1(!b && d));
},
setLocation_2: function (a, b) {},
setSize_2: function (a, b) {},
destroyObject_0: function () {
GT1560.prototype.destroyIfAlive_1(this.lineGroupContainer);
},
updateUi_1: function (a) {
var b = a.getViewData_1(GT1184.prototype.PLAYLINES);
a = a.getViewData_1(GT1184.prototype.NUMBER_OF_LINES);
if (null != b && null != a)
if (((b = b.toArray_0()), (a = a.intValue_0()), b.length <= this.lineButtonConfig.getMaxNumberofGridButtons_0())) this.lineGroupContainer.hide_1(!0);
else {
this.lineGroupContainer.hide_1(!1);
for (var d = 0, d = b.length - 1; 0 <= d && b[d] != a; d--);
this.lineGroupSelection = Math.div(d, this.lineButtonConfig.getMaxNumberofGridButtons_0());
for (a = Math.div(b.length - 1, this.lineButtonConfig.getMaxNumberofGridButtons_0()) + 1; a <= Math.div(GT311.prototype.MAX_LINE_BUTTONS, this.lineButtonConfig.getMaxNumberofGridButtons_0()); a++)
this.destroyButton_1(GT1607.prototype.LINEMENU_GROUP_BACK + a), this.destroyButton_1(GT1607.prototype.LINEMENU_GROUP_NEXT + a);
for (a = 0; a <= Math.div(b.length - 1, this.lineButtonConfig.getMaxNumberofGridButtons_0()); a++) {
var e = this.lineItems.get_1(GT1607.prototype.LINEMENU_GROUP_BACK + a),
d = this.lineItems.get_1(GT1607.prototype.LINEMENU_GROUP_NEXT + a);
if (null != e && null != d) {
var e = (a + 1) * this.lineButtonConfig.getMaxNumberofGridButtons_0() + 1,
f = (a + 2) * this.lineButtonConfig.getMaxNumberofGridButtons_0();
f > b.length &&
(a == Math.div(b.length - 1, this.lineButtonConfig.getMaxNumberofGridButtons_0()) && (e -= this.lineButtonConfig.getMaxNumberofGridButtons_0()),
(f = b[b.length - 1]),
(e = "" + e + "-" + f),
e.equals_1(d.getGuiTextObject_0().getText_0()) || d.getGuiTextObject_0().setText_1(e),
a == Math.div(b.length, this.lineButtonConfig.getMaxNumberofGridButtons_0()) && d.getGuiButtonObject_0().setApplicationID_1(a));
this.currentMaxGrid = Math.div(b.length - 1, this.lineButtonConfig.getMaxNumberofGridButtons_0());
this.updatePagingButtons_3(GT1607.prototype.LINEMENU_GROUP_BACK, a, 0 < this.lineGroupSelection);
this.updatePagingButtons_3(GT1607.prototype.LINEMENU_GROUP_NEXT, a, this.lineGroupSelection < this.currentMaxGrid);
}
}
}
},
destroyButton_1: function (a) {
a = this.lineItems.remove_1(a);
GT1560.prototype.destroyIfAlive_1(a);
},
isVisible_0: function () {
return !this.lineGroupContainer.isHidden_0();
},
},
"GT190",
[GT807]
);
GT311.prototype.MAX_LINE_BUTTONS = 100;
GT311.prototype.LINES_LABEL = "lines_label";
GT311.prototype.BET_PER_LINE = "bet_per_line";
GT311.prototype.TOTAL_BET = "total_bet";
var GT503 = GT367.extend(
{
initialConstructor_0: function () {
this.menuItems = this.menuButton = this.menuContainerBg = this.menuContainer = this.versionNumber = null;
GT367.prototype.initialConstructor_0.call(this);
},
initialConstructor_3: function (a, b, d) {
this.menuItems = this.menuButton = this.menuContainerBg = this.menuContainer = this.versionNumber = null;
GT367.prototype.initialConstructor_0.call(this);
this.menuButton = b;
a = b.getX_0();
var e = b.getY_0();
this.menuContainer = new GT1437(b.getParent_0(), a, e, 10, 10);
a = this.getMenuItems_1(d);
this.menuItems = new java_util_JavaScriptHashtable();
for (e = d = b = 0; e < a.length; e++) {
var f = a[e];
0 == b && (b = f.getWidth_0());
0 == d && (d = f.getHeight_0());
f.move_2(10, 20 + e * (d + 10));
this.menuItems.put_2(f.getIdentifier_0(), f);
}
a = a.length * d + 10 * (a.length + 3);
var e = b + 20,
f = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0(),
g = f.getConsoleFont_0().getFonts_1(GT1237.prototype.FCK_LABEL_VERSION);
this.versionNumber = null;
if ("1".equals_1(GT1389.prototype.getInstance_0().getSkinManager_0().getParameter_1(GT503.prototype.PARAM_SHOW_VERSION)) && null != g) {
var k = Math.min_2(g.length, 1);
d = Math.div(d, 3);
this.versionNumber = new GT1490(this.menuContainer, 10, a - Math.div(30, 2), b, d, g[k], f.getLabelColor_0().create_0());
this.versionNumber.setHAlign_1(GT1488.prototype.RIGHT);
this.versionNumber.setVAlign_1(GT1489.prototype.TOP);
a += d - 10;
}
this.menuContainer.resize_2(e, a);
this.menuContainerBg = new GT1439(
this.menuContainer,
0,
0,
e,
a,
1,
f.getPopupRadius_0(),
f.getPopupEdges_0(),
f.getPopupBgColor_0().create_0(),
f.getPopupBorderColor_0().create_0(),
f.getPopupBgAlpha_0().create_0(),
f.getPopupBorderAlpha_0().create_0()
);
this.menuContainerBg.reorderToPosition_1(0);
b = new GT1559(this.menuContainer, 0, 0, e, a);
b.setActive_1(!1);
b.setConsumingMouseEventsWhenInactive_1(!0);
b.reorderToPosition_1(0);
this.moveMenuToProperPlace_0();
this.menuContainer.hide_1(!0);
},
moveMenuToProperPlace_0: function () {
var a = 0,
b = 0,
a = this.menuButton.getX_0(),
b = this.menuButton.getY_0(),
a =
a < Math.div(this.menuButton.getParent_0().getWidth_0(), 2)
? b > this.menuContainer.getHeight_0()
? a
: a + this.menuButton.getWidth_0()
: b > this.menuContainer.getHeight_0()
? a + this.menuButton.getWidth_0() - this.menuContainer.getWidth_0()
: a - this.menuContainer.getWidth_0(),
b =
b > Math.div(this.menuButton.getParent_0().getHeight_0(), 2)
? b > this.menuContainer.getHeight_0() + 10
? b - this.menuContainer.getHeight_0() - 10
: b + this.menuButton.getHeight_0() + 10
: b > this.menuContainer.getHeight_0() + 10
? b - this.menuContainer.getHeight_0() - 10
: b;
a + this.menuContainer.getWidth_0() > this.menuButton.getParent_0().getWidth_0()
? (a = this.menuButton.getParent_0().getWidth_0() - this.menuContainer.getWidth_0() - 10)
: a < this.menuButton.getParent_0().getX_0() && (a = this.menuButton.getParent_0().getX_0() + 10);
b + this.menuContainer.getHeight_0() > this.menuButton.getParent_0().getHeight_0() - 164
? (b = this.menuButton.getParent_0().getHeight_0() - this.menuContainer.getHeight_0() - 10 - 164)
: b < this.menuButton.getParent_0().getY_0() && (b = this.menuButton.getParent_0().getY_0() + 10);
this.menuContainer.move_2(a, b);
},
getMenuItems_1: function (a) {
for (var b = [].createArray(a.size_0()), d = 0, e = 0; e < a.size_0(); e++) {
var f = a.get_1(e),
f = new GT413(this.menuContainer, f);
b[e] = f;
f = f.getGuiTextObject_0().getUsedFontIndex_0();
d < f && (d = f);
}
for (e = 0; e < b.length; e++) b[e].getGuiTextObject_0().setFontSearchStartIndex_1(d);
return b;
},
setLocation_2: function (a, b) {
GT1560.prototype.isAlive_1(this.menuContainer) && this.moveMenuToProperPlace_0();
},
setSize_2: function (a, b) {
GT1560.prototype.isAlive_1(this.menuContainer) && this.menuContainer.resize_2(a, b);
},
destroyObject_0: function () {
GT1560.prototype.destroyIfAlive_1(this.menuContainer);
},
updateUi_1: function (a) {
var b = a.getViewData_1(GT1184.prototype.TRIGGERING_EVENT),
d = a.getViewData_1(GT1184.prototype.KEEP_DIALOGS_OPEN);
if (null != b && !this.menuContainer.isHidden_0()) {
var e = b.getConsoleComponentKey_0(),
e = GT1607.prototype.MENUITEM_SETTINGS.equals_1(e);
(b.getId_0() == GT1284.prototype.MENU_BUTTON_PRESSED && !e) || (null != d && d.booleanValue_0()) || this.hide_0();
}
this.menuContainer.isHidden_0() || GT1389.prototype.getInstance_0().enableCatcher_0();
this.setMenuButtonState_2(GT1607.prototype.MENUITEM_EXIT, a.getRules_0().get_1(GT1185.prototype.VDR_EXIT_ALLOWED));
this.setMenuButtonState_2(GT1607.prototype.MENUITEM_REPLAY, a.getRules_0().get_1(GT1185.prototype.VDR_REPLAY_ALLOWED));
this.setMenuButtonState_2(GT1607.prototype.MENUITEM_DEPOSIT, a.getRules_0().get_1(GT1185.prototype.VDR_PAYIN_ALLOWED));
b = a.getRules_0().get_1(GT1185.prototype.VDR_VR_PAYTABLE);
this.setMenuButtonState_2(GT1607.prototype.MENUITEM_PAYTABLE, new Boolean(b.isActive_0()));
this.updateVersionNumber_1(a);
},
updateVersionNumber_1: function (a) {
null != this.versionNumber && null == this.versionNumber.getText_0() && ((a = a.getViewData_1(GT1184.prototype.VERSION)), this.versionNumber.setText_1("v " + a));
},
setMenuButtonState_2: function (a, b) {
if (null != b) {
var d = this.menuItems.get_1(a);
null != d && d.setActive_1(b.booleanValue_0());
}
},
toggle_0: function () {
this.menuContainer.hide_1(!this.menuContainer.isHidden_0());
this.menuContainer.isHidden_0() || this.menuContainer.reorder_1(!0);
},
hide_0: function () {
this.menuContainer.hide_1(!0);
},
isVisible_0: function () {
return !this.menuContainer.isHidden_0();
},
drawMask_1: function (a) {},
},
"GT503",
[]
);
GT503.prototype.PARAM_SHOW_VERSION = "clientversion.show";
var GT270 = GT367.extend(
{
initialConstructor_0: function () {
this.nameTextFonts = this.name = this.borders = this.parent = this.guiObjectNameText = this.guiObject = null;
this.padding = this.alpha = 0;
this.toolTip = this.buttonText = this.buttonIcon = null;
this.borderRight = this.borderLeft = !1;
this.buttonTextWidth = this.buttonTextOffset = this.width = this.height = 0;
this.colorSetKey = null;
this.overlayImageOffset = this.overlayImagePosition = 0;
this.suppressBackgorund = !1;
GT367.prototype.initialConstructor_0.call(this);
},
initialConstructor_11: function (a, b, d, e, f, g, k, m, n, p, q) {
this.nameTextFonts = this.name = this.borders = this.parent = this.guiObjectNameText = this.guiObject = null;
this.padding = this.alpha = 0;
this.toolTip = this.buttonText = this.buttonIcon = null;
this.borderRight = this.borderLeft = !1;
this.buttonTextWidth = this.buttonTextOffset = this.width = this.height = 0;
this.colorSetKey = null;
this.overlayImageOffset = this.overlayImagePosition = 0;
this.suppressBackgorund = !1;
GT367.prototype.initialConstructor_0.call(this);
this.parent = a;
this.name = b.getName_0();
this.colorSetKey = m;
this.overlayImageOffset = p;
this.overlayImagePosition = n;
this.suppressBackgorund = q;
this.alpha = 255;
this.padding = b.getComponentSpacing_0();
this.borders = [].createArray(2);
this.nameTextFonts = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getFonts_1(GT1237.prototype.FCK_OVERLAY);
this.buttonIcon = null != f ? f.create_1(GT1389.prototype.getInstance_0().getResourceManager_0()) : null;
this.buttonText = GT1389.prototype.getInstance_0().getText_1(d);
this.toolTip = GT1389.prototype.getInstance_0().getText_1(e);
a = b.getComponentX_0();
d = b.getComponentY_0();
this.width = b.getComponentWidth_0();
this.height = b.getComponentHeight_0();
this.borderLeft = g;
this.borderRight = k;
this.createObject_4(a, d, this.width, this.height);
this.createText_4(a + 4, d + 1, this.width - 8, this.height - 2);
this.createBorders_4(a, d, b.getComponentWidth_0(), b.getParent_0().getParent_0().getComponentHeight_0());
},
getPaddingFactor_3: function (a, b, d) {
var e = 0;
a && (e += 0.39);
b && (e += 0.22);
d && (e += 0.39);
a && b && d && (e = 1);
return e;
},
createText_4: function (a, b, d, e) {
if (null != this.buttonText) {
var f = Integer.truncate_1(this.padding * this.getPaddingFactor_3(!0, !0, !1));
this.buttonTextOffset = null == this.buttonIcon ? Math.div(this.padding, 2) : this.buttonIcon.getColumnWidth_0() + f;
this.buttonTextWidth = null == this.buttonIcon ? d - this.padding : d - this.padding - this.buttonIcon.getColumnWidth_0();
this.guiObjectNameText = new GT1123(
this.parent,
a + this.buttonTextOffset,
b,
this.buttonTextWidth,
e,
this.nameTextFonts,
GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getLabelColor_0().create_0()
);
this.guiObjectNameText.setBreakLines_1(!1);
this.guiObjectNameText.setHAlign_1(GT1488.prototype.CENTER);
this.guiObjectNameText.setVAlign_1(GT1489.prototype.CENTER);
a = this.getTextGradient_0();
this.guiObjectNameText.setGradient_1(a);
this.guiObjectNameText.setInsets_4(2, 2, 2, 2);
this.guiObjectNameText.setText_1(this.buttonText);
this.guiObjectNameText.setAlpha_1(this.alpha);
}
},
createBorders_4: function (a, b, d, e) {
this.borderLeft && (this.borders[0] = this.createBorder_4(a, b, 1, e));
this.borderRight && (this.borders[1] = this.createBorder_4(a + d - 1, b, 1, e));
},
createBorder_4: function (a, b, d, e) {
a = new GT1440(this.parent, a, b, d, e, GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getOverlayBorderColor_0().create_0());
a.setAlpha_1(GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getOverlayBorderAlpha_0().create_0());
return a;
},
setAlpha_1: function (a) {
GT1560.prototype.isAlive_1(this.guiObject) && (this.setObjectAlpha_1(a), (this.alpha = a));
GT1560.prototype.isAlive_1(this.guiObjectNameText) && (this.guiObjectNameText.setAlpha_1(a), (this.alpha = a));
},
setLocation_2: function (a, b) {
GT1560.prototype.isAlive_1(this.guiObject) && this.guiObject.move_2(a, b);
GT1560.prototype.isAlive_1(this.borders[0]) && this.borders[0].move_2(a, b);
GT1560.prototype.isAlive_1(this.borders[1]) && this.borders[1].move_2(a + this.width, b);
GT1560.prototype.isAlive_1(this.guiObjectNameText) && this.guiObjectNameText.move_2(a + this.buttonTextOffset, b);
},
setSize_2: function (a, b) {
if (GT1560.prototype.isAlive_1(this.guiObject) && (a != this.guiObject.getWidth_0() || b != this.guiObject.getHeight_0())) {
var d = this.guiObject.getX_0(),
e = this.guiObject.getY_0();
null != this.guiObject && this.guiObject.destroy_0();
null != this.guiObjectNameText && this.guiObjectNameText.destroy_0();
this.width = a;
this.height = b;
this.createObject_4(d, e, a, b);
this.createText_4(d, e, a, b);
this.setAlpha_1(this.alpha);
}
},
destroyObject_0: function () {
GT1560.prototype.destroyIfAlive_1(this.guiObject);
GT1560.prototype.destroyIfAlive_1(this.guiObjectNameText);
GT1560.prototype.destroyIfAlive_1(this.borders[0]);
GT1560.prototype.destroyIfAlive_1(this.borders[1]);
},
hide_1: function (a) {
this.guiObject.hide_1(a);
this.guiObjectNameText.hide_1(a);
},
setText_1: function (a) {
GT1560.prototype.isAlive_1(this.guiObjectNameText) && this.guiObjectNameText.setText_1(a);
},
getMinLength_0: function () {
var a = null != this.guiObjectNameText ? this.guiObjectNameText.getTextWidth_0() : 0,
a = a + this.padding,
a = a + (null != this.guiObjectNameText ? 4 : 0);
null != this.buttonIcon && (a += this.buttonIcon.getColumnWidth_0());
return a;
},
getWidth_0: function () {
return null != this.guiObject ? this.guiObject.getWidth_0() : this.guiObjectNameText.getWidth_0();
},
getX_0: function () {
return null != this.guiObject ? this.guiObject.getX_0() : this.guiObjectNameText.getX_0();
},
getY_0: function () {
return null != this.guiObject ? this.guiObject.getY_0() : this.guiObjectNameText.getY_0();
},
isVisible_0: function () {
return !this.guiObject.isHidden_0();
},
getClickIdentifier_0: function () {
return this.name;
},
},
"GT270",
[]
),
GT208 = GT270.extend(
{
initialConstructor_0: function () {
this.buttonSound = null;
this.buttonSoundLength = 0;
GT270.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.buttonSound = null;
this.buttonSoundLength = 0;
GT270.prototype.initialConstructor_11.call(
this,
a,
b,
b.getButtonText_0(),
b.getToolTip_0(),
b.getButtonImage_0(),
b.isBorderLeft_0(),
b.isBorderRight_0(),
b.getColorSetKey_0(),
b.getImagePosition_0(),
b.getImageOffset_0(),
b.isSuppressBackground_0()
);
this.buttonSound = b.getButtonSound_0();
this.buttonSoundLength = b.getButtonSoundLength_0();
},
createObject_4: function (a, b, d, e) {
a = this.guiObject = new GT1559(this.parent, a, b, d, e);
b = null == this.colorSetKey ? GT1019.prototype.CCK_BUTTON_DEFAULT : this.colorSetKey;
null != this.buttonIcon &&
(4 == this.buttonIcon.getRows_0()
? (GT413.prototype.makeButton_13(a, this.buttonIcon, 0, 0, GT1236.prototype.INACTIVE, GT1073.prototype.BUTTON_SHAPE_RECT, b, !0, !0, 0, this.overlayImagePosition, this.overlayImageOffset, this.alpha),
GT413.prototype.makeButton_13(a, this.buttonIcon, 1, 0, GT1236.prototype.DEFAULT, GT1073.prototype.BUTTON_SHAPE_RECT, b, !0, !0, 0, this.overlayImagePosition, this.overlayImageOffset, this.alpha),
GT413.prototype.makeButton_13(a, this.buttonIcon, 2, 0, GT1236.prototype.PRESSED, GT1073.prototype.BUTTON_SHAPE_RECT, b, !0, !0, 0, this.overlayImagePosition, this.overlayImageOffset, this.alpha),
GT413.prototype.makeButton_13(a, this.buttonIcon, 3, 0, GT1236.prototype.MOUSEOVER, GT1073.prototype.BUTTON_SHAPE_RECT, b, !0, !0, 0, this.overlayImagePosition, this.overlayImageOffset, this.alpha))
: (GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.INACTIVE,
GT1073.prototype.BUTTON_SHAPE_RECT,
b,
this.suppressBackgorund,
!1,
0,
this.overlayImagePosition,
this.overlayImageOffset,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.DEFAULT,
GT1073.prototype.BUTTON_SHAPE_RECT,
b,
this.suppressBackgorund,
!1,
0,
this.overlayImagePosition,
this.overlayImageOffset,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.PRESSED,
GT1073.prototype.BUTTON_SHAPE_RECT,
b,
this.suppressBackgorund,
!1,
0,
this.overlayImagePosition,
this.overlayImageOffset,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.MOUSEOVER,
GT1073.prototype.BUTTON_SHAPE_RECT,
b,
this.suppressBackgorund,
!1,
0,
this.overlayImagePosition,
this.overlayImageOffset,
this.alpha
)));
a.addButtonClickListener_1(this);
a.setToolTip_1(this.toolTip);
a.setToolTipAlwaysOn_1(!0);
a.finishButton_0();
},
setAlphaForButton_1: function (a) {
for (var b = this.guiObject, d = 0; d < b.getChildCount_0(); d++) instanceOf(b.getChild_1(d), GT1480) && b.getChild_1(d).setAlpha_1(a);
},
setObjectAlpha_1: function (a) {
GT1560.prototype.isAlive_1(this.guiObject) && this.setAlphaForButton_1(a);
},
playSound_0: function () {
null != this.buttonSound && GT1389.prototype.getInstance_0().getSoundPlayer_0().start_4(this.buttonSound.create_1(GT1389.prototype.getInstance_0().getSkinManager_0()), null, 0, this.buttonSoundLength);
},
click_1: function (a) {
this.playSound_0();
},
addButtonClickListener_1: function (a) {
this.guiObject.addButtonClickListener_1(a);
},
getTextGradient_0: function () {
return GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getNormalButtonGradient_0().create_0();
},
},
"GT208",
[GT807]
),
GT141 = GT208.extend(
{
initialConstructor_0: function () {
this.componentName = null;
this.componentWidth = 0;
GT208.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.componentName = null;
this.componentWidth = 0;
GT208.prototype.initialConstructor_2.call(this, a, b);
this.componentName = b.getName_0();
this.componentWidth = b.getComponentWidth_0();
},
createObject_4: function (a, b, d, e) {
a = this.guiObject = new GT1559(this.parent, a, b, d, e);
null != this.buttonIcon &&
(4 == this.buttonIcon.getRows_0()
? (GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.INACTIVE,
GT1073.prototype.BUTTON_SHAPE_RECT,
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND,
!0,
!0,
0,
GT1073.prototype.IMAGE_CENTER,
0,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
1,
0,
GT1236.prototype.DEFAULT,
GT1073.prototype.BUTTON_SHAPE_RECT,
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND,
!0,
!0,
0,
GT1073.prototype.IMAGE_CENTER,
0,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
2,
0,
GT1236.prototype.PRESSED,
GT1073.prototype.BUTTON_SHAPE_RECT,
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND,
!0,
!0,
0,
GT1073.prototype.IMAGE_CENTER,
0,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
3,
0,
GT1236.prototype.MOUSEOVER,
GT1073.prototype.BUTTON_SHAPE_RECT,
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND,
!0,
!0,
0,
GT1073.prototype.IMAGE_CENTER,
0,
this.alpha
))
: (GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.INACTIVE,
GT1073.prototype.BUTTON_SHAPE_RECT,
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND,
!1,
!1,
0,
GT1073.prototype.IMAGE_CENTER,
0,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.DEFAULT,
GT1073.prototype.BUTTON_SHAPE_RECT,
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND,
!1,
!1,
0,
GT1073.prototype.IMAGE_CENTER,
0,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.PRESSED,
GT1073.prototype.BUTTON_SHAPE_RECT,
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND,
!1,
!1,
0,
GT1073.prototype.IMAGE_CENTER,
0,
this.alpha
),
GT413.prototype.makeButton_13(
a,
this.buttonIcon,
0,
0,
GT1236.prototype.MOUSEOVER,
GT1073.prototype.BUTTON_SHAPE_RECT,
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND,
!1,
!1,
0,
GT1073.prototype.IMAGE_CENTER,
0,
this.alpha
)));
a.addButtonClickListener_1(this);
a.setToolTip_1(this.toolTip);
a.setToolTipAlwaysOn_1(!0);
a.finishButton_0();
},
click_1: function (a) {
this.playSound_0();
a = GT1607.prototype.OVERLAY_SOUND_ONLY.equals_1(this.componentName) || GT1607.prototype.OVERLAY_SOUND_AND_MUSIC.equals_1(this.componentName);
var b = GT1607.prototype.OVERLAY_SOUND_AND_MUSIC.equals_1(this.componentName);
GT1389.prototype.getInstance_0().getEventDispatcher_0().raiseEvent_1(new GT654(GT1284.prototype.SOUND_BUTTON_PRESSED, this, this.componentName, a, b));
},
updateUi_1: function (a) {
GT208.prototype.updateUi_1.call(this, a);
var b = a.getRules_0().get_1(GT1185.prototype.VDR_SOUNDPLAYER_ACTIVE);
a = a.getRules_0().get_1(GT1185.prototype.VDR_MUSICPLAYER_ACTIVE);
null != b &&
null != a &&
(GT1607.prototype.OVERLAY_SOUND_AND_MUSIC.equals_1(this.componentName)
? this.toggleState_1(b.booleanValue_0() && a.booleanValue_0())
: GT1607.prototype.OVERLAY_SOUND_ONLY.equals_1(this.componentName)
? this.toggleState_1(b.booleanValue_0() && !a.booleanValue_0())
: GT1607.prototype.OVERLAY_SOUND_OFF.equals_1(this.componentName) && this.toggleState_1(!b.booleanValue_0()));
},
toggleState_1: function (a) {
var b = this.guiObject;
a ? (b.setChildForState_2(GT1236.prototype.INACTIVE, 2), b.setActive_1(!1)) : (b.setChildForState_2(GT1236.prototype.INACTIVE, 0), b.setActive_1(!0));
},
getMinLength_0: function () {
return 0 == this.componentWidth ? GT208.prototype.getMinLength_0.call(this) : this.componentWidth;
},
},
"GT141",
[]
),
GT271 = GT208.extend(
{
initialConstructor_0: function () {
GT208.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
GT208.prototype.initialConstructor_2.call(this, a, b);
},
click_1: function (a) {
GT1389.prototype.getInstance_0().getEventDispatcher_0().raiseEvent_1(new GT1284(GT1284.prototype.EXIT_BUTTON_PRESSED, this, this.name));
},
updateUi_1: function (a) {
GT208.prototype.updateUi_1.call(this, a);
a.getRules_0().get_1(GT1185.prototype.VDR_EXIT_ALLOWED).booleanValue_0()
? (this.guiObject.setActive_1(!0), this.guiObjectNameText.setColorTransformation_1(null))
: (this.guiObject.setActive_1(!1), this.guiObjectNameText.setColorTransformation_1(GT1063.prototype.GrayOut));
},
},
"GT271",
[]
),
GT272 = GT270.extend(
{
initialConstructor_0: function () {
this.y = this.iconOffsetY = this.iconOffsetX = 0;
GT270.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.y = this.iconOffsetY = this.iconOffsetX = 0;
GT270.prototype.initialConstructor_11.call(this, a, b, b.getText_0(), null, b.getIcon_0(), b.isBorderLeft_0(), b.isBorderRight_0(), null, 0, 0, !0);
this.y = b.getComponentY_0();
},
createObject_4: function (a, b, d, e) {
null != this.buttonIcon &&
((this.iconOffsetX = null == this.buttonText ? Math.div(d - this.buttonIcon.getWidth_0(), 2) : Integer.truncate_1(this.padding * this.getPaddingFactor_3(!0, !1, !1))),
(this.iconOffsetY = Math.div(e - this.buttonIcon.getHeight_0(), 2)),
(this.guiObject = new GT1591(this.parent, a + this.iconOffsetX, b + this.iconOffsetY, this.buttonIcon.getWidth_0(), this.buttonIcon.getHeight_0(), this.buttonIcon, 0, 0, !1)));
},
setObjectAlpha_1: function (a) {
GT1560.prototype.isAlive_1(this.guiObject) && this.guiObject.setAlpha_1(a);
},
getTextGradient_0: function () {
return GT1533.prototype.getGradient_1(GT1389.prototype.getInstance_0().getDeviceStrategy_0().getConsoleTheme_0().getLabelGradient_0());
},
getWidth_0: function () {
var a = null != this.guiObject ? this.guiObject.getWidth_0() : 0,
a = a + (null != this.guiObjectNameText ? this.guiObjectNameText.getTextWidth_0() : 0);
return (a += this.padding);
},
getY_0: function () {
return this.y;
},
setLocation_2: function (a, b) {
GT270.prototype.setLocation_2.call(this, a, b);
GT1560.prototype.isAlive_1(this.guiObject) && this.guiObject.move_2(a + this.iconOffsetX, b + this.iconOffsetY);
},
},
"GT272",
[]
),
GT126 = GT208.extend(
{
initialConstructor_0: function () {
this.guiObjectToggled = null;
GT208.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.guiObjectToggled = null;
GT208.prototype.initialConstructor_2.call(this, a, b);
var d = b.getToggledButtonImage_0(),
e = b.getToggledButtonText_0(),
f = b.getToggledToolTip_0();
b.setToggledButtonImage_1(b.getButtonImage_0());
b.setToggledButtonText_1(b.getButtonText_0());
b.setToggledToolTip_1(b.getToolTip_0());
b.setButtonImage_1(d);
b.setButtonText_1(e);
b.setToolTip_1(f);
this.guiObjectToggled = new GT208(a, b);
this.guiObjectToggled.addButtonClickListener_1(this);
},
setLocation_2: function (a, b) {
GT208.prototype.setLocation_2.call(this, a, b);
this.guiObjectToggled.setLocation_2(a, b);
},
setSize_2: function (a, b) {
GT208.prototype.setSize_2.call(this, a, b);
this.guiObjectToggled.setSize_2(a, b);
this.guiObjectToggled.addButtonClickListener_1(this);
},
destroyObject_0: function () {
null != this.guiObjectToggled && (this.guiObjectToggled.destroyObject_0(), (this.guiObjectToggled = null));
GT208.prototype.destroyObject_0.call(this);
},
click_1: function (a) {
a = this.guiObjectToggled.guiObject == a ? this.getClickIdentifier_0() + "#toggled" : this.getClickIdentifier_0();
a = new GT1284(GT1284.prototype.GENERIC_CONSOLE_EVENT, this, a);
GT1389.prototype.getInstance_0().getEventDispatcher_0().raiseEvent_1(a);
},
getMinLength_0: function () {
return Math.max_2(GT208.prototype.getMinLength_0.call(this), this.guiObjectToggled.getMinLength_0());
},
getWidth_0: function () {
return Math.max_2(GT208.prototype.getWidth_0.call(this), this.guiObjectToggled.getWidth_0());
},
showToggledState_1: function (a) {
a ? (GT208.prototype.hide_1.call(this, !0), this.guiObjectToggled.hide_1(!1)) : (GT208.prototype.hide_1.call(this, !1), this.guiObjectToggled.hide_1(!0));
},
},
"GT126",
[]
),
GT127 = GT126.extend(
{
initialConstructor_0: function () {
GT126.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
GT126.prototype.initialConstructor_2.call(this, a, b);
},
click_1: function (a) {
GT1389.prototype.getInstance_0().getEventDispatcher_0().raiseEvent_1(new GT1284(GT1284.prototype.SCREEN_TOGGLE_BUTTON_PRESSED, this, this.getClickIdentifier_0()));
},
updateUi_1: function (a) {
a = a.getRules_0().get_1(GT1185.prototype.VDR_FULLSCREEN);
null != a && this.showToggledState_1(!a.booleanValue_0());
},
},
"GT127",
[]
),
GT142 = GT126.extend(
{
initialConstructor_0: function () {
GT126.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
GT126.prototype.initialConstructor_2.call(this, a, b);
},
updateUi_1: function (a) {
GT126.prototype.updateUi_1.call(this, a);
a = a.getRules_0().get_1(GT1185.prototype.VDR_SOUNDPLAYER_ACTIVE);
null != a && (a.booleanValue_0() ? (GT126.prototype.hide_1.call(this, !0), this.guiObjectToggled.hide_1(!1)) : (GT126.prototype.hide_1.call(this, !1), this.guiObjectToggled.hide_1(!0)));
},
},
"GT142",
[]
),
GT602 = Class.extend(
{
initialConstructor_0: function () {
this.overrideWith = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.overrideWith = null;
this.overrideWith = a;
},
isOverride_0: function () {
return null != this.overrideWith;
},
getOverride_0: function () {
return this.overrideWith;
},
toString: function () {
return "StringOverride [override=" + this.overrideWith + "]";
},
},
"GT602",
[]
),
GT462 = Class.extend(
{
initialConstructor_0: function () {
this.relativeHeight = this.relativeWidth = this.relativeY = this.relativeX = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_4: function (a, b, d, e) {
this.relativeHeight = this.relativeWidth = this.relativeY = this.relativeX = 0;
this.relativeX = a;
this.relativeY = b;
this.relativeWidth = d;
this.relativeHeight = e;
},
getRelativeX_0: function () {
return this.relativeX;
},
getRelativeY_0: function () {
return this.relativeY;
},
getRelativeWidth_0: function () {
return this.relativeWidth;
},
getRelativeHeight_0: function () {
return this.relativeHeight;
},
},
"GT462",
[]
),
GT1438 = Class.extend(
{
initialConstructor_0: function () {
this.max = this.min = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.max = this.min = 0;
Class.prototype.initialConstructor_0.call(this);
this.min = a;
this.max = b;
},
add_1: function (a) {
return new GT1438(this.getMin_0() + a.getMin_0(), this.getMax_0() + a.getMax_0());
},
getMin_0: function () {
return this.min;
},
getMax_0: function () {
return this.max;
},
},
"GT1438",
[]
),
GT817 = Class.extend(
{
initialConstructor_0: function () {
this.insetBottom = this.insetTop = this.insetRight = this.insetLeft = 0;
this.alignH = this.alignV = null;
this.shadowOffsetY = this.shadowOffsetX = 0;
this.gradientObject = this.textColor = this.shadowColor = null;
this.doBreakLines = !1;
this.alignH = GT1488.prototype.CENTER;
this.alignV = GT1489.prototype.CENTER;
this.doBreakLines = !0;
},
insets_1: function (a) {
return this.insets_4(a, a, a, a);
},
insets_2: function (a, b) {
return this.insets_4(a, a, b, b);
},
insets_4: function (a, b, d, e) {
this.insetLeft = a;
this.insetRight = b;
this.insetTop = d;
this.insetBottom = e;
return this;
},
vAlign_1: function (a) {
this.alignV = a;
return this;
},
hAlign_1: function (a) {
this.alignH = a;
return this;
},
getInsetTop_0: function () {
return this.insetTop;
},
getInsetBottom_0: function () {
return this.insetBottom;
},
getInsetLeft_0: function () {
return this.insetLeft;
},
getInsetRight_0: function () {
return this.insetRight;
},
getVAlign_0: function () {
return this.alignV;
},
getHAlign_0: function () {
return this.alignH;
},
shadow_3: function (a, b, d) {
this.shadowOffsetX = a;
this.shadowOffsetY = b;
this.shadowColor = d;
return this;
},
gradient_1: function (a) {
this.gradientObject = a;
return this;
},
getGradient_0: function () {
return this.gradientObject;
},
color_1: function (a) {
this.textColor = a;
return this;
},
getColor_0: function () {
return this.textColor;
},
breakLines_1: function (a) {
this.doBreakLines = a;
return this;
},
getBreakLines_0: function () {
return this.doBreakLines;
},
},
"GT817",
[GT1008]
),
GT1020 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
compare_2: function (a, b) {
return instanceOf(a, GT918) && instanceOf(b, GT918) ? a.getOrder_0() - b.getOrder_0() : 0;
},
},
"GT1020",
[java_util_Comparator]
),
GT1534 = Class.extend(
{
initialConstructor_0: function () {
this.highlighted_flag = this.active_flag = !1;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.highlighted_flag = this.active_flag = !1;
this.active_flag = a;
this.highlighted_flag = b;
},
isActive_0: function () {
return this.active_flag;
},
isHighlighted_0: function () {
return this.highlighted_flag;
},
toString: function () {
return "ComponentState [active_flag=" + this.active_flag + ", highlighted_flag=" + this.highlighted_flag + "]";
},
hashCode_0: function () {
var a;
return (a = 31 + (this.active_flag ? 1 : 0) + (this.highlighted_flag ? 1 : 0));
},
equals_1: function (a) {
return this == a ? !0 : null != a && instanceOf(a, GT1534) && this.active_flag == a.active_flag && this.highlighted_flag == a.highlighted_flag ? !0 : !1;
},
toJSON_0: function () {
return '{"active":' + (this.active_flag ? "true" : "false") + ', "highlighted":' + (this.highlighted_flag ? "true" : "false") + "}";
},
},
"GT1534",
[GT1585]
);
GT1534.prototype.inactive_0 = function () {
return new GT1534(!1, !1);
};
GT1534.prototype.highlighted_0 = function () {
return new GT1534(!0, !0);
};
GT1534.prototype.active_0 = function () {
return new GT1534(!0, !1);
};
var GT603 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
},
"GT603",
[]
),
GT712 = Class.extend(
{
initialConstructor_0: function () {
this.clientEventHandler = this.eventDispatcher = this.consoleEventIDs = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_3: function (a, b, d) {
this.clientEventHandler = this.eventDispatcher = this.consoleEventIDs = null;
Class.prototype.initialConstructor_0.call(this);
this.eventDispatcher = a;
this.consoleEventIDs = new java_util_JavaScriptVector();
this.clientEventHandler = d;
for (d = 0; d < b.length; d++) a.registerHandler_4(b[d], null, this, -Integer.MAX_VALUE), this.consoleEventIDs.addElement_1(new Integer(b[d]));
},
addConsoleEvent_1: function (a) {
this.consoleEventIDs.contains_1(new Integer(a)) || this.consoleEventIDs.addElement_1(new Integer(a));
},
removeAllConsoleEvents_0: function () {
this.eventDispatcher.unregisterHandler_1(this);
this.consoleEventIDs.removeAllElements_0();
},
sendConsoleEventToClient_1: function (a) {
null != this.clientEventHandler && this.clientEventHandler.handleEvent_1(a);
},
},
"GT712",
[GT805]
),
GT655 = Class.extend(
{
initialConstructor_0: function () {
Class.prototype.initialConstructor_0.call(this);
},
},
"GT655",
[]
),
GT1607 = Class.extend({ initialConstructor_0: function () {} }, "GT1607", []);
GT1607.prototype.BETMENU = "betmenu_button";
GT1607.prototype.GAMBLE = "gamble_button";
GT1607.prototype.MAXBET = "maxbet_button";
GT1607.prototype.MENU = "menu_button";
GT1607.prototype.SPIN = "spin_button";
GT1607.prototype.AUTOPLAY = "autoplay_button";
GT1607.prototype.EXTRABET = "extrabet_button";
GT1607.prototype.SETTINGS_PANEL = "settings_panel";
GT1607.prototype.LINES = "line_button";
GT1607.prototype.PAYTABLE = "paytable_button";
GT1607.prototype.TOPCONTAINER = "top console";
GT1607.prototype.CONSOLECONTAINER = "layoutArea";
GT1607.prototype.MENUITEM_PREFIX = "menu#";
GT1607.prototype.MENUITEM_DEPOSIT = GT1607.prototype.MENUITEM_PREFIX + "deposit";
GT1607.prototype.MENUITEM_EXIT = GT1607.prototype.MENUITEM_PREFIX + "back_to_lobby";
GT1607.prototype.MENUITEM_PAYTABLE = GT1607.prototype.MENUITEM_PREFIX + "paytable&info";
GT1607.prototype.MENUITEM_REPLAY = GT1607.prototype.MENUITEM_PREFIX + "replay";
GT1607.prototype.MENUITEM_SETTINGS = GT1607.prototype.MENUITEM_PREFIX + "settings";
GT1607.prototype.MENUITEM_HELP = GT1607.prototype.MENUITEM_PREFIX + "help";
GT1607.prototype.PAYTABLE_PREFIX = "paytable#";
GT1607.prototype.PAYTABLE_BACK = GT1607.prototype.PAYTABLE_PREFIX + "back";
GT1607.prototype.PAYTABLE_NEXT = GT1607.prototype.PAYTABLE_PREFIX + "next";
GT1607.prototype.PAYTABLE_CLOSE = GT1607.prototype.PAYTABLE_PREFIX + "close";
GT1607.prototype.BETMENU_PREFIX = "betmenu#";
GT1607.prototype.BETMENU_DOWN = GT1607.prototype.BETMENU_PREFIX + "lines_down";
GT1607.prototype.BETMENU_UP = GT1607.prototype.BETMENU_PREFIX + "lines_up";
GT1607.prototype.BETMENU_BET = GT1607.prototype.BETMENU_PREFIX + "bet";
GT1607.prototype.BETMENU_CLOSE = GT1607.prototype.BETMENU_PREFIX + "close";
GT1607.prototype.LINEMENU_PREFIX = "linemenu#";
GT1607.prototype.LINEMENU_GROUP_BACK = GT1607.prototype.LINEMENU_PREFIX + "line_group_back";
GT1607.prototype.LINEMENU_GROUP_NEXT = GT1607.prototype.LINEMENU_PREFIX + "line_group_next";
GT1607.prototype.LINEMENU_LINE = GT1607.prototype.LINEMENU_PREFIX + "line";
GT1607.prototype.LINEMENU_CLOSE = GT1607.prototype.LINEMENU_PREFIX + "close";
GT1607.prototype.CREDIT_WIN_PREFIX = "credit_win#";
GT1607.prototype.CREDIT_WIN_BUTTON = GT1607.prototype.CREDIT_WIN_PREFIX + "button";
GT1607.prototype.OVERLAY_PREFIX = "overlay#";
GT1607.prototype.OVERLAY_EXIT = GT1607.prototype.OVERLAY_PREFIX + "exit";
GT1607.prototype.OVERLAY_SOUND = GT1607.prototype.OVERLAY_PREFIX + "sound";
GT1607.prototype.OVERLAY_SOUND_AND_MUSIC = GT1607.prototype.OVERLAY_PREFIX + "1sound1";
GT1607.prototype.OVERLAY_SOUND_ONLY = GT1607.prototype.OVERLAY_PREFIX + "2sound2";
GT1607.prototype.OVERLAY_SOUND_OFF = GT1607.prototype.OVERLAY_PREFIX + "3sound3";
GT1607.prototype.OVERLAY_SCREENMODE = GT1607.prototype.OVERLAY_PREFIX + "screen";
GT1607.prototype.OVERLAY_ROUNDID = GT1607.prototype.OVERLAY_PREFIX + "round_id";
GT1607.prototype.OVERLAY_CLOCK = GT1607.prototype.OVERLAY_PREFIX + "clock";
GT1607.prototype.OVERLAY_LOGO = GT1607.prototype.OVERLAY_PREFIX + "logo";
GT1607.prototype.OVERLAY_CONTAINER = GT1607.prototype.OVERLAY_PREFIX + "container";
GT1607.prototype.OVERLAY_LEFT_SIDE_CONTAINER = GT1607.prototype.OVERLAY_PREFIX + "left_side_container";
GT1607.prototype.OVERLAY_RIGHT_SIDE_CONTAINER = GT1607.prototype.OVERLAY_PREFIX + "right_side_container";
GT1607.prototype.SETTINGS_PREFIX = "settings#";
GT1607.prototype.SETTINGS_SOUND_AND_MUSIC = GT1607.prototype.SETTINGS_PREFIX + "1sound1";
GT1607.prototype.SETTINGS_SOUND_ONLY = GT1607.prototype.SETTINGS_PREFIX + "2sound2";
GT1607.prototype.SETTINGS_SOUND_OFF = GT1607.prototype.SETTINGS_PREFIX + "3sound3";
GT1607.prototype.SETTINGS_CLOSE = GT1607.prototype.SETTINGS_PREFIX + "close";
GT1607.prototype.SETTINGS_LAYOUT_LEFT = GT1607.prototype.SETTINGS_PREFIX + "layout_lft";
GT1607.prototype.SETTINGS_LAYOUT_RIGHT = GT1607.prototype.SETTINGS_PREFIX + "layout_rgt";
GT1607.prototype.SETTINGS_SWITCH_LAYOUT = GT1607.prototype.SETTINGS_PREFIX + "switch_layout";
GT1607.prototype.SETTINGS_SWITCH_LAYOUT_COMPLETED = GT1607.prototype.SETTINGS_SWITCH_LAYOUT + "#completed";
GT1607.prototype.SETTINGS_GAMBLING = GT1607.prototype.SETTINGS_PREFIX + "gambling";
GT1607.prototype.UNDEFINED_KEY = "undefined";
GT1607.prototype.CLICKED_ANYWHERE = "clicked_anywhere";
GT1607.prototype.TT_LINES = "${neon_console_label_lines}";
GT1607.prototype.TT_TOTAL_BET = "${neon_console_label_totalbet}";
GT1607.prototype.TT_TOTAL_BET_SPINNER = "${neon_console_label_totalbet_spinner}";
GT1607.prototype.TT_GAMBLE = "${neon_buttontext_gamble}";
GT1607.prototype.TT_CREDIT = "${neon_console_label_credit}";
GT1607.prototype.TT_MAXBET = "${neon_buttontext_maxbet}";
GT1607.prototype.TT_SPIN = "${neon_buttontext_start}";
GT1607.prototype.TT_BET_PER_LINE = "${neon_console_label_basebet}";
GT1607.prototype.TT_BASE_BET = "${neon_console_label_basebet_info}";
GT1607.prototype.TT_CHANGE_BET = "${neon_console_change_bet}";
GT1607.prototype.TT_EXTRA_BET = "${neon_console_label_extrabet}";
GT1607.prototype.TT_MENU = "${neon_buttontext_menu}";
GT1607.prototype.TT_AUTO = "${neon_buttontext_auto}";
GT1607.prototype.TT_MENU_PAYTABLE = "${neon_menu_paytable}";
GT1607.prototype.TT_PAYTABLE_SHORT = "${neon_paytable_short}";
GT1607.prototype.TT_MENU_DEPOSIT = "${neon_menu_deposit}";
GT1607.prototype.TT_MENU_SETTINGS = "${neon_menu_settings}";
GT1607.prototype.TT_MENU_REPLAY = "${neon_menu_replay}";
GT1607.prototype.TT_MENU_HELP = "${neon_menu_help}";
GT1607.prototype.TT_MENU_EXIT = "${neon_menu_exit}";
GT1607.prototype.TT_OVERLAY_SOUND = "${neon_overlay_sound}";
GT1607.prototype.TT_OVERLAY_FULLSCREEN = "${neon_overlay_fullscreen}";
GT1607.prototype.TT_OVERLAY_NORMALSCREEN = "${neon_overlay_normalscreen}";
GT1607.prototype.TT_OVERLAY_EXIT = "${neon_overlay_exit}";
GT1607.prototype.TT_SETTINGS_TITLE = "${neon_settings_title}";
GT1607.prototype.TT_SETTINGS_SOUND = "${neon_settings_sound}";
GT1607.prototype.TT_SETTINGS_LAYOUT = "${neon_settings_layout}";
GT1607.prototype.TT_SETTINGS_LAYOUT_WAITING = "${neon_switch_layout_wait}";
GT1607.prototype.TT_SETTINGS_GAMBLING = "${neon_settings_gambling}";
GT1607.prototype.TT_SETTINGS_GAMBLING_ON = "${neon_settings_on}";
GT1607.prototype.TT_SETTINGS_GAMBLING_OFF = "${neon_settings_off}";
GT1607.prototype.TOGGLE_DEFAULT_SUFFIX = "#off";
var GT1074 = GT339.extend(
{
initialConstructor_0: function () {
this.theme = null;
GT339.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.theme = null;
GT339.prototype.initialConstructor_1.call(this, a);
this.theme = b;
},
containerErrorScreen_2: function (a, b) {
return GT1186.prototype
.set_0()
.id_1(GT554.prototype.ID_ERRORSCREEN)
.child_1(
GT871.prototype
.set_0()
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.CENTER)
.child_1(
GT1186.prototype
.set_0()
.id_1(GT554.prototype.ID_ERRORSCREENBOX)
.position_2(0, 0)
.resizeToContent_1(!0)
.child_1(this.dialogBackGround_0().id_1(GT307.prototype.ID_DIALOG_BACKGROUND).size_2(510, 230))
.child_1(
GT872.prototype
.set_0()
.id_1(GT554.prototype.TEXT_ERRORMSG)
.position_2(0, 40)
.size_2(510, 88)
.text_1("")
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.TOP)
.insets_4(40, 40, 0, 0)
.addFont_1(this.getLabelFont_1(0))
.addFont_1(this.getLabelFont_1(2))
.addFont_1(this.getLabelFont_1(4))
.addFont_1(this.getLabelFont_1(6))
.addFont_1(this.getLabelFont_1(8))
.fontColor_1(this.theme.getLabelColor_0())
.gradient_1(this.theme.getLabelGradient_0())
)
.child_1(this.button_3("${alttext_limitstopbutton}", 210, 70).id_1(GT554.prototype.ACTION_CLOSEAFTERKICK).position_2(150, 135))
.child_1(this.button_3("${alttext_reconnect}", 210, 70).id_1(GT554.prototype.ACTION_RECONNECT).position_2(30, 135))
.child_1(this.button_3("${alttext_limitstopbutton}", 210, 70).id_1(GT554.prototype.ACTION_CLOSEAFTERKICK2).position_2(270, 135))
)
);
},
dialogBackGround_0: function () {
return GT1187.prototype
.set_0()
.colorArea_1(this.theme.getPopupBgColor_0())
.colorBorder_1(this.theme.getPopupBorderColor_0())
.borderThickness_1(2)
.outerRadius_1(this.theme.getPopupRadius_0())
.innerRadius_1(this.theme.getPopupRadius_0())
.transparencyArea_1(this.theme.getPopupBgAlpha_0())
.transparencyBorder_1(this.theme.getPopupBorderAlpha_0());
},
button_3: function (a, b, d) {
return GT873.prototype
.set_0()
.size_2(b, d)
.states_1(GT1021.prototype.set_0().state_2(0, GT1236.prototype.DEFAULT).state_2(1, GT1236.prototype.PRESSED).state_2(2, GT1236.prototype.MOUSEOVER))
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT872.prototype
.set_0()
.size_2(b, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.gradient_1(this.theme.getNormalButtonGradient_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(5, 5, 5, 5)
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT1186.prototype
.set_0()
.contentScaling_2(0.97, 0.97)
.position_2(Integer.truncate_1((b - 0.97 * b) / 2), Integer.truncate_1((d - 0.97 * d) / 2))
.size_2(b, d)
.child_1(
GT872.prototype
.set_0()
.size_2(b, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.gradient_1(this.theme.getNormalButtonGradient_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(5, 5, 5, 5)
)
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT872.prototype
.set_0()
.size_2(b, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.gradient_1(GT1238.prototype.invert_1(this.theme.getNormalButtonGradient_0()))
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(5, 5, 5, 5)
)
);
},
getLabelFont_1: function (a) {
return this.theme.getConsoleFont_0().getPFont_2(GT1237.prototype.FCK_LABEL_LARGE, a);
},
getButtonFont_1: function (a) {
return this.theme.getConsoleFont_0().getPFont_2(GT1237.prototype.FCK_SECONDARY_BUTTON, a);
},
buttonInfoPagesPrev_2: function (a, b) {
return this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/neon/left-arr.png").overrideSize_2(27, 50), 120, 90, 10)
.id_1(GT554.prototype.ID_INFOPAGES_PREV)
.position_2(381 + b.layoutOverscanLeft_0(), 870);
},
buttonInfoPagesNext_2: function (a, b) {
return this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/neon/right-arr.png").overrideSize_2(27, 50), 120, 90, 10)
.id_1(GT554.prototype.ID_INFOPAGES_NEXT)
.position_2(b.layoutOverscanLeft_0() + b.layoutDesignedWidth_0() - 519, 870);
},
buttonInfoPagesClose_2: function (a, b) {
return this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/neon/infopage_skip.png").overrideSize_2(40, 50), 120, 90, 10)
.id_1(GT554.prototype.ID_INFOPAGES_CLOSE)
.position_2(b.layoutOverscanLeft_0() + b.layoutDesignedWidth_0() - 139, 870)
.states_1(GT1021.prototype.set_0().state_2(4, GT1236.prototype.INACTIVE).state_2(1, GT1236.prototype.DEFAULT).state_2(2, GT1236.prototype.PRESSED).state_2(3, GT1236.prototype.MOUSEOVER))
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(120, 90)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(10)
.innerRadius_1(10)
.numberOfEdges_1(5)
)
.child_1(
GT818.prototype
.set_0()
.id_1(GT554.prototype.ID_INFOPAGES_LOADINGINDICATOR)
.position_2(37, 22)
.imageFile_1("/com/greentube/casinolobbymanager/client/res/casino/loading.png")
.anchor_2(23, 23)
.translation_2(23, 23)
)
);
},
buttonIntroVideoSkip_2: function (a, b) {
return this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/neon/infopage_skip.png").overrideSize_2(40, 50), 120, 90, 10)
.id_1(GT554.prototype.ID_INTROVIDEO_SKIP)
.position_2(1320, 870)
.states_1(GT1021.prototype.set_0().state_2(4, GT1236.prototype.INACTIVE).state_2(1, GT1236.prototype.DEFAULT).state_2(2, GT1236.prototype.PRESSED).state_2(3, GT1236.prototype.MOUSEOVER))
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(120, 90)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(10)
.innerRadius_1(10)
.numberOfEdges_1(5)
)
.child_1(
GT818.prototype
.set_0()
.id_1(GT554.prototype.ID_INTROVIDEO_LOADINGINDICATOR)
.position_2(37, 22)
.imageFile_1("/com/greentube/casinolobbymanager/client/res/casino/loading.png")
.anchor_2(23, 23)
.translation_2(23, 23)
)
);
},
buttonInfoPagesToggle_2: function (a, b) {
return GT873.prototype
.set_0()
.position_2(21 + b.layoutOverscanLeft_0(), 870)
.id_1(GT554.prototype.ID_INFOPAGES_TOGGLE)
.size_2(90, 90)
.child_1(
GT1187.prototype
.set_0()
.size_2(90, 90)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackgroundAlpha_0()))
.colorBorder_1(GT1391.prototype.set_0().white_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(10)
.innerRadius_1(10)
.numberOfEdges_1(5)
)
.child_1(
GT1186.prototype
.set_0()
.child_1(
GT1187.prototype
.set_0()
.size_2(90, 90)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackgroundAlpha_0()))
.colorBorder_1(GT1391.prototype.set_0().white_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(10)
.innerRadius_1(10)
.numberOfEdges_1(5)
)
.child_1(GT1392.prototype.set_0().position_2(15, 15).size_2(60, 60).image_1(GT1390.prototype.set_0().tiling_2(1, 1).file_1("/com/greentube/gameconsole/res/neon/checkmark.png")))
)
.states_1(GT1021.prototype.set_0().state_2(0, GT1236.prototype.INACTIVE).state_2(1, GT1236.prototype.DEFAULT));
},
containerInfoPagesIndicators_2: function (a, b) {
return a.position_2(0, 880);
},
textInfoPagesToggleMessage_2: function (a, b) {
return GT1239.prototype
.set_0()
.id_1(GT554.prototype.ID_INFOPAGES_TOGGLEMESSAGE)
.position_2(121 + b.layoutOverscanLeft_0(), 870)
.size_2(250, 90)
.spacing_1(30)
.adaptiveHeight_1(!0)
.text_1("${realitycheckmessage3}")
.font_1(this.theme.getConsoleFont_0().getPFont_2(GT1237.prototype.FCK_LABEL_LARGE, 0))
.fontColor_1(GT1391.prototype.set_0().white_0())
.hAlign_1(GT1488.prototype.LEFT)
.vAlign_1(GT1489.prototype.CENTER);
},
buttonIcon_4: function (a, b, d, e) {
return GT873.prototype
.set_0()
.size_2(b, d)
.states_1(GT1021.prototype.set_0().state_2(0, GT1236.prototype.INACTIVE).state_2(1, GT1236.prototype.DEFAULT).state_2(2, GT1236.prototype.PRESSED).state_2(3, GT1236.prototype.MOUSEOVER))
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(e)
.innerRadius_1(e)
.numberOfEdges_1(Math.div(e, 2))
)
.child_1(GT871.prototype.set_0().horizontalAlignment_1(GT1488.prototype.CENTER).verticalAlignment_1(GT1489.prototype.CENTER).child_1(GT1392.prototype.set_0().image_1(a)))
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(e)
.innerRadius_1(e)
.numberOfEdges_1(Math.div(e, 2))
)
.child_1(
GT871.prototype
.set_0()
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.CENTER)
.child_1(GT1392.prototype.set_0().image_1(a).colorTransformation_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getColorTransformation_0()))
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(e)
.innerRadius_1(e)
.numberOfEdges_1(Math.div(e, 2))
)
.child_1(
GT1186.prototype
.set_0()
.contentScaling_2(0.9, 0.9)
.position_2(Integer.truncate_1((b - 0.9 * b) / 2), Integer.truncate_1((d - 0.9 * d) / 2))
.size_2(b, d)
.child_1(
GT871.prototype
.set_0()
.size_2(b, d)
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.CENTER)
.child_1(
GT1392.prototype
.set_0()
.image_1(a)
.colorTransformation_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getColorTransformation_0())
)
)
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorderAlpha_0()))
.borderThickness_1(2)
.outerRadius_1(e)
.innerRadius_1(e)
.numberOfEdges_1(Math.div(e, 2))
)
.child_1(
GT871.prototype
.set_0()
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.CENTER)
.child_1(GT1392.prototype.set_0().image_1(a).colorTransformation_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getColorTransformation_0()))
)
);
},
buttonMenuWideAspect_2: function (a, b) {
return null;
},
buttonMenuSoundOff_2: function (a, b) {
return a.position_2(1210 + b.layoutHorizontalAdjustment_0(), 35);
},
buttonMenuSoundOn_2: function (a, b) {
return a.position_2(1210 + b.layoutHorizontalAdjustment_0(), 35);
},
},
"GT1074",
[]
),
GT463 = GT186.extend(
{
initialConstructor_0: function () {
this.theme = null;
GT186.prototype.initialConstructor_0.call(this);
},
initialConstructor_1: function (a) {
this.theme = null;
GT186.prototype.initialConstructor_0.call(this);
this.theme = a;
},
initialConstructor_3: function (a, b, d) {
this.theme = null;
GT186.prototype.initialConstructor_1.call(this, a);
this.theme = b;
},
containerWatcherInfo_2: function (a, b) {
return GT1186.prototype
.set_0()
.position_2(575, 425)
.size_2(900, 50)
.child_1(
GT1187.prototype
.set_0()
.id_1(GT307.prototype.BG_WATCHERINFO)
.borderThickness_1(1)
.colorArea_1(GT1391.prototype.set_0().black_0())
.transparencyArea_1(GT1022.prototype.set_0().percent_1(70))
.transparencyBorder_1(GT1022.prototype.set_0().percent_1(90))
.borderThickness_1(3)
.colorBorder_1(GT1391.prototype.set_0().yellow_0())
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT1239.prototype
.set_0()
.id_1(GT307.prototype.TEXT_WATCHERINFO)
.vAlign_1(GT1489.prototype.CENTER)
.hAlign_1(GT1488.prototype.CENTER)
.font_1(GT1441.prototype.set_0().name_1(GT1393.prototype.ROBOTO).bold_0().size_1(200))
.fontColor_1(GT1391.prototype.set_0().yellow_0())
.text_1("")
);
},
containerPayInDialog_2: function (a, b) {
return a
.modify_2(GT307.prototype.TEXT_PAYINDESC, GT1442.prototype.set_0().width_1(540))
.modify_2(GT307.prototype.TEXT_PAYINDESC, GT872.prototype.set_0().addFont_1(this.getDialogLabelFont_1(4)).addFont_1(this.getDialogLabelFont_1(6)).addFont_1(this.getDialogLabelFont_1(8)).breakLines_1(!1))
.modify_2(GT307.prototype.ID_PAYINSLIDERBACK, GT1240.prototype.set_0().moveX_1(20))
.modify_2(GT307.prototype.ACTION_PAYINSLIDER, GT1240.prototype.set_0().moveX_1(20))
.replace_2(GT307.prototype.ACTION_CLOSEPAYINDIALOG1, this.button_3("${neon_dialog_cancel}", 220, 75).position_2(20, 195).id_1(GT307.prototype.ACTION_CLOSEPAYINDIALOG1))
.replace_2(GT307.prototype.ACTION_CLOSEPAYINDIALOG2, this.button_3("${neon_dialog_cancel}", 220, 75).position_2(20, 195).id_1(GT307.prototype.ACTION_CLOSEPAYINDIALOG2))
.replace_2(GT307.prototype.ACTION_BUYTICKETS, this.button_3("${neon_alttext_buytickets}", 220, 75).position_2(260, 195).id_1(GT307.prototype.ACTION_BUYTICKETS))
.replace_2(GT307.prototype.ACTION_PAYINACCOUNT2, this.button_3("${neon_alttext_lobby_account}", 220, 75).position_2(260, 195).id_1(GT307.prototype.ACTION_PAYINACCOUNT2))
.replace_2(
GT763.prototype.ID_DEPOSIT_INFO,
GT871.prototype
.set_0()
.id_1(GT763.prototype.ID_DEPOSIT_INFO)
.position_2(20, 285)
.size_2(480, 100)
.insets_4(0, 0, 5, 5)
.vertical_0()
.verticalAlignment_1(GT1489.prototype.TOP)
.horizontalAlignment_1(GT1488.prototype.CENTER)
.child_1(
GT872.prototype
.set_0()
.insets_4(0, 0, 5, 5)
.size_2(360, 30)
.breakLines_1(!1)
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.text_1("${notenoughfunds}")
.addFont_1(this.getDialogLabelFont_1(3))
.addFont_1(this.getDialogLabelFont_1(5))
.addFont_1(this.getDialogLabelFont_1(7))
.addFont_1(this.getDialogLabelFont_1(9))
.gradient_1(this.theme.getLabelGradient_0())
.fontColor_1(this.theme.getLabelColor_0())
)
.child_1(GT871.prototype.set_0().horizontalAlignment_1(GT1488.prototype.CENTER).insets_4(0, 0, 5, 5).child_1(this.button_4("${depositnow}", 240, 46, 10).id_1(GT307.prototype.ACTION_PAYINACCOUNT)))
)
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(500, 395));
},
containerDisableGamblingDialog_2: function (a, b) {
return GT186.prototype.containerDisableGamblingDialog_2
.call(this, a, b)
.modify_2(GT307.prototype.TEXT_GAMBLING_DIALOG_TITLE, GT872.prototype.set_0().size_2(560, 68).insets_4(20, 20, 20, 0))
.modify_2(GT307.prototype.TEXT_GAMBLING_DIALOG_SEPARATOR, GT1188.prototype.set_0().size_2(520, 1).position_2(20, 70))
.modify_2(GT307.prototype.TEXT_GAMBLING_DIALOG_TEXT, GT1442.prototype.set_0().size_2(520, 115))
.modify_2(GT307.prototype.TEXT_GAMBLING_DIALOG_TEXT, GT1240.prototype.set_0().moveY_1(25))
.replace_2(
GT307.prototype.ACTION_CLOSE_GAMBLING_DIALOG,
GT873.prototype
.set_0()
.id_1(GT307.prototype.ACTION_CLOSE_GAMBLING_DIALOG)
.position_2(496, 20)
.child_1(GT1392.prototype.set_0().size_2(44, 44).image_1(this.closeIcon_1(44)).colorTransformation_1(this.getConsoleColorTransformation_0()))
)
.modify_2(GT307.prototype.IMG_GAMBLING_CARD, GT1240.prototype.set_0().x_1(Math.div(280, 2)).y_1(85))
.modify_2(GT307.prototype.IMG_GAMBLING_SINGLE, GT1240.prototype.set_0().x_1(Math.div(196, 2)).y_1(85))
.replace_2(GT307.prototype.ACTION_ENABLE_GAMBLING, this.toggleButton_4("${neon_settings_off}", 180, 92, !1).position_2(190, 383).id_1(GT307.prototype.ACTION_ENABLE_GAMBLING))
.replace_2(GT307.prototype.ACTION_DISABLE_GAMBLING, this.toggleButton_4("${neon_settings_on}", 180, 92, !0).position_2(190, 383).id_1(GT307.prototype.ACTION_DISABLE_GAMBLING))
.modify_2(GT307.prototype.TEXT_GAMBLING_DIALOG_SAVED, GT1442.prototype.set_0().width_1(520))
.modify_2(GT307.prototype.TEXT_GAMBLING_DIALOG_SAVED, GT1240.prototype.set_0().y_1(493))
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(560, 583));
},
containerAutoplaySettingsDialog_2: function (a, b) {
return a
.modify_2(GT307.prototype.TEXT_APROUNDS_MSG, GT1442.prototype.set_0().width_1(550))
.modify_2(GT307.prototype.TEXT_APROUNDS_MSG, GT872.prototype.set_0().addFont_1(this.getDialogLabelFont_1(2)).addFont_1(this.getDialogLabelFont_1(4)).addFont_1(this.getDialogLabelFont_1(6)))
.modify_2(GT307.prototype.ID_APROUNDS_SLIDERBACK, GT1442.prototype.set_0().width_1(520))
.modify_2(GT307.prototype.ID_APROUNDS_SLIDERBACK, GT1240.prototype.set_0().moveY_1(10))
.replace_2(GT307.prototype.ACTION_APROUNDS_SLIDER, GT763.prototype.slider_4(550, 6, 30, this.theme).position_2(15, 60).id_1(GT307.prototype.ACTION_APROUNDS_SLIDER).min_1(0).max_1(10))
.modify_2(GT307.prototype.TEXT_APROUNDS_VALUE, GT1240.prototype.set_0().moveY_1(10))
.modify_2(GT307.prototype.TEXT_APROUNDS_VALUE, GT1442.prototype.set_0().width_1(580))
.modify_2(GT307.prototype.TEXT_APLOSSLIMIT_MSG, GT1442.prototype.set_0().width_1(550))
.modify_2(GT307.prototype.TEXT_APLOSSLIMIT_MSG, GT1240.prototype.set_0().moveY_1(10))
.modify_2(GT307.prototype.TEXT_APLOSSLIMIT_MSG, GT872.prototype.set_0().addFont_1(this.getDialogLabelFont_1(2)).addFont_1(this.getDialogLabelFont_1(4)).addFont_1(this.getDialogLabelFont_1(6)))
.modify_2(GT307.prototype.ID_APLOSSLIMIT_SLIDERBACK, GT1442.prototype.set_0().width_1(520))
.modify_2(GT307.prototype.ID_APLOSSLIMIT_SLIDERBACK, GT1240.prototype.set_0().moveY_1(20))
.replace_2(GT307.prototype.ACTION_APLOSSLIMIT_SLIDER, GT763.prototype.slider_4(550, 6, 30, this.theme).position_2(15, 220).id_1(GT307.prototype.ACTION_APLOSSLIMIT_SLIDER).min_1(0).max_1(10))
.modify_2(GT307.prototype.TEXT_APLOSSLIMIT_VALUE, GT1240.prototype.set_0().moveY_1(20))
.modify_2(GT307.prototype.TEXT_APLOSSLIMIT_VALUE, GT1442.prototype.set_0().width_1(580))
.modify_2(GT307.prototype.TEXT_APSINGLEWIN_MSG, GT1442.prototype.set_0().size_2(550, 75))
.modify_2(GT307.prototype.TEXT_APSINGLEWIN_MSG, GT1240.prototype.set_0().moveY_1(30))
.modify_2(GT307.prototype.TEXT_APSINGLEWIN_MSG, GT872.prototype.set_0().addFont_1(this.getDialogLabelFont_1(2)).addFont_1(this.getDialogLabelFont_1(4)).addFont_1(this.getDialogLabelFont_1(6)))
.modify_2(GT307.prototype.ID_APSINGLEWIN_SLIDERBACK, GT1442.prototype.set_0().width_1(520))
.modify_2(GT307.prototype.ID_APSINGLEWIN_SLIDERBACK, GT1240.prototype.set_0().moveY_1(65))
.replace_2(GT307.prototype.ACTION_APSINGLEWIN_SLIDER, GT763.prototype.slider_4(550, 6, 30, this.theme).position_2(15, 415).id_1(GT307.prototype.ACTION_APSINGLEWIN_SLIDER).min_1(0).max_1(10))
.modify_2(GT307.prototype.TEXT_APSINGLEWIN_VALUE, GT1240.prototype.set_0().moveY_1(65))
.modify_2(GT307.prototype.TEXT_APSINGLEWIN_VALUE, GT1442.prototype.set_0().width_1(580))
.replace_2(GT307.prototype.ACTION_CLOSEAPSETTINGS, this.button_3("${neon_dialog_cancel}", Math.div(490, 2), 75).id_1(GT307.prototype.ACTION_CLOSEAPSETTINGS).position_2(30, 545))
.replace_2(GT307.prototype.ACTION_SETAPSETTINGS, this.button_3("${dialog_ok}", Math.div(490, 2), 75).id_1(GT307.prototype.ACTION_SETAPSETTINGS).position_2(Math.div(610, 2), 545))
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(580, 645));
},
getDialogLabelFont_1: function (a) {
return this.theme.getConsoleFont_0().getPFont_2(GT1237.prototype.FCK_LABEL_LARGE, a);
},
containerSessionSettingsDialog_2: function (a, b) {
return a
.replace_2(GT307.prototype.ACTION_SENDSETTINGS, this.button_3("${dialog_ok}", 390, 75).id_1(GT307.prototype.ACTION_SENDSETTINGS).position_2(30, 565))
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(450, 665));
},
containerReplayDialog_2: function (a, b) {
return GT1186.prototype
.set_0()
.id_1(GT307.prototype.ID_REPLAYDIALOG)
.child_1(
GT871.prototype
.set_0()
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.TOP)
.child_1(
GT1186.prototype
.set_0()
.size_2(1280, 1024)
.child_1(
this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/replay/replay-back.png").overrideSize_2(50, 50), 120, 120, 2)
.id_1(GT307.prototype.ACTION_REWIND)
.position_2(0, 700)
)
.child_1(
this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/replay/replay-play.png").overrideSize_2(50, 50), 120, 120, 2)
.id_1(GT307.prototype.ACTION_PLAY)
.position_2(145, 700)
)
.child_1(
this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/replay/replay-fw.png").overrideSize_2(50, 50), 120, 120, 2)
.id_1(GT307.prototype.ACTION_FORWARD)
.position_2(1015, 700)
)
.child_1(
this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/replay/replay-close.png").overrideSize_2(50, 50), 120, 120, 2)
.id_1(GT307.prototype.ACTION_CLOSEREPLAY)
.position_2(1160, 700)
)
.child_1(
GT1239.prototype
.set_0()
.id_1(GT307.prototype.TEXT_REPLAYINFO)
.text_1("")
.position_2(1065, 5)
.size_2(215, 80)
.font_1(GT1441.prototype.set_0().name_1(GT1393.prototype.ARIAL).bold_0().size_1(200))
.fontColor_1(GT1391.prototype.set_0().white_0())
.outline_2(2, GT1391.prototype.set_0().black_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
)
.child_1(
GT1239.prototype
.set_0()
.id_1(GT307.prototype.TEXT_REPLAYTIME)
.text_1("")
.position_2(1065, 45)
.size_2(215, 80)
.font_1(GT1441.prototype.set_0().name_1(GT1393.prototype.ARIAL).bold_0().size_1(200))
.fontColor_1(GT1391.prototype.set_0().white_0())
.outline_2(2, GT1391.prototype.set_0().black_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
)
)
);
},
containerRealityCheckDialogIntervalRounds_2: function (a, b) {
return a
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(530, 310))
.replace_2(GT307.prototype.ACTION_KEEPPLAYING, this.button_3("${alttext_realitycheckcontinue}", 470, 75).id_1(GT307.prototype.ACTION_KEEPPLAYING).position_2(30, 210));
},
containerRealityCheckDialogIntervalTime_2: function (a, b) {
return a
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(530, 370))
.replace_2(GT307.prototype.ACTION_KEEPPLAYING, this.button_3("${alttext_realitycheckcontinue}", 220, 70).id_1(GT307.prototype.ACTION_KEEPPLAYING).position_2(30, 275))
.replace_2(GT307.prototype.ACTION_STOPGAME, this.button_3("${alttext_realitycheckstop}", 220, 70).id_1(GT307.prototype.ACTION_STOPGAME).position_2(280, 275));
},
containerErrorDialog_2: function (a, b) {
return a
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(530, 280))
.modify_2(GT307.prototype.TEXT_ERRORMSG, GT872.prototype.set_0().size_2(530, 175))
.replace_2(GT307.prototype.ACTION_KEEPPLAYING, this.button_3("${alttext_limitcontinuebutton}", 470, 75).id_1(GT307.prototype.ACTION_KEEPPLAYING).position_2(30, 190))
.replace_2(GT307.prototype.ACTION_STOPGAME, this.button_3("${alttext_limitstopbutton}", 470, 75).id_1(GT307.prototype.ACTION_STOPGAME).position_2(30, 190));
},
containerRCSettingsDialog_2: function (a, b) {
return a
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(450, 290))
.replace_2(GT307.prototype.ACTION_SETRCSETTINGS, this.button_3("${dialog_ok}", 390, 75).id_1(GT307.prototype.ACTION_SETRCSETTINGS).position_2(30, 190));
},
containerRealityCheckDialogLeavingGame_2: function (a, b) {
return a
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(530, 340))
.replace_2(GT307.prototype.ACTION_STOPGAME, this.button_3("${alttext_realitycheckstop}", 460, 75).id_1(GT307.prototype.ACTION_STOPGAME).position_2(30, 240));
},
containerResponsibleGamingInfoDialog_2: function (a, b) {
return a
.modify_2(GT307.prototype.ID_DIALOG_BACKGROUND, GT1187.prototype.set_0().size_2(530, 390))
.modify_2(GT307.prototype.TEXT_ERRORMSG, GT872.prototype.set_0().size_2(530, 280))
.replace_2(GT307.prototype.ACTION_KEEPPLAYING, this.button_3("${alttext_limitcontinuebutton}", 220, 70).id_1(GT307.prototype.ACTION_KEEPPLAYING).position_2(30, 300))
.replace_2(GT307.prototype.ACTION_RESPONSIBLE_LINK, this.button_3("${moreinfo}", 220, 70).id_1(GT307.prototype.ACTION_RESPONSIBLE_LINK).position_2(280, 300));
},
button_3: function (a, b, d) {
return this.button_4(a, b, d, 5);
},
button_4: function (a, b, d, e) {
return GT873.prototype
.set_0()
.size_2(b, d)
.states_1(GT1021.prototype.set_0().state_2(0, GT1236.prototype.INACTIVE).state_2(1, GT1236.prototype.DEFAULT).state_2(2, GT1236.prototype.PRESSED).state_2(3, GT1236.prototype.MOUSEOVER))
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorderAlpha_0()))
.borderThickness_1(3)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT872.prototype
.set_0()
.size_2(b, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.addFont_1(this.getButtonFont_1(3))
.addFont_1(this.getButtonFont_1(4))
.addFont_1(this.getButtonFont_1(5))
.fontColor_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorder_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(e, e, e, e)
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorderAlpha_0()))
.borderThickness_1(3)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT872.prototype
.set_0()
.size_2(b, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.addFont_1(this.getButtonFont_1(3))
.addFont_1(this.getButtonFont_1(4))
.addFont_1(this.getButtonFont_1(5))
.gradient_1(this.theme.getNormalButtonGradient_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(e, e, e, e)
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBorderAlpha_0()))
.borderThickness_1(3)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT1186.prototype
.set_0()
.contentScaling_2(0.97, 0.97)
.position_2(Integer.truncate_1((b - 0.97 * b) / 2), Integer.truncate_1((d - 0.97 * d) / 2))
.size_2(b, d)
.child_1(
GT872.prototype
.set_0()
.size_2(b, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.addFont_1(this.getButtonFont_1(3))
.addFont_1(this.getButtonFont_1(4))
.addFont_1(this.getButtonFont_1(5))
.gradient_1(this.theme.getNormalButtonGradient_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(e, e, e, e)
)
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorderAlpha_0()))
.borderThickness_1(3)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT872.prototype
.set_0()
.size_2(b, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.addFont_1(this.getButtonFont_1(3))
.addFont_1(this.getButtonFont_1(4))
.addFont_1(this.getButtonFont_1(5))
.gradient_1(GT1238.prototype.invert_1(this.theme.getNormalButtonGradient_0()))
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(e, e, e, e)
)
);
},
toggleButton_4: function (a, b, d, e) {
var f = Math.div(b, 2),
g = e ? 1 : f - 1,
k = e ? f + 4 : 6,
m = e ? GT1019.prototype.CCK_BUTTON_PRIMARY : GT1019.prototype.CCK_BUTTON_DEFAULT,
m = this.theme.getConsoleColorSet_0().getButtonColorSet_1(m);
e = e ? "/com/greentube/gameconsole/res/neon/mobile/on-icon.png" : "/com/greentube/gameconsole/res/neon/mobile/off-icon.png";
return GT873.prototype
.set_0()
.size_2(b, d)
.states_1(GT1021.prototype.set_0().state_2(0, GT1236.prototype.INACTIVE).state_2(1, GT1236.prototype.DEFAULT).state_2(2, GT1236.prototype.PRESSED).state_2(3, GT1236.prototype.MOUSEOVER))
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(m.getInactive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(m.getInactive_0().getBackgroundAlpha_0()))
.colorBorder_1(m.getInactive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(m.getInactive_0().getBorderAlpha_0()))
.borderThickness_1(3)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT872.prototype
.set_0()
.position_2(g, 0)
.size_2(f, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.addFont_1(this.getButtonFont_1(3))
.addFont_1(this.getButtonFont_1(4))
.fontColor_1(m.getInactive_0().getBorder_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(5, 5, 5, 5)
)
.child_1(GT818.prototype.set_0().image_1(GT1390.prototype.set_0().file_1(e)).position_2(k, 6).colorTransformation_1(m.getInactive_0().getColorTransformation_0()))
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(m.getActive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(m.getActive_0().getBackgroundAlpha_0()))
.colorBorder_1(m.getActive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(m.getActive_0().getBorderAlpha_0()))
.borderThickness_1(3)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT872.prototype
.set_0()
.position_2(g, 0)
.size_2(f, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.addFont_1(this.getButtonFont_1(3))
.addFont_1(this.getButtonFont_1(4))
.gradient_1(this.theme.getLabelGradient_0())
.fontColor_1(this.theme.getLabelColor_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(5, 5, 5, 5)
)
.child_1(GT818.prototype.set_0().image_1(GT1390.prototype.set_0().file_1(e)).position_2(k, 6).colorTransformation_1(m.getActive_0().getColorTransformation_0()))
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(m.getPressed_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(m.getPressed_0().getBackgroundAlpha_0()))
.colorBorder_1(m.getPressed_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(m.getPressed_0().getBorderAlpha_0()))
.borderThickness_1(3)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT1186.prototype
.set_0()
.contentScaling_2(0.97, 0.97)
.position_2(Integer.truncate_1((b - 0.97 * b) / 2), Integer.truncate_1((d - 0.97 * d) / 2))
.size_2(b, d)
.child_1(
GT872.prototype
.set_0()
.position_2(g, 0)
.size_2(f, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.addFont_1(this.getButtonFont_1(3))
.addFont_1(this.getButtonFont_1(4))
.gradient_1(this.theme.getLabelGradient_0())
.fontColor_1(this.theme.getLabelColor_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(5, 5, 5, 5)
)
)
.child_1(GT818.prototype.set_0().image_1(GT1390.prototype.set_0().file_1(e)).position_2(k, 6).colorTransformation_1(m.getPressed_0().getColorTransformation_0()))
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(m.getHover_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(m.getHover_0().getBackgroundAlpha_0()))
.colorBorder_1(m.getHover_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(m.getHover_0().getBorderAlpha_0()))
.borderThickness_1(3)
.outerRadius_1(8)
.innerRadius_1(8)
)
.child_1(
GT872.prototype
.set_0()
.position_2(g, 0)
.size_2(f, d)
.text_1(a)
.addFont_1(this.getButtonFont_1(0))
.addFont_1(this.getButtonFont_1(1))
.addFont_1(this.getButtonFont_1(2))
.addFont_1(this.getButtonFont_1(3))
.addFont_1(this.getButtonFont_1(4))
.gradient_1(this.theme.getLabelGradient_0())
.fontColor_1(this.theme.getLabelColor_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
.insets_4(5, 5, 5, 5)
)
.child_1(GT818.prototype.set_0().image_1(GT1390.prototype.set_0().file_1(e)).position_2(k, 6).colorTransformation_1(m.getHover_0().getColorTransformation_0()))
);
},
buttonIcon_4: function (a, b, d, e) {
return GT873.prototype
.set_0()
.size_2(b, d)
.states_1(GT1021.prototype.set_0().state_2(0, GT1236.prototype.INACTIVE).state_2(1, GT1236.prototype.DEFAULT).state_2(2, GT1236.prototype.PRESSED).state_2(3, GT1236.prototype.MOUSEOVER))
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getInactive_0().getBorderAlpha_0()))
.borderThickness_1(e)
.outerRadius_1(4)
.innerRadius_1(4)
.numberOfEdges_1(3)
)
.child_1(GT871.prototype.set_0().horizontalAlignment_1(GT1488.prototype.CENTER).verticalAlignment_1(GT1489.prototype.CENTER).child_1(GT1392.prototype.set_0().image_1(a)))
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getBorderAlpha_0()))
.borderThickness_1(e)
.outerRadius_1(4)
.innerRadius_1(4)
.numberOfEdges_1(3)
)
.child_1(
GT871.prototype
.set_0()
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.CENTER)
.child_1(GT1392.prototype.set_0().image_1(a).colorTransformation_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getColorTransformation_0()))
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getBorderAlpha_0()))
.borderThickness_1(e)
.outerRadius_1(4)
.innerRadius_1(4)
.numberOfEdges_1(3)
)
.child_1(
GT1186.prototype
.set_0()
.contentScaling_2(0.9, 0.9)
.position_2(Integer.truncate_1((b - 0.9 * b) / 2), Integer.truncate_1((d - 0.9 * d) / 2))
.size_2(b, d)
.child_1(
GT871.prototype
.set_0()
.size_2(b, d)
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.CENTER)
.child_1(
GT1392.prototype
.set_0()
.image_1(a)
.colorTransformation_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getPressed_0().getColorTransformation_0())
)
)
)
)
.child_1(
GT1186.prototype
.set_0()
.resizeToContent_1(!0)
.child_1(
GT1187.prototype
.set_0()
.size_2(b, d)
.colorArea_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackground_0())
.transparencyArea_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBackgroundAlpha_0()))
.colorBorder_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorder_0())
.transparencyBorder_1(GT1022.prototype.set_0().alpha_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getBorderAlpha_0()))
.borderThickness_1(e)
.outerRadius_1(4)
.innerRadius_1(4)
.numberOfEdges_1(3)
)
.child_1(
GT871.prototype
.set_0()
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.CENTER)
.child_1(GT1392.prototype.set_0().image_1(a).colorTransformation_1(this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getHover_0().getColorTransformation_0()))
)
);
},
getButtonFont_1: function (a) {
return this.theme.getConsoleFont_0().getPFont_2(GT1237.prototype.FCK_SECONDARY_BUTTON, a);
},
closeIcon_1: function (a) {
return GT1390.prototype.set_0().tiling_2(1, 1).file_1("/com/greentube/gameconsole/res/neon/mobile/close-icon.png").overrideSize_2(a, a);
},
getConsoleColorTransformation_0: function () {
return this.theme.getConsoleColorSet_0().getButtonColorSet_1(GT1019.prototype.CCK_BUTTON_DEFAULT).getActive_0().getColorTransformation_0();
},
},
"GT463",
[]
),
GT209 = GT463.extend(
{
initialConstructor_0: function () {
GT463.prototype.initialConstructor_0.call(this);
},
initialConstructor_3: function (a, b, d) {
GT463.prototype.initialConstructor_3.call(this, a, b, d);
},
containerWatcherInfo_2: function (a, b) {
return GT463.prototype.containerWatcherInfo_2.call(this, a, b).position_2(275, 425);
},
containerPayInDialog_2: function (a, b) {
return GT463.prototype.containerPayInDialog_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerAutoplaySettingsDialog_2: function (a, b) {
return GT463.prototype.containerAutoplaySettingsDialog_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerReplayDialog_2: function (a, b) {
return GT1186.prototype
.set_0()
.id_1(GT307.prototype.ID_REPLAYDIALOG)
.child_1(
GT871.prototype
.set_0()
.horizontalAlignment_1(GT1488.prototype.CENTER)
.verticalAlignment_1(GT1489.prototype.TOP)
.child_1(
GT1186.prototype
.set_0()
.size_2(1280, 1024)
.child_1(
this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/replay/replay-back.png").overrideSize_2(50, 50), 200, 200, 8)
.id_1(GT307.prototype.ACTION_REWIND)
.position_2(0, 610)
)
.child_1(
this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/replay/replay-play.png").overrideSize_2(50, 50), 200, 200, 8)
.id_1(GT307.prototype.ACTION_PLAY)
.position_2(225, 610)
)
.child_1(
this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/replay/replay-fw.png").overrideSize_2(50, 50), 200, 200, 8)
.id_1(GT307.prototype.ACTION_FORWARD)
.position_2(855, 610)
)
.child_1(
this.buttonIcon_4(GT1390.prototype.set_0().file_1("/com/greentube/gameconsole/res/replay/replay-close.png").overrideSize_2(50, 50), 200, 200, 8)
.id_1(GT307.prototype.ACTION_CLOSEREPLAY)
.position_2(1080, 610)
)
.child_1(
GT1239.prototype
.set_0()
.id_1(GT307.prototype.TEXT_REPLAYINFO)
.text_1("")
.position_2(1065, 5)
.size_2(215, 80)
.font_1(GT1441.prototype.set_0().name_1(GT1393.prototype.ARIAL).bold_0().size_1(200))
.fontColor_1(GT1391.prototype.set_0().white_0())
.outline_2(2, GT1391.prototype.set_0().black_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
)
.child_1(
GT1239.prototype
.set_0()
.id_1(GT307.prototype.TEXT_REPLAYTIME)
.text_1("")
.position_2(1065, 45)
.size_2(215, 80)
.font_1(GT1441.prototype.set_0().name_1(GT1393.prototype.ARIAL).bold_0().size_1(200))
.fontColor_1(GT1391.prototype.set_0().white_0())
.outline_2(2, GT1391.prototype.set_0().black_0())
.hAlign_1(GT1488.prototype.CENTER)
.vAlign_1(GT1489.prototype.CENTER)
)
)
);
},
getDialogLabelFont_1: function (a) {
return this.theme.getConsoleFont_0().getPFont_2(GT1237.prototype.FCK_BET_LINES_PANEL_BUTTON, a);
},
containerSessionSettingsDialog_2: function (a, b) {
return GT463.prototype.containerSessionSettingsDialog_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerRealityCheckDialogIntervalRounds_2: function (a, b) {
return GT463.prototype.containerRealityCheckDialogIntervalRounds_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerRealityCheckDialogIntervalTime_2: function (a, b) {
return GT463.prototype.containerRealityCheckDialogIntervalTime_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerErrorDialog_2: function (a, b) {
return GT463.prototype.containerErrorDialog_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerRCSettingsDialog_2: function (a, b) {
return GT463.prototype.containerRCSettingsDialog_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerRealityCheckDialogLeavingGame_2: function (a, b) {
return GT463.prototype.containerRealityCheckDialogLeavingGame_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerResponsibleGamingInfoDialog_2: function (a, b) {
return GT463.prototype.containerResponsibleGamingInfoDialog_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
containerDisableGamblingDialog_2: function (a, b) {
return GT463.prototype.containerDisableGamblingDialog_2.call(this, a, b).contentScaling_2(1.5, 1.5);
},
},
"GT209",
[]
),
GT1535 = Class.extend(
{
initialConstructor_0: function () {
this.background = this.border = null;
this.backgroundAlpha = this.borderAlpha = 0;
this.colorTransformation = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_5: function (a, b, d, e, f) {
this.background = this.border = null;
this.backgroundAlpha = this.borderAlpha = 0;
this.colorTransformation = null;
Class.prototype.initialConstructor_0.call(this);
this.border = b;
this.background = d;
this.borderAlpha = e;
this.backgroundAlpha = f;
},
initialConstructor_6: function (a, b, d, e, f, g) {
GT1535.prototype.initialConstructor_5.call(this, a, b, d, e, f);
this.colorTransformation = g;
},
getBorder_0: function () {
return this.border;
},
getBackground_0: function () {
return this.background;
},
getBorderAlpha_0: function () {
return this.borderAlpha;
},
getBackgroundAlpha_0: function () {
return this.backgroundAlpha;
},
getColorTransformation_0: function () {
return this.colorTransformation;
},
},
"GT1535",
[]
),
GT1241 = Class.extend(
{
initialConstructor_0: function () {
this.pressed = this.hover = this.active = this.inactive = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_5: function (a, b, d, e, f) {
this.pressed = this.hover = this.active = this.inactive = null;
Class.prototype.initialConstructor_0.call(this);
this.inactive = b;
this.active = d;
this.hover = e;
this.pressed = f;
},
getInactive_0: function () {
return this.inactive;
},
getActive_0: function () {
return this.active;
},
getHover_0: function () {
return this.hover;
},
getPressed_0: function () {
return this.pressed;
},
},
"GT1241",
[]
),
GT1019 = Class.extend({ initialConstructor_0: function () {} }, "GT1019", []);
GT1019.prototype.CCK_BUTTON_DEFAULT = "cck_button_default";
GT1019.prototype.CCK_BUTTON_BET_VALUE = "cck_button_bet_value";
GT1019.prototype.CCK_BUTTON_PRIMARY = "cck_button_primary";
GT1019.prototype.CCK_DISPLAY = "cck_display";
GT1019.prototype.CCK_BUTTON_ON_BLACK = "cck_button_on_black";
GT1019.prototype.CCK_BUTTON_SPINNER = "cck_button_spinner";
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND = "cck_button_overlay_sound";
var GT971 = Class.extend(
{
initialConstructor_16: function (a, b, d, e, f, g, k, m, n, p, q, r, t, u, B, A) {
this.colorSets = null;
this.primaryBgAlphaExtra = this.primaryBgAlphaNormal = this.normalBgAlphaExtra = this.normalBgAlphaNormal = this.primaryCtBlue = this.primaryCtGreen = this.primaryCtRed = this.ctBlue = this.ctGreen = this.ctRed = this.baseColorDisplay = this.primaryColor = this.bgColorLight = this.bgColor = this.inactiveColor = this.baseColor = 0;
this.colorSets = new java_util_JavaScriptHashtable();
this.baseColor = a;
this.inactiveColor = b;
this.bgColor = d;
this.bgColorLight = e;
this.primaryColor = f;
this.baseColorDisplay = g;
this.ctRed = k;
this.ctGreen = m;
this.ctBlue = n;
this.primaryCtRed = p;
this.primaryCtGreen = q;
this.primaryCtBlue = r;
this.normalBgAlphaNormal = t;
this.normalBgAlphaExtra = u;
this.primaryBgAlphaNormal = B;
this.primaryBgAlphaExtra = A;
this.addColorSetConfig_2(GT1019.prototype.CCK_BUTTON_DEFAULT, this.getDefaultButtonColorSet_0());
this.addColorSetConfig_2(GT1019.prototype.CCK_BUTTON_BET_VALUE, this.getBetValueButtonColorSet_0());
this.addColorSetConfig_2(GT1019.prototype.CCK_BUTTON_PRIMARY, this.getPrimaryButtonColorSet_0());
this.addColorSetConfig_2(GT1019.prototype.CCK_DISPLAY, this.getDisplayColorSet_0());
this.addColorSetConfig_2(GT1019.prototype.CCK_BUTTON_ON_BLACK, this.getButtonOnBlackColorSet_0());
this.addColorSetConfig_2(GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND, this.getButtonOverlaySoundColorSet_0());
this.addColorSetConfig_2(GT1019.prototype.CCK_BUTTON_SPINNER, this.getButtonSpinnerColorSet_0());
},
initialConstructor_0: function () {
GT971.prototype.initialConstructor_16.call(
this,
GT971.prototype.BASE_COLOR_BUTTON,
GT971.prototype.BASE_COLOR_INACTIVE,
GT971.prototype.BASE_COLOR_BG,
GT971.prototype.BASE_COLOR_BG_LIGHT,
GT971.prototype.PRIMARY_COLOR,
GT971.prototype.BASE_COLOR_DISPLAY,
GT971.prototype.CT_RED_OFFSET,
GT971.prototype.CT_GREEN_OFFSET,
GT971.prototype.CT_BLUE_OFFSET,
GT971.prototype.PRIMARY_CT_RED_OFFSET,
GT971.prototype.PRIMARY_CT_GREEN_OFFSET,
GT971.prototype.PRIMARY_CT_BLUE_OFFSET,
GT971.prototype.NORMAL_BUTTON_BG_ALPHA_NORMAL,
GT971.prototype.NORMAL_BUTTON_BG_ALPHA_EXTRA,
GT971.prototype.PRIMARY_BUTTON_BG_ALPHA_NORMAL,
GT971.prototype.PRIMARY_BUTTON_BG_ALPHA_EXTRA
);
},
initialConstructor_4: function (a, b, d, e) {
GT971.prototype.initialConstructor_16.call(
this,
GT971.prototype.BASE_COLOR_BUTTON,
GT971.prototype.BASE_COLOR_INACTIVE,
GT971.prototype.BASE_COLOR_BG,
GT971.prototype.BASE_COLOR_BG_LIGHT,
GT971.prototype.PRIMARY_COLOR,
GT971.prototype.BASE_COLOR_DISPLAY,
GT971.prototype.CT_RED_OFFSET,
GT971.prototype.CT_GREEN_OFFSET,
GT971.prototype.CT_BLUE_OFFSET,
GT971.prototype.PRIMARY_CT_RED_OFFSET,
GT971.prototype.PRIMARY_CT_GREEN_OFFSET,
GT971.prototype.PRIMARY_CT_BLUE_OFFSET,
a,
b,
d,
e
);
},
initialConstructor_2: function (a, b) {
GT971.prototype.initialConstructor_16.call(
this,
a,
GT971.prototype.BASE_COLOR_INACTIVE,
GT971.prototype.BASE_COLOR_BG,
GT971.prototype.BASE_COLOR_BG_LIGHT,
b,
GT971.prototype.BASE_COLOR_DISPLAY,
((a >> 16) & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
((a >> 8) & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
(a & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
((b >> 16) & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
((b >> 8) & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
(b & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
GT971.prototype.NORMAL_BUTTON_BG_ALPHA_NORMAL,
GT971.prototype.NORMAL_BUTTON_BG_ALPHA_EXTRA,
GT971.prototype.PRIMARY_BUTTON_BG_ALPHA_NORMAL,
GT971.prototype.PRIMARY_BUTTON_BG_ALPHA_EXTRA
);
},
initialConstructor_6: function (a, b, d, e, f, g) {
GT971.prototype.initialConstructor_16.call(
this,
a,
GT971.prototype.BASE_COLOR_INACTIVE,
GT971.prototype.BASE_COLOR_BG,
GT971.prototype.BASE_COLOR_BG_LIGHT,
b,
GT971.prototype.BASE_COLOR_DISPLAY,
((a >> 16) & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
((a >> 8) & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
(a & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
((b >> 16) & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
((b >> 8) & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
(b & 255) - GT971.prototype.DEFAULT_GRAYSCALE_OFFSET,
d,
e,
f,
g
);
},
initialConstructor_8: function (a, b, d, e, f, g, k, m) {
GT971.prototype.initialConstructor_16.call(
this,
a,
GT971.prototype.BASE_COLOR_INACTIVE,
GT971.prototype.BASE_COLOR_BG,
GT971.prototype.BASE_COLOR_BG_LIGHT,
b,
GT971.prototype.BASE_COLOR_DISPLAY,
d,
e,
f,
g,
k,
m,
GT971.prototype.NORMAL_BUTTON_BG_ALPHA_NORMAL,
GT971.prototype.NORMAL_BUTTON_BG_ALPHA_EXTRA,
GT971.prototype.PRIMARY_BUTTON_BG_ALPHA_NORMAL,
GT971.prototype.PRIMARY_BUTTON_BG_ALPHA_EXTRA
);
},
getDefaultButtonColorSet_0: function () {
var a = new GT1535(
GT1019.prototype.CCK_BUTTON_DEFAULT.concat_1("#default"),
GT1391.prototype.set_0().rgb_1(this.baseColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
156,
this.normalBgAlphaNormal,
this.getDefaultColorTransformation_0()
),
b = new GT1535(
GT1019.prototype.CCK_BUTTON_DEFAULT.concat_1("#inactive"),
GT1391.prototype.set_0().rgb_1(this.inactiveColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
178,
this.normalBgAlphaNormal,
this.getInactiveColorTransformation_0()
),
d = new GT1535(
GT1019.prototype.CCK_BUTTON_DEFAULT.concat_1("#mouseover"),
GT1391.prototype.set_0().rgb_1(this.baseColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
255,
this.normalBgAlphaExtra,
this.getHoverColorTransformation_0()
),
e = new GT1535(
GT1019.prototype.CCK_BUTTON_DEFAULT.concat_1("#pressed"),
GT1391.prototype.set_0().rgb_1(this.baseColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
255,
this.normalBgAlphaExtra,
this.getPressedColorTransformation_0()
);
return new GT1241(GT1019.prototype.CCK_BUTTON_DEFAULT, b, a, d, e);
},
getPrimaryButtonColorSet_0: function () {
var a = new GT1535(
GT1019.prototype.CCK_BUTTON_PRIMARY.concat_1("#default"),
GT1391.prototype.set_0().rgb_1(this.primaryColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
156,
this.primaryBgAlphaNormal,
this.getPrimaryDefaultColorTransformation_0()
),
b = new GT1535(
GT1019.prototype.CCK_BUTTON_PRIMARY.concat_1("#inactive"),
GT1391.prototype.set_0().rgb_1(this.inactiveColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
178,
this.primaryBgAlphaNormal,
this.getPrimaryInactiveColorTransformation_0()
),
d = new GT1535(
GT1019.prototype.CCK_BUTTON_PRIMARY.concat_1("#mouseover"),
GT1391.prototype.set_0().rgb_1(this.primaryColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
255,
this.primaryBgAlphaExtra,
this.getPrimaryHoverColorTransformation_0()
),
e = new GT1535(
GT1019.prototype.CCK_BUTTON_PRIMARY.concat_1("#pressed"),
GT1391.prototype.set_0().rgb_1(this.primaryColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
155,
this.primaryBgAlphaExtra,
this.getPrimaryPressedColorTransformation_0()
);
return new GT1241(GT1019.prototype.CCK_BUTTON_PRIMARY, b, a, d, e);
},
getBetValueButtonColorSet_0: function () {
var a = new GT1535(GT1019.prototype.CCK_BUTTON_BET_VALUE.concat_1("#default"), GT1391.prototype.set_0().rgb_1(this.baseColor), GT1391.prototype.set_0().rgb_1(this.bgColor), 178, 180),
b = new GT1535(GT1019.prototype.CCK_BUTTON_BET_VALUE.concat_1("#inactive"), GT1391.prototype.set_0().rgb_1(this.inactiveColor), GT1391.prototype.set_0().rgb_1(this.bgColor), 178, 180),
d = new GT1535(GT1019.prototype.CCK_BUTTON_BET_VALUE.concat_1("#mouseover"), GT1391.prototype.set_0().rgb_1(this.baseColor), GT1391.prototype.set_0().rgb_1(this.bgColor), 255, 210),
e = new GT1535(GT1019.prototype.CCK_BUTTON_BET_VALUE.concat_1("#pressed"), GT1391.prototype.set_0().rgb_1(this.baseColor), GT1391.prototype.set_0().rgb_1(this.baseColor), 255, 255);
return new GT1241(GT1019.prototype.CCK_BUTTON_BET_VALUE, b, a, d, e);
},
getButtonOnBlackColorSet_0: function () {
var a = new GT1535(GT1019.prototype.CCK_BUTTON_ON_BLACK.concat_1("#default"), GT1391.prototype.set_0().rgb_1(this.baseColor), GT1391.prototype.set_0().rgb_1(this.bgColor), 178, 240, this.getDefaultColorTransformation_0()),
b = new GT1535(
GT1019.prototype.CCK_BUTTON_ON_BLACK.concat_1("#inactive"),
GT1391.prototype.set_0().rgb_1(this.inactiveColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
178,
240,
this.getInactiveColorTransformation_0()
),
d = new GT1535(
GT1019.prototype.CCK_BUTTON_ON_BLACK.concat_1("#mouseover"),
GT1391.prototype.set_0().rgb_1(this.baseColor),
GT1391.prototype.set_0().rgb_1(this.bgColorLight),
255,
20,
this.getHoverColorTransformation_0()
),
e = new GT1535(
GT1019.prototype.CCK_BUTTON_ON_BLACK.concat_1("#pressed"),
GT1391.prototype.set_0().rgb_1(this.baseColor),
GT1391.prototype.set_0().rgb_1(this.bgColorLight),
255,
35,
this.getPressedColorTransformation_0()
);
return new GT1241(GT1019.prototype.CCK_BUTTON_ON_BLACK, b, a, d, e);
},
getButtonSpinnerColorSet_0: function () {
var a = new GT1535(GT1019.prototype.CCK_BUTTON_SPINNER.concat_1("#default"), GT1391.prototype.set_0().rgb_1(this.baseColor), GT1391.prototype.set_0().rgb_1(this.bgColor), 0, 0, this.getDefaultColorTransformation_0()),
b = new GT1535(GT1019.prototype.CCK_BUTTON_SPINNER.concat_1("#inactive"), GT1391.prototype.set_0().rgb_1(this.inactiveColor), GT1391.prototype.set_0().rgb_1(this.bgColor), 0, 0, this.getInactiveColorTransformation_0()),
d = new GT1535(GT1019.prototype.CCK_BUTTON_SPINNER.concat_1("#mouseover"), GT1391.prototype.set_0().rgb_1(this.baseColor), GT1391.prototype.set_0().rgb_1(this.bgColorLight), 156, 0, this.getHoverColorTransformation_0()),
e = new GT1535(
GT1019.prototype.CCK_BUTTON_SPINNER.concat_1("#pressed"),
GT1391.prototype.set_0().rgb_1(this.baseColor),
GT1391.prototype.set_0().rgb_1(this.bgColorLight),
255,
35,
this.getPressedColorTransformation_0()
);
return new GT1241(GT1019.prototype.CCK_BUTTON_SPINNER, b, a, d, e);
},
getButtonOverlaySoundColorSet_0: function () {
var a = new GT1535(GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND.concat_1("#default"), GT1391.prototype.set_0().rgb_1(this.bgColor), GT1391.prototype.set_0().rgb_1(this.bgColor), 12, 12, this.getDefaultColorTransformation_0()),
b = new GT1535(
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND.concat_1("#inactive"),
GT1391.prototype.set_0().rgb_1(this.bgColor),
GT1391.prototype.set_0().rgb_1(this.bgColor),
240,
240,
this.getInactiveColorTransformation_0()
),
d = new GT1535(
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND.concat_1("#mouseover"),
GT1391.prototype.set_0().rgb_1(this.baseColor),
GT1391.prototype.set_0().rgb_1(this.bgColorLight),
255,
28,
this.getHoverColorTransformation_0()
),
e = new GT1535(
GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND.concat_1("#pressed"),
GT1391.prototype.set_0().rgb_1(this.baseColor),
GT1391.prototype.set_0().rgb_1(this.bgColorLight),
178,
0,
this.getPressedColorTransformation_0()
);
return new GT1241(GT1019.prototype.CCK_BUTTON_OVERLAY_SOUND, b, a, d, e);
},
getDisplayColorSet_0: function () {
var a = new GT1535(GT1019.prototype.CCK_DISPLAY.concat_1("#default"), GT1391.prototype.set_0().rgb_1(this.baseColorDisplay), GT1391.prototype.set_0().rgb_1(this.bgColor), 40, this.normalBgAlphaNormal);
return new GT1241(GT1019.prototype.CCK_DISPLAY, null, a, null, null);
},
getDefaultColorTransformation_0: function () {
return this.makeColorTransformation_3(this.ctRed, this.ctGreen, this.ctBlue);
},
getInactiveColorTransformation_0: function () {
return null;
},
getHoverColorTransformation_0: function () {
return this.makeColorTransformation_3(this.ctRed + GT971.prototype.HIGHLIGHT_OFFSET, this.ctGreen + GT971.prototype.HIGHLIGHT_OFFSET, this.ctBlue + GT971.prototype.HIGHLIGHT_OFFSET);
},
getPressedColorTransformation_0: function () {
return this.getHoverColorTransformation_0();
},
getPrimaryDefaultColorTransformation_0: function () {
return this.makeColorTransformation_3(this.primaryCtRed, this.primaryCtGreen, this.primaryCtBlue);
},
getPrimaryInactiveColorTransformation_0: function () {
return null;
},
getPrimaryHoverColorTransformation_0: function () {
return this.makeColorTransformation_3(this.primaryCtRed + GT971.prototype.HIGHLIGHT_OFFSET, this.primaryCtGreen + GT971.prototype.HIGHLIGHT_OFFSET, this.primaryCtBlue + GT971.prototype.HIGHLIGHT_OFFSET);
},
getPrimaryPressedColorTransformation_0: function () {
return this.getPrimaryHoverColorTransformation_0();
},
makeColorTransformation_3: function (a, b, d) {
return GT656.prototype.set_0().matrix_12(33, 33, 33, a, 33, 33, 33, b, 33, 33, 33, d);
},
addColorSetConfig_2: function (a, b) {
this.colorSets.put_2(a, b);
return this;
},
getButtonColorSet_1: function (a) {
var b = this.colorSets.get_1(a);
GT1650.prototype.assertExp_2(null != b, "Illegal use of colorSetConfigKey='" + a + "'");
return b;
},
createAndAddCustomColorSetConfig_2: function (a, b) {
GT1650.prototype.assertExp_2(null != a && "" != a, "String Name is empty or null.");
var d = new GT1535(a.concat_1("#default"), b, GT1391.prototype.set_0().rgb_1(this.bgColor), 156, 160, this.getPrimaryDefaultColorTransformation_0()),
e = new GT1535(a.concat_1("#inactive"), GT1391.prototype.set_0().rgb_1(this.inactiveColor), GT1391.prototype.set_0().rgb_1(this.bgColor), 178, 160, this.getPrimaryInactiveColorTransformation_0()),
f = new GT1535(a.concat_1("#mouseover"), b, GT1391.prototype.set_0().rgb_1(this.bgColor), 255, 210, this.getPrimaryHoverColorTransformation_0()),
g = new GT1535(a.concat_1("#pressed"), b, GT1391.prototype.set_0().rgb_1(this.bgColor), 155, 210, this.getPrimaryPressedColorTransformation_0());
this.addColorSetConfig_2(a, new GT1241(a, e, d, f, g));
},
},
"GT971",
[GT1178]
);
GT971.prototype.DEFAULT_GRAYSCALE_OFFSET = 127;
GT971.prototype.BASE_COLOR_BUTTON = 16763904;
GT971.prototype.BASE_COLOR_DISPLAY = 16777215;
GT971.prototype.BASE_COLOR_INACTIVE = 8421504;
GT971.prototype.BASE_COLOR_BG = 0;
GT971.prototype.BASE_COLOR_BG_LIGHT = 16777215;
GT971.prototype.PRIMARY_COLOR = 6484992;
GT971.prototype.CT_RED_OFFSET = 128;
GT971.prototype.CT_GREEN_OFFSET = 77;
GT971.prototype.CT_BLUE_OFFSET = -127;
GT971.prototype.PRIMARY_CT_RED_OFFSET = -34;
GT971.prototype.PRIMARY_CT_GREEN_OFFSET = 103;
GT971.prototype.PRIMARY_CT_BLUE_OFFSET = -103;
GT971.prototype.HIGHLIGHT_OFFSET = 36;
GT971.prototype.NORMAL_BUTTON_BG_ALPHA_NORMAL = 160;
GT971.prototype.NORMAL_BUTTON_BG_ALPHA_EXTRA = 174;
GT971.prototype.PRIMARY_BUTTON_BG_ALPHA_NORMAL = 160;
GT971.prototype.PRIMARY_BUTTON_BG_ALPHA_EXTRA = 210;
var GT1189 = Class.extend(
{
initialConstructor_0: function () {
this.fontConfigs = null;
this.fontConfigs = new java_util_JavaScriptHashtable();
},
addFontConfig_2: function (a, b) {
this.fontConfigs.put_2(a, b);
return this;
},
getFonts_1: function (a) {
var b = this.fontConfigs.get_1(a);
GT1650.prototype.assertExp_2(null != b, "Illegal use of fontConfigKey='" + a + "'");
a = [].createArray(b.getIterations_0());
for (var d = 0; d < a.length; d++)
a[d] = GT1389.prototype
.getInstance_0()
.getSkinManager_0()
.getResourceManager_0()
.getFont_6(b.getName_0(), b.isBold_0(), b.isItalic_0(), 0, b.getStartWidth_0() + d * b.getStep_0(), 0);
return a;
},
getPFont_2: function (a, b) {
var d = this.fontConfigs.get_1(a),
e = GT1441.prototype.set_0();
e.name_1(GT1393.prototype.findFont_1(d.getName_0()));
d.isBold_0() && e.bold_0();
d.isItalic_0() && e.italic_0();
e.size_1(d.getStartWidth_0() + b * d.getStep_0());
return e;
},
getFontConfigs_0: function () {
for (var a = this.fontConfigs.elements_0(), b = new java_util_JavaScriptVector(); a.hasMoreElements_0(); ) {
var d = a.nextElement_0();
b.contains_1(d.getFontData_0()) || b.add_1(d.getFontData_0());
}
a = [].createArray(b.size_0());
for (d = 0; d < b.size_0(); d++) a[d] = b.get_1(d);
return a;
},
},
"GT1189",
[GT1372]
),
GT972 = Class.extend(
{
initialConstructor_0: function () {
this.consoleColorSet = this.consoleFont = null;
this.featureColorOffset = this.primaryColorOffset = this.labelColorOffset = this.baseColorInverseOffset = this.baseColorOffset = this.statusColor = this.bgColor = this.featureColor = this.primaryColor = this.labelColor = this.baseColorInverse = this.baseColor = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
GT972.prototype.initialConstructor_14.call(
this,
a,
b,
GT972.prototype.BASE_COLOR,
GT972.prototype.BASE_COLOR_INVERSE,
GT972.prototype.BASE_LABEL_COLOR,
GT972.prototype.BASE_STATUS_COLOR,
GT972.prototype.BASE_PRIMARY_COLOR,
GT972.prototype.BASE_PRIMARY_COLOR,
GT972.prototype.BASE_BG_COLOR,
GT972.prototype.BASE_COLOR_OFFSET,
GT972.prototype.BASE_COLOR_INVERSE_OFFSET,
GT972.prototype.LABEL_COLOR_OFFSET,
GT972.prototype.PRIMARY_COLOR_OFFSET,
GT972.prototype.PRIMARY_COLOR_OFFSET
);
},
initialConstructor_8: function (a, b, d, e, f, g, k, m) {
GT972.prototype.initialConstructor_14.call(
this,
a,
b,
d,
GT972.prototype.BASE_COLOR_INVERSE,
GT972.prototype.BASE_LABEL_COLOR,
GT972.prototype.BASE_STATUS_COLOR,
e,
f,
GT972.prototype.BASE_BG_COLOR,
g,
GT972.prototype.BASE_COLOR_INVERSE_OFFSET,
GT972.prototype.LABEL_COLOR_OFFSET,
k,
m
);
},
initialConstructor_14: function (a, b, d, e, f, g, k, m, n, p, q, r, t, u) {
this.consoleColorSet = this.consoleFont = null;
this.featureColorOffset = this.primaryColorOffset = this.labelColorOffset = this.baseColorInverseOffset = this.baseColorOffset = this.statusColor = this.bgColor = this.featureColor = this.primaryColor = this.labelColor = this.baseColorInverse = this.baseColor = 0;
this.consoleFont = a;
this.consoleColorSet = b;
this.baseColor = d;
this.baseColorInverse = e;
this.labelColor = f;
this.statusColor = g;
this.primaryColor = k;
this.featureColor = m;
this.bgColor = n;
this.baseColorOffset = p;
this.baseColorInverseOffset = q;
this.labelColorOffset = r;
this.primaryColorOffset = t;
this.featureColorOffset = u;
},
getConsoleFont_0: function () {
return this.consoleFont;
},
getConsoleColorSet_0: function () {
return this.consoleColorSet;
},
getLabelColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.labelColor);
},
getOverlayBorderColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.labelColor);
},
getOverlayBorderAlpha_0: function () {
return GT1022.prototype.set_0().alpha_1(38);
},
getOverlayColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.bgColor);
},
getOverlayAlpha_0: function () {
return GT1022.prototype.set_0().alpha_1(178);
},
getNormalButtonColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.baseColor);
},
getNormalButtonGradient_0: function () {
return GT1238.prototype
.set_0()
.addColor_2(GT1391.prototype.set_0().rgb_1(this.baseColor), 0.1)
.addColor_2(GT1391.prototype.set_0().rgb_1(this.baseColor - this.baseColorOffset), 0.7)
.rotation_1(Math.PI / 2);
},
getNormalButtonInverseGradient_0: function () {
return GT1238.prototype
.set_0()
.addColor_2(GT1391.prototype.set_0().rgb_1(this.baseColorInverse), 0.1)
.addColor_2(GT1391.prototype.set_0().rgb_1(this.baseColorInverse - this.baseColorInverseOffset), 0.7)
.rotation_1(Math.PI / 2);
},
getPrimaryButtonColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.primaryColor);
},
getPrimaryButtonGradient_0: function () {
return GT1238.prototype
.set_0()
.addColor_2(GT1391.prototype.set_0().rgb_1(this.primaryColor), 48 / 255)
.addColor_2(GT1391.prototype.set_0().rgb_1(this.primaryColor - this.primaryColorOffset), 207 / 255)
.rotation_1(Math.PI / 2);
},
getLabelGradient_0: function () {
return null;
},
getValueColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.labelColor);
},
getFeatureColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.featureColor);
},
getFeatureGradient_0: function () {
return GT1238.prototype
.set_0()
.addColor_2(GT1391.prototype.set_0().rgb_1(this.featureColor), 48 / 255)
.addColor_2(GT1391.prototype.set_0().rgb_1(this.featureColor - this.featureColorOffset), 207 / 255)
.rotation_1(Math.PI / 2);
},
getStatusColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.statusColor);
},
getStatusGradient_0: function () {
return null;
},
getPopupBgColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.bgColor);
},
getPopupBgAlpha_0: function () {
return GT1022.prototype.set_0().alpha_1(240);
},
getPopupRadius_0: function () {
return 12;
},
getPopupEdges_0: function () {
return 32;
},
getPopupBorderColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.labelColor);
},
getPopupBorderAlpha_0: function () {
return this.getOverlayBorderAlpha_0();
},
getModalOverlayColor_0: function () {
return GT1391.prototype.set_0().rgb_1(this.bgColor);
},
getModalOverlayAlpha_0: function () {
return GT1022.prototype.set_0().alpha_1(151);
},
},
"GT972",
[GT1324]
);
GT972.prototype.BASE_COLOR = 16774144;
GT972.prototype.BASE_COLOR_INVERSE = 7368823;
GT972.prototype.BASE_LABEL_COLOR = 16777215;
GT972.prototype.BASE_STATUS_COLOR = 12632256;
GT972.prototype.BASE_PRIMARY_COLOR = 7470848;
GT972.prototype.BASE_BG_COLOR = 0;
GT972.prototype.BASE_COLOR_OFFSET = 10752;
GT972.prototype.BASE_COLOR_INVERSE_OFFSET = 3158067;
GT972.prototype.LABEL_COLOR_OFFSET = 3750201;
GT972.prototype.PRIMARY_COLOR_OFFSET = 2964480;
var GT1443 = Class.extend(
{
initialConstructor_0: function () {
this.fontData = null;
this.iterations = this.step = this.startWidth = 0;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_6: function (a, b, d, e, f, g) {
this.fontData = null;
this.iterations = this.step = this.startWidth = 0;
Class.prototype.initialConstructor_0.call(this);
this.fontData = new GT1023(a, b, d);
this.startWidth = e;
this.step = f;
this.iterations = g;
},
getFontData_0: function () {
return this.fontData;
},
getName_0: function () {
return this.fontData.getName_0();
},
isBold_0: function () {
return this.fontData.isBold_0();
},
isItalic_0: function () {
return this.fontData.isItalic_0();
},
getStartWidth_0: function () {
return this.startWidth;
},
getStep_0: function () {
return this.step;
},
getIterations_0: function () {
return this.iterations;
},
},
"GT1443",
[]
),
GT1023 = Class.extend(
{
initialConstructor_0: function () {
this.name = null;
this.italic = this.bold = !1;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_3: function (a, b, d) {
this.name = null;
this.italic = this.bold = !1;
Class.prototype.initialConstructor_0.call(this);
this.name = a;
this.bold = b;
this.italic = d;
},
getName_0: function () {
return this.name;
},
isBold_0: function () {
return this.bold;
},
isItalic_0: function () {
return this.italic;
},
hashCode_0: function () {
var a;
a = 31 + (this.bold ? 1231 : 1237);
a = 31 * a + (this.italic ? 1231 : 1237);
return (a = 31 * a + (null == this.name ? 0 : this.name.length_0()));
},
equals_1: function (a) {
if (this == a) return !0;
if (null == a || !instanceOf(a, GT1023) || this.bold != a.bold || this.italic != a.italic) return !1;
if (null == this.name) {
if (null != a.name) return !1;
} else if (!this.name.equals_1(a.name)) return !1;
return !0;
},
toString: function () {
return "FontConfigFontData [name=" + this.name + ", bold=" + this.bold + ", italic=" + this.italic + "]";
},
},
"GT1023",
[]
),
GT1237 = Class.extend({ initialConstructor_0: function () {} }, "GT1237", []);
GT1237.prototype.FCK_LABEL_MEDIUM = "fck_label";
GT1237.prototype.FCK_LABEL_LARGE = "fck_label2";
GT1237.prototype.FCK_LABEL_EXTRA_LARGE = "fck_label_xl";
GT1237.prototype.FCK_LABEL_LARGE_BOLD = "fck_label2b";
GT1237.prototype.FCK_SECONDARY_BUTTON = "fck_secondary_button";
GT1237.prototype.FCK_PRIMARY_BUTTON = "fck_primary_button";
GT1237.prototype.FCK_MENUITEM = "fck_menuitem";
GT1237.prototype.FCK_OVERLAY = "fck_overlay";
GT1237.prototype.FCK_WIN = "fck_windisplay";
GT1237.prototype.FCK_STATUS = "fck_windisplay_status";
GT1237.prototype.FCK_CREDITS = "fck_windisplay_credits";
GT1237.prototype.FCK_BET_LINES_PANEL_BUTTON = "fck_bet_lines_panel_button";
GT1237.prototype.FCK_LABEL_VERSION = "fck_label_version";
var GT819 = Class.extend(
{
initialConstructor_0: function () {
this.currentTime = this.sessionTime = null;
Class.prototype.initialConstructor_0.call(this);
},
initialConstructor_2: function (a, b) {
this.currentTime = this.sessionTime = null;
Class.prototype.initialConstructor_0.call(this);
this.sessionTime = a;
this.currentTime = b;
},
getSessionTime_0: function () {
return this.sessionTime;
},
getCurrentTime_0: function () {
return this.currentTime;
},
hashCode_0: function () {
var a;
a = 31 + (null == this.currentTime ? 0 : this.currentTime.length_0());
return (a = 31 * a + (null == this.sessionTime ? 0 : this.sessionTime.length_0()));
},
equals_1: function (a) {
if (this == a) return !0;
if (null == a || !instanceOf(a, GT819)) return !1;
if (null == this.currentTime) {
if (null != a.currentTime) return !1;
} else if (!this.currentTime.equals_1(a.currentTime)) return !1;
if (null == this.sessionTime) {
if (null != a.sessionTime) return !1;
} else if (!this.sessionTime.equals_1(a.sessionTime)) return !1;
return !0;
},
toString: function () {
return "GameConsoleTimeData [sessionTime=" + this.sessionTime + ", currentTime=" + this.currentTime + "]";
},
},
"GT819",
[]
),
GT820 = Class.extend(
{
initialConstructor_0: function () {
this.viewDataOmittedForEquality = this.viewData = null;
this.viewData = new java_util_JavaScriptHashtable();
this.viewDataOmittedForEquality = new java_util_JavaScriptHashtable();
},
addViewData_2: function (a, b) {
GT1650.prototype.assertExp_2(null != a, "Key must not be null");
GT1650.prototype.assertExp_2(null != b, "Data must not be null");
GT1650.prototype.assertExp_2(!a.equals_1(GT1184.prototype.RULES), "Use addRules to add the rules!");
this.skipEquality_1(a) ? this.viewDataOmittedForEquality.put_2(a, b) : this.viewData.put_2(a, b);
},
skipEquality_1: function (a) {
return GT1184.prototype.TRIGGERING_EVENT.equals_1(a) || GT1184.prototype.TRIGGERING_TIME.equals_1(a) || GT1184.prototype.BASE_BETS.equals_1(a) ? !0 : !1;
},
getViewData_1: function (a) {
GT1650.prototype.assertExp_2(null != a, "Key must not be null");
var b = null,
b = this.viewData.containsKey_1(a) ? this.viewData.get_1(a) : this.viewDataOmittedForEquality.containsKey_1(a) ? this.viewDataOmittedForEquality.get_1(a) : null,
d = GT1389.prototype.getInstance_0().getDeviceStrategy_0().getViewDataTransformer_0();
return null != d ? d.transform_2(a, b) : b;
},
addRules_1: function (a) {
this.viewData.put_2(GT1184.prototype.RULES, a);
},
getRules_0: function () {
var a = this.viewData.get_1(GT1184.prototype.RULES);
return null == a ? new java_util_JavaScriptHashtable() : a;
},
keys_0: function () {
var a = new java_util_JavaScriptVector();
this.copyEnumerationToVector_2(this.viewData.keys_0(), a);
this.copyEnumerationToVector_2(this.viewDataOmittedForEquality.keys_0(), a);
return a;
},
copyEnumerationToVector_2: function (a, b) {
for (; a.hasMoreElements_0(); ) b.add_1(a.nextElement_0());
},
toString: function () {
return "GameConsoleViewData [viewData=" + this.printHashTable_1(this.viewData) + ", viewData omitted for equality check=" + this.printHashTable_1(this.viewDataOmittedForEquality) + "]";
},
printHashTable_1: function (a) {
for (var b = a.keys_0(), d = "{ ", e = !0; b.hasMoreElements_0(); ) {
var f = b.nextElement_0();
e ? (e = !1) : (d = d.concat_1(", "));
d = d.concat_1("'" + f + "': ");
f = a.get_1(f);
d = instanceOf(f, java_util_JavaScriptHashtable) ? d.concat_1(this.printHashTable_1(f)) : d.concat_1(f.toString());
}
return d.concat_1(" }");
},
hashCode_0: function () {
var a;
return (a = 31 + (null == this.viewData ? 0 : this.viewData.size_0()));
},
equals_1: function (a) {
if (this == a) return !0;
if (null == a || !instanceOf(a, GT820)) return !1;
if (null == this.viewData) {
if (null != a.viewData) return !1;
} else if (!this.viewData.equals_1(a.viewData) || !this.same_2(this.viewDataOmittedForEquality.get_1(GT1184.prototype.BASE_BETS), a.viewDataOmittedForEquality.get_1(GT1184.prototype.BASE_BETS))) return !1;
return !0;
},
same_2: function (a, b) {
if ((null != a && null == b) || (null == a && null != b)) return !1;
if (null == a && null == b) return !0;
if (a.length != b.length) return !1;
for (var d = 0; d < a.length; d++) if (a[d] != b[d]) return !1;
return !0;
},
convertToWrapper_1: function (a) {
var b = GT1242.prototype.getWrapperTables_2(GT697.prototype.EVENT_VIEWDATA, null),
d = b.getValueTable_0(),
e = this.keys_0();
null != a && d.put_2(GT1184.prototype.TARGETED_UPDATE_MARKER, a);
for (a = 0; a < e.size_0(); a++) {
var f = e.get_1(a);
if (GT1184.prototype.VISIBLE_AREA.equals_1(f)) {
var g = this.getViewData_1(f);
d.put_2(f, "{x:" + g.x + ", y:" + g.y + ", w:" + g.width + ", h:" +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment