lanimate 1.2.1 → 1.2.3

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.
package/_build/script.js CHANGED
@@ -1,203 +1,141 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
-
14
8
  var _hlp = _interopRequireDefault(require("hlp"));
15
-
16
- var Lanimate = /*#__PURE__*/function () {
17
- function Lanimate() {
18
- (0, _classCallCheck2.default)(this, Lanimate);
9
+ class Lanimate {
10
+ init() {
11
+ if (_hlp.default.isMobile()) {
12
+ // restore fouc prevention
13
+ document.head.insertAdjacentHTML('beforeend', '<style class="lanimate-styles-restore">[data-lanimate] { opacity: 1; }</style>');
14
+ return;
15
+ }
16
+ _hlp.default.ready().then(() => {
17
+ this.ready();
18
+ });
19
+ _hlp.default.load().then(() => {
20
+ this.load();
21
+ });
19
22
  }
20
-
21
- (0, _createClass2.default)(Lanimate, [{
22
- key: "init",
23
- value: function init() {
24
- var _this = this;
25
-
26
- document.head.insertAdjacentHTML('beforeend', '<style class="lanimate-styles-restore">[data-lanimate] { opacity: 0; }</style>');
27
-
28
- if (_hlp.default.isMobile()) {
29
- document.head.insertAdjacentHTML('beforeend', '<style class="lanimate-styles-restore">[data-lanimate] { opacity: 1; }</style>');
23
+ ready() {
24
+ this.addBasicStyles();
25
+ }
26
+ load() {
27
+ this.addExtendedStyles();
28
+ _hlp.default.runForEl('[data-lanimate]', $el => {
29
+ if ($el.parentNode.closest('[data-lanimate]') !== null) {
30
30
  return;
31
31
  }
32
-
33
- _hlp.default.ready().then(function () {
34
- _this.ready();
35
- });
36
-
37
- _hlp.default.load().then(function () {
38
- _this.load();
39
- });
40
- }
41
- }, {
42
- key: "ready",
43
- value: function ready() {
44
- this.addBasicStyles();
45
- }
46
- }, {
47
- key: "load",
48
- value: function load() {
49
- var _this2 = this;
50
-
51
- this.addExtendedStyles();
52
-
53
- _hlp.default.runForEl('[data-lanimate]', function ($el) {
54
- if ($el.parentNode.closest('[data-lanimate]') !== null) {
55
- return;
32
+ if ($el.hasAttribute('data-lanimate-split') && $el.getAttribute('data-lanimate-split') !== 'none') {
33
+ $el.setAttribute('data-aria-label', $el.innerText.replace(/(?:\r\n|\r|\n)/g, ' '));
34
+ $el.innerHTML = $el.innerHTML.trim().replace(/ {2,}/g, '').split(' ').join('&nbsp;');
35
+ let shift = 0;
36
+ if ($el.getAttribute('data-lanimate-split') === 'char') {
37
+ this.traverseAllTextNodes($el, $text => {
38
+ return '%span data-word data-word-nowrap%' + $text.split(' ').map($text__value => {
39
+ return '%span data-char%' + $text__value.split('').join('%/span%%span data-char%') + '%/span%';
40
+ }).join('%/span% %span data-word data-word-nowrap%') + '%/span%';
41
+ });
42
+ $el.innerHTML = $el.innerHTML.split('%span data-word data-word-nowrap%').join('<span data-word data-word-nowrap>').split('%span data-char%').join('<span data-char>').split('%/span%').join('</span>');
43
+ shift = 50;
56
44
  }
57
-
58
- if ($el.hasAttribute('data-lanimate-split') && $el.getAttribute('data-lanimate-split') !== 'none') {
59
- $el.setAttribute('data-aria-label', $el.innerText.replace(/(?:\r\n|\r|\n)/g, ' '));
60
- $el.innerHTML = $el.innerHTML.trim().replace(/ {2,}/g, '').split(' ').join('&nbsp;');
61
- var shift = 0;
62
-
63
- if ($el.getAttribute('data-lanimate-split') === 'char') {
64
- _this2.traverseAllTextNodes($el, function ($text) {
65
- return '%span data-word data-word-nowrap%' + $text.split(' ').map(function ($text__value) {
66
- return '%span data-char%' + $text__value.split('').join('%/span%%span data-char%') + '%/span%';
67
- }).join('%/span% %span data-word data-word-nowrap%') + '%/span%';
68
- });
69
-
70
- $el.innerHTML = $el.innerHTML.split('%span data-word data-word-nowrap%').join('<span data-word data-word-nowrap>').split('%span data-char%').join('<span data-char>').split('%/span%').join('</span>');
71
- shift = 50;
45
+ if ($el.getAttribute('data-lanimate-split') === 'word') {
46
+ this.traverseAllTextNodes($el, $text => {
47
+ return '%span data-word%' + $text.split(' ').join('%/span% %span data-word%') + '%/span%';
48
+ });
49
+ $el.innerHTML = $el.innerHTML.split('%span data-word%').join('<span data-word>').split('%/span%').join('</span>');
50
+ shift = 250;
51
+ }
52
+ if ($el.hasAttribute('data-lanimate-speed')) {
53
+ shift = shift * parseInt($el.getAttribute('data-lanimate-speed')) / 1000;
54
+ }
55
+ let index = 0;
56
+ $el.querySelectorAll('span').forEach($el2 => {
57
+ if ($el2.innerText.trim() == '') {
58
+ return;
72
59
  }
73
-
74
- if ($el.getAttribute('data-lanimate-split') === 'word') {
75
- _this2.traverseAllTextNodes($el, function ($text) {
76
- return '%span data-word%' + $text.split(' ').join('%/span% %span data-word%') + '%/span%';
77
- });
78
-
79
- $el.innerHTML = $el.innerHTML.split('%span data-word%').join('<span data-word>').split('%/span%').join('</span>');
80
- shift = 250;
60
+ if ($el2.querySelector('[data-char]') !== null) {
61
+ return;
62
+ }
63
+ let delay = 0;
64
+ if ($el.hasAttribute('data-lanimate-delay')) {
65
+ delay = parseInt($el.getAttribute('data-lanimate-delay'));
81
66
  }
82
-
83
67
  if ($el.hasAttribute('data-lanimate-speed')) {
84
- shift = shift * parseInt($el.getAttribute('data-lanimate-speed')) / 1000;
68
+ $el2.setAttribute('data-lanimate-speed', $el.getAttribute('data-lanimate-speed'));
85
69
  }
86
-
87
- var index = 0;
88
- $el.querySelectorAll('span').forEach(function ($el2) {
89
- if ($el2.innerText.trim() == '') {
90
- return;
91
- }
92
-
93
- if ($el2.querySelector('[data-char]') !== null) {
94
- return;
95
- }
96
-
97
- var delay = 0;
98
-
99
- if ($el.hasAttribute('data-lanimate-delay')) {
100
- delay = parseInt($el.getAttribute('data-lanimate-delay'));
101
- }
102
-
103
- if ($el.hasAttribute('data-lanimate-speed')) {
104
- $el2.setAttribute('data-lanimate-speed', $el.getAttribute('data-lanimate-speed'));
105
- }
106
-
107
- $el2.setAttribute('data-lanimate-delay', delay + shift * index);
108
- $el2.setAttribute('data-lanimate', $el.getAttribute('data-lanimate'));
109
- index++;
110
-
111
- _this2.prepareAndBindStart($el2);
112
- });
113
- $el.removeAttribute('data-lanimate');
114
- $el.removeAttribute('data-lanimate-delay');
115
- $el.removeAttribute('data-lanimate-speed');
116
- } else {
117
- _this2.prepareAndBindStart($el);
118
- }
119
- });
120
- }
121
- }, {
122
- key: "prepareAndBindStart",
123
- value: function prepareAndBindStart($el) {
124
- var _this3 = this;
125
-
126
- if ($el.hasAttribute('data-lanimate-speed')) {
127
- var speed = parseInt($el.getAttribute('data-lanimate-speed')) / 1000;
128
- setTimeout(function () {
129
- $el.style.transitionDuration = speed + 's, ' + speed + 's';
130
- }, 10);
70
+ $el2.setAttribute('data-lanimate-delay', delay + shift * index);
71
+ $el2.setAttribute('data-lanimate', $el.getAttribute('data-lanimate'));
72
+ index++;
73
+ this.prepareAndBindStart($el2);
74
+ });
75
+ $el.removeAttribute('data-lanimate');
76
+ $el.removeAttribute('data-lanimate-delay');
77
+ $el.removeAttribute('data-lanimate-speed');
78
+ } else {
79
+ this.prepareAndBindStart($el);
131
80
  }
132
-
133
- this.start($el);
134
- window.addEventListener('scroll', function () {
135
- _this3.start($el);
136
- }); // fallback for edge cases (animated elements etc.)
137
-
138
- setInterval(function () {
139
- _this3.start($el);
140
- }, 500);
81
+ });
82
+ }
83
+ prepareAndBindStart($el) {
84
+ if ($el.hasAttribute('data-lanimate-speed')) {
85
+ let speed = parseInt($el.getAttribute('data-lanimate-speed')) / 1000;
86
+ setTimeout(() => {
87
+ $el.style.transitionDuration = speed + 's, ' + speed + 's';
88
+ }, 10);
141
89
  }
142
- }, {
143
- key: "start",
144
- value: function start($el) {
145
- if ($el.lanimateIsStarted !== true && this.scrollTop() + window.innerHeight >= this.offsetTop($el)) {
146
- $el.lanimateIsStarted = true;
147
- var delay = 0;
148
-
149
- if ($el.hasAttribute('data-lanimate-delay')) {
150
- delay = parseInt($el.getAttribute('data-lanimate-delay'));
151
- }
152
-
153
- setTimeout(function () {
154
- $el.setAttribute('data-lanimate-started', 'true');
155
- }, delay);
90
+ this.start($el);
91
+ window.addEventListener('scroll', () => {
92
+ this.start($el);
93
+ });
94
+ // fallback for edge cases (animated elements etc.)
95
+ setInterval(() => {
96
+ this.start($el);
97
+ }, 500);
98
+ }
99
+ start($el) {
100
+ if ($el.lanimateIsStarted !== true && this.scrollTop() + window.innerHeight >= this.offsetTop($el)) {
101
+ $el.lanimateIsStarted = true;
102
+ let delay = 0;
103
+ if ($el.hasAttribute('data-lanimate-delay')) {
104
+ delay = parseInt($el.getAttribute('data-lanimate-delay'));
156
105
  }
106
+ setTimeout(() => {
107
+ $el.setAttribute('data-lanimate-started', 'true');
108
+ }, delay);
157
109
  }
158
- }, {
159
- key: "scrollTop",
160
- value: function scrollTop() {
161
- var doc = document.documentElement;
162
- return (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
163
- }
164
- }, {
165
- key: "offsetTop",
166
- value: function offsetTop($el) {
167
- return $el.getBoundingClientRect().top + window.pageYOffset - document.documentElement.clientTop;
168
- }
169
- }, {
170
- key: "addBasicStyles",
171
- value: function addBasicStyles() {
172
- if (document.head.querySelector('.lanimate-styles-basic') === null) {
173
- document.head.insertAdjacentHTML('beforeend', "\n <style class=\"lanimate-styles-basic\">\n [data-lanimate] {\n opacity: 0;\n }\n </style>\n ");
174
- }
110
+ }
111
+ scrollTop() {
112
+ let doc = document.documentElement;
113
+ return (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
114
+ }
115
+ offsetTop($el) {
116
+ return $el.getBoundingClientRect().top + window.pageYOffset - document.documentElement.clientTop;
117
+ }
118
+ addBasicStyles() {
119
+ if (document.head.querySelector('.lanimate-styles-basic') === null) {
120
+ document.head.insertAdjacentHTML('beforeend', "\n <style class=\"lanimate-styles-basic\">\n [data-lanimate] {\n opacity: 0;\n }\n </style>\n ");
175
121
  }
176
- }, {
177
- key: "addExtendedStyles",
178
- value: function addExtendedStyles() {
179
- if (document.head.querySelector('.lanimate-styles-extended') === null) {
180
- document.head.insertAdjacentHTML('beforeend', "\n <style class=\"lanimate-styles-extended\">\n [data-lanimate='fade'] {\n }\n [data-lanimate='scrollX'] {\n transform: translateX(50px);\n }\n [data-lanimate='scrollY'] {\n transform: translateY(50px);\n }\n [data-lanimate='scale'] {\n transform: scale(1.1) translateY(50px);\n }\n [data-lanimate='rotate'] {\n transform: rotate(15deg) translateY(50px);\n transform-origin: 0 0;\n }\n [data-lanimate='rotate3d'] {\n transform: rotateX(80deg) rotateY(45deg);\n transform-style: preserve-3d;\n }\n [data-lanimate='skew'] {\n transform: skew(70deg, 10deg);\n }\n [data-lanimate-started] {\n transition: opacity 1s ease-in-out, transform 1s ease-in-out;\n opacity: 1;\n }\n [data-lanimate-split] [data-lanimate] {\n display:inline-block;\n }\n [data-lanimate-split] [data-word-nowrap] {\n white-space:nowrap;\n }\n [data-lanimate='fade'][data-lanimate-started] {\n }\n [data-lanimate='scrollX'][data-lanimate-started] {\n transform: translateX(0px);\n }\n [data-lanimate='scrollY'][data-lanimate-started] {\n transform: translateY(0px);\n }\n [data-lanimate='scale'][data-lanimate-started] {\n transform: scale(1) translateY(0px);\n }\n [data-lanimate='rotate'][data-lanimate-started] {\n transform: rotate(0deg) translateY(0px);\n }\n [data-lanimate='rotate3d'][data-lanimate-started] {\n transform: rotateX(0deg) rotateY(0deg);\n }\n [data-lanimate='skew'][data-lanimate-started] {\n transform: skew(0deg, 0deg);\n }\n </style>\n ");
181
- }
122
+ }
123
+ addExtendedStyles() {
124
+ if (document.head.querySelector('.lanimate-styles-extended') === null) {
125
+ document.head.insertAdjacentHTML('beforeend', "\n <style class=\"lanimate-styles-extended\">\n [data-lanimate='fade'] {\n }\n [data-lanimate='scrollX'] {\n transform: translateX(50px);\n }\n [data-lanimate='scrollY'] {\n transform: translateY(50px);\n }\n [data-lanimate='scale'] {\n transform: scale(1.1) translateY(50px);\n }\n [data-lanimate='rotate'] {\n transform: rotate(15deg) translateY(50px);\n transform-origin: 0 0;\n }\n [data-lanimate='rotate3d'] {\n transform: rotateX(80deg) rotateY(45deg);\n transform-style: preserve-3d;\n }\n [data-lanimate='skew'] {\n transform: skew(70deg, 10deg);\n }\n [data-lanimate-started] {\n transition: opacity 1s ease-in-out, transform 1s ease-in-out;\n opacity: 1;\n }\n [data-lanimate-split] [data-lanimate] {\n display:inline-block;\n }\n [data-lanimate-split] [data-word-nowrap] {\n white-space:nowrap;\n }\n [data-lanimate='fade'][data-lanimate-started] {\n }\n [data-lanimate='scrollX'][data-lanimate-started] {\n transform: translateX(0px);\n }\n [data-lanimate='scrollY'][data-lanimate-started] {\n transform: translateY(0px);\n }\n [data-lanimate='scale'][data-lanimate-started] {\n transform: scale(1) translateY(0px);\n }\n [data-lanimate='rotate'][data-lanimate-started] {\n transform: rotate(0deg) translateY(0px);\n }\n [data-lanimate='rotate3d'][data-lanimate-started] {\n transform: rotateX(0deg) rotateY(0deg);\n }\n [data-lanimate='skew'][data-lanimate-started] {\n transform: skew(0deg, 0deg);\n }\n @media print {\n [data-lanimate] { opacity: 1 !important; }\n } \n </style>\n ");
182
126
  }
183
- }, {
184
- key: "traverseAllTextNodes",
185
- value: function traverseAllTextNodes($el, $fn) {
186
- var _this4 = this;
187
-
188
- if ($el.childNodes.length > 0) {
189
- $el.childNodes.forEach(function ($el2) {
190
- if ($el2.nodeType === 3) {
191
- $el2.textContent = $fn($el2.textContent);
192
- } else {
193
- _this4.traverseAllTextNodes($el2, $fn);
194
- }
195
- });
196
- }
127
+ }
128
+ traverseAllTextNodes($el, $fn) {
129
+ if ($el.childNodes.length > 0) {
130
+ $el.childNodes.forEach($el2 => {
131
+ if ($el2.nodeType === 3) {
132
+ $el2.textContent = $fn($el2.textContent);
133
+ } else {
134
+ this.traverseAllTextNodes($el2, $fn);
135
+ }
136
+ });
197
137
  }
198
- }]);
199
- return Lanimate;
200
- }();
201
-
138
+ }
139
+ }
202
140
  exports.default = Lanimate;
203
141
  window.Lanimate = Lanimate;
package/lanimate.min.js CHANGED
@@ -1 +1 @@
1
- !function e(t,n,r){function a(i,l){if(!n[i]){if(!t[i]){var u="function"==typeof require&&require;if(!l&&u)return u(i,!0);if(o)return o(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return a(t[i][1][e]||e)}),c,c.exports,e,t,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i<r.length;i++)a(r[i]);return a}({1:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(e("@babel/runtime/helpers/classCallCheck")),o=r(e("@babel/runtime/helpers/createClass")),i=r(e("hlp")),l=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,[{key:"init",value:function(){var e=this;document.head.insertAdjacentHTML("beforeend",'<style class="lanimate-styles-restore">[data-lanimate] { opacity: 0; }</style>'),i.default.isMobile()?document.head.insertAdjacentHTML("beforeend",'<style class="lanimate-styles-restore">[data-lanimate] { opacity: 1; }</style>'):(i.default.ready().then((function(){e.ready()})),i.default.load().then((function(){e.load()})))}},{key:"ready",value:function(){this.addBasicStyles()}},{key:"load",value:function(){var e=this;this.addExtendedStyles(),i.default.runForEl("[data-lanimate]",(function(t){if(null===t.parentNode.closest("[data-lanimate]"))if(t.hasAttribute("data-lanimate-split")&&"none"!==t.getAttribute("data-lanimate-split")){t.setAttribute("data-aria-label",t.innerText.replace(/(?:\r\n|\r|\n)/g," ")),t.innerHTML=t.innerHTML.trim().replace(/ {2,}/g,"").split(" ").join("&nbsp;");var n=0;"char"===t.getAttribute("data-lanimate-split")&&(e.traverseAllTextNodes(t,(function(e){return"%span data-word data-word-nowrap%"+e.split(" ").map((function(e){return"%span data-char%"+e.split("").join("%/span%%span data-char%")+"%/span%"})).join("%/span% %span data-word data-word-nowrap%")+"%/span%"})),t.innerHTML=t.innerHTML.split("%span data-word data-word-nowrap%").join("<span data-word data-word-nowrap>").split("%span data-char%").join("<span data-char>").split("%/span%").join("</span>"),n=50),"word"===t.getAttribute("data-lanimate-split")&&(e.traverseAllTextNodes(t,(function(e){return"%span data-word%"+e.split(" ").join("%/span% %span data-word%")+"%/span%"})),t.innerHTML=t.innerHTML.split("%span data-word%").join("<span data-word>").split("%/span%").join("</span>"),n=250),t.hasAttribute("data-lanimate-speed")&&(n=n*parseInt(t.getAttribute("data-lanimate-speed"))/1e3);var r=0;t.querySelectorAll("span").forEach((function(a){if(""!=a.innerText.trim()&&null===a.querySelector("[data-char]")){var o=0;t.hasAttribute("data-lanimate-delay")&&(o=parseInt(t.getAttribute("data-lanimate-delay"))),t.hasAttribute("data-lanimate-speed")&&a.setAttribute("data-lanimate-speed",t.getAttribute("data-lanimate-speed")),a.setAttribute("data-lanimate-delay",o+n*r),a.setAttribute("data-lanimate",t.getAttribute("data-lanimate")),r++,e.prepareAndBindStart(a)}})),t.removeAttribute("data-lanimate"),t.removeAttribute("data-lanimate-delay"),t.removeAttribute("data-lanimate-speed")}else e.prepareAndBindStart(t)}))}},{key:"prepareAndBindStart",value:function(e){var t=this;if(e.hasAttribute("data-lanimate-speed")){var n=parseInt(e.getAttribute("data-lanimate-speed"))/1e3;setTimeout((function(){e.style.transitionDuration=n+"s, "+n+"s"}),10)}this.start(e),window.addEventListener("scroll",(function(){t.start(e)})),setInterval((function(){t.start(e)}),500)}},{key:"start",value:function(e){if(!0!==e.lanimateIsStarted&&this.scrollTop()+window.innerHeight>=this.offsetTop(e)){e.lanimateIsStarted=!0;var t=0;e.hasAttribute("data-lanimate-delay")&&(t=parseInt(e.getAttribute("data-lanimate-delay"))),setTimeout((function(){e.setAttribute("data-lanimate-started","true")}),t)}}},{key:"scrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"offsetTop",value:function(e){return e.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop}},{key:"addBasicStyles",value:function(){null===document.head.querySelector(".lanimate-styles-basic")&&document.head.insertAdjacentHTML("beforeend",'\n <style class="lanimate-styles-basic">\n [data-lanimate] {\n opacity: 0;\n }\n </style>\n ')}},{key:"addExtendedStyles",value:function(){null===document.head.querySelector(".lanimate-styles-extended")&&document.head.insertAdjacentHTML("beforeend","\n <style class=\"lanimate-styles-extended\">\n [data-lanimate='fade'] {\n }\n [data-lanimate='scrollX'] {\n transform: translateX(50px);\n }\n [data-lanimate='scrollY'] {\n transform: translateY(50px);\n }\n [data-lanimate='scale'] {\n transform: scale(1.1) translateY(50px);\n }\n [data-lanimate='rotate'] {\n transform: rotate(15deg) translateY(50px);\n transform-origin: 0 0;\n }\n [data-lanimate='rotate3d'] {\n transform: rotateX(80deg) rotateY(45deg);\n transform-style: preserve-3d;\n }\n [data-lanimate='skew'] {\n transform: skew(70deg, 10deg);\n }\n [data-lanimate-started] {\n transition: opacity 1s ease-in-out, transform 1s ease-in-out;\n opacity: 1;\n }\n [data-lanimate-split] [data-lanimate] {\n display:inline-block;\n }\n [data-lanimate-split] [data-word-nowrap] {\n white-space:nowrap;\n }\n [data-lanimate='fade'][data-lanimate-started] {\n }\n [data-lanimate='scrollX'][data-lanimate-started] {\n transform: translateX(0px);\n }\n [data-lanimate='scrollY'][data-lanimate-started] {\n transform: translateY(0px);\n }\n [data-lanimate='scale'][data-lanimate-started] {\n transform: scale(1) translateY(0px);\n }\n [data-lanimate='rotate'][data-lanimate-started] {\n transform: rotate(0deg) translateY(0px);\n }\n [data-lanimate='rotate3d'][data-lanimate-started] {\n transform: rotateX(0deg) rotateY(0deg);\n }\n [data-lanimate='skew'][data-lanimate-started] {\n transform: skew(0deg, 0deg);\n }\n </style>\n ")}},{key:"traverseAllTextNodes",value:function(e,t){var n=this;e.childNodes.length>0&&e.childNodes.forEach((function(e){3===e.nodeType?e.textContent=t(e.textContent):n.traverseAllTextNodes(e,t)}))}}]),e}();n.default=l,window.Lanimate=l},{"@babel/runtime/helpers/classCallCheck":6,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/interopRequireDefault":9,hlp:19}],2:[function(e,t,n){t.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},{}],3:[function(e,t,n){t.exports=function(e){if(Array.isArray(e))return e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],4:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e){if(Array.isArray(e))return r(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":2}],5:[function(e,t,n){function r(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}t.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,o){var i=e.apply(t,n);function l(e){r(i,a,o,l,u,"next",e)}function u(e){r(i,a,o,l,u,"throw",e)}l(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],6:[function(e,t,n){t.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],7:[function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],8:[function(e,t,n){t.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],9:[function(e,t,n){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],10:[function(e,t,n){t.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{}],11:[function(e,t,n){t.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],12:[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],13:[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],14:[function(e,t,n){var r=e("./arrayWithHoles.js"),a=e("./iterableToArrayLimit.js"),o=e("./unsupportedIterableToArray.js"),i=e("./nonIterableRest.js");t.exports=function(e,t){return r(e)||a(e,t)||o(e,t)||i()},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithHoles.js":3,"./iterableToArrayLimit.js":11,"./nonIterableRest.js":12,"./unsupportedIterableToArray.js":17}],15:[function(e,t,n){var r=e("./arrayWithoutHoles.js"),a=e("./iterableToArray.js"),o=e("./unsupportedIterableToArray.js"),i=e("./nonIterableSpread.js");t.exports=function(e){return r(e)||a(e)||o(e)||i()},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithoutHoles.js":4,"./iterableToArray.js":10,"./nonIterableSpread.js":13,"./unsupportedIterableToArray.js":17}],16:[function(e,t,n){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],17:[function(e,t,n){var r=e("./arrayLikeToArray.js");t.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":2}],18:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":20}],19:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(e("@babel/runtime/regenerator")),o=r(e("@babel/runtime/helpers/asyncToGenerator")),i=r(e("@babel/runtime/helpers/defineProperty")),l=r(e("@babel/runtime/helpers/toConsumableArray")),u=r(e("@babel/runtime/helpers/slicedToArray")),s=r(e("@babel/runtime/helpers/typeof")),c=r(e("@babel/runtime/helpers/classCallCheck")),d=r(e("@babel/runtime/helpers/createClass"));function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=function(){function e(){(0,c.default)(this,e)}var n;return(0,d.default)(e,null,[{key:"x",value:function(e){if("function"==typeof e)try{return e=e(),this.x(e)}catch(e){return!1}return!(null===e||!1===e||"string"==typeof e&&""==e.trim()||"object"===(0,s.default)(e)&&0===Object.keys(e).length&&e.constructor===Object||void 0===e||Array.isArray(e)&&0===e.length||Array.isArray(e)&&1===e.length&&""===e[0])}},{key:"nx",value:function(e){return!this.x(e)}},{key:"true",value:function(t){if("function"==typeof t)try{return t=t(),this.true(t)}catch(e){return!1}return void 0!==t&&(null!==t&&(!1!==t&&((!Array.isArray(t)||0!==t.length)&&((!Array.isArray(t)||""!==e.first(t))&&(("object"!==(0,s.default)(t)||0!==Object.keys(t).length||t.constructor!==Object)&&(0!==t&&("0"!==t&&(""!==t&&(" "!==t&&("null"!==t&&"false"!==t))))))))))}},{key:"false",value:function(t){if("function"==typeof t)try{return t=t(),this.false(t)}catch(e){return!1}return void 0!==t&&(null!==t&&(!1===t||(!Array.isArray(t)||0!==t.length)&&((!Array.isArray(t)||""!==e.first(t))&&(("object"!==(0,s.default)(t)||0!==Object.keys(t).length||t.constructor!==Object)&&(0===t||("0"===t||""!==t&&(" "!==t&&("null"!==t&&"false"===t))))))))}},{key:"v",value:function(){if(this.nx(arguments))return"";for(var e=0;e<arguments.length;e++)if(this.x(arguments[e]))return arguments[e];return""}},{key:"loop",value:function(e,t){if(this.nx(e))return null;Array.isArray(e)?e.forEach((function(e,n){t(e,n)})):"object"===(0,s.default)(e)&&Object.entries(e).forEach((function(e){var n=(0,u.default)(e,2),r=n[0],a=n[1];t(a,r)}))}},{key:"map",value:function(e,t,n){return Object.keys(e).reduce((function(r,a){return r[a]=t.call(n||null,a,e[a]),r}),{})}},{key:"first",value:function(e){if(Array.isArray(e)){var t=null;return e.forEach((function(e,n){null===t&&(t=e)})),t}if("object"===(0,s.default)(e)){t=null;return Object.entries(e).forEach((function(e){var n=(0,u.default)(e,2),r=(n[0],n[1]);null===t&&(t=r)})),t}return null}},{key:"last",value:function(e){if(Array.isArray(e)){var t=null;return e.forEach((function(e,n){t=e})),t}if("object"===(0,s.default)(e)){var n=null;return Object.entries(e).forEach((function(e){var t=(0,u.default)(e,2),r=(t[0],t[1]);n=r})),n}return null}},{key:"rand",value:function(e){return Array.isArray(e)?e[Math.floor(Math.random()*e.length)]:"object"===(0,s.default)(e)?(e=Object.values(e))[Math.floor(Math.random()*e.length)]:null}},{key:"random_string",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===t&&(t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");for(var n=t.length,r="",a=0;a<e;a++)r+=t[0+~~(Math.random()*(n-1-0+1))];return r}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(Math.round(e+"e"+t)+"e-"+t)}},{key:"isInteger",value:function(e){return!isNaN(e)&&parseInt(Number(e))==e&&!isNaN(parseInt(e,10))}},{key:"random_int",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:99999;if(!this.isInteger(e)||!this.isInteger(t))return!1;if(e>t){var n=[t,e];e=n[0],t=n[1]}return~~(Math.random()*(t-e+1))+e}},{key:"capitalize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===e||""===e?e:e.charAt(0).toUpperCase()+e.slice(1)}},{key:"cookieExists",value:function(e){return void 0!==document.cookie&&null!==this.cookieGet(e)}},{key:"cookieGet",value:function(e){var t=document.cookie.match(new RegExp(e+"=([^;]+)"));return t?decodeURIComponent(t[1]):null}},{key:"cookieSet",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a="";window.location.protocol.indexOf("https")>-1&&(a="; SameSite=None; Secure"),document.cookie=e+"="+encodeURIComponent(t)+"; expires="+new Date((new Date).getTime()+24*n*60*60*1e3).toUTCString()+"; path=/"+a+"; domain="+(!0===r?this.urlHostTopLevel():"")}},{key:"cookieDelete",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";window.location.protocol.indexOf("https")>-1&&(n="; SameSite=None; Secure"),document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"+n+"; domain="+(!0===t?this.urlHostTopLevel():"")}},{key:"getParam",value:function(e){var t=window.location.search;if(this.nx(t))return null;for(var n=t.substring(1).split("&"),r=0;r<n.length;r++){var a=n[r].split("=");if(a[0]==e&&this.x(a[1]))return a[1]}return null}},{key:"getDevice",value:function(){return this.isPhone()?"phone":this.isTablet()?"tablet":"desktop"}},{key:"isPhone",value:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}},{key:"isTablet",value:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}},{key:"isDesktop",value:function(){return!this.isPhone()&&!this.isTablet()}},{key:"isMobile",value:function(){return!!(window.innerWidth<750||this.isPhone())}},{key:"isTouch",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints||!1}},{key:"isMac",value:function(){return"mac"===e.getOs()}},{key:"isLinux",value:function(){return"linux"===e.getOs()}},{key:"isWindows",value:function(){return"windows"===e.getOs()}},{key:"getOs",value:function(){var e=window.navigator.userAgent,t=window.navigator.platform,n="unknown";return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)||-1!==["iPhone","iPad","iPod"].indexOf(t)?n="mac":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="windows":(/Android/.test(e)||/Linux/.test(t))&&(n="linux"),n}},{key:"getBrowser",value:function(){var e=!!!document.documentMode&&!!window.StyleMedia;return-1!=navigator.userAgent.indexOf("Opera")||-1!=navigator.userAgent.indexOf("OPR")?"opera":-1==navigator.userAgent.indexOf("Chrome")||e?-1==navigator.userAgent.indexOf("Safari")||e?-1!=navigator.userAgent.indexOf("Firefox")?"firefox":-1!=navigator.userAgent.indexOf("MSIE")||1==!!document.documentMode?"ie":e?"edge":"unknown":"safari":"chrome"}},{key:"isObject",value:function(e){return!!e&&e.constructor===Object}},{key:"isArray",value:function(e){return!!e&&e.constructor===Array}},{key:"isString",value:function(e){return"string"==typeof e||e instanceof String}},{key:"isDate",value:function(e){if(this.nx(e))return!1;if("[object Date]"===Object.prototype.toString.call(e))return!0;if(!this.isString(e))return!1;if(3!==e.split("-").length)return!1;var t=parseInt(e.split("-")[2]),n=parseInt(e.split("-")[1]),r=parseInt(e.split("-")[0]),a=new Date;return a.setFullYear(r,n-1,t),a.getFullYear()==r&&a.getMonth()+1==n&&a.getDate()==t}},{key:"formatDate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!1===t||!0===t||null===t||""===t?t=new Date:"object"!==(0,s.default)(t)&&(t=new Date(t.replace(/-/g,"/")));for(var n="",r=t.getMonth(),a=r+1,o=t.getDay(),i=t.getDate(),l=t.getFullYear(),u=t.getHours(),c=t.getMinutes(),d=t.getSeconds(),f=0,h=e.length;f<h;f++)switch(e[f]){case"j":n+=i;break;case"d":n+=i<10?"0"+i:i;break;case"l":var p=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");n+=p[o];break;case"w":n+=o;break;case"D":n+=(p=Array("Sun","Mon","Tue","Wed","Thr","Fri","Sat"))[o];break;case"m":n+=a<10?"0"+a:a;break;case"n":n+=a;break;case"F":var v=Array("January","February","March","April","May","June","July","August","September","October","November","December");n+=v[r];break;case"M":n+=(v=Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"))[r];break;case"Y":n+=l;break;case"y":n+=l.toString().slice(-2);break;case"H":n+=u<10?"0"+u:u;break;case"g":var m=0===u?12:u;n+=m>12?m-12:m;break;case"h":n+=(m=(m=0===u?12:u)>12?m-12:m)<10?"0"+m:m;break;case"a":n+=u<12?"am":"pm";break;case"i":n+=c<10?"0"+c:c;break;case"s":n+=d<10?"0"+d:d;break;case"c":n+=t.toISOString();break;default:n+=e[f]}return n}},{key:"deepCopy",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(Object(t)!==t)return t;if(n.has(t))return n.get(t);var r=t instanceof Date?new Date(t):t instanceof RegExp?new RegExp(t.source,t.flags):t.constructor?new t.constructor:Object.create(null);return n.set(t,r),t instanceof Map&&Array.from(t,(function(t){var a=(0,u.default)(t,2),o=a[0],i=a[1];return r.set(o,e.deepCopy(i,n))})),Object.assign.apply(Object,[r].concat((0,l.default)(Object.keys(t).map((function(r){return(0,i.default)({},r,e.deepCopy(t[r],n))})))))}},{key:"jsonStringToObject",value:function(e){if(this.nx(e)||!this.isString(e))return null;try{return JSON.parse(e)}catch(e){return null}}},{key:"isJsonString",value:function(e){if(this.nx(e)||!this.isString(e))return!1;try{JSON.parse(e);return!0}catch(e){return!1}}},{key:"jsonObjectToString",value:function(e){try{return JSON.stringify(e)}catch(e){return null}}},{key:"uuid",value:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},{key:"guid",value:function(){return this.uuid()}},{key:"replaceAll",value:function(e,t,n){return e.split(t).join(n)}},{key:"replaceLast",value:function(e,t,n){var r=e.lastIndexOf(t);return e=e.slice(0,r)+e.slice(r).replace(t,n)}},{key:"replaceFirst",value:function(e,t,n){return e.replace(t,n)}},{key:"findAllPositions",value:function(e,t){var n,r=e.length,a=0,o=[];if(0==r)return[];for(;(n=t.indexOf(e,a))>-1;)o.push(n),a=n+r;return o}},{key:"findAllPositionsCaseInsensitive",value:function(e,t){var n,r=e.length,a=0,o=[];if(0==r)return[];for(;(n=this.indexOfCaseInsensitive(e,t,a))>-1;)o.push(n),a=n+r;return o}},{key:"countAllOccurences",value:function(e,t){var n=new RegExp(e,"g");return(t.match(n)||[]).length}},{key:"countAllOccurencesCaseInsensitive",value:function(e,t){var n=new RegExp(e,"gi");return(t.match(n)||[]).length}},{key:"indexOfCaseInsensitive",value:function(e,t,n){return t.toLowerCase().indexOf(e.toLowerCase(),n)}},{key:"highlight",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500;if(this.nx(e)||this.nx(t))return e;if(!0===n){var a="...",o=this.findAllPositionsCaseInsensitive(t,e),i=e.split(" "),l=0;for(i.forEach((function(e,n){var u=!0;o.forEach((function(e){l>=e-r&&l<=e+t.length+r-1&&(u=!1)})),!0===u&&(i[n]=a),l+=e.length+1})),e=i.join(" ");e.indexOf(a+" "+a)>-1;)e=this.replaceAll(e,a+" "+a,a);e=e.trim()}for(var u=this.findAllPositionsCaseInsensitive(t,e),s='<strong class="highlight">',c="</strong>",d=0;d<u.length;d++){e=e.substring(0,u[d])+s+e.substring(u[d],u[d]+t.length)+c+e.substring(u[d]+t.length);for(var f=d+1;f<u.length;f++)u[f]=u[f]+s.length+c.length}return e}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.call("GET",e,t)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.call("POST",e,t)}},{key:"call",value:function(t,n){var r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null===a&&(a={}),"data"in a||(a.data={}),"headers"in a||(a.headers=null),"throttle"in a||(a.throttle=0),"allow_errors"in a||(a.allow_errors=!0),new Promise((function(o,i){setTimeout((function(){0!==n.indexOf("http")&&(n=e.baseUrl()+"/"+n);var l=new XMLHttpRequest;l.open(t,n,!0),"POST"===t&&(!("data"in a)||null===a.data||"object"!==(0,s.default)(a.data)||a.data instanceof FormData||(l.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.data=JSON.stringify(a.data)),l.setRequestHeader("X-Requested-With","XMLHttpRequest")),r.x(a.headers)&&Object.entries(a.headers).forEach((function(e){var t=(0,u.default)(e,2),n=t[0],r=t[1];l.setRequestHeader(n,r)})),l.onload=function(){(4!=l.readyState||!0!==a.allow_errors&&200!=l.status&&304!=l.status)&&(r.isJsonString(l.responseText)?i(r.jsonStringToObject(l.responseText)):i(l.responseText)),r.isJsonString(l.responseText)?o(r.jsonStringToObject(l.responseText)):o(l.responseText)},l.onerror=function(){i([l.readyState,l.status,l.statusText])},"GET"===t&&l.send(null),"POST"===t&&l.send(a.data)}),a.throttle)}))}},{key:"onResizeHorizontal",value:function(e){var t,n,r=window.innerWidth;window.addEventListener("resize",(function(){(t=window.innerWidth)!=r&&(r=t,n&&clearTimeout(n),n=window.setTimeout((function(){e()}),50))})),e()}},{key:"onResizeVertical",value:function(e){var t,n,r=window.innerHeight;window.addEventListener("resize",(function(){(t=window.innerHeight)!=r&&(r=t,n&&clearTimeout(n),n=window.setTimeout((function(){e()}),50))})),e()}},{key:"uniqueArray",value:function(e){for(var t={},n=[],r=0;r<e.length;r++)e[r]in t||(n.push(e[r]),t[e[r]]=!0);return n}},{key:"powerset",value:function(e){return Array.isArray(e)?e.reduce((function(e,t){return e.concat(e.map((function(e){return[].concat((0,l.default)(e),[t])})))}),[[]]):e}},{key:"charToInt",value:function(e){var t,n,r="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=0;for(t=0,n=(e=e.toUpperCase()).length-1;t<e.length;t+=1,n-=1)a+=Math.pow(r.length,n)*(r.indexOf(e[t])+1);return a}},{key:"intToChar",value:function(e){for(var t="",n=1,r=26;(e-=n)>=0;n=r,r*=26)t=String.fromCharCode(parseInt(e%r/n)+65)+t;return t}},{key:"slugify",value:function(e){return e.toString().toLowerCase().trim().split("ä").join("ae").split("ö").join("oe").split("ü").join("ue").split("ß").join("ss").replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}},{key:"incChar",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.intToChar(this.charToInt(e)+t)}},{key:"decChar",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.intToChar(this.charToInt(e)-t)}},{key:"range",value:function(e,t){var n=[],r=(0,s.default)(e),a=(0,s.default)(t),o=1;if("undefined"==r||"undefined"==a||r!=a)return null;if(t<e&&(o=-o),"number"==r)for(;o>0?t>=e:t<=e;)n.push(e),e+=o;else{if("string"!=r)return null;if(1!=e.length||1!=t.length)return null;for(e=e.charCodeAt(0),t=t.charCodeAt(0);o>0?t>=e:t<=e;)n.push(String.fromCharCode(e)),e+=o}return n}},{key:"dateToWeek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===e&&(e=new Date),(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));var t=new Date(Date.UTC(e.getUTCFullYear(),0,1)),n=Math.ceil(((e-t)/864e5+1)/7);return n}},{key:"weekToDate",value:function(e,t){var n=new Date(t,0,1+7*(e-1)),r=n.getDay(),a=n;return r<=4?a.setDate(n.getDate()-n.getDay()+1):a.setDate(n.getDate()+8-n.getDay()),a.setUTCHours(0,0,0,0),a}},{key:"addDays",value:function(e,t){var n=new Date(e);return n.setDate(n.getDate()+t),n}},{key:"objectsAreEqual",value:function(e,t){var n=this;if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function)return e===t;if(e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length)return!1;if(e instanceof Date)return!1;if(!(e instanceof Object))return!1;if(!(t instanceof Object))return!1;var r=Object.keys(e);return Object.keys(t).every((function(e){return-1!==r.indexOf(e)}))&&r.every((function(r){return n.objectsAreEqual(e[r],t[r])}))}},{key:"containsObject",value:function(e,t){var n;for(n in t)if(t.hasOwnProperty(n)&&this.objectsAreEqual(t[n],e))return!0;return!1}},{key:"fadeOut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return t<=25&&(t=25),new Promise((function(n){e.style.opacity=1,function r(){(e.style.opacity-=25/t)<0?(e.style.display="none",n()):requestAnimationFrame(r)}()}))}},{key:"fadeIn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return t<=25&&(t=25),new Promise((function(n){e.style.opacity=0,e.style.display="block",function r(){var a=parseFloat(e.style.opacity);(a+=25/t)>1?n():(e.style.opacity=a,requestAnimationFrame(r))}()}))}},{key:"scrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"scrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"closestScrollable",value:function(e){var t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,n=t&&!(t.includes("hidden")||t.includes("visible"));return e?n&&e.scrollHeight>=e.clientHeight?e:this.closestScrollable(e.parentNode)||document.scrollingElement||document.body:null}},{key:"offsetTop",value:function(e){return e.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop}},{key:"offsetLeft",value:function(e){return e.getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft}},{key:"offsetRight",value:function(e){return e.getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft+e.offsetWidth}},{key:"offsetBottom",value:function(e){return e.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop+e.offsetHeight}},{key:"offsetTopWithMargin",value:function(e){return this.offsetTop(e)-parseInt(getComputedStyle(e).marginTop)}},{key:"offsetLeftWithMargin",value:function(e){return this.offsetLeft(e)-parseInt(getComputedStyle(e).marginLeft)}},{key:"offsetRightWithMargin",value:function(e){return this.offsetRight(e)+parseInt(getComputedStyle(e).marginRight)}},{key:"offsetBottomWithMargin",value:function(e){return this.offsetBottom(e)+parseInt(getComputedStyle(e).marginBottom)}},{key:"documentHeight",value:function(){return Math.max(document.body.offsetHeight,document.body.scrollHeight,document.documentElement.clientHeight,document.documentElement.offsetHeight,document.documentElement.scrollHeight)}},{key:"documentWidth",value:function(){return document.documentElement.clientWidth||document.body.clientWidth}},{key:"windowWidth",value:function(){return window.innerWidth}},{key:"windowHeight",value:function(){return window.innerHeight}},{key:"windowWidthWithoutScrollbar",value:function(){return document.documentElement.clientWidth||document.body.clientWidth}},{key:"windowHeightWithoutScrollbar",value:function(){return document.documentElement.clientHeight||document.body.clientHeight}},{key:"outerWidthWithMargin",value:function(e){return e.offsetWidth+parseInt(getComputedStyle(e).marginLeft)+parseInt(getComputedStyle(e).marginRight)}},{key:"outerHeightWithMargin",value:function(e){return e.offsetHeight+parseInt(getComputedStyle(e).marginTop)+parseInt(getComputedStyle(e).marginBottom)}},{key:"scrollTo",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(l){null===a&&(a=document.scrollingElement||document.documentElement),e.isNumeric(t)||(t=a===(document.scrollingElement||documentElement)?n.offsetTopWithMargin(t):t.getBoundingClientRect().top-parseInt(getComputedStyle(t).marginTop)-(a.getBoundingClientRect().top-a.scrollTop-parseInt(getComputedStyle(a).marginTop))),e.isNumeric(o)||(o=null!==o&&"fixed"===window.getComputedStyle(o).position?-1*o.offsetHeight:0),t+=o;var u=a.scrollTop,s=t-u,c=+new Date;!0===i&&s>0?l():function e(){var n,o,i,d=+new Date-c;a.scrollTop=parseInt((n=d,o=u,i=s,(n/=r/2)<1?-i/2*(Math.sqrt(1-n*n)-1)+o:(n-=2,i/2*(Math.sqrt(1-n*n)+1)+o))),d<r?requestAnimationFrame(e):(a.scrollTop=t,l())}()}))}},{key:"loadJs",value:function(t){e.isArray(t)||(t=[t]);var n=[];return e.loop(t,(function(e,t){n.push(new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.onload=function(){t()},document.head.appendChild(r)})))})),Promise.all(n)}},{key:"loadJsSequentially",value:(n=(0,o.default)(a.default.mark((function t(n){var r,o,i;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.isArray(n)||(n=[n]),r=f(n),t.prev=2,r.s();case 4:if((o=r.n()).done){t.next=10;break}return i=o.value,t.next=8,e.loadJs(i);case 8:t.next=4;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(2),r.e(t.t0);case 15:return t.prev=15,r.f(),t.finish(15);case 18:return t.abrupt("return");case 19:case"end":return t.stop()}}),t,null,[[2,12,15,18]])}))),function(e){return n.apply(this,arguments)})},{key:"triggerAfterAllImagesLoaded",value:function(e,t,n){var r=this;window.addEventListener("load",(function(a){null!==document.querySelector(e+" "+t)&&document.querySelectorAll(e+" "+t).forEach((function(a){r.triggerAfterAllImagesLoadedBindLoadEvent(a,e,t,n)}))})),document.addEventListener("DOMContentLoaded",(function(){null!==document.querySelector(e)&&new MutationObserver((function(a){a.forEach((function(a){"childList"===a.type&&a.addedNodes.length>0?a.addedNodes.forEach((function(a){r.triggerAfterAllImagesLoadedHandleEl(a,e,t,n)})):"attributes"===a.type&&"src"===a.attributeName&&a.target.classList.contains(t.replace(".",""))&&a.oldValue!==a.target.getAttribute("src")&&r.triggerAfterAllImagesLoadedHandleEl(a.target,e,t,n)}))})).observe(document.querySelector(e),{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeOldValue:!0,characterDataOldValue:!1})}))}},{key:"triggerAfterAllImagesLoadedHandleEl",value:function(e,t,n,r){var a=this;e.nodeType===Node.ELEMENT_NODE&&(e.classList.remove("loaded-img"),e.closest(t).classList.remove("loaded-all"),e.classList.contains("binded-trigger")||(e.classList.add("binded-trigger"),e.addEventListener("load",(function(){a.triggerAfterAllImagesLoadedBindLoadEvent(e,t,n,r)}))))}},{key:"triggerAfterAllImagesLoadedBindLoadEvent",value:function(e,t,n,r){e.classList.add("loaded-img"),e.closest(t).querySelectorAll(".loaded-img").length===e.closest(t).querySelectorAll(n).length&&(e.closest(t).classList.add("loaded-all"),r())}},{key:"isVisible",value:function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}},{key:"isVisibleInViewport",value:function(e){if(!this.isVisible(e))return!1;var t=e.getBoundingClientRect();return!(t.bottom<0||t.right<0||t.left>window.innerWidth||t.top>window.innerHeight)}},{key:"textareaAutoHeight",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";this.textareaSetHeights(t),this.onResizeHorizontal((function(){e.textareaSetHeights(t)})),[].forEach.call(document.querySelectorAll(t),(function(t){t.addEventListener("keyup",(function(t){e.textareaSetHeight(t.target)}))}))}},{key:"textareaSetHeights",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";[].forEach.call(document.querySelectorAll(t),(function(t){e.isVisible(t)&&e.textareaSetHeight(t)}))}},{key:"textareaSetHeight",value:function(e){e.style.height="5px",e.style.height=e.scrollHeight+"px"}},{key:"real100vh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(null===e){var n=function(){var e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))};n(),window.addEventListener("resize",(function(){n()}))}else{var r=function(){console.log(e),null!==document.querySelector(e)&&document.querySelectorAll(e).forEach((function(e){e.style.height=window.innerHeight*(t/100)+"px"}))};r(),window.addEventListener("resize",(function(){r()}))}}},{key:"iOsRemoveHover",value:function(){"safari"===e.getBrowser()&&"desktop"!==e.getDevice()&&e.on("touchend","a",(function(e,t){t.click()}))}},{key:"isNumeric",value:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},{key:"animate",value:function(t,n,r,a,o){var i=this;return new Promise((function(l){o<=50&&(o=50);var u=[];n.split(";").forEach((function(e){u.push(e.split(":")[0].trim())}));var s=[];u.forEach((function(e){s.push(e+" "+Math.round(o/1e3*10)/10+"s "+a)})),s="transition: "+s.join(", ")+" !important;";var c=null;NodeList.prototype.isPrototypeOf(t)?c=Array.from(t):null===t?(console.log("cannot animate element from "+n+" to "+r+" because it does not exist"),l()):c=[t];var d=c.length;c.forEach((function(t,a){var c=e.random_string(10,"abcdefghijklmnopqrstuvwxyz");t.classList.add(c),window.requestAnimationFrame((function(){var a=[],f=t.getAttribute("style");null!==f&&f.split(";").forEach((function(e){u.includes(e.split(":")[0].trim())||a.push(e)})),a=a.join(";")+n+";",t.setAttribute("style",a),window.requestAnimationFrame((function(){var a=document.createElement("style");a.innerHTML="."+c+" { "+s+" }",document.head.appendChild(a),window.requestAnimationFrame((function(){if(t.setAttribute("style",t.getAttribute("style").replace(n+";","")+r+";"),i.isVisible(t)){var u=!1;e.addEventListenerOnce(t,"transitionend",(function(e){if(u=!0,e.target!==e.currentTarget)return!1;document.head.removeChild(a),t.classList.remove(c),--d<=0&&window.requestAnimationFrame((function(){l()}))})),setTimeout((function(){!1===u&&(document.head.removeChild(a),t.classList.remove(c),--d<=0&&l())}),1.5*o)}else document.head.removeChild(a),t.classList.remove(c),--d<=0&&l()}))}))}))}))}))}},{key:"addEventListenerOnce",value:function(e,t,n,r,a){e.addEventListener(t,(function o(i){var l=n.apply(this,arguments,r);!1!==l&&e.removeEventListener(t,o,a)}))}},{key:"htmlDecode",value:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value}},{key:"htmlEncode",value:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/`/g,"&#96;")}},{key:"nl2br",value:function(e){if(null==e)return"";return(e+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1<br/>")}},{key:"br2nl",value:function(e){if(null==e)return"";return e.replace(/<\s*\/?br\s*[\/]?>/gi,"\n")}},{key:"closest",value:function(e,t){if(!document.documentElement.contains(e))return null;do{if(this.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}},{key:"matches",value:function(e,t){for(var n=e,r=(n.parentNode||n.document).querySelectorAll(t),a=-1;r[++a]&&r[a]!=n;);return!!r[a]}},{key:"wrapTextNodes",value:function(e,t){null!==e&&Array.from(e.childNodes).filter((function(e){return 3===e.nodeType&&e.textContent.trim().length>1})).forEach((function(e){var n=document.createElement(t);e.after(n),n.appendChild(e)}))}},{key:"html2dom",value:function(e){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,void 0===t.content?this.html2domLegacy(e):t.content.firstChild}},{key:"html2domLegacy",value:function(e){var t,n,r,a={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]},o=document,i=o.createDocumentFragment();if(/<|&#?\w+;/.test(e)){for(t=i.appendChild(o.createElement("div")),n=a[(/<([\w:]+)/.exec(e)||["",""])[1].toLowerCase()]||a._default,t.innerHTML=n[1]+e.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1></$2>")+n[2],r=n[0];r--;)t=t.lastChild;for(i.removeChild(i.firstChild);t.firstChild;)i.appendChild(t.firstChild)}else i.appendChild(o.createTextNode(e));return i.querySelector("*")}},{key:"prevAll",value:function(e,t){for(var n=[];e=e.previousElementSibling;)(void 0===t||this.matches(e,t))&&n.push(e);return n}},{key:"nextAll",value:function(e,t){for(var n=[];e=e.nextElementSibling;)(void 0===t||this.matches(e,t))&&n.push(e);return n}},{key:"prevUntil",value:function(e,t){for(var n=[];(e=e.previousElementSibling)&&!this.matches(e,t);)n.push(e);return n}},{key:"nextUntil",value:function(e,t){for(var n=[];(e=e.nextElementSibling)&&!this.matches(e,t);)n.push(e);return n}},{key:"siblings",value:function(e,t){var n=[],r=e;for(e=e.parentNode.firstChild;e=e.nextElementSibling;)(void 0===t||this.matches(e,t))&&r!==e&&n.push(e);return n}},{key:"parents",value:function(e,t){for(var n=[],r=void 0!==t;null!==(e=e.parentElement);)e.nodeType===Node.ELEMENT_NODE&&(r&&!this.matches(e,t)||n.push(e));return n}},{key:"css",value:function(e){var t=document.styleSheets,n={};for(var r in t)try{var a=t[r].rules||t[r].cssRules;for(var o in a)this.matches(e,a[o].selectorText)&&(n=Object.assign(n,this.css2json(a[o].style),this.css2json(e.getAttribute("style"))))}catch(e){}return n}},{key:"css2json",value:function(e){var t={};if(!e)return t;if(e instanceof CSSStyleDeclaration)for(var n in e)e[n].toLowerCase&&void 0!==e[e[n]]&&(t[e[n].toLowerCase()]=e[e[n]]);else if("string"==typeof e)for(var r in e=e.split(";"))if(e[r].indexOf(":")>-1){var a=e[r].split(":");t[a[0].toLowerCase().trim()]=a[1].trim()}return t}},{key:"compareDates",value:function(e,t){return"string"==typeof e&&(e=e.split(" ").join("T")),"string"==typeof t&&(t=t.split(" ").join("T")),e=new Date(e),t=new Date(t),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()?0:e<t?-1:1}},{key:"spaceship",value:function(e,t){return null===e||null===t||(0,s.default)(e)!=(0,s.default)(t)?null:"string"==typeof e?e.localeCompare(t):e>t?1:e<t?-1:0}},{key:"focus",value:function(t){e.unfocus();var n=null;if(null!==(n="string"==typeof t||t instanceof String?document.querySelector(t):t)){var r=document.createElement("div");r.classList.add("hlp-focus-mask"),r.style.position="fixed",r.style.top=0,r.style.bottom=0,r.style.left=0,r.style.right=0,r.style.backgroundColor="rgba(0,0,0,0.8)",r.style.zIndex=2147483646,n.before(r),n.setAttribute("data-focussed",1),n.setAttribute("data-focussed-orig-z-index",n.style.zIndex),n.setAttribute("data-focussed-orig-position",n.style.position),n.setAttribute("data-focussed-orig-background-color",n.style.backgroundColor),n.setAttribute("data-focussed-orig-box-shadow",n.style.boxShadow),n.style.zIndex=2147483647,n.style.position="relative",n.style.backgroundColor="#ffffff",n.style.boxShadow="0px 0px 0px 20px #fff"}}},{key:"unfocus",value:function(){null!==document.querySelector(".hlp-focus-mask")&&document.querySelectorAll(".hlp-focus-mask").forEach((function(t){e.remove(t)})),null!==document.querySelector("[data-focussed]")&&document.querySelectorAll("[data-focussed]").forEach((function(e){e.style.zIndex=e.getAttribute("data-focussed-orig-z-index"),e.style.position=e.getAttribute("data-focussed-orig-position"),e.style.backgroundColor=e.getAttribute("data-focussed-orig-background-color"),e.style.boxShadow=e.getAttribute("data-focussed-orig-box-shadow"),e.removeAttribute("data-focussed"),e.removeAttribute("data-focussed-orig-z-index"),e.removeAttribute("data-focussed-orig-position"),e.removeAttribute("data-focussed-orig-background-color"),e.removeAttribute("data-focussed-orig-box-shadow")}))}},{key:"remove",value:function(e){null!==e&&e.parentNode.removeChild(e)}},{key:"on",value:function(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===a?(a=r,r=document):r=document.querySelector(r),r.addEventListener(t,(function(t){var r=e.closest(t.target,n);r&&a(t,r)}),!1)}},{key:"url",value:function(){return window.location.protocol+"//"+window.location.host+window.location.pathname}},{key:"urlWithHash",value:function(){return window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.hash}},{key:"fullUrl",value:function(){return window.location.href}},{key:"urlWithArgs",value:function(){return window.location.href.split("#")[0]}},{key:"baseUrl",value:function(){return window.location.protocol+"//"+window.location.host}},{key:"urlProtocol",value:function(){return window.location.protocol+"//"}},{key:"urlHost",value:function(){return window.location.host}},{key:"urlHostTopLevel",value:function(){var e=window.location.host;for(e=e.split(".");e.length>2;)e.shift();return e=e.join(".")}},{key:"urlPath",value:function(){return window.location.pathname}},{key:"urlHash",value:function(){return window.location.hash}},{key:"urlArgs",value:function(){return window.location.search}},{key:"urlOfScript",value:function(){if(document.currentScript)return document.currentScript.src;var e=document.getElementsByTagName("script");return e[e.length-1].src}},{key:"pathOfScript",value:function(){var e=this.urlOfScript();return e.substring(0,e.lastIndexOf("/"))}},{key:"waitUntil",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise((function(r,a){var o=setInterval((function(){null!==document.querySelector(e)&&(null===t||null===n&&void 0!==window.getComputedStyle(document.querySelector(e))[t]&&""!=window.getComputedStyle(document.querySelector(e))[t]||null!==n&&window.getComputedStyle(document.querySelector(e))[t]===n)&&(window.clearInterval(o),r())}),30)}))}},{key:"waitUntilVar",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null,a=null;return null===t?(r=e,a=window):(r=t,a=e),new Promise((function(e,t){var o=setInterval((function(){void 0!==a[r]&&null!==a[r]&&(null!==n&&a[r]!==n||(window.clearInterval(o),e()))}),30)}))}},{key:"ready",value:function(){return new Promise((function(e){if("loading"!==document.readyState)return e();document.addEventListener("DOMContentLoaded",(function(){return e()}))}))}},{key:"load",value:function(){return new Promise((function(e){if("complete"===document.readyState)return e();window.addEventListener("load",(function(){return e()}))}))}},{key:"runForEl",value:function(t,n){e.ready().then((function(){var r=e.pushId();null!==document.querySelector(t)&&document.querySelectorAll(t).forEach((function(e){void 0===e.runForEl&&(e.runForEl=[]),e.runForEl.includes(r)||(e.runForEl.push(r),n(e))})),void 0===window.runForEl_queue&&(window.runForEl_queue=[]),void 0===window.runForEl_observer&&(window.runForEl_observer=new MutationObserver((function(e){e.forEach((function(e){if(e.addedNodes)for(var t=function(t){var n=e.addedNodes[t];n.nodeType===Node.ELEMENT_NODE&&window.runForEl_queue.forEach((function(e){n.matches(e.selector)&&(void 0===n.runForEl&&(n.runForEl=[]),n.runForEl.includes(e.id)||(n.runForEl.push(e.id),e.callback(n))),null!==n.querySelector(e.selector)&&n.querySelectorAll(e.selector).forEach((function(t){void 0===t.runForEl&&(t.runForEl=[]),t.runForEl.includes(e.id)||(t.runForEl.push(e.id),e.callback(t))}))}))},n=0;n<e.addedNodes.length;n++)t(n)}))})).observe(document.body,{attributes:!1,childList:!0,characterData:!1,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})),window.runForEl_queue.push({id:r,selector:t,callback:n})}))}},{key:"fmath",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,a={"*":t*n,"-":t-n,"+":t+n,"/":t/n}[e];return Math.round(10*a*Math.pow(10,r))/(10*Math.pow(10,r))}},{key:"trim",value:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),r=0,a=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),r=e.length,a=0;a<r;a++)if(-1===n.indexOf(e.charAt(a))){e=e.substring(a);break}for(a=(r=e.length)-1;a>=0;a--)if(-1===n.indexOf(e.charAt(a))){e=e.substring(0,a+1);break}return-1===n.indexOf(e.charAt(0))?e:""}},{key:"ltrim",value:function(e,t){t=t?(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1"):" \\s ";var n=new RegExp("^["+t+"]+","g");return(e+"").replace(n,"")}},{key:"rtrim",value:function(e,t){t=t?(t+"").replace(/([[\]().?/*{}+$^:])/g,"\\$1"):" \\s ";var n=new RegExp("["+t+"]+$","g");return(e+"").replace(n,"")}},{key:"pushId",value:function(){var n=null;void 0!==window&&(void 0===window.pushIdDataGlobal&&(window.pushIdDataGlobal={}),n=window.pushIdDataGlobal),void 0!==t&&(void 0===t.pushIdDataGlobal&&(t.pushIdDataGlobal={}),n=t.pushIdDataGlobal),e.objectsAreEqual(n,{})&&(n.lastPushTime=0,n.lastRandChars=[],n.PUSH_CHARS="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz");var r=(new Date).getTime(),a=r===n.lastPushTime;n.lastPushTime=r;for(var o=new Array(8),i=7;i>=0;i--)o[i]=n.PUSH_CHARS.charAt(r%64),r=Math.floor(r/64);if(0!==r)throw new Error;var l=o.join("");if(a){for(i=11;i>=0&&63===n.lastRandChars[i];i--)n.lastRandChars[i]=0;n.lastRandChars[i]++}else for(i=0;i<12;i++)n.lastRandChars[i]=Math.floor(64*Math.random());for(i=0;i<12;i++)l+=n.PUSH_CHARS.charAt(n.lastRandChars[i]);if(20!=l.length)throw new Error;return l}},{key:"getProp",value:function(e,t){for(var n=t.split(".");n.length&&(e=e[n.shift()]););return e}},{key:"base64toblob",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=512,r=atob(e),a=[],o=0;o<r.length;o+=n){for(var i=r.slice(o,o+n),l=new Array(i.length),u=0;u<i.length;u++)l[u]=i.charCodeAt(u);var s=new Uint8Array(l);a.push(s)}var c=new Blob(a,{type:t});return c}},{key:"blobtobase64",value:function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){var e=n.result.split(",")[1];t(e)},n.readAsDataURL(e)}))}},{key:"stringtoblob",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new Blob([e],{type:t});return n}},{key:"blobtostring",value:function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){t(n.result)},n.readAsText(e)}))}},{key:"filetobase64",value:function(e){return new Promise((function(t,n){var r=new FileReader;r.readAsDataURL(e),r.onload=function(){return t(r.result.split(",")[1])},r.onerror=function(e){return n(e)}}))}},{key:"blobtofile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file.txt",n=null;try{n=new File([e],t)}catch(r){n=new Blob([e],t)}return n}},{key:"filetoblob",value:function(e){return new Blob([e])}},{key:"base64tofile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"file.txt";return this.blobtofile(this.base64toblob(e,t),n)}},{key:"blobtourl",value:function(e){return URL.createObjectURL(e,{type:"text/plain"})}},{key:"stringtourl",value:function(e){return this.blobtourl(this.stringtoblob(e))}},{key:"base64tostring",value:function(e){return atob(e)}},{key:"stringtobase64",value:function(e){return btoa(e)}},{key:"base64tourl",value:function(e){return this.blobtourl(this.base64toblob(e))}},{key:"filetourl",value:function(e){return this.blobtourl(this.filetoblob(e))}},{key:"getImageOrientation",value:function(e){var t=this;return new Promise((function(n,r){e=e.replace("data:image/jpeg;base64,","");var a=t.base64tofile(e),o=new FileReader;o.onload=function(e){var t=new DataView(e.target.result);if(65496==t.getUint16(0,!1)){for(var r=t.byteLength,a=2;a<r;){if(t.getUint16(a+2,!1)<=8)return void n(-1);var o=t.getUint16(a,!1);if(a+=2,65505==o){if(1165519206!=t.getUint32(a+=2,!1))return void n(-1);var i=18761==t.getUint16(a+=6,!1);a+=t.getUint32(a+4,i);var l=t.getUint16(a,i);a+=2;for(var u=0;u<l;u++)if(274==t.getUint16(a+12*u,i))return void n(t.getUint16(a+12*u+8,i))}else{if(65280!=(65280&o))break;a+=t.getUint16(a,!1)}}n(-1)}else n(-2)},o.readAsArrayBuffer(a)}))}},{key:"resetImageOrientation",value:function(e,t){return new Promise((function(n,r){var a=new Image;a.onload=function(){var e=a.width,r=a.height,o=document.createElement("canvas"),i=o.getContext("2d");switch(4<t&&t<9?(o.width=r,o.height=e):(o.width=e,o.height=r),t){case 2:i.transform(-1,0,0,1,e,0);break;case 3:i.transform(-1,0,0,-1,e,r);break;case 4:i.transform(1,0,0,-1,0,r);break;case 5:i.transform(0,1,1,0,0,0);break;case 6:i.transform(0,1,-1,0,r,0);break;case 7:i.transform(0,-1,-1,0,r,e);break;case 8:i.transform(0,-1,1,0,0,e)}i.drawImage(a,0,0);var l=o.toDataURL();l="data:image/jpeg;base64,"+l.split(",")[1],n(l)},a.src=e}))}},{key:"fixImageOrientation",value:function(e){var t=this;return new Promise((function(n,r){-1!==e.indexOf("data:")?(0===e.indexOf("data:image/jpeg;base64,")&&(e=e.replace("data:image/jpeg;base64,","")),t.getImageOrientation(e).then((function(r){e="data:image/jpeg;base64,"+e,r<=1?n(e):t.resetImageOrientation(e,r).then((function(e){n(e)}))}))):n(e)}))}},{key:"debounce",value:function(e,t,n){var r;return function(){var a=this,o=arguments,i=function(){r=null,n||e.apply(a,o)},l=n&&!r;clearTimeout(r),r=setTimeout(i,t),l&&e.apply(a,o)}}},{key:"throttle",value:function(e,t,n){var r,a,o,i=null,l=0;n||(n={});var u=function(){l=!1===n.leading?0:Date.now(),i=null,o=e.apply(r,a),i||(r=a=null)};return function(){var s=Date.now();l||!1!==n.leading||(l=s);var c=t-(s-l);return r=this,a=arguments,c<=0||c>t?(i&&(clearTimeout(i),i=null),l=s,o=e.apply(r,a),i||(r=a=null)):i||!1===n.trailing||(i=setTimeout(u,c)),o}}},{key:"shuffle",value:function(e){for(var t,n,r=e.length;0!==r;)n=Math.floor(Math.random()*r),t=e[r-=1],e[r]=e[n],e[n]=t;return e}},{key:"findRecursiveInObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(null!==e&&"object"===(0,s.default)(e))for(var o=0,i=Object.entries(e);o<i.length;o++){var l=(0,u.default)(i[o],2),c=l[0],d=l[1];if(null!==d&&"object"===(0,s.default)(d))this.findRecursiveInObject(d,t,n,(""===r?"":r+".")+c,a);else if(!(null!==t&&c!==t||null!==n&&d!==n)){a.push(r);break}}return a}}]),e}();n.default=p,"undefined"!=typeof window&&(window.hlp={},Object.getOwnPropertyNames(p).forEach((function(e,t){"length"!==e&&"name"!==e&&"prototype"!==e&&"caller"!==e&&"arguments"!==e&&(window.hlp[e]=p[e])})))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"@babel/runtime/helpers/asyncToGenerator":5,"@babel/runtime/helpers/classCallCheck":6,"@babel/runtime/helpers/createClass":7,"@babel/runtime/helpers/defineProperty":8,"@babel/runtime/helpers/interopRequireDefault":9,"@babel/runtime/helpers/slicedToArray":14,"@babel/runtime/helpers/toConsumableArray":15,"@babel/runtime/helpers/typeof":16,"@babel/runtime/regenerator":18}],20:[function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof m?t:m,o=Object.create(a.prototype),i=new O(r||[]);return o._invoke=function(e,t,n){var r=d;return function(a,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===a)throw o;return C()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var l=S(i,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=c(e,t,n);if("normal"===u.type){if(r=n.done?p:f,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(e,n,i),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",v={};function m(){}function y(){}function g(){}var b={};u(b,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==n&&r.call(k,o)&&(b=k);var x=g.prototype=m.prototype=Object.create(b);function A(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(a,o,i,l){var u=c(e[a],e,o);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(u.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function S(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var a=c(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function L(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function n(){for(;++a<e.length;)if(r.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:C}}function C(){return{value:t,done:!0}}return y.prototype=g,u(x,"constructor",g),u(g,"constructor",y),y.displayName=u(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},A(E.prototype),u(E.prototype,i,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new E(s(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(x),u(x,l,"Generator"),u(x,o,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=L,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(r,a){return l.type="throw",l.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}("object"==typeof t?t.exports:{});try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},{}]},{},[1]);
1
+ !function t(e,n,r){function a(o,l){if(!n[o]){if(!e[o]){var s="function"==typeof require&&require;if(!l&&s)return s(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[o]={exports:{}};e[o][0].call(d.exports,(function(t){return a(e[o][1][t]||t)}),d,d.exports,t,e,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}({1:[function(t,e,n){"use strict";var r=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t("hlp"));class i{init(){a.default.isMobile()?document.head.insertAdjacentHTML("beforeend",'<style class="lanimate-styles-restore">[data-lanimate] { opacity: 1; }</style>'):(a.default.ready().then((()=>{this.ready()})),a.default.load().then((()=>{this.load()})))}ready(){this.addBasicStyles()}load(){this.addExtendedStyles(),a.default.runForEl("[data-lanimate]",(t=>{if(null===t.parentNode.closest("[data-lanimate]"))if(t.hasAttribute("data-lanimate-split")&&"none"!==t.getAttribute("data-lanimate-split")){t.setAttribute("data-aria-label",t.innerText.replace(/(?:\r\n|\r|\n)/g," ")),t.innerHTML=t.innerHTML.trim().replace(/ {2,}/g,"").split(" ").join("&nbsp;");let e=0;"char"===t.getAttribute("data-lanimate-split")&&(this.traverseAllTextNodes(t,(t=>"%span data-word data-word-nowrap%"+t.split(" ").map((t=>"%span data-char%"+t.split("").join("%/span%%span data-char%")+"%/span%")).join("%/span% %span data-word data-word-nowrap%")+"%/span%")),t.innerHTML=t.innerHTML.split("%span data-word data-word-nowrap%").join("<span data-word data-word-nowrap>").split("%span data-char%").join("<span data-char>").split("%/span%").join("</span>"),e=50),"word"===t.getAttribute("data-lanimate-split")&&(this.traverseAllTextNodes(t,(t=>"%span data-word%"+t.split(" ").join("%/span% %span data-word%")+"%/span%")),t.innerHTML=t.innerHTML.split("%span data-word%").join("<span data-word>").split("%/span%").join("</span>"),e=250),t.hasAttribute("data-lanimate-speed")&&(e=e*parseInt(t.getAttribute("data-lanimate-speed"))/1e3);let n=0;t.querySelectorAll("span").forEach((r=>{if(""==r.innerText.trim())return;if(null!==r.querySelector("[data-char]"))return;let a=0;t.hasAttribute("data-lanimate-delay")&&(a=parseInt(t.getAttribute("data-lanimate-delay"))),t.hasAttribute("data-lanimate-speed")&&r.setAttribute("data-lanimate-speed",t.getAttribute("data-lanimate-speed")),r.setAttribute("data-lanimate-delay",a+e*n),r.setAttribute("data-lanimate",t.getAttribute("data-lanimate")),n++,this.prepareAndBindStart(r)})),t.removeAttribute("data-lanimate"),t.removeAttribute("data-lanimate-delay"),t.removeAttribute("data-lanimate-speed")}else this.prepareAndBindStart(t)}))}prepareAndBindStart(t){if(t.hasAttribute("data-lanimate-speed")){let e=parseInt(t.getAttribute("data-lanimate-speed"))/1e3;setTimeout((()=>{t.style.transitionDuration=e+"s, "+e+"s"}),10)}this.start(t),window.addEventListener("scroll",(()=>{this.start(t)})),setInterval((()=>{this.start(t)}),500)}start(t){if(!0!==t.lanimateIsStarted&&this.scrollTop()+window.innerHeight>=this.offsetTop(t)){t.lanimateIsStarted=!0;let e=0;t.hasAttribute("data-lanimate-delay")&&(e=parseInt(t.getAttribute("data-lanimate-delay"))),setTimeout((()=>{t.setAttribute("data-lanimate-started","true")}),e)}}scrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}offsetTop(t){return t.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop}addBasicStyles(){null===document.head.querySelector(".lanimate-styles-basic")&&document.head.insertAdjacentHTML("beforeend",'\n <style class="lanimate-styles-basic">\n [data-lanimate] {\n opacity: 0;\n }\n </style>\n ')}addExtendedStyles(){null===document.head.querySelector(".lanimate-styles-extended")&&document.head.insertAdjacentHTML("beforeend","\n <style class=\"lanimate-styles-extended\">\n [data-lanimate='fade'] {\n }\n [data-lanimate='scrollX'] {\n transform: translateX(50px);\n }\n [data-lanimate='scrollY'] {\n transform: translateY(50px);\n }\n [data-lanimate='scale'] {\n transform: scale(1.1) translateY(50px);\n }\n [data-lanimate='rotate'] {\n transform: rotate(15deg) translateY(50px);\n transform-origin: 0 0;\n }\n [data-lanimate='rotate3d'] {\n transform: rotateX(80deg) rotateY(45deg);\n transform-style: preserve-3d;\n }\n [data-lanimate='skew'] {\n transform: skew(70deg, 10deg);\n }\n [data-lanimate-started] {\n transition: opacity 1s ease-in-out, transform 1s ease-in-out;\n opacity: 1;\n }\n [data-lanimate-split] [data-lanimate] {\n display:inline-block;\n }\n [data-lanimate-split] [data-word-nowrap] {\n white-space:nowrap;\n }\n [data-lanimate='fade'][data-lanimate-started] {\n }\n [data-lanimate='scrollX'][data-lanimate-started] {\n transform: translateX(0px);\n }\n [data-lanimate='scrollY'][data-lanimate-started] {\n transform: translateY(0px);\n }\n [data-lanimate='scale'][data-lanimate-started] {\n transform: scale(1) translateY(0px);\n }\n [data-lanimate='rotate'][data-lanimate-started] {\n transform: rotate(0deg) translateY(0px);\n }\n [data-lanimate='rotate3d'][data-lanimate-started] {\n transform: rotateX(0deg) rotateY(0deg);\n }\n [data-lanimate='skew'][data-lanimate-started] {\n transform: skew(0deg, 0deg);\n }\n @media print {\n [data-lanimate] { opacity: 1 !important; }\n } \n </style>\n ")}traverseAllTextNodes(t,e){t.childNodes.length>0&&t.childNodes.forEach((t=>{3===t.nodeType?t.textContent=e(t.textContent):this.traverseAllTextNodes(t,e)}))}}n.default=i,window.Lanimate=i},{"@babel/runtime/helpers/interopRequireDefault":2,hlp:3}],2:[function(t,e,n){e.exports=function(t){return t&&t.__esModule?t:{default:t}},e.exports.__esModule=!0,e.exports.default=e.exports},{}],3:[function(t,e,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;class e{static x(t){if("function"==typeof t)try{return t=t(),this.x(t)}catch(t){return!1}return!(null===t||!1===t||"string"==typeof t&&""==t.trim()||"object"==typeof t&&0===Object.keys(t).length&&t.constructor===Object||void 0===t||Array.isArray(t)&&0===t.length||Array.isArray(t)&&1===t.length&&""===t[0])}static nx(t){return!this.x(t)}static true(t){if("function"==typeof t)try{return t=t(),this.true(t)}catch(t){return!1}return void 0!==t&&(null!==t&&(!1!==t&&((!Array.isArray(t)||0!==t.length)&&((!Array.isArray(t)||""!==e.first(t))&&(("object"!=typeof t||0!==Object.keys(t).length||t.constructor!==Object)&&(0!==t&&("0"!==t&&(""!==t&&(" "!==t&&("null"!==t&&"false"!==t))))))))))}static false(t){if("function"==typeof t)try{return t=t(),this.false(t)}catch(t){return!1}return void 0!==t&&(null!==t&&(!1===t||(!Array.isArray(t)||0!==t.length)&&((!Array.isArray(t)||""!==e.first(t))&&(("object"!=typeof t||0!==Object.keys(t).length||t.constructor!==Object)&&(0===t||("0"===t||""!==t&&(" "!==t&&("null"!==t&&"false"===t))))))))}static v(){if(this.nx(arguments))return"";for(let t=0;t<arguments.length;t++)if(this.x(arguments[t]))return arguments[t];return""}static loop(t,e){if(this.nx(t))return null;Array.isArray(t)?t.forEach(((t,n)=>{e(t,n)})):"object"==typeof t&&Object.entries(t).forEach((t=>{let[n,r]=t;e(r,n)}))}static map(t,e,n){return Object.keys(t).reduce(((r,a)=>(r[a]=e.call(n||null,a,t[a]),r)),{})}static first(t){if(Array.isArray(t)){var e=null;return t.forEach(((t,n)=>{null===e&&(e=t)})),e}if("object"==typeof t){e=null;return Object.entries(t).forEach((t=>{let[n,r]=t;null===e&&(e=r)})),e}return null}static last(t){if(Array.isArray(t)){let e=null;return t.forEach(((t,n)=>{e=t})),e}if("object"==typeof t){let e=null;return Object.entries(t).forEach((t=>{let[n,r]=t;e=r})),e}return null}static rand(t){return Array.isArray(t)?t[Math.floor(Math.random()*t.length)]:"object"==typeof t?(t=Object.values(t))[Math.floor(Math.random()*t.length)]:null}static random_string(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===e&&(e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");let n=e.length,r="";for(let a=0;a<t;a++)r+=e[0+~~(Math.random()*(n-1-0+1))];return r}static round(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(Math.round(t+"e"+e)+"e-"+e)}static isInteger(t){return!isNaN(t)&&parseInt(Number(t))==t&&!isNaN(parseInt(t,10))}static random_int(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:99999;return!(!this.isInteger(t)||!this.isInteger(e))&&(t>e&&([t,e]=[e,t]),~~(Math.random()*(e-t+1))+t)}static capitalize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===t||""===t?t:t.charAt(0).toUpperCase()+t.slice(1)}static cookieExists(t){return void 0!==document.cookie&&null!==this.cookieGet(t)}static cookieGet(t){var e=document.cookie.match(new RegExp(t+"=([^;]+)"));return e?decodeURIComponent(e[1]):null}static cookieSet(t,e,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a="";window.location.protocol.indexOf("https")>-1&&(a="; SameSite=None; Secure"),document.cookie=t+"="+encodeURIComponent(e)+"; expires="+new Date((new Date).getTime()+24*n*60*60*1e3).toUTCString()+"; path=/"+a+"; domain="+(!0===r?this.urlHostTopLevel():"")}static cookieDelete(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";window.location.protocol.indexOf("https")>-1&&(n="; SameSite=None; Secure"),document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"+n+"; domain="+(!0===e?this.urlHostTopLevel():"")}static localStorageSet(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n*=864e5;let r={value:e,expiry:(new Date).getTime()+n};localStorage.setItem(t,JSON.stringify(r))}static localStorageGet(t){let e=localStorage.getItem(t);if(!e)return null;let n=JSON.parse(e);return(new Date).getTime()>n.expiry?(localStorage.removeItem(t),null):n.value}static localStorageDelete(t){localStorage.removeItem(t)}static localStorageExists(t){return null!==this.localStorageGet(t)}static getParam(t){let e=window.location.search;if(this.nx(e))return null;let n=e.substring(1).split("&");for(var r=0;r<n.length;r++){var a=n[r].split("=");if(a[0]==t&&this.x(a[1]))return a[1]}return null}static getDevice(){return this.isPhone()?"phone":this.isTablet()?"tablet":"desktop"}static isPhone(){let t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}static isTablet(){let t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}static isDesktop(){return!this.isPhone()&&!this.isTablet()}static isMobile(){return!!(window.innerWidth<750||this.isPhone())}static isTouch(){return"ontouchstart"in window||navigator.maxTouchPoints||!1}static isMac(){return"mac"===e.getOs()}static isLinux(){return"linux"===e.getOs()}static isWindows(){return"windows"===e.getOs()}static getOs(){let t=window.navigator.userAgent,e=window.navigator.platform,n="unknown";return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(e)||-1!==["iPhone","iPad","iPod"].indexOf(e)?n="mac":-1!==["Win32","Win64","Windows","WinCE"].indexOf(e)?n="windows":(/Android/.test(t)||/Linux/.test(e))&&(n="linux"),n}static getBrowser(){let t="",e=!!!document.documentMode&&!!window.StyleMedia;return t=-1!=navigator.userAgent.indexOf("Opera")||-1!=navigator.userAgent.indexOf("OPR")?"opera":-1==navigator.userAgent.indexOf("Chrome")||e?-1==navigator.userAgent.indexOf("Safari")||e?-1!=navigator.userAgent.indexOf("Firefox")?"firefox":-1!=navigator.userAgent.indexOf("MSIE")||1==!!document.documentMode?"ie":e?"edge":"unknown":"safari":"chrome",t}static isObject(t){return!!t&&t.constructor===Object}static isArray(t){return!!t&&t.constructor===Array}static isString(t){return"string"==typeof t||t instanceof String}static isDate(t){if(this.nx(t))return!1;if("[object Date]"===Object.prototype.toString.call(t))return!0;if(!this.isString(t))return!1;if(3!==t.split("-").length)return!1;let e=parseInt(t.split("-")[2]),n=parseInt(t.split("-")[1]),r=parseInt(t.split("-")[0]),a=new Date;return a.setFullYear(r,n-1,e),a.getFullYear()==r&&a.getMonth()+1==n&&a.getDate()==e}static formatDate(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!1===e||!0===e||null===e||""===e?e=new Date:"object"!=typeof e&&(e=new Date(e.replace(/-/g,"/")));let n="",r=e.getMonth(),a=r+1,i=e.getDay(),o=e.getDate(),l=e.getFullYear(),s=e.getHours(),c=e.getMinutes(),d=e.getSeconds();for(let u=0,h=t.length;u<h;u++)switch(t[u]){case"j":n+=o;break;case"d":n+=o<10?"0"+o:o;break;case"l":let h=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");n+=h[i];break;case"w":n+=i;break;case"D":h=Array("Sun","Mon","Tue","Wed","Thr","Fri","Sat"),n+=h[i];break;case"m":n+=a<10?"0"+a:a;break;case"n":n+=a;break;case"F":let m=Array("January","February","March","April","May","June","July","August","September","October","November","December");n+=m[r];break;case"M":m=Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),n+=m[r];break;case"Y":n+=l;break;case"y":n+=l.toString().slice(-2);break;case"H":n+=s<10?"0"+s:s;break;case"g":let p=0===s?12:s;n+=p>12?p-12:p;break;case"h":p=0===s?12:s,p=p>12?p-12:p,n+=p<10?"0"+p:p;break;case"a":n+=s<12?"am":"pm";break;case"i":n+=c<10?"0"+c:c;break;case"s":n+=d<10?"0"+d:d;break;case"c":n+=e.toISOString();break;default:n+=t[u]}return n}static deepCopy(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(Object(t)!==t)return t;if(n.has(t))return n.get(t);const r=t instanceof Date?new Date(t):t instanceof RegExp?new RegExp(t.source,t.flags):t.constructor?new t.constructor:Object.create(null);return n.set(t,r),t instanceof Map&&Array.from(t,(t=>{let[a,i]=t;return r.set(a,e.deepCopy(i,n))})),Object.assign(r,...Object.keys(t).map((r=>({[r]:e.deepCopy(t[r],n)}))))}static jsonStringToObject(t){if(this.nx(t)||!this.isString(t))return null;try{return JSON.parse(t)}catch(t){return null}}static isJsonString(t){if(this.nx(t)||!this.isString(t))return!1;try{JSON.parse(t);return!0}catch(t){return!1}}static jsonObjectToString(t){try{return JSON.stringify(t)}catch(t){return null}}static uuid(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}static guid(){return this.uuid()}static replaceAll(t,e,n){return t.split(e).join(n)}static replaceLast(t,e,n){let r=t.lastIndexOf(e);return t=t.slice(0,r)+t.slice(r).replace(e,n)}static replaceFirst(t,e,n){return t.replace(e,n)}static findAllPositions(t,e){let n,r=t.length,a=0,i=[];if(0==r)return[];for(;(n=e.indexOf(t,a))>-1;)i.push(n),a=n+r;return i}static findAllPositionsCaseInsensitive(t,e){let n,r=t.length,a=0,i=[];if(0==r)return[];for(;(n=this.indexOfCaseInsensitive(t,e,a))>-1;)i.push(n),a=n+r;return i}static countAllOccurences(t,e){let n=new RegExp(t,"g");return(e.match(n)||[]).length}static countAllOccurencesCaseInsensitive(t,e){let n=new RegExp(t,"gi");return(e.match(n)||[]).length}static indexOfCaseInsensitive(t,e,n){return e.toLowerCase().indexOf(t.toLowerCase(),n)}static highlight(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500;if(this.nx(t)||this.nx(e))return t;if(!0===n){let n="...",a=this.findAllPositionsCaseInsensitive(e,t),i=t.split(" "),o=0;for(i.forEach(((t,l)=>{let s=!0;a.forEach((t=>{o>=t-r&&o<=t+e.length+r-1&&(s=!1)})),!0===s&&(i[l]=n),o+=t.length+1})),t=i.join(" ");t.indexOf(n+" "+n)>-1;)t=this.replaceAll(t,n+" "+n,n);t=t.trim()}let a=this.findAllPositionsCaseInsensitive(e,t),i='<strong class="highlight">',o="</strong>";for(let n=0;n<a.length;n++){t=t.substring(0,a[n])+i+t.substring(a[n],a[n]+e.length)+o+t.substring(a[n]+e.length);for(let t=n+1;t<a.length;t++)a[t]=a[t]+26+9}return t}static get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.call("GET",t,e)}static post(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.call("POST",t,e)}static call(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null===r&&(r={}),"data"in r||(r.data={}),"headers"in r||(r.headers=null),"throttle"in r||(r.throttle=0),"allow_errors"in r||(r.allow_errors=!0),new Promise(((a,i)=>{setTimeout((()=>{0!==n.indexOf("http")&&(n=e.baseUrl()+"/"+n);let o=new XMLHttpRequest;o.open(t,n,!0),"POST"===t&&(!("data"in r)||null===r.data||"object"!=typeof r.data||r.data instanceof FormData||(o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.data=JSON.stringify(r.data)),o.setRequestHeader("X-Requested-With","XMLHttpRequest")),this.x(r.headers)&&Object.entries(r.headers).forEach((t=>{let[e,n]=t;o.setRequestHeader(e,n)})),o.onload=()=>{(4!=o.readyState||!0!==r.allow_errors&&200!=o.status&&304!=o.status)&&(this.isJsonString(o.responseText)?i(this.jsonStringToObject(o.responseText)):i(o.responseText)),this.isJsonString(o.responseText)?a(this.jsonStringToObject(o.responseText)):a(o.responseText)},o.onerror=()=>{i([o.readyState,o.status,o.statusText])},"GET"===t&&o.send(null),"POST"===t&&o.send(r.data)}),r.throttle)}))}static onResizeHorizontal(t){let e,n,r=window.innerWidth;window.addEventListener("resize",(()=>{e=window.innerWidth,e!=r&&(r=e,n&&clearTimeout(n),n=window.setTimeout((()=>{t()}),50))})),t()}static onResizeVertical(t){var e,n,r=window.innerHeight;window.addEventListener("resize",(()=>{(e=window.innerHeight)!=r&&(r=e,n&&clearTimeout(n),n=window.setTimeout((()=>{t()}),50))})),t()}static removeEmpty(t){return this.nx(t)||!Array.isArray(t)?t:t=t.filter((t=>this.x(t)))}static uniqueArray(t){let e={},n=[];for(let r=0;r<t.length;r++)t[r]in e||(n.push(t[r]),e[t[r]]=!0);return n}static powerset(t){return Array.isArray(t)?t.reduce(((t,e)=>t.concat(t.map((t=>[...t,e])))),[[]]):t}static charToInt(t){let e,n,r="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=0;for(e=0,n=(t=t.toUpperCase()).length-1;e<t.length;e+=1,n-=1)a+=Math.pow(26,n)*(r.indexOf(t[e])+1);return a}static intToChar(t){for(var e="",n=1,r=26;(t-=n)>=0;n=r,r*=26)e=String.fromCharCode(parseInt(t%r/n)+65)+e;return e}static slugify(t){return t.toString().toLowerCase().trim().split("ä").join("ae").split("ö").join("oe").split("ü").join("ue").split("ß").join("ss").replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}static incChar(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.intToChar(this.charToInt(t)+e)}static decChar(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.intToChar(this.charToInt(t)-e)}static range(t,e){let n=[],r=typeof t,a=typeof e,i=1;if("undefined"==r||"undefined"==a||r!=a)return null;if(e<t&&(i=-i),"number"==r)for(;i>0?e>=t:e<=t;)n.push(t),t+=i;else{if("string"!=r)return null;if(1!=t.length||1!=e.length)return null;for(t=t.charCodeAt(0),e=e.charCodeAt(0);i>0?e>=t:e<=t;)n.push(String.fromCharCode(t)),t+=i}return n}static dateToWeek(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(t=new Date),t=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),t.setUTCDate(t.getUTCDate()+4-(t.getUTCDay()||7));let e=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t-e)/864e5+1)/7)}static weekToDate(t,e){null==e&&(e=(new Date).getFullYear());let n=new Date;n.setYear(e),n.setDate(1),n.setMonth(0),n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0);let r=n.getDay();r=0===r?7:r;let a=1-r;7-r+1<4&&(a+=7),n=new Date(n.getTime()+24*a*60*60*1e3);let i=6048e5*(t-1),o=n.getTime()+i;return n.setTime(o),n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n}static addDays(t,e){var n=new Date(t);return n.setDate(n.getDate()+e),n}static objectsAreEqual(t,e){var n=this;if(null==t||null==e)return t===e;if(t.constructor!==e.constructor)return!1;if(t instanceof Function)return t===e;if(t instanceof RegExp)return t===e;if(t===e||t.valueOf()===e.valueOf())return!0;if(Array.isArray(t)&&t.length!==e.length)return!1;if(t instanceof Date)return!1;if(!(t instanceof Object))return!1;if(!(e instanceof Object))return!1;var r=Object.keys(t);return Object.keys(e).every((function(t){return-1!==r.indexOf(t)}))&&r.every((function(r){return n.objectsAreEqual(t[r],e[r])}))}static containsObject(t,e){var n;for(n in e)if(e.hasOwnProperty(n)&&this.objectsAreEqual(e[n],t))return!0;return!1}static fadeOut(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return e<=25&&(e=25),new Promise((n=>{t.style.opacity=1,function r(){(t.style.opacity-=25/e)<0?(t.style.display="none",n()):requestAnimationFrame(r)}()}))}static fadeIn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return e<=25&&(e=25),new Promise((n=>{t.style.opacity=0,t.style.display="block",function r(){var a=parseFloat(t.style.opacity);(a+=25/e)>1?n():(t.style.opacity=a,requestAnimationFrame(r))}()}))}static scrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static scrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static closestScrollable(t){let e=t instanceof HTMLElement&&window.getComputedStyle(t).overflowY,n=e&&!(e.includes("hidden")||e.includes("visible"));return t?n&&t.scrollHeight>=t.clientHeight?t:this.closestScrollable(t.parentNode)||document.scrollingElement||document.body:null}static offsetTop(t){return t.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop}static offsetLeft(t){return t.getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft}static offsetRight(t){return t.getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft+t.offsetWidth}static offsetBottom(t){return t.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop+t.offsetHeight}static offsetTopWithMargin(t){return this.offsetTop(t)-parseInt(getComputedStyle(t).marginTop)}static offsetLeftWithMargin(t){return this.offsetLeft(t)-parseInt(getComputedStyle(t).marginLeft)}static offsetRightWithMargin(t){return this.offsetRight(t)+parseInt(getComputedStyle(t).marginRight)}static offsetBottomWithMargin(t){return this.offsetBottom(t)+parseInt(getComputedStyle(t).marginBottom)}static documentHeight(){return Math.max(document.body.offsetHeight,document.body.scrollHeight,document.documentElement.clientHeight,document.documentElement.offsetHeight,document.documentElement.scrollHeight)}static documentWidth(){return document.documentElement.clientWidth||document.body.clientWidth}static windowWidth(){return window.innerWidth}static windowHeight(){return window.innerHeight}static windowWidthWithoutScrollbar(){return document.documentElement.clientWidth||document.body.clientWidth}static windowHeightWithoutScrollbar(){return document.documentElement.clientHeight||document.body.clientHeight}static outerWidthWithMargin(t){return t.offsetWidth+parseInt(getComputedStyle(t).marginLeft)+parseInt(getComputedStyle(t).marginRight)}static outerHeightWithMargin(t){return t.offsetHeight+parseInt(getComputedStyle(t).marginTop)+parseInt(getComputedStyle(t).marginBottom)}static scrollTo(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((o=>{null===r&&(r=document.scrollingElement||document.documentElement),e.isNumeric(t)||(t=r===(document.scrollingElement||documentElement)?this.offsetTopWithMargin(t):t.getBoundingClientRect().top-parseInt(getComputedStyle(t).marginTop)-(r.getBoundingClientRect().top-r.scrollTop-parseInt(getComputedStyle(r).marginTop)));let l=0;Array.isArray(a)||(a=[a]),a.forEach((t=>{e.isNumeric(t)?l+=t:null!==t&&"fixed"===window.getComputedStyle(t).position&&(l+=-1*t.offsetHeight)})),t+=l;const s=r.scrollTop,c=t-s,d=+new Date,u=function(){const e=+new Date-d;var a,i,l;r.scrollTop=parseInt((a=e,i=s,l=c,(a/=n/2)<1?-l/2*(Math.sqrt(1-a*a)-1)+i:(a-=2,l/2*(Math.sqrt(1-a*a)+1)+i))),e<n?requestAnimationFrame(u):(r.scrollTop=t,o())};!0===i&&c>0?o():u()}))}static loadJs(t){e.isArray(t)||(t=[t]);let n=[];return e.loop(t,((t,e)=>{n.push(new Promise(((e,n)=>{let r=document.createElement("script");r.src=t,r.onload=()=>{e()},document.head.appendChild(r)})))})),Promise.all(n)}static async loadJsSequentially(t){e.isArray(t)||(t=[t]);for(let n of t)await e.loadJs(n)}static triggerAfterAllImagesLoaded(t,e,n){window.addEventListener("load",(r=>{null!==document.querySelector(t+" "+e)&&document.querySelectorAll(t+" "+e).forEach((r=>{this.triggerAfterAllImagesLoadedBindLoadEvent(r,t,e,n)}))})),document.addEventListener("DOMContentLoaded",(()=>{null!==document.querySelector(t)&&new MutationObserver((r=>{r.forEach((r=>{"childList"===r.type&&r.addedNodes.length>0?r.addedNodes.forEach((r=>{this.triggerAfterAllImagesLoadedHandleEl(r,t,e,n)})):"attributes"===r.type&&"src"===r.attributeName&&r.target.classList.contains(e.replace(".",""))&&r.oldValue!==r.target.getAttribute("src")&&this.triggerAfterAllImagesLoadedHandleEl(r.target,t,e,n)}))})).observe(document.querySelector(t),{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeOldValue:!0,characterDataOldValue:!1})}))}static triggerAfterAllImagesLoadedHandleEl(t,e,n,r){t.nodeType===Node.ELEMENT_NODE&&(t.classList.remove("loaded-img"),t.closest(e).classList.remove("loaded-all"),t.classList.contains("binded-trigger")||(t.classList.add("binded-trigger"),t.addEventListener("load",(()=>{this.triggerAfterAllImagesLoadedBindLoadEvent(t,e,n,r)}))))}static triggerAfterAllImagesLoadedBindLoadEvent(t,e,n,r){t.classList.add("loaded-img"),t.closest(e).querySelectorAll(".loaded-img").length===t.closest(e).querySelectorAll(n).length&&(t.closest(e).classList.add("loaded-all"),r())}static isVisible(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}static isVisibleInViewport(t){if(!this.isVisible(t))return!1;let e=t.getBoundingClientRect();return!(e.bottom<0||e.right<0||e.left>window.innerWidth||e.top>window.innerHeight)}static textareaAutoHeight(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";this.textareaSetHeights(t),this.onResizeHorizontal((()=>{this.textareaSetHeights(t)})),[].forEach.call(document.querySelectorAll(t),(t=>{t.addEventListener("keyup",(t=>{this.textareaSetHeight(t.target)}))}))}static textareaSetHeights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";[].forEach.call(document.querySelectorAll(t),(t=>{this.isVisible(t)&&this.textareaSetHeight(t)}))}static textareaSetHeight(t){t.style.height="5px",t.style.height=t.scrollHeight+"px"}static real100vh(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(null===t){let t=()=>{let t=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(t,"px"))};t(),window.addEventListener("resize",(()=>{t()}))}else{let n=()=>{console.log(t),null!==document.querySelector(t)&&document.querySelectorAll(t).forEach((t=>{t.style.height=window.innerHeight*(e/100)+"px"}))};n(),window.addEventListener("resize",(()=>{n()}))}}static iOsRemoveHover(){"safari"===e.getBrowser()&&"desktop"!==e.getDevice()&&e.on("touchend","a",((t,e)=>{e.click()}))}static isNumeric(t){return!isNaN(parseFloat(t))&&isFinite(t)}static animate(t,n,r,a,i){return new Promise((o=>{i<=50&&(i=50);let l=[];n.split(";").forEach((t=>{l.push(t.split(":")[0].trim())}));let s=[];l.forEach((t=>{s.push(t+" "+Math.round(i/1e3*10)/10+"s "+a)})),s="transition: "+s.join(", ")+" !important;";let c=null;NodeList.prototype.isPrototypeOf(t)?c=Array.from(t):null===t?(console.log("cannot animate element from "+n+" to "+r+" because it does not exist"),o()):c=[t];let d=c.length;c.forEach(((t,a)=>{let c=e.random_string(10,"abcdefghijklmnopqrstuvwxyz");t.classList.add(c),window.requestAnimationFrame((()=>{let a=[],u=t.getAttribute("style");null!==u&&u.split(";").forEach((t=>{l.includes(t.split(":")[0].trim())||a.push(t)})),a=a.join(";")+n+";",t.setAttribute("style",a),window.requestAnimationFrame((()=>{let a=document.createElement("style");a.innerHTML="."+c+" { "+s+" }",document.head.appendChild(a),window.requestAnimationFrame((()=>{if(t.setAttribute("style",t.getAttribute("style").replace(n+";","")+r+";"),this.isVisible(t)){let n=!1;e.addEventListenerOnce(t,"transitionend",(e=>{if(n=!0,e.target!==e.currentTarget)return!1;document.head.removeChild(a),t.classList.remove(c),d--,d<=0&&window.requestAnimationFrame((()=>{o()}))})),setTimeout((()=>{!1===n&&(document.head.removeChild(a),t.classList.remove(c),d--,d<=0&&o())}),1.5*i)}else document.head.removeChild(a),t.classList.remove(c),d--,d<=0&&o()}))}))}))}))}))}static addEventListenerOnce(t,e,n,r,a){t.addEventListener(e,(function i(o){!1!==n.apply(this,arguments,r)&&t.removeEventListener(e,i,a)}))}static htmlDecode(t){let e=document.createElement("textarea");return e.innerHTML=t,e.value}static htmlEncode(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/`/g,"&#96;")}static nl2br(t){if(null==t)return"";return(t+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1<br/>")}static br2nl(t){if(null==t)return"";return t.replace(/<\s*\/?br\s*[\/]?>/gi,"\n")}static closest(t,e){if(!document.documentElement.contains(t))return null;do{if(this.matches(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}static matches(t,e){let n=t,r=(n.parentNode||n.document).querySelectorAll(e),a=-1;for(;r[++a]&&r[a]!=n;);return!!r[a]}static wrap(t,e){if(null===t)return;let n=(new DOMParser).parseFromString(e,"text/html").body.childNodes[0];t.parentNode.insertBefore(n,t.nextSibling),n.appendChild(t)}static wrapTextNodes(t,e){null!==t&&Array.from(t.childNodes).filter((t=>3===t.nodeType&&t.textContent.trim().length>1)).forEach((t=>{const n=document.createElement(e);t.after(n),n.appendChild(t)}))}static html2dom(t){let e=document.createElement("template");return t=t.trim(),e.innerHTML=t,void 0===e.content?this.html2domLegacy(t):e.content.firstChild}static html2domLegacy(t){var e,n,r,a={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]},i=document,o=i.createDocumentFragment();if(/<|&#?\w+;/.test(t)){for(e=o.appendChild(i.createElement("div")),n=a[(/<([\w:]+)/.exec(t)||["",""])[1].toLowerCase()]||a._default,e.innerHTML=n[1]+t.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1></$2>")+n[2],r=n[0];r--;)e=e.lastChild;for(o.removeChild(o.firstChild);e.firstChild;)o.appendChild(e.firstChild)}else o.appendChild(i.createTextNode(t));return o.querySelector("*")}static prev(t,e){let n=t.previousElementSibling;return null===n?null:void 0===e||this.matches(n,e)?n:null}static next(t,e){let n=t.nextElementSibling;return null===n?null:void 0===e||this.matches(n,e)?n:null}static prevAll(t,e){let n=[];for(;t=t.previousElementSibling;)(void 0===e||this.matches(t,e))&&n.push(t);return n}static nextAll(t,e){let n=[];for(;t=t.nextElementSibling;)(void 0===e||this.matches(t,e))&&n.push(t);return n}static prevUntil(t,e){let n=[];for(;(t=t.previousElementSibling)&&!this.matches(t,e);)n.push(t);return n}static nextUntil(t,e){let n=[];for(;(t=t.nextElementSibling)&&!this.matches(t,e);)n.push(t);return n}static siblings(t,e){let n=[],r=t;for(t=t.parentNode.firstChild;t=t.nextElementSibling;)(void 0===e||this.matches(t,e))&&r!==t&&n.push(t);return n}static parents(t,e){let n=[],r=void 0!==e;for(;null!==(t=t.parentElement);)t.nodeType===Node.ELEMENT_NODE&&(r&&!this.matches(t,e)||n.push(t));return n}static css(t){let e=document.styleSheets,n={};for(let r in e)try{let a=e[r].rules||e[r].cssRules;for(let e in a)this.matches(t,a[e].selectorText)&&(n=Object.assign(n,this.css2json(a[e].style),this.css2json(t.getAttribute("style"))))}catch(t){}return n}static css2json(t){let e={};if(!t)return e;if(t instanceof CSSStyleDeclaration)for(let n in t)t[n].toLowerCase&&void 0!==t[t[n]]&&(e[t[n].toLowerCase()]=t[t[n]]);else if("string"==typeof t){t=t.split(";");for(let n in t)if(t[n].indexOf(":")>-1){let r=t[n].split(":");e[r[0].toLowerCase().trim()]=r[1].trim()}}return e}static compareDates(t,e){return"string"==typeof t&&(t=t.split(" ").join("T")),"string"==typeof e&&(e=e.split(" ").join("T")),t=new Date(t),e=new Date(e),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()?0:t<e?-1:1}static spaceship(t,e){return null===t||null===e||typeof t!=typeof e?null:"string"==typeof t?t.localeCompare(e):t>e?1:t<e?-1:0}static focus(t){e.unfocus();let n=null;if(n="string"==typeof t||t instanceof String?document.querySelector(t):t,null!==n){let t=document.createElement("div");t.classList.add("hlp-focus-mask"),t.style.position="fixed",t.style.top=0,t.style.bottom=0,t.style.left=0,t.style.right=0,t.style.backgroundColor="rgba(0,0,0,0.8)",t.style.zIndex=2147483646,n.before(t),n.setAttribute("data-focussed",1),n.setAttribute("data-focussed-orig-z-index",n.style.zIndex),n.setAttribute("data-focussed-orig-position",n.style.position),n.setAttribute("data-focussed-orig-background-color",n.style.backgroundColor),n.setAttribute("data-focussed-orig-box-shadow",n.style.boxShadow),n.style.zIndex=2147483647,n.style.position="relative",n.style.backgroundColor="#ffffff",n.style.boxShadow="0px 0px 0px 20px #fff"}}static unfocus(){null!==document.querySelector(".hlp-focus-mask")&&document.querySelectorAll(".hlp-focus-mask").forEach((t=>{e.remove(t)})),null!==document.querySelector("[data-focussed]")&&document.querySelectorAll("[data-focussed]").forEach((t=>{t.style.zIndex=t.getAttribute("data-focussed-orig-z-index"),t.style.position=t.getAttribute("data-focussed-orig-position"),t.style.backgroundColor=t.getAttribute("data-focussed-orig-background-color"),t.style.boxShadow=t.getAttribute("data-focussed-orig-box-shadow"),t.removeAttribute("data-focussed"),t.removeAttribute("data-focussed-orig-z-index"),t.removeAttribute("data-focussed-orig-position"),t.removeAttribute("data-focussed-orig-background-color"),t.removeAttribute("data-focussed-orig-box-shadow")}))}static remove(t){null!==t&&t.parentNode.removeChild(t)}static on(t,n,r){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===a?(a=r,r=document):r=document.querySelector(r),r.addEventListener(t,(t=>{var r=e.closest(t.target,n);r&&a(t,r)}),!1)}static url(){return window.location.protocol+"//"+window.location.host+window.location.pathname}static urlWithHash(){return window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.hash}static fullUrl(){return window.location.href}static urlWithArgs(){return window.location.href.split("#")[0]}static baseUrl(){return window.location.protocol+"//"+window.location.host}static urlProtocol(){return window.location.protocol+"//"}static urlHost(){return window.location.host}static urlHostTopLevel(){let t=window.location.host;if(t.match(/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/))return t;for(t=t.split(".");t.length>2;)t.shift();return t=t.join("."),t}static urlPath(){return window.location.pathname}static urlHash(){return window.location.hash}static urlArgs(){return window.location.search}static urlOfScript(){if(document.currentScript)return document.currentScript.src;{let t=document.getElementsByTagName("script");return t[t.length-1].src}}static pathOfScript(){let t=this.urlOfScript();return t.substring(0,t.lastIndexOf("/"))}static waitUntil(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(((r,a)=>{let i=setInterval((()=>{null!==document.querySelector(t)&&(null===e||null===n&&void 0!==window.getComputedStyle(document.querySelector(t))[e]&&""!=window.getComputedStyle(document.querySelector(t))[e]||null!==n&&window.getComputedStyle(document.querySelector(t))[e]===n)&&(window.clearInterval(i),r())}),30)}))}static waitUntilVar(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null,a=null;return null===e?(r=t,a=window):(r=e,a=t),new Promise(((t,e)=>{let i=setInterval((()=>{void 0!==a[r]&&null!==a[r]&&(null!==n&&a[r]!==n||(window.clearInterval(i),t()))}),30)}))}static ready(){return new Promise((t=>{if("loading"!==document.readyState)return t();document.addEventListener("DOMContentLoaded",(()=>t()))}))}static load(){return new Promise((t=>{if("complete"===document.readyState)return t();window.addEventListener("load",(()=>t()))}))}static runForEl(t,n){e.ready().then((()=>{let r=e.pushId();null!==document.querySelector(t)&&document.querySelectorAll(t).forEach((t=>{void 0===t.runForEl&&(t.runForEl=[]),t.runForEl.includes(r)||(t.runForEl.push(r),n(t))})),void 0===window.runForEl_queue&&(window.runForEl_queue=[]),void 0===window.runForEl_observer&&(window.runForEl_observer=new MutationObserver((t=>{t.forEach((t=>{if(t.addedNodes)for(let e=0;e<t.addedNodes.length;e++){let n=t.addedNodes[e];n.nodeType===Node.ELEMENT_NODE&&window.runForEl_queue.forEach((t=>{n.matches(t.selector)&&(void 0===n.runForEl&&(n.runForEl=[]),n.runForEl.includes(t.id)||(n.runForEl.push(t.id),t.callback(n))),null!==n.querySelector(t.selector)&&n.querySelectorAll(t.selector).forEach((e=>{void 0===e.runForEl&&(e.runForEl=[]),e.runForEl.includes(t.id)||(e.runForEl.push(t.id),t.callback(e))}))}))}}))})).observe(document.body,{attributes:!1,childList:!0,characterData:!1,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})),window.runForEl_queue.push({id:r,selector:t,callback:n})}))}static fmath(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,a={"*":e*n,"-":e-n,"+":e+n,"/":e/n}[t];return Math.round(10*a*Math.pow(10,r))/(10*Math.pow(10,r))}static trim(t,e){let n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),r=0,a=0;for(t+="",e&&(n=(e+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),r=t.length,a=0;a<r;a++)if(-1===n.indexOf(t.charAt(a))){t=t.substring(a);break}for(r=t.length,a=r-1;a>=0;a--)if(-1===n.indexOf(t.charAt(a))){t=t.substring(0,a+1);break}return-1===n.indexOf(t.charAt(0))?t:""}static ltrim(t,e){e=e?(e+"").replace(/([[\]().?/*{}+$^:])/g,"$1"):" \\s ";const n=new RegExp("^["+e+"]+","g");return(t+"").replace(n,"")}static rtrim(t,e){e=e?(e+"").replace(/([[\]().?/*{}+$^:])/g,"\\$1"):" \\s ";const n=new RegExp("["+e+"]+$","g");return(t+"").replace(n,"")}static pushId(){let n=null;void 0!==window&&(void 0===window.pushIdDataGlobal&&(window.pushIdDataGlobal={}),n=window.pushIdDataGlobal),void 0!==t&&(void 0===t.pushIdDataGlobal&&(t.pushIdDataGlobal={}),n=t.pushIdDataGlobal),e.objectsAreEqual(n,{})&&(n.lastPushTime=0,n.lastRandChars=[],n.PUSH_CHARS="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz");let r=(new Date).getTime(),a=r===n.lastPushTime;n.lastPushTime=r;let i=new Array(8);for(var o=7;o>=0;o--)i[o]=n.PUSH_CHARS.charAt(r%64),r=Math.floor(r/64);if(0!==r)throw new Error;let l=i.join("");if(a){for(o=11;o>=0&&63===n.lastRandChars[o];o--)n.lastRandChars[o]=0;n.lastRandChars[o]++}else for(o=0;o<12;o++)n.lastRandChars[o]=Math.floor(64*Math.random());for(o=0;o<12;o++)l+=n.PUSH_CHARS.charAt(n.lastRandChars[o]);if(20!=l.length)throw new Error;return l}static getProp(t,e){let n=e.split(".");for(;n.length&&(t=t[n.shift()]););return t}static base64toblob(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=atob(t),r=[];for(let t=0;t<n.length;t+=512){let e=n.slice(t,t+512),a=new Array(e.length);for(let t=0;t<e.length;t++)a[t]=e.charCodeAt(t);let i=new Uint8Array(a);r.push(i)}return new Blob(r,{type:e})}static blobtobase64(t){return new Promise((e=>{let n=new FileReader;n.onload=()=>{var t=n.result.split(",")[1];e(t)},n.readAsDataURL(t)}))}static stringtoblob(t){return new Blob([t],{type:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})}static blobtostring(t){return new Promise((e=>{let n=new FileReader;n.onload=()=>{e(n.result)},n.readAsText(t)}))}static filetobase64(t){return new Promise(((e,n)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>e(r.result.split(",")[1]),r.onerror=t=>n(t)}))}static blobtofile(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file.txt",n=null;try{n=new File([t],e)}catch{n=new Blob([t],e)}return n}static filetoblob(t){return new Blob([t])}static base64tofile(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"file.txt";return this.blobtofile(this.base64toblob(t,e),n)}static blobtourl(t){return URL.createObjectURL(t,{type:"text/plain"})}static stringtourl(t){return this.blobtourl(this.stringtoblob(t))}static base64tostring(t){return atob(t)}static stringtobase64(t){return btoa(t)}static base64tourl(t){return this.blobtourl(this.base64toblob(t))}static filetourl(t){return this.blobtourl(this.filetoblob(t))}static getImageOrientation(t){return new Promise(((e,n)=>{t=t.replace("data:image/jpeg;base64,","");let r=this.base64tofile(t),a=new FileReader;a.onload=t=>{var n=new DataView(t.target.result);if(65496==n.getUint16(0,!1)){for(var r=n.byteLength,a=2;a<r;){if(n.getUint16(a+2,!1)<=8)return void e(-1);var i=n.getUint16(a,!1);if(a+=2,65505==i){if(1165519206!=n.getUint32(a+=2,!1))return void e(-1);var o=18761==n.getUint16(a+=6,!1);a+=n.getUint32(a+4,o);var l=n.getUint16(a,o);a+=2;for(var s=0;s<l;s++)if(274==n.getUint16(a+12*s,o))return void e(n.getUint16(a+12*s+8,o))}else{if(65280!=(65280&i))break;a+=n.getUint16(a,!1)}}e(-1)}else e(-2)},a.readAsArrayBuffer(r)}))}static resetImageOrientation(t,e){return new Promise(((n,r)=>{var a=new Image;a.onload=()=>{var t=a.width,r=a.height,i=document.createElement("canvas"),o=i.getContext("2d");switch(4<e&&e<9?(i.width=r,i.height=t):(i.width=t,i.height=r),e){case 2:o.transform(-1,0,0,1,t,0);break;case 3:o.transform(-1,0,0,-1,t,r);break;case 4:o.transform(1,0,0,-1,0,r);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,r,0);break;case 7:o.transform(0,-1,-1,0,r,t);break;case 8:o.transform(0,-1,1,0,0,t)}o.drawImage(a,0,0);let l=i.toDataURL();l="data:image/jpeg;base64,"+l.split(",")[1],n(l)},a.src=t}))}static fixImageOrientation(t){return new Promise(((e,n)=>{-1!==t.indexOf("data:")?(0===t.indexOf("data:image/jpeg;base64,")&&(t=t.replace("data:image/jpeg;base64,","")),this.getImageOrientation(t).then((n=>{t="data:image/jpeg;base64,"+t,n<=1?e(t):this.resetImageOrientation(t,n).then((t=>{e(t)}))}))):e(t)}))}static debounce(t,e,n){var r;return function(){var a=this,i=arguments,o=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(a,i)}),e),o&&t.apply(a,i)}}static throttle(t,e,n){var r,a,i,o=null,l=0;n||(n={});var s=function(){l=!1===n.leading?0:Date.now(),o=null,i=t.apply(r,a),o||(r=a=null)};return function(){var c=Date.now();l||!1!==n.leading||(l=c);var d=e-(c-l);return r=this,a=arguments,d<=0||d>e?(o&&(clearTimeout(o),o=null),l=c,i=t.apply(r,a),o||(r=a=null)):o||!1===n.trailing||(o=setTimeout(s,d)),i}}static shuffle(t){let e,n,r=t.length;for(;0!==r;)n=Math.floor(Math.random()*r),r-=1,e=t[r],t[r]=t[n],t[n]=e;return t}static findRecursiveInObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(null!==t&&"object"==typeof t)for(const[i,o]of Object.entries(t))if(null!==o&&"object"==typeof o)this.findRecursiveInObject(o,e,n,(""===r?"":r+".")+i,a);else if(!(null!==e&&i!==e||null!==n&&o!==n)){a.push(r);break}return a}}n.default=e,"undefined"!=typeof window&&(window.hlp={},Object.getOwnPropertyNames(e).forEach(((t,n)=>{"length"!==t&&"name"!==t&&"prototype"!==t&&"caller"!==t&&"arguments"!==t&&(window.hlp[t]=e[t])})))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lanimate",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "main": "_build/script.js",
5
5
  "files": [
6
6
  "_build/*.js",
@@ -21,24 +21,25 @@
21
21
  "prod": "npm-run-all --parallel js"
22
22
  },
23
23
  "dependencies": {
24
- "@babel/runtime": "^7.16.7",
25
- "hlp": "^3.2.1",
24
+ "@babel/runtime": "^7.22.15",
25
+ "hlp": "^3.3.3",
26
26
  "mdn-polyfills": "^5.20.0",
27
27
  "onchange": "^7.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@babel/cli": "^7.16.8",
31
- "@babel/core": "^7.16.12",
30
+ "@babel/cli": "^7.22.15",
31
+ "@babel/core": "^7.22.15",
32
32
  "@babel/plugin-proposal-class-properties": "^7.16.7",
33
33
  "@babel/plugin-proposal-optional-chaining": "^7.16.7",
34
- "@babel/plugin-transform-runtime": "^7.16.10",
34
+ "@babel/plugin-proposal-private-methods": "^7.18.6",
35
+ "@babel/plugin-transform-runtime": "^7.22.15",
35
36
  "@babel/polyfill": "^7.11.5",
36
- "@babel/preset-env": "^7.16.11",
37
- "auto-changelog": "^2.3.0",
37
+ "@babel/preset-env": "^7.22.15",
38
+ "auto-changelog": "^2.4.0",
38
39
  "babelify": "^10.0.0",
39
40
  "browserify": "^17.0.0",
40
41
  "npm-run-all": "^4.1.5",
41
- "terser": "^5.10.0"
42
+ "terser": "^5.19.4"
42
43
  },
43
44
  "browserslist": [
44
45
  "ie >= 11",