diff --git a/js/src/09.live2dev.js b/js/src/09.live2dev.js deleted file mode 100644 index 3b7a618..0000000 --- a/js/src/09.live2dev.js +++ /dev/null @@ -1,4326 +0,0 @@ -! function (t) { - function i(r) { - if (e[r]) return e[r].exports; - var o = e[r] = { - i: r, - l: !1, - exports: {} - }; - return t[r].call(o.exports, o, o.exports, i), o.l = !0, o.exports - } - var e = {}; - i.m = t, i.c = e, i.d = function (t, e, r) { - i.o(t, e) || Object.defineProperty(t, e, { - configurable: !1, - enumerable: !0, - get: r - }) - }, i.n = function (t) { - var e = t && t.__esModule ? function () { - return t.default - } : function () { - return t - }; - return i.d(e, "a", e), e - }, i.o = function (t, i) { - return Object.prototype.hasOwnProperty.call(t, i) - }, i.p = "", i(i.s = 4) -}([function (t, i, e) { - "use strict"; - - function r() { - this.live2DModel = null, this.modelMatrix = null, this.eyeBlink = null, this.physics = null, this.pose = null, this.debugMode = !1, this.initialized = !1, this.updating = !1, this.alpha = 1, this.accAlpha = 0, this.lipSync = !1, this.lipSyncValue = 0, this.accelX = 0, this.accelY = 0, this.accelZ = 0, this.dragX = 0, this.dragY = 0, this.startTimeMSec = null, this.mainMotionManager = new h, this.expressionManager = new h, this.motions = {}, this.expressions = {}, this.isTexLoaded = !1 - } - - function o() { - AMotion.prototype.constructor.call(this), this.paramList = new Array - } - - function n() { - this.id = "", this.type = -1, this.value = null - } - - function s() { - this.nextBlinkTime = null, this.stateStartTime = null, this.blinkIntervalMsec = null, this.eyeState = g.STATE_FIRST, this.blinkIntervalMsec = 4e3, this.closingMotionMsec = 100, this.closedMotionMsec = 50, this.openingMotionMsec = 150, this.closeIfZero = !0, this.eyeID_L = "PARAM_EYE_L_OPEN", this.eyeID_R = "PARAM_EYE_R_OPEN" - } - - function _() { - this.tr = new Float32Array(16), this.identity() - } - - function a(t, i) { - _.prototype.constructor.call(this), this.width = t, this.height = i - } - - function h() { - MotionQueueManager.prototype.constructor.call(this), this.currentPriority = null, this.reservePriority = null, this.super = MotionQueueManager.prototype - } - - function l() { - this.physicsList = new Array, this.startTimeMSec = UtSystem.getUserTimeMSec() - } - - function $() { - this.lastTime = 0, this.lastModel = null, this.partsGroups = new Array - } - - function u(t) { - this.paramIndex = -1, this.partsIndex = -1, this.link = null, this.id = t - } - - function p() { - this.EPSILON = .01, this.faceTargetX = 0, this.faceTargetY = 0, this.faceX = 0, this.faceY = 0, this.faceVX = 0, this.faceVY = 0, this.lastTimeSec = 0 - } - - function f() { - _.prototype.constructor.call(this), this.screenLeft = null, this.screenRight = null, this.screenTop = null, this.screenBottom = null, this.maxLeft = null, this.maxRight = null, this.maxTop = null, this.maxBottom = null, this.max = Number.MAX_VALUE, this.min = 0 - } - - function c() {} - var d = 0; - r.prototype.getModelMatrix = function () { - return this.modelMatrix - }, r.prototype.setAlpha = function (t) { - t > .999 && (t = 1), t < .001 && (t = 0), this.alpha = t - }, r.prototype.getAlpha = function () { - return this.alpha - }, r.prototype.isInitialized = function () { - return this.initialized - }, r.prototype.setInitialized = function (t) { - this.initialized = t - }, r.prototype.isUpdating = function () { - return this.updating - }, r.prototype.setUpdating = function (t) { - this.updating = t - }, r.prototype.getLive2DModel = function () { - return this.live2DModel - }, r.prototype.setLipSync = function (t) { - this.lipSync = t - }, r.prototype.setLipSyncValue = function (t) { - this.lipSyncValue = t - }, r.prototype.setAccel = function (t, i, e) { - this.accelX = t, this.accelY = i, this.accelZ = e - }, r.prototype.setDrag = function (t, i) { - this.dragX = t, this.dragY = i - }, r.prototype.getMainMotionManager = function () { - return this.mainMotionManager - }, r.prototype.getExpressionManager = function () { - return this.expressionManager - }, r.prototype.loadModelData = function (t, i) { - var e = c.getPlatformManager(); - this.debugMode && e.log("Load model : " + t); - var r = this; - e.loadLive2DModel(t, function (t) { - if (r.live2DModel = t, r.live2DModel.saveParam(), 0 != Live2D.getError()) return void console.error("Error : Failed to loadModelData()."); - r.modelMatrix = new a(r.live2DModel.getCanvasWidth(), r.live2DModel.getCanvasHeight()), r.modelMatrix.setWidth(2), r.modelMatrix.setCenterPosition(0, 0), i(r.live2DModel) - }) - }, r.prototype.loadTexture = function (t, i, e) { - d++; - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Texture : " + i); - var o = this; - r.loadTexture(this.live2DModel, t, i, function () { - d--, 0 == d && (o.isTexLoaded = !0), "function" == typeof e && e() - }) - }, r.prototype.loadMotion = function (t, i, e) { - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Motion : " + i); - var o = null, - n = this; - r.loadBytes(i, function (i) { - o = Live2DMotion.loadMotion(i), null != t && (n.motions[t] = o), e(o) - }) - }, r.prototype.loadExpression = function (t, i, e) { - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Expression : " + i); - var n = this; - r.loadBytes(i, function (i) { - null != t && (n.expressions[t] = o.loadJson(i)), "function" == typeof e && e() - }) - }, r.prototype.loadPose = function (t, i) { - var e = c.getPlatformManager(); - this.debugMode && e.log("Load Pose : " + t); - var r = this; - try { - e.loadBytes(t, function (t) { - r.pose = $.load(t), "function" == typeof i && i() - }) - } catch (t) { - console.warn(t) - } - }, r.prototype.loadPhysics = function (t) { - var i = c.getPlatformManager(); - this.debugMode && i.log("Load Physics : " + t); - var e = this; - try { - i.loadBytes(t, function (t) { - e.physics = l.load(t) - }) - } catch (t) { - console.warn(t) - } - }, r.prototype.hitTestSimple = function (t, i, e) { - if (null === this.live2DModel) return !1; - var r = this.live2DModel.getDrawDataIndex(t); - if (r < 0) return !1; - for (var o = this.live2DModel.getTransformedPoints(r), n = this.live2DModel.getCanvasWidth(), s = 0, _ = this.live2DModel.getCanvasHeight(), a = 0, h = 0; h < o.length; h += 2) { - var l = o[h], - $ = o[h + 1]; - l < n && (n = l), l > s && (s = l), $ < _ && (_ = $), $ > a && (a = $) - } - var u = this.modelMatrix.invertTransformX(i), - p = this.modelMatrix.invertTransformY(e); - return n <= u && u <= s && _ <= p && p <= a - }, r.prototype.hitTestSimpleCustom = function (t, i, e, r) { - return null !== this.live2DModel && (e >= t[0] && e <= i[0] && r <= t[1] && r >= i[1]) - }, o.prototype = new AMotion, o.EXPRESSION_DEFAULT = "DEFAULT", o.TYPE_SET = 0, o.TYPE_ADD = 1, o.TYPE_MULT = 2, o.loadJson = function (t) { - var i = new o, - e = c.getPlatformManager(), - r = e.jsonParseFromBytes(t); - if (i.setFadeIn(parseInt(r.fade_in) > 0 ? parseInt(r.fade_in) : 1e3), i.setFadeOut(parseInt(r.fade_out) > 0 ? parseInt(r.fade_out) : 1e3), null == r.params) return i; - var s = r.params, - _ = s.length; - i.paramList = []; - for (var a = 0; a < _; a++) { - var h = s[a], - l = h.id.toString(), - $ = parseFloat(h.val), - u = o.TYPE_ADD, - p = null != h.calc ? h.calc.toString() : "add"; - if ((u = "add" === p ? o.TYPE_ADD : "mult" === p ? o.TYPE_MULT : "set" === p ? o.TYPE_SET : o.TYPE_ADD) == o.TYPE_ADD) { - var f = null == h.def ? 0 : parseFloat(h.def); - $ -= f - } else if (u == o.TYPE_MULT) { - var f = null == h.def ? 1 : parseFloat(h.def); - 0 == f && (f = 1), $ /= f - } - var d = new n; - d.id = l, d.type = u, d.value = $, i.paramList.push(d) - } - return i - }, o.prototype.updateParamExe = function (t, i, e, r) { - for (var n = this.paramList.length - 1; n >= 0; --n) { - var s = this.paramList[n]; - s.type == o.TYPE_ADD ? t.addToParamFloat(s.id, s.value, e) : s.type == o.TYPE_MULT ? t.multParamFloat(s.id, s.value, e) : s.type == o.TYPE_SET && t.setParamFloat(s.id, s.value, e) - } - }, s.prototype.calcNextBlink = function () { - return UtSystem.getUserTimeMSec() + Math.random() * (2 * this.blinkIntervalMsec - 1) - }, s.prototype.setInterval = function (t) { - this.blinkIntervalMsec = t - }, s.prototype.setEyeMotion = function (t, i, e) { - this.closingMotionMsec = t, this.closedMotionMsec = i, this.openingMotionMsec = e - }, s.prototype.updateParam = function (t) { - var i, e = UtSystem.getUserTimeMSec(), - r = 0; - switch (this.eyeState) { - case g.STATE_CLOSING: - r = (e - this.stateStartTime) / this.closingMotionMsec, r >= 1 && (r = 1, this.eyeState = g.STATE_CLOSED, this.stateStartTime = e), i = 1 - r; - break; - case g.STATE_CLOSED: - r = (e - this.stateStartTime) / this.closedMotionMsec, r >= 1 && (this.eyeState = g.STATE_OPENING, this.stateStartTime = e), i = 0; - break; - case g.STATE_OPENING: - r = (e - this.stateStartTime) / this.openingMotionMsec, r >= 1 && (r = 1, this.eyeState = g.STATE_INTERVAL, this.nextBlinkTime = this.calcNextBlink()), i = r; - break; - case g.STATE_INTERVAL: - this.nextBlinkTime < e && (this.eyeState = g.STATE_CLOSING, this.stateStartTime = e), i = 1; - break; - case g.STATE_FIRST: - default: - this.eyeState = g.STATE_INTERVAL, this.nextBlinkTime = this.calcNextBlink(), i = 1 - } - this.closeIfZero || (i = -i), t.setParamFloat(this.eyeID_L, i), t.setParamFloat(this.eyeID_R, i) - }; - var g = function () {}; - g.STATE_FIRST = "STATE_FIRST", g.STATE_INTERVAL = "STATE_INTERVAL", g.STATE_CLOSING = "STATE_CLOSING", g.STATE_CLOSED = "STATE_CLOSED", g.STATE_OPENING = "STATE_OPENING", _.mul = function (t, i, e) { - var r, o, n, s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (r = 0; r < 4; r++) - for (o = 0; o < 4; o++) - for (n = 0; n < 4; n++) s[r + 4 * o] += t[r + 4 * n] * i[n + 4 * o]; - for (r = 0; r < 16; r++) e[r] = s[r] - }, _.prototype.identity = function () { - for (var t = 0; t < 16; t++) this.tr[t] = t % 5 == 0 ? 1 : 0 - }, _.prototype.getArray = function () { - return this.tr - }, _.prototype.getCopyMatrix = function () { - return new Float32Array(this.tr) - }, _.prototype.setMatrix = function (t) { - if (null != this.tr && this.tr.length == this.tr.length) - for (var i = 0; i < 16; i++) this.tr[i] = t[i] - }, _.prototype.getScaleX = function () { - return this.tr[0] - }, _.prototype.getScaleY = function () { - return this.tr[5] - }, _.prototype.transformX = function (t) { - return this.tr[0] * t + this.tr[12] - }, _.prototype.transformY = function (t) { - return this.tr[5] * t + this.tr[13] - }, _.prototype.invertTransformX = function (t) { - return (t - this.tr[12]) / this.tr[0] - }, _.prototype.invertTransformY = function (t) { - return (t - this.tr[13]) / this.tr[5] - }, _.prototype.multTranslate = function (t, i) { - var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; - _.mul(e, this.tr, this.tr) - }, _.prototype.translate = function (t, i) { - this.tr[12] = t, this.tr[13] = i - }, _.prototype.translateX = function (t) { - this.tr[12] = t - }, _.prototype.translateY = function (t) { - this.tr[13] = t - }, _.prototype.multScale = function (t, i) { - var e = [t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; - _.mul(e, this.tr, this.tr) - }, _.prototype.scale = function (t, i) { - this.tr[0] = t, this.tr[5] = i - }, a.prototype = new _, a.prototype.setPosition = function (t, i) { - this.translate(t, i) - }, a.prototype.setCenterPosition = function (t, i) { - var e = this.width * this.getScaleX(), - r = this.height * this.getScaleY(); - this.translate(t - e / 2, i - r / 2) - }, a.prototype.top = function (t) { - this.setY(t) - }, a.prototype.bottom = function (t) { - var i = this.height * this.getScaleY(); - this.translateY(t - i) - }, a.prototype.left = function (t) { - this.setX(t) - }, a.prototype.right = function (t) { - var i = this.width * this.getScaleX(); - this.translateX(t - i) - }, a.prototype.centerX = function (t) { - var i = this.width * this.getScaleX(); - this.translateX(t - i / 2) - }, a.prototype.centerY = function (t) { - var i = this.height * this.getScaleY(); - this.translateY(t - i / 2) - }, a.prototype.setX = function (t) { - this.translateX(t) - }, a.prototype.setY = function (t) { - this.translateY(t) - }, a.prototype.setHeight = function (t) { - var i = t / this.height, - e = -i; - this.scale(i, e) - }, a.prototype.setWidth = function (t) { - var i = t / this.width, - e = -i; - this.scale(i, e) - }, h.prototype = new MotionQueueManager, h.prototype.getCurrentPriority = function () { - return this.currentPriority - }, h.prototype.getReservePriority = function () { - return this.reservePriority - }, h.prototype.reserveMotion = function (t) { - return !(this.reservePriority >= t) && (!(this.currentPriority >= t) && (this.reservePriority = t, !0)) - }, h.prototype.setReservePriority = function (t) { - this.reservePriority = t - }, h.prototype.updateParam = function (t) { - var i = MotionQueueManager.prototype.updateParam.call(this, t); - return this.isFinished() && (this.currentPriority = 0), i - }, h.prototype.startMotionPrio = function (t, i) { - return i == this.reservePriority && (this.reservePriority = 0), this.currentPriority = i, this.startMotion(t, !1) - }, l.load = function (t) { - for (var i = new l, e = c.getPlatformManager(), r = e.jsonParseFromBytes(t), o = r.physics_hair, n = o.length, s = 0; s < n; s++) { - var _ = o[s], - a = new PhysicsHair, - h = _.setup, - $ = parseFloat(h.length), - u = parseFloat(h.regist), - p = parseFloat(h.mass); - a.setup($, u, p); - for (var f = _.src, d = f.length, g = 0; g < d; g++) { - var y = f[g], - m = y.id, - T = PhysicsHair.Src.SRC_TO_X, - P = y.ptype; - "x" === P ? T = PhysicsHair.Src.SRC_TO_X : "y" === P ? T = PhysicsHair.Src.SRC_TO_Y : "angle" === P ? T = PhysicsHair.Src.SRC_TO_G_ANGLE : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Src"); - var S = parseFloat(y.scale), - v = parseFloat(y.weight); - a.addSrcParam(T, m, S, v) - } - for (var L = _.targets, M = L.length, g = 0; g < M; g++) { - var E = L[g], - m = E.id, - T = PhysicsHair.Target.TARGET_FROM_ANGLE, - P = E.ptype; - "angle" === P ? T = PhysicsHair.Target.TARGET_FROM_ANGLE : "angle_v" === P ? T = PhysicsHair.Target.TARGET_FROM_ANGLE_V : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Target"); - var S = parseFloat(E.scale), - v = parseFloat(E.weight); - a.addTargetParam(T, m, S, v) - } - i.physicsList.push(a) - } - return i - }, l.prototype.updateParam = function (t) { - for (var i = UtSystem.getUserTimeMSec() - this.startTimeMSec, e = 0; e < this.physicsList.length; e++) this.physicsList[e].update(t, i) - }, $.load = function (t) { - for (var i = new $, e = c.getPlatformManager(), r = e.jsonParseFromBytes(t), o = r.parts_visible, n = o.length, s = 0; s < n; s++) { - for (var _ = o[s], a = _.group, h = a.length, l = new Array, p = 0; p < h; p++) { - var f = a[p], - d = new u(f.id); - if (l[p] = d, null != f.link) { - var g = f.link, - y = g.length; - d.link = new Array; - for (var m = 0; m < y; m++) { - var T = new u(g[m]); - d.link.push(T) - } - } - } - i.partsGroups.push(l) - } - return i - }, $.prototype.updateParam = function (t) { - if (null != t) { - t != this.lastModel && this.initParam(t), this.lastModel = t; - var i = UtSystem.getUserTimeMSec(), - e = 0 == this.lastTime ? 0 : (i - this.lastTime) / 1e3; - this.lastTime = i, e < 0 && (e = 0); - for (var r = 0; r < this.partsGroups.length; r++) this.normalizePartsOpacityGroup(t, this.partsGroups[r], e), this.copyOpacityOtherParts(t, this.partsGroups[r]) - } - }, $.prototype.initParam = function (t) { - if (null != t) - for (var i = 0; i < this.partsGroups.length; i++) - for (var e = this.partsGroups[i], r = 0; r < e.length; r++) { - e[r].initIndex(t); - var o = e[r].partsIndex, - n = e[r].paramIndex; - if (!(o < 0)) { - var s = 0 != t.getParamFloat(n); - if (t.setPartsOpacity(o, s ? 1 : 0), t.setParamFloat(n, s ? 1 : 0), null != e[r].link) - for (var _ = 0; _ < e[r].link.length; _++) e[r].link[_].initIndex(t) - } - } - }, $.prototype.normalizePartsOpacityGroup = function (t, i, e) { - for (var r = -1, o = 1, n = 0; n < i.length; n++) { - var s = i[n].partsIndex, - _ = i[n].paramIndex; - if (!(s < 0) && 0 != t.getParamFloat(_)) { - if (r >= 0) break; - r = n, o = t.getPartsOpacity(s), o += e / .5, o > 1 && (o = 1) - } - } - r < 0 && (r = 0, o = 1); - for (var n = 0; n < i.length; n++) { - var s = i[n].partsIndex; - if (!(s < 0)) - if (r == n) t.setPartsOpacity(s, o); - else { - var a, h = t.getPartsOpacity(s); - a = o < .5 ? -.5 * o / .5 + 1 : .5 * (1 - o) / .5; - var l = (1 - a) * (1 - o); - l > .15 && (a = 1 - .15 / (1 - o)), h > a && (h = a), t.setPartsOpacity(s, h) - } - } - }, $.prototype.copyOpacityOtherParts = function (t, i) { - for (var e = 0; e < i.length; e++) { - var r = i[e]; - if (null != r.link && !(r.partsIndex < 0)) - for (var o = t.getPartsOpacity(r.partsIndex), n = 0; n < r.link.length; n++) { - var s = r.link[n]; - s.partsIndex < 0 || t.setPartsOpacity(s.partsIndex, o) - } - } - }, u.prototype.initIndex = function (t) { - this.paramIndex = t.getParamIndex("VISIBLE:" + this.id), this.partsIndex = t.getPartsDataIndex(PartsDataID.getID(this.id)), t.setParamFloat(this.paramIndex, 1) - }, p.FRAME_RATE = 30, p.prototype.setPoint = function (t, i) { - this.faceTargetX = t, this.faceTargetY = i - }, p.prototype.getX = function () { - return this.faceX - }, p.prototype.getY = function () { - return this.faceY - }, p.prototype.update = function () { - var t = 40 / 7.5 / p.FRAME_RATE; - if (0 == this.lastTimeSec) return void(this.lastTimeSec = UtSystem.getUserTimeMSec()); - var i = UtSystem.getUserTimeMSec(), - e = (i - this.lastTimeSec) * p.FRAME_RATE / 1e3; - this.lastTimeSec = i; - var r = .15 * p.FRAME_RATE, - o = e * t / r, - n = this.faceTargetX - this.faceX, - s = this.faceTargetY - this.faceY; - if (!(Math.abs(n) <= this.EPSILON && Math.abs(s) <= this.EPSILON)) { - var _ = Math.sqrt(n * n + s * s), - a = t * n / _, - h = t * s / _, - l = a - this.faceVX, - $ = h - this.faceVY, - u = Math.sqrt(l * l + $ * $); - (u < -o || u > o) && (l *= o / u, $ *= o / u, u = o), this.faceVX += l, this.faceVY += $; - var f = .5 * (Math.sqrt(o * o + 16 * o * _ - 8 * o * _) - o), - c = Math.sqrt(this.faceVX * this.faceVX + this.faceVY * this.faceVY); - c > f && (this.faceVX *= f / c, this.faceVY *= f / c), this.faceX += this.faceVX, this.faceY += this.faceVY - } - }, f.prototype = new _, f.prototype.getMaxScale = function () { - return this.max - }, f.prototype.getMinScale = function () { - return this.min - }, f.prototype.setMaxScale = function (t) { - this.max = t - }, f.prototype.setMinScale = function (t) { - this.min = t - }, f.prototype.isMaxScale = function () { - return this.getScaleX() == this.max - }, f.prototype.isMinScale = function () { - return this.getScaleX() == this.min - }, f.prototype.adjustTranslate = function (t, i) { - this.tr[0] * this.maxLeft + (this.tr[12] + t) > this.screenLeft && (t = this.screenLeft - this.tr[0] * this.maxLeft - this.tr[12]), this.tr[0] * this.maxRight + (this.tr[12] + t) < this.screenRight && (t = this.screenRight - this.tr[0] * this.maxRight - this.tr[12]), this.tr[5] * this.maxTop + (this.tr[13] + i) < this.screenTop && (i = this.screenTop - this.tr[5] * this.maxTop - this.tr[13]), this.tr[5] * this.maxBottom + (this.tr[13] + i) > this.screenBottom && (i = this.screenBottom - this.tr[5] * this.maxBottom - this.tr[13]); - var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; - _.mul(e, this.tr, this.tr) - }, f.prototype.adjustScale = function (t, i, e) { - var r = e * this.tr[0]; - r < this.min ? this.tr[0] > 0 && (e = this.min / this.tr[0]) : r > this.max && this.tr[0] > 0 && (e = this.max / this.tr[0]); - var o = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1], - n = [e, 0, 0, 0, 0, e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], - s = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -t, -i, 0, 1]; - _.mul(s, this.tr, this.tr), _.mul(n, this.tr, this.tr), _.mul(o, this.tr, this.tr) - }, f.prototype.setScreenRect = function (t, i, e, r) { - this.screenLeft = t, this.screenRight = i, this.screenTop = r, this.screenBottom = e - }, f.prototype.setMaxScreenRect = function (t, i, e, r) { - this.maxLeft = t, this.maxRight = i, this.maxTop = r, this.maxBottom = e - }, f.prototype.getScreenLeft = function () { - return this.screenLeft - }, f.prototype.getScreenRight = function () { - return this.screenRight - }, f.prototype.getScreenBottom = function () { - return this.screenBottom - }, f.prototype.getScreenTop = function () { - return this.screenTop - }, f.prototype.getMaxLeft = function () { - return this.maxLeft - }, f.prototype.getMaxRight = function () { - return this.maxRight - }, f.prototype.getMaxBottom = function () { - return this.maxBottom - }, f.prototype.getMaxTop = function () { - return this.maxTop - }, c.platformManager = null, c.getPlatformManager = function () { - return c.platformManager - }, c.setPlatformManager = function (t) { - c.platformManager = t - }, t.exports = { - L2DTargetPoint: p, - Live2DFramework: c, - L2DViewMatrix: f, - L2DPose: $, - L2DPartsParam: u, - L2DPhysics: l, - L2DMotionManager: h, - L2DModelMatrix: a, - L2DMatrix44: _, - EYE_STATE: g, - L2DEyeBlink: s, - L2DExpressionParam: n, - L2DExpressionMotion: o, - L2DBaseModel: r - } -}, function (t, i, e) { - "use strict"; - var r = { - DEBUG_LOG: !1, - DEBUG_MOUSE_LOG: !1, - DEBUG_DRAW_HIT_AREA: !1, - DEBUG_DRAW_ALPHA_MODEL: !1, - VIEW_MAX_SCALE: 2, - VIEW_MIN_SCALE: .8, - VIEW_LOGICAL_LEFT: -1, - VIEW_LOGICAL_RIGHT: 1, - VIEW_LOGICAL_MAX_LEFT: -2, - VIEW_LOGICAL_MAX_RIGHT: 2, - VIEW_LOGICAL_MAX_BOTTOM: -2, - VIEW_LOGICAL_MAX_TOP: 2, - PRIORITY_NONE: 0, - PRIORITY_IDLE: 1, - PRIORITY_SLEEPY: 2, - PRIORITY_NORMAL: 3, - PRIORITY_FORCE: 4, - MOTION_GROUP_IDLE: "idle", - MOTION_GROUP_SLEEPY: "sleepy", - MOTION_GROUP_TAP_BODY: "tap_body", - MOTION_GROUP_FLICK_HEAD: "flick_head", - MOTION_GROUP_PINCH_IN: "pinch_in", - MOTION_GROUP_PINCH_OUT: "pinch_out", - MOTION_GROUP_SHAKE: "shake", - HIT_AREA_HEAD: "head", - HIT_AREA_BODY: "body" - }; - t.exports = r -}, function (t, i, e) { - "use strict"; - - function r(t) { - n = t - } - - function o() { - return n - } - Object.defineProperty(i, "__esModule", { - value: !0 - }), i.setContext = r, i.getContext = o; - var n = void 0 -}, function (t, i, e) { - "use strict"; - - function r() {} - r.matrixStack = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], r.depth = 0, r.currentMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], r.tmp = new Array(16), r.reset = function () { - this.depth = 0 - }, r.loadIdentity = function () { - for (var t = 0; t < 16; t++) this.currentMatrix[t] = t % 5 == 0 ? 1 : 0 - }, r.push = function () { - var t = (this.depth, 16 * (this.depth + 1)); - this.matrixStack.length < t + 16 && (this.matrixStack.length = t + 16); - for (var i = 0; i < 16; i++) this.matrixStack[t + i] = this.currentMatrix[i]; - this.depth++ - }, r.pop = function () { - --this.depth < 0 && (myError("Invalid matrix stack."), this.depth = 0); - for (var t = 16 * this.depth, i = 0; i < 16; i++) this.currentMatrix[i] = this.matrixStack[t + i] - }, r.getMatrix = function () { - return this.currentMatrix - }, r.multMatrix = function (t) { - var i, e, r; - for (i = 0; i < 16; i++) this.tmp[i] = 0; - for (i = 0; i < 4; i++) - for (e = 0; e < 4; e++) - for (r = 0; r < 4; r++) this.tmp[i + 4 * e] += this.currentMatrix[i + 4 * r] * t[r + 4 * e]; - for (i = 0; i < 16; i++) this.currentMatrix[i] = this.tmp[i] - }, t.exports = r -}, function (t, i, e) { - t.exports = e(5) -}, function (t, i, e) { - "use strict"; - - function r(t) { - return t && t.__esModule ? t : { - default: t - } - } - - function o(t) { - C = document.getElementById(t), C.addEventListener && (window.addEventListener("click", g), window.addEventListener("mousedown", g), window.addEventListener("mousemove", g), window.addEventListener("mouseup", g), document.addEventListener("mouseout", g), window.addEventListener("touchstart", y), window.addEventListener("touchend", y), window.addEventListener("touchmove", y)) - } - - function n(t) { - var i = C.width, - e = C.height; - N = new M.L2DTargetPoint; - var r = e / i, - o = w.default.VIEW_LOGICAL_LEFT, - n = w.default.VIEW_LOGICAL_RIGHT, - _ = -r, - h = r; - if (window.Live2D.captureFrame = !1, B = new M.L2DViewMatrix, B.setScreenRect(o, n, _, h), B.setMaxScreenRect(w.default.VIEW_LOGICAL_MAX_LEFT, w.default.VIEW_LOGICAL_MAX_RIGHT, w.default.VIEW_LOGICAL_MAX_BOTTOM, w.default.VIEW_LOGICAL_MAX_TOP), B.setMaxScale(w.default.VIEW_MAX_SCALE), B.setMinScale(w.default.VIEW_MIN_SCALE), U = new M.L2DMatrix44, U.multScale(1, i / e), G = new M.L2DMatrix44, G.multTranslate(-i / 2, -e / 2), G.multScale(2 / i, -2 / i), F = v(), (0, D.setContext)(F), !F) return console.error("Failed to create WebGL context."), void(window.WebGLRenderingContext && console.error("Your browser don't support WebGL, check https://get.webgl.org/ for futher information.")); - window.Live2D.setGL(F), F.clearColor(0, 0, 0, 0), a(t), s() - } - - function s() { - b || (b = !0, function t() { - _(); - var i = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; - if (window.Live2D.captureFrame) { - window.Live2D.captureFrame = !1; - var e = document.createElement("a"); - document.body.appendChild(e), e.setAttribute("type", "hidden"), e.href = C.toDataURL(), e.download = window.Live2D.captureName || "live2d.png", e.click() - } - i(t, C) - }()) - } - - function _() { - O.default.reset(), O.default.loadIdentity(), N.update(), R.setDrag(N.getX(), N.getY()), F.clear(F.COLOR_BUFFER_BIT), O.default.multMatrix(U.getArray()), O.default.multMatrix(B.getArray()), O.default.push(); - for (var t = 0; t < R.numModels(); t++) { - var i = R.getModel(t); - if (null == i) return; - i.initialized && !i.updating && (i.update(), i.draw(F)) - } - O.default.pop() - } - - function a(t) { - R.reloadFlg = !0, R.count++, R.changeModel(F, t) - } - - function h(t, i) { - return t.x * i.x + t.y * i.y - } - - function l(t, i) { - var e = Math.sqrt(t * t + i * i); - return { - x: t / e, - y: i / e - } - } - - function $(t, i, e) { - function r(t, i) { - return 180 * Math.acos(h({ - x: 0, - y: 1 - }, l(t, i))) / Math.PI - } - if (i.x < e.left + e.width && i.y < e.top + e.height && i.x > e.left && i.y > e.top) return i; - var o = t.x - i.x, - n = t.y - i.y, - s = r(o, n); - i.x < t.x && (s = 360 - s); - var _ = 360 - r(e.left - t.x, -1 * (e.top - t.y)), - a = 360 - r(e.left - t.x, -1 * (e.top + e.height - t.y)), - $ = r(e.left + e.width - t.x, -1 * (e.top - t.y)), - u = r(e.left + e.width - t.x, -1 * (e.top + e.height - t.y)), - p = n / o, - f = {}; - if (s < $) { - var c = e.top - t.y, - d = c / p; - f = { - y: t.y + c, - x: t.x + d - } - } else if (s < u) { - var g = e.left + e.width - t.x, - y = g * p; - f = { - y: t.y + y, - x: t.x + g - } - } else if (s < a) { - var m = e.top + e.height - t.y, - T = m / p; - f = { - y: t.y + m, - x: t.x + T - } - } else if (s < _) { - var P = t.x - e.left, - S = P * p; - f = { - y: t.y - S, - x: t.x - P - } - } else { - var v = e.top - t.y, - L = v / p; - f = { - y: t.y + v, - x: t.x + L - } - } - return f - } - - function u(t) { - Y = !0; - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $({ - x: i.left + i.width / 2, - y: i.top + i.height * X - }, { - x: t.clientX, - y: t.clientY - }, i), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && console.log("onMouseMove device( x:" + t.clientX + " y:" + t.clientY + " ) view( x:" + n + " y:" + s + ")"), k = e, V = r, N.setPoint(n, s) - } - - function p(t) { - Y = !0; - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $({ - x: i.left + i.width / 2, - y: i.top + i.height * X - }, { - x: t.clientX, - y: t.clientY - }, i), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && console.log("onMouseDown device( x:" + t.clientX + " y:" + t.clientY + " ) view( x:" + n + " y:" + s + ")"), k = e, V = r, R.tapEvent(n, s) - } - - function f(t) { - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $({ - x: i.left + i.width / 2, - y: i.top + i.height * X - }, { - x: t.clientX, - y: t.clientY - }, i), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && console.log("onMouseMove device( x:" + t.clientX + " y:" + t.clientY + " ) view( x:" + n + " y:" + s + ")"), Y && (k = e, V = r, N.setPoint(n, s)) - } - - function c() { - Y && (Y = !1), N.setPoint(0, 0) - } - - function d() { - w.default.DEBUG_LOG && console.log("Set Session Storage."), sessionStorage.setItem("Sleepy", "1") - } - - function g(t) { - if ("mousewheel" == t.type); - else if ("mousedown" == t.type) p(t); - else if ("mousemove" == t.type) { - var i = sessionStorage.getItem("Sleepy"); - "1" === i && sessionStorage.setItem("Sleepy", "0"), u(t) - } else if ("mouseup" == t.type) { - if ("button" in t && 0 != t.button) return - } else if ("mouseout" == t.type) { - w.default.DEBUG_LOG && console.log("Mouse out Window."), c(); - var e = sessionStorage.getItem("SleepyTimer"); - window.clearTimeout(e), e = window.setTimeout(d, 5e4), sessionStorage.setItem("SleepyTimer", e) - } - } - - function y(t) { - var i = t.touches[0]; - "touchstart" == t.type ? 1 == t.touches.length && u(i) : "touchmove" == t.type ? f(i) : "touchend" == t.type && c() - } - - function m(t) { - var i = G.transformX(t); - return B.invertTransformX(i) - } - - function T(t) { - var i = G.transformY(t); - return B.invertTransformY(i) - } - - function P(t) { - return G.transformX(t) - } - - function S(t) { - return G.transformY(t) - } - - function v() { - for (var t = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"], i = 0; i < t.length; i++) try { - var e = C.getContext(t[i], { - premultipliedAlpha: !0 - }); - if (e) return e - } catch (t) {} - return null - } - - function L(t, i, e) { - X = void 0 === e ? .5 : e, o(t), n(i) - } - e(6); - var M = e(0), - E = e(8), - A = r(E), - I = e(1), - w = r(I), - x = e(3), - O = r(x), - D = e(2), - R = (window.navigator.platform.toLowerCase(), new A.default), - b = !1, - F = null, - C = null, - N = null, - B = null, - U = null, - G = null, - Y = !1, - k = 0, - V = 0, - X = .5; - window.loadlive2d = L -}, function (t, i, e) { - "use strict"; - (function (t) { - ! function () { - function i() { - At || (this._$MT = null, this._$5S = null, this._$NP = 0, i._$42++, this._$5S = new Y(this)) - } - - function e(t) { - if (!At) { - this.clipContextList = new Array, this.glcontext = t.gl, this.dp_webgl = t, this.curFrameNo = 0, this.firstError_clipInNotUpdate = !0, this.colorBuffer = 0, this.isInitGLFBFunc = !1, this.tmpBoundsOnModel = new S, at.glContext.length > at.frameBuffers.length && (this.curFrameNo = this.getMaskRenderTexture()), this.tmpModelToViewMatrix = new R, this.tmpMatrix2 = new R, this.tmpMatrixForMask = new R, this.tmpMatrixForDraw = new R, this.CHANNEL_COLORS = new Array; - var i = new A; - i = new A, i.r = 0, i.g = 0, i.b = 0, i.a = 1, this.CHANNEL_COLORS.push(i), i = new A, i.r = 1, i.g = 0, i.b = 0, i.a = 0, this.CHANNEL_COLORS.push(i), i = new A, i.r = 0, i.g = 1, i.b = 0, i.a = 0, this.CHANNEL_COLORS.push(i), i = new A, i.r = 0, i.g = 0, i.b = 1, i.a = 0, this.CHANNEL_COLORS.push(i); - for (var e = 0; e < this.CHANNEL_COLORS.length; e++) this.dp_webgl.setChannelFlagAsColor(e, this.CHANNEL_COLORS[e]) - } - } - - function r(t, i, e) { - this.clipIDList = new Array, this.clipIDList = e, this.clippingMaskDrawIndexList = new Array; - for (var r = 0; r < e.length; r++) this.clippingMaskDrawIndexList.push(i.getDrawDataIndex(e[r])); - this.clippedDrawContextList = new Array, this.isUsing = !0, this.layoutChannelNo = 0, this.layoutBounds = new S, this.allClippedDrawRect = new S, this.matrixForMask = new Float32Array(16), this.matrixForDraw = new Float32Array(16), this.owner = t - } - - function o(t, i) { - this._$gP = t, this.drawDataIndex = i - } - - function n() { - At || (this.color = null) - } - - function s() { - At || (this._$dP = null, this._$eo = null, this._$V0 = null, this._$dP = 1e3, this._$eo = 1e3, this._$V0 = 1, this._$a0()) - } - - function _() {} - - function a() { - this._$r = null, this._$0S = null - } - - function h() { - At || (this.x = null, this.y = null, this.width = null, this.height = null) - } - - function l(t) { - At || et.prototype.constructor.call(this, t) - } - - function $() {} - - function u(t) { - At || et.prototype.constructor.call(this, t) - } - - function p() { - At || (this._$vo = null, this._$F2 = null, this._$ao = 400, this._$1S = 400, p._$42++) - } - - function f() { - At || (this.p1 = new c, this.p2 = new c, this._$Fo = 0, this._$Db = 0, this._$L2 = 0, this._$M2 = 0, this._$ks = 0, this._$9b = 0, this._$iP = 0, this._$iT = 0, this._$lL = new Array, this._$qP = new Array, this.setup(.3, .5, .1)) - } - - function c() { - this._$p = 1, this.x = 0, this.y = 0, this.vx = 0, this.vy = 0, this.ax = 0, this.ay = 0, this.fx = 0, this.fy = 0, this._$s0 = 0, this._$70 = 0, this._$7L = 0, this._$HL = 0 - } - - function d(t, i, e) { - this._$wL = null, this.scale = null, this._$V0 = null, this._$wL = t, this.scale = i, this._$V0 = e - } - - function g(t, i, e, r) { - d.prototype.constructor.call(this, i, e, r), this._$tL = null, this._$tL = t - } - - function y(t, i, e) { - this._$wL = null, this.scale = null, this._$V0 = null, this._$wL = t, this.scale = i, this._$V0 = e - } - - function T(t, i, e, r) { - y.prototype.constructor.call(this, i, e, r), this._$YP = null, this._$YP = t - } - - function P() { - At || (this._$fL = 0, this._$gL = 0, this._$B0 = 1, this._$z0 = 1, this._$qT = 0, this.reflectX = !1, this.reflectY = !1) - } - - function S() { - At || (this.x = null, this.y = null, this.width = null, this.height = null) - } - - function v() {} - - function L() { - At || (this.x = null, this.y = null) - } - - function M() { - At || (this._$gP = null, this._$dr = null, this._$GS = null, this._$qb = null, this._$Lb = null, this._$mS = null, this.clipID = null, this.clipIDList = new Array) - } - - function E() { - At || (this._$Eb = E._$ps, this._$lT = 1, this._$C0 = 1, this._$tT = 1, this._$WL = 1, this.culling = !1, this.matrix4x4 = new Float32Array(16), this.premultipliedAlpha = !1, this.anisotropy = 0, this.clippingProcess = E.CLIPPING_PROCESS_NONE, this.clipBufPre_clipContextMask = null, this.clipBufPre_clipContextDraw = null, this.CHANNEL_COLORS = new Array) - } - - function A() { - At || (this.a = 1, this.r = 1, this.g = 1, this.b = 1, this.scale = 1, this._$ho = 1, this.blendMode = at.L2D_COLOR_BLEND_MODE_MULT) - } - - function I() { - At || (this._$kP = null, this._$dr = null, this._$Ai = !0, this._$mS = null) - } - - function w() {} - - function x() { - At || (this._$VP = 0, this._$wL = null, this._$GP = null, this._$8o = x._$ds, this._$2r = -1, this._$O2 = 0, this._$ri = 0) - } - - function O() {} - - function D() { - At || (this._$Ob = null) - } - - function R() { - this.m = new Float32Array(16), this.identity() - } - - function b(t) { - At || et.prototype.constructor.call(this, t) - } - - function F() { - At || (this._$7 = 1, this._$f = 0, this._$H = 0, this._$g = 1, this._$k = 0, this._$w = 0, this._$hi = STATE_IDENTITY, this._$Z = _$pS) - } - - function C() { - At || (s.prototype.constructor.call(this), this.motions = new Array, this._$7r = null, this._$7r = C._$Co++, this._$D0 = 30, this._$yT = 0, this._$E = !0, this.loopFadeIn = !0, this._$AS = -1, _$a0()) - } - - function N() { - this._$P = new Float32Array(100), this.size = 0 - } - - function B() { - this._$4P = null, this._$I0 = null, this._$RP = null - } - - function U() {} - - function G() {} - - function Y(t) { - At || (this._$QT = !0, this._$co = -1, this._$qo = 0, this._$pb = new Array(Y._$is), this._$_2 = new Float32Array(Y._$is), this._$vr = new Float32Array(Y._$is), this._$Rr = new Float32Array(Y._$is), this._$Or = new Float32Array(Y._$is), this._$fs = new Float32Array(Y._$is), this._$Js = new Array(Y._$is), this._$3S = new Array, this._$aS = new Array, this._$Bo = null, this._$F2 = new Array, this._$db = new Array, this._$8b = new Array, this._$Hr = new Array, this._$Ws = null, this._$Vs = null, this._$Er = null, this._$Es = new Int16Array(U._$Qb), this._$ZP = new Float32Array(2 * U._$1r), this._$Ri = t, this._$b0 = Y._$HP++, this.clipManager = null, this.dp_webgl = null) - } - - function k() {} - - function V() { - At || (this._$12 = null, this._$bb = null, this._$_L = null, this._$jo = null, this._$iL = null, this._$0L = null, this._$Br = null, this._$Dr = null, this._$Cb = null, this._$mr = null, this._$_L = wt.STATE_FIRST, this._$Br = 4e3, this._$Dr = 100, this._$Cb = 50, this._$mr = 150, this._$jo = !0, this._$iL = "PARAM_EYE_L_OPEN", this._$0L = "PARAM_EYE_R_OPEN") - } - - function X() { - At || (E.prototype.constructor.call(this), this._$sb = new Int32Array(X._$As), this._$U2 = new Array, this.transform = null, this.gl = null, null == X._$NT && (X._$NT = X._$9r(256), X._$vS = X._$9r(256), X._$no = X._$vb(256))) - } - - function z() { - At || (I.prototype.constructor.call(this), this._$GS = null, this._$Y0 = null) - } - - function H(t) { - _t.prototype.constructor.call(this, t), this._$8r = I._$ur, this._$Yr = null, this._$Wr = null - } - - function W() { - At || (M.prototype.constructor.call(this), this._$gP = null, this._$dr = null, this._$GS = null, this._$qb = null, this._$Lb = null, this._$mS = null) - } - - function j() { - At || (this._$NL = null, this._$3S = null, this._$aS = null, j._$42++) - } - - function q() { - At || (i.prototype.constructor.call(this), this._$zo = new X) - } - - function J() { - At || (s.prototype.constructor.call(this), this.motions = new Array, this._$o2 = null, this._$7r = J._$Co++, this._$D0 = 30, this._$yT = 0, this._$E = !1, this.loopFadeIn = !0, this._$rr = -1, this._$eP = 0) - } - - function Q(t, i) { - return String.fromCharCode(t.getUint8(i)) - } - - function N() { - this._$P = new Float32Array(100), this.size = 0 - } - - function B() { - this._$4P = null, this._$I0 = null, this._$RP = null - } - - function Z() { - At || (I.prototype.constructor.call(this), this._$o = 0, this._$A = 0, this._$GS = null, this._$Eo = null) - } - - function K(t) { - _t.prototype.constructor.call(this, t), this._$8r = I._$ur, this._$Cr = null, this._$hr = null - } - - function tt() { - At || (this.visible = !0, this._$g0 = !1, this._$NL = null, this._$3S = null, this._$aS = null, tt._$42++) - } - - function it(t) { - this._$VS = null, this._$e0 = null, this._$e0 = t - } - - function et(t) { - At || (this.id = t) - } - - function rt() {} - - function ot() { - At || (this._$4S = null) - } - - function nt(t, i) { - this.canvas = t, this.context = i, this.viewport = new Array(0, 0, t.width, t.height), this._$6r = 1, this._$xP = 0, this._$3r = 1, this._$uP = 0, this._$Qo = -1, this.cacheImages = {} - } - - function st() { - At || (this._$TT = null, this._$LT = null, this._$FS = null, this._$wL = null) - } - - function _t(t) { - At || (this._$e0 = null, this._$IP = null, this._$JS = !1, this._$AT = !0, this._$e0 = t, this.totalScale = 1, this._$7s = 1, this.totalOpacity = 1) - } - - function at() {} - - function ht() {} - - function lt(t) { - At || (this._$ib = t) - } - - function $t() { - At || (W.prototype.constructor.call(this), this._$LP = -1, this._$d0 = 0, this._$Yo = 0, this._$JP = null, this._$5P = null, this._$BP = null, this._$Eo = null, this._$Qi = null, this._$6s = $t._$ms, this.culling = !0, this.gl_cacheImage = null, this.instanceNo = $t._$42++) - } - - function ut(t) { - Mt.prototype.constructor.call(this, t), this._$8r = W._$ur, this._$Cr = null, this._$hr = null - } - - function pt() { - At || (this.x = null, this.y = null) - } - - function ft(t) { - At || (i.prototype.constructor.call(this), this.drawParamWebGL = new mt(t), this.drawParamWebGL.setGL(at.getGL(t))) - } - - function ct() { - At || (this.motions = null, this._$eb = !1, this.motions = new Array) - } - - function dt() { - this._$w0 = null, this._$AT = !0, this._$9L = !1, this._$z2 = -1, this._$bs = -1, this._$Do = -1, this._$sr = null, this._$sr = dt._$Gs++ - } - - function gt() { - this.m = new Array(1, 0, 0, 0, 1, 0, 0, 0, 1) - } - - function yt(t) { - At || et.prototype.constructor.call(this, t) - } - - function mt(t) { - At || (E.prototype.constructor.call(this), this.textures = new Array, this.transform = null, this.gl = null, this.glno = t, this.firstDraw = !0, this.anisotropyExt = null, this.maxAnisotropy = 0, this._$As = 32, this._$Gr = !1, this._$NT = null, this._$vS = null, this._$no = null, this.vertShader = null, this.fragShader = null, this.vertShaderOff = null, this.fragShaderOff = null) - } - - function Tt(t, i, e) { - return null == i && (i = t.createBuffer()), t.bindBuffer(t.ARRAY_BUFFER, i), t.bufferData(t.ARRAY_BUFFER, e, t.DYNAMIC_DRAW), i - } - - function Pt(t, i, e) { - return null == i && (i = t.createBuffer()), t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, i), t.bufferData(t.ELEMENT_ARRAY_BUFFER, e, t.DYNAMIC_DRAW), i - } - - function St(t) { - At || (this._$P = new Int8Array(8), this._$R0 = new DataView(this._$P.buffer), this._$3i = new Int8Array(1e3), this._$hL = 0, this._$v0 = 0, this._$S2 = 0, this._$Ko = new Array, this._$T = t, this._$F = 0) - } - - function vt() {} - - function Lt() {} - - function Mt(t) { - At || (this._$e0 = null, this._$IP = null, this._$Us = null, this._$7s = null, this._$IS = [!1], this._$VS = null, this._$AT = !0, this.baseOpacity = 1, this.clipBufPre_clipContext = null, this._$e0 = t) - } - - function Et() {} - var At = !0; - i._$0s = 1, i._$4s = 2, i._$42 = 0, i._$62 = function (t, e) { - try { - if (e instanceof ArrayBuffer && (e = new DataView(e)), !(e instanceof DataView)) throw new lt("_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer"); - var r, o = new St(e), - n = o._$ST(), - s = o._$ST(), - a = o._$ST(); - if (109 != n || 111 != s || 99 != a) throw new lt("_$gi _$C _$li , _$Q0 _$P0."); - if (r = o._$ST(), o._$gr(r), r > G._$T7) { - t._$NP |= i._$4s; - throw new lt("_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : " + G._$T7 + " < _$f0 : " + r + " )@_$SS#loadModel()\n") - } - var h = o._$nP(); - if (r >= G._$s7) { - var l = o._$9T(), - $ = o._$9T(); - if (-30584 != l || -30584 != $) throw t._$NP |= i._$0s, new lt("_$gi _$C _$li , _$0 _$6 _$Ui.") - } - t._$KS(h); - var u = t.getModelContext(); - u.setDrawParam(t.getDrawParam()), u.init() - } catch (t) { - _._$Rb(t) - } - }, i.prototype._$KS = function (t) { - this._$MT = t - }, i.prototype.getModelImpl = function () { - return null == this._$MT && (this._$MT = new p, this._$MT._$zP()), this._$MT - }, i.prototype.getCanvasWidth = function () { - return null == this._$MT ? 0 : this._$MT.getCanvasWidth() - }, i.prototype.getCanvasHeight = function () { - return null == this._$MT ? 0 : this._$MT.getCanvasHeight() - }, i.prototype.getParamFloat = function (t) { - return "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), this._$5S.getParamFloat(t) - }, i.prototype.setParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), arguments.length < 3 && (e = 1), this._$5S.setParamFloat(t, this._$5S.getParamFloat(t) * (1 - e) + i * e) - }, i.prototype.addToParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), arguments.length < 3 && (e = 1), this._$5S.setParamFloat(t, this._$5S.getParamFloat(t) + i * e) - }, i.prototype.multParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), arguments.length < 3 && (e = 1), this._$5S.setParamFloat(t, this._$5S.getParamFloat(t) * (1 + (i - 1) * e)) - }, i.prototype.getParamIndex = function (t) { - return this._$5S.getParamIndex(u.getID(t)) - }, i.prototype.loadParam = function () { - this._$5S.loadParam() - }, i.prototype.saveParam = function () { - this._$5S.saveParam() - }, i.prototype.init = function () { - this._$5S.init() - }, i.prototype.update = function () { - this._$5S.update() - }, i.prototype._$Rs = function () { - return _._$li("_$60 _$PT _$Rs()"), -1 - }, i.prototype._$Ds = function (t) { - _._$li("_$60 _$PT _$SS#_$Ds() \n") - }, i.prototype._$K2 = function () {}, i.prototype.draw = function () {}, i.prototype.getModelContext = function () { - return this._$5S - }, i.prototype._$s2 = function () { - return this._$NP - }, i.prototype._$P7 = function (t, i, e, r) { - var o = -1, - n = 0, - s = this; - if (0 != e) - if (1 == t.length) { - var _ = t[0], - a = 0 != s.getParamFloat(_), - h = i[0], - l = s.getPartsOpacity(h), - $ = e / r; - a ? (l += $) > 1 && (l = 1) : (l -= $) < 0 && (l = 0), s.setPartsOpacity(h, l) - } else { - for (var u = 0; u < t.length; u++) { - var _ = t[u], - p = 0 != s.getParamFloat(_); - if (p) { - if (o >= 0) break; - o = u; - var h = i[u]; - n = s.getPartsOpacity(h), n += e / r, n > 1 && (n = 1) - } - } - o < 0 && (console.log("No _$wi _$q0/ _$U default[%s]", t[0]), o = 0, n = 1, s.loadParam(), s.setParamFloat(t[o], n), s.saveParam()); - for (var u = 0; u < t.length; u++) { - var h = i[u]; - if (o == u) s.setPartsOpacity(h, n); - else { - var f, c = s.getPartsOpacity(h); - f = n < .5 ? -.5 * n / .5 + 1 : .5 * (1 - n) / .5; - var d = (1 - f) * (1 - n); - d > .15 && (f = 1 - .15 / (1 - n)), c > f && (c = f), s.setPartsOpacity(h, c) - } - } - } - else - for (var u = 0; u < t.length; u++) { - var _ = t[u], - h = i[u], - p = 0 != s.getParamFloat(_); - s.setPartsOpacity(h, p ? 1 : 0) - } - }, i.prototype.setPartsOpacity = function (t, i) { - "number" != typeof t && (t = this._$5S.getPartsDataIndex(l.getID(t))), this._$5S.setPartsOpacity(t, i) - }, i.prototype.getPartsDataIndex = function (t) { - return t instanceof l || (t = l.getID(t)), this._$5S.getPartsDataIndex(t) - }, i.prototype.getPartsOpacity = function (t) { - return "number" != typeof t && (t = this._$5S.getPartsDataIndex(l.getID(t))), t < 0 ? 0 : this._$5S.getPartsOpacity(t) - }, i.prototype.getDrawParam = function () {}, i.prototype.getDrawDataIndex = function (t) { - return this._$5S.getDrawDataIndex(b.getID(t)) - }, i.prototype.getDrawData = function (t) { - return this._$5S.getDrawData(t) - }, i.prototype.getTransformedPoints = function (t) { - var i = this._$5S._$C2(t); - return i instanceof ut ? i.getTransformedPoints() : null - }, i.prototype.getIndexArray = function (t) { - if (t < 0 || t >= this._$5S._$aS.length) return null; - var i = this._$5S._$aS[t]; - return null != i && i.getType() == W._$wb && i instanceof $t ? i.getIndexArray() : null - }, e.CHANNEL_COUNT = 4, e.RENDER_TEXTURE_USE_MIPMAP = !1, e.NOT_USED_FRAME = -100, e.prototype._$L7 = function () { - if (this.tmpModelToViewMatrix && (this.tmpModelToViewMatrix = null), this.tmpMatrix2 && (this.tmpMatrix2 = null), this.tmpMatrixForMask && (this.tmpMatrixForMask = null), this.tmpMatrixForDraw && (this.tmpMatrixForDraw = null), this.tmpBoundsOnModel && (this.tmpBoundsOnModel = null), this.CHANNEL_COLORS) { - for (var t = this.CHANNEL_COLORS.length - 1; t >= 0; --t) this.CHANNEL_COLORS.splice(t, 1); - this.CHANNEL_COLORS = [] - } - this.releaseShader() - }, e.prototype.releaseShader = function () { - for (var t = at.frameBuffers.length, i = 0; i < t; i++) this.gl.deleteFramebuffer(at.frameBuffers[i].framebuffer); - at.frameBuffers = [], at.glContext = [] - }, e.prototype.init = function (t, i, e) { - for (var o = 0; o < i.length; o++) { - var n = i[o].getClipIDList(); - if (null != n) { - var s = this.findSameClip(n); - null == s && (s = new r(this, t, n), this.clipContextList.push(s)); - var _ = i[o].getDrawDataID(), - a = t.getDrawDataIndex(_); - s.addClippedDrawData(_, a); - e[o].clipBufPre_clipContext = s - } - } - }, e.prototype.getMaskRenderTexture = function () { - var t = null; - return t = this.dp_webgl.createFramebuffer(), at.frameBuffers[this.dp_webgl.glno] = t, this.dp_webgl.glno - }, e.prototype.setupClip = function (t, i) { - for (var e = 0, r = 0; r < this.clipContextList.length; r++) { - var o = this.clipContextList[r]; - this.calcClippedDrawTotalBounds(t, o), o.isUsing && e++ - } - if (e > 0) { - var n = i.gl.getParameter(i.gl.FRAMEBUFFER_BINDING), - s = new Array(4); - s[0] = 0, s[1] = 0, s[2] = i.gl.canvas.width, s[3] = i.gl.canvas.height, i.gl.viewport(0, 0, at.clippingMaskBufferSize, at.clippingMaskBufferSize), this.setupLayoutBounds(e), i.gl.bindFramebuffer(i.gl.FRAMEBUFFER, at.frameBuffers[this.curFrameNo].framebuffer), i.gl.clearColor(0, 0, 0, 0), i.gl.clear(i.gl.COLOR_BUFFER_BIT); - for (var r = 0; r < this.clipContextList.length; r++) { - var o = this.clipContextList[r], - _ = o.allClippedDrawRect, - a = (o.layoutChannelNo, o.layoutBounds); - this.tmpBoundsOnModel._$jL(_), this.tmpBoundsOnModel.expand(.05 * _.width, .05 * _.height); - var h = a.width / this.tmpBoundsOnModel.width, - l = a.height / this.tmpBoundsOnModel.height; - this.tmpMatrix2.identity(), this.tmpMatrix2.translate(-1, -1, 0), this.tmpMatrix2.scale(2, 2, 1), this.tmpMatrix2.translate(a.x, a.y, 0), this.tmpMatrix2.scale(h, l, 1), this.tmpMatrix2.translate(-this.tmpBoundsOnModel.x, -this.tmpBoundsOnModel.y, 0), this.tmpMatrixForMask.setMatrix(this.tmpMatrix2.m), this.tmpMatrix2.identity(), this.tmpMatrix2.translate(a.x, a.y, 0), this.tmpMatrix2.scale(h, l, 1), this.tmpMatrix2.translate(-this.tmpBoundsOnModel.x, -this.tmpBoundsOnModel.y, 0), this.tmpMatrixForDraw.setMatrix(this.tmpMatrix2.m); - for (var $ = this.tmpMatrixForMask.getArray(), u = 0; u < 16; u++) o.matrixForMask[u] = $[u]; - for (var p = this.tmpMatrixForDraw.getArray(), u = 0; u < 16; u++) o.matrixForDraw[u] = p[u]; - for (var f = o.clippingMaskDrawIndexList.length, c = 0; c < f; c++) { - var d = o.clippingMaskDrawIndexList[c], - g = t.getDrawData(d), - y = t._$C2(d); - i.setClipBufPre_clipContextForMask(o), g.draw(i, t, y) - } - } - i.gl.bindFramebuffer(i.gl.FRAMEBUFFER, n), i.setClipBufPre_clipContextForMask(null), i.gl.viewport(s[0], s[1], s[2], s[3]) - } - }, e.prototype.getColorBuffer = function () { - return this.colorBuffer - }, e.prototype.findSameClip = function (t) { - for (var i = 0; i < this.clipContextList.length; i++) { - var e = this.clipContextList[i], - r = e.clipIDList.length; - if (r == t.length) { - for (var o = 0, n = 0; n < r; n++) - for (var s = e.clipIDList[n], _ = 0; _ < r; _++) - if (t[_] == s) { - o++; - break - } - if (o == r) return e - } - } - return null - }, e.prototype.calcClippedDrawTotalBounds = function (t, i) { - for (var e = t._$Ri.getModelImpl().getCanvasWidth(), r = t._$Ri.getModelImpl().getCanvasHeight(), o = e > r ? e : r, n = o, s = o, _ = 0, a = 0, h = i.clippedDrawContextList.length, l = 0; l < h; l++) { - var $ = i.clippedDrawContextList[l], - u = $.drawDataIndex, - p = t._$C2(u); - if (p._$yo()) { - for (var f = p.getTransformedPoints(), c = f.length, d = [], g = [], y = 0, m = U._$i2; m < c; m += U._$No) d[y] = f[m], g[y] = f[m + 1], y++; - var T = Math.min.apply(null, d), - P = Math.min.apply(null, g), - S = Math.max.apply(null, d), - v = Math.max.apply(null, g); - T < n && (n = T), P < s && (s = P), S > _ && (_ = S), v > a && (a = v) - } - } - if (n == o) i.allClippedDrawRect.x = 0, i.allClippedDrawRect.y = 0, i.allClippedDrawRect.width = 0, i.allClippedDrawRect.height = 0, i.isUsing = !1; - else { - var L = _ - n, - M = a - s; - i.allClippedDrawRect.x = n, i.allClippedDrawRect.y = s, i.allClippedDrawRect.width = L, i.allClippedDrawRect.height = M, i.isUsing = !0 - } - }, e.prototype.setupLayoutBounds = function (t) { - var i = t / e.CHANNEL_COUNT, - r = t % e.CHANNEL_COUNT; - i = ~~i, r = ~~r; - for (var o = 0, n = 0; n < e.CHANNEL_COUNT; n++) { - var s = i + (n < r ? 1 : 0); - if (0 == s); - else if (1 == s) { - var a = this.clipContextList[o++]; - a.layoutChannelNo = n, a.layoutBounds.x = 0, a.layoutBounds.y = 0, a.layoutBounds.width = 1, a.layoutBounds.height = 1 - } else if (2 == s) - for (var h = 0; h < s; h++) { - var l = h % 2, - $ = 0; - l = ~~l; - var a = this.clipContextList[o++]; - a.layoutChannelNo = n, a.layoutBounds.x = .5 * l, a.layoutBounds.y = 0, a.layoutBounds.width = .5, a.layoutBounds.height = 1 - } else if (s <= 4) - for (var h = 0; h < s; h++) { - var l = h % 2, - $ = h / 2; - l = ~~l, $ = ~~$; - var a = this.clipContextList[o++]; - a.layoutChannelNo = n, a.layoutBounds.x = .5 * l, a.layoutBounds.y = .5 * $, a.layoutBounds.width = .5, a.layoutBounds.height = .5 - } else if (s <= 9) - for (var h = 0; h < s; h++) { - var l = h % 3, - $ = h / 3; - l = ~~l, $ = ~~$; - var a = this.clipContextList[o++]; - a.layoutChannelNo = n, a.layoutBounds.x = l / 3, a.layoutBounds.y = $ / 3, a.layoutBounds.width = 1 / 3, a.layoutBounds.height = 1 / 3 - } else _._$li("_$6 _$0P mask count : %d", s) - } - }, r.prototype.addClippedDrawData = function (t, i) { - var e = new o(t, i); - this.clippedDrawContextList.push(e) - }, s._$JT = function (t, i, e) { - var r = t / i, - o = e / i, - n = o, - s = 1 - (1 - o) * (1 - o), - _ = 1 - (1 - n) * (1 - n), - a = 1 / 3 * (1 - o) * s + (n * (2 / 3) + 1 / 3 * (1 - n)) * (1 - s), - h = (n + 2 / 3 * (1 - n)) * _ + (o * (1 / 3) + 2 / 3 * (1 - o)) * (1 - _), - l = 1 - 3 * h + 3 * a - 0, - $ = 3 * h - 6 * a + 0, - u = 3 * a - 0; - if (r <= 0) return 0; - if (r >= 1) return 1; - var p = r, - f = p * p; - return l * (p * f) + $ * f + u * p + 0 - }, s.prototype._$a0 = function () {}, s.prototype.setFadeIn = function (t) { - this._$dP = t - }, s.prototype.setFadeOut = function (t) { - this._$eo = t - }, s.prototype._$pT = function (t) { - this._$V0 = t - }, s.prototype.getFadeOut = function () { - return this._$eo - }, s.prototype._$4T = function () { - return this._$eo - }, s.prototype._$mT = function () { - return this._$V0 - }, s.prototype.getDurationMSec = function () { - return -1 - }, s.prototype.getLoopDurationMSec = function () { - return -1 - }, s.prototype.updateParam = function (t, i) { - if (i._$AT && !i._$9L) { - var e = w.getUserTimeMSec(); - if (i._$z2 < 0) { - i._$z2 = e, i._$bs = e; - var r = this.getDurationMSec(); - i._$Do < 0 && (i._$Do = r <= 0 ? -1 : i._$z2 + r) - } - var o = this._$V0; - o = o * (0 == this._$dP ? 1 : ht._$r2((e - i._$bs) / this._$dP)) * (0 == this._$eo || i._$Do < 0 ? 1 : ht._$r2((i._$Do - e) / this._$eo)), 0 <= o && o <= 1 || console.log("### assert!! ### "), this.updateParamExe(t, e, o, i), i._$Do > 0 && i._$Do < e && (i._$9L = !0) - } - }, s.prototype.updateParamExe = function (t, i, e, r) {}, _._$8s = 0, _._$fT = new Object, _.start = function (t) { - var i = _._$fT[t]; - null == i && (i = new a, i._$r = t, _._$fT[t] = i), i._$0S = w.getSystemTimeMSec() - }, _.dump = function (t) { - var i = _._$fT[t]; - if (null != i) { - var e = w.getSystemTimeMSec(), - r = e - i._$0S; - return console.log(t + " : " + r + "ms"), r - } - return -1 - }, _.end = function (t) { - var i = _._$fT[t]; - if (null != i) { - return w.getSystemTimeMSec() - i._$0S - } - return -1 - }, _._$li = function (t, i) { - console.log("_$li : " + t + "\n", i) - }, _._$Ji = function (t, i) { - console.log(t, i) - }, _._$dL = function (t, i) { - console.log(t, i), console.log("\n") - }, _._$KL = function (t, i) { - for (var e = 0; e < i; e++) e % 16 == 0 && e > 0 ? console.log("\n") : e % 8 == 0 && e > 0 && console.log(" "), console.log("%02X ", 255 & t[e]); - console.log("\n") - }, _._$nr = function (t, i, e) { - console.log("%s\n", t); - for (var r = i.length, o = 0; o < r; ++o) console.log("%5d", i[o]), console.log("%s\n", e), console.log(","); - console.log("\n") - }, _._$Rb = function (t) { - console.log("dump exception : " + t), console.log("stack :: " + t.stack) - }, h.prototype._$8P = function () { - return .5 * (this.x + this.x + this.width) - }, h.prototype._$6P = function () { - return .5 * (this.y + this.y + this.height) - }, h.prototype._$EL = function () { - return this.x + this.width - }, h.prototype._$5T = function () { - return this.y + this.height - }, h.prototype._$jL = function (t, i, e, r) { - this.x = t, this.y = i, this.width = e, this.height = r - }, h.prototype._$jL = function (t) { - this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height - }, l.prototype = new et, l._$tP = new Object, l._$27 = function () { - l._$tP.clear() - }, l.getID = function (t) { - var i = l._$tP[t]; - return null == i && (i = new l(t), l._$tP[t] = i), i - }, l.prototype._$3s = function () { - return new l - }, u.prototype = new et, u._$tP = new Object, u._$27 = function () { - u._$tP.clear() - }, u.getID = function (t) { - var i = u._$tP[t]; - return null == i && (i = new u(t), u._$tP[t] = i), i - }, u.prototype._$3s = function () { - return new u - }, p._$42 = 0, p.prototype._$zP = function () { - null == this._$vo && (this._$vo = new ot), null == this._$F2 && (this._$F2 = new Array) - }, p.prototype.getCanvasWidth = function () { - return this._$ao - }, p.prototype.getCanvasHeight = function () { - return this._$1S - }, p.prototype._$F0 = function (t) { - this._$vo = t._$nP(), this._$F2 = t._$nP(), this._$ao = t._$6L(), this._$1S = t._$6L() - }, p.prototype._$6S = function (t) { - this._$F2.push(t) - }, p.prototype._$Xr = function () { - return this._$F2 - }, p.prototype._$E2 = function () { - return this._$vo - }, f.prototype.setup = function (t, i, e) { - this._$ks = this._$Yb(), this.p2._$xT(), 3 == arguments.length && (this._$Fo = t, this._$L2 = i, this.p1._$p = e, this.p2._$p = e, this.p2.y = t, this.setup()) - }, f.prototype.getPhysicsPoint1 = function () { - return this.p1 - }, f.prototype.getPhysicsPoint2 = function () { - return this.p2 - }, f.prototype._$qr = function () { - return this._$Db - }, f.prototype._$pr = function (t) { - this._$Db = t - }, f.prototype._$5r = function () { - return this._$M2 - }, f.prototype._$Cs = function () { - return this._$9b - }, f.prototype._$Yb = function () { - return -180 * Math.atan2(this.p1.x - this.p2.x, -(this.p1.y - this.p2.y)) / Math.PI - }, f.prototype.addSrcParam = function (t, i, e, r) { - var o = new g(t, i, e, r); - this._$lL.push(o) - }, f.prototype.addTargetParam = function (t, i, e, r) { - var o = new T(t, i, e, r); - this._$qP.push(o) - }, f.prototype.update = function (t, i) { - if (0 == this._$iP) return this._$iP = this._$iT = i, void(this._$Fo = Math.sqrt((this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y))); - var e = (i - this._$iT) / 1e3; - if (0 != e) { - for (var r = this._$lL.length - 1; r >= 0; --r) { - this._$lL[r]._$oP(t, this) - } - this._$oo(t, e), this._$M2 = this._$Yb(), this._$9b = (this._$M2 - this._$ks) / e, this._$ks = this._$M2 - } - for (var r = this._$qP.length - 1; r >= 0; --r) { - this._$qP[r]._$YS(t, this) - } - this._$iT = i - }, f.prototype._$oo = function (t, i) { - i < .033 && (i = .033); - var e = 1 / i; - this.p1.vx = (this.p1.x - this.p1._$s0) * e, this.p1.vy = (this.p1.y - this.p1._$70) * e, this.p1.ax = (this.p1.vx - this.p1._$7L) * e, this.p1.ay = (this.p1.vy - this.p1._$HL) * e, this.p1.fx = this.p1.ax * this.p1._$p, this.p1.fy = this.p1.ay * this.p1._$p, this.p1._$xT(); - var r, o, n = -Math.atan2(this.p1.y - this.p2.y, this.p1.x - this.p2.x), - s = Math.cos(n), - _ = Math.sin(n), - a = 9.8 * this.p2._$p, - h = this._$Db * Lt._$bS, - l = a * Math.cos(n - h); - r = l * _, o = l * s; - var $ = -this.p1.fx * _ * _, - u = -this.p1.fy * _ * s, - p = -this.p2.vx * this._$L2, - f = -this.p2.vy * this._$L2; - this.p2.fx = r + $ + p, this.p2.fy = o + u + f, this.p2.ax = this.p2.fx / this.p2._$p, this.p2.ay = this.p2.fy / this.p2._$p, this.p2.vx += this.p2.ax * i, this.p2.vy += this.p2.ay * i, this.p2.x += this.p2.vx * i, this.p2.y += this.p2.vy * i; - var c = Math.sqrt((this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y)); - this.p2.x = this.p1.x + this._$Fo * (this.p2.x - this.p1.x) / c, this.p2.y = this.p1.y + this._$Fo * (this.p2.y - this.p1.y) / c, this.p2.vx = (this.p2.x - this.p2._$s0) * e, this.p2.vy = (this.p2.y - this.p2._$70) * e, this.p2._$xT() - }, c.prototype._$xT = function () { - this._$s0 = this.x, this._$70 = this.y, this._$7L = this.vx, this._$HL = this.vy - }, d.prototype._$oP = function (t, i) {}, g.prototype = new d, g.prototype._$oP = function (t, i) { - var e = this.scale * t.getParamFloat(this._$wL), - r = i.getPhysicsPoint1(); - switch (this._$tL) { - default: - case f.Src.SRC_TO_X: - r.x = r.x + (e - r.x) * this._$V0; - break; - case f.Src.SRC_TO_Y: - r.y = r.y + (e - r.y) * this._$V0; - break; - case f.Src.SRC_TO_G_ANGLE: - var o = i._$qr();o += (e - o) * this._$V0, - i._$pr(o) - } - }, y.prototype._$YS = function (t, i) {}, T.prototype = new y, T.prototype._$YS = function (t, i) { - switch (this._$YP) { - default: - case f.Target.TARGET_FROM_ANGLE: - t.setParamFloat(this._$wL, this.scale * i._$5r(), this._$V0); - break; - case f.Target.TARGET_FROM_ANGLE_V: - t.setParamFloat(this._$wL, this.scale * i._$Cs(), this._$V0) - } - }, f.Src = function () {}, f.Src.SRC_TO_X = "SRC_TO_X", f.Src.SRC_TO_Y = "SRC_TO_Y", f.Src.SRC_TO_G_ANGLE = "SRC_TO_G_ANGLE", f.Target = function () {}, f.Target.TARGET_FROM_ANGLE = "TARGET_FROM_ANGLE", f.Target.TARGET_FROM_ANGLE_V = "TARGET_FROM_ANGLE_V", P.prototype.init = function (t) { - this._$fL = t._$fL, this._$gL = t._$gL, this._$B0 = t._$B0, this._$z0 = t._$z0, this._$qT = t._$qT, this.reflectX = t.reflectX, this.reflectY = t.reflectY - }, P.prototype._$F0 = function (t) { - this._$fL = t._$_T(), this._$gL = t._$_T(), this._$B0 = t._$_T(), this._$z0 = t._$_T(), this._$qT = t._$_T(), t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && (this.reflectX = t._$po(), this.reflectY = t._$po()) - }, P.prototype._$e = function () {}; - var It = function () {}; - It._$ni = function (t, i, e, r, o, n, s, _, a) { - var h = s * n - _ * o; - if (0 == h) return null; - var l, $ = ((t - e) * n - (i - r) * o) / h; - return l = 0 != o ? (t - e - $ * s) / o : (i - r - $ * _) / n, isNaN(l) && (l = (t - e - $ * s) / o, isNaN(l) && (l = (i - r - $ * _) / n), isNaN(l) && (console.log("a is NaN @UtVector#_$ni() "), console.log("v1x : " + o), console.log("v1x != 0 ? " + (0 != o)))), null == a ? new Array(l, $) : (a[0] = l, a[1] = $, a) - }, S.prototype._$8P = function () { - return this.x + .5 * this.width - }, S.prototype._$6P = function () { - return this.y + .5 * this.height - }, S.prototype._$EL = function () { - return this.x + this.width - }, S.prototype._$5T = function () { - return this.y + this.height - }, S.prototype._$jL = function (t, i, e, r) { - this.x = t, this.y = i, this.width = e, this.height = r - }, S.prototype._$jL = function (t) { - this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height - }, S.prototype.contains = function (t, i) { - return this.x <= this.x && this.y <= this.y && this.x <= this.x + this.width && this.y <= this.y + this.height - }, S.prototype.expand = function (t, i) { - this.x -= t, this.y -= i, this.width += 2 * t, this.height += 2 * i - }, v._$Z2 = function (t, i, e, r) { - var o = i._$Q2(t, e), - n = t._$vs(), - s = t._$Tr(); - if (i._$zr(n, s, o), o <= 0) return r[n[0]]; - if (1 == o) { - var _ = r[n[0]], - a = r[n[1]], - h = s[0]; - return _ + (a - _) * h | 0 - } - if (2 == o) { - var _ = r[n[0]], - a = r[n[1]], - l = r[n[2]], - $ = r[n[3]], - h = s[0], - u = s[1], - p = _ + (a - _) * h | 0, - f = l + ($ - l) * h | 0; - return p + (f - p) * u | 0 - } - if (3 == o) { - var c = r[n[0]], - d = r[n[1]], - g = r[n[2]], - y = r[n[3]], - m = r[n[4]], - T = r[n[5]], - P = r[n[6]], - S = r[n[7]], - h = s[0], - u = s[1], - v = s[2], - _ = c + (d - c) * h | 0, - a = g + (y - g) * h | 0, - l = m + (T - m) * h | 0, - $ = P + (S - P) * h | 0, - p = _ + (a - _) * u | 0, - f = l + ($ - l) * u | 0; - return p + (f - p) * v | 0 - } - if (4 == o) { - var L = r[n[0]], - M = r[n[1]], - E = r[n[2]], - A = r[n[3]], - I = r[n[4]], - w = r[n[5]], - x = r[n[6]], - O = r[n[7]], - D = r[n[8]], - R = r[n[9]], - b = r[n[10]], - F = r[n[11]], - C = r[n[12]], - N = r[n[13]], - B = r[n[14]], - U = r[n[15]], - h = s[0], - u = s[1], - v = s[2], - G = s[3], - c = L + (M - L) * h | 0, - d = E + (A - E) * h | 0, - g = I + (w - I) * h | 0, - y = x + (O - x) * h | 0, - m = D + (R - D) * h | 0, - T = b + (F - b) * h | 0, - P = C + (N - C) * h | 0, - S = B + (U - B) * h | 0, - _ = c + (d - c) * u | 0, - a = g + (y - g) * u | 0, - l = m + (T - m) * u | 0, - $ = P + (S - P) * u | 0, - p = _ + (a - _) * v | 0, - f = l + ($ - l) * v | 0; - return p + (f - p) * G | 0 - } - for (var Y = 1 << o, k = new Float32Array(Y), V = 0; V < Y; V++) { - for (var X = V, z = 1, H = 0; H < o; H++) z *= X % 2 == 0 ? 1 - s[H] : s[H], X /= 2; - k[V] = z - } - for (var W = new Float32Array(Y), j = 0; j < Y; j++) W[j] = r[n[j]]; - for (var q = 0, j = 0; j < Y; j++) q += k[j] * W[j]; - return q + .5 | 0 - }, v._$br = function (t, i, e, r) { - var o = i._$Q2(t, e), - n = t._$vs(), - s = t._$Tr(); - if (i._$zr(n, s, o), o <= 0) return r[n[0]]; - if (1 == o) { - var _ = r[n[0]], - a = r[n[1]], - h = s[0]; - return _ + (a - _) * h - } - if (2 == o) { - var _ = r[n[0]], - a = r[n[1]], - l = r[n[2]], - $ = r[n[3]], - h = s[0], - u = s[1]; - return (1 - u) * (_ + (a - _) * h) + u * (l + ($ - l) * h) - } - if (3 == o) { - var p = r[n[0]], - f = r[n[1]], - c = r[n[2]], - d = r[n[3]], - g = r[n[4]], - y = r[n[5]], - m = r[n[6]], - T = r[n[7]], - h = s[0], - u = s[1], - P = s[2]; - return (1 - P) * ((1 - u) * (p + (f - p) * h) + u * (c + (d - c) * h)) + P * ((1 - u) * (g + (y - g) * h) + u * (m + (T - m) * h)) - } - if (4 == o) { - var S = r[n[0]], - v = r[n[1]], - L = r[n[2]], - M = r[n[3]], - E = r[n[4]], - A = r[n[5]], - I = r[n[6]], - w = r[n[7]], - x = r[n[8]], - O = r[n[9]], - D = r[n[10]], - R = r[n[11]], - b = r[n[12]], - F = r[n[13]], - C = r[n[14]], - N = r[n[15]], - h = s[0], - u = s[1], - P = s[2], - B = s[3]; - return (1 - B) * ((1 - P) * ((1 - u) * (S + (v - S) * h) + u * (L + (M - L) * h)) + P * ((1 - u) * (E + (A - E) * h) + u * (I + (w - I) * h))) + B * ((1 - P) * ((1 - u) * (x + (O - x) * h) + u * (D + (R - D) * h)) + P * ((1 - u) * (b + (F - b) * h) + u * (C + (N - C) * h))) - } - for (var U = 1 << o, G = new Float32Array(U), Y = 0; Y < U; Y++) { - for (var k = Y, V = 1, X = 0; X < o; X++) V *= k % 2 == 0 ? 1 - s[X] : s[X], k /= 2; - G[Y] = V - } - for (var z = new Float32Array(U), H = 0; H < U; H++) z[H] = r[n[H]]; - for (var W = 0, H = 0; H < U; H++) W += G[H] * z[H]; - return W - }, v._$Vr = function (t, i, e, r, o, n, s, _) { - var a = i._$Q2(t, e), - h = t._$vs(), - l = t._$Tr(); - i._$zr(h, l, a); - var $ = 2 * r, - u = s; - if (a <= 0) { - var p = h[0], - f = o[p]; - if (2 == _ && 0 == s) w._$jT(f, 0, n, 0, $); - else - for (var c = 0; c < $;) n[u] = f[c++], n[u + 1] = f[c++], u += _ - } else if (1 == a) - for (var f = o[h[0]], d = o[h[1]], g = l[0], y = 1 - g, c = 0; c < $;) n[u] = f[c] * y + d[c] * g, ++c, n[u + 1] = f[c] * y + d[c] * g, ++c, u += _; - else if (2 == a) - for (var f = o[h[0]], d = o[h[1]], m = o[h[2]], T = o[h[3]], g = l[0], P = l[1], y = 1 - g, S = 1 - P, v = S * y, L = S * g, M = P * y, E = P * g, c = 0; c < $;) n[u] = v * f[c] + L * d[c] + M * m[c] + E * T[c], ++c, n[u + 1] = v * f[c] + L * d[c] + M * m[c] + E * T[c], ++c, u += _; - else if (3 == a) - for (var A = o[h[0]], I = o[h[1]], x = o[h[2]], O = o[h[3]], D = o[h[4]], R = o[h[5]], b = o[h[6]], F = o[h[7]], g = l[0], P = l[1], C = l[2], y = 1 - g, S = 1 - P, N = 1 - C, B = N * S * y, U = N * S * g, G = N * P * y, Y = N * P * g, k = C * S * y, V = C * S * g, X = C * P * y, z = C * P * g, c = 0; c < $;) n[u] = B * A[c] + U * I[c] + G * x[c] + Y * O[c] + k * D[c] + V * R[c] + X * b[c] + z * F[c], ++c, n[u + 1] = B * A[c] + U * I[c] + G * x[c] + Y * O[c] + k * D[c] + V * R[c] + X * b[c] + z * F[c], ++c, u += _; - else if (4 == a) - for (var H = o[h[0]], W = o[h[1]], j = o[h[2]], q = o[h[3]], J = o[h[4]], Q = o[h[5]], Z = o[h[6]], K = o[h[7]], tt = o[h[8]], it = o[h[9]], et = o[h[10]], rt = o[h[11]], ot = o[h[12]], nt = o[h[13]], st = o[h[14]], _t = o[h[15]], g = l[0], P = l[1], C = l[2], at = l[3], y = 1 - g, S = 1 - P, N = 1 - C, ht = 1 - at, lt = ht * N * S * y, $t = ht * N * S * g, ut = ht * N * P * y, pt = ht * N * P * g, ft = ht * C * S * y, ct = ht * C * S * g, dt = ht * C * P * y, gt = ht * C * P * g, yt = at * N * S * y, mt = at * N * S * g, Tt = at * N * P * y, Pt = at * N * P * g, St = at * C * S * y, vt = at * C * S * g, Lt = at * C * P * y, Mt = at * C * P * g, c = 0; c < $;) n[u] = lt * H[c] + $t * W[c] + ut * j[c] + pt * q[c] + ft * J[c] + ct * Q[c] + dt * Z[c] + gt * K[c] + yt * tt[c] + mt * it[c] + Tt * et[c] + Pt * rt[c] + St * ot[c] + vt * nt[c] + Lt * st[c] + Mt * _t[c], ++c, n[u + 1] = lt * H[c] + $t * W[c] + ut * j[c] + pt * q[c] + ft * J[c] + ct * Q[c] + dt * Z[c] + gt * K[c] + yt * tt[c] + mt * it[c] + Tt * et[c] + Pt * rt[c] + St * ot[c] + vt * nt[c] + Lt * st[c] + Mt * _t[c], ++c, u += _; - else { - for (var Et = 1 << a, At = new Float32Array(Et), It = 0; It < Et; It++) { - for (var wt = It, xt = 1, Ot = 0; Ot < a; Ot++) xt *= wt % 2 == 0 ? 1 - l[Ot] : l[Ot], wt /= 2; - At[It] = xt - } - for (var Dt = new Float32Array(Et), Rt = 0; Rt < Et; Rt++) Dt[Rt] = o[h[Rt]]; - for (var c = 0; c < $;) { - for (var bt = 0, Ft = 0, Ct = c + 1, Rt = 0; Rt < Et; Rt++) bt += At[Rt] * Dt[Rt][c], Ft += At[Rt] * Dt[Rt][Ct]; - c += 2, n[u] = bt, n[u + 1] = Ft, u += _ - } - } - }, L.prototype._$HT = function (t, i) { - this.x = t, this.y = i - }, L.prototype._$HT = function (t) { - this.x = t.x, this.y = t.y - }, M._$ur = -2, M._$ES = 500, M._$wb = 2, M._$8S = 3, M._$52 = M._$ES, M._$R2 = M._$ES, M._$or = function () { - return M._$52 - }, M._$Pr = function () { - return M._$R2 - }, M.prototype.convertClipIDForV2_11 = function (t) { - var i = []; - return null == t ? null : 0 == t.length ? null : /,/.test(t) ? i = t.id.split(",") : (i.push(t.id), i) - }, M.prototype._$F0 = function (t) { - this._$gP = t._$nP(), this._$dr = t._$nP(), this._$GS = t._$nP(), this._$qb = t._$6L(), this._$Lb = t._$cS(), this._$mS = t._$Tb(), t.getFormatVersion() >= G._$T7 ? (this.clipID = t._$nP(), this.clipIDList = this.convertClipIDForV2_11(this.clipID)) : this.clipIDList = [], this._$MS(this._$Lb) - }, M.prototype.getClipIDList = function () { - return this.clipIDList - }, M.prototype.init = function (t) {}, M.prototype._$Nr = function (t, i) { - if (i._$IS[0] = !1, i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb), at._$Zs); - else if (i._$IS[0]) return; - i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS) - }, M.prototype._$2b = function (t, i) {}, M.prototype.getDrawDataID = function () { - return this._$gP - }, M.prototype._$j2 = function (t) { - this._$gP = t - }, M.prototype.getOpacity = function (t, i) { - return i._$7s - }, M.prototype._$zS = function (t, i) { - return i._$Us - }, M.prototype._$MS = function (t) { - for (var i = t.length - 1; i >= 0; --i) { - var e = t[i]; - e < M._$52 ? M._$52 = e : e > M._$R2 && (M._$R2 = e) - } - }, M.prototype.getTargetBaseDataID = function () { - return this._$dr - }, M.prototype._$gs = function (t) { - this._$dr = t - }, M.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o() - }, M.prototype.preDraw = function (t, i, e) {}, M.prototype.draw = function (t, i, e) {}, M.prototype.getType = function () {}, M.prototype._$B2 = function (t, i, e) {}, E._$ps = 32, E.CLIPPING_PROCESS_NONE = 0, E.CLIPPING_PROCESS_OVERWRITE_ALPHA = 1, E.CLIPPING_PROCESS_MULTIPLY_ALPHA = 2, E.CLIPPING_PROCESS_DRAW = 3, E.CLIPPING_PROCESS_CLEAR_ALPHA = 4, E.prototype.setChannelFlagAsColor = function (t, i) { - this.CHANNEL_COLORS[t] = i - }, E.prototype.getChannelFlagAsColor = function (t) { - return this.CHANNEL_COLORS[t] - }, E.prototype._$ZT = function () {}, E.prototype._$Uo = function (t, i, e, r, o, n, s) {}, E.prototype._$Rs = function () { - return -1 - }, E.prototype._$Ds = function (t) {}, E.prototype.setBaseColor = function (t, i, e, r) { - t < 0 ? t = 0 : t > 1 && (t = 1), i < 0 ? i = 0 : i > 1 && (i = 1), e < 0 ? e = 0 : e > 1 && (e = 1), r < 0 ? r = 0 : r > 1 && (r = 1), this._$lT = t, this._$C0 = i, this._$tT = e, this._$WL = r - }, E.prototype._$WP = function (t) { - this.culling = t - }, E.prototype.setMatrix = function (t) { - for (var i = 0; i < 16; i++) this.matrix4x4[i] = t[i] - }, E.prototype._$IT = function () { - return this.matrix4x4 - }, E.prototype.setPremultipliedAlpha = function (t) { - this.premultipliedAlpha = t - }, E.prototype.isPremultipliedAlpha = function () { - return this.premultipliedAlpha - }, E.prototype.setAnisotropy = function (t) { - this.anisotropy = t - }, E.prototype.getAnisotropy = function () { - return this.anisotropy - }, E.prototype.getClippingProcess = function () { - return this.clippingProcess - }, E.prototype.setClippingProcess = function (t) { - this.clippingProcess = t - }, E.prototype.setClipBufPre_clipContextForMask = function (t) { - this.clipBufPre_clipContextMask = t - }, E.prototype.getClipBufPre_clipContextMask = function () { - return this.clipBufPre_clipContextMask - }, E.prototype.setClipBufPre_clipContextForDraw = function (t) { - this.clipBufPre_clipContextDraw = t - }, E.prototype.getClipBufPre_clipContextDraw = function () { - return this.clipBufPre_clipContextDraw - }, I._$ur = -2, I._$c2 = 1, I._$_b = 2, I.prototype._$F0 = function (t) { - this._$kP = t._$nP(), this._$dr = t._$nP() - }, I.prototype.readV2_opacity = function (t) { - t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && (this._$mS = t._$Tb()) - }, I.prototype.init = function (t) {}, I.prototype._$Nr = function (t, i) {}, I.prototype.interpolateOpacity = function (t, i, e, r) { - null == this._$mS ? e.setInterpolatedOpacity(1) : e.setInterpolatedOpacity(v._$br(t, i, r, this._$mS)) - }, I.prototype._$2b = function (t, i) {}, I.prototype._$nb = function (t, i, e, r, o, n, s) {}, I.prototype.getType = function () {}, I.prototype._$gs = function (t) { - this._$dr = t - }, I.prototype._$a2 = function (t) { - this._$kP = t - }, I.prototype.getTargetBaseDataID = function () { - return this._$dr - }, I.prototype.getBaseDataID = function () { - return this._$kP - }, I.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o() - }, w._$W2 = 0, w._$CS = w._$W2, w._$Mo = function () { - return !0 - }, w._$XP = function (t) { - try { - for (var i = getTimeMSec(); getTimeMSec() - i < t;); - } catch (t) { - t._$Rb() - } - }, w.getUserTimeMSec = function () { - return w._$CS == w._$W2 ? w.getSystemTimeMSec() : w._$CS - }, w.setUserTimeMSec = function (t) { - w._$CS = t - }, w.updateUserTimeMSec = function () { - return w._$CS = w.getSystemTimeMSec() - }, w.getTimeMSec = function () { - return (new Date).getTime() - }, w.getSystemTimeMSec = function () { - return (new Date).getTime() - }, w._$Q = function (t) {}, w._$jT = function (t, i, e, r, o) { - for (var n = 0; n < o; n++) e[r + n] = t[i + n] - }, x._$ds = -2, x.prototype._$F0 = function (t) { - this._$wL = t._$nP(), this._$VP = t._$6L(), this._$GP = t._$nP() - }, x.prototype.getParamIndex = function (t) { - return this._$2r != t && (this._$8o = x._$ds), this._$8o - }, x.prototype._$Pb = function (t, i) { - this._$8o = t, this._$2r = i - }, x.prototype.getParamID = function () { - return this._$wL - }, x.prototype._$yP = function (t) { - this._$wL = t - }, x.prototype._$N2 = function () { - return this._$VP - }, x.prototype._$d2 = function () { - return this._$GP - }, x.prototype._$t2 = function (t, i) { - this._$VP = t, this._$GP = i - }, x.prototype._$Lr = function () { - return this._$O2 - }, x.prototype._$wr = function (t) { - this._$O2 = t - }, x.prototype._$SL = function () { - return this._$ri - }, x.prototype._$AL = function (t) { - this._$ri = t - }, O.startsWith = function (t, i, e) { - var r = i + e.length; - if (r >= t.length) return !1; - for (var o = i; o < r; o++) - if (O.getChar(t, o) != e.charAt(o - i)) return !1; - return !0 - }, O.getChar = function (t, i) { - return String.fromCharCode(t.getUint8(i)) - }, O.createString = function (t, i, e) { - for (var r = new ArrayBuffer(2 * e), o = new Uint16Array(r), n = 0; n < e; n++) o[n] = t.getUint8(i + n); - return String.fromCharCode.apply(null, o) - }, O._$LS = function (t, i, e, r) { - t instanceof ArrayBuffer && (t = new DataView(t)); - var o = e, - n = !1, - s = !1, - _ = 0, - a = O.getChar(t, o); - "-" == a && (n = !0, o++); - for (var h = !1; o < i; o++) { - switch (a = O.getChar(t, o)) { - case "0": - _ *= 10; - break; - case "1": - _ = 10 * _ + 1; - break; - case "2": - _ = 10 * _ + 2; - break; - case "3": - _ = 10 * _ + 3; - break; - case "4": - _ = 10 * _ + 4; - break; - case "5": - _ = 10 * _ + 5; - break; - case "6": - _ = 10 * _ + 6; - break; - case "7": - _ = 10 * _ + 7; - break; - case "8": - _ = 10 * _ + 8; - break; - case "9": - _ = 10 * _ + 9; - break; - case ".": - s = !0, o++, h = !0; - break; - default: - h = !0 - } - if (h) break - } - if (s) - for (var l = .1, $ = !1; o < i; o++) { - switch (a = O.getChar(t, o)) { - case "0": - break; - case "1": - _ += 1 * l; - break; - case "2": - _ += 2 * l; - break; - case "3": - _ += 3 * l; - break; - case "4": - _ += 4 * l; - break; - case "5": - _ += 5 * l; - break; - case "6": - _ += 6 * l; - break; - case "7": - _ += 7 * l; - break; - case "8": - _ += 8 * l; - break; - case "9": - _ += 9 * l; - break; - default: - $ = !0 - } - if (l *= .1, $) break - } - return n && (_ = -_), r[0] = o, _ - }, D.prototype._$zP = function () { - this._$Ob = new Array - }, D.prototype._$F0 = function (t) { - this._$Ob = t._$nP() - }, D.prototype._$Ur = function (t) { - if (t._$WS()) return !0; - for (var i = t._$v2(), e = this._$Ob.length - 1; e >= 0; --e) { - var r = this._$Ob[e].getParamIndex(i); - if (r == x._$ds && (r = t.getParamIndex(this._$Ob[e].getParamID())), t._$Xb(r)) return !0 - } - return !1 - }, D.prototype._$Q2 = function (t, i) { - for (var e, r, o = this._$Ob.length, n = t._$v2(), s = 0, _ = 0; _ < o; _++) { - var a = this._$Ob[_]; - if (e = a.getParamIndex(n), e == x._$ds && (e = t.getParamIndex(a.getParamID()), a._$Pb(e, n)), e < 0) throw new Exception("err 23242 : " + a.getParamID()); - var h = e < 0 ? 0 : t.getParamFloat(e); - r = a._$N2(); - var l, $, u = a._$d2(), - p = -1, - f = 0; - if (r < 1); - else if (1 == r) l = u[0], l - U._$J < h && h < l + U._$J ? (p = 0, f = 0) : (p = 0, i[0] = !0); - else if (l = u[0], h < l - U._$J) p = 0, i[0] = !0; - else if (h < l + U._$J) p = 0; - else { - for (var c = !1, d = 1; d < r; ++d) { - if ($ = u[d], h < $ + U._$J) { - $ - U._$J < h ? p = d : (p = d - 1, f = (h - l) / ($ - l), s++), c = !0; - break - } - l = $ - } - c || (p = r - 1, f = 0, i[0] = !0) - } - a._$wr(p), a._$AL(f) - } - return s - }, D.prototype._$zr = function (t, i, e) { - var r = 1 << e; - r + 1 > U._$Qb && console.log("err 23245\n"); - for (var o = this._$Ob.length, n = 1, s = 1, _ = 0, a = 0; a < r; ++a) t[a] = 0; - for (var h = 0; h < o; ++h) { - var l = this._$Ob[h]; - if (0 == l._$SL()) { - var $ = l._$Lr() * n; - if ($ < 0 && at._$3T) throw new Exception("err 23246"); - for (var a = 0; a < r; ++a) t[a] += $ - } else { - for (var $ = n * l._$Lr(), u = n * (l._$Lr() + 1), a = 0; a < r; ++a) t[a] += (a / s | 0) % 2 == 0 ? $ : u; - i[_++] = l._$SL(), s *= 2 - } - n *= l._$N2() - } - t[r] = 65535, i[_] = -1 - }, D.prototype._$h2 = function (t, i, e) { - for (var r = new Float32Array(i), o = 0; o < i; ++o) r[o] = e[o]; - var n = new x; - n._$yP(t), n._$t2(i, r), this._$Ob.push(n) - }, D.prototype._$J2 = function (t) { - for (var i = t, e = this._$Ob.length, r = 0; r < e; ++r) { - var o = this._$Ob[r], - n = o._$N2(), - s = i % o._$N2(), - _ = o._$d2()[s]; - console.log("%s[%d]=%7.2f / ", o.getParamID(), s, _), i /= n - } - console.log("\n") - }, D.prototype.getParamCount = function () { - return this._$Ob.length - }, D.prototype._$zs = function () { - return this._$Ob - }, R.prototype.identity = function () { - for (var t = 0; t < 16; t++) this.m[t] = t % 5 == 0 ? 1 : 0 - }, R.prototype.getArray = function () { - return this.m - }, R.prototype.getCopyMatrix = function () { - return new Float32Array(this.m) - }, R.prototype.setMatrix = function (t) { - if (null != t && 16 == t.length) - for (var i = 0; i < 16; i++) this.m[i] = t[i] - }, R.prototype.mult = function (t, i, e) { - return null == i ? null : (this == i ? this.mult_safe(this.m, t.m, i.m, e) : this.mult_fast(this.m, t.m, i.m, e), i) - }, R.prototype.mult_safe = function (t, i, e, r) { - if (t == e) { - var o = new Array(16); - this.mult_fast(t, i, o, r); - for (var n = 15; n >= 0; --n) e[n] = o[n] - } else this.mult_fast(t, i, e, r) - }, R.prototype.mult_fast = function (t, i, e, r) { - r ? (e[0] = t[0] * i[0] + t[4] * i[1] + t[8] * i[2], e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6], e[8] = t[0] * i[8] + t[4] * i[9] + t[8] * i[10], e[12] = t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12], e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2], e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6], e[9] = t[1] * i[8] + t[5] * i[9] + t[9] * i[10], e[13] = t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13], e[2] = t[2] * i[0] + t[6] * i[1] + t[10] * i[2], e[6] = t[2] * i[4] + t[6] * i[5] + t[10] * i[6], e[10] = t[2] * i[8] + t[6] * i[9] + t[10] * i[10], e[14] = t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14], e[3] = e[7] = e[11] = 0, e[15] = 1) : (e[0] = t[0] * i[0] + t[4] * i[1] + t[8] * i[2] + t[12] * i[3], e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6] + t[12] * i[7], e[8] = t[0] * i[8] + t[4] * i[9] + t[8] * i[10] + t[12] * i[11], e[12] = t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12] * i[15], e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2] + t[13] * i[3], e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6] + t[13] * i[7], e[9] = t[1] * i[8] + t[5] * i[9] + t[9] * i[10] + t[13] * i[11], e[13] = t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13] * i[15], e[2] = t[2] * i[0] + t[6] * i[1] + t[10] * i[2] + t[14] * i[3], e[6] = t[2] * i[4] + t[6] * i[5] + t[10] * i[6] + t[14] * i[7], e[10] = t[2] * i[8] + t[6] * i[9] + t[10] * i[10] + t[14] * i[11], e[14] = t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14] * i[15], e[3] = t[3] * i[0] + t[7] * i[1] + t[11] * i[2] + t[15] * i[3], e[7] = t[3] * i[4] + t[7] * i[5] + t[11] * i[6] + t[15] * i[7], e[11] = t[3] * i[8] + t[7] * i[9] + t[11] * i[10] + t[15] * i[11], e[15] = t[3] * i[12] + t[7] * i[13] + t[11] * i[14] + t[15] * i[15]) - }, R.prototype.translate = function (t, i, e) { - this.m[12] = this.m[0] * t + this.m[4] * i + this.m[8] * e + this.m[12], this.m[13] = this.m[1] * t + this.m[5] * i + this.m[9] * e + this.m[13], this.m[14] = this.m[2] * t + this.m[6] * i + this.m[10] * e + this.m[14], this.m[15] = this.m[3] * t + this.m[7] * i + this.m[11] * e + this.m[15] - }, R.prototype.scale = function (t, i, e) { - this.m[0] *= t, this.m[4] *= i, this.m[8] *= e, this.m[1] *= t, this.m[5] *= i, this.m[9] *= e, this.m[2] *= t, this.m[6] *= i, this.m[10] *= e, this.m[3] *= t, this.m[7] *= i, this.m[11] *= e - }, R.prototype.rotateX = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[4]; - this.m[4] = r * i + this.m[8] * e, this.m[8] = r * -e + this.m[8] * i, r = this.m[5], this.m[5] = r * i + this.m[9] * e, this.m[9] = r * -e + this.m[9] * i, r = this.m[6], this.m[6] = r * i + this.m[10] * e, this.m[10] = r * -e + this.m[10] * i, r = this.m[7], this.m[7] = r * i + this.m[11] * e, this.m[11] = r * -e + this.m[11] * i - }, R.prototype.rotateY = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[0]; - this.m[0] = r * i + this.m[8] * -e, this.m[8] = r * e + this.m[8] * i, r = this.m[1], this.m[1] = r * i + this.m[9] * -e, this.m[9] = r * e + this.m[9] * i, r = m[2], this.m[2] = r * i + this.m[10] * -e, this.m[10] = r * e + this.m[10] * i, r = m[3], this.m[3] = r * i + this.m[11] * -e, this.m[11] = r * e + this.m[11] * i - }, R.prototype.rotateZ = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[0]; - this.m[0] = r * i + this.m[4] * e, this.m[4] = r * -e + this.m[4] * i, r = this.m[1], this.m[1] = r * i + this.m[5] * e, this.m[5] = r * -e + this.m[5] * i, r = this.m[2], this.m[2] = r * i + this.m[6] * e, this.m[6] = r * -e + this.m[6] * i, r = this.m[3], this.m[3] = r * i + this.m[7] * e, this.m[7] = r * -e + this.m[7] * i - }, b.prototype = new et, b._$tP = new Object, b._$27 = function () { - b._$tP.clear() - }, b.getID = function (t) { - var i = b._$tP[t]; - return null == i && (i = new b(t), b._$tP[t] = i), i - }, b.prototype._$3s = function () { - return new b - }, F._$kS = -1, F._$pS = 0, F._$hb = 1, F.STATE_IDENTITY = 0, F._$gb = 1, F._$fo = 2, F._$go = 4, F.prototype.transform = function (t, i, e) { - var r, o, n, s, _, a, h = 0, - l = 0; - switch (this._$hi) { - default: return; - case F._$go | F._$fo | F._$gb: - for (r = this._$7, o = this._$H, n = this._$k, s = this._$f, _ = this._$g, a = this._$w; --e >= 0;) { - var $ = t[h++], - u = t[h++]; - i[l++] = r * $ + o * u + n, i[l++] = s * $ + _ * u + a - } - return; - case F._$go | F._$fo: - for (r = this._$7, o = this._$H, s = this._$f, _ = this._$g; --e >= 0;) { - var $ = t[h++], - u = t[h++]; - i[l++] = r * $ + o * u, i[l++] = s * $ + _ * u - } - return; - case F._$go | F._$gb: - for (o = this._$H, n = this._$k, s = this._$f, a = this._$w; --e >= 0;) { - var $ = t[h++]; - i[l++] = o * t[h++] + n, i[l++] = s * $ + a - } - return; - case F._$go: - for (o = this._$H, s = this._$f; --e >= 0;) { - var $ = t[h++]; - i[l++] = o * t[h++], i[l++] = s * $ - } - return; - case F._$fo | F._$gb: - for (r = this._$7, n = this._$k, _ = this._$g, a = this._$w; --e >= 0;) i[l++] = r * t[h++] + n, i[l++] = _ * t[h++] + a; - return; - case F._$fo: - for (r = this._$7, _ = this._$g; --e >= 0;) i[l++] = r * t[h++], i[l++] = _ * t[h++]; - return; - case F._$gb: - for (n = this._$k, a = this._$w; --e >= 0;) i[l++] = t[h++] + n, i[l++] = t[h++] + a; - return; - case F.STATE_IDENTITY: - return void(t == i && h == l || w._$jT(t, h, i, l, 2 * e)) - } - }, F.prototype.update = function () { - 0 == this._$H && 0 == this._$f ? 1 == this._$7 && 1 == this._$g ? 0 == this._$k && 0 == this._$w ? (this._$hi = F.STATE_IDENTITY, this._$Z = F._$pS) : (this._$hi = F._$gb, this._$Z = F._$hb) : 0 == this._$k && 0 == this._$w ? (this._$hi = F._$fo, this._$Z = F._$kS) : (this._$hi = F._$fo | F._$gb, this._$Z = F._$kS) : 0 == this._$7 && 0 == this._$g ? 0 == this._$k && 0 == this._$w ? (this._$hi = F._$go, this._$Z = F._$kS) : (this._$hi = F._$go | F._$gb, this._$Z = F._$kS) : 0 == this._$k && 0 == this._$w ? (this._$hi = F._$go | F._$fo, this._$Z = F._$kS) : (this._$hi = F._$go | F._$fo | F._$gb, this._$Z = F._$kS) - }, F.prototype._$RT = function (t) { - this._$IT(t); - var i = t[0], - e = t[2], - r = t[1], - o = t[3], - n = Math.sqrt(i * i + r * r), - s = i * o - e * r; - 0 == n ? at._$so && console.log("affine._$RT() / rt==0") : (t[0] = n, t[1] = s / n, t[2] = (r * o + i * e) / s, t[3] = Math.atan2(r, i)) - }, F.prototype._$ho = function (t, i, e, r) { - var o = new Float32Array(6), - n = new Float32Array(6); - t._$RT(o), i._$RT(n); - var s = new Float32Array(6); - s[0] = o[0] + (n[0] - o[0]) * e, s[1] = o[1] + (n[1] - o[1]) * e, s[2] = o[2] + (n[2] - o[2]) * e, s[3] = o[3] + (n[3] - o[3]) * e, s[4] = o[4] + (n[4] - o[4]) * e, s[5] = o[5] + (n[5] - o[5]) * e, r._$CT(s) - }, F.prototype._$CT = function (t) { - var i = Math.cos(t[3]), - e = Math.sin(t[3]); - this._$7 = t[0] * i, this._$f = t[0] * e, this._$H = t[1] * (t[2] * i - e), this._$g = t[1] * (t[2] * e + i), this._$k = t[4], this._$w = t[5], this.update() - }, F.prototype._$IT = function (t) { - t[0] = this._$7, t[1] = this._$f, t[2] = this._$H, t[3] = this._$g, t[4] = this._$k, t[5] = this._$w - }, C.prototype = new s, C._$cs = "VISIBLE:", C._$ar = "LAYOUT:", C._$Co = 0, C._$D2 = [], C._$1T = 1, C.loadMotion = function (t) { - var i = new C, - e = [0], - r = t.length; - i._$yT = 0; - for (var o = 0; o < r; ++o) { - var n = 255 & t[o]; - if ("\n" != n && "\r" != n) - if ("#" != n) - if ("$" != n) { - if ("a" <= n && n <= "z" || "A" <= n && n <= "Z" || "_" == n) { - for (var s = o, _ = -1; o < r && ("\r" != (n = 255 & t[o]) && "\n" != n); ++o) - if ("=" == n) { - _ = o; - break - } - if (_ >= 0) { - var a = new B; - O.startsWith(t, s, C._$cs) ? (a._$RP = B._$hs, a._$4P = new String(t, s, _ - s)) : O.startsWith(t, s, C._$ar) ? (a._$4P = new String(t, s + 7, _ - s - 7), O.startsWith(t, s + 7, "ANCHOR_X") ? a._$RP = B._$xs : O.startsWith(t, s + 7, "ANCHOR_Y") ? a._$RP = B._$us : O.startsWith(t, s + 7, "SCALE_X") ? a._$RP = B._$qs : O.startsWith(t, s + 7, "SCALE_Y") ? a._$RP = B._$Ys : O.startsWith(t, s + 7, "X") ? a._$RP = B._$ws : O.startsWith(t, s + 7, "Y") && (a._$RP = B._$Ns)) : (a._$RP = B._$Fr, a._$4P = new String(t, s, _ - s)), i.motions.push(a); - var h = 0; - for (C._$D2.clear(), o = _ + 1; o < r && ("\r" != (n = 255 & t[o]) && "\n" != n); ++o) - if ("," != n && " " != n && "\t" != n) { - var l = O._$LS(t, r, o, e); - if (e[0] > 0) { - C._$D2.push(l), h++; - var $ = e[0]; - if ($ < o) { - console.log("_$n0 _$hi . @Live2DMotion loadMotion()\n"); - break - } - o = $ - } - } - a._$I0 = C._$D2._$BL(), h > i._$yT && (i._$yT = h) - } - } - } else { - for (var s = o, _ = -1; o < r && ("\r" != (n = 255 & t[o]) && "\n" != n); ++o) - if ("=" == n) { - _ = o; - break - } - var u = !1; - if (_ >= 0) - for (_ == s + 4 && "f" == t[s + 1] && "p" == t[s + 2] && "s" == t[s + 3] && (u = !0), o = _ + 1; o < r && ("\r" != (n = 255 & t[o]) && "\n" != n); ++o) - if ("," != n && " " != n && "\t" != n) { - var l = O._$LS(t, r, o, e); - e[0] > 0 && u && 5 < l && l < 121 && (i._$D0 = l), o = e[0] - } - for (; o < r && ("\n" != t[o] && "\r" != t[o]); ++o); - } - else - for (; o < r && ("\n" != t[o] && "\r" != t[o]); ++o); - } - return i._$AS = 1e3 * i._$yT / i._$D0 | 0, i - }, C.prototype.getDurationMSec = function () { - return this._$AS - }, C.prototype.dump = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); - for (var e = 0; e < i._$I0.length && e < 10; e++) console.log("%5.2f ,", i._$I0[e]); - console.log("\n") - } - }, C.prototype.updateParamExe = function (t, i, e, r) { - for (var o = i - r._$z2, n = o * this._$D0 / 1e3, s = 0 | n, _ = n - s, a = 0; a < this.motions.length; a++) { - var h = this.motions[a], - l = h._$I0.length, - $ = h._$4P; - if (h._$RP == B._$hs) { - var u = h._$I0[s >= l ? l - 1 : s]; - t.setParamFloat($, u) - } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); - else { - var p = t.getParamFloat($), - f = h._$I0[s >= l ? l - 1 : s], - c = h._$I0[s + 1 >= l ? l - 1 : s + 1], - d = f + (c - f) * _, - g = p + (d - p) * e; - t.setParamFloat($, g) - } - } - s >= this._$yT && (this._$E ? (r._$z2 = i, this.loopFadeIn && (r._$bs = i)) : r._$9L = !0) - }, C.prototype._$r0 = function () { - return this._$E - }, C.prototype._$aL = function (t) { - this._$E = t - }, C.prototype.isLoopFadeIn = function () { - return this.loopFadeIn - }, C.prototype.setLoopFadeIn = function (t) { - this.loopFadeIn = t - }, N.prototype.clear = function () { - this.size = 0 - }, N.prototype.add = function (t) { - if (this._$P.length <= this.size) { - var i = new Float32Array(2 * this.size); - w._$jT(this._$P, 0, i, 0, this.size), this._$P = i - } - this._$P[this.size++] = t - }, N.prototype._$BL = function () { - var t = new Float32Array(this.size); - return w._$jT(this._$P, 0, t, 0, this.size), t - }, B._$Fr = 0, B._$hs = 1, B._$ws = 100, B._$Ns = 101, B._$xs = 102, B._$us = 103, B._$qs = 104, B._$Ys = 105, U._$Ms = 1, U._$Qs = 2, U._$i2 = 0, U._$No = 2, U._$do = U._$Ms, U._$Ls = !0, U._$1r = 5, U._$Qb = 65, U._$J = 1e-4, U._$FT = .001, U._$Ss = 3, G._$o7 = 6, G._$S7 = 7, G._$s7 = 8, G._$77 = 9, G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 = 10, G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1 = 11, G._$T7 = G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1, G._$Is = -2004318072, G._$h0 = 0, G._$4L = 23, G._$7P = 33, G._$uT = function (t) { - console.log("_$bo :: _$6 _$mo _$E0 : %d\n", t) - }, G._$9o = function (t) { - if (t < 40) return G._$uT(t), null; - if (t < 50) return G._$uT(t), null; - if (t < 60) return G._$uT(t), null; - if (t < 100) switch (t) { - case 65: - return new Z; - case 66: - return new D; - case 67: - return new x; - case 68: - return new z; - case 69: - return new P; - case 70: - return new $t; - default: - return G._$uT(t), null - } else if (t < 150) switch (t) { - case 131: - return new st; - case 133: - return new tt; - case 136: - return new p; - case 137: - return new ot; - case 142: - return new j - } - return G._$uT(t), null - }, Y._$HP = 0, Y._$_0 = !0; - Y._$V2 = -1, Y._$W0 = -1, Y._$jr = !1, Y._$ZS = !0, Y._$tr = -1e6, Y._$lr = 1e6, Y._$is = 32, Y._$e = !1, Y.prototype.getDrawDataIndex = function (t) { - for (var i = this._$aS.length - 1; i >= 0; --i) - if (null != this._$aS[i] && this._$aS[i].getDrawDataID() == t) return i; - return -1 - }, Y.prototype.getDrawData = function (t) { - if (t instanceof b) { - if (null == this._$Bo) { - this._$Bo = new Object; - for (var i = this._$aS.length, e = 0; e < i; e++) { - var r = this._$aS[e], - o = r.getDrawDataID(); - null != o && (this._$Bo[o] = r) - } - } - return this._$Bo[id] - } - return t < this._$aS.length ? this._$aS[t] : null - }, Y.prototype.release = function () { - this._$3S.clear(), this._$aS.clear(), this._$F2.clear(), null != this._$Bo && this._$Bo.clear(), this._$db.clear(), this._$8b.clear(), this._$Hr.clear() - }, Y.prototype.init = function () { - this._$co++, this._$F2.length > 0 && this.release(); - for (var t = this._$Ri.getModelImpl(), i = t._$Xr(), r = i.length, o = new Array, n = new Array, s = 0; s < r; ++s) { - var _ = i[s]; - this._$F2.push(_), this._$Hr.push(_.init(this)); - for (var a = _.getBaseData(), h = a.length, l = 0; l < h; ++l) o.push(a[l]); - for (var l = 0; l < h; ++l) { - var $ = a[l].init(this); - $._$l2(s), n.push($) - } - for (var u = _.getDrawData(), p = u.length, l = 0; l < p; ++l) { - var f = u[l], - c = f.init(this); - c._$IP = s, this._$aS.push(f), this._$8b.push(c) - } - } - for (var d = o.length, g = yt._$2o();;) { - for (var y = !1, s = 0; s < d; ++s) { - var m = o[s]; - if (null != m) { - var T = m.getTargetBaseDataID(); - (null == T || T == g || this.getBaseDataIndex(T) >= 0) && (this._$3S.push(m), this._$db.push(n[s]), o[s] = null, y = !0) - } - } - if (!y) break - } - var P = t._$E2(); - if (null != P) { - var S = P._$1s(); - if (null != S) - for (var v = S.length, s = 0; s < v; ++s) { - var L = S[s]; - null != L && this._$02(L.getParamID(), L.getDefaultValue(), L.getMinValue(), L.getMaxValue()) - } - } - this.clipManager = new e(this.dp_webgl), this.clipManager.init(this, this._$aS, this._$8b), this._$QT = !0 - }, Y.prototype.update = function () { - Y._$e && _.start("_$zL"); - for (var t = this._$_2.length, i = 0; i < t; i++) this._$_2[i] != this._$vr[i] && (this._$Js[i] = Y._$ZS, this._$vr[i] = this._$_2[i]); - var e = this._$3S.length, - r = this._$aS.length, - o = W._$or(), - n = W._$Pr(), - s = n - o + 1; - (null == this._$Ws || this._$Ws.length < s) && (this._$Ws = new Int16Array(s), this._$Vs = new Int16Array(s)); - for (var i = 0; i < s; i++) this._$Ws[i] = Y._$V2, this._$Vs[i] = Y._$V2; - (null == this._$Er || this._$Er.length < r) && (this._$Er = new Int16Array(r)); - for (var i = 0; i < r; i++) this._$Er[i] = Y._$W0; - Y._$e && _.dump("_$zL"), Y._$e && _.start("_$UL"); - for (var a = null, h = 0; h < e; ++h) { - var l = this._$3S[h], - $ = this._$db[h]; - try { - l._$Nr(this, $), l._$2b(this, $) - } catch (t) { - null == a && (a = t) - } - } - null != a && Y._$_0 && _._$Rb(a), Y._$e && _.dump("_$UL"), Y._$e && _.start("_$DL"); - for (var u = null, p = 0; p < r; ++p) { - var f = this._$aS[p], - c = this._$8b[p]; - try { - if (f._$Nr(this, c), c._$u2()) continue; - f._$2b(this, c); - var d, g = Math.floor(f._$zS(this, c) - o); - try { - d = this._$Vs[g] - } catch (t) { - console.log("_$li :: %s / %s \t\t\t\t@@_$fS\n", t.toString(), f.getDrawDataID().toString()), g = Math.floor(f._$zS(this, c) - o); - continue - } - d == Y._$V2 ? this._$Ws[g] = p : this._$Er[d] = p, this._$Vs[g] = p - } catch (t) { - null == u && (u = t, at._$sT(at._$H7)) - } - } - null != u && Y._$_0 && _._$Rb(u), Y._$e && _.dump("_$DL"), Y._$e && _.start("_$eL"); - for (var i = this._$Js.length - 1; i >= 0; i--) this._$Js[i] = Y._$jr; - return this._$QT = !1, Y._$e && _.dump("_$eL"), !1 - }, Y.prototype.preDraw = function (t) { - null != this.clipManager && (t._$ZT(), this.clipManager.setupClip(this, t)) - }, Y.prototype.draw = function (t) { - if (null == this._$Ws) return void _._$li("call _$Ri.update() before _$Ri.draw() "); - var i = this._$Ws.length; - t._$ZT(); - for (var e = 0; e < i; ++e) { - var r = this._$Ws[e]; - if (r != Y._$V2) - for (;;) { - var o = this._$aS[r], - n = this._$8b[r]; - if (n._$yo()) { - var s = n._$IP, - a = this._$Hr[s]; - n._$VS = a.getPartsOpacity(), o.draw(t, this, n) - } - var h = this._$Er[r]; - if (h <= r || h == Y._$W0) break; - r = h - } - } - }, Y.prototype.getParamIndex = function (t) { - for (var i = this._$pb.length - 1; i >= 0; --i) - if (this._$pb[i] == t) return i; - return this._$02(t, 0, Y._$tr, Y._$lr) - }, Y.prototype._$BS = function (t) { - return this.getBaseDataIndex(t) - }, Y.prototype.getBaseDataIndex = function (t) { - for (var i = this._$3S.length - 1; i >= 0; --i) - if (null != this._$3S[i] && this._$3S[i].getBaseDataID() == t) return i; - return -1 - }, Y.prototype._$UT = function (t, i) { - var e = new Float32Array(i); - return w._$jT(t, 0, e, 0, t.length), e - }, Y.prototype._$02 = function (t, i, e, r) { - if (this._$qo >= this._$pb.length) { - var o = this._$pb.length, - n = new Array(2 * o); - w._$jT(this._$pb, 0, n, 0, o), this._$pb = n, this._$_2 = this._$UT(this._$_2, 2 * o), this._$vr = this._$UT(this._$vr, 2 * o), this._$Rr = this._$UT(this._$Rr, 2 * o), this._$Or = this._$UT(this._$Or, 2 * o); - var s = new Array; - w._$jT(this._$Js, 0, s, 0, o), this._$Js = s - } - return this._$pb[this._$qo] = t, this._$_2[this._$qo] = i, this._$vr[this._$qo] = i, this._$Rr[this._$qo] = e, this._$Or[this._$qo] = r, this._$Js[this._$qo] = Y._$ZS, this._$qo++ - }, Y.prototype._$Zo = function (t, i) { - this._$3S[t] = i - }, Y.prototype.setParamFloat = function (t, i) { - i < this._$Rr[t] && (i = this._$Rr[t]), i > this._$Or[t] && (i = this._$Or[t]), this._$_2[t] = i - }, Y.prototype.loadParam = function () { - var t = this._$_2.length; - t > this._$fs.length && (t = this._$fs.length), w._$jT(this._$fs, 0, this._$_2, 0, t) - }, Y.prototype.saveParam = function () { - var t = this._$_2.length; - t > this._$fs.length && (this._$fs = new Float32Array(t)), w._$jT(this._$_2, 0, this._$fs, 0, t) - }, Y.prototype._$v2 = function () { - return this._$co - }, Y.prototype._$WS = function () { - return this._$QT - }, Y.prototype._$Xb = function (t) { - return this._$Js[t] == Y._$ZS - }, Y.prototype._$vs = function () { - return this._$Es - }, Y.prototype._$Tr = function () { - return this._$ZP - }, Y.prototype.getBaseData = function (t) { - return this._$3S[t] - }, Y.prototype.getParamFloat = function (t) { - return this._$_2[t] - }, Y.prototype.getParamMax = function (t) { - return this._$Or[t] - }, Y.prototype.getParamMin = function (t) { - return this._$Rr[t] - }, Y.prototype.setPartsOpacity = function (t, i) { - this._$Hr[t].setPartsOpacity(i) - }, Y.prototype.getPartsOpacity = function (t) { - return this._$Hr[t].getPartsOpacity() - }, Y.prototype.getPartsDataIndex = function (t) { - for (var i = this._$F2.length - 1; i >= 0; --i) - if (null != this._$F2[i] && this._$F2[i]._$p2() == t) return i; - return -1 - }, Y.prototype._$q2 = function (t) { - return this._$db[t] - }, Y.prototype._$C2 = function (t) { - return this._$8b[t] - }, Y.prototype._$Bb = function (t) { - return this._$Hr[t] - }, Y.prototype._$5s = function (t, i) { - for (var e = this._$Ws.length, r = t, o = 0; o < e; ++o) { - var n = this._$Ws[o]; - if (n != Y._$V2) - for (;;) { - var s = this._$8b[n]; - s._$yo() && (s._$GT()._$B2(this, s, r), r += i); - var _ = this._$Er[n]; - if (_ <= n || _ == Y._$W0) break; - n = _ - } - } - }, Y.prototype.setDrawParam = function (t) { - this.dp_webgl = t - }, Y.prototype.getDrawParam = function () { - return this.dp_webgl - }, k._$0T = function (t) { - return k._$0T(new _$5(t)) - }, k._$0T = function (t) { - if (!t.exists()) throw new _$ls(t._$3b()); - for (var i, e = t.length(), r = new Int8Array(e), o = new _$Xs(new _$kb(t), 8192), n = 0; - (i = o.read(r, n, e - n)) > 0;) n += i; - return r - }, k._$C = function (t) { - var i = null, - e = null; - try { - i = t instanceof Array ? t : new _$Xs(t, 8192), e = new _$js; - for (var r, o = new Int8Array(1e3); - (r = i.read(o)) > 0;) e.write(o, 0, r); - return e._$TS() - } finally { - null != t && t.close(), null != e && (e.flush(), e.close()) - } - }, V.prototype._$T2 = function () { - return w.getUserTimeMSec() + Math._$10() * (2 * this._$Br - 1) - }, V.prototype._$uo = function (t) { - this._$Br = t - }, V.prototype._$QS = function (t, i, e) { - this._$Dr = t, this._$Cb = i, this._$mr = e - }, V.prototype._$7T = function (t) { - var i, e = w.getUserTimeMSec(), - r = 0; - switch (this._$_L) { - case STATE_CLOSING: - r = (e - this._$bb) / this._$Dr, r >= 1 && (r = 1, this._$_L = wt.STATE_CLOSED, this._$bb = e), i = 1 - r; - break; - case STATE_CLOSED: - r = (e - this._$bb) / this._$Cb, r >= 1 && (this._$_L = wt.STATE_OPENING, this._$bb = e), i = 0; - break; - case STATE_OPENING: - r = (e - this._$bb) / this._$mr, r >= 1 && (r = 1, this._$_L = wt.STATE_INTERVAL, this._$12 = this._$T2()), i = r; - break; - case STATE_INTERVAL: - this._$12 < e && (this._$_L = wt.STATE_CLOSING, this._$bb = e), i = 1; - break; - case STATE_FIRST: - default: - this._$_L = wt.STATE_INTERVAL, this._$12 = this._$T2(), i = 1 - } - this._$jo || (i = -i), t.setParamFloat(this._$iL, i), t.setParamFloat(this._$0L, i) - }; - var wt = function () {}; - wt.STATE_FIRST = "STATE_FIRST", wt.STATE_INTERVAL = "STATE_INTERVAL", wt.STATE_CLOSING = "STATE_CLOSING", wt.STATE_CLOSED = "STATE_CLOSED", wt.STATE_OPENING = "STATE_OPENING", X.prototype = new E, X._$As = 32, X._$Gr = !1, X._$NT = null, X._$vS = null, X._$no = null, X._$9r = function (t) { - return new Float32Array(t) - }, X._$vb = function (t) { - return new Int16Array(t) - }, X._$cr = function (t, i) { - return null == t || t._$yL() < i.length ? (t = X._$9r(2 * i.length), t.put(i), t._$oT(0)) : (t.clear(), t.put(i), t._$oT(0)), t - }, X._$mb = function (t, i) { - return null == t || t._$yL() < i.length ? (t = X._$vb(2 * i.length), t.put(i), t._$oT(0)) : (t.clear(), t.put(i), t._$oT(0)), t - }, X._$Hs = function () { - return X._$Gr - }, X._$as = function (t) { - X._$Gr = t - }, X.prototype.setGL = function (t) { - this.gl = t - }, X.prototype.setTransform = function (t) { - this.transform = t - }, X.prototype._$ZT = function () {}, X.prototype._$Uo = function (t, i, e, r, o, n, s, _) { - if (!(n < .01)) { - var a = this._$U2[t], - h = n > .9 ? at.EXPAND_W : 0; - this.gl.drawElements(a, e, r, o, n, h, this.transform, _) - } - }, X.prototype._$Rs = function () { - throw new Error("_$Rs") - }, X.prototype._$Ds = function (t) { - throw new Error("_$Ds") - }, X.prototype._$K2 = function () { - for (var t = 0; t < this._$sb.length; t++) { - 0 != this._$sb[t] && (this.gl._$Sr(1, this._$sb, t), this._$sb[t] = 0) - } - }, X.prototype.setTexture = function (t, i) { - this._$sb.length < t + 1 && this._$nS(t), this._$sb[t] = i - }, X.prototype.setTexture = function (t, i) { - this._$sb.length < t + 1 && this._$nS(t), this._$U2[t] = i - }, X.prototype._$nS = function (t) { - var i = Math.max(2 * this._$sb.length, t + 1 + 10), - e = new Int32Array(i); - w._$jT(this._$sb, 0, e, 0, this._$sb.length), this._$sb = e; - var r = new Array; - w._$jT(this._$U2, 0, r, 0, this._$U2.length), this._$U2 = r - }, z.prototype = new I, z._$Xo = new Float32Array(2), z._$io = new Float32Array(2), z._$0o = new Float32Array(2), z._$Lo = new Float32Array(2), z._$To = new Float32Array(2), z._$Po = new Float32Array(2), z._$gT = new Array, z.prototype._$zP = function () { - this._$GS = new D, this._$GS._$zP(), this._$Y0 = new Array - }, z.prototype.getType = function () { - return I._$c2 - }, z.prototype._$F0 = function (t) { - I.prototype._$F0.call(this, t), this._$GS = t._$nP(), this._$Y0 = t._$nP(), I.prototype.readV2_opacity.call(this, t) - }, z.prototype.init = function (t) { - var i = new H(this); - return i._$Yr = new P, this._$32() && (i._$Wr = new P), i - }, z.prototype._$Nr = function (t, i) { - this != i._$GT() && console.log("### assert!! ### "); - var e = i; - if (this._$GS._$Ur(t)) { - var r = z._$gT; - r[0] = !1; - var o = this._$GS._$Q2(t, r); - i._$Ib(r[0]), this.interpolateOpacity(t, this._$GS, i, r); - var n = t._$vs(), - s = t._$Tr(); - if (this._$GS._$zr(n, s, o), o <= 0) { - var _ = this._$Y0[n[0]]; - e._$Yr.init(_) - } else if (1 == o) { - var _ = this._$Y0[n[0]], - a = this._$Y0[n[1]], - h = s[0]; - e._$Yr._$fL = _._$fL + (a._$fL - _._$fL) * h, e._$Yr._$gL = _._$gL + (a._$gL - _._$gL) * h, e._$Yr._$B0 = _._$B0 + (a._$B0 - _._$B0) * h, e._$Yr._$z0 = _._$z0 + (a._$z0 - _._$z0) * h, e._$Yr._$qT = _._$qT + (a._$qT - _._$qT) * h - } else if (2 == o) { - var _ = this._$Y0[n[0]], - a = this._$Y0[n[1]], - l = this._$Y0[n[2]], - $ = this._$Y0[n[3]], - h = s[0], - u = s[1], - p = _._$fL + (a._$fL - _._$fL) * h, - f = l._$fL + ($._$fL - l._$fL) * h; - e._$Yr._$fL = p + (f - p) * u, p = _._$gL + (a._$gL - _._$gL) * h, f = l._$gL + ($._$gL - l._$gL) * h, e._$Yr._$gL = p + (f - p) * u, p = _._$B0 + (a._$B0 - _._$B0) * h, f = l._$B0 + ($._$B0 - l._$B0) * h, e._$Yr._$B0 = p + (f - p) * u, p = _._$z0 + (a._$z0 - _._$z0) * h, f = l._$z0 + ($._$z0 - l._$z0) * h, e._$Yr._$z0 = p + (f - p) * u, p = _._$qT + (a._$qT - _._$qT) * h, f = l._$qT + ($._$qT - l._$qT) * h, e._$Yr._$qT = p + (f - p) * u - } else if (3 == o) { - var c = this._$Y0[n[0]], - d = this._$Y0[n[1]], - g = this._$Y0[n[2]], - y = this._$Y0[n[3]], - m = this._$Y0[n[4]], - T = this._$Y0[n[5]], - P = this._$Y0[n[6]], - S = this._$Y0[n[7]], - h = s[0], - u = s[1], - v = s[2], - p = c._$fL + (d._$fL - c._$fL) * h, - f = g._$fL + (y._$fL - g._$fL) * h, - L = m._$fL + (T._$fL - m._$fL) * h, - M = P._$fL + (S._$fL - P._$fL) * h; - e._$Yr._$fL = (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u), p = c._$gL + (d._$gL - c._$gL) * h, f = g._$gL + (y._$gL - g._$gL) * h, L = m._$gL + (T._$gL - m._$gL) * h, M = P._$gL + (S._$gL - P._$gL) * h, e._$Yr._$gL = (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u), p = c._$B0 + (d._$B0 - c._$B0) * h, f = g._$B0 + (y._$B0 - g._$B0) * h, L = m._$B0 + (T._$B0 - m._$B0) * h, M = P._$B0 + (S._$B0 - P._$B0) * h, e._$Yr._$B0 = (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u), p = c._$z0 + (d._$z0 - c._$z0) * h, f = g._$z0 + (y._$z0 - g._$z0) * h, L = m._$z0 + (T._$z0 - m._$z0) * h, M = P._$z0 + (S._$z0 - P._$z0) * h, e._$Yr._$z0 = (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u), p = c._$qT + (d._$qT - c._$qT) * h, f = g._$qT + (y._$qT - g._$qT) * h, L = m._$qT + (T._$qT - m._$qT) * h, M = P._$qT + (S._$qT - P._$qT) * h, e._$Yr._$qT = (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u) - } else if (4 == o) { - var E = this._$Y0[n[0]], - A = this._$Y0[n[1]], - I = this._$Y0[n[2]], - w = this._$Y0[n[3]], - x = this._$Y0[n[4]], - O = this._$Y0[n[5]], - D = this._$Y0[n[6]], - R = this._$Y0[n[7]], - b = this._$Y0[n[8]], - F = this._$Y0[n[9]], - C = this._$Y0[n[10]], - N = this._$Y0[n[11]], - B = this._$Y0[n[12]], - U = this._$Y0[n[13]], - G = this._$Y0[n[14]], - Y = this._$Y0[n[15]], - h = s[0], - u = s[1], - v = s[2], - k = s[3], - p = E._$fL + (A._$fL - E._$fL) * h, - f = I._$fL + (w._$fL - I._$fL) * h, - L = x._$fL + (O._$fL - x._$fL) * h, - M = D._$fL + (R._$fL - D._$fL) * h, - V = b._$fL + (F._$fL - b._$fL) * h, - X = C._$fL + (N._$fL - C._$fL) * h, - H = B._$fL + (U._$fL - B._$fL) * h, - W = G._$fL + (Y._$fL - G._$fL) * h; - e._$Yr._$fL = (1 - k) * ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u)), p = E._$gL + (A._$gL - E._$gL) * h, f = I._$gL + (w._$gL - I._$gL) * h, L = x._$gL + (O._$gL - x._$gL) * h, M = D._$gL + (R._$gL - D._$gL) * h, V = b._$gL + (F._$gL - b._$gL) * h, X = C._$gL + (N._$gL - C._$gL) * h, H = B._$gL + (U._$gL - B._$gL) * h, W = G._$gL + (Y._$gL - G._$gL) * h, e._$Yr._$gL = (1 - k) * ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u)), p = E._$B0 + (A._$B0 - E._$B0) * h, f = I._$B0 + (w._$B0 - I._$B0) * h, L = x._$B0 + (O._$B0 - x._$B0) * h, M = D._$B0 + (R._$B0 - D._$B0) * h, V = b._$B0 + (F._$B0 - b._$B0) * h, X = C._$B0 + (N._$B0 - C._$B0) * h, H = B._$B0 + (U._$B0 - B._$B0) * h, W = G._$B0 + (Y._$B0 - G._$B0) * h, e._$Yr._$B0 = (1 - k) * ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u)), p = E._$z0 + (A._$z0 - E._$z0) * h, f = I._$z0 + (w._$z0 - I._$z0) * h, L = x._$z0 + (O._$z0 - x._$z0) * h, M = D._$z0 + (R._$z0 - D._$z0) * h, V = b._$z0 + (F._$z0 - b._$z0) * h, X = C._$z0 + (N._$z0 - C._$z0) * h, H = B._$z0 + (U._$z0 - B._$z0) * h, W = G._$z0 + (Y._$z0 - G._$z0) * h, e._$Yr._$z0 = (1 - k) * ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u)), p = E._$qT + (A._$qT - E._$qT) * h, f = I._$qT + (w._$qT - I._$qT) * h, L = x._$qT + (O._$qT - x._$qT) * h, M = D._$qT + (R._$qT - D._$qT) * h, V = b._$qT + (F._$qT - b._$qT) * h, X = C._$qT + (N._$qT - C._$qT) * h, H = B._$qT + (U._$qT - B._$qT) * h, W = G._$qT + (Y._$qT - G._$qT) * h, e._$Yr._$qT = (1 - k) * ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u)) - } else { - for (var j = 0 | Math.pow(2, o), q = new Float32Array(j), J = 0; J < j; J++) { - for (var Q = J, Z = 1, K = 0; K < o; K++) Z *= Q % 2 == 0 ? 1 - s[K] : s[K], Q /= 2; - q[J] = Z - } - for (var tt = new Array, it = 0; it < j; it++) tt[it] = this._$Y0[n[it]]; - for (var et = 0, rt = 0, ot = 0, nt = 0, st = 0, it = 0; it < j; it++) et += q[it] * tt[it]._$fL, rt += q[it] * tt[it]._$gL, ot += q[it] * tt[it]._$B0, nt += q[it] * tt[it]._$z0, st += q[it] * tt[it]._$qT; - e._$Yr._$fL = et, e._$Yr._$gL = rt, e._$Yr._$B0 = ot, e._$Yr._$z0 = nt, e._$Yr._$qT = st - } - var _ = this._$Y0[n[0]]; - e._$Yr.reflectX = _.reflectX, e._$Yr.reflectY = _.reflectY - } - }, z.prototype._$2b = function (t, i) { - this != i._$GT() && console.log("### assert!! ### "); - var e = i; - if (e._$hS(!0), this._$32()) { - var r = this.getTargetBaseDataID(); - if (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), e._$8r < 0) at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); - else { - var o = t.getBaseData(e._$8r); - if (null != o) { - var n = t._$q2(e._$8r), - s = z._$Xo; - s[0] = e._$Yr._$fL, s[1] = e._$Yr._$gL; - var a = z._$io; - a[0] = 0, a[1] = -.1; - n._$GT().getType() == I._$c2 ? a[1] = -10 : a[1] = -.1; - var h = z._$0o; - this._$Jr(t, o, n, s, a, h); - var l = Lt._$92(a, h); - o._$nb(t, n, s, s, 1, 0, 2), e._$Wr._$fL = s[0], e._$Wr._$gL = s[1], e._$Wr._$B0 = e._$Yr._$B0, e._$Wr._$z0 = e._$Yr._$z0, e._$Wr._$qT = e._$Yr._$qT - l * Lt._$NS; - var $ = n.getTotalScale(); - e.setTotalScale_notForClient($ * e._$Wr._$B0); - var u = n.getTotalOpacity(); - e.setTotalOpacity(u * e.getInterpolatedOpacity()), e._$Wr.reflectX = e._$Yr.reflectX, e._$Wr.reflectY = e._$Yr.reflectY, e._$hS(n._$yo()) - } else e._$hS(!1) - } - } else e.setTotalScale_notForClient(e._$Yr._$B0), e.setTotalOpacity(e.getInterpolatedOpacity()) - }, z.prototype._$nb = function (t, i, e, r, o, n, s) { - this != i._$GT() && console.log("### assert!! ### "); - for (var _, a, h = i, l = null != h._$Wr ? h._$Wr : h._$Yr, $ = Math.sin(Lt._$bS * l._$qT), u = Math.cos(Lt._$bS * l._$qT), p = h.getTotalScale(), f = l.reflectX ? -1 : 1, c = l.reflectY ? -1 : 1, d = u * p * f, g = -$ * p * c, y = $ * p * f, m = u * p * c, T = l._$fL, P = l._$gL, S = o * s, v = n; v < S; v += s) _ = e[v], a = e[v + 1], r[v] = d * _ + g * a + T, r[v + 1] = y * _ + m * a + P - }, z.prototype._$Jr = function (t, i, e, r, o, n) { - i != e._$GT() && console.log("### assert!! ### "); - var s = z._$Lo; - z._$Lo[0] = r[0], z._$Lo[1] = r[1], i._$nb(t, e, s, s, 1, 0, 2); - for (var _ = z._$To, a = z._$Po, h = 1, l = 0; l < 10; l++) { - if (a[0] = r[0] + h * o[0], a[1] = r[1] + h * o[1], i._$nb(t, e, a, _, 1, 0, 2), _[0] -= s[0], _[1] -= s[1], 0 != _[0] || 0 != _[1]) return n[0] = _[0], void(n[1] = _[1]); - if (a[0] = r[0] - h * o[0], a[1] = r[1] - h * o[1], i._$nb(t, e, a, _, 1, 0, 2), _[0] -= s[0], _[1] -= s[1], 0 != _[0] || 0 != _[1]) return _[0] = -_[0], _[0] = -_[0], n[0] = _[0], void(n[1] = _[1]); - h *= .1 - } - at._$so && console.log("_$L0 to transform _$SP\n") - }, H.prototype = new _t, W.prototype = new M, W._$ur = -2, W._$ES = 500, W._$wb = 2, W._$8S = 3, W._$os = 4, W._$52 = W._$ES, W._$R2 = W._$ES, W._$Sb = function (t) { - for (var i = t.length - 1; i >= 0; --i) { - var e = t[i]; - e < W._$52 ? W._$52 = e : e > W._$R2 && (W._$R2 = e) - } - }, W._$or = function () { - return W._$52 - }, W._$Pr = function () { - return W._$R2 - }, W.prototype._$F0 = function (t) { - this._$gP = t._$nP(), this._$dr = t._$nP(), this._$GS = t._$nP(), this._$qb = t._$6L(), this._$Lb = t._$cS(), this._$mS = t._$Tb(), t.getFormatVersion() >= G._$T7 ? (this.clipID = t._$nP(), this.clipIDList = this.convertClipIDForV2_11(this.clipID)) : this.clipIDList = null, W._$Sb(this._$Lb) - }, W.prototype.getClipIDList = function () { - return this.clipIDList - }, W.prototype._$Nr = function (t, i) { - if (i._$IS[0] = !1, i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb), at._$Zs); - else if (i._$IS[0]) return; - i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS) - }, W.prototype._$2b = function (t) {}, W.prototype.getDrawDataID = function () { - return this._$gP - }, W.prototype._$j2 = function (t) { - this._$gP = t - }, W.prototype.getOpacity = function (t, i) { - return i._$7s - }, W.prototype._$zS = function (t, i) { - return i._$Us - }, W.prototype.getTargetBaseDataID = function () { - return this._$dr - }, W.prototype._$gs = function (t) { - this._$dr = t - }, W.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o() - }, W.prototype.getType = function () {}, j._$42 = 0, j.prototype._$1b = function () { - return this._$3S - }, j.prototype.getDrawDataList = function () { - return this._$aS - }, j.prototype._$F0 = function (t) { - this._$NL = t._$nP(), this._$aS = t._$nP(), this._$3S = t._$nP() - }, j.prototype._$kr = function (t) { - t._$Zo(this._$3S), t._$xo(this._$aS), this._$3S = null, this._$aS = null - }, q.prototype = new i, q.loadModel = function (t) { - var e = new q; - return i._$62(e, t), e - }, q.loadModel = function (t) { - var e = new q; - return i._$62(e, t), e - }, q._$to = function () { - return new q - }, q._$er = function (t) { - var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); - if (0 == i.exists()) throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); - for (var e = ["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"], r = q.loadModel(i._$3b()), o = 0; o < e.length; o++) { - var n = new _$5(e[o]); - if (0 == n.exists()) throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); - r.setTexture(o, _$nL._$_o(t, n._$3b())) - } - return r - }, q.prototype.setGL = function (t) { - this._$zo.setGL(t) - }, q.prototype.setTransform = function (t) { - this._$zo.setTransform(t) - }, q.prototype.draw = function () { - this._$5S.draw(this._$zo) - }, q.prototype._$K2 = function () { - this._$zo._$K2() - }, q.prototype.setTexture = function (t, i) { - null == this._$zo && _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), this._$zo.setTexture(t, i) - }, q.prototype.setTexture = function (t, i) { - null == this._$zo && _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), this._$zo.setTexture(t, i) - }, q.prototype._$Rs = function () { - return this._$zo._$Rs() - }, q.prototype._$Ds = function (t) { - this._$zo._$Ds(t) - }, q.prototype.getDrawParam = function () { - return this._$zo - }, J.prototype = new s, J._$cs = "VISIBLE:", J._$ar = "LAYOUT:", J.MTN_PREFIX_FADEIN = "FADEIN:", J.MTN_PREFIX_FADEOUT = "FADEOUT:", J._$Co = 0, J._$1T = 1, J.loadMotion = function (t) { - var i = k._$C(t); - return J.loadMotion(i) - }, J.loadMotion = function (t) { - t instanceof ArrayBuffer && (t = new DataView(t)); - var i = new J, - e = [0], - r = t.byteLength; - i._$yT = 0; - for (var o = 0; o < r; ++o) { - var n = Q(t, o), - s = n.charCodeAt(0); - if ("\n" != n && "\r" != n) - if ("#" != n) - if ("$" != n) { - if (97 <= s && s <= 122 || 65 <= s && s <= 90 || "_" == n) { - for (var _ = o, a = -1; o < r && ("\r" != (n = Q(t, o)) && "\n" != n); ++o) - if ("=" == n) { - a = o; - break - } - if (a >= 0) { - var h = new B; - O.startsWith(t, _, J._$cs) ? (h._$RP = B._$hs, h._$4P = O.createString(t, _, a - _)) : O.startsWith(t, _, J._$ar) ? (h._$4P = O.createString(t, _ + 7, a - _ - 7), O.startsWith(t, _ + 7, "ANCHOR_X") ? h._$RP = B._$xs : O.startsWith(t, _ + 7, "ANCHOR_Y") ? h._$RP = B._$us : O.startsWith(t, _ + 7, "SCALE_X") ? h._$RP = B._$qs : O.startsWith(t, _ + 7, "SCALE_Y") ? h._$RP = B._$Ys : O.startsWith(t, _ + 7, "X") ? h._$RP = B._$ws : O.startsWith(t, _ + 7, "Y") && (h._$RP = B._$Ns)) : (h._$RP = B._$Fr, h._$4P = O.createString(t, _, a - _)), i.motions.push(h); - var l = 0, - $ = []; - for (o = a + 1; o < r && ("\r" != (n = Q(t, o)) && "\n" != n); ++o) - if ("," != n && " " != n && "\t" != n) { - var u = O._$LS(t, r, o, e); - if (e[0] > 0) { - $.push(u), l++; - var p = e[0]; - if (p < o) { - console.log("_$n0 _$hi . @Live2DMotion loadMotion()\n"); - break - } - o = p - 1 - } - } - h._$I0 = new Float32Array($), l > i._$yT && (i._$yT = l) - } - } - } else { - for (var _ = o, a = -1; o < r && ("\r" != (n = Q(t, o)) && "\n" != n); ++o) - if ("=" == n) { - a = o; - break - } - var f = !1; - if (a >= 0) - for (a == _ + 4 && "f" == Q(t, _ + 1) && "p" == Q(t, _ + 2) && "s" == Q(t, _ + 3) && (f = !0), o = a + 1; o < r && ("\r" != (n = Q(t, o)) && "\n" != n); ++o) - if ("," != n && " " != n && "\t" != n) { - var u = O._$LS(t, r, o, e); - e[0] > 0 && f && 5 < u && u < 121 && (i._$D0 = u), o = e[0] - } - for (; o < r && ("\n" != Q(t, o) && "\r" != Q(t, o)); ++o); - } - else - for (; o < r && ("\n" != Q(t, o) && "\r" != Q(t, o)); ++o); - } - return i._$rr = 1e3 * i._$yT / i._$D0 | 0, i - }, J.prototype.getDurationMSec = function () { - return this._$E ? -1 : this._$rr - }, J.prototype.getLoopDurationMSec = function () { - return this._$rr - }, J.prototype.dump = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); - for (var e = 0; e < i._$I0.length && e < 10; e++) console.log("%5.2f ,", i._$I0[e]); - console.log("\n") - } - }, J.prototype.updateParamExe = function (t, i, e, r) { - for (var o = i - r._$z2, n = o * this._$D0 / 1e3, s = 0 | n, _ = n - s, a = 0; a < this.motions.length; a++) { - var h = this.motions[a], - l = h._$I0.length, - $ = h._$4P; - if (h._$RP == B._$hs) { - var u = h._$I0[s >= l ? l - 1 : s]; - t.setParamFloat($, u) - } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); - else { - var p, f = t.getParamIndex($), - c = t.getModelContext(), - d = c.getParamMax(f), - g = c.getParamMin(f), - y = .4 * (d - g), - m = c.getParamFloat(f), - T = h._$I0[s >= l ? l - 1 : s], - P = h._$I0[s + 1 >= l ? l - 1 : s + 1]; - p = T < P && P - T > y || T > P && T - P > y ? T : T + (P - T) * _; - var S = m + (p - m) * e; - t.setParamFloat($, S) - } - } - s >= this._$yT && (this._$E ? (r._$z2 = i, this.loopFadeIn && (r._$bs = i)) : r._$9L = !0), this._$eP = e - }, J.prototype._$r0 = function () { - return this._$E - }, J.prototype._$aL = function (t) { - this._$E = t - }, J.prototype._$S0 = function () { - return this._$D0 - }, J.prototype._$U0 = function (t) { - this._$D0 = t - }, J.prototype.isLoopFadeIn = function () { - return this.loopFadeIn - }, J.prototype.setLoopFadeIn = function (t) { - this.loopFadeIn = t - }, N.prototype.clear = function () { - this.size = 0 - }, N.prototype.add = function (t) { - if (this._$P.length <= this.size) { - var i = new Float32Array(2 * this.size); - w._$jT(this._$P, 0, i, 0, this.size), this._$P = i - } - this._$P[this.size++] = t - }, N.prototype._$BL = function () { - var t = new Float32Array(this.size); - return w._$jT(this._$P, 0, t, 0, this.size), t - }, B._$Fr = 0, B._$hs = 1, B._$ws = 100, B._$Ns = 101, B._$xs = 102, B._$us = 103, B._$qs = 104, B._$Ys = 105, Z.prototype = new I, Z._$gT = new Array, Z.prototype._$zP = function () { - this._$GS = new D, this._$GS._$zP() - }, Z.prototype._$F0 = function (t) { - I.prototype._$F0.call(this, t), this._$A = t._$6L(), this._$o = t._$6L(), this._$GS = t._$nP(), this._$Eo = t._$nP(), I.prototype.readV2_opacity.call(this, t) - }, Z.prototype.init = function (t) { - var i = new K(this), - e = (this._$o + 1) * (this._$A + 1); - return null != i._$Cr && (i._$Cr = null), i._$Cr = new Float32Array(2 * e), null != i._$hr && (i._$hr = null), this._$32() ? i._$hr = new Float32Array(2 * e) : i._$hr = null, i - }, Z.prototype._$Nr = function (t, i) { - var e = i; - if (this._$GS._$Ur(t)) { - var r = this._$VT(), - o = Z._$gT; - o[0] = !1, v._$Vr(t, this._$GS, o, r, this._$Eo, e._$Cr, 0, 2), i._$Ib(o[0]), this.interpolateOpacity(t, this._$GS, i, o) - } - }, Z.prototype._$2b = function (t, i) { - var e = i; - if (e._$hS(!0), this._$32()) { - var r = this.getTargetBaseDataID(); - if (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), e._$8r < 0) at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); - else { - var o = t.getBaseData(e._$8r), - n = t._$q2(e._$8r); - if (null != o && n._$yo()) { - var s = n.getTotalScale(); - e.setTotalScale_notForClient(s); - var a = n.getTotalOpacity(); - e.setTotalOpacity(a * e.getInterpolatedOpacity()), o._$nb(t, n, e._$Cr, e._$hr, this._$VT(), 0, 2), e._$hS(!0) - } else e._$hS(!1) - } - } else e.setTotalOpacity(e.getInterpolatedOpacity()) - }, Z.prototype._$nb = function (t, i, e, r, o, n, s) { - var _ = i, - a = null != _._$hr ? _._$hr : _._$Cr; - Z.transformPoints_sdk2(e, r, o, n, s, a, this._$o, this._$A) - }, Z.transformPoints_sdk2 = function (i, e, r, o, n, s, _, a) { - for (var h, l, $, u = r * n, p = 0, f = 0, c = 0, d = 0, g = 0, y = 0, m = !1, T = o; T < u; T += n) { - var P, S, v, L; - if (v = i[T], L = i[T + 1], P = v * _, S = L * a, P < 0 || S < 0 || _ <= P || a <= S) { - var M = _ + 1; - if (!m) { - m = !0, p = .25 * (s[2 * (0 + 0 * M)] + s[2 * (_ + 0 * M)] + s[2 * (0 + a * M)] + s[2 * (_ + a * M)]), f = .25 * (s[2 * (0 + 0 * M) + 1] + s[2 * (_ + 0 * M) + 1] + s[2 * (0 + a * M) + 1] + s[2 * (_ + a * M) + 1]); - var E = s[2 * (_ + a * M)] - s[2 * (0 + 0 * M)], - A = s[2 * (_ + a * M) + 1] - s[2 * (0 + 0 * M) + 1], - I = s[2 * (_ + 0 * M)] - s[2 * (0 + a * M)], - w = s[2 * (_ + 0 * M) + 1] - s[2 * (0 + a * M) + 1]; - c = .5 * (E + I), d = .5 * (A + w), g = .5 * (E - I), y = .5 * (A - w), p -= .5 * (c + g), f -= .5 * (d + y) - } - if (-2 < v && v < 3 && -2 < L && L < 3) - if (v <= 0) - if (L <= 0) { - var x = s[2 * (0 + 0 * M)], - O = s[2 * (0 + 0 * M) + 1], - D = p - 2 * c, - R = f - 2 * d, - b = p - 2 * g, - F = f - 2 * y, - C = p - 2 * c - 2 * g, - N = f - 2 * d - 2 * y, - B = .5 * (v - -2), - U = .5 * (L - -2); - B + U <= 1 ? (e[T] = C + (b - C) * B + (D - C) * U, e[T + 1] = N + (F - N) * B + (R - N) * U) : (e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U), e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U)) - } else if (L >= 1) { - var b = s[2 * (0 + a * M)], - F = s[2 * (0 + a * M) + 1], - C = p - 2 * c + 1 * g, - N = f - 2 * d + 1 * y, - x = p + 3 * g, - O = f + 3 * y, - D = p - 2 * c + 3 * g, - R = f - 2 * d + 3 * y, - B = .5 * (v - -2), - U = .5 * (L - 1); - B + U <= 1 ? (e[T] = C + (b - C) * B + (D - C) * U, e[T + 1] = N + (F - N) * B + (R - N) * U) : (e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U), e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U)) - } else { - var G = 0 | S; - G == a && (G = a - 1); - var B = .5 * (v - -2), - U = S - G, - Y = G / a, - k = (G + 1) / a, - b = s[2 * (0 + G * M)], - F = s[2 * (0 + G * M) + 1], - x = s[2 * (0 + (G + 1) * M)], - O = s[2 * (0 + (G + 1) * M) + 1], - C = p - 2 * c + Y * g, - N = f - 2 * d + Y * y, - D = p - 2 * c + k * g, - R = f - 2 * d + k * y; - B + U <= 1 ? (e[T] = C + (b - C) * B + (D - C) * U, e[T + 1] = N + (F - N) * B + (R - N) * U) : (e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U), e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U)) - } else if (1 <= v) - if (L <= 0) { - var D = s[2 * (_ + 0 * M)], - R = s[2 * (_ + 0 * M) + 1], - x = p + 3 * c, - O = f + 3 * d, - C = p + 1 * c - 2 * g, - N = f + 1 * d - 2 * y, - b = p + 3 * c - 2 * g, - F = f + 3 * d - 2 * y, - B = .5 * (v - 1), - U = .5 * (L - -2); - B + U <= 1 ? (e[T] = C + (b - C) * B + (D - C) * U, e[T + 1] = N + (F - N) * B + (R - N) * U) : (e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U), e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U)) - } else if (L >= 1) { - var C = s[2 * (_ + a * M)], - N = s[2 * (_ + a * M) + 1], - b = p + 3 * c + 1 * g, - F = f + 3 * d + 1 * y, - D = p + 1 * c + 3 * g, - R = f + 1 * d + 3 * y, - x = p + 3 * c + 3 * g, - O = f + 3 * d + 3 * y, - B = .5 * (v - 1), - U = .5 * (L - 1); - B + U <= 1 ? (e[T] = C + (b - C) * B + (D - C) * U, e[T + 1] = N + (F - N) * B + (R - N) * U) : (e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U), e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U)) - } else { - var G = 0 | S; - G == a && (G = a - 1); - var B = .5 * (v - 1), - U = S - G, - Y = G / a, - k = (G + 1) / a, - C = s[2 * (_ + G * M)], - N = s[2 * (_ + G * M) + 1], - D = s[2 * (_ + (G + 1) * M)], - R = s[2 * (_ + (G + 1) * M) + 1], - b = p + 3 * c + Y * g, - F = f + 3 * d + Y * y, - x = p + 3 * c + k * g, - O = f + 3 * d + k * y; - B + U <= 1 ? (e[T] = C + (b - C) * B + (D - C) * U, e[T + 1] = N + (F - N) * B + (R - N) * U) : (e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U), e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U)) - } else if (L <= 0) { - var V = 0 | P; - V == _ && (V = _ - 1); - var B = P - V, - U = .5 * (L - -2), - X = V / _, - z = (V + 1) / _, - D = s[2 * (V + 0 * M)], - R = s[2 * (V + 0 * M) + 1], - x = s[2 * (V + 1 + 0 * M)], - O = s[2 * (V + 1 + 0 * M) + 1], - C = p + X * c - 2 * g, - N = f + X * d - 2 * y, - b = p + z * c - 2 * g, - F = f + z * d - 2 * y; - B + U <= 1 ? (e[T] = C + (b - C) * B + (D - C) * U, e[T + 1] = N + (F - N) * B + (R - N) * U) : (e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U), e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U)) - } else if (L >= 1) { - var V = 0 | P; - V == _ && (V = _ - 1); - var B = P - V, - U = .5 * (L - 1), - X = V / _, - z = (V + 1) / _, - C = s[2 * (V + a * M)], - N = s[2 * (V + a * M) + 1], - b = s[2 * (V + 1 + a * M)], - F = s[2 * (V + 1 + a * M) + 1], - D = p + X * c + 3 * g, - R = f + X * d + 3 * y, - x = p + z * c + 3 * g, - O = f + z * d + 3 * y; - B + U <= 1 ? (e[T] = C + (b - C) * B + (D - C) * U, e[T + 1] = N + (F - N) * B + (R - N) * U) : (e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U), e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U)) - } else t.err.printf("_$li calc : %.4f , %.4f\t\t\t\t\t@@BDBoxGrid\n", v, L); - else e[T] = p + v * c + L * g, e[T + 1] = f + v * d + L * y - } else l = P - (0 | P), $ = S - (0 | S), h = 2 * ((0 | P) + (0 | S) * (_ + 1)), l + $ < 1 ? (e[T] = s[h] * (1 - l - $) + s[h + 2] * l + s[h + 2 * (_ + 1)] * $, e[T + 1] = s[h + 1] * (1 - l - $) + s[h + 3] * l + s[h + 2 * (_ + 1) + 1] * $) : (e[T] = s[h + 2 * (_ + 1) + 2] * (l - 1 + $) + s[h + 2 * (_ + 1)] * (1 - l) + s[h + 2] * (1 - $), e[T + 1] = s[h + 2 * (_ + 1) + 3] * (l - 1 + $) + s[h + 2 * (_ + 1) + 1] * (1 - l) + s[h + 3] * (1 - $)) - } - }, Z.prototype.transformPoints_sdk1 = function (t, i, e, r, o, n, s) { - for (var _, a, h, l, $, u, p, f = i, c = this._$o, d = this._$A, g = o * s, y = null != f._$hr ? f._$hr : f._$Cr, m = n; m < g; m += s) at._$ts ? (_ = e[m], a = e[m + 1], _ < 0 ? _ = 0 : _ > 1 && (_ = 1), a < 0 ? a = 0 : a > 1 && (a = 1), _ *= c, a *= d, h = 0 | _, l = 0 | a, h > c - 1 && (h = c - 1), l > d - 1 && (l = d - 1), u = _ - h, p = a - l, $ = 2 * (h + l * (c + 1))) : (_ = e[m] * c, a = e[m + 1] * d, u = _ - (0 | _), p = a - (0 | a), $ = 2 * ((0 | _) + (0 | a) * (c + 1))), u + p < 1 ? (r[m] = y[$] * (1 - u - p) + y[$ + 2] * u + y[$ + 2 * (c + 1)] * p, r[m + 1] = y[$ + 1] * (1 - u - p) + y[$ + 3] * u + y[$ + 2 * (c + 1) + 1] * p) : (r[m] = y[$ + 2 * (c + 1) + 2] * (u - 1 + p) + y[$ + 2 * (c + 1)] * (1 - u) + y[$ + 2] * (1 - p), r[m + 1] = y[$ + 2 * (c + 1) + 3] * (u - 1 + p) + y[$ + 2 * (c + 1) + 1] * (1 - u) + y[$ + 3] * (1 - p)) - }, Z.prototype._$VT = function () { - return (this._$o + 1) * (this._$A + 1) - }, Z.prototype.getType = function () { - return I._$_b - }, K.prototype = new _t, tt._$42 = 0, tt.prototype._$zP = function () { - this._$3S = new Array, this._$aS = new Array - }, tt.prototype._$F0 = function (t) { - this._$g0 = t._$8L(), this.visible = t._$8L(), this._$NL = t._$nP(), this._$3S = t._$nP(), this._$aS = t._$nP() - }, tt.prototype.init = function (t) { - var i = new it(this); - return i.setPartsOpacity(this.isVisible() ? 1 : 0), i - }, tt.prototype._$6o = function (t) { - if (null == this._$3S) throw new Error("_$3S _$6 _$Wo@_$6o"); - this._$3S.push(t) - }, tt.prototype._$3o = function (t) { - if (null == this._$aS) throw new Error("_$aS _$6 _$Wo@_$3o"); - this._$aS.push(t) - }, tt.prototype._$Zo = function (t) { - this._$3S = t - }, tt.prototype._$xo = function (t) { - this._$aS = t - }, tt.prototype.isVisible = function () { - return this.visible - }, tt.prototype._$uL = function () { - return this._$g0 - }, tt.prototype._$KP = function (t) { - this.visible = t - }, tt.prototype._$ET = function (t) { - this._$g0 = t - }, tt.prototype.getBaseData = function () { - return this._$3S - }, tt.prototype.getDrawData = function () { - return this._$aS - }, tt.prototype._$p2 = function () { - return this._$NL - }, tt.prototype._$ob = function (t) { - this._$NL = t - }, tt.prototype.getPartsID = function () { - return this._$NL - }, tt.prototype._$MP = function (t) { - this._$NL = t - }, it.prototype = new $, it.prototype.getPartsOpacity = function () { - return this._$VS - }, it.prototype.setPartsOpacity = function (t) { - this._$VS = t - }, et._$L7 = function () { - u._$27(), yt._$27(), b._$27(), l._$27() - }, et.prototype.toString = function () { - return this.id - }, rt.prototype._$F0 = function (t) {}, ot.prototype._$1s = function () { - return this._$4S - }, ot.prototype._$zP = function () { - this._$4S = new Array - }, ot.prototype._$F0 = function (t) { - this._$4S = t._$nP() - }, ot.prototype._$Ks = function (t) { - this._$4S.push(t) - }, nt.tr = new gt, nt._$50 = new gt, nt._$Ti = new Array(0, 0), nt._$Pi = new Array(0, 0), nt._$B = new Array(0, 0), nt.prototype._$lP = function (t, i, e, r) { - this.viewport = new Array(t, i, e, r) - }, nt.prototype._$bL = function () { - this.context.save(); - var t = this.viewport; - null != t && (this.context.beginPath(), this.context._$Li(t[0], t[1], t[2], t[3]), this.context.clip()) - }, nt.prototype._$ei = function () { - this.context.restore() - }, nt.prototype.drawElements = function (t, i, e, r, o, n, s, a) { - try { - o != this._$Qo && (this._$Qo = o, this.context.globalAlpha = o); - for (var h = i.length, l = t.width, $ = t.height, u = this.context, p = this._$xP, f = this._$uP, c = this._$6r, d = this._$3r, g = nt.tr, y = nt._$Ti, m = nt._$Pi, T = nt._$B, P = 0; P < h; P += 3) { - u.save(); - var S = i[P], - v = i[P + 1], - L = i[P + 2], - M = p + c * e[2 * S], - E = f + d * e[2 * S + 1], - A = p + c * e[2 * v], - I = f + d * e[2 * v + 1], - w = p + c * e[2 * L], - x = f + d * e[2 * L + 1]; - s && (s._$PS(M, E, T), M = T[0], E = T[1], s._$PS(A, I, T), A = T[0], I = T[1], s._$PS(w, x, T), w = T[0], x = T[1]); - var O = l * r[2 * S], - D = $ - $ * r[2 * S + 1], - R = l * r[2 * v], - b = $ - $ * r[2 * v + 1], - F = l * r[2 * L], - C = $ - $ * r[2 * L + 1], - N = Math.atan2(b - D, R - O), - B = Math.atan2(I - E, A - M), - U = A - M, - G = I - E, - Y = Math.sqrt(U * U + G * G), - k = R - O, - V = b - D, - X = Math.sqrt(k * k + V * V), - z = Y / X; - It._$ni(F, C, O, D, R - O, b - D, -(b - D), R - O, y), It._$ni(w, x, M, E, A - M, I - E, -(I - E), A - M, m); - var H = (m[0] - y[0]) / y[1], - W = Math.min(O, R, F), - j = Math.max(O, R, F), - q = Math.min(D, b, C), - J = Math.max(D, b, C), - Q = Math.floor(W), - Z = Math.floor(q), - K = Math.ceil(j), - tt = Math.ceil(J); - g.identity(), g.translate(M, E), g.rotate(B), g.scale(1, m[1] / y[1]), g.shear(H, 0), g.scale(z, z), g.rotate(-N), g.translate(-O, -D), g.setContext(u); - if (n || (n = 1.2), at.IGNORE_EXPAND && (n = 0), at.USE_CACHED_POLYGON_IMAGE) { - var it = a._$e0; - if (it.gl_cacheImage = it.gl_cacheImage || {}, !it.gl_cacheImage[P]) { - var et = nt.createCanvas(K - Q, tt - Z); - at.DEBUG_DATA.LDGL_CANVAS_MB = at.DEBUG_DATA.LDGL_CANVAS_MB || 0, at.DEBUG_DATA.LDGL_CANVAS_MB += (K - Q) * (tt - Z) * 4; - var rt = et.getContext("2d"); - rt.translate(-Q, -Z), nt.clip(rt, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), rt.drawImage(t, 0, 0), it.gl_cacheImage[P] = { - cacheCanvas: et, - cacheContext: rt - } - } - u.drawImage(it.gl_cacheImage[P].cacheCanvas, Q, Z) - } else at.IGNORE_CLIP || nt.clip(u, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), at.USE_ADJUST_TRANSLATION && (W = 0, j = l, q = 0, J = $), u.drawImage(t, W, q, j - W, J - q, W, q, j - W, J - q); - u.restore() - } - } catch (t) { - _._$Rb(t) - } - }, nt.clip = function (t, i, e, r, o, n, s, _, a, h, l, $, u, p, f, c) { - e > .02 ? nt.expandClip(t, i, e, r, l, $, u, p, f, c) : nt.clipWithTransform(t, null, o, n, s, _, a, h) - }, nt.expandClip = function (t, i, e, r, o, n, s, _, a, h) { - var l = s - o, - $ = _ - n, - u = a - o, - p = h - n, - f = l * p - $ * u > 0 ? e : -e, - c = -$, - d = l, - g = a - s, - y = h - _, - m = -y, - T = g, - P = Math.sqrt(g * g + y * y), - S = -p, - v = u, - L = Math.sqrt(u * u + p * p), - M = o - f * c / r, - E = n - f * d / r, - A = s - f * c / r, - I = _ - f * d / r, - w = s - f * m / P, - x = _ - f * T / P, - O = a - f * m / P, - D = h - f * T / P, - R = o + f * S / L, - b = n + f * v / L, - F = a + f * S / L, - C = h + f * v / L, - N = nt._$50; - return null != i._$P2(N) && (nt.clipWithTransform(t, N, M, E, A, I, w, x, O, D, F, C, R, b), !0) - }, nt.clipWithTransform = function (t, i, e, r, o, n, s, a) { - if (arguments.length < 7) return void _._$li("err : @LDGL.clip()"); - if (!(arguments[1] instanceof gt)) return void _._$li("err : a[0] is _$6 LDTransform @LDGL.clip()"); - var h = nt._$B, - l = i, - $ = arguments; - if (t.beginPath(), l) { - l._$PS($[2], $[3], h), t.moveTo(h[0], h[1]); - for (var u = 4; u < $.length; u += 2) l._$PS($[u], $[u + 1], h), t.lineTo(h[0], h[1]) - } else { - t.moveTo($[2], $[3]); - for (var u = 4; u < $.length; u += 2) t.lineTo($[u], $[u + 1]) - } - t.clip() - }, nt.createCanvas = function (t, i) { - var e = document.createElement("canvas"); - return e.setAttribute("width", t), e.setAttribute("height", i), e || _._$li("err : " + e), e - }, nt.dumpValues = function () { - for (var t = "", i = 0; i < arguments.length; i++) t += "[" + i + "]= " + arguments[i].toFixed(3) + " , "; - console.log(t) - }, st.prototype._$F0 = function (t) { - this._$TT = t._$_T(), this._$LT = t._$_T(), this._$FS = t._$_T(), this._$wL = t._$nP() - }, st.prototype.getMinValue = function () { - return this._$TT - }, st.prototype.getMaxValue = function () { - return this._$LT - }, st.prototype.getDefaultValue = function () { - return this._$FS - }, st.prototype.getParamID = function () { - return this._$wL - }, _t.prototype._$yo = function () { - return this._$AT && !this._$JS - }, _t.prototype._$hS = function (t) { - this._$AT = t - }, _t.prototype._$GT = function () { - return this._$e0 - }, _t.prototype._$l2 = function (t) { - this._$IP = t - }, _t.prototype.getPartsIndex = function () { - return this._$IP - }, _t.prototype._$x2 = function () { - return this._$JS - }, _t.prototype._$Ib = function (t) { - this._$JS = t - }, _t.prototype.getTotalScale = function () { - return this.totalScale - }, _t.prototype.setTotalScale_notForClient = function (t) { - this.totalScale = t - }, _t.prototype.getInterpolatedOpacity = function () { - return this._$7s - }, _t.prototype.setInterpolatedOpacity = function (t) { - this._$7s = t - }, _t.prototype.getTotalOpacity = function (t) { - return this.totalOpacity - }, _t.prototype.setTotalOpacity = function (t) { - this.totalOpacity = t - }, at._$2s = "2.1.00_1", at._$Kr = 201001e3, at._$sP = !0, at._$so = !0, at._$cb = !1, at._$3T = !0, at._$Ts = !0, at._$fb = !0, at._$ts = !0, at.L2D_DEFORMER_EXTEND = !0, at._$Wb = !1; - at._$yr = !1, at._$Zs = !1, at.L2D_NO_ERROR = 0, at._$i7 = 1e3, at._$9s = 1001, at._$es = 1100, at._$r7 = 2e3, at._$07 = 2001, at._$b7 = 2002, at._$H7 = 4e3, at.L2D_COLOR_BLEND_MODE_MULT = 0, at.L2D_COLOR_BLEND_MODE_ADD = 1, at.L2D_COLOR_BLEND_MODE_INTERPOLATE = 2, at._$6b = !0, at._$cT = 0, at.clippingMaskBufferSize = 256, at.glContext = new Array, at.frameBuffers = new Array, at.fTexture = new Array, at.IGNORE_CLIP = !1, at.IGNORE_EXPAND = !1, at.EXPAND_W = 2, at.USE_ADJUST_TRANSLATION = !0, at.USE_CANVAS_TRANSFORM = !0, at.USE_CACHED_POLYGON_IMAGE = !1, at.DEBUG_DATA = {}, at.PROFILE_IOS_SPEED = { - PROFILE_NAME: "iOS Speed", - USE_ADJUST_TRANSLATION: !0, - USE_CACHED_POLYGON_IMAGE: !0, - EXPAND_W: 4 - }, at.PROFILE_IOS_QUALITY = { - PROFILE_NAME: "iOS HiQ", - USE_ADJUST_TRANSLATION: !0, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2 - }, at.PROFILE_IOS_DEFAULT = at.PROFILE_IOS_QUALITY, at.PROFILE_ANDROID = { - PROFILE_NAME: "Android", - USE_ADJUST_TRANSLATION: !1, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2 - }, at.PROFILE_DESKTOP = { - PROFILE_NAME: "Desktop", - USE_ADJUST_TRANSLATION: !1, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2 - }, at.initProfile = function () { - Et.isIOS() ? at.setupProfile(at.PROFILE_IOS_DEFAULT) : Et.isAndroid() ? at.setupProfile(at.PROFILE_ANDROID) : at.setupProfile(at.PROFILE_DESKTOP) - }, at.setupProfile = function (t, i) { - if ("number" == typeof t) switch (t) { - case 9901: - t = at.PROFILE_IOS_SPEED; - break; - case 9902: - t = at.PROFILE_IOS_QUALITY; - break; - case 9903: - t = at.PROFILE_IOS_DEFAULT; - break; - case 9904: - t = at.PROFILE_ANDROID; - break; - case 9905: - t = at.PROFILE_DESKTOP; - break; - default: - alert("profile _$6 _$Ui : " + t) - } - arguments.length < 2 && (i = !0), i && console.log("profile : " + t.PROFILE_NAME); - for (var e in t) at[e] = t[e], i && console.log(" [" + e + "] = " + t[e]) - }, at.init = function () { - if (at._$6b) { - console.log("Live2D %s", at._$2s), at._$6b = !1; - !0, at.initProfile() - } - }, at.getVersionStr = function () { - return at._$2s - }, at.getVersionNo = function () { - return at._$Kr - }, at._$sT = function (t) { - at._$cT = t - }, at.getError = function () { - var t = at._$cT; - return at._$cT = 0, t - }, at.dispose = function () { - at.glContext = [], at.frameBuffers = [], at.fTexture = [] - }, at.setGL = function (t, i) { - var e = i || 0; - at.glContext[e] = t - }, at.getGL = function (t) { - return at.glContext[t] - }, at.setClippingMaskBufferSize = function (t) { - at.clippingMaskBufferSize = t - }, at.getClippingMaskBufferSize = function () { - return at.clippingMaskBufferSize - }, at.deleteBuffer = function (t) { - at.getGL(t).deleteFramebuffer(at.frameBuffers[t].framebuffer), delete at.frameBuffers[t], delete at.glContext[t] - }, ht._$r2 = function (t) { - return t < 0 ? 0 : t > 1 ? 1 : .5 - .5 * Math.cos(t * Lt.PI_F) - }, lt._$fr = -1, lt.prototype.toString = function () { - return this._$ib - }, $t.prototype = new W, $t._$42 = 0, $t._$Os = 30, $t._$ms = 0, $t._$ns = 1, $t._$_s = 2, $t._$gT = new Array, $t.prototype._$_S = function (t) { - this._$LP = t - }, $t.prototype.getTextureNo = function () { - return this._$LP - }, $t.prototype._$ZL = function () { - return this._$Qi - }, $t.prototype._$H2 = function () { - return this._$JP - }, $t.prototype.getNumPoints = function () { - return this._$d0 - }, $t.prototype.getType = function () { - return W._$wb - }, $t.prototype._$B2 = function (t, i, e) { - var r = i, - o = null != r._$hr ? r._$hr : r._$Cr; - switch (U._$do) { - default: - case U._$Ms: - throw new Error("_$L _$ro "); - case U._$Qs: - for (var n = this._$d0 - 1; n >= 0; --n) o[n * U._$No + 4] = e - } - }, $t.prototype._$zP = function () { - this._$GS = new D, this._$GS._$zP() - }, $t.prototype._$F0 = function (t) { - W.prototype._$F0.call(this, t), this._$LP = t._$6L(), this._$d0 = t._$6L(), this._$Yo = t._$6L(); - var i = t._$nP(); - this._$BP = new Int16Array(3 * this._$Yo); - for (var e = 3 * this._$Yo - 1; e >= 0; --e) this._$BP[e] = i[e]; - if (this._$Eo = t._$nP(), this._$Qi = t._$nP(), t.getFormatVersion() >= G._$s7) { - if (this._$JP = t._$6L(), 0 != this._$JP) { - if (0 != (1 & this._$JP)) { - var r = t._$6L(); - null == this._$5P && (this._$5P = new Object), this._$5P._$Hb = parseInt(r) - } - 0 != (this._$JP & $t._$Os) ? this._$6s = (this._$JP & $t._$Os) >> 1 : this._$6s = $t._$ms, 0 != (32 & this._$JP) && (this.culling = !1) - } - } else this._$JP = 0 - }, $t.prototype.init = function (t) { - var i = new ut(this), - e = this._$d0 * U._$No, - r = this._$32(); - switch (null != i._$Cr && (i._$Cr = null), i._$Cr = new Float32Array(e), null != i._$hr && (i._$hr = null), i._$hr = r ? new Float32Array(e) : null, U._$do) { - default: - case U._$Ms: - if (U._$Ls) - for (var o = this._$d0 - 1; o >= 0; --o) { - var n = o << 1; - this._$Qi[n + 1] = 1 - this._$Qi[n + 1] - } - break; - case U._$Qs: - for (var o = this._$d0 - 1; o >= 0; --o) { - var n = o << 1, - s = o * U._$No, - _ = this._$Qi[n], - a = this._$Qi[n + 1]; - i._$Cr[s] = _, i._$Cr[s + 1] = a, i._$Cr[s + 4] = 0, r && (i._$hr[s] = _, i._$hr[s + 1] = a, i._$hr[s + 4] = 0) - } - } - return i - }, $t.prototype._$Nr = function (t, i) { - var e = i; - if (this != e._$GT() && console.log("### assert!! ### "), this._$GS._$Ur(t) && (W.prototype._$Nr.call(this, t, e), !e._$IS[0])) { - var r = $t._$gT; - r[0] = !1, v._$Vr(t, this._$GS, r, this._$d0, this._$Eo, e._$Cr, U._$i2, U._$No) - } - }, $t.prototype._$2b = function (t, i) { - try { - this != i._$GT() && console.log("### assert!! ### "); - var e = !1; - i._$IS[0] && (e = !0); - var r = i; - if (!e && (W.prototype._$2b.call(this, t), this._$32())) { - var o = this.getTargetBaseDataID(); - if (r._$8r == W._$ur && (r._$8r = t.getBaseDataIndex(o)), r._$8r < 0) at._$so && _._$li("_$L _$0P _$G :: %s", o); - else { - var n = t.getBaseData(r._$8r), - s = t._$q2(r._$8r); - null == n || s._$x2() ? r._$AT = !1 : (n._$nb(t, s, r._$Cr, r._$hr, this._$d0, U._$i2, U._$No), r._$AT = !0), r.baseOpacity = s.getTotalOpacity() - } - } - } catch (t) { - throw t - } - }, $t.prototype.draw = function (t, i, e) { - if (this != e._$GT() && console.log("### assert!! ### "), !e._$IS[0]) { - var r = e, - o = this._$LP; - o < 0 && (o = 1); - var n = this.getOpacity(i, r) * e._$VS * e.baseOpacity, - s = null != r._$hr ? r._$hr : r._$Cr; - t.setClipBufPre_clipContextForDraw(e.clipBufPre_clipContext), t._$WP(this.culling), t._$Uo(o, 3 * this._$Yo, this._$BP, s, this._$Qi, n, this._$6s, r) - } - }, $t.prototype.dump = function () { - console.log(" _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n", this._$LP, this._$d0, this._$Yo), console.log(" _$Oi _$di = { "); - for (var t = 0; t < this._$BP.length; t++) console.log("%5d ,", this._$BP[t]); - console.log("\n _$5i _$30"); - for (var t = 0; t < this._$Eo.length; t++) { - console.log("\n _$30[%d] = ", t); - for (var i = this._$Eo[t], e = 0; e < i.length; e++) console.log("%6.2f, ", i[e]) - } - console.log("\n") - }, $t.prototype._$72 = function (t) { - return null == this._$5P ? null : this._$5P[t] - }, $t.prototype.getIndexArray = function () { - return this._$BP - }, ut.prototype = new Mt, ut.prototype.getTransformedPoints = function () { - return null != this._$hr ? this._$hr : this._$Cr - }, pt.prototype._$HT = function (t) { - this.x = t.x, this.y = t.y - }, pt.prototype._$HT = function (t, i) { - this.x = t, this.y = i - }, ft.prototype = new i, ft.loadModel = function (t) { - var e = new ft; - return i._$62(e, t), e - }, ft.loadModel = function (t, e) { - var r = e || 0, - o = new ft(r); - return i._$62(o, t), o - }, ft._$to = function () { - return new ft - }, ft._$er = function (t) { - var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); - if (0 == i.exists()) throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); - for (var e = ["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"], r = ft.loadModel(i._$3b()), o = 0; o < e.length; o++) { - var n = new _$5(e[o]); - if (0 == n.exists()) throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); - r.setTexture(o, _$nL._$_o(t, n._$3b())) - } - return r - }, ft.prototype.setGL = function (t) { - at.setGL(t) - }, ft.prototype.setTransform = function (t) { - this.drawParamWebGL.setTransform(t) - }, ft.prototype.update = function () { - this._$5S.update(), this._$5S.preDraw(this.drawParamWebGL) - }, ft.prototype.draw = function () { - this._$5S.draw(this.drawParamWebGL) - }, ft.prototype._$K2 = function () { - this.drawParamWebGL._$K2() - }, ft.prototype.setTexture = function (t, i) { - null == this.drawParamWebGL && _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), this.drawParamWebGL.setTexture(t, i) - }, ft.prototype.setTexture = function (t, i) { - null == this.drawParamWebGL && _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), this.drawParamWebGL.setTexture(t, i) - }, ft.prototype._$Rs = function () { - return this.drawParamWebGL._$Rs() - }, ft.prototype._$Ds = function (t) { - this.drawParamWebGL._$Ds(t) - }, ft.prototype.getDrawParam = function () { - return this.drawParamWebGL - }, ft.prototype.setMatrix = function (t) { - this.drawParamWebGL.setMatrix(t) - }, ft.prototype.setPremultipliedAlpha = function (t) { - this.drawParamWebGL.setPremultipliedAlpha(t) - }, ft.prototype.isPremultipliedAlpha = function () { - return this.drawParamWebGL.isPremultipliedAlpha() - }, ft.prototype.setAnisotropy = function (t) { - this.drawParamWebGL.setAnisotropy(t) - }, ft.prototype.getAnisotropy = function () { - return this.drawParamWebGL.getAnisotropy() - }, ct.prototype._$tb = function () { - return this.motions - }, ct.prototype.startMotion = function (t, i) { - for (var e = null, r = this.motions.length, o = 0; o < r; ++o) null != (e = this.motions[o]) && (e._$qS(e._$w0.getFadeOut()), this._$eb && _._$Ji("MotionQueueManager[size:%2d]->startMotion() / start _$K _$3 (m%d)\n", r, e._$sr)); - if (null == t) return -1; - e = new dt, e._$w0 = t, this.motions.push(e); - var n = e._$sr; - return this._$eb && _._$Ji("MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n", r, n), n - }, ct.prototype.updateParam = function (t) { - try { - for (var i = !1, e = 0; e < this.motions.length; e++) { - var r = this.motions[e]; - if (null != r) { - var o = r._$w0; - null != o ? (o.updateParam(t, r), i = !0, r.isFinished() && (this._$eb && _._$Ji("MotionQueueManager[size:%2d]->updateParam() / _$T0 _$w0 (m%d)\n", this.motions.length - 1, r._$sr), this.motions.splice(e, 1), e--)) : (this.motions = this.motions.splice(e, 1), e--) - } else this.motions.splice(e, 1), e-- - } - return i - } catch (t) { - return _._$li(t), !0 - } - }, ct.prototype.isFinished = function (t) { - if (arguments.length >= 1) { - for (var i = 0; i < this.motions.length; i++) { - var e = this.motions[i]; - if (null != e && (e._$sr == t && !e.isFinished())) return !1 - } - return !0 - } - for (var i = 0; i < this.motions.length; i++) { - var e = this.motions[i]; - if (null != e) { - if (null != e._$w0) { - if (!e.isFinished()) return !1 - } else this.motions.splice(i, 1), i-- - } else this.motions.splice(i, 1), i-- - } - return !0 - }, ct.prototype.stopAllMotions = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - if (null != i) { - i._$w0; - this.motions.splice(t, 1), t-- - } else this.motions.splice(t, 1), t-- - } - }, ct.prototype._$Zr = function (t) { - this._$eb = t - }, ct.prototype._$e = function () { - console.log("-- _$R --\n"); - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t], - e = i._$w0; - console.log("MotionQueueEnt[%d] :: %s\n", this.motions.length, e.toString()) - } - }, dt._$Gs = 0, dt.prototype.isFinished = function () { - return this._$9L - }, dt.prototype._$qS = function (t) { - var i = w.getUserTimeMSec(), - e = i + t; - (this._$Do < 0 || e < this._$Do) && (this._$Do = e) - }, dt.prototype._$Bs = function () { - return this._$sr - }, gt.prototype.setContext = function (t) { - var i = this.m; - t.transform(i[0], i[1], i[3], i[4], i[6], i[7]) - }, gt.prototype.toString = function () { - for (var t = "LDTransform { ", i = 0; i < 9; i++) t += this.m[i].toFixed(2) + " ,"; - return t += " }" - }, gt.prototype.identity = function () { - var t = this.m; - t[0] = t[4] = t[8] = 1, t[1] = t[2] = t[3] = t[5] = t[6] = t[7] = 0 - }, gt.prototype._$PS = function (t, i, e) { - null == e && (e = new Array(0, 0)); - var r = this.m; - return e[0] = r[0] * t + r[3] * i + r[6], e[1] = r[1] * t + r[4] * i + r[7], e - }, gt.prototype._$P2 = function (t) { - t || (t = new gt); - var i = this.m, - e = i[0], - r = i[1], - o = i[2], - n = i[3], - s = i[4], - _ = i[5], - a = i[6], - h = i[7], - l = i[8], - $ = e * s * l + r * _ * a + o * n * h - e * _ * h - o * s * a - r * n * l; - if (0 == $) return null; - var u = 1 / $; - return t.m[0] = u * (s * l - h * _), t.m[1] = u * (h * o - r * l), t.m[2] = u * (r * _ - s * o), t.m[3] = u * (a * _ - n * l), t.m[4] = u * (e * l - a * o), t.m[5] = u * (n * o - e * _), t.m[6] = u * (n * h - a * s), t.m[7] = u * (a * r - e * h), t.m[8] = u * (e * s - n * r), t - }, gt.prototype.transform = function (t, i, e) { - null == e && (e = new Array(0, 0)); - var r = this.m; - return e[0] = r[0] * t + r[3] * i + r[6], e[1] = r[1] * t + r[4] * i + r[7], e - }, gt.prototype.translate = function (t, i) { - var e = this.m; - e[6] = e[0] * t + e[3] * i + e[6], e[7] = e[1] * t + e[4] * i + e[7], e[8] = e[2] * t + e[5] * i + e[8] - }, gt.prototype.scale = function (t, i) { - var e = this.m; - e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= i, e[4] *= i, e[5] *= i - }, gt.prototype.shear = function (t, i) { - var e = this.m, - r = e[0] + e[3] * i, - o = e[1] + e[4] * i, - n = e[2] + e[5] * i; - e[3] = e[0] * t + e[3], e[4] = e[1] * t + e[4], e[5] = e[2] * t + e[5], e[0] = r, e[1] = o, e[2] = n - }, gt.prototype.rotate = function (t) { - var i = this.m, - e = Math.cos(t), - r = Math.sin(t), - o = i[0] * e + i[3] * r, - n = i[1] * e + i[4] * r, - s = i[2] * e + i[5] * r; - i[3] = -i[0] * r + i[3] * e, i[4] = -i[1] * r + i[4] * e, i[5] = -i[2] * r + i[5] * e, i[0] = o, i[1] = n, i[2] = s - }, gt.prototype.concatenate = function (t) { - var i = this.m, - e = t.m, - r = i[0] * e[0] + i[3] * e[1] + i[6] * e[2], - o = i[1] * e[0] + i[4] * e[1] + i[7] * e[2], - n = i[2] * e[0] + i[5] * e[1] + i[8] * e[2], - s = i[0] * e[3] + i[3] * e[4] + i[6] * e[5], - _ = i[1] * e[3] + i[4] * e[4] + i[7] * e[5], - a = i[2] * e[3] + i[5] * e[4] + i[8] * e[5], - h = i[0] * e[6] + i[3] * e[7] + i[6] * e[8], - l = i[1] * e[6] + i[4] * e[7] + i[7] * e[8], - $ = i[2] * e[6] + i[5] * e[7] + i[8] * e[8]; - m[0] = r, m[1] = o, m[2] = n, m[3] = s, m[4] = _, m[5] = a, m[6] = h, m[7] = l, m[8] = $ - }, yt.prototype = new et, yt._$eT = null, yt._$tP = new Object, yt._$2o = function () { - return null == yt._$eT && (yt._$eT = yt.getID("DST_BASE")), yt._$eT - }, yt._$27 = function () { - yt._$tP.clear(), yt._$eT = null - }, yt.getID = function (t) { - var i = yt._$tP[t]; - return null == i && (i = new yt(t), yt._$tP[t] = i), i - }, yt.prototype._$3s = function () { - return new yt - }, mt.prototype = new E, mt._$9r = function (t) { - return new Float32Array(t) - }, mt._$vb = function (t) { - return new Int16Array(t) - }, mt._$cr = function (t, i) { - return null == t || t._$yL() < i.length ? (t = mt._$9r(2 * i.length), t.put(i), t._$oT(0)) : (t.clear(), t.put(i), t._$oT(0)), t - }, mt._$mb = function (t, i) { - return null == t || t._$yL() < i.length ? (t = mt._$vb(2 * i.length), t.put(i), t._$oT(0)) : (t.clear(), t.put(i), t._$oT(0)), t - }, mt._$Hs = function () { - return this._$Gr - }, mt._$as = function (t) { - this._$Gr = t - }, mt.prototype.getGL = function () { - return this.gl - }, mt.prototype.setGL = function (t) { - this.gl = t - }, mt.prototype.setTransform = function (t) { - this.transform = t - }, mt.prototype._$ZT = function () { - var t = this.gl; - this.firstDraw && (this.initShader(), this.firstDraw = !1, this.anisotropyExt = t.getExtension("EXT_texture_filter_anisotropic") || t.getExtension("WEBKIT_EXT_texture_filter_anisotropic") || t.getExtension("MOZ_EXT_texture_filter_anisotropic"), this.anisotropyExt && (this.maxAnisotropy = t.getParameter(this.anisotropyExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT))), t.disable(t.SCISSOR_TEST), t.disable(t.STENCIL_TEST), t.disable(t.DEPTH_TEST), t.frontFace(t.CW), t.enable(t.BLEND), t.colorMask(1, 1, 1, 1), t.bindBuffer(t.ARRAY_BUFFER, null), t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, null) - }, mt.prototype._$Uo = function (t, i, e, r, o, n, s, _) { - if (!(n < .01 && null == this.clipBufPre_clipContextMask)) { - var a = (n > .9 && at.EXPAND_W, this.gl); - if (null == this.gl) throw new Error("gl is null"); - var h = 1 * this._$C0 * n, - l = 1 * this._$tT * n, - $ = 1 * this._$WL * n, - u = this._$lT * n; - if (null != this.clipBufPre_clipContextMask) { - a.frontFace(a.CCW), a.useProgram(this.shaderProgram), this._$vS = Tt(a, this._$vS, r), this._$no = Pt(a, this._$no, e), a.enableVertexAttribArray(this.a_position_Loc), a.vertexAttribPointer(this.a_position_Loc, 2, a.FLOAT, !1, 0, 0), this._$NT = Tt(a, this._$NT, o), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, this.textures[t]), a.uniform1i(this.s_texture0_Loc, 1), a.enableVertexAttribArray(this.a_texCoord_Loc), a.vertexAttribPointer(this.a_texCoord_Loc, 2, a.FLOAT, !1, 0, 0), a.uniformMatrix4fv(this.u_matrix_Loc, !1, this.getClipBufPre_clipContextMask().matrixForMask); - var p = this.getClipBufPre_clipContextMask().layoutChannelNo, - f = this.getChannelFlagAsColor(p); - a.uniform4f(this.u_channelFlag, f.r, f.g, f.b, f.a); - var c = this.getClipBufPre_clipContextMask().layoutBounds; - a.uniform4f(this.u_baseColor_Loc, 2 * c.x - 1, 2 * c.y - 1, 2 * c._$EL() - 1, 2 * c._$5T() - 1), a.uniform1i(this.u_maskFlag_Loc, !0) - } else if (null != this.getClipBufPre_clipContextDraw()) { - a.useProgram(this.shaderProgramOff), this._$vS = Tt(a, this._$vS, r), this._$no = Pt(a, this._$no, e), a.enableVertexAttribArray(this.a_position_Loc_Off), a.vertexAttribPointer(this.a_position_Loc_Off, 2, a.FLOAT, !1, 0, 0), this._$NT = Tt(a, this._$NT, o), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, this.textures[t]), a.uniform1i(this.s_texture0_Loc_Off, 1), a.enableVertexAttribArray(this.a_texCoord_Loc_Off), a.vertexAttribPointer(this.a_texCoord_Loc_Off, 2, a.FLOAT, !1, 0, 0), a.uniformMatrix4fv(this.u_clipMatrix_Loc_Off, !1, this.getClipBufPre_clipContextDraw().matrixForDraw), a.uniformMatrix4fv(this.u_matrix_Loc_Off, !1, this.matrix4x4), a.activeTexture(a.TEXTURE2), a.bindTexture(a.TEXTURE_2D, at.fTexture[this.glno]), a.uniform1i(this.s_texture1_Loc_Off, 2); - var p = this.getClipBufPre_clipContextDraw().layoutChannelNo, - f = this.getChannelFlagAsColor(p); - a.uniform4f(this.u_channelFlag_Loc_Off, f.r, f.g, f.b, f.a), a.uniform4f(this.u_baseColor_Loc_Off, h, l, $, u) - } else a.useProgram(this.shaderProgram), this._$vS = Tt(a, this._$vS, r), this._$no = Pt(a, this._$no, e), a.enableVertexAttribArray(this.a_position_Loc), a.vertexAttribPointer(this.a_position_Loc, 2, a.FLOAT, !1, 0, 0), this._$NT = Tt(a, this._$NT, o), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, this.textures[t]), a.uniform1i(this.s_texture0_Loc, 1), a.enableVertexAttribArray(this.a_texCoord_Loc), a.vertexAttribPointer(this.a_texCoord_Loc, 2, a.FLOAT, !1, 0, 0), a.uniformMatrix4fv(this.u_matrix_Loc, !1, this.matrix4x4), a.uniform4f(this.u_baseColor_Loc, h, l, $, u), a.uniform1i(this.u_maskFlag_Loc, !1); - this.culling ? this.gl.enable(a.CULL_FACE) : this.gl.disable(a.CULL_FACE), this.gl.enable(a.BLEND); - var d, g, y, m; - if (null != this.clipBufPre_clipContextMask) d = a.ONE, g = a.ONE_MINUS_SRC_ALPHA, y = a.ONE, m = a.ONE_MINUS_SRC_ALPHA; - else switch (s) { - case $t._$ms: - d = a.ONE, g = a.ONE_MINUS_SRC_ALPHA, y = a.ONE, m = a.ONE_MINUS_SRC_ALPHA; - break; - case $t._$ns: - d = a.ONE, g = a.ONE, y = a.ZERO, m = a.ONE; - break; - case $t._$_s: - d = a.DST_COLOR, g = a.ONE_MINUS_SRC_ALPHA, y = a.ZERO, m = a.ONE - } - a.blendEquationSeparate(a.FUNC_ADD, a.FUNC_ADD), a.blendFuncSeparate(d, g, y, m), this.anisotropyExt && a.texParameteri(a.TEXTURE_2D, this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT, this.maxAnisotropy); - var T = e.length; - a.drawElements(a.TRIANGLES, T, a.UNSIGNED_SHORT, 0), a.bindTexture(a.TEXTURE_2D, null) - } - }, mt.prototype._$Rs = function () { - throw new Error("_$Rs") - }, mt.prototype._$Ds = function (t) { - throw new Error("_$Ds") - }, mt.prototype._$K2 = function () { - for (var t = 0; t < this.textures.length; t++) { - 0 != this.textures[t] && (this.gl._$K2(1, this.textures, t), this.textures[t] = null) - } - }, mt.prototype.setTexture = function (t, i) { - this.textures[t] = i - }, mt.prototype.initShader = function () { - var t = this.gl; - this.loadShaders2(), this.a_position_Loc = t.getAttribLocation(this.shaderProgram, "a_position"), this.a_texCoord_Loc = t.getAttribLocation(this.shaderProgram, "a_texCoord"), this.u_matrix_Loc = t.getUniformLocation(this.shaderProgram, "u_mvpMatrix"), this.s_texture0_Loc = t.getUniformLocation(this.shaderProgram, "s_texture0"), this.u_channelFlag = t.getUniformLocation(this.shaderProgram, "u_channelFlag"), this.u_baseColor_Loc = t.getUniformLocation(this.shaderProgram, "u_baseColor"), this.u_maskFlag_Loc = t.getUniformLocation(this.shaderProgram, "u_maskFlag"), this.a_position_Loc_Off = t.getAttribLocation(this.shaderProgramOff, "a_position"), this.a_texCoord_Loc_Off = t.getAttribLocation(this.shaderProgramOff, "a_texCoord"), this.u_matrix_Loc_Off = t.getUniformLocation(this.shaderProgramOff, "u_mvpMatrix"), this.u_clipMatrix_Loc_Off = t.getUniformLocation(this.shaderProgramOff, "u_ClipMatrix"), this.s_texture0_Loc_Off = t.getUniformLocation(this.shaderProgramOff, "s_texture0"), this.s_texture1_Loc_Off = t.getUniformLocation(this.shaderProgramOff, "s_texture1"), this.u_channelFlag_Loc_Off = t.getUniformLocation(this.shaderProgramOff, "u_channelFlag"), this.u_baseColor_Loc_Off = t.getUniformLocation(this.shaderProgramOff, "u_baseColor") - }, mt.prototype.disposeShader = function () { - var t = this.gl; - this.shaderProgram && (t.deleteProgram(this.shaderProgram), this.shaderProgram = null), this.shaderProgramOff && (t.deleteProgram(this.shaderProgramOff), this.shaderProgramOff = null) - }, mt.prototype.compileShader = function (t, i) { - var e = this.gl, - r = i, - o = e.createShader(t); - if (null == o) return _._$Ji("_$L0 to create shader"), null; - if (e.shaderSource(o, r), e.compileShader(o), !e.getShaderParameter(o, e.COMPILE_STATUS)) { - var n = e.getShaderInfoLog(o); - return _._$Ji("_$L0 to compile shader : " + n), e.deleteShader(o), null - } - return o - }, mt.prototype.loadShaders2 = function () { - var t = this.gl; - if (this.shaderProgram = t.createProgram(), !this.shaderProgram) return !1; - if (this.shaderProgramOff = t.createProgram(), !this.shaderProgramOff) return !1; - if (this.vertShader = this.compileShader(t.VERTEX_SHADER, "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_mvpMatrix * a_position; v_texCoord = a_texCoord;}"), !this.vertShader) return _._$Ji("Vertex shader compile _$li!"), !1; - if (this.vertShaderOff = this.compileShader(t.VERTEX_SHADER, "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;uniform mat4 u_ClipMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_ClipMatrix * a_position; v_texCoord = a_texCoord ;}"), !this.vertShaderOff) return _._$Ji("OffVertex shader compile _$li!"), !1; - if (this.fragShader = this.compileShader(t.FRAGMENT_SHADER, "precision mediump float;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform sampler2D s_texture0;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;uniform bool u_maskFlag;void main(){ vec4 smpColor; if(u_maskFlag){ float isInside = step(u_baseColor.x, v_ClipPos.x/v_ClipPos.w) * step(u_baseColor.y, v_ClipPos.y/v_ClipPos.w) * step(v_ClipPos.x/v_ClipPos.w, u_baseColor.z) * step(v_ClipPos.y/v_ClipPos.w, u_baseColor.w); smpColor = u_channelFlag * texture2D(s_texture0 , v_texCoord).a * isInside; }else{ smpColor = texture2D(s_texture0 , v_texCoord) * u_baseColor; } gl_FragColor = smpColor;}"), !this.fragShader) return _._$Ji("Fragment shader compile _$li!"), !1; - if (this.fragShaderOff = this.compileShader(t.FRAGMENT_SHADER, "precision mediump float ;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor ;void main(){ vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor; vec4 clipMask = texture2D(s_texture1, v_ClipPos.xy / v_ClipPos.w) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}"), !this.fragShaderOff) return _._$Ji("OffFragment shader compile _$li!"), !1; - if (t.attachShader(this.shaderProgram, this.vertShader), t.attachShader(this.shaderProgram, this.fragShader), t.attachShader(this.shaderProgramOff, this.vertShaderOff), t.attachShader(this.shaderProgramOff, this.fragShaderOff), t.linkProgram(this.shaderProgram), t.linkProgram(this.shaderProgramOff), !t.getProgramParameter(this.shaderProgram, t.LINK_STATUS)) { - var i = t.getProgramInfoLog(this.shaderProgram); - return _._$Ji("_$L0 to link program: " + i), this.vertShader && (t.deleteShader(this.vertShader), this.vertShader = 0), this.fragShader && (t.deleteShader(this.fragShader), this.fragShader = 0), this.shaderProgram && (t.deleteProgram(this.shaderProgram), this.shaderProgram = 0), this.vertShaderOff && (t.deleteShader(this.vertShaderOff), this.vertShaderOff = 0), this.fragShaderOff && (t.deleteShader(this.fragShaderOff), this.fragShaderOff = 0), this.shaderProgramOff && (t.deleteProgram(this.shaderProgramOff), this.shaderProgramOff = 0), !1 - } - return !0 - }, mt.prototype.createFramebuffer = function () { - var t = this.gl, - i = at.clippingMaskBufferSize, - e = t.createFramebuffer(); - t.bindFramebuffer(t.FRAMEBUFFER, e); - var r = t.createRenderbuffer(); - t.bindRenderbuffer(t.RENDERBUFFER, r), t.renderbufferStorage(t.RENDERBUFFER, t.RGBA4, i, i), t.framebufferRenderbuffer(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.RENDERBUFFER, r); - var o = t.createTexture(); - return t.bindTexture(t.TEXTURE_2D, o), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, i, i, 0, t.RGBA, t.UNSIGNED_BYTE, null), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, o, 0), t.bindTexture(t.TEXTURE_2D, null), t.bindRenderbuffer(t.RENDERBUFFER, null), t.bindFramebuffer(t.FRAMEBUFFER, null), at.fTexture[this.glno] = o, { - framebuffer: e, - renderbuffer: r, - texture: at.fTexture[this.glno] - } - }, St.prototype._$fP = function () { - var t, i, e, r = this._$ST(); - if (0 == (128 & r)) return 255 & r; - if (0 == (128 & (t = this._$ST()))) return (127 & r) << 7 | 127 & t; - if (0 == (128 & (i = this._$ST()))) return (127 & r) << 14 | (127 & t) << 7 | 255 & i; - if (0 == (128 & (e = this._$ST()))) return (127 & r) << 21 | (127 & t) << 14 | (127 & i) << 7 | 255 & e; - throw new lt("_$L _$0P _") - }, St.prototype.getFormatVersion = function () { - return this._$S2 - }, St.prototype._$gr = function (t) { - this._$S2 = t - }, St.prototype._$3L = function () { - return this._$fP() - }, St.prototype._$mP = function () { - return this._$zT(), this._$F += 8, this._$T.getFloat64(this._$F - 8) - }, St.prototype._$_T = function () { - return this._$zT(), this._$F += 4, this._$T.getFloat32(this._$F - 4) - }, St.prototype._$6L = function () { - return this._$zT(), this._$F += 4, this._$T.getInt32(this._$F - 4) - }, St.prototype._$ST = function () { - return this._$zT(), this._$T.getInt8(this._$F++) - }, St.prototype._$9T = function () { - return this._$zT(), this._$F += 2, this._$T.getInt16(this._$F - 2) - }, St.prototype._$2T = function () { - throw this._$zT(), this._$F += 8, new lt("_$L _$q read long") - }, St.prototype._$po = function () { - return this._$zT(), 0 != this._$T.getInt8(this._$F++) - }; - var xt = !0; - St.prototype._$bT = function () { - this._$zT(); - var t = this._$3L(), - i = null; - if (xt) try { - var e = new ArrayBuffer(2 * t); - i = new Uint16Array(e); - for (var r = 0; r < t; ++r) i[r] = this._$T.getUint8(this._$F++); - return String.fromCharCode.apply(null, i) - } catch (t) { - xt = !1 - } - try { - var o = new Array; - if (null == i) - for (var r = 0; r < t; ++r) o[r] = this._$T.getUint8(this._$F++); - else - for (var r = 0; r < t; ++r) o[r] = i[r]; - return String.fromCharCode.apply(null, o) - } catch (t) { - console.log("read utf8 / _$rT _$L0 !! : " + t) - } - }, St.prototype._$cS = function () { - this._$zT(); - for (var t = this._$3L(), i = new Int32Array(t), e = 0; e < t; e++) i[e] = this._$T.getInt32(this._$F), this._$F += 4; - return i - }, St.prototype._$Tb = function () { - this._$zT(); - for (var t = this._$3L(), i = new Float32Array(t), e = 0; e < t; e++) i[e] = this._$T.getFloat32(this._$F), this._$F += 4; - return i - }, St.prototype._$5b = function () { - this._$zT(); - for (var t = this._$3L(), i = new Float64Array(t), e = 0; e < t; e++) i[e] = this._$T.getFloat64(this._$F), this._$F += 8; - return i - }, St.prototype._$nP = function () { - return this._$Jb(-1) - }, St.prototype._$Jb = function (t) { - if (this._$zT(), t < 0 && (t = this._$3L()), t == G._$7P) { - var i = this._$6L(); - if (0 <= i && i < this._$Ko.length) return this._$Ko[i]; - throw new lt("_$sL _$4i @_$m0") - } - var e = this._$4b(t); - return this._$Ko.push(e), e - }, St.prototype._$4b = function (t) { - if (0 == t) return null; - if (50 == t) { - var i = this._$bT(), - e = b.getID(i); - return e - } - if (51 == t) { - var i = this._$bT(), - e = yt.getID(i); - return e - } - if (134 == t) { - var i = this._$bT(), - e = l.getID(i); - return e - } - if (60 == t) { - var i = this._$bT(), - e = u.getID(i); - return e - } - if (t >= 48) { - var r = G._$9o(t); - return null != r ? (r._$F0(this), r) : null - } - switch (t) { - case 1: - return this._$bT(); - case 10: - return new n(this._$6L(), !0); - case 11: - return new S(this._$mP(), this._$mP(), this._$mP(), this._$mP()); - case 12: - return new S(this._$_T(), this._$_T(), this._$_T(), this._$_T()); - case 13: - return new L(this._$mP(), this._$mP()); - case 14: - return new L(this._$_T(), this._$_T()); - case 15: - for (var o = this._$3L(), e = new Array(o), s = 0; s < o; s++) e[s] = this._$nP(); - return e; - case 17: - var e = new F(this._$mP(), this._$mP(), this._$mP(), this._$mP(), this._$mP(), this._$mP()); - return e; - case 21: - return new h(this._$6L(), this._$6L(), this._$6L(), this._$6L()); - case 22: - return new pt(this._$6L(), this._$6L()); - case 23: - throw new Error("_$L _$ro "); - case 16: - case 25: - return this._$cS(); - case 26: - return this._$5b(); - case 27: - return this._$Tb(); - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 18: - case 19: - case 20: - case 24: - case 28: - throw new lt("_$6 _$q : _$nP() of 2-9 ,18,19,20,24,28 : " + t); - default: - throw new lt("_$6 _$q : _$nP() NO _$i : " + t) - } - }, St.prototype._$8L = function () { - return 0 == this._$hL ? this._$v0 = this._$ST() : 8 == this._$hL && (this._$v0 = this._$ST(), this._$hL = 0), 1 == (this._$v0 >> 7 - this._$hL++ & 1) - }, St.prototype._$zT = function () { - 0 != this._$hL && (this._$hL = 0) - }, vt.prototype._$wP = function (t, i, e) { - for (var r = 0; r < e; r++) { - for (var o = 0; o < i; o++) { - var n = 2 * (o + r * i); - console.log("(% 7.3f , % 7.3f) , ", t[n], t[n + 1]) - } - console.log("\n") - } - console.log("\n") - }, Lt._$2S = Math.PI / 180, Lt._$bS = Math.PI / 180, Lt._$wS = 180 / Math.PI, Lt._$NS = 180 / Math.PI, Lt.PI_F = Math.PI, Lt._$kT = [0, .012368, .024734, .037097, .049454, .061803, .074143, .086471, .098786, .111087, .12337, .135634, .147877, .160098, .172295, .184465, .196606, .208718, .220798, .232844, .244854, .256827, .268761, .280654, .292503, .304308, .316066, .327776, .339436, .351044, .362598, .374097, .385538, .396921, .408243, .419502, .430697, .441826, .452888, .463881, .474802, .485651, .496425, .507124, .517745, .528287, .538748, .549126, .559421, .56963, .579752, .589785, .599728, .609579, .619337, .629, .638567, .648036, .657406, .666676, .675843, .684908, .693867, .70272, .711466, .720103, .72863, .737045, .745348, .753536, .76161, .769566, .777405, .785125, .792725, .800204, .807561, .814793, .821901, .828884, .835739, .842467, .849066, .855535, .861873, .868079, .874153, .880093, .885898, .891567, .897101, .902497, .907754, .912873, .917853, .922692, .92739, .931946, .936359, .940629, .944755, .948737, .952574, .956265, .959809, .963207, .966457, .96956, .972514, .97532, .977976, .980482, .982839, .985045, .987101, .989006, .990759, .992361, .993811, .995109, .996254, .997248, .998088, .998776, .999312, .999694, .999924, 1], Lt._$92 = function (t, i) { - var e = Math.atan2(t[1], t[0]), - r = Math.atan2(i[1], i[0]); - return Lt._$tS(e, r) - }, Lt._$tS = function (t, i) { - for (var e = t - i; e < -Math.PI;) e += 2 * Math.PI; - for (; e > Math.PI;) e -= 2 * Math.PI; - return e - }, Lt._$9 = function (t) { - return Math.sin(t) - }, Lt.fcos = function (t) { - return Math.cos(t) - }, Mt.prototype._$u2 = function () { - return this._$IS[0] - }, Mt.prototype._$yo = function () { - return this._$AT && !this._$IS[0] - }, Mt.prototype._$GT = function () { - return this._$e0 - }, Et._$W2 = 0, Et.SYSTEM_INFO = null, Et.USER_AGENT = navigator.userAgent, Et.isIPhone = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isIPhone - }, Et.isIOS = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad - }, Et.isAndroid = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isAndroid - }, Et.getOSVersion = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO.version - }, Et.getOS = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad ? "iOS" : Et.SYSTEM_INFO._isAndroid ? "Android" : "_$Q0 OS" - }, Et.setup = function () { - function t(t, i) { - for (var e = t.substring(i).split(/[ _,;\.]/), r = 0, o = 0; o <= 2 && !isNaN(e[o]); o++) { - var n = parseInt(e[o]); - if (n < 0 || n > 999) { - _._$li("err : " + n + " @UtHtml5.setup()"), r = 0; - break - } - r += n * Math.pow(1e3, 2 - o) - } - return r - } - var i, e = Et.USER_AGENT, - r = Et.SYSTEM_INFO = { - userAgent: e - }; - if ((i = e.indexOf("iPhone OS ")) >= 0) r.os = "iPhone", r._isIPhone = !0, r.version = t(e, i + "iPhone OS ".length); - else if ((i = e.indexOf("iPad")) >= 0) { - if ((i = e.indexOf("CPU OS")) < 0) return void _._$li(" err : " + e + " @UtHtml5.setup()"); - r.os = "iPad", r._isIPad = !0, r.version = t(e, i + "CPU OS ".length) - } else(i = e.indexOf("Android")) >= 0 ? (r.os = "Android", r._isAndroid = !0, r.version = t(e, i + "Android ".length)) : (r.os = "-", r.version = -1) - }, window.UtSystem = w, window.UtDebug = _, window.LDTransform = gt, window.LDGL = nt, window.Live2D = at, window.Live2DModelWebGL = ft, window.Live2DModelJS = q, window.Live2DMotion = J, window.MotionQueueManager = ct, window.PhysicsHair = f, window.AMotion = s, window.PartsDataID = l, window.DrawDataID = b, window.BaseDataID = yt, window.ParamID = u, at.init(); - var At = !1 - }() - }).call(i, e(7)) -}, function (t, i) { - t.exports = { - import: function () { - throw new Error("System.import cannot be used indirectly") - } - } -}, function (t, i, e) { - "use strict"; - - function r(t) { - return t && t.__esModule ? t : { - default: t - } - } - - function o() { - this.models = [], this.count = -1, this.reloadFlg = !1, Live2D.init(), n.Live2DFramework.setPlatformManager(new _.default) - } - Object.defineProperty(i, "__esModule", { - value: !0 - }), i.default = o; - var n = e(0), - s = e(9), - _ = r(s), - a = e(10), - h = r(a), - l = e(1), - $ = r(l); - o.prototype.createModel = function () { - var t = new h.default; - return this.models.push(t), t - }, o.prototype.changeModel = function (t, i) { - if (this.reloadFlg) { - this.reloadFlg = !1; - this.releaseModel(0, t), this.createModel(), this.models[0].load(t, i) - } - }, o.prototype.getModel = function (t) { - return t >= this.models.length ? null : this.models[t] - }, o.prototype.releaseModel = function (t, i) { - this.models.length <= t || (this.models[t].release(i), delete this.models[t], this.models.splice(t, 1)) - }, o.prototype.numModels = function () { - return this.models.length - }, o.prototype.setDrag = function (t, i) { - for (var e = 0; e < this.models.length; e++) this.models[e].setDrag(t, i) - }, o.prototype.maxScaleEvent = function () { - $.default.DEBUG_LOG && console.log("Max scale event."); - for (var t = 0; t < this.models.length; t++) this.models[t].startRandomMotion($.default.MOTION_GROUP_PINCH_IN, $.default.PRIORITY_NORMAL) - }, o.prototype.minScaleEvent = function () { - $.default.DEBUG_LOG && console.log("Min scale event."); - for (var t = 0; t < this.models.length; t++) this.models[t].startRandomMotion($.default.MOTION_GROUP_PINCH_OUT, $.default.PRIORITY_NORMAL) - }, o.prototype.tapEvent = function (t, i) { - $.default.DEBUG_LOG && console.log("tapEvent view x:" + t + " y:" + i); - for (var e = 0; e < this.models.length; e++) this.models[e].hitTest($.default.HIT_AREA_HEAD, t, i) ? ($.default.DEBUG_LOG && console.log("Tap face."), this.models[e].setRandomExpression()) : this.models[e].hitTest($.default.HIT_AREA_BODY, t, i) ? ($.default.DEBUG_LOG && console.log("Tap body. models[" + e + "]"), this.models[e].startRandomMotion($.default.MOTION_GROUP_TAP_BODY, $.default.PRIORITY_NORMAL)) : this.models[e].hitTestCustom("head", t, i) ? ($.default.DEBUG_LOG && console.log("Tap face."), this.models[e].startRandomMotion($.default.MOTION_GROUP_FLICK_HEAD, $.default.PRIORITY_NORMAL)) : this.models[e].hitTestCustom("body", t, i) && ($.default.DEBUG_LOG && console.log("Tap body. models[" + e + "]"), this.models[e].startRandomMotion($.default.MOTION_GROUP_TAP_BODY, $.default.PRIORITY_NORMAL)); - return !0 - } -}, function (t, i, e) { - "use strict"; - - function r() {} - Object.defineProperty(i, "__esModule", { - value: !0 - }), i.default = r; - var o = e(2); - r.prototype.loadBytes = function (t, i) { - var e = new XMLHttpRequest; - e.open("GET", t, !0), e.responseType = "arraybuffer", e.onload = function () { - switch (e.status) { - case 200: - i(e.response); - break; - default: - console.error("Failed to load (" + e.status + ") : " + t) - } - }, e.send(null) - }, r.prototype.loadString = function (t) { - this.loadBytes(t, function (t) { - return t - }) - }, r.prototype.loadLive2DModel = function (t, i) { - var e = null; - this.loadBytes(t, function (t) { - e = Live2DModelWebGL.loadModel(t), i(e) - }) - }, r.prototype.loadTexture = function (t, i, e, r) { - var n = new Image; - //n.src = e+"?"+Math.random(), n.crossOrigin = "Anonymous"; - n.src = Live2D_img_path, n.crossOrigin = "Anonymous"; - //console.info(n.src); - n.onload = function () { - var e = (0, o.getContext)(), - s = e.createTexture(); - if (!s) return console.error("Failed to generate gl texture name."), -1; - 0 == t.isPremultipliedAlpha() && e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, 1), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, s), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, n), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR_MIPMAP_NEAREST), e.generateMipmap(e.TEXTURE_2D), t.setTexture(i, s), s = null, "function" == typeof r && r() - }, n.onerror = function () { - console.error("Failed to load image : " + e) - } - }, r.prototype.jsonParseFromBytes = function (t) { - var i, e = new Uint8Array(t, 0, 3); - return i = 239 == e[0] && 187 == e[1] && 191 == e[2] ? String.fromCharCode.apply(null, new Uint8Array(t, 3)) : String.fromCharCode.apply(null, new Uint8Array(t)), JSON.parse(i) - }, r.prototype.log = function (t) {} -}, function (t, i, e) { - "use strict"; - - function r(t) { - return t && t.__esModule ? t : { - default: t - } - } - - function o() { - n.L2DBaseModel.prototype.constructor.call(this), this.modelHomeDir = "", this.modelSetting = null, this.tmpMatrix = [] - } - Object.defineProperty(i, "__esModule", { - value: !0 - }), i.default = o; - var n = e(0), - s = e(11), - _ = r(s), - a = e(1), - h = r(a), - l = e(3), - $ = r(l); - o.prototype = new n.L2DBaseModel, o.prototype.load = function (t, i, e) { - this.setUpdating(!0), this.setInitialized(!1), this.modelHomeDir = i.substring(0, i.lastIndexOf("/") + 1), this.modelSetting = new _.default; - var r = this; - this.modelSetting.loadModelSetting(i, function () { - var t = r.modelHomeDir + r.modelSetting.getModelFile(); - r.loadModelData(t, function (t) { - for (var i = 0; i < r.modelSetting.getTextureNum(); i++) { - if (/^https?:\/\/|^\/\//i.test(r.modelSetting.getTextureFile(i))) var o = r.modelSetting.getTextureFile(i); - else var o = r.modelHomeDir + r.modelSetting.getTextureFile(i); - r.loadTexture(i, o, function () { - if (r.isTexLoaded) { - if (r.modelSetting.getExpressionNum() > 0) { - r.expressions = {}; - for (var t = 0; t < r.modelSetting.getExpressionNum(); t++) { - var i = r.modelSetting.getExpressionName(t), - o = r.modelHomeDir + r.modelSetting.getExpressionFile(t); - r.loadExpression(i, o) - } - } else r.expressionManager = null, r.expressions = {}; - if (r.eyeBlink, null != r.modelSetting.getPhysicsFile() ? r.loadPhysics(r.modelHomeDir + r.modelSetting.getPhysicsFile()) : r.physics = null, null != r.modelSetting.getPoseFile() ? r.loadPose(r.modelHomeDir + r.modelSetting.getPoseFile(), function () { - r.pose.updateParam(r.live2DModel) - }) : r.pose = null, null != r.modelSetting.getLayout()) { - var n = r.modelSetting.getLayout(); - null != n.width && r.modelMatrix.setWidth(n.width), null != n.height && r.modelMatrix.setHeight(n.height), null != n.x && r.modelMatrix.setX(n.x), null != n.y && r.modelMatrix.setY(n.y), null != n.center_x && r.modelMatrix.centerX(n.center_x), null != n.center_y && r.modelMatrix.centerY(n.center_y), null != n.top && r.modelMatrix.top(n.top), null != n.bottom && r.modelMatrix.bottom(n.bottom), null != n.left && r.modelMatrix.left(n.left), null != n.right && r.modelMatrix.right(n.right) - } - if (null != r.modelSetting.getHitAreasCustom()) { - var s = r.modelSetting.getHitAreasCustom(); - null != s.head_x && (h.default.hit_areas_custom_head_x = s.head_x), null != s.head_y && (h.default.hit_areas_custom_head_y = s.head_y), null != s.body_x && (h.default.hit_areas_custom_body_x = s.body_x), null != s.body_y && (h.default.hit_areas_custom_body_y = s.body_y) - } - for (var t = 0; t < r.modelSetting.getInitParamNum(); t++) r.live2DModel.setParamFloat(r.modelSetting.getInitParamID(t), r.modelSetting.getInitParamValue(t)); - for (var t = 0; t < r.modelSetting.getInitPartsVisibleNum(); t++) r.live2DModel.setPartsOpacity(r.modelSetting.getInitPartsVisibleID(t), r.modelSetting.getInitPartsVisibleValue(t)); - r.live2DModel.saveParam(), r.preloadMotionGroup(h.default.MOTION_GROUP_IDLE), r.preloadMotionGroup(h.default.MOTION_GROUP_SLEEPY), r.mainMotionManager.stopAllMotions(), r.setUpdating(!1), r.setInitialized(!0), "function" == typeof e && e() - } - }) - } - }) - }) - }, o.prototype.release = function (t) { - var i = n.Live2DFramework.getPlatformManager(); - t.deleteTexture(i.texture) - }, o.prototype.preloadMotionGroup = function (t) { - for (var i = this, e = 0; e < this.modelSetting.getMotionNum(t); e++) { - var r = this.modelSetting.getMotionFile(t, e); - this.loadMotion(r, this.modelHomeDir + r, function (r) { - r.setFadeIn(i.modelSetting.getMotionFadeIn(t, e)), r.setFadeOut(i.modelSetting.getMotionFadeOut(t, e)) - }) - } - }, o.prototype.update = function () { - if (null == this.live2DModel) return void(h.default.DEBUG_LOG && console.error("Failed to update.")); - var t = UtSystem.getUserTimeMSec() - this.startTimeMSec, - i = t / 1e3, - e = 2 * i * Math.PI; - if (this.mainMotionManager.isFinished()) { - "1" === sessionStorage.getItem("Sleepy") ? this.startRandomMotion(h.default.MOTION_GROUP_SLEEPY, h.default.PRIORITY_SLEEPY) : this.startRandomMotion(h.default.MOTION_GROUP_IDLE, h.default.PRIORITY_IDLE) - } - this.live2DModel.loadParam(), this.mainMotionManager.updateParam(this.live2DModel) || null != this.eyeBlink && this.eyeBlink.updateParam(this.live2DModel), this.live2DModel.saveParam(), null == this.expressionManager || null == this.expressions || this.expressionManager.isFinished() || this.expressionManager.updateParam(this.live2DModel), this.live2DModel.addToParamFloat("PARAM_ANGLE_X", 30 * this.dragX, 1), this.live2DModel.addToParamFloat("PARAM_ANGLE_Y", 30 * this.dragY, 1), this.live2DModel.addToParamFloat("PARAM_ANGLE_Z", this.dragX * this.dragY * -30, 1), this.live2DModel.addToParamFloat("PARAM_BODY_ANGLE_X", 10 * this.dragX, 1), this.live2DModel.addToParamFloat("PARAM_EYE_BALL_X", this.dragX, 1), this.live2DModel.addToParamFloat("PARAM_EYE_BALL_Y", this.dragY, 1), this.live2DModel.addToParamFloat("PARAM_ANGLE_X", Number(15 * Math.sin(e / 6.5345)), .5), this.live2DModel.addToParamFloat("PARAM_ANGLE_Y", Number(8 * Math.sin(e / 3.5345)), .5), this.live2DModel.addToParamFloat("PARAM_ANGLE_Z", Number(10 * Math.sin(e / 5.5345)), .5), this.live2DModel.addToParamFloat("PARAM_BODY_ANGLE_X", Number(4 * Math.sin(e / 15.5345)), .5), this.live2DModel.setParamFloat("PARAM_BREATH", Number(.5 + .5 * Math.sin(e / 3.2345)), 1), null != this.physics && this.physics.updateParam(this.live2DModel), null == this.lipSync && this.live2DModel.setParamFloat("PARAM_MOUTH_OPEN_Y", this.lipSyncValue), null != this.pose && this.pose.updateParam(this.live2DModel), this.live2DModel.update() - }, o.prototype.setRandomExpression = function () { - var t = []; - for (var i in this.expressions) t.push(i); - var e = parseInt(Math.random() * t.length); - this.setExpression(t[e]) - }, o.prototype.startRandomMotion = function (t, i) { - var e = this.modelSetting.getMotionNum(t), - r = parseInt(Math.random() * e); - this.startMotion(t, r, i) - }, o.prototype.startMotion = function (t, i, e) { - var r = this.modelSetting.getMotionFile(t, i); - if (null == r || "" == r) return void(h.default.DEBUG_LOG && console.error("Failed to motion.")); - if (e == h.default.PRIORITY_FORCE) this.mainMotionManager.setReservePriority(e); - else if (!this.mainMotionManager.reserveMotion(e)) return void(h.default.DEBUG_LOG && console.log("Motion is running.")); - var o, n = this; - null == this.motions[t] ? this.loadMotion(null, this.modelHomeDir + r, function (r) { - o = r, n.setFadeInFadeOut(t, i, e, o) - }) : (o = this.motions[t], n.setFadeInFadeOut(t, i, e, o)) - }, o.prototype.setFadeInFadeOut = function (t, i, e, r) { - var o = this.modelSetting.getMotionFile(t, i); - if (r.setFadeIn(this.modelSetting.getMotionFadeIn(t, i)), r.setFadeOut(this.modelSetting.getMotionFadeOut(t, i)), h.default.DEBUG_LOG && console.log("Start motion : " + o), null == this.modelSetting.getMotionSound(t, i)) this.mainMotionManager.startMotionPrio(r, e); - else { - var n = this.modelSetting.getMotionSound(t, i), - s = document.createElement("audio"); - s.src = this.modelHomeDir + n, h.default.DEBUG_LOG && console.log("Start sound : " + n), s.play(), this.mainMotionManager.startMotionPrio(r, e) - } - }, o.prototype.setExpression = function (t) { - var i = this.expressions[t]; - h.default.DEBUG_LOG && console.log("Expression : " + t), this.expressionManager.startMotion(i, !1) - }, o.prototype.draw = function (t) { - $.default.push(), $.default.multMatrix(this.modelMatrix.getArray()), this.tmpMatrix = $.default.getMatrix(), this.live2DModel.setMatrix(this.tmpMatrix), this.live2DModel.draw(), $.default.pop() - }, o.prototype.hitTest = function (t, i, e) { - for (var r = this.modelSetting.getHitAreaNum(), o = 0; o < r; o++) - if (t == this.modelSetting.getHitAreaName(o)) { - var n = this.modelSetting.getHitAreaID(o); - return this.hitTestSimple(n, i, e) - } - return !1 - }, o.prototype.hitTestCustom = function (t, i, e) { - return "head" == t ? this.hitTestSimpleCustom(h.default.hit_areas_custom_head_x, h.default.hit_areas_custom_head_y, i, e) : "body" == t && this.hitTestSimpleCustom(h.default.hit_areas_custom_body_x, h.default.hit_areas_custom_body_y, i, e) - } -}, function (t, i, e) { - "use strict"; - - function r() { - this.NAME = "name", this.ID = "id", this.MODEL = "model", this.TEXTURES = "textures", this.HIT_AREAS = "hit_areas", this.PHYSICS = "physics", this.POSE = "pose", this.EXPRESSIONS = "expressions", this.MOTION_GROUPS = "motions", this.SOUND = "sound", this.FADE_IN = "fade_in", this.FADE_OUT = "fade_out", this.LAYOUT = "layout", this.HIT_AREAS_CUSTOM = "hit_areas_custom", this.INIT_PARAM = "init_param", this.INIT_PARTS_VISIBLE = "init_parts_visible", this.VALUE = "val", this.FILE = "file", this.json = {} - } - Object.defineProperty(i, "__esModule", { - value: !0 - }), i.default = r; - var o = e(0); - r.prototype.loadModelSetting = function (t, i) { - var e = this; - o.Live2DFramework.getPlatformManager().loadBytes(t, function (t) { - var r = String.fromCharCode.apply(null, new Uint8Array(t)); - e.json = JSON.parse(r), i() - }) - }, r.prototype.getTextureFile = function (t) { - return null == this.json[this.TEXTURES] || null == this.json[this.TEXTURES][t] ? null : this.json[this.TEXTURES][t] - }, r.prototype.getModelFile = function () { - return this.json[this.MODEL] - }, r.prototype.getTextureNum = function () { - return null == this.json[this.TEXTURES] ? 0 : this.json[this.TEXTURES].length - }, r.prototype.getHitAreaNum = function () { - return null == this.json[this.HIT_AREAS] ? 0 : this.json[this.HIT_AREAS].length - }, r.prototype.getHitAreaID = function (t) { - return null == this.json[this.HIT_AREAS] || null == this.json[this.HIT_AREAS][t] ? null : this.json[this.HIT_AREAS][t][this.ID] - }, r.prototype.getHitAreaName = function (t) { - return null == this.json[this.HIT_AREAS] || null == this.json[this.HIT_AREAS][t] ? null : this.json[this.HIT_AREAS][t][this.NAME] - }, r.prototype.getPhysicsFile = function () { - return this.json[this.PHYSICS] - }, r.prototype.getPoseFile = function () { - return this.json[this.POSE] - }, r.prototype.getExpressionNum = function () { - return null == this.json[this.EXPRESSIONS] ? 0 : this.json[this.EXPRESSIONS].length - }, r.prototype.getExpressionFile = function (t) { - return null == this.json[this.EXPRESSIONS] ? null : this.json[this.EXPRESSIONS][t][this.FILE] - }, r.prototype.getExpressionName = function (t) { - return null == this.json[this.EXPRESSIONS] ? null : this.json[this.EXPRESSIONS][t][this.NAME] - }, r.prototype.getLayout = function () { - return this.json[this.LAYOUT] - }, r.prototype.getHitAreasCustom = function () { - return this.json[this.HIT_AREAS_CUSTOM] - }, r.prototype.getInitParamNum = function () { - return null == this.json[this.INIT_PARAM] ? 0 : this.json[this.INIT_PARAM].length - }, r.prototype.getMotionNum = function (t) { - return null == this.json[this.MOTION_GROUPS] || null == this.json[this.MOTION_GROUPS][t] ? 0 : this.json[this.MOTION_GROUPS][t].length - }, r.prototype.getMotionFile = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || null == this.json[this.MOTION_GROUPS][t] || null == this.json[this.MOTION_GROUPS][t][i] ? null : this.json[this.MOTION_GROUPS][t][i][this.FILE] - }, r.prototype.getMotionSound = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || null == this.json[this.MOTION_GROUPS][t] || null == this.json[this.MOTION_GROUPS][t][i] || null == this.json[this.MOTION_GROUPS][t][i][this.SOUND] ? null : this.json[this.MOTION_GROUPS][t][i][this.SOUND] - }, r.prototype.getMotionFadeIn = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || null == this.json[this.MOTION_GROUPS][t] || null == this.json[this.MOTION_GROUPS][t][i] || null == this.json[this.MOTION_GROUPS][t][i][this.FADE_IN] ? 1e3 : this.json[this.MOTION_GROUPS][t][i][this.FADE_IN] - }, r.prototype.getMotionFadeOut = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || null == this.json[this.MOTION_GROUPS][t] || null == this.json[this.MOTION_GROUPS][t][i] || null == this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT] ? 1e3 : this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT] - }, r.prototype.getInitParamID = function (t) { - return null == this.json[this.INIT_PARAM] || null == this.json[this.INIT_PARAM][t] ? null : this.json[this.INIT_PARAM][t][this.ID] - }, r.prototype.getInitParamValue = function (t) { - return null == this.json[this.INIT_PARAM] || null == this.json[this.INIT_PARAM][t] ? NaN : this.json[this.INIT_PARAM][t][this.VALUE] - }, r.prototype.getInitPartsVisibleNum = function () { - return null == this.json[this.INIT_PARTS_VISIBLE] ? 0 : this.json[this.INIT_PARTS_VISIBLE].length - }, r.prototype.getInitPartsVisibleID = function (t) { - return null == this.json[this.INIT_PARTS_VISIBLE] || null == this.json[this.INIT_PARTS_VISIBLE][t] ? null : this.json[this.INIT_PARTS_VISIBLE][t][this.ID] - }, r.prototype.getInitPartsVisibleValue = function (t) { - return null == this.json[this.INIT_PARTS_VISIBLE] || null == this.json[this.INIT_PARTS_VISIBLE][t] ? NaN : this.json[this.INIT_PARTS_VISIBLE][t][this.VALUE] - } -}]); diff --git a/js/src/10.materialize.min.js b/js/src/10.materialize.min.js deleted file mode 100644 index 74647ef..0000000 --- a/js/src/10.materialize.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Materialize v1.0.0-alpha.3 (http://materializecss.com) - * Copyright 2014-2017 Materialize - * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE) - */ -var _get=function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in s)return s.value;var a=s.get;if(void 0!==a)return a.call(n)},_createClass=function(){function t(t,e){for(var i=0;i/,c=/^\w+$/;function p(e,i){i=i||t;var n=d.test(e)?i.getElementsByClassName(e.slice(1)):c.test(e)?i.getElementsByTagName(e):i.querySelectorAll(e);return n}var v;function f(e){if(!v){var i=(v=t.implementation.createHTMLDocument(null)).createElement("base");i.href=t.location.href,v.head.appendChild(i)}return v.body.innerHTML=e,v.body.childNodes}function m(e){"loading"!==t.readyState?e():t.addEventListener("DOMContentLoaded",e)}function g(i,n){if(!i)return this;if(i.cash&&i!==e)return i;var s,o=i,a=0;if(l(i))o=h.test(i)?t.getElementById(i.slice(1)):u.test(i)?f(i):p(i,n);else if(r(i))return m(i),this;if(!o)return this;if(o.nodeType||o===e)this[0]=o,this.length=1;else for(s=this.length=o.length;a1?this.each(function(e){return e.style[t]=i}):e.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}});function A(t,i){return parseInt(e.getComputedStyle(t[0],null)[i],10)||0}k(["Width","Height"],function(t){var e=t.toLowerCase();y[e]=function(){return this[0].getBoundingClientRect()[e]},y["inner"+t]=function(){return this[0]["client"+t]},y["outer"+t]=function(e){return this[0]["offset"+t]+(e?A(this,"margin"+("Width"===t?"Left":"Top"))+A(this,"margin"+("Width"===t?"Right":"Bottom")):0)}});function R(t,e,i){var n,s=L(t,"_cashEvents"),o=s&&s[e];o&&(i?(t.removeEventListener(e,i),(n=o.indexOf(i))>=0&&o.splice(n,1)):(k(o,function(i){t.removeEventListener(e,i)}),o=[]))}y.extend({off:function(t,e){return this.each(function(i){return R(i,t,e)})},on:function(t,e,i,n){var s;if(!l(t)){for(var o in t)this.on(o,e,t[o]);return this}return r(e)&&(i=e,e=null),"ready"===t?(m(i),this):(e&&(s=i,i=function(t){for(var i=t.target;!b(i,e);){if(i===this||null===i)return i=!1;i=i.parentNode}i&&s.call(i,t)}),this.each(function(e){var s=i;n&&(s=function(){i.apply(this,arguments),R(e,t,s)}),function(t,e,i){var n=L(t,"_cashEvents")||x(t,"_cashEvents",{});n[e]=n[e]||[],n[e].push(i),t.addEventListener(e,i)}(e,t,s)}))},one:function(t,e,i){return this.on(t,e,i,!0)},ready:m,trigger:function(t,e){if(document.createEvent){var i=document.createEvent("HTMLEvents");return i.initEvent(t,!0,!1),i=this.extend(i,e),this.each(function(t){return t.dispatchEvent(i)})}}});function H(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function P(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return function(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}(t);case"select-multiple":return function(t){var e=[];return k(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}y.extend({serialize:function(){var t="";return k(this[0].elements||this,function(e){if(!e.disabled&&"FIELDSET"!==e.tagName){var i=e.name;switch(e.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var n=P(e);null!==n&&k(n,function(e){t+=H(i,e)});break;default:var s=P(e);null!==s&&(t+=H(i,s))}}}),t.substr(1)},val:function(t){return void 0===t?P(this[0]):this.each(function(e){return e.value=t})}});function W(t,e,i){var n=l(e);n||!e.length?k(t,n?function(t){return t.insertAdjacentHTML(i?"afterbegin":"beforeend",e)}:function(t,n){return function(t,e,i){if(i){var n=t.childNodes[0];t.insertBefore(e,n)}else t.appendChild(e)}(t,0===n?e:e.cloneNode(!0),i)}):k(e,function(e){return W(t,e,i)})}y.extend({after:function(t){return _(t).insertAfter(this),this},append:function(t){return W(this,t),this},appendTo:function(t){return W(_(t),this),this},before:function(t){return _(t).insertBefore(this),this},clone:function(){return _(this.map(function(t){return t.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t){return t.innerHTML=e})},insertAfter:function(t){var e=this;return _(t).each(function(t,i){var n=t.parentNode,s=t.nextSibling;e.each(function(t){n.insertBefore(0===i?t:t.cloneNode(!0),s)})}),this},insertBefore:function(t){var e=this;return _(t).each(function(t,i){var n=t.parentNode;e.each(function(e){n.insertBefore(0===i?e:e.cloneNode(!0),t)})}),this},prepend:function(t){return W(this,t,!0),this},prependTo:function(t){return W(_(t),this,!0),this},remove:function(){return this.each(function(t){if(t.parentNode)return t.parentNode.removeChild(t)})},text:function(t){return void 0===t?this[0].textContent:this.each(function(e){return e.textContent=t})}});var j=t.documentElement;return y.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+e.pageYOffset-j.clientTop,left:t.left+e.pageXOffset-j.clientLeft}},offsetParent:function(){return _(this[0].offsetParent)}}),y.extend({children:function(t){var e=[];return this.each(function(t){o.apply(e,t.children)}),e=C(e),t?e.filter(function(e){return b(e,t)}):e},closest:function(t){return!t||this.length<1?_():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,i=w(t);return this.each(function(n){return!(e=i(n,t))}),e},find:function(t){if(!t||t.nodeType)return _(t&&this.has(t).length?t:null);var e=[];return this.each(function(i){o.apply(e,p(t,i))}),C(e)},has:function(t){var e=l(t)?function(e){return 0!==p(t,e).length}:function(e){return e.contains(t)};return this.filter(e)},next:function(){return _(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=w(t);return this.filter(function(i){return!e(i,t)})},parent:function(){var t=[];return this.each(function(e){e&&e.parentNode&&t.push(e.parentNode)}),C(t)},parents:function(e){var i,n=[];return this.each(function(s){for(i=s;i&&i.parentNode&&i!==t.body.parentNode;)i=i.parentNode,(!e||e&&b(i,e))&&n.push(i)}),C(n)},prev:function(){return _(this[0].previousElementSibling)},siblings:function(t){var e=this.parent().children(t),i=this[0];return e.filter(function(t){return t!==i})}}),_}();var Component=function(){function t(e,i,n){_classCallCheck(this,t),i instanceof Element||console.error(Error(i+" is not an HTML Element"));var s=e.getInstance(i);s&&s.destroy(),this.el=i,this.$el=cash(i)}return _createClass(t,null,[{key:"init",value:function(t,e,i){var n=null;if(e instanceof Element)n=new t(e,i);else if(e.jquery||e instanceof NodeList){for(var s=[],o=0;os.right-i||r+e.width>window.innerWidth-i)&&(n.right=!0),(ls.bottom-i||l+e.height>window.innerHeight-i)&&(n.bottom=!0),n},M.checkPossibleAlignments=function(t,e,i,n){var s={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},o="visible"===getComputedStyle(e).overflow,a=e.getBoundingClientRect(),r=t.getBoundingClientRect(),l=e.scrollLeft,h=e.scrollTop,d=i.left-l,u=i.top-h;return s.spaceOnRight=o?window.innerWidth-(r.left+i.width):e.offsetWidth-(d+i.width),(!o&&d+i.width>e.offsetWidth||o&&r.left+i.width>window.innerWidth)&&(s.left=!1),s.spaceOnLeft=o?r.right-i.width:d-i.width+r.width,(!o&&d-i.width+r.width<0||o&&r.right-i.width<0)&&(s.right=!1),s.spaceOnBottom=o?window.innerHeight-(r.top+i.height+n):a.height-(u+i.height+n),(!o&&u+i.height+n>a.height||o&&r.top+i.height+n>window.innerHeight)&&(s.top=!1),s.spaceOnTop=o?r.bottom-(i.height+n):u-(i.height+n),(!o&&u-i.height-n<0||o&&r.bottom-i.height-n<0)&&(s.bottom=!1),s},M.getOverflowParent=function(t){return null==t?null:t===document.body||"visible"!==getComputedStyle(t).overflow?t:M.getOverflowParent(t.parentElement)},M.getIdFromTrigger=function(t){var e=t.getAttribute("data-target");return e||(e=(e=t.getAttribute("href"))?e.slice(1):""),e},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var getTime=Date.now||function(){return(new Date).getTime()};M.throttle=function(t,e,i){var n=void 0,s=void 0,o=void 0,a=null,r=0;i||(i={});var l=function(){r=!1===i.leading?0:getTime(),a=null,o=t.apply(n,s),n=s=null};return function(){var h=getTime();r||!1!==i.leading||(r=h);var d=e-(h-r);return n=this,s=arguments,d<=0?(clearTimeout(a),a=null,r=h,o=t.apply(n,s),n=s=null):a||!1===i.trailing||(a=setTimeout(l,d)),o}};var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,i){if(i.get||i.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=i.value)},$jscomp.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global&&null!=global?global:t},$jscomp.global=$jscomp.getGlobal(this),$jscomp.SYMBOL_PREFIX="jscomp_symbol_",$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){},$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(t){return $jscomp.SYMBOL_PREFIX+(t||"")+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}}),$jscomp.initSymbolIterator=function(){}},$jscomp.arrayIterator=function(t){var e=0;return $jscomp.iteratorPrototype(function(){return ei&&(i+=1),1i?e:i<2/3?t+(e-t)*(2/3-i)*6:t}var i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(i[1])/360;var n=parseInt(i[2])/100,s=parseInt(i[3])/100,i=i[4]||1;if(0==n)s=n=t=s;else{var o=.5>s?s*(1+n):s+n-s*n,a=2*s-o,s=e(a,o,t+1/3),n=e(a,o,t);t=e(a,o,t-1/3)}return"rgba("+255*s+","+255*n+","+255*t+","+i+")"}(i):void 0;else s=(s=l(i))?i.substr(0,i.length-s.length):i,i=e&&!/\s/g.test(i)?s+e:s;return{original:i+="",numbers:i.match(n)?i.match(n).map(Number):[0],strings:O.str(t)||e?i.split(n):[]}}function y(t){return e(t=t?i(O.arr(t)?t.map(n):n(t)):[],function(t,e,i){return i.indexOf(t)===e})}function k(t,e){var i=o(e);if(O.arr(t)){var s=t.length;2!==s||O.obj(t[0])?O.fnc(e.duration)||(i.duration=e.duration/s):t={value:t}}return n(t).map(function(t,i){return i=i?0:e.delay,t=O.obj(t)&&!O.pth(t)?t:{value:t},O.und(t.delay)&&(t.delay=i),t}).map(function(t){return r(t,i)})}function b(t,e){var i;return t.tweens.map(function(n){var s=(n=function(t,e){var i,n={};for(i in t){var s=h(t[i],e);O.arr(s)&&(s=s.map(function(t){return h(t,e)}),1===s.length&&(s=s[0])),n[i]=s}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(n,e)).value,o=c(e.target,t.name),a=i?i.to.original:o,a=O.arr(s)?s[0]:a,r=p(O.arr(s)?s[1]:s,a),o=l(r)||l(a)||l(o);return n.from=_(a,o),n.to=_(r,o),n.start=i?i.end:t.offset,n.end=n.start+n.delay+n.duration,n.easing=function(t){return O.arr(t)?$.apply(this,t):D[t]}(n.easing),n.elasticity=(1e3-Math.min(Math.max(n.elasticity,1),999))/1e3,n.isPath=O.pth(s),n.isColor=O.col(n.from.original),n.isColor&&(n.round=1),i=n})}function w(t,e,i,n){var s="delay"===t;return e.length?(s?Math.min:Math.max).apply(Math,e.map(function(e){return e[t]})):s?n.delay:i.offset+n.delay+n.duration}function C(t){var n,s=a(x,t),o=a(L,t),l=function(t){var e=y(t);return e.map(function(t,i){return{target:t,id:i,total:e.length}})}(t.targets),h=[],d=r(s,o);for(n in t)d.hasOwnProperty(n)||"targets"===n||h.push({name:n,offset:d.offset,tweens:k(t[n],o)});c=h,t=e(i(l.map(function(t){return c.map(function(e){var i=u(t.target,e.name);if(i){var n=b(e,t);e={type:i,property:e.name,animatable:t,tweens:n,duration:n[n.length-1].end,delay:n[0].delay}}else e=void 0;return e})})),function(t){return!O.und(t)});var c;return r(s,{children:[],animatables:l,animations:t,duration:w("duration",t,s,o),delay:w("delay",t,s,o)})}function E(t){function i(){return window.Promise&&new Promise(function(t){return c=t})}function n(t){return v.reversed?v.duration-t:t}function s(t){for(var i=0,n={},s=v.animations,o=s.length;i=v.currentTime)for(var k=0;k=d||!e)&&(v.began||(v.began=!0,o("begin")),o("run")),g>r&&g=e&&f!==e||!e)&&(s(e),m||a())),o("update"),t>=e&&(v.remaining?(h=l,"alternate"===v.direction&&(v.reversed=!v.reversed)):(v.pause(),v.completed||(v.completed=!0,o("complete"),"Promise"in window&&(c(),p=i()))),u=0)}t=void 0===t?{}:t;var l,h,u=0,c=null,p=i(),v=C(t);return v.reset=function(){var t=v.direction,e=v.loop;for(v.currentTime=0,v.progress=0,v.paused=!0,v.began=!1,v.completed=!1,v.reversed="reverse"===t,v.remaining="alternate"===t&&1===e?2:e,s(0),t=v.children.length;t--;)v.children[t].reset()},v.tick=function(t){l=t,h||(h=l),r((u+l-h)*E.speed)},v.seek=function(t){r(n(t))},v.pause=function(){var t=I.indexOf(v);-1=e&&0<=n&&1>=n){var o=new Float32Array(11);if(e!==i||n!==s)for(var a=0;11>a;++a)o[a]=t(.1*a,e,n);return function(a){if(e===i&&n===s)return a;if(0===a)return 0;if(1===a)return 1;for(var r=0,l=1;10!==l&&o[l]<=a;++l)r+=.1;var l=r+(a-o[--l])/(o[l+1]-o[l])*.1,h=3*(1-3*n+3*e)*l*l+2*(3*n-6*e)*l+3*e;if(.001<=h){for(r=0;4>r&&0!=(h=3*(1-3*n+3*e)*l*l+2*(3*n-6*e)*l+3*e);++r)var d=t(l,e,n)-a,l=l-d/h;a=l}else if(0===h)a=l;else{var l=r,r=r+.1,u=0;do{0<(h=t(d=l+(r-l)/2,e,n)-a)?r=d:l=d}while(1e-7++u);a=d}return t(a,i,s)}}}}(),D=function(){function t(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var e,i="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),n={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],t],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,i){return 1-t(1-e,i)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,i){return.5>e?t(2*e,i)/2:1-t(-2*e+2,i)/2}]},s={linear:$(.25,.25,.75,.75)},o={};for(e in n)o.type=e,n[o.type].forEach(function(t){return function(e,n){s["ease"+t.type+i[n]]=O.fnc(e)?e:$.apply($jscomp$this,e)}}(o)),o={type:o.type};return s}(),B={css:function(t,e,i){return t.style[e]=i},attribute:function(t,e,i){return t.setAttribute(e,i)},object:function(t,e,i){return t[e]=i},transform:function(t,e,i,n,s){n[s]||(n[s]=[]),n[s].push(e+"("+i+")")}},I=[],S=0,A=function(){function t(){S=requestAnimationFrame(e)}function e(e){var i=I.length;if(i){for(var n=0;ni&&(e.duration=n.duration),e.children.push(n)}),e.seek(0),e.reset(),e.autoplay&&e.restart(),e},e},E.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},E}(),function(t,e){"use strict";var i={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));n.el.M_Collapsible=n,n.options=t.extend({},s.defaults,i),n._setupEventHandlers();var o=n.$el.children("li.active").children(".collapsible-body");return n.options.accordion?o.first().css("display","block"):o.css("display","block"),n}return _createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleCollapsibleClickBound)}},{key:"_handleCollapsibleClick",value:function(e){var i=t(e.target).closest(".collapsible-header");if(e.target&&i.length){var n=i.closest(".collapsible");if(n[0]===this.el){var s=i.closest("li"),o=n.children("li"),a=s[0].classList.contains("active"),r=o.index(s);a?this.close(r):this.open(r)}}}},{key:"_animateIn",value:function(t){var i=this,n=this.$el.children("li").eq(t);if(n.length){var s=n.children(".collapsible-body");e.remove(s[0]),s.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var o=s.css("padding-top"),a=s.css("padding-bottom"),r=s[0].scrollHeight;s.css({paddingTop:0,paddingBottom:0}),e({targets:s[0],height:r,paddingTop:o,paddingBottom:a,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(t){s.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof i.options.onOpenEnd&&i.options.onOpenEnd.call(i,n[0])}})}}},{key:"_animateOut",value:function(t){var i=this,n=this.$el.children("li").eq(t);if(n.length){var s=n.children(".collapsible-body");e.remove(s[0]),s.css("overflow","hidden"),e({targets:s[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){s.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof i.options.onCloseEnd&&i.options.onCloseEnd.call(i,n[0])}})}}},{key:"open",value:function(e){var i=this,n=this.$el.children("li").eq(e);if(n.length&&!n[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,n[0]),this.options.accordion){var s=this.$el.children("li");this.$el.children("li.active").each(function(e){var n=s.index(t(e));i.close(n)})}n[0].classList.add("active"),this._animateIn(e)}}},{key:"close",value:function(t){var e=this.$el.children("li").eq(t);e.length&&e[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,e[0]),e[0].classList.remove("active"),this._animateOut(t))}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Collapsible}},{key:"defaults",get:function(){return i}}]),s}();M.Collapsible=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"collapsible","M_Collapsible")}(cash,M.anime),function(t,e){"use strict";var i={alignment:"left",constrainWidth:!0,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_Dropdown=n,s._dropdowns.push(n),n.id=M.getIdFromTrigger(e),n.dropdownEl=document.getElementById(n.id),n.$dropdownEl=t(n.dropdownEl),n.options=t.extend({},s.defaults,i),n.isOpen=!1,n.focusedIndex=-1,n.filterQuery=[],n.$el.after(n.dropdownEl),n._makeDropdownFocusable(),n._resetFilterQueryBound=n._resetFilterQuery.bind(n),n._handleDocumentClickBound=n._handleDocumentClick.bind(n),n._handleDropdownKeydownBound=n._handleDropdownKeydown.bind(n),n._handleTriggerKeydownBound=n._handleTriggerKeydown.bind(n),n._setupEventHandlers(),n}return _createClass(s,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),s._dropdowns.splice(s._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.options.hover?(this.el.removeEventHandlers("mouseenter",this._handleMouseEnterBound),this.el.removeEventHandlers("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventHandlers("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(t){t.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(e){var i=e.toElement||e.relatedTarget,n=!!t(i).closest(".dropdown-content").length,s=!1,o=t(i).closest(".dropdown-trigger");o.length&&o[0].M_Dropdown&&o[0].M_Dropdown.isOpen&&(s=!0),s||n||this.close()}},{key:"_handleDocumentClick",value:function(e){var i=this,n=t(e.target);this.options.closeOnClick&&n.closest(".dropdown-content").length?setTimeout(function(){i.close()},0):n.closest(".dropdown-trigger").length?setTimeout(function(){i.close()},0):n.closest(".dropdown-content").length||setTimeout(function(){i.close()},0)}},{key:"_handleTriggerKeydown",value:function(t){t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ENTER||this.isOpen||(t.preventDefault(),this.open())}},{key:"_handleDropdownKeydown",value:function(e){if(e.which===M.keys.TAB)e.preventDefault(),this.close();else if(e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ARROW_UP||!this.isOpen)if(e.which===M.keys.ENTER&&this.isOpen){var i=this.dropdownEl.children[this.focusedIndex],n=t(i).find("a, button").first();n.length?n[0].click():i.click()}else e.which===M.keys.ESC&&this.isOpen&&(e.preventDefault(),this.close());else{e.preventDefault();var s=e.which===M.keys.ARROW_DOWN?1:-1;this.focusedIndex=Math.max(Math.min(this.focusedIndex+s,this.dropdownEl.children.length-1),0),this._focusFocusedItem()}var o=String.fromCharCode(e.which).toLowerCase();if(o&&-1===[9,13,27,38,40].indexOf(e.which)){this.filterQuery.push(o);var a=this.filterQuery.join(""),r=t(this.dropdownEl).find("li").filter(function(e){return 0===t(e).text().toLowerCase().indexOf(a)})[0];r&&(this.focusedIndex=t(r).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}},{key:"_resetFilterQuery",value:function(){this.filterQuery=[]}},{key:"_resetDropdownStyles",value:function(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}},{key:"_makeDropdownFocusable",value:function(){-1===this.dropdownEl.tabIndex&&(this.dropdownEl.tabIndex=0),t(this.dropdownEl).children().attr("tabindex",0)}},{key:"_focusFocusedItem",value:function(){this.focusedIndex>=0&&this.focusedIndexh.spaceOnBottom?(d="bottom",n+=h.spaceOnTop,a-=h.spaceOnTop):n+=h.spaceOnBottom),!h[u]){var c="left"===u?"right":"left";h[c]?u=c:h.spaceOnLeft>h.spaceOnRight?(u="right",s+=h.spaceOnLeft,o-=h.spaceOnLeft):(u="left",s+=h.spaceOnRight)}return"bottom"===d&&(a=a-i.height+(this.options.coverTrigger?e.height:0)),"right"===u&&(o=o-i.width+e.width),{x:o,y:a,verticalAlignment:d,horizontalAlignment:u,height:n,width:s}}},{key:"_animateIn",value:function(t){var i=this;this.dropdownEl.style.left=t.x+"px",this.dropdownEl.style.top=t.y+"px",this.dropdownEl.style.height=t.height+"px",this.dropdownEl.style.width=t.width+"px",this.dropdownEl.style.transformOrigin=("left"===t.horizontalAlignment?"0":"100%")+" "+("top"===t.verticalAlignment?"0":"100%"),e.remove(this.dropdownEl),e({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){if(i.dropdownEl.focus(),"function"==typeof i.options.onOpenEnd){var e=t.animatables[0].target;i.options.onOpenEnd.call(e,i.el)}}})}},{key:"_animateOut",value:function(){var t=this;e.remove(this.dropdownEl),e({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(e){if(t._resetDropdownStyles(),"function"==typeof t.options.onCloseEnd){e.animatables[0].target;t.options.onCloseEnd.call(t,t.el)}}})}},{key:"open",value:function(){if(!this.isOpen){this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block";var t=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=t+"px";var e=this._getDropdownPosition();this._animateIn(e),this._setupTemporaryEventHandlers()}}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.el.focus())}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Dropdown}},{key:"defaults",get:function(){return i}}]),s}();n._dropdowns=[],window.M.Dropdown=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"dropdown","M_Dropdown")}(cash,M.anime),function(t,e){"use strict";var i={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,dismissible:!0,startingTop:"4%",endingTop:"10%"},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_Modal=n,n.options=t.extend({},s.defaults,i),n.isOpen=!1,n.id=n.$el.attr("id"),n._openingTrigger=void 0,n.$overlay=t(''),s._increment++,s._count++,n.$overlay[0].style.zIndex=1e3+2*s._increment,n.el.style.zIndex=1e3+2*s._increment+1,n._setupEventHandlers(),n}return _createClass(s,[{key:"destroy",value:function(){s._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===s._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===s._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(e){var i=t(e.target).closest(".modal-trigger");if(i.length){var n=M.getIdFromTrigger(i[0]),s=document.getElementById(n).M_Modal;s&&s.open(i),e.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(e){t(e.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(t){27===t.keyCode&&this.options.dismissible&&this.close()}},{key:"_animateIn",value:function(){var i=this;t.extend(this.el.style,{display:"block",opacity:0}),t.extend(this.$overlay[0].style,{display:"block",opacity:0}),e({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var n={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof i.options.onOpenEnd&&i.options.onOpenEnd.call(i,i.el,i._openingTrigger)}};this.el.classList.contains("bottom-sheet")?(t.extend(n,{bottom:0,opacity:1}),e(n)):(t.extend(n,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),e(n))}},{key:"_animateOut",value:function(){var i=this;e({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var n={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){i.el.style.display="none",i.$overlay.remove(),"function"==typeof i.options.onCloseEnd&&i.options.onCloseEnd.call(i,i.el)}};this.el.classList.contains("bottom-sheet")?(t.extend(n,{bottom:"-100%",opacity:0}),e(n)):(t.extend(n,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),e(n))}},{key:"open",value:function(t){if(!this.isOpen){this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger);return document.body.style.overflow="hidden",this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this._openingTrigger=t?t[0]:void 0,this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),document.addEventListener("keydown",this._handleKeydownBound)),e.remove(this.el),e.remove(this.$overlay[0]),this._animateIn(),this}}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),document.body.style.overflow="",this.options.dismissible&&document.removeEventListener("keydown",this._handleKeydownBound),e.remove(this.el),e.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Modal}},{key:"defaults",get:function(){return i}}]),s}();n._increment=0,n._count=0,M.Modal=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"modal","M_Modal")}(cash,M.anime),function(t,e){"use strict";var i={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_Materialbox=n,n.options=t.extend({},s.defaults,i),n.overlayActive=!1,n.doneAnimating=!0,n.placeholder=t("
").addClass("material-placeholder"),n.originalWidth=0,n.originalHeight=0,n.originInlineStyles=n.$el.attr("style"),n.caption=n.el.getAttribute("data-caption")||"",n.$el.before(n.placeholder),n.placeholder.append(n.$el),n._setupEventHandlers(),n}return _createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(t){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(t){27===t.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=t();for(var e=this.placeholder[0].parentNode;null!==e&&!t(e).is(document);){var i=t(e);"visible"!==i.css("overflow")&&(i.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=i:this.ancestorsChanged=this.ancestorsChanged.add(i)),e=e.parentNode}}},{key:"_animateImageIn",value:function(){var t=this,i={targets:this.el,height:this.newHeight,width:this.newWidth,left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){t.doneAnimating=!0,"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}};this.$el.hasClass("responsive-img")?(i.maxWidth=this.newWidth,i.width=[this.originalWidth,i.width]):(i.left=[i.left,0],i.top=[i.top,0]),e(i)}},{key:"_animateImageOut",value:function(){var t=this,i={targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.placeholder.css({height:"",width:"",position:"",top:"",left:""}),t.$el.removeAttr("style"),t.$el.attr("style",t.originInlineStyles),t.$el.removeClass("active"),t.doneAnimating=!0,t.ancestorsChanged.length&&t.ancestorsChanged.css("overflow",""),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};e(i)}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var i=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.$overlay=t('
').css({opacity:0}).one("click",function(){i.doneAnimating&&i.close()}),this.$el.before(this.$overlay);var n=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*n.left+"px",top:-1*n.top+"px"}),e.remove(this.el),e.remove(this.$overlay[0]),""!==this.caption&&e.remove(this.$photoCaption[0]),e({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photoCaption=t('
'),this.$photoCaption.text(this.caption),t("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),e({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var s=0,o=this.originalWidth/this.windowWidth,a=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,o>a?(s=this.originalHeight/this.originalWidth,this.newWidth=.9*this.windowWidth,this.newHeight=.9*this.windowWidth*s):(s=this.originalWidth/this.originalHeight,this.newWidth=.9*this.windowHeight*s,this.newHeight=.9*this.windowHeight),this._animateImageIn(),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),this._handleWindowResizeBound=this._handleWindowResize.bind(this),this._handleWindowEscapeBound=this._handleWindowEscape.bind(this),window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleWindowResizeBound),window.addEventListener("keyup",this._handleWindowEscapeBound)}},{key:"close",value:function(){var t=this;this._updateVars(),this.doneAnimating=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),e.remove(this.el),e.remove(this.$overlay[0]),""!==this.caption&&e.remove(this.$photoCaption[0]),window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleWindowResizeBound),window.removeEventListener("keyup",this._handleWindowEscapeBound),e({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.overlayActive=!1,t.$overlay.remove()}}),this._animateImageOut(),""!==this.caption&&e({targets:this.$photoCaption[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.$photoCaption.remove()}})}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Materialbox}},{key:"defaults",get:function(){return i}}]),s}();M.Materialbox=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"materialbox","M_Materialbox")}(cash,M.anime),function(t){"use strict";var e={responsiveThreshold:0},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));return s.el.M_Parallax=s,s.options=t.extend({},n.defaults,i),s.$img=s.$el.find("img").first(),s._enabled=window.innerWidth>s.options.responsiveThreshold,s._updateParallax(),s._setupEventHandlers(),s._setupStyles(),n._parallaxes.push(s),s}return _createClass(n,[{key:"destroy",value:function(){n._parallaxes.splice(n._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(n._handleScrollThrottled=M.throttle(n._handleScroll,5),window.addEventListener("scroll",n._handleScrollThrottled),n._handleWindowResizeThrottled=M.throttle(n._handleWindowResize,5),window.addEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(window.removeEventListener("scroll",n._handleScrollThrottled),window.removeEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax(),this.$img.each(function(){this.complete&&t(this).trigger("load")})}},{key:"_updateParallax",value:function(){var t=this.$el.height()>0?this.el.parentNode.offsetHeight:500,e=this.$img[0].offsetHeight-t,i=this.$el.offset().top+t,n=this.$el.offset().top,s=M.getDocumentScrollTop(),o=window.innerHeight,a=e*((s+o-n)/(t+o));this._enabled?i>s&&ne.options.responsiveThreshold}}},{key:"defaults",get:function(){return e}}]),n}();i._parallaxes=[],M.Parallax=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"parallax","M_Parallax")}(cash),function(t,e){"use strict";var i={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_Tabs=n,n.options=t.extend({},s.defaults,i),n.$tabLinks=n.$el.children("li.tab").children("a"),n.index=0,n._setTabsAndTabWidth(),n._setupActiveTabLink(),n._createIndicator(),n.options.swipeable?n._setupSwipeableTabs():n._setupNormalTabs(),n._setupEventHandlers(),n}return _createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(e){var i=this,n=t(e.target).closest("li.tab"),s=t(e.target).closest("a");if(s.length&&s.parent().hasClass("tab"))if(n.hasClass("disabled"))e.preventDefault();else if(!s.attr("target")){this._setTabsAndTabWidth(),this.$activeTabLink.removeClass("active");var o=this.$content;this.$activeTabLink=s,this.$content=t(M.escapeHash(s[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var a=this.index;this.index=Math.max(this.$tabLinks.index(s),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,function(){"function"==typeof i.options.onShow&&i.options.onShow.call(i,i.$content[0])}):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),o.length&&!o.is(this.$content)&&(o[0].style.display="none",o.removeClass("active"))),this._animateIndicator(a),e.preventDefault()}}},{key:"_createIndicator",value:function(){var t=this,e=document.createElement("li");e.classList.add("indicator"),this.el.appendChild(e),this._indicator=e,setTimeout(function(){t._indicator.style.left=t._calcLeftPos(t.$activeTabLink)+"px",t._indicator.style.right=t._calcRightPos(t.$activeTabLink)+"px"},0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=t(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=t(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var e=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var i=t();this.$tabLinks.each(function(e){var n=t(M.escapeHash(e.hash));n.addClass("carousel-item"),i=i.add(n)});var n=t('');i.first().before(n),n.append(i),i[0].style.display="",this._tabsCarousel=M.Carousel.init(n[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(i){var n=e.index;e.index=t(i).index(),e.$activeTabLink.removeClass("active"),e.$activeTabLink=e.$tabLinks.eq(e.index),e.$activeTabLink.addClass("active"),e._animateIndicator(n),"function"==typeof e.options.onShow&&e.options.onShow.call(e,e.$content[0])}})}},{key:"_teardownSwipeableTabs",value:function(){var t=this._tabsCarousel.$el;this._tabsCarousel.destroy(),t.after(t.children()),t.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each(function(e){if(e.hash){var i=t(M.escapeHash(e.hash));i.length&&(i[0].style.display="none")}})}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each(function(e){if(e.hash){var i=t(M.escapeHash(e.hash));i.length&&(i[0].style.display="")}})}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(t){return Math.ceil(this.tabsWidth-t.position().left-t[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(t){return Math.floor(t.position().left)}},{key:"updateTabIndicator",value:function(){this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(t){var i=0,n=0;this.index-t>=0?i=90:n=90;var s={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:i},right:{value:this._calcRightPos(this.$activeTabLink),delay:n},duration:this.options.duration,easing:"easeOutQuad"};e.remove(this._indicator),e(s)}},{key:"select",value:function(t){var e=this.$tabLinks.filter('[href="#'+t+'"]');e.length&&e.trigger("click")}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tabs}},{key:"defaults",get:function(){return i}}]),s}();window.M.Tabs=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"tabs","M_Tabs")}(cash,M.anime),function(t,e){"use strict";var i={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_Tooltip=n,n.options=t.extend({},s.defaults,i),n.isOpen=!1,n.isHovered=!1,n._appendTooltipEl(),n._setupEventHandlers(),n}return _createClass(s,[{key:"destroy",value:function(){t(this.tooltipEl).remove(),this._removeEventHandlers(),this.$el[0].M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var t=document.createElement("div");t.classList.add("material-tooltip"),this.tooltipEl=t;var e=document.createElement("div");e.classList.add("tooltip-content"),e.innerHTML=this.options.html,t.appendChild(e),document.body.appendChild(t)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this.handleMouseEnterBound=this._handleMouseEnter.bind(this),this.handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.$el[0].addEventListener("mouseenter",this.handleMouseEnterBound),this.$el[0].addEventListener("mouseleave",this.handleMouseLeaveBound)}},{key:"_removeEventHandlers",value:function(){this.$el[0].removeEventListener("mouseenter",this.handleMouseEnterBound),this.$el[0].removeEventListener("mouseleave",this.handleMouseLeaveBound)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this.options=t.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var t=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(function(){t.isHovered||t._animateOut()},this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(){var t=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(function(){t.isHovered&&t._animateIn()},this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var e=this.$el[0],i=this.tooltipEl,n=e.offsetHeight,s=e.offsetWidth,o=i.offsetHeight,a=i.offsetWidth,r=void 0,l=this.options.margin,h=void 0,d=void 0;this.xMovement=0,this.yMovement=0,h=e.getBoundingClientRect().top+M.getDocumentScrollTop(),d=e.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(h+=-o-l,d+=s/2-a/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(h+=n/2-o/2,d+=s+l,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(h+=n/2-o/2,d+=-a-l,this.xMovement=-this.options.transitionMovement):(h+=n+l,d+=s/2-a/2,this.yMovement=this.options.transitionMovement),r=this._repositionWithinScreen(d,h,a,o),t(i).css({top:r.y+"px",left:r.x+"px"})}},{key:"_repositionWithinScreen",value:function(t,e,i,n){var s=M.getDocumentScrollLeft(),o=M.getDocumentScrollTop(),a=t-s,r=e-o,l={left:a,top:r,width:i,height:n},h=this.options.margin+this.options.transitionMovement,d=M.checkWithinContainer(document.body,l,h);return d.left?a=h:d.right&&(a-=a+i-window.innerWidth),d.top?r=h:d.bottom&&(r-=r+n-window.innerHeight),{x:a+s,y:r+o}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.open()}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var t={},e=this.$el[0].getAttribute("data-tooltip"),i=this.$el[0].getAttribute("data-position");return e&&(t.html=e),i&&(t.position=i),t}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tooltip}},{key:"defaults",get:function(){return i}}]),s}();M.Tooltip=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"tooltip","M_Tooltip")}(cash,M.anime),function(t){"use strict";var e=e||{},i=document.querySelectorAll.bind(document);function n(t){var e="";for(var i in t)t.hasOwnProperty(i)&&(e+=i+":"+t[i]+";");return e}var s={duration:750,show:function(t,e){if(2===t.button)return!1;var i=e||this,o=document.createElement("div");o.className="waves-ripple",i.appendChild(o);var a=function(t){var e,i,n={top:0,left:0},s=t&&t.ownerDocument;return e=s.documentElement,void 0!==t.getBoundingClientRect&&(n=t.getBoundingClientRect()),i=function(t){return null!==(e=t)&&e===e.window?t:9===t.nodeType&&t.defaultView;var e}(s),{top:n.top+i.pageYOffset-e.clientTop,left:n.left+i.pageXOffset-e.clientLeft}}(i),r=t.pageY-a.top,l=t.pageX-a.left,h="scale("+i.clientWidth/100*10+")";"touches"in t&&(r=t.touches[0].pageY-a.top,l=t.touches[0].pageX-a.left),o.setAttribute("data-hold",Date.now()),o.setAttribute("data-scale",h),o.setAttribute("data-x",l),o.setAttribute("data-y",r);var d={top:r+"px",left:l+"px"};o.className=o.className+" waves-notransition",o.setAttribute("style",n(d)),o.className=o.className.replace("waves-notransition",""),d["-webkit-transform"]=h,d["-moz-transform"]=h,d["-ms-transform"]=h,d["-o-transform"]=h,d.transform=h,d.opacity="1",d["-webkit-transition-duration"]=s.duration+"ms",d["-moz-transition-duration"]=s.duration+"ms",d["-o-transition-duration"]=s.duration+"ms",d["transition-duration"]=s.duration+"ms",d["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",d["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",d["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",d["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",o.setAttribute("style",n(d))},hide:function(t){o.touchup(t);var e=this,i=(e.clientWidth,null),a=e.getElementsByClassName("waves-ripple");if(!(a.length>0))return!1;var r=(i=a[a.length-1]).getAttribute("data-x"),l=i.getAttribute("data-y"),h=i.getAttribute("data-scale"),d=350-(Date.now()-Number(i.getAttribute("data-hold")));d<0&&(d=0),setTimeout(function(){var t={top:l+"px",left:r+"px",opacity:"0","-webkit-transition-duration":s.duration+"ms","-moz-transition-duration":s.duration+"ms","-o-transition-duration":s.duration+"ms","transition-duration":s.duration+"ms","-webkit-transform":h,"-moz-transform":h,"-ms-transform":h,"-o-transform":h,transform:h};i.setAttribute("style",n(t)),setTimeout(function(){try{e.removeChild(i)}catch(t){return!1}},s.duration)},d)},wrapInput:function(t){for(var e=0;e0&&(o.touches-=1)},500):"mousedown"===t.type&&o.touches>0&&(e=!1),e},touchup:function(t){o.allowEvent(t)}};function a(e){var i=function(t){if(!1===o.allowEvent(t))return null;for(var e=null,i=t.target||t.srcElement;null!==i.parentNode;){if(!(i instanceof SVGElement)&&-1!==i.className.indexOf("waves-effect")){e=i;break}i=i.parentNode}return e}(e);null!==i&&(s.show(e,i),"ontouchstart"in t&&(i.addEventListener("touchend",s.hide,!1),i.addEventListener("touchcancel",s.hide,!1)),i.addEventListener("mouseup",s.hide,!1),i.addEventListener("mouseleave",s.hide,!1),i.addEventListener("dragend",s.hide,!1))}e.displayEffect=function(e){"duration"in(e=e||{})&&(s.duration=e.duration),s.wrapInput(i(".waves-effect")),"ontouchstart"in t&&document.body.addEventListener("touchstart",a,!1),document.body.addEventListener("mousedown",a,!1)},e.attach=function(e){"input"===e.tagName.toLowerCase()&&(s.wrapInput([e]),e=e.parentNode),"ontouchstart"in t&&e.addEventListener("touchstart",a,!1),e.addEventListener("mousedown",a,!1)},t.Waves=e,document.addEventListener("DOMContentLoaded",function(){e.displayEffect()},!1)}(window),function(t,e){"use strict";var i={html:"",displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8},n=function(){function n(e){_classCallCheck(this,n),this.options=t.extend({},n.defaults,e),this.message=this.options.html,this.panning=!1,this.timeRemaining=this.options.displayLength,0===n._toasts.length&&n._createContainer(),n._toasts.push(this);var i=this._createToast();i.M_Toast=this,this.el=i,this._animateIn(),this._setTimer()}return _createClass(n,[{key:"_createToast",value:function(){var e=document.createElement("div");return e.classList.add("toast"),this.options.classes.length&&t(e).addClass(this.options.classes),("object"==typeof HTMLElement?this.message instanceof HTMLElement:this.message&&"object"==typeof this.message&&null!==this.message&&1===this.message.nodeType&&"string"==typeof this.message.nodeName)?e.appendChild(this.message):this.message.jquery?t(e).append(this.message[0]):e.innerHTML=this.message,n._container.appendChild(e),e}},{key:"_animateIn",value:function(){e({targets:this.el,top:0,opacity:1,duration:300,easing:"easeOutCubic"})}},{key:"_setTimer",value:function(){var t=this;this.timeRemaining!==1/0&&(this.counterInterval=setInterval(function(){t.panning||(t.timeRemaining-=20),t.timeRemaining<=0&&t.dismiss()},20))}},{key:"dismiss",value:function(){var t=this;window.clearInterval(this.counterInterval);var i=this.el.offsetWidth*this.options.activationPercent;this.wasSwiped&&(this.el.style.transition="transform .05s, opacity .05s",this.el.style.transform="translateX("+i+"px)",this.el.style.opacity=0),e({targets:this.el,opacity:0,marginTop:-40,duration:this.options.outDuration,easing:"easeOutExpo",complete:function(){"function"==typeof t.options.completeCallback&&t.options.completeCallback(),t.el.parentNode.removeChild(t.el),n._toasts.splice(n._toasts.indexOf(t),1),0===n._toasts.length&&n._removeContainer()}})}}],[{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Toast}},{key:"_createContainer",value:function(){var t=document.createElement("div");t.setAttribute("id","toast-container"),t.addEventListener("touchstart",n._onDragStart),t.addEventListener("touchmove",n._onDragMove),t.addEventListener("touchend",n._onDragEnd),t.addEventListener("mousedown",n._onDragStart),document.addEventListener("mousemove",n._onDragMove),document.addEventListener("mouseup",n._onDragEnd),document.body.appendChild(t),n._container=t}},{key:"_removeContainer",value:function(){document.removeEventListener("mousemove",n._onDragMove),document.removeEventListener("mouseup",n._onDragEnd),n._container.parentNode.removeChild(n._container),n._container=null}},{key:"_onDragStart",value:function(e){if(e.target&&t(e.target).closest(".toast").length){var i=t(e.target).closest(".toast")[0].M_Toast;i.panning=!0,n._draggedToast=i,i.el.classList.add("panning"),i.el.style.transition="",i.startingXPos=n._xPos(e),i.time=Date.now(),i.xPos=n._xPos(e)}}},{key:"_onDragMove",value:function(t){if(n._draggedToast){t.preventDefault();var e=n._draggedToast;e.deltaX=Math.abs(e.xPos-n._xPos(t)),e.xPos=n._xPos(t),e.velocityX=e.deltaX/(Date.now()-e.time),e.time=Date.now();var i=e.xPos-e.startingXPos,s=e.el.offsetWidth*e.options.activationPercent;e.el.style.transform="translateX("+i+"px)",e.el.style.opacity=1-Math.abs(i/s)}}},{key:"_onDragEnd",value:function(){if(n._draggedToast){var t=n._draggedToast;t.panning=!1,t.el.classList.remove("panning");var e=t.xPos-t.startingXPos,i=t.el.offsetWidth*t.options.activationPercent;Math.abs(e)>i||t.velocityX>1?(t.wasSwiped=!0,t.dismiss()):(t.el.style.transition="transform .2s, opacity .2s",t.el.style.transform="",t.el.style.opacity=""),n._draggedToast=null}}},{key:"_xPos",value:function(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientX:t.clientX}},{key:"dismissAll",value:function(){for(var t in n._toasts)n._toasts[t].dismiss()}},{key:"defaults",get:function(){return i}}]),n}();n._toasts=[],n._container=null,n._draggedToast=null,M.Toast=n,M.toast=function(t){return new n(t)}}(cash,M.anime),function(t,e){"use strict";var i={edge:"left",draggable:!0,inDuration:250,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_Sidenav=n,n.id=n.$el.attr("id"),n.options=t.extend({},s.defaults,i),n.isOpen=!1,n.isFixed=n.el.classList.contains("sidenav-fixed"),n.isDragged=!1,n._createOverlay(),n._createDragTarget(),n._setupEventHandlers(),n._setupClasses(),n._setupFixed(),s._sidenavs.push(n),n}return _createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this._overlay.parentNode.removeChild(this._overlay),this.dragTarget.parentNode.removeChild(this.dragTarget),this.el.M_Sidenav=void 0;var t=s._sidenavs.indexOf(this);t>=0&&s._sidenavs.splice(t,1)}},{key:"_createOverlay",value:function(){var t=document.createElement("div");this._closeBound=this.close.bind(this),t.classList.add("sidenav-overlay"),t.addEventListener("click",this._closeBound),document.body.appendChild(t),this._overlay=t}},{key:"_setupEventHandlers",value:function(){0===s._sidenavs.length&&document.body.addEventListener("click",this._handleTriggerClick),this._handleDragTargetDragBound=this._handleDragTargetDrag.bind(this),this._handleDragTargetReleaseBound=this._handleDragTargetRelease.bind(this),this._handleCloseDragBound=this._handleCloseDrag.bind(this),this._handleCloseReleaseBound=this._handleCloseRelease.bind(this),this._handleCloseTriggerClickBound=this._handleCloseTriggerClick.bind(this),this.dragTarget.addEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.addEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.addEventListener("touchmove",this._handleCloseDragBound),this._overlay.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("touchmove",this._handleCloseDragBound),this.el.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&(this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound))}},{key:"_removeEventHandlers",value:function(){1===s._sidenavs.length&&document.body.removeEventListener("click",this._handleTriggerClick),this.dragTarget.removeEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.removeEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.removeEventListener("touchmove",this._handleCloseDragBound),this._overlay.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("touchmove",this._handleCloseDragBound),this.el.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&window.removeEventListener("resize",this._handleWindowResizeBound)}},{key:"_handleTriggerClick",value:function(e){var i=t(e.target).closest(".sidenav-trigger");if(e.target&&i.length){var n=M.getIdFromTrigger(i[0]),s=document.getElementById(n).M_Sidenav;s&&s.open(i),e.preventDefault()}}},{key:"_startDrag",value:function(t){var i=t.targetTouches[0].clientX;this.isDragged=!0,this._startingXpos=i,this._xPos=this._startingXpos,this._time=Date.now(),this._width=this.el.getBoundingClientRect().width,this._overlay.style.display="block",e.remove(this.el),e.remove(this._overlay)}},{key:"_dragMoveUpdate",value:function(t){var e=t.targetTouches[0].clientX;this.deltaX=Math.abs(this._xPos-e),this._xPos=e,this.velocityX=this.deltaX/(Date.now()-this._time),this._time=Date.now()}},{key:"_handleDragTargetDrag",value:function(t){this.isDragged||this._startDrag(t),this._dragMoveUpdate(t);var e=this._xPos-this._startingXpos,i=e>0?"right":"left";e=Math.min(this._width,Math.abs(e)),this.options.edge===i&&(e=0);var n=e,s="translateX(-100%)";"right"===this.options.edge&&(s="translateX(100%)",n=-n),this.percentOpen=Math.min(1,e/this._width),this.el.style.transform=s+" translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}},{key:"_handleDragTargetRelease",value:function(){this.isDragged&&(this.percentOpen>.5?this.open():this._animateOut(),this.isDragged=!1)}},{key:"_handleCloseDrag",value:function(t){if(this.isOpen){this.isDragged||this._startDrag(t),this._dragMoveUpdate(t);var e=this._xPos-this._startingXpos,i=e>0?"right":"left";e=Math.min(this._width,Math.abs(e)),this.options.edge!==i&&(e=0);var n=-e;"right"===this.options.edge&&(n=-n),this.percentOpen=Math.min(1,1-e/this._width),this.el.style.transform="translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleCloseRelease",value:function(){this.isOpen&&this.isDragged&&(this.percentOpen>.5?this._animateIn():this.close(),this.isDragged=!1)}},{key:"_handleCloseTriggerClick",value:function(e){t(e.target).closest(".sidenav-close").length&&this.close()}},{key:"_handleWindowResize",value:function(){window.innerWidth>992?this.open():this.close()}},{key:"_setupClasses",value:function(){"right"===this.options.edge&&(this.el.classList.add("right-aligned"),this.dragTarget.classList.add("right-aligned"))}},{key:"_removeClasses",value:function(){this.el.classList.remove("right-aligned"),this.dragTarget.classList.remove("right-aligned")}},{key:"_setupFixed",value:function(){this.isFixed&&window.innerWidth>992&&this.open()}},{key:"_createDragTarget",value:function(){var t=document.createElement("div");t.classList.add("drag-target"),document.body.appendChild(t),this.dragTarget=t}},{key:"_preventBodyScrolling",value:function(){document.body.style.overflow="hidden"}},{key:"_enableBodyScrolling",value:function(){document.body.style.overflow=""}},{key:"open",value:function(){!0!==this.isOpen&&(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.isFixed&&window.innerWidth>992?(e.remove(this.el),e({targets:this.el,translateX:0,duration:0,easing:"easeOutQuad"}),this._enableBodyScrolling(),this._overlay.style.display="none"):(this._preventBodyScrolling(),this.isDragged&&1==this.percentOpen||this._animateIn()))}},{key:"close",value:function(){if(!1!==this.isOpen)if(this.isOpen=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.isFixed&&window.innerWidth>992){var t="left"===this.options.edge?"-105%":"105%";this.el.style.transform="translateX("+t+")"}else this._enableBodyScrolling(),this.isDragged&&0==this.percentOpen?this._overlay.style.display="none":this._animateOut()}},{key:"_animateIn",value:function(){this._animateSidenavIn(),this._animateOverlayIn()}},{key:"_animateSidenavIn",value:function(){var t=this,i="left"===this.options.edge?-1:1;this.isDragged&&(i="left"===this.options.edge?i+this.percentOpen:i-this.percentOpen),e.remove(this.el),e({targets:this.el,translateX:[100*i+"%",0],duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}})}},{key:"_animateOverlayIn",value:function(){var i=0;this.isDragged?i=this.percentOpen:t(this._overlay).css({display:"block"}),e.remove(this._overlay),e({targets:this._overlay,opacity:[i,1],duration:this.options.inDuration,easing:"easeOutQuad"})}},{key:"_animateOut",value:function(){this._animateSidenavOut(),this._animateOverlayOut()}},{key:"_animateSidenavOut",value:function(){var t=this,i="left"===this.options.edge?-1:1,n=0;this.isDragged&&(n="left"===this.options.edge?i+this.percentOpen:i-this.percentOpen),e.remove(this.el),e({targets:this.el,translateX:[100*n+"%",105*i+"%"],duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}})}},{key:"_animateOverlayOut",value:function(){var i=this;e.remove(this._overlay),e({targets:this._overlay,opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t(i._overlay).css("display","none")}})}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Sidenav}},{key:"defaults",get:function(){return i}}]),s}();n._sidenavs=[],window.M.Sidenav=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"sidenav","M_Sidenav")}(cash,M.anime),function(t,e){"use strict";var i={throttle:100,scrollOffset:200,activeClass:"active",getActiveElement:function(t){return'a[href="#'+t+'"]'}},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_ScrollSpy=n,n.options=t.extend({},s.defaults,i),s._elements.push(n),s._count++,s._increment++,n.tickId=-1,n.id=s._increment,n._setupEventHandlers(),n._handleWindowScroll(),n}return _createClass(s,[{key:"destroy",value:function(){s._elements.splice(s._elements.indexOf(this),1),s._elementsInView.splice(s._elementsInView.indexOf(this),1),s._visibleElements.splice(s._visibleElements.indexOf(this.$el),1),s._count--,this._removeEventHandlers(),t(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),this.el.M_ScrollSpy=void 0}},{key:"_setupEventHandlers",value:function(){var t=M.throttle(this._handleWindowScroll,200);this._handleThrottledResizeBound=t.bind(this),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),1===s._count&&(window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleThrottledResizeBound),document.body.addEventListener("click",this._handleTriggerClick))}},{key:"_removeEventHandlers",value:function(){0===s._count&&(window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleThrottledResizeBound),document.body.removeEventListener("click",this._handleTriggerClick))}},{key:"_handleTriggerClick",value:function(i){for(var n=t(i.target),o=s._elements.length-1;o>=0;o--){var a=s._elements[o];if(n.is('a[href="#'+a.$el.attr("id")+'"]')){i.preventDefault();var r=a.$el.offset().top+1;e({targets:[document.documentElement,document.body],scrollTop:r-a.options.scrollOffset,duration:400,easing:"easeOutCubic"});break}}}},{key:"_handleWindowScroll",value:function(){s._ticks++;for(var t=M.getDocumentScrollTop(),e=M.getDocumentScrollLeft(),i=e+window.innerWidth,n=t+window.innerHeight,o=s._findElements(t,i,n,e),a=0;a=0&&d!==s._ticks&&(h._exit(),h.tickId=-1)}s._elementsInView=o}},{key:"_enter",value:function(){s._visibleElements=s._visibleElements.filter(function(t){return 0!=t.height()}),s._visibleElements[0]?(t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),s._visibleElements[0][0].M_ScrollSpy&&this.id0){var h=r.$el.offset().top,d=r.$el.offset().left,u=d+r.$el.width(),c=h+r.$el.height();!(d>e||ui||c=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,e))),this.oldVal=e)}},{key:"_handleInputKeydown",value:function(e){n._keydown=!0;var i=e.keyCode,s=void 0,o=t(this.container).children("li").length;13===i&&this.activeIndex>=0?(s=t(this.container).children("li").eq(this.activeIndex)).length&&(this.selectOption(s),e.preventDefault()):38!==i&&40!==i||(e.preventDefault(),38===i&&this.activeIndex>0&&this.activeIndex--,40===i&&this.activeIndex=0&&(this.$active=t(this.container).children("li").eq(this.activeIndex),this.$active.addClass("active")))}},{key:"_handleContainerMousedownAndTouchstart",value:function(e){var i=t(e.target).closest("li");this.selectOption(i)}},{key:"_highlight",value:function(t,e){var i=e.find("img"),n=e.text().toLowerCase().indexOf(""+t.toLowerCase()),s=n+t.length-1,o=e.text().slice(0,n),a=e.text().slice(n,s+1),r=e.text().slice(s+1);e.html(""+o+""+a+""+r+""),i.length&&e.prepend(i)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_removeAutocomplete",value:function(){t(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1}},{key:"selectOption",value:function(t){var e=t.text().trim();this.el.value=e,this.$el.trigger("change"),this._removeAutocomplete(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,e)}},{key:"_renderDropdown",value:function(e,i){var n=this;this._removeAutocomplete();var s=[];for(var o in e)if(e.hasOwnProperty(o)&&-1!==o.toLowerCase().indexOf(i)){if(this.count>=this.options.limit)break;var a={data:e[o],key:o};s.push(a),this.count++}s.sort(function(t,e){return n.options.sortFunction(t.key.toLowerCase(),e.key.toLowerCase(),i.toLowerCase())});for(var r=0;r");l.data?h.append(''+l.key+""):h.append(""+l.key+""),t(this.container).append(h),this._highlight(i,h)}}},{key:"updateData",value:function(t){var e=this.el.value.toLowerCase();this.options.data=t,this.isOpen&&this._renderDropdown(t,e)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Autocomplete}},{key:"defaults",get:function(){return e}}]),n}();i._keydown=!1,M.Autocomplete=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"autocomplete","M_Autocomplete")}(cash),function(t){M.updateTextFields=function(){t("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea").each(function(e,i){var n=t(this);e.value.length>0||t(e).is(":focus")||e.autofocus||null!==n.attr("placeholder")?n.siblings("label").addClass("active"):e.validity?n.siblings("label").toggleClass("active",!0===e.validity.badInput):n.siblings("label").removeClass("active")})},M.validate_field=function(t){var e=null!==t.attr("data-length"),i=parseInt(t.attr("data-length")),n=t[0].value.length;0!==n||!1!==t[0].validity.badInput||t.is(":required")?t.hasClass("validate")&&(t.is(":valid")&&e&&n<=i||t.is(":valid")&&!e?(t.removeClass("invalid"),t.addClass("valid")):(t.removeClass("valid"),t.addClass("invalid"))):t.hasClass("validate")&&(t.removeClass("valid"),t.removeClass("invalid"))},M.textareaAutoResize=function(e){e instanceof Element&&(e=t(e));var i=t(".hiddendiv").first();i.length||(i=t('
'),t("body").append(i));var n=e.css("font-family"),s=e.css("font-size"),o=e.css("line-height"),a=e.css("padding-top"),r=e.css("padding-right"),l=e.css("padding-bottom"),h=e.css("padding-left");s&&i.css("font-size",s),n&&i.css("font-family",n),o&&i.css("line-height",o),a&&i.css("padding-top",a),r&&i.css("padding-right",r),l&&i.css("padding-bottom",l),h&&i.css("padding-left",h),e.data("original-height")||e.data("original-height",e.height()),"off"===e.attr("wrap")&&i.css("overflow-wrap","normal").css("white-space","pre"),i.text(e[0].value+"\n");var d=i.html().replace(/\n/g,"
");i.html(d),"hidden"!==e.css("display")?i.css("width",e.width()+"px"):i.css("width",t(window).width()/2+"px"),e.data("original-height")<=i.innerHeight()?e.css("height",i.innerHeight()+"px"):e[0].value.length'),this.$slides.each(function(i,n){var s=t('
  • ');e.$indicators.append(s[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(t){var i=this;if(t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.activeIndex!=t){this.$active=this.$slides.eq(this.activeIndex);var n=this.$active.find(".caption");this.$active.removeClass("active"),e({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){i.$slides.not(".active").each(function(t){e({targets:t,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})})}}),this._animateCaptionIn(n[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(t).addClass("active")),e({targets:this.$slides.eq(t)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),e({targets:this.$slides.eq(t).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(t).addClass("active"),this.activeIndex=t,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var t=this.activeIndex+1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}},{key:"prev",value:function(){var t=this.activeIndex-1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Slider}},{key:"defaults",get:function(){return i}}]),s}();M.Slider=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"slider","M_Slider")}(cash,M.anime),function(t,e){t(document).on("click",".card",function(i){if(t(this).children(".card-reveal").length){var n=t(i.target).closest(".card");void 0===n.data("initialOverflow")&&n.data("initialOverflow",void 0===n.css("overflow")?"":n.css("overflow"));var s=t(this).find(".card-reveal");t(i.target).is(t(".card-reveal .card-title"))||t(i.target).is(t(".card-reveal .card-title i"))?e({targets:s[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(e){var i=e.animatables[0].target;t(i).css({display:"none"}),n.css("overflow",n.data("initialOverflow"))}}):(t(i.target).is(t(".card .activator"))||t(i.target).is(t(".card .activator i")))&&(n.css("overflow","hidden"),s.css({display:"block"}),e({targets:s[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}})}(cash,M.anime),function(t){"use strict";var e={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));return s.el.M_Chips=s,s.options=t.extend({},n.defaults,i),s.$el.addClass("chips input-field"),s.chipsData=[],s.$chips=t(),s._setupInput(),s.hasAutocomplete=Object.keys(s.options.autocompleteOptions).length>0,s.$input.attr("id")||s.$input.attr("id",M.guid()),s.options.data.length&&(s.chipsData=s.options.data,s._renderChips(s.chipsData)),s.hasAutocomplete&&s._setupAutocomplete(),s._setPlaceholder(),s._setupLabel(),s._setupEventHandlers(),s}return _createClass(n,[{key:"getData",value:function(){return this.chipsData}},{key:"destroy",value:function(){this._removeEventHandlers(),this.$chips.remove(),this.el.M_Chips=void 0}},{key:"_setupEventHandlers",value:function(){this._handleChipClickBound=this._handleChipClick.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputFocusBound=this._handleInputFocus.bind(this),this._handleInputBlurBound=this._handleInputBlur.bind(this),this.el.addEventListener("click",this._handleChipClickBound),document.addEventListener("keydown",n._handleChipsKeydown),document.addEventListener("keyup",n._handleChipsKeyup),this.el.addEventListener("blur",n._handleChipsBlur,!0),this.$input[0].addEventListener("focus",this._handleInputFocusBound),this.$input[0].addEventListener("blur",this._handleInputBlurBound),this.$input[0].addEventListener("keydown",this._handleInputKeydownBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleChipClickBound),document.removeEventListener("keydown",n._handleChipsKeydown),document.removeEventListener("keyup",n._handleChipsKeyup),this.el.removeEventListener("blur",n._handleChipsBlur,!0),this.$input[0].removeEventListener("focus",this._handleInputFocusBound),this.$input[0].removeEventListener("blur",this._handleInputBlurBound),this.$input[0].removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleChipClick",value:function(e){var i=t(e.target).closest(".chip"),n=t(e.target).is(".close");if(i.length){var s=i.index();n?(this.deleteChip(s),this.$input[0].focus()):this.selectChip(s)}else this.$input[0].focus()}},{key:"_handleInputFocus",value:function(){this.$el.addClass("focus")}},{key:"_handleInputBlur",value:function(){this.$el.removeClass("focus")}},{key:"_handleInputKeydown",value:function(t){if(n._keydown=!0,13===t.keyCode){if(this.hasAutocomplete&&this.autocomplete&&this.autocomplete.isOpen)return;t.preventDefault(),this.addChip({tag:this.$input[0].value}),this.$input[0].value=""}else 8!==t.keyCode&&37!==t.keyCode||""!==this.$input[0].value||!this.chipsData.length||(t.preventDefault(),this.selectChip(this.chipsData.length-1))}},{key:"_renderChip",value:function(e){if(e.tag){var i=document.createElement("div"),n=document.createElement("i");if(i.classList.add("chip"),i.textContent=e.tag,i.setAttribute("tabindex",0),t(n).addClass("material-icons close"),n.textContent="close",e.image){var s=document.createElement("img");s.setAttribute("src",e.image),i.insertBefore(s,i.firstChild)}return i.appendChild(n),i}}},{key:"_renderChips",value:function(){this.$chips.remove();for(var t=0;t"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?t(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&t(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(t){if(t.hasOwnProperty("tag")&&""!==t.tag){for(var e=!1,i=0;i=this.options.limit)){var i=this._renderChip(e);this.$chips.add(i),this.chipsData.push(e),t(this.$input).before(i),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,i)}}},{key:"deleteChip",value:function(e){var i=this.$chips.eq(e);this.$chips.eq(e).remove(),this.$chips=this.$chips.filter(function(e){return t(e).index()>=0}),this.chipsData.splice(e,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,i[0])}},{key:"selectChip",value:function(t){var e=this.$chips.eq(t);this._selectedChip=e,e[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,e[0])}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Chips}},{key:"_handleChipsKeydown",value:function(e){n._keydown=!0;var i=t(e.target).closest(".chips"),s=e.target&&i.length;if(!t(e.target).is("input, textarea")&&s){var o=i[0].M_Chips;if(8===e.keyCode||46===e.keyCode){e.preventDefault();var a=o.chipsData.length;if(o._selectedChip){var r=o._selectedChip.index();o.deleteChip(r),o._selectedChip=null,a=r-1}o.chipsData.length&&o.selectChip(a)}else if(37===e.keyCode){if(o._selectedChip){var l=o._selectedChip.index()-1;if(l<0)return;o.selectChip(l)}}else if(39===e.keyCode&&o._selectedChip){var h=o._selectedChip.index()+1;h>=o.chipsData.length?o.$input[0].focus():o.selectChip(h)}}}},{key:"_handleChipsKeyup",value:function(t){n._keydown=!1}},{key:"_handleChipsBlur",value:function(e){if(!n._keydown){t(e.target).closest(".chips")[0].M_Chips._selectedChip=null}}},{key:"defaults",get:function(){return e}}]),n}();i._keydown=!1,M.Chips=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"chips","M_Chips"),t(document).ready(function(){t(document.body).on("click",".chip .close",function(){var e=t(this).closest(".chips");e.length&&e[0].M_Chips||t(this).closest(".chip").remove()})})}(cash),function(t){"use strict";var e={top:0,bottom:1/0,offset:0,onPositionChange:null},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));return s.el.M_Pushpin=s,s.options=t.extend({},n.defaults,i),s.originalOffset=s.el.offsetTop,n._pushpins.push(s),s._setupEventHandlers(),s._updatePosition(),s}return _createClass(n,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var t=n._pushpins.indexOf(this);n._pushpins.splice(t,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",n._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",n._updateElements)}},{key:"_updatePosition",value:function(){var t=M.getDocumentScrollTop()+this.options.offset;this.options.top<=t&&this.options.bottom>=t&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),tthis.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top","pinned","pin-bottom")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Pushpin}},{key:"_updateElements",value:function(){for(var t in n._pushpins){n._pushpins[t]._updatePosition()}}},{key:"defaults",get:function(){return e}}]),n}();i._pushpins=[],M.Pushpin=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"pushpin","M_Pushpin")}(cash),function(t,e){"use strict";var i={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};t.fn.reverse=[].reverse;var n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_FloatingActionButton=n,n.options=t.extend({},s.defaults,i),n.isOpen=!1,n.$anchor=n.$el.children("a").first(),n.$menu=n.$el.children("ul").first(),n.$floatingBtns=n.$el.find("ul .btn-floating"),n.$floatingBtnsReverse=n.$el.find("ul .btn-floating").reverse(),n.offsetY=0,n.offsetX=0,"top"===n.options.direction?(n.$el.addClass("direction-top"),n.offsetY=40):"right"===n.options.direction?(n.$el.addClass("direction-right"),n.offsetX=-40):"bottom"===n.options.direction?(n.$el.addClass("direction-bottom"),n.offsetY=-40):(n.$el.addClass("direction-left"),n.offsetX=40),n._setupEventHandlers(),n}return _createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(e){t(e.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var t=this;this.$el.addClass("active");var i=0;this.$floatingBtnsReverse.each(function(n){e({targets:n,opacity:1,scale:[.4,1],translateY:[t.offsetY,0],translateX:[t.offsetX,0],duration:275,delay:i,easing:"easeInOutQuad"}),i+=40})}},{key:"_animateOutFAB",value:function(){var t=this;this.$floatingBtnsReverse.each(function(i){e.remove(i),e({targets:i,opacity:0,scale:.4,translateY:t.offsetY,translateX:t.offsetX,duration:175,easing:"easeOutQuad",complete:function(){t.$el.removeClass("active")}})})}},{key:"_animateInToolbar",value:function(){var e=this,i=void 0,n=window.innerWidth,s=window.innerHeight,o=this.el.getBoundingClientRect(),a=t('
    '),r=this.$anchor.css("background-color");this.$anchor.append(a),this.offsetX=o.left-n/2+o.width/2,this.offsetY=s-o.bottom,i=n/a[0].clientWidth,this.btnBottom=o.bottom,this.btnLeft=o.left,this.btnWidth=o.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),a.css({"background-color":r}),setTimeout(function(){e.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),e.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(function(){e.$el.css({overflow:"hidden","background-color":r}),a.css({transform:"scale("+i+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),e.$menu.children("li").children("a").css({opacity:1}),e._handleDocumentClickBound=e._handleDocumentClick.bind(e),window.addEventListener("scroll",e._handleCloseBound,!0),document.body.addEventListener("click",e._handleDocumentClickBound,!0)},100)},0)}},{key:"_animateOutToolbar",value:function(){var t=this,e=window.innerWidth,i=window.innerHeight,n=this.$el.find(".fab-backdrop"),s=anchor.css("background-color");this.offsetX=this.btnLeft-e/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),n.css({transform:"scale(0)","background-color":s}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(function(){n.remove(),t.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-t.offsetX+"px,0,0)"}),t.$anchor.css({overflow:"",transform:"translate3d(0,"+t.offsetY+"px,0)"}),setTimeout(function(){t.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),t.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FloatingActionButton}},{key:"defaults",get:function(){return i}}]),s}();M.FloatingActionButton=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"floatingActionButton","M_FloatingActionButton")}(cash,M.anime),function(t){"use strict";var e={format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,i18n:{clear:"Clear",today:"Today",done:"Ok",previousMonth:"?",nextMonth:"?",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));s.el.M_Datepicker=s,s.options=t.extend({},n.defaults,i),s.options.minDate&&s.options.minDate.setHours(0,0,0,0),s.options.maxDate&&s.options.maxDate.setHours(0,0,0,0),s.id=M.guid(),s._setupVariables(),s._insertHTMLIntoDOM(),s._setupModal(),s._setupEventHandlers(),s.options.defaultDate||(s.options.defaultDate=new Date(Date.parse(s.el.value)),s.options.setDefaultDate=!0);var o=s.options.defaultDate;return n._isDate(o)?s.options.setDefaultDate?s.setDate(o,!0):s.gotoDate(o):s.gotoDate(new Date),s.isOpen=!1,s}return _createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),t(this.modalEl).remove(),this.el.M_Datepicker=void 0}},{key:"_insertHTMLIntoDOM",value:function(){this.clearBtn.innerHTML=this.options.i18n.clear,this.todayBtn.innerHTML=this.options.i18n.today,this.doneBtn.innerHTML=this.options.i18n.done;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){t.isOpen=!1}})}},{key:"toString",value:function(t){var e=this;if(t=t||this.options.format,!n._isDate(this.date))return"";return t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(t){return e.formats[t]?e.formats[t]():t}).join("")}},{key:"setDate",value:function(t,e){if(!t)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),n._isDate(t)){var i=this.options.minDate,s=this.options.maxDate;n._isDate(i)&&ts&&(t=s),this.date=new Date(t.getTime()),this._renderDateDisplay(),n._setToStartOfDay(this.date),this.gotoDate(this.date),e||"function"!=typeof this.options.onSelect||this.options.onSelect.call(this,this.date)}}},{key:"setInputValue",value:function(){this.el.value=this.toString(),this.$el.trigger("change",{firedBy:this})}},{key:"_renderDateDisplay",value:function(){var t=n._isDate(this.date)?this.date:new Date,e=this.options.i18n,i=e.weekdaysShort[t.getDay()],s=e.monthsShort[t.getMonth()],o=t.getDate();this.yearTextEl.innerHTML=t.getFullYear(),this.dateTextEl.innerHTML=i+", "+s+" "+o}},{key:"gotoDate",value:function(t){var e=!0;if(n._isDate(t)){if(this.calendars){var i=new Date(this.calendars[0].year,this.calendars[0].month,1),s=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=t.getTime();s.setMonth(s.getMonth()+1),s.setDate(s.getDate()-1),e=o11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t}},{key:"nextMonth",value:function(){this.calendars[0].month++,this.adjustCalendars()}},{key:"prevMonth",value:function(){this.calendars[0].month--,this.adjustCalendars()}},{key:"render",value:function(t,e,i){var s=this.options,o=new Date,a=n._getDaysInMonth(t,e),r=new Date(t,e,1).getDay(),l=[],h=[];n._setToStartOfDay(o),s.firstDay>0&&(r-=s.firstDay)<0&&(r+=7);for(var d=0===e?11:e-1,u=11===e?0:e+1,c=0===e?t-1:t,p=11===e?t+1:t,v=n._getDaysInMonth(c,d),f=a+r,m=f;m>7;)m-=7;f+=7-m;for(var g=!1,_=0,y=0;_=a+r,M=_-r+1,x=e,L=t,T=s.startRange&&n._compareDates(s.startRange,k),O=s.endRange&&n._compareDates(s.endRange,k),$=s.startRange&&s.endRange&&s.startRanges.maxDate||s.disableWeekends&&n._isWeekend(k)||s.disableDayFn&&s.disableDayFn(k);E&&(_';e.push("is-outside-current-month"),e.push("is-selection-disabled")}return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&(e.push("is-selected"),i="true"),t.hasEvent&&e.push("has-event"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'"}},{key:"renderRow",value:function(t,e,i){return''+(e?t.reverse():t).join("")+""}},{key:"renderTable",value:function(t,e,i){return'
    '+this.renderHead(t)+this.renderBody(e)+"
    "}},{key:"renderHead",value:function(t){var e=void 0,i=[];for(e=0;e<7;e++)i.push(''+this.renderDayName(t,e,!0)+"");return""+(t.isRTL?i.reverse():i).join("")+""}},{key:"renderBody",value:function(t){return""+t.join("")+""}},{key:"renderTitle",value:function(e,i,n,s,o,a){var r=void 0,l=void 0,h=void 0,d=this.options,u=n===d.minYear,c=n===d.maxYear,p='
    ',v=void 0,f=void 0,m=!0,g=!0;for(h=[],r=0;r<12;r++)h.push('");for(v='",t.isArray(d.yearRange)?(r=d.yearRange[0],l=d.yearRange[1]+1):(r=n-d.yearRange,l=1+n+d.yearRange),h=[];r=d.minYear&&h.push('");f='";p+='',p+='
    ',d.showMonthAfterYear?p+=f+v:p+=v+f,p+="
    ",u&&(0===s||d.minMonth>=s)&&(m=!1),c&&(11===s||d.maxMonth<=s)&&(g=!1);return(p+='')+"
    "}},{key:"draw",value:function(t){if(this.isOpen||t){var e=this.options,i=e.minYear,n=e.maxYear,s=e.minMonth,o=e.maxMonth,a="",r=void 0;this._y<=i&&(this._y=i,!isNaN(s)&&this._m=n&&(this._y=n,!isNaN(o)&&this._m>o&&(this._m=o)),r="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),a+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,r)+this.render(this.calendars[l].year,this.calendars[l].month,r);this.calendarEl.innerHTML=a;var h=this.calendarEl.querySelector(".pika-select-year"),d=this.calendarEl.querySelector(".pika-select-month");M.Select.init(h,{classes:"select-year"}),M.Select.init(d,{classes:"select-month"}),h.addEventListener("change",this._handleYearChange.bind(this)),d.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleTodayClickBound=this._handleTodayClick.bind(this),this._handleClearClickBound=this._handleClearClick.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.todayBtn.addEventListener("click",this._handleTodayClickBound),this.clearBtn.addEventListener("click",this._handleClearClickBound)}},{key:"_setupVariables",value:function(){var e=this;this.$modalEl=t(n._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".pika-single"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.clearBtn=this.modalEl.querySelector(".datepicker-clear"),this.todayBtn=this.modalEl.querySelector(".datepicker-today"),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.formats={dd:function(){return e.date.getDate()},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},mm:function(){return e.date.getMonth()+1},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},yy:function(){return e.date.getFullYear().slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(e){if(this.isOpen){var i=t(e.target);i.hasClass("is-disabled")||(!i.hasClass("datepicker-day-button")||i.hasClass("is-empty")||i.parent().hasClass("is-disabled")?i.closest(".month-prev").length?this.prevMonth():i.closest(".month-next").length&&this.nextMonth():this.setDate(new Date(e.target.getAttribute("data-pika-year"),e.target.getAttribute("data-pika-month"),e.target.getAttribute("data-pika-day"))))}}},{key:"_handleTodayClick",value:function(){this.date=new Date,this.setInputValue(),this.close()}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(t){this.gotoMonth(t.target.value)}},{key:"_handleYearChange",value:function(t){this.gotoYear(t.target.value)}},{key:"gotoMonth",value:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}},{key:"gotoYear",value:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(t){var e=void 0;t.firedBy!==this&&(e=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),n._isDate(e)&&this.setDate(e))}},{key:"renderDayName",value:function(t,e,i){for(e+=t.firstDay;e>=7;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"_isDate",value:function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}},{key:"_isWeekend",value:function(t){var e=t.getDay();return 0===e||6===e}},{key:"_setToStartOfDay",value:function(t){n._isDate(t)&&t.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(t,e){return[31,n._isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}},{key:"_isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"_compareDates",value:function(t,e){return t.getTime()===e.getTime()}},{key:"_setToStartOfDay",value:function(t){n._isDate(t)&&t.setHours(0,0,0,0)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Datepicker}},{key:"defaults",get:function(){return e}}]),n}();i._template=['"].join(""),M.Datepicker=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"datepicker","M_Datepicker")}(cash),function(t){"use strict";var e={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromnow:0,doneText:"Ok",clearText:"Clear",cancelText:"Cancel",autoClose:!1,twelveHour:!0,vibrate:!0},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));return s.el.M_Timepicker=s,s.options=t.extend({},n.defaults,i),s.id=M.guid(),s._insertHTMLIntoDOM(),s._setupModal(),s._setupVariables(),s._setupEventHandlers(),s._clockSetup(),s._pickerSetup(),s}return _createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),t(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),t(this.spanHours).on("click",this.showView.bind(this,"hours")),t(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(t){t.preventDefault();var e=this.plate.getBoundingClientRect(),i=e.left,s=e.top;this.x0=i+this.options.dialRadius,this.y0=s+this.options.dialRadius,this.moved=!1;var o=n._Pos(t);this.dx=o.x-this.x0,this.dy=o.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(t){t.preventDefault();var e=n._Pos(t),i=e.x-this.x0,s=e.y-this.y0;this.moved=!0,this.setHand(i,s,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(t){t.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var e=n._Pos(t),i=e.x-this.x0,s=e.y-this.y0;this.moved&&i===this.dx&&s===this.dy&&this.setHand(i,s),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(this.minutesView.addClass("timepicker-dial-out"),setTimeout(function(){this.done()},this.options.duration/2)),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=t(n._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var e=document.querySelector(this.options.container);this.options.container&&e?this.$modalEl.appendTo(e):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){t.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){t('").appendTo(this.footer).on("click",this.clear.bind(this));var e=t('
    ');t('").appendTo(e).on("click",this.close.bind(this)),t('").appendTo(e).on("click",this.done.bind(this)),e.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=t('
    AM
    '),this.$pmBtn=t('
    PM
    '),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var t=this.options.dialRadius,e=this.options.tickRadius,i=2*t,s=n._createSVGEl("svg");s.setAttribute("class","timepicker-svg"),s.setAttribute("width",i),s.setAttribute("height",i);var o=n._createSVGEl("g");o.setAttribute("transform","translate("+t+","+t+")");var a=n._createSVGEl("circle");a.setAttribute("class","timepicker-canvas-bearing"),a.setAttribute("cx",0),a.setAttribute("cy",0),a.setAttribute("r",4);var r=n._createSVGEl("line");r.setAttribute("x1",0),r.setAttribute("y1",0);var l=n._createSVGEl("circle");l.setAttribute("class","timepicker-canvas-bg"),l.setAttribute("r",e),o.appendChild(r),o.appendChild(l),o.appendChild(a),s.appendChild(o),this._canvas.appendChild(s),this.hand=r,this.bg=l,this.bearing=a,this.g=o}},{key:"_buildHoursView",value:function(){var e=t('
    ');if(this.options.twelveHour)for(var i=1;i<13;i+=1){var n=e.clone(),s=i/6*Math.PI,o=this.options.outerRadius;n.css({left:this.options.dialRadius+Math.sin(s)*o-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(s)*o-this.options.tickRadius+"px"}),n.html(0===i?"00":i),this.hoursView.appendChild(n[0])}else for(var a=0;a<24;a+=1){var r=e.clone(),l=a/6*Math.PI,h=a>0&&a<13?this.options.innerRadius:this.options.outerRadius;r.css({left:this.options.dialRadius+Math.sin(l)*h-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(l)*h-this.options.tickRadius+"px"}),r.html(0===a?"00":a),this.hoursView.appendChild(r[0])}}},{key:"_buildMinutesView",value:function(){for(var e=t('
    '),i=0;i<60;i+=5){var s=e.clone(),o=i/30*Math.PI;s.css({left:this.options.dialRadius+Math.sin(o)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(o)*this.options.outerRadius-this.options.tickRadius+"px"}),s.html(n._addLeadingZero(i)),this.minutesView.appendChild(s[0])}}},{key:"_handleAmPmClick",value:function(e){var i=t(e.target);this.amOrPm=i.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var t=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==t[1]&&(t[1].toUpperCase().indexOf("AM")>0?this.amOrPm="AM":this.amOrPm="PM",t[1]=t[1].replace("AM","").replace("PM","")),"now"===t[0]){var e=new Date(+new Date+this.options.fromnow);t=[e.getHours(),e.getMinutes()],this.options.twelveHour&&(this.amOrPm=t[0]>=12&&t[0]<24?"PM":"AM")}this.hours=+t[0]||0,this.minutes=+t[1]||0,this.spanHours.innerHTML=this.hours,this.spanMinutes.innerHTML=n._addLeadingZero(this.minutes),this._updateAmPmView()}},{key:"showView",value:function(e,i){"minutes"===e&&t(this.hoursView).css("visibility");var n="hours"===e,s=n?this.hoursView:this.minutesView,o=n?this.minutesView:this.hoursView;this.currentView=e,t(this.spanHours).toggleClass("text-primary",n),t(this.spanMinutes).toggleClass("text-primary",!n),o.classList.add("timepicker-dial-out"),t(s).css("visibility","visible").removeClass("timepicker-dial-out"),this.resetClock(i),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){t(o).css("visibility","hidden")},this.options.duration)}},{key:"resetClock",value:function(e){var i=this.currentView,n=this[i],s="hours"===i,o=n*(Math.PI/(s?6:30)),a=s&&n>0&&n<13?this.options.innerRadius:this.options.outerRadius,r=Math.sin(o)*a,l=-Math.cos(o)*a,h=this;e?(t(this.canvas).addClass("timepicker-canvas-out"),setTimeout(function(){t(h.canvas).removeClass("timepicker-canvas-out"),h.setHand(r,l)},e)):this.setHand(r,l)}},{key:"setHand",value:function(t,e,i){var s=this,o=Math.atan2(t,-e),a="hours"===this.currentView,r=Math.PI/(a||i?6:30),l=Math.sqrt(t*t+e*e),h=a&&l<(this.options.outerRadius+this.options.innerRadius)/2,d=h?this.options.innerRadius:this.options.outerRadius;this.options.twelveHour&&(d=this.options.outerRadius),o<0&&(o=2*Math.PI+o);var u=Math.round(o/r);o=u*r,this.options.twelveHour?a?0===u&&(u=12):(i&&(u*=5),60===u&&(u=0)):a?(12===u&&(u=0),u=h?0===u?12:u:0===u?0:u+12):(i&&(u*=5),60===u&&(u=0)),this[this.currentView]!==u&&this.vibrate&&this.options.vibrate&&(this.vibrateTimer||(navigator[this.vibrate](10),this.vibrateTimer=setTimeout(function(){s.vibrateTimer=null},100))),this[this.currentView]=u,a?this.spanHours.innerHTML=u:this.spanMinutes.innerHTML=n._addLeadingZero(u);var c=Math.sin(o)*(d-this.options.tickRadius),p=-Math.cos(o)*(d-this.options.tickRadius),v=Math.sin(o)*d,f=-Math.cos(o)*d;this.hand.setAttribute("x2",c),this.hand.setAttribute("y2",p),this.bg.setAttribute("cx",v),this.bg.setAttribute("cy",f)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this._updateTimeFromInput(),this.showView("hours"),this.modal.open())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.modal.close())}},{key:"done",value:function(t,e){var i=this.el.value,s=e?"":n._addLeadingZero(this.hours)+":"+n._addLeadingZero(this.minutes);this.time=s,!e&&this.options.twelveHour&&(s=s+" "+this.amOrPm),this.el.value=s,s!==i&&this.$el.trigger("change"),this.close(),this.el.focus()}},{key:"clear",value:function(){this.done(null,!0)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"_addLeadingZero",value:function(t){return(t<10?"0":"")+t}},{key:"_createSVGEl",value:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}},{key:"_Pos",value:function(t){return t.targetTouches&&t.targetTouches.length>=1?{x:t.targetTouches[0].clientX,y:t.targetTouches[0].clientY}:{x:t.clientX,y:t.clientY}}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Timepicker}},{key:"defaults",get:function(){return e}}]),n}();i._template=['"].join(""),M.Timepicker=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"timepicker","M_Timepicker")}(cash),function(t){"use strict";var e={},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));return s.el.M_CharacterCounter=s,s.options=t.extend({},n.defaults,i),s.isInvalid=!1,s.isValidLength=!1,s._setupCounter(),s._setupEventHandlers(),s}return _createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:"_setupEventHandlers",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener("focus",this._handleUpdateCounterBound,!0),this.el.addEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("focus",this._handleUpdateCounterBound,!0),this.el.removeEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_setupCounter",value:function(){this.counterEl=document.createElement("span"),t(this.counterEl).addClass("character-counter").css({float:"right","font-size":"12px",height:1}),this.$el.parent().append(this.counterEl)}},{key:"_removeCounter",value:function(){t(this.counterEl).remove()}},{key:"updateCounter",value:function(){var e=+this.$el.attr("data-length"),i=this.el.value.length;this.isValidLength=i<=e;var n=i;e&&(n+="/"+e,this._validateInput()),t(this.counterEl).html(n)}},{key:"_validateInput",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass("invalid")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass("valid"),this.$el.addClass("invalid"))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_CharacterCounter}},{key:"defaults",get:function(){return e}}]),n}();M.CharacterCounter=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"characterCounter","M_CharacterCounter")}(cash),function(t){"use strict";var e={duration:200,dist:-100,shift:0,padding:0,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));return s.el.M_Carousel=s,s.options=t.extend({},n.defaults,i),s.hasMultipleSlides=s.$el.find(".carousel-item").length>1,s.showIndicators=s.options.indicators&&s.hasMultipleSlides,s.noWrap=s.options.noWrap||!s.hasMultipleSlides,s.pressed=!1,s.dragged=!1,s.offset=s.target=0,s.images=[],s.itemWidth=s.$el.find(".carousel-item").first().innerWidth(),s.itemHeight=s.$el.find(".carousel-item").first().innerHeight(),s.dim=2*s.itemWidth+s.options.padding||1,s._autoScrollBound=s._autoScroll.bind(s),s._trackBound=s._track.bind(s),s.options.fullWidth&&(s.options.dist=0,s._setCarouselHeight(),s.showIndicators&&s.$el.find(".carousel-fixed-item").addClass("with-indicators")),s.$indicators=t('
      '),s.$el.find(".carousel-item").each(function(e,i){if(s.images.push(e),s.showIndicators){var n=t('
    • ');0===i&&n[0].classList.add("active"),s.$indicators.append(n)}}),s.showIndicators&&s.$el.append(s.$indicators),s.count=s.images.length,s.xform="transform",["webkit","Moz","O","ms"].every(function(t){var e=t+"Transform";return void 0===document.body.style[e]||(s.xform=e,!1)}),s._setupEventHandlers(),s._scroll(s.offset),s}return _createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var t=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each(function(e,i){e.addEventListener("click",t._handleIndicatorClickBound)}));var e=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=e.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var t=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each(function(e,i){e.removeEventListener("click",t._handleIndicatorClickBound)}),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(e){"mousedown"===e.type&&t(e.target).is("img")&&e.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(e),this.referenceY=this._ypos(e),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(t){var e=void 0,i=void 0,n=void 0;if(this.pressed)if(e=this._xpos(t),i=this._ypos(t),n=this.reference-e,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(n>2||n<-2)&&(this.dragged=!0,this.reference=e,this._scroll(this.offset+n));else{if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;this.verticalDragged=!0}if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1}},{key:"_handleCarouselRelease",value:function(t){if(this.pressed)return this.pressed=!1,clearInterval(this.ticker),this.target=this.offset,(this.velocity>10||this.velocity<-10)&&(this.amplitude=.9*this.velocity,this.target=this.offset+this.amplitude),this.target=Math.round(this.target/this.dim)*this.dim,this.noWrap&&(this.target>=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(t.preventDefault(),t.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(e){if(this.dragged)return e.preventDefault(),e.stopPropagation(),!1;if(!this.options.fullWidth){var i=t(e.target).closest(".carousel-item").index();0!==this._wrap(this.center)-i&&(e.preventDefault(),e.stopPropagation()),this._cycleTo(i)}}},{key:"_handleIndicatorClick",value:function(e){e.stopPropagation();var i=t(e.target).closest(".indicator-item");i.length&&this._cycleTo(i.index())}},{key:"_handleResize",value:function(t){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(t){var e=this,i=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),n=i.find("img").first();if(n.length)if(n[0].complete){var s=n.height();if(s>0)this.$el.css("height",s+"px");else{var o=n[0].naturalWidth,a=n[0].naturalHeight,r=this.$el.width()/o*a;this.$el.css("height",r+"px")}}else n.one("load",function(t,i){e.$el.css("height",t.offsetHeight+"px")});else if(!t){var l=i.height();this.$el.css("height",l+"px")}}},{key:"_xpos",value:function(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientX:t.clientX}},{key:"_ypos",value:function(t){return t.targetTouches&&t.targetTouches.length>=1?t.targetTouches[0].clientY:t.clientY}},{key:"_wrap",value:function(t){return t>=this.count?t%this.count:t<0?this._wrap(this.count+t%this.count):t}},{key:"_track",value:function(){var t=void 0,e=void 0,i=void 0,n=void 0;e=(t=Date.now())-this.timestamp,this.timestamp=t,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+e),this.velocity=.8*n+.2*this.velocity}},{key:"_autoScroll",value:function(){var t=void 0,e=void 0;this.amplitude&&(t=Date.now()-this.timestamp,(e=this.amplitude*Math.exp(-t/this.options.duration))>2||e<-2?(this._scroll(this.target-e),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(e){var i=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){i.$el.removeClass("scrolling")},this.options.duration);var n=void 0,s=void 0,o=void 0,a=void 0,r=void 0,l=void 0,h=void 0,d=void 0,u=void 0,c=this.center;if(this.offset="number"==typeof e?e:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),r=-(a=(o=this.offset-this.center*this.dim)<0?1:-1)*o*2/this.dim,s=this.count>>1,this.options.fullWidth?h="translateX(0)":(h="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) ",h+="translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)"),this.showIndicators){var p=this.center%this.count,v=this.$indicators.find(".indicator-item.active");v.index()!==p&&(v.removeClass("active"),this.$indicators.find(".indicator-item").eq(p)[0].classList.add("active"))}for((!this.noWrap||this.center>=0&&this.center0?1-r:1):(d=this.options.dist*(2*n-r*a),u=1-.2*(2*n-r*a)),(!this.noWrap||this.center-n>=0)&&((l=this.images[this._wrap(this.center-n)]).style[this.xform]=h+" translateX("+(-this.options.shift+(-this.dim*n-o)/2)+"px) translateZ("+d+"px)",l.style.zIndex=-n,l.style.opacity=u,l.style.visibility="visible");(!this.noWrap||this.center>=0&&this.center0&&Math.abs(i-this.count)0&&(this.target-=this.dim*i),"function"==typeof e&&(this.oneTimeCallback=e),this.offset!==this.target&&(this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound))}},{key:"next",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center+t;if(e>this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"prev",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center-t;if(e>this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"set",value:function(t,e){if((void 0===t||isNaN(t))&&(t=0),t>this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t,e)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Carousel}},{key:"defaults",get:function(){return e}}]),n}();M.Carousel=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"carousel","M_Carousel")}(cash),function(t){"use strict";var e={onOpen:void 0,onClose:void 0},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));return s.el.M_FeatureDiscovery=s,s.options=t.extend({},n.defaults,i),s.isOpen=!1,s.$origin=t("#"+s.$el.attr("data-target")),s._setup(),s._calculatePositioning(),s._setupEventHandlers(),s}return _createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.FeatureDiscovery=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(t){this.open()}},{key:"_handleOriginClick",value:function(t){this.close()}},{key:"_handleResize",value:function(t){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(e){t(e.target).closest(".tap-target-wrapper").length||(this.close(),e.preventDefault(),e.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=t(this.wrapper).find(".tap-target-wave")[0],this.originEl=t(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],t(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(t(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var e="fixed"===this.$origin.css("position");if(!e)for(var i=this.$origin.parents(),n=0;nd,v=a<=u,f=a>u,m=r>=.25*l&&r<=.75*l,g=this.$el.outerWidth(),_=this.$el.outerHeight(),y=a+o/2-_/2,k=r+s/2-g/2,b=e?"fixed":"absolute",w=m?g:g/2+s,C=_/2,E=v?_/2:0,x=c&&!m?g/2-s:0,L=s,T=f?"bottom":"top",O=2*s,$=O,D=_/2-$/2,B=g/2-O/2,I={};I.top=v?y+"px":"",I.right=p?l-k-g+"px":"",I.bottom=f?h-y-_+"px":"",I.left=c?k+"px":"",I.position=b,t(this.wrapper).css(I),t(this.contentEl).css({width:w+"px",height:C+"px",top:E+"px",right:"0px",bottom:"0px",left:x+"px",padding:L+"px",verticalAlign:T}),t(this.waveEl).css({top:D+"px",left:B+"px",width:O+"px",height:$+"px"})}},{key:"open",value:function(){this.isOpen||("function"==typeof this.options.onOpen&&this.options.onOpen.call(this,this.$origin[0]),this.isOpen=!0,this.wrapper.classList.add("open"),document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound))}},{key:"close",value:function(){this.isOpen&&("function"==typeof this.options.onClose&&this.options.onClose.call(this,this.$origin[0]),this.isOpen=!1,this.wrapper.classList.remove("open"),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FeatureDiscovery}},{key:"defaults",get:function(){return e}}]),n}();M.FeatureDiscovery=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"featureDiscovery","M_FeatureDiscovery")}(cash),function(t){"use strict";var e={classes:""},i=function(i){_inherits(n,Component);function n(e,i){_classCallCheck(this,n);var s=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,e,i));return s.el.M_Select=s,s.options=t.extend({},n.defaults,i),s.isMultiple=s.$el.prop("multiple"),s._keysSelected={},s._valueDict={},s._setupDropdown(),s._setupEventHandlers(),s}return _createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_Select=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleSelectChangeBound=this._handleSelectChange.bind(this),this._handleOptionClickBound=this._handleOptionClick.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),t(this.dropdownOptions).find("li:not(.optgroup)").each(function(t){t.addEventListener("click",e._handleOptionClickBound)}),this.el.addEventListener("change",this._handleSelectChangeBound),this.input.addEventListener("click",this._handleInputClickBound)}},{key:"_removeEventHandlers",value:function(){var e=this;t(this.dropdownOptions).find("li:not(.optgroup)").each(function(t){t.removeEventListener("click",e._handleOptionClickBound)}),this.el.removeEventListener("change",this._handleSelectChangeBound),this.input.removeEventListener("click",this._handleInputClickBound),this.input.removeEventListener("focus",this._handleInputFocusBound)}},{key:"_handleSelectChange",value:function(t){this._setValueToInput()}},{key:"_handleOptionClick",value:function(e){e.preventDefault();var i=t(e.target).closest("li")[0],n=i.id;if(!t(i).hasClass("disabled")&&!t(i).hasClass("optgroup")&&n.length){var s=!0;if(this.isMultiple){var o=t(this.dropdownOptions).find("li.disabled.selected");o.length&&(o.removeClass("selected"),o.find('input[type="checkbox"]').prop("checked",!1),this._toggleEntryFromArray(o[0].id));var a=t(i).find('input[type="checkbox"]');a.prop("checked",!a.prop("checked")),s=this._toggleEntryFromArray(n)}else t(this.dropdownOptions).find("li").removeClass("active"),t(i).toggleClass("active"),this.input.value=i.textContent;this._activateOption(t(this.dropdownOptions),i),t(this._valueDict[n].el).prop("selected",s),this.$el.trigger("change")}e.stopPropagation()}},{key:"_handleInputClick",value:function(){this.dropdown&&this.dropdown.isOpen&&(this._setValueToInput(),this._setSelectedStates())}},{key:"_setupDropdown",value:function(){var e=this;this.wrapper=document.createElement("div"),t(this.wrapper).addClass("select-wrapper "+this.options.classes),this.$el.before(t(this.wrapper)),this.wrapper.appendChild(this.el),this.el.disabled&&this.wrapper.classList.add("disabled"),this.$selectOptions=this.$el.children("option, optgroup"),this.dropdownOptions=document.createElement("ul"),this.dropdownOptions.id="select-options-"+M.guid(),t(this.dropdownOptions).addClass("dropdown-content select-dropdown "+(this.isMultiple?"multiple-select-dropdown":"")),this.$selectOptions.length&&this.$selectOptions.each(function(i){if(t(i).is("option")){var n=void 0;n=e.isMultiple?e._appendOptionWithIcon(e.$el,i,"multiple"):e._appendOptionWithIcon(e.$el,i),e._addOptionToValueDict(i,n)}else if(t(i).is("optgroup")){var s=t(i).children("option");t(e.dropdownOptions).append(t('
    • '+i.getAttribute("label")+"
    • ")[0]),s.each(function(t){var i=e._appendOptionWithIcon(e.$el,t,"optgroup-option");e._addOptionToValueDict(t,i)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),t(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&t(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var i=t('');if(this.$el.before(i[0]),!this.el.disabled){var n={};this.isMultiple&&(n.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,n)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(t,e){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};e.id=n,s.el=t,s.optionEl=e,this._valueDict[n]=s}},{key:"_removeDropdown",value:function(){t(this.wrapper).find(".caret").remove(),t(this.input).remove(),t(this.dropdownOptions).remove(),t(this.wrapper).before(this.$el),t(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(e,i,n){var s=i.disabled?"disabled ":"",o="optgroup-option"===n?"optgroup-option ":"",a=this.isMultiple?'":i.innerHTML,r=t("
    • "),l=t("");l.html(a),r.addClass(s+" "+o),r.append(l);var h=i.getAttribute("data-icon");i.getAttribute("class");if(h){var d=t('');r.prepend(d)}return t(this.dropdownOptions).append(r[0]),r[0]}},{key:"_toggleEntryFromArray",value:function(e){var i=!this._keysSelected.hasOwnProperty(e);return i?this._keysSelected[e]=!0:delete this._keysSelected[e],t(this._valueDict[e].optionEl).toggleClass("active"),t(this._valueDict[e].el).prop("selected",i),i}},{key:"_setValueToInput",value:function(){var e="";if(this.$el.find("option").each(function(i){if(t(i).prop("selected")){var n=t(i).text();e+=""===e?n:", "+n}}),""===e){var i=this.$el.find("option:disabled").eq(0);i.length&&(e=i.text())}this.input.value=e}},{key:"_setSelectedStates",value:function(){this._keysSelected={};for(var e in this._valueDict){var i=this._valueDict[e];t(i.el).prop("selected")?(t(i.optionEl).find('input[type="checkbox"]').prop("checked",!0),this._activateOption(t(this.dropdownOptions),t(i.optionEl)),this._keysSelected[e]=!0):(t(i.optionEl).find('input[type="checkbox"]').prop("checked",!1),t(i.optionEl).removeClass("selected"))}}},{key:"_activateOption",value:function(e,i){if(i){this.isMultiple||e.find("li.selected").removeClass("selected");t(i).addClass("selected")}}},{key:"getSelectedValues",value:function(){var t=[];for(var e in this._keysSelected)t.push(this._valueDict[e].el.value);return t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Select}},{key:"defaults",get:function(){return e}}]),n}();M.Select=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"select","M_Select")}(cash),function(t,e){"use strict";var i={},n=function(n){_inherits(s,Component);function s(e,i){_classCallCheck(this,s);var n=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,e,i));return n.el.M_Range=n,n.options=t.extend({},s.defaults,i),n._mousedown=!1,n._setupThumb(),n._setupEventHandlers(),n}return _createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeFocusBound=this._handleRangeFocus.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("focus",this._handleRangeFocusBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("focus",this._handleRangeFocusBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){t(this.value).html(this.$el.val()),t(this.thumb).hasClass("active")||this._showRangeBubble();var e=this._calcRangeOffset();t(this.thumb).addClass("active").css("left",e+"px")}},{key:"_handleRangeFocus",value:function(){M.tabPressed&&this.$el.addClass("focused")}},{key:"_handleRangeMousedownTouchstart",value:function(e){if(t(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),t(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==e.type){var i=this._calcRangeOffset();t(this.thumb).addClass("active").css("left",i+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){t(this.thumb).hasClass("active")||this._showRangeBubble();var e=this._calcRangeOffset();t(this.thumb).addClass("active").css("left",e+"px"),t(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){this.$el.removeClass("focused");var i=7+parseInt(this.$el.css("padding-left"))+"px";t(this.thumb).hasClass("active")&&(e.remove(this.thumb),e({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:i,duration:100})),t(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),t(this.thumb).addClass("thumb"),t(this.value).addClass("value"),t(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){t(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var i=-7+parseInt(t(this.thumb).parent().css("padding-left"))+"px";e.remove(this.thumb),e({targets:this.thumb,height:30,width:30,top:-30,marginLeft:i,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var t=this.$el.width()-15,e=parseFloat(this.$el.attr("max")),i=parseFloat(this.$el.attr("min"));return(parseFloat(this.$el.val())-i)/(e-i)*t}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Range}},{key:"defaults",get:function(){return i}}]),s}();M.Range=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"range","M_Range"),n.init(t("input[type=range]"))}(cash,M.anime); \ No newline at end of file diff --git a/js/src/15.md5.js b/js/src/15.md5.js deleted file mode 100644 index 968058c..0000000 --- a/js/src/15.md5.js +++ /dev/null @@ -1 +0,0 @@ -var MD5 = function(s){function L(k,d){return(k<>>(32-d))}function K(G,k){var I,d,F,H,x;F=(G&2147483648);H=(k&2147483648);I=(G&1073741824);d=(k&1073741824);x=(G&1073741823)+(k&1073741823);if(I&d){return(x^2147483648^F^H)}if(I|d){if(x&1073741824){return(x^3221225472^F^H)}else{return(x^1073741824^F^H)}}else{return(x^F^H)}}function r(d,F,k){return(d&F)|((~d)&k)}function q(d,F,k){return(d&k)|(F&(~k))}function p(d,F,k){return(d^F^k)}function n(d,F,k){return(F^(d|(~k)))}function u(G,F,aa,Z,k,H,I){G=K(G,K(K(r(F,aa,Z),k),I));return K(L(G,H),F)}function f(G,F,aa,Z,k,H,I){G=K(G,K(K(q(F,aa,Z),k),I));return K(L(G,H),F)}function D(G,F,aa,Z,k,H,I){G=K(G,K(K(p(F,aa,Z),k),I));return K(L(G,H),F)}function t(G,F,aa,Z,k,H,I){G=K(G,K(K(n(F,aa,Z),k),I));return K(L(G,H),F)}function e(G){var Z;var F=G.length;var x=F+8;var k=(x-(x%64))/64;var I=(k+1)*16;var aa=Array(I-1);var d=0;var H=0;while(H>>29;return aa}function B(x){var k="",F="",G,d;for(d=0;d<=3;d++){G=(x>>>(d*8))&255;F="0"+G.toString(16);k=k+F.substr(F.length-2,2)}return k}function J(k){k=k.replace(/rn/g,"n");var d="";for(var F=0;F127)&&(x<2048)){d+=String.fromCharCode((x>>6)|192);d+=String.fromCharCode((x&63)|128)}else{d+=String.fromCharCode((x>>12)|224);d+=String.fromCharCode(((x>>6)&63)|128);d+=String.fromCharCode((x&63)|128)}}}return d}var C=Array();var P,h,E,v,g,Y,X,W,V;var S=7,Q=12,N=17,M=22;var A=5,z=9,y=14,w=20;var o=4,m=11,l=16,j=23;var U=6,T=10,R=15,O=21;s=J(s);C=e(s);Y=1732584193;X=4023233417;W=2562383102;V=271733878;for(P=0;P