materialize-sass 1.0.0.alpha2 → 1.0.0.alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/assets/javascripts/materialize-sprockets.js +1 -0
- data/assets/javascripts/materialize.js +1337 -1281
- data/assets/javascripts/materialize/autocomplete.js +27 -27
- data/assets/javascripts/materialize/buttons.js +58 -58
- data/assets/javascripts/materialize/carousel.js +47 -49
- data/assets/javascripts/materialize/cash.js +4 -4
- data/assets/javascripts/materialize/characterCounter.js +20 -20
- data/assets/javascripts/materialize/chips.js +42 -38
- data/assets/javascripts/materialize/collapsible.js +27 -27
- data/assets/javascripts/materialize/component.js +57 -0
- data/assets/javascripts/materialize/datepicker.js +59 -53
- data/assets/javascripts/materialize/dropdown.js +43 -43
- data/assets/javascripts/materialize/extras/nouislider.js +1 -1
- data/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
- data/assets/javascripts/materialize/forms.js +8 -2
- data/assets/javascripts/materialize/global.js +11 -13
- data/assets/javascripts/materialize/materialbox.js +72 -44
- data/assets/javascripts/materialize/modal.js +55 -38
- data/assets/javascripts/materialize/parallax.js +61 -24
- data/assets/javascripts/materialize/pushpin.js +37 -21
- data/assets/javascripts/materialize/range.js +19 -21
- data/assets/javascripts/materialize/scrollspy.js +23 -23
- data/assets/javascripts/materialize/select.js +42 -36
- data/assets/javascripts/materialize/sidenav.js +34 -34
- data/assets/javascripts/materialize/slider.js +37 -39
- data/assets/javascripts/materialize/tabs.js +42 -49
- data/assets/javascripts/materialize/tapTarget.js +39 -22
- data/assets/javascripts/materialize/timepicker.js +579 -579
- data/assets/javascripts/materialize/tooltip.js +34 -31
- data/assets/stylesheets/materialize/components/_cards.scss +0 -2
- data/assets/stylesheets/materialize/components/_global.scss +4 -14
- data/assets/stylesheets/materialize/components/_typography.scss +0 -1
- data/assets/stylesheets/materialize/components/_variables.scss +1 -1
- data/assets/stylesheets/materialize/components/forms/_checkboxes.scss +0 -10
- data/assets/stylesheets/materialize/extras/nouislider.css +1 -1
- data/lib/materialize-sass/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4f6c369b19e9161d604d6daf26eca2f5889c83e251223d9976dd85292aa2999d
|
4
|
+
data.tar.gz: 6dc1c5151989d6e01bb69d57e4d4ba8754bc1c2735a0a6c41dbd5ae8323ce81b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29dc42ff9939f11ebd2e24b32e913683c78ff9ddfdf3590f1444b457697c5e3e18ee1ac16c33f4aad2bc9bcfcfc1e33f893ad0b4fda79b676d873639fc412023
|
7
|
+
data.tar.gz: '09f3cdb07c45e98e273059e1371577e4c85680ca7e4fdedebba5dccd0514af2bbfbcb24a3af45c02f2d4a08dff12c6e9a46ef69d0a777b617d463fdde36d4211'
|
@@ -1,10 +1,16 @@
|
|
1
1
|
/*!
|
2
|
-
* Materialize v1.0.0-alpha.
|
2
|
+
* Materialize v1.0.0-alpha.3 (http://materializecss.com)
|
3
3
|
* Copyright 2014-2017 Materialize
|
4
4
|
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
|
5
5
|
*/
|
6
|
+
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
7
|
+
|
6
8
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
7
9
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
11
|
+
|
12
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
13
|
+
|
8
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9
15
|
|
10
16
|
/*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */
|
@@ -41,7 +47,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
41
47
|
var frag;
|
42
48
|
function parseHTML(str) {
|
43
49
|
if (!frag) {
|
44
|
-
frag = doc.implementation.createHTMLDocument();
|
50
|
+
frag = doc.implementation.createHTMLDocument(null);
|
45
51
|
var base = frag.createElement("base");
|
46
52
|
base.href = doc.location.href;
|
47
53
|
frag.head.appendChild(base);
|
@@ -715,11 +721,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
715
721
|
val: function (value) {
|
716
722
|
if (value === undefined) {
|
717
723
|
return getValue(this[0]);
|
718
|
-
} else {
|
719
|
-
return this.each(function (v) {
|
720
|
-
return v.value = value;
|
721
|
-
});
|
722
724
|
}
|
725
|
+
|
726
|
+
return this.each(function (v) {
|
727
|
+
return v.value = value;
|
728
|
+
});
|
723
729
|
}
|
724
730
|
|
725
731
|
});
|
@@ -997,508 +1003,144 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
997
1003
|
|
998
1004
|
return cash;
|
999
1005
|
});
|
1000
|
-
;
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
}
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1006
|
+
;
|
1007
|
+
var Component = function () {
|
1008
|
+
/**
|
1009
|
+
* Generic constructor for all components
|
1010
|
+
* @constructor
|
1011
|
+
* @param {Element} el
|
1012
|
+
* @param {Object} options
|
1013
|
+
*/
|
1014
|
+
function Component(classDef, el, options) {
|
1015
|
+
_classCallCheck(this, Component);
|
1016
|
+
|
1017
|
+
// Display error if el is valid HTML Element
|
1018
|
+
if (!(el instanceof Element)) {
|
1019
|
+
console.error(Error(el + ' is not an HTML Element'));
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
// If exists, destroy and reinitialize in child
|
1023
|
+
var ins = classDef.getInstance(el);
|
1024
|
+
if (!!ins) {
|
1025
|
+
ins.destroy();
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
this.el = el;
|
1029
|
+
this.$el = cash(el);
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
/**
|
1033
|
+
* Initializes components
|
1034
|
+
* @param {class} classDef
|
1035
|
+
* @param {Element | NodeList | jQuery} els
|
1036
|
+
* @param {Object} options
|
1037
|
+
*/
|
1038
|
+
|
1039
|
+
|
1040
|
+
_createClass(Component, null, [{
|
1041
|
+
key: "init",
|
1042
|
+
value: function init(classDef, els, options) {
|
1043
|
+
var instances = null;
|
1044
|
+
if (els instanceof Element) {
|
1045
|
+
instances = new classDef(els, options);
|
1046
|
+
} else if (!!els.jquery || els instanceof NodeList) {
|
1047
|
+
var instancesArr = [];
|
1048
|
+
for (var i = 0; i < els.length; i++) {
|
1049
|
+
instancesArr.push(new classDef(els[i], options));
|
1050
|
+
}
|
1051
|
+
instances = instancesArr;
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
return instances;
|
1055
|
+
}
|
1056
|
+
}]);
|
1057
|
+
|
1058
|
+
return Component;
|
1059
|
+
}();
|
1060
|
+
|
1061
|
+
; // Required for Meteor package, the use of window prevents export by Meteor
|
1062
|
+
(function (window) {
|
1063
|
+
if (window.Package) {
|
1064
|
+
M = {};
|
1065
|
+
} else {
|
1066
|
+
window.M = {};
|
1067
|
+
}
|
1068
|
+
|
1069
|
+
// Check for jQuery
|
1070
|
+
M.jQueryLoaded = !!window.jQuery;
|
1071
|
+
})(window);
|
1072
|
+
|
1073
|
+
// AMD
|
1074
|
+
if (typeof define === "function" && define.amd) {
|
1075
|
+
define("M", [], function () {
|
1076
|
+
return M;
|
1022
1077
|
});
|
1078
|
+
|
1079
|
+
// Common JS
|
1080
|
+
} else if (typeof exports !== 'undefined' && !exports.nodeType) {
|
1081
|
+
if (typeof module !== 'undefined' && !module.nodeType && module.exports) {
|
1082
|
+
exports = module.exports = M;
|
1083
|
+
}
|
1084
|
+
exports.default = M;
|
1085
|
+
}
|
1086
|
+
|
1087
|
+
M.keys = {
|
1088
|
+
TAB: 9,
|
1089
|
+
ENTER: 13,
|
1090
|
+
ESC: 27,
|
1091
|
+
ARROW_UP: 38,
|
1092
|
+
ARROW_DOWN: 40
|
1023
1093
|
};
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
}m.next = function () {
|
1034
|
-
return { done: !0, value: void 0 };
|
1035
|
-
};return m.next();
|
1036
|
-
} };m[Symbol.iterator] = function () {
|
1037
|
-
return m;
|
1038
|
-
};return m;
|
1094
|
+
|
1095
|
+
/**
|
1096
|
+
* TabPress Keydown handler
|
1097
|
+
*/
|
1098
|
+
M.tabPressed = false;
|
1099
|
+
var docHandleKeydown = function (e) {
|
1100
|
+
if (e.which === M.keys.TAB) {
|
1101
|
+
M.tabPressed = true;
|
1102
|
+
}
|
1039
1103
|
};
|
1040
|
-
|
1041
|
-
if (
|
1042
|
-
|
1043
|
-
var u = e[m];u in p || (p[u] = {});p = p[u];
|
1044
|
-
}e = e[e.length - 1];m = p[e];r = r(m);r != m && null != r && $jscomp.defineProperty(p, e, { configurable: !0, writable: !0, value: r });
|
1104
|
+
var docHandleKeyup = function (e) {
|
1105
|
+
if (e.which === M.keys.TAB) {
|
1106
|
+
M.tabPressed = false;
|
1045
1107
|
}
|
1046
|
-
}
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1108
|
+
};
|
1109
|
+
document.addEventListener('keydown', docHandleKeydown);
|
1110
|
+
document.addEventListener('keyup', docHandleKeyup);
|
1111
|
+
|
1112
|
+
/**
|
1113
|
+
* Initialize jQuery wrapper for plugin
|
1114
|
+
* @param {Class} plugin javascript class
|
1115
|
+
* @param {string} pluginName jQuery plugin name
|
1116
|
+
* @param {string} classRef Class reference name
|
1117
|
+
*/
|
1118
|
+
M.initializeJqueryWrapper = function (plugin, pluginName, classRef) {
|
1119
|
+
jQuery.fn[pluginName] = function (methodOrOptions) {
|
1120
|
+
// Call plugin method if valid method name is passed in
|
1121
|
+
if (plugin.prototype[methodOrOptions]) {
|
1122
|
+
var params = Array.prototype.slice.call(arguments, 1);
|
1123
|
+
|
1124
|
+
// Getter methods
|
1125
|
+
if (methodOrOptions.slice(0, 3) === 'get') {
|
1126
|
+
var instance = this.first()[0][classRef];
|
1127
|
+
return instance[methodOrOptions].apply(instance, params);
|
1064
1128
|
}
|
1065
|
-
}return f;
|
1066
|
-
}function p(a) {
|
1067
|
-
return a.reduce(function (a, d) {
|
1068
|
-
return a.concat(h.arr(d) ? p(d) : d);
|
1069
|
-
}, []);
|
1070
|
-
}function m(a) {
|
1071
|
-
if (h.arr(a)) return a;
|
1072
|
-
h.str(a) && (a = e(a) || a);return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a];
|
1073
|
-
}function u(a, c) {
|
1074
|
-
return a.some(function (a) {
|
1075
|
-
return a === c;
|
1076
|
-
});
|
1077
|
-
}function C(a) {
|
1078
|
-
var c = {},
|
1079
|
-
d;for (d in a) {
|
1080
|
-
c[d] = a[d];
|
1081
|
-
}return c;
|
1082
|
-
}function D(a, c) {
|
1083
|
-
var d = C(a),
|
1084
|
-
b;for (b in a) {
|
1085
|
-
d[b] = c.hasOwnProperty(b) ? c[b] : a[b];
|
1086
|
-
}return d;
|
1087
|
-
}function z(a, c) {
|
1088
|
-
var d = C(a),
|
1089
|
-
b;for (b in c) {
|
1090
|
-
d[b] = h.und(a[b]) ? c[b] : a[b];
|
1091
|
-
}return d;
|
1092
|
-
}function T(a) {
|
1093
|
-
a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) {
|
1094
|
-
return c + c + d + d + k + k;
|
1095
|
-
});var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
|
1096
|
-
a = parseInt(c[1], 16);var d = parseInt(c[2], 16),
|
1097
|
-
c = parseInt(c[3], 16);return "rgba(" + a + "," + d + "," + c + ",1)";
|
1098
|
-
}function U(a) {
|
1099
|
-
function c(a, c, b) {
|
1100
|
-
0 > b && (b += 1);1 < b && --b;return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a;
|
1101
|
-
}var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a = parseInt(d[1]) / 360;var b = parseInt(d[2]) / 100,
|
1102
|
-
f = parseInt(d[3]) / 100,
|
1103
|
-
d = d[4] || 1;if (0 == b) f = b = a = f;else {
|
1104
|
-
var n = .5 > f ? f * (1 + b) : f + b - f * b,
|
1105
|
-
k = 2 * f - n,
|
1106
|
-
f = c(k, n, a + 1 / 3),
|
1107
|
-
b = c(k, n, a);a = c(k, n, a - 1 / 3);
|
1108
|
-
}return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")";
|
1109
|
-
}function y(a) {
|
1110
|
-
if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2];
|
1111
|
-
}function V(a) {
|
1112
|
-
if (-1 < a.indexOf("translate") || "perspective" === a) return "px";if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg";
|
1113
|
-
}function I(a, c) {
|
1114
|
-
return h.fnc(a) ? a(c.target, c.id, c.total) : a;
|
1115
|
-
}function E(a, c) {
|
1116
|
-
if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0";
|
1117
|
-
}function J(a, c) {
|
1118
|
-
if (h.dom(a) && u(W, c)) return "transform";if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute";if (h.dom(a) && "transform" !== c && E(a, c)) return "css";if (null != a[c]) return "object";
|
1119
|
-
}function X(a, c) {
|
1120
|
-
var d = V(c),
|
1121
|
-
d = -1 < c.indexOf("scale") ? 1 : 0 + d;a = a.style.transform;if (!a) return d;for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) {
|
1122
|
-
f.push(b[1]), n.push(b[2]);
|
1123
|
-
}a = r(n, function (a, b) {
|
1124
|
-
return f[b] === c;
|
1125
|
-
});return a.length ? a[0] : d;
|
1126
|
-
}function K(a, c) {
|
1127
|
-
switch (J(a, c)) {case "transform":
|
1128
|
-
return X(a, c);case "css":
|
1129
|
-
return E(a, c);case "attribute":
|
1130
|
-
return a.getAttribute(c);}return a[c] || 0;
|
1131
|
-
}function L(a, c) {
|
1132
|
-
var d = /^(\*=|\+=|-=)/.exec(a);if (!d) return a;var b = y(a) || 0;c = parseFloat(c);a = parseFloat(a.replace(d[0], ""));switch (d[0][0]) {case "+":
|
1133
|
-
return c + a + b;case "-":
|
1134
|
-
return c - a + b;case "*":
|
1135
|
-
return c * a + b;}
|
1136
|
-
}function F(a, c) {
|
1137
|
-
return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2));
|
1138
|
-
}function M(a) {
|
1139
|
-
a = a.points;for (var c = 0, d, b = 0; b < a.numberOfItems; b++) {
|
1140
|
-
var f = a.getItem(b);0 < b && (c += F(d, f));d = f;
|
1141
|
-
}return c;
|
1142
|
-
}function N(a) {
|
1143
|
-
if (a.getTotalLength) return a.getTotalLength();switch (a.tagName.toLowerCase()) {case "circle":
|
1144
|
-
return 2 * Math.PI * a.getAttribute("r");case "rect":
|
1145
|
-
return 2 * a.getAttribute("width") + 2 * a.getAttribute("height");case "line":
|
1146
|
-
return F({ x: a.getAttribute("x1"), y: a.getAttribute("y1") }, { x: a.getAttribute("x2"), y: a.getAttribute("y2") });case "polyline":
|
1147
|
-
return M(a);case "polygon":
|
1148
|
-
var c = a.points;return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0));}
|
1149
|
-
}function Y(a, c) {
|
1150
|
-
function d(b) {
|
1151
|
-
b = void 0 === b ? 0 : b;return a.el.getPointAtLength(1 <= c + b ? c + b : 0);
|
1152
|
-
}var b = d(),
|
1153
|
-
f = d(-1),
|
1154
|
-
n = d(1);switch (a.property) {case "x":
|
1155
|
-
return b.x;case "y":
|
1156
|
-
return b.y;
|
1157
|
-
case "angle":
|
1158
|
-
return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI;}
|
1159
|
-
}function O(a, c) {
|
1160
|
-
var d = /-?\d*\.?\d+/g,
|
1161
|
-
b;b = h.pth(a) ? a.totalLength : a;if (h.col(b)) {
|
1162
|
-
if (h.rgb(b)) {
|
1163
|
-
var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b = f ? "rgba(" + f[1] + ",1)" : b;
|
1164
|
-
} else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0;
|
1165
|
-
} else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f;b += "";return { original: b, numbers: b.match(d) ? b.match(d).map(Number) : [0], strings: h.str(a) || c ? b.split(d) : [] };
|
1166
|
-
}function P(a) {
|
1167
|
-
a = a ? p(h.arr(a) ? a.map(m) : m(a)) : [];return r(a, function (a, d, b) {
|
1168
|
-
return b.indexOf(a) === d;
|
1169
|
-
});
|
1170
|
-
}function Z(a) {
|
1171
|
-
var c = P(a);return c.map(function (a, b) {
|
1172
|
-
return { target: a, id: b, total: c.length };
|
1173
|
-
});
|
1174
|
-
}function aa(a, c) {
|
1175
|
-
var d = C(c);if (h.arr(a)) {
|
1176
|
-
var b = a.length;2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { value: a };
|
1177
|
-
}return m(a).map(function (a, b) {
|
1178
|
-
b = b ? 0 : c.delay;a = h.obj(a) && !h.pth(a) ? a : { value: a };h.und(a.delay) && (a.delay = b);return a;
|
1179
|
-
}).map(function (a) {
|
1180
|
-
return z(a, d);
|
1181
|
-
});
|
1182
|
-
}function ba(a, c) {
|
1183
|
-
var d = {},
|
1184
|
-
b;for (b in a) {
|
1185
|
-
var f = I(a[b], c);h.arr(f) && (f = f.map(function (a) {
|
1186
|
-
return I(a, c);
|
1187
|
-
}), 1 === f.length && (f = f[0]));d[b] = f;
|
1188
|
-
}d.duration = parseFloat(d.duration);d.delay = parseFloat(d.delay);return d;
|
1189
|
-
}function ca(a) {
|
1190
|
-
return h.arr(a) ? A.apply(this, a) : Q[a];
|
1191
|
-
}function da(a, c) {
|
1192
|
-
var d;return a.tweens.map(function (b) {
|
1193
|
-
b = ba(b, c);var f = b.value,
|
1194
|
-
e = K(c.target, a.name),
|
1195
|
-
k = d ? d.to.original : e,
|
1196
|
-
k = h.arr(f) ? f[0] : k,
|
1197
|
-
w = L(h.arr(f) ? f[1] : f, k),
|
1198
|
-
e = y(w) || y(k) || y(e);b.from = O(k, e);b.to = O(w, e);b.start = d ? d.end : a.offset;b.end = b.start + b.delay + b.duration;b.easing = ca(b.easing);b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3;b.isPath = h.pth(f);b.isColor = h.col(b.from.original);b.isColor && (b.round = 1);return d = b;
|
1199
|
-
});
|
1200
|
-
}function ea(a, c) {
|
1201
|
-
return r(p(a.map(function (a) {
|
1202
|
-
return c.map(function (b) {
|
1203
|
-
var c = J(a.target, b.name);if (c) {
|
1204
|
-
var d = da(b, a);b = { type: c, property: b.name, animatable: a, tweens: d, duration: d[d.length - 1].end, delay: d[0].delay };
|
1205
|
-
} else b = void 0;return b;
|
1206
|
-
});
|
1207
|
-
})), function (a) {
|
1208
|
-
return !h.und(a);
|
1209
|
-
});
|
1210
|
-
}function R(a, c, d, b) {
|
1211
|
-
var f = "delay" === a;return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) {
|
1212
|
-
return b[a];
|
1213
|
-
})) : f ? b.delay : d.offset + b.delay + b.duration;
|
1214
|
-
}function fa(a) {
|
1215
|
-
var c = D(ga, a),
|
1216
|
-
d = D(S, a),
|
1217
|
-
b = Z(a.targets),
|
1218
|
-
f = [],
|
1219
|
-
e = z(c, d),
|
1220
|
-
k;for (k in a) {
|
1221
|
-
e.hasOwnProperty(k) || "targets" === k || f.push({ name: k, offset: e.offset, tweens: aa(a[k], d) });
|
1222
|
-
}a = ea(b, f);return z(c, { children: [], animatables: b, animations: a, duration: R("duration", a, c, d), delay: R("delay", a, c, d) });
|
1223
|
-
}function q(a) {
|
1224
|
-
function c() {
|
1225
|
-
return window.Promise && new Promise(function (a) {
|
1226
|
-
return p = a;
|
1227
|
-
});
|
1228
|
-
}function d(a) {
|
1229
|
-
return g.reversed ? g.duration - a : a;
|
1230
|
-
}function b(a) {
|
1231
|
-
for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) {
|
1232
|
-
var e = d[b],
|
1233
|
-
k = e.animatable,
|
1234
|
-
h = e.tweens,
|
1235
|
-
n = h.length - 1,
|
1236
|
-
l = h[n];n && (l = r(h, function (b) {
|
1237
|
-
return a < b.end;
|
1238
|
-
})[0] || l);for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) {
|
1239
|
-
var x = void 0,
|
1240
|
-
x = l.to.numbers[t],
|
1241
|
-
q = l.from.numbers[t],
|
1242
|
-
x = l.isPath ? Y(l.value, w * x) : q + w * (x - q);p && (l.isColor && 2 < t || (x = Math.round(x * p) / p));n.push(x);
|
1243
|
-
}if (l = h.length) for (m = h[0], w = 0; w < l; w++) {
|
1244
|
-
p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " "));
|
1245
|
-
} else m = n[0];ha[e.type](k.target, e.property, m, c, k.id);e.currentValue = m;b++;
|
1246
|
-
}if (b = Object.keys(c).length) for (d = 0; d < b; d++) {
|
1247
|
-
H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" ");
|
1248
|
-
}g.currentTime = a;g.progress = a / g.duration * 100;
|
1249
|
-
}function f(a) {
|
1250
|
-
if (g[a]) g[a](g);
|
1251
|
-
}function e() {
|
1252
|
-
g.remaining && !0 !== g.remaining && g.remaining--;
|
1253
|
-
}function k(a) {
|
1254
|
-
var k = g.duration,
|
1255
|
-
n = g.offset,
|
1256
|
-
w = n + g.delay,
|
1257
|
-
r = g.currentTime,
|
1258
|
-
x = g.reversed,
|
1259
|
-
q = d(a);if (g.children.length) {
|
1260
|
-
var u = g.children,
|
1261
|
-
v = u.length;
|
1262
|
-
if (q >= g.currentTime) for (var G = 0; G < v; G++) {
|
1263
|
-
u[G].seek(q);
|
1264
|
-
} else for (; v--;) {
|
1265
|
-
u[v].seek(q);
|
1266
|
-
}
|
1267
|
-
}if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run");if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e();f("update");a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0);
|
1268
|
-
}a = void 0 === a ? {} : a;var h,
|
1269
|
-
t,
|
1270
|
-
l = 0,
|
1271
|
-
p = null,
|
1272
|
-
m = c(),
|
1273
|
-
g = fa(a);g.reset = function () {
|
1274
|
-
var a = g.direction,
|
1275
|
-
c = g.loop;g.currentTime = 0;g.progress = 0;g.paused = !0;g.began = !1;g.completed = !1;g.reversed = "reverse" === a;g.remaining = "alternate" === a && 1 === c ? 2 : c;b(0);for (a = g.children.length; a--;) {
|
1276
|
-
g.children[a].reset();
|
1277
|
-
}
|
1278
|
-
};g.tick = function (a) {
|
1279
|
-
h = a;t || (t = h);k((l + h - t) * q.speed);
|
1280
|
-
};g.seek = function (a) {
|
1281
|
-
k(d(a));
|
1282
|
-
};g.pause = function () {
|
1283
|
-
var a = v.indexOf(g);-1 < a && v.splice(a, 1);g.paused = !0;
|
1284
|
-
};g.play = function () {
|
1285
|
-
g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia());
|
1286
|
-
};g.reverse = function () {
|
1287
|
-
g.reversed = !g.reversed;t = 0;l = d(g.currentTime);
|
1288
|
-
};g.restart = function () {
|
1289
|
-
g.pause();
|
1290
|
-
g.reset();g.play();
|
1291
|
-
};g.finished = m;g.reset();g.autoplay && g.play();return g;
|
1292
|
-
}var ga = { update: void 0, begin: void 0, run: void 0, complete: void 0, loop: 1, direction: "normal", autoplay: !0, offset: 0 },
|
1293
|
-
S = { duration: 1E3, delay: 0, easing: "easeOutElastic", elasticity: 500, round: 0 },
|
1294
|
-
W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),
|
1295
|
-
H,
|
1296
|
-
h = { arr: function (a) {
|
1297
|
-
return Array.isArray(a);
|
1298
|
-
}, obj: function (a) {
|
1299
|
-
return -1 < Object.prototype.toString.call(a).indexOf("Object");
|
1300
|
-
},
|
1301
|
-
pth: function (a) {
|
1302
|
-
return h.obj(a) && a.hasOwnProperty("totalLength");
|
1303
|
-
}, svg: function (a) {
|
1304
|
-
return a instanceof SVGElement;
|
1305
|
-
}, dom: function (a) {
|
1306
|
-
return a.nodeType || h.svg(a);
|
1307
|
-
}, str: function (a) {
|
1308
|
-
return "string" === typeof a;
|
1309
|
-
}, fnc: function (a) {
|
1310
|
-
return "function" === typeof a;
|
1311
|
-
}, und: function (a) {
|
1312
|
-
return "undefined" === typeof a;
|
1313
|
-
}, hex: function (a) {
|
1314
|
-
return (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)
|
1315
|
-
);
|
1316
|
-
}, rgb: function (a) {
|
1317
|
-
return (/^rgb/.test(a)
|
1318
|
-
);
|
1319
|
-
}, hsl: function (a) {
|
1320
|
-
return (/^hsl/.test(a)
|
1321
|
-
);
|
1322
|
-
}, col: function (a) {
|
1323
|
-
return h.hex(a) || h.rgb(a) || h.hsl(a);
|
1324
|
-
} },
|
1325
|
-
A = function () {
|
1326
|
-
function a(a, d, b) {
|
1327
|
-
return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a;
|
1328
|
-
}return function (c, d, b, f) {
|
1329
|
-
if (0 <= c && 1 >= c && 0 <= b && 1 >= b) {
|
1330
|
-
var e = new Float32Array(11);if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) {
|
1331
|
-
e[k] = a(.1 * k, c, b);
|
1332
|
-
}return function (k) {
|
1333
|
-
if (c === d && b === f) return k;if (0 === k) return 0;if (1 === k) return 1;for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) {
|
1334
|
-
h += .1;
|
1335
|
-
}--l;var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1,
|
1336
|
-
n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (.001 <= n) {
|
1337
|
-
for (h = 0; 4 > h; ++h) {
|
1338
|
-
n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (0 === n) break;var m = a(l, c, b) - k,
|
1339
|
-
l = l - m / n;
|
1340
|
-
}k = l;
|
1341
|
-
} else if (0 === n) k = l;else {
|
1342
|
-
var l = h,
|
1343
|
-
h = h + .1,
|
1344
|
-
g = 0;do {
|
1345
|
-
m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m;
|
1346
|
-
} while (1e-7 < Math.abs(n) && 10 > ++g);k = m;
|
1347
|
-
}return a(k, d, f);
|
1348
|
-
};
|
1349
|
-
}
|
1350
|
-
};
|
1351
|
-
}(),
|
1352
|
-
Q = function () {
|
1353
|
-
function a(a, b) {
|
1354
|
-
return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b);
|
1355
|
-
}var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),
|
1356
|
-
d = { 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], a], 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 (b, c) {
|
1357
|
-
return 1 - a(1 - b, c);
|
1358
|
-
}], 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 (b, c) {
|
1359
|
-
return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2;
|
1360
|
-
}] },
|
1361
|
-
b = { linear: A(.25, .25, .75, .75) },
|
1362
|
-
f = {},
|
1363
|
-
e;for (e in d) {
|
1364
|
-
f.type = e, d[f.type].forEach(function (a) {
|
1365
|
-
return function (d, f) {
|
1366
|
-
b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d);
|
1367
|
-
};
|
1368
|
-
}(f)), f = { type: f.type };
|
1369
|
-
}return b;
|
1370
|
-
}(),
|
1371
|
-
ha = { css: function (a, c, d) {
|
1372
|
-
return a.style[c] = d;
|
1373
|
-
}, attribute: function (a, c, d) {
|
1374
|
-
return a.setAttribute(c, d);
|
1375
|
-
}, object: function (a, c, d) {
|
1376
|
-
return a[c] = d;
|
1377
|
-
}, transform: function (a, c, d, b, f) {
|
1378
|
-
b[f] || (b[f] = []);b[f].push(c + "(" + d + ")");
|
1379
|
-
} },
|
1380
|
-
v = [],
|
1381
|
-
B = 0,
|
1382
|
-
ia = function () {
|
1383
|
-
function a() {
|
1384
|
-
B = requestAnimationFrame(c);
|
1385
|
-
}function c(c) {
|
1386
|
-
var b = v.length;if (b) {
|
1387
|
-
for (var d = 0; d < b;) {
|
1388
|
-
v[d] && v[d].tick(c), d++;
|
1389
|
-
}a();
|
1390
|
-
} else cancelAnimationFrame(B), B = 0;
|
1391
|
-
}return a;
|
1392
|
-
}();q.version = "2.2.0";q.speed = 1;q.running = v;q.remove = function (a) {
|
1393
|
-
a = P(a);for (var c = v.length; c--;) {
|
1394
|
-
for (var d = v[c], b = d.animations, f = b.length; f--;) {
|
1395
|
-
u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause());
|
1396
|
-
}
|
1397
|
-
}
|
1398
|
-
};q.getValue = K;q.path = function (a, c) {
|
1399
|
-
var d = h.str(a) ? e(a)[0] : a,
|
1400
|
-
b = c || 100;return function (a) {
|
1401
|
-
return { el: d, property: a, totalLength: N(d) * (b / 100) };
|
1402
|
-
};
|
1403
|
-
};q.setDashoffset = function (a) {
|
1404
|
-
var c = N(a);a.setAttribute("stroke-dasharray", c);return c;
|
1405
|
-
};q.bezier = A;q.easings = Q;q.timeline = function (a) {
|
1406
|
-
var c = q(a);c.pause();c.duration = 0;c.add = function (d) {
|
1407
|
-
c.children.forEach(function (a) {
|
1408
|
-
a.began = !0;a.completed = !0;
|
1409
|
-
});m(d).forEach(function (b) {
|
1410
|
-
var d = z(b, D(S, a || {}));d.targets = d.targets || a.targets;b = c.duration;var e = d.offset;d.autoplay = !1;d.direction = c.direction;d.offset = h.und(e) ? b : L(e, b);c.began = !0;c.completed = !0;c.seek(d.offset);d = q(d);d.began = !0;d.completed = !0;d.duration > b && (c.duration = d.duration);c.children.push(d);
|
1411
|
-
});c.seek(0);c.reset();c.autoplay && c.restart();return c;
|
1412
|
-
};return c;
|
1413
|
-
};q.random = function (a, c) {
|
1414
|
-
return Math.floor(Math.random() * (c - a + 1)) + a;
|
1415
|
-
};return q;
|
1416
|
-
});
|
1417
|
-
; // Required for Meteor package, the use of window prevents export by Meteor
|
1418
|
-
(function (window) {
|
1419
|
-
if (window.Package) {
|
1420
|
-
M = {};
|
1421
|
-
} else {
|
1422
|
-
window.M = {};
|
1423
|
-
}
|
1424
|
-
|
1425
|
-
// Check for jQuery
|
1426
|
-
M.jQueryLoaded = !!window.jQuery;
|
1427
|
-
})(window);
|
1428
|
-
|
1429
|
-
// AMD
|
1430
|
-
if (typeof define === "function" && define.amd) {
|
1431
|
-
define("M", [], function () {
|
1432
|
-
return M;
|
1433
|
-
});
|
1434
|
-
|
1435
|
-
// Common JS
|
1436
|
-
} else if (typeof exports !== 'undefined' && !exports.nodeType) {
|
1437
|
-
if (typeof module !== 'undefined' && !module.nodeType && module.exports) {
|
1438
|
-
exports = module.exports = M;
|
1439
|
-
}
|
1440
|
-
exports.default = M;
|
1441
|
-
}
|
1442
|
-
|
1443
|
-
M.keys = {
|
1444
|
-
TAB: 9,
|
1445
|
-
ENTER: 13,
|
1446
|
-
ESC: 27,
|
1447
|
-
ARROW_UP: 38,
|
1448
|
-
ARROW_DOWN: 40
|
1449
|
-
};
|
1450
|
-
|
1451
|
-
/**
|
1452
|
-
* TabPress Keydown handler
|
1453
|
-
*/
|
1454
|
-
M.tabPressed = false;
|
1455
|
-
var docHandleKeydown = function (e) {
|
1456
|
-
if (e.which === M.keys.TAB) {
|
1457
|
-
M.tabPressed = true;
|
1458
|
-
}
|
1459
|
-
};
|
1460
|
-
var docHandleKeyup = function (e) {
|
1461
|
-
if (e.which === M.keys.TAB) {
|
1462
|
-
M.tabPressed = false;
|
1463
|
-
}
|
1464
|
-
};
|
1465
|
-
document.addEventListener('keydown', docHandleKeydown);
|
1466
|
-
document.addEventListener('keyup', docHandleKeyup);
|
1467
|
-
|
1468
|
-
/**
|
1469
|
-
* Initialize jQuery wrapper for plugin
|
1470
|
-
* @param {Class} plugin javascript class
|
1471
|
-
* @param {string} pluginName jQuery plugin name
|
1472
|
-
* @param {string} classRef Class reference name
|
1473
|
-
*/
|
1474
|
-
M.initializeJqueryWrapper = function (plugin, pluginName, classRef) {
|
1475
|
-
jQuery.fn[pluginName] = function (methodOrOptions) {
|
1476
|
-
// Call plugin method if valid method name is passed in
|
1477
|
-
if (plugin.prototype[methodOrOptions]) {
|
1478
|
-
var params = Array.prototype.slice.call(arguments, 1);
|
1479
|
-
|
1480
|
-
// Getter methods
|
1481
|
-
if (methodOrOptions.slice(0, 3) === 'get') {
|
1482
|
-
var instance = this.first()[0][classRef];
|
1483
|
-
return instance[methodOrOptions].apply(instance, params);
|
1484
1129
|
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
});
|
1491
|
-
}
|
1130
|
+
// Void methods
|
1131
|
+
return this.each(function () {
|
1132
|
+
var instance = this[classRef];
|
1133
|
+
instance[methodOrOptions].apply(instance, params);
|
1134
|
+
});
|
1492
1135
|
|
1493
1136
|
// Initialize plugin if options or no argument is passed in
|
1494
1137
|
} else if (typeof methodOrOptions === 'object' || !methodOrOptions) {
|
1495
1138
|
plugin.init(this, arguments[0]);
|
1496
1139
|
return this;
|
1497
|
-
|
1498
|
-
// Return error if an unrecognized method name is passed in
|
1499
|
-
} else {
|
1500
|
-
jQuery.error("Method " + methodOrOptions + " does not exist on jQuery." + pluginName);
|
1501
1140
|
}
|
1141
|
+
|
1142
|
+
// Return error if an unrecognized method name is passed in
|
1143
|
+
jQuery.error("Method " + methodOrOptions + " does not exist on jQuery." + pluginName);
|
1502
1144
|
};
|
1503
1145
|
};
|
1504
1146
|
|
@@ -1661,9 +1303,9 @@ M.getOverflowParent = function (element) {
|
|
1661
1303
|
|
1662
1304
|
if (element === document.body || getComputedStyle(element).overflow !== 'visible') {
|
1663
1305
|
return element;
|
1664
|
-
} else {
|
1665
|
-
return M.getOverflowParent(element.parentElement);
|
1666
1306
|
}
|
1307
|
+
|
1308
|
+
return M.getOverflowParent(element.parentElement);
|
1667
1309
|
};
|
1668
1310
|
|
1669
1311
|
/**
|
@@ -1766,9 +1408,426 @@ M.throttle = function (func, wait, options) {
|
|
1766
1408
|
} else if (!timeout && options.trailing !== false) {
|
1767
1409
|
timeout = setTimeout(later, remaining);
|
1768
1410
|
}
|
1769
|
-
return result;
|
1770
|
-
};
|
1771
|
-
};
|
1411
|
+
return result;
|
1412
|
+
};
|
1413
|
+
};
|
1414
|
+
; /*
|
1415
|
+
v2.2.0
|
1416
|
+
2017 Julian Garnier
|
1417
|
+
Released under the MIT license
|
1418
|
+
*/
|
1419
|
+
var $jscomp = { scope: {} };$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (e, r, p) {
|
1420
|
+
if (p.get || p.set) throw new TypeError("ES3 does not support getters and setters.");e != Array.prototype && e != Object.prototype && (e[r] = p.value);
|
1421
|
+
};$jscomp.getGlobal = function (e) {
|
1422
|
+
return "undefined" != typeof window && window === e ? e : "undefined" != typeof global && null != global ? global : e;
|
1423
|
+
};$jscomp.global = $jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX = "jscomp_symbol_";
|
1424
|
+
$jscomp.initSymbol = function () {
|
1425
|
+
$jscomp.initSymbol = function () {};$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol);
|
1426
|
+
};$jscomp.symbolCounter_ = 0;$jscomp.Symbol = function (e) {
|
1427
|
+
return $jscomp.SYMBOL_PREFIX + (e || "") + $jscomp.symbolCounter_++;
|
1428
|
+
};
|
1429
|
+
$jscomp.initSymbolIterator = function () {
|
1430
|
+
$jscomp.initSymbol();var e = $jscomp.global.Symbol.iterator;e || (e = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator"));"function" != typeof Array.prototype[e] && $jscomp.defineProperty(Array.prototype, e, { configurable: !0, writable: !0, value: function () {
|
1431
|
+
return $jscomp.arrayIterator(this);
|
1432
|
+
} });$jscomp.initSymbolIterator = function () {};
|
1433
|
+
};$jscomp.arrayIterator = function (e) {
|
1434
|
+
var r = 0;return $jscomp.iteratorPrototype(function () {
|
1435
|
+
return r < e.length ? { done: !1, value: e[r++] } : { done: !0 };
|
1436
|
+
});
|
1437
|
+
};
|
1438
|
+
$jscomp.iteratorPrototype = function (e) {
|
1439
|
+
$jscomp.initSymbolIterator();e = { next: e };e[$jscomp.global.Symbol.iterator] = function () {
|
1440
|
+
return this;
|
1441
|
+
};return e;
|
1442
|
+
};$jscomp.array = $jscomp.array || {};$jscomp.iteratorFromArray = function (e, r) {
|
1443
|
+
$jscomp.initSymbolIterator();e instanceof String && (e += "");var p = 0,
|
1444
|
+
m = { next: function () {
|
1445
|
+
if (p < e.length) {
|
1446
|
+
var u = p++;return { value: r(u, e[u]), done: !1 };
|
1447
|
+
}m.next = function () {
|
1448
|
+
return { done: !0, value: void 0 };
|
1449
|
+
};return m.next();
|
1450
|
+
} };m[Symbol.iterator] = function () {
|
1451
|
+
return m;
|
1452
|
+
};return m;
|
1453
|
+
};
|
1454
|
+
$jscomp.polyfill = function (e, r, p, m) {
|
1455
|
+
if (r) {
|
1456
|
+
p = $jscomp.global;e = e.split(".");for (m = 0; m < e.length - 1; m++) {
|
1457
|
+
var u = e[m];u in p || (p[u] = {});p = p[u];
|
1458
|
+
}e = e[e.length - 1];m = p[e];r = r(m);r != m && null != r && $jscomp.defineProperty(p, e, { configurable: !0, writable: !0, value: r });
|
1459
|
+
}
|
1460
|
+
};$jscomp.polyfill("Array.prototype.keys", function (e) {
|
1461
|
+
return e ? e : function () {
|
1462
|
+
return $jscomp.iteratorFromArray(this, function (e) {
|
1463
|
+
return e;
|
1464
|
+
});
|
1465
|
+
};
|
1466
|
+
}, "es6-impl", "es3");var $jscomp$this = this;
|
1467
|
+
(function (r) {
|
1468
|
+
M.anime = r();
|
1469
|
+
})(function () {
|
1470
|
+
function e(a) {
|
1471
|
+
if (!h.col(a)) try {
|
1472
|
+
return document.querySelectorAll(a);
|
1473
|
+
} catch (c) {}
|
1474
|
+
}function r(a, c) {
|
1475
|
+
for (var d = a.length, b = 2 <= arguments.length ? arguments[1] : void 0, f = [], n = 0; n < d; n++) {
|
1476
|
+
if (n in a) {
|
1477
|
+
var k = a[n];c.call(b, k, n, a) && f.push(k);
|
1478
|
+
}
|
1479
|
+
}return f;
|
1480
|
+
}function p(a) {
|
1481
|
+
return a.reduce(function (a, d) {
|
1482
|
+
return a.concat(h.arr(d) ? p(d) : d);
|
1483
|
+
}, []);
|
1484
|
+
}function m(a) {
|
1485
|
+
if (h.arr(a)) return a;
|
1486
|
+
h.str(a) && (a = e(a) || a);return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a];
|
1487
|
+
}function u(a, c) {
|
1488
|
+
return a.some(function (a) {
|
1489
|
+
return a === c;
|
1490
|
+
});
|
1491
|
+
}function C(a) {
|
1492
|
+
var c = {},
|
1493
|
+
d;for (d in a) {
|
1494
|
+
c[d] = a[d];
|
1495
|
+
}return c;
|
1496
|
+
}function D(a, c) {
|
1497
|
+
var d = C(a),
|
1498
|
+
b;for (b in a) {
|
1499
|
+
d[b] = c.hasOwnProperty(b) ? c[b] : a[b];
|
1500
|
+
}return d;
|
1501
|
+
}function z(a, c) {
|
1502
|
+
var d = C(a),
|
1503
|
+
b;for (b in c) {
|
1504
|
+
d[b] = h.und(a[b]) ? c[b] : a[b];
|
1505
|
+
}return d;
|
1506
|
+
}function T(a) {
|
1507
|
+
a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) {
|
1508
|
+
return c + c + d + d + k + k;
|
1509
|
+
});var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
|
1510
|
+
a = parseInt(c[1], 16);var d = parseInt(c[2], 16),
|
1511
|
+
c = parseInt(c[3], 16);return "rgba(" + a + "," + d + "," + c + ",1)";
|
1512
|
+
}function U(a) {
|
1513
|
+
function c(a, c, b) {
|
1514
|
+
0 > b && (b += 1);1 < b && --b;return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a;
|
1515
|
+
}var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a = parseInt(d[1]) / 360;var b = parseInt(d[2]) / 100,
|
1516
|
+
f = parseInt(d[3]) / 100,
|
1517
|
+
d = d[4] || 1;if (0 == b) f = b = a = f;else {
|
1518
|
+
var n = .5 > f ? f * (1 + b) : f + b - f * b,
|
1519
|
+
k = 2 * f - n,
|
1520
|
+
f = c(k, n, a + 1 / 3),
|
1521
|
+
b = c(k, n, a);a = c(k, n, a - 1 / 3);
|
1522
|
+
}return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")";
|
1523
|
+
}function y(a) {
|
1524
|
+
if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2];
|
1525
|
+
}function V(a) {
|
1526
|
+
if (-1 < a.indexOf("translate") || "perspective" === a) return "px";if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg";
|
1527
|
+
}function I(a, c) {
|
1528
|
+
return h.fnc(a) ? a(c.target, c.id, c.total) : a;
|
1529
|
+
}function E(a, c) {
|
1530
|
+
if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0";
|
1531
|
+
}function J(a, c) {
|
1532
|
+
if (h.dom(a) && u(W, c)) return "transform";if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute";if (h.dom(a) && "transform" !== c && E(a, c)) return "css";if (null != a[c]) return "object";
|
1533
|
+
}function X(a, c) {
|
1534
|
+
var d = V(c),
|
1535
|
+
d = -1 < c.indexOf("scale") ? 1 : 0 + d;a = a.style.transform;if (!a) return d;for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) {
|
1536
|
+
f.push(b[1]), n.push(b[2]);
|
1537
|
+
}a = r(n, function (a, b) {
|
1538
|
+
return f[b] === c;
|
1539
|
+
});return a.length ? a[0] : d;
|
1540
|
+
}function K(a, c) {
|
1541
|
+
switch (J(a, c)) {case "transform":
|
1542
|
+
return X(a, c);case "css":
|
1543
|
+
return E(a, c);case "attribute":
|
1544
|
+
return a.getAttribute(c);}return a[c] || 0;
|
1545
|
+
}function L(a, c) {
|
1546
|
+
var d = /^(\*=|\+=|-=)/.exec(a);if (!d) return a;var b = y(a) || 0;c = parseFloat(c);a = parseFloat(a.replace(d[0], ""));switch (d[0][0]) {case "+":
|
1547
|
+
return c + a + b;case "-":
|
1548
|
+
return c - a + b;case "*":
|
1549
|
+
return c * a + b;}
|
1550
|
+
}function F(a, c) {
|
1551
|
+
return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2));
|
1552
|
+
}function M(a) {
|
1553
|
+
a = a.points;for (var c = 0, d, b = 0; b < a.numberOfItems; b++) {
|
1554
|
+
var f = a.getItem(b);0 < b && (c += F(d, f));d = f;
|
1555
|
+
}return c;
|
1556
|
+
}function N(a) {
|
1557
|
+
if (a.getTotalLength) return a.getTotalLength();switch (a.tagName.toLowerCase()) {case "circle":
|
1558
|
+
return 2 * Math.PI * a.getAttribute("r");case "rect":
|
1559
|
+
return 2 * a.getAttribute("width") + 2 * a.getAttribute("height");case "line":
|
1560
|
+
return F({ x: a.getAttribute("x1"), y: a.getAttribute("y1") }, { x: a.getAttribute("x2"), y: a.getAttribute("y2") });case "polyline":
|
1561
|
+
return M(a);case "polygon":
|
1562
|
+
var c = a.points;return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0));}
|
1563
|
+
}function Y(a, c) {
|
1564
|
+
function d(b) {
|
1565
|
+
b = void 0 === b ? 0 : b;return a.el.getPointAtLength(1 <= c + b ? c + b : 0);
|
1566
|
+
}var b = d(),
|
1567
|
+
f = d(-1),
|
1568
|
+
n = d(1);switch (a.property) {case "x":
|
1569
|
+
return b.x;case "y":
|
1570
|
+
return b.y;
|
1571
|
+
case "angle":
|
1572
|
+
return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI;}
|
1573
|
+
}function O(a, c) {
|
1574
|
+
var d = /-?\d*\.?\d+/g,
|
1575
|
+
b;b = h.pth(a) ? a.totalLength : a;if (h.col(b)) {
|
1576
|
+
if (h.rgb(b)) {
|
1577
|
+
var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b = f ? "rgba(" + f[1] + ",1)" : b;
|
1578
|
+
} else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0;
|
1579
|
+
} else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f;b += "";return { original: b, numbers: b.match(d) ? b.match(d).map(Number) : [0], strings: h.str(a) || c ? b.split(d) : [] };
|
1580
|
+
}function P(a) {
|
1581
|
+
a = a ? p(h.arr(a) ? a.map(m) : m(a)) : [];return r(a, function (a, d, b) {
|
1582
|
+
return b.indexOf(a) === d;
|
1583
|
+
});
|
1584
|
+
}function Z(a) {
|
1585
|
+
var c = P(a);return c.map(function (a, b) {
|
1586
|
+
return { target: a, id: b, total: c.length };
|
1587
|
+
});
|
1588
|
+
}function aa(a, c) {
|
1589
|
+
var d = C(c);if (h.arr(a)) {
|
1590
|
+
var b = a.length;2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { value: a };
|
1591
|
+
}return m(a).map(function (a, b) {
|
1592
|
+
b = b ? 0 : c.delay;a = h.obj(a) && !h.pth(a) ? a : { value: a };h.und(a.delay) && (a.delay = b);return a;
|
1593
|
+
}).map(function (a) {
|
1594
|
+
return z(a, d);
|
1595
|
+
});
|
1596
|
+
}function ba(a, c) {
|
1597
|
+
var d = {},
|
1598
|
+
b;for (b in a) {
|
1599
|
+
var f = I(a[b], c);h.arr(f) && (f = f.map(function (a) {
|
1600
|
+
return I(a, c);
|
1601
|
+
}), 1 === f.length && (f = f[0]));d[b] = f;
|
1602
|
+
}d.duration = parseFloat(d.duration);d.delay = parseFloat(d.delay);return d;
|
1603
|
+
}function ca(a) {
|
1604
|
+
return h.arr(a) ? A.apply(this, a) : Q[a];
|
1605
|
+
}function da(a, c) {
|
1606
|
+
var d;return a.tweens.map(function (b) {
|
1607
|
+
b = ba(b, c);var f = b.value,
|
1608
|
+
e = K(c.target, a.name),
|
1609
|
+
k = d ? d.to.original : e,
|
1610
|
+
k = h.arr(f) ? f[0] : k,
|
1611
|
+
w = L(h.arr(f) ? f[1] : f, k),
|
1612
|
+
e = y(w) || y(k) || y(e);b.from = O(k, e);b.to = O(w, e);b.start = d ? d.end : a.offset;b.end = b.start + b.delay + b.duration;b.easing = ca(b.easing);b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3;b.isPath = h.pth(f);b.isColor = h.col(b.from.original);b.isColor && (b.round = 1);return d = b;
|
1613
|
+
});
|
1614
|
+
}function ea(a, c) {
|
1615
|
+
return r(p(a.map(function (a) {
|
1616
|
+
return c.map(function (b) {
|
1617
|
+
var c = J(a.target, b.name);if (c) {
|
1618
|
+
var d = da(b, a);b = { type: c, property: b.name, animatable: a, tweens: d, duration: d[d.length - 1].end, delay: d[0].delay };
|
1619
|
+
} else b = void 0;return b;
|
1620
|
+
});
|
1621
|
+
})), function (a) {
|
1622
|
+
return !h.und(a);
|
1623
|
+
});
|
1624
|
+
}function R(a, c, d, b) {
|
1625
|
+
var f = "delay" === a;return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) {
|
1626
|
+
return b[a];
|
1627
|
+
})) : f ? b.delay : d.offset + b.delay + b.duration;
|
1628
|
+
}function fa(a) {
|
1629
|
+
var c = D(ga, a),
|
1630
|
+
d = D(S, a),
|
1631
|
+
b = Z(a.targets),
|
1632
|
+
f = [],
|
1633
|
+
e = z(c, d),
|
1634
|
+
k;for (k in a) {
|
1635
|
+
e.hasOwnProperty(k) || "targets" === k || f.push({ name: k, offset: e.offset, tweens: aa(a[k], d) });
|
1636
|
+
}a = ea(b, f);return z(c, { children: [], animatables: b, animations: a, duration: R("duration", a, c, d), delay: R("delay", a, c, d) });
|
1637
|
+
}function q(a) {
|
1638
|
+
function c() {
|
1639
|
+
return window.Promise && new Promise(function (a) {
|
1640
|
+
return p = a;
|
1641
|
+
});
|
1642
|
+
}function d(a) {
|
1643
|
+
return g.reversed ? g.duration - a : a;
|
1644
|
+
}function b(a) {
|
1645
|
+
for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) {
|
1646
|
+
var e = d[b],
|
1647
|
+
k = e.animatable,
|
1648
|
+
h = e.tweens,
|
1649
|
+
n = h.length - 1,
|
1650
|
+
l = h[n];n && (l = r(h, function (b) {
|
1651
|
+
return a < b.end;
|
1652
|
+
})[0] || l);for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) {
|
1653
|
+
var x = void 0,
|
1654
|
+
x = l.to.numbers[t],
|
1655
|
+
q = l.from.numbers[t],
|
1656
|
+
x = l.isPath ? Y(l.value, w * x) : q + w * (x - q);p && (l.isColor && 2 < t || (x = Math.round(x * p) / p));n.push(x);
|
1657
|
+
}if (l = h.length) for (m = h[0], w = 0; w < l; w++) {
|
1658
|
+
p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " "));
|
1659
|
+
} else m = n[0];ha[e.type](k.target, e.property, m, c, k.id);e.currentValue = m;b++;
|
1660
|
+
}if (b = Object.keys(c).length) for (d = 0; d < b; d++) {
|
1661
|
+
H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" ");
|
1662
|
+
}g.currentTime = a;g.progress = a / g.duration * 100;
|
1663
|
+
}function f(a) {
|
1664
|
+
if (g[a]) g[a](g);
|
1665
|
+
}function e() {
|
1666
|
+
g.remaining && !0 !== g.remaining && g.remaining--;
|
1667
|
+
}function k(a) {
|
1668
|
+
var k = g.duration,
|
1669
|
+
n = g.offset,
|
1670
|
+
w = n + g.delay,
|
1671
|
+
r = g.currentTime,
|
1672
|
+
x = g.reversed,
|
1673
|
+
q = d(a);if (g.children.length) {
|
1674
|
+
var u = g.children,
|
1675
|
+
v = u.length;
|
1676
|
+
if (q >= g.currentTime) for (var G = 0; G < v; G++) {
|
1677
|
+
u[G].seek(q);
|
1678
|
+
} else for (; v--;) {
|
1679
|
+
u[v].seek(q);
|
1680
|
+
}
|
1681
|
+
}if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run");if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e();f("update");a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0);
|
1682
|
+
}a = void 0 === a ? {} : a;var h,
|
1683
|
+
t,
|
1684
|
+
l = 0,
|
1685
|
+
p = null,
|
1686
|
+
m = c(),
|
1687
|
+
g = fa(a);g.reset = function () {
|
1688
|
+
var a = g.direction,
|
1689
|
+
c = g.loop;g.currentTime = 0;g.progress = 0;g.paused = !0;g.began = !1;g.completed = !1;g.reversed = "reverse" === a;g.remaining = "alternate" === a && 1 === c ? 2 : c;b(0);for (a = g.children.length; a--;) {
|
1690
|
+
g.children[a].reset();
|
1691
|
+
}
|
1692
|
+
};g.tick = function (a) {
|
1693
|
+
h = a;t || (t = h);k((l + h - t) * q.speed);
|
1694
|
+
};g.seek = function (a) {
|
1695
|
+
k(d(a));
|
1696
|
+
};g.pause = function () {
|
1697
|
+
var a = v.indexOf(g);-1 < a && v.splice(a, 1);g.paused = !0;
|
1698
|
+
};g.play = function () {
|
1699
|
+
g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia());
|
1700
|
+
};g.reverse = function () {
|
1701
|
+
g.reversed = !g.reversed;t = 0;l = d(g.currentTime);
|
1702
|
+
};g.restart = function () {
|
1703
|
+
g.pause();
|
1704
|
+
g.reset();g.play();
|
1705
|
+
};g.finished = m;g.reset();g.autoplay && g.play();return g;
|
1706
|
+
}var ga = { update: void 0, begin: void 0, run: void 0, complete: void 0, loop: 1, direction: "normal", autoplay: !0, offset: 0 },
|
1707
|
+
S = { duration: 1E3, delay: 0, easing: "easeOutElastic", elasticity: 500, round: 0 },
|
1708
|
+
W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),
|
1709
|
+
H,
|
1710
|
+
h = { arr: function (a) {
|
1711
|
+
return Array.isArray(a);
|
1712
|
+
}, obj: function (a) {
|
1713
|
+
return -1 < Object.prototype.toString.call(a).indexOf("Object");
|
1714
|
+
},
|
1715
|
+
pth: function (a) {
|
1716
|
+
return h.obj(a) && a.hasOwnProperty("totalLength");
|
1717
|
+
}, svg: function (a) {
|
1718
|
+
return a instanceof SVGElement;
|
1719
|
+
}, dom: function (a) {
|
1720
|
+
return a.nodeType || h.svg(a);
|
1721
|
+
}, str: function (a) {
|
1722
|
+
return "string" === typeof a;
|
1723
|
+
}, fnc: function (a) {
|
1724
|
+
return "function" === typeof a;
|
1725
|
+
}, und: function (a) {
|
1726
|
+
return "undefined" === typeof a;
|
1727
|
+
}, hex: function (a) {
|
1728
|
+
return (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)
|
1729
|
+
);
|
1730
|
+
}, rgb: function (a) {
|
1731
|
+
return (/^rgb/.test(a)
|
1732
|
+
);
|
1733
|
+
}, hsl: function (a) {
|
1734
|
+
return (/^hsl/.test(a)
|
1735
|
+
);
|
1736
|
+
}, col: function (a) {
|
1737
|
+
return h.hex(a) || h.rgb(a) || h.hsl(a);
|
1738
|
+
} },
|
1739
|
+
A = function () {
|
1740
|
+
function a(a, d, b) {
|
1741
|
+
return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a;
|
1742
|
+
}return function (c, d, b, f) {
|
1743
|
+
if (0 <= c && 1 >= c && 0 <= b && 1 >= b) {
|
1744
|
+
var e = new Float32Array(11);if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) {
|
1745
|
+
e[k] = a(.1 * k, c, b);
|
1746
|
+
}return function (k) {
|
1747
|
+
if (c === d && b === f) return k;if (0 === k) return 0;if (1 === k) return 1;for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) {
|
1748
|
+
h += .1;
|
1749
|
+
}--l;var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1,
|
1750
|
+
n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (.001 <= n) {
|
1751
|
+
for (h = 0; 4 > h; ++h) {
|
1752
|
+
n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (0 === n) break;var m = a(l, c, b) - k,
|
1753
|
+
l = l - m / n;
|
1754
|
+
}k = l;
|
1755
|
+
} else if (0 === n) k = l;else {
|
1756
|
+
var l = h,
|
1757
|
+
h = h + .1,
|
1758
|
+
g = 0;do {
|
1759
|
+
m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m;
|
1760
|
+
} while (1e-7 < Math.abs(n) && 10 > ++g);k = m;
|
1761
|
+
}return a(k, d, f);
|
1762
|
+
};
|
1763
|
+
}
|
1764
|
+
};
|
1765
|
+
}(),
|
1766
|
+
Q = function () {
|
1767
|
+
function a(a, b) {
|
1768
|
+
return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b);
|
1769
|
+
}var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),
|
1770
|
+
d = { 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], a], 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 (b, c) {
|
1771
|
+
return 1 - a(1 - b, c);
|
1772
|
+
}], 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 (b, c) {
|
1773
|
+
return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2;
|
1774
|
+
}] },
|
1775
|
+
b = { linear: A(.25, .25, .75, .75) },
|
1776
|
+
f = {},
|
1777
|
+
e;for (e in d) {
|
1778
|
+
f.type = e, d[f.type].forEach(function (a) {
|
1779
|
+
return function (d, f) {
|
1780
|
+
b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d);
|
1781
|
+
};
|
1782
|
+
}(f)), f = { type: f.type };
|
1783
|
+
}return b;
|
1784
|
+
}(),
|
1785
|
+
ha = { css: function (a, c, d) {
|
1786
|
+
return a.style[c] = d;
|
1787
|
+
}, attribute: function (a, c, d) {
|
1788
|
+
return a.setAttribute(c, d);
|
1789
|
+
}, object: function (a, c, d) {
|
1790
|
+
return a[c] = d;
|
1791
|
+
}, transform: function (a, c, d, b, f) {
|
1792
|
+
b[f] || (b[f] = []);b[f].push(c + "(" + d + ")");
|
1793
|
+
} },
|
1794
|
+
v = [],
|
1795
|
+
B = 0,
|
1796
|
+
ia = function () {
|
1797
|
+
function a() {
|
1798
|
+
B = requestAnimationFrame(c);
|
1799
|
+
}function c(c) {
|
1800
|
+
var b = v.length;if (b) {
|
1801
|
+
for (var d = 0; d < b;) {
|
1802
|
+
v[d] && v[d].tick(c), d++;
|
1803
|
+
}a();
|
1804
|
+
} else cancelAnimationFrame(B), B = 0;
|
1805
|
+
}return a;
|
1806
|
+
}();q.version = "2.2.0";q.speed = 1;q.running = v;q.remove = function (a) {
|
1807
|
+
a = P(a);for (var c = v.length; c--;) {
|
1808
|
+
for (var d = v[c], b = d.animations, f = b.length; f--;) {
|
1809
|
+
u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause());
|
1810
|
+
}
|
1811
|
+
}
|
1812
|
+
};q.getValue = K;q.path = function (a, c) {
|
1813
|
+
var d = h.str(a) ? e(a)[0] : a,
|
1814
|
+
b = c || 100;return function (a) {
|
1815
|
+
return { el: d, property: a, totalLength: N(d) * (b / 100) };
|
1816
|
+
};
|
1817
|
+
};q.setDashoffset = function (a) {
|
1818
|
+
var c = N(a);a.setAttribute("stroke-dasharray", c);return c;
|
1819
|
+
};q.bezier = A;q.easings = Q;q.timeline = function (a) {
|
1820
|
+
var c = q(a);c.pause();c.duration = 0;c.add = function (d) {
|
1821
|
+
c.children.forEach(function (a) {
|
1822
|
+
a.began = !0;a.completed = !0;
|
1823
|
+
});m(d).forEach(function (b) {
|
1824
|
+
var d = z(b, D(S, a || {}));d.targets = d.targets || a.targets;b = c.duration;var e = d.offset;d.autoplay = !1;d.direction = c.direction;d.offset = h.und(e) ? b : L(e, b);c.began = !0;c.completed = !0;c.seek(d.offset);d = q(d);d.began = !0;d.completed = !0;d.duration > b && (c.duration = d.duration);c.children.push(d);
|
1825
|
+
});c.seek(0);c.reset();c.autoplay && c.restart();return c;
|
1826
|
+
};return c;
|
1827
|
+
};q.random = function (a, c) {
|
1828
|
+
return Math.floor(Math.random() * (c - a + 1)) + a;
|
1829
|
+
};return q;
|
1830
|
+
});
|
1772
1831
|
;(function ($, anim) {
|
1773
1832
|
'use strict';
|
1774
1833
|
|
@@ -1787,7 +1846,9 @@ M.throttle = function (func, wait, options) {
|
|
1787
1846
|
*
|
1788
1847
|
*/
|
1789
1848
|
|
1790
|
-
var Collapsible = function () {
|
1849
|
+
var Collapsible = function (_Component) {
|
1850
|
+
_inherits(Collapsible, _Component);
|
1851
|
+
|
1791
1852
|
/**
|
1792
1853
|
* Construct Collapsible instance
|
1793
1854
|
* @constructor
|
@@ -1797,14 +1858,9 @@ M.throttle = function (func, wait, options) {
|
|
1797
1858
|
function Collapsible(el, options) {
|
1798
1859
|
_classCallCheck(this, Collapsible);
|
1799
1860
|
|
1800
|
-
|
1801
|
-
if (!!el.M_Collapsible) {
|
1802
|
-
el.M_Collapsible.destroy();
|
1803
|
-
}
|
1861
|
+
var _this3 = _possibleConstructorReturn(this, (Collapsible.__proto__ || Object.getPrototypeOf(Collapsible)).call(this, Collapsible, el, options));
|
1804
1862
|
|
1805
|
-
|
1806
|
-
this.$el = $(el);
|
1807
|
-
this.el.M_Collapsible = this;
|
1863
|
+
_this3.el.M_Collapsible = _this3;
|
1808
1864
|
|
1809
1865
|
/**
|
1810
1866
|
* Options for the collapsible
|
@@ -1817,19 +1873,20 @@ M.throttle = function (func, wait, options) {
|
|
1817
1873
|
* @prop {Number} inDuration - Transition in duration in milliseconds.
|
1818
1874
|
* @prop {Number} outDuration - Transition duration in milliseconds.
|
1819
1875
|
*/
|
1820
|
-
|
1876
|
+
_this3.options = $.extend({}, Collapsible.defaults, options);
|
1821
1877
|
|
1822
|
-
|
1878
|
+
_this3._setupEventHandlers();
|
1823
1879
|
|
1824
1880
|
// Open first active
|
1825
|
-
var $activeBodies =
|
1826
|
-
if (
|
1881
|
+
var $activeBodies = _this3.$el.children('li.active').children('.collapsible-body');
|
1882
|
+
if (_this3.options.accordion) {
|
1827
1883
|
// Handle Accordion
|
1828
1884
|
$activeBodies.first().css('display', 'block');
|
1829
1885
|
} else {
|
1830
1886
|
// Handle Expandables
|
1831
1887
|
$activeBodies.css('display', 'block');
|
1832
1888
|
}
|
1889
|
+
return _this3;
|
1833
1890
|
}
|
1834
1891
|
|
1835
1892
|
_createClass(Collapsible, [{
|
@@ -1899,7 +1956,7 @@ M.throttle = function (func, wait, options) {
|
|
1899
1956
|
}, {
|
1900
1957
|
key: "_animateIn",
|
1901
1958
|
value: function _animateIn(index) {
|
1902
|
-
var
|
1959
|
+
var _this4 = this;
|
1903
1960
|
|
1904
1961
|
var $collapsibleLi = this.$el.children('li').eq(index);
|
1905
1962
|
if ($collapsibleLi.length) {
|
@@ -1938,8 +1995,8 @@ M.throttle = function (func, wait, options) {
|
|
1938
1995
|
});
|
1939
1996
|
|
1940
1997
|
// onOpenEnd callback
|
1941
|
-
if (typeof
|
1942
|
-
|
1998
|
+
if (typeof _this4.options.onOpenEnd === 'function') {
|
1999
|
+
_this4.options.onOpenEnd.call(_this4, $collapsibleLi[0]);
|
1943
2000
|
}
|
1944
2001
|
}
|
1945
2002
|
});
|
@@ -1954,7 +2011,7 @@ M.throttle = function (func, wait, options) {
|
|
1954
2011
|
}, {
|
1955
2012
|
key: "_animateOut",
|
1956
2013
|
value: function _animateOut(index) {
|
1957
|
-
var
|
2014
|
+
var _this5 = this;
|
1958
2015
|
|
1959
2016
|
var $collapsibleLi = this.$el.children('li').eq(index);
|
1960
2017
|
if ($collapsibleLi.length) {
|
@@ -1977,8 +2034,8 @@ M.throttle = function (func, wait, options) {
|
|
1977
2034
|
});
|
1978
2035
|
|
1979
2036
|
// onCloseEnd callback
|
1980
|
-
if (typeof
|
1981
|
-
|
2037
|
+
if (typeof _this5.options.onCloseEnd === 'function') {
|
2038
|
+
_this5.options.onCloseEnd.call(_this5, $collapsibleLi[0]);
|
1982
2039
|
}
|
1983
2040
|
}
|
1984
2041
|
});
|
@@ -1993,7 +2050,7 @@ M.throttle = function (func, wait, options) {
|
|
1993
2050
|
}, {
|
1994
2051
|
key: "open",
|
1995
2052
|
value: function open(index) {
|
1996
|
-
var
|
2053
|
+
var _this6 = this;
|
1997
2054
|
|
1998
2055
|
var $collapsibleLi = this.$el.children('li').eq(index);
|
1999
2056
|
if ($collapsibleLi.length && !$collapsibleLi[0].classList.contains('active')) {
|
@@ -2009,7 +2066,7 @@ M.throttle = function (func, wait, options) {
|
|
2009
2066
|
var $activeLis = this.$el.children('li.active');
|
2010
2067
|
$activeLis.each(function (el) {
|
2011
2068
|
var index = $collapsibleLis.index($(el));
|
2012
|
-
|
2069
|
+
_this6.close(index);
|
2013
2070
|
});
|
2014
2071
|
}
|
2015
2072
|
|
@@ -2042,12 +2099,8 @@ M.throttle = function (func, wait, options) {
|
|
2042
2099
|
}
|
2043
2100
|
}], [{
|
2044
2101
|
key: "init",
|
2045
|
-
value: function init(
|
2046
|
-
|
2047
|
-
$els.each(function () {
|
2048
|
-
arr.push(new Collapsible(this, options));
|
2049
|
-
});
|
2050
|
-
return arr;
|
2102
|
+
value: function init(els, options) {
|
2103
|
+
return _get(Collapsible.__proto__ || Object.getPrototypeOf(Collapsible), "init", this).call(this, this, els, options);
|
2051
2104
|
}
|
2052
2105
|
|
2053
2106
|
/**
|
@@ -2068,14 +2121,14 @@ M.throttle = function (func, wait, options) {
|
|
2068
2121
|
}]);
|
2069
2122
|
|
2070
2123
|
return Collapsible;
|
2071
|
-
}();
|
2124
|
+
}(Component);
|
2072
2125
|
|
2073
2126
|
M.Collapsible = Collapsible;
|
2074
2127
|
|
2075
2128
|
if (M.jQueryLoaded) {
|
2076
2129
|
M.initializeJqueryWrapper(Collapsible, 'collapsible', 'M_Collapsible');
|
2077
2130
|
}
|
2078
|
-
})(cash, anime);
|
2131
|
+
})(cash, M.anime);
|
2079
2132
|
;(function ($, anim) {
|
2080
2133
|
'use strict';
|
2081
2134
|
|
@@ -2097,23 +2150,20 @@ M.throttle = function (func, wait, options) {
|
|
2097
2150
|
* @class
|
2098
2151
|
*/
|
2099
2152
|
|
2100
|
-
var Dropdown = function () {
|
2153
|
+
var Dropdown = function (_Component2) {
|
2154
|
+
_inherits(Dropdown, _Component2);
|
2155
|
+
|
2101
2156
|
function Dropdown(el, options) {
|
2102
2157
|
_classCallCheck(this, Dropdown);
|
2103
2158
|
|
2104
|
-
|
2105
|
-
if (!!el.M_Dropdown) {
|
2106
|
-
el.M_Dropdown.destroy();
|
2107
|
-
}
|
2159
|
+
var _this7 = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, Dropdown, el, options));
|
2108
2160
|
|
2109
|
-
|
2110
|
-
|
2111
|
-
this.el.M_Dropdown = this;
|
2112
|
-
Dropdown._dropdowns.push(this);
|
2161
|
+
_this7.el.M_Dropdown = _this7;
|
2162
|
+
Dropdown._dropdowns.push(_this7);
|
2113
2163
|
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2164
|
+
_this7.id = M.getIdFromTrigger(el);
|
2165
|
+
_this7.dropdownEl = document.getElementById(_this7.id);
|
2166
|
+
_this7.$dropdownEl = $(_this7.dropdownEl);
|
2117
2167
|
|
2118
2168
|
/**
|
2119
2169
|
* Options for the dropdown
|
@@ -2123,26 +2173,27 @@ M.throttle = function (func, wait, options) {
|
|
2123
2173
|
* @prop {Function} onCloseStart - Function called when sidenav starts exiting
|
2124
2174
|
* @prop {Function} onCloseEnd - Function called when sidenav finishes exiting
|
2125
2175
|
*/
|
2126
|
-
|
2176
|
+
_this7.options = $.extend({}, Dropdown.defaults, options);
|
2127
2177
|
|
2128
2178
|
/**
|
2129
2179
|
* Describes open/close state of dropdown
|
2130
2180
|
* @type {Boolean}
|
2131
2181
|
*/
|
2132
|
-
|
2182
|
+
_this7.isOpen = false;
|
2133
2183
|
|
2134
|
-
|
2135
|
-
|
2184
|
+
_this7.focusedIndex = -1;
|
2185
|
+
_this7.filterQuery = [];
|
2136
2186
|
|
2137
2187
|
// Move dropdown-content after dropdown-trigger
|
2138
|
-
|
2139
|
-
|
2140
|
-
|
2141
|
-
|
2142
|
-
|
2143
|
-
|
2144
|
-
|
2145
|
-
|
2188
|
+
_this7.$el.after(_this7.dropdownEl);
|
2189
|
+
|
2190
|
+
_this7._makeDropdownFocusable();
|
2191
|
+
_this7._resetFilterQueryBound = _this7._resetFilterQuery.bind(_this7);
|
2192
|
+
_this7._handleDocumentClickBound = _this7._handleDocumentClick.bind(_this7);
|
2193
|
+
_this7._handleDropdownKeydownBound = _this7._handleDropdownKeydown.bind(_this7);
|
2194
|
+
_this7._handleTriggerKeydownBound = _this7._handleTriggerKeydown.bind(_this7);
|
2195
|
+
_this7._setupEventHandlers();
|
2196
|
+
return _this7;
|
2146
2197
|
}
|
2147
2198
|
|
2148
2199
|
_createClass(Dropdown, [{
|
@@ -2247,20 +2298,20 @@ M.throttle = function (func, wait, options) {
|
|
2247
2298
|
}, {
|
2248
2299
|
key: "_handleDocumentClick",
|
2249
2300
|
value: function _handleDocumentClick(e) {
|
2250
|
-
var
|
2301
|
+
var _this8 = this;
|
2251
2302
|
|
2252
2303
|
var $target = $(e.target);
|
2253
2304
|
if (this.options.closeOnClick && $target.closest('.dropdown-content').length) {
|
2254
2305
|
setTimeout(function () {
|
2255
|
-
|
2306
|
+
_this8.close();
|
2256
2307
|
}, 0);
|
2257
2308
|
} else if ($target.closest('.dropdown-trigger').length) {
|
2258
2309
|
setTimeout(function () {
|
2259
|
-
|
2310
|
+
_this8.close();
|
2260
2311
|
}, 0);
|
2261
2312
|
} else if (!$target.closest('.dropdown-content').length) {
|
2262
2313
|
setTimeout(function () {
|
2263
|
-
|
2314
|
+
_this8.close();
|
2264
2315
|
}, 0);
|
2265
2316
|
}
|
2266
2317
|
}
|
@@ -2449,7 +2500,7 @@ M.throttle = function (func, wait, options) {
|
|
2449
2500
|
}, {
|
2450
2501
|
key: "_animateIn",
|
2451
2502
|
value: function _animateIn(positionInfo) {
|
2452
|
-
var
|
2503
|
+
var _this9 = this;
|
2453
2504
|
|
2454
2505
|
// Place dropdown
|
2455
2506
|
this.dropdownEl.style.left = positionInfo.x + 'px';
|
@@ -2470,12 +2521,12 @@ M.throttle = function (func, wait, options) {
|
|
2470
2521
|
duration: this.options.inDuration,
|
2471
2522
|
easing: 'easeOutQuint',
|
2472
2523
|
complete: function (anim) {
|
2473
|
-
|
2524
|
+
_this9.dropdownEl.focus();
|
2474
2525
|
|
2475
2526
|
// onOpenEnd callback
|
2476
|
-
if (typeof
|
2527
|
+
if (typeof _this9.options.onOpenEnd === 'function') {
|
2477
2528
|
var elem = anim.animatables[0].target;
|
2478
|
-
|
2529
|
+
_this9.options.onOpenEnd.call(elem, _this9.el);
|
2479
2530
|
}
|
2480
2531
|
}
|
2481
2532
|
});
|
@@ -2488,7 +2539,7 @@ M.throttle = function (func, wait, options) {
|
|
2488
2539
|
}, {
|
2489
2540
|
key: "_animateOut",
|
2490
2541
|
value: function _animateOut() {
|
2491
|
-
var
|
2542
|
+
var _this10 = this;
|
2492
2543
|
|
2493
2544
|
anim.remove(this.dropdownEl);
|
2494
2545
|
anim({
|
@@ -2502,12 +2553,12 @@ M.throttle = function (func, wait, options) {
|
|
2502
2553
|
duration: this.options.outDuration,
|
2503
2554
|
easing: 'easeOutQuint',
|
2504
2555
|
complete: function (anim) {
|
2505
|
-
|
2556
|
+
_this10._resetDropdownStyles();
|
2506
2557
|
|
2507
2558
|
// onCloseEnd callback
|
2508
|
-
if (typeof
|
2559
|
+
if (typeof _this10.options.onCloseEnd === 'function') {
|
2509
2560
|
var elem = anim.animatables[0].target;
|
2510
|
-
|
2561
|
+
_this10.options.onCloseEnd.call(_this10, _this10.el);
|
2511
2562
|
}
|
2512
2563
|
}
|
2513
2564
|
});
|
@@ -2567,12 +2618,8 @@ M.throttle = function (func, wait, options) {
|
|
2567
2618
|
}
|
2568
2619
|
}], [{
|
2569
2620
|
key: "init",
|
2570
|
-
value: function init(
|
2571
|
-
|
2572
|
-
$els.each(function () {
|
2573
|
-
arr.push(new Dropdown(this, options));
|
2574
|
-
});
|
2575
|
-
return arr;
|
2621
|
+
value: function init(els, options) {
|
2622
|
+
return _get(Dropdown.__proto__ || Object.getPrototypeOf(Dropdown), "init", this).call(this, this, els, options);
|
2576
2623
|
}
|
2577
2624
|
|
2578
2625
|
/**
|
@@ -2593,7 +2640,7 @@ M.throttle = function (func, wait, options) {
|
|
2593
2640
|
}]);
|
2594
2641
|
|
2595
2642
|
return Dropdown;
|
2596
|
-
}();
|
2643
|
+
}(Component);
|
2597
2644
|
|
2598
2645
|
/**
|
2599
2646
|
* @static
|
@@ -2608,7 +2655,7 @@ M.throttle = function (func, wait, options) {
|
|
2608
2655
|
if (M.jQueryLoaded) {
|
2609
2656
|
M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown');
|
2610
2657
|
}
|
2611
|
-
})(cash, anime);
|
2658
|
+
})(cash, M.anime);
|
2612
2659
|
;(function ($, anim) {
|
2613
2660
|
'use strict';
|
2614
2661
|
|
@@ -2616,8 +2663,10 @@ M.throttle = function (func, wait, options) {
|
|
2616
2663
|
opacity: 0.5,
|
2617
2664
|
inDuration: 250,
|
2618
2665
|
outDuration: 250,
|
2619
|
-
|
2620
|
-
|
2666
|
+
onOpenStart: null,
|
2667
|
+
onOpenEnd: null,
|
2668
|
+
onCloseStart: null,
|
2669
|
+
onCloseEnd: null,
|
2621
2670
|
dismissible: true,
|
2622
2671
|
startingTop: '4%',
|
2623
2672
|
endingTop: '10%'
|
@@ -2628,7 +2677,9 @@ M.throttle = function (func, wait, options) {
|
|
2628
2677
|
*
|
2629
2678
|
*/
|
2630
2679
|
|
2631
|
-
var Modal = function () {
|
2680
|
+
var Modal = function (_Component3) {
|
2681
|
+
_inherits(Modal, _Component3);
|
2682
|
+
|
2632
2683
|
/**
|
2633
2684
|
* Construct Modal instance and set up overlay
|
2634
2685
|
* @constructor
|
@@ -2638,14 +2689,9 @@ M.throttle = function (func, wait, options) {
|
|
2638
2689
|
function Modal(el, options) {
|
2639
2690
|
_classCallCheck(this, Modal);
|
2640
2691
|
|
2641
|
-
|
2642
|
-
if (!!el.M_Modal) {
|
2643
|
-
el.M_Modal.destroy();
|
2644
|
-
}
|
2692
|
+
var _this11 = _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, Modal, el, options));
|
2645
2693
|
|
2646
|
-
|
2647
|
-
this.$el = $(el);
|
2648
|
-
this.el.M_Modal = this;
|
2694
|
+
_this11.el.M_Modal = _this11;
|
2649
2695
|
|
2650
2696
|
/**
|
2651
2697
|
* Options for the modal
|
@@ -2653,29 +2699,32 @@ M.throttle = function (func, wait, options) {
|
|
2653
2699
|
* @prop {Number} [opacity=0.5] - Opacity of the modal overlay
|
2654
2700
|
* @prop {Number} [inDuration=250] - Length in ms of enter transition
|
2655
2701
|
* @prop {Number} [outDuration=250] - Length in ms of exit transition
|
2656
|
-
* @prop {Function}
|
2657
|
-
* @prop {Function}
|
2702
|
+
* @prop {Function} onOpenStart - Callback function called before modal is opened
|
2703
|
+
* @prop {Function} onOpenEnd - Callback function called after modal is opened
|
2704
|
+
* @prop {Function} onCloseStart - Callback function called before modal is closed
|
2705
|
+
* @prop {Function} onCloseEnd - Callback function called after modal is closed
|
2658
2706
|
* @prop {Boolean} [dismissible=true] - Allow modal to be dismissed by keyboard or overlay click
|
2659
2707
|
* @prop {String} [startingTop='4%'] - startingTop
|
2660
2708
|
* @prop {String} [endingTop='10%'] - endingTop
|
2661
2709
|
*/
|
2662
|
-
|
2710
|
+
_this11.options = $.extend({}, Modal.defaults, options);
|
2663
2711
|
|
2664
2712
|
/**
|
2665
2713
|
* Describes open/close state of modal
|
2666
2714
|
* @type {Boolean}
|
2667
2715
|
*/
|
2668
|
-
|
2716
|
+
_this11.isOpen = false;
|
2669
2717
|
|
2670
|
-
|
2671
|
-
|
2672
|
-
|
2718
|
+
_this11.id = _this11.$el.attr('id');
|
2719
|
+
_this11._openingTrigger = undefined;
|
2720
|
+
_this11.$overlay = $('<div class="modal-overlay"></div>');
|
2673
2721
|
|
2674
2722
|
Modal._increment++;
|
2675
2723
|
Modal._count++;
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2724
|
+
_this11.$overlay[0].style.zIndex = 1000 + Modal._increment * 2;
|
2725
|
+
_this11.el.style.zIndex = 1000 + Modal._increment * 2 + 1;
|
2726
|
+
_this11._setupEventHandlers();
|
2727
|
+
return _this11;
|
2679
2728
|
}
|
2680
2729
|
|
2681
2730
|
_createClass(Modal, [{
|
@@ -2790,7 +2839,7 @@ M.throttle = function (func, wait, options) {
|
|
2790
2839
|
}, {
|
2791
2840
|
key: "_animateIn",
|
2792
2841
|
value: function _animateIn() {
|
2793
|
-
var
|
2842
|
+
var _this12 = this;
|
2794
2843
|
|
2795
2844
|
// Set initial styles
|
2796
2845
|
$.extend(this.el.style, {
|
@@ -2815,10 +2864,10 @@ M.throttle = function (func, wait, options) {
|
|
2815
2864
|
targets: this.el,
|
2816
2865
|
duration: this.options.inDuration,
|
2817
2866
|
easing: 'easeOutCubic',
|
2818
|
-
// Handle modal
|
2867
|
+
// Handle modal onOpenEnd callback
|
2819
2868
|
complete: function () {
|
2820
|
-
if (typeof
|
2821
|
-
|
2869
|
+
if (typeof _this12.options.onOpenEnd === 'function') {
|
2870
|
+
_this12.options.onOpenEnd.call(_this12, _this12.el, _this12._openingTrigger);
|
2822
2871
|
}
|
2823
2872
|
}
|
2824
2873
|
};
|
@@ -2850,7 +2899,7 @@ M.throttle = function (func, wait, options) {
|
|
2850
2899
|
}, {
|
2851
2900
|
key: "_animateOut",
|
2852
2901
|
value: function _animateOut() {
|
2853
|
-
var
|
2902
|
+
var _this13 = this;
|
2854
2903
|
|
2855
2904
|
// Animate overlay
|
2856
2905
|
anim({
|
@@ -2867,12 +2916,13 @@ M.throttle = function (func, wait, options) {
|
|
2867
2916
|
easing: 'easeOutCubic',
|
2868
2917
|
// Handle modal ready callback
|
2869
2918
|
complete: function () {
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
2919
|
+
_this13.el.style.display = 'none';
|
2920
|
+
_this13.$overlay.remove();
|
2921
|
+
|
2922
|
+
// Call onCloseEnd callback
|
2923
|
+
if (typeof _this13.options.onCloseEnd === 'function') {
|
2924
|
+
_this13.options.onCloseEnd.call(_this13, _this13.el);
|
2874
2925
|
}
|
2875
|
-
_this10.$overlay.remove();
|
2876
2926
|
}
|
2877
2927
|
};
|
2878
2928
|
|
@@ -2908,11 +2958,17 @@ M.throttle = function (func, wait, options) {
|
|
2908
2958
|
return;
|
2909
2959
|
}
|
2910
2960
|
|
2911
|
-
this.isOpen = true;
|
2961
|
+
this.isOpen = true;
|
2962
|
+
|
2963
|
+
// onOpenStart callback
|
2964
|
+
if (typeof this.options.onOpenStart === 'function') {
|
2965
|
+
this.options.onOpenStart.call(this, this.el, this._openingTrigger);
|
2966
|
+
}
|
2967
|
+
|
2912
2968
|
var body = document.body;
|
2913
2969
|
body.style.overflow = 'hidden';
|
2914
2970
|
this.el.classList.add('open');
|
2915
|
-
|
2971
|
+
this.el.insertAdjacentElement('afterend', this.$overlay[0]);
|
2916
2972
|
|
2917
2973
|
// Set opening trigger, undefined indicates modal was opened by javascript
|
2918
2974
|
this._openingTrigger = !!$trigger ? $trigger[0] : undefined;
|
@@ -2940,6 +2996,12 @@ M.throttle = function (func, wait, options) {
|
|
2940
2996
|
}
|
2941
2997
|
|
2942
2998
|
this.isOpen = false;
|
2999
|
+
|
3000
|
+
// Call onCloseStart callback
|
3001
|
+
if (typeof this.options.onCloseStart === 'function') {
|
3002
|
+
this.options.onCloseStart.call(this, this.el);
|
3003
|
+
}
|
3004
|
+
|
2943
3005
|
this.el.classList.remove('open');
|
2944
3006
|
document.body.style.overflow = '';
|
2945
3007
|
|
@@ -2954,12 +3016,8 @@ M.throttle = function (func, wait, options) {
|
|
2954
3016
|
}
|
2955
3017
|
}], [{
|
2956
3018
|
key: "init",
|
2957
|
-
value: function init(
|
2958
|
-
|
2959
|
-
$els.each(function () {
|
2960
|
-
arr.push(new Modal(this, options));
|
2961
|
-
});
|
2962
|
-
return arr;
|
3019
|
+
value: function init(els, options) {
|
3020
|
+
return _get(Modal.__proto__ || Object.getPrototypeOf(Modal), "init", this).call(this, this, els, options);
|
2963
3021
|
}
|
2964
3022
|
|
2965
3023
|
/**
|
@@ -2980,7 +3038,7 @@ M.throttle = function (func, wait, options) {
|
|
2980
3038
|
}]);
|
2981
3039
|
|
2982
3040
|
return Modal;
|
2983
|
-
}();
|
3041
|
+
}(Component);
|
2984
3042
|
|
2985
3043
|
/**
|
2986
3044
|
* @static
|
@@ -3001,13 +3059,17 @@ M.throttle = function (func, wait, options) {
|
|
3001
3059
|
if (M.jQueryLoaded) {
|
3002
3060
|
M.initializeJqueryWrapper(Modal, 'modal', 'M_Modal');
|
3003
3061
|
}
|
3004
|
-
})(cash, anime);
|
3062
|
+
})(cash, M.anime);
|
3005
3063
|
;(function ($, anim) {
|
3006
3064
|
'use strict';
|
3007
3065
|
|
3008
3066
|
var _defaults = {
|
3009
3067
|
inDuration: 275,
|
3010
|
-
outDuration: 200
|
3068
|
+
outDuration: 200,
|
3069
|
+
onOpenStart: null,
|
3070
|
+
onOpenEnd: null,
|
3071
|
+
onCloseStart: null,
|
3072
|
+
onCloseEnd: null
|
3011
3073
|
};
|
3012
3074
|
|
3013
3075
|
/**
|
@@ -3015,7 +3077,9 @@ M.throttle = function (func, wait, options) {
|
|
3015
3077
|
*
|
3016
3078
|
*/
|
3017
3079
|
|
3018
|
-
var Materialbox = function () {
|
3080
|
+
var Materialbox = function (_Component4) {
|
3081
|
+
_inherits(Materialbox, _Component4);
|
3082
|
+
|
3019
3083
|
/**
|
3020
3084
|
* Construct Materialbox instance
|
3021
3085
|
* @constructor
|
@@ -3025,36 +3089,36 @@ M.throttle = function (func, wait, options) {
|
|
3025
3089
|
function Materialbox(el, options) {
|
3026
3090
|
_classCallCheck(this, Materialbox);
|
3027
3091
|
|
3028
|
-
|
3029
|
-
if (!!el.M_Materialbox) {
|
3030
|
-
el.M_Materialbox.destroy();
|
3031
|
-
}
|
3092
|
+
var _this14 = _possibleConstructorReturn(this, (Materialbox.__proto__ || Object.getPrototypeOf(Materialbox)).call(this, Materialbox, el, options));
|
3032
3093
|
|
3033
|
-
|
3034
|
-
this.$el = $(el);
|
3035
|
-
this.el.M_Materialbox = this;
|
3094
|
+
_this14.el.M_Materialbox = _this14;
|
3036
3095
|
|
3037
3096
|
/**
|
3038
3097
|
* Options for the modal
|
3039
3098
|
* @member Materialbox#options
|
3040
3099
|
* @prop {Number} [inDuration=275] - Length in ms of enter transition
|
3041
3100
|
* @prop {Number} [outDuration=200] - Length in ms of exit transition
|
3101
|
+
* @prop {Function} onOpenStart - Callback function called before materialbox is opened
|
3102
|
+
* @prop {Function} onOpenEnd - Callback function called after materialbox is opened
|
3103
|
+
* @prop {Function} onCloseStart - Callback function called before materialbox is closed
|
3104
|
+
* @prop {Function} onCloseEnd - Callback function called after materialbox is closed
|
3042
3105
|
*/
|
3043
|
-
|
3106
|
+
_this14.options = $.extend({}, Materialbox.defaults, options);
|
3044
3107
|
|
3045
|
-
|
3046
|
-
|
3047
|
-
|
3048
|
-
|
3049
|
-
|
3050
|
-
|
3051
|
-
|
3108
|
+
_this14.overlayActive = false;
|
3109
|
+
_this14.doneAnimating = true;
|
3110
|
+
_this14.placeholder = $('<div></div>').addClass('material-placeholder');
|
3111
|
+
_this14.originalWidth = 0;
|
3112
|
+
_this14.originalHeight = 0;
|
3113
|
+
_this14.originInlineStyles = _this14.$el.attr('style');
|
3114
|
+
_this14.caption = _this14.el.getAttribute('data-caption') || "";
|
3052
3115
|
|
3053
3116
|
// Wrap
|
3054
|
-
|
3055
|
-
|
3117
|
+
_this14.$el.before(_this14.placeholder);
|
3118
|
+
_this14.placeholder.append(_this14.$el);
|
3056
3119
|
|
3057
|
-
|
3120
|
+
_this14._setupEventHandlers();
|
3121
|
+
return _this14;
|
3058
3122
|
}
|
3059
3123
|
|
3060
3124
|
_createClass(Materialbox, [{
|
@@ -3174,7 +3238,7 @@ M.throttle = function (func, wait, options) {
|
|
3174
3238
|
}, {
|
3175
3239
|
key: "_animateImageIn",
|
3176
3240
|
value: function _animateImageIn() {
|
3177
|
-
var
|
3241
|
+
var _this15 = this;
|
3178
3242
|
|
3179
3243
|
var animOptions = {
|
3180
3244
|
targets: this.el,
|
@@ -3185,7 +3249,12 @@ M.throttle = function (func, wait, options) {
|
|
3185
3249
|
duration: this.options.inDuration,
|
3186
3250
|
easing: 'easeOutQuad',
|
3187
3251
|
complete: function () {
|
3188
|
-
|
3252
|
+
_this15.doneAnimating = true;
|
3253
|
+
|
3254
|
+
// onOpenEnd callback
|
3255
|
+
if (typeof _this15.options.onOpenEnd === 'function') {
|
3256
|
+
_this15.options.onOpenEnd.call(_this15, _this15.el);
|
3257
|
+
}
|
3189
3258
|
}
|
3190
3259
|
};
|
3191
3260
|
|
@@ -3207,7 +3276,7 @@ M.throttle = function (func, wait, options) {
|
|
3207
3276
|
}, {
|
3208
3277
|
key: "_animateImageOut",
|
3209
3278
|
value: function _animateImageOut() {
|
3210
|
-
var
|
3279
|
+
var _this16 = this;
|
3211
3280
|
|
3212
3281
|
var animOptions = {
|
3213
3282
|
targets: this.el,
|
@@ -3218,7 +3287,7 @@ M.throttle = function (func, wait, options) {
|
|
3218
3287
|
duration: this.options.outDuration,
|
3219
3288
|
easing: 'easeOutQuad',
|
3220
3289
|
complete: function () {
|
3221
|
-
|
3290
|
+
_this16.placeholder.css({
|
3222
3291
|
height: '',
|
3223
3292
|
width: '',
|
3224
3293
|
position: '',
|
@@ -3226,16 +3295,21 @@ M.throttle = function (func, wait, options) {
|
|
3226
3295
|
left: ''
|
3227
3296
|
});
|
3228
3297
|
|
3229
|
-
|
3230
|
-
|
3298
|
+
_this16.$el.removeAttr('style');
|
3299
|
+
_this16.$el.attr('style', _this16.originInlineStyles);
|
3231
3300
|
|
3232
3301
|
// Remove class
|
3233
|
-
|
3234
|
-
|
3302
|
+
_this16.$el.removeClass('active');
|
3303
|
+
_this16.doneAnimating = true;
|
3235
3304
|
|
3236
3305
|
// Remove overflow overrides on ancestors
|
3237
|
-
if (
|
3238
|
-
|
3306
|
+
if (_this16.ancestorsChanged.length) {
|
3307
|
+
_this16.ancestorsChanged.css('overflow', '');
|
3308
|
+
}
|
3309
|
+
|
3310
|
+
// onCloseEnd callback
|
3311
|
+
if (typeof _this16.options.onCloseEnd === 'function') {
|
3312
|
+
_this16.options.onCloseEnd.call(_this16, _this16.el);
|
3239
3313
|
}
|
3240
3314
|
}
|
3241
3315
|
};
|
@@ -3262,7 +3336,7 @@ M.throttle = function (func, wait, options) {
|
|
3262
3336
|
}, {
|
3263
3337
|
key: "open",
|
3264
3338
|
value: function open() {
|
3265
|
-
var
|
3339
|
+
var _this17 = this;
|
3266
3340
|
|
3267
3341
|
this._updateVars();
|
3268
3342
|
this.originalWidth = this.el.getBoundingClientRect().width;
|
@@ -3273,6 +3347,11 @@ M.throttle = function (func, wait, options) {
|
|
3273
3347
|
this.$el.addClass('active');
|
3274
3348
|
this.overlayActive = true;
|
3275
3349
|
|
3350
|
+
// onOpenStart callback
|
3351
|
+
if (typeof this.options.onOpenStart === 'function') {
|
3352
|
+
this.options.onOpenStart.call(this, this.el);
|
3353
|
+
}
|
3354
|
+
|
3276
3355
|
// Set positioning for placeholder
|
3277
3356
|
this.placeholder.css({
|
3278
3357
|
width: this.placeholder[0].getBoundingClientRect().width + 'px',
|
@@ -3295,8 +3374,8 @@ M.throttle = function (func, wait, options) {
|
|
3295
3374
|
this.$overlay = $('<div id="materialbox-overlay"></div>').css({
|
3296
3375
|
opacity: 0
|
3297
3376
|
}).one('click', function () {
|
3298
|
-
if (
|
3299
|
-
|
3377
|
+
if (_this17.doneAnimating) {
|
3378
|
+
_this17.close();
|
3300
3379
|
}
|
3301
3380
|
});
|
3302
3381
|
|
@@ -3378,11 +3457,16 @@ M.throttle = function (func, wait, options) {
|
|
3378
3457
|
}, {
|
3379
3458
|
key: "close",
|
3380
3459
|
value: function close() {
|
3381
|
-
var
|
3460
|
+
var _this18 = this;
|
3382
3461
|
|
3383
3462
|
this._updateVars();
|
3384
3463
|
this.doneAnimating = false;
|
3385
3464
|
|
3465
|
+
// onCloseStart callback
|
3466
|
+
if (typeof this.options.onCloseStart === 'function') {
|
3467
|
+
this.options.onCloseStart.call(this, this.el);
|
3468
|
+
}
|
3469
|
+
|
3386
3470
|
anim.remove(this.el);
|
3387
3471
|
anim.remove(this.$overlay[0]);
|
3388
3472
|
|
@@ -3401,8 +3485,8 @@ M.throttle = function (func, wait, options) {
|
|
3401
3485
|
duration: this.options.outDuration,
|
3402
3486
|
easing: 'easeOutQuad',
|
3403
3487
|
complete: function () {
|
3404
|
-
|
3405
|
-
|
3488
|
+
_this18.overlayActive = false;
|
3489
|
+
_this18.$overlay.remove();
|
3406
3490
|
}
|
3407
3491
|
});
|
3408
3492
|
|
@@ -3416,19 +3500,15 @@ M.throttle = function (func, wait, options) {
|
|
3416
3500
|
duration: this.options.outDuration,
|
3417
3501
|
easing: 'easeOutQuad',
|
3418
3502
|
complete: function () {
|
3419
|
-
|
3503
|
+
_this18.$photoCaption.remove();
|
3420
3504
|
}
|
3421
3505
|
});
|
3422
3506
|
}
|
3423
3507
|
}
|
3424
3508
|
}], [{
|
3425
3509
|
key: "init",
|
3426
|
-
value: function init(
|
3427
|
-
|
3428
|
-
$els.each(function () {
|
3429
|
-
arr.push(new Materialbox(this, options));
|
3430
|
-
});
|
3431
|
-
return arr;
|
3510
|
+
value: function init(els, options) {
|
3511
|
+
return _get(Materialbox.__proto__ || Object.getPrototypeOf(Materialbox), "init", this).call(this, this, els, options);
|
3432
3512
|
}
|
3433
3513
|
|
3434
3514
|
/**
|
@@ -3449,40 +3529,46 @@ M.throttle = function (func, wait, options) {
|
|
3449
3529
|
}]);
|
3450
3530
|
|
3451
3531
|
return Materialbox;
|
3452
|
-
}();
|
3532
|
+
}(Component);
|
3453
3533
|
|
3454
3534
|
M.Materialbox = Materialbox;
|
3455
3535
|
|
3456
3536
|
if (M.jQueryLoaded) {
|
3457
3537
|
M.initializeJqueryWrapper(Materialbox, 'materialbox', 'M_Materialbox');
|
3458
3538
|
}
|
3459
|
-
})(cash, anime);
|
3539
|
+
})(cash, M.anime);
|
3460
3540
|
;(function ($) {
|
3461
3541
|
'use strict';
|
3462
3542
|
|
3463
|
-
var _defaults = {
|
3543
|
+
var _defaults = {
|
3544
|
+
responsiveThreshold: 0 // breakpoint for swipeable
|
3545
|
+
};
|
3546
|
+
|
3547
|
+
var Parallax = function (_Component5) {
|
3548
|
+
_inherits(Parallax, _Component5);
|
3464
3549
|
|
3465
|
-
var Parallax = function () {
|
3466
3550
|
function Parallax(el, options) {
|
3467
3551
|
_classCallCheck(this, Parallax);
|
3468
3552
|
|
3469
|
-
|
3470
|
-
if (!!el.M_Parallax) {
|
3471
|
-
el.M_Parallax.destroy();
|
3472
|
-
}
|
3553
|
+
var _this19 = _possibleConstructorReturn(this, (Parallax.__proto__ || Object.getPrototypeOf(Parallax)).call(this, Parallax, el, options));
|
3473
3554
|
|
3474
|
-
|
3475
|
-
this.$el = $(el);
|
3476
|
-
this.el.M_Parallax = this;
|
3555
|
+
_this19.el.M_Parallax = _this19;
|
3477
3556
|
|
3478
|
-
|
3557
|
+
/**
|
3558
|
+
* Options for the Parallax
|
3559
|
+
* @member Parallax#options
|
3560
|
+
* @prop {Number} responsiveThreshold
|
3561
|
+
*/
|
3562
|
+
_this19.options = $.extend({}, Parallax.defaults, options);
|
3479
3563
|
|
3480
|
-
|
3481
|
-
|
3482
|
-
|
3483
|
-
|
3564
|
+
_this19.$img = _this19.$el.find('img').first();
|
3565
|
+
_this19._enabled = window.innerWidth > _this19.options.responsiveThreshold;
|
3566
|
+
_this19._updateParallax();
|
3567
|
+
_this19._setupEventHandlers();
|
3568
|
+
_this19._setupStyles();
|
3484
3569
|
|
3485
|
-
Parallax._parallaxes.push(
|
3570
|
+
Parallax._parallaxes.push(_this19);
|
3571
|
+
return _this19;
|
3486
3572
|
}
|
3487
3573
|
|
3488
3574
|
_createClass(Parallax, [{
|
@@ -3492,7 +3578,13 @@ M.throttle = function (func, wait, options) {
|
|
3492
3578
|
/**
|
3493
3579
|
* Teardown component
|
3494
3580
|
*/
|
3495
|
-
value: function destroy() {
|
3581
|
+
value: function destroy() {
|
3582
|
+
Parallax._parallaxes.splice(Parallax._parallaxes.indexOf(this), 1);
|
3583
|
+
this.$img[0].style.transform = '';
|
3584
|
+
this._removeEventHandlers();
|
3585
|
+
|
3586
|
+
this.$el[0].M_Parallax = undefined;
|
3587
|
+
}
|
3496
3588
|
}, {
|
3497
3589
|
key: "_setupEventHandlers",
|
3498
3590
|
value: function _setupEventHandlers() {
|
@@ -3502,6 +3594,19 @@ M.throttle = function (func, wait, options) {
|
|
3502
3594
|
if (Parallax._parallaxes.length === 0) {
|
3503
3595
|
Parallax._handleScrollThrottled = M.throttle(Parallax._handleScroll, 5);
|
3504
3596
|
window.addEventListener('scroll', Parallax._handleScrollThrottled);
|
3597
|
+
|
3598
|
+
Parallax._handleWindowResizeThrottled = M.throttle(Parallax._handleWindowResize, 5);
|
3599
|
+
window.addEventListener('resize', Parallax._handleWindowResizeThrottled);
|
3600
|
+
}
|
3601
|
+
}
|
3602
|
+
}, {
|
3603
|
+
key: "_removeEventHandlers",
|
3604
|
+
value: function _removeEventHandlers() {
|
3605
|
+
this.$img[0].removeEventListener('load', this._handleImageLoadBound);
|
3606
|
+
|
3607
|
+
if (Parallax._parallaxes.length === 0) {
|
3608
|
+
window.removeEventListener('scroll', Parallax._handleScrollThrottled);
|
3609
|
+
window.removeEventListener('resize', Parallax._handleWindowResizeThrottled);
|
3505
3610
|
}
|
3506
3611
|
}
|
3507
3612
|
}, {
|
@@ -3532,18 +3637,16 @@ M.throttle = function (func, wait, options) {
|
|
3532
3637
|
var percentScrolled = (windowBottom - top) / (containerHeight + windowHeight);
|
3533
3638
|
var parallax = parallaxDist * percentScrolled;
|
3534
3639
|
|
3535
|
-
if (
|
3640
|
+
if (!this._enabled) {
|
3641
|
+
this.$img[0].style.transform = '';
|
3642
|
+
} else if (bottom > scrollTop && top < scrollTop + windowHeight) {
|
3536
3643
|
this.$img[0].style.transform = "translate3D(-50%, " + parallax + "px, 0)";
|
3537
3644
|
}
|
3538
3645
|
}
|
3539
3646
|
}], [{
|
3540
3647
|
key: "init",
|
3541
|
-
value: function init(
|
3542
|
-
|
3543
|
-
$els.each(function () {
|
3544
|
-
arr.push(new Parallax(this, options));
|
3545
|
-
});
|
3546
|
-
return arr;
|
3648
|
+
value: function init(els, options) {
|
3649
|
+
return _get(Parallax.__proto__ || Object.getPrototypeOf(Parallax), "init", this).call(this, this, els, options);
|
3547
3650
|
}
|
3548
3651
|
|
3549
3652
|
/**
|
@@ -3564,6 +3667,14 @@ M.throttle = function (func, wait, options) {
|
|
3564
3667
|
parallaxInstance._updateParallax.call(parallaxInstance);
|
3565
3668
|
}
|
3566
3669
|
}
|
3670
|
+
}, {
|
3671
|
+
key: "_handleWindowResize",
|
3672
|
+
value: function _handleWindowResize() {
|
3673
|
+
for (var i = 0; i < Parallax._parallaxes.length; i++) {
|
3674
|
+
var parallaxInstance = Parallax._parallaxes[i];
|
3675
|
+
parallaxInstance._enabled = window.innerWidth > parallaxInstance.options.responsiveThreshold;
|
3676
|
+
}
|
3677
|
+
}
|
3567
3678
|
}, {
|
3568
3679
|
key: "defaults",
|
3569
3680
|
get: function () {
|
@@ -3572,7 +3683,7 @@ M.throttle = function (func, wait, options) {
|
|
3572
3683
|
}]);
|
3573
3684
|
|
3574
3685
|
return Parallax;
|
3575
|
-
}();
|
3686
|
+
}(Component);
|
3576
3687
|
|
3577
3688
|
/**
|
3578
3689
|
* @static
|
@@ -3603,7 +3714,9 @@ M.throttle = function (func, wait, options) {
|
|
3603
3714
|
*
|
3604
3715
|
*/
|
3605
3716
|
|
3606
|
-
var Tabs = function () {
|
3717
|
+
var Tabs = function (_Component6) {
|
3718
|
+
_inherits(Tabs, _Component6);
|
3719
|
+
|
3607
3720
|
/**
|
3608
3721
|
* Construct Tabs instance
|
3609
3722
|
* @constructor
|
@@ -3613,18 +3726,9 @@ M.throttle = function (func, wait, options) {
|
|
3613
3726
|
function Tabs(el, options) {
|
3614
3727
|
_classCallCheck(this, Tabs);
|
3615
3728
|
|
3616
|
-
|
3617
|
-
if (!!el.M_Tabs) {
|
3618
|
-
el.M_Tabs.destroy();
|
3619
|
-
}
|
3620
|
-
|
3621
|
-
/**
|
3622
|
-
* The jQuery element
|
3623
|
-
* @type {jQuery}
|
3624
|
-
*/
|
3625
|
-
this.$el = $(el);
|
3729
|
+
var _this20 = _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, Tabs, el, options));
|
3626
3730
|
|
3627
|
-
|
3731
|
+
_this20.el.M_Tabs = _this20;
|
3628
3732
|
|
3629
3733
|
/**
|
3630
3734
|
* Options for the Tabs
|
@@ -3634,24 +3738,23 @@ M.throttle = function (func, wait, options) {
|
|
3634
3738
|
* @prop {Boolean} swipeable
|
3635
3739
|
* @prop {Number} responsiveThreshold
|
3636
3740
|
*/
|
3637
|
-
|
3638
|
-
|
3639
|
-
this.el.M_Tabs = this;
|
3741
|
+
_this20.options = $.extend({}, Tabs.defaults, options);
|
3640
3742
|
|
3641
3743
|
// Setup
|
3642
|
-
|
3643
|
-
|
3644
|
-
|
3645
|
-
|
3646
|
-
|
3647
|
-
|
3648
|
-
if (
|
3649
|
-
|
3744
|
+
_this20.$tabLinks = _this20.$el.children('li.tab').children('a');
|
3745
|
+
_this20.index = 0;
|
3746
|
+
_this20._setTabsAndTabWidth();
|
3747
|
+
_this20._setupActiveTabLink();
|
3748
|
+
_this20._createIndicator();
|
3749
|
+
|
3750
|
+
if (_this20.options.swipeable) {
|
3751
|
+
_this20._setupSwipeableTabs();
|
3650
3752
|
} else {
|
3651
|
-
|
3753
|
+
_this20._setupNormalTabs();
|
3652
3754
|
}
|
3653
3755
|
|
3654
|
-
|
3756
|
+
_this20._setupEventHandlers();
|
3757
|
+
return _this20;
|
3655
3758
|
}
|
3656
3759
|
|
3657
3760
|
_createClass(Tabs, [{
|
@@ -3722,7 +3825,7 @@ M.throttle = function (func, wait, options) {
|
|
3722
3825
|
}, {
|
3723
3826
|
key: "_handleTabClick",
|
3724
3827
|
value: function _handleTabClick(e) {
|
3725
|
-
var
|
3828
|
+
var _this21 = this;
|
3726
3829
|
|
3727
3830
|
var tab = $(e.target).closest('li.tab');
|
3728
3831
|
var tabLink = $(e.target).closest('a');
|
@@ -3762,8 +3865,8 @@ M.throttle = function (func, wait, options) {
|
|
3762
3865
|
if (this.options.swipeable) {
|
3763
3866
|
if (this._tabsCarousel) {
|
3764
3867
|
this._tabsCarousel.set(this.index, function () {
|
3765
|
-
if (typeof
|
3766
|
-
|
3868
|
+
if (typeof _this21.options.onShow === "function") {
|
3869
|
+
_this21.options.onShow.call(_this21, _this21.$content[0]);
|
3767
3870
|
}
|
3768
3871
|
});
|
3769
3872
|
}
|
@@ -3796,7 +3899,7 @@ M.throttle = function (func, wait, options) {
|
|
3796
3899
|
}, {
|
3797
3900
|
key: "_createIndicator",
|
3798
3901
|
value: function _createIndicator() {
|
3799
|
-
var
|
3902
|
+
var _this22 = this;
|
3800
3903
|
|
3801
3904
|
var indicator = document.createElement('li');
|
3802
3905
|
indicator.classList.add('indicator');
|
@@ -3805,8 +3908,8 @@ M.throttle = function (func, wait, options) {
|
|
3805
3908
|
this._indicator = indicator;
|
3806
3909
|
|
3807
3910
|
setTimeout(function () {
|
3808
|
-
|
3809
|
-
|
3911
|
+
_this22._indicator.style.left = _this22._calcLeftPos(_this22.$activeTabLink) + 'px';
|
3912
|
+
_this22._indicator.style.right = _this22._calcRightPos(_this22.$activeTabLink) + 'px';
|
3810
3913
|
}, 0);
|
3811
3914
|
}
|
3812
3915
|
|
@@ -3846,7 +3949,7 @@ M.throttle = function (func, wait, options) {
|
|
3846
3949
|
}, {
|
3847
3950
|
key: "_setupSwipeableTabs",
|
3848
3951
|
value: function _setupSwipeableTabs() {
|
3849
|
-
var
|
3952
|
+
var _this23 = this;
|
3850
3953
|
|
3851
3954
|
// Change swipeable according to responsive threshold
|
3852
3955
|
if (window.innerWidth > this.options.responsiveThreshold) {
|
@@ -3865,18 +3968,18 @@ M.throttle = function (func, wait, options) {
|
|
3865
3968
|
$tabsWrapper.append($tabsContent);
|
3866
3969
|
$tabsContent[0].style.display = '';
|
3867
3970
|
|
3868
|
-
this._tabsCarousel =
|
3971
|
+
this._tabsCarousel = M.Carousel.init($tabsWrapper[0], {
|
3869
3972
|
fullWidth: true,
|
3870
3973
|
noWrap: true,
|
3871
3974
|
onCycleTo: function (item) {
|
3872
|
-
var prevIndex =
|
3873
|
-
|
3874
|
-
|
3875
|
-
|
3876
|
-
|
3877
|
-
|
3878
|
-
if (typeof
|
3879
|
-
|
3975
|
+
var prevIndex = _this23.index;
|
3976
|
+
_this23.index = $(item).index();
|
3977
|
+
_this23.$activeTabLink.removeClass('active');
|
3978
|
+
_this23.$activeTabLink = _this23.$tabLinks.eq(_this23.index);
|
3979
|
+
_this23.$activeTabLink.addClass('active');
|
3980
|
+
_this23._animateIndicator(prevIndex);
|
3981
|
+
if (typeof _this23.options.onShow === "function") {
|
3982
|
+
_this23.options.onShow.call(_this23, _this23.$content[0]);
|
3880
3983
|
}
|
3881
3984
|
}
|
3882
3985
|
});
|
@@ -4016,18 +4119,13 @@ M.throttle = function (func, wait, options) {
|
|
4016
4119
|
value: function select(tabId) {
|
4017
4120
|
var tab = this.$tabLinks.filter('[href="#' + tabId + '"]');
|
4018
4121
|
if (tab.length) {
|
4019
|
-
4;
|
4020
4122
|
tab.trigger('click');
|
4021
4123
|
}
|
4022
4124
|
}
|
4023
4125
|
}], [{
|
4024
4126
|
key: "init",
|
4025
|
-
value: function init(
|
4026
|
-
|
4027
|
-
$els.each(function () {
|
4028
|
-
arr.push(new Tabs(this, options));
|
4029
|
-
});
|
4030
|
-
return arr;
|
4127
|
+
value: function init(els, options) {
|
4128
|
+
return _get(Tabs.__proto__ || Object.getPrototypeOf(Tabs), "init", this).call(this, this, els, options);
|
4031
4129
|
}
|
4032
4130
|
|
4033
4131
|
/**
|
@@ -4048,14 +4146,14 @@ M.throttle = function (func, wait, options) {
|
|
4048
4146
|
}]);
|
4049
4147
|
|
4050
4148
|
return Tabs;
|
4051
|
-
}();
|
4149
|
+
}(Component);
|
4052
4150
|
|
4053
4151
|
window.M.Tabs = Tabs;
|
4054
4152
|
|
4055
4153
|
if (M.jQueryLoaded) {
|
4056
4154
|
M.initializeJqueryWrapper(Tabs, 'tabs', 'M_Tabs');
|
4057
4155
|
}
|
4058
|
-
})(cash, anime);
|
4156
|
+
})(cash, M.anime);
|
4059
4157
|
;(function ($, anim) {
|
4060
4158
|
'use strict';
|
4061
4159
|
|
@@ -4075,7 +4173,9 @@ M.throttle = function (func, wait, options) {
|
|
4075
4173
|
*
|
4076
4174
|
*/
|
4077
4175
|
|
4078
|
-
var Tooltip = function () {
|
4176
|
+
var Tooltip = function (_Component7) {
|
4177
|
+
_inherits(Tooltip, _Component7);
|
4178
|
+
|
4079
4179
|
/**
|
4080
4180
|
* Construct Tooltip instance
|
4081
4181
|
* @constructor
|
@@ -4085,20 +4185,16 @@ M.throttle = function (func, wait, options) {
|
|
4085
4185
|
function Tooltip(el, options) {
|
4086
4186
|
_classCallCheck(this, Tooltip);
|
4087
4187
|
|
4088
|
-
|
4089
|
-
if (!!el.M_Tooltip) {
|
4090
|
-
el.M_Tooltip.destroy();
|
4091
|
-
}
|
4188
|
+
var _this24 = _possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, Tooltip, el, options));
|
4092
4189
|
|
4093
|
-
|
4094
|
-
|
4095
|
-
this.el.M_Tooltip = this;
|
4096
|
-
this.options = $.extend({}, Tooltip.defaults, options);
|
4190
|
+
_this24.el.M_Tooltip = _this24;
|
4191
|
+
_this24.options = $.extend({}, Tooltip.defaults, options);
|
4097
4192
|
|
4098
|
-
|
4099
|
-
|
4100
|
-
|
4101
|
-
|
4193
|
+
_this24.isOpen = false;
|
4194
|
+
_this24.isHovered = false;
|
4195
|
+
_this24._appendTooltipEl();
|
4196
|
+
_this24._setupEventHandlers();
|
4197
|
+
return _this24;
|
4102
4198
|
}
|
4103
4199
|
|
4104
4200
|
_createClass(Tooltip, [{
|
@@ -4170,22 +4266,22 @@ M.throttle = function (func, wait, options) {
|
|
4170
4266
|
}
|
4171
4267
|
|
4172
4268
|
/**
|
4173
|
-
|
4174
|
-
|
4269
|
+
* Create timeout which delays when the tooltip closes
|
4270
|
+
*/
|
4175
4271
|
|
4176
4272
|
}, {
|
4177
4273
|
key: "_setExitDelayTimeout",
|
4178
4274
|
value: function _setExitDelayTimeout() {
|
4179
|
-
var
|
4275
|
+
var _this25 = this;
|
4180
4276
|
|
4181
4277
|
clearTimeout(this._exitDelayTimeout);
|
4182
4278
|
|
4183
4279
|
this._exitDelayTimeout = setTimeout(function () {
|
4184
|
-
if (
|
4280
|
+
if (_this25.isHovered) {
|
4185
4281
|
return;
|
4186
|
-
} else {
|
4187
|
-
_this18._animateOut();
|
4188
4282
|
}
|
4283
|
+
|
4284
|
+
_this25._animateOut();
|
4189
4285
|
}, this.options.exitDelay);
|
4190
4286
|
}
|
4191
4287
|
|
@@ -4196,16 +4292,16 @@ M.throttle = function (func, wait, options) {
|
|
4196
4292
|
}, {
|
4197
4293
|
key: "_setEnterDelayTimeout",
|
4198
4294
|
value: function _setEnterDelayTimeout() {
|
4199
|
-
var
|
4295
|
+
var _this26 = this;
|
4200
4296
|
|
4201
4297
|
clearTimeout(this._enterDelayTimeout);
|
4202
4298
|
|
4203
4299
|
this._enterDelayTimeout = setTimeout(function () {
|
4204
|
-
if (!
|
4300
|
+
if (!_this26.isHovered) {
|
4205
4301
|
return;
|
4206
|
-
} else {
|
4207
|
-
_this19._animateIn();
|
4208
4302
|
}
|
4303
|
+
|
4304
|
+
_this26._animateIn();
|
4209
4305
|
}, this.options.enterDelay);
|
4210
4306
|
}
|
4211
4307
|
}, {
|
@@ -4281,7 +4377,10 @@ M.throttle = function (func, wait, options) {
|
|
4281
4377
|
newY -= newY + height - window.innerHeight;
|
4282
4378
|
}
|
4283
4379
|
|
4284
|
-
return {
|
4380
|
+
return {
|
4381
|
+
x: newX + scrollLeft,
|
4382
|
+
y: newY + scrollTop
|
4383
|
+
};
|
4285
4384
|
}
|
4286
4385
|
}, {
|
4287
4386
|
key: "_animateIn",
|
@@ -4341,12 +4440,8 @@ M.throttle = function (func, wait, options) {
|
|
4341
4440
|
}
|
4342
4441
|
}], [{
|
4343
4442
|
key: "init",
|
4344
|
-
value: function init(
|
4345
|
-
|
4346
|
-
$els.each(function () {
|
4347
|
-
arr.push(new Tooltip(this, options));
|
4348
|
-
});
|
4349
|
-
return arr;
|
4443
|
+
value: function init(els, options) {
|
4444
|
+
return _get(Tooltip.__proto__ || Object.getPrototypeOf(Tooltip), "init", this).call(this, this, els, options);
|
4350
4445
|
}
|
4351
4446
|
|
4352
4447
|
/**
|
@@ -4367,14 +4462,14 @@ M.throttle = function (func, wait, options) {
|
|
4367
4462
|
}]);
|
4368
4463
|
|
4369
4464
|
return Tooltip;
|
4370
|
-
}();
|
4465
|
+
}(Component);
|
4371
4466
|
|
4372
4467
|
M.Tooltip = Tooltip;
|
4373
4468
|
|
4374
4469
|
if (M.jQueryLoaded) {
|
4375
4470
|
M.initializeJqueryWrapper(Tooltip, 'tooltip', 'M_Tooltip');
|
4376
4471
|
}
|
4377
|
-
})(cash, anime);
|
4472
|
+
})(cash, M.anime);
|
4378
4473
|
; /*!
|
4379
4474
|
* Waves v0.6.4
|
4380
4475
|
* http://fian.my.id/Waves
|
@@ -4815,18 +4910,18 @@ M.throttle = function (func, wait, options) {
|
|
4815
4910
|
}, {
|
4816
4911
|
key: "_setTimer",
|
4817
4912
|
value: function _setTimer() {
|
4818
|
-
var
|
4913
|
+
var _this27 = this;
|
4819
4914
|
|
4820
4915
|
if (this.timeRemaining !== Infinity) {
|
4821
4916
|
this.counterInterval = setInterval(function () {
|
4822
4917
|
// If toast is not being dragged, decrease its time remaining
|
4823
|
-
if (!
|
4824
|
-
|
4918
|
+
if (!_this27.panning) {
|
4919
|
+
_this27.timeRemaining -= 20;
|
4825
4920
|
}
|
4826
4921
|
|
4827
4922
|
// Animate toast out
|
4828
|
-
if (
|
4829
|
-
|
4923
|
+
if (_this27.timeRemaining <= 0) {
|
4924
|
+
_this27.dismiss();
|
4830
4925
|
}
|
4831
4926
|
}, 20);
|
4832
4927
|
}
|
@@ -4839,7 +4934,7 @@ M.throttle = function (func, wait, options) {
|
|
4839
4934
|
}, {
|
4840
4935
|
key: "dismiss",
|
4841
4936
|
value: function dismiss() {
|
4842
|
-
var
|
4937
|
+
var _this28 = this;
|
4843
4938
|
|
4844
4939
|
window.clearInterval(this.counterInterval);
|
4845
4940
|
var activationDistance = this.el.offsetWidth * this.options.activationPercent;
|
@@ -4858,12 +4953,12 @@ M.throttle = function (func, wait, options) {
|
|
4858
4953
|
easing: 'easeOutExpo',
|
4859
4954
|
complete: function () {
|
4860
4955
|
// Call the optional callback
|
4861
|
-
if (typeof
|
4862
|
-
|
4956
|
+
if (typeof _this28.options.completeCallback === 'function') {
|
4957
|
+
_this28.options.completeCallback();
|
4863
4958
|
}
|
4864
4959
|
// Remove toast from DOM
|
4865
|
-
|
4866
|
-
Toast._toasts.splice(Toast._toasts.indexOf(
|
4960
|
+
_this28.el.parentNode.removeChild(_this28.el);
|
4961
|
+
Toast._toasts.splice(Toast._toasts.indexOf(_this28), 1);
|
4867
4962
|
if (Toast._toasts.length === 0) {
|
4868
4963
|
Toast._removeContainer();
|
4869
4964
|
}
|
@@ -5057,7 +5152,7 @@ M.throttle = function (func, wait, options) {
|
|
5057
5152
|
M.toast = function (options) {
|
5058
5153
|
return new Toast(options);
|
5059
5154
|
};
|
5060
|
-
})(cash, anime);
|
5155
|
+
})(cash, M.anime);
|
5061
5156
|
;(function ($, anim) {
|
5062
5157
|
'use strict';
|
5063
5158
|
|
@@ -5076,7 +5171,9 @@ M.throttle = function (func, wait, options) {
|
|
5076
5171
|
* @class
|
5077
5172
|
*/
|
5078
5173
|
|
5079
|
-
var Sidenav = function () {
|
5174
|
+
var Sidenav = function (_Component8) {
|
5175
|
+
_inherits(Sidenav, _Component8);
|
5176
|
+
|
5080
5177
|
/**
|
5081
5178
|
* Construct Sidenav instance and set up overlay
|
5082
5179
|
* @constructor
|
@@ -5086,15 +5183,10 @@ M.throttle = function (func, wait, options) {
|
|
5086
5183
|
function Sidenav(el, options) {
|
5087
5184
|
_classCallCheck(this, Sidenav);
|
5088
5185
|
|
5089
|
-
|
5090
|
-
if (!!el.M_Sidenav) {
|
5091
|
-
el.M_Sidenav.destroy();
|
5092
|
-
}
|
5186
|
+
var _this29 = _possibleConstructorReturn(this, (Sidenav.__proto__ || Object.getPrototypeOf(Sidenav)).call(this, Sidenav, el, options));
|
5093
5187
|
|
5094
|
-
|
5095
|
-
|
5096
|
-
this.el.M_Sidenav = this;
|
5097
|
-
this.id = this.$el.attr('id');
|
5188
|
+
_this29.el.M_Sidenav = _this29;
|
5189
|
+
_this29.id = _this29.$el.attr('id');
|
5098
5190
|
|
5099
5191
|
/**
|
5100
5192
|
* Options for the Sidenav
|
@@ -5108,33 +5200,34 @@ M.throttle = function (func, wait, options) {
|
|
5108
5200
|
* @prop {Function} onCloseStart - Function called when sidenav starts exiting
|
5109
5201
|
* @prop {Function} onCloseEnd - Function called when sidenav finishes exiting
|
5110
5202
|
*/
|
5111
|
-
|
5203
|
+
_this29.options = $.extend({}, Sidenav.defaults, options);
|
5112
5204
|
|
5113
5205
|
/**
|
5114
5206
|
* Describes open/close state of Sidenav
|
5115
5207
|
* @type {Boolean}
|
5116
5208
|
*/
|
5117
|
-
|
5209
|
+
_this29.isOpen = false;
|
5118
5210
|
|
5119
5211
|
/**
|
5120
5212
|
* Describes if Sidenav is fixed
|
5121
5213
|
* @type {Boolean}
|
5122
5214
|
*/
|
5123
|
-
|
5215
|
+
_this29.isFixed = _this29.el.classList.contains('sidenav-fixed');
|
5124
5216
|
|
5125
5217
|
/**
|
5126
5218
|
* Describes if Sidenav is being draggeed
|
5127
5219
|
* @type {Boolean}
|
5128
5220
|
*/
|
5129
|
-
|
5221
|
+
_this29.isDragged = false;
|
5130
5222
|
|
5131
|
-
|
5132
|
-
|
5133
|
-
|
5134
|
-
|
5135
|
-
|
5223
|
+
_this29._createOverlay();
|
5224
|
+
_this29._createDragTarget();
|
5225
|
+
_this29._setupEventHandlers();
|
5226
|
+
_this29._setupClasses();
|
5227
|
+
_this29._setupFixed();
|
5136
5228
|
|
5137
|
-
Sidenav._sidenavs.push(
|
5229
|
+
Sidenav._sidenavs.push(_this29);
|
5230
|
+
return _this29;
|
5138
5231
|
}
|
5139
5232
|
|
5140
5233
|
_createClass(Sidenav, [{
|
@@ -5539,7 +5632,7 @@ M.throttle = function (func, wait, options) {
|
|
5539
5632
|
}, {
|
5540
5633
|
key: "_animateSidenavIn",
|
5541
5634
|
value: function _animateSidenavIn() {
|
5542
|
-
var
|
5635
|
+
var _this30 = this;
|
5543
5636
|
|
5544
5637
|
var slideOutPercent = this.options.edge === 'left' ? -1 : 1;
|
5545
5638
|
if (this.isDragged) {
|
@@ -5554,8 +5647,8 @@ M.throttle = function (func, wait, options) {
|
|
5554
5647
|
easing: 'easeOutQuad',
|
5555
5648
|
complete: function () {
|
5556
5649
|
// Run onOpenEnd callback
|
5557
|
-
if (typeof
|
5558
|
-
|
5650
|
+
if (typeof _this30.options.onOpenEnd === 'function') {
|
5651
|
+
_this30.options.onOpenEnd.call(_this30, _this30.el);
|
5559
5652
|
}
|
5560
5653
|
}
|
5561
5654
|
});
|
@@ -5589,7 +5682,7 @@ M.throttle = function (func, wait, options) {
|
|
5589
5682
|
}, {
|
5590
5683
|
key: "_animateSidenavOut",
|
5591
5684
|
value: function _animateSidenavOut() {
|
5592
|
-
var
|
5685
|
+
var _this31 = this;
|
5593
5686
|
|
5594
5687
|
var endPercent = this.options.edge === 'left' ? -1 : 1;
|
5595
5688
|
var slideOutPercent = 0;
|
@@ -5605,8 +5698,8 @@ M.throttle = function (func, wait, options) {
|
|
5605
5698
|
easing: 'easeOutQuad',
|
5606
5699
|
complete: function () {
|
5607
5700
|
// Run onOpenEnd callback
|
5608
|
-
if (typeof
|
5609
|
-
|
5701
|
+
if (typeof _this31.options.onCloseEnd === 'function') {
|
5702
|
+
_this31.options.onCloseEnd.call(_this31, _this31.el);
|
5610
5703
|
}
|
5611
5704
|
}
|
5612
5705
|
});
|
@@ -5614,7 +5707,7 @@ M.throttle = function (func, wait, options) {
|
|
5614
5707
|
}, {
|
5615
5708
|
key: "_animateOverlayOut",
|
5616
5709
|
value: function _animateOverlayOut() {
|
5617
|
-
var
|
5710
|
+
var _this32 = this;
|
5618
5711
|
|
5619
5712
|
anim.remove(this._overlay);
|
5620
5713
|
anim({
|
@@ -5623,18 +5716,14 @@ M.throttle = function (func, wait, options) {
|
|
5623
5716
|
duration: this.options.outDuration,
|
5624
5717
|
easing: 'easeOutQuad',
|
5625
5718
|
complete: function () {
|
5626
|
-
$(
|
5719
|
+
$(_this32._overlay).css('display', 'none');
|
5627
5720
|
}
|
5628
5721
|
});
|
5629
5722
|
}
|
5630
5723
|
}], [{
|
5631
5724
|
key: "init",
|
5632
|
-
value: function init(
|
5633
|
-
|
5634
|
-
$els.each(function () {
|
5635
|
-
arr.push(new Sidenav(this, options));
|
5636
|
-
});
|
5637
|
-
return arr;
|
5725
|
+
value: function init(els, options) {
|
5726
|
+
return _get(Sidenav.__proto__ || Object.getPrototypeOf(Sidenav), "init", this).call(this, this, els, options);
|
5638
5727
|
}
|
5639
5728
|
|
5640
5729
|
/**
|
@@ -5655,7 +5744,7 @@ M.throttle = function (func, wait, options) {
|
|
5655
5744
|
}]);
|
5656
5745
|
|
5657
5746
|
return Sidenav;
|
5658
|
-
}();
|
5747
|
+
}(Component);
|
5659
5748
|
|
5660
5749
|
/**
|
5661
5750
|
* @static
|
@@ -5671,7 +5760,7 @@ M.throttle = function (func, wait, options) {
|
|
5671
5760
|
if (M.jQueryLoaded) {
|
5672
5761
|
M.initializeJqueryWrapper(Sidenav, 'sidenav', 'M_Sidenav');
|
5673
5762
|
}
|
5674
|
-
})(cash, anime);
|
5763
|
+
})(cash, M.anime);
|
5675
5764
|
;(function ($, anim) {
|
5676
5765
|
'use strict';
|
5677
5766
|
|
@@ -5689,7 +5778,9 @@ M.throttle = function (func, wait, options) {
|
|
5689
5778
|
*
|
5690
5779
|
*/
|
5691
5780
|
|
5692
|
-
var ScrollSpy = function () {
|
5781
|
+
var ScrollSpy = function (_Component9) {
|
5782
|
+
_inherits(ScrollSpy, _Component9);
|
5783
|
+
|
5693
5784
|
/**
|
5694
5785
|
* Construct ScrollSpy instance
|
5695
5786
|
* @constructor
|
@@ -5699,14 +5790,9 @@ M.throttle = function (func, wait, options) {
|
|
5699
5790
|
function ScrollSpy(el, options) {
|
5700
5791
|
_classCallCheck(this, ScrollSpy);
|
5701
5792
|
|
5702
|
-
|
5703
|
-
if (!!el.M_ScrollSpy) {
|
5704
|
-
el.M_ScrollSpy.destroy();
|
5705
|
-
}
|
5793
|
+
var _this33 = _possibleConstructorReturn(this, (ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy)).call(this, ScrollSpy, el, options));
|
5706
5794
|
|
5707
|
-
|
5708
|
-
this.$el = $(el);
|
5709
|
-
this.el.M_ScrollSpy = this;
|
5795
|
+
_this33.el.M_ScrollSpy = _this33;
|
5710
5796
|
|
5711
5797
|
/**
|
5712
5798
|
* Options for the modal
|
@@ -5716,16 +5802,17 @@ M.throttle = function (func, wait, options) {
|
|
5716
5802
|
* @prop {String} [activeClass='active'] - Class applied to active elements
|
5717
5803
|
* @prop {Function} [getActiveElement] - Used to find active element
|
5718
5804
|
*/
|
5719
|
-
|
5805
|
+
_this33.options = $.extend({}, ScrollSpy.defaults, options);
|
5720
5806
|
|
5721
5807
|
// setup
|
5722
|
-
ScrollSpy._elements.push(
|
5808
|
+
ScrollSpy._elements.push(_this33);
|
5723
5809
|
ScrollSpy._count++;
|
5724
5810
|
ScrollSpy._increment++;
|
5725
|
-
|
5726
|
-
|
5727
|
-
|
5728
|
-
|
5811
|
+
_this33.tickId = -1;
|
5812
|
+
_this33.id = ScrollSpy._increment;
|
5813
|
+
_this33._setupEventHandlers();
|
5814
|
+
_this33._handleWindowScroll();
|
5815
|
+
return _this33;
|
5729
5816
|
}
|
5730
5817
|
|
5731
5818
|
_createClass(ScrollSpy, [{
|
@@ -5878,7 +5965,7 @@ M.throttle = function (func, wait, options) {
|
|
5878
5965
|
}, {
|
5879
5966
|
key: "_exit",
|
5880
5967
|
value: function _exit() {
|
5881
|
-
var
|
5968
|
+
var _this34 = this;
|
5882
5969
|
|
5883
5970
|
ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (value) {
|
5884
5971
|
return value.height() != 0;
|
@@ -5888,7 +5975,7 @@ M.throttle = function (func, wait, options) {
|
|
5888
5975
|
$(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).removeClass(this.options.activeClass);
|
5889
5976
|
|
5890
5977
|
ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (el) {
|
5891
|
-
return el.attr('id') !=
|
5978
|
+
return el.attr('id') != _this34.$el.attr('id');
|
5892
5979
|
});
|
5893
5980
|
if (ScrollSpy._visibleElements[0]) {
|
5894
5981
|
// Check if empty
|
@@ -5898,12 +5985,8 @@ M.throttle = function (func, wait, options) {
|
|
5898
5985
|
}
|
5899
5986
|
}], [{
|
5900
5987
|
key: "init",
|
5901
|
-
value: function init(
|
5902
|
-
|
5903
|
-
$els.each(function () {
|
5904
|
-
arr.push(new ScrollSpy(this, options));
|
5905
|
-
});
|
5906
|
-
return arr;
|
5988
|
+
value: function init(els, options) {
|
5989
|
+
return _get(ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy), "init", this).call(this, this, els, options);
|
5907
5990
|
}
|
5908
5991
|
|
5909
5992
|
/**
|
@@ -5947,7 +6030,7 @@ M.throttle = function (func, wait, options) {
|
|
5947
6030
|
}]);
|
5948
6031
|
|
5949
6032
|
return ScrollSpy;
|
5950
|
-
}();
|
6033
|
+
}(Component);
|
5951
6034
|
|
5952
6035
|
/**
|
5953
6036
|
* @static
|
@@ -5995,7 +6078,7 @@ M.throttle = function (func, wait, options) {
|
|
5995
6078
|
if (M.jQueryLoaded) {
|
5996
6079
|
M.initializeJqueryWrapper(ScrollSpy, 'scrollSpy', 'M_ScrollSpy');
|
5997
6080
|
}
|
5998
|
-
})(cash, anime);
|
6081
|
+
})(cash, M.anime);
|
5999
6082
|
;(function ($) {
|
6000
6083
|
'use strict';
|
6001
6084
|
|
@@ -6015,7 +6098,9 @@ M.throttle = function (func, wait, options) {
|
|
6015
6098
|
*
|
6016
6099
|
*/
|
6017
6100
|
|
6018
|
-
var Autocomplete = function () {
|
6101
|
+
var Autocomplete = function (_Component10) {
|
6102
|
+
_inherits(Autocomplete, _Component10);
|
6103
|
+
|
6019
6104
|
/**
|
6020
6105
|
* Construct Autocomplete instance
|
6021
6106
|
* @constructor
|
@@ -6025,14 +6110,9 @@ M.throttle = function (func, wait, options) {
|
|
6025
6110
|
function Autocomplete(el, options) {
|
6026
6111
|
_classCallCheck(this, Autocomplete);
|
6027
6112
|
|
6028
|
-
|
6029
|
-
if (!!el.M_Autocomplete) {
|
6030
|
-
el.M_Autocomplete.destroy();
|
6031
|
-
}
|
6113
|
+
var _this35 = _possibleConstructorReturn(this, (Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete)).call(this, Autocomplete, el, options));
|
6032
6114
|
|
6033
|
-
|
6034
|
-
this.$el = $(el);
|
6035
|
-
this.el.M_Autocomplete = this;
|
6115
|
+
_this35.el.M_Autocomplete = _this35;
|
6036
6116
|
|
6037
6117
|
/**
|
6038
6118
|
* Options for the autocomplete
|
@@ -6046,18 +6126,19 @@ M.throttle = function (func, wait, options) {
|
|
6046
6126
|
* @prop {Boolean} noWrap
|
6047
6127
|
* @prop {Function} onCycleTo
|
6048
6128
|
*/
|
6049
|
-
|
6129
|
+
_this35.options = $.extend({}, Autocomplete.defaults, options);
|
6050
6130
|
|
6051
6131
|
// Setup
|
6052
|
-
|
6053
|
-
|
6054
|
-
|
6055
|
-
|
6056
|
-
|
6057
|
-
|
6058
|
-
|
6059
|
-
|
6060
|
-
|
6132
|
+
_this35.isOpen = false;
|
6133
|
+
_this35.count = 0;
|
6134
|
+
_this35.activeIndex = -1;
|
6135
|
+
_this35.oldVal;
|
6136
|
+
_this35.$inputField = _this35.$el.closest('.input-field');
|
6137
|
+
_this35.$active = $();
|
6138
|
+
_this35._setupDropdown();
|
6139
|
+
|
6140
|
+
_this35._setupEventHandlers();
|
6141
|
+
return _this35;
|
6061
6142
|
}
|
6062
6143
|
|
6063
6144
|
_createClass(Autocomplete, [{
|
@@ -6308,7 +6389,7 @@ M.throttle = function (func, wait, options) {
|
|
6308
6389
|
}, {
|
6309
6390
|
key: "_renderDropdown",
|
6310
6391
|
value: function _renderDropdown(data, val) {
|
6311
|
-
var
|
6392
|
+
var _this36 = this;
|
6312
6393
|
|
6313
6394
|
this._removeAutocomplete();
|
6314
6395
|
|
@@ -6334,7 +6415,7 @@ M.throttle = function (func, wait, options) {
|
|
6334
6415
|
|
6335
6416
|
// Sort
|
6336
6417
|
var sortFunctionBound = function (a, b) {
|
6337
|
-
return
|
6418
|
+
return _this36.options.sortFunction(a.key.toLowerCase(), b.key.toLowerCase(), val.toLowerCase());
|
6338
6419
|
};
|
6339
6420
|
matchingData.sort(sortFunctionBound);
|
6340
6421
|
|
@@ -6370,12 +6451,8 @@ M.throttle = function (func, wait, options) {
|
|
6370
6451
|
}
|
6371
6452
|
}], [{
|
6372
6453
|
key: "init",
|
6373
|
-
value: function init(
|
6374
|
-
|
6375
|
-
$els.each(function () {
|
6376
|
-
arr.push(new Autocomplete(this, options));
|
6377
|
-
});
|
6378
|
-
return arr;
|
6454
|
+
value: function init(els, options) {
|
6455
|
+
return _get(Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete), "init", this).call(this, this, els, options);
|
6379
6456
|
}
|
6380
6457
|
|
6381
6458
|
/**
|
@@ -6396,7 +6473,7 @@ M.throttle = function (func, wait, options) {
|
|
6396
6473
|
}]);
|
6397
6474
|
|
6398
6475
|
return Autocomplete;
|
6399
|
-
}();
|
6476
|
+
}(Component);
|
6400
6477
|
|
6401
6478
|
/**
|
6402
6479
|
* @static
|
@@ -6453,6 +6530,11 @@ M.throttle = function (func, wait, options) {
|
|
6453
6530
|
};
|
6454
6531
|
|
6455
6532
|
M.textareaAutoResize = function ($textarea) {
|
6533
|
+
// Wrap if native element
|
6534
|
+
if ($textarea instanceof Element) {
|
6535
|
+
$textarea = $($textarea);
|
6536
|
+
}
|
6537
|
+
|
6456
6538
|
// Textarea Auto Resize
|
6457
6539
|
var hiddenDiv = $('.hiddendiv').first();
|
6458
6540
|
if (!hiddenDiv.length) {
|
@@ -6618,11 +6700,12 @@ M.throttle = function (func, wait, options) {
|
|
6618
6700
|
$(text_area_selector).each(function () {
|
6619
6701
|
var $textarea = $(this);
|
6620
6702
|
/**
|
6621
|
-
*
|
6622
|
-
*
|
6703
|
+
* Resize textarea on document load after storing
|
6704
|
+
* the original height and the original length
|
6623
6705
|
*/
|
6624
6706
|
$textarea.data('original-height', $textarea.height());
|
6625
6707
|
$textarea.data('previous-length', this.value.length);
|
6708
|
+
M.textareaAutoResize($textarea);
|
6626
6709
|
});
|
6627
6710
|
|
6628
6711
|
$(document).on('keyup', text_area_selector, function () {
|
@@ -6631,9 +6714,6 @@ M.throttle = function (func, wait, options) {
|
|
6631
6714
|
$(document).on('keydown', text_area_selector, function () {
|
6632
6715
|
M.textareaAutoResize($(this));
|
6633
6716
|
});
|
6634
|
-
$(document).on('autoresize', text_area_selector, function () {
|
6635
|
-
M.textareaAutoResize($(this));
|
6636
|
-
});
|
6637
6717
|
|
6638
6718
|
// File Input Path
|
6639
6719
|
$(document).on('change', '.file-field input[type="file"]', function () {
|
@@ -6664,7 +6744,9 @@ M.throttle = function (func, wait, options) {
|
|
6664
6744
|
*
|
6665
6745
|
*/
|
6666
6746
|
|
6667
|
-
var Slider = function () {
|
6747
|
+
var Slider = function (_Component11) {
|
6748
|
+
_inherits(Slider, _Component11);
|
6749
|
+
|
6668
6750
|
/**
|
6669
6751
|
* Construct Slider instance and set up overlay
|
6670
6752
|
* @constructor
|
@@ -6672,18 +6754,11 @@ M.throttle = function (func, wait, options) {
|
|
6672
6754
|
* @param {Object} options
|
6673
6755
|
*/
|
6674
6756
|
function Slider(el, options) {
|
6675
|
-
var _this27 = this;
|
6676
|
-
|
6677
6757
|
_classCallCheck(this, Slider);
|
6678
6758
|
|
6679
|
-
|
6680
|
-
if (!!el.M_Slider) {
|
6681
|
-
el.M_Slider.destroy();
|
6682
|
-
}
|
6759
|
+
var _this37 = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, Slider, el, options));
|
6683
6760
|
|
6684
|
-
|
6685
|
-
this.$el = $(el);
|
6686
|
-
this.el.M_Slider = this;
|
6761
|
+
_this37.el.M_Slider = _this37;
|
6687
6762
|
|
6688
6763
|
/**
|
6689
6764
|
* Options for the modal
|
@@ -6693,25 +6768,25 @@ M.throttle = function (func, wait, options) {
|
|
6693
6768
|
* @prop {Number} [duration=500] - Length in ms of slide transition
|
6694
6769
|
* @prop {Number} [interval=6000] - Length in ms of slide interval
|
6695
6770
|
*/
|
6696
|
-
|
6771
|
+
_this37.options = $.extend({}, Slider.defaults, options);
|
6697
6772
|
|
6698
6773
|
// setup
|
6699
|
-
|
6700
|
-
|
6701
|
-
|
6702
|
-
if (
|
6703
|
-
|
6774
|
+
_this37.$slider = _this37.$el.find('.slides');
|
6775
|
+
_this37.$slides = _this37.$slider.children('li');
|
6776
|
+
_this37.activeIndex = _this37.$slider.find('.active').index();
|
6777
|
+
if (_this37.activeIndex != -1) {
|
6778
|
+
_this37.$active = _this37.$slides.eq(_this37.activeIndex);
|
6704
6779
|
}
|
6705
6780
|
|
6706
|
-
|
6781
|
+
_this37._setSliderHeight();
|
6707
6782
|
|
6708
6783
|
// Set initial positions of captions
|
6709
|
-
|
6710
|
-
|
6784
|
+
_this37.$slides.find('.caption').each(function (el) {
|
6785
|
+
_this37._animateCaptionIn(el, 0);
|
6711
6786
|
});
|
6712
6787
|
|
6713
6788
|
// Move img src into background-image
|
6714
|
-
|
6789
|
+
_this37.$slides.find('img').each(function (el) {
|
6715
6790
|
var placeholderBase64 = 'data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
|
6716
6791
|
if ($(el).attr('src') !== placeholderBase64) {
|
6717
6792
|
$(el).css('background-image', 'url("' + $(el).attr('src') + '")');
|
@@ -6719,45 +6794,46 @@ M.throttle = function (func, wait, options) {
|
|
6719
6794
|
}
|
6720
6795
|
});
|
6721
6796
|
|
6722
|
-
|
6797
|
+
_this37._setupIndicators();
|
6723
6798
|
|
6724
6799
|
// Show active slide
|
6725
|
-
if (
|
6726
|
-
|
6800
|
+
if (_this37.$active) {
|
6801
|
+
_this37.$active.css('display', 'block');
|
6727
6802
|
} else {
|
6728
|
-
|
6803
|
+
_this37.$slides.first().addClass('active');
|
6729
6804
|
anim({
|
6730
|
-
targets:
|
6805
|
+
targets: _this37.$slides.first()[0],
|
6731
6806
|
opacity: 1,
|
6732
|
-
duration:
|
6807
|
+
duration: _this37.options.duration,
|
6733
6808
|
easing: 'easeOutQuad'
|
6734
6809
|
});
|
6735
6810
|
|
6736
|
-
|
6737
|
-
|
6811
|
+
_this37.activeIndex = 0;
|
6812
|
+
_this37.$active = _this37.$slides.eq(_this37.activeIndex);
|
6738
6813
|
|
6739
6814
|
// Update indicators
|
6740
|
-
if (
|
6741
|
-
|
6815
|
+
if (_this37.options.indicators) {
|
6816
|
+
_this37.$indicators.eq(_this37.activeIndex).addClass('active');
|
6742
6817
|
}
|
6743
6818
|
}
|
6744
6819
|
|
6745
6820
|
// Adjust height to current slide
|
6746
|
-
|
6821
|
+
_this37.$active.find('img').each(function (el) {
|
6747
6822
|
anim({
|
6748
|
-
targets:
|
6823
|
+
targets: _this37.$active.find('.caption')[0],
|
6749
6824
|
opacity: 1,
|
6750
6825
|
translateX: 0,
|
6751
6826
|
translateY: 0,
|
6752
|
-
duration:
|
6827
|
+
duration: _this37.options.duration,
|
6753
6828
|
easing: 'easeOutQuad'
|
6754
6829
|
});
|
6755
6830
|
});
|
6756
6831
|
|
6757
|
-
|
6832
|
+
_this37._setupEventHandlers();
|
6758
6833
|
|
6759
6834
|
// auto scroll
|
6760
|
-
|
6835
|
+
_this37.start();
|
6836
|
+
return _this37;
|
6761
6837
|
}
|
6762
6838
|
|
6763
6839
|
_createClass(Slider, [{
|
@@ -6781,14 +6857,14 @@ M.throttle = function (func, wait, options) {
|
|
6781
6857
|
}, {
|
6782
6858
|
key: "_setupEventHandlers",
|
6783
6859
|
value: function _setupEventHandlers() {
|
6784
|
-
var
|
6860
|
+
var _this38 = this;
|
6785
6861
|
|
6786
6862
|
this._handleIntervalBound = this._handleInterval.bind(this);
|
6787
6863
|
this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
|
6788
6864
|
|
6789
6865
|
if (this.options.indicators) {
|
6790
6866
|
this.$indicators.each(function (el) {
|
6791
|
-
el.addEventListener('click',
|
6867
|
+
el.addEventListener('click', _this38._handleIndicatorClickBound);
|
6792
6868
|
});
|
6793
6869
|
}
|
6794
6870
|
}
|
@@ -6800,11 +6876,11 @@ M.throttle = function (func, wait, options) {
|
|
6800
6876
|
}, {
|
6801
6877
|
key: "_removeEventHandlers",
|
6802
6878
|
value: function _removeEventHandlers() {
|
6803
|
-
var
|
6879
|
+
var _this39 = this;
|
6804
6880
|
|
6805
6881
|
if (this.options.indicators) {
|
6806
6882
|
this.$indicators.each(function (el) {
|
6807
|
-
el.removeEventListener('click',
|
6883
|
+
el.removeEventListener('click', _this39._handleIndicatorClickBound);
|
6808
6884
|
});
|
6809
6885
|
}
|
6810
6886
|
}
|
@@ -6888,13 +6964,13 @@ M.throttle = function (func, wait, options) {
|
|
6888
6964
|
}, {
|
6889
6965
|
key: "_setupIndicators",
|
6890
6966
|
value: function _setupIndicators() {
|
6891
|
-
var
|
6967
|
+
var _this40 = this;
|
6892
6968
|
|
6893
6969
|
if (this.options.indicators) {
|
6894
6970
|
this.$indicators = $('<ul class="indicators"></ul>');
|
6895
6971
|
this.$slides.each(function (el, index) {
|
6896
6972
|
var $indicator = $('<li class="indicator-item"></li>');
|
6897
|
-
|
6973
|
+
_this40.$indicators.append($indicator[0]);
|
6898
6974
|
});
|
6899
6975
|
this.$el.append(this.$indicators[0]);
|
6900
6976
|
this.$indicators = this.$indicators.children('li.indicator-item');
|
@@ -6919,7 +6995,7 @@ M.throttle = function (func, wait, options) {
|
|
6919
6995
|
}, {
|
6920
6996
|
key: "set",
|
6921
6997
|
value: function set(index) {
|
6922
|
-
var
|
6998
|
+
var _this41 = this;
|
6923
6999
|
|
6924
7000
|
// Wrap around indices.
|
6925
7001
|
if (index >= this.$slides.length) index = 0;else if (index < 0) index = this.$slides.length - 1;
|
@@ -6936,7 +7012,7 @@ M.throttle = function (func, wait, options) {
|
|
6936
7012
|
duration: this.options.duration,
|
6937
7013
|
easing: 'easeOutQuad',
|
6938
7014
|
complete: function () {
|
6939
|
-
|
7015
|
+
_this41.$slides.not('.active').each(function (el) {
|
6940
7016
|
anim({
|
6941
7017
|
targets: el,
|
6942
7018
|
opacity: 0,
|
@@ -7034,12 +7110,8 @@ M.throttle = function (func, wait, options) {
|
|
7034
7110
|
}
|
7035
7111
|
}], [{
|
7036
7112
|
key: "init",
|
7037
|
-
value: function init(
|
7038
|
-
|
7039
|
-
$els.each(function () {
|
7040
|
-
arr.push(new Slider(this, options));
|
7041
|
-
});
|
7042
|
-
return arr;
|
7113
|
+
value: function init(els, options) {
|
7114
|
+
return _get(Slider.__proto__ || Object.getPrototypeOf(Slider), "init", this).call(this, this, els, options);
|
7043
7115
|
}
|
7044
7116
|
|
7045
7117
|
/**
|
@@ -7060,14 +7132,14 @@ M.throttle = function (func, wait, options) {
|
|
7060
7132
|
}]);
|
7061
7133
|
|
7062
7134
|
return Slider;
|
7063
|
-
}();
|
7135
|
+
}(Component);
|
7064
7136
|
|
7065
7137
|
M.Slider = Slider;
|
7066
7138
|
|
7067
7139
|
if (M.jQueryLoaded) {
|
7068
7140
|
M.initializeJqueryWrapper(Slider, 'slider', 'M_Slider');
|
7069
7141
|
}
|
7070
|
-
})(cash, anime);
|
7142
|
+
})(cash, M.anime);
|
7071
7143
|
;(function ($, anim) {
|
7072
7144
|
$(document).on('click', '.card', function (e) {
|
7073
7145
|
if ($(this).children('.card-reveal').length) {
|
@@ -7101,7 +7173,7 @@ M.throttle = function (func, wait, options) {
|
|
7101
7173
|
}
|
7102
7174
|
}
|
7103
7175
|
});
|
7104
|
-
})(cash, anime);
|
7176
|
+
})(cash, M.anime);
|
7105
7177
|
;(function ($) {
|
7106
7178
|
'use strict';
|
7107
7179
|
|
@@ -7127,7 +7199,9 @@ M.throttle = function (func, wait, options) {
|
|
7127
7199
|
*
|
7128
7200
|
*/
|
7129
7201
|
|
7130
|
-
var Chips = function () {
|
7202
|
+
var Chips = function (_Component12) {
|
7203
|
+
_inherits(Chips, _Component12);
|
7204
|
+
|
7131
7205
|
/**
|
7132
7206
|
* Construct Chips instance and set up overlay
|
7133
7207
|
* @constructor
|
@@ -7137,14 +7211,9 @@ M.throttle = function (func, wait, options) {
|
|
7137
7211
|
function Chips(el, options) {
|
7138
7212
|
_classCallCheck(this, Chips);
|
7139
7213
|
|
7140
|
-
|
7141
|
-
if (!!el.M_Chips) {
|
7142
|
-
el.M_Chips.destroy();
|
7143
|
-
}
|
7214
|
+
var _this42 = _possibleConstructorReturn(this, (Chips.__proto__ || Object.getPrototypeOf(Chips)).call(this, Chips, el, options));
|
7144
7215
|
|
7145
|
-
|
7146
|
-
this.$el = $(el);
|
7147
|
-
this.el.M_Chips = this;
|
7216
|
+
_this42.el.M_Chips = _this42;
|
7148
7217
|
|
7149
7218
|
/**
|
7150
7219
|
* Options for the modal
|
@@ -7154,33 +7223,34 @@ M.throttle = function (func, wait, options) {
|
|
7154
7223
|
* @prop {String} secondaryPlaceholder
|
7155
7224
|
* @prop {Object} autocompleteOptions
|
7156
7225
|
*/
|
7157
|
-
|
7226
|
+
_this42.options = $.extend({}, Chips.defaults, options);
|
7158
7227
|
|
7159
|
-
|
7160
|
-
|
7161
|
-
|
7162
|
-
|
7163
|
-
|
7228
|
+
_this42.$el.addClass('chips input-field');
|
7229
|
+
_this42.chipsData = [];
|
7230
|
+
_this42.$chips = $();
|
7231
|
+
_this42._setupInput();
|
7232
|
+
_this42.hasAutocomplete = Object.keys(_this42.options.autocompleteOptions).length > 0;
|
7164
7233
|
|
7165
7234
|
// Set input id
|
7166
|
-
if (!
|
7167
|
-
|
7235
|
+
if (!_this42.$input.attr('id')) {
|
7236
|
+
_this42.$input.attr('id', M.guid());
|
7168
7237
|
}
|
7169
7238
|
|
7170
7239
|
// Render initial chips
|
7171
|
-
if (
|
7172
|
-
|
7173
|
-
|
7240
|
+
if (_this42.options.data.length) {
|
7241
|
+
_this42.chipsData = _this42.options.data;
|
7242
|
+
_this42._renderChips(_this42.chipsData);
|
7174
7243
|
}
|
7175
7244
|
|
7176
7245
|
// Setup autocomplete if needed
|
7177
|
-
if (
|
7178
|
-
|
7246
|
+
if (_this42.hasAutocomplete) {
|
7247
|
+
_this42._setupAutocomplete();
|
7179
7248
|
}
|
7180
7249
|
|
7181
|
-
|
7182
|
-
|
7183
|
-
|
7250
|
+
_this42._setPlaceholder();
|
7251
|
+
_this42._setupLabel();
|
7252
|
+
_this42._setupEventHandlers();
|
7253
|
+
return _this42;
|
7184
7254
|
}
|
7185
7255
|
|
7186
7256
|
_createClass(Chips, [{
|
@@ -7314,7 +7384,9 @@ M.throttle = function (func, wait, options) {
|
|
7314
7384
|
}
|
7315
7385
|
|
7316
7386
|
e.preventDefault();
|
7317
|
-
this.addChip({
|
7387
|
+
this.addChip({
|
7388
|
+
tag: this.$input[0].value
|
7389
|
+
});
|
7318
7390
|
this.$input[0].value = '';
|
7319
7391
|
|
7320
7392
|
// delete or left
|
@@ -7381,12 +7453,14 @@ M.throttle = function (func, wait, options) {
|
|
7381
7453
|
}, {
|
7382
7454
|
key: "_setupAutocomplete",
|
7383
7455
|
value: function _setupAutocomplete() {
|
7384
|
-
var
|
7456
|
+
var _this43 = this;
|
7385
7457
|
|
7386
7458
|
this.options.autocompleteOptions.onAutocomplete = function (val) {
|
7387
|
-
|
7388
|
-
|
7389
|
-
|
7459
|
+
_this43.addChip({
|
7460
|
+
tag: val
|
7461
|
+
});
|
7462
|
+
_this43.$input[0].value = '';
|
7463
|
+
_this43.$input[0].focus();
|
7390
7464
|
};
|
7391
7465
|
|
7392
7466
|
this.autocomplete = M.Autocomplete.init(this.$input, this.options.autocompleteOptions)[0];
|
@@ -7452,9 +7526,9 @@ M.throttle = function (func, wait, options) {
|
|
7452
7526
|
}
|
7453
7527
|
}
|
7454
7528
|
return !exists;
|
7455
|
-
} else {
|
7456
|
-
return false;
|
7457
7529
|
}
|
7530
|
+
|
7531
|
+
return false;
|
7458
7532
|
}
|
7459
7533
|
|
7460
7534
|
/**
|
@@ -7522,12 +7596,8 @@ M.throttle = function (func, wait, options) {
|
|
7522
7596
|
}
|
7523
7597
|
}], [{
|
7524
7598
|
key: "init",
|
7525
|
-
value: function init(
|
7526
|
-
|
7527
|
-
$els.each(function () {
|
7528
|
-
arr.push(new Chips(this, options));
|
7529
|
-
});
|
7530
|
-
return arr;
|
7599
|
+
value: function init(els, options) {
|
7600
|
+
return _get(Chips.__proto__ || Object.getPrototypeOf(Chips), "init", this).call(this, this, els, options);
|
7531
7601
|
}
|
7532
7602
|
|
7533
7603
|
/**
|
@@ -7629,7 +7699,7 @@ M.throttle = function (func, wait, options) {
|
|
7629
7699
|
}]);
|
7630
7700
|
|
7631
7701
|
return Chips;
|
7632
|
-
}();
|
7702
|
+
}(Component);
|
7633
7703
|
|
7634
7704
|
/**
|
7635
7705
|
* @static
|
@@ -7662,7 +7732,8 @@ M.throttle = function (func, wait, options) {
|
|
7662
7732
|
var _defaults = {
|
7663
7733
|
top: 0,
|
7664
7734
|
bottom: Infinity,
|
7665
|
-
offset: 0
|
7735
|
+
offset: 0,
|
7736
|
+
onPositionChange: null
|
7666
7737
|
};
|
7667
7738
|
|
7668
7739
|
/**
|
@@ -7670,7 +7741,9 @@ M.throttle = function (func, wait, options) {
|
|
7670
7741
|
*
|
7671
7742
|
*/
|
7672
7743
|
|
7673
|
-
var Pushpin = function () {
|
7744
|
+
var Pushpin = function (_Component13) {
|
7745
|
+
_inherits(Pushpin, _Component13);
|
7746
|
+
|
7674
7747
|
/**
|
7675
7748
|
* Construct Pushpin instance
|
7676
7749
|
* @constructor
|
@@ -7680,25 +7753,21 @@ M.throttle = function (func, wait, options) {
|
|
7680
7753
|
function Pushpin(el, options) {
|
7681
7754
|
_classCallCheck(this, Pushpin);
|
7682
7755
|
|
7683
|
-
|
7684
|
-
if (!!el.M_Pushpin) {
|
7685
|
-
el.M_Pushpin.destroy();
|
7686
|
-
}
|
7756
|
+
var _this44 = _possibleConstructorReturn(this, (Pushpin.__proto__ || Object.getPrototypeOf(Pushpin)).call(this, Pushpin, el, options));
|
7687
7757
|
|
7688
|
-
|
7689
|
-
this.$el = $(el);
|
7690
|
-
this.el.M_Pushpin = this;
|
7758
|
+
_this44.el.M_Pushpin = _this44;
|
7691
7759
|
|
7692
7760
|
/**
|
7693
7761
|
* Options for the modal
|
7694
7762
|
* @member Pushpin#options
|
7695
7763
|
*/
|
7696
|
-
|
7764
|
+
_this44.options = $.extend({}, Pushpin.defaults, options);
|
7697
7765
|
|
7698
|
-
|
7699
|
-
Pushpin._pushpins.push(
|
7700
|
-
|
7701
|
-
|
7766
|
+
_this44.originalOffset = _this44.el.offsetTop;
|
7767
|
+
Pushpin._pushpins.push(_this44);
|
7768
|
+
_this44._setupEventHandlers();
|
7769
|
+
_this44._updatePosition();
|
7770
|
+
return _this44;
|
7702
7771
|
}
|
7703
7772
|
|
7704
7773
|
_createClass(Pushpin, [{
|
@@ -7737,6 +7806,11 @@ M.throttle = function (func, wait, options) {
|
|
7737
7806
|
|
7738
7807
|
this.el.style.top = this.options.offset + "px";
|
7739
7808
|
this.el.classList.add('pinned');
|
7809
|
+
|
7810
|
+
// onPositionChange callback
|
7811
|
+
if (typeof this.options.onPositionChange === 'function') {
|
7812
|
+
this.options.onPositionChange.call(this, 'pinned');
|
7813
|
+
}
|
7740
7814
|
}
|
7741
7815
|
|
7742
7816
|
// Add pin-top (when scrolled position is above top)
|
@@ -7744,6 +7818,11 @@ M.throttle = function (func, wait, options) {
|
|
7744
7818
|
this._removePinClasses();
|
7745
7819
|
this.el.style.top = 0;
|
7746
7820
|
this.el.classList.add('pin-top');
|
7821
|
+
|
7822
|
+
// onPositionChange callback
|
7823
|
+
if (typeof this.options.onPositionChange === 'function') {
|
7824
|
+
this.options.onPositionChange.call(this, 'pin-top');
|
7825
|
+
}
|
7747
7826
|
}
|
7748
7827
|
|
7749
7828
|
// Add pin-bottom (when scrolled position is below bottom)
|
@@ -7751,6 +7830,11 @@ M.throttle = function (func, wait, options) {
|
|
7751
7830
|
this._removePinClasses();
|
7752
7831
|
this.el.classList.add('pin-bottom');
|
7753
7832
|
this.el.style.top = this.options.bottom - this.originalOffset + "px";
|
7833
|
+
|
7834
|
+
// onPositionChange callback
|
7835
|
+
if (typeof this.options.onPositionChange === 'function') {
|
7836
|
+
this.options.onPositionChange.call(this, 'pin-bottom');
|
7837
|
+
}
|
7754
7838
|
}
|
7755
7839
|
}
|
7756
7840
|
}, {
|
@@ -7760,12 +7844,8 @@ M.throttle = function (func, wait, options) {
|
|
7760
7844
|
}
|
7761
7845
|
}], [{
|
7762
7846
|
key: "init",
|
7763
|
-
value: function init(
|
7764
|
-
|
7765
|
-
$els.each(function () {
|
7766
|
-
arr.push(new Pushpin(this, options));
|
7767
|
-
});
|
7768
|
-
return arr;
|
7847
|
+
value: function init(els, options) {
|
7848
|
+
return _get(Pushpin.__proto__ || Object.getPrototypeOf(Pushpin), "init", this).call(this, this, els, options);
|
7769
7849
|
}
|
7770
7850
|
|
7771
7851
|
/**
|
@@ -7794,7 +7874,7 @@ M.throttle = function (func, wait, options) {
|
|
7794
7874
|
}]);
|
7795
7875
|
|
7796
7876
|
return Pushpin;
|
7797
|
-
}();
|
7877
|
+
}(Component);
|
7798
7878
|
|
7799
7879
|
/**
|
7800
7880
|
* @static
|
@@ -7826,7 +7906,9 @@ M.throttle = function (func, wait, options) {
|
|
7826
7906
|
*
|
7827
7907
|
*/
|
7828
7908
|
|
7829
|
-
var FloatingActionButton = function () {
|
7909
|
+
var FloatingActionButton = function (_Component14) {
|
7910
|
+
_inherits(FloatingActionButton, _Component14);
|
7911
|
+
|
7830
7912
|
/**
|
7831
7913
|
* Construct FloatingActionButton instance
|
7832
7914
|
* @constructor
|
@@ -7836,14 +7918,9 @@ M.throttle = function (func, wait, options) {
|
|
7836
7918
|
function FloatingActionButton(el, options) {
|
7837
7919
|
_classCallCheck(this, FloatingActionButton);
|
7838
7920
|
|
7839
|
-
|
7840
|
-
if (!!el.M_FloatingActionButton) {
|
7841
|
-
el.M_FloatingActionButton.destroy();
|
7842
|
-
}
|
7921
|
+
var _this45 = _possibleConstructorReturn(this, (FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton)).call(this, FloatingActionButton, el, options));
|
7843
7922
|
|
7844
|
-
|
7845
|
-
this.$el = $(el);
|
7846
|
-
this.el.M_FloatingActionButton = this;
|
7923
|
+
_this45.el.M_FloatingActionButton = _this45;
|
7847
7924
|
|
7848
7925
|
/**
|
7849
7926
|
* Options for the fab
|
@@ -7852,29 +7929,30 @@ M.throttle = function (func, wait, options) {
|
|
7852
7929
|
* @prop {Boolean} [hoverEnabled=true] - Enable hover vs click
|
7853
7930
|
* @prop {Boolean} [toolbarEnabled=false] - Enable toolbar transition
|
7854
7931
|
*/
|
7855
|
-
|
7856
|
-
|
7857
|
-
|
7858
|
-
|
7859
|
-
|
7860
|
-
|
7861
|
-
|
7862
|
-
|
7863
|
-
|
7864
|
-
if (
|
7865
|
-
|
7866
|
-
|
7867
|
-
} else if (
|
7868
|
-
|
7869
|
-
|
7870
|
-
} else if (
|
7871
|
-
|
7872
|
-
|
7932
|
+
_this45.options = $.extend({}, FloatingActionButton.defaults, options);
|
7933
|
+
|
7934
|
+
_this45.isOpen = false;
|
7935
|
+
_this45.$anchor = _this45.$el.children('a').first();
|
7936
|
+
_this45.$menu = _this45.$el.children('ul').first();
|
7937
|
+
_this45.$floatingBtns = _this45.$el.find('ul .btn-floating');
|
7938
|
+
_this45.$floatingBtnsReverse = _this45.$el.find('ul .btn-floating').reverse();
|
7939
|
+
_this45.offsetY = 0;
|
7940
|
+
_this45.offsetX = 0;
|
7941
|
+
if (_this45.options.direction === 'top') {
|
7942
|
+
_this45.$el.addClass('direction-top');
|
7943
|
+
_this45.offsetY = 40;
|
7944
|
+
} else if (_this45.options.direction === 'right') {
|
7945
|
+
_this45.$el.addClass('direction-right');
|
7946
|
+
_this45.offsetX = -40;
|
7947
|
+
} else if (_this45.options.direction === 'bottom') {
|
7948
|
+
_this45.$el.addClass('direction-bottom');
|
7949
|
+
_this45.offsetY = -40;
|
7873
7950
|
} else {
|
7874
|
-
|
7875
|
-
|
7951
|
+
_this45.$el.addClass('direction-left');
|
7952
|
+
_this45.offsetX = 40;
|
7876
7953
|
}
|
7877
|
-
|
7954
|
+
_this45._setupEventHandlers();
|
7955
|
+
return _this45;
|
7878
7956
|
}
|
7879
7957
|
|
7880
7958
|
_createClass(FloatingActionButton, [{
|
@@ -7997,7 +8075,7 @@ M.throttle = function (func, wait, options) {
|
|
7997
8075
|
}, {
|
7998
8076
|
key: "_animateInFAB",
|
7999
8077
|
value: function _animateInFAB() {
|
8000
|
-
var
|
8078
|
+
var _this46 = this;
|
8001
8079
|
|
8002
8080
|
this.$el.addClass('active');
|
8003
8081
|
|
@@ -8007,8 +8085,8 @@ M.throttle = function (func, wait, options) {
|
|
8007
8085
|
targets: el,
|
8008
8086
|
opacity: 1,
|
8009
8087
|
scale: [.4, 1],
|
8010
|
-
translateY: [
|
8011
|
-
translateX: [
|
8088
|
+
translateY: [_this46.offsetY, 0],
|
8089
|
+
translateX: [_this46.offsetX, 0],
|
8012
8090
|
duration: 275,
|
8013
8091
|
delay: time,
|
8014
8092
|
easing: 'easeInOutQuad'
|
@@ -8024,7 +8102,7 @@ M.throttle = function (func, wait, options) {
|
|
8024
8102
|
}, {
|
8025
8103
|
key: "_animateOutFAB",
|
8026
8104
|
value: function _animateOutFAB() {
|
8027
|
-
var
|
8105
|
+
var _this47 = this;
|
8028
8106
|
|
8029
8107
|
this.$floatingBtnsReverse.each(function (el) {
|
8030
8108
|
anim.remove(el);
|
@@ -8032,12 +8110,12 @@ M.throttle = function (func, wait, options) {
|
|
8032
8110
|
targets: el,
|
8033
8111
|
opacity: 0,
|
8034
8112
|
scale: .4,
|
8035
|
-
translateY:
|
8036
|
-
translateX:
|
8113
|
+
translateY: _this47.offsetY,
|
8114
|
+
translateX: _this47.offsetX,
|
8037
8115
|
duration: 175,
|
8038
8116
|
easing: 'easeOutQuad',
|
8039
8117
|
complete: function () {
|
8040
|
-
|
8118
|
+
_this47.$el.removeClass('active');
|
8041
8119
|
}
|
8042
8120
|
});
|
8043
8121
|
});
|
@@ -8050,7 +8128,7 @@ M.throttle = function (func, wait, options) {
|
|
8050
8128
|
}, {
|
8051
8129
|
key: "_animateInToolbar",
|
8052
8130
|
value: function _animateInToolbar() {
|
8053
|
-
var
|
8131
|
+
var _this48 = this;
|
8054
8132
|
|
8055
8133
|
var scaleFactor = void 0;
|
8056
8134
|
var windowWidth = window.innerWidth;
|
@@ -8086,18 +8164,18 @@ M.throttle = function (func, wait, options) {
|
|
8086
8164
|
});
|
8087
8165
|
|
8088
8166
|
setTimeout(function () {
|
8089
|
-
|
8167
|
+
_this48.$el.css({
|
8090
8168
|
transform: '',
|
8091
8169
|
transition: 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s'
|
8092
8170
|
});
|
8093
|
-
|
8171
|
+
_this48.$anchor.css({
|
8094
8172
|
overflow: 'visible',
|
8095
8173
|
transform: '',
|
8096
8174
|
transition: 'transform .2s'
|
8097
8175
|
});
|
8098
8176
|
|
8099
8177
|
setTimeout(function () {
|
8100
|
-
|
8178
|
+
_this48.$el.css({
|
8101
8179
|
overflow: 'hidden',
|
8102
8180
|
'background-color': fabColor
|
8103
8181
|
});
|
@@ -8105,14 +8183,14 @@ M.throttle = function (func, wait, options) {
|
|
8105
8183
|
transform: 'scale(' + scaleFactor + ')',
|
8106
8184
|
transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
|
8107
8185
|
});
|
8108
|
-
|
8186
|
+
_this48.$menu.children('li').children('a').css({
|
8109
8187
|
opacity: 1
|
8110
8188
|
});
|
8111
8189
|
|
8112
8190
|
// Scroll to close.
|
8113
|
-
|
8114
|
-
window.addEventListener('scroll',
|
8115
|
-
document.body.addEventListener('click',
|
8191
|
+
_this48._handleDocumentClickBound = _this48._handleDocumentClick.bind(_this48);
|
8192
|
+
window.addEventListener('scroll', _this48._handleCloseBound, true);
|
8193
|
+
document.body.addEventListener('click', _this48._handleDocumentClickBound, true);
|
8116
8194
|
}, 100);
|
8117
8195
|
}, 0);
|
8118
8196
|
}
|
@@ -8124,7 +8202,7 @@ M.throttle = function (func, wait, options) {
|
|
8124
8202
|
}, {
|
8125
8203
|
key: "_animateOutToolbar",
|
8126
8204
|
value: function _animateOutToolbar() {
|
8127
|
-
var
|
8205
|
+
var _this49 = this;
|
8128
8206
|
|
8129
8207
|
var windowWidth = window.innerWidth;
|
8130
8208
|
var windowHeight = window.innerHeight;
|
@@ -8155,26 +8233,26 @@ M.throttle = function (func, wait, options) {
|
|
8155
8233
|
backdrop.remove();
|
8156
8234
|
|
8157
8235
|
// Set initial state.
|
8158
|
-
|
8236
|
+
_this49.$el.css({
|
8159
8237
|
'text-align': '',
|
8160
8238
|
width: '',
|
8161
8239
|
bottom: '',
|
8162
8240
|
left: '',
|
8163
8241
|
overflow: '',
|
8164
8242
|
'background-color': '',
|
8165
|
-
transform: 'translate3d(' + -
|
8243
|
+
transform: 'translate3d(' + -_this49.offsetX + 'px,0,0)'
|
8166
8244
|
});
|
8167
|
-
|
8245
|
+
_this49.$anchor.css({
|
8168
8246
|
overflow: '',
|
8169
|
-
transform: 'translate3d(0,' +
|
8247
|
+
transform: 'translate3d(0,' + _this49.offsetY + 'px,0)'
|
8170
8248
|
});
|
8171
8249
|
|
8172
8250
|
setTimeout(function () {
|
8173
|
-
|
8251
|
+
_this49.$el.css({
|
8174
8252
|
transform: 'translate3d(0,0,0)',
|
8175
8253
|
transition: 'transform .2s'
|
8176
8254
|
});
|
8177
|
-
|
8255
|
+
_this49.$anchor.css({
|
8178
8256
|
transform: 'translate3d(0,0,0)',
|
8179
8257
|
transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
|
8180
8258
|
});
|
@@ -8183,12 +8261,8 @@ M.throttle = function (func, wait, options) {
|
|
8183
8261
|
}
|
8184
8262
|
}], [{
|
8185
8263
|
key: "init",
|
8186
|
-
value: function init(
|
8187
|
-
|
8188
|
-
$els.each(function () {
|
8189
|
-
arr.push(new FloatingActionButton(this, options));
|
8190
|
-
});
|
8191
|
-
return arr;
|
8264
|
+
value: function init(els, options) {
|
8265
|
+
return _get(FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton), "init", this).call(this, this, els, options);
|
8192
8266
|
}
|
8193
8267
|
|
8194
8268
|
/**
|
@@ -8209,14 +8283,14 @@ M.throttle = function (func, wait, options) {
|
|
8209
8283
|
}]);
|
8210
8284
|
|
8211
8285
|
return FloatingActionButton;
|
8212
|
-
}();
|
8286
|
+
}(Component);
|
8213
8287
|
|
8214
8288
|
M.FloatingActionButton = FloatingActionButton;
|
8215
8289
|
|
8216
8290
|
if (M.jQueryLoaded) {
|
8217
8291
|
M.initializeJqueryWrapper(FloatingActionButton, 'floatingActionButton', 'M_FloatingActionButton');
|
8218
8292
|
}
|
8219
|
-
})(cash, anime);
|
8293
|
+
})(cash, M.anime);
|
8220
8294
|
;(function ($) {
|
8221
8295
|
'use strict';
|
8222
8296
|
|
@@ -8298,7 +8372,9 @@ M.throttle = function (func, wait, options) {
|
|
8298
8372
|
*
|
8299
8373
|
*/
|
8300
8374
|
|
8301
|
-
var Datepicker = function () {
|
8375
|
+
var Datepicker = function (_Component15) {
|
8376
|
+
_inherits(Datepicker, _Component15);
|
8377
|
+
|
8302
8378
|
/**
|
8303
8379
|
* Construct Datepicker instance and set up overlay
|
8304
8380
|
* @constructor
|
@@ -8308,51 +8384,48 @@ M.throttle = function (func, wait, options) {
|
|
8308
8384
|
function Datepicker(el, options) {
|
8309
8385
|
_classCallCheck(this, Datepicker);
|
8310
8386
|
|
8311
|
-
|
8312
|
-
if (!!el.M_Datepicker) {
|
8313
|
-
el.M_Datepicker.destroy();
|
8314
|
-
}
|
8387
|
+
var _this50 = _possibleConstructorReturn(this, (Datepicker.__proto__ || Object.getPrototypeOf(Datepicker)).call(this, Datepicker, el, options));
|
8315
8388
|
|
8316
|
-
|
8317
|
-
this.$el = $(el);
|
8318
|
-
this.el.M_Datepicker = this;
|
8389
|
+
_this50.el.M_Datepicker = _this50;
|
8319
8390
|
|
8320
|
-
|
8391
|
+
_this50.options = $.extend({}, Datepicker.defaults, options);
|
8321
8392
|
|
8322
8393
|
// Remove time component from minDate and maxDate options
|
8323
|
-
if (
|
8324
|
-
if (
|
8394
|
+
if (_this50.options.minDate) _this50.options.minDate.setHours(0, 0, 0, 0);
|
8395
|
+
if (_this50.options.maxDate) _this50.options.maxDate.setHours(0, 0, 0, 0);
|
8325
8396
|
|
8326
|
-
|
8397
|
+
_this50.id = M.guid();
|
8327
8398
|
|
8328
|
-
|
8329
|
-
|
8330
|
-
|
8399
|
+
_this50._setupVariables();
|
8400
|
+
_this50._insertHTMLIntoDOM();
|
8401
|
+
_this50._setupModal();
|
8331
8402
|
|
8332
|
-
|
8403
|
+
_this50._setupEventHandlers();
|
8333
8404
|
|
8334
|
-
if (!
|
8335
|
-
|
8336
|
-
|
8405
|
+
if (!_this50.options.defaultDate) {
|
8406
|
+
_this50.options.defaultDate = new Date(Date.parse(_this50.el.value));
|
8407
|
+
_this50.options.setDefaultDate = true;
|
8337
8408
|
}
|
8338
8409
|
|
8339
|
-
var defDate =
|
8410
|
+
var defDate = _this50.options.defaultDate;
|
8340
8411
|
|
8341
8412
|
if (Datepicker._isDate(defDate)) {
|
8342
|
-
if (
|
8343
|
-
|
8413
|
+
if (_this50.options.setDefaultDate) {
|
8414
|
+
_this50.setDate(defDate, true);
|
8344
8415
|
} else {
|
8345
|
-
|
8416
|
+
_this50.gotoDate(defDate);
|
8346
8417
|
}
|
8347
8418
|
} else {
|
8348
|
-
|
8419
|
+
_this50.gotoDate(new Date());
|
8349
8420
|
}
|
8350
8421
|
|
8351
8422
|
/**
|
8352
8423
|
* Describes open/close state of datepicker
|
8353
8424
|
* @type {Boolean}
|
8354
8425
|
*/
|
8355
|
-
|
8426
|
+
_this50.isOpen = false;
|
8427
|
+
|
8428
|
+
return _this50;
|
8356
8429
|
}
|
8357
8430
|
|
8358
8431
|
_createClass(Datepicker, [{
|
@@ -8362,7 +8435,12 @@ M.throttle = function (func, wait, options) {
|
|
8362
8435
|
/**
|
8363
8436
|
* Teardown component
|
8364
8437
|
*/
|
8365
|
-
value: function destroy() {
|
8438
|
+
value: function destroy() {
|
8439
|
+
this._removeEventHandlers();
|
8440
|
+
this.modal.destroy();
|
8441
|
+
$(this.modalEl).remove();
|
8442
|
+
this.el.M_Datepicker = undefined;
|
8443
|
+
}
|
8366
8444
|
}, {
|
8367
8445
|
key: "_insertHTMLIntoDOM",
|
8368
8446
|
value: function _insertHTMLIntoDOM() {
|
@@ -8380,19 +8458,19 @@ M.throttle = function (func, wait, options) {
|
|
8380
8458
|
}, {
|
8381
8459
|
key: "_setupModal",
|
8382
8460
|
value: function _setupModal() {
|
8383
|
-
var
|
8461
|
+
var _this51 = this;
|
8384
8462
|
|
8385
8463
|
this.modalEl.id = 'modal-' + this.id;
|
8386
|
-
this.modal =
|
8387
|
-
|
8388
|
-
|
8464
|
+
this.modal = M.Modal.init(this.modalEl, {
|
8465
|
+
onCloseEnd: function () {
|
8466
|
+
_this51.isOpen = false;
|
8389
8467
|
}
|
8390
8468
|
});
|
8391
8469
|
}
|
8392
8470
|
}, {
|
8393
8471
|
key: "toString",
|
8394
8472
|
value: function toString(format) {
|
8395
|
-
var
|
8473
|
+
var _this52 = this;
|
8396
8474
|
|
8397
8475
|
format = format || this.options.format;
|
8398
8476
|
if (!Datepicker._isDate(this.date)) {
|
@@ -8401,11 +8479,11 @@ M.throttle = function (func, wait, options) {
|
|
8401
8479
|
|
8402
8480
|
var formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);
|
8403
8481
|
var formattedDate = formatArray.map(function (label) {
|
8404
|
-
if (
|
8405
|
-
return
|
8406
|
-
} else {
|
8407
|
-
return label;
|
8482
|
+
if (_this52.formats[label]) {
|
8483
|
+
return _this52.formats[label]();
|
8408
8484
|
}
|
8485
|
+
|
8486
|
+
return label;
|
8409
8487
|
}).join('');
|
8410
8488
|
return formattedDate;
|
8411
8489
|
}
|
@@ -8784,8 +8862,8 @@ M.throttle = function (func, wait, options) {
|
|
8784
8862
|
// Init Materialize Select
|
8785
8863
|
var yearSelect = this.calendarEl.querySelector('.pika-select-year');
|
8786
8864
|
var monthSelect = this.calendarEl.querySelector('.pika-select-month');
|
8787
|
-
|
8788
|
-
|
8865
|
+
M.Select.init(yearSelect, { classes: 'select-year' });
|
8866
|
+
M.Select.init(monthSelect, { classes: 'select-month' });
|
8789
8867
|
|
8790
8868
|
// Add change handlers for select
|
8791
8869
|
yearSelect.addEventListener('change', this._handleYearChange.bind(this));
|
@@ -8823,7 +8901,7 @@ M.throttle = function (func, wait, options) {
|
|
8823
8901
|
}, {
|
8824
8902
|
key: "_setupVariables",
|
8825
8903
|
value: function _setupVariables() {
|
8826
|
-
var
|
8904
|
+
var _this53 = this;
|
8827
8905
|
|
8828
8906
|
this.$modalEl = $(Datepicker._template);
|
8829
8907
|
this.modalEl = this.$modalEl[0];
|
@@ -8839,28 +8917,28 @@ M.throttle = function (func, wait, options) {
|
|
8839
8917
|
this.formats = {
|
8840
8918
|
|
8841
8919
|
dd: function () {
|
8842
|
-
return
|
8920
|
+
return _this53.date.getDate();
|
8843
8921
|
},
|
8844
8922
|
ddd: function () {
|
8845
|
-
return
|
8923
|
+
return _this53.options.i18n.weekdaysShort[_this53.date.getDay()];
|
8846
8924
|
},
|
8847
8925
|
dddd: function () {
|
8848
|
-
return
|
8926
|
+
return _this53.options.i18n.weekdays[_this53.date.getDay()];
|
8849
8927
|
},
|
8850
8928
|
mm: function () {
|
8851
|
-
return
|
8929
|
+
return _this53.date.getMonth() + 1;
|
8852
8930
|
},
|
8853
8931
|
mmm: function () {
|
8854
|
-
return
|
8932
|
+
return _this53.options.i18n.monthsShort[_this53.date.getMonth()];
|
8855
8933
|
},
|
8856
8934
|
mmmm: function () {
|
8857
|
-
return
|
8935
|
+
return _this53.options.i18n.monthsShort[_this53.date.getMonth()];
|
8858
8936
|
},
|
8859
8937
|
yy: function () {
|
8860
|
-
return
|
8938
|
+
return _this53.date.getFullYear().slice(2);
|
8861
8939
|
},
|
8862
8940
|
yyyy: function () {
|
8863
|
-
return
|
8941
|
+
return _this53.date.getFullYear();
|
8864
8942
|
}
|
8865
8943
|
};
|
8866
8944
|
}
|
@@ -9052,12 +9130,8 @@ M.throttle = function (func, wait, options) {
|
|
9052
9130
|
}
|
9053
9131
|
}], [{
|
9054
9132
|
key: "init",
|
9055
|
-
value: function init(
|
9056
|
-
|
9057
|
-
$els.each(function () {
|
9058
|
-
arr.push(new Datepicker(this, options));
|
9059
|
-
});
|
9060
|
-
return arr;
|
9133
|
+
value: function init(els, options) {
|
9134
|
+
return _get(Datepicker.__proto__ || Object.getPrototypeOf(Datepicker), "init", this).call(this, this, els, options);
|
9061
9135
|
}
|
9062
9136
|
}, {
|
9063
9137
|
key: "_isDate",
|
@@ -9117,7 +9191,7 @@ M.throttle = function (func, wait, options) {
|
|
9117
9191
|
}]);
|
9118
9192
|
|
9119
9193
|
return Datepicker;
|
9120
|
-
}();
|
9194
|
+
}(Component);
|
9121
9195
|
|
9122
9196
|
Datepicker._template = ['<div class= "modal datepicker-modal">', '<div class="modal-content datepicker-container">', '<div class="datepicker-date-display">', '<span class="year-text"></span>', '<span class="date-text"></span>', '</div>', '<div class="datepicker-calendar-container">', '<div class="pika-single"></div>', '<div class="datepicker-footer">', '<button class="btn-flat datepicker-clear waves-effect" type="button"></button>', '<div class="confirmation-btns">', '<button class="btn-flat datepicker-today waves-effect" type="button"></button>', '<button class="btn-flat datepicker-done waves-effect" type="button"></button>', '</div>', '</div>', '</div>', '</div>', '</div>'].join('');
|
9123
9197
|
|
@@ -9152,29 +9226,27 @@ M.throttle = function (func, wait, options) {
|
|
9152
9226
|
*
|
9153
9227
|
*/
|
9154
9228
|
|
9155
|
-
var Timepicker = function () {
|
9229
|
+
var Timepicker = function (_Component16) {
|
9230
|
+
_inherits(Timepicker, _Component16);
|
9231
|
+
|
9156
9232
|
function Timepicker(el, options) {
|
9157
9233
|
_classCallCheck(this, Timepicker);
|
9158
9234
|
|
9159
|
-
|
9160
|
-
if (!!el.M_Timepicker) {
|
9161
|
-
el.M_Timepicker.destroy();
|
9162
|
-
}
|
9235
|
+
var _this54 = _possibleConstructorReturn(this, (Timepicker.__proto__ || Object.getPrototypeOf(Timepicker)).call(this, Timepicker, el, options));
|
9163
9236
|
|
9164
|
-
|
9165
|
-
this.$el = $(el);
|
9166
|
-
this.el.M_Timepicker = this;
|
9237
|
+
_this54.el.M_Timepicker = _this54;
|
9167
9238
|
|
9168
|
-
|
9239
|
+
_this54.options = $.extend({}, Timepicker.defaults, options);
|
9169
9240
|
|
9170
|
-
|
9171
|
-
|
9172
|
-
|
9173
|
-
|
9174
|
-
|
9241
|
+
_this54.id = M.guid();
|
9242
|
+
_this54._insertHTMLIntoDOM();
|
9243
|
+
_this54._setupModal();
|
9244
|
+
_this54._setupVariables();
|
9245
|
+
_this54._setupEventHandlers();
|
9175
9246
|
|
9176
|
-
|
9177
|
-
|
9247
|
+
_this54._clockSetup();
|
9248
|
+
_this54._pickerSetup();
|
9249
|
+
return _this54;
|
9178
9250
|
}
|
9179
9251
|
|
9180
9252
|
_createClass(Timepicker, [{
|
@@ -9310,11 +9382,11 @@ M.throttle = function (func, wait, options) {
|
|
9310
9382
|
}, {
|
9311
9383
|
key: "_setupModal",
|
9312
9384
|
value: function _setupModal() {
|
9313
|
-
var
|
9385
|
+
var _this55 = this;
|
9314
9386
|
|
9315
|
-
this.modal =
|
9316
|
-
|
9317
|
-
|
9387
|
+
this.modal = M.Modal.init(this.modalEl, {
|
9388
|
+
onCloseEnd: function () {
|
9389
|
+
_this55.isOpen = false;
|
9318
9390
|
}
|
9319
9391
|
});
|
9320
9392
|
}
|
@@ -9466,7 +9538,7 @@ M.throttle = function (func, wait, options) {
|
|
9466
9538
|
// Get the time
|
9467
9539
|
var value = ((this.el.value || this.options.defaultTime || '') + '').split(':');
|
9468
9540
|
if (this.options.twelveHour && !(typeof value[1] === 'undefined')) {
|
9469
|
-
if (value[1].indexOf("AM") > 0) {
|
9541
|
+
if (value[1].toUpperCase().indexOf("AM") > 0) {
|
9470
9542
|
this.amOrPm = 'AM';
|
9471
9543
|
} else {
|
9472
9544
|
this.amOrPm = 'PM';
|
@@ -9540,7 +9612,7 @@ M.throttle = function (func, wait, options) {
|
|
9540
9612
|
}, {
|
9541
9613
|
key: "setHand",
|
9542
9614
|
value: function setHand(x, y, roundBy5) {
|
9543
|
-
var
|
9615
|
+
var _this56 = this;
|
9544
9616
|
|
9545
9617
|
var radian = Math.atan2(x, -y),
|
9546
9618
|
isHours = this.currentView === 'hours',
|
@@ -9595,7 +9667,7 @@ M.throttle = function (func, wait, options) {
|
|
9595
9667
|
if (!this.vibrateTimer) {
|
9596
9668
|
navigator[this.vibrate](10);
|
9597
9669
|
this.vibrateTimer = setTimeout(function () {
|
9598
|
-
|
9670
|
+
_this56.vibrateTimer = null;
|
9599
9671
|
}, 100);
|
9600
9672
|
}
|
9601
9673
|
}
|
@@ -9672,12 +9744,8 @@ M.throttle = function (func, wait, options) {
|
|
9672
9744
|
}
|
9673
9745
|
}], [{
|
9674
9746
|
key: "init",
|
9675
|
-
value: function init(
|
9676
|
-
|
9677
|
-
$els.each(function () {
|
9678
|
-
arr.push(new Timepicker(this, options));
|
9679
|
-
});
|
9680
|
-
return arr;
|
9747
|
+
value: function init(els, options) {
|
9748
|
+
return _get(Timepicker.__proto__ || Object.getPrototypeOf(Timepicker), "init", this).call(this, this, els, options);
|
9681
9749
|
}
|
9682
9750
|
}, {
|
9683
9751
|
key: "_addLeadingZero",
|
@@ -9731,7 +9799,7 @@ M.throttle = function (func, wait, options) {
|
|
9731
9799
|
}]);
|
9732
9800
|
|
9733
9801
|
return Timepicker;
|
9734
|
-
}();
|
9802
|
+
}(Component);
|
9735
9803
|
|
9736
9804
|
Timepicker._template = ['<div class= "modal timepicker-modal">', '<div class="modal-content timepicker-container">', '<div class="timepicker-digital-display">', '<div class="timepicker-text-container">', '<div class="timepicker-display-column">', '<span class="timepicker-span-hours text-primary"></span>', ':', '<span class="timepicker-span-minutes"></span>', '</div>', '<div class="timepicker-display-column timepicker-display-am-pm">', '<div class="timepicker-span-am-pm"></div>', '</div>', '</div>', '</div>', '<div class="timepicker-analog-display">', '<div class="timepicker-plate">', '<div class="timepicker-canvas"></div>', '<div class="timepicker-dial timepicker-hours"></div>', '<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>', '</div>', '<div class="timepicker-footer"></div>', '</div>', '</div>', '</div>'].join('');
|
9737
9805
|
|
@@ -9751,7 +9819,9 @@ M.throttle = function (func, wait, options) {
|
|
9751
9819
|
*
|
9752
9820
|
*/
|
9753
9821
|
|
9754
|
-
var CharacterCounter = function () {
|
9822
|
+
var CharacterCounter = function (_Component17) {
|
9823
|
+
_inherits(CharacterCounter, _Component17);
|
9824
|
+
|
9755
9825
|
/**
|
9756
9826
|
* Construct CharacterCounter instance
|
9757
9827
|
* @constructor
|
@@ -9761,24 +9831,20 @@ M.throttle = function (func, wait, options) {
|
|
9761
9831
|
function CharacterCounter(el, options) {
|
9762
9832
|
_classCallCheck(this, CharacterCounter);
|
9763
9833
|
|
9764
|
-
|
9765
|
-
if (!!el.M_CharacterCounter) {
|
9766
|
-
el.M_CharacterCounter.destroy();
|
9767
|
-
}
|
9834
|
+
var _this57 = _possibleConstructorReturn(this, (CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter)).call(this, CharacterCounter, el, options));
|
9768
9835
|
|
9769
|
-
|
9770
|
-
this.$el = $(el);
|
9771
|
-
this.el.M_CharacterCounter = this;
|
9836
|
+
_this57.el.M_CharacterCounter = _this57;
|
9772
9837
|
|
9773
9838
|
/**
|
9774
9839
|
* Options for the character counter
|
9775
9840
|
*/
|
9776
|
-
|
9841
|
+
_this57.options = $.extend({}, CharacterCounter.defaults, options);
|
9777
9842
|
|
9778
|
-
|
9779
|
-
|
9780
|
-
|
9781
|
-
|
9843
|
+
_this57.isInvalid = false;
|
9844
|
+
_this57.isValidLength = false;
|
9845
|
+
_this57._setupCounter();
|
9846
|
+
_this57._setupEventHandlers();
|
9847
|
+
return _this57;
|
9782
9848
|
}
|
9783
9849
|
|
9784
9850
|
_createClass(CharacterCounter, [{
|
@@ -9883,12 +9949,8 @@ M.throttle = function (func, wait, options) {
|
|
9883
9949
|
}
|
9884
9950
|
}], [{
|
9885
9951
|
key: "init",
|
9886
|
-
value: function init(
|
9887
|
-
|
9888
|
-
$els.each(function () {
|
9889
|
-
arr.push(new CharacterCounter(this, options));
|
9890
|
-
});
|
9891
|
-
return arr;
|
9952
|
+
value: function init(els, options) {
|
9953
|
+
return _get(CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter), "init", this).call(this, this, els, options);
|
9892
9954
|
}
|
9893
9955
|
|
9894
9956
|
/**
|
@@ -9909,7 +9971,7 @@ M.throttle = function (func, wait, options) {
|
|
9909
9971
|
}]);
|
9910
9972
|
|
9911
9973
|
return CharacterCounter;
|
9912
|
-
}();
|
9974
|
+
}(Component);
|
9913
9975
|
|
9914
9976
|
M.CharacterCounter = CharacterCounter;
|
9915
9977
|
|
@@ -9936,7 +9998,9 @@ M.throttle = function (func, wait, options) {
|
|
9936
9998
|
*
|
9937
9999
|
*/
|
9938
10000
|
|
9939
|
-
var Carousel = function () {
|
10001
|
+
var Carousel = function (_Component18) {
|
10002
|
+
_inherits(Carousel, _Component18);
|
10003
|
+
|
9940
10004
|
/**
|
9941
10005
|
* Construct Carousel instance
|
9942
10006
|
* @constructor
|
@@ -9944,18 +10008,11 @@ M.throttle = function (func, wait, options) {
|
|
9944
10008
|
* @param {Object} options
|
9945
10009
|
*/
|
9946
10010
|
function Carousel(el, options) {
|
9947
|
-
var _this42 = this;
|
9948
|
-
|
9949
10011
|
_classCallCheck(this, Carousel);
|
9950
10012
|
|
9951
|
-
|
9952
|
-
if (!!el.M_Carousel) {
|
9953
|
-
el.M_Carousel.destroy();
|
9954
|
-
}
|
10013
|
+
var _this58 = _possibleConstructorReturn(this, (Carousel.__proto__ || Object.getPrototypeOf(Carousel)).call(this, Carousel, el, options));
|
9955
10014
|
|
9956
|
-
|
9957
|
-
this.$el = $(el);
|
9958
|
-
this.el.M_Carousel = this;
|
10015
|
+
_this58.el.M_Carousel = _this58;
|
9959
10016
|
|
9960
10017
|
/**
|
9961
10018
|
* Options for the carousel
|
@@ -9969,38 +10026,38 @@ M.throttle = function (func, wait, options) {
|
|
9969
10026
|
* @prop {Boolean} noWrap
|
9970
10027
|
* @prop {Function} onCycleTo
|
9971
10028
|
*/
|
9972
|
-
|
10029
|
+
_this58.options = $.extend({}, Carousel.defaults, options);
|
9973
10030
|
|
9974
10031
|
// Setup
|
9975
|
-
|
9976
|
-
|
9977
|
-
|
9978
|
-
|
9979
|
-
|
9980
|
-
|
9981
|
-
|
9982
|
-
|
9983
|
-
|
9984
|
-
|
9985
|
-
|
9986
|
-
|
10032
|
+
_this58.hasMultipleSlides = _this58.$el.find('.carousel-item').length > 1;
|
10033
|
+
_this58.showIndicators = _this58.options.indicators && _this58.hasMultipleSlides;
|
10034
|
+
_this58.noWrap = _this58.options.noWrap || !_this58.hasMultipleSlides;
|
10035
|
+
_this58.pressed = false;
|
10036
|
+
_this58.dragged = false;
|
10037
|
+
_this58.offset = _this58.target = 0;
|
10038
|
+
_this58.images = [];
|
10039
|
+
_this58.itemWidth = _this58.$el.find('.carousel-item').first().innerWidth();
|
10040
|
+
_this58.itemHeight = _this58.$el.find('.carousel-item').first().innerHeight();
|
10041
|
+
_this58.dim = _this58.itemWidth * 2 + _this58.options.padding || 1; // Make sure dim is non zero for divisions.
|
10042
|
+
_this58._autoScrollBound = _this58._autoScroll.bind(_this58);
|
10043
|
+
_this58._trackBound = _this58._track.bind(_this58);
|
9987
10044
|
|
9988
10045
|
// Full Width carousel setup
|
9989
|
-
if (
|
9990
|
-
|
9991
|
-
|
10046
|
+
if (_this58.options.fullWidth) {
|
10047
|
+
_this58.options.dist = 0;
|
10048
|
+
_this58._setCarouselHeight();
|
9992
10049
|
|
9993
10050
|
// Offset fixed items when indicators.
|
9994
|
-
if (
|
9995
|
-
|
10051
|
+
if (_this58.showIndicators) {
|
10052
|
+
_this58.$el.find('.carousel-fixed-item').addClass('with-indicators');
|
9996
10053
|
}
|
9997
10054
|
}
|
9998
10055
|
|
9999
10056
|
// Iterate through slides
|
10000
|
-
|
10001
|
-
|
10002
|
-
|
10003
|
-
if (
|
10057
|
+
_this58.$indicators = $('<ul class="indicators"></ul>');
|
10058
|
+
_this58.$el.find('.carousel-item').each(function (el, i) {
|
10059
|
+
_this58.images.push(el);
|
10060
|
+
if (_this58.showIndicators) {
|
10004
10061
|
var $indicator = $('<li class="indicator-item"></li>');
|
10005
10062
|
|
10006
10063
|
// Add active to first by default.
|
@@ -10008,27 +10065,28 @@ M.throttle = function (func, wait, options) {
|
|
10008
10065
|
$indicator[0].classList.add('active');
|
10009
10066
|
}
|
10010
10067
|
|
10011
|
-
|
10068
|
+
_this58.$indicators.append($indicator);
|
10012
10069
|
}
|
10013
10070
|
});
|
10014
|
-
if (
|
10015
|
-
|
10071
|
+
if (_this58.showIndicators) {
|
10072
|
+
_this58.$el.append(_this58.$indicators);
|
10016
10073
|
}
|
10017
|
-
|
10074
|
+
_this58.count = _this58.images.length;
|
10018
10075
|
|
10019
10076
|
// Setup cross browser string
|
10020
|
-
|
10077
|
+
_this58.xform = 'transform';
|
10021
10078
|
['webkit', 'Moz', 'O', 'ms'].every(function (prefix) {
|
10022
10079
|
var e = prefix + 'Transform';
|
10023
10080
|
if (typeof document.body.style[e] !== 'undefined') {
|
10024
|
-
|
10081
|
+
_this58.xform = e;
|
10025
10082
|
return false;
|
10026
10083
|
}
|
10027
10084
|
return true;
|
10028
10085
|
});
|
10029
10086
|
|
10030
|
-
|
10031
|
-
|
10087
|
+
_this58._setupEventHandlers();
|
10088
|
+
_this58._scroll(_this58.offset);
|
10089
|
+
return _this58;
|
10032
10090
|
}
|
10033
10091
|
|
10034
10092
|
_createClass(Carousel, [{
|
@@ -10050,7 +10108,7 @@ M.throttle = function (func, wait, options) {
|
|
10050
10108
|
}, {
|
10051
10109
|
key: "_setupEventHandlers",
|
10052
10110
|
value: function _setupEventHandlers() {
|
10053
|
-
var
|
10111
|
+
var _this59 = this;
|
10054
10112
|
|
10055
10113
|
this._handleCarouselTapBound = this._handleCarouselTap.bind(this);
|
10056
10114
|
this._handleCarouselDragBound = this._handleCarouselDrag.bind(this);
|
@@ -10072,7 +10130,7 @@ M.throttle = function (func, wait, options) {
|
|
10072
10130
|
if (this.showIndicators && this.$indicators) {
|
10073
10131
|
this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
|
10074
10132
|
this.$indicators.find('.indicator-item').each(function (el, i) {
|
10075
|
-
el.addEventListener('click',
|
10133
|
+
el.addEventListener('click', _this59._handleIndicatorClickBound);
|
10076
10134
|
});
|
10077
10135
|
}
|
10078
10136
|
|
@@ -10090,7 +10148,7 @@ M.throttle = function (func, wait, options) {
|
|
10090
10148
|
}, {
|
10091
10149
|
key: "_removeEventHandlers",
|
10092
10150
|
value: function _removeEventHandlers() {
|
10093
|
-
var
|
10151
|
+
var _this60 = this;
|
10094
10152
|
|
10095
10153
|
if (typeof window.ontouchstart !== 'undefined') {
|
10096
10154
|
this.el.removeEventListener('touchstart', this._handleCarouselTapBound);
|
@@ -10105,7 +10163,7 @@ M.throttle = function (func, wait, options) {
|
|
10105
10163
|
|
10106
10164
|
if (this.showIndicators && this.$indicators) {
|
10107
10165
|
this.$indicators.find('.indicator-item').each(function (el, i) {
|
10108
|
-
el.removeEventListener('click',
|
10166
|
+
el.removeEventListener('click', _this60._handleIndicatorClickBound);
|
10109
10167
|
});
|
10110
10168
|
}
|
10111
10169
|
|
@@ -10291,7 +10349,7 @@ M.throttle = function (func, wait, options) {
|
|
10291
10349
|
}, {
|
10292
10350
|
key: "_setCarouselHeight",
|
10293
10351
|
value: function _setCarouselHeight(imageOnly) {
|
10294
|
-
var
|
10352
|
+
var _this61 = this;
|
10295
10353
|
|
10296
10354
|
var firstSlide = this.$el.find('.carousel-item.active').length ? this.$el.find('.carousel-item.active').first() : this.$el.find('.carousel-item').first();
|
10297
10355
|
var firstImage = firstSlide.find('img').first();
|
@@ -10311,7 +10369,7 @@ M.throttle = function (func, wait, options) {
|
|
10311
10369
|
} else {
|
10312
10370
|
// Get height when image is loaded normally
|
10313
10371
|
firstImage.one('load', function (el, i) {
|
10314
|
-
|
10372
|
+
_this61.$el.css('height', el.offsetHeight + 'px');
|
10315
10373
|
});
|
10316
10374
|
}
|
10317
10375
|
} else if (!imageOnly) {
|
@@ -10417,7 +10475,7 @@ M.throttle = function (func, wait, options) {
|
|
10417
10475
|
}, {
|
10418
10476
|
key: "_scroll",
|
10419
10477
|
value: function _scroll(x) {
|
10420
|
-
var
|
10478
|
+
var _this62 = this;
|
10421
10479
|
|
10422
10480
|
// Track scrolling state
|
10423
10481
|
if (!this.$el.hasClass('scrolling')) {
|
@@ -10427,7 +10485,7 @@ M.throttle = function (func, wait, options) {
|
|
10427
10485
|
window.clearTimeout(this.scrollingTimeout);
|
10428
10486
|
}
|
10429
10487
|
this.scrollingTimeout = window.setTimeout(function () {
|
10430
|
-
|
10488
|
+
_this62.$el.removeClass('scrolling');
|
10431
10489
|
}, this.options.duration);
|
10432
10490
|
|
10433
10491
|
// Start actual scroll
|
@@ -10614,9 +10672,9 @@ M.throttle = function (func, wait, options) {
|
|
10614
10672
|
if (index > this.count || index < 0) {
|
10615
10673
|
if (this.noWrap) {
|
10616
10674
|
return;
|
10617
|
-
} else {
|
10618
|
-
index = this._wrap(index);
|
10619
10675
|
}
|
10676
|
+
|
10677
|
+
index = this._wrap(index);
|
10620
10678
|
}
|
10621
10679
|
this._cycleTo(index);
|
10622
10680
|
}
|
@@ -10637,9 +10695,9 @@ M.throttle = function (func, wait, options) {
|
|
10637
10695
|
if (index > this.count || index < 0) {
|
10638
10696
|
if (this.noWrap) {
|
10639
10697
|
return;
|
10640
|
-
} else {
|
10641
|
-
index = this._wrap(index);
|
10642
10698
|
}
|
10699
|
+
|
10700
|
+
index = this._wrap(index);
|
10643
10701
|
}
|
10644
10702
|
|
10645
10703
|
this._cycleTo(index);
|
@@ -10661,21 +10719,17 @@ M.throttle = function (func, wait, options) {
|
|
10661
10719
|
if (n > this.count || n < 0) {
|
10662
10720
|
if (this.noWrap) {
|
10663
10721
|
return;
|
10664
|
-
} else {
|
10665
|
-
n = this._wrap(n);
|
10666
10722
|
}
|
10723
|
+
|
10724
|
+
n = this._wrap(n);
|
10667
10725
|
}
|
10668
10726
|
|
10669
10727
|
this._cycleTo(n, callback);
|
10670
10728
|
}
|
10671
10729
|
}], [{
|
10672
10730
|
key: "init",
|
10673
|
-
value: function init(
|
10674
|
-
|
10675
|
-
$els.each(function () {
|
10676
|
-
arr.push(new Carousel(this, options));
|
10677
|
-
});
|
10678
|
-
return arr;
|
10731
|
+
value: function init(els, options) {
|
10732
|
+
return _get(Carousel.__proto__ || Object.getPrototypeOf(Carousel), "init", this).call(this, this, els, options);
|
10679
10733
|
}
|
10680
10734
|
|
10681
10735
|
/**
|
@@ -10696,7 +10750,7 @@ M.throttle = function (func, wait, options) {
|
|
10696
10750
|
}]);
|
10697
10751
|
|
10698
10752
|
return Carousel;
|
10699
|
-
}();
|
10753
|
+
}(Component);
|
10700
10754
|
|
10701
10755
|
M.Carousel = Carousel;
|
10702
10756
|
|
@@ -10707,14 +10761,19 @@ M.throttle = function (func, wait, options) {
|
|
10707
10761
|
;(function ($) {
|
10708
10762
|
'use strict';
|
10709
10763
|
|
10710
|
-
var _defaults = {
|
10764
|
+
var _defaults = {
|
10765
|
+
onOpen: undefined,
|
10766
|
+
onClose: undefined
|
10767
|
+
};
|
10711
10768
|
|
10712
10769
|
/**
|
10713
10770
|
* @class
|
10714
10771
|
*
|
10715
10772
|
*/
|
10716
10773
|
|
10717
|
-
var FeatureDiscovery = function () {
|
10774
|
+
var FeatureDiscovery = function (_Component19) {
|
10775
|
+
_inherits(FeatureDiscovery, _Component19);
|
10776
|
+
|
10718
10777
|
/**
|
10719
10778
|
* Construct FeatureDiscovery instance
|
10720
10779
|
* @constructor
|
@@ -10724,29 +10783,27 @@ M.throttle = function (func, wait, options) {
|
|
10724
10783
|
function FeatureDiscovery(el, options) {
|
10725
10784
|
_classCallCheck(this, FeatureDiscovery);
|
10726
10785
|
|
10727
|
-
|
10728
|
-
if (!!el.M_FeatureDiscovery) {
|
10729
|
-
el.M_FeatureDiscovery.destroy();
|
10730
|
-
}
|
10786
|
+
var _this63 = _possibleConstructorReturn(this, (FeatureDiscovery.__proto__ || Object.getPrototypeOf(FeatureDiscovery)).call(this, FeatureDiscovery, el, options));
|
10731
10787
|
|
10732
|
-
|
10733
|
-
this.$el = $(el);
|
10734
|
-
this.el.M_FeatureDiscovery = this;
|
10788
|
+
_this63.el.M_FeatureDiscovery = _this63;
|
10735
10789
|
|
10736
10790
|
/**
|
10737
10791
|
* Options for the select
|
10738
10792
|
* @member FeatureDiscovery#options
|
10793
|
+
* @prop {Function} onOpen - Callback function called when feature discovery is opened
|
10794
|
+
* @prop {Function} onClose - Callback function called when feature discovery is closed
|
10739
10795
|
*/
|
10740
|
-
|
10796
|
+
_this63.options = $.extend({}, FeatureDiscovery.defaults, options);
|
10741
10797
|
|
10742
|
-
|
10798
|
+
_this63.isOpen = false;
|
10743
10799
|
|
10744
10800
|
// setup
|
10745
|
-
|
10746
|
-
|
10801
|
+
_this63.$origin = $('#' + _this63.$el.attr('data-target'));
|
10802
|
+
_this63._setup();
|
10747
10803
|
|
10748
|
-
|
10749
|
-
|
10804
|
+
_this63._calculatePositioning();
|
10805
|
+
_this63._setupEventHandlers();
|
10806
|
+
return _this63;
|
10750
10807
|
}
|
10751
10808
|
|
10752
10809
|
_createClass(FeatureDiscovery, [{
|
@@ -10989,10 +11046,16 @@ M.throttle = function (func, wait, options) {
|
|
10989
11046
|
return;
|
10990
11047
|
}
|
10991
11048
|
|
11049
|
+
// onOpen callback
|
11050
|
+
if (typeof this.options.onOpen === 'function') {
|
11051
|
+
this.options.onOpen.call(this, this.$origin[0]);
|
11052
|
+
}
|
11053
|
+
|
10992
11054
|
this.isOpen = true;
|
10993
11055
|
this.wrapper.classList.add('open');
|
10994
11056
|
|
10995
11057
|
document.body.addEventListener('click', this._handleDocumentClickBound, true);
|
11058
|
+
document.body.addEventListener('touchend', this._handleDocumentClickBound);
|
10996
11059
|
}
|
10997
11060
|
|
10998
11061
|
/**
|
@@ -11006,19 +11069,21 @@ M.throttle = function (func, wait, options) {
|
|
11006
11069
|
return;
|
11007
11070
|
}
|
11008
11071
|
|
11072
|
+
// onClose callback
|
11073
|
+
if (typeof this.options.onClose === 'function') {
|
11074
|
+
this.options.onClose.call(this, this.$origin[0]);
|
11075
|
+
}
|
11076
|
+
|
11009
11077
|
this.isOpen = false;
|
11010
11078
|
this.wrapper.classList.remove('open');
|
11011
11079
|
|
11012
11080
|
document.body.removeEventListener('click', this._handleDocumentClickBound, true);
|
11081
|
+
document.body.removeEventListener('touchend', this._handleDocumentClickBound);
|
11013
11082
|
}
|
11014
11083
|
}], [{
|
11015
11084
|
key: "init",
|
11016
|
-
value: function init(
|
11017
|
-
|
11018
|
-
$els.each(function () {
|
11019
|
-
arr.push(new FeatureDiscovery(this, options));
|
11020
|
-
});
|
11021
|
-
return arr;
|
11085
|
+
value: function init(els, options) {
|
11086
|
+
return _get(FeatureDiscovery.__proto__ || Object.getPrototypeOf(FeatureDiscovery), "init", this).call(this, this, els, options);
|
11022
11087
|
}
|
11023
11088
|
|
11024
11089
|
/**
|
@@ -11039,7 +11104,7 @@ M.throttle = function (func, wait, options) {
|
|
11039
11104
|
}]);
|
11040
11105
|
|
11041
11106
|
return FeatureDiscovery;
|
11042
|
-
}();
|
11107
|
+
}(Component);
|
11043
11108
|
|
11044
11109
|
M.FeatureDiscovery = FeatureDiscovery;
|
11045
11110
|
|
@@ -11059,7 +11124,9 @@ M.throttle = function (func, wait, options) {
|
|
11059
11124
|
*
|
11060
11125
|
*/
|
11061
11126
|
|
11062
|
-
var Select = function () {
|
11127
|
+
var Select = function (_Component20) {
|
11128
|
+
_inherits(Select, _Component20);
|
11129
|
+
|
11063
11130
|
/**
|
11064
11131
|
* Construct Select instance
|
11065
11132
|
* @constructor
|
@@ -11069,29 +11136,25 @@ M.throttle = function (func, wait, options) {
|
|
11069
11136
|
function Select(el, options) {
|
11070
11137
|
_classCallCheck(this, Select);
|
11071
11138
|
|
11072
|
-
|
11073
|
-
if (!!el.M_Select) {
|
11074
|
-
el.M_Select.destroy();
|
11075
|
-
}
|
11139
|
+
var _this64 = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, Select, el, options));
|
11076
11140
|
|
11077
|
-
|
11078
|
-
this.$el = $(el);
|
11079
|
-
this.el.M_Select = this;
|
11141
|
+
_this64.el.M_Select = _this64;
|
11080
11142
|
|
11081
11143
|
/**
|
11082
11144
|
* Options for the select
|
11083
11145
|
* @member Select#options
|
11084
11146
|
*/
|
11085
|
-
|
11147
|
+
_this64.options = $.extend({}, Select.defaults, options);
|
11086
11148
|
|
11087
|
-
|
11149
|
+
_this64.isMultiple = _this64.$el.prop('multiple');
|
11088
11150
|
|
11089
11151
|
// Setup
|
11090
|
-
|
11091
|
-
|
11092
|
-
|
11152
|
+
_this64._keysSelected = {};
|
11153
|
+
_this64._valueDict = {}; // Maps key to original and generated option element.
|
11154
|
+
_this64._setupDropdown();
|
11093
11155
|
|
11094
|
-
|
11156
|
+
_this64._setupEventHandlers();
|
11157
|
+
return _this64;
|
11095
11158
|
}
|
11096
11159
|
|
11097
11160
|
_createClass(Select, [{
|
@@ -11114,14 +11177,14 @@ M.throttle = function (func, wait, options) {
|
|
11114
11177
|
}, {
|
11115
11178
|
key: "_setupEventHandlers",
|
11116
11179
|
value: function _setupEventHandlers() {
|
11117
|
-
var
|
11180
|
+
var _this65 = this;
|
11118
11181
|
|
11119
11182
|
this._handleSelectChangeBound = this._handleSelectChange.bind(this);
|
11120
11183
|
this._handleOptionClickBound = this._handleOptionClick.bind(this);
|
11121
11184
|
this._handleInputClickBound = this._handleInputClick.bind(this);
|
11122
11185
|
|
11123
11186
|
$(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
|
11124
|
-
el.addEventListener('click',
|
11187
|
+
el.addEventListener('click', _this65._handleOptionClickBound);
|
11125
11188
|
});
|
11126
11189
|
this.el.addEventListener('change', this._handleSelectChangeBound);
|
11127
11190
|
this.input.addEventListener('click', this._handleInputClickBound);
|
@@ -11134,10 +11197,10 @@ M.throttle = function (func, wait, options) {
|
|
11134
11197
|
}, {
|
11135
11198
|
key: "_removeEventHandlers",
|
11136
11199
|
value: function _removeEventHandlers() {
|
11137
|
-
var
|
11200
|
+
var _this66 = this;
|
11138
11201
|
|
11139
11202
|
$(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
|
11140
|
-
el.removeEventListener('click',
|
11203
|
+
el.removeEventListener('click', _this66._handleOptionClickBound);
|
11141
11204
|
});
|
11142
11205
|
this.el.removeEventListener('change', this._handleSelectChangeBound);
|
11143
11206
|
this.input.removeEventListener('click', this._handleInputClickBound);
|
@@ -11170,6 +11233,14 @@ M.throttle = function (func, wait, options) {
|
|
11170
11233
|
var selected = true;
|
11171
11234
|
|
11172
11235
|
if (this.isMultiple) {
|
11236
|
+
// Deselect placeholder option if still selected.
|
11237
|
+
var placeholderOption = $(this.dropdownOptions).find('li.disabled.selected');
|
11238
|
+
if (placeholderOption.length) {
|
11239
|
+
placeholderOption.removeClass('selected');
|
11240
|
+
placeholderOption.find('input[type="checkbox"]').prop('checked', false);
|
11241
|
+
this._toggleEntryFromArray(placeholderOption[0].id);
|
11242
|
+
}
|
11243
|
+
|
11173
11244
|
var checkbox = $(option).find('input[type="checkbox"]');
|
11174
11245
|
checkbox.prop('checked', !checkbox.prop('checked'));
|
11175
11246
|
selected = this._toggleEntryFromArray(key);
|
@@ -11207,10 +11278,9 @@ M.throttle = function (func, wait, options) {
|
|
11207
11278
|
}, {
|
11208
11279
|
key: "_setupDropdown",
|
11209
11280
|
value: function _setupDropdown() {
|
11210
|
-
var
|
11281
|
+
var _this67 = this;
|
11211
11282
|
|
11212
11283
|
this.wrapper = document.createElement('div');
|
11213
|
-
this.wrapper.classList.add();
|
11214
11284
|
$(this.wrapper).addClass('select-wrapper' + ' ' + this.options.classes);
|
11215
11285
|
this.$el.before($(this.wrapper));
|
11216
11286
|
this.wrapper.appendChild(this.el);
|
@@ -11231,21 +11301,21 @@ M.throttle = function (func, wait, options) {
|
|
11231
11301
|
if ($(el).is('option')) {
|
11232
11302
|
// Direct descendant option.
|
11233
11303
|
var optionEl = void 0;
|
11234
|
-
if (
|
11235
|
-
optionEl =
|
11304
|
+
if (_this67.isMultiple) {
|
11305
|
+
optionEl = _this67._appendOptionWithIcon(_this67.$el, el, 'multiple');
|
11236
11306
|
} else {
|
11237
|
-
optionEl =
|
11307
|
+
optionEl = _this67._appendOptionWithIcon(_this67.$el, el);
|
11238
11308
|
}
|
11239
11309
|
|
11240
|
-
|
11310
|
+
_this67._addOptionToValueDict(el, optionEl);
|
11241
11311
|
} else if ($(el).is('optgroup')) {
|
11242
11312
|
// Optgroup.
|
11243
11313
|
var selectOptions = $(el).children('option');
|
11244
|
-
$(
|
11314
|
+
$(_this67.dropdownOptions).append($('<li class="optgroup"><span>' + el.getAttribute('label') + '</span></li>')[0]);
|
11245
11315
|
|
11246
11316
|
selectOptions.each(function (el) {
|
11247
|
-
var optionEl =
|
11248
|
-
|
11317
|
+
var optionEl = _this67._appendOptionWithIcon(_this67.$el, el, 'optgroup-option');
|
11318
|
+
_this67._addOptionToValueDict(el, optionEl);
|
11249
11319
|
});
|
11250
11320
|
}
|
11251
11321
|
});
|
@@ -11276,7 +11346,7 @@ M.throttle = function (func, wait, options) {
|
|
11276
11346
|
if (this.isMultiple) {
|
11277
11347
|
dropdownOptions.closeOnClick = false;
|
11278
11348
|
}
|
11279
|
-
this.dropdown =
|
11349
|
+
this.dropdown = M.Dropdown.init(this.input, dropdownOptions);
|
11280
11350
|
}
|
11281
11351
|
|
11282
11352
|
// Add initial selections
|
@@ -11458,14 +11528,8 @@ M.throttle = function (func, wait, options) {
|
|
11458
11528
|
}
|
11459
11529
|
}], [{
|
11460
11530
|
key: "init",
|
11461
|
-
value: function init(
|
11462
|
-
|
11463
|
-
$els.each(function () {
|
11464
|
-
if (!$(this).hasClass('browser-default')) {
|
11465
|
-
arr.push(new Select(this, options));
|
11466
|
-
}
|
11467
|
-
});
|
11468
|
-
return arr;
|
11531
|
+
value: function init(els, options) {
|
11532
|
+
return _get(Select.__proto__ || Object.getPrototypeOf(Select), "init", this).call(this, this, els, options);
|
11469
11533
|
}
|
11470
11534
|
|
11471
11535
|
/**
|
@@ -11486,7 +11550,7 @@ M.throttle = function (func, wait, options) {
|
|
11486
11550
|
}]);
|
11487
11551
|
|
11488
11552
|
return Select;
|
11489
|
-
}();
|
11553
|
+
}(Component);
|
11490
11554
|
|
11491
11555
|
M.Select = Select;
|
11492
11556
|
|
@@ -11504,7 +11568,9 @@ M.throttle = function (func, wait, options) {
|
|
11504
11568
|
*
|
11505
11569
|
*/
|
11506
11570
|
|
11507
|
-
var Range = function () {
|
11571
|
+
var Range = function (_Component21) {
|
11572
|
+
_inherits(Range, _Component21);
|
11573
|
+
|
11508
11574
|
/**
|
11509
11575
|
* Construct Range instance
|
11510
11576
|
* @constructor
|
@@ -11514,27 +11580,23 @@ M.throttle = function (func, wait, options) {
|
|
11514
11580
|
function Range(el, options) {
|
11515
11581
|
_classCallCheck(this, Range);
|
11516
11582
|
|
11517
|
-
|
11518
|
-
if (!!el.M_Range) {
|
11519
|
-
el.M_Range.destroy();
|
11520
|
-
}
|
11583
|
+
var _this68 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, Range, el, options));
|
11521
11584
|
|
11522
|
-
|
11523
|
-
this.$el = $(el);
|
11524
|
-
this.el.M_Range = this;
|
11585
|
+
_this68.el.M_Range = _this68;
|
11525
11586
|
|
11526
11587
|
/**
|
11527
11588
|
* Options for the range
|
11528
11589
|
* @member Range#options
|
11529
11590
|
*/
|
11530
|
-
|
11591
|
+
_this68.options = $.extend({}, Range.defaults, options);
|
11531
11592
|
|
11532
|
-
|
11593
|
+
_this68._mousedown = false;
|
11533
11594
|
|
11534
11595
|
// Setup
|
11535
|
-
|
11596
|
+
_this68._setupThumb();
|
11536
11597
|
|
11537
|
-
|
11598
|
+
_this68._setupEventHandlers();
|
11599
|
+
return _this68;
|
11538
11600
|
}
|
11539
11601
|
|
11540
11602
|
_createClass(Range, [{
|
@@ -11781,14 +11843,8 @@ M.throttle = function (func, wait, options) {
|
|
11781
11843
|
}
|
11782
11844
|
}], [{
|
11783
11845
|
key: "init",
|
11784
|
-
value: function init(
|
11785
|
-
|
11786
|
-
$els.each(function () {
|
11787
|
-
if (!$(this).hasClass('browser-default')) {
|
11788
|
-
arr.push(new Range(this, options));
|
11789
|
-
}
|
11790
|
-
});
|
11791
|
-
return arr;
|
11846
|
+
value: function init(els, options) {
|
11847
|
+
return _get(Range.__proto__ || Object.getPrototypeOf(Range), "init", this).call(this, this, els, options);
|
11792
11848
|
}
|
11793
11849
|
|
11794
11850
|
/**
|
@@ -11809,7 +11865,7 @@ M.throttle = function (func, wait, options) {
|
|
11809
11865
|
}]);
|
11810
11866
|
|
11811
11867
|
return Range;
|
11812
|
-
}();
|
11868
|
+
}(Component);
|
11813
11869
|
|
11814
11870
|
M.Range = Range;
|
11815
11871
|
|
@@ -11818,4 +11874,4 @@ M.throttle = function (func, wait, options) {
|
|
11818
11874
|
}
|
11819
11875
|
|
11820
11876
|
Range.init($('input[type=range]'));
|
11821
|
-
})(cash, anime);
|
11877
|
+
})(cash, M.anime);
|