From 2ed30f46cf1973febe1c3f166301e1795b0f136b Mon Sep 17 00:00:00 2001 From: kaze0617 <1515097306@qq.com> Date: Mon, 26 Apr 2021 19:58:07 +0800 Subject: [PATCH] update --- README.md | 2 +- js/APlayer.min.js | 1544 ++ js/Valine.min.js | 20 +- js/botui.js | 3997 ------ js/jquery.fancybox.min.js | 1537 -- js/lib.min.js | 27157 +++++++++++++++++++----------------- js/sakura-app.js | 57 +- 7 files changed, 15663 insertions(+), 18651 deletions(-) create mode 100644 js/APlayer.min.js delete mode 100644 js/botui.js delete mode 100644 js/jquery.fancybox.min.js diff --git a/README.md b/README.md index 0671615..872d687 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -## 博客的CDN +# cdn \ No newline at end of file diff --git a/js/APlayer.min.js b/js/APlayer.min.js new file mode 100644 index 0000000..e56e23e --- /dev/null +++ b/js/APlayer.min.js @@ -0,0 +1,1544 @@ +! function (e, t) { + "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("APlayer", [], t) : "object" == typeof exports ? exports.APlayer = t() : e.APlayer = t() +}(window, function () { + return function (e) { + var t = {}; + + function n(i) { + if (t[i]) return t[i].exports; + var a = t[i] = { + i: i, + l: !1, + exports: {} + }; + return e[i].call(a.exports, a, a.exports, n), a.l = !0, a.exports + } + return n.m = e, n.c = t, n.d = function (e, t, i) { + n.o(e, t) || Object.defineProperty(e, t, { + configurable: !1, + enumerable: !0, + get: i + }) + }, n.r = function (e) { + Object.defineProperty(e, "__esModule", { + value: !0 + }) + }, n.n = function (e) { + var t = e && e.__esModule ? function () { + return e.default + } : function () { + return e + }; + return n.d(t, "a", t), t + }, n.o = function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + }, n.p = "/", n(n.s = 41) + }([function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = /mobile/i.test(window.navigator.userAgent), + a = { + secondToTime: function (e) { + var t = Math.floor(e / 3600), + n = Math.floor((e - 3600 * t) / 60), + i = Math.floor(e - 3600 * t - 60 * n); + return (t > 0 ? [t, n, i] : [n, i]).map(function (e) { + return e < 10 ? "0" + e : "" + e + }).join(":") + }, + getElementViewLeft: function (e) { + var t = e.offsetLeft, + n = e.offsetParent, + i = document.body.scrollLeft + document.documentElement.scrollLeft; + if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement) + for (; null !== n && n !== e;) t += n.offsetLeft, n = n.offsetParent; + else + for (; null !== n;) t += n.offsetLeft, n = n.offsetParent; + return t - i + }, + getElementViewTop: function (e, t) { + for (var n, i = e.offsetTop, a = e.offsetParent; null !== a;) i += a.offsetTop, a = a.offsetParent; + return n = document.body.scrollTop + document.documentElement.scrollTop, t ? i : i - n + }, + isMobile: i, + storage: { + set: function (e, t) { + localStorage.setItem(e, t) + }, + get: function (e) { + return localStorage.getItem(e) + } + }, + nameMap: { + dragStart: i ? "touchstart" : "mousedown", + dragMove: i ? "touchmove" : "mousemove", + dragEnd: i ? "touchend" : "mouseup" + }, + randomOrder: function (e) { + return function (e) { + for (var t = e.length - 1; t >= 0; t--) { + var n = Math.floor(Math.random() * (t + 1)), + i = e[n]; + e[n] = e[t], e[t] = i + } + return e + }([].concat(function (e) { + if (Array.isArray(e)) { + for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t]; + return n + } + return Array.from(e) + }(Array(e))).map(function (e, t) { + return t + })) + } + }; + t.default = a + }, function (e, t, n) { + var i = n(2); + e.exports = function (e) { + "use strict"; + e = e || {}; + var t = "", + n = i.$each, + a = e.audio, + r = (e.$value, e.$index, i.$escape), + o = e.theme, + s = e.index; + return n(a, function (e, n) { + t += '\n
  • \n \n ', t += r(n + s), t += '\n ', t += r(e.name), t += '\n ', t += r(e.artist), t += "\n
  • \n" + }), t + } + }, function (e, t, n) { + "use strict"; + e.exports = n(15) + }, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = g(n(33)), + a = g(n(32)), + r = g(n(31)), + o = g(n(30)), + s = g(n(29)), + l = g(n(28)), + u = g(n(27)), + c = g(n(26)), + p = g(n(25)), + d = g(n(24)), + h = g(n(23)), + y = g(n(22)), + f = g(n(21)), + v = g(n(20)), + m = g(n(19)); + + function g(e) { + return e && e.__esModule ? e : { + default: e + } + } + var w = { + play: i.default, + pause: a.default, + volumeUp: r.default, + volumeDown: o.default, + volumeOff: s.default, + orderRandom: l.default, + orderList: u.default, + menu: c.default, + loopAll: p.default, + loopOne: d.default, + loopNone: h.default, + loading: y.default, + right: f.default, + skip: v.default, + lrc: m.default + }; + t.default = w + }, function (e, t, n) { + "use strict"; + var i, a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { + return typeof e + } : function (e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e + }; + i = function () { + return this + }(); + try { + i = i || Function("return this")() || (0, eval)("this") + } catch (e) { + "object" === ("undefined" == typeof window ? "undefined" : a(window)) && (i = window) + } + e.exports = i + }, function (e, t, n) { + "use strict"; + var i, a, r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { + return typeof e + } : function (e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e + }; + void 0 === (a = "function" == typeof (i = function () { + if ("object" === ("undefined" == typeof window ? "undefined" : r(window)) && void 0 !== document.querySelectorAll && void 0 !== window.pageYOffset && void 0 !== history.pushState) { + var e = function (e, t, n, i) { + return n > i ? t : e + (t - e) * ((a = n / i) < .5 ? 4 * a * a * a : (a - 1) * (2 * a - 2) * (2 * a - 2) + 1); + var a + }, + t = function (t, n, i, a) { + n = n || 500; + var r = (a = a || window).scrollTop || window.pageYOffset; + if ("number" == typeof t) var o = parseInt(t); + else var o = function (e, t) { + return "HTML" === e.nodeName ? -t : e.getBoundingClientRect().top + t + }(t, r); + var s = Date.now(), + l = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (e) { + window.setTimeout(e, 15) + }; + ! function u() { + var c = Date.now() - s; + a !== window ? a.scrollTop = e(r, o, c, n) : window.scroll(0, e(r, o, c, n)), c > n ? "function" == typeof i && i(t) : l(u) + }() + }, + n = function (e) { + if (!e.defaultPrevented) { + e.preventDefault(), location.hash !== this.hash && window.history.pushState(null, null, this.hash); + var n = document.getElementById(this.hash.substring(1)); + if (!n) return; + t(n, 500, function (e) { + location.replace("#" + e.id) + }) + } + }; + return document.addEventListener("DOMContentLoaded", function () { + for (var e, t = document.querySelectorAll('a[href^="#"]:not([href="#"])'), i = t.length; e = t[--i];) e.addEventListener("click", n, !1) + }), t + } + }) ? i.call(t, n, t, e) : i) || (e.exports = a) + }, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t + } + }(), + a = s(n(1)), + r = s(n(0)), + o = s(n(5)); + + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var l = function () { + function e(t) { + ! function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), this.player = t, this.index = 0, this.audios = this.player.options.audio, this.bindEvents() + } + return i(e, [{ + key: "bindEvents", + value: function () { + var e = this; + this.player.template.list.addEventListener("click", function (t) { + var n = void 0; + n = "LI" === t.target.tagName.toUpperCase() ? t.target : t.target.parentElement; + var i = parseInt(n.getElementsByClassName("aplayer-list-index")[0].innerHTML) - 1; + i !== e.index ? (e.switch(i), e.player.play()) : e.player.toggle() + }) + } + }, { + key: "show", + value: function () { + this.player.events.trigger("listshow"), this.player.template.list.classList.remove("aplayer-list-hide"), this.player.template.listOl.scrollTop = 33 * this.index + } + }, { + key: "hide", + value: function () { + this.player.events.trigger("listhide"), this.player.template.list.classList.add("aplayer-list-hide") + } + }, { + key: "toggle", + value: function () { + this.player.template.list.classList.contains("aplayer-list-hide") ? this.show() : this.hide() + } + }, { + key: "add", + value: function (e) { + this.player.events.trigger("listadd", { + audios: e + }), "[object Array]" !== Object.prototype.toString.call(e) && (e = [e]), e.map(function (e) { + return e.name = e.name || e.title || "Audio name", e.artist = e.artist || e.author || "Audio artist", e.cover = e.cover || e.pic, e.type = e.type || "normal", e + }); + var t = !(this.audios.length > 1), + n = 0 === this.audios.length; + this.player.template.listOl.innerHTML += (0, a.default)({ + theme: this.player.options.theme, + audio: e, + index: this.audios.length + 1 + }), this.audios = this.audios.concat(e), t && this.audios.length > 1 && this.player.container.classList.add("aplayer-withlist"), this.player.randomOrder = r.default.randomOrder(this.audios.length), this.player.template.listCurs = this.player.container.querySelectorAll(".aplayer-list-cur"), this.player.template.listCurs[this.audios.length - 1].style.backgroundColor = e.theme || this.player.options.theme, n && ("random" === this.player.options.order ? this.switch(this.player.randomOrder[0]) : this.switch(0)) + } + }, { + key: "remove", + value: function (e) { + if (this.player.events.trigger("listremove", { + index: e + }), this.audios[e]) + if (this.audios.length > 1) { + var t = this.player.container.querySelectorAll(".aplayer-list li"); + t[e].remove(), this.audios.splice(e, 1), this.player.lrc && this.player.lrc.remove(e), e === this.index && (this.audios[e] ? this.switch(e) : this.switch(e - 1)), this.index > e && this.index--; + for (var n = e; n < t.length; n++) t[n].getElementsByClassName("aplayer-list-index")[0].textContent = n; + 1 === this.audios.length && this.player.container.classList.remove("aplayer-withlist"), this.player.template.listCurs = this.player.container.querySelectorAll(".aplayer-list-cur") + } else this.clear() + } + }, { + key: "switch", + value: function (e) { + if (this.player.events.trigger("listswitch", { + index: e + }), void 0 !== e && this.audios[e]) { + this.index = e; + var t = this.audios[this.index]; + this.player.template.pic.style.backgroundImage = t.cover ? "url('" + t.cover + "')" : "", this.player.theme(this.audios[this.index].theme || this.player.options.theme, this.index, !1), this.player.template.title.innerHTML = t.name, this.player.template.author.innerHTML = t.artist ? " - " + t.artist : ""; + var n = this.player.container.getElementsByClassName("aplayer-list-light")[0]; + n && n.classList.remove("aplayer-list-light"), this.player.container.querySelectorAll(".aplayer-list li")[this.index].classList.add("aplayer-list-light"), (0, o.default)(33 * this.index, 500, null, this.player.template.listOl), this.player.setAudio(t), this.player.lrc && this.player.lrc.switch(this.index), this.player.lrc && this.player.lrc.update(0), 1 !== this.player.duration && (this.player.template.dtime.innerHTML = r.default.secondToTime(this.player.duration)) + } + } + }, { + key: "clear", + value: function () { + this.player.events.trigger("listclear"), this.index = 0, this.player.container.classList.remove("aplayer-withlist"), this.player.pause(), this.audios = [], this.player.lrc && this.player.lrc.clear(), this.player.audio.src = "", this.player.template.listOl.innerHTML = "", this.player.template.pic.style.backgroundImage = "", this.player.theme(this.player.options.theme, this.index, !1), this.player.template.title.innerHTML = "No audio", this.player.template.author.innerHTML = "", this.player.bar.set("loaded", 0, "width"), this.player.template.dtime.innerHTML = r.default.secondToTime(0) + } + }]), e + }(); + t.default = l + }, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t + } + }(); + var a = function () { + function e() { + ! function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), this.events = {}, this.audioEvents = ["abort", "canplay", "canplaythrough", "durationchange", "emptied", "ended", "error", "loadeddata", "loadedmetadata", "loadstart", "mozaudioavailable", "pause", "play", "playing", "progress", "ratechange", "seeked", "seeking", "stalled", "suspend", "timeupdate", "volumechange", "waiting"], this.playerEvents = ["destroy", "listshow", "listhide", "listadd", "listremove", "listswitch", "listclear", "noticeshow", "noticehide", "lrcshow", "lrchide"] + } + return i(e, [{ + key: "on", + value: function (e, t) { + this.type(e) && "function" == typeof t && (this.events[e] || (this.events[e] = []), this.events[e].push(t)) + } + }, { + key: "trigger", + value: function (e, t) { + if (this.events[e] && this.events[e].length) + for (var n = 0; n < this.events[e].length; n++) this.events[e][n](t) + } + }, { + key: "type", + value: function (e) { + return -1 !== this.playerEvents.indexOf(e) ? "player" : -1 !== this.audioEvents.indexOf(e) ? "audio" : (console.error("Unknown event name: " + e), null) + } + }]), e + }(); + t.default = a + }, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t + } + }(); + var a = function () { + function e(t) { + ! function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), this.player = t, window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e) { + window.setTimeout(e, 1e3 / 60) + }, this.types = ["loading"], this.init() + } + return i(e, [{ + key: "init", + value: function () { + var e = this; + this.types.forEach(function (t) { + e["init" + t + "Checker"]() + }) + } + }, { + key: "initloadingChecker", + value: function () { + var e = this, + t = 0, + n = 0, + i = !1; + this.loadingChecker = setInterval(function () { + e.enableloadingChecker && (n = e.player.audio.currentTime, i || n !== t || e.player.audio.paused || (e.player.container.classList.add("aplayer-loading"), i = !0), i && n > t && !e.player.audio.paused && (e.player.container.classList.remove("aplayer-loading"), i = !1), t = n) + }, 100) + } + }, { + key: "enable", + value: function (e) { + this["enable" + e + "Checker"] = !0, "fps" === e && this.initfpsChecker() + } + }, { + key: "disable", + value: function (e) { + this["enable" + e + "Checker"] = !1 + } + }, { + key: "destroy", + value: function () { + var e = this; + this.types.forEach(function (t) { + e["enable" + t + "Checker"] = !1, e[t + "Checker"] && clearInterval(e[t + "Checker"]) + }) + } + }]), e + }(); + t.default = a + }, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t + } + }(), + a = o(n(0)), + r = o(n(3)); + + function o(e) { + return e && e.__esModule ? e : { + default: e + } + } + var s = function () { + function e(t) { + ! function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), this.player = t, this.initPlayButton(), this.initPlayBar(), this.initOrderButton(), this.initLoopButton(), this.initMenuButton(), a.default.isMobile || this.initVolumeButton(), this.initMiniSwitcher(), this.initSkipButton(), this.initLrcButton() + } + return i(e, [{ + key: "initPlayButton", + value: function () { + var e = this; + this.player.template.pic.addEventListener("click", function () { + e.player.toggle() + }) + } + }, { + key: "initPlayBar", + value: function () { + var e = this, + t = function (t) { + var n = ((t.clientX || t.changedTouches[0].clientX) - a.default.getElementViewLeft(e.player.template.barWrap)) / e.player.template.barWrap.clientWidth; + n = Math.max(n, 0), n = Math.min(n, 1), e.player.bar.set("played", n, "width"), e.player.lrc && e.player.lrc.update(n * e.player.duration), e.player.template.ptime.innerHTML = a.default.secondToTime(n * e.player.duration) + }, + n = function n(i) { + document.removeEventListener(a.default.nameMap.dragEnd, n), document.removeEventListener(a.default.nameMap.dragMove, t); + var r = ((i.clientX || i.changedTouches[0].clientX) - a.default.getElementViewLeft(e.player.template.barWrap)) / e.player.template.barWrap.clientWidth; + r = Math.max(r, 0), r = Math.min(r, 1), e.player.bar.set("played", r, "width"), e.player.seek(e.player.bar.get("played", "width") * e.player.duration), e.player.disableTimeupdate = !1 + }; + this.player.template.barWrap.addEventListener(a.default.nameMap.dragStart, function () { + e.player.disableTimeupdate = !0, document.addEventListener(a.default.nameMap.dragMove, t), document.addEventListener(a.default.nameMap.dragEnd, n) + }) + } + }, { + key: "initVolumeButton", + value: function () { + var e = this; + this.player.template.volumeButton.addEventListener("click", function () { + e.player.audio.muted ? (e.player.audio.muted = !1, e.player.switchVolumeIcon(), e.player.bar.set("volume", e.player.volume(), "height")) : (e.player.audio.muted = !0, e.player.switchVolumeIcon(), e.player.bar.set("volume", 0, "height")) + }); + var t = function (t) { + var n = 1 - ((t.clientY || t.changedTouches[0].clientY) - a.default.getElementViewTop(e.player.template.volumeBar, e.player.options.fixed)) / e.player.template.volumeBar.clientHeight; + n = Math.max(n, 0), n = Math.min(n, 1), e.player.volume(n) + }, + n = function n(i) { + e.player.template.volumeBarWrap.classList.remove("aplayer-volume-bar-wrap-active"), document.removeEventListener(a.default.nameMap.dragEnd, n), document.removeEventListener(a.default.nameMap.dragMove, t); + var r = 1 - ((i.clientY || i.changedTouches[0].clientY) - a.default.getElementViewTop(e.player.template.volumeBar, e.player.options.fixed)) / e.player.template.volumeBar.clientHeight; + r = Math.max(r, 0), r = Math.min(r, 1), e.player.volume(r) + }; + this.player.template.volumeBarWrap.addEventListener(a.default.nameMap.dragStart, function () { + e.player.template.volumeBarWrap.classList.add("aplayer-volume-bar-wrap-active"), document.addEventListener(a.default.nameMap.dragMove, t), document.addEventListener(a.default.nameMap.dragEnd, n) + }) + } + }, { + key: "initOrderButton", + value: function () { + var e = this; + this.player.template.order.addEventListener("click", function () { + "list" === e.player.options.order ? (e.player.options.order = "random", e.player.template.order.innerHTML = r.default.orderRandom) : "random" === e.player.options.order && (e.player.options.order = "list", e.player.template.order.innerHTML = r.default.orderList) + }) + } + }, { + key: "initLoopButton", + value: function () { + var e = this; + this.player.template.loop.addEventListener("click", function () { + e.player.list.audios.length > 1 ? "one" === e.player.options.loop ? (e.player.options.loop = "none", e.player.template.loop.innerHTML = r.default.loopNone) : "none" === e.player.options.loop ? (e.player.options.loop = "all", e.player.template.loop.innerHTML = r.default.loopAll) : "all" === e.player.options.loop && (e.player.options.loop = "one", e.player.template.loop.innerHTML = r.default.loopOne) : "one" === e.player.options.loop || "all" === e.player.options.loop ? (e.player.options.loop = "none", e.player.template.loop.innerHTML = r.default.loopNone) : "none" === e.player.options.loop && (e.player.options.loop = "all", e.player.template.loop.innerHTML = r.default.loopAll) + }) + } + }, { + key: "initMenuButton", + value: function () { + var e = this; + this.player.template.menu.addEventListener("click", function () { + e.player.list.toggle() + }) + } + }, { + key: "initMiniSwitcher", + value: function () { + var e = this; + this.player.template.miniSwitcher.addEventListener("click", function () { + e.player.setMode("mini" === e.player.mode ? "normal" : "mini") + }) + } + }, { + key: "initSkipButton", + value: function () { + var e = this; + this.player.template.skipBackButton.addEventListener("click", function () { + e.player.skipBack() + }), this.player.template.skipForwardButton.addEventListener("click", function () { + e.player.skipForward() + }), this.player.template.skipPlayButton.addEventListener("click", function () { + e.player.toggle() + }) + } + }, { + key: "initLrcButton", + value: function () { + var e = this; + this.player.template.lrcButton.addEventListener("click", function () { + e.player.template.lrcButton.classList.contains("aplayer-icon-lrc-inactivity") ? (e.player.template.lrcButton.classList.remove("aplayer-icon-lrc-inactivity"), e.player.lrc && e.player.lrc.show()) : (e.player.template.lrcButton.classList.add("aplayer-icon-lrc-inactivity"), e.player.lrc && e.player.lrc.hide()) + }) + } + }]), e + }(); + t.default = s + }, function (e, t, n) { + var i = n(2); + e.exports = function (e) { + "use strict"; + e = e || {}; + var t = "", + n = i.$each, + a = e.lyrics, + r = (e.$value, e.$index, i.$escape); + return n(a, function (e, n) { + t += "\n 0 && void 0 !== arguments[0] ? arguments[0] : this.player.audio.currentTime; + if (this.index > this.current.length - 1 || e < this.current[this.index][0] || !this.current[this.index + 1] || e >= this.current[this.index + 1][0]) + for (var t = 0; t < this.current.length; t++) e >= this.current[t][0] && (!this.current[t + 1] || e < this.current[t + 1][0]) && (this.index = t, this.container.style.transform = "translateY(" + 16 * -this.index + "px)", this.container.style.webkitTransform = "translateY(" + 16 * -this.index + "px)", this.container.getElementsByClassName("aplayer-lrc-current")[0].classList.remove("aplayer-lrc-current"), this.container.getElementsByTagName("p")[t].classList.add("aplayer-lrc-current")) + } + }, { + key: "switch", + value: function (e) { + var t = this; + if (!this.parsed[e]) + if (this.async) { + this.parsed[e] = [ + ["00:00", "Loading"] + ]; + var n = new XMLHttpRequest; + n.onreadystatechange = function () { + e === t.player.list.index && 4 === n.readyState && (n.status >= 200 && n.status < 300 || 304 === n.status ? t.parsed[e] = t.parse(n.responseText) : (t.player.notice("LRC file request fails: status " + n.status), t.parsed[e] = [ + ["00:00", "Not available"] + ]), t.container.innerHTML = (0, o.default)({ + lyrics: t.parsed[e] + }), t.update(0), t.current = t.parsed[e]) + }; + var i = this.player.list.audios[e].lrc; + n.open("get", i, !0), n.send(null) + } else this.player.list.audios[e].lrc ? this.parsed[e] = this.parse(this.player.list.audios[e].lrc) : this.parsed[e] = [ + ["00:00", "Not available"] + ]; + this.container.innerHTML = (0, o.default)({ + lyrics: this.parsed[e] + }), this.update(0), this.current = this.parsed[e] + } + }, { + key: "parse", + value: function (e) { + if (e) { + for (var t = (e = e.replace(/([^\]^\n])\[/g, function (e, t) { + return t + "\n[" + })).split("\n"), n = [], i = t.length, a = 0; a < i; a++) { + var r = t[a].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g), + o = t[a].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g, "").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g, "").replace(/^\s+|\s+$/g, ""); + if (r) + for (var s = r.length, l = 0; l < s; l++) { + var u = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(r[l]), + c = 60 * u[1] + parseInt(u[2]) + (u[4] ? parseInt(u[4]) / (2 === (u[4] + "").length ? 100 : 1e3) : 0); + n.push([c, o]) + } + } + return (n = n.filter(function (e) { + return e[1] + })).sort(function (e, t) { + return e[0] - t[0] + }), n + } + return [] + } + }, { + key: "remove", + value: function (e) { + this.parsed.splice(e, 1) + } + }, { + key: "clear", + value: function () { + this.parsed = [], this.container.innerHTML = "" + } + }]), e + }(); + t.default = s + }, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i, a = function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t + } + }(), + r = n(0), + o = (i = r) && i.__esModule ? i : { + default: i + }; + var s = function () { + function e(t) { + ! function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), this.storageName = t.options.storageName, this.data = JSON.parse(o.default.storage.get(this.storageName)), this.data || (this.data = {}), this.data.volume = this.data.volume || t.options.volume + } + return a(e, [{ + key: "get", + value: function (e) { + return this.data[e] + } + }, { + key: "set", + value: function (e, t) { + this.data[e] = t, o.default.storage.set(this.storageName, JSON.stringify(this.data)) + } + }]), e + }(); + t.default = s + }, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t + } + }(); + var a = function () { + function e(t) { + ! function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), this.elements = {}, this.elements.volume = t.volume, this.elements.played = t.played, this.elements.loaded = t.loaded + } + return i(e, [{ + key: "set", + value: function (e, t, n) { + t = Math.max(t, 0), t = Math.min(t, 1), this.elements[e].style[n] = 100 * t + "%" + } + }, { + key: "get", + value: function (e, t) { + return parseFloat(this.elements[e].style[t]) / 100 + } + }]), e + }(); + t.default = a + }, function (e, t, n) { + "use strict"; + (function (t) { + e.exports = !1; + try { + e.exports = "[object process]" === Object.prototype.toString.call(t.process) + } catch (e) {} + }).call(this, n(4)) + }, function (e, t, n) { + "use strict"; + (function (t) { + var i = n(14), + a = Object.create(i ? t : window), + r = /["&'<>]/; + a.$escape = function (e) { + return function (e) { + var t = "" + e, + n = r.exec(t); + if (!n) return e; + var i = "", + a = void 0, + o = void 0, + s = void 0; + for (a = n.index, o = 0; a < t.length; a++) { + switch (t.charCodeAt(a)) { + case 34: + s = """; + break; + case 38: + s = "&"; + break; + case 39: + s = "'"; + break; + case 60: + s = "<"; + break; + case 62: + s = ">"; + break; + default: + continue + } + o !== a && (i += t.substring(o, a)), o = a + 1, i += s + } + return o !== a ? i + t.substring(o, a) : i + }(function e(t) { + "string" != typeof t && (t = void 0 === t || null === t ? "" : "function" == typeof t ? e(t.call(t)) : JSON.stringify(t)); + return t + }(e)) + }, a.$each = function (e, t) { + if (Array.isArray(e)) + for (var n = 0, i = e.length; n < i; n++) t(e[n], n); + else + for (var a in e) t(e[a], a) + }, e.exports = a + }).call(this, n(4)) + }, function (e, t, n) { + var i = n(2); + e.exports = function (e) { + "use strict"; + var t = "", + a = (e = e || {}).options, + r = e.cover, + o = i.$escape, + s = e.icons, + l = (arguments[1], function (e) { + return t += e + }), + u = e.getObject; + e.theme, e.audio, e.index; + return a.fixed ? (t += '\n
    1) + for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; + c.push(new f(e, t)), 1 !== c.length || p || l(y) + }, f.prototype.run = function () { + this.fun.apply(null, this.array) + }, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version = "", r.versions = {}, r.on = v, r.addListener = v, r.once = v, r.off = v, r.removeListener = v, r.removeAllListeners = v, r.emit = v, r.prependListener = v, r.prependOnceListener = v, r.listeners = function (e) { + return [] + }, r.binding = function (e) { + throw new Error("process.binding is not supported") + }, r.cwd = function () { + return "/" + }, r.chdir = function (e) { + throw new Error("process.chdir is not supported") + }, r.umask = function () { + return 0 + } + }, function (e, t, n) { + "use strict"; + (function (e, t) { + ! function (e, n) { + if (!e.setImmediate) { + var i, a, r, o, s, l = 1, + u = {}, + c = !1, + p = e.document, + d = Object.getPrototypeOf && Object.getPrototypeOf(e); + d = d && d.setTimeout ? d : e, "[object process]" === {}.toString.call(e.process) ? i = function (e) { + t.nextTick(function () { + y(e) + }) + } : ! function () { + if (e.postMessage && !e.importScripts) { + var t = !0, + n = e.onmessage; + return e.onmessage = function () { + t = !1 + }, e.postMessage("", "*"), e.onmessage = n, t + } + }() ? e.MessageChannel ? ((r = new MessageChannel).port1.onmessage = function (e) { + y(e.data) + }, i = function (e) { + r.port2.postMessage(e) + }) : p && "onreadystatechange" in p.createElement("script") ? (a = p.documentElement, i = function (e) { + var t = p.createElement("script"); + t.onreadystatechange = function () { + y(e), t.onreadystatechange = null, a.removeChild(t), t = null + }, a.appendChild(t) + }) : i = function (e) { + setTimeout(y, 0, e) + } : (o = "setImmediate$" + Math.random() + "$", s = function (t) { + t.source === e && "string" == typeof t.data && 0 === t.data.indexOf(o) && y(+t.data.slice(o.length)) + }, e.addEventListener ? e.addEventListener("message", s, !1) : e.attachEvent("onmessage", s), i = function (t) { + e.postMessage(o + t, "*") + }), d.setImmediate = function (e) { + "function" != typeof e && (e = new Function("" + e)); + for (var t = new Array(arguments.length - 1), n = 0; n < t.length; n++) t[n] = arguments[n + 1]; + var a = { + callback: e, + args: t + }; + return u[l] = a, i(l), l++ + }, d.clearImmediate = h + } + + function h(e) { + delete u[e] + } + + function y(e) { + if (c) setTimeout(y, 0, e); + else { + var t = u[e]; + if (t) { + c = !0; + try { + ! function (e) { + var t = e.callback, + i = e.args; + switch (i.length) { + case 0: + t(); + break; + case 1: + t(i[0]); + break; + case 2: + t(i[0], i[1]); + break; + case 3: + t(i[0], i[1], i[2]); + break; + default: + t.apply(n, i) + } + }(t) + } finally { + h(e), c = !1 + } + } + } + } + }("undefined" == typeof self ? void 0 === e ? void 0 : e : self) + }).call(this, n(4), n(34)) + }, function (e, t, n) { + "use strict"; + var i = Function.prototype.apply; + + function a(e, t) { + this._id = e, this._clearFn = t + } + t.setTimeout = function () { + return new a(i.call(setTimeout, window, arguments), clearTimeout) + }, t.setInterval = function () { + return new a(i.call(setInterval, window, arguments), clearInterval) + }, t.clearTimeout = t.clearInterval = function (e) { + e && e.close() + }, a.prototype.unref = a.prototype.ref = function () {}, a.prototype.close = function () { + this._clearFn.call(window, this._id) + }, t.enroll = function (e, t) { + clearTimeout(e._idleTimeoutId), e._idleTimeout = t + }, t.unenroll = function (e) { + clearTimeout(e._idleTimeoutId), e._idleTimeout = -1 + }, t._unrefActive = t.active = function (e) { + clearTimeout(e._idleTimeoutId); + var t = e._idleTimeout; + t >= 0 && (e._idleTimeoutId = setTimeout(function () { + e._onTimeout && e._onTimeout() + }, t)) + }, n(35), t.setImmediate = setImmediate, t.clearImmediate = clearImmediate + }, function (e, t, n) { + "use strict"; + (function (t) { + var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { + return typeof e + } : function (e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e + }, + i = setTimeout; + + function a() {} + + function r(e) { + if (!(this instanceof r)) throw new TypeError("Promises must be constructed via new"); + if ("function" != typeof e) throw new TypeError("not a function"); + this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], c(e, this) + } + + function o(e, t) { + for (; 3 === e._state;) e = e._value; + 0 !== e._state ? (e._handled = !0, r._immediateFn(function () { + var n = 1 === e._state ? t.onFulfilled : t.onRejected; + if (null !== n) { + var i; + try { + i = n(e._value) + } catch (e) { + return void l(t.promise, e) + } + s(t.promise, i) + } else(1 === e._state ? s : l)(t.promise, e._value) + })) : e._deferreds.push(t) + } + + function s(e, t) { + try { + if (t === e) throw new TypeError("A promise cannot be resolved with itself."); + if (t && ("object" === (void 0 === t ? "undefined" : n(t)) || "function" == typeof t)) { + var i = t.then; + if (t instanceof r) return e._state = 3, e._value = t, void u(e); + if ("function" == typeof i) return void c((a = i, o = t, function () { + a.apply(o, arguments) + }), e) + } + e._state = 1, e._value = t, u(e) + } catch (t) { + l(e, t) + } + var a, o + } + + function l(e, t) { + e._state = 2, e._value = t, u(e) + } + + function u(e) { + 2 === e._state && 0 === e._deferreds.length && r._immediateFn(function () { + e._handled || r._unhandledRejectionFn(e._value) + }); + for (var t = 0, n = e._deferreds.length; t < n; t++) o(e, e._deferreds[t]); + e._deferreds = null + } + + function c(e, t) { + var n = !1; + try { + e(function (e) { + n || (n = !0, s(t, e)) + }, function (e) { + n || (n = !0, l(t, e)) + }) + } catch (e) { + if (n) return; + n = !0, l(t, e) + } + } + r.prototype.catch = function (e) { + return this.then(null, e) + }, r.prototype.then = function (e, t) { + var n = new this.constructor(a); + return o(this, new function (e, t, n) { + this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.promise = n + }(e, t, n)), n + }, r.prototype.finally = function (e) { + var t = this.constructor; + return this.then(function (n) { + return t.resolve(e()).then(function () { + return n + }) + }, function (n) { + return t.resolve(e()).then(function () { + return t.reject(n) + }) + }) + }, r.all = function (e) { + return new r(function (t, i) { + if (!e || void 0 === e.length) throw new TypeError("Promise.all accepts an array"); + var a = Array.prototype.slice.call(e); + if (0 === a.length) return t([]); + var r = a.length; + + function o(e, s) { + try { + if (s && ("object" === (void 0 === s ? "undefined" : n(s)) || "function" == typeof s)) { + var l = s.then; + if ("function" == typeof l) return void l.call(s, function (t) { + o(e, t) + }, i) + } + a[e] = s, 0 == --r && t(a) + } catch (e) { + i(e) + } + } + for (var s = 0; s < a.length; s++) o(s, a[s]) + }) + }, r.resolve = function (e) { + return e && "object" === (void 0 === e ? "undefined" : n(e)) && e.constructor === r ? e : new r(function (t) { + t(e) + }) + }, r.reject = function (e) { + return new r(function (t, n) { + n(e) + }) + }, r.race = function (e) { + return new r(function (t, n) { + for (var i = 0, a = e.length; i < a; i++) e[i].then(t, n) + }) + }, r._immediateFn = "function" == typeof t && function (e) { + t(e) + } || function (e) { + i(e, 0) + }, r._unhandledRejectionFn = function (e) { + "undefined" != typeof console && console && console.warn("Possible Unhandled Promise Rejection:", e) + }, e.exports = r + }).call(this, n(36).setImmediate) + }, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t + } + }(), + a = v(n(37)), + r = v(n(0)), + o = v(n(3)), + s = v(n(18)), + l = v(n(17)), + u = v(n(13)), + c = v(n(12)), + p = v(n(11)), + d = v(n(9)), + h = v(n(8)), + y = v(n(7)), + f = v(n(6)); + + function v(e) { + return e && e.__esModule ? e : { + default: e + } + } + var m = [], + g = function () { + function e(t) { + if (function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }(this, e), this.options = (0, s.default)(t), this.container = this.options.container, this.paused = !0, this.playedPromise = a.default.resolve(), this.mode = "normal", this.randomOrder = r.default.randomOrder(this.options.audio.length), this.container.classList.add("aplayer"), this.options.lrcType && !this.options.fixed && this.container.classList.add("aplayer-withlrc"), this.options.audio.length > 1 && this.container.classList.add("aplayer-withlist"), r.default.isMobile && this.container.classList.add("aplayer-mobile"), this.arrow = this.container.offsetWidth <= 300, this.arrow && this.container.classList.add("aplayer-arrow"), this.container = this.options.container, 2 === this.options.lrcType || !0 === this.options.lrcType) + for (var n = this.container.getElementsByClassName("aplayer-lrc-content"), i = 0; i < n.length; i++) this.options.audio[i] && (this.options.audio[i].lrc = n[i].innerHTML); + this.template = new l.default({ + container: this.container, + options: this.options, + randomOrder: this.randomOrder + }), this.options.fixed && (this.container.classList.add("aplayer-fixed"), this.template.body.style.width = this.template.body.offsetWidth - 18 + "px"), this.options.mini && (this.setMode("mini"), this.template.info.style.display = "block"), this.template.info.offsetWidth < 200 && this.template.time.classList.add("aplayer-time-narrow"), this.options.lrcType && (this.lrc = new p.default({ + container: this.template.lrc, + async: 3 === this.options.lrcType, + player: this + })), this.events = new y.default, this.storage = new c.default(this), this.bar = new u.default(this.template), this.controller = new d.default(this), this.timer = new h.default(this), this.list = new f.default(this), this.initAudio(), this.bindEvents(), "random" === this.options.order ? this.list.switch(this.randomOrder[0]) : this.list.switch(0), this.options.autoplay && this.play(), m.push(this) + } + return i(e, [{ + key: "initAudio", + value: function () { + var e = this; + this.audio = document.createElement("audio"), this.audio.preload = this.options.preload; + for (var t = function (t) { + e.audio.addEventListener(e.events.audioEvents[t], function (n) { + e.events.trigger(e.events.audioEvents[t], n) + }) + }, n = 0; n < this.events.audioEvents.length; n++) t(n); + this.volume(this.storage.get("volume"), !0) + } + }, { + key: "bindEvents", + value: function () { + var e = this; + this.on("play", function () { + e.paused && e.setUIPlaying() + }), this.on("pause", function () { + e.paused || e.setUIPaused() + }), this.on("timeupdate", function () { + if (!e.disableTimeupdate) { + e.bar.set("played", e.audio.currentTime / e.duration, "width"), e.lrc && e.lrc.update(); + var t = r.default.secondToTime(e.audio.currentTime); + e.template.ptime.innerHTML !== t && (e.template.ptime.innerHTML = t) + } + }), this.on("durationchange", function () { + 1 !== e.duration && (e.template.dtime.innerHTML = r.default.secondToTime(e.duration)) + }), this.on("progress", function () { + var t = e.audio.buffered.length ? e.audio.buffered.end(e.audio.buffered.length - 1) / e.duration : 0; + e.bar.set("loaded", t, "width") + }); + var t = void 0; + this.on("error", function () { + e.list.audios.length > 1 ? (e.notice("An audio error has occurred, player will skip forward in 2 seconds."), t = setTimeout(function () { + e.skipForward(), e.paused || e.play() + }, 2e3)) : 1 === e.list.audios.length && e.notice("An audio error has occurred.") + }), this.events.on("listswitch", function () { + t && clearTimeout(t) + }), this.on("ended", function () { + "none" === e.options.loop ? "list" === e.options.order ? e.list.index < e.list.audios.length - 1 ? (e.list.switch((e.list.index + 1) % e.list.audios.length), e.play()) : (e.list.switch((e.list.index + 1) % e.list.audios.length), e.pause()) : "random" === e.options.order && (e.randomOrder.indexOf(e.list.index) < e.randomOrder.length - 1 ? (e.list.switch(e.nextIndex()), e.play()) : (e.list.switch(e.nextIndex()), e.pause())) : "one" === e.options.loop ? (e.list.switch(e.list.index), e.play()) : "all" === e.options.loop && (e.skipForward(), e.play()) + }) + } + }, { + key: "setAudio", + value: function (e) { + this.hls && (this.hls.destroy(), this.hls = null); + var t = e.type; + this.options.customAudioType && this.options.customAudioType[t] ? "[object Function]" === Object.prototype.toString.call(this.options.customAudioType[t]) ? this.options.customAudioType[t](this.audio, e, this) : console.error("Illegal customType: " + t) : (t && "auto" !== t || (t = /m3u8(#|\?|$)/i.exec(e.url) ? "hls" : "normal"), "hls" === t ? Hls.isSupported() ? (this.hls = new Hls, this.hls.loadSource(e.url), this.hls.attachMedia(this.audio)) : this.audio.canPlayType("application/x-mpegURL") || this.audio.canPlayType("application/vnd.apple.mpegURL") ? this.audio.src = e.url : this.notice("Error: HLS is not supported.") : "normal" === t && (this.audio.src = e.url)), this.seek(0), this.paused || this.audio.play() + } + }, { + key: "theme", + value: function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.list.audios[this.list.index].theme || this.options.theme, + t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.list.index; + (!(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2]) && this.list.audios[t] && (this.list.audios[t].theme = e), this.template.listCurs[t] && (this.template.listCurs[t].style.backgroundColor = e), t === this.list.index && (this.template.pic.style.backgroundColor = e, this.template.played.style.background = e, this.template.thumb.style.background = e, this.template.volume.style.background = e) + } + }, { + key: "seek", + value: function (e) { + e = Math.max(e, 0), e = Math.min(e, this.duration), this.audio.currentTime = e, this.bar.set("played", e / this.duration, "width"), this.template.ptime.innerHTML = r.default.secondToTime(e) + } + }, { + key: "setUIPlaying", + value: function () { + var e = this; + if (this.paused && (this.paused = !1, this.template.button.classList.remove("aplayer-play"), this.template.button.classList.add("aplayer-pause"), this.template.button.innerHTML = "", setTimeout(function () { + e.template.button.innerHTML = o.default.pause + }, 100), this.template.skipPlayButton.innerHTML = o.default.pause), this.timer.enable("loading"), this.options.mutex) + for (var t = 0; t < m.length; t++) this !== m[t] && m[t].pause() + } + }, { + key: "play", + value: function () { + var e = this; + this.setUIPlaying(); + var t = this.audio.play(); + t && t.catch(function (t) { + console.warn(t), "NotAllowedError" === t.name && e.setUIPaused() + }) + } + }, { + key: "setUIPaused", + value: function () { + var e = this; + this.paused || (this.paused = !0, this.template.button.classList.remove("aplayer-pause"), this.template.button.classList.add("aplayer-play"), this.template.button.innerHTML = "", setTimeout(function () { + e.template.button.innerHTML = o.default.play + }, 100), this.template.skipPlayButton.innerHTML = o.default.play), this.container.classList.remove("aplayer-loading"), this.timer.disable("loading") + } + }, { + key: "pause", + value: function () { + this.setUIPaused(), this.audio.pause() + } + }, { + key: "switchVolumeIcon", + value: function () { + this.volume() >= .95 ? this.template.volumeButton.innerHTML = o.default.volumeUp : this.volume() > 0 ? this.template.volumeButton.innerHTML = o.default.volumeDown : this.template.volumeButton.innerHTML = o.default.volumeOff + } + }, { + key: "volume", + value: function (e, t) { + return e = parseFloat(e), isNaN(e) || (e = Math.max(e, 0), e = Math.min(e, 1), this.bar.set("volume", e, "height"), t || this.storage.set("volume", e), this.audio.volume = e, this.audio.muted && (this.audio.muted = !1), this.switchVolumeIcon()), this.audio.muted ? 0 : this.audio.volume + } + }, { + key: "on", + value: function (e, t) { + this.events.on(e, t) + } + }, { + key: "toggle", + value: function () { + this.template.button.classList.contains("aplayer-play") ? this.play() : this.template.button.classList.contains("aplayer-pause") && this.pause() + } + }, { + key: "switchAudio", + value: function (e) { + this.list.switch(e) + } + }, { + key: "addAudio", + value: function (e) { + this.list.add(e) + } + }, { + key: "removeAudio", + value: function (e) { + this.list.remove(e) + } + }, { + key: "destroy", + value: function () { + m.splice(m.indexOf(this), 1), this.pause(), this.container.innerHTML = "", this.audio.src = "", this.timer.destroy(), this.events.trigger("destroy") + } + }, { + key: "setMode", + value: function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "normal"; + this.mode = e, "mini" === e ? this.container.classList.add("aplayer-narrow") : "normal" === e && this.container.classList.remove("aplayer-narrow") + } + }, { + key: "notice", + value: function (e) { + var t = this, + n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2e3, + i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .8; + this.template.notice.innerHTML = e, this.template.notice.style.opacity = i, this.noticeTime && clearTimeout(this.noticeTime), this.events.trigger("noticeshow", { + text: e + }), n && (this.noticeTime = setTimeout(function () { + t.template.notice.style.opacity = 0, t.events.trigger("noticehide") + }, n)) + } + }, { + key: "prevIndex", + value: function () { + if (!(this.list.audios.length > 1)) return 0; + if ("list" === this.options.order) return this.list.index - 1 < 0 ? this.list.audios.length - 1 : this.list.index - 1; + if ("random" === this.options.order) { + var e = this.randomOrder.indexOf(this.list.index); + return 0 === e ? this.randomOrder[this.randomOrder.length - 1] : this.randomOrder[e - 1] + } + } + }, { + key: "nextIndex", + value: function () { + if (!(this.list.audios.length > 1)) return 0; + if ("list" === this.options.order) return (this.list.index + 1) % this.list.audios.length; + if ("random" === this.options.order) { + var e = this.randomOrder.indexOf(this.list.index); + return e === this.randomOrder.length - 1 ? this.randomOrder[0] : this.randomOrder[e + 1] + } + } + }, { + key: "skipBack", + value: function () { + this.list.switch(this.prevIndex()) + } + }, { + key: "skipForward", + value: function () { + this.list.switch(this.nextIndex()) + } + }, { + key: "duration", + get: function () { + return isNaN(this.audio.duration) ? 0 : this.audio.duration + } + }], [{ + key: "version", + get: function () { + return "1.10.1" + } + }]), e + }(); + t.default = g + }, , function (e, t, n) {}, function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), n(40); + var i, a = n(38), + r = (i = a) && i.__esModule ? i : { + default: i + }; + console.log("\n %c APlayer v1.10.1 af84efb %c http://aplayer.js.org \n", "color: #fadfa3; background: #030307; padding:5px 0;", "background: #fadfa3; padding:5px 0;"), t.default = r.default + }]).default +}); +//# sourceMappingURL=APlayer.min.js.map \ No newline at end of file diff --git a/js/Valine.min.js b/js/Valine.min.js index 6c1ca61..78506e4 100644 --- a/js/Valine.min.js +++ b/js/Valine.min.js @@ -1681,13 +1681,17 @@ a = function (e, t) { var n = o.default.store.get(i.QQCacheKey); n && n.qq == e ? t && t(n) : o.default.ajax({ - type: "POST", - url: "//valine.api.ioliu.cn/getqqinfo", - data: { - qq: e - }, + type: "GET", + url: "https://api.usuuu.com/qq/" + e, + dataType: "jsonp", + async: false, success: function (e) { - e.errmsg || (o.default.store.set(i.QQCacheKey, e), t && t(e)) + let data = { + nick: e["data"]["name"], + qq: e["data"]["qq"], + pic: e["data"]["avatar"] + }; + e["code"] != 200 || (o.default.store.set(i.QQCacheKey, data), t && t(data)) } }) }, @@ -3534,9 +3538,9 @@ } }, function (e, t) { e.exports = { - nick: "昵称(输入QQ号自动获取头像和邮箱)", + nick: "昵称(输入QQ号会自动拉取昵称和头像!)", mail: "邮箱", - link: "[选填]网址(http://)", + link: "网址(http://)", nickFail: "昵称不能少于3个字符", mailFail: "请填写正确的邮件地址", sofa: "来发评论吧~", diff --git a/js/botui.js b/js/botui.js deleted file mode 100644 index 26c9c19..0000000 --- a/js/botui.js +++ /dev/null @@ -1,3997 +0,0 @@ -/*! - * Vue.js v2.3.2 - * (c) 2014-2017 Evan You - * Released under the MIT License. - */ -! function (e, t) { - "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.Vue = t() -}(this, function () { - "use strict"; - - function e(e) { - return void 0 === e || null === e - } - - function t(e) { - return void 0 !== e && null !== e - } - - function n(e) { - return !0 === e - } - - function r(e) { - return "string" == typeof e || "number" == typeof e - } - - function i(e) { - return null !== e && "object" == typeof e - } - - function o(e) { - return "[object Object]" === Ai.call(e) - } - - function a(e) { - return "[object RegExp]" === Ai.call(e) - } - - function s(e) { - return null == e ? "" : "object" == typeof e ? JSON.stringify(e, null, 2) : String(e) - } - - function c(e) { - var t = parseFloat(e); - return isNaN(t) ? e : t - } - - function u(e, t) { - for (var n = Object.create(null), r = e.split(","), i = 0; i < r.length; i++) n[r[i]] = !0; - return t ? function (e) { - return n[e.toLowerCase()] - } : function (e) { - return n[e] - } - } - - function l(e, t) { - if (e.length) { - var n = e.indexOf(t); - if (n > -1) return e.splice(n, 1) - } - } - - function f(e, t) { - return Si.call(e, t) - } - - function p(e) { - var t = Object.create(null); - return function (n) { - return t[n] || (t[n] = e(n)) - } - } - - function d(e, t) { - function n(n) { - var r = arguments.length; - return r ? r > 1 ? e.apply(t, arguments) : e.call(t, n) : e.call(t) - } - return n._length = e.length, n - } - - function v(e, t) { - t = t || 0; - for (var n = e.length - t, r = new Array(n); n--;) r[n] = e[n + t]; - return r - } - - function h(e, t) { - for (var n in t) e[n] = t[n]; - return e - } - - function m(e) { - for (var t = {}, n = 0; n < e.length; n++) e[n] && h(t, e[n]); - return t - } - - function g() {} - - function y(e, t) { - var n = i(e), - r = i(t); - if (!n || !r) return !n && !r && String(e) === String(t); - try { - return JSON.stringify(e) === JSON.stringify(t) - } catch (n) { - return e === t - } - } - - function _(e, t) { - for (var n = 0; n < e.length; n++) - if (y(e[n], t)) return n; - return -1 - } - - function b(e) { - var t = !1; - return function () { - t || (t = !0, e.apply(this, arguments)) - } - } - - function $(e) { - var t = (e + "").charCodeAt(0); - return 36 === t || 95 === t - } - - function x(e, t, n, r) { - Object.defineProperty(e, t, { - value: n, - enumerable: !!r, - writable: !0, - configurable: !0 - }) - } - - function w(e) { - if (!Fi.test(e)) { - var t = e.split("."); - return function (e) { - for (var n = 0; n < t.length; n++) { - if (!e) return; - e = e[t[n]] - } - return e - } - } - } - - function C(e, t, n) { - if (Pi.errorHandler) Pi.errorHandler.call(null, e, t, n); - else { - if (!Ui || "undefined" == typeof console) throw e; - console.error(e) - } - } - - function k(e) { - return "function" == typeof e && /native code/.test(e.toString()) - } - - function A(e) { - oo.target && ao.push(oo.target), oo.target = e - } - - function O() { - oo.target = ao.pop() - } - - function S(e, t) { - e.__proto__ = t - } - - function T(e, t, n) { - for (var r = 0, i = n.length; r < i; r++) { - var o = n[r]; - x(e, o, t[o]) - } - } - - function E(e, t) { - if (i(e)) { - var n; - return f(e, "__ob__") && e.__ob__ instanceof fo ? n = e.__ob__ : lo.shouldConvert && !eo() && (Array.isArray(e) || o(e)) && Object.isExtensible(e) && !e._isVue && (n = new fo(e)), t && n && n.vmCount++, n - } - } - - function j(e, t, n, r) { - var i = new oo, - o = Object.getOwnPropertyDescriptor(e, t); - if (!o || !1 !== o.configurable) { - var a = o && o.get, - s = o && o.set, - c = E(n); - Object.defineProperty(e, t, { - enumerable: !0, - configurable: !0, - get: function () { - var t = a ? a.call(e) : n; - return oo.target && (i.depend(), c && c.dep.depend(), Array.isArray(t) && I(t)), t - }, - set: function (t) { - var r = a ? a.call(e) : n; - t === r || t !== t && r !== r || (s ? s.call(e, t) : n = t, c = E(t), i.notify()) - } - }) - } - } - - function N(e, t, n) { - if (Array.isArray(e) && "number" == typeof t) return e.length = Math.max(e.length, t), e.splice(t, 1, n), n; - if (f(e, t)) return e[t] = n, n; - var r = e.__ob__; - return e._isVue || r && r.vmCount ? n : r ? (j(r.value, t, n), r.dep.notify(), n) : (e[t] = n, n) - } - - function L(e, t) { - if (Array.isArray(e) && "number" == typeof t) return void e.splice(t, 1); - var n = e.__ob__; - e._isVue || n && n.vmCount || f(e, t) && (delete e[t], n && n.dep.notify()) - } - - function I(e) { - for (var t = void 0, n = 0, r = e.length; n < r; n++) t = e[n], t && t.__ob__ && t.__ob__.dep.depend(), Array.isArray(t) && I(t) - } - - function D(e, t) { - if (!t) return e; - for (var n, r, i, a = Object.keys(t), s = 0; s < a.length; s++) n = a[s], r = e[n], i = t[n], f(e, n) ? o(r) && o(i) && D(r, i) : N(e, n, i); - return e - } - - function M(e, t) { - return t ? e ? e.concat(t) : Array.isArray(t) ? t : [t] : e - } - - function P(e, t) { - var n = Object.create(e || null); - return t ? h(n, t) : n - } - - function R(e) { - var t = e.props; - if (t) { - var n, r, i, a = {}; - if (Array.isArray(t)) - for (n = t.length; n--;) "string" == typeof (r = t[n]) && (i = Ti(r), a[i] = { - type: null - }); - else if (o(t)) - for (var s in t) r = t[s], i = Ti(s), a[i] = o(r) ? r : { - type: r - }; - e.props = a - } - } - - function F(e) { - var t = e.directives; - if (t) - for (var n in t) { - var r = t[n]; - "function" == typeof r && (t[n] = { - bind: r, - update: r - }) - } - } - - function B(e, t, n) { - function r(r) { - var i = po[r] || vo; - c[r] = i(e[r], t[r], n, r) - } - "function" == typeof t && (t = t.options), R(t), F(t); - var i = t.extends; - if (i && (e = B(e, i, n)), t.mixins) - for (var o = 0, a = t.mixins.length; o < a; o++) e = B(e, t.mixins[o], n); - var s, c = {}; - for (s in e) r(s); - for (s in t) f(e, s) || r(s); - return c - } - - function H(e, t, n, r) { - if ("string" == typeof n) { - var i = e[t]; - if (f(i, n)) return i[n]; - var o = Ti(n); - if (f(i, o)) return i[o]; - var a = Ei(o); - if (f(i, a)) return i[a]; - var s = i[n] || i[o] || i[a]; - return s - } - } - - function U(e, t, n, r) { - var i = t[e], - o = !f(n, e), - a = n[e]; - if (J(Boolean, i.type) && (o && !f(i, "default") ? a = !1 : J(String, i.type) || "" !== a && a !== ji(e) || (a = !0)), void 0 === a) { - a = V(r, i, e); - var s = lo.shouldConvert; - lo.shouldConvert = !0, E(a), lo.shouldConvert = s - } - return a - } - - function V(e, t, n) { - if (f(t, "default")) { - var r = t.default; - return e && e.$options.propsData && void 0 === e.$options.propsData[n] && void 0 !== e._props[n] ? e._props[n] : "function" == typeof r && "Function" !== z(t.type) ? r.call(e) : r - } - } - - function z(e) { - var t = e && e.toString().match(/^\s*function (\w+)/); - return t ? t[1] : "" - } - - function J(e, t) { - if (!Array.isArray(t)) return z(t) === z(e); - for (var n = 0, r = t.length; n < r; n++) - if (z(t[n]) === z(e)) return !0; - return !1 - } - - function K(e) { - return new ho(void 0, void 0, void 0, String(e)) - } - - function q(e) { - var t = new ho(e.tag, e.data, e.children, e.text, e.elm, e.context, e.componentOptions); - return t.ns = e.ns, t.isStatic = e.isStatic, t.key = e.key, t.isCloned = !0, t - } - - function W(e) { - for (var t = e.length, n = new Array(t), r = 0; r < t; r++) n[r] = q(e[r]); - return n - } - - function Z(e) { - function t() { - var e = arguments, - n = t.fns; - if (!Array.isArray(n)) return n.apply(null, arguments); - for (var r = 0; r < n.length; r++) n[r].apply(null, e) - } - return t.fns = e, t - } - - function G(t, n, r, i, o) { - var a, s, c, u; - for (a in t) s = t[a], c = n[a], u = _o(a), e(s) || (e(c) ? (e(s.fns) && (s = t[a] = Z(s)), r(u.name, s, u.once, u.capture, u.passive)) : s !== c && (c.fns = s, t[a] = c)); - for (a in n) e(t[a]) && (u = _o(a), i(u.name, n[a], u.capture)) - } - - function Y(r, i, o) { - function a() { - o.apply(this, arguments), l(s.fns, a) - } - var s, c = r[i]; - e(c) ? s = Z([a]) : t(c.fns) && n(c.merged) ? (s = c, s.fns.push(a)) : s = Z([c, a]), s.merged = !0, r[i] = s - } - - function Q(n, r, i) { - var o = r.options.props; - if (!e(o)) { - var a = {}, - s = n.attrs, - c = n.props; - if (t(s) || t(c)) - for (var u in o) { - var l = ji(u); - X(a, c, u, l, !0) || X(a, s, u, l, !1) - } - return a - } - } - - function X(e, n, r, i, o) { - if (t(n)) { - if (f(n, r)) return e[r] = n[r], o || delete n[r], !0; - if (f(n, i)) return e[r] = n[i], o || delete n[i], !0 - } - return !1 - } - - function ee(e) { - for (var t = 0; t < e.length; t++) - if (Array.isArray(e[t])) return Array.prototype.concat.apply([], e); - return e - } - - function te(e) { - return r(e) ? [K(e)] : Array.isArray(e) ? ne(e) : void 0 - } - - function ne(n, i) { - var o, a, s, c = []; - for (o = 0; o < n.length; o++) a = n[o], e(a) || "boolean" == typeof a || (s = c[c.length - 1], Array.isArray(a) ? c.push.apply(c, ne(a, (i || "") + "_" + o)) : r(a) ? t(s) && t(s.text) ? s.text += String(a) : "" !== a && c.push(K(a)) : t(a.text) && t(s) && t(s.text) ? c[c.length - 1] = K(s.text + a.text) : (t(a.tag) && e(a.key) && t(i) && (a.key = "__vlist" + i + "_" + o + "__"), c.push(a))); - return c - } - - function re(e, t) { - return i(e) ? t.extend(e) : e - } - - function ie(r, o, a) { - if (n(r.error) && t(r.errorComp)) return r.errorComp; - if (t(r.resolved)) return r.resolved; - if (n(r.loading) && t(r.loadingComp)) return r.loadingComp; - if (!t(r.contexts)) { - var s = r.contexts = [a], - c = !0, - u = function () { - for (var e = 0, t = s.length; e < t; e++) s[e].$forceUpdate() - }, - l = b(function (e) { - r.resolved = re(e, o), c || u() - }), - f = b(function (e) { - t(r.errorComp) && (r.error = !0, u()) - }), - p = r(l, f); - return i(p) && ("function" == typeof p.then ? e(r.resolved) && p.then(l, f) : t(p.component) && "function" == typeof p.component.then && (p.component.then(l, f), t(p.error) && (r.errorComp = re(p.error, o)), t(p.loading) && (r.loadingComp = re(p.loading, o), 0 === p.delay ? r.loading = !0 : setTimeout(function () { - e(r.resolved) && e(r.error) && (r.loading = !0, u()) - }, p.delay || 200)), t(p.timeout) && setTimeout(function () { - f(null) - }, p.timeout))), c = !1, r.loading ? r.loadingComp : r.resolved - } - r.contexts.push(a) - } - - function oe(e) { - if (Array.isArray(e)) - for (var n = 0; n < e.length; n++) { - var r = e[n]; - if (t(r) && t(r.componentOptions)) return r - } - } - - function ae(e) { - e._events = Object.create(null), e._hasHookEvent = !1; - var t = e.$options._parentListeners; - t && ue(e, t) - } - - function se(e, t, n) { - n ? go.$once(e, t) : go.$on(e, t) - } - - function ce(e, t) { - go.$off(e, t) - } - - function ue(e, t, n) { - go = e, G(t, n || {}, se, ce, e) - } - - function le(e, t) { - var n = {}; - if (!e) return n; - for (var r = [], i = 0, o = e.length; i < o; i++) { - var a = e[i]; - if (a.context !== t && a.functionalContext !== t || !a.data || null == a.data.slot) r.push(a); - else { - var s = a.data.slot, - c = n[s] || (n[s] = []); - "template" === a.tag ? c.push.apply(c, a.children) : c.push(a) - } - } - return r.every(fe) || (n.default = r), n - } - - function fe(e) { - return e.isComment || " " === e.text - } - - function pe(e) { - for (var t = {}, n = 0; n < e.length; n++) t[e[n][0]] = e[n][1]; - return t - } - - function de(e) { - var t = e.$options, - n = t.parent; - if (n && !t.abstract) { - for (; n.$options.abstract && n.$parent;) n = n.$parent; - n.$children.push(e) - } - e.$parent = n, e.$root = n ? n.$root : e, e.$children = [], e.$refs = {}, e._watcher = null, e._inactive = null, e._directInactive = !1, e._isMounted = !1, e._isDestroyed = !1, e._isBeingDestroyed = !1 - } - - function ve(e, t, n) { - e.$el = t, e.$options.render || (e.$options.render = yo), _e(e, "beforeMount"); - var r; - return r = function () { - e._update(e._render(), n) - }, e._watcher = new So(e, r, g), n = !1, null == e.$vnode && (e._isMounted = !0, _e(e, "mounted")), e - } - - function he(e, t, n, r, i) { - var o = !!(i || e.$options._renderChildren || r.data.scopedSlots || e.$scopedSlots !== Ri); - if (e.$options._parentVnode = r, e.$vnode = r, e._vnode && (e._vnode.parent = r), e.$options._renderChildren = i, t && e.$options.props) { - lo.shouldConvert = !1; - for (var a = e._props, s = e.$options._propKeys || [], c = 0; c < s.length; c++) { - var u = s[c]; - a[u] = U(u, e.$options.props, t, e) - } - lo.shouldConvert = !0, e.$options.propsData = t - } - if (n) { - var l = e.$options._parentListeners; - e.$options._parentListeners = n, ue(e, n, l) - } - o && (e.$slots = le(i, r.context), e.$forceUpdate()) - } - - function me(e) { - for (; e && (e = e.$parent);) - if (e._inactive) return !0; - return !1 - } - - function ge(e, t) { - if (t) { - if (e._directInactive = !1, me(e)) return - } else if (e._directInactive) return; - if (e._inactive || null === e._inactive) { - e._inactive = !1; - for (var n = 0; n < e.$children.length; n++) ge(e.$children[n]); - _e(e, "activated") - } - } - - function ye(e, t) { - if (!(t && (e._directInactive = !0, me(e)) || e._inactive)) { - e._inactive = !0; - for (var n = 0; n < e.$children.length; n++) ye(e.$children[n]); - _e(e, "deactivated") - } - } - - function _e(e, t) { - var n = e.$options[t]; - if (n) - for (var r = 0, i = n.length; r < i; r++) try { - n[r].call(e) - } catch (n) { - C(n, e, t + " hook") - } - e._hasHookEvent && e.$emit("hook:" + t) - } - - function be() { - $o.length = xo.length = 0, wo = {}, Co = ko = !1 - } - - function $e() { - ko = !0; - var e, t; - for ($o.sort(function (e, t) { - return e.id - t.id - }), Ao = 0; Ao < $o.length; Ao++) e = $o[Ao], t = e.id, wo[t] = null, e.run(); - var n = xo.slice(), - r = $o.slice(); - be(), Ce(n), xe(r), to && Pi.devtools && to.emit("flush") - } - - function xe(e) { - for (var t = e.length; t--;) { - var n = e[t], - r = n.vm; - r._watcher === n && r._isMounted && _e(r, "updated") - } - } - - function we(e) { - e._inactive = !1, xo.push(e) - } - - function Ce(e) { - for (var t = 0; t < e.length; t++) e[t]._inactive = !0, ge(e[t], !0) - } - - function ke(e) { - var t = e.id; - if (null == wo[t]) { - if (wo[t] = !0, ko) { - for (var n = $o.length - 1; n >= 0 && $o[n].id > e.id;) n--; - $o.splice(Math.max(n, Ao) + 1, 0, e) - } else $o.push(e); - Co || (Co = !0, ro($e)) - } - } - - function Ae(e) { - To.clear(), Oe(e, To) - } - - function Oe(e, t) { - var n, r, o = Array.isArray(e); - if ((o || i(e)) && Object.isExtensible(e)) { - if (e.__ob__) { - var a = e.__ob__.dep.id; - if (t.has(a)) return; - t.add(a) - } - if (o) - for (n = e.length; n--;) Oe(e[n], t); - else - for (r = Object.keys(e), n = r.length; n--;) Oe(e[r[n]], t) - } - } - - function Se(e, t, n) { - Eo.get = function () { - return this[t][n] - }, Eo.set = function (e) { - this[t][n] = e - }, Object.defineProperty(e, n, Eo) - } - - function Te(e) { - e._watchers = []; - var t = e.$options; - t.props && Ee(e, t.props), t.methods && Me(e, t.methods), t.data ? je(e) : E(e._data = {}, !0), t.computed && Le(e, t.computed), t.watch && Pe(e, t.watch) - } - - function Ee(e, t) { - var n = e.$options.propsData || {}, - r = e._props = {}, - i = e.$options._propKeys = [], - o = !e.$parent; - lo.shouldConvert = o; - for (var a in t) ! function (o) { - i.push(o); - var a = U(o, t, n, e); - j(r, o, a), o in e || Se(e, "_props", o) - }(a); - lo.shouldConvert = !0 - } - - function je(e) { - var t = e.$options.data; - t = e._data = "function" == typeof t ? Ne(t, e) : t || {}, o(t) || (t = {}); - for (var n = Object.keys(t), r = e.$options.props, i = n.length; i--;) r && f(r, n[i]) || $(n[i]) || Se(e, "_data", n[i]); - E(t, !0) - } - - function Ne(e, t) { - try { - return e.call(t) - } catch (e) { - return C(e, t, "data()"), {} - } - } - - function Le(e, t) { - var n = e._computedWatchers = Object.create(null); - for (var r in t) { - var i = t[r], - o = "function" == typeof i ? i : i.get; - n[r] = new So(e, o, g, jo), r in e || Ie(e, r, i) - } - } - - function Ie(e, t, n) { - "function" == typeof n ? (Eo.get = De(t), Eo.set = g) : (Eo.get = n.get ? !1 !== n.cache ? De(t) : n.get : g, Eo.set = n.set ? n.set : g), Object.defineProperty(e, t, Eo) - } - - function De(e) { - return function () { - var t = this._computedWatchers && this._computedWatchers[e]; - if (t) return t.dirty && t.evaluate(), oo.target && t.depend(), t.value - } - } - - function Me(e, t) { - e.$options.props; - for (var n in t) e[n] = null == t[n] ? g : d(t[n], e) - } - - function Pe(e, t) { - for (var n in t) { - var r = t[n]; - if (Array.isArray(r)) - for (var i = 0; i < r.length; i++) Re(e, n, r[i]); - else Re(e, n, r) - } - } - - function Re(e, t, n) { - var r; - o(n) && (r = n, n = n.handler), "string" == typeof n && (n = e[n]), e.$watch(t, n, r) - } - - function Fe(e) { - var t = e.$options.provide; - t && (e._provided = "function" == typeof t ? t.call(e) : t) - } - - function Be(e) { - var t = He(e.$options.inject, e); - t && Object.keys(t).forEach(function (n) { - j(e, n, t[n]) - }) - } - - function He(e, t) { - if (e) { - for (var n = Array.isArray(e), r = Object.create(null), i = n ? e : no ? Reflect.ownKeys(e) : Object.keys(e), o = 0; o < i.length; o++) - for (var a = i[o], s = n ? a : e[a], c = t; c;) { - if (c._provided && s in c._provided) { - r[a] = c._provided[s]; - break - } - c = c.$parent - } - return r - } - } - - function Ue(e, n, r, i, o) { - var a = {}, - s = e.options.props; - if (t(s)) - for (var c in s) a[c] = U(c, s, n || {}); - else t(r.attrs) && Ve(a, r.attrs), t(r.props) && Ve(a, r.props); - var u = Object.create(i), - l = function (e, t, n, r) { - return Ze(u, e, t, n, r, !0) - }, - f = e.options.render.call(null, l, { - data: r, - props: a, - children: o, - parent: i, - listeners: r.on || {}, - injections: He(e.options.inject, i), - slots: function () { - return le(o, i) - } - }); - return f instanceof ho && (f.functionalContext = i, f.functionalOptions = e.options, r.slot && ((f.data || (f.data = {})).slot = r.slot)), f - } - - function Ve(e, t) { - for (var n in t) e[Ti(n)] = t[n] - } - - function ze(r, o, a, s, c) { - if (!e(r)) { - var u = a.$options._base; - if (i(r) && (r = u.extend(r)), "function" == typeof r && (!e(r.cid) || void 0 !== (r = ie(r, u, a)))) { - ut(r), o = o || {}, t(o.model) && We(r.options, o); - var l = Q(o, r, c); - if (n(r.options.functional)) return Ue(r, l, o, a, s); - var f = o.on; - o.on = o.nativeOn, n(r.options.abstract) && (o = {}), Ke(o); - var p = r.options.name || c; - return new ho("vue-component-" + r.cid + (p ? "-" + p : ""), o, void 0, void 0, void 0, a, { - Ctor: r, - propsData: l, - listeners: f, - tag: c, - children: s - }) - } - } - } - - function Je(e, n, r, i) { - var o = e.componentOptions, - a = { - _isComponent: !0, - parent: n, - propsData: o.propsData, - _componentTag: o.tag, - _parentVnode: e, - _parentListeners: o.listeners, - _renderChildren: o.children, - _parentElm: r || null, - _refElm: i || null - }, - s = e.data.inlineTemplate; - return t(s) && (a.render = s.render, a.staticRenderFns = s.staticRenderFns), new o.Ctor(a) - } - - function Ke(e) { - e.hook || (e.hook = {}); - for (var t = 0; t < Lo.length; t++) { - var n = Lo[t], - r = e.hook[n], - i = No[n]; - e.hook[n] = r ? qe(i, r) : i - } - } - - function qe(e, t) { - return function (n, r, i, o) { - e(n, r, i, o), t(n, r, i, o) - } - } - - function We(e, n) { - var r = e.model && e.model.prop || "value", - i = e.model && e.model.event || "input"; - (n.props || (n.props = {}))[r] = n.model.value; - var o = n.on || (n.on = {}); - t(o[i]) ? o[i] = [n.model.callback].concat(o[i]) : o[i] = n.model.callback - } - - function Ze(e, t, i, o, a, s) { - return (Array.isArray(i) || r(i)) && (a = o, o = i, i = void 0), n(s) && (a = Do), Ge(e, t, i, o, a) - } - - function Ge(e, n, r, i, o) { - if (t(r) && t(r.__ob__)) return yo(); - if (!n) return yo(); - Array.isArray(i) && "function" == typeof i[0] && (r = r || {}, r.scopedSlots = { - default: i[0] - }, i.length = 0), o === Do ? i = te(i) : o === Io && (i = ee(i)); - var a, s; - if ("string" == typeof n) { - var c; - s = Pi.getTagNamespace(n), a = Pi.isReservedTag(n) ? new ho(Pi.parsePlatformTagName(n), r, i, void 0, void 0, e) : t(c = H(e.$options, "components", n)) ? ze(c, r, e, i, n) : new ho(n, r, i, void 0, void 0, e) - } else a = ze(n, r, e, i); - return t(a) ? (s && Ye(a, s), a) : yo() - } - - function Ye(n, r) { - if (n.ns = r, "foreignObject" !== n.tag && t(n.children)) - for (var i = 0, o = n.children.length; i < o; i++) { - var a = n.children[i]; - t(a.tag) && e(a.ns) && Ye(a, r) - } - } - - function Qe(e, t) { - var n, r, o, a, s; - if (Array.isArray(e) || "string" == typeof e) - for (n = new Array(e.length), r = 0, o = e.length; r < o; r++) n[r] = t(e[r], r); - else if ("number" == typeof e) - for (n = new Array(e), r = 0; r < e; r++) n[r] = t(r + 1, r); - else if (i(e)) - for (a = Object.keys(e), n = new Array(a.length), r = 0, o = a.length; r < o; r++) s = a[r], n[r] = t(e[s], s, r); - return n - } - - function Xe(e, t, n, r) { - var i = this.$scopedSlots[e]; - if (i) return n = n || {}, r && h(n, r), i(n) || t; - var o = this.$slots[e]; - return o || t - } - - function et(e) { - return H(this.$options, "filters", e, !0) || Li - } - - function tt(e, t, n) { - var r = Pi.keyCodes[t] || n; - return Array.isArray(r) ? -1 === r.indexOf(e) : r !== e - } - - function nt(e, t, n, r) { - if (n) - if (i(n)) { - Array.isArray(n) && (n = m(n)); - var o; - for (var a in n) { - if ("class" === a || "style" === a) o = e; - else { - var s = e.attrs && e.attrs.type; - o = r || Pi.mustUseProp(t, s, a) ? e.domProps || (e.domProps = {}) : e.attrs || (e.attrs = {}) - } - a in o || (o[a] = n[a]) - } - } else; - return e - } - - function rt(e, t) { - var n = this._staticTrees[e]; - return n && !t ? Array.isArray(n) ? W(n) : q(n) : (n = this._staticTrees[e] = this.$options.staticRenderFns[e].call(this._renderProxy), ot(n, "__static__" + e, !1), n) - } - - function it(e, t, n) { - return ot(e, "__once__" + t + (n ? "_" + n : ""), !0), e - } - - function ot(e, t, n) { - if (Array.isArray(e)) - for (var r = 0; r < e.length; r++) e[r] && "string" != typeof e[r] && at(e[r], t + "_" + r, n); - else at(e, t, n) - } - - function at(e, t, n) { - e.isStatic = !0, e.key = t, e.isOnce = n - } - - function st(e) { - e._vnode = null, e._staticTrees = null; - var t = e.$vnode = e.$options._parentVnode, - n = t && t.context; - e.$slots = le(e.$options._renderChildren, n), e.$scopedSlots = Ri, e._c = function (t, n, r, i) { - return Ze(e, t, n, r, i, !1) - }, e.$createElement = function (t, n, r, i) { - return Ze(e, t, n, r, i, !0) - } - } - - function ct(e, t) { - var n = e.$options = Object.create(e.constructor.options); - n.parent = t.parent, n.propsData = t.propsData, n._parentVnode = t._parentVnode, n._parentListeners = t._parentListeners, n._renderChildren = t._renderChildren, n._componentTag = t._componentTag, n._parentElm = t._parentElm, n._refElm = t._refElm, t.render && (n.render = t.render, n.staticRenderFns = t.staticRenderFns) - } - - function ut(e) { - var t = e.options; - if (e.super) { - var n = ut(e.super); - if (n !== e.superOptions) { - e.superOptions = n; - var r = lt(e); - r && h(e.extendOptions, r), t = e.options = B(n, e.extendOptions), t.name && (t.components[t.name] = e) - } - } - return t - } - - function lt(e) { - var t, n = e.options, - r = e.extendOptions, - i = e.sealedOptions; - for (var o in n) n[o] !== i[o] && (t || (t = {}), t[o] = ft(n[o], r[o], i[o])); - return t - } - - function ft(e, t, n) { - if (Array.isArray(e)) { - var r = []; - n = Array.isArray(n) ? n : [n], t = Array.isArray(t) ? t : [t]; - for (var i = 0; i < e.length; i++)(t.indexOf(e[i]) >= 0 || n.indexOf(e[i]) < 0) && r.push(e[i]); - return r - } - return e - } - - function pt(e) { - this._init(e) - } - - function dt(e) { - e.use = function (e) { - if (!e.installed) { - var t = v(arguments, 1); - return t.unshift(this), "function" == typeof e.install ? e.install.apply(e, t) : "function" == typeof e && e.apply(null, t), e.installed = !0, this - } - } - } - - function vt(e) { - e.mixin = function (e) { - this.options = B(this.options, e) - } - } - - function ht(e) { - e.cid = 0; - var t = 1; - e.extend = function (e) { - e = e || {}; - var n = this, - r = n.cid, - i = e._Ctor || (e._Ctor = {}); - if (i[r]) return i[r]; - var o = e.name || n.options.name, - a = function (e) { - this._init(e) - }; - return a.prototype = Object.create(n.prototype), a.prototype.constructor = a, a.cid = t++, a.options = B(n.options, e), a.super = n, a.options.props && mt(a), a.options.computed && gt(a), a.extend = n.extend, a.mixin = n.mixin, a.use = n.use, Di.forEach(function (e) { - a[e] = n[e] - }), o && (a.options.components[o] = a), a.superOptions = n.options, a.extendOptions = e, a.sealedOptions = h({}, a.options), i[r] = a, a - } - } - - function mt(e) { - var t = e.options.props; - for (var n in t) Se(e.prototype, "_props", n) - } - - function gt(e) { - var t = e.options.computed; - for (var n in t) Ie(e.prototype, n, t[n]) - } - - function yt(e) { - Di.forEach(function (t) { - e[t] = function (e, n) { - return n ? ("component" === t && o(n) && (n.name = n.name || e, n = this.options._base.extend(n)), "directive" === t && "function" == typeof n && (n = { - bind: n, - update: n - }), this.options[t + "s"][e] = n, n) : this.options[t + "s"][e] - } - }) - } - - function _t(e) { - return e && (e.Ctor.options.name || e.tag) - } - - function bt(e, t) { - return "string" == typeof e ? e.split(",").indexOf(t) > -1 : !!a(e) && e.test(t) - } - - function $t(e, t, n) { - for (var r in e) { - var i = e[r]; - if (i) { - var o = _t(i.componentOptions); - o && !n(o) && (i !== t && xt(i), e[r] = null) - } - } - } - - function xt(e) { - e && e.componentInstance.$destroy() - } - - function wt(e) { - for (var n = e.data, r = e, i = e; t(i.componentInstance);) i = i.componentInstance._vnode, i.data && (n = Ct(i.data, n)); - for (; t(r = r.parent);) r.data && (n = Ct(n, r.data)); - return kt(n) - } - - function Ct(e, n) { - return { - staticClass: At(e.staticClass, n.staticClass), - class: t(e.class) ? [e.class, n.class] : n.class - } - } - - function kt(e) { - var n = e.class, - r = e.staticClass; - return t(r) || t(n) ? At(r, Ot(n)) : "" - } - - function At(e, t) { - return e ? t ? e + " " + t : e : t || "" - } - - function Ot(n) { - if (e(n)) return ""; - if ("string" == typeof n) return n; - var r = ""; - if (Array.isArray(n)) { - for (var o, a = 0, s = n.length; a < s; a++) t(n[a]) && t(o = Ot(n[a])) && "" !== o && (r += o + " "); - return r.slice(0, -1) - } - if (i(n)) { - for (var c in n) n[c] && (r += c + " "); - return r.slice(0, -1) - } - return r - } - - function St(e) { - return aa(e) ? "svg" : "math" === e ? "math" : void 0 - } - - function Tt(e) { - if (!Ui) return !0; - if (ca(e)) return !1; - if (e = e.toLowerCase(), null != ua[e]) return ua[e]; - var t = document.createElement(e); - return e.indexOf("-") > -1 ? ua[e] = t.constructor === window.HTMLUnknownElement || t.constructor === window.HTMLElement : ua[e] = /HTMLUnknownElement/.test(t.toString()) - } - - function Et(e) { - if ("string" == typeof e) { - var t = document.querySelector(e); - return t || document.createElement("div") - } - return e - } - - function jt(e, t) { - var n = document.createElement(e); - return "select" !== e ? n : (t.data && t.data.attrs && void 0 !== t.data.attrs.multiple && n.setAttribute("multiple", "multiple"), n) - } - - function Nt(e, t) { - return document.createElementNS(ia[e], t) - } - - function Lt(e) { - return document.createTextNode(e) - } - - function It(e) { - return document.createComment(e) - } - - function Dt(e, t, n) { - e.insertBefore(t, n) - } - - function Mt(e, t) { - e.removeChild(t) - } - - function Pt(e, t) { - e.appendChild(t) - } - - function Rt(e) { - return e.parentNode - } - - function Ft(e) { - return e.nextSibling - } - - function Bt(e) { - return e.tagName - } - - function Ht(e, t) { - e.textContent = t - } - - function Ut(e, t, n) { - e.setAttribute(t, n) - } - - function Vt(e, t) { - var n = e.data.ref; - if (n) { - var r = e.context, - i = e.componentInstance || e.elm, - o = r.$refs; - t ? Array.isArray(o[n]) ? l(o[n], i) : o[n] === i && (o[n] = void 0) : e.data.refInFor ? Array.isArray(o[n]) && o[n].indexOf(i) < 0 ? o[n].push(i) : o[n] = [i] : o[n] = i - } - } - - function zt(e, n) { - return e.key === n.key && e.tag === n.tag && e.isComment === n.isComment && t(e.data) === t(n.data) && Jt(e, n) - } - - function Jt(e, n) { - if ("input" !== e.tag) return !0; - var r; - return (t(r = e.data) && t(r = r.attrs) && r.type) === (t(r = n.data) && t(r = r.attrs) && r.type) - } - - function Kt(e, n, r) { - var i, o, a = {}; - for (i = n; i <= r; ++i) o = e[i].key, t(o) && (a[o] = i); - return a - } - - function qt(e, t) { - (e.data.directives || t.data.directives) && Wt(e, t) - } - - function Wt(e, t) { - var n, r, i, o = e === pa, - a = t === pa, - s = Zt(e.data.directives, e.context), - c = Zt(t.data.directives, t.context), - u = [], - l = []; - for (n in c) r = s[n], i = c[n], r ? (i.oldValue = r.value, Yt(i, "update", t, e), i.def && i.def.componentUpdated && l.push(i)) : (Yt(i, "bind", t, e), i.def && i.def.inserted && u.push(i)); - if (u.length) { - var f = function () { - for (var n = 0; n < u.length; n++) Yt(u[n], "inserted", t, e) - }; - o ? Y(t.data.hook || (t.data.hook = {}), "insert", f) : f() - } - if (l.length && Y(t.data.hook || (t.data.hook = {}), "postpatch", function () { - for (var n = 0; n < l.length; n++) Yt(l[n], "componentUpdated", t, e) - }), !o) - for (n in s) c[n] || Yt(s[n], "unbind", e, e, a) - } - - function Zt(e, t) { - var n = Object.create(null); - if (!e) return n; - var r, i; - for (r = 0; r < e.length; r++) i = e[r], i.modifiers || (i.modifiers = ha), n[Gt(i)] = i, i.def = H(t.$options, "directives", i.name, !0); - return n - } - - function Gt(e) { - return e.rawName || e.name + "." + Object.keys(e.modifiers || {}).join(".") - } - - function Yt(e, t, n, r, i) { - var o = e.def && e.def[t]; - if (o) try { - o(n.elm, e, n, r, i) - } catch (r) { - C(r, n.context, "directive " + e.name + " " + t + " hook") - } - } - - function Qt(n, r) { - if (!e(n.data.attrs) || !e(r.data.attrs)) { - var i, o, a = r.elm, - s = n.data.attrs || {}, - c = r.data.attrs || {}; - t(c.__ob__) && (c = r.data.attrs = h({}, c)); - for (i in c) o = c[i], s[i] !== o && Xt(a, i, o); - Ji && c.value !== s.value && Xt(a, "value", c.value); - for (i in s) e(c[i]) && (ta(i) ? a.removeAttributeNS(ea, na(i)) : Qo(i) || a.removeAttribute(i)) - } - } - - function Xt(e, t, n) { - Xo(t) ? ra(n) ? e.removeAttribute(t) : e.setAttribute(t, t) : Qo(t) ? e.setAttribute(t, ra(n) || "false" === n ? "false" : "true") : ta(t) ? ra(n) ? e.removeAttributeNS(ea, na(t)) : e.setAttributeNS(ea, t, n) : ra(n) ? e.removeAttribute(t) : e.setAttribute(t, n) - } - - function en(n, r) { - var i = r.elm, - o = r.data, - a = n.data; - if (!(e(o.staticClass) && e(o.class) && (e(a) || e(a.staticClass) && e(a.class)))) { - var s = wt(r), - c = i._transitionClasses; - t(c) && (s = At(s, Ot(c))), s !== i._prevClass && (i.setAttribute("class", s), i._prevClass = s) - } - } - - function tn(e) { - function t() { - (a || (a = [])).push(e.slice(v, i).trim()), v = i + 1 - } - var n, r, i, o, a, s = !1, - c = !1, - u = !1, - l = !1, - f = 0, - p = 0, - d = 0, - v = 0; - for (i = 0; i < e.length; i++) - if (r = n, n = e.charCodeAt(i), s) 39 === n && 92 !== r && (s = !1); - else if (c) 34 === n && 92 !== r && (c = !1); - else if (u) 96 === n && 92 !== r && (u = !1); - else if (l) 47 === n && 92 !== r && (l = !1); - else if (124 !== n || 124 === e.charCodeAt(i + 1) || 124 === e.charCodeAt(i - 1) || f || p || d) { - switch (n) { - case 34: - c = !0; - break; - case 39: - s = !0; - break; - case 96: - u = !0; - break; - case 40: - d++; - break; - case 41: - d--; - break; - case 91: - p++; - break; - case 93: - p--; - break; - case 123: - f++; - break; - case 125: - f-- - } - if (47 === n) { - for (var h = i - 1, m = void 0; h >= 0 && " " === (m = e.charAt(h)); h--); - m && _a.test(m) || (l = !0) - } - } else void 0 === o ? (v = i + 1, o = e.slice(0, i).trim()) : t(); - if (void 0 === o ? o = e.slice(0, i).trim() : 0 !== v && t(), a) - for (i = 0; i < a.length; i++) o = nn(o, a[i]); - return o - } - - function nn(e, t) { - var n = t.indexOf("("); - return n < 0 ? '_f("' + t + '")(' + e + ")" : '_f("' + t.slice(0, n) + '")(' + e + "," + t.slice(n + 1) - } - - function rn(e) { - console.error("[Vue compiler]: " + e) - } - - function on(e, t) { - return e ? e.map(function (e) { - return e[t] - }).filter(function (e) { - return e - }) : [] - } - - function an(e, t, n) { - (e.props || (e.props = [])).push({ - name: t, - value: n - }) - } - - function sn(e, t, n) { - (e.attrs || (e.attrs = [])).push({ - name: t, - value: n - }) - } - - function cn(e, t, n, r, i, o) { - (e.directives || (e.directives = [])).push({ - name: t, - rawName: n, - value: r, - arg: i, - modifiers: o - }) - } - - function un(e, t, n, r, i, o) { - r && r.capture && (delete r.capture, t = "!" + t), r && r.once && (delete r.once, t = "~" + t), r && r.passive && (delete r.passive, t = "&" + t); - var a; - r && r.native ? (delete r.native, a = e.nativeEvents || (e.nativeEvents = {})) : a = e.events || (e.events = {}); - var s = { - value: n, - modifiers: r - }, - c = a[t]; - Array.isArray(c) ? i ? c.unshift(s) : c.push(s) : a[t] = c ? i ? [s, c] : [c, s] : s - } - - function ln(e, t, n) { - var r = fn(e, ":" + t) || fn(e, "v-bind:" + t); - if (null != r) return tn(r); - if (!1 !== n) { - var i = fn(e, t); - if (null != i) return JSON.stringify(i) - } - } - - function fn(e, t) { - var n; - if (null != (n = e.attrsMap[t])) - for (var r = e.attrsList, i = 0, o = r.length; i < o; i++) - if (r[i].name === t) { - r.splice(i, 1); - break - } return n - } - - function pn(e, t, n) { - var r = n || {}, - i = r.number, - o = r.trim, - a = "$$v"; - o && (a = "(typeof $$v === 'string'? $$v.trim(): $$v)"), i && (a = "_n(" + a + ")"); - var s = dn(t, a); - e.model = { - value: "(" + t + ")", - expression: '"' + t + '"', - callback: "function ($$v) {" + s + "}" - } - } - - function dn(e, t) { - var n = vn(e); - return null === n.idx ? e + "=" + t : "var $$exp = " + n.exp + ", $$idx = " + n.idx + ";if (!Array.isArray($$exp)){" + e + "=" + t + "}else{$$exp.splice($$idx, 1, " + t + ")}" - } - - function vn(e) { - if (Ho = e, Bo = Ho.length, Vo = zo = Jo = 0, e.indexOf("[") < 0 || e.lastIndexOf("]") < Bo - 1) return { - exp: e, - idx: null - }; - for (; !mn();) Uo = hn(), gn(Uo) ? _n(Uo) : 91 === Uo && yn(Uo); - return { - exp: e.substring(0, zo), - idx: e.substring(zo + 1, Jo) - } - } - - function hn() { - return Ho.charCodeAt(++Vo) - } - - function mn() { - return Vo >= Bo - } - - function gn(e) { - return 34 === e || 39 === e - } - - function yn(e) { - var t = 1; - for (zo = Vo; !mn();) - if (e = hn(), gn(e)) _n(e); - else if (91 === e && t++, 93 === e && t--, 0 === t) { - Jo = Vo; - break - } - } - - function _n(e) { - for (var t = e; !mn() && (e = hn()) !== t;); - } - - function bn(e, t, n) { - Ko = n; - var r = t.value, - i = t.modifiers, - o = e.tag, - a = e.attrsMap.type; - if ("select" === o) wn(e, r, i); - else if ("input" === o && "checkbox" === a) $n(e, r, i); - else if ("input" === o && "radio" === a) xn(e, r, i); - else if ("input" === o || "textarea" === o) Cn(e, r, i); - else if (!Pi.isReservedTag(o)) return pn(e, r, i), !1; - return !0 - } - - function $n(e, t, n) { - var r = n && n.number, - i = ln(e, "value") || "null", - o = ln(e, "true-value") || "true", - a = ln(e, "false-value") || "false"; - an(e, "checked", "Array.isArray(" + t + ")?_i(" + t + "," + i + ")>-1" + ("true" === o ? ":(" + t + ")" : ":_q(" + t + "," + o + ")")), un(e, $a, "var $$a=" + t + ",$$el=$event.target,$$c=$$el.checked?(" + o + "):(" + a + ");if(Array.isArray($$a)){var $$v=" + (r ? "_n(" + i + ")" : i) + ",$$i=_i($$a,$$v);if($$c){$$i<0&&(" + t + "=$$a.concat($$v))}else{$$i>-1&&(" + t + "=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{" + dn(t, "$$c") + "}", null, !0) - } - - function xn(e, t, n) { - var r = n && n.number, - i = ln(e, "value") || "null"; - i = r ? "_n(" + i + ")" : i, an(e, "checked", "_q(" + t + "," + i + ")"), un(e, $a, dn(t, i), null, !0) - } - - function wn(e, t, n) { - var r = n && n.number, - i = 'Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return ' + (r ? "_n(val)" : "val") + "})", - o = "var $$selectedVal = " + i + ";"; - o = o + " " + dn(t, "$event.target.multiple ? $$selectedVal : $$selectedVal[0]"), un(e, "change", o, null, !0) - } - - function Cn(e, t, n) { - var r = e.attrsMap.type, - i = n || {}, - o = i.lazy, - a = i.number, - s = i.trim, - c = !o && "range" !== r, - u = o ? "change" : "range" === r ? ba : "input", - l = "$event.target.value"; - s && (l = "$event.target.value.trim()"), a && (l = "_n(" + l + ")"); - var f = dn(t, l); - c && (f = "if($event.target.composing)return;" + f), an(e, "value", "(" + t + ")"), un(e, u, f, null, !0), (s || a || "number" === r) && un(e, "blur", "$forceUpdate()") - } - - function kn(e) { - var n; - t(e[ba]) && (n = zi ? "change" : "input", e[n] = [].concat(e[ba], e[n] || []), delete e[ba]), t(e[$a]) && (n = Zi ? "click" : "change", e[n] = [].concat(e[$a], e[n] || []), delete e[$a]) - } - - function An(e, t, n, r, i) { - if (n) { - var o = t, - a = qo; - t = function (n) { - null !== (1 === arguments.length ? o(n) : o.apply(null, arguments)) && On(e, t, r, a) - } - } - qo.addEventListener(e, t, Gi ? { - capture: r, - passive: i - } : r) - } - - function On(e, t, n, r) { - (r || qo).removeEventListener(e, t, n) - } - - function Sn(t, n) { - if (!e(t.data.on) || !e(n.data.on)) { - var r = n.data.on || {}, - i = t.data.on || {}; - qo = n.elm, kn(r), G(r, i, An, On, n.context) - } - } - - function Tn(n, r) { - if (!e(n.data.domProps) || !e(r.data.domProps)) { - var i, o, a = r.elm, - s = n.data.domProps || {}, - c = r.data.domProps || {}; - t(c.__ob__) && (c = r.data.domProps = h({}, c)); - for (i in s) e(c[i]) && (a[i] = ""); - for (i in c) - if (o = c[i], "textContent" !== i && "innerHTML" !== i || (r.children && (r.children.length = 0), o !== s[i])) - if ("value" === i) { - a._value = o; - var u = e(o) ? "" : String(o); - En(a, r, u) && (a.value = u) - } else a[i] = o - } - } - - function En(e, t, n) { - return !e.composing && ("option" === t.tag || jn(e, n) || Nn(e, n)) - } - - function jn(e, t) { - return document.activeElement !== e && e.value !== t - } - - function Nn(e, n) { - var r = e.value, - i = e._vModifiers; - return t(i) && i.number || "number" === e.type ? c(r) !== c(n) : t(i) && i.trim ? r.trim() !== n.trim() : r !== n - } - - function Ln(e) { - var t = In(e.style); - return e.staticStyle ? h(e.staticStyle, t) : t - } - - function In(e) { - return Array.isArray(e) ? m(e) : "string" == typeof e ? Ca(e) : e - } - - function Dn(e, t) { - var n, r = {}; - if (t) - for (var i = e; i.componentInstance;) i = i.componentInstance._vnode, i.data && (n = Ln(i.data)) && h(r, n); - (n = Ln(e.data)) && h(r, n); - for (var o = e; o = o.parent;) o.data && (n = Ln(o.data)) && h(r, n); - return r - } - - function Mn(n, r) { - var i = r.data, - o = n.data; - if (!(e(i.staticStyle) && e(i.style) && e(o.staticStyle) && e(o.style))) { - var a, s, c = r.elm, - u = o.staticStyle, - l = o.normalizedStyle || o.style || {}, - f = u || l, - p = In(r.data.style) || {}; - r.data.normalizedStyle = t(p.__ob__) ? h({}, p) : p; - var d = Dn(r, !0); - for (s in f) e(d[s]) && Oa(c, s, ""); - for (s in d)(a = d[s]) !== f[s] && Oa(c, s, null == a ? "" : a) - } - } - - function Pn(e, t) { - if (t && (t = t.trim())) - if (e.classList) t.indexOf(" ") > -1 ? t.split(/\s+/).forEach(function (t) { - return e.classList.add(t) - }) : e.classList.add(t); - else { - var n = " " + (e.getAttribute("class") || "") + " "; - n.indexOf(" " + t + " ") < 0 && e.setAttribute("class", (n + t).trim()) - } - } - - function Rn(e, t) { - if (t && (t = t.trim())) - if (e.classList) t.indexOf(" ") > -1 ? t.split(/\s+/).forEach(function (t) { - return e.classList.remove(t) - }) : e.classList.remove(t); - else { - for (var n = " " + (e.getAttribute("class") || "") + " ", r = " " + t + " "; n.indexOf(r) >= 0;) n = n.replace(r, " "); - e.setAttribute("class", n.trim()) - } - } - - function Fn(e) { - if (e) { - if ("object" == typeof e) { - var t = {}; - return !1 !== e.css && h(t, ja(e.name || "v")), h(t, e), t - } - return "string" == typeof e ? ja(e) : void 0 - } - } - - function Bn(e) { - Fa(function () { - Fa(e) - }) - } - - function Hn(e, t) { - (e._transitionClasses || (e._transitionClasses = [])).push(t), Pn(e, t) - } - - function Un(e, t) { - e._transitionClasses && l(e._transitionClasses, t), Rn(e, t) - } - - function Vn(e, t, n) { - var r = zn(e, t), - i = r.type, - o = r.timeout, - a = r.propCount; - if (!i) return n(); - var s = i === La ? Ma : Ra, - c = 0, - u = function () { - e.removeEventListener(s, l), n() - }, - l = function (t) { - t.target === e && ++c >= a && u() - }; - setTimeout(function () { - c < a && u() - }, o + 1), e.addEventListener(s, l) - } - - function zn(e, t) { - var n, r = window.getComputedStyle(e), - i = r[Da + "Delay"].split(", "), - o = r[Da + "Duration"].split(", "), - a = Jn(i, o), - s = r[Pa + "Delay"].split(", "), - c = r[Pa + "Duration"].split(", "), - u = Jn(s, c), - l = 0, - f = 0; - return t === La ? a > 0 && (n = La, l = a, f = o.length) : t === Ia ? u > 0 && (n = Ia, l = u, f = c.length) : (l = Math.max(a, u), n = l > 0 ? a > u ? La : Ia : null, f = n ? n === La ? o.length : c.length : 0), { - type: n, - timeout: l, - propCount: f, - hasTransform: n === La && Ba.test(r[Da + "Property"]) - } - } - - function Jn(e, t) { - for (; e.length < t.length;) e = e.concat(e); - return Math.max.apply(null, t.map(function (t, n) { - return Kn(t) + Kn(e[n]) - })) - } - - function Kn(e) { - return 1e3 * Number(e.slice(0, -1)) - } - - function qn(n, r) { - var o = n.elm; - t(o._leaveCb) && (o._leaveCb.cancelled = !0, o._leaveCb()); - var a = Fn(n.data.transition); - if (!e(a) && !t(o._enterCb) && 1 === o.nodeType) { - for (var s = a.css, u = a.type, l = a.enterClass, f = a.enterToClass, p = a.enterActiveClass, d = a.appearClass, v = a.appearToClass, h = a.appearActiveClass, m = a.beforeEnter, g = a.enter, y = a.afterEnter, _ = a.enterCancelled, $ = a.beforeAppear, x = a.appear, w = a.afterAppear, C = a.appearCancelled, k = a.duration, A = bo, O = bo.$vnode; O && O.parent;) O = O.parent, A = O.context; - var S = !A._isMounted || !n.isRootInsert; - if (!S || x || "" === x) { - var T = S && d ? d : l, - E = S && h ? h : p, - j = S && v ? v : f, - N = S ? $ || m : m, - L = S && "function" == typeof x ? x : g, - I = S ? w || y : y, - D = S ? C || _ : _, - M = c(i(k) ? k.enter : k), - P = !1 !== s && !Ji, - R = Gn(L), - F = o._enterCb = b(function () { - P && (Un(o, j), Un(o, E)), F.cancelled ? (P && Un(o, T), D && D(o)) : I && I(o), o._enterCb = null - }); - n.data.show || Y(n.data.hook || (n.data.hook = {}), "insert", function () { - var e = o.parentNode, - t = e && e._pending && e._pending[n.key]; - t && t.tag === n.tag && t.elm._leaveCb && t.elm._leaveCb(), L && L(o, F) - }), N && N(o), P && (Hn(o, T), Hn(o, E), Bn(function () { - Hn(o, j), Un(o, T), F.cancelled || R || (Zn(M) ? setTimeout(F, M) : Vn(o, u, F)) - })), n.data.show && (r && r(), L && L(o, F)), P || R || F() - } - } - } - - function Wn(n, r) { - function o() { - C.cancelled || (n.data.show || ((a.parentNode._pending || (a.parentNode._pending = {}))[n.key] = n), v && v(a), $ && (Hn(a, f), Hn(a, d), Bn(function () { - Hn(a, p), Un(a, f), C.cancelled || x || (Zn(w) ? setTimeout(C, w) : Vn(a, l, C)) - })), h && h(a, C), $ || x || C()) - } - var a = n.elm; - t(a._enterCb) && (a._enterCb.cancelled = !0, a._enterCb()); - var s = Fn(n.data.transition); - if (e(s)) return r(); - if (!t(a._leaveCb) && 1 === a.nodeType) { - var u = s.css, - l = s.type, - f = s.leaveClass, - p = s.leaveToClass, - d = s.leaveActiveClass, - v = s.beforeLeave, - h = s.leave, - m = s.afterLeave, - g = s.leaveCancelled, - y = s.delayLeave, - _ = s.duration, - $ = !1 !== u && !Ji, - x = Gn(h), - w = c(i(_) ? _.leave : _), - C = a._leaveCb = b(function () { - a.parentNode && a.parentNode._pending && (a.parentNode._pending[n.key] = null), $ && (Un(a, p), Un(a, d)), C.cancelled ? ($ && Un(a, f), g && g(a)) : (r(), m && m(a)), a._leaveCb = null - }); - y ? y(o) : o() - } - } - - function Zn(e) { - return "number" == typeof e && !isNaN(e) - } - - function Gn(n) { - if (e(n)) return !1; - var r = n.fns; - return t(r) ? Gn(Array.isArray(r) ? r[0] : r) : (n._length || n.length) > 1 - } - - function Yn(e, t) { - !0 !== t.data.show && qn(t) - } - - function Qn(e, t, n) { - var r = t.value, - i = e.multiple; - if (!i || Array.isArray(r)) { - for (var o, a, s = 0, c = e.options.length; s < c; s++) - if (a = e.options[s], i) o = _(r, er(a)) > -1, a.selected !== o && (a.selected = o); - else if (y(er(a), r)) return void(e.selectedIndex !== s && (e.selectedIndex = s)); - i || (e.selectedIndex = -1) - } - } - - function Xn(e, t) { - for (var n = 0, r = t.length; n < r; n++) - if (y(er(t[n]), e)) return !1; - return !0 - } - - function er(e) { - return "_value" in e ? e._value : e.value - } - - function tr(e) { - e.target.composing = !0 - } - - function nr(e) { - e.target.composing = !1, rr(e.target, "input") - } - - function rr(e, t) { - var n = document.createEvent("HTMLEvents"); - n.initEvent(t, !0, !0), e.dispatchEvent(n) - } - - function ir(e) { - return !e.componentInstance || e.data && e.data.transition ? e : ir(e.componentInstance._vnode) - } - - function or(e) { - var t = e && e.componentOptions; - return t && t.Ctor.options.abstract ? or(oe(t.children)) : e - } - - function ar(e) { - var t = {}, - n = e.$options; - for (var r in n.propsData) t[r] = e[r]; - var i = n._parentListeners; - for (var o in i) t[Ti(o)] = i[o]; - return t - } - - function sr(e, t) { - if (/\d-keep-alive$/.test(t.tag)) return e("keep-alive", { - props: t.componentOptions.propsData - }) - } - - function cr(e) { - for (; e = e.parent;) - if (e.data.transition) return !0 - } - - function ur(e, t) { - return t.key === e.key && t.tag === e.tag - } - - function lr(e) { - e.elm._moveCb && e.elm._moveCb(), e.elm._enterCb && e.elm._enterCb() - } - - function fr(e) { - e.data.newPos = e.elm.getBoundingClientRect() - } - - function pr(e) { - var t = e.data.pos, - n = e.data.newPos, - r = t.left - n.left, - i = t.top - n.top; - if (r || i) { - e.data.moved = !0; - var o = e.elm.style; - o.transform = o.WebkitTransform = "translate(" + r + "px," + i + "px)", o.transitionDuration = "0s" - } - } - - function dr(e) { - return Xa = Xa || document.createElement("div"), Xa.innerHTML = e, Xa.textContent - } - - function vr(e, t) { - var n = t ? Ms : Ds; - return e.replace(n, function (e) { - return Is[e] - }) - } - - function hr(e, t) { - function n(t) { - l += t, e = e.substring(t) - } - - function r(e, n, r) { - var i, s; - if (null == n && (n = l), null == r && (r = l), e && (s = e.toLowerCase()), e) - for (i = a.length - 1; i >= 0 && a[i].lowerCasedTag !== s; i--); - else i = 0; - if (i >= 0) { - for (var c = a.length - 1; c >= i; c--) t.end && t.end(a[c].tag, n, r); - a.length = i, o = i && a[i - 1].tag - } else "br" === s ? t.start && t.start(e, [], !0, n, r) : "p" === s && (t.start && t.start(e, [], !1, n, r), t.end && t.end(e, n, r)) - } - for (var i, o, a = [], s = t.expectHTML, c = t.isUnaryTag || Ni, u = t.canBeLeftOpenTag || Ni, l = 0; e;) { - if (i = e, o && Ns(o)) { - var f = o.toLowerCase(), - p = Ls[f] || (Ls[f] = new RegExp("([\\s\\S]*?)(]*>)", "i")), - d = 0, - v = e.replace(p, function (e, n, r) { - return d = r.length, Ns(f) || "noscript" === f || (n = n.replace(//g, "$1").replace(//g, "$1")), t.chars && t.chars(n), "" - }); - l += e.length - v.length, e = v, r(f, l - d, l) - } else { - var h = e.indexOf("<"); - if (0 === h) { - if (fs.test(e)) { - var m = e.indexOf("--\x3e"); - if (m >= 0) { - n(m + 3); - continue - } - } - if (ps.test(e)) { - var g = e.indexOf("]>"); - if (g >= 0) { - n(g + 2); - continue - } - } - var y = e.match(ls); - if (y) { - n(y[0].length); - continue - } - var _ = e.match(us); - if (_) { - var b = l; - n(_[0].length), r(_[1], b, l); - continue - } - var $ = function () { - var t = e.match(ss); - if (t) { - var r = { - tagName: t[1], - attrs: [], - start: l - }; - n(t[0].length); - for (var i, o; !(i = e.match(cs)) && (o = e.match(os));) n(o[0].length), r.attrs.push(o); - if (i) return r.unarySlash = i[1], n(i[0].length), r.end = l, r - } - }(); - if ($) { - ! function (e) { - var n = e.tagName, - i = e.unarySlash; - s && ("p" === o && rs(n) && r(o), u(n) && o === n && r(n)); - for (var l = c(n) || "html" === n && "head" === o || !!i, f = e.attrs.length, p = new Array(f), d = 0; d < f; d++) { - var v = e.attrs[d]; - ds && -1 === v[0].indexOf('""') && ("" === v[3] && delete v[3], "" === v[4] && delete v[4], "" === v[5] && delete v[5]); - var h = v[3] || v[4] || v[5] || ""; - p[d] = { - name: v[1], - value: vr(h, t.shouldDecodeNewlines) - } - } - l || (a.push({ - tag: n, - lowerCasedTag: n.toLowerCase(), - attrs: p - }), o = n), t.start && t.start(n, p, l, e.start, e.end) - }($); - continue - } - } - var x = void 0, - w = void 0, - C = void 0; - if (h >= 0) { - for (w = e.slice(h); !(us.test(w) || ss.test(w) || fs.test(w) || ps.test(w) || (C = w.indexOf("<", 1)) < 0);) h += C, w = e.slice(h); - x = e.substring(0, h), n(h) - } - h < 0 && (x = e, e = ""), t.chars && x && t.chars(x) - } - if (e === i) { - t.chars && t.chars(e); - break - } - } - r() - } - - function mr(e, t) { - var n = t ? Rs(t) : Ps; - if (n.test(e)) { - for (var r, i, o = [], a = n.lastIndex = 0; r = n.exec(e);) { - i = r.index, i > a && o.push(JSON.stringify(e.slice(a, i))); - var s = tn(r[1].trim()); - o.push("_s(" + s + ")"), a = i + r[0].length - } - return a < e.length && o.push(JSON.stringify(e.slice(a))), o.join("+") - } - } - - function gr(e, t) { - function n(e) { - e.pre && (s = !1), _s(e.tag) && (c = !1) - } - vs = t.warn || rn, $s = t.getTagNamespace || Ni, bs = t.mustUseProp || Ni, _s = t.isPreTag || Ni, gs = on(t.modules, "preTransformNode"), ms = on(t.modules, "transformNode"), ys = on(t.modules, "postTransformNode"), hs = t.delimiters; - var r, i, o = [], - a = !1 !== t.preserveWhitespace, - s = !1, - c = !1; - return hr(e, { - warn: vs, - expectHTML: t.expectHTML, - isUnaryTag: t.isUnaryTag, - canBeLeftOpenTag: t.canBeLeftOpenTag, - shouldDecodeNewlines: t.shouldDecodeNewlines, - start: function (e, a, u) { - var l = i && i.ns || $s(e); - zi && "svg" === l && (a = Mr(a)); - var f = { - type: 1, - tag: e, - attrsList: a, - attrsMap: Lr(a), - parent: i, - children: [] - }; - l && (f.ns = l), Dr(f) && !eo() && (f.forbidden = !0); - for (var p = 0; p < gs.length; p++) gs[p](f, t); - if (s || (yr(f), f.pre && (s = !0)), _s(f.tag) && (c = !0), s) _r(f); - else { - xr(f), wr(f), Or(f), br(f), f.plain = !f.key && !a.length, $r(f), Sr(f), Tr(f); - for (var d = 0; d < ms.length; d++) ms[d](f, t); - Er(f) - } - if (r ? o.length || r.if && (f.elseif || f.else) && Ar(r, { - exp: f.elseif, - block: f - }) : r = f, i && !f.forbidden) - if (f.elseif || f.else) Cr(f, i); - else if (f.slotScope) { - i.plain = !1; - var v = f.slotTarget || '"default"'; - (i.scopedSlots || (i.scopedSlots = {}))[v] = f - } else i.children.push(f), f.parent = i; - u ? n(f) : (i = f, o.push(f)); - for (var h = 0; h < ys.length; h++) ys[h](f, t) - }, - end: function () { - var e = o[o.length - 1], - t = e.children[e.children.length - 1]; - t && 3 === t.type && " " === t.text && !c && e.children.pop(), o.length -= 1, i = o[o.length - 1], n(e) - }, - chars: function (e) { - if (i && (!zi || "textarea" !== i.tag || i.attrsMap.placeholder !== e)) { - var t = i.children; - if (e = c || e.trim() ? Ir(i) ? e : Ks(e) : a && t.length ? " " : "") { - var n; - !s && " " !== e && (n = mr(e, hs)) ? t.push({ - type: 2, - expression: n, - text: e - }) : " " === e && t.length && " " === t[t.length - 1].text || t.push({ - type: 3, - text: e - }) - } - } - } - }), r - } - - function yr(e) { - null != fn(e, "v-pre") && (e.pre = !0) - } - - function _r(e) { - var t = e.attrsList.length; - if (t) - for (var n = e.attrs = new Array(t), r = 0; r < t; r++) n[r] = { - name: e.attrsList[r].name, - value: JSON.stringify(e.attrsList[r].value) - }; - else e.pre || (e.plain = !0) - } - - function br(e) { - var t = ln(e, "key"); - t && (e.key = t) - } - - function $r(e) { - var t = ln(e, "ref"); - t && (e.ref = t, e.refInFor = jr(e)) - } - - function xr(e) { - var t; - if (t = fn(e, "v-for")) { - var n = t.match(Hs); - if (!n) return; - e.for = n[2].trim(); - var r = n[1].trim(), - i = r.match(Us); - i ? (e.alias = i[1].trim(), e.iterator1 = i[2].trim(), i[3] && (e.iterator2 = i[3].trim())) : e.alias = r - } - } - - function wr(e) { - var t = fn(e, "v-if"); - if (t) e.if = t, Ar(e, { - exp: t, - block: e - }); - else { - null != fn(e, "v-else") && (e.else = !0); - var n = fn(e, "v-else-if"); - n && (e.elseif = n) - } - } - - function Cr(e, t) { - var n = kr(t.children); - n && n.if && Ar(n, { - exp: e.elseif, - block: e - }) - } - - function kr(e) { - for (var t = e.length; t--;) { - if (1 === e[t].type) return e[t]; - e.pop() - } - } - - function Ar(e, t) { - e.ifConditions || (e.ifConditions = []), e.ifConditions.push(t) - } - - function Or(e) { - null != fn(e, "v-once") && (e.once = !0) - } - - function Sr(e) { - if ("slot" === e.tag) e.slotName = ln(e, "name"); - else { - var t = ln(e, "slot"); - t && (e.slotTarget = '""' === t ? '"default"' : t), "template" === e.tag && (e.slotScope = fn(e, "scope")) - } - } - - function Tr(e) { - var t; - (t = ln(e, "is")) && (e.component = t), null != fn(e, "inline-template") && (e.inlineTemplate = !0) - } - - function Er(e) { - var t, n, r, i, o, a, s, c = e.attrsList; - for (t = 0, n = c.length; t < n; t++) - if (r = i = c[t].name, o = c[t].value, Bs.test(r)) - if (e.hasBindings = !0, a = Nr(r), a && (r = r.replace(Js, "")), zs.test(r)) r = r.replace(zs, ""), o = tn(o), s = !1, a && (a.prop && (s = !0, "innerHtml" === (r = Ti(r)) && (r = "innerHTML")), a.camel && (r = Ti(r)), a.sync && un(e, "update:" + Ti(r), dn(o, "$event"))), s || bs(e.tag, e.attrsMap.type, r) ? an(e, r, o) : sn(e, r, o); - else if (Fs.test(r)) r = r.replace(Fs, ""), un(e, r, o, a, !1, vs); - else { - r = r.replace(Bs, ""); - var u = r.match(Vs), - l = u && u[1]; - l && (r = r.slice(0, -(l.length + 1))), cn(e, r, i, o, l, a) - } else sn(e, r, JSON.stringify(o)) - } - - function jr(e) { - for (var t = e; t;) { - if (void 0 !== t.for) return !0; - t = t.parent - } - return !1 - } - - function Nr(e) { - var t = e.match(Js); - if (t) { - var n = {}; - return t.forEach(function (e) { - n[e.slice(1)] = !0 - }), n - } - } - - function Lr(e) { - for (var t = {}, n = 0, r = e.length; n < r; n++) t[e[n].name] = e[n].value; - return t - } - - function Ir(e) { - return "script" === e.tag || "style" === e.tag - } - - function Dr(e) { - return "style" === e.tag || "script" === e.tag && (!e.attrsMap.type || "text/javascript" === e.attrsMap.type) - } - - function Mr(e) { - for (var t = [], n = 0; n < e.length; n++) { - var r = e[n]; - qs.test(r.name) || (r.name = r.name.replace(Ws, ""), t.push(r)) - } - return t - } - - function Pr(e, t) { - e && (xs = Zs(t.staticKeys || ""), ws = t.isReservedTag || Ni, Fr(e), Br(e, !1)) - } - - function Rr(e) { - return u("type,tag,attrsList,attrsMap,plain,parent,children,attrs" + (e ? "," + e : "")) - } - - function Fr(e) { - if (e.static = Ur(e), 1 === e.type) { - if (!ws(e.tag) && "slot" !== e.tag && null == e.attrsMap["inline-template"]) return; - for (var t = 0, n = e.children.length; t < n; t++) { - var r = e.children[t]; - Fr(r), r.static || (e.static = !1) - } - } - } - - function Br(e, t) { - if (1 === e.type) { - if ((e.static || e.once) && (e.staticInFor = t), e.static && e.children.length && (1 !== e.children.length || 3 !== e.children[0].type)) return void(e.staticRoot = !0); - if (e.staticRoot = !1, e.children) - for (var n = 0, r = e.children.length; n < r; n++) Br(e.children[n], t || !!e.for); - e.ifConditions && Hr(e.ifConditions, t) - } - } - - function Hr(e, t) { - for (var n = 1, r = e.length; n < r; n++) Br(e[n].block, t) - } - - function Ur(e) { - return 2 !== e.type && (3 === e.type || !(!e.pre && (e.hasBindings || e.if || e.for || Oi(e.tag) || !ws(e.tag) || Vr(e) || !Object.keys(e).every(xs)))) - } - - function Vr(e) { - for (; e.parent;) { - if (e = e.parent, "template" !== e.tag) return !1; - if (e.for) return !0 - } - return !1 - } - - function zr(e, t, n) { - var r = t ? "nativeOn:{" : "on:{"; - for (var i in e) { - var o = e[i]; - r += '"' + i + '":' + Jr(i, o) + "," - } - return r.slice(0, -1) + "}" - } - - function Jr(e, t) { - if (!t) return "function(){}"; - if (Array.isArray(t)) return "[" + t.map(function (t) { - return Jr(e, t) - }).join(",") + "]"; - var n = Ys.test(t.value), - r = Gs.test(t.value); - if (t.modifiers) { - var i = "", - o = "", - a = []; - for (var s in t.modifiers) ec[s] ? (o += ec[s], Qs[s] && a.push(s)) : a.push(s); - a.length && (i += Kr(a)), o && (i += o); - return "function($event){" + i + (n ? t.value + "($event)" : r ? "(" + t.value + ")($event)" : t.value) + "}" - } - return n || r ? t.value : "function($event){" + t.value + "}" - } - - function Kr(e) { - return "if(!('button' in $event)&&" + e.map(qr).join("&&") + ")return null;" - } - - function qr(e) { - var t = parseInt(e, 10); - if (t) return "$event.keyCode!==" + t; - var n = Qs[e]; - return "_k($event.keyCode," + JSON.stringify(e) + (n ? "," + JSON.stringify(n) : "") + ")" - } - - function Wr(e, t) { - e.wrapData = function (n) { - return "_b(" + n + ",'" + e.tag + "'," + t.value + (t.modifiers && t.modifiers.prop ? ",true" : "") + ")" - } - } - - function Zr(e, t) { - var n = Ts, - r = Ts = [], - i = Es; - Es = 0, js = t, Cs = t.warn || rn, ks = on(t.modules, "transformCode"), As = on(t.modules, "genData"), Os = t.directives || {}, Ss = t.isReservedTag || Ni; - var o = e ? Gr(e) : '_c("div")'; - return Ts = n, Es = i, { - render: "with(this){return " + o + "}", - staticRenderFns: r - } - } - - function Gr(e) { - if (e.staticRoot && !e.staticProcessed) return Yr(e); - if (e.once && !e.onceProcessed) return Qr(e); - if (e.for && !e.forProcessed) return ti(e); - if (e.if && !e.ifProcessed) return Xr(e); - if ("template" !== e.tag || e.slotTarget) { - if ("slot" === e.tag) return di(e); - var t; - if (e.component) t = vi(e.component, e); - else { - var n = e.plain ? void 0 : ni(e), - r = e.inlineTemplate ? null : si(e, !0); - t = "_c('" + e.tag + "'" + (n ? "," + n : "") + (r ? "," + r : "") + ")" - } - for (var i = 0; i < ks.length; i++) t = ks[i](e, t); - return t - } - return si(e) || "void 0" - } - - function Yr(e) { - return e.staticProcessed = !0, Ts.push("with(this){return " + Gr(e) + "}"), "_m(" + (Ts.length - 1) + (e.staticInFor ? ",true" : "") + ")" - } - - function Qr(e) { - if (e.onceProcessed = !0, e.if && !e.ifProcessed) return Xr(e); - if (e.staticInFor) { - for (var t = "", n = e.parent; n;) { - if (n.for) { - t = n.key; - break - } - n = n.parent - } - return t ? "_o(" + Gr(e) + "," + Es++ + (t ? "," + t : "") + ")" : Gr(e) - } - return Yr(e) - } - - function Xr(e) { - return e.ifProcessed = !0, ei(e.ifConditions.slice()) - } - - function ei(e) { - function t(e) { - return e.once ? Qr(e) : Gr(e) - } - if (!e.length) return "_e()"; - var n = e.shift(); - return n.exp ? "(" + n.exp + ")?" + t(n.block) + ":" + ei(e) : "" + t(n.block) - } - - function ti(e) { - var t = e.for, - n = e.alias, - r = e.iterator1 ? "," + e.iterator1 : "", - i = e.iterator2 ? "," + e.iterator2 : ""; - return e.forProcessed = !0, "_l((" + t + "),function(" + n + r + i + "){return " + Gr(e) + "})" - } - - function ni(e) { - var t = "{", - n = ri(e); - n && (t += n + ","), e.key && (t += "key:" + e.key + ","), e.ref && (t += "ref:" + e.ref + ","), e.refInFor && (t += "refInFor:true,"), e.pre && (t += "pre:true,"), e.component && (t += 'tag:"' + e.tag + '",'); - for (var r = 0; r < As.length; r++) t += As[r](e); - if (e.attrs && (t += "attrs:{" + hi(e.attrs) + "},"), e.props && (t += "domProps:{" + hi(e.props) + "},"), e.events && (t += zr(e.events, !1, Cs) + ","), e.nativeEvents && (t += zr(e.nativeEvents, !0, Cs) + ","), e.slotTarget && (t += "slot:" + e.slotTarget + ","), e.scopedSlots && (t += oi(e.scopedSlots) + ","), e.model && (t += "model:{value:" + e.model.value + ",callback:" + e.model.callback + ",expression:" + e.model.expression + "},"), e.inlineTemplate) { - var i = ii(e); - i && (t += i + ",") - } - return t = t.replace(/,$/, "") + "}", e.wrapData && (t = e.wrapData(t)), t - } - - function ri(e) { - var t = e.directives; - if (t) { - var n, r, i, o, a = "directives:[", - s = !1; - for (n = 0, r = t.length; n < r; n++) { - i = t[n], o = !0; - var c = Os[i.name] || tc[i.name]; - c && (o = !!c(e, i, Cs)), o && (s = !0, a += '{name:"' + i.name + '",rawName:"' + i.rawName + '"' + (i.value ? ",value:(" + i.value + "),expression:" + JSON.stringify(i.value) : "") + (i.arg ? ',arg:"' + i.arg + '"' : "") + (i.modifiers ? ",modifiers:" + JSON.stringify(i.modifiers) : "") + "},") - } - return s ? a.slice(0, -1) + "]" : void 0 - } - } - - function ii(e) { - var t = e.children[0]; - if (1 === t.type) { - var n = Zr(t, js); - return "inlineTemplate:{render:function(){" + n.render + "},staticRenderFns:[" + n.staticRenderFns.map(function (e) { - return "function(){" + e + "}" - }).join(",") + "]}" - } - } - - function oi(e) { - return "scopedSlots:_u([" + Object.keys(e).map(function (t) { - return ai(t, e[t]) - }).join(",") + "])" - } - - function ai(e, t) { - return "[" + e + ",function(" + String(t.attrsMap.scope) + "){return " + ("template" === t.tag ? si(t) || "void 0" : Gr(t)) + "}]" - } - - function si(e, t) { - var n = e.children; - if (n.length) { - var r = n[0]; - if (1 === n.length && r.for && "template" !== r.tag && "slot" !== r.tag) return Gr(r); - var i = t ? ci(n) : 0; - return "[" + n.map(fi).join(",") + "]" + (i ? "," + i : "") - } - } - - function ci(e) { - for (var t = 0, n = 0; n < e.length; n++) { - var r = e[n]; - if (1 === r.type) { - if (ui(r) || r.ifConditions && r.ifConditions.some(function (e) { - return ui(e.block) - })) { - t = 2; - break - }(li(r) || r.ifConditions && r.ifConditions.some(function (e) { - return li(e.block) - })) && (t = 1) - } - } - return t - } - - function ui(e) { - return void 0 !== e.for || "template" === e.tag || "slot" === e.tag - } - - function li(e) { - return !Ss(e.tag) - } - - function fi(e) { - return 1 === e.type ? Gr(e) : pi(e) - } - - function pi(e) { - return "_v(" + (2 === e.type ? e.expression : mi(JSON.stringify(e.text))) + ")" - } - - function di(e) { - var t = e.slotName || '"default"', - n = si(e), - r = "_t(" + t + (n ? "," + n : ""), - i = e.attrs && "{" + e.attrs.map(function (e) { - return Ti(e.name) + ":" + e.value - }).join(",") + "}", - o = e.attrsMap["v-bind"]; - return !i && !o || n || (r += ",null"), i && (r += "," + i), o && (r += (i ? "" : ",null") + "," + o), r + ")" - } - - function vi(e, t) { - var n = t.inlineTemplate ? null : si(t, !0); - return "_c(" + e + "," + ni(t) + (n ? "," + n : "") + ")" - } - - function hi(e) { - for (var t = "", n = 0; n < e.length; n++) { - var r = e[n]; - t += '"' + r.name + '":' + mi(r.value) + "," - } - return t.slice(0, -1) - } - - function mi(e) { - return e.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") - } - - function gi(e, t) { - var n = gr(e.trim(), t); - Pr(n, t); - var r = Zr(n, t); - return { - ast: n, - render: r.render, - staticRenderFns: r.staticRenderFns - } - } - - function yi(e, t) { - try { - return new Function(e) - } catch (n) { - return t.push({ - err: n, - code: e - }), g - } - } - - function _i(e, t) { - var n = (t.warn, fn(e, "class")); - n && (e.staticClass = JSON.stringify(n)); - var r = ln(e, "class", !1); - r && (e.classBinding = r) - } - - function bi(e) { - var t = ""; - return e.staticClass && (t += "staticClass:" + e.staticClass + ","), e.classBinding && (t += "class:" + e.classBinding + ","), t - } - - function $i(e, t) { - var n = (t.warn, fn(e, "style")); - n && (e.staticStyle = JSON.stringify(Ca(n))); - var r = ln(e, "style", !1); - r && (e.styleBinding = r) - } - - function xi(e) { - var t = ""; - return e.staticStyle && (t += "staticStyle:" + e.staticStyle + ","), e.styleBinding && (t += "style:(" + e.styleBinding + "),"), t - } - - function wi(e, t) { - t.value && an(e, "textContent", "_s(" + t.value + ")") - } - - function Ci(e, t) { - t.value && an(e, "innerHTML", "_s(" + t.value + ")") - } - - function ki(e) { - if (e.outerHTML) return e.outerHTML; - var t = document.createElement("div"); - return t.appendChild(e.cloneNode(!0)), t.innerHTML - } - var Ai = Object.prototype.toString, - Oi = u("slot,component", !0), - Si = Object.prototype.hasOwnProperty, - Ti = p(function (e) { - return e.replace(/-(\w)/g, function (e, t) { - return t ? t.toUpperCase() : "" - }) - }), - Ei = p(function (e) { - return e.charAt(0).toUpperCase() + e.slice(1) - }), - ji = p(function (e) { - return e.replace(/([^-])([A-Z])/g, "$1-$2").replace(/([^-])([A-Z])/g, "$1-$2").toLowerCase() - }), - Ni = function () { - return !1 - }, - Li = function (e) { - return e - }, - Ii = "data-server-rendered", - Di = ["component", "directive", "filter"], - Mi = ["beforeCreate", "created", "beforeMount", "mounted", "beforeUpdate", "updated", "beforeDestroy", "destroyed", "activated", "deactivated"], - Pi = { - optionMergeStrategies: Object.create(null), - silent: !1, - productionTip: !1, - devtools: !1, - performance: !1, - errorHandler: null, - ignoredElements: [], - keyCodes: Object.create(null), - isReservedTag: Ni, - isReservedAttr: Ni, - isUnknownElement: Ni, - getTagNamespace: g, - parsePlatformTagName: Li, - mustUseProp: Ni, - _lifecycleHooks: Mi - }, - Ri = Object.freeze({}), - Fi = /[^\w.$]/, - Bi = g, - Hi = "__proto__" in {}, - Ui = "undefined" != typeof window, - Vi = Ui && window.navigator.userAgent.toLowerCase(), - zi = Vi && /msie|trident/.test(Vi), - Ji = Vi && Vi.indexOf("msie 9.0") > 0, - Ki = Vi && Vi.indexOf("edge/") > 0, - qi = Vi && Vi.indexOf("android") > 0, - Wi = Vi && /iphone|ipad|ipod|ios/.test(Vi), - Zi = Vi && /chrome\/\d+/.test(Vi) && !Ki, - Gi = !1; - if (Ui) try { - var Yi = {}; - Object.defineProperty(Yi, "passive", { - get: function () { - Gi = !0 - } - }), window.addEventListener("test-passive", null, Yi) - } catch (e) {} - var Qi, Xi, eo = function () { - return void 0 === Qi && (Qi = !Ui && "undefined" != typeof global && "server" === global.process.env.VUE_ENV), Qi - }, - to = Ui && window.__VUE_DEVTOOLS_GLOBAL_HOOK__, - no = "undefined" != typeof Symbol && k(Symbol) && "undefined" != typeof Reflect && k(Reflect.ownKeys), - ro = function () { - function e() { - r = !1; - var e = n.slice(0); - n.length = 0; - for (var t = 0; t < e.length; t++) e[t]() - } - var t, n = [], - r = !1; - if ("undefined" != typeof Promise && k(Promise)) { - var i = Promise.resolve(), - o = function (e) { - console.error(e) - }; - t = function () { - i.then(e).catch(o), Wi && setTimeout(g) - } - } else if ("undefined" == typeof MutationObserver || !k(MutationObserver) && "[object MutationObserverConstructor]" !== MutationObserver.toString()) t = function () { - setTimeout(e, 0) - }; - else { - var a = 1, - s = new MutationObserver(e), - c = document.createTextNode(String(a)); - s.observe(c, { - characterData: !0 - }), t = function () { - a = (a + 1) % 2, c.data = String(a) - } - } - return function (e, i) { - var o; - if (n.push(function () { - if (e) try { - e.call(i) - } catch (e) { - C(e, i, "nextTick") - } else o && o(i) - }), r || (r = !0, t()), !e && "undefined" != typeof Promise) return new Promise(function (e, t) { - o = e - }) - } - }(); - Xi = "undefined" != typeof Set && k(Set) ? Set : function () { - function e() { - this.set = Object.create(null) - } - return e.prototype.has = function (e) { - return !0 === this.set[e] - }, e.prototype.add = function (e) { - this.set[e] = !0 - }, e.prototype.clear = function () { - this.set = Object.create(null) - }, e - }(); - var io = 0, - oo = function () { - this.id = io++, this.subs = [] - }; - oo.prototype.addSub = function (e) { - this.subs.push(e) - }, oo.prototype.removeSub = function (e) { - l(this.subs, e) - }, oo.prototype.depend = function () { - oo.target && oo.target.addDep(this) - }, oo.prototype.notify = function () { - for (var e = this.subs.slice(), t = 0, n = e.length; t < n; t++) e[t].update() - }, oo.target = null; - var ao = [], - so = Array.prototype, - co = Object.create(so); - ["push", "pop", "shift", "unshift", "splice", "sort", "reverse"].forEach(function (e) { - var t = so[e]; - x(co, e, function () { - for (var n = arguments, r = arguments.length, i = new Array(r); r--;) i[r] = n[r]; - var o, a = t.apply(this, i), - s = this.__ob__; - switch (e) { - case "push": - case "unshift": - o = i; - break; - case "splice": - o = i.slice(2) - } - return o && s.observeArray(o), s.dep.notify(), a - }) - }); - var uo = Object.getOwnPropertyNames(co), - lo = { - shouldConvert: !0, - isSettingProps: !1 - }, - fo = function (e) { - if (this.value = e, this.dep = new oo, this.vmCount = 0, x(e, "__ob__", this), Array.isArray(e)) { - (Hi ? S : T)(e, co, uo), this.observeArray(e) - } else this.walk(e) - }; - fo.prototype.walk = function (e) { - for (var t = Object.keys(e), n = 0; n < t.length; n++) j(e, t[n], e[t[n]]) - }, fo.prototype.observeArray = function (e) { - for (var t = 0, n = e.length; t < n; t++) E(e[t]) - }; - var po = Pi.optionMergeStrategies; - po.data = function (e, t, n) { - return n ? e || t ? function () { - var r = "function" == typeof t ? t.call(n) : t, - i = "function" == typeof e ? e.call(n) : void 0; - return r ? D(r, i) : i - } : void 0 : t ? "function" != typeof t ? e : e ? function () { - return D(t.call(this), e.call(this)) - } : t : e - }, Mi.forEach(function (e) { - po[e] = M - }), Di.forEach(function (e) { - po[e + "s"] = P - }), po.watch = function (e, t) { - if (!t) return Object.create(e || null); - if (!e) return t; - var n = {}; - h(n, e); - for (var r in t) { - var i = n[r], - o = t[r]; - i && !Array.isArray(i) && (i = [i]), n[r] = i ? i.concat(o) : [o] - } - return n - }, po.props = po.methods = po.computed = function (e, t) { - if (!t) return Object.create(e || null); - if (!e) return t; - var n = Object.create(null); - return h(n, e), h(n, t), n - }; - var vo = function (e, t) { - return void 0 === t ? e : t - }, - ho = function (e, t, n, r, i, o, a) { - this.tag = e, this.data = t, this.children = n, this.text = r, this.elm = i, this.ns = void 0, this.context = o, this.functionalContext = void 0, this.key = t && t.key, this.componentOptions = a, this.componentInstance = void 0, this.parent = void 0, this.raw = !1, this.isStatic = !1, this.isRootInsert = !0, this.isComment = !1, this.isCloned = !1, this.isOnce = !1 - }, - mo = { - child: {} - }; - mo.child.get = function () { - return this.componentInstance - }, Object.defineProperties(ho.prototype, mo); - var go, yo = function () { - var e = new ho; - return e.text = "", e.isComment = !0, e - }, - _o = p(function (e) { - var t = "&" === e.charAt(0); - e = t ? e.slice(1) : e; - var n = "~" === e.charAt(0); - e = n ? e.slice(1) : e; - var r = "!" === e.charAt(0); - return e = r ? e.slice(1) : e, { - name: e, - once: n, - capture: r, - passive: t - } - }), - bo = null, - $o = [], - xo = [], - wo = {}, - Co = !1, - ko = !1, - Ao = 0, - Oo = 0, - So = function (e, t, n, r) { - this.vm = e, e._watchers.push(this), r ? (this.deep = !!r.deep, this.user = !!r.user, this.lazy = !!r.lazy, this.sync = !!r.sync) : this.deep = this.user = this.lazy = this.sync = !1, this.cb = n, this.id = ++Oo, this.active = !0, this.dirty = this.lazy, this.deps = [], this.newDeps = [], this.depIds = new Xi, this.newDepIds = new Xi, this.expression = "", "function" == typeof t ? this.getter = t : (this.getter = w(t), this.getter || (this.getter = function () {})), this.value = this.lazy ? void 0 : this.get() - }; - So.prototype.get = function () { - A(this); - var e, t = this.vm; - if (this.user) try { - e = this.getter.call(t, t) - } catch (e) { - C(e, t, 'getter for watcher "' + this.expression + '"') - } else e = this.getter.call(t, t); - return this.deep && Ae(e), O(), this.cleanupDeps(), e - }, So.prototype.addDep = function (e) { - var t = e.id; - this.newDepIds.has(t) || (this.newDepIds.add(t), this.newDeps.push(e), this.depIds.has(t) || e.addSub(this)) - }, So.prototype.cleanupDeps = function () { - for (var e = this, t = this.deps.length; t--;) { - var n = e.deps[t]; - e.newDepIds.has(n.id) || n.removeSub(e) - } - var r = this.depIds; - this.depIds = this.newDepIds, this.newDepIds = r, this.newDepIds.clear(), r = this.deps, this.deps = this.newDeps, this.newDeps = r, this.newDeps.length = 0 - }, So.prototype.update = function () { - this.lazy ? this.dirty = !0 : this.sync ? this.run() : ke(this) - }, So.prototype.run = function () { - if (this.active) { - var e = this.get(); - if (e !== this.value || i(e) || this.deep) { - var t = this.value; - if (this.value = e, this.user) try { - this.cb.call(this.vm, e, t) - } catch (e) { - C(e, this.vm, 'callback for watcher "' + this.expression + '"') - } else this.cb.call(this.vm, e, t) - } - } - }, So.prototype.evaluate = function () { - this.value = this.get(), this.dirty = !1 - }, So.prototype.depend = function () { - for (var e = this, t = this.deps.length; t--;) e.deps[t].depend() - }, So.prototype.teardown = function () { - var e = this; - if (this.active) { - this.vm._isBeingDestroyed || l(this.vm._watchers, this); - for (var t = this.deps.length; t--;) e.deps[t].removeSub(e); - this.active = !1 - } - }; - var To = new Xi, - Eo = { - enumerable: !0, - configurable: !0, - get: g, - set: g - }, - jo = { - lazy: !0 - }, - No = { - init: function (e, t, n, r) { - if (!e.componentInstance || e.componentInstance._isDestroyed) { - (e.componentInstance = Je(e, bo, n, r)).$mount(t ? e.elm : void 0, t) - } else if (e.data.keepAlive) { - var i = e; - No.prepatch(i, i) - } - }, - prepatch: function (e, t) { - var n = t.componentOptions; - he(t.componentInstance = e.componentInstance, n.propsData, n.listeners, t, n.children) - }, - insert: function (e) { - var t = e.context, - n = e.componentInstance; - n._isMounted || (n._isMounted = !0, _e(n, "mounted")), e.data.keepAlive && (t._isMounted ? we(n) : ge(n, !0)) - }, - destroy: function (e) { - var t = e.componentInstance; - t._isDestroyed || (e.data.keepAlive ? ye(t, !0) : t.$destroy()) - } - }, - Lo = Object.keys(No), - Io = 1, - Do = 2, - Mo = 0; - ! function (e) { - e.prototype._init = function (e) { - var t = this; - t._uid = Mo++, t._isVue = !0, e && e._isComponent ? ct(t, e) : t.$options = B(ut(t.constructor), e || {}, t), t._renderProxy = t, t._self = t, de(t), ae(t), st(t), _e(t, "beforeCreate"), Be(t), Te(t), Fe(t), _e(t, "created"), t.$options.el && t.$mount(t.$options.el) - } - }(pt), - function (e) { - var t = {}; - t.get = function () { - return this._data - }; - var n = {}; - n.get = function () { - return this._props - }, Object.defineProperty(e.prototype, "$data", t), Object.defineProperty(e.prototype, "$props", n), e.prototype.$set = N, e.prototype.$delete = L, e.prototype.$watch = function (e, t, n) { - var r = this; - n = n || {}, n.user = !0; - var i = new So(r, e, t, n); - return n.immediate && t.call(r, i.value), - function () { - i.teardown() - } - } - }(pt), - function (e) { - var t = /^hook:/; - e.prototype.$on = function (e, n) { - var r = this, - i = this; - if (Array.isArray(e)) - for (var o = 0, a = e.length; o < a; o++) r.$on(e[o], n); - else(i._events[e] || (i._events[e] = [])).push(n), t.test(e) && (i._hasHookEvent = !0); - return i - }, e.prototype.$once = function (e, t) { - function n() { - r.$off(e, n), t.apply(r, arguments) - } - var r = this; - return n.fn = t, r.$on(e, n), r - }, e.prototype.$off = function (e, t) { - var n = this, - r = this; - if (!arguments.length) return r._events = Object.create(null), r; - if (Array.isArray(e)) { - for (var i = 0, o = e.length; i < o; i++) n.$off(e[i], t); - return r - } - var a = r._events[e]; - if (!a) return r; - if (1 === arguments.length) return r._events[e] = null, r; - for (var s, c = a.length; c--;) - if ((s = a[c]) === t || s.fn === t) { - a.splice(c, 1); - break - } return r - }, e.prototype.$emit = function (e) { - var t = this, - n = t._events[e]; - if (n) { - n = n.length > 1 ? v(n) : n; - for (var r = v(arguments, 1), i = 0, o = n.length; i < o; i++) n[i].apply(t, r) - } - return t - } - }(pt), - function (e) { - e.prototype._update = function (e, t) { - var n = this; - n._isMounted && _e(n, "beforeUpdate"); - var r = n.$el, - i = n._vnode, - o = bo; - bo = n, n._vnode = e, n.$el = i ? n.__patch__(i, e) : n.__patch__(n.$el, e, t, !1, n.$options._parentElm, n.$options._refElm), bo = o, r && (r.__vue__ = null), n.$el && (n.$el.__vue__ = n), n.$vnode && n.$parent && n.$vnode === n.$parent._vnode && (n.$parent.$el = n.$el) - }, e.prototype.$forceUpdate = function () { - var e = this; - e._watcher && e._watcher.update() - }, e.prototype.$destroy = function () { - var e = this; - if (!e._isBeingDestroyed) { - _e(e, "beforeDestroy"), e._isBeingDestroyed = !0; - var t = e.$parent; - !t || t._isBeingDestroyed || e.$options.abstract || l(t.$children, e), e._watcher && e._watcher.teardown(); - for (var n = e._watchers.length; n--;) e._watchers[n].teardown(); - e._data.__ob__ && e._data.__ob__.vmCount--, e._isDestroyed = !0, e.__patch__(e._vnode, null), _e(e, "destroyed"), e.$off(), e.$el && (e.$el.__vue__ = null), e.$options._parentElm = e.$options._refElm = null - } - } - }(pt), - function (e) { - e.prototype.$nextTick = function (e) { - return ro(e, this) - }, e.prototype._render = function () { - var e = this, - t = e.$options, - n = t.render, - r = t.staticRenderFns, - i = t._parentVnode; - if (e._isMounted) - for (var o in e.$slots) e.$slots[o] = W(e.$slots[o]); - e.$scopedSlots = i && i.data.scopedSlots || Ri, r && !e._staticTrees && (e._staticTrees = []), e.$vnode = i; - var a; - try { - a = n.call(e._renderProxy, e.$createElement) - } catch (t) { - C(t, e, "render function"), a = e._vnode - } - return a instanceof ho || (a = yo()), a.parent = i, a - }, e.prototype._o = it, e.prototype._n = c, e.prototype._s = s, e.prototype._l = Qe, e.prototype._t = Xe, e.prototype._q = y, e.prototype._i = _, e.prototype._m = rt, e.prototype._f = et, e.prototype._k = tt, e.prototype._b = nt, e.prototype._v = K, e.prototype._e = yo, e.prototype._u = pe - }(pt); - var Po = [String, RegExp], - Ro = { - name: "keep-alive", - abstract: !0, - props: { - include: Po, - exclude: Po - }, - created: function () { - this.cache = Object.create(null) - }, - destroyed: function () { - var e = this; - for (var t in e.cache) xt(e.cache[t]) - }, - watch: { - include: function (e) { - $t(this.cache, this._vnode, function (t) { - return bt(e, t) - }) - }, - exclude: function (e) { - $t(this.cache, this._vnode, function (t) { - return !bt(e, t) - }) - } - }, - render: function () { - var e = oe(this.$slots.default), - t = e && e.componentOptions; - if (t) { - var n = _t(t); - if (n && (this.include && !bt(this.include, n) || this.exclude && bt(this.exclude, n))) return e; - var r = null == e.key ? t.Ctor.cid + (t.tag ? "::" + t.tag : "") : e.key; - this.cache[r] ? e.componentInstance = this.cache[r].componentInstance : this.cache[r] = e, e.data.keepAlive = !0 - } - return e - } - }, - Fo = { - KeepAlive: Ro - }; - ! function (e) { - var t = {}; - t.get = function () { - return Pi - }, Object.defineProperty(e, "config", t), e.util = { - warn: Bi, - extend: h, - mergeOptions: B, - defineReactive: j - }, e.set = N, e.delete = L, e.nextTick = ro, e.options = Object.create(null), Di.forEach(function (t) { - e.options[t + "s"] = Object.create(null) - }), e.options._base = e, h(e.options.components, Fo), dt(e), vt(e), ht(e), yt(e) - }(pt), Object.defineProperty(pt.prototype, "$isServer", { - get: eo - }), Object.defineProperty(pt.prototype, "$ssrContext", { - get: function () { - return this.$vnode.ssrContext - } - }), pt.version = "2.3.2"; - var Bo, Ho, Uo, Vo, zo, Jo, Ko, qo, Wo, Zo = u("style,class"), - Go = u("input,textarea,option,select"), - Yo = function (e, t, n) { - return "value" === n && Go(e) && "button" !== t || "selected" === n && "option" === e || "checked" === n && "input" === e || "muted" === n && "video" === e - }, - Qo = u("contenteditable,draggable,spellcheck"), - Xo = u("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"), - ea = "http://www.w3.org/1999/xlink", - ta = function (e) { - return ":" === e.charAt(5) && "xlink" === e.slice(0, 5) - }, - na = function (e) { - return ta(e) ? e.slice(6, e.length) : "" - }, - ra = function (e) { - return null == e || !1 === e - }, - ia = { - svg: "http://www.w3.org/2000/svg", - math: "http://www.w3.org/1998/Math/MathML" - }, - oa = u("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"), - aa = u("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view", !0), - sa = function (e) { - return "pre" === e - }, - ca = function (e) { - return oa(e) || aa(e) - }, - ua = Object.create(null), - la = Object.freeze({ - createElement: jt, - createElementNS: Nt, - createTextNode: Lt, - createComment: It, - insertBefore: Dt, - removeChild: Mt, - appendChild: Pt, - parentNode: Rt, - nextSibling: Ft, - tagName: Bt, - setTextContent: Ht, - setAttribute: Ut - }), - fa = { - create: function (e, t) { - Vt(t) - }, - update: function (e, t) { - e.data.ref !== t.data.ref && (Vt(e, !0), Vt(t)) - }, - destroy: function (e) { - Vt(e, !0) - } - }, - pa = new ho("", {}, []), - da = ["create", "activate", "update", "remove", "destroy"], - va = { - create: qt, - update: qt, - destroy: function (e) { - qt(e, pa) - } - }, - ha = Object.create(null), - ma = [fa, va], - ga = { - create: Qt, - update: Qt - }, - ya = { - create: en, - update: en - }, - _a = /[\w).+\-_$\]]/, - ba = "__r", - $a = "__c", - xa = { - create: Sn, - update: Sn - }, - wa = { - create: Tn, - update: Tn - }, - Ca = p(function (e) { - var t = {}; - return e.split(/;(?![^(]*\))/g).forEach(function (e) { - if (e) { - var n = e.split(/:(.+)/); - n.length > 1 && (t[n[0].trim()] = n[1].trim()) - } - }), t - }), - ka = /^--/, - Aa = /\s*!important$/, - Oa = function (e, t, n) { - if (ka.test(t)) e.style.setProperty(t, n); - else if (Aa.test(n)) e.style.setProperty(t, n.replace(Aa, ""), "important"); - else { - var r = Ta(t); - if (Array.isArray(n)) - for (var i = 0, o = n.length; i < o; i++) e.style[r] = n[i]; - else e.style[r] = n - } - }, - Sa = ["Webkit", "Moz", "ms"], - Ta = p(function (e) { - if (Wo = Wo || document.createElement("div"), "filter" !== (e = Ti(e)) && e in Wo.style) return e; - for (var t = e.charAt(0).toUpperCase() + e.slice(1), n = 0; n < Sa.length; n++) { - var r = Sa[n] + t; - if (r in Wo.style) return r - } - }), - Ea = { - create: Mn, - update: Mn - }, - ja = p(function (e) { - return { - enterClass: e + "-enter", - enterToClass: e + "-enter-to", - enterActiveClass: e + "-enter-active", - leaveClass: e + "-leave", - leaveToClass: e + "-leave-to", - leaveActiveClass: e + "-leave-active" - } - }), - Na = Ui && !Ji, - La = "transition", - Ia = "animation", - Da = "transition", - Ma = "transitionend", - Pa = "animation", - Ra = "animationend"; - Na && (void 0 === window.ontransitionend && void 0 !== window.onwebkittransitionend && (Da = "WebkitTransition", Ma = "webkitTransitionEnd"), void 0 === window.onanimationend && void 0 !== window.onwebkitanimationend && (Pa = "WebkitAnimation", Ra = "webkitAnimationEnd")); - var Fa = Ui && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout, - Ba = /\b(transform|all)(,|$)/, - Ha = Ui ? { - create: Yn, - activate: Yn, - remove: function (e, t) { - !0 !== e.data.show ? Wn(e, t) : t() - } - } : {}, - Ua = [ga, ya, xa, wa, Ea, Ha], - Va = Ua.concat(ma), - za = function (i) { - function o(e) { - return new ho(E.tagName(e).toLowerCase(), {}, [], void 0, e) - } - - function a(e, t) { - function n() { - 0 == --n.listeners && s(e) - } - return n.listeners = t, n - } - - function s(e) { - var n = E.parentNode(e); - t(n) && E.removeChild(n, e) - } - - function c(e, r, i, o, a) { - if (e.isRootInsert = !a, !l(e, r, i, o)) { - var s = e.data, - c = e.children, - u = e.tag; - t(u) ? (e.elm = e.ns ? E.createElementNS(e.ns, u) : E.createElement(u, e), g(e), v(e, c, r), t(s) && m(e, r), d(i, e.elm, o)) : n(e.isComment) ? (e.elm = E.createComment(e.text), d(i, e.elm, o)) : (e.elm = E.createTextNode(e.text), d(i, e.elm, o)) - } - } - - function l(e, r, i, o) { - var a = e.data; - if (t(a)) { - var s = t(e.componentInstance) && a.keepAlive; - if (t(a = a.hook) && t(a = a.init) && a(e, !1, i, o), t(e.componentInstance)) return f(e, r), n(s) && p(e, r, i, o), !0 - } - } - - function f(e, n) { - t(e.data.pendingInsert) && n.push.apply(n, e.data.pendingInsert), e.elm = e.componentInstance.$el, h(e) ? (m(e, n), g(e)) : (Vt(e), n.push(e)) - } - - function p(e, n, r, i) { - for (var o, a = e; a.componentInstance;) - if (a = a.componentInstance._vnode, t(o = a.data) && t(o = o.transition)) { - for (o = 0; o < S.activate.length; ++o) S.activate[o](pa, a); - n.push(a); - break - } d(r, e.elm, i) - } - - function d(e, n, r) { - t(e) && (t(r) ? r.parentNode === e && E.insertBefore(e, n, r) : E.appendChild(e, n)) - } - - function v(e, t, n) { - if (Array.isArray(t)) - for (var i = 0; i < t.length; ++i) c(t[i], n, e.elm, null, !0); - else r(e.text) && E.appendChild(e.elm, E.createTextNode(e.text)) - } - - function h(e) { - for (; e.componentInstance;) e = e.componentInstance._vnode; - return t(e.tag) - } - - function m(e, n) { - for (var r = 0; r < S.create.length; ++r) S.create[r](pa, e); - A = e.data.hook, t(A) && (t(A.create) && A.create(pa, e), t(A.insert) && n.push(e)) - } - - function g(e) { - for (var n, r = e; r;) t(n = r.context) && t(n = n.$options._scopeId) && E.setAttribute(e.elm, n, ""), r = r.parent; - t(n = bo) && n !== e.context && t(n = n.$options._scopeId) && E.setAttribute(e.elm, n, "") - } - - function y(e, t, n, r, i, o) { - for (; r <= i; ++r) c(n[r], o, e, t) - } - - function _(e) { - var n, r, i = e.data; - if (t(i)) - for (t(n = i.hook) && t(n = n.destroy) && n(e), n = 0; n < S.destroy.length; ++n) S.destroy[n](e); - if (t(n = e.children)) - for (r = 0; r < e.children.length; ++r) _(e.children[r]) - } - - function b(e, n, r, i) { - for (; r <= i; ++r) { - var o = n[r]; - t(o) && (t(o.tag) ? ($(o), _(o)) : s(o.elm)) - } - } - - function $(e, n) { - if (t(n) || t(e.data)) { - var r, i = S.remove.length + 1; - for (t(n) ? n.listeners += i : n = a(e.elm, i), t(r = e.componentInstance) && t(r = r._vnode) && t(r.data) && $(r, n), r = 0; r < S.remove.length; ++r) S.remove[r](e, n); - t(r = e.data.hook) && t(r = r.remove) ? r(e, n) : n() - } else s(e.elm) - } - - function x(n, r, i, o, a) { - for (var s, u, l, f, p = 0, d = 0, v = r.length - 1, h = r[0], m = r[v], g = i.length - 1, _ = i[0], $ = i[g], x = !a; p <= v && d <= g;) e(h) ? h = r[++p] : e(m) ? m = r[--v] : zt(h, _) ? (w(h, _, o), h = r[++p], _ = i[++d]) : zt(m, $) ? (w(m, $, o), m = r[--v], $ = i[--g]) : zt(h, $) ? (w(h, $, o), x && E.insertBefore(n, h.elm, E.nextSibling(m.elm)), h = r[++p], $ = i[--g]) : zt(m, _) ? (w(m, _, o), x && E.insertBefore(n, m.elm, h.elm), m = r[--v], _ = i[++d]) : (e(s) && (s = Kt(r, p, v)), u = t(_.key) ? s[_.key] : null, e(u) ? (c(_, o, n, h.elm), _ = i[++d]) : (l = r[u], zt(l, _) ? (w(l, _, o), r[u] = void 0, x && E.insertBefore(n, _.elm, h.elm), _ = i[++d]) : (c(_, o, n, h.elm), _ = i[++d]))); - p > v ? (f = e(i[g + 1]) ? null : i[g + 1].elm, y(n, f, i, d, g, o)) : d > g && b(n, r, p, v) - } - - function w(r, i, o, a) { - if (r !== i) { - if (n(i.isStatic) && n(r.isStatic) && i.key === r.key && (n(i.isCloned) || n(i.isOnce))) return i.elm = r.elm, void(i.componentInstance = r.componentInstance); - var s, c = i.data; - t(c) && t(s = c.hook) && t(s = s.prepatch) && s(r, i); - var u = i.elm = r.elm, - l = r.children, - f = i.children; - if (t(c) && h(i)) { - for (s = 0; s < S.update.length; ++s) S.update[s](r, i); - t(s = c.hook) && t(s = s.update) && s(r, i) - } - e(i.text) ? t(l) && t(f) ? l !== f && x(u, l, f, o, a) : t(f) ? (t(r.text) && E.setTextContent(u, ""), y(u, null, f, 0, f.length - 1, o)) : t(l) ? b(u, l, 0, l.length - 1) : t(r.text) && E.setTextContent(u, "") : r.text !== i.text && E.setTextContent(u, i.text), t(c) && t(s = c.hook) && t(s = s.postpatch) && s(r, i) - } - } - - function C(e, r, i) { - if (n(i) && t(e.parent)) e.parent.data.pendingInsert = r; - else - for (var o = 0; o < r.length; ++o) r[o].data.hook.insert(r[o]) - } - - function k(e, n, r) { - n.elm = e; - var i = n.tag, - o = n.data, - a = n.children; - if (t(o) && (t(A = o.hook) && t(A = A.init) && A(n, !0), t(A = n.componentInstance))) return f(n, r), !0; - if (t(i)) { - if (t(a)) - if (e.hasChildNodes()) { - for (var s = !0, c = e.firstChild, u = 0; u < a.length; u++) { - if (!c || !k(c, a[u], r)) { - s = !1; - break - } - c = c.nextSibling - } - if (!s || c) return !1 - } else v(n, a, r); - if (t(o)) - for (var l in o) - if (!j(l)) { - m(n, r); - break - } - } else e.data !== n.text && (e.data = n.text); - return !0 - } - var A, O, S = {}, - T = i.modules, - E = i.nodeOps; - for (A = 0; A < da.length; ++A) - for (S[da[A]] = [], O = 0; O < T.length; ++O) t(T[O][da[A]]) && S[da[A]].push(T[O][da[A]]); - var j = u("attrs,style,class,staticClass,staticStyle,key"); - return function (r, i, a, s, u, l) { - if (e(i)) return void(t(r) && _(r)); - var f = !1, - p = []; - if (e(r)) f = !0, c(i, p, u, l); - else { - var d = t(r.nodeType); - if (!d && zt(r, i)) w(r, i, p, s); - else { - if (d) { - if (1 === r.nodeType && r.hasAttribute(Ii) && (r.removeAttribute(Ii), a = !0), n(a) && k(r, i, p)) return C(i, p, !0), r; - r = o(r) - } - var v = r.elm, - m = E.parentNode(v); - if (c(i, p, v._leaveCb ? null : m, E.nextSibling(v)), t(i.parent)) { - for (var g = i.parent; g;) g.elm = i.elm, g = g.parent; - if (h(i)) - for (var y = 0; y < S.create.length; ++y) S.create[y](pa, i.parent) - } - t(m) ? b(m, [r], 0, 0) : t(r.tag) && _(r) - } - } - return C(i, p, f), i.elm - } - }({ - nodeOps: la, - modules: Va - }); - Ji && document.addEventListener("selectionchange", function () { - var e = document.activeElement; - e && e.vmodel && rr(e, "input") - }); - var Ja = { - inserted: function (e, t, n) { - if ("select" === n.tag) { - var r = function () { - Qn(e, t, n.context) - }; - r(), (zi || Ki) && setTimeout(r, 0) - } else "textarea" !== n.tag && "text" !== e.type && "password" !== e.type || (e._vModifiers = t.modifiers, t.modifiers.lazy || (e.addEventListener("change", nr), qi || (e.addEventListener("compositionstart", tr), e.addEventListener("compositionend", nr)), Ji && (e.vmodel = !0))) - }, - componentUpdated: function (e, t, n) { - if ("select" === n.tag) { - Qn(e, t, n.context); - (e.multiple ? t.value.some(function (t) { - return Xn(t, e.options) - }) : t.value !== t.oldValue && Xn(t.value, e.options)) && rr(e, "change") - } - } - }, - Ka = { - bind: function (e, t, n) { - var r = t.value; - n = ir(n); - var i = n.data && n.data.transition, - o = e.__vOriginalDisplay = "none" === e.style.display ? "" : e.style.display; - r && i && !Ji ? (n.data.show = !0, qn(n, function () { - e.style.display = o - })) : e.style.display = r ? o : "none" - }, - update: function (e, t, n) { - var r = t.value; - r !== t.oldValue && (n = ir(n), n.data && n.data.transition && !Ji ? (n.data.show = !0, r ? qn(n, function () { - e.style.display = e.__vOriginalDisplay - }) : Wn(n, function () { - e.style.display = "none" - })) : e.style.display = r ? e.__vOriginalDisplay : "none") - }, - unbind: function (e, t, n, r, i) { - i || (e.style.display = e.__vOriginalDisplay) - } - }, - qa = { - model: Ja, - show: Ka - }, - Wa = { - name: String, - appear: Boolean, - css: Boolean, - mode: String, - type: String, - enterClass: String, - leaveClass: String, - enterToClass: String, - leaveToClass: String, - enterActiveClass: String, - leaveActiveClass: String, - appearClass: String, - appearActiveClass: String, - appearToClass: String, - duration: [Number, String, Object] - }, - Za = { - name: "transition", - props: Wa, - abstract: !0, - render: function (e) { - var t = this, - n = this.$slots.default; - if (n && (n = n.filter(function (e) { - return e.tag - }), n.length)) { - var i = this.mode, - o = n[0]; - if (cr(this.$vnode)) return o; - var a = or(o); - if (!a) return o; - if (this._leaving) return sr(e, o); - var s = "__transition-" + this._uid + "-"; - a.key = null == a.key ? s + a.tag : r(a.key) ? 0 === String(a.key).indexOf(s) ? a.key : s + a.key : a.key; - var c = (a.data || (a.data = {})).transition = ar(this), - u = this._vnode, - l = or(u); - if (a.data.directives && a.data.directives.some(function (e) { - return "show" === e.name - }) && (a.data.show = !0), l && l.data && !ur(a, l)) { - var f = l && (l.data.transition = h({}, c)); - if ("out-in" === i) return this._leaving = !0, Y(f, "afterLeave", function () { - t._leaving = !1, t.$forceUpdate() - }), sr(e, o); - if ("in-out" === i) { - var p, d = function () { - p() - }; - Y(c, "afterEnter", d), Y(c, "enterCancelled", d), Y(f, "delayLeave", function (e) { - p = e - }) - } - } - return o - } - } - }, - Ga = h({ - tag: String, - moveClass: String - }, Wa); - delete Ga.mode; - var Ya = { - props: Ga, - render: function (e) { - for (var t = this.tag || this.$vnode.data.tag || "span", n = Object.create(null), r = this.prevChildren = this.children, i = this.$slots.default || [], o = this.children = [], a = ar(this), s = 0; s < i.length; s++) { - var c = i[s]; - c.tag && null != c.key && 0 !== String(c.key).indexOf("__vlist") && (o.push(c), n[c.key] = c, (c.data || (c.data = {})).transition = a) - } - if (r) { - for (var u = [], l = [], f = 0; f < r.length; f++) { - var p = r[f]; - p.data.transition = a, p.data.pos = p.elm.getBoundingClientRect(), n[p.key] ? u.push(p) : l.push(p) - } - this.kept = e(t, null, u), this.removed = l - } - return e(t, null, o) - }, - beforeUpdate: function () { - this.__patch__(this._vnode, this.kept, !1, !0), this._vnode = this.kept - }, - updated: function () { - var e = this.prevChildren, - t = this.moveClass || (this.name || "v") + "-move"; - if (e.length && this.hasMove(e[0].elm, t)) { - e.forEach(lr), e.forEach(fr), e.forEach(pr); - var n = document.body; - n.offsetHeight; - e.forEach(function (e) { - if (e.data.moved) { - var n = e.elm, - r = n.style; - Hn(n, t), r.transform = r.WebkitTransform = r.transitionDuration = "", n.addEventListener(Ma, n._moveCb = function e(r) { - r && !/transform$/.test(r.propertyName) || (n.removeEventListener(Ma, e), n._moveCb = null, Un(n, t)) - }) - } - }) - } - }, - methods: { - hasMove: function (e, t) { - if (!Na) return !1; - if (null != this._hasMove) return this._hasMove; - var n = e.cloneNode(); - e._transitionClasses && e._transitionClasses.forEach(function (e) { - Rn(n, e) - }), Pn(n, t), n.style.display = "none", this.$el.appendChild(n); - var r = zn(n); - return this.$el.removeChild(n), this._hasMove = r.hasTransform - } - } - }, - Qa = { - Transition: Za, - TransitionGroup: Ya - }; - pt.config.mustUseProp = Yo, pt.config.isReservedTag = ca, pt.config.isReservedAttr = Zo, pt.config.getTagNamespace = St, pt.config.isUnknownElement = Tt, h(pt.options.directives, qa), h(pt.options.components, Qa), pt.prototype.__patch__ = Ui ? za : g, pt.prototype.$mount = function (e, t) { - return e = e && Ui ? Et(e) : void 0, ve(this, e, t) - }, setTimeout(function () { - Pi.devtools && to && to.emit("init", pt) - }, 0); - var Xa, es = !!Ui && function (e, t) { - var n = document.createElement("div"); - return n.innerHTML = '
    ', n.innerHTML.indexOf(t) > 0 - }("\n", " "), - ts = u("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"), - ns = u("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"), - rs = u("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"), - is = [/"([^"]*)"+/.source, /'([^']*)'+/.source, /([^\s"'=<>`]+)/.source], - os = new RegExp("^\\s*" + /([^\s"'<>\/=]+)/.source + "(?:\\s*(" + /(?:=)/.source + ")\\s*(?:" + is.join("|") + "))?"), - as = "[a-zA-Z_][\\w\\-\\.]*", - ss = new RegExp("^<((?:" + as + "\\:)?" + as + ")"), - cs = /^\s*(\/?)>/, - us = new RegExp("^<\\/((?:" + as + "\\:)?" + as + ")[^>]*>"), - ls = /^]+>/i, - fs = /^" - }, { - b: ")?(\\[\\])?"; + return { + aliases: ["csharp"], + k: i, + i: /::/, + c: [e.C("///", "$", { + rB: !0, + c: [{ + cN: "doctag", + v: [{ + b: "///", + r: 0 + }, { + b: "" + }, { + b: "" }] }] @@ -5246,76 +5476,74 @@ hljs.registerLanguage("cs", function(e) { }] } }); -hljs.registerLanguage("json", function(e) { +hljs.registerLanguage("json", function (e) { var i = { - literal: "true false null" - } - , n = [e.QSM, e.CNM] - , r = { - e: ",", - eW: !0, - eE: !0, - c: n, - k: i - } - , t = { - b: "{", - e: "}", - c: [{ - cN: "attr", - b: /"/, - e: /"/, - c: [e.BE], - i: "\\n" - }, e.inherit(r, { - b: /:/ - })], - i: "\\S" - } - , c = { - b: "\\[", - e: "\\]", - c: [e.inherit(r)], - i: "\\S" - }; - return n.splice(n.length, 0, t, c), - { + literal: "true false null" + }, + n = [e.QSM, e.CNM], + r = { + e: ",", + eW: !0, + eE: !0, + c: n, + k: i + }, + t = { + b: "{", + e: "}", + c: [{ + cN: "attr", + b: /"/, + e: /"/, + c: [e.BE], + i: "\\n" + }, e.inherit(r, { + b: /:/ + })], + i: "\\S" + }, + c = { + b: "\\[", + e: "\\]", + c: [e.inherit(r)], + i: "\\S" + }; + return n.splice(n.length, 0, t, c), { c: n, k: i, i: "\\S" } }); -hljs.registerLanguage("swift", function(e) { +hljs.registerLanguage("swift", function (e) { var i = { - keyword: "__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet", - literal: "true false nil", - built_in: "abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip" - } - , t = { - cN: "type", - b: "\\b[A-Z][\\wÀ-ʸ']*", - r: 0 - } - , n = e.C("/\\*", "\\*/", { - c: ["self"] - }) - , r = { - cN: "subst", - b: /\\\(/, - e: "\\)", - k: i, - c: [] - } - , a = { - cN: "number", - b: "\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b", - r: 0 - } - , o = e.inherit(e.QSM, { - c: [r, e.BE] - }); - return r.c = [a], - { + keyword: "__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet", + literal: "true false nil", + built_in: "abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip" + }, + t = { + cN: "type", + b: "\\b[A-Z][\\wÀ-ʸ']*", + r: 0 + }, + n = e.C("/\\*", "\\*/", { + c: ["self"] + }), + r = { + cN: "subst", + b: /\\\(/, + e: "\\)", + k: i, + c: [] + }, + a = { + cN: "number", + b: "\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b", + r: 0 + }, + o = e.inherit(e.QSM, { + c: [r, e.BE] + }); + return r.c = [a], { k: i, c: [o, e.CLCM, n, t, a, { cN: "function", @@ -5358,7 +5586,7 @@ hljs.registerLanguage("swift", function(e) { }] } }); -hljs.registerLanguage("tex", function(c) { +hljs.registerLanguage("tex", function (c) { var e = { cN: "tag", b: /\\/, @@ -5411,32 +5639,32 @@ hljs.registerLanguage("tex", function(c) { })] } }); -hljs.registerLanguage("php", function(e) { +hljs.registerLanguage("php", function (e) { var c = { - b: "\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*" - } - , i = { - cN: "meta", - b: /<\?(php)?|\?>/ - } - , t = { - cN: "string", - c: [e.BE, i], - v: [{ - b: 'b"', - e: '"' - }, { - b: "b'", - e: "'" - }, e.inherit(e.ASM, { - i: null - }), e.inherit(e.QSM, { - i: null - })] - } - , a = { - v: [e.BNM, e.CNM] - }; + b: "\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*" + }, + i = { + cN: "meta", + b: /<\?(php)?|\?>/ + }, + t = { + cN: "string", + c: [e.BE, i], + v: [{ + b: 'b"', + e: '"' + }, { + b: "b'", + e: "'" + }, e.inherit(e.ASM, { + i: null + }), e.inherit(e.QSM, { + i: null + })] + }, + a = { + v: [e.BNM, e.CNM] + }; return { aliases: ["php3", "php4", "php5", "php6"], cI: !0, @@ -5505,7 +5733,7 @@ hljs.registerLanguage("php", function(e) { }, t, a] } }); -hljs.registerLanguage("r", function(e) { +hljs.registerLanguage("r", function (e) { var r = "([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*"; return { c: [e.HCM, { @@ -5553,151 +5781,150 @@ hljs.registerLanguage("r", function(e) { }] } }); -hljs.registerLanguage("perl", function(e) { - var t = "getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when" - , r = { - cN: "subst", - b: "[$@]\\{", - e: "\\}", - k: t - } - , s = { - b: "->{", - e: "}" - } - , n = { - v: [{ - b: /\$\d/ - }, { - b: /[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/ - }, { - b: /[\$%@][^\s\w{]/, - r: 0 - }] - } - , i = [e.BE, r, n] - , o = [n, e.HCM, e.C("^\\=\\w", "\\=cut", { - eW: !0 - }), s, { - cN: "string", - c: i, - v: [{ - b: "q[qwxr]?\\s*\\(", - e: "\\)", - r: 5 - }, { - b: "q[qwxr]?\\s*\\[", - e: "\\]", - r: 5 - }, { - b: "q[qwxr]?\\s*\\{", +hljs.registerLanguage("perl", function (e) { + var t = "getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when", + r = { + cN: "subst", + b: "[$@]\\{", e: "\\}", - r: 5 - }, { - b: "q[qwxr]?\\s*\\|", - e: "\\|", - r: 5 - }, { - b: "q[qwxr]?\\s*\\<", - e: "\\>", - r: 5 - }, { - b: "qw\\s+q", - e: "q", - r: 5 - }, { - b: "'", - e: "'", - c: [e.BE] + k: t + }, + s = { + b: "->{", + e: "}" + }, + n = { + v: [{ + b: /\$\d/ + }, { + b: /[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/ + }, { + b: /[\$%@][^\s\w{]/, + r: 0 + }] + }, + i = [e.BE, r, n], + o = [n, e.HCM, e.C("^\\=\\w", "\\=cut", { + eW: !0 + }), s, { + cN: "string", + c: i, + v: [{ + b: "q[qwxr]?\\s*\\(", + e: "\\)", + r: 5 + }, { + b: "q[qwxr]?\\s*\\[", + e: "\\]", + r: 5 + }, { + b: "q[qwxr]?\\s*\\{", + e: "\\}", + r: 5 + }, { + b: "q[qwxr]?\\s*\\|", + e: "\\|", + r: 5 + }, { + b: "q[qwxr]?\\s*\\<", + e: "\\>", + r: 5 + }, { + b: "qw\\s+q", + e: "q", + r: 5 + }, { + b: "'", + e: "'", + c: [e.BE] + }, { + b: '"', + e: '"' + }, { + b: "`", + e: "`", + c: [e.BE] + }, { + b: "{\\w+}", + c: [], + r: 0 + }, { + b: "-?\\w+\\s*\\=\\>", + c: [], + r: 0 + }] }, { - b: '"', - e: '"' + cN: "number", + b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", + r: 0 }, { - b: "`", - e: "`", - c: [e.BE] + b: "(\\/\\/|" + e.RSR + "|\\b(split|return|print|reverse|grep)\\b)\\s*", + k: "split return print reverse grep", + r: 0, + c: [e.HCM, { + cN: "regexp", + b: "(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*", + r: 10 + }, { + cN: "regexp", + b: "(m|qr)?/", + e: "/[a-z]*", + c: [e.BE], + r: 0 + }] }, { - b: "{\\w+}", - c: [], - r: 0 + cN: "function", + bK: "sub", + e: "(\\s*\\(.*?\\))?[;{]", + eE: !0, + r: 5, + c: [e.TM] }, { - b: "-?\\w+\\s*\\=\\>", - c: [], + b: "-\\w\\b", r: 0 - }] - }, { - cN: "number", - b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", - r: 0 - }, { - b: "(\\/\\/|" + e.RSR + "|\\b(split|return|print|reverse|grep)\\b)\\s*", - k: "split return print reverse grep", - r: 0, - c: [e.HCM, { - cN: "regexp", - b: "(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*", - r: 10 }, { - cN: "regexp", - b: "(m|qr)?/", - e: "/[a-z]*", - c: [e.BE], - r: 0 - }] - }, { - cN: "function", - bK: "sub", - e: "(\\s*\\(.*?\\))?[;{]", - eE: !0, - r: 5, - c: [e.TM] - }, { - b: "-\\w\\b", - r: 0 - }, { - b: "^__DATA__$", - e: "^__END__$", - sL: "mojolicious", - c: [{ - b: "^@@.*", - e: "$", - cN: "comment" - }] - }]; + b: "^__DATA__$", + e: "^__END__$", + sL: "mojolicious", + c: [{ + b: "^@@.*", + e: "$", + cN: "comment" + }] + }]; return r.c = o, - s.c = o, - { - aliases: ["pl", "pm"], - l: /[\w\.]+/, - k: t, - c: o - } + s.c = o, { + aliases: ["pl", "pm"], + l: /[\w\.]+/, + k: t, + c: o + } }); -hljs.registerLanguage("bash", function(e) { +hljs.registerLanguage("bash", function (e) { var t = { - cN: "variable", - v: [{ - b: /\$[\w\d#@][\w\d_]*/ - }, { - b: /\$\{(.*?)}/ - }] - } - , s = { - cN: "string", - b: /"/, - e: /"/, - c: [e.BE, t, { cN: "variable", - b: /\$\(/, - e: /\)/, - c: [e.BE] - }] - } - , a = { - cN: "string", - b: /'/, - e: /'/ - }; + v: [{ + b: /\$[\w\d#@][\w\d_]*/ + }, { + b: /\$\{(.*?)}/ + }] + }, + s = { + cN: "string", + b: /"/, + e: /"/, + c: [e.BE, t, { + cN: "variable", + b: /\$\(/, + e: /\)/, + c: [e.BE] + }] + }, + a = { + cN: "string", + b: /'/, + e: /'/ + }; return { aliases: ["sh", "zsh"], l: /\b-?[a-z\._]+\b/, @@ -5722,16 +5949,16 @@ hljs.registerLanguage("bash", function(e) { }, e.HCM, s, a, t] } }); -hljs.registerLanguage("scss", function(e) { - var t = "[a-zA-Z-][a-zA-Z0-9_-]*" - , i = { - cN: "variable", - b: "(\\$" + t + ")\\b" - } - , r = { - cN: "number", - b: "#[0-9A-Fa-f]+" - }; +hljs.registerLanguage("scss", function (e) { + var t = "[a-zA-Z-][a-zA-Z0-9_-]*", + i = { + cN: "variable", + b: "(\\$" + t + ")\\b" + }, + r = { + cN: "number", + b: "#[0-9A-Fa-f]+" + }; ({ cN: "attribute", b: "[A-Z\\_\\.\\-]+", @@ -5795,42 +6022,42 @@ hljs.registerLanguage("scss", function(e) { }] } }); -hljs.registerLanguage("css", function(e) { - var c = "[a-zA-Z-][a-zA-Z0-9_-]*" - , t = { - b: /[A-Z\_\.\-]+\s*:/, - rB: !0, - e: ";", - eW: !0, - c: [{ - cN: "attribute", - b: /\S/, - e: ":", - eE: !0, - starts: { - eW: !0, +hljs.registerLanguage("css", function (e) { + var c = "[a-zA-Z-][a-zA-Z0-9_-]*", + t = { + b: /[A-Z\_\.\-]+\s*:/, + rB: !0, + e: ";", + eW: !0, + c: [{ + cN: "attribute", + b: /\S/, + e: ":", eE: !0, - c: [{ - b: /[\w-]+\(/, - rB: !0, + starts: { + eW: !0, + eE: !0, c: [{ - cN: "built_in", - b: /[\w-]+/ + b: /[\w-]+\(/, + rB: !0, + c: [{ + cN: "built_in", + b: /[\w-]+/ + }, { + b: /\(/, + e: /\)/, + c: [e.ASM, e.QSM] + }] + }, e.CSSNM, e.QSM, e.ASM, e.CBCM, { + cN: "number", + b: "#[0-9A-Fa-f]+" }, { - b: /\(/, - e: /\)/, - c: [e.ASM, e.QSM] + cN: "meta", + b: "!important" }] - }, e.CSSNM, e.QSM, e.ASM, e.CBCM, { - cN: "number", - b: "#[0-9A-Fa-f]+" - }, { - cN: "meta", - b: "!important" - }] - } - }] - }; + } + }] + }; return { cI: !0, i: /[=\/|'\$]/, @@ -5878,34 +6105,34 @@ hljs.registerLanguage("css", function(e) { }] } }); -hljs.registerLanguage("xml", function(s) { - var e = "[A-Za-z0-9\\._:-]+" - , t = { - eW: !0, - i: /`]+/ + cN: "attr", + b: e, + r: 0 + }, { + b: /=\s*/, + r: 0, + c: [{ + cN: "string", + endsParent: !0, + v: [{ + b: /"/, + e: /"/ + }, { + b: /'/, + e: /'/ + }, { + b: /[^\s"'=<>`]+/ + }] }] }] - }] - }; + }; return { aliases: ["html", "xhtml", "rss", "atom", "xjb", "xsd", "xsl", "plist"], cI: !0, @@ -5981,67 +6208,67 @@ hljs.registerLanguage("xml", function(s) { }] } }); -hljs.registerLanguage("nginx", function(e) { +hljs.registerLanguage("nginx", function (e) { var r = { - cN: "variable", - v: [{ - b: /\$\d+/ - }, { - b: /\$\{/, - e: /}/ - }, { - b: "[\\$\\@]" + e.UIR - }] - } - , b = { - eW: !0, - l: "[a-z/_]+", - k: { - literal: "on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" - }, - r: 0, - i: "=>", - c: [e.HCM, { - cN: "string", - c: [e.BE, r], + cN: "variable", v: [{ - b: /"/, - e: /"/ + b: /\$\d+/ }, { - b: /'/, - e: /'/ + b: /\$\{/, + e: /}/ + }, { + b: "[\\$\\@]" + e.UIR }] - }, { - b: "([a-z]+):/", - e: "\\s", + }, + b = { eW: !0, - eE: !0, - c: [r] - }, { - cN: "regexp", - c: [e.BE, r], - v: [{ - b: "\\s\\^", - e: "\\s|{|;", - rE: !0 + l: "[a-z/_]+", + k: { + literal: "on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" + }, + r: 0, + i: "=>", + c: [e.HCM, { + cN: "string", + c: [e.BE, r], + v: [{ + b: /"/, + e: /"/ + }, { + b: /'/, + e: /'/ + }] + }, { + b: "([a-z]+):/", + e: "\\s", + eW: !0, + eE: !0, + c: [r] }, { - b: "~\\*?\\s+", - e: "\\s|{|;", - rE: !0 + cN: "regexp", + c: [e.BE, r], + v: [{ + b: "\\s\\^", + e: "\\s|{|;", + rE: !0 + }, { + b: "~\\*?\\s+", + e: "\\s|{|;", + rE: !0 + }, { + b: "\\*(\\.[a-z\\-]+)+" + }, { + b: "([a-z\\-]+\\.)+\\*" + }] }, { - b: "\\*(\\.[a-z\\-]+)+" + cN: "number", + b: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b" }, { - b: "([a-z\\-]+\\.)+\\*" - }] - }, { - cN: "number", - b: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b" - }, { - cN: "number", - b: "\\b\\d+[kKmMgGdshdwy]*\\b", - r: 0 - }, r] - }; + cN: "number", + b: "\\b\\d+[kKmMgGdshdwy]*\\b", + r: 0 + }, r] + }; return { aliases: ["nginxconf"], c: [e.HCM, { @@ -6067,85 +6294,85 @@ hljs.registerLanguage("nginx", function(e) { i: "[^\\s\\}]" } }); -hljs.registerLanguage("coffeescript", function(e) { +hljs.registerLanguage("coffeescript", function (e) { var c = { - keyword: "in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not", - literal: "true false null undefined yes no on off", - built_in: "npm require console print module global window document" - } - , n = "[A-Za-z$_][0-9A-Za-z$_]*" - , r = { - cN: "subst", - b: /#\{/, - e: /}/, - k: c - } - , i = [e.BNM, e.inherit(e.CNM, { - starts: { - e: "(\\s*/)?", - r: 0 - } - }), { - cN: "string", - v: [{ - b: /'''/, - e: /'''/, - c: [e.BE] - }, { - b: /'/, - e: /'/, - c: [e.BE] - }, { - b: /"""/, - e: /"""/, - c: [e.BE, r] - }, { - b: /"/, - e: /"/, - c: [e.BE, r] - }] - }, { - cN: "regexp", - v: [{ - b: "///", - e: "///", - c: [r, e.HCM] + keyword: "in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not", + literal: "true false null undefined yes no on off", + built_in: "npm require console print module global window document" + }, + n = "[A-Za-z$_][0-9A-Za-z$_]*", + r = { + cN: "subst", + b: /#\{/, + e: /}/, + k: c + }, + i = [e.BNM, e.inherit(e.CNM, { + starts: { + e: "(\\s*/)?", + r: 0 + } + }), { + cN: "string", + v: [{ + b: /'''/, + e: /'''/, + c: [e.BE] + }, { + b: /'/, + e: /'/, + c: [e.BE] + }, { + b: /"""/, + e: /"""/, + c: [e.BE, r] + }, { + b: /"/, + e: /"/, + c: [e.BE, r] + }] }, { - b: "//[gim]*", - r: 0 + cN: "regexp", + v: [{ + b: "///", + e: "///", + c: [r, e.HCM] + }, { + b: "//[gim]*", + r: 0 + }, { + b: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/ + }] }, { - b: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/ - }] - }, { - b: "@" + n - }, { - sL: "javascript", - eB: !0, - eE: !0, - v: [{ - b: "```", - e: "```" + b: "@" + n }, { - b: "`", - e: "`" - }] - }]; + sL: "javascript", + eB: !0, + eE: !0, + v: [{ + b: "```", + e: "```" + }, { + b: "`", + e: "`" + }] + }]; r.c = i; var s = e.inherit(e.TM, { - b: n - }) - , t = "(\\(.*\\))?\\s*\\B[-=]>" - , o = { - cN: "params", - b: "\\([^\\(]", - rB: !0, - c: [{ - b: /\(/, - e: /\)/, - k: c, - c: ["self"].concat(i) - }] - }; + b: n + }), + t = "(\\(.*\\))?\\s*\\B[-=]>", + o = { + cN: "params", + b: "\\([^\\(]", + rB: !0, + c: [{ + b: /\(/, + e: /\)/, + k: c, + c: ["self"].concat(i) + }] + }; return { aliases: ["coffee", "cson", "iced"], k: c, @@ -6186,114 +6413,113 @@ hljs.registerLanguage("coffeescript", function(e) { }]) } }); -hljs.registerLanguage("python", function(e) { +hljs.registerLanguage("python", function (e) { var r = { - keyword: "and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False", - built_in: "Ellipsis NotImplemented" - } - , b = { - cN: "meta", - b: /^(>>>|\.\.\.) / - } - , c = { - cN: "subst", - b: /\{/, - e: /\}/, - k: r, - i: /#/ - } - , a = { - cN: "string", - c: [e.BE], - v: [{ - b: /(u|b)?r?'''/, - e: /'''/, - c: [b], - r: 10 - }, { - b: /(u|b)?r?"""/, - e: /"""/, - c: [b], - r: 10 - }, { - b: /(fr|rf|f)'''/, - e: /'''/, - c: [b, c] - }, { - b: /(fr|rf|f)"""/, - e: /"""/, - c: [b, c] - }, { - b: /(u|r|ur)'/, - e: /'/, - r: 10 - }, { - b: /(u|r|ur)"/, - e: /"/, - r: 10 - }, { - b: /(b|br)'/, - e: /'/ - }, { - b: /(b|br)"/, - e: /"/ - }, { - b: /(fr|rf|f)'/, - e: /'/, - c: [c] - }, { - b: /(fr|rf|f)"/, - e: /"/, - c: [c] - }, e.ASM, e.QSM] - } - , s = { - cN: "number", - r: 0, - v: [{ - b: e.BNR + "[lLjJ]?" - }, { - b: "\\b(0o[0-7]+)[lLjJ]?" - }, { - b: e.CNR + "[lLjJ]?" - }] - } - , i = { - cN: "params", - b: /\(/, - e: /\)/, - c: ["self", b, s, a] - }; - return c.c = [a, s, b], - { - aliases: ["py", "gyp"], - k: r, - i: /(<\/|->|\?)|=>/, - c: [b, s, a, e.HCM, { + keyword: "and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False", + built_in: "Ellipsis NotImplemented" + }, + b = { + cN: "meta", + b: /^(>>>|\.\.\.) / + }, + c = { + cN: "subst", + b: /\{/, + e: /\}/, + k: r, + i: /#/ + }, + a = { + cN: "string", + c: [e.BE], v: [{ - cN: "function", - bK: "def" + b: /(u|b)?r?'''/, + e: /'''/, + c: [b], + r: 10 }, { - cN: "class", - bK: "class" - }], - e: /:/, - i: /[${=;\n,]/, - c: [e.UTM, i, { - b: /->/, - eW: !0, - k: "None" - }] - }, { - cN: "meta", - b: /^[\t ]*@/, + b: /(u|b)?r?"""/, + e: /"""/, + c: [b], + r: 10 + }, { + b: /(fr|rf|f)'''/, + e: /'''/, + c: [b, c] + }, { + b: /(fr|rf|f)"""/, + e: /"""/, + c: [b, c] + }, { + b: /(u|r|ur)'/, + e: /'/, + r: 10 + }, { + b: /(u|r|ur)"/, + e: /"/, + r: 10 + }, { + b: /(b|br)'/, + e: /'/ + }, { + b: /(b|br)"/, + e: /"/ + }, { + b: /(fr|rf|f)'/, + e: /'/, + c: [c] + }, { + b: /(fr|rf|f)"/, + e: /"/, + c: [c] + }, e.ASM, e.QSM] + }, + s = { + cN: "number", + r: 0, + v: [{ + b: e.BNR + "[lLjJ]?" + }, { + b: "\\b(0o[0-7]+)[lLjJ]?" + }, { + b: e.CNR + "[lLjJ]?" + }] + }, + i = { + cN: "params", + b: /\(/, + e: /\)/, + c: ["self", b, s, a] + }; + return c.c = [a, s, b], { + aliases: ["py", "gyp"], + k: r, + i: /(<\/|->|\?)|=>/, + c: [b, s, a, e.HCM, { + v: [{ + cN: "function", + bK: "def" + }, { + cN: "class", + bK: "class" + }], + e: /:/, + i: /[${=;\n,]/, + c: [e.UTM, i, { + b: /->/, + eW: !0, + k: "None" + }] + }, { + cN: "meta", + b: /^[\t ]*@/, e: /$/ }, { b: /\b(print|exec)\(/ }] } }); -hljs.registerLanguage("shell", function(s) { +hljs.registerLanguage("shell", function (s) { return { aliases: ["console"], c: [{ @@ -6306,18 +6532,18 @@ hljs.registerLanguage("shell", function(s) { }] } }); -hljs.registerLanguage("objectivec", function(e) { +hljs.registerLanguage("objectivec", function (e) { var t = { - cN: "built_in", - b: "\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+" - } - , _ = { - keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN", - literal: "false true FALSE TRUE nil YES NO NULL", - built_in: "BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once" - } - , i = /[a-zA-Z@][a-zA-Z0-9_]*/ - , n = "@interface @class @protocol @implementation"; + cN: "built_in", + b: "\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+" + }, + _ = { + keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN", + literal: "false true FALSE TRUE nil YES NO NULL", + built_in: "BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once" + }, + i = /[a-zA-Z@][a-zA-Z0-9_]*/, + n = "@interface @class @protocol @implementation"; return { aliases: ["mm", "objc", "obj-c"], k: _, @@ -6363,7 +6589,7 @@ hljs.registerLanguage("objectivec", function(e) { }] } }); -hljs.registerLanguage("sql", function(e) { +hljs.registerLanguage("sql", function (e) { var t = e.C("--", "$"); return { cI: !0, @@ -6401,7 +6627,7 @@ hljs.registerLanguage("sql", function(e) { }, e.CBCM, t] } }); -hljs.registerLanguage("apache", function(e) { +hljs.registerLanguage("apache", function (e) { var r = { cN: "number", b: "[\\$%]\\d+" @@ -6441,7 +6667,7 @@ hljs.registerLanguage("apache", function(e) { i: /\S/ } }); -hljs.registerLanguage("django", function(e) { +hljs.registerLanguage("django", function (e) { var t = { b: /\|[A-Za-z]+:?/, k: { @@ -6478,7 +6704,7 @@ hljs.registerLanguage("django", function(e) { }] } }); -hljs.registerLanguage("markdown", function(e) { +hljs.registerLanguage("markdown", function (e) { return { aliases: ["md", "mkdown", "mkd"], c: [{ @@ -6569,7 +6795,7 @@ hljs.registerLanguage("markdown", function(e) { }] } }); -hljs.registerLanguage("stata", function(e) { +hljs.registerLanguage("stata", function (e) { return { aliases: ["do", "ado"], cI: !0, @@ -6595,37 +6821,37 @@ hljs.registerLanguage("stata", function(e) { }, e.C("^[ ]*\\*.*$", !1), e.CLCM, e.CBCM] } }); -hljs.registerLanguage("javascript", function(e) { - var r = "[A-Za-z$_][0-9A-Za-z$_]*" - , t = { - keyword: "in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as", - literal: "true false null undefined NaN Infinity", - built_in: "eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise" - } - , a = { - cN: "number", - v: [{ - b: "\\b(0[bB][01]+)" - }, { - b: "\\b(0[oO][0-7]+)" - }, { - b: e.CNR - }], - r: 0 - } - , n = { - cN: "subst", - b: "\\$\\{", - e: "\\}", - k: t, - c: [] - } - , c = { - cN: "string", - b: "`", - e: "`", - c: [e.BE, n] - }; +hljs.registerLanguage("javascript", function (e) { + var r = "[A-Za-z$_][0-9A-Za-z$_]*", + t = { + keyword: "in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as", + literal: "true false null undefined NaN Infinity", + built_in: "eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise" + }, + a = { + cN: "number", + v: [{ + b: "\\b(0[bB][01]+)" + }, { + b: "\\b(0[oO][0-7]+)" + }, { + b: e.CNR + }], + r: 0 + }, + n = { + cN: "subst", + b: "\\$\\{", + e: "\\}", + k: t, + c: [] + }, + c = { + cN: "string", + b: "`", + e: "`", + c: [e.BE, n] + }; n.c = [e.ASM, e.QSM, c, a, e.RM]; var s = n.c.concat([e.CBCM, e.CLCM]); return { @@ -6728,16 +6954,16 @@ hljs.registerLanguage("javascript", function(e) { i: /#(?!!)/ } }); -hljs.registerLanguage("java", function(e) { - var a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*" - , t = a + "(<" + a + "(\\s*,\\s*" + a + ")*>)?" - , r = "false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do" - , s = "\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?" - , c = { - cN: "number", - b: s, - r: 0 - }; +hljs.registerLanguage("java", function (e) { + var a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", + t = a + "(<" + a + "(\\s*,\\s*" + a + ")*>)?", + r = "false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do", + s = "\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?", + c = { + cN: "number", + b: s, + r: 0 + }; return { aliases: ["jsp"], k: r, @@ -6790,65 +7016,65 @@ hljs.registerLanguage("java", function(e) { }] } }); -hljs.registerLanguage("cpp", function(t) { +hljs.registerLanguage("cpp", function (t) { var e = { - cN: "keyword", - b: "\\b[a-z\\d_]*_t\\b" - } - , r = { - cN: "string", - v: [{ - b: '(u8?|U)?L?"', - e: '"', - i: "\\n", - c: [t.BE] - }, { - b: '(u8?|U)?R"', - e: '"', - c: [t.BE] - }, { - b: "'\\\\?.", - e: "'", - i: "." - }] - } - , s = { - cN: "number", - v: [{ - b: "\\b(0b[01']+)" - }, { - b: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)" - }, { - b: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" - }], - r: 0 - } - , i = { - cN: "meta", - b: /#\s*[a-z]+\b/, - e: /$/, - k: { - "meta-keyword": "if else elif endif define undef warning error line pragma ifdef ifndef include" + cN: "keyword", + b: "\\b[a-z\\d_]*_t\\b" }, - c: [{ - b: /\\\n/, + r = { + cN: "string", + v: [{ + b: '(u8?|U)?L?"', + e: '"', + i: "\\n", + c: [t.BE] + }, { + b: '(u8?|U)?R"', + e: '"', + c: [t.BE] + }, { + b: "'\\\\?.", + e: "'", + i: "." + }] + }, + s = { + cN: "number", + v: [{ + b: "\\b(0b[01']+)" + }, { + b: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)" + }, { + b: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" + }], r: 0 - }, t.inherit(r, { - cN: "meta-string" - }), { - cN: "meta-string", - b: /<[^\n>]*>/, + }, + i = { + cN: "meta", + b: /#\s*[a-z]+\b/, e: /$/, - i: "\\n" - }, t.CLCM, t.CBCM] - } - , a = t.IR + "\\s*\\(" - , c = { - keyword: "int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not", - built_in: "std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr", - literal: "true false nullptr NULL" - } - , n = [e, t.CLCM, t.CBCM, s, r]; + k: { + "meta-keyword": "if else elif endif define undef warning error line pragma ifdef ifndef include" + }, + c: [{ + b: /\\\n/, + r: 0 + }, t.inherit(r, { + cN: "meta-string" + }), { + cN: "meta-string", + b: /<[^\n>]*>/, + e: /$/, + i: "\\n" + }, t.CLCM, t.CBCM] + }, + a = t.IR + "\\s*\\(", + c = { + keyword: "int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not", + built_in: "std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr", + literal: "true false nullptr NULL" + }, + n = [e, t.CLCM, t.CBCM, s, r]; return { aliases: ["c", "cc", "h", "c++", "h++", "hpp"], k: c, @@ -6919,7 +7145,7 @@ hljs.registerLanguage("cpp", function(t) { } } }); -hljs.registerLanguage("http", function(e) { +hljs.registerLanguage("http", function (e) { var t = "HTTP/[0-9\\.]+"; return { aliases: ["https"], @@ -6966,56 +7192,56 @@ hljs.registerLanguage("http", function(e) { }] } }); -hljs.registerLanguage("makefile", function(e) { +hljs.registerLanguage("makefile", function (e) { var i = { - cN: "variable", - v: [{ - b: "\\$\\(" + e.UIR + "\\)", - c: [e.BE] - }, { - b: /\$[@%>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?" - , r = { - keyword: "and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor", - literal: "true false nil" - } - , c = { - cN: "doctag", - b: "@[A-Za-z]+" - } - , a = { - b: "#<", - e: ">" - } - , s = [e.C("#", "$", { - c: [c] - }), e.C("^\\=begin", "^\\=end", { - c: [c], - r: 10 - }), e.C("^__END__", "\\n$")] - , n = { - cN: "subst", - b: "#\\{", - e: "}", - k: r - } - , t = { - cN: "string", - c: [e.BE, n], - v: [{ - b: /'/, - e: /'/ - }, { - b: /"/, - e: /"/ - }, { - b: /`/, - e: /`/ - }, { - b: "%[qQwWx]?\\(", - e: "\\)" +hljs.registerLanguage("ruby", function (e) { + var b = "[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?", + r = { + keyword: "and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor", + literal: "true false nil" + }, + c = { + cN: "doctag", + b: "@[A-Za-z]+" + }, + a = { + b: "#<", + e: ">" + }, + s = [e.C("#", "$", { + c: [c] + }), e.C("^\\=begin", "^\\=end", { + c: [c], + r: 10 + }), e.C("^__END__", "\\n$")], + n = { + cN: "subst", + b: "#\\{", + e: "}", + k: r + }, + t = { + cN: "string", + c: [e.BE, n], + v: [{ + b: /'/, + e: /'/ + }, { + b: /"/, + e: /"/ + }, { + b: /`/, + e: /`/ + }, { + b: "%[qQwWx]?\\(", + e: "\\)" + }, { + b: "%[qQwWx]?\\[", + e: "\\]" + }, { + b: "%[qQwWx]?{", + e: "}" + }, { + b: "%[qQwWx]?<", + e: ">" + }, { + b: "%[qQwWx]?/", + e: "/" + }, { + b: "%[qQwWx]?%", + e: "%" + }, { + b: "%[qQwWx]?-", + e: "-" + }, { + b: "%[qQwWx]?\\|", + e: "\\|" + }, { + b: /\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/ + }, { + b: /<<(-?)\w+$/, + e: /^\s*\w+$/ + }] + }, + i = { + cN: "params", + b: "\\(", + e: "\\)", + endsParent: !0, + k: r + }, + d = [t, a, { + cN: "class", + bK: "class module", + e: "$|;", + i: /=/, + c: [e.inherit(e.TM, { + b: "[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?" + }), { + b: "<\\s*", + c: [{ + b: "(" + e.IR + "::)?" + e.IR + }] + }].concat(s) }, { - b: "%[qQwWx]?\\[", - e: "\\]" + cN: "function", + bK: "def", + e: "$|;", + c: [e.inherit(e.TM, { + b: b + }), i].concat(s) }, { - b: "%[qQwWx]?{", - e: "}" + b: e.IR + "::" }, { - b: "%[qQwWx]?<", - e: ">" + cN: "symbol", + b: e.UIR + "(\\!|\\?)?:", + r: 0 }, { - b: "%[qQwWx]?/", - e: "/" + cN: "symbol", + b: ":(?!\\s)", + c: [t, { + b: b + }], + r: 0 }, { - b: "%[qQwWx]?%", - e: "%" + cN: "number", + b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", + r: 0 }, { - b: "%[qQwWx]?-", - e: "-" + b: "(\\$\\W)|((\\$|\\@\\@?)(\\w+))" }, { - b: "%[qQwWx]?\\|", - e: "\\|" + cN: "params", + b: /\|/, + e: /\|/, + k: r }, { - b: /\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/ + b: "(" + e.RSR + "|unless)\\s*", + k: "unless", + c: [a, { + cN: "regexp", + c: [e.BE, n], + i: /\n/, + v: [{ + b: "/", + e: "/[a-z]*" + }, { + b: "%r{", + e: "}[a-z]*" + }, { + b: "%r\\(", + e: "\\)[a-z]*" + }, { + b: "%r!", + e: "![a-z]*" + }, { + b: "%r\\[", + e: "\\][a-z]*" + }] + }].concat(s), + r: 0 + }].concat(s); + n.c = d, + i.c = d; + var l = "[>?]>", + o = "[\\w#]+\\(\\w+\\):\\d+:\\d+>", + u = "(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>", + w = [{ + b: /^\s*=>/, + starts: { + e: "$", + c: d + } }, { - b: /<<(-?)\w+$/, - e: /^\s*\w+$/ - }] - } - , i = { - cN: "params", - b: "\\(", - e: "\\)", - endsParent: !0, - k: r - } - , d = [t, a, { - cN: "class", - bK: "class module", - e: "$|;", - i: /=/, - c: [e.inherit(e.TM, { - b: "[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?" - }), { - b: "<\\s*", - c: [{ - b: "(" + e.IR + "::)?" + e.IR - }] - }].concat(s) - }, { - cN: "function", - bK: "def", - e: "$|;", - c: [e.inherit(e.TM, { - b: b - }), i].concat(s) - }, { - b: e.IR + "::" - }, { - cN: "symbol", - b: e.UIR + "(\\!|\\?)?:", - r: 0 - }, { - cN: "symbol", - b: ":(?!\\s)", - c: [t, { - b: b - }], - r: 0 - }, { - cN: "number", - b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", - r: 0 - }, { - b: "(\\$\\W)|((\\$|\\@\\@?)(\\w+))" - }, { - cN: "params", - b: /\|/, - e: /\|/, - k: r - }, { - b: "(" + e.RSR + "|unless)\\s*", - k: "unless", - c: [a, { - cN: "regexp", - c: [e.BE, n], - i: /\n/, - v: [{ - b: "/", - e: "/[a-z]*" - }, { - b: "%r{", - e: "}[a-z]*" - }, { - b: "%r\\(", - e: "\\)[a-z]*" - }, { - b: "%r!", - e: "![a-z]*" - }, { - b: "%r\\[", - e: "\\][a-z]*" - }] - }].concat(s), - r: 0 - }].concat(s); - n.c = d, - i.c = d; - var l = "[>?]>" - , o = "[\\w#]+\\(\\w+\\):\\d+:\\d+>" - , u = "(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>" - , w = [{ - b: /^\s*=>/, - starts: { - e: "$", - c: d - } - }, { - cN: "meta", - b: "^(" + l + "|" + o + "|" + u + ")", - starts: { - e: "$", - c: d - } - }]; + cN: "meta", + b: "^(" + l + "|" + o + "|" + u + ")", + starts: { + e: "$", + c: d + } + }]; return { aliases: ["rb", "gemspec", "podspec", "thor", "irb"], k: r, @@ -7345,19 +7571,22 @@ hljs.registerLanguage("ruby", function(e) { }); /*! line-number */ -!function(n, e) { +! function (n, e) { "use strict"; + function t() { var n = e.createElement("style"); n.type = "text/css", - n.innerHTML = h(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}", [f, m, j]), - e.getElementsByTagName("head")[0].appendChild(n) + n.innerHTML = h(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}", [f, m, j]), + e.getElementsByTagName("head")[0].appendChild(n) } + function r(t) { - "complete" === e.readyState ? l(t) : n.addEventListener("DOMContentLoaded", function() { + "complete" === e.readyState ? l(t) : n.addEventListener("DOMContentLoaded", function () { l(t) }) } + function l(t) { try { var r = e.querySelectorAll("code.hljs"); @@ -7367,28 +7596,31 @@ hljs.registerLanguage("ruby", function(e) { n.console.error("LineNumbers error: ", o) } } + function i(n, e) { if ("object" == typeof n) { e = e || { singleLine: !1 }; var t = e.singleLine ? 0 : 1; - u(function() { + u(function () { s(n), - n.innerHTML = o(n.innerHTML, t) + n.innerHTML = o(n.innerHTML, t) }) } } + function o(n, e) { var t = c(n); if ("" === t[t.length - 1].trim() && t.pop(), - t.length > e) { + t.length > e) { for (var r = "", l = 0, i = t.length; l < i; l++) r += h('
    {6}
    ', [v, g, m, j, p, l + 1, t[l].length > 0 ? t[l] : " "]); return h('{1}
    ', [f, r]) } return n } + function s(n) { var e = n.childNodes; for (var t in e) @@ -7397,6 +7629,7 @@ hljs.registerLanguage("ruby", function(e) { d(r.textContent) > 0 && (r.childNodes.length > 0 ? s(r) : a(r.parentNode)) } } + function a(n) { var e = n.className; if (/hljs-/.test(e)) { @@ -7405,70 +7638,81 @@ hljs.registerLanguage("ruby", function(e) { n.innerHTML = l.trim() } } + function c(n) { return 0 === n.length ? [] : n.split(L) } + function d(n) { return (n.trim().match(L) || []).length } + function u(e) { n.setTimeout(e, 0) } + function h(n, e) { - return n.replace(/\{(\d+)\}/g, function(n, t) { + return n.replace(/\{(\d+)\}/g, function (n, t) { return e[t] ? e[t] : n }) } - var f = "hljs-ln" - , g = "hljs-ln-line" - , p = "hljs-ln-code" - , v = "hljs-ln-numbers" - , m = "hljs-ln-n" - , j = "data-line-number" - , L = /\r\n|\r|\n/g; + var f = "hljs-ln", + g = "hljs-ln-line", + p = "hljs-ln-code", + v = "hljs-ln-numbers", + m = "hljs-ln-n", + j = "data-line-number", + L = /\r\n|\r|\n/g; n.hljs ? (n.hljs.initLineNumbersOnLoad = r, - n.hljs.lineNumbersBlock = i, - t()) : n.console.error("highlight.js not detected!") + n.hljs.lineNumbersBlock = i, + t()) : n.console.error("highlight.js not detected!") }(window, document); -!function(n, e) { +! function (n, e) { "function" == typeof define && define.amd ? define(e) : "object" == typeof exports ? module.exports = e() : n.NProgress = e() -}(this, function() { +}(this, function () { function n(n, e, t) { return e > n ? e : n > t ? t : n } + function e(n) { return 100 * (-1 + n) } + function t(n, t, r) { var i; return i = "translate3d" === c.positionUsing ? { - transform: "translate3d(" + e(n) + "%,0,0)" - } : "translate" === c.positionUsing ? { - transform: "translate(" + e(n) + "%,0)" - } : { - "margin-left": e(n) + "%" - }, - i.transition = "all " + t + "ms " + r, - i + transform: "translate3d(" + e(n) + "%,0,0)" + } : "translate" === c.positionUsing ? { + transform: "translate(" + e(n) + "%,0)" + } : { + "margin-left": e(n) + "%" + }, + i.transition = "all " + t + "ms " + r, + i } + function r(n, e) { var t = "string" == typeof n ? n : o(n); return t.indexOf(" " + e + " ") >= 0 } + function i(n, e) { - var t = o(n) - , i = t + e; + var t = o(n), + i = t + e; r(t, e) || (n.className = i.substring(1)) } + function s(n, e) { var t, i = o(n); r(n, e) && (t = i.replace(" " + e + " ", " "), - n.className = t.substring(1, t.length - 1)) + n.className = t.substring(1, t.length - 1)) } + function o(n) { return (" " + (n.className || "") + " ").replace(/\s+/gi, " ") } + function a(n) { n && n.parentNode && n.parentNode.removeChild(n) } @@ -7488,175 +7732,169 @@ hljs.registerLanguage("ruby", function(e) { parent: "body", template: '
    ' }; - u.configure = function(n) { - var e, t; - for (e in n) - t = n[e], - void 0 !== t && n.hasOwnProperty(e) && (c[e] = t); - return this - } - , - u.status = null, - u.set = function(e) { - var r = u.isStarted(); - e = n(e, c.minimum, 1), - u.status = 1 === e ? null : e; - var i = u.render(!r) - , s = i.querySelector(c.barSelector) - , o = c.speed - , a = c.easing; - return i.offsetWidth, - l(function(n) { - "" === c.positionUsing && (c.positionUsing = u.getPositioningCSS()), - f(s, t(e, o, a)), - 1 === e ? (f(i, { - transition: "none", - opacity: 1 - }), - i.offsetWidth, - setTimeout(function() { - f(i, { - transition: "all " + o + "ms linear", - opacity: 0 + u.configure = function (n) { + var e, t; + for (e in n) + t = n[e], + void 0 !== t && n.hasOwnProperty(e) && (c[e] = t); + return this + }, + u.status = null, + u.set = function (e) { + var r = u.isStarted(); + e = n(e, c.minimum, 1), + u.status = 1 === e ? null : e; + var i = u.render(!r), + s = i.querySelector(c.barSelector), + o = c.speed, + a = c.easing; + return i.offsetWidth, + l(function (n) { + "" === c.positionUsing && (c.positionUsing = u.getPositioningCSS()), + f(s, t(e, o, a)), + 1 === e ? (f(i, { + transition: "none", + opacity: 1 + }), + i.offsetWidth, + setTimeout(function () { + f(i, { + transition: "all " + o + "ms linear", + opacity: 0 + }), + setTimeout(function () { + u.remove(), + n() + }, o) + }, o)) : setTimeout(n, o) }), - setTimeout(function() { - u.remove(), - n() - }, o) - }, o)) : setTimeout(n, o) - }), - this - } - , - u.isStarted = function() { - return "number" == typeof u.status - } - , - u.start = function() { - u.status || u.set(0); - var n = function() { - setTimeout(function() { - u.status && (u.trickle(), - n()) - }, c.trickleSpeed) + this + }, + u.isStarted = function () { + return "number" == typeof u.status + }, + u.start = function () { + u.status || u.set(0); + var n = function () { + setTimeout(function () { + u.status && (u.trickle(), + n()) + }, c.trickleSpeed) + }; + return c.trickle && n(), + this + }, + u.done = function (n) { + return n || u.status ? u.inc(.3 + .5 * Math.random()).set(1) : this + }, + u.inc = function (e) { + var t = u.status; + return t ? ("number" != typeof e && (e = (1 - t) * n(Math.random() * t, .1, .95)), + t = n(t + e, 0, .994), + u.set(t)) : u.start() + }, + u.trickle = function () { + return u.inc(Math.random() * c.trickleRate) + }, + function () { + var n = 0, + e = 0; + u.promise = function (t) { + return t && "resolved" !== t.state() ? (0 === e && u.start(), + n++, + e++, + t.always(function () { + e--, + 0 === e ? (n = 0, + u.done()) : u.set((n - e) / n) + }), + this) : this + } + }(), + u.render = function (n) { + if (u.isRendered()) + return document.getElementById("nprogress"); + i(document.documentElement, "nprogress-busy"); + var t = document.createElement("div"); + t.id = "nprogress", + t.innerHTML = c.template; + var r, s = t.querySelector(c.barSelector), + o = n ? "-100" : e(u.status || 0), + l = document.querySelector(c.parent); + return f(s, { + transition: "all 0 linear", + transform: "translate3d(" + o + "%,0,0)" + }), + c.showSpinner || (r = t.querySelector(c.spinnerSelector), + r && a(r)), + l != document.body && i(l, "nprogress-custom-parent"), + l.appendChild(t), + t + }, + u.remove = function () { + s(document.documentElement, "nprogress-busy"), + s(document.querySelector(c.parent), "nprogress-custom-parent"); + var n = document.getElementById("nprogress"); + n && a(n) + }, + u.isRendered = function () { + return !!document.getElementById("nprogress") + }, + u.getPositioningCSS = function () { + var n = document.body.style, + e = "WebkitTransform" in n ? "Webkit" : "MozTransform" in n ? "Moz" : "msTransform" in n ? "ms" : "OTransform" in n ? "O" : ""; + return e + "Perspective" in n ? "translate3d" : e + "Transform" in n ? "translate" : "margin" }; - return c.trickle && n(), - this - } - , - u.done = function(n) { - return n || u.status ? u.inc(.3 + .5 * Math.random()).set(1) : this - } - , - u.inc = function(e) { - var t = u.status; - return t ? ("number" != typeof e && (e = (1 - t) * n(Math.random() * t, .1, .95)), - t = n(t + e, 0, .994), - u.set(t)) : u.start() - } - , - u.trickle = function() { - return u.inc(Math.random() * c.trickleRate) - } - , - function() { - var n = 0 - , e = 0; - u.promise = function(t) { - return t && "resolved" !== t.state() ? (0 === e && u.start(), - n++, - e++, - t.always(function() { - e--, - 0 === e ? (n = 0, - u.done()) : u.set((n - e) / n) - }), - this) : this - } - }(), - u.render = function(n) { - if (u.isRendered()) - return document.getElementById("nprogress"); - i(document.documentElement, "nprogress-busy"); - var t = document.createElement("div"); - t.id = "nprogress", - t.innerHTML = c.template; - var r, s = t.querySelector(c.barSelector), o = n ? "-100" : e(u.status || 0), l = document.querySelector(c.parent); - return f(s, { - transition: "all 0 linear", - transform: "translate3d(" + o + "%,0,0)" - }), - c.showSpinner || (r = t.querySelector(c.spinnerSelector), - r && a(r)), - l != document.body && i(l, "nprogress-custom-parent"), - l.appendChild(t), - t - } - , - u.remove = function() { - s(document.documentElement, "nprogress-busy"), - s(document.querySelector(c.parent), "nprogress-custom-parent"); - var n = document.getElementById("nprogress"); - n && a(n) - } - , - u.isRendered = function() { - return !!document.getElementById("nprogress") - } - , - u.getPositioningCSS = function() { - var n = document.body.style - , e = "WebkitTransform"in n ? "Webkit" : "MozTransform"in n ? "Moz" : "msTransform"in n ? "ms" : "OTransform"in n ? "O" : ""; - return e + "Perspective"in n ? "translate3d" : e + "Transform"in n ? "translate" : "margin" - } - ; - var l = function() { - function n() { - var t = e.shift(); - t && t(n) - } - var e = []; - return function(t) { - e.push(t), - 1 == e.length && n() - } - }() - , f = function() { - function n(n) { - return n.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(n, e) { - return e.toUpperCase() - }) - } - function e(n) { - var e = document.body.style; - if (n in e) - return n; - for (var t, r = i.length, s = n.charAt(0).toUpperCase() + n.slice(1); r--; ) - if (t = i[r] + s, - t in e) - return t; - return n - } - function t(t) { - return t = n(t), - s[t] || (s[t] = e(t)) - } - function r(n, e, r) { - e = t(e), - n.style[e] = r - } - var i = ["Webkit", "O", "Moz", "ms"] - , s = {}; - return function(n, e) { - var t, i, s = arguments; - if (2 == s.length) - for (t in e) - i = e[t], - void 0 !== i && e.hasOwnProperty(t) && r(n, t, i); - else - r(n, s[1], s[2]) - } - }(); + var l = function () { + function n() { + var t = e.shift(); + t && t(n) + } + var e = []; + return function (t) { + e.push(t), + 1 == e.length && n() + } + }(), + f = function () { + function n(n) { + return n.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function (n, e) { + return e.toUpperCase() + }) + } + + function e(n) { + var e = document.body.style; + if (n in e) + return n; + for (var t, r = i.length, s = n.charAt(0).toUpperCase() + n.slice(1); r--;) + if (t = i[r] + s, + t in e) + return t; + return n + } + + function t(t) { + return t = n(t), + s[t] || (s[t] = e(t)) + } + + function r(n, e, r) { + e = t(e), + n.style[e] = r + } + var i = ["Webkit", "O", "Moz", "ms"], + s = {}; + return function (n, e) { + var t, i, s = arguments; + if (2 == s.length) + for (t in e) + i = e[t], + void 0 !== i && e.hasOwnProperty(t) && r(n, t, i); + else + r(n, s[1], s[2]) + } + }(); return u }); @@ -7669,10 +7907,10 @@ hljs.registerLanguage("ruby", function(e) { exports["POWERMODE"] = factory(); else root["POWERMODE"] = factory(); -} -)(this, function() { - return (function(modules) { +})(this, function () { + return (function (modules) { var installedModules = {}; + function __webpack_require__(moduleId) { if (installedModules[moduleId]) return installedModules[moduleId].exports; @@ -7689,14 +7927,13 @@ hljs.registerLanguage("ruby", function(e) { __webpack_require__.c = installedModules; __webpack_require__.p = ""; return __webpack_require__(0); - } - )([(function(module, exports, __webpack_require__) { + })([(function (module, exports, __webpack_require__) { 'use strict'; var canvas = document.createElement('canvas'); canvas.width = window.innerWidth; canvas.height = window.innerHeight; canvas.style.cssText = 'position:fixed;top:0;left:0;pointer-events:none;z-index:999999'; - window.addEventListener('resize', function() { + window.addEventListener('resize', function () { canvas.width = window.innerWidth; canvas.height = window.innerHeight; }); @@ -7706,9 +7943,11 @@ hljs.registerLanguage("ruby", function(e) { var particlePointer = 0; var rendering = false; POWERMODE.shake = true; + function getRandom(min, max) { return Math.random() * (max - min) + min; } + function getColor(el) { if (POWERMODE.colorful) { var u = getRandom(0, 360); @@ -7717,6 +7956,7 @@ hljs.registerLanguage("ruby", function(e) { return window.getComputedStyle(el).color; } } + function getCaret() { var el = document.activeElement; var bcr; @@ -7749,6 +7989,7 @@ hljs.registerLanguage("ruby", function(e) { color: 'transparent' }; } + function createParticle(x, y, color) { return { x: x, @@ -7761,6 +8002,7 @@ hljs.registerLanguage("ruby", function(e) { } }; } + function POWERMODE() { { var caret = getCaret(); @@ -7769,15 +8011,14 @@ hljs.registerLanguage("ruby", function(e) { particles[particlePointer] = createParticle(caret.x, caret.y, caret.color); particlePointer = (particlePointer + 1) % 500; } - } - { + } { if (POWERMODE.shake) { var intensity = 1 + 2 * Math.random(); var x = intensity * (Math.random() > 0.5 ? -1 : 1); var y = intensity * (Math.random() > 0.5 ? -1 : 1); document.body.style.marginLeft = x + 'px'; document.body.style.marginTop = y + 'px'; - setTimeout(function() { + setTimeout(function () { document.body.style.marginLeft = ''; document.body.style.marginTop = ''; }, 75); @@ -7786,8 +8027,9 @@ hljs.registerLanguage("ruby", function(e) { if (!rendering) { requestAnimationFrame(loop); } - } - ;POWERMODE.colorful = false; + }; + POWERMODE.colorful = false; + function loop() { rendering = true; context.clearRect(0, 0, canvas.width, canvas.height); @@ -7813,11 +8055,11 @@ hljs.registerLanguage("ruby", function(e) { } } module.exports = POWERMODE; - } - ), (function(module, exports) { - (function() { + }), (function (module, exports) { + (function () { var properties = ['direction', 'boxSizing', 'width', 'height', 'overflowX', 'overflowY', 'borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth', 'borderStyle', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'fontStyle', 'fontVariant', 'fontWeight', 'fontStretch', 'fontSize', 'fontSizeAdjust', 'lineHeight', 'fontFamily', 'textAlign', 'textTransform', 'textIndent', 'textDecoration', 'letterSpacing', 'wordSpacing', 'tabSize', 'MozTabSize']; var isFirefox = window.mozInnerScreenX != null; + function getCaretCoordinates(element, position, options) { var debug = options && options.debug || false; if (debug) { @@ -7837,7 +8079,7 @@ hljs.registerLanguage("ruby", function(e) { style.position = 'absolute'; if (!debug) style.visibility = 'hidden'; - properties.forEach(function(prop) { + properties.forEach(function (prop) { style[prop] = computed[prop]; }); if (isFirefox) { @@ -7869,96 +8111,94 @@ hljs.registerLanguage("ruby", function(e) { window.getCaretCoordinates = getCaretCoordinates; } }()); - } - )]) + })]) }); -!function(t, e) { +! function (t, e) { "object" == typeof exports ? module.exports = e(t) : "function" == typeof define && define.amd ? define([], e(t)) : t.LazyLoad = e(t) -}("undefined" != typeof global ? global : this.window || this.global, function(t) { +}("undefined" != typeof global ? global : this.window || this.global, function (t) { "use strict"; + function e(t, e) { this.settings = r(s, e || {}), - this.images = t || document.querySelectorAll(this.settings.selector), - this.observer = null, - this.init() + this.images = t || document.querySelectorAll(this.settings.selector), + this.observer = null, + this.init() } const s = { - src: "data-src", - srcset: "data-srcset", - selector: ".lazyload" - } - , r = function() { - let t = {} - , e = !1 - , s = 0 - , o = arguments.length; - "[object Boolean]" === Object.prototype.toString.call(arguments[0]) && (e = arguments[0], - s++); - for (; s < o; s++) - !function(s) { - for (let o in s) - Object.prototype.hasOwnProperty.call(s, o) && (e && "[object Object]" === Object.prototype.toString.call(s[o]) ? t[o] = r(!0, t[o], s[o]) : t[o] = s[o]) - }(arguments[s]); - return t - }; + src: "data-src", + srcset: "data-srcset", + selector: ".lazyload" + }, + r = function () { + let t = {}, + e = !1, + s = 0, + o = arguments.length; + "[object Boolean]" === Object.prototype.toString.call(arguments[0]) && (e = arguments[0], + s++); + for (; s < o; s++) + ! function (s) { + for (let o in s) + Object.prototype.hasOwnProperty.call(s, o) && (e && "[object Object]" === Object.prototype.toString.call(s[o]) ? t[o] = r(!0, t[o], s[o]) : t[o] = s[o]) + }(arguments[s]); + return t + }; if (e.prototype = { - init: function() { - if (!t.IntersectionObserver) - return void this.loadImages(); - let e = this - , s = { - root: null, - rootMargin: "0px", - threshold: [0] - }; - this.observer = new IntersectionObserver(function(t) { - t.forEach(function(t) { - if (t.intersectionRatio > 0) { - e.observer.unobserve(t.target); - let s = t.target.getAttribute(e.settings.src) - , r = t.target.getAttribute(e.settings.srcset); - "img" === t.target.tagName.toLowerCase() ? (s && (t.target.src = s), - r && (t.target.srcset = r)) : t.target.style.backgroundImage = "url(" + s + ")" - } + init: function () { + if (!t.IntersectionObserver) + return void this.loadImages(); + let e = this, + s = { + root: null, + rootMargin: "0px", + threshold: [0] + }; + this.observer = new IntersectionObserver(function (t) { + t.forEach(function (t) { + if (t.intersectionRatio > 0) { + e.observer.unobserve(t.target); + let s = t.target.getAttribute(e.settings.src), + r = t.target.getAttribute(e.settings.srcset); + "img" === t.target.tagName.toLowerCase() ? (s && (t.target.src = s), + r && (t.target.srcset = r)) : t.target.style.backgroundImage = "url(" + s + ")" + } + }) + }, s), + this.images.forEach(function (t) { + e.observer.observe(t) + }) + }, + loadAndDestroy: function () { + this.settings && (this.loadImages(), + this.destroy()) + }, + loadImages: function () { + if (!this.settings) + return; + let t = this; + this.images.forEach(function (e) { + let s = e.getAttribute(t.settings.src), + r = e.getAttribute(t.settings.srcset); + "img" === e.tagName.toLowerCase() ? (s && (e.src = s), + r && (e.srcset = r)) : e.style.backgroundImage = "url(" + s + ")" }) + }, + destroy: function () { + this.settings && (this.observer.disconnect(), + this.settings = null) } - ,s), - this.images.forEach(function(t) { - e.observer.observe(t) - }) - }, - loadAndDestroy: function() { - this.settings && (this.loadImages(), - this.destroy()) }, - loadImages: function() { - if (!this.settings) - return; - let t = this; - this.images.forEach(function(e) { - let s = e.getAttribute(t.settings.src) - , r = e.getAttribute(t.settings.srcset); - "img" === e.tagName.toLowerCase() ? (s && (e.src = s), - r && (e.srcset = r)) : e.style.backgroundImage = "url(" + s + ")" - }) + t.lazyload = function (t, s) { + return new e(t, s) }, - destroy: function() { - this.settings && (this.observer.disconnect(), - this.settings = null) - } - }, - t.lazyload = function(t, s) { - return new e(t,s) - } - , - t.jQuery) { + t.jQuery) { const s = t.jQuery; - s.fn.lazyload = function(t) { + s.fn.lazyload = function (t) { return t = t || {}, - t.attribute = t.attribute || "data-src", - new e(s.makeArray(this),t), - this + t.attribute = t.attribute || "data-src", + new e(s.makeArray(this), t), + this } } return e @@ -7970,103 +8210,111 @@ hljs.registerLanguage("ruby", function(e) { * 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 < e.length; i++) { - var n = e[i]; - n.enumerable = n.enumerable || !1, - n.configurable = !0, - "value"in n && (n.writable = !0), - Object.defineProperty(t, n.key, 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 < e.length; i++) { + var n = e[i]; + n.enumerable = n.enumerable || !1, + n.configurable = !0, + "value" in n && (n.writable = !0), + Object.defineProperty(t, n.key, n) + } } - } - return function(e, i, n) { - return i && t(e.prototype, i), - n && t(e, n), - e - } -}(); + return function (e, i, n) { + return i && t(e.prototype, i), + n && t(e, n), + e + } + }(); + function _possibleConstructorReturn(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !e || "object" != typeof e && "function" != typeof e ? t : e } + function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - enumerable: !1, - writable: !0, - configurable: !0 - } - }), - e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e) + constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), + e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e) } + function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } -window.cash = function() { - var t = document - , e = window - , i = Array.prototype - , n = i.slice - , s = i.filter - , o = i.push - , a = function() {} - , r = function(t) { - return "function" == typeof t && t.call - } - , l = function(t) { - return "string" == typeof t - } - , h = /^#[\w-]*$/ - , d = /^\.[\w-]*$/ - , u = /<.+>/ - , c = /^\w+$/; +window.cash = function () { + var t = document, + e = window, + i = Array.prototype, + n = i.slice, + s = i.filter, + o = i.push, + a = function () {}, + r = function (t) { + return "function" == typeof t && t.call + }, + l = function (t) { + return "string" == typeof t + }, + h = /^#[\w-]*$/, + d = /^\.[\w-]*$/, + u = /<.+>/, + 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) + v.head.appendChild(i) } return v.body.innerHTML = e, - v.body.childNodes + 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; + 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; + this; if (!o) return this; if (o.nodeType || o === e) @@ -8077,8 +8325,9 @@ window.cash = function() { this[a] = o[a]; return this } + function _(t, e) { - return new g(t,e) + return new g(t, e) } var y = _.fn = _.prototype = g.prototype = { cash: !0, @@ -8089,87 +8338,93 @@ window.cash = function() { init: g }; Object.defineProperty(y, "constructor", { - value: _ - }), - _.parseHTML = f, - _.noop = a, - _.isFunction = r, - _.isString = l, - _.extend = y.extend = function(t) { - t = t || {}; - var e = n.call(arguments) - , i = e.length - , s = 1; - for (1 === e.length && (t = this, - s = 0); s < i; s++) - if (e[s]) - for (var o in e[s]) - e[s].hasOwnProperty(o) && (t[o] = e[s][o]); - return t - } - ; + value: _ + }), + _.parseHTML = f, + _.noop = a, + _.isFunction = r, + _.isString = l, + _.extend = y.extend = function (t) { + t = t || {}; + var e = n.call(arguments), + i = e.length, + s = 1; + for (1 === e.length && (t = this, + s = 0); s < i; s++) + if (e[s]) + for (var o in e[s]) + e[s].hasOwnProperty(o) && (t[o] = e[s][o]); + return t + }; + function k(t, e) { for (var i = t.length, n = 0; n < i && !1 !== e.call(t[n], t[n], n, t); n++) - ; + ; } + function b(t, e) { var i = t && (t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.msMatchesSelector || t.oMatchesSelector); return !!i && i.call(t, e) } + function w(t) { - return l(t) ? b : t.cash ? function(e) { - return t.is(e) - } - : function(t, e) { - return t === e - } + return l(t) ? b : t.cash ? function (e) { + return t.is(e) + } : + function (t, e) { + return t === e + } } + function C(t) { - return _(n.call(t).filter(function(t, e, i) { + return _(n.call(t).filter(function (t, e, i) { return i.indexOf(t) === e })) } _.extend({ - merge: function(t, e) { + merge: function (t, e) { for (var i = +e.length, n = t.length, s = 0; s < i; n++, - s++) + s++) t[n] = e[s]; return t.length = n, - t + t }, each: k, matches: b, unique: C, isArray: Array.isArray, - isNumeric: function(t) { + isNumeric: function (t) { return !isNaN(parseFloat(t)) && isFinite(t) } }); var E = _.uid = "_cash" + Date.now(); + function M(t) { return t[E] = t[E] || {} } + function x(t, e, i) { return M(t)[e] = i } + function L(t, e) { var i = M(t); return void 0 === i[e] && (i[e] = t.dataset ? t.dataset[e] : _(t).attr("data-" + e)), - i[e] + i[e] } y.extend({ - data: function(t, e) { + data: function (t, e) { if (l(t)) - return void 0 === e ? L(this[0], t) : this.each(function(i) { + return void 0 === e ? L(this[0], t) : this.each(function (i) { return x(i, t, e) }); for (var i in t) this.data(i, t[i]); return this }, - removeData: function(t) { - return this.each(function(e) { - return function(t, e) { + removeData: function (t) { + return this.each(function (e) { + return function (t, e) { var i = M(t); i ? delete i[e] : t.dataset ? delete t.dataset[e] : _(t).removeAttr("data-" + name) }(e, t) @@ -8177,196 +8432,201 @@ window.cash = function() { } }); var T = /\S+/g; + function O(t) { return l(t) && t.match(T) } + function $(t, e) { - return t.classList ? t.classList.contains(e) : new RegExp("(^| )" + e + "( |$)","gi").test(t.className) + return t.classList ? t.classList.contains(e) : new RegExp("(^| )" + e + "( |$)", "gi").test(t.className) } + function D(t, e, i) { t.classList ? t.classList.add(e) : i.indexOf(" " + e + " ") && (t.className += " " + e) } + function B(t, e) { t.classList ? t.classList.remove(e) : t.className = t.className.replace(e, "") } y.extend({ - addClass: function(t) { - var e = O(t); - return e ? this.each(function(t) { - var i = " " + t.className + " "; - k(e, function(e) { - D(t, e, i) - }) - }) : this - }, - attr: function(t, e) { - if (t) { + addClass: function (t) { + var e = O(t); + return e ? this.each(function (t) { + var i = " " + t.className + " "; + k(e, function (e) { + D(t, e, i) + }) + }) : this + }, + attr: function (t, e) { + if (t) { + if (l(t)) + return void 0 === e ? this[0] ? this[0].getAttribute ? this[0].getAttribute(t) : this[0][t] : void 0 : this.each(function (i) { + i.setAttribute ? i.setAttribute(t, e) : i[t] = e + }); + for (var i in t) + this.attr(i, t[i]); + return this + } + }, + hasClass: function (t) { + var e = !1, + i = O(t); + return i && i.length && this.each(function (t) { + return !(e = $(t, i[0])) + }), + e + }, + prop: function (t, e) { if (l(t)) - return void 0 === e ? this[0] ? this[0].getAttribute ? this[0].getAttribute(t) : this[0][t] : void 0 : this.each(function(i) { - i.setAttribute ? i.setAttribute(t, e) : i[t] = e + return void 0 === e ? this[0][t] : this.each(function (i) { + i[t] = e }); for (var i in t) - this.attr(i, t[i]); + this.prop(i, t[i]); return this - } - }, - hasClass: function(t) { - var e = !1 - , i = O(t); - return i && i.length && this.each(function(t) { - return !(e = $(t, i[0])) - }), - e - }, - prop: function(t, e) { - if (l(t)) - return void 0 === e ? this[0][t] : this.each(function(i) { - i[t] = e - }); - for (var i in t) - this.prop(i, t[i]); - return this - }, - removeAttr: function(t) { - return this.each(function(e) { - e.removeAttribute ? e.removeAttribute(t) : delete e[t] - }) - }, - removeClass: function(t) { - if (!arguments.length) - return this.attr("class", ""); - var e = O(t); - return e ? this.each(function(t) { - k(e, function(e) { - B(t, e) + }, + removeAttr: function (t) { + return this.each(function (e) { + e.removeAttribute ? e.removeAttribute(t) : delete e[t] }) - }) : this - }, - removeProp: function(t) { - return this.each(function(e) { - delete e[t] - }) - }, - toggleClass: function(t, e) { - if (void 0 !== e) - return this[e ? "addClass" : "removeClass"](t); - var i = O(t); - return i ? this.each(function(t) { - var e = " " + t.className + " "; - k(i, function(i) { - $(t, i) ? B(t, i) : D(t, i, e) + }, + removeClass: function (t) { + if (!arguments.length) + return this.attr("class", ""); + var e = O(t); + return e ? this.each(function (t) { + k(e, function (e) { + B(t, e) + }) + }) : this + }, + removeProp: function (t) { + return this.each(function (e) { + delete e[t] }) - }) : this - } - }), - y.extend({ - add: function(t, e) { - return C(_.merge(this, _(t, e))) - }, - each: function(t) { - return k(this, t), - this - }, - eq: function(t) { - return _(this.get(t)) - }, - filter: function(t) { - if (!t) - return this; - var e = r(t) ? t : w(t); - return _(s.call(this, function(i) { - return e(i, t) - })) - }, - first: function() { - return this.eq(0) - }, - get: function(t) { - return void 0 === t ? n.call(this) : t < 0 ? this[t + this.length] : this[t] - }, - index: function(t) { - var e = t ? _(t)[0] : this[0] - , i = t ? this : _(e).parent().children(); - return n.call(i).indexOf(e) - }, - last: function() { - return this.eq(-1) - } - }); - var I = function() { - var t = /(?:^\w|[A-Z]|\b\w)/g - , e = /[\s-_]+/g; - return function(i) { - return i.replace(t, function(t, e) { - return t[0 === e ? "toLowerCase" : "toUpperCase"]() - }).replace(e, "") - } - }() - , S = function() { - var t = {} - , e = document - , i = e.createElement("div") - , n = i.style; - return function(e) { - if (e = I(e), - t[e]) - return t[e]; - var i = e.charAt(0).toUpperCase() + e.slice(1) - , s = (e + " " + ["webkit", "moz", "ms", "o"].join(i + " ") + i).split(" "); - return k(s, function(i) { - if (i in n) - return t[i] = e = t[e] = i, - !1 - }), - t[e] - } - }(); - _.prefixedProp = S, - _.camelCase = I, - y.extend({ - css: function(t, i) { - if (l(t)) - return t = S(t), - arguments.length > 1 ? 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) { + }, + toggleClass: function (t, e) { + if (void 0 !== e) + return this[e ? "addClass" : "removeClass"](t); + var i = O(t); + return i ? this.each(function (t) { + var e = " " + t.className + " "; + k(i, function (i) { + $(t, i) ? B(t, i) : D(t, i, e) + }) + }) : this + } + }), + y.extend({ + add: function (t, e) { + return C(_.merge(this, _(t, e))) + }, + each: function (t) { + return k(this, t), + this + }, + eq: function (t) { + return _(this.get(t)) + }, + filter: function (t) { + if (!t) + return this; + var e = r(t) ? t : w(t); + return _(s.call(this, function (i) { + return e(i, t) + })) + }, + first: function () { + return this.eq(0) + }, + get: function (t) { + return void 0 === t ? n.call(this) : t < 0 ? this[t + this.length] : this[t] + }, + index: function (t) { + var e = t ? _(t)[0] : this[0], + i = t ? this : _(e).parent().children(); + return n.call(i).indexOf(e) + }, + last: function () { + return this.eq(-1) + } + }); + var I = function () { + var t = /(?:^\w|[A-Z]|\b\w)/g, + e = /[\s-_]+/g; + return function (i) { + return i.replace(t, function (t, e) { + return t[0 === e ? "toLowerCase" : "toUpperCase"]() + }).replace(e, "") + } + }(), + S = function () { + var t = {}, + e = document, + i = e.createElement("div"), + n = i.style; + return function (e) { + if (e = I(e), + t[e]) + return t[e]; + var i = e.charAt(0).toUpperCase() + e.slice(1), + s = (e + " " + ["webkit", "moz", "ms", "o"].join(i + " ") + i).split(" "); + return k(s, function (i) { + if (i in n) + return t[i] = e = t[e] = i, + !1 + }), + t[e] + } + }(); + _.prefixedProp = S, + _.camelCase = I, + y.extend({ + css: function (t, i) { + if (l(t)) + return t = S(t), + arguments.length > 1 ? 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) - } + 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]; + 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 = [])) + (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) { + off: function (t, e) { + return this.each(function (i) { return R(i, t, e) }) }, - on: function(t, e, i, n) { + on: function (t, e, i, n) { var s; if (!l(t)) { for (var o in t) @@ -8374,6971 +8634,7027 @@ window.cash = function() { 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) - })) + 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) { + one: function (t, e, i) { return this.on(t, e, i, !0) }, ready: m, - trigger: function(t, e) { + 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) - }) + 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 + 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() { + 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)) + 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) + }), + t.substr(1) }, - val: function(t) { - return void 0 === t ? P(this[0]) : this.each(function(e) { + 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) { + 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) { + after: function (t) { return _(t).insertAfter(this), - this + this }, - append: function(t) { + append: function (t) { return W(this, t), - this + this }, - appendTo: function(t) { + appendTo: function (t) { return W(_(t), this), - this + this }, - before: function(t) { + before: function (t) { return _(t).insertBefore(this), - this + this }, - clone: function() { - return _(this.map(function(t) { + clone: function () { + return _(this.map(function (t) { return t.cloneNode(!0) })) }, - empty: function() { + empty: function () { return this.html(""), - this + this }, - html: function(t) { + 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 this.each(function (t) { return t.innerHTML = e }) }, - insertAfter: function(t) { + 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 + 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) { + 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 + 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) { + prepend: function (t) { return W(this, t, !0), - this + this }, - prependTo: function(t) { + prependTo: function (t) { return W(_(t), this, !0), - this + this }, - remove: function() { - return this.each(function(t) { + 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) { + 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 + 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) } - : function(e) { - return e.contains(t) + }), + 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 + }) } - ; - 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() { +var Component = function () { function t(e, i, n) { _classCallCheck(this, t), - i instanceof Element || console.error(Error(i + " is not an HTML Element")); + 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) + 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; o < e.length; o++) - s.push(new t(e[o],i)); - n = s + 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; o < e.length; o++) + s.push(new t(e[o], i)); + n = s + } + return n } - return n - } - }]), - t + }]), + t }(); -!function(t) { +! function (t) { t.Package ? M = {} : t.M = {}, - M.jQueryLoaded = !!t.jQuery + M.jQueryLoaded = !!t.jQuery }(window), -"function" == typeof define && define.amd ? define("M", [], function() { - return M -}) : "undefined" == typeof exports || exports.nodeType || ("undefined" != typeof module && !module.nodeType && module.exports && (exports = module.exports = M), -exports.default = M), -M.keys = { - TAB: 9, - ENTER: 13, - ESC: 27, - ARROW_UP: 38, - ARROW_DOWN: 40 -}, -M.tabPressed = !1; -var docHandleKeydown = function(t) { - t.which === M.keys.TAB && (M.tabPressed = !0) -} - , docHandleKeyup = function(t) { - t.which === M.keys.TAB && (M.tabPressed = !1) -}; +"function" == typeof define && define.amd ? define("M", [], function () { + return M + }) : "undefined" == typeof exports || exports.nodeType || ("undefined" != typeof module && !module.nodeType && module.exports && (exports = module.exports = M), + exports.default = M), + M.keys = { + TAB: 9, + ENTER: 13, + ESC: 27, + ARROW_UP: 38, + ARROW_DOWN: 40 + }, + M.tabPressed = !1; +var docHandleKeydown = function (t) { + t.which === M.keys.TAB && (M.tabPressed = !0) + }, + docHandleKeyup = function (t) { + t.which === M.keys.TAB && (M.tabPressed = !1) + }; document.addEventListener("keydown", docHandleKeydown), -document.addEventListener("keyup", docHandleKeyup), -M.initializeJqueryWrapper = function(t, e, i) { - jQuery.fn[e] = function(n) { - if (t.prototype[n]) { - var s = Array.prototype.slice.call(arguments, 1); - if ("get" === n.slice(0, 3)) { - var o = this.first()[0][i]; - return o[n].apply(o, s) + document.addEventListener("keyup", docHandleKeyup), + M.initializeJqueryWrapper = function (t, e, i) { + jQuery.fn[e] = function (n) { + if (t.prototype[n]) { + var s = Array.prototype.slice.call(arguments, 1); + if ("get" === n.slice(0, 3)) { + var o = this.first()[0][i]; + return o[n].apply(o, s) + } + return this.each(function () { + var t = this[i]; + t[n].apply(t, s) + }) } - return this.each(function() { - var t = this[i]; - t[n].apply(t, s) - }) + if ("object" == typeof n || !n) + return t.init(this, arguments[0]), + this; + jQuery.error("Method " + n + " does not exist on jQuery." + e) } - if ("object" == typeof n || !n) - return t.init(this, arguments[0]), - this; - jQuery.error("Method " + n + " does not exist on jQuery." + e) - } -} -, -M.objectSelectorString = function(t) { - return ((t.prop("tagName") || "") + (t.attr("id") || "") + (t.attr("class") || "")).replace(/\s/g, "") -} -, -M.guid = function() { - function t() { - return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1) - } - return function() { - return t() + t() + "-" + t() + "-" + t() + "-" + t() + "-" + t() + t() + t() - } -}(), -M.escapeHash = function(t) { - return t.replace(/(:|\.|\[|\]|,|=)/g, "\\$1") -} -, -M.elementOrParentIsFixed = function(t) { - var e = $(t) - , i = !1; - return e.add(e.parents()).each(function() { - if ("fixed" === $(this).css("position")) - return i = !0, - !1 - }), - i -} -, -M.checkWithinContainer = function(t, e, i) { - var n = { - top: !1, - right: !1, - bottom: !1, - left: !1 - } - , s = t.getBoundingClientRect() - , o = t.scrollLeft - , a = t.scrollTop - , r = e.left - o - , l = e.top - a; - return (r < s.left + i || r < i) && (n.left = !0), - (r + e.width > s.right - i || r + e.width > window.innerWidth - i) && (n.right = !0), - (l < s.top + i || l < i) && (n.top = !0), - (l + e.height > s.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() { + }, + M.objectSelectorString = function (t) { + return ((t.prop("tagName") || "") + (t.attr("id") || "") + (t.attr("class") || "")).replace(/\s/g, "") + }, + M.guid = function () { + function t() { + return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1) + } + return function () { + return t() + t() + "-" + t() + "-" + t() + "-" + t() + "-" + t() + t() + t() + } + }(), + M.escapeHash = function (t) { + return t.replace(/(:|\.|\[|\]|,|=)/g, "\\$1") + }, + M.elementOrParentIsFixed = function (t) { + var e = $(t), + i = !1; + return e.add(e.parents()).each(function () { + if ("fixed" === $(this).css("position")) + return i = !0, + !1 + }), + i + }, + M.checkWithinContainer = function (t, e, i) { + var n = { + top: !1, + right: !1, + bottom: !1, + left: !1 + }, + s = t.getBoundingClientRect(), + o = t.scrollLeft, + a = t.scrollTop, + r = e.left - o, + l = e.top - a; + return (r < s.left + i || r < i) && (n.left = !0), + (r + e.width > s.right - i || r + e.width > window.innerWidth - i) && (n.right = !0), + (l < s.top + i || l < i) && (n.top = !0), + (l + e.height > s.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; +}; +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() { + var l = function () { r = !1 === i.leading ? 0 : getTime(), - a = null, - o = t.apply(n, s), - n = s = null + a = null, + o = t.apply(n, s), + n = s = null }; - return function() { + 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 + 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 e < t.length ? { - done: !1, - value: t[e++] - } : { - done: !0 - } - }) -} -, -$jscomp.iteratorPrototype = function(t) { - return $jscomp.initSymbolIterator(), - (t = { - next: t - })[$jscomp.global.Symbol.iterator] = function() { - return this - } - , - t -} -, -$jscomp.array = $jscomp.array || {}, -$jscomp.iteratorFromArray = function(t, e) { - $jscomp.initSymbolIterator(), - t instanceof String && (t += ""); - var i = 0 - , n = { - next: function() { - if (i < t.length) { - var s = i++; - return { - value: e(s, t[s]), - done: !1 +$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 e < t.length ? { + done: !1, + value: t[e++] + } : { + done: !0 } - return n.next = function() { - return { - done: !0, - value: void 0 + }) + }, + $jscomp.iteratorPrototype = function (t) { + return $jscomp.initSymbolIterator(), + (t = { + next: t + })[$jscomp.global.Symbol.iterator] = function () { + return this + }, + t + }, + $jscomp.array = $jscomp.array || {}, + $jscomp.iteratorFromArray = function (t, e) { + $jscomp.initSymbolIterator(), + t instanceof String && (t += ""); + var i = 0, + n = { + next: function () { + if (i < t.length) { + var s = i++; + return { + value: e(s, t[s]), + done: !1 + } + } + return n.next = function () { + return { + done: !0, + value: void 0 + } + }, + n.next() } - } - , - n.next() + }; + return n[Symbol.iterator] = function () { + return n + }, + n + }, + $jscomp.polyfill = function (t, e, i, n) { + if (e) { + for (i = $jscomp.global, + t = t.split("."), + n = 0; n < t.length - 1; n++) { + var s = t[n]; + s in i || (i[s] = {}), + i = i[s] + } + (e = e(n = i[t = t[t.length - 1]])) != n && null != e && $jscomp.defineProperty(i, t, { + configurable: !0, + writable: !0, + value: e + }) } - }; - return n[Symbol.iterator] = function() { - return n - } - , - n -} -, -$jscomp.polyfill = function(t, e, i, n) { - if (e) { - for (i = $jscomp.global, - t = t.split("."), - n = 0; n < t.length - 1; n++) { - var s = t[n]; - s in i || (i[s] = {}), - i = i[s] + }, + $jscomp.polyfill("Array.prototype.keys", function (t) { + return t || function () { + return $jscomp.iteratorFromArray(this, function (t) { + return t + }) } - (e = e(n = i[t = t[t.length - 1]])) != n && null != e && $jscomp.defineProperty(i, t, { - configurable: !0, - writable: !0, - value: e - }) - } -} -, -$jscomp.polyfill("Array.prototype.keys", function(t) { - return t || function() { - return $jscomp.iteratorFromArray(this, function(t) { - return t - }) - } -}, "es6-impl", "es3"); + }, "es6-impl", "es3"); var $jscomp$this = this; -M.anime = function() { - function t(t) { - if (!O.col(t)) - try { - return document.querySelectorAll(t) - } catch (t) {} - } - function e(t, e) { - for (var i = t.length, n = 2 <= arguments.length ? arguments[1] : void 0, s = [], o = 0; o < i; o++) - if (o in t) { - var a = t[o]; - e.call(n, a, o, t) && s.push(a) - } - return s - } - function i(t) { - return t.reduce(function(t, e) { - return t.concat(O.arr(e) ? i(e) : e) - }, []) - } - function n(e) { - return O.arr(e) ? e : (O.str(e) && (e = t(e) || e), - e instanceof NodeList || e instanceof HTMLCollection ? [].slice.call(e) : [e]) - } - function s(t, e) { - return t.some(function(t) { - return t === e - }) - } - function o(t) { - var e, i = {}; - for (e in t) - i[e] = t[e]; - return i - } - function a(t, e) { - var i, n = o(t); - for (i in t) - n[i] = e.hasOwnProperty(i) ? e[i] : t[i]; - return n - } - function r(t, e) { - var i, n = o(t); - for (i in e) - n[i] = O.und(t[i]) ? e[i] : t[i]; - return n - } - function l(t) { - if (t = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t)) - return t[2] - } - function h(t, e) { - return O.fnc(t) ? t(e.target, e.id, e.total) : t - } - function d(t, e) { - if (e in t.style) - return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0" - } - function u(t, e) { - return O.dom(t) && s(T, e) ? "transform" : O.dom(t) && (t.getAttribute(e) || O.svg(t) && t[e]) ? "attribute" : O.dom(t) && "transform" !== e && d(t, e) ? "css" : null != t[e] ? "object" : void 0 - } - function c(t, i) { - switch (u(t, i)) { - case "transform": - return function(t, i) { - var n = function(t) { - return -1 < t.indexOf("translate") || "perspective" === t ? "px" : -1 < t.indexOf("rotate") || -1 < t.indexOf("skew") ? "deg" : void 0 - }(i) - , n = -1 < i.indexOf("scale") ? 1 : 0 + n; - if (!(t = t.style.transform)) - return n; - for (var s = [], o = [], a = [], r = /(\w+)\((.+?)\)/g; s = r.exec(t); ) - o.push(s[1]), - a.push(s[2]); - return (t = e(a, function(t, e) { - return o[e] === i - })).length ? t[0] : n - }(t, i); - case "css": - return d(t, i); - case "attribute": - return t.getAttribute(i) - } - return t[i] || 0 - } - function p(t, e) { - var i = /^(\*=|\+=|-=)/.exec(t); - if (!i) - return t; - var n = l(t) || 0; - switch (e = parseFloat(e), - t = parseFloat(t.replace(i[0], "")), - i[0][0]) { - case "+": - return e + t + n; - case "-": - return e - t + n; - case "*": - return e * t + n - } - } - function v(t, e) { - return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2)) - } - function f(t) { - t = t.points; - for (var e, i = 0, n = 0; n < t.numberOfItems; n++) { - var s = t.getItem(n); - 0 < n && (i += v(e, s)), - e = s - } - return i - } - function m(t) { - if (t.getTotalLength) - return t.getTotalLength(); - switch (t.tagName.toLowerCase()) { - case "circle": - return 2 * Math.PI * t.getAttribute("r"); - case "rect": - return 2 * t.getAttribute("width") + 2 * t.getAttribute("height"); - case "line": - return v({ - x: t.getAttribute("x1"), - y: t.getAttribute("y1") - }, { - x: t.getAttribute("x2"), - y: t.getAttribute("y2") - }); - case "polyline": - return f(t); - case "polygon": - var e = t.points; - return f(t) + v(e.getItem(e.numberOfItems - 1), e.getItem(0)) - } - } - function g(t, e) { - function i(i) { - return i = void 0 === i ? 0 : i, - t.el.getPointAtLength(1 <= e + i ? e + i : 0) +M.anime = function () { + function t(t) { + if (!O.col(t)) + try { + return document.querySelectorAll(t) + } catch (t) {} } - var n = i() - , s = i(-1) - , o = i(1); - switch (t.property) { - case "x": - return n.x; - case "y": - return n.y; - case "angle": - return 180 * Math.atan2(o.y - s.y, o.x - s.x) / Math.PI + + function e(t, e) { + for (var i = t.length, n = 2 <= arguments.length ? arguments[1] : void 0, s = [], o = 0; o < i; o++) + if (o in t) { + var a = t[o]; + e.call(n, a, o, t) && s.push(a) + } + return s } - } - function _(t, e) { - var i, n = /-?\d*\.?\d+/g; - if (i = O.pth(t) ? t.totalLength : t, - O.col(i)) - if (O.rgb(i)) { - var s = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i); - i = s ? "rgba(" + s[1] + ",1)" : i - } else - i = O.hex(i) ? function(t) { - t = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function(t, e, i, n) { - return e + e + i + i + n + n - }); - var e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t); - t = parseInt(e[1], 16); - var i = parseInt(e[2], 16) - , e = parseInt(e[3], 16); - return "rgba(" + t + "," + i + "," + e + ",1)" - }(i) : O.hsl(i) ? function(t) { - function e(t, e, i) { - return 0 > i && (i += 1), - 1 < i && --i, - i < 1 / 6 ? t + 6 * (e - t) * i : .5 > i ? 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 i(t) { + return t.reduce(function (t, e) { + return t.concat(O.arr(e) ? i(e) : e) + }, []) } - } - 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 - } + + function n(e) { + return O.arr(e) ? e : (O.str(e) && (e = t(e) || e), + e instanceof NodeList || e instanceof HTMLCollection ? [].slice.call(e) : [e]) } - 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 s(t, e) { + return t.some(function (t) { + return t === 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 < o; ) { - var a = s[i] - , r = a.animatable - , l = a.tweens - , h = l.length - 1 - , u = l[h]; - h && (u = e(l, function(e) { - return t < e.end - })[0] || u); - for (var l = Math.min(Math.max(t - u.start - u.delay, 0), u.duration) / u.duration, c = isNaN(l) ? 1 : u.easing(l, u.elasticity), l = u.to.strings, p = u.round, h = [], f = void 0, f = u.to.numbers.length, m = 0; m < f; m++) { - var _ = void 0 - , _ = u.to.numbers[m] - , y = u.from.numbers[m] - , _ = u.isPath ? g(u.value, c * _) : y + c * (_ - y); - p && (u.isColor && 2 < m || (_ = Math.round(_ * p) / p)), - h.push(_) - } - if (u = l.length) - for (f = l[0], - c = 0; c < u; c++) - p = l[c + 1], - m = h[c], - isNaN(m) || (f = p ? f + (m + p) : f + (m + " ")); - else - f = h[0]; - B[a.type](r.target, a.property, f, n, r.id), - a.currentValue = f, - i++ - } - if (i = Object.keys(n).length) - for (s = 0; s < i; s++) - M || (M = d(document.body, "transform") ? "transform" : "-webkit-transform"), - v.animatables[s].target.style[M] = n[s].join(" "); - v.currentTime = t, - v.progress = t / v.duration * 100 } + function o(t) { - v[t] && v[t](v) - } - function a() { - v.remaining && !0 !== v.remaining && v.remaining-- - } - function r(t) { - var e = v.duration - , r = v.offset - , d = r + v.delay - , f = v.currentTime - , m = v.reversed - , g = n(t); - if (v.children.length) { - var _ = v.children - , y = _.length; - if (g >= v.currentTime) - for (var k = 0; k < y; k++) - _[k].seek(g); - else - for (; y--; ) - _[y].seek(g) - } - (g >= d || !e) && (v.began || (v.began = !0, - o("begin")), - o("run")), - g > r && g < e ? s(g) : (g <= r && 0 !== f && (s(0), - m && a()), - (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) + var e, i = {}; + for (e in t) + i[e] = t[e]; + return i } - , - v.seek = function(t) { - r(n(t)) + + function a(t, e) { + var i, n = o(t); + for (i in t) + n[i] = e.hasOwnProperty(i) ? e[i] : t[i]; + return n } - , - v.pause = function() { - var t = I.indexOf(v); - -1 < t && I.splice(t, 1), - v.paused = !0 + + function r(t, e) { + var i, n = o(t); + for (i in e) + n[i] = O.und(t[i]) ? e[i] : t[i]; + return n } - , - v.play = function() { - v.paused && (v.paused = !1, - h = 0, - u = n(v.currentTime), - I.push(v), - S || A()) + + function l(t) { + if (t = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t)) + return t[2] } - , - v.reverse = function() { - v.reversed = !v.reversed, - h = 0, - u = n(v.currentTime) + + function h(t, e) { + return O.fnc(t) ? t(e.target, e.id, e.total) : t } - , - v.restart = function() { - v.pause(), - v.reset(), - v.play() + + function d(t, e) { + if (e in t.style) + return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0" } - , - v.finished = p, - v.reset(), - v.autoplay && v.play(), - v - } - var M, x = { - update: void 0, - begin: void 0, - run: void 0, - complete: void 0, - loop: 1, - direction: "normal", - autoplay: !0, - offset: 0 - }, L = { - duration: 1e3, - delay: 0, - easing: "easeOutElastic", - elasticity: 500, - round: 0 - }, T = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "), O = { - arr: function(t) { - return Array.isArray(t) - }, - obj: function(t) { - return -1 < Object.prototype.toString.call(t).indexOf("Object") - }, - pth: function(t) { - return O.obj(t) && t.hasOwnProperty("totalLength") - }, - svg: function(t) { - return t instanceof SVGElement - }, - dom: function(t) { - return t.nodeType || O.svg(t) - }, - str: function(t) { - return "string" == typeof t - }, - fnc: function(t) { - return "function" == typeof t - }, - und: function(t) { - return void 0 === t - }, - hex: function(t) { - return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t) - }, - rgb: function(t) { - return /^rgb/.test(t) - }, - hsl: function(t) { - return /^hsl/.test(t) - }, - col: function(t) { - return O.hex(t) || O.rgb(t) || O.hsl(t) + + function u(t, e) { + return O.dom(t) && s(T, e) ? "transform" : O.dom(t) && (t.getAttribute(e) || O.svg(t) && t[e]) ? "attribute" : O.dom(t) && "transform" !== e && d(t, e) ? "css" : null != t[e] ? "object" : void 0 } - }, $ = function() { - function t(t, e, i) { - return (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t + + function c(t, i) { + switch (u(t, i)) { + case "transform": + return function (t, i) { + var n = function (t) { + return -1 < t.indexOf("translate") || "perspective" === t ? "px" : -1 < t.indexOf("rotate") || -1 < t.indexOf("skew") ? "deg" : void 0 + }(i), + n = -1 < i.indexOf("scale") ? 1 : 0 + n; + if (!(t = t.style.transform)) + return n; + for (var s = [], o = [], a = [], r = /(\w+)\((.+?)\)/g; s = r.exec(t);) + o.push(s[1]), + a.push(s[2]); + return (t = e(a, function (t, e) { + return o[e] === i + })).length ? t[0] : n + }(t, i); + case "css": + return d(t, i); + case "attribute": + return t.getAttribute(i) + } + return t[i] || 0 } - return function(e, i, n, s) { - if (0 <= e && 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 < Math.abs(h) && 10 > ++u);a = d - } - return t(a, i, s) - } + + function p(t, e) { + var i = /^(\*=|\+=|-=)/.exec(t); + if (!i) + return t; + var n = l(t) || 0; + switch (e = parseFloat(e), + t = parseFloat(t.replace(i[0], "")), + i[0][0]) { + case "+": + return e + t + n; + case "-": + return e - t + n; + case "*": + return e * t + n } } - }(), 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) + + function v(t, e) { + return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2)) } - 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 + + function f(t) { + t = t.points; + for (var e, i = 0, n = 0; n < t.numberOfItems; n++) { + var s = t.getItem(n); + 0 < n && (i += v(e, s)), + e = s } - ] - }, 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 + ")") + return i } - }, I = [], S = 0, A = function() { - function t() { - S = requestAnimationFrame(e) + + function m(t) { + if (t.getTotalLength) + return t.getTotalLength(); + switch (t.tagName.toLowerCase()) { + case "circle": + return 2 * Math.PI * t.getAttribute("r"); + case "rect": + return 2 * t.getAttribute("width") + 2 * t.getAttribute("height"); + case "line": + return v({ + x: t.getAttribute("x1"), + y: t.getAttribute("y1") + }, { + x: t.getAttribute("x2"), + y: t.getAttribute("y2") + }); + case "polyline": + return f(t); + case "polygon": + var e = t.points; + return f(t) + v(e.getItem(e.numberOfItems - 1), e.getItem(0)) + } } - function e(e) { - var i = I.length; - if (i) { - for (var n = 0; n < i; ) - I[n] && I[n].tick(e), - n++; - t() - } else - cancelAnimationFrame(S), - S = 0 + + function g(t, e) { + function i(i) { + return i = void 0 === i ? 0 : i, + t.el.getPointAtLength(1 <= e + i ? e + i : 0) + } + var n = i(), + s = i(-1), + o = i(1); + switch (t.property) { + case "x": + return n.x; + case "y": + return n.y; + case "angle": + return 180 * Math.atan2(o.y - s.y, o.x - s.x) / Math.PI + } } - return t - }(); - return E.version = "2.2.0", - E.speed = 1, - E.running = I, - E.remove = function(t) { - t = y(t); - for (var e = I.length; e--; ) - for (var i = I[e], n = i.animations, o = n.length; o--; ) - s(t, n[o].animatable.target) && (n.splice(o, 1), - n.length || i.pause()) - } - , - E.getValue = c, - E.path = function(e, i) { - var n = O.str(e) ? t(e)[0] : e - , s = i || 100; - return function(t) { + + function _(t, e) { + var i, n = /-?\d*\.?\d+/g; + if (i = O.pth(t) ? t.totalLength : t, + O.col(i)) + if (O.rgb(i)) { + var s = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i); + i = s ? "rgba(" + s[1] + ",1)" : i + } else + i = O.hex(i) ? function (t) { + t = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (t, e, i, n) { + return e + e + i + i + n + n + }); + var e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t); + t = parseInt(e[1], 16); + var i = parseInt(e[2], 16), + e = parseInt(e[3], 16); + return "rgba(" + t + "," + i + "," + e + ",1)" + }(i) : O.hsl(i) ? function (t) { + function e(t, e, i) { + return 0 > i && (i += 1), + 1 < i && --i, + i < 1 / 6 ? t + 6 * (e - t) * i : .5 > i ? 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 { - el: n, - property: t, - totalLength: m(n) * (s / 100) + original: i += "", + numbers: i.match(n) ? i.match(n).map(Number) : [0], + strings: O.str(t) || e ? i.split(n) : [] } } - } - , - E.setDashoffset = function(t) { - var e = m(t); - return t.setAttribute("stroke-dasharray", e), - e - } - , - E.bezier = $, - E.easings = D, - E.timeline = function(t) { - var e = E(t); - return e.pause(), - e.duration = 0, - e.add = function(i) { - return e.children.forEach(function(t) { - t.began = !0, - t.completed = !0 - }), - n(i).forEach(function(i) { - var n = r(i, a(L, t || {})); - n.targets = n.targets || t.targets, - i = e.duration; - var s = n.offset; - n.autoplay = !1, - n.direction = e.direction, - n.offset = O.und(s) ? i : p(s, i), - e.began = !0, - e.completed = !0, - e.seek(n.offset), - (n = E(n)).began = !0, - n.completed = !0, - n.duration > i && (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 + + 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 + }) } - 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) - } + + 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 } } - }, { - 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]) + 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 } - }) - } - } - }, { - 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]) + 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 + }) } - }, { - 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) - }) + + 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 < o;) { + var a = s[i], + r = a.animatable, + l = a.tweens, + h = l.length - 1, + u = l[h]; + h && (u = e(l, function (e) { + return t < e.end + })[0] || u); + for (var l = Math.min(Math.max(t - u.start - u.delay, 0), u.duration) / u.duration, c = isNaN(l) ? 1 : u.easing(l, u.elasticity), l = u.to.strings, p = u.round, h = [], f = void 0, f = u.to.numbers.length, m = 0; m < f; m++) { + var _ = void 0, + _ = u.to.numbers[m], + y = u.from.numbers[m], + _ = u.isPath ? g(u.value, c * _) : y + c * (_ - y); + p && (u.isColor && 2 < m || (_ = Math.round(_ * p) / p)), + h.push(_) } - n[0].classList.add("active"), - this._animateIn(e) + if (u = l.length) + for (f = l[0], + c = 0; c < u; c++) + p = l[c + 1], + m = h[c], + isNaN(m) || (f = p ? f + (m + p) : f + (m + " ")); + else + f = h[0]; + B[a.type](r.target, a.property, f, n, r.id), + a.currentValue = f, + i++ } + if (i = Object.keys(n).length) + for (s = 0; s < i; s++) + M || (M = d(document.body, "transform") ? "transform" : "-webkit-transform"), + v.animatables[s].target.style[M] = n[s].join(" "); + v.currentTime = t, + v.progress = t / v.duration * 100 } - }, { - 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 + + function o(t) { + v[t] && v[t](v) } - }]), - 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 + + function a() { + v.remaining && !0 !== v.remaining && v.remaining-- } - }, { - 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()) + + function r(t) { + var e = v.duration, + r = v.offset, + d = r + v.delay, + f = v.currentTime, + m = v.reversed, + g = n(t); + if (v.children.length) { + var _ = v.children, + y = _.length; + if (g >= v.currentTime) + for (var k = 0; k < y; k++) + _[k].seek(g); + else + for (; y--;) + _[y].seek(g) } - 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.focusedIndex < this.dropdownEl.children.length && this.dropdownEl.children[this.focusedIndex].focus() - } - }, { - key: "_getDropdownPosition", - value: function() { - this.el.offsetParent.getBoundingClientRect(); - var t = { - left: this.el.offsetLeft, - top: this.el.offsetTop, - width: this.el.offsetWidth, - height: this.el.offsetHeight + (g >= d || !e) && (v.began || (v.began = !0, + o("begin")), + o("run")), + g > r && g < e ? s(g) : (g <= r && 0 !== f && (s(0), + m && a()), + (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 < t && I.splice(t, 1), + v.paused = !0 + }, + v.play = function () { + v.paused && (v.paused = !1, + h = 0, + u = n(v.currentTime), + I.push(v), + S || A()) + }, + v.reverse = function () { + v.reversed = !v.reversed, + h = 0, + u = n(v.currentTime) + }, + v.restart = function () { + v.pause(), + v.reset(), + v.play() + }, + v.finished = p, + v.reset(), + v.autoplay && v.play(), + v + } + var M, x = { + update: void 0, + begin: void 0, + run: void 0, + complete: void 0, + loop: 1, + direction: "normal", + autoplay: !0, + offset: 0 + }, + L = { + duration: 1e3, + delay: 0, + easing: "easeOutElastic", + elasticity: 500, + round: 0 + }, + T = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "), + O = { + arr: function (t) { + return Array.isArray(t) + }, + obj: function (t) { + return -1 < Object.prototype.toString.call(t).indexOf("Object") + }, + pth: function (t) { + return O.obj(t) && t.hasOwnProperty("totalLength") + }, + svg: function (t) { + return t instanceof SVGElement + }, + dom: function (t) { + return t.nodeType || O.svg(t) + }, + str: function (t) { + return "string" == typeof t + }, + fnc: function (t) { + return "function" == typeof t + }, + und: function (t) { + return void 0 === t + }, + hex: function (t) { + return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t) + }, + rgb: function (t) { + return /^rgb/.test(t) + }, + hsl: function (t) { + return /^hsl/.test(t) + }, + col: function (t) { + return O.hex(t) || O.rgb(t) || O.hsl(t) } - , e = (this.dropdownEl.offsetLeft, - this.dropdownEl.offsetTop, - this.dropdownEl.offsetWidth, - this.dropdownEl.offsetHeight, - this.el.getBoundingClientRect()) - , i = this.dropdownEl.getBoundingClientRect() - , n = i.height - , s = i.width - , o = t.left - , a = t.top - , r = { - left: o, - top: a, - height: n, - width: s + }, + $ = function () { + function t(t, e, i) { + return (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t } - , l = this.dropdownEl.offsetParent - , h = M.checkPossibleAlignments(this.el, l, r, this.options.coverTrigger ? 0 : e.height) - , d = "top" - , u = this.options.alignment; - if (a += this.options.coverTrigger ? 0 : e.height, - h.top || (h.bottom ? d = "bottom" : h.spaceOnTop > h.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 function (e, i, n, s) { + if (0 <= e && 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 < Math.abs(h) && 10 > ++u); + a = d + } + return t(a, i, s) + } + } } - 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 + }(), + 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) } - } - }, { - 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" + 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 + } + ] }, - 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" + s = { + linear: $(.25, .25, .75, .75) }, - 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) + 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) } - } - }) - } - }, { - 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() + }(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 + ")") } - } - }, { - 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 + }, + I = [], + S = 0, + A = function () { + function t() { + S = requestAnimationFrame(e) } - } - }, { - 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 + + function e(e) { + var i = I.length; + if (i) { + for (var n = 0; n < i;) + I[n] && I[n].tick(e), + n++; + t() + } else + cancelAnimationFrame(S), + S = 0 } - } - }, { - 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() + return t + }(); + return E.version = "2.2.0", + E.speed = 1, + E.running = I, + E.remove = function (t) { + t = y(t); + for (var e = I.length; e--;) + for (var i = I[e], n = i.animations, o = n.length; o--;) + s(t, n[o].animatable.target) && (n.splice(o, 1), + n.length || i.pause()) + }, + E.getValue = c, + E.path = function (e, i) { + var n = O.str(e) ? t(e)[0] : e, + s = i || 100; + return function (t) { + return { + el: n, + property: t, + totalLength: m(n) * (s / 100) } - }) - } - }], [{ - 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 && n < s + o && (this.$img[0].style.transform = "translate3D(-50%, " + a + "px, 0)") : this.$img[0].style.transform = "" - } - }], [{ - 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_Parallax - } - }, { - key: "_handleScroll", - value: function() { - for (var t = 0; t < n._parallaxes.length; t++) { - var e = n._parallaxes[t]; - e._updateParallax.call(e) } - } - }, { - key: "_handleWindowResize", - value: function() { - for (var t = 0; t < n._parallaxes.length; t++) { - var e = n._parallaxes[t]; - e._enabled = window.innerWidth > e.options.responsiveThreshold + }, + E.setDashoffset = function (t) { + var e = m(t); + return t.setAttribute("stroke-dasharray", e), + e + }, + E.bezier = $, + E.easings = D, + E.timeline = function (t) { + var e = E(t); + return e.pause(), + e.duration = 0, + e.add = function (i) { + return e.children.forEach(function (t) { + t.began = !0, + t.completed = !0 + }), + n(i).forEach(function (i) { + var n = r(i, a(L, t || {})); + n.targets = n.targets || t.targets, + i = e.duration; + var s = n.offset; + n.autoplay = !1, + n.direction = e.direction, + n.offset = O.und(s) ? i : p(s, i), + e.began = !0, + e.completed = !0, + e.seek(n.offset), + (n = E(n)).began = !0, + n.completed = !0, + n.duration > i && (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 } - } - }, { - 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; e < t.length; e++) { - var i = t[e]; - if ("input" === i.tagName.toLowerCase()) { - var n = i.parentNode; - if ("i" === n.tagName.toLowerCase() && -1 !== n.className.indexOf("waves-effect")) - continue; - var s = document.createElement("i"); - s.className = i.className + " waves-input-wrapper"; - var o = i.getAttribute("style"); - o || (o = ""), - s.setAttribute("style", o), - i.className = "waves-button-input", - i.removeAttribute("style"), - n.replaceChild(s, i), - s.appendChild(i) - } - } - } - } - , o = { - touches: 0, - allowEvent: function(t) { - var e = !0; - return "touchstart" === t.type ? o.touches += 1 : "touchend" === t.type || "touchcancel" === t.type ? setTimeout(function() { - o.touches > 0 && (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 < o.length; a++) { - var r = o[a]; - r.tickId < 0 && r._enter(), - r.tickId = s._ticks - } - for (var l = 0; l < s._elementsInView.length; l++) { - var h = s._elementsInView[l] - , d = h.tickId; - d >= 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.id < s._visibleElements[0][0].M_ScrollSpy.id ? s._visibleElements.unshift(this.$el) : s._visibleElements.push(this.$el)) : s._visibleElements.push(this.$el), - t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).addClass(this.options.activeClass) - } - }, { - key: "_exit", - value: function() { - var e = this; - 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 = s._visibleElements.filter(function(t) { - return t.attr("id") != e.$el.attr("id") - }), - s._visibleElements[0] && t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).addClass(this.options.activeClass)) - } - }], [{ - 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_ScrollSpy - } - }, { - key: "_findElements", - value: function(t, e, i, n) { - for (var o = [], a = 0; a < s._elements.length; a++) { - var r = s._elements[a] - , l = t + r.options.scrollOffset || 200; - if (r.$el.height() > 0) { - var h = r.$el.offset().top - , d = r.$el.offset().left - , u = d + r.$el.width() - , c = h + r.$el.height(); - !(d > e || u < n || h > i || c < l) && o.push(r) - } - } - return o - } - }, { - key: "defaults", - get: function() { - return i - } - }]), - s - }(); - n._elements = [], - n._elementsInView = [], - n._visibleElements = [], - n._count = 0, - n._increment = 0, - n._ticks = 0, - M.ScrollSpy = n, - M.jQueryLoaded && M.initializeJqueryWrapper(n, "scrollSpy", "M_ScrollSpy") -}(cash, M.anime), -function(t) { - "use strict"; - var e = { - data: {}, - limit: 1 / 0, - onAutocomplete: null, - minLength: 1, - sortFunction: function(t, e, i) { - return t.indexOf(i) - e.indexOf(i) - } - } - , 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_Autocomplete = s, - s.options = t.extend({}, n.defaults, i), - s.isOpen = !1, - s.count = 0, - s.activeIndex = -1, - s.oldVal, - s.$inputField = s.$el.closest(".input-field"), - s.$active = t(), - s._setupDropdown(), - s._setupEventHandlers(), - s - } - return _createClass(n, [{ - key: "destroy", - value: function() { - this._removeEventHandlers(), - this._removeDropdown(), - this.el.M_Autocomplete = void 0 - } - }, { - key: "_setupEventHandlers", - value: function() { - this._handleInputBlurBound = this._handleInputBlur.bind(this), - this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this), - this._handleInputKeydownBound = this._handleInputKeydown.bind(this), - this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind(this), - this.el.addEventListener("blur", this._handleInputBlurBound), - this.el.addEventListener("keyup", this._handleInputKeyupAndFocusBound), - this.el.addEventListener("focus", this._handleInputKeyupAndFocusBound), - this.el.addEventListener("keydown", this._handleInputKeydownBound), - this.container.addEventListener("mousedown", this._handleContainerMousedownAndTouchstartBound), - void 0 !== window.ontouchstart && this.container.addEventListener("touchstart", this._handleContainerMousedownAndTouchstartBound) - } - }, { - key: "_removeEventHandlers", - value: function() { - this.el.removeEventListener("blur", this._handleInputBlurBound), - this.el.removeEventListener("keyup", this._handleInputKeyupAndFocusBound), - this.el.removeEventListener("focus", this._handleInputKeyupAndFocusBound), - this.el.removeEventListener("keydown", this._handleInputKeydownBound), - this.container.removeEventListener("mousedown", this._handleContainerMousedownAndTouchstartBound), - void 0 !== window.ontouchstart && this.container.removeEventListener("touchstart", this._handleContainerMousedownAndTouchstartBound) - } - }, { - key: "_setupDropdown", - value: function() { - this.container = document.createElement("ul"), - t(this.container).addClass("autocomplete-content dropdown-content"), - this.$inputField.append(this.container) - } - }, { - key: "_removeDropdown", - value: function() { - this.container.parentNode.removeChild(this.container) - } - }, { - key: "_handleInputBlur", - value: function() { - this._removeAutocomplete() - } - }, { - key: "_handleInputKeyupAndFocus", - value: function(t) { - "keyup" === t.type && (n._keydown = !1), - this.count = 0; - var e = this.el.value.toLowerCase(); - 13 !== t.keyCode && 38 !== t.keyCode && 40 !== t.keyCode && (this.oldVal !== e && (this._removeAutocomplete(), - e.length >= 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 < o - 1 && this.activeIndex++, - this.$active.removeClass("active"), - 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 < s.length; r++) { - var l = s[r] - , h = t("
  • "); - l.data ? h.append('' + l.key + "") : h.append("" + l.key + ""), - t(this.container).append(h), - this._highlight(i, h) + 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 } - } - }, { - 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 < e.data("previous-length") && e.css("height", e.data("original-height") + "px"), - e.data("previous-length", e[0].value.length) - } - , - t(document).ready(function() { - var e = "input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea"; - t(document).on("change", e, function() { - 0 === this.value.length && null === t(this).attr("placeholder") || t(this).siblings("label").addClass("active"), - M.validate_field(t(this)) - }), - t(document).ready(function() { - M.updateTextFields() - }), - t(document).on("reset", function(i) { - var n = t(i.target); - n.is("form") && (n.find(e).removeClass("valid").removeClass("invalid"), - n.find(e).each(function(e) { - this.value.length && t(this).siblings("label").removeClass("active") - }), - setTimeout(function() { - n.find("select").each(function() { - if (this.M_Select) { - var e = t(this).find("option[selected]").text(); - t(this).siblings("input.select-dropdown")[0].value = e - } - }) - }, 0)) - }), - document.addEventListener("focus", function(i) { - t(i.target).is(e) && t(i.target).siblings("label, .prefix").addClass("active") - }, !0), - document.addEventListener("blur", function(i) { - var n = t(i.target); - if (n.is(e)) { - var s = ".prefix"; - 0 === n[0].value.length && !0 !== n[0].validity.badInput && null === n.attr("placeholder") && (s += ", label"), - n.siblings(s).removeClass("active"), - M.validate_field(n) - } - }, !0); - t(document).on("keyup", "input[type=radio], input[type=checkbox]", function(e) { - if (e.which !== M.keys.TAB) - ; - else { - t(this).addClass("tabbed"); - t(this).one("blur", function(e) { - t(this).removeClass("tabbed") - }) - } - }); - var i = ".materialize-textarea"; - t(i).each(function() { - var e = t(this); - e.data("original-height", e.height()), - e.data("previous-length", this.value.length), - M.textareaAutoResize(e) - }), - t(document).on("keyup", i, function() { - M.textareaAutoResize(t(this)) - }), - t(document).on("keydown", i, function() { - M.textareaAutoResize(t(this)) - }), - t(document).on("change", '.file-field input[type="file"]', function() { - for (var e = t(this).closest(".file-field").find("input.file-path"), i = t(this)[0].files, n = [], s = 0; s < i.length; s++) - n.push(i[s].name); - e[0].value = n.join(", "), - e.trigger("change") - }) - }) -}(cash), -function(t, e) { - "use strict"; - var i = { - indicators: !0, - height: 400, - duration: 500, - interval: 6e3 - } - , n = function(n) { - _inherits(s, Component); - function s(i, n) { - _classCallCheck(this, s); - var o = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, i, n)); - return o.el.M_Slider = o, - o.options = t.extend({}, s.defaults, n), - o.$slider = o.$el.find(".slides"), - o.$slides = o.$slider.children("li"), - o.activeIndex = o.$slider.find(".active").index(), - -1 != o.activeIndex && (o.$active = o.$slides.eq(o.activeIndex)), - o._setSliderHeight(), - o.$slides.find(".caption").each(function(t) { - o._animateCaptionIn(t, 0) - }), - o.$slides.find("img").each(function(e) { - var i = "data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - t(e).attr("src") !== i && (t(e).css("background-image", 'url("' + t(e).attr("src") + '")'), - t(e).attr("src", i)) - }), - o._setupIndicators(), - o.$active ? o.$active.css("display", "block") : (o.$slides.first().addClass("active"), - e({ - targets: o.$slides.first()[0], - opacity: 1, - duration: o.options.duration, - easing: "easeOutQuad" - }), - o.activeIndex = 0, - o.$active = o.$slides.eq(o.activeIndex), - o.options.indicators && o.$indicators.eq(o.activeIndex).addClass("active")), - o.$active.find("img").each(function(t) { - e({ - targets: o.$active.find(".caption")[0], - opacity: 1, - translateX: 0, - translateY: 0, - duration: o.options.duration, - easing: "easeOutQuad" - }) - }), - o._setupEventHandlers(), - o.start(), - o - } - return _createClass(s, [{ - key: "destroy", - value: function() { - this.pause(), - this._removeIndicators(), - this._removeEventHandlers(), - this.el.M_Slider = void 0 - } - }, { - key: "_setupEventHandlers", - value: function() { - var t = this; - this._handleIntervalBound = this._handleInterval.bind(this), - this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this), - this.options.indicators && this.$indicators.each(function(e) { - e.addEventListener("click", t._handleIndicatorClickBound) - }) - } - }, { - key: "_removeEventHandlers", - value: function() { - var t = this; - this.options.indicators && this.$indicators.each(function(e) { - e.removeEventListener("click", t._handleIndicatorClickBound) - }) - } - }, { - key: "_handleIndicatorClick", - value: function(e) { - var i = t(e.target).index(); - this.set(i) - } - }, { - key: "_handleInterval", - value: function() { - var t = this.$slider.find(".active").index(); - this.$slides.length === t + 1 ? t = 0 : t += 1, - this.set(t) - } - }, { - key: "_animateCaptionIn", - value: function(i, n) { - var s = { - targets: i, - opacity: 0, - duration: n, - easing: "easeOutQuad" - }; - t(i).hasClass("center-align") ? s.translateY = -100 : t(i).hasClass("right-align") ? s.translateX = 100 : t(i).hasClass("left-align") && (s.translateX = -100), - e(s) - } - }, { - key: "_setSliderHeight", - value: function() { - this.$el.hasClass("fullscreen") || (this.options.indicators ? this.$el.css("height", this.options.height + 40 + "px") : this.$el.css("height", this.options.height + "px"), - this.$slider.css("height", this.options.height + "px")) - } - }, { - key: "_setupIndicators", - value: function() { - var e = this; - this.options.indicators && (this.$indicators = t('
      '), - 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) { + 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.focusedIndex < this.dropdownEl.children.length && this.dropdownEl.children[this.focusedIndex].focus() + } + }, { + key: "_getDropdownPosition", + value: function () { + this.el.offsetParent.getBoundingClientRect(); + var t = { + left: this.el.offsetLeft, + top: this.el.offsetTop, + width: this.el.offsetWidth, + height: this.el.offsetHeight + }, + e = (this.dropdownEl.offsetLeft, + this.dropdownEl.offsetTop, + this.dropdownEl.offsetWidth, + this.dropdownEl.offsetHeight, + this.el.getBoundingClientRect()), + i = this.dropdownEl.getBoundingClientRect(), + n = i.height, + s = i.width, + o = t.left, + a = t.top, + r = { + left: o, + top: a, + height: n, + width: s + }, + l = this.dropdownEl.offsetParent, + h = M.checkPossibleAlignments(this.el, l, r, this.options.coverTrigger ? 0 : e.height), + d = "top", + u = this.options.alignment; + if (a += this.options.coverTrigger ? 0 : e.height, + h.top || (h.bottom ? d = "bottom" : h.spaceOnTop > h.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: t, - opacity: 0, - translateX: 0, - translateY: 0, - duration: 0, - easing: "easeOutQuad" + 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) + } + } }) - }) } - }), - 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.chipsData.length; t++) { - var e = this._renderChip(this.chipsData[t]); - this.$el.append(e), - this.$chips.add(e) - } - this.$el.append(this.$input[0]) - } - }, { - key: "_setupAutocomplete", - value: function() { - var t = this; - this.options.autocompleteOptions.onAutocomplete = function(e) { - t.addChip({ - tag: e - }), - t.$input[0].value = "", - t.$input[0].focus() - } - , - this.autocomplete = M.Autocomplete.init(this.$input, this.options.autocompleteOptions)[0] - } - }, { - key: "_setupInput", - value: function() { - this.$input = this.$el.find("input"), - this.$input.length || (this.$input = 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.chipsData.length; i++) - if (this.chipsData[i].tag === t.tag) { - e = !0; - break + }, { + 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) + } + } + }) } - return !e - } - return !1 - } - }, { - key: "addChip", - value: function(e) { - if (this._isValid(e) && !(this.chipsData.length >= 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")), - t < this.options.top && !this.el.classList.contains("pin-top") && (this._removePinClasses(), - this.el.style.top = 0, - this.el.classList.add("pin-top"), - "function" == typeof this.options.onPositionChange && this.options.onPositionChange.call(this, "pin-top")), - t > this.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: "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: "_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) && t < i ? t = i : n._isDate(s) && t > s && (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 = o < i.getTime() || s.getTime() < o - } - e && (this.calendars = [{ - month: t.getMonth(), - year: t.getFullYear() - }]), - this.adjustCalendars() - } - } - }, { - key: "adjustCalendars", - value: function() { - this.calendars[0] = this.adjustCalendar(this.calendars[0]), - this.draw() - } - }, { - key: "adjustCalendar", - value: function(t) { - return t.month < 0 && (t.year -= Math.ceil(Math.abs(t.month) / 12), - t.month += 12), - t.month > 11 && (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; _ < f; _++) { - var k = new Date(t,e,_ - r + 1) - , b = !!n._isDate(this.date) && n._compareDates(k, this.date) - , w = n._compareDates(k, o) - , C = -1 !== s.events.indexOf(k.toDateString()) - , E = _ < r || _ >= 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.startRange < k && k < s.endRange - , D = s.minDate && k < s.minDate || s.maxDate && k > s.maxDate || s.disableWeekends && n._isWeekend(k) || s.disableDayFn && s.disableDayFn(k); - E && (_ < r ? (M = v + M, - x = d, - L = c) : (M -= a, - x = u, - L = p)); - var B = { - day: M, - month: x, - year: L, - hasEvent: C, - isSelected: b, - isToday: w, - isDisabled: D, - isEmpty: E, - isStartRange: T, - isEndRange: O, - isInRange: $, - showDaysInNextAndPreviousMonths: s.showDaysInNextAndPreviousMonths - }; - h.push(this.renderDay(B)), - 7 == ++y && (l.push(this.renderRow(h, s.isRTL, g)), - h = [], - y = 0, - g = !1) + }, { + 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 this.renderTable(s, l, i) - } - }, { - key: "renderDay", - value: function(t) { - var e = [] - , i = "false"; - if (t.isEmpty) { - if (!t.showDaysInNextAndPreviousMonths) - return ''; - e.push("is-outside-current-month"), - e.push("is-selection-disabled") + 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 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 < l && r <= d.maxYear; r++) - 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 < s && (this._m = s)), - this._y >= 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) + 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 } - } - }, { - 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() - } + 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 && n < s + o && (this.$img[0].style.transform = "translate3D(-50%, " + a + "px, 0)") : this.$img[0].style.transform = "" + } + }], [{ + 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_Parallax + } + }, { + key: "_handleScroll", + value: function () { + for (var t = 0; t < n._parallaxes.length; t++) { + var e = n._parallaxes[t]; + e._updateParallax.call(e) + } + } + }, { + key: "_handleWindowResize", + value: function () { + for (var t = 0; t < n._parallaxes.length; t++) { + var e = n._parallaxes[t]; + e._enabled = window.innerWidth > e.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 } - } - }, { - 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")))) + 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 } - } - }, { - 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(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 } - 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]) + 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; e < t.length; e++) { + var i = t[e]; + if ("input" === i.tagName.toLowerCase()) { + var n = i.parentNode; + if ("i" === n.tagName.toLowerCase() && -1 !== n.className.indexOf("waves-effect")) + continue; + var s = document.createElement("i"); + s.className = i.className + " waves-input-wrapper"; + var o = i.getAttribute("style"); + o || (o = ""), + s.setAttribute("style", o), + i.className = "waves-button-input", + i.removeAttribute("style"), + n.replaceChild(s, i), + s.appendChild(i) + } } - } - }, { - 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") + }, + o = { + touches: 0, + allowEvent: function (t) { + var e = !0; + return "touchstart" === t.type ? o.touches += 1 : "touchend" === t.type || "touchcancel" === t.type ? setTimeout(function () { + o.touches > 0 && (o.touches -= 1) + }, 500) : "mousedown" === t.type && o.touches > 0 && (e = !1), + e + }, + touchup: function (t) { + o.allowEvent(t) } - 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 + }; + + 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 } - } - }, { - 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) + }(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() } - }), - 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) + 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 } - } - }, { - 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") + 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() } - } 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")) + }, { + 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 + '"]' } - for ((!this.noWrap || this.center >= 0 && this.center < this.count) && (l = this.images[this._wrap(this.center)], - t(l).hasClass("active") || (this.$el.find(".carousel-item").removeClass("active"), - l.classList.add("active")), - l.style[this.xform] = h + " translateX(" + -o / 2 + "px) translateX(" + a * this.options.shift * r * n + "px) translateZ(" + this.options.dist * r + "px)", - l.style.zIndex = 0, - u = this.options.fullWidth ? 1 : 1 - .2 * r, - l.style.opacity = u, - l.style.visibility = "visible"), - n = 1; n <= s; ++n) - this.options.fullWidth ? (d = this.options.dist, - u = n === s && o < 0 ? 1 - r : 1) : (d = this.options.dist * (2 * n + r * a), - u = 1 - .2 * (2 * n + r * a)), - (!this.noWrap || this.center + n < this.count) && ((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.options.fullWidth ? (d = this.options.dist, - u = n === s && o > 0 ? 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.center < this.count) && ((l = this.images[this._wrap(this.center)]).style[this.xform] = h + " translateX(" + -o / 2 + "px) translateX(" + a * this.options.shift * r + "px) translateZ(" + this.options.dist * r + "px)", - l.style.zIndex = 0, - u = this.options.fullWidth ? 1 : 1 - .2 * r, - l.style.opacity = u, - l.style.visibility = "visible"); - var f = this.$el.find(".carousel-item").eq(this._wrap(this.center)); - c !== this.center && "function" == typeof this.options.onCycleTo && this.options.onCycleTo.call(this, f[0], this.dragged), - "function" == typeof this.oneTimeCallback && (this.oneTimeCallback.call(this, f[0], this.dragged), - this.oneTimeCallback = null) - } - }, { - key: "_cycleTo", - value: function(t, e) { - var i = this.center % this.count - t; - this.noWrap || (i < 0 ? Math.abs(i + this.count) < Math.abs(i) && (i += this.count) : i > 0 && Math.abs(i - this.count) < i && (i -= this.count)), - this.target = this.dim * Math.round(this.offset / this.dim), - i < 0 ? this.target += this.dim * Math.abs(i) : i > 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) + }, + 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 } - 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) + 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 < o.length; a++) { + var r = o[a]; + r.tickId < 0 && r._enter(), + r.tickId = s._ticks + } + for (var l = 0; l < s._elementsInView.length; l++) { + var h = s._elementsInView[l], + d = h.tickId; + d >= 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.id < s._visibleElements[0][0].M_ScrollSpy.id ? s._visibleElements.unshift(this.$el) : s._visibleElements.push(this.$el)) : s._visibleElements.push(this.$el), + t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).addClass(this.options.activeClass) + } + }, { + key: "_exit", + value: function () { + var e = this; + 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 = s._visibleElements.filter(function (t) { + return t.attr("id") != e.$el.attr("id") + }), + s._visibleElements[0] && t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).addClass(this.options.activeClass)) + } + }], [{ + 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_ScrollSpy + } + }, { + key: "_findElements", + value: function (t, e, i, n) { + for (var o = [], a = 0; a < s._elements.length; a++) { + var r = s._elements[a], + l = t + r.options.scrollOffset || 200; + if (r.$el.height() > 0) { + var h = r.$el.offset().top, + d = r.$el.offset().left, + u = d + r.$el.width(), + c = h + r.$el.height(); + !(d > e || u < n || h > i || c < l) && o.push(r) + } + } + return o + } + }, { + key: "defaults", + get: function () { + return i + } + }]), + s + }(); + n._elements = [], + n._elementsInView = [], + n._visibleElements = [], + n._count = 0, + n._increment = 0, + n._ticks = 0, + M.ScrollSpy = n, + M.jQueryLoaded && M.initializeJqueryWrapper(n, "scrollSpy", "M_ScrollSpy") + }(cash, M.anime), + function (t) { + "use strict"; + var e = { + data: {}, + limit: 1 / 0, + onAutocomplete: null, + minLength: 1, + sortFunction: function (t, e, i) { + return t.indexOf(i) - e.indexOf(i) } - 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) + }, + 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_Autocomplete = s, + s.options = t.extend({}, n.defaults, i), + s.isOpen = !1, + s.count = 0, + s.activeIndex = -1, + s.oldVal, + s.$inputField = s.$el.closest(".input-field"), + s.$active = t(), + s._setupDropdown(), + s._setupEventHandlers(), + s } - 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; n < i.length && !(e = "fixed" == t(i[n]).css("position")); n++) - ; - var s = this.$origin.outerWidth() - , o = this.$origin.outerHeight() - , a = e ? this.$origin.offset().top - M.getDocumentScrollTop() : this.$origin.offset().top - , r = e ? this.$origin.offset().left - M.getDocumentScrollLeft() : this.$origin.offset().left - , l = window.innerWidth - , h = window.innerHeight - , d = l / 2 - , u = h / 2 - , c = r <= d - , p = r > d - , 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" + return _createClass(n, [{ + key: "destroy", + value: function () { + this._removeEventHandlers(), + this._removeDropdown(), + this.el.M_Autocomplete = void 0 + } + }, { + key: "_setupEventHandlers", + value: function () { + this._handleInputBlurBound = this._handleInputBlur.bind(this), + this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this), + this._handleInputKeydownBound = this._handleInputKeydown.bind(this), + this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind(this), + this.el.addEventListener("blur", this._handleInputBlurBound), + this.el.addEventListener("keyup", this._handleInputKeyupAndFocusBound), + this.el.addEventListener("focus", this._handleInputKeyupAndFocusBound), + this.el.addEventListener("keydown", this._handleInputKeydownBound), + this.container.addEventListener("mousedown", this._handleContainerMousedownAndTouchstartBound), + void 0 !== window.ontouchstart && this.container.addEventListener("touchstart", this._handleContainerMousedownAndTouchstartBound) + } + }, { + key: "_removeEventHandlers", + value: function () { + this.el.removeEventListener("blur", this._handleInputBlurBound), + this.el.removeEventListener("keyup", this._handleInputKeyupAndFocusBound), + this.el.removeEventListener("focus", this._handleInputKeyupAndFocusBound), + this.el.removeEventListener("keydown", this._handleInputKeydownBound), + this.container.removeEventListener("mousedown", this._handleContainerMousedownAndTouchstartBound), + void 0 !== window.ontouchstart && this.container.removeEventListener("touchstart", this._handleContainerMousedownAndTouchstartBound) + } + }, { + key: "_setupDropdown", + value: function () { + this.container = document.createElement("ul"), + t(this.container).addClass("autocomplete-content dropdown-content"), + this.$inputField.append(this.container) + } + }, { + key: "_removeDropdown", + value: function () { + this.container.parentNode.removeChild(this.container) + } + }, { + key: "_handleInputBlur", + value: function () { + this._removeAutocomplete() + } + }, { + key: "_handleInputKeyupAndFocus", + value: function (t) { + "keyup" === t.type && (n._keydown = !1), + this.count = 0; + var e = this.el.value.toLowerCase(); + 13 !== t.keyCode && 38 !== t.keyCode && 40 !== t.keyCode && (this.oldVal !== e && (this._removeAutocomplete(), + e.length >= 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 < o - 1 && this.activeIndex++, + this.$active.removeClass("active"), + 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 < s.length; r++) { + var l = s[r], + h = t("
      • "); + 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 < e.data("previous-length") && e.css("height", e.data("original-height") + "px"), + e.data("previous-length", e[0].value.length) + }, + t(document).ready(function () { + var e = "input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea"; + t(document).on("change", e, function () { + 0 === this.value.length && null === t(this).attr("placeholder") || t(this).siblings("label").addClass("active"), + M.validate_field(t(this)) + }), + t(document).ready(function () { + M.updateTextFields() + }), + t(document).on("reset", function (i) { + var n = t(i.target); + n.is("form") && (n.find(e).removeClass("valid").removeClass("invalid"), + n.find(e).each(function (e) { + this.value.length && t(this).siblings("label").removeClass("active") + }), + setTimeout(function () { + n.find("select").each(function () { + if (this.M_Select) { + var e = t(this).find("option[selected]").text(); + t(this).siblings("input.select-dropdown")[0].value = e + } + }) + }, 0)) + }), + document.addEventListener("focus", function (i) { + t(i.target).is(e) && t(i.target).siblings("label, .prefix").addClass("active") + }, !0), + document.addEventListener("blur", function (i) { + var n = t(i.target); + if (n.is(e)) { + var s = ".prefix"; + 0 === n[0].value.length && !0 !== n[0].validity.badInput && null === n.attr("placeholder") && (s += ", label"), + n.siblings(s).removeClass("active"), + M.validate_field(n) + } + }, !0); + t(document).on("keyup", "input[type=radio], input[type=checkbox]", function (e) { + if (e.which !== M.keys.TAB) + ; + else { + t(this).addClass("tabbed"); + t(this).one("blur", function (e) { + t(this).removeClass("tabbed") + }) + } + }); + var i = ".materialize-textarea"; + t(i).each(function () { + var e = t(this); + e.data("original-height", e.height()), + e.data("previous-length", this.value.length), + M.textareaAutoResize(e) + }), + t(document).on("keyup", i, function () { + M.textareaAutoResize(t(this)) + }), + t(document).on("keydown", i, function () { + M.textareaAutoResize(t(this)) + }), + t(document).on("change", '.file-field input[type="file"]', function () { + for (var e = t(this).closest(".file-field").find("input.file-path"), i = t(this)[0].files, n = [], s = 0; s < i.length; s++) + n.push(i[s].name); + e[0].value = n.join(", "), + e.trigger("change") + }) + }) + }(cash), + function (t, e) { + "use strict"; + var i = { + indicators: !0, + height: 400, + duration: 500, + interval: 6e3 + }, + n = function (n) { + _inherits(s, Component); + + function s(i, n) { + _classCallCheck(this, s); + var o = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, i, n)); + return o.el.M_Slider = o, + o.options = t.extend({}, s.defaults, n), + o.$slider = o.$el.find(".slides"), + o.$slides = o.$slider.children("li"), + o.activeIndex = o.$slider.find(".active").index(), + -1 != o.activeIndex && (o.$active = o.$slides.eq(o.activeIndex)), + o._setSliderHeight(), + o.$slides.find(".caption").each(function (t) { + o._animateCaptionIn(t, 0) + }), + o.$slides.find("img").each(function (e) { + var i = "data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + t(e).attr("src") !== i && (t(e).css("background-image", 'url("' + t(e).attr("src") + '")'), + t(e).attr("src", i)) + }), + o._setupIndicators(), + o.$active ? o.$active.css("display", "block") : (o.$slides.first().addClass("active"), + e({ + targets: o.$slides.first()[0], + opacity: 1, + duration: o.options.duration, + easing: "easeOutQuad" + }), + o.activeIndex = 0, + o.$active = o.$slides.eq(o.activeIndex), + o.options.indicators && o.$indicators.eq(o.activeIndex).addClass("active")), + o.$active.find("img").each(function (t) { + e({ + targets: o.$active.find(".caption")[0], + opacity: 1, + translateX: 0, + translateY: 0, + duration: o.options.duration, + easing: "easeOutQuad" + }) + }), + o._setupEventHandlers(), + o.start(), + o + } + return _createClass(s, [{ + key: "destroy", + value: function () { + this.pause(), + this._removeIndicators(), + this._removeEventHandlers(), + this.el.M_Slider = void 0 + } + }, { + key: "_setupEventHandlers", + value: function () { + var t = this; + this._handleIntervalBound = this._handleInterval.bind(this), + this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this), + this.options.indicators && this.$indicators.each(function (e) { + e.addEventListener("click", t._handleIndicatorClickBound) + }) + } + }, { + key: "_removeEventHandlers", + value: function () { + var t = this; + this.options.indicators && this.$indicators.each(function (e) { + e.removeEventListener("click", t._handleIndicatorClickBound) + }) + } + }, { + key: "_handleIndicatorClick", + value: function (e) { + var i = t(e.target).index(); + this.set(i) + } + }, { + key: "_handleInterval", + value: function () { + var t = this.$slider.find(".active").index(); + this.$slides.length === t + 1 ? t = 0 : t += 1, + this.set(t) + } + }, { + key: "_animateCaptionIn", + value: function (i, n) { + var s = { + targets: i, + opacity: 0, + duration: n, + easing: "easeOutQuad" + }; + t(i).hasClass("center-align") ? s.translateY = -100 : t(i).hasClass("right-align") ? s.translateX = 100 : t(i).hasClass("left-align") && (s.translateX = -100), + e(s) + } + }, { + key: "_setSliderHeight", + value: function () { + this.$el.hasClass("fullscreen") || (this.options.indicators ? this.$el.css("height", this.options.height + 40 + "px") : this.$el.css("height", this.options.height + "px"), + this.$slider.css("height", this.options.height + "px")) + } + }, { + key: "_setupIndicators", + value: function () { + var e = this; + this.options.indicators && (this.$indicators = t('
          '), + 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" + })) } - }, { - 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") + }) + }(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 } - 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) + 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.chipsData.length; t++) { + var e = this._renderChip(this.chipsData[t]); + this.$el.append(e), + this.$chips.add(e) + } + this.$el.append(this.$input[0]) + } + }, { + key: "_setupAutocomplete", + value: function () { + var t = this; + this.options.autocompleteOptions.onAutocomplete = function (e) { + t.addChip({ + tag: e + }), + t.$input[0].value = "", + t.$input[0].focus() + }, + this.autocomplete = M.Autocomplete.init(this.$input, this.options.autocompleteOptions)[0] + } + }, { + key: "_setupInput", + value: function () { + this.$input = this.$el.find("input"), + this.$input.length || (this.$input = 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.chipsData.length; i++) + if (this.chipsData[i].tag === t.tag) { + e = !0; + break + } + return !e + } + return !1 + } + }, { + key: "addChip", + value: function (e) { + if (this._isValid(e) && !(this.chipsData.length >= 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")), + t < this.options.top && !this.el.classList.contains("pin-top") && (this._removePinClasses(), + this.el.style.top = 0, + this.el.classList.add("pin-top"), + "function" == typeof this.options.onPositionChange && this.options.onPositionChange.call(this, "pin-top")), + t > this.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 }) } - }), - 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 + }, { + 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") + } + }) + }) } - }), - "" === e) { - var i = this.$el.find("option:disabled").eq(0); - i.length && (e = i.text()) + }, { + 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) && t < i ? t = i : n._isDate(s) && t > s && (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 = o < i.getTime() || s.getTime() < o + } + e && (this.calendars = [{ + month: t.getMonth(), + year: t.getFullYear() + }]), + this.adjustCalendars() + } + } + }, { + key: "adjustCalendars", + value: function () { + this.calendars[0] = this.adjustCalendar(this.calendars[0]), + this.draw() + } + }, { + key: "adjustCalendar", + value: function (t) { + return t.month < 0 && (t.year -= Math.ceil(Math.abs(t.month) / 12), + t.month += 12), + t.month > 11 && (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; _ < f; _++) { + var k = new Date(t, e, _ - r + 1), + b = !!n._isDate(this.date) && n._compareDates(k, this.date), + w = n._compareDates(k, o), + C = -1 !== s.events.indexOf(k.toDateString()), + E = _ < r || _ >= 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.startRange < k && k < s.endRange, + D = s.minDate && k < s.minDate || s.maxDate && k > s.maxDate || s.disableWeekends && n._isWeekend(k) || s.disableDayFn && s.disableDayFn(k); + E && (_ < r ? (M = v + M, + x = d, + L = c) : (M -= a, + x = u, + L = p)); + var B = { + day: M, + month: x, + year: L, + hasEvent: C, + isSelected: b, + isToday: w, + isDisabled: D, + isEmpty: E, + isStartRange: T, + isEndRange: O, + isInRange: $, + showDaysInNextAndPreviousMonths: s.showDaysInNextAndPreviousMonths + }; + h.push(this.renderDay(B)), + 7 == ++y && (l.push(this.renderRow(h, s.isRTL, g)), + h = [], + y = 0, + g = !1) + } + return this.renderTable(s, l, i) + } + }, { + key: "renderDay", + value: function (t) { + var e = [], + i = "false"; + if (t.isEmpty) { + if (!t.showDaysInNextAndPreviousMonths) + return ''; + 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 < l && r <= d.maxYear; r++) + 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 < s && (this._m = s)), + this._y >= 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 } - 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")) + 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 } - } - }, { - key: "_activateOption", - value: function(e, i) { - if (i) { - this.isMultiple || e.find("li.selected").removeClass("selected"); - t(i).addClass("selected") + 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 } - } - }, { - 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") + 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.center < this.count) && (l = this.images[this._wrap(this.center)], + t(l).hasClass("active") || (this.$el.find(".carousel-item").removeClass("active"), + l.classList.add("active")), + l.style[this.xform] = h + " translateX(" + -o / 2 + "px) translateX(" + a * this.options.shift * r * n + "px) translateZ(" + this.options.dist * r + "px)", + l.style.zIndex = 0, + u = this.options.fullWidth ? 1 : 1 - .2 * r, + l.style.opacity = u, + l.style.visibility = "visible"), + n = 1; n <= s; ++n) + this.options.fullWidth ? (d = this.options.dist, + u = n === s && o < 0 ? 1 - r : 1) : (d = this.options.dist * (2 * n + r * a), + u = 1 - .2 * (2 * n + r * a)), + (!this.noWrap || this.center + n < this.count) && ((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.options.fullWidth ? (d = this.options.dist, + u = n === s && o > 0 ? 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.center < this.count) && ((l = this.images[this._wrap(this.center)]).style[this.xform] = h + " translateX(" + -o / 2 + "px) translateX(" + a * this.options.shift * r + "px) translateZ(" + this.options.dist * r + "px)", + l.style.zIndex = 0, + u = this.options.fullWidth ? 1 : 1 - .2 * r, + l.style.opacity = u, + l.style.visibility = "visible"); + var f = this.$el.find(".carousel-item").eq(this._wrap(this.center)); + c !== this.center && "function" == typeof this.options.onCycleTo && this.options.onCycleTo.call(this, f[0], this.dragged), + "function" == typeof this.oneTimeCallback && (this.oneTimeCallback.call(this, f[0], this.dragged), + this.oneTimeCallback = null) + } + }, { + key: "_cycleTo", + value: function (t, e) { + var i = this.center % this.count - t; + this.noWrap || (i < 0 ? Math.abs(i + this.count) < Math.abs(i) && (i += this.count) : i > 0 && Math.abs(i - this.count) < i && (i -= this.count)), + this.target = this.dim * Math.round(this.offset / this.dim), + i < 0 ? this.target += this.dim * Math.abs(i) : i > 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 } - } - }, { - 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()) + 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; n < i.length && !(e = "fixed" == t(i[n]).css("position")); n++) + ; + var s = this.$origin.outerWidth(), + o = this.$origin.outerHeight(), + a = e ? this.$origin.offset().top - M.getDocumentScrollTop() : this.$origin.offset().top, + r = e ? this.$origin.offset().left - M.getDocumentScrollLeft() : this.$origin.offset().left, + l = window.innerWidth, + h = window.innerHeight, + d = l / 2, + u = h / 2, + c = r <= d, + p = r > d, + 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 } - } - }, { - 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") + 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 } - } - }, { - 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); + 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); + function get_gravatar(email, size) { - var MD5 = function(s) { + var MD5 = function (s) { function L(k, d) { return (k << d) | (k >>> (32 - d)) } + function K(G, k) { var I, d, F, H, x; F = (G & 2147483648); @@ -15359,34 +15675,43 @@ function get_gravatar(email, size) { 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; @@ -15409,8 +15734,11 @@ function get_gravatar(email, size) { aa[I - 1] = F >>> 29; return aa } + function B(x) { - var k = "", F = "", G, d; + var k = "", + F = "", + G, d; for (d = 0; d <= 3; d++) { G = (x >>> (d * 8)) & 255; F = "0" + G.toString(16); @@ -15418,6 +15746,7 @@ function get_gravatar(email, size) { } return k } + function J(k) { k = k.replace(/rn/g, "n"); var d = ""; @@ -15440,22 +15769,22 @@ function get_gravatar(email, size) { } 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; + 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; @@ -15541,11 +15870,11 @@ function get_gravatar(email, size) { }; var size = size || 80; return 'https://gravatar.shino.cc/avatar/' + MD5(email) + '.jpg?s=' + size + '&d=mm'; -} -!function(e) { +}! function (e) { "use strict"; - var n = function(n, t, o) { - var l, r = e.document, i = r.createElement("link"); + var n = function (n, t, o) { + var l, r = e.document, + i = r.createElement("link"); if (t) l = t; else { @@ -15554,81 +15883,427 @@ function get_gravatar(email, size) { } var d = r.styleSheets; i.rel = "stylesheet", - i.href = n, - i.media = "only x", - l.parentNode.insertBefore(i, t ? l : l.nextSibling); - var f = function(e) { - for (var n = i.href, t = d.length; t--; ) + i.href = n, + i.media = "only x", + l.parentNode.insertBefore(i, t ? l : l.nextSibling); + var f = function (e) { + for (var n = i.href, t = d.length; t--;) if (d[t].href === n) return e(); - setTimeout(function() { + setTimeout(function () { f(e) }) }; return i.onloadcssdefined = f, - f(function() { - i.media = o || "all" - }), - i + f(function () { + i.media = o || "all" + }), + i }; "undefined" != typeof module ? module.exports = n : e.loadCSS = n }("undefined" != typeof global ? global : this); // tocbot -!function(e){function t(o){if(n[o])return n[o].exports;var l=n[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){(function(o){var l,r,i;!function(n,o){r=[],l=o(n),void 0!==(i="function"==typeof l?l.apply(t,r):l)&&(e.exports=i)}(void 0!==o?o:this.window||this.global,function(e){"use strict";function t(){for(var e={},t=0;te.fixedSidebarOffset?-1===n.className.indexOf(e.positionFixedClass)&&(n.className+=h+e.positionFixedClass):n.className=n.className.split(h+e.positionFixedClass).join("")}function i(t){if(e.scrollContainer&&document.querySelector(e.scrollContainer))var n=document.querySelector(e.scrollContainer).scrollTop;else var n=document.documentElement.scrollTop||f.scrollTop;e.positionFixedSelector&&r();var o,l=t;if(m&&null!==document.querySelector(e.tocSelector)&&l.length>0){d.call(l,function(t,r){if(t.offsetTop>n+e.headingsOffset+10){return o=l[0===r?r:r-1],!0}if(r===l.length-1)return o=l[l.length-1],!0});var i=document.querySelector(e.tocSelector).querySelectorAll("."+e.linkClass);u.call(i,function(t){t.className=t.className.split(h+e.activeLinkClass).join("")});var c=document.querySelector(e.tocSelector).querySelectorAll("."+e.listItemClass);u.call(c,function(t){t.className=t.className.split(h+e.activeListItemClass).join("")});var a=document.querySelector(e.tocSelector).querySelector("."+e.linkClass+".node-name--"+o.nodeName+'[href="#'+o.id+'"]');-1===a.className.indexOf(e.activeLinkClass)&&(a.className+=h+e.activeLinkClass);var p=a.parentNode;p&&-1===p.className.indexOf(e.activeListItemClass)&&(p.className+=h+e.activeListItemClass);var C=document.querySelector(e.tocSelector).querySelectorAll("."+e.listClass+"."+e.collapsibleClass);u.call(C,function(t){-1===t.className.indexOf(e.isCollapsedClass)&&(t.className+=h+e.isCollapsedClass)}),a.nextSibling&&-1!==a.nextSibling.className.indexOf(e.isCollapsedClass)&&(a.nextSibling.className=a.nextSibling.className.split(h+e.isCollapsedClass).join("")),s(a.parentNode.parentNode)}}function s(t){return-1!==t.className.indexOf(e.collapsibleClass)&&-1!==t.className.indexOf(e.isCollapsedClass)?(t.className=t.className.split(h+e.isCollapsedClass).join(""),s(t.parentNode.parentNode)):t}function c(t){var n=t.target||t.srcElement;"string"==typeof n.className&&-1!==n.className.indexOf(e.linkClass)&&(m=!1)}function a(){m=!0}var u=[].forEach,d=[].some,f=document.body,m=!0,h=" ";return{enableTocAnimation:a,disableTocAnimation:c,render:n,updateToc:i}}},function(e,t){e.exports=function(e){function t(e){return e[e.length-1]}function n(e){return+e.nodeName.split("H").join("")}function o(t){var o={id:t.id,children:[],nodeName:t.nodeName,headingLevel:n(t),textContent:t.textContent.trim()};return e.includeHtml&&(o.childNodes=t.childNodes),o}function l(l,r){for(var i=o(l),s=n(l),c=r,a=t(c),u=a?a.headingLevel:0,d=s-u;d>0;)a=t(c),a&&void 0!==a.children&&(c=a.children),d--;return s>=e.collapseDepth&&(i.isCollapsed=!0),c.push(i),c}function r(t,n){var o=n;e.ignoreSelector&&(o=n.split(",").map(function(t){return t.trim()+":not("+e.ignoreSelector+")"}));try{return document.querySelector(t).querySelectorAll(o)}catch(e){return console.warn("Element not found: "+t),null}}function i(e){return s.call(e,function(e,t){return l(o(t),e.nest),e},{nest:[]})}var s=[].reduce;return{nestHeadingsArray:i,selectHeadings:r}}},function(e,t){function n(e){function t(e){return"a"===e.tagName.toLowerCase()&&(e.hash.length>0||"#"===e.href.charAt(e.href.length-1))&&(n(e.href)===s||n(e.href)+"#"===s)}function n(e){return e.slice(0,e.lastIndexOf("#"))}function l(e){var t=document.getElementById(e.substring(1));t&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}!function(){document.documentElement.style}();var r=e.duration,i=e.offset,s=location.hash?n(location.href):location.href;!function(){function n(n){!t(n.target)||n.target.className.indexOf("no-smooth-scroll")>-1||"#"===n.target.href.charAt(n.target.href.length-2)&&"!"===n.target.href.charAt(n.target.href.length-1)||-1===n.target.className.indexOf(e.linkClass)||o(n.target.hash,{duration:r,offset:i,callback:function(){l(n.target.hash)}})}document.body.addEventListener("click",n,!1)}()}function o(e,t){function n(e){i=e-r,window.scrollTo(0,c.easing(i,s,u,d)),i e.fixedSidebarOffset ? -1 === n.className.indexOf(e.positionFixedClass) && (n.className += h + e.positionFixedClass) : n.className = n.className.split(h + e.positionFixedClass).join("") + } + + function i(t) { + if (e.scrollContainer && document.querySelector(e.scrollContainer)) var n = document.querySelector(e.scrollContainer).scrollTop; + else var n = document.documentElement.scrollTop || f.scrollTop; + e.positionFixedSelector && r(); + var o, l = t; + if (m && null !== document.querySelector(e.tocSelector) && l.length > 0) { + d.call(l, function (t, r) { + if (t.offsetTop > n + e.headingsOffset + 10) { + return o = l[0 === r ? r : r - 1], !0 + } + if (r === l.length - 1) return o = l[l.length - 1], !0 + }); + var i = document.querySelector(e.tocSelector).querySelectorAll("." + e.linkClass); + u.call(i, function (t) { + t.className = t.className.split(h + e.activeLinkClass).join("") + }); + var c = document.querySelector(e.tocSelector).querySelectorAll("." + e.listItemClass); + u.call(c, function (t) { + t.className = t.className.split(h + e.activeListItemClass).join("") + }); + var a = document.querySelector(e.tocSelector).querySelector("." + e.linkClass + ".node-name--" + o.nodeName + '[href="#' + o.id + '"]'); - 1 === a.className.indexOf(e.activeLinkClass) && (a.className += h + e.activeLinkClass); + var p = a.parentNode; + p && -1 === p.className.indexOf(e.activeListItemClass) && (p.className += h + e.activeListItemClass); + var C = document.querySelector(e.tocSelector).querySelectorAll("." + e.listClass + "." + e.collapsibleClass); + u.call(C, function (t) { + -1 === t.className.indexOf(e.isCollapsedClass) && (t.className += h + e.isCollapsedClass) + }), a.nextSibling && -1 !== a.nextSibling.className.indexOf(e.isCollapsedClass) && (a.nextSibling.className = a.nextSibling.className.split(h + e.isCollapsedClass).join("")), s(a.parentNode.parentNode) + } + } + + function s(t) { + return -1 !== t.className.indexOf(e.collapsibleClass) && -1 !== t.className.indexOf(e.isCollapsedClass) ? (t.className = t.className.split(h + e.isCollapsedClass).join(""), s(t.parentNode.parentNode)) : t + } + + function c(t) { + var n = t.target || t.srcElement; + "string" == typeof n.className && -1 !== n.className.indexOf(e.linkClass) && (m = !1) + } + + function a() { + m = !0 + } + var u = [].forEach, + d = [].some, + f = document.body, + m = !0, + h = " "; + return { + enableTocAnimation: a, + disableTocAnimation: c, + render: n, + updateToc: i + } + } +}, function (e, t) { + e.exports = function (e) { + function t(e) { + return e[e.length - 1] + } + + function n(e) { + return +e.nodeName.split("H").join("") + } + + function o(t) { + var o = { + id: t.id, + children: [], + nodeName: t.nodeName, + headingLevel: n(t), + textContent: t.textContent.trim() + }; + return e.includeHtml && (o.childNodes = t.childNodes), o + } + + function l(l, r) { + for (var i = o(l), s = n(l), c = r, a = t(c), u = a ? a.headingLevel : 0, d = s - u; d > 0;) a = t(c), a && void 0 !== a.children && (c = a.children), d--; + return s >= e.collapseDepth && (i.isCollapsed = !0), c.push(i), c + } + + function r(t, n) { + var o = n; + e.ignoreSelector && (o = n.split(",").map(function (t) { + return t.trim() + ":not(" + e.ignoreSelector + ")" + })); + try { + return document.querySelector(t).querySelectorAll(o) + } catch (e) { + return console.warn("Element not found: " + t), null + } + } + + function i(e) { + return s.call(e, function (e, t) { + return l(o(t), e.nest), e + }, { + nest: [] + }) + } + var s = [].reduce; + return { + nestHeadingsArray: i, + selectHeadings: r + } + } +}, function (e, t) { + function n(e) { + function t(e) { + return "a" === e.tagName.toLowerCase() && (e.hash.length > 0 || "#" === e.href.charAt(e.href.length - 1)) && (n(e.href) === s || n(e.href) + "#" === s) + } + + function n(e) { + return e.slice(0, e.lastIndexOf("#")) + } + + function l(e) { + var t = document.getElementById(e.substring(1)); + t && (/^(?:a|select|input|button|textarea)$/i.test(t.tagName) || (t.tabIndex = -1), t.focus()) + }! function () { + document.documentElement.style + }(); + var r = e.duration, + i = e.offset, + s = location.hash ? n(location.href) : location.href; + ! function () { + function n(n) { + !t(n.target) || n.target.className.indexOf("no-smooth-scroll") > -1 || "#" === n.target.href.charAt(n.target.href.length - 2) && "!" === n.target.href.charAt(n.target.href.length - 1) || -1 === n.target.className.indexOf(e.linkClass) || o(n.target.hash, { + duration: r, + offset: i, + callback: function () { + l(n.target.hash) + } + }) + } + document.body.addEventListener("click", n, !1) + }() + } + + function o(e, t) { + function n(e) { + i = e - r, window.scrollTo(0, c.easing(i, s, u, d)), i < d ? requestAnimationFrame(n) : o() + } + + function o() { + window.scrollTo(0, s + u), "function" == typeof c.callback && c.callback() + } + + function l(e, t, n, o) { + return (e /= o / 2) < 1 ? n / 2 * e * e + t : (e--, -n / 2 * (e * (e - 2) - 1) + t) + } + var r, i, s = window.pageYOffset, + c = { + duration: t.duration, + offset: t.offset || 0, + callback: t.callback, + easing: t.easing || l + }, + a = document.querySelector('[id="' + decodeURI(e).split("#").join("") + '"]'), + u = "string" == typeof e ? c.offset + (e ? a && a.getBoundingClientRect().top || 0 : -(document.documentElement.scrollTop || document.body.scrollTop)) : e, + d = "function" == typeof c.duration ? c.duration(u) : c.duration; + requestAnimationFrame(function (e) { + r = e, n(e) + }) + } + t.initSmoothScrolling = n +}]); function social_share() { var QRCode; - !function() { + ! function () { function t(t) { this.mode = s.MODE_8BIT_BYTE, - this.data = t, - this.parsedData = []; + this.data = t, + this.parsedData = []; for (var e = 0, r = this.data.length; e < r; e++) { - var i = [] - , n = this.data.charCodeAt(e); + var i = [], + n = this.data.charCodeAt(e); n > 65536 ? (i[0] = 240 | (1835008 & n) >>> 18, - i[1] = 128 | (258048 & n) >>> 12, - i[2] = 128 | (4032 & n) >>> 6, - i[3] = 128 | 63 & n) : n > 2048 ? (i[0] = 224 | (61440 & n) >>> 12, - i[1] = 128 | (4032 & n) >>> 6, - i[2] = 128 | 63 & n) : n > 128 ? (i[0] = 192 | (1984 & n) >>> 6, - i[1] = 128 | 63 & n) : i[0] = n, - this.parsedData.push(i) + i[1] = 128 | (258048 & n) >>> 12, + i[2] = 128 | (4032 & n) >>> 6, + i[3] = 128 | 63 & n) : n > 2048 ? (i[0] = 224 | (61440 & n) >>> 12, + i[1] = 128 | (4032 & n) >>> 6, + i[2] = 128 | 63 & n) : n > 128 ? (i[0] = 192 | (1984 & n) >>> 6, + i[1] = 128 | 63 & n) : i[0] = n, + this.parsedData.push(i) } this.parsedData = Array.prototype.concat.apply([], this.parsedData), - this.parsedData.length != this.data.length && (this.parsedData.unshift(191), - this.parsedData.unshift(187), - this.parsedData.unshift(239)) + this.parsedData.length != this.data.length && (this.parsedData.unshift(191), + this.parsedData.unshift(187), + this.parsedData.unshift(239)) } + function e(t, e) { this.typeNumber = t, - this.errorCorrectLevel = e, - this.modules = null, - this.moduleCount = 0, - this.dataCache = null, - this.dataList = [] + this.errorCorrectLevel = e, + this.modules = null, + this.moduleCount = 0, + this.dataCache = null, + this.dataList = [] } + function r(t, e) { if (void 0 == t.length) throw new Error(t.length + "/" + e); - for (var r = 0; r < t.length && 0 == t[r]; ) + for (var r = 0; r < t.length && 0 == t[r];) r++; this.num = new Array(t.length - r + e); for (var i = 0; i < t.length - r; i++) this.num[i] = t[i + r] } + function i(t, e) { this.totalCount = t, - this.dataCount = e + this.dataCount = e } + function n() { this.buffer = [], - this.length = 0 + this.length = 0 } + function o() { - var t = !1 - , e = navigator.userAgent; + var t = !1, + e = navigator.userAgent; if (/android/i.test(e)) { t = !0; var r = e.toString().match(/android ([0-9]\.[0-9])/i); @@ -15636,24 +16311,25 @@ function social_share() { } return t } + function a(t, e) { - for (var r = 1, i = function(t) { - var e = encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g, "a"); - return e.length + (e.length != t ? 3 : 0) - }(t), n = 0, o = d.length; n <= o; n++) { + for (var r = 1, i = function (t) { + var e = encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g, "a"); + return e.length + (e.length != t ? 3 : 0) + }(t), n = 0, o = d.length; n <= o; n++) { var a = 0; switch (e) { - case h.L: - a = d[n][0]; - break; - case h.M: - a = d[n][1]; - break; - case h.Q: - a = d[n][2]; - break; - case h.H: - a = d[n][3] + case h.L: + a = d[n][0]; + break; + case h.M: + a = d[n][1]; + break; + case h.Q: + a = d[n][2]; + break; + case h.H: + a = d[n][3] } if (i <= a) break; @@ -15664,786 +16340,1014 @@ function social_share() { return r } t.prototype = { - getLength: function(t) { - return this.parsedData.length - }, - write: function(t) { - for (var e = 0, r = this.parsedData.length; e < r; e++) - t.put(this.parsedData[e], 8) - } - }, - e.prototype = { - addData: function(e) { - var r = new t(e); - this.dataList.push(r), - this.dataCache = null - }, - isDark: function(t, e) { - if (t < 0 || this.moduleCount <= t || e < 0 || this.moduleCount <= e) - throw new Error(t + "," + e); - return this.modules[t][e] - }, - getModuleCount: function() { - return this.moduleCount - }, - make: function() { - this.makeImpl(!1, this.getBestMaskPattern()) - }, - makeImpl: function(t, r) { - this.moduleCount = 4 * this.typeNumber + 17, - this.modules = new Array(this.moduleCount); - for (var i = 0; i < this.moduleCount; i++) { - this.modules[i] = new Array(this.moduleCount); - for (var n = 0; n < this.moduleCount; n++) - this.modules[i][n] = null - } - this.setupPositionProbePattern(0, 0), - this.setupPositionProbePattern(this.moduleCount - 7, 0), - this.setupPositionProbePattern(0, this.moduleCount - 7), - this.setupPositionAdjustPattern(), - this.setupTimingPattern(), - this.setupTypeInfo(t, r), - this.typeNumber >= 7 && this.setupTypeNumber(t), - null == this.dataCache && (this.dataCache = e.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)), - this.mapData(this.dataCache, r) - }, - setupPositionProbePattern: function(t, e) { - for (var r = -1; r <= 7; r++) - if (!(t + r <= -1 || this.moduleCount <= t + r)) - for (var i = -1; i <= 7; i++) - e + i <= -1 || this.moduleCount <= e + i || (this.modules[t + r][e + i] = 0 <= r && r <= 6 && (0 == i || 6 == i) || 0 <= i && i <= 6 && (0 == r || 6 == r) || 2 <= r && r <= 4 && 2 <= i && i <= 4) - }, - getBestMaskPattern: function() { - for (var t = 0, e = 0, r = 0; r < 8; r++) { - this.makeImpl(!0, r); - var i = u.getLostPoint(this); - (0 == r || t > i) && (t = i, - e = r) + getLength: function (t) { + return this.parsedData.length + }, + write: function (t) { + for (var e = 0, r = this.parsedData.length; e < r; e++) + t.put(this.parsedData[e], 8) } - return e }, - createMovieClip: function(t, e, r) { - var i = t.createEmptyMovieClip(e, r); - this.make(); - for (var n = 0; n < this.modules.length; n++) - for (var o = 1 * n, a = 0; a < this.modules[n].length; a++) { - var s = 1 * a; - this.modules[n][a] && (i.beginFill(0, 100), - i.moveTo(s, o), - i.lineTo(s + 1, o), - i.lineTo(s + 1, o + 1), - i.lineTo(s, o + 1), - i.endFill()) + e.prototype = { + addData: function (e) { + var r = new t(e); + this.dataList.push(r), + this.dataCache = null + }, + isDark: function (t, e) { + if (t < 0 || this.moduleCount <= t || e < 0 || this.moduleCount <= e) + throw new Error(t + "," + e); + return this.modules[t][e] + }, + getModuleCount: function () { + return this.moduleCount + }, + make: function () { + this.makeImpl(!1, this.getBestMaskPattern()) + }, + makeImpl: function (t, r) { + this.moduleCount = 4 * this.typeNumber + 17, + this.modules = new Array(this.moduleCount); + for (var i = 0; i < this.moduleCount; i++) { + this.modules[i] = new Array(this.moduleCount); + for (var n = 0; n < this.moduleCount; n++) + this.modules[i][n] = null } - return i - }, - setupTimingPattern: function() { - for (var t = 8; t < this.moduleCount - 8; t++) - null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0); - for (var e = 8; e < this.moduleCount - 8; e++) - null == this.modules[6][e] && (this.modules[6][e] = e % 2 == 0) - }, - setupPositionAdjustPattern: function() { - for (var t = u.getPatternPosition(this.typeNumber), e = 0; e < t.length; e++) - for (var r = 0; r < t.length; r++) { - var i = t[e] - , n = t[r]; - if (null == this.modules[i][n]) - for (var o = -2; o <= 2; o++) - for (var a = -2; a <= 2; a++) - this.modules[i + o][n + a] = -2 == o || 2 == o || -2 == a || 2 == a || 0 == o && 0 == a + this.setupPositionProbePattern(0, 0), + this.setupPositionProbePattern(this.moduleCount - 7, 0), + this.setupPositionProbePattern(0, this.moduleCount - 7), + this.setupPositionAdjustPattern(), + this.setupTimingPattern(), + this.setupTypeInfo(t, r), + this.typeNumber >= 7 && this.setupTypeNumber(t), + null == this.dataCache && (this.dataCache = e.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)), + this.mapData(this.dataCache, r) + }, + setupPositionProbePattern: function (t, e) { + for (var r = -1; r <= 7; r++) + if (!(t + r <= -1 || this.moduleCount <= t + r)) + for (var i = -1; i <= 7; i++) + e + i <= -1 || this.moduleCount <= e + i || (this.modules[t + r][e + i] = 0 <= r && r <= 6 && (0 == i || 6 == i) || 0 <= i && i <= 6 && (0 == r || 6 == r) || 2 <= r && r <= 4 && 2 <= i && i <= 4) + }, + getBestMaskPattern: function () { + for (var t = 0, e = 0, r = 0; r < 8; r++) { + this.makeImpl(!0, r); + var i = u.getLostPoint(this); + (0 == r || t > i) && (t = i, + e = r) } - }, - setupTypeNumber: function(t) { - for (var e = u.getBCHTypeNumber(this.typeNumber), r = 0; r < 18; r++) { - i = !t && 1 == (e >> r & 1); - this.modules[Math.floor(r / 3)][r % 3 + this.moduleCount - 8 - 3] = i - } - for (r = 0; r < 18; r++) { - var i = !t && 1 == (e >> r & 1); - this.modules[r % 3 + this.moduleCount - 8 - 3][Math.floor(r / 3)] = i - } - }, - setupTypeInfo: function(t, e) { - for (var r = this.errorCorrectLevel << 3 | e, i = u.getBCHTypeInfo(r), n = 0; n < 15; n++) { - o = !t && 1 == (i >> n & 1); - n < 6 ? this.modules[n][8] = o : n < 8 ? this.modules[n + 1][8] = o : this.modules[this.moduleCount - 15 + n][8] = o - } - for (n = 0; n < 15; n++) { - var o = !t && 1 == (i >> n & 1); - n < 8 ? this.modules[8][this.moduleCount - n - 1] = o : n < 9 ? this.modules[8][15 - n - 1 + 1] = o : this.modules[8][15 - n - 1] = o - } - this.modules[this.moduleCount - 8][8] = !t - }, - mapData: function(t, e) { - for (var r = -1, i = this.moduleCount - 1, n = 7, o = 0, a = this.moduleCount - 1; a > 0; a -= 2) - for (6 == a && a--; ; ) { - for (var s = 0; s < 2; s++) - if (null == this.modules[i][a - s]) { - var h = !1; - o < t.length && (h = 1 == (t[o] >>> n & 1)); - u.getMask(e, i, a - s) && (h = !h), - this.modules[i][a - s] = h, - -1 == --n && (o++, - n = 7) - } - if ((i += r) < 0 || this.moduleCount <= i) { - i -= r, - r = -r; - break + return e + }, + createMovieClip: function (t, e, r) { + var i = t.createEmptyMovieClip(e, r); + this.make(); + for (var n = 0; n < this.modules.length; n++) + for (var o = 1 * n, a = 0; a < this.modules[n].length; a++) { + var s = 1 * a; + this.modules[n][a] && (i.beginFill(0, 100), + i.moveTo(s, o), + i.lineTo(s + 1, o), + i.lineTo(s + 1, o + 1), + i.lineTo(s, o + 1), + i.endFill()) } + return i + }, + setupTimingPattern: function () { + for (var t = 8; t < this.moduleCount - 8; t++) + null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0); + for (var e = 8; e < this.moduleCount - 8; e++) + null == this.modules[6][e] && (this.modules[6][e] = e % 2 == 0) + }, + setupPositionAdjustPattern: function () { + for (var t = u.getPatternPosition(this.typeNumber), e = 0; e < t.length; e++) + for (var r = 0; r < t.length; r++) { + var i = t[e], + n = t[r]; + if (null == this.modules[i][n]) + for (var o = -2; o <= 2; o++) + for (var a = -2; a <= 2; a++) + this.modules[i + o][n + a] = -2 == o || 2 == o || -2 == a || 2 == a || 0 == o && 0 == a + } + }, + setupTypeNumber: function (t) { + for (var e = u.getBCHTypeNumber(this.typeNumber), r = 0; r < 18; r++) { + i = !t && 1 == (e >> r & 1); + this.modules[Math.floor(r / 3)][r % 3 + this.moduleCount - 8 - 3] = i } - } - }, - e.PAD0 = 236, - e.PAD1 = 17, - e.createData = function(t, r, o) { - for (var a = i.getRSBlocks(t, r), s = new n, h = 0; h < o.length; h++) { - var l = o[h]; - s.put(l.mode, 4), - s.put(l.getLength(), u.getLengthInBits(l.mode, t)), - l.write(s) - } - for (var c = 0, h = 0; h < a.length; h++) - c += a[h].dataCount; - if (s.getLengthInBits() > 8 * c) - throw new Error("code length overflow. (" + s.getLengthInBits() + ">" + 8 * c + ")"); - for (s.getLengthInBits() + 4 <= 8 * c && s.put(0, 4); s.getLengthInBits() % 8 != 0; ) - s.putBit(!1); - for (; ; ) { - if (s.getLengthInBits() >= 8 * c) - break; - if (s.put(e.PAD0, 8), - s.getLengthInBits() >= 8 * c) - break; - s.put(e.PAD1, 8) - } - return e.createBytes(s, a) - } - , - e.createBytes = function(t, e) { - for (var i = 0, n = 0, o = 0, a = new Array(e.length), s = new Array(e.length), h = 0; h < e.length; h++) { - var l = e[h].dataCount - , c = e[h].totalCount - l; - n = Math.max(n, l), - o = Math.max(o, c), - a[h] = new Array(l); - for (m = 0; m < a[h].length; m++) - a[h][m] = 255 & t.buffer[m + i]; - i += l; - var f = u.getErrorCorrectPolynomial(c) - , d = new r(a[h],f.getLength() - 1).mod(f); - s[h] = new Array(f.getLength() - 1); - for (m = 0; m < s[h].length; m++) { - var g = m + d.getLength() - s[h].length; - s[h][m] = g >= 0 ? d.get(g) : 0 - } - } - for (var p = 0, m = 0; m < e.length; m++) - p += e[m].totalCount; - for (var v = new Array(p), w = 0, m = 0; m < n; m++) - for (h = 0; h < e.length; h++) - m < a[h].length && (v[w++] = a[h][m]); - for (m = 0; m < o; m++) - for (h = 0; h < e.length; h++) - m < s[h].length && (v[w++] = s[h][m]); - return v - } - ; - for (var s = { - MODE_NUMBER: 1, - MODE_ALPHA_NUM: 2, - MODE_8BIT_BYTE: 4, - MODE_KANJI: 8 - }, h = { - L: 1, - M: 0, - Q: 3, - H: 2 - }, l = { - PATTERN000: 0, - PATTERN001: 1, - PATTERN010: 2, - PATTERN011: 3, - PATTERN100: 4, - PATTERN101: 5, - PATTERN110: 6, - PATTERN111: 7 - }, u = { - PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], - G15: 1335, - G18: 7973, - G15_MASK: 21522, - getBCHTypeInfo: function(t) { - for (var e = t << 10; u.getBCHDigit(e) - u.getBCHDigit(u.G15) >= 0; ) - e ^= u.G15 << u.getBCHDigit(e) - u.getBCHDigit(u.G15); - return (t << 10 | e) ^ u.G15_MASK - }, - getBCHTypeNumber: function(t) { - for (var e = t << 12; u.getBCHDigit(e) - u.getBCHDigit(u.G18) >= 0; ) - e ^= u.G18 << u.getBCHDigit(e) - u.getBCHDigit(u.G18); - return t << 12 | e - }, - getBCHDigit: function(t) { - for (var e = 0; 0 != t; ) - e++, - t >>>= 1; - return e - }, - getPatternPosition: function(t) { - return u.PATTERN_POSITION_TABLE[t - 1] - }, - getMask: function(t, e, r) { - switch (t) { - case l.PATTERN000: - return (e + r) % 2 == 0; - case l.PATTERN001: - return e % 2 == 0; - case l.PATTERN010: - return r % 3 == 0; - case l.PATTERN011: - return (e + r) % 3 == 0; - case l.PATTERN100: - return (Math.floor(e / 2) + Math.floor(r / 3)) % 2 == 0; - case l.PATTERN101: - return e * r % 2 + e * r % 3 == 0; - case l.PATTERN110: - return (e * r % 2 + e * r % 3) % 2 == 0; - case l.PATTERN111: - return (e * r % 3 + (e + r) % 2) % 2 == 0; - default: - throw new Error("bad maskPattern:" + t) - } - }, - getErrorCorrectPolynomial: function(t) { - for (var e = new r([1],0), i = 0; i < t; i++) - e = e.multiply(new r([1, c.gexp(i)],0)); - return e - }, - getLengthInBits: function(t, e) { - if (1 <= e && e < 10) - switch (t) { - case s.MODE_NUMBER: - return 10; - case s.MODE_ALPHA_NUM: - return 9; - case s.MODE_8BIT_BYTE: - case s.MODE_KANJI: - return 8; - default: - throw new Error("mode:" + t) - } - else if (e < 27) - switch (t) { - case s.MODE_NUMBER: - return 12; - case s.MODE_ALPHA_NUM: - return 11; - case s.MODE_8BIT_BYTE: - return 16; - case s.MODE_KANJI: - return 10; - default: - throw new Error("mode:" + t) + for (r = 0; r < 18; r++) { + var i = !t && 1 == (e >> r & 1); + this.modules[r % 3 + this.moduleCount - 8 - 3][Math.floor(r / 3)] = i } - else { - if (!(e < 41)) - throw new Error("type:" + e); - switch (t) { - case s.MODE_NUMBER: - return 14; - case s.MODE_ALPHA_NUM: - return 13; - case s.MODE_8BIT_BYTE: - return 16; - case s.MODE_KANJI: - return 12; - default: - throw new Error("mode:" + t) + }, + setupTypeInfo: function (t, e) { + for (var r = this.errorCorrectLevel << 3 | e, i = u.getBCHTypeInfo(r), n = 0; n < 15; n++) { + o = !t && 1 == (i >> n & 1); + n < 6 ? this.modules[n][8] = o : n < 8 ? this.modules[n + 1][8] = o : this.modules[this.moduleCount - 15 + n][8] = o } + for (n = 0; n < 15; n++) { + var o = !t && 1 == (i >> n & 1); + n < 8 ? this.modules[8][this.moduleCount - n - 1] = o : n < 9 ? this.modules[8][15 - n - 1 + 1] = o : this.modules[8][15 - n - 1] = o + } + this.modules[this.moduleCount - 8][8] = !t + }, + mapData: function (t, e) { + for (var r = -1, i = this.moduleCount - 1, n = 7, o = 0, a = this.moduleCount - 1; a > 0; a -= 2) + for (6 == a && a--;;) { + for (var s = 0; s < 2; s++) + if (null == this.modules[i][a - s]) { + var h = !1; + o < t.length && (h = 1 == (t[o] >>> n & 1)); + u.getMask(e, i, a - s) && (h = !h), + this.modules[i][a - s] = h, + -1 == --n && (o++, + n = 7) + } + if ((i += r) < 0 || this.moduleCount <= i) { + i -= r, + r = -r; + break + } + } + } + }, + e.PAD0 = 236, + e.PAD1 = 17, + e.createData = function (t, r, o) { + for (var a = i.getRSBlocks(t, r), s = new n, h = 0; h < o.length; h++) { + var l = o[h]; + s.put(l.mode, 4), + s.put(l.getLength(), u.getLengthInBits(l.mode, t)), + l.write(s) } + for (var c = 0, h = 0; h < a.length; h++) + c += a[h].dataCount; + if (s.getLengthInBits() > 8 * c) + throw new Error("code length overflow. (" + s.getLengthInBits() + ">" + 8 * c + ")"); + for (s.getLengthInBits() + 4 <= 8 * c && s.put(0, 4); s.getLengthInBits() % 8 != 0;) + s.putBit(!1); + for (;;) { + if (s.getLengthInBits() >= 8 * c) + break; + if (s.put(e.PAD0, 8), + s.getLengthInBits() >= 8 * c) + break; + s.put(e.PAD1, 8) + } + return e.createBytes(s, a) }, - getLostPoint: function(t) { - for (var e = t.getModuleCount(), r = 0, i = 0; i < e; i++) - for (u = 0; u < e; u++) { - for (var n = 0, o = t.isDark(i, u), a = -1; a <= 1; a++) - if (!(i + a < 0 || e <= i + a)) - for (var s = -1; s <= 1; s++) - u + s < 0 || e <= u + s || 0 == a && 0 == s || o == t.isDark(i + a, u + s) && n++; - n > 5 && (r += 3 + n - 5) + e.createBytes = function (t, e) { + for (var i = 0, n = 0, o = 0, a = new Array(e.length), s = new Array(e.length), h = 0; h < e.length; h++) { + var l = e[h].dataCount, + c = e[h].totalCount - l; + n = Math.max(n, l), + o = Math.max(o, c), + a[h] = new Array(l); + for (m = 0; m < a[h].length; m++) + a[h][m] = 255 & t.buffer[m + i]; + i += l; + var f = u.getErrorCorrectPolynomial(c), + d = new r(a[h], f.getLength() - 1).mod(f); + s[h] = new Array(f.getLength() - 1); + for (m = 0; m < s[h].length; m++) { + var g = m + d.getLength() - s[h].length; + s[h][m] = g >= 0 ? d.get(g) : 0 + } + } + for (var p = 0, m = 0; m < e.length; m++) + p += e[m].totalCount; + for (var v = new Array(p), w = 0, m = 0; m < n; m++) + for (h = 0; h < e.length; h++) + m < a[h].length && (v[w++] = a[h][m]); + for (m = 0; m < o; m++) + for (h = 0; h < e.length; h++) + m < s[h].length && (v[w++] = s[h][m]); + return v + }; + for (var s = { + MODE_NUMBER: 1, + MODE_ALPHA_NUM: 2, + MODE_8BIT_BYTE: 4, + MODE_KANJI: 8 + }, h = { + L: 1, + M: 0, + Q: 3, + H: 2 + }, l = { + PATTERN000: 0, + PATTERN001: 1, + PATTERN010: 2, + PATTERN011: 3, + PATTERN100: 4, + PATTERN101: 5, + PATTERN110: 6, + PATTERN111: 7 + }, u = { + PATTERN_POSITION_TABLE: [ + [], + [6, 18], + [6, 22], + [6, 26], + [6, 30], + [6, 34], + [6, 22, 38], + [6, 24, 42], + [6, 26, 46], + [6, 28, 50], + [6, 30, 54], + [6, 32, 58], + [6, 34, 62], + [6, 26, 46, 66], + [6, 26, 48, 70], + [6, 26, 50, 74], + [6, 30, 54, 78], + [6, 30, 56, 82], + [6, 30, 58, 86], + [6, 34, 62, 90], + [6, 28, 50, 72, 94], + [6, 26, 50, 74, 98], + [6, 30, 54, 78, 102], + [6, 28, 54, 80, 106], + [6, 32, 58, 84, 110], + [6, 30, 58, 86, 114], + [6, 34, 62, 90, 118], + [6, 26, 50, 74, 98, 122], + [6, 30, 54, 78, 102, 126], + [6, 26, 52, 78, 104, 130], + [6, 30, 56, 82, 108, 134], + [6, 34, 60, 86, 112, 138], + [6, 30, 58, 86, 114, 142], + [6, 34, 62, 90, 118, 146], + [6, 30, 54, 78, 102, 126, 150], + [6, 24, 50, 76, 102, 128, 154], + [6, 28, 54, 80, 106, 132, 158], + [6, 32, 58, 84, 110, 136, 162], + [6, 26, 54, 82, 110, 138, 166], + [6, 30, 58, 86, 114, 142, 170] + ], + G15: 1335, + G18: 7973, + G15_MASK: 21522, + getBCHTypeInfo: function (t) { + for (var e = t << 10; u.getBCHDigit(e) - u.getBCHDigit(u.G15) >= 0;) + e ^= u.G15 << u.getBCHDigit(e) - u.getBCHDigit(u.G15); + return (t << 10 | e) ^ u.G15_MASK + }, + getBCHTypeNumber: function (t) { + for (var e = t << 12; u.getBCHDigit(e) - u.getBCHDigit(u.G18) >= 0;) + e ^= u.G18 << u.getBCHDigit(e) - u.getBCHDigit(u.G18); + return t << 12 | e + }, + getBCHDigit: function (t) { + for (var e = 0; 0 != t;) + e++, + t >>>= 1; + return e + }, + getPatternPosition: function (t) { + return u.PATTERN_POSITION_TABLE[t - 1] + }, + getMask: function (t, e, r) { + switch (t) { + case l.PATTERN000: + return (e + r) % 2 == 0; + case l.PATTERN001: + return e % 2 == 0; + case l.PATTERN010: + return r % 3 == 0; + case l.PATTERN011: + return (e + r) % 3 == 0; + case l.PATTERN100: + return (Math.floor(e / 2) + Math.floor(r / 3)) % 2 == 0; + case l.PATTERN101: + return e * r % 2 + e * r % 3 == 0; + case l.PATTERN110: + return (e * r % 2 + e * r % 3) % 2 == 0; + case l.PATTERN111: + return (e * r % 3 + (e + r) % 2) % 2 == 0; + default: + throw new Error("bad maskPattern:" + t) } - for (i = 0; i < e - 1; i++) - for (u = 0; u < e - 1; u++) { - var h = 0; - t.isDark(i, u) && h++, - t.isDark(i + 1, u) && h++, - t.isDark(i, u + 1) && h++, - t.isDark(i + 1, u + 1) && h++, - 0 != h && 4 != h || (r += 3) + }, + getErrorCorrectPolynomial: function (t) { + for (var e = new r([1], 0), i = 0; i < t; i++) + e = e.multiply(new r([1, c.gexp(i)], 0)); + return e + }, + getLengthInBits: function (t, e) { + if (1 <= e && e < 10) + switch (t) { + case s.MODE_NUMBER: + return 10; + case s.MODE_ALPHA_NUM: + return 9; + case s.MODE_8BIT_BYTE: + case s.MODE_KANJI: + return 8; + default: + throw new Error("mode:" + t) + } + else if (e < 27) + switch (t) { + case s.MODE_NUMBER: + return 12; + case s.MODE_ALPHA_NUM: + return 11; + case s.MODE_8BIT_BYTE: + return 16; + case s.MODE_KANJI: + return 10; + default: + throw new Error("mode:" + t) + } + else { + if (!(e < 41)) + throw new Error("type:" + e); + switch (t) { + case s.MODE_NUMBER: + return 14; + case s.MODE_ALPHA_NUM: + return 13; + case s.MODE_8BIT_BYTE: + return 16; + case s.MODE_KANJI: + return 12; + default: + throw new Error("mode:" + t) + } } - for (i = 0; i < e; i++) - for (u = 0; u < e - 6; u++) - t.isDark(i, u) && !t.isDark(i, u + 1) && t.isDark(i, u + 2) && t.isDark(i, u + 3) && t.isDark(i, u + 4) && !t.isDark(i, u + 5) && t.isDark(i, u + 6) && (r += 40); - for (u = 0; u < e; u++) - for (i = 0; i < e - 6; i++) - t.isDark(i, u) && !t.isDark(i + 1, u) && t.isDark(i + 2, u) && t.isDark(i + 3, u) && t.isDark(i + 4, u) && !t.isDark(i + 5, u) && t.isDark(i + 6, u) && (r += 40); - for (var l = 0, u = 0; u < e; u++) + }, + getLostPoint: function (t) { + for (var e = t.getModuleCount(), r = 0, i = 0; i < e; i++) + for (u = 0; u < e; u++) { + for (var n = 0, o = t.isDark(i, u), a = -1; a <= 1; a++) + if (!(i + a < 0 || e <= i + a)) + for (var s = -1; s <= 1; s++) + u + s < 0 || e <= u + s || 0 == a && 0 == s || o == t.isDark(i + a, u + s) && n++; + n > 5 && (r += 3 + n - 5) + } + for (i = 0; i < e - 1; i++) + for (u = 0; u < e - 1; u++) { + var h = 0; + t.isDark(i, u) && h++, + t.isDark(i + 1, u) && h++, + t.isDark(i, u + 1) && h++, + t.isDark(i + 1, u + 1) && h++, + 0 != h && 4 != h || (r += 3) + } for (i = 0; i < e; i++) - t.isDark(i, u) && l++; - return r += 10 * (Math.abs(100 * l / e / e - 50) / 5) - } - }, c = { - glog: function(t) { - if (t < 1) - throw new Error("glog(" + t + ")"); - return c.LOG_TABLE[t] - }, - gexp: function(t) { - for (; t < 0; ) - t += 255; - for (; t >= 256; ) - t -= 255; - return c.EXP_TABLE[t] - }, - EXP_TABLE: new Array(256), - LOG_TABLE: new Array(256) - }, f = 0; f < 8; f++) + for (u = 0; u < e - 6; u++) + t.isDark(i, u) && !t.isDark(i, u + 1) && t.isDark(i, u + 2) && t.isDark(i, u + 3) && t.isDark(i, u + 4) && !t.isDark(i, u + 5) && t.isDark(i, u + 6) && (r += 40); + for (u = 0; u < e; u++) + for (i = 0; i < e - 6; i++) + t.isDark(i, u) && !t.isDark(i + 1, u) && t.isDark(i + 2, u) && t.isDark(i + 3, u) && t.isDark(i + 4, u) && !t.isDark(i + 5, u) && t.isDark(i + 6, u) && (r += 40); + for (var l = 0, u = 0; u < e; u++) + for (i = 0; i < e; i++) + t.isDark(i, u) && l++; + return r += 10 * (Math.abs(100 * l / e / e - 50) / 5) + } + }, c = { + glog: function (t) { + if (t < 1) + throw new Error("glog(" + t + ")"); + return c.LOG_TABLE[t] + }, + gexp: function (t) { + for (; t < 0;) + t += 255; + for (; t >= 256;) + t -= 255; + return c.EXP_TABLE[t] + }, + EXP_TABLE: new Array(256), + LOG_TABLE: new Array(256) + }, f = 0; f < 8; f++) c.EXP_TABLE[f] = 1 << f; for (f = 8; f < 256; f++) c.EXP_TABLE[f] = c.EXP_TABLE[f - 4] ^ c.EXP_TABLE[f - 5] ^ c.EXP_TABLE[f - 6] ^ c.EXP_TABLE[f - 8]; for (f = 0; f < 255; f++) c.LOG_TABLE[c.EXP_TABLE[f]] = f; r.prototype = { - get: function(t) { - return this.num[t] - }, - getLength: function() { - return this.num.length - }, - multiply: function(t) { - for (var e = new Array(this.getLength() + t.getLength() - 1), i = 0; i < this.getLength(); i++) - for (var n = 0; n < t.getLength(); n++) - e[i + n] ^= c.gexp(c.glog(this.get(i)) + c.glog(t.get(n))); - return new r(e,0) - }, - mod: function(t) { - if (this.getLength() - t.getLength() < 0) - return this; - for (var e = c.glog(this.get(0)) - c.glog(t.get(0)), i = new Array(this.getLength()), n = 0; n < this.getLength(); n++) - i[n] = this.get(n); - for (n = 0; n < t.getLength(); n++) - i[n] ^= c.gexp(c.glog(t.get(n)) + e); - return new r(i,0).mod(t) - } - }, - i.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]], - i.getRSBlocks = function(t, e) { - var r = i.getRsBlockTable(t, e); - if (void 0 == r) - throw new Error("bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + e); - for (var n = r.length / 3, o = [], a = 0; a < n; a++) - for (var s = r[3 * a + 0], h = r[3 * a + 1], l = r[3 * a + 2], u = 0; u < s; u++) - o.push(new i(h,l)); - return o - } - , - i.getRsBlockTable = function(t, e) { - switch (e) { - case h.L: - return i.RS_BLOCK_TABLE[4 * (t - 1) + 0]; - case h.M: - return i.RS_BLOCK_TABLE[4 * (t - 1) + 1]; - case h.Q: - return i.RS_BLOCK_TABLE[4 * (t - 1) + 2]; - case h.H: - return i.RS_BLOCK_TABLE[4 * (t - 1) + 3]; - default: - return - } - } - , - n.prototype = { - get: function(t) { - var e = Math.floor(t / 8); - return 1 == (this.buffer[e] >>> 7 - t % 8 & 1) + get: function (t) { + return this.num[t] + }, + getLength: function () { + return this.num.length + }, + multiply: function (t) { + for (var e = new Array(this.getLength() + t.getLength() - 1), i = 0; i < this.getLength(); i++) + for (var n = 0; n < t.getLength(); n++) + e[i + n] ^= c.gexp(c.glog(this.get(i)) + c.glog(t.get(n))); + return new r(e, 0) + }, + mod: function (t) { + if (this.getLength() - t.getLength() < 0) + return this; + for (var e = c.glog(this.get(0)) - c.glog(t.get(0)), i = new Array(this.getLength()), n = 0; n < this.getLength(); n++) + i[n] = this.get(n); + for (n = 0; n < t.getLength(); n++) + i[n] ^= c.gexp(c.glog(t.get(n)) + e); + return new r(i, 0).mod(t) + } }, - put: function(t, e) { - for (var r = 0; r < e; r++) - this.putBit(1 == (t >>> e - r - 1 & 1)) + i.RS_BLOCK_TABLE = [ + [1, 26, 19], + [1, 26, 16], + [1, 26, 13], + [1, 26, 9], + [1, 44, 34], + [1, 44, 28], + [1, 44, 22], + [1, 44, 16], + [1, 70, 55], + [1, 70, 44], + [2, 35, 17], + [2, 35, 13], + [1, 100, 80], + [2, 50, 32], + [2, 50, 24], + [4, 25, 9], + [1, 134, 108], + [2, 67, 43], + [2, 33, 15, 2, 34, 16], + [2, 33, 11, 2, 34, 12], + [2, 86, 68], + [4, 43, 27], + [4, 43, 19], + [4, 43, 15], + [2, 98, 78], + [4, 49, 31], + [2, 32, 14, 4, 33, 15], + [4, 39, 13, 1, 40, 14], + [2, 121, 97], + [2, 60, 38, 2, 61, 39], + [4, 40, 18, 2, 41, 19], + [4, 40, 14, 2, 41, 15], + [2, 146, 116], + [3, 58, 36, 2, 59, 37], + [4, 36, 16, 4, 37, 17], + [4, 36, 12, 4, 37, 13], + [2, 86, 68, 2, 87, 69], + [4, 69, 43, 1, 70, 44], + [6, 43, 19, 2, 44, 20], + [6, 43, 15, 2, 44, 16], + [4, 101, 81], + [1, 80, 50, 4, 81, 51], + [4, 50, 22, 4, 51, 23], + [3, 36, 12, 8, 37, 13], + [2, 116, 92, 2, 117, 93], + [6, 58, 36, 2, 59, 37], + [4, 46, 20, 6, 47, 21], + [7, 42, 14, 4, 43, 15], + [4, 133, 107], + [8, 59, 37, 1, 60, 38], + [8, 44, 20, 4, 45, 21], + [12, 33, 11, 4, 34, 12], + [3, 145, 115, 1, 146, 116], + [4, 64, 40, 5, 65, 41], + [11, 36, 16, 5, 37, 17], + [11, 36, 12, 5, 37, 13], + [5, 109, 87, 1, 110, 88], + [5, 65, 41, 5, 66, 42], + [5, 54, 24, 7, 55, 25], + [11, 36, 12], + [5, 122, 98, 1, 123, 99], + [7, 73, 45, 3, 74, 46], + [15, 43, 19, 2, 44, 20], + [3, 45, 15, 13, 46, 16], + [1, 135, 107, 5, 136, 108], + [10, 74, 46, 1, 75, 47], + [1, 50, 22, 15, 51, 23], + [2, 42, 14, 17, 43, 15], + [5, 150, 120, 1, 151, 121], + [9, 69, 43, 4, 70, 44], + [17, 50, 22, 1, 51, 23], + [2, 42, 14, 19, 43, 15], + [3, 141, 113, 4, 142, 114], + [3, 70, 44, 11, 71, 45], + [17, 47, 21, 4, 48, 22], + [9, 39, 13, 16, 40, 14], + [3, 135, 107, 5, 136, 108], + [3, 67, 41, 13, 68, 42], + [15, 54, 24, 5, 55, 25], + [15, 43, 15, 10, 44, 16], + [4, 144, 116, 4, 145, 117], + [17, 68, 42], + [17, 50, 22, 6, 51, 23], + [19, 46, 16, 6, 47, 17], + [2, 139, 111, 7, 140, 112], + [17, 74, 46], + [7, 54, 24, 16, 55, 25], + [34, 37, 13], + [4, 151, 121, 5, 152, 122], + [4, 75, 47, 14, 76, 48], + [11, 54, 24, 14, 55, 25], + [16, 45, 15, 14, 46, 16], + [6, 147, 117, 4, 148, 118], + [6, 73, 45, 14, 74, 46], + [11, 54, 24, 16, 55, 25], + [30, 46, 16, 2, 47, 17], + [8, 132, 106, 4, 133, 107], + [8, 75, 47, 13, 76, 48], + [7, 54, 24, 22, 55, 25], + [22, 45, 15, 13, 46, 16], + [10, 142, 114, 2, 143, 115], + [19, 74, 46, 4, 75, 47], + [28, 50, 22, 6, 51, 23], + [33, 46, 16, 4, 47, 17], + [8, 152, 122, 4, 153, 123], + [22, 73, 45, 3, 74, 46], + [8, 53, 23, 26, 54, 24], + [12, 45, 15, 28, 46, 16], + [3, 147, 117, 10, 148, 118], + [3, 73, 45, 23, 74, 46], + [4, 54, 24, 31, 55, 25], + [11, 45, 15, 31, 46, 16], + [7, 146, 116, 7, 147, 117], + [21, 73, 45, 7, 74, 46], + [1, 53, 23, 37, 54, 24], + [19, 45, 15, 26, 46, 16], + [5, 145, 115, 10, 146, 116], + [19, 75, 47, 10, 76, 48], + [15, 54, 24, 25, 55, 25], + [23, 45, 15, 25, 46, 16], + [13, 145, 115, 3, 146, 116], + [2, 74, 46, 29, 75, 47], + [42, 54, 24, 1, 55, 25], + [23, 45, 15, 28, 46, 16], + [17, 145, 115], + [10, 74, 46, 23, 75, 47], + [10, 54, 24, 35, 55, 25], + [19, 45, 15, 35, 46, 16], + [17, 145, 115, 1, 146, 116], + [14, 74, 46, 21, 75, 47], + [29, 54, 24, 19, 55, 25], + [11, 45, 15, 46, 46, 16], + [13, 145, 115, 6, 146, 116], + [14, 74, 46, 23, 75, 47], + [44, 54, 24, 7, 55, 25], + [59, 46, 16, 1, 47, 17], + [12, 151, 121, 7, 152, 122], + [12, 75, 47, 26, 76, 48], + [39, 54, 24, 14, 55, 25], + [22, 45, 15, 41, 46, 16], + [6, 151, 121, 14, 152, 122], + [6, 75, 47, 34, 76, 48], + [46, 54, 24, 10, 55, 25], + [2, 45, 15, 64, 46, 16], + [17, 152, 122, 4, 153, 123], + [29, 74, 46, 14, 75, 47], + [49, 54, 24, 10, 55, 25], + [24, 45, 15, 46, 46, 16], + [4, 152, 122, 18, 153, 123], + [13, 74, 46, 32, 75, 47], + [48, 54, 24, 14, 55, 25], + [42, 45, 15, 32, 46, 16], + [20, 147, 117, 4, 148, 118], + [40, 75, 47, 7, 76, 48], + [43, 54, 24, 22, 55, 25], + [10, 45, 15, 67, 46, 16], + [19, 148, 118, 6, 149, 119], + [18, 75, 47, 31, 76, 48], + [34, 54, 24, 34, 55, 25], + [20, 45, 15, 61, 46, 16] + ], + i.getRSBlocks = function (t, e) { + var r = i.getRsBlockTable(t, e); + if (void 0 == r) + throw new Error("bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + e); + for (var n = r.length / 3, o = [], a = 0; a < n; a++) + for (var s = r[3 * a + 0], h = r[3 * a + 1], l = r[3 * a + 2], u = 0; u < s; u++) + o.push(new i(h, l)); + return o }, - getLengthInBits: function() { - return this.length + i.getRsBlockTable = function (t, e) { + switch (e) { + case h.L: + return i.RS_BLOCK_TABLE[4 * (t - 1) + 0]; + case h.M: + return i.RS_BLOCK_TABLE[4 * (t - 1) + 1]; + case h.Q: + return i.RS_BLOCK_TABLE[4 * (t - 1) + 2]; + case h.H: + return i.RS_BLOCK_TABLE[4 * (t - 1) + 3]; + default: + return + } }, - putBit: function(t) { - var e = Math.floor(this.length / 8); - this.buffer.length <= e && this.buffer.push(0), - t && (this.buffer[e] |= 128 >>> this.length % 8), - this.length++ - } - }; - var d = [[17, 14, 11, 7], [32, 26, 20, 14], [53, 42, 32, 24], [78, 62, 46, 34], [106, 84, 60, 44], [134, 106, 74, 58], [154, 122, 86, 64], [192, 152, 108, 84], [230, 180, 130, 98], [271, 213, 151, 119], [321, 251, 177, 137], [367, 287, 203, 155], [425, 331, 241, 177], [458, 362, 258, 194], [520, 412, 292, 220], [586, 450, 322, 250], [644, 504, 364, 280], [718, 560, 394, 310], [792, 624, 442, 338], [858, 666, 482, 382], [929, 711, 509, 403], [1003, 779, 565, 439], [1091, 857, 611, 461], [1171, 911, 661, 511], [1273, 997, 715, 535], [1367, 1059, 751, 593], [1465, 1125, 805, 625], [1528, 1190, 868, 658], [1628, 1264, 908, 698], [1732, 1370, 982, 742], [1840, 1452, 1030, 790], [1952, 1538, 1112, 842], [2068, 1628, 1168, 898], [2188, 1722, 1228, 958], [2303, 1809, 1283, 983], [2431, 1911, 1351, 1051], [2563, 1989, 1423, 1093], [2699, 2099, 1499, 1139], [2809, 2213, 1579, 1219], [2953, 2331, 1663, 1273]] - , g = function() { - var t = function(t, e) { - this._el = t, - this._htOption = e - }; - return t.prototype.draw = function(t) { - function e(t, e) { - var r = document.createElementNS("http://www.w3.org/2000/svg", t); - for (var i in e) - e.hasOwnProperty(i) && r.setAttribute(i, e[i]); - return r + n.prototype = { + get: function (t) { + var e = Math.floor(t / 8); + return 1 == (this.buffer[e] >>> 7 - t % 8 & 1) + }, + put: function (t, e) { + for (var r = 0; r < e; r++) + this.putBit(1 == (t >>> e - r - 1 & 1)) + }, + getLengthInBits: function () { + return this.length + }, + putBit: function (t) { + var e = Math.floor(this.length / 8); + this.buffer.length <= e && this.buffer.push(0), + t && (this.buffer[e] |= 128 >>> this.length % 8), + this.length++ } - var r = this._htOption - , i = this._el - , n = t.getModuleCount(); - Math.floor(r.width / n), - Math.floor(r.height / n); - this.clear(); - var o = e("svg", { - viewBox: "0 0 " + String(n) + " " + String(n), - width: "100%", - height: "100%", - fill: r.colorLight - }); - o.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), - i.appendChild(o), - o.appendChild(e("rect", { - fill: r.colorLight, - width: "100%", - height: "100%" - })), - o.appendChild(e("rect", { - fill: r.colorDark, - width: "1", - height: "1", - id: "template" - })); - for (var a = 0; a < n; a++) - for (var s = 0; s < n; s++) - if (t.isDark(a, s)) { - var h = e("use", { - x: String(s), - y: String(a) - }); - h.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"), - o.appendChild(h) - } - } - , - t.prototype.clear = function() { - for (; this._el.hasChildNodes(); ) - this._el.removeChild(this._el.lastChild) - } - , - t - }() - , p = "svg" === document.documentElement.tagName.toLowerCase() ? g : "undefined" == typeof CanvasRenderingContext2D ? function() { - var t = function(t, e) { - this._el = t, - this._htOption = e }; - return t.prototype.draw = function(t) { - for (var e = this._htOption, r = this._el, i = t.getModuleCount(), n = Math.floor(e.width / i), o = Math.floor(e.height / i), a = [''], s = 0; s < i; s++) { - a.push(""); - for (var h = 0; h < i; h++) - a.push(''); - a.push("") - } - a.push("
            "), - r.innerHTML = a.join(""); - var l = r.childNodes[0] - , u = (e.width - l.offsetWidth) / 2 - , c = (e.height - l.offsetHeight) / 2; - u > 0 && c > 0 && (l.style.margin = c + "px " + u + "px") - } - , - t.prototype.clear = function() { - this._el.innerHTML = "" - } - , - t - }() : function() { - function t() { - this._elImage.src = this._elCanvas.toDataURL("image/png"), - this._elImage.style.display = "block", - this._elCanvas.style.display = "none" - } - if (this._android && this._android <= 2.1) { - var e = 1 / window.devicePixelRatio - , r = CanvasRenderingContext2D.prototype.drawImage; - CanvasRenderingContext2D.prototype.drawImage = function(t, i, n, o, a, s, h, l, u) { - if ("nodeName"in t && /img/i.test(t.nodeName)) - for (var c = arguments.length - 1; c >= 1; c--) - arguments[c] = arguments[c] * e; - else - void 0 === l && (arguments[1] *= e, - arguments[2] *= e, - arguments[3] *= e, - arguments[4] *= e); - r.apply(this, arguments) + var d = [ + [17, 14, 11, 7], + [32, 26, 20, 14], + [53, 42, 32, 24], + [78, 62, 46, 34], + [106, 84, 60, 44], + [134, 106, 74, 58], + [154, 122, 86, 64], + [192, 152, 108, 84], + [230, 180, 130, 98], + [271, 213, 151, 119], + [321, 251, 177, 137], + [367, 287, 203, 155], + [425, 331, 241, 177], + [458, 362, 258, 194], + [520, 412, 292, 220], + [586, 450, 322, 250], + [644, 504, 364, 280], + [718, 560, 394, 310], + [792, 624, 442, 338], + [858, 666, 482, 382], + [929, 711, 509, 403], + [1003, 779, 565, 439], + [1091, 857, 611, 461], + [1171, 911, 661, 511], + [1273, 997, 715, 535], + [1367, 1059, 751, 593], + [1465, 1125, 805, 625], + [1528, 1190, 868, 658], + [1628, 1264, 908, 698], + [1732, 1370, 982, 742], + [1840, 1452, 1030, 790], + [1952, 1538, 1112, 842], + [2068, 1628, 1168, 898], + [2188, 1722, 1228, 958], + [2303, 1809, 1283, 983], + [2431, 1911, 1351, 1051], + [2563, 1989, 1423, 1093], + [2699, 2099, 1499, 1139], + [2809, 2213, 1579, 1219], + [2953, 2331, 1663, 1273] + ], + g = function () { + var t = function (t, e) { + this._el = t, + this._htOption = e + }; + return t.prototype.draw = function (t) { + function e(t, e) { + var r = document.createElementNS("http://www.w3.org/2000/svg", t); + for (var i in e) + e.hasOwnProperty(i) && r.setAttribute(i, e[i]); + return r + } + var r = this._htOption, + i = this._el, + n = t.getModuleCount(); + Math.floor(r.width / n), + Math.floor(r.height / n); + this.clear(); + var o = e("svg", { + viewBox: "0 0 " + String(n) + " " + String(n), + width: "100%", + height: "100%", + fill: r.colorLight + }); + o.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), + i.appendChild(o), + o.appendChild(e("rect", { + fill: r.colorLight, + width: "100%", + height: "100%" + })), + o.appendChild(e("rect", { + fill: r.colorDark, + width: "1", + height: "1", + id: "template" + })); + for (var a = 0; a < n; a++) + for (var s = 0; s < n; s++) + if (t.isDark(a, s)) { + var h = e("use", { + x: String(s), + y: String(a) + }); + h.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"), + o.appendChild(h) + } + }, + t.prototype.clear = function () { + for (; this._el.hasChildNodes();) + this._el.removeChild(this._el.lastChild) + }, + t + }(), + p = "svg" === document.documentElement.tagName.toLowerCase() ? g : "undefined" == typeof CanvasRenderingContext2D ? function () { + var t = function (t, e) { + this._el = t, + this._htOption = e + }; + return t.prototype.draw = function (t) { + for (var e = this._htOption, r = this._el, i = t.getModuleCount(), n = Math.floor(e.width / i), o = Math.floor(e.height / i), a = [''], s = 0; s < i; s++) { + a.push(""); + for (var h = 0; h < i; h++) + a.push(''); + a.push("") + } + a.push("
            "), + r.innerHTML = a.join(""); + var l = r.childNodes[0], + u = (e.width - l.offsetWidth) / 2, + c = (e.height - l.offsetHeight) / 2; + u > 0 && c > 0 && (l.style.margin = c + "px " + u + "px") + }, + t.prototype.clear = function () { + this._el.innerHTML = "" + }, + t + }() : function () { + function t() { + this._elImage.src = this._elCanvas.toDataURL("image/png"), + this._elImage.style.display = "block", + this._elCanvas.style.display = "none" } - } - var i = function(t, e) { - this._bIsPainted = !1, - this._android = o(), - this._htOption = e, - this._elCanvas = document.createElement("canvas"), - this._elCanvas.width = e.width, - this._elCanvas.height = e.height, - t.appendChild(this._elCanvas), - this._el = t, - this._oContext = this._elCanvas.getContext("2d"), - this._bIsPainted = !1, - this._elImage = document.createElement("img"), - this._elImage.alt = "Scan me!", - this._elImage.style.display = "none", - this._el.appendChild(this._elImage), - this._bSupportDataURI = null - }; - return i.prototype.draw = function(t) { - var e = this._elImage - , r = this._oContext - , i = this._htOption - , n = t.getModuleCount() - , o = i.width / n - , a = i.height / n - , s = Math.round(o) - , h = Math.round(a); - e.style.display = "none", - this.clear(); - for (var l = 0; l < n; l++) - for (var u = 0; u < n; u++) { - var c = t.isDark(l, u) - , f = u * o - , d = l * a; - r.strokeStyle = c ? i.colorDark : i.colorLight, - r.lineWidth = 1, - r.fillStyle = c ? i.colorDark : i.colorLight, - r.fillRect(f, d, o, a), - r.strokeRect(Math.floor(f) + .5, Math.floor(d) + .5, s, h), - r.strokeRect(Math.ceil(f) - .5, Math.ceil(d) - .5, s, h) - } - this._bIsPainted = !0 - } - , - i.prototype.makeImage = function() { - this._bIsPainted && function(t, e) { - var r = this; - if (r._fFail = e, - r._fSuccess = t, - null === r._bSupportDataURI) { - var i = document.createElement("img") - , n = function() { - r._bSupportDataURI = !1, - r._fFail && r._fFail.call(r) - }; - return i.onabort = n, - i.onerror = n, - i.onload = function() { - r._bSupportDataURI = !0, - r._fSuccess && r._fSuccess.call(r) - } - , - void (i.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==") + if (this._android && this._android <= 2.1) { + var e = 1 / window.devicePixelRatio, + r = CanvasRenderingContext2D.prototype.drawImage; + CanvasRenderingContext2D.prototype.drawImage = function (t, i, n, o, a, s, h, l, u) { + if ("nodeName" in t && /img/i.test(t.nodeName)) + for (var c = arguments.length - 1; c >= 1; c--) + arguments[c] = arguments[c] * e; + else + void 0 === l && (arguments[1] *= e, + arguments[2] *= e, + arguments[3] *= e, + arguments[4] *= e); + r.apply(this, arguments) } - !0 === r._bSupportDataURI && r._fSuccess ? r._fSuccess.call(r) : !1 === r._bSupportDataURI && r._fFail && r._fFail.call(r) } - .call(this, t) - } - , - i.prototype.isPainted = function() { - return this._bIsPainted - } - , - i.prototype.clear = function() { - this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height), - this._bIsPainted = !1 - } - , - i.prototype.round = function(t) { - return t ? Math.floor(1e3 * t) / 1e3 : t - } - , - i - }(); - (QRCode = function(t, e) { + var i = function (t, e) { + this._bIsPainted = !1, + this._android = o(), + this._htOption = e, + this._elCanvas = document.createElement("canvas"), + this._elCanvas.width = e.width, + this._elCanvas.height = e.height, + t.appendChild(this._elCanvas), + this._el = t, + this._oContext = this._elCanvas.getContext("2d"), + this._bIsPainted = !1, + this._elImage = document.createElement("img"), + this._elImage.alt = "Scan me!", + this._elImage.style.display = "none", + this._el.appendChild(this._elImage), + this._bSupportDataURI = null + }; + return i.prototype.draw = function (t) { + var e = this._elImage, + r = this._oContext, + i = this._htOption, + n = t.getModuleCount(), + o = i.width / n, + a = i.height / n, + s = Math.round(o), + h = Math.round(a); + e.style.display = "none", + this.clear(); + for (var l = 0; l < n; l++) + for (var u = 0; u < n; u++) { + var c = t.isDark(l, u), + f = u * o, + d = l * a; + r.strokeStyle = c ? i.colorDark : i.colorLight, + r.lineWidth = 1, + r.fillStyle = c ? i.colorDark : i.colorLight, + r.fillRect(f, d, o, a), + r.strokeRect(Math.floor(f) + .5, Math.floor(d) + .5, s, h), + r.strokeRect(Math.ceil(f) - .5, Math.ceil(d) - .5, s, h) + } + this._bIsPainted = !0 + }, + i.prototype.makeImage = function () { + this._bIsPainted && function (t, e) { + var r = this; + if (r._fFail = e, + r._fSuccess = t, + null === r._bSupportDataURI) { + var i = document.createElement("img"), + n = function () { + r._bSupportDataURI = !1, + r._fFail && r._fFail.call(r) + }; + return i.onabort = n, + i.onerror = n, + i.onload = function () { + r._bSupportDataURI = !0, + r._fSuccess && r._fSuccess.call(r) + }, + void(i.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==") + }!0 === r._bSupportDataURI && r._fSuccess ? r._fSuccess.call(r) : !1 === r._bSupportDataURI && r._fFail && r._fFail.call(r) + } + .call(this, t) + }, + i.prototype.isPainted = function () { + return this._bIsPainted + }, + i.prototype.clear = function () { + this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height), + this._bIsPainted = !1 + }, + i.prototype.round = function (t) { + return t ? Math.floor(1e3 * t) / 1e3 : t + }, + i + }(); + (QRCode = function (t, e) { if (this._htOption = { - width: 256, - height: 256, - typeNumber: 4, - colorDark: "#000000", - colorLight: "#ffffff", - correctLevel: h.H - }, - "string" == typeof e && (e = { - text: e - }), - e) + width: 256, + height: 256, + typeNumber: 4, + colorDark: "#000000", + colorLight: "#ffffff", + correctLevel: h.H + }, + "string" == typeof e && (e = { + text: e + }), + e) for (var r in e) this._htOption[r] = e[r]; "string" == typeof t && (t = document.getElementById(t)), - this._htOption.useSVG && (p = g), - this._android = o(), - this._el = t, - this._oQRCode = null, - this._oDrawing = new p(this._el,this._htOption), - this._htOption.text && this.makeCode(this._htOption.text) - } - ).prototype.makeCode = function(t) { - this._oQRCode = new e(a(t, this._htOption.correctLevel),this._htOption.correctLevel), - this._oQRCode.addData(t), - this._oQRCode.make(), - this._el.title = t, - this._oDrawing.draw(this._oQRCode), - this.makeImage() - } - , - QRCode.prototype.makeImage = function() { - "function" == typeof this._oDrawing.makeImage && (!this._android || this._android >= 3) && this._oDrawing.makeImage() - } - , - QRCode.prototype.clear = function() { - this._oDrawing.clear() - } - , - QRCode.CorrectLevel = h + this._htOption.useSVG && (p = g), + this._android = o(), + this._el = t, + this._oQRCode = null, + this._oDrawing = new p(this._el, this._htOption), + this._htOption.text && this.makeCode(this._htOption.text) + }).prototype.makeCode = function (t) { + this._oQRCode = new e(a(t, this._htOption.correctLevel), this._htOption.correctLevel), + this._oQRCode.addData(t), + this._oQRCode.make(), + this._el.title = t, + this._oDrawing.draw(this._oQRCode), + this.makeImage() + }, + QRCode.prototype.makeImage = function () { + "function" == typeof this._oDrawing.makeImage && (!this._android || this._android >= 3) && this._oDrawing.makeImage() + }, + QRCode.prototype.clear = function () { + this._oDrawing.clear() + }, + QRCode.CorrectLevel = h }(), - function(t, e, r) { + function (t, e, r) { function i(t, e) { - var i = function() { + var i = function () { var t = arguments; if (u) return u.apply(null, t); var e = {}; - return h(t, function(t) { - h(t, function(t, r) { - e[r] = t - }) - }), - t[0] = e - }({}, v, e || {}, function(t) { + return h(t, function (t) { + h(t, function (t, r) { + e[r] = t + }) + }), + t[0] = e + }({}, v, e || {}, function (t) { if (t.dataset) return JSON.parse(JSON.stringify(t.dataset)); var e = {}; if (t.hasAttributes()) - return h(t.attributes, function(t) { - var r = t.name; - if (0 !== r.indexOf("data-")) - return !0; - r = r.replace(/^data-/i, "").replace(/-(\w)/g, function(t, e) { - return e.toUpperCase() + return h(t.attributes, function (t) { + var r = t.name; + if (0 !== r.indexOf("data-")) + return !0; + r = r.replace(/^data-/i, "").replace(/-(\w)/g, function (t, e) { + return e.toUpperCase() + }), + e[r] = t.value }), - e[r] = t.value - }), - e; + e; return {} }(t)); - i.imageSelector && (i.image = n(i.imageSelector).map(function(t) { - return t.src - }).join("||")), - function(t, e) { - if (e && "string" == typeof e) { - var r = " "; - h((t.className + " " + e).split(/\s+/), function(t) { - r.indexOf(" " + t + " ") < 0 && (r += t + " ") - }), - t.className = r.slice(1, -1) - } - }(t, "share-component social-share"), - function(t, e) { - var i = function(t) { - t.mobileSites.length || (t.mobileSites = t.sites); - var e = (f ? t.mobileSites : t.sites).slice(0) - , r = t.disabled; - "string" == typeof e && (e = e.split(/\s*,\s*/)); - "string" == typeof r && (r = r.split(/\s*,\s*/)); - c && r.push("wechat"); - return r.length && h(r, function(t) { - e.splice(function(t, e, r) { - var i; - if (e) { - if (l) - return l.call(e, t, r); - for (i = e.length, - r = r ? r < 0 ? Math.max(0, i + r) : r : 0; r < i; r++) - if (r in e && e[r] === t) - return r - } - return -1 - }(t, e), 1) - }), - e - }(e) - , n = "prepend" == e.mode; - h(n ? i.reverse() : i, function(i) { - var o = function(t, e) { - e.summary || (e.summary = e.description); - return w[t].replace(/\{\{(\w)(\w*)\}\}/g, function(i, n, o) { - var a = t + n + o.toLowerCase(); - return o = (n + o).toLowerCase(), - encodeURIComponent((e[a] === r ? e[o] : e[a]) || "") + i.imageSelector && (i.image = n(i.imageSelector).map(function (t) { + return t.src + }).join("||")), + function (t, e) { + if (e && "string" == typeof e) { + var r = " "; + h((t.className + " " + e).split(/\s+/), function (t) { + r.indexOf(" " + t + " ") < 0 && (r += t + " ") + }), + t.className = r.slice(1, -1) + } + }(t, "share-component social-share"), + function (t, e) { + var i = function (t) { + t.mobileSites.length || (t.mobileSites = t.sites); + var e = (f ? t.mobileSites : t.sites).slice(0), + r = t.disabled; + "string" == typeof e && (e = e.split(/\s*,\s*/)); + "string" == typeof r && (r = r.split(/\s*,\s*/)); + c && r.push("wechat"); + return r.length && h(r, function (t) { + e.splice(function (t, e, r) { + var i; + if (e) { + if (l) + return l.call(e, t, r); + for (i = e.length, + r = r ? r < 0 ? Math.max(0, i + r) : r : 0; r < i; r++) + if (r in e && e[r] === t) + return r + } + return -1 + }(t, e), 1) + }), + e + }(e), + n = "prepend" == e.mode; + h(n ? i.reverse() : i, function (i) { + var o = function (t, e) { + e.summary || (e.summary = e.description); + return w[t].replace(/\{\{(\w)(\w*)\}\}/g, function (i, n, o) { + var a = t + n + o.toLowerCase(); + return o = (n + o).toLowerCase(), + encodeURIComponent((e[a] === r ? e[o] : e[a]) || "") + }) + }(i, e), + h = e.initialized ? a(t, "icon-" + i) : s(''); + if (!h.length) + return !0; + h[0].href = o, + "wechat" === i ? h[0].tabindex = -1 : h[0].target = "_blank", + e.initialized || (n ? t.insertBefore(h[0], t.firstChild) : t.appendChild(h[0])) + }) + }(t, i), + function (t, e) { + var r = a(t, "icon-wechat", "a"); + if (0 === r.length) + return !1; + var i = s('

            ' + e.wechatQrcodeTitle + '

            ' + e.wechatQrcodeHelper + "
            "), + n = a(i[0], "qrcode", "div"); + r[0].appendChild(i[0]), + new QRCode(n[0], { + text: e.url, + width: e.wechatQrcodeSize, + height: e.wechatQrcodeSize }) - }(i, e) - , h = e.initialized ? a(t, "icon-" + i) : s(''); - if (!h.length) - return !0; - h[0].href = o, - "wechat" === i ? h[0].tabindex = -1 : h[0].target = "_blank", - e.initialized || (n ? t.insertBefore(h[0], t.firstChild) : t.appendChild(h[0])) - }) - }(t, i), - function(t, e) { - var r = a(t, "icon-wechat", "a"); - if (0 === r.length) - return !1; - var i = s('

            ' + e.wechatQrcodeTitle + '

            ' + e.wechatQrcodeHelper + "
            ") - , n = a(i[0], "qrcode", "div"); - r[0].appendChild(i[0]), - new QRCode(n[0],{ - text: e.url, - width: e.wechatQrcodeSize, - height: e.wechatQrcodeSize - }) - }(t, i), - t.initialized = !0 + }(t, i), + t.initialized = !0 } + function n(r) { - return (e.querySelectorAll || t.jQuery || t.Zepto || function(t) { + return (e.querySelectorAll || t.jQuery || t.Zepto || function (t) { var r = []; - return h(t.split(/\s*,\s*/), function(i) { - var n = i.match(/([#.])(\w+)/); - if (null === n) - throw Error("Supports only simple single #ID or .CLASS selector."); - if (n[1]) { - var o = e.getElementById(n[2]); - o && r.push(o) - } - r = r.concat(a(t)) - }), - r - } - ).call(e, r) + return h(t.split(/\s*,\s*/), function (i) { + var n = i.match(/([#.])(\w+)/); + if (null === n) + throw Error("Supports only simple single #ID or .CLASS selector."); + if (n[1]) { + var o = e.getElementById(n[2]); + o && r.push(o) + } + r = r.concat(a(t)) + }), + r + }).call(e, r) } + function o(t) { return (e.getElementsByName(t)[0] || 0).content } + function a(t, e, r) { if (t.getElementsByClassName) return t.getElementsByClassName(e); - var i = [] - , n = t.getElementsByTagName(r || "*"); + var i = [], + n = t.getElementsByTagName(r || "*"); return e = " " + e + " ", - h(n, function(t) { - (" " + (t.className || "") + " ").indexOf(e) >= 0 && i.push(t) - }), - i + h(n, function (t) { + (" " + (t.className || "") + " ").indexOf(e) >= 0 && i.push(t) + }), + i } + function s(t) { var r = e.createElement("div"); return r.innerHTML = t, - r.childNodes + r.childNodes } + function h(t, e) { var i = t.length; if (i === r) { @@ -16452,65 +17356,64 @@ function social_share() { break } else for (var o = 0; o < i && !1 !== e.call(t[o], t[o], o); o++) - ; - } - var l = Array.prototype.indexOf - , u = Object.assign - , c = /MicroMessenger/i.test(navigator.userAgent) - , f = e.documentElement.clientWidth <= 768 - , d = (e.images[0] || 0).src || "" - , g = o("site") || o("Site") || e.title - , p = o("title") || o("Title") || e.title - , m = o("description") || o("Description") || "" - , v = { - url: location.href, - origin: location.origin, - source: g, - title: p, - description: m, - image: d, - imageSelector: r, - weiboKey: "", - wechatQrcodeTitle: "微信扫一扫:分享", - wechatQrcodeHelper: "

            微信里点“发现”,扫一下

            二维码便可将本文分享至朋友圈。

            ", - wechatQrcodeSize: 100, - sites: ["weibo", "qq", "wechat", "tencent", "douban", "qzone", "linkedin", "diandian", "facebook", "twitter", "google"], - mobileSites: [], - disabled: [], - initialized: !1 - } - , w = { - qzone: "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}", - qq: 'http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary="{{SUMMARY}}"', - tencent: "http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}", - weibo: "http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}", - wechat: "javascript:", - douban: "http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11", - diandian: "http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link", - linkedin: "http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin", - facebook: "https://www.facebook.com/sharer/sharer.php?u={{URL}}", - twitter: "https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{ORIGIN}}", - google: "https://plus.google.com/share?url={{URL}}" - }; - t.socialShare = function(t, e) { - (t = "string" == typeof t ? n(t) : t).length === r && (t = [t]), - h(t, function(t) { - t.initialized || i(t, e) - }) + ; } - , - function(r) { - var i = "addEventListener" - , n = e[i] ? "" : "on"; - ~e.readyState.indexOf("m") ? r() : "load DOMContentLoaded readystatechange".replace(/\w+/g, function(o, a) { - (a ? e : t)[n ? "attachEvent" : i](n + o, function() { - r && (a < 6 || ~e.readyState.indexOf("m")) && (r(), - r = 0) - }, !1) + var l = Array.prototype.indexOf, + u = Object.assign, + c = /MicroMessenger/i.test(navigator.userAgent), + f = e.documentElement.clientWidth <= 768, + d = (e.images[0] || 0).src || "", + g = o("site") || o("Site") || e.title, + p = o("title") || o("Title") || e.title, + m = o("description") || o("Description") || "", + v = { + url: location.href, + origin: location.origin, + source: g, + title: p, + description: m, + image: d, + imageSelector: r, + weiboKey: "", + wechatQrcodeTitle: "微信扫一扫:分享", + wechatQrcodeHelper: "

            微信里点“发现”,扫一下

            二维码便可将本文分享至朋友圈。

            ", + wechatQrcodeSize: 100, + sites: ["weibo", "qq", "wechat", "tencent", "douban", "qzone", "linkedin", "diandian", "facebook", "twitter", "google"], + mobileSites: [], + disabled: [], + initialized: !1 + }, + w = { + qzone: "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}", + qq: 'http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary="{{SUMMARY}}"', + tencent: "http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}", + weibo: "http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}", + wechat: "javascript:", + douban: "http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11", + diandian: "http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link", + linkedin: "http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin", + facebook: "https://www.facebook.com/sharer/sharer.php?u={{URL}}", + twitter: "https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{ORIGIN}}", + google: "https://plus.google.com/share?url={{URL}}" + }; + t.socialShare = function (t, e) { + (t = "string" == typeof t ? n(t) : t).length === r && (t = [t]), + h(t, function (t) { + t.initialized || i(t, e) + }) + }, + function (r) { + var i = "addEventListener", + n = e[i] ? "" : "on"; + ~e.readyState.indexOf("m") ? r() : "load DOMContentLoaded readystatechange".replace(/\w+/g, function (o, a) { + (a ? e : t)[n ? "attachEvent" : i](n + o, function () { + r && (a < 6 || ~e.readyState.indexOf("m")) && (r(), + r = 0) + }, !1) + }) + }(function () { + socialShare(".social-share, .share-component") }) - }(function() { - socialShare(".social-share, .share-component") - }) }(window, document); } /*! @@ -16520,103 +17423,106 @@ function social_share() { * @url https://github.com/feimosi/baguetteBox.js */ -var baguetteBox = function() { +var baguetteBox = function () { function t(t, n) { H.transforms = f(), - H.svg = g(), - e(), - j = document.querySelectorAll(t), - [].forEach.call(j, function(t) { - n && n.filter && (A = n.filter); - var e = t.getElementsByTagName("a"); - e = [].filter.call(e, function(t) { - return A.test(t.href) - }); - var o = D.length; - D.push(e), - D[o].options = n, - [].forEach.call(D[o], function(t, e) { - m(t, "click", function(t) { - t.preventDefault ? t.preventDefault() : t.returnValue = !1, - i(o), - a(e) - }) + H.svg = g(), + e(), + j = document.querySelectorAll(t), + [].forEach.call(j, function (t) { + n && n.filter && (A = n.filter); + var e = t.getElementsByTagName("a"); + e = [].filter.call(e, function (t) { + return A.test(t.href) + }); + var o = D.length; + D.push(e), + D[o].options = n, + [].forEach.call(D[o], function (t, e) { + m(t, "click", function (t) { + t.preventDefault ? t.preventDefault() : t.returnValue = !1, + i(o), + a(e) + }) + }) }) - }) } + function e() { return (b = v("baguetteBox-overlay")) ? (k = v("baguetteBox-slider"), - w = v("previous-button"), - C = v("next-button"), - T = v("close-button"), - void 0) : (b = y("div"), - b.id = "baguetteBox-overlay", - document.getElementsByTagName("body")[0].appendChild(b), - k = y("div"), - k.id = "baguetteBox-slider", - b.appendChild(k), - w = y("button"), - w.id = "previous-button", - w.innerHTML = H.svg ? E : "<", - b.appendChild(w), - C = y("button"), - C.id = "next-button", - C.innerHTML = H.svg ? x : ">", - b.appendChild(C), - T = y("button"), - T.id = "close-button", - T.innerHTML = H.svg ? B : "X", - b.appendChild(T), - w.className = C.className = T.className = "baguetteBox-button", - n(), - void 0) + w = v("previous-button"), + C = v("next-button"), + T = v("close-button"), + void 0) : (b = y("div"), + b.id = "baguetteBox-overlay", + document.getElementsByTagName("body")[0].appendChild(b), + k = y("div"), + k.id = "baguetteBox-slider", + b.appendChild(k), + w = y("button"), + w.id = "previous-button", + w.innerHTML = H.svg ? E : "<", + b.appendChild(w), + C = y("button"), + C.id = "next-button", + C.innerHTML = H.svg ? x : ">", + b.appendChild(C), + T = y("button"), + T.id = "close-button", + T.innerHTML = H.svg ? B : "X", + b.appendChild(T), + w.className = C.className = T.className = "baguetteBox-button", + n(), + void 0) } + function n() { - m(b, "click", function(t) { - t.target && "IMG" !== t.target.nodeName && "FIGCAPTION" !== t.target.nodeName && r() - }), - m(w, "click", function(t) { - t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, - c() - }), - m(C, "click", function(t) { - t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, - u() - }), - m(T, "click", function(t) { - t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, - r() - }), - m(b, "touchstart", function(t) { - N = t.changedTouches[0].pageX - }), - m(b, "touchmove", function(t) { - S || (t.preventDefault ? t.preventDefault() : t.returnValue = !1, - touch = t.touches[0] || t.changedTouches[0], - touch.pageX - N > 40 ? (S = !0, - c()) : touch.pageX - N < -40 && (S = !0, - u())) - }), - m(b, "touchend", function() { - S = !1 - }), - m(document, "keydown", function(t) { - switch (t.keyCode) { - case 37: - c(); - break; - case 39: - u(); - break; - case 27: - r() - } - }) + m(b, "click", function (t) { + t.target && "IMG" !== t.target.nodeName && "FIGCAPTION" !== t.target.nodeName && r() + }), + m(w, "click", function (t) { + t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, + c() + }), + m(C, "click", function (t) { + t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, + u() + }), + m(T, "click", function (t) { + t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, + r() + }), + m(b, "touchstart", function (t) { + N = t.changedTouches[0].pageX + }), + m(b, "touchmove", function (t) { + S || (t.preventDefault ? t.preventDefault() : t.returnValue = !1, + touch = t.touches[0] || t.changedTouches[0], + touch.pageX - N > 40 ? (S = !0, + c()) : touch.pageX - N < -40 && (S = !0, + u())) + }), + m(b, "touchend", function () { + S = !1 + }), + m(document, "keydown", function (t) { + switch (t.keyCode) { + case 37: + c(); + break; + case 39: + u(); + break; + case 27: + r() + } + }) } + function i(t) { if (M !== t) { for (M = t, - o(D[t].options); k.firstChild; ) + o(D[t].options); k.firstChild;) k.removeChild(k.firstChild); X.length = 0; for (var e, n = 0; n < D[t].length; n++) @@ -16627,174 +17533,198 @@ var baguetteBox = function() { k.appendChild(X[n]) } } + function o(t) { t || (t = {}); for (var e in P) I[e] = P[e], "undefined" != typeof t[e] && (I[e] = t[e]); k.style.transition = k.style.webkitTransition = "fadeIn" === I.animation ? "opacity .4s ease" : "slideIn" === I.animation ? "" : "none", - "auto" === I.buttons && ("ontouchstart"in window || 1 === D[M].length) && (I.buttons = !1), - w.style.display = C.style.display = I.buttons ? "" : "none" + "auto" === I.buttons && ("ontouchstart" in window || 1 === D[M].length) && (I.buttons = !1), + w.style.display = C.style.display = I.buttons ? "" : "none" } + function a(t) { "block" !== b.style.display && (L = t, - s(L, function() { - p(L), - h(L) - }), - d(), - b.style.display = "block", - setTimeout(function() { - b.className = "visible", - I.afterShow && I.afterShow() - }, 50), - I.onChange && I.onChange(L, X.length)) + s(L, function () { + p(L), + h(L) + }), + d(), + b.style.display = "block", + setTimeout(function () { + b.className = "visible", + I.afterShow && I.afterShow() + }, 50), + I.onChange && I.onChange(L, X.length)) } + function r() { "none" !== b.style.display && (b.className = "", - setTimeout(function() { - b.style.display = "none", - I.afterHide && I.afterHide() - }, 500)) + setTimeout(function () { + b.style.display = "none", + I.afterHide && I.afterHide() + }, 500)) } + function s(t, e) { var n = X[t]; if ("undefined" != typeof n) { if (n.getElementsByTagName("img")[0]) return e && e(), - void 0; + void 0; imageElement = D[M][t], - imageCaption = "function" == typeof I.captions ? I.captions.call(D[M], imageElement) : imageElement.getAttribute("data-caption") || imageElement.title, - imageSrc = l(imageElement); - var i = y("figure") - , o = y("img") - , a = y("figcaption"); + imageCaption = "function" == typeof I.captions ? I.captions.call(D[M], imageElement) : imageElement.getAttribute("data-caption") || imageElement.title, + imageSrc = l(imageElement); + var i = y("figure"), + o = y("img"), + a = y("figcaption"); n.appendChild(i), - i.innerHTML = '
            ', - o.onload = function() { - var n = document.querySelector("#baguette-img-" + t + " .spinner"); - i.removeChild(n), - !I.async && e && e() - } - , - o.setAttribute("src", imageSrc), - i.appendChild(o), - I.captions && imageCaption && (a.innerHTML = imageCaption, - i.appendChild(a)), - I.async && e && e() + i.innerHTML = '
            ', + o.onload = function () { + var n = document.querySelector("#baguette-img-" + t + " .spinner"); + i.removeChild(n), + !I.async && e && e() + }, + o.setAttribute("src", imageSrc), + i.appendChild(o), + I.captions && imageCaption && (a.innerHTML = imageCaption, + i.appendChild(a)), + I.async && e && e() } } + function l(t) { var e = imageElement.href; if (t.dataset) { var n = []; for (var i in t.dataset) "at-" !== i.substring(0, 3) || isNaN(i.substring(3)) || (n[i.replace("at-", "")] = t.dataset[i]); - keys = Object.keys(n).sort(function(t, e) { + keys = Object.keys(n).sort(function (t, e) { return parseInt(t) < parseInt(e) ? -1 : 1 }); - for (var o = window.innerWidth * window.devicePixelRatio, a = 0; a < keys.length - 1 && keys[a] < o; ) + for (var o = window.innerWidth * window.devicePixelRatio, a = 0; a < keys.length - 1 && keys[a] < o;) a++; e = n[keys[a]] || e } return e } + function u() { var t; return L <= X.length - 2 ? (L++, - d(), - p(L), - t = !0) : I.animation && (k.className = "bounce-from-right", - setTimeout(function() { - k.className = "" - }, 400), - t = !1), - I.onChange && I.onChange(L, X.length), - t + d(), + p(L), + t = !0) : I.animation && (k.className = "bounce-from-right", + setTimeout(function () { + k.className = "" + }, 400), + t = !1), + I.onChange && I.onChange(L, X.length), + t } + function c() { var t; return L >= 1 ? (L--, - d(), - h(L), - t = !0) : I.animation && (k.className = "bounce-from-left", - setTimeout(function() { - k.className = "" - }, 400), - t = !1), - I.onChange && I.onChange(L, X.length), - t + d(), + h(L), + t = !0) : I.animation && (k.className = "bounce-from-left", + setTimeout(function () { + k.className = "" + }, 400), + t = !1), + I.onChange && I.onChange(L, X.length), + t } + function d() { var t = 100 * -L + "%"; "fadeIn" === I.animation ? (k.style.opacity = 0, - setTimeout(function() { - H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t, - k.style.opacity = 1 - }, 400)) : H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t + setTimeout(function () { + H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t, + k.style.opacity = 1 + }, 400)) : H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t } + function f() { var t = y("div"); return "undefined" != typeof t.style.perspective || "undefined" != typeof t.style.webkitPerspective } + function g() { var t = y("div"); return t.innerHTML = "", - "http://www.w3.org/2000/svg" == (t.firstChild && t.firstChild.namespaceURI) + "http://www.w3.org/2000/svg" == (t.firstChild && t.firstChild.namespaceURI) } + function p(t) { - t - L >= I.preload || s(t + 1, function() { + t - L >= I.preload || s(t + 1, function () { p(t + 1) }) } + function h(t) { - L - t >= I.preload || s(t - 1, function() { + L - t >= I.preload || s(t - 1, function () { h(t - 1) }) } + function m(t, e, n) { t.addEventListener ? t.addEventListener(e, n, !1) : t.attachEvent("on" + e, n) } + function v(t) { return document.getElementById(t) } + function y(t) { return document.createElement(t) } - var b, k, w, C, T, N, E = '', x = '', B = '', I = {}, P = { - captions: !0, - buttons: "auto", - async: !1, - preload: 2, - animation: "slideIn", - afterShow: null, - afterHide: null, - onChange: null - }, H = {}, L = 0, M = -1, S = !1, A = /.+\.(gif|jpe?g|png|webp)/i, j = [], D = [], X = []; - return [].forEach || (Array.prototype.forEach = function(t, e) { - for (var n = 0; n < this.length; n++) - t.call(e, this[n], n, this) - } - ), - [].filter || (Array.prototype.filter = function(t, e, n, i, o) { - for (n = this, - i = [], - o = 0; o < n.length; o++) - t.call(e, n[o], o, n) && i.push(n[o]); - return i - } - ), - { - run: t, - showNext: u, - showPrevious: c - } + var b, k, w, C, T, N, E = '', + x = '', + B = '', + I = {}, + P = { + captions: !0, + buttons: "auto", + async: !1, + preload: 2, + animation: "slideIn", + afterShow: null, + afterHide: null, + onChange: null + }, + H = {}, + L = 0, + M = -1, + S = !1, + A = /.+\.(gif|jpe?g|png|webp)/i, + j = [], + D = [], + X = []; + return [].forEach || (Array.prototype.forEach = function (t, e) { + for (var n = 0; n < this.length; n++) + t.call(e, this[n], n, this) + }), + [].filter || (Array.prototype.filter = function (t, e, n, i, o) { + for (n = this, + i = [], + o = 0; o < n.length; o++) + t.call(e, n[o], o, n) && i.push(n[o]); + return i + }), { + run: t, + showNext: u, + showPrevious: c + } }(); -var MD5 = function(s) { +var MD5 = function (s) { function L(k, d) { return (k << d) | (k >>> (32 - d)) } + function K(G, k) { var I, d, F, H, x; F = (G & 2147483648); @@ -16815,34 +17745,43 @@ var MD5 = function(s) { 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; @@ -16865,8 +17804,11 @@ var MD5 = function(s) { aa[I - 1] = F >>> 29; return aa } + function B(x) { - var k = "", F = "", G, d; + var k = "", + F = "", + G, d; for (d = 0; d <= 3; d++) { G = (x >>> (d * 8)) & 255; F = "0" + G.toString(16); @@ -16874,6 +17816,7 @@ var MD5 = function(s) { } return k } + function J(k) { k = k.replace(/rn/g, "n"); var d = ""; @@ -16896,22 +17839,22 @@ var MD5 = function(s) { } 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; + 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; @@ -16994,4 +17937,4 @@ var MD5 = function(s) { } var i = B(Y) + B(X) + B(W) + B(V); return i.toLowerCase() -}; +}; \ No newline at end of file diff --git a/js/sakura-app.js b/js/sakura-app.js index eaa7f60..2a2e79a 100644 --- a/js/sakura-app.js +++ b/js/sakura-app.js @@ -1814,4 +1814,59 @@ $(document).ready(function () { // } // if (document.body.clientWidth > 860) { // aplayerF(); -// } \ No newline at end of file +// } + +function switchNightMode() { + $('
            ').appendTo($("body")), setTimeout( + function () { + var DarkMode = document.cookie.replace(/(?:(?:^|.*;\s*)DarkMode\s*\=\s*([^;]*).*$)|^.*$/, "$1") || + '0'; + (DarkMode == '0') ? ($("html").addClass("DarkMode"), document.cookie = "DarkMode=1;path=/", console + .log('夜间模式开启'), $('#modeicon').attr("xlink:href", "#icon-sun")) : ($("html").removeClass( + "DarkMode"), document.cookie = "DarkMode=0;path=/", console.log('夜间模式关闭'), $('#modeicon') + .attr("xlink:href", "#icon-_moon")), setTimeout(function () { + $(".Cuteen_DarkSky").fadeOut(1e3, function () { + $(this).remove() + }) + }, 2e3) + }), 50 +} + +function checkNightMode() { + if ($("html").hasClass("n-f")) { + $("html").removeClass("day"); + $("html").addClass("DarkMode"); + $('#modeicon').attr("xlink:href", "#icon-sun") + return; + } + if ($("html").hasClass("d-f")) { + $("html").removeClass("DarkMode"); + $("html").addClass("day"); + $('#modeicon').attr("xlink:href", "#icon-_moon") + + return; + } + if (document.cookie.replace(/(?:(?:^|.*;\s*)DarkMode\s*\=\s*([^;]*).*$)|^.*$/, "$1") === '') { + if (new Date().getHours() >= 23 || new Date().getHours() < 7) { + $("html").addClass("DarkMode"); + document.cookie = "DarkMode=1;path=/"; + console.log('夜间模式开启'); + $('#modeicon').attr("xlink:href", "#icon-sun") + } else { + $("html").removeClass("DarkMode"); + document.cookie = "DarkMode=0;path=/"; + console.log('夜间模式关闭'); + $('#modeicon').attr("xlink:href", "#icon-_moon") + } + } else { + var DarkMode = document.cookie.replace(/(?:(?:^|.*;\s*)DarkMode\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0'; + if (DarkMode == '0') { + $("html").removeClass("DarkMode"); + $('#modeicon').attr("xlink:href", "#icon-_moon") + } else if (DarkMode == '1') { + $("html").addClass("DarkMode"); + $('#modeicon').attr("xlink:href", "#icon-sun") + } + } +} +checkNightMode(); \ No newline at end of file