uikit 3.11.2-dev.7dd548556 → 3.11.2-dev.93483bd3e
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/CHANGELOG.md +32 -18
- package/dist/css/uikit-core-rtl.css +80 -186
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +80 -186
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +82 -192
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +82 -192
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +3 -3
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +6 -8
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +31 -60
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +34 -64
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +108 -72
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +108 -72
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +75 -28
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +108 -72
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +57 -21
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +12 -14
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2 -2
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +4 -4
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +271 -287
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +507 -458
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +2 -11
- package/src/js/api/hooks.js +1 -1
- package/src/js/api/state.js +3 -3
- package/src/js/components/countdown.js +2 -2
- package/src/js/components/filter.js +2 -3
- package/src/js/components/internal/lightbox-animations.js +4 -3
- package/src/js/components/internal/slider-preload.js +37 -0
- package/src/js/components/internal/slider-transitioner.js +2 -2
- package/src/js/components/internal/slideshow-animations.js +4 -3
- package/src/js/components/lightbox-panel.js +34 -58
- package/src/js/components/lightbox.js +3 -4
- package/src/js/components/slider.js +30 -11
- package/src/js/components/slideshow.js +8 -1
- package/src/js/components/sortable.js +8 -8
- package/src/js/components/upload.js +3 -3
- package/src/js/core/accordion.js +3 -3
- package/src/js/core/alert.js +1 -2
- package/src/js/core/height-match.js +3 -3
- package/src/js/core/img.js +132 -115
- package/src/js/core/modal.js +1 -2
- package/src/js/core/navbar.js +5 -5
- package/src/js/core/scrollspy.js +6 -6
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/svg.js +10 -6
- package/src/js/core/toggle.js +4 -3
- package/src/js/mixin/internal/animate-slide.js +9 -12
- package/src/js/mixin/parallax.js +108 -72
- package/src/js/mixin/slider-drag.js +3 -3
- package/src/js/mixin/slider-nav.js +2 -2
- package/src/js/mixin/slider.js +8 -16
- package/src/js/mixin/slideshow.js +2 -2
- package/src/js/mixin/togglable.js +1 -2
- package/src/js/util/ajax.js +9 -12
- package/src/js/util/animation.js +7 -12
- package/src/js/util/attr.js +11 -9
- package/src/js/util/dom.js +27 -45
- package/src/js/util/lang.js +7 -6
- package/src/js/util/options.js +2 -11
- package/src/js/util/player.js +5 -4
- package/src/js/util/position.js +2 -2
- package/src/js/util/selector.js +12 -18
- package/src/js/util/style.js +4 -4
- package/src/less/components/base.less +10 -33
- package/src/less/components/form-range.less +52 -97
- package/src/less/components/form.less +0 -1
- package/src/less/components/leader.less +0 -1
- package/src/less/components/lightbox.less +0 -1
- package/src/less/components/modal.less +3 -7
- package/src/less/components/progress.less +14 -36
- package/src/less/components/slider.less +0 -3
- package/src/less/components/slideshow.less +0 -3
- package/src/less/components/text.less +16 -32
- package/src/scss/components/base.scss +10 -33
- package/src/scss/components/form-range.scss +52 -97
- package/src/scss/components/form.scss +0 -1
- package/src/scss/components/leader.scss +0 -1
- package/src/scss/components/lightbox.scss +0 -1
- package/src/scss/components/modal.scss +3 -7
- package/src/scss/components/progress.scss +14 -36
- package/src/scss/components/slider.scss +0 -3
- package/src/scss/components/slideshow.scss +0 -3
- package/src/scss/components/text.scss +16 -32
- package/src/scss/mixins-theme.scss +1 -1
- package/src/scss/mixins.scss +1 -1
- package/src/scss/variables-theme.scss +3 -3
- package/src/scss/variables.scss +3 -3
- package/tests/align.html +10 -10
- package/tests/animation.html +2 -2
- package/tests/article.html +2 -2
- package/tests/base.html +3 -3
- package/tests/card.html +10 -10
- package/tests/column.html +3 -3
- package/tests/comment.html +9 -9
- package/tests/dotnav.html +3 -3
- package/tests/image.html +296 -64
- package/tests/images/image-type.avif +0 -0
- package/tests/images/image-type.jpeg +0 -0
- package/tests/images/image-type.webp +0 -0
- package/tests/index.html +8 -8
- package/tests/lightbox.html +10 -10
- package/tests/marker.html +2 -2
- package/tests/modal.html +8 -9
- package/tests/navbar.html +2 -2
- package/tests/overlay.html +7 -7
- package/tests/parallax.html +14 -5
- package/tests/position.html +12 -12
- package/tests/slidenav.html +12 -12
- package/tests/slider.html +20 -20
- package/tests/sortable.html +1 -1
- package/tests/sticky-parallax.html +47 -62
- package/tests/svg.html +6 -6
- package/tests/table.html +11 -11
- package/tests/thumbnav.html +12 -12
- package/tests/transition.html +30 -30
- package/tests/utility.html +33 -33
- package/tests/video.html +1 -1
- package/tests/width.html +1 -1
- package/src/js/util/promise.js +0 -0
- package/tests/images/animated.gif +0 -0
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.93483bd3e | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function startsWith(str, search) {
|
|
32
|
-
return str.startsWith(search);
|
|
32
|
+
return str == null ? void 0 : str.startsWith == null ? void 0 : str.startsWith(search);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
function endsWith(str, search) {
|
|
36
|
-
return str.endsWith(search);
|
|
36
|
+
return str == null ? void 0 : str.endsWith == null ? void 0 : str.endsWith(search);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function includes(obj, search) {
|
|
40
|
-
return obj
|
|
40
|
+
return obj == null ? void 0 : obj.includes == null ? void 0 : obj.includes(search);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
function findIndex(array, predicate) {
|
|
44
|
-
return array.findIndex(predicate);
|
|
44
|
+
return array == null ? void 0 : array.findIndex == null ? void 0 : array.findIndex(predicate);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const { isArray, from: toArray } = Array;
|
|
@@ -130,14 +130,15 @@
|
|
|
130
130
|
return element && (isNode(element) ? [element] : Array.from(element).filter(isNode)) || [];
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
function toWindow(element) {
|
|
133
|
+
function toWindow(element) {var _element;
|
|
134
134
|
if (isWindow(element)) {
|
|
135
135
|
return element;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
element = toNode(element);
|
|
139
|
+
const document = isDocument(element) ? element : (_element = element) == null ? void 0 : _element.ownerDocument;
|
|
139
140
|
|
|
140
|
-
return
|
|
141
|
+
return (document == null ? void 0 : document.defaultView) || window;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
function toMs(time) {
|
|
@@ -224,7 +225,7 @@
|
|
|
224
225
|
},
|
|
225
226
|
|
|
226
227
|
contain(dimensions, maxDimensions) {
|
|
227
|
-
dimensions =
|
|
228
|
+
dimensions = { ...dimensions };
|
|
228
229
|
|
|
229
230
|
each(
|
|
230
231
|
dimensions,
|
|
@@ -304,17 +305,17 @@
|
|
|
304
305
|
if (isUndefined(value)) {var _toNode;
|
|
305
306
|
return (_toNode = toNode(element)) == null ? void 0 : _toNode.getAttribute(name);
|
|
306
307
|
} else {
|
|
307
|
-
toNodes(element)
|
|
308
|
+
for (const el of toNodes(element)) {
|
|
308
309
|
if (isFunction(value)) {
|
|
309
|
-
value = value.call(
|
|
310
|
+
value = value.call(el, attr(el, name));
|
|
310
311
|
}
|
|
311
312
|
|
|
312
313
|
if (value === null) {
|
|
313
|
-
removeAttr(
|
|
314
|
+
removeAttr(el, name);
|
|
314
315
|
} else {
|
|
315
|
-
|
|
316
|
+
el.setAttribute(name, value);
|
|
316
317
|
}
|
|
317
|
-
}
|
|
318
|
+
}
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
|
|
@@ -323,10 +324,12 @@
|
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
function removeAttr(element, name) {
|
|
326
|
-
|
|
327
|
-
name.split(' ')
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
const elements = toNodes(element);
|
|
328
|
+
for (const attribute of name.split(' ')) {
|
|
329
|
+
for (const element of elements) {
|
|
330
|
+
element.removeAttribute(attribute);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
330
333
|
}
|
|
331
334
|
|
|
332
335
|
function data(element, attribute) {
|
|
@@ -337,19 +340,6 @@
|
|
|
337
340
|
}
|
|
338
341
|
}
|
|
339
342
|
|
|
340
|
-
const inBrowser = typeof window !== 'undefined';
|
|
341
|
-
const isRtl = inBrowser && attr(document.documentElement, 'dir') === 'rtl';
|
|
342
|
-
|
|
343
|
-
const hasTouch = inBrowser && 'ontouchstart' in window;
|
|
344
|
-
const hasPointerEvents = inBrowser && window.PointerEvent;
|
|
345
|
-
|
|
346
|
-
const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
347
|
-
const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
348
|
-
const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
349
|
-
const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
|
|
350
|
-
const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
|
|
351
|
-
const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
|
|
352
|
-
|
|
353
343
|
const voidElements = {
|
|
354
344
|
area: true,
|
|
355
345
|
base: true,
|
|
@@ -449,12 +439,6 @@
|
|
|
449
439
|
return findAll(selector, getContext(selector, context));
|
|
450
440
|
}
|
|
451
441
|
|
|
452
|
-
function getContext(selector, context) {if (context === void 0) {context = document;}
|
|
453
|
-
return isString(selector) && isContextSelector(selector) || isDocument(context) ?
|
|
454
|
-
context :
|
|
455
|
-
context.ownerDocument;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
442
|
function find(selector, context) {
|
|
459
443
|
return toNode(_query(selector, context, 'querySelector'));
|
|
460
444
|
}
|
|
@@ -463,6 +447,17 @@
|
|
|
463
447
|
return toNodes(_query(selector, context, 'querySelectorAll'));
|
|
464
448
|
}
|
|
465
449
|
|
|
450
|
+
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
451
|
+
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
452
|
+
|
|
453
|
+
function getContext(selector, context) {if (context === void 0) {context = document;}
|
|
454
|
+
return isString(selector) && isContextSelector(selector) || isDocument(context) ?
|
|
455
|
+
context :
|
|
456
|
+
context.ownerDocument;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
460
|
+
|
|
466
461
|
function _query(selector, context, queryFn) {if (context === void 0) {context = document;}
|
|
467
462
|
if (!selector || !isString(selector)) {
|
|
468
463
|
return selector;
|
|
@@ -507,11 +502,6 @@
|
|
|
507
502
|
}
|
|
508
503
|
}
|
|
509
504
|
|
|
510
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
511
|
-
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
512
|
-
|
|
513
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
514
|
-
|
|
515
505
|
const selectorRe = /.*?[^\\](?:,|$)/g;
|
|
516
506
|
|
|
517
507
|
const splitSelector = memoize((selector) =>
|
|
@@ -537,13 +527,8 @@
|
|
|
537
527
|
return names.join(' > ');
|
|
538
528
|
}
|
|
539
529
|
|
|
540
|
-
const escapeFn =
|
|
541
|
-
inBrowser && window.CSS && CSS.escape ||
|
|
542
|
-
function (css) {
|
|
543
|
-
return css.replace(/([^\x7f-\uFFFF\w-])/g, (match) => "\\" + match);
|
|
544
|
-
};
|
|
545
530
|
function escape(css) {
|
|
546
|
-
return isString(css) ?
|
|
531
|
+
return isString(css) ? CSS.escape(css) : '';
|
|
547
532
|
}
|
|
548
533
|
|
|
549
534
|
function on() {for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}
|
|
@@ -686,17 +671,14 @@
|
|
|
686
671
|
}
|
|
687
672
|
|
|
688
673
|
function ajax(url, options) {
|
|
689
|
-
const env =
|
|
690
|
-
{
|
|
674
|
+
const env = {
|
|
691
675
|
data: null,
|
|
692
676
|
method: 'GET',
|
|
693
677
|
headers: {},
|
|
694
678
|
xhr: new XMLHttpRequest(),
|
|
695
679
|
beforeSend: noop,
|
|
696
|
-
responseType: ''
|
|
697
|
-
|
|
698
|
-
options);
|
|
699
|
-
|
|
680
|
+
responseType: '',
|
|
681
|
+
...options };
|
|
700
682
|
|
|
701
683
|
return Promise.resolve().
|
|
702
684
|
then(() => env.beforeSend(env)).
|
|
@@ -775,7 +757,8 @@
|
|
|
775
757
|
|
|
776
758
|
|
|
777
759
|
function css(element, property, value, priority) {if (priority === void 0) {priority = '';}
|
|
778
|
-
|
|
760
|
+
const elements = toNodes(element);
|
|
761
|
+
for (const element of elements) {
|
|
779
762
|
if (isString(property)) {
|
|
780
763
|
property = propName(property);
|
|
781
764
|
|
|
@@ -801,9 +784,8 @@
|
|
|
801
784
|
priority = value;
|
|
802
785
|
each(property, (value, property) => css(element, property, value, priority));
|
|
803
786
|
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
})[0];
|
|
787
|
+
}
|
|
788
|
+
return elements[0];
|
|
807
789
|
}
|
|
808
790
|
|
|
809
791
|
function getStyles(element, pseudoElt) {
|
|
@@ -930,16 +912,11 @@
|
|
|
930
912
|
|
|
931
913
|
|
|
932
914
|
addClass(element, 'uk-transition');
|
|
933
|
-
css(
|
|
934
|
-
element,
|
|
935
|
-
assign(
|
|
936
|
-
{
|
|
915
|
+
css(element, {
|
|
937
916
|
transitionProperty: Object.keys(props).map(propName).join(','),
|
|
938
917
|
transitionDuration: duration + "ms",
|
|
939
|
-
transitionTimingFunction: timing
|
|
940
|
-
|
|
941
|
-
props));
|
|
942
|
-
|
|
918
|
+
transitionTimingFunction: timing,
|
|
919
|
+
...props });
|
|
943
920
|
|
|
944
921
|
})));
|
|
945
922
|
|
|
@@ -1198,8 +1175,8 @@
|
|
|
1198
1175
|
|
|
1199
1176
|
const calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
|
|
1200
1177
|
const parseCalc = memoize((calc) => calc.toString().replace(/\s/g, '').match(calcRe) || []);
|
|
1201
|
-
const unitRe = /(?:v[hw]|%)$/;
|
|
1202
|
-
const parseUnit = memoize((str) => (str.match(unitRe) || [])[0]);
|
|
1178
|
+
const unitRe$1 = /(?:v[hw]|%)$/;
|
|
1179
|
+
const parseUnit = memoize((str) => (str.match(unitRe$1) || [])[0]);
|
|
1203
1180
|
|
|
1204
1181
|
function percent(base, value) {
|
|
1205
1182
|
return base * toFloat(value) / 100;
|
|
@@ -1214,6 +1191,10 @@
|
|
|
1214
1191
|
once(document, 'DOMContentLoaded', fn);
|
|
1215
1192
|
}
|
|
1216
1193
|
|
|
1194
|
+
function isTag(element, tagName) {var _element$tagName;
|
|
1195
|
+
return (element == null ? void 0 : (_element$tagName = element.tagName) == null ? void 0 : _element$tagName.toLowerCase()) === tagName.toLowerCase();
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1217
1198
|
function empty(element) {
|
|
1218
1199
|
return replaceChildren(element, '');
|
|
1219
1200
|
}
|
|
@@ -1222,34 +1203,20 @@
|
|
|
1222
1203
|
return isUndefined(html) ? $(parent).innerHTML : replaceChildren(parent, html);
|
|
1223
1204
|
}
|
|
1224
1205
|
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
function prepend(parent, element) {
|
|
1232
|
-
const nodes = $$(element);
|
|
1233
|
-
$(parent).prepend(...nodes);
|
|
1234
|
-
return nodes;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
function append(parent, element) {
|
|
1238
|
-
const nodes = $$(element);
|
|
1239
|
-
$(parent).append(...nodes);
|
|
1240
|
-
return nodes;
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
function before(ref, element) {
|
|
1244
|
-
const nodes = $$(element);
|
|
1245
|
-
$(ref).before(...nodes);
|
|
1246
|
-
return nodes;
|
|
1247
|
-
}
|
|
1206
|
+
const replaceChildren = applyFn('replaceChildren');
|
|
1207
|
+
const prepend = applyFn('prepend');
|
|
1208
|
+
const append = applyFn('append');
|
|
1209
|
+
const before = applyFn('before');
|
|
1210
|
+
const after = applyFn('after');
|
|
1248
1211
|
|
|
1249
|
-
function
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1212
|
+
function applyFn(fn) {
|
|
1213
|
+
return function (ref, element) {
|
|
1214
|
+
const nodes = toNodes(isString(element) ? fragment(element) : element);
|
|
1215
|
+
if (nodes.length) {
|
|
1216
|
+
$(ref)[fn](...nodes);
|
|
1217
|
+
}
|
|
1218
|
+
return unwrapSingle(nodes);
|
|
1219
|
+
};
|
|
1253
1220
|
}
|
|
1254
1221
|
|
|
1255
1222
|
function remove$1(element) {
|
|
@@ -1282,29 +1249,21 @@
|
|
|
1282
1249
|
toNodes(element).
|
|
1283
1250
|
map(parent).
|
|
1284
1251
|
filter((value, index, self) => self.indexOf(value) === index).
|
|
1285
|
-
forEach((parent) =>
|
|
1286
|
-
before(parent, parent.childNodes);
|
|
1287
|
-
remove$1(parent);
|
|
1288
|
-
});
|
|
1252
|
+
forEach((parent) => parent.replaceWith(...parent.childNodes));
|
|
1289
1253
|
}
|
|
1290
1254
|
|
|
1291
|
-
const fragmentRe = /^\s*<(\w+|!)[^>]*>/;
|
|
1292
|
-
const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
|
|
1293
|
-
|
|
1294
1255
|
function fragment(html) {
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
const container = document.createElement('div');
|
|
1301
|
-
if (fragmentRe.test(html)) {
|
|
1302
|
-
container.insertAdjacentHTML('beforeend', html.trim());
|
|
1303
|
-
} else {
|
|
1304
|
-
container.textContent = html;
|
|
1256
|
+
const template = document.createElement('template');
|
|
1257
|
+
template.innerHTML = html.trim();
|
|
1258
|
+
const nodes = toNodes(template.content.childNodes);
|
|
1259
|
+
for (const node of nodes) {
|
|
1260
|
+
document.adoptNode(node);
|
|
1305
1261
|
}
|
|
1262
|
+
return unwrapSingle(nodes);
|
|
1263
|
+
}
|
|
1306
1264
|
|
|
1307
|
-
|
|
1265
|
+
function unwrapSingle(nodes) {
|
|
1266
|
+
return nodes.length > 1 ? nodes : nodes[0];
|
|
1308
1267
|
}
|
|
1309
1268
|
|
|
1310
1269
|
function apply(node, fn) {
|
|
@@ -1333,6 +1292,19 @@
|
|
|
1333
1292
|
return isString(str) && startsWith(str.trim(), '<');
|
|
1334
1293
|
}
|
|
1335
1294
|
|
|
1295
|
+
const inBrowser = typeof window !== 'undefined';
|
|
1296
|
+
const isRtl = inBrowser && attr(document.documentElement, 'dir') === 'rtl';
|
|
1297
|
+
|
|
1298
|
+
const hasTouch = inBrowser && 'ontouchstart' in window;
|
|
1299
|
+
const hasPointerEvents = inBrowser && window.PointerEvent;
|
|
1300
|
+
|
|
1301
|
+
const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
1302
|
+
const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
1303
|
+
const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
1304
|
+
const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
|
|
1305
|
+
const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
|
|
1306
|
+
const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
|
|
1307
|
+
|
|
1336
1308
|
/*
|
|
1337
1309
|
Based on:
|
|
1338
1310
|
Copyright (c) 2016 Wilson Page wilsonpage@me.com
|
|
@@ -1524,7 +1496,7 @@
|
|
|
1524
1496
|
|
|
1525
1497
|
// extend strategy
|
|
1526
1498
|
strats.computed = strats.methods = function (parentVal, childVal) {
|
|
1527
|
-
return childVal ? parentVal ?
|
|
1499
|
+
return childVal ? parentVal ? { ...parentVal, ...childVal } : childVal : parentVal;
|
|
1528
1500
|
};
|
|
1529
1501
|
|
|
1530
1502
|
// data strategy
|
|
@@ -1664,11 +1636,11 @@
|
|
|
1664
1636
|
}
|
|
1665
1637
|
|
|
1666
1638
|
function isHTML5(el) {
|
|
1667
|
-
return (el
|
|
1639
|
+
return isTag(el, 'video');
|
|
1668
1640
|
}
|
|
1669
1641
|
|
|
1670
1642
|
function isIFrame(el) {
|
|
1671
|
-
return (el
|
|
1643
|
+
return isTag(el, 'iframe') && (isYoutube(el) || isVimeo(el));
|
|
1672
1644
|
}
|
|
1673
1645
|
|
|
1674
1646
|
function isYoutube(el) {
|
|
@@ -1688,7 +1660,7 @@
|
|
|
1688
1660
|
|
|
1689
1661
|
function post(el, cmd) {
|
|
1690
1662
|
try {
|
|
1691
|
-
el.contentWindow.postMessage(JSON.stringify(
|
|
1663
|
+
el.contentWindow.postMessage(JSON.stringify({ event: 'command', ...cmd }), '*');
|
|
1692
1664
|
} catch (e) {
|
|
1693
1665
|
// noop
|
|
1694
1666
|
}
|
|
@@ -1980,14 +1952,14 @@
|
|
|
1980
1952
|
if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) {
|
|
1981
1953
|
position[align] = newVal;
|
|
1982
1954
|
|
|
1983
|
-
['element', 'target']
|
|
1955
|
+
for (const el of ['element', 'target']) {
|
|
1984
1956
|
if (elemOffset) {
|
|
1985
1957
|
flipped[el][dir] =
|
|
1986
1958
|
flipped[el][dir] === dirs[prop][1] ?
|
|
1987
1959
|
dirs[prop][2] :
|
|
1988
1960
|
dirs[prop][1];
|
|
1989
1961
|
}
|
|
1990
|
-
}
|
|
1962
|
+
}
|
|
1991
1963
|
|
|
1992
1964
|
return true;
|
|
1993
1965
|
}
|
|
@@ -2068,6 +2040,7 @@
|
|
|
2068
2040
|
flipPosition: flipPosition,
|
|
2069
2041
|
toPx: toPx,
|
|
2070
2042
|
ready: ready,
|
|
2043
|
+
isTag: isTag,
|
|
2071
2044
|
empty: empty,
|
|
2072
2045
|
html: html,
|
|
2073
2046
|
replaceChildren: replaceChildren,
|
|
@@ -2362,7 +2335,7 @@
|
|
|
2362
2335
|
const {
|
|
2363
2336
|
$options: { computed } } =
|
|
2364
2337
|
this;
|
|
2365
|
-
const values =
|
|
2338
|
+
const values = { ...this._computeds };
|
|
2366
2339
|
this._computeds = {};
|
|
2367
2340
|
|
|
2368
2341
|
for (const key in computed) {
|
|
@@ -2449,9 +2422,9 @@
|
|
|
2449
2422
|
}
|
|
2450
2423
|
};
|
|
2451
2424
|
|
|
2452
|
-
UIkit.prototype._initEvents = function () {
|
|
2425
|
+
UIkit.prototype._initEvents = function () {
|
|
2453
2426
|
this._events = [];
|
|
2454
|
-
(
|
|
2427
|
+
for (const event of this.$options.events || []) {
|
|
2455
2428
|
if (hasOwn(event, 'handler')) {
|
|
2456
2429
|
registerEvent(this, event);
|
|
2457
2430
|
} else {
|
|
@@ -2459,7 +2432,7 @@
|
|
|
2459
2432
|
registerEvent(this, event[key], key);
|
|
2460
2433
|
}
|
|
2461
2434
|
}
|
|
2462
|
-
}
|
|
2435
|
+
}
|
|
2463
2436
|
};
|
|
2464
2437
|
|
|
2465
2438
|
UIkit.prototype._unbindEvents = function () {
|
|
@@ -2547,7 +2520,7 @@
|
|
|
2547
2520
|
el = isFunction(el) ? el.call(component) : el || component.$el;
|
|
2548
2521
|
|
|
2549
2522
|
if (isArray(el)) {
|
|
2550
|
-
el.forEach((el) => registerEvent(component,
|
|
2523
|
+
el.forEach((el) => registerEvent(component, { ...event, el }, key));
|
|
2551
2524
|
return;
|
|
2552
2525
|
}
|
|
2553
2526
|
|
|
@@ -2781,7 +2754,7 @@
|
|
|
2781
2754
|
}
|
|
2782
2755
|
};
|
|
2783
2756
|
|
|
2784
|
-
const opt = isPlainObject(options) ?
|
|
2757
|
+
const opt = isPlainObject(options) ? { ...options } : options.options;
|
|
2785
2758
|
|
|
2786
2759
|
opt.name = name;
|
|
2787
2760
|
|
|
@@ -2834,7 +2807,7 @@
|
|
|
2834
2807
|
UIkit.data = '__uikit__';
|
|
2835
2808
|
UIkit.prefix = 'uk-';
|
|
2836
2809
|
UIkit.options = {};
|
|
2837
|
-
UIkit.version = '3.11.2-dev.
|
|
2810
|
+
UIkit.version = '3.11.2-dev.93483bd3e';
|
|
2838
2811
|
|
|
2839
2812
|
globalAPI(UIkit);
|
|
2840
2813
|
hooksAPI(UIkit);
|
|
@@ -3157,7 +3130,7 @@
|
|
|
3157
3130
|
show ?
|
|
3158
3131
|
Transition.start(
|
|
3159
3132
|
el,
|
|
3160
|
-
|
|
3133
|
+
{ ...initProps, overflow: 'hidden', height: endHeight },
|
|
3161
3134
|
Math.round(duration * (1 - currentHeight / endHeight)),
|
|
3162
3135
|
transition) :
|
|
3163
3136
|
|
|
@@ -3277,37 +3250,37 @@
|
|
|
3277
3250
|
return;
|
|
3278
3251
|
}
|
|
3279
3252
|
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3253
|
+
for (const el of items) {
|
|
3254
|
+
this.toggleElement(el, !hasClass(el, this.clsOpen), async (el, show) => {
|
|
3255
|
+
toggleClass(el, this.clsOpen, show);
|
|
3256
|
+
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3284
3257
|
|
|
3285
|
-
|
|
3258
|
+
const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
|
|
3286
3259
|
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3260
|
+
if (animate === false || !this.hasTransition) {
|
|
3261
|
+
hide(content, !show);
|
|
3262
|
+
return;
|
|
3263
|
+
}
|
|
3291
3264
|
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3265
|
+
if (!el._wrapper) {
|
|
3266
|
+
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3267
|
+
}
|
|
3295
3268
|
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3269
|
+
hide(content, false);
|
|
3270
|
+
await toggleHeight(this)(el._wrapper, show);
|
|
3271
|
+
hide(content, !show);
|
|
3299
3272
|
|
|
3300
|
-
|
|
3301
|
-
|
|
3273
|
+
delete el._wrapper;
|
|
3274
|
+
unwrap(content);
|
|
3302
3275
|
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3276
|
+
if (show) {
|
|
3277
|
+
const toggle = $(this.$props.toggle, el);
|
|
3278
|
+
if (!isInView(toggle)) {
|
|
3279
|
+
scrollIntoView(toggle, { offset: this.offset });
|
|
3280
|
+
}
|
|
3307
3281
|
}
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3311
3284
|
} } };
|
|
3312
3285
|
|
|
3313
3286
|
|
|
@@ -3329,7 +3302,7 @@
|
|
|
3329
3302
|
animation: [true],
|
|
3330
3303
|
selClose: '.uk-alert-close',
|
|
3331
3304
|
duration: 150,
|
|
3332
|
-
hideProps:
|
|
3305
|
+
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3333
3306
|
|
|
3334
3307
|
|
|
3335
3308
|
events: [
|
|
@@ -4290,9 +4263,9 @@
|
|
|
4290
4263
|
},
|
|
4291
4264
|
|
|
4292
4265
|
write(_ref2) {let { rows } = _ref2;
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4266
|
+
for (const { heights, elements } of rows) {
|
|
4267
|
+
elements.forEach((el, i) => css(el, 'minHeight', heights[i]));
|
|
4268
|
+
}
|
|
4296
4269
|
},
|
|
4297
4270
|
|
|
4298
4271
|
events: ['resize'] } };
|
|
@@ -4486,6 +4459,12 @@
|
|
|
4486
4459
|
|
|
4487
4460
|
methods: {
|
|
4488
4461
|
async getSvg() {
|
|
4462
|
+
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
4463
|
+
return new Promise((resolve) =>
|
|
4464
|
+
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
4465
|
+
|
|
4466
|
+
}
|
|
4467
|
+
|
|
4489
4468
|
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
|
|
4490
4469
|
},
|
|
4491
4470
|
|
|
@@ -4585,7 +4564,7 @@
|
|
|
4585
4564
|
}
|
|
4586
4565
|
|
|
4587
4566
|
function insertSVG(el, root) {
|
|
4588
|
-
if (isVoidElement(root) || root
|
|
4567
|
+
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
4589
4568
|
root.hidden = true;
|
|
4590
4569
|
|
|
4591
4570
|
const next = root.nextElementSibling;
|
|
@@ -4597,11 +4576,7 @@
|
|
|
4597
4576
|
}
|
|
4598
4577
|
|
|
4599
4578
|
function equals(el, other) {
|
|
4600
|
-
return
|
|
4601
|
-
}
|
|
4602
|
-
|
|
4603
|
-
function isSVG(el) {
|
|
4604
|
-
return (el == null ? void 0 : el.tagName) === 'svg';
|
|
4579
|
+
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
4605
4580
|
}
|
|
4606
4581
|
|
|
4607
4582
|
function innerHTML(el) {
|
|
@@ -4788,120 +4763,95 @@
|
|
|
4788
4763
|
return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
|
|
4789
4764
|
}
|
|
4790
4765
|
|
|
4766
|
+
const nativeLazyLoad = ('loading' in HTMLImageElement.prototype);
|
|
4767
|
+
const nativeIsIntersecting = ('isIntersecting' in IntersectionObserverEntry.prototype); // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
|
|
4768
|
+
|
|
4791
4769
|
var img = {
|
|
4792
4770
|
args: 'dataSrc',
|
|
4793
4771
|
|
|
4794
4772
|
props: {
|
|
4795
4773
|
dataSrc: String,
|
|
4796
|
-
|
|
4797
|
-
sizes: String,
|
|
4798
|
-
width: Number,
|
|
4799
|
-
height: Number,
|
|
4774
|
+
sources: String,
|
|
4800
4775
|
offsetTop: String,
|
|
4801
4776
|
offsetLeft: String,
|
|
4802
|
-
target: String
|
|
4777
|
+
target: String,
|
|
4778
|
+
loading: String },
|
|
4803
4779
|
|
|
4804
4780
|
|
|
4805
4781
|
data: {
|
|
4806
4782
|
dataSrc: '',
|
|
4807
|
-
|
|
4808
|
-
sizes: false,
|
|
4809
|
-
width: false,
|
|
4810
|
-
height: false,
|
|
4783
|
+
sources: false,
|
|
4811
4784
|
offsetTop: '50vh',
|
|
4812
4785
|
offsetLeft: '50vw',
|
|
4813
|
-
target: false
|
|
4786
|
+
target: false,
|
|
4787
|
+
loading: 'lazy' },
|
|
4814
4788
|
|
|
4815
4789
|
|
|
4816
4790
|
computed: {
|
|
4817
|
-
cacheKey(_ref) {let { dataSrc } = _ref;
|
|
4818
|
-
return this.$name + "." + dataSrc;
|
|
4819
|
-
},
|
|
4820
|
-
|
|
4821
|
-
width(_ref2) {let { width, dataWidth } = _ref2;
|
|
4822
|
-
return width || dataWidth;
|
|
4823
|
-
},
|
|
4824
|
-
|
|
4825
|
-
height(_ref3) {let { height, dataHeight } = _ref3;
|
|
4826
|
-
return height || dataHeight;
|
|
4827
|
-
},
|
|
4828
|
-
|
|
4829
|
-
sizes(_ref4) {let { sizes, dataSizes } = _ref4;
|
|
4830
|
-
return sizes || dataSizes;
|
|
4831
|
-
},
|
|
4832
|
-
|
|
4833
|
-
isImg(_, $el) {
|
|
4834
|
-
return isImg($el);
|
|
4835
|
-
},
|
|
4836
|
-
|
|
4837
4791
|
target: {
|
|
4838
|
-
get(
|
|
4792
|
+
get(_ref) {let { target } = _ref;
|
|
4839
4793
|
return [this.$el, ...queryAll(target, this.$el)];
|
|
4840
4794
|
},
|
|
4841
4795
|
|
|
4842
4796
|
watch() {
|
|
4843
4797
|
this.observe();
|
|
4844
|
-
} },
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
offsetTop(_ref6) {let { offsetTop } = _ref6;
|
|
4848
|
-
return toPx(offsetTop, 'height');
|
|
4849
|
-
},
|
|
4798
|
+
} } },
|
|
4850
4799
|
|
|
4851
|
-
offsetLeft(_ref7) {let { offsetLeft } = _ref7;
|
|
4852
|
-
return toPx(offsetLeft, 'width');
|
|
4853
|
-
} },
|
|
4854
4800
|
|
|
4855
4801
|
|
|
4856
4802
|
connected() {
|
|
4857
|
-
if (!window.IntersectionObserver) {
|
|
4858
|
-
|
|
4803
|
+
if (this.loading !== 'lazy' || !window.IntersectionObserver || !nativeIsIntersecting) {
|
|
4804
|
+
this.load();
|
|
4859
4805
|
return;
|
|
4860
4806
|
}
|
|
4861
4807
|
|
|
4862
|
-
if (
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4808
|
+
if (nativeLazyLoad && isImg(this.$el)) {
|
|
4809
|
+
this.$el.loading = 'lazy';
|
|
4810
|
+
setSrcAttrs(this.$el);
|
|
4811
|
+
|
|
4812
|
+
if (this.target.length === 1) {
|
|
4813
|
+
return;
|
|
4814
|
+
}
|
|
4866
4815
|
}
|
|
4867
4816
|
|
|
4868
|
-
|
|
4869
|
-
rootMargin: this.offsetTop + "px " + this.offsetLeft + "px" });
|
|
4817
|
+
ensureSrcAttribute(this.$el);
|
|
4870
4818
|
|
|
4819
|
+
const rootMargin = toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
4820
|
+
this.offsetLeft,
|
|
4821
|
+
'width') + "px";
|
|
4871
4822
|
|
|
4872
|
-
|
|
4873
|
-
|
|
4823
|
+
this.observer = new IntersectionObserver(
|
|
4824
|
+
(entries) => {
|
|
4825
|
+
if (entries.some((entry) => entry.isIntersecting)) {
|
|
4826
|
+
this.load();
|
|
4827
|
+
this.observer.disconnect();
|
|
4828
|
+
}
|
|
4829
|
+
},
|
|
4830
|
+
{ rootMargin });
|
|
4874
4831
|
|
|
4875
|
-
|
|
4876
|
-
this.observer && this.observer.disconnect();
|
|
4832
|
+
this.observe();
|
|
4877
4833
|
},
|
|
4878
4834
|
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
}
|
|
4835
|
+
disconnected() {var _this$observer;
|
|
4836
|
+
if (this._data.image) {
|
|
4837
|
+
this._data.image.onload = '';
|
|
4838
|
+
}
|
|
4884
4839
|
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
}
|
|
4840
|
+
(_this$observer = this.observer) == null ? void 0 : _this$observer.disconnect();
|
|
4841
|
+
},
|
|
4888
4842
|
|
|
4889
|
-
|
|
4843
|
+
update: {
|
|
4844
|
+
write(store) {
|
|
4845
|
+
if (!this.observer || isImg(this.$el)) {
|
|
4890
4846
|
return false;
|
|
4891
4847
|
}
|
|
4892
4848
|
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
(img) => img && img.currentSrc !== '' && setSrcAttrs(this.$el, currentSrc(img)));
|
|
4896
|
-
|
|
4897
|
-
},
|
|
4898
|
-
|
|
4899
|
-
write(data) {
|
|
4900
|
-
if (this.dataSrcset && window.devicePixelRatio !== 1) {
|
|
4849
|
+
const srcset = data(this.$el, 'data-srcset');
|
|
4850
|
+
if (srcset && window.devicePixelRatio !== 1) {
|
|
4901
4851
|
const bgSize = css(this.$el, 'backgroundSize');
|
|
4902
|
-
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) ===
|
|
4903
|
-
|
|
4904
|
-
css(this.$el, 'backgroundSize',
|
|
4852
|
+
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
|
|
4853
|
+
store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
|
|
4854
|
+
css(this.$el, 'backgroundSize', store.bgSize + "px");
|
|
4905
4855
|
}
|
|
4906
4856
|
}
|
|
4907
4857
|
},
|
|
@@ -4910,40 +4860,35 @@
|
|
|
4910
4860
|
|
|
4911
4861
|
|
|
4912
4862
|
methods: {
|
|
4913
|
-
load(
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
!entries.some((entry) => isUndefined(entry.isIntersecting) || entry.isIntersecting))
|
|
4917
|
-
{
|
|
4918
|
-
return;
|
|
4863
|
+
load() {
|
|
4864
|
+
if (this._data.image) {
|
|
4865
|
+
return this._data.image;
|
|
4919
4866
|
}
|
|
4920
4867
|
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
storage[this.cacheKey] = currentSrc(img);
|
|
4925
|
-
return img;
|
|
4926
|
-
},
|
|
4927
|
-
(e) => trigger(this.$el, new e.constructor(e.type, e)));
|
|
4928
|
-
|
|
4868
|
+
const image = isImg(this.$el) ?
|
|
4869
|
+
this.$el :
|
|
4870
|
+
getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
4929
4871
|
|
|
4930
|
-
|
|
4872
|
+
removeAttr(image, 'loading');
|
|
4873
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
4874
|
+
return this._data.image = image;
|
|
4931
4875
|
},
|
|
4932
4876
|
|
|
4933
4877
|
observe() {
|
|
4934
4878
|
if (this._connected && !this._data.image) {
|
|
4935
|
-
|
|
4879
|
+
for (const el of this.target) {
|
|
4880
|
+
this.observer.observe(el);
|
|
4881
|
+
}
|
|
4936
4882
|
}
|
|
4937
4883
|
} } };
|
|
4938
4884
|
|
|
4939
4885
|
|
|
4940
4886
|
|
|
4941
|
-
function setSrcAttrs(el, src
|
|
4887
|
+
function setSrcAttrs(el, src) {
|
|
4942
4888
|
if (isImg(el)) {
|
|
4943
|
-
const
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
set('src', src);
|
|
4889
|
+
const parentNode = parent(el);
|
|
4890
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
4891
|
+
elements.forEach((el) => setSourceProps(el, el));
|
|
4947
4892
|
} else if (src) {
|
|
4948
4893
|
const change = !includes(el.style.backgroundImage, src);
|
|
4949
4894
|
if (change) {
|
|
@@ -4953,16 +4898,60 @@
|
|
|
4953
4898
|
}
|
|
4954
4899
|
}
|
|
4955
4900
|
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4901
|
+
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
4902
|
+
function setSourceProps(sourceEl, targetEl) {
|
|
4903
|
+
srcProps.forEach((prop) => {
|
|
4904
|
+
const value = data(sourceEl, prop);
|
|
4905
|
+
if (value) {
|
|
4906
|
+
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
4907
|
+
}
|
|
4908
|
+
});
|
|
4909
|
+
}
|
|
4962
4910
|
|
|
4911
|
+
function getImageFromElement(el, src, sources) {
|
|
4912
|
+
const img = new Image();
|
|
4913
|
+
|
|
4914
|
+
wrapInPicture(img, sources);
|
|
4915
|
+
setSourceProps(el, img);
|
|
4916
|
+
img.onload = () => setSrcAttrs(el, img.currentSrc);
|
|
4917
|
+
attr(img, 'src', src);
|
|
4918
|
+
return img;
|
|
4919
|
+
}
|
|
4920
|
+
|
|
4921
|
+
function wrapInPicture(img, sources) {
|
|
4922
|
+
sources = parseSources(sources);
|
|
4923
|
+
|
|
4924
|
+
if (sources.length) {
|
|
4925
|
+
const picture = fragment('<picture>');
|
|
4926
|
+
for (const attrs of sources) {
|
|
4927
|
+
const source = fragment('<source>');
|
|
4928
|
+
attr(source, attrs);
|
|
4929
|
+
append(picture, source);
|
|
4930
|
+
}
|
|
4931
|
+
append(picture, img);
|
|
4932
|
+
}
|
|
4933
|
+
}
|
|
4934
|
+
|
|
4935
|
+
function parseSources(sources) {
|
|
4936
|
+
if (!sources) {
|
|
4937
|
+
return [];
|
|
4963
4938
|
}
|
|
4964
4939
|
|
|
4965
|
-
|
|
4940
|
+
if (startsWith(sources, '[')) {
|
|
4941
|
+
try {
|
|
4942
|
+
sources = JSON.parse(sources);
|
|
4943
|
+
} catch (e) {
|
|
4944
|
+
sources = [];
|
|
4945
|
+
}
|
|
4946
|
+
} else {
|
|
4947
|
+
sources = parseOptions(sources);
|
|
4948
|
+
}
|
|
4949
|
+
|
|
4950
|
+
if (!isArray(sources)) {
|
|
4951
|
+
sources = [sources];
|
|
4952
|
+
}
|
|
4953
|
+
|
|
4954
|
+
return sources.filter((source) => !isEmpty(source));
|
|
4966
4955
|
}
|
|
4967
4956
|
|
|
4968
4957
|
const sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;
|
|
@@ -5002,24 +4991,18 @@
|
|
|
5002
4991
|
return descriptors.filter((size) => size >= srcSize)[0] || descriptors.pop() || '';
|
|
5003
4992
|
}
|
|
5004
4993
|
|
|
5005
|
-
function
|
|
5006
|
-
|
|
4994
|
+
function ensureSrcAttribute(el) {
|
|
4995
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
4996
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
4997
|
+
}
|
|
5007
4998
|
}
|
|
5008
4999
|
|
|
5009
|
-
function
|
|
5010
|
-
return el
|
|
5000
|
+
function isPicture(el) {
|
|
5001
|
+
return isTag(el, 'picture');
|
|
5011
5002
|
}
|
|
5012
5003
|
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
// workaround for Safari's private browsing mode and accessing sessionStorage in Blink
|
|
5017
|
-
try {
|
|
5018
|
-
storage = window.sessionStorage || {};
|
|
5019
|
-
storage[key] = 1;
|
|
5020
|
-
delete storage[key];
|
|
5021
|
-
} catch (e) {
|
|
5022
|
-
storage = {};
|
|
5004
|
+
function isImg(el) {
|
|
5005
|
+
return isTag(el, 'img');
|
|
5023
5006
|
}
|
|
5024
5007
|
|
|
5025
5008
|
var Media = {
|
|
@@ -5475,7 +5458,7 @@
|
|
|
5475
5458
|
|
|
5476
5459
|
|
|
5477
5460
|
function openDialog(tmpl, options, hideFn, submitFn) {
|
|
5478
|
-
options =
|
|
5461
|
+
options = { bgClose: false, escClose: true, labels: modal.labels, ...options };
|
|
5479
5462
|
|
|
5480
5463
|
const dialog = modal.dialog(tmpl(options), options);
|
|
5481
5464
|
const deferred = new Deferred();
|
|
@@ -5589,12 +5572,12 @@
|
|
|
5589
5572
|
const dropdowns = $$("." + clsDrop, $el);
|
|
5590
5573
|
|
|
5591
5574
|
if (this.dropContainer !== $el) {
|
|
5592
|
-
$$("." + clsDrop, this.dropContainer)
|
|
5575
|
+
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5593
5576
|
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.target;
|
|
5594
5577
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5595
5578
|
dropdowns.push(el);
|
|
5596
5579
|
}
|
|
5597
|
-
}
|
|
5580
|
+
}
|
|
5598
5581
|
}
|
|
5599
5582
|
|
|
5600
5583
|
return dropdowns;
|
|
@@ -5604,10 +5587,11 @@
|
|
|
5604
5587
|
this.$create(
|
|
5605
5588
|
'drop',
|
|
5606
5589
|
dropdowns.filter((el) => !this.getDropdown(el)),
|
|
5607
|
-
|
|
5590
|
+
{
|
|
5591
|
+
...this.$props,
|
|
5608
5592
|
boundary: this.boundary,
|
|
5609
5593
|
pos: this.pos,
|
|
5610
|
-
offset: this.dropbar || this.offset })
|
|
5594
|
+
offset: this.dropbar || this.offset });
|
|
5611
5595
|
|
|
5612
5596
|
|
|
5613
5597
|
},
|
|
@@ -6296,10 +6280,10 @@
|
|
|
6296
6280
|
|
|
6297
6281
|
|
|
6298
6282
|
disconnected() {
|
|
6299
|
-
this.elements
|
|
6283
|
+
for (const el of this.elements) {
|
|
6300
6284
|
removeClass(el, this.inViewClass, el[stateKey] ? el[stateKey].cls : '');
|
|
6301
6285
|
delete el[stateKey];
|
|
6302
|
-
}
|
|
6286
|
+
}
|
|
6303
6287
|
},
|
|
6304
6288
|
|
|
6305
6289
|
update: [
|
|
@@ -6314,17 +6298,17 @@
|
|
|
6314
6298
|
return false;
|
|
6315
6299
|
}
|
|
6316
6300
|
|
|
6317
|
-
this.elements
|
|
6301
|
+
for (const el of this.elements) {
|
|
6318
6302
|
if (!el[stateKey]) {
|
|
6319
6303
|
el[stateKey] = { cls: data(el, 'uk-scrollspy-class') || this.cls };
|
|
6320
6304
|
}
|
|
6321
6305
|
|
|
6322
6306
|
el[stateKey].show = isInView(el, this.offsetTop, this.offsetLeft);
|
|
6323
|
-
}
|
|
6307
|
+
}
|
|
6324
6308
|
},
|
|
6325
6309
|
|
|
6326
6310
|
write(data) {
|
|
6327
|
-
this.elements
|
|
6311
|
+
for (const el of this.elements) {
|
|
6328
6312
|
const state = el[stateKey];
|
|
6329
6313
|
|
|
6330
6314
|
if (state.show && !state.inview && !state.queued) {
|
|
@@ -6342,7 +6326,7 @@
|
|
|
6342
6326
|
} else if (!state.show && state.inview && !state.queued && this.repeat) {
|
|
6343
6327
|
this.toggle(el, false);
|
|
6344
6328
|
}
|
|
6345
|
-
}
|
|
6329
|
+
}
|
|
6346
6330
|
},
|
|
6347
6331
|
|
|
6348
6332
|
events: ['scroll', 'resize'] }],
|
|
@@ -6645,7 +6629,7 @@
|
|
|
6645
6629
|
margin,
|
|
6646
6630
|
width: dimensions$1(isVisible(this.widthElement) ? this.widthElement : this.$el).
|
|
6647
6631
|
width,
|
|
6648
|
-
top: offsetPosition(
|
|
6632
|
+
top: offsetPosition(referenceElement)[0] };
|
|
6649
6633
|
|
|
6650
6634
|
},
|
|
6651
6635
|
|
|
@@ -7123,7 +7107,7 @@
|
|
|
7123
7107
|
name: 'keydown',
|
|
7124
7108
|
|
|
7125
7109
|
filter() {
|
|
7126
|
-
return includes(this.mode, 'click') && this.$el
|
|
7110
|
+
return includes(this.mode, 'click') && isTag(this.$el, 'input');
|
|
7127
7111
|
},
|
|
7128
7112
|
|
|
7129
7113
|
handler(e) {
|
|
@@ -7205,10 +7189,10 @@
|
|
|
7205
7189
|
const leaving = this.target.filter((el) => hasClass(el, this.clsLeave));
|
|
7206
7190
|
|
|
7207
7191
|
if (leaving.length) {
|
|
7208
|
-
this.target
|
|
7192
|
+
for (const el of this.target) {
|
|
7209
7193
|
const isLeaving = includes(leaving, el);
|
|
7210
7194
|
this.toggleElement(el, isLeaving, isLeaving);
|
|
7211
|
-
}
|
|
7195
|
+
}
|
|
7212
7196
|
return;
|
|
7213
7197
|
}
|
|
7214
7198
|
|
|
@@ -7360,7 +7344,7 @@
|
|
|
7360
7344
|
timespan.days = timespan.hours = timespan.minutes = timespan.seconds = 0;
|
|
7361
7345
|
}
|
|
7362
7346
|
|
|
7363
|
-
this.units
|
|
7347
|
+
for (const unit of this.units) {
|
|
7364
7348
|
let digits = String(Math.floor(timespan[unit]));
|
|
7365
7349
|
|
|
7366
7350
|
digits = digits.length < 2 ? "0" + digits : digits;
|
|
@@ -7375,7 +7359,7 @@
|
|
|
7375
7359
|
|
|
7376
7360
|
digits.forEach((digit, i) => el.children[i].textContent = digit);
|
|
7377
7361
|
}
|
|
7378
|
-
}
|
|
7362
|
+
}
|
|
7379
7363
|
} },
|
|
7380
7364
|
|
|
7381
7365
|
|
|
@@ -7567,7 +7551,7 @@
|
|
|
7567
7551
|
|
|
7568
7552
|
// Reset to previous state
|
|
7569
7553
|
nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
|
|
7570
|
-
css(target,
|
|
7554
|
+
css(target, { display: 'block', ...targetProps });
|
|
7571
7555
|
|
|
7572
7556
|
// Start transitions on next frame
|
|
7573
7557
|
requestAnimationFrame(() => {
|
|
@@ -7599,15 +7583,13 @@
|
|
|
7599
7583
|
const zIndex = css(el, 'zIndex');
|
|
7600
7584
|
|
|
7601
7585
|
return isVisible(el) ?
|
|
7602
|
-
assign(
|
|
7603
7586
|
{
|
|
7604
7587
|
display: '',
|
|
7605
7588
|
opacity: opacity ? css(el, 'opacity') : '0',
|
|
7606
7589
|
pointerEvents: 'none',
|
|
7607
7590
|
position: 'absolute',
|
|
7608
|
-
zIndex: zIndex === 'auto' ? index(el) : zIndex
|
|
7609
|
-
|
|
7610
|
-
getPositionWithMargin(el)) :
|
|
7591
|
+
zIndex: zIndex === 'auto' ? index(el) : zIndex,
|
|
7592
|
+
...getPositionWithMargin(el) } :
|
|
7611
7593
|
|
|
7612
7594
|
false;
|
|
7613
7595
|
}
|
|
@@ -7791,7 +7773,7 @@
|
|
|
7791
7773
|
},
|
|
7792
7774
|
|
|
7793
7775
|
setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
7794
|
-
state =
|
|
7776
|
+
state = { filter: { '': '' }, sort: [], ...state };
|
|
7795
7777
|
|
|
7796
7778
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
7797
7779
|
|
|
@@ -7891,7 +7873,7 @@
|
|
|
7891
7873
|
}
|
|
7892
7874
|
|
|
7893
7875
|
function sortItems(nodes, sort, order) {
|
|
7894
|
-
return
|
|
7876
|
+
return [...nodes].sort(
|
|
7895
7877
|
(a, b) =>
|
|
7896
7878
|
data(a, sort).localeCompare(data(b, sort), undefined, { numeric: true }) * (
|
|
7897
7879
|
order === 'asc' || -1));
|
|
@@ -7930,7 +7912,8 @@
|
|
|
7930
7912
|
return "scale3d(" + value + ", " + value + ", 1)";
|
|
7931
7913
|
}
|
|
7932
7914
|
|
|
7933
|
-
var Animations$1 =
|
|
7915
|
+
var Animations$1 = {
|
|
7916
|
+
...Animations$2,
|
|
7934
7917
|
fade: {
|
|
7935
7918
|
show() {
|
|
7936
7919
|
return [{ opacity: 0 }, { opacity: 1 }];
|
|
@@ -7962,7 +7945,7 @@
|
|
|
7962
7945
|
{ opacity: 1 - percent, transform: scale3d(1 - 0.2 * percent) },
|
|
7963
7946
|
{ opacity: percent, transform: scale3d(1 - 0.2 + 0.2 * percent) }];
|
|
7964
7947
|
|
|
7965
|
-
} } }
|
|
7948
|
+
} } };
|
|
7966
7949
|
|
|
7967
7950
|
function Transitioner$1(prev, next, dir, _ref) {let { animation, easing } = _ref;
|
|
7968
7951
|
const { percent, translate, show = noop } = animation;
|
|
@@ -8107,17 +8090,17 @@
|
|
|
8107
8090
|
|
|
8108
8091
|
|
|
8109
8092
|
created() {
|
|
8110
|
-
['start', 'move', 'end']
|
|
8093
|
+
for (const key of ['start', 'move', 'end']) {
|
|
8111
8094
|
const fn = this[key];
|
|
8112
8095
|
this[key] = (e) => {
|
|
8113
8096
|
const pos = getEventPos(e).x * (isRtl ? -1 : 1);
|
|
8114
8097
|
|
|
8115
|
-
this.prevPos = pos
|
|
8098
|
+
this.prevPos = pos === this.pos ? this.prevPos : this.pos;
|
|
8116
8099
|
this.pos = pos;
|
|
8117
8100
|
|
|
8118
8101
|
fn(e);
|
|
8119
8102
|
};
|
|
8120
|
-
}
|
|
8103
|
+
}
|
|
8121
8104
|
},
|
|
8122
8105
|
|
|
8123
8106
|
events: [
|
|
@@ -8355,7 +8338,7 @@
|
|
|
8355
8338
|
methods: {
|
|
8356
8339
|
updateNav() {
|
|
8357
8340
|
const i = this.getValidIndex();
|
|
8358
|
-
this.navItems
|
|
8341
|
+
for (const el of this.navItems) {
|
|
8359
8342
|
const cmd = data(el, this.attrItem);
|
|
8360
8343
|
|
|
8361
8344
|
toggleClass(el, this.clsActive, toNumber(cmd) === i);
|
|
@@ -8365,7 +8348,7 @@
|
|
|
8365
8348
|
this.finite && (
|
|
8366
8349
|
cmd === 'previous' && i === 0 || cmd === 'next' && i >= this.maxIndex));
|
|
8367
8350
|
|
|
8368
|
-
}
|
|
8351
|
+
}
|
|
8369
8352
|
} } };
|
|
8370
8353
|
|
|
8371
8354
|
var Slider = {
|
|
@@ -8523,20 +8506,13 @@
|
|
|
8523
8506
|
},
|
|
8524
8507
|
|
|
8525
8508
|
_show(prev, next, force) {
|
|
8526
|
-
this._transitioner = this._getTransitioner(
|
|
8527
|
-
prev,
|
|
8528
|
-
next,
|
|
8529
|
-
this.dir,
|
|
8530
|
-
assign(
|
|
8531
|
-
{
|
|
8509
|
+
this._transitioner = this._getTransitioner(prev, next, this.dir, {
|
|
8532
8510
|
easing: force ?
|
|
8533
8511
|
next.offsetWidth < 600 ?
|
|
8534
8512
|
'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */ :
|
|
8535
8513
|
'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */ :
|
|
8536
|
-
this.easing
|
|
8537
|
-
|
|
8538
|
-
this.transitionOptions));
|
|
8539
|
-
|
|
8514
|
+
this.easing,
|
|
8515
|
+
...this.transitionOptions });
|
|
8540
8516
|
|
|
8541
8517
|
|
|
8542
8518
|
if (!force && !prev) {
|
|
@@ -8601,7 +8577,7 @@
|
|
|
8601
8577
|
|
|
8602
8578
|
computed: {
|
|
8603
8579
|
animation(_ref) {let { animation, Animations } = _ref;
|
|
8604
|
-
return
|
|
8580
|
+
return { ...(Animations[animation] || Animations.slide), name: animation };
|
|
8605
8581
|
},
|
|
8606
8582
|
|
|
8607
8583
|
transitionOptions() {
|
|
@@ -8824,28 +8800,20 @@
|
|
|
8824
8800
|
if (type === 'image' || src.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i)) {
|
|
8825
8801
|
try {
|
|
8826
8802
|
const { width, height } = await getImage(src, attrs.srcset, attrs.size);
|
|
8827
|
-
this.setItem(
|
|
8828
|
-
item,
|
|
8829
|
-
createEl('img', assign({ src, width, height, alt }, attrs)));
|
|
8830
|
-
|
|
8803
|
+
this.setItem(item, createEl('img', { src, width, height, alt, ...attrs }));
|
|
8831
8804
|
} catch (e) {
|
|
8832
8805
|
this.setError(item);
|
|
8833
8806
|
}
|
|
8834
8807
|
|
|
8835
8808
|
// Video
|
|
8836
8809
|
} else if (type === 'video' || src.match(/\.(mp4|webm|ogv)($|\?)/i)) {
|
|
8837
|
-
const video = createEl(
|
|
8838
|
-
'video',
|
|
8839
|
-
assign(
|
|
8840
|
-
{
|
|
8810
|
+
const video = createEl('video', {
|
|
8841
8811
|
src,
|
|
8842
8812
|
poster,
|
|
8843
8813
|
controls: '',
|
|
8844
8814
|
playsinline: '',
|
|
8845
|
-
'uk-video': "" + this.videoAutoplay
|
|
8846
|
-
|
|
8847
|
-
attrs));
|
|
8848
|
-
|
|
8815
|
+
'uk-video': "" + this.videoAutoplay,
|
|
8816
|
+
...attrs });
|
|
8849
8817
|
|
|
8850
8818
|
|
|
8851
8819
|
on(video, 'loadedmetadata', () => {
|
|
@@ -8858,17 +8826,12 @@
|
|
|
8858
8826
|
} else if (type === 'iframe' || src.match(/\.(html|php)($|\?)/i)) {
|
|
8859
8827
|
this.setItem(
|
|
8860
8828
|
item,
|
|
8861
|
-
createEl(
|
|
8862
|
-
'iframe',
|
|
8863
|
-
assign(
|
|
8864
|
-
{
|
|
8829
|
+
createEl('iframe', {
|
|
8865
8830
|
src,
|
|
8866
8831
|
frameborder: '0',
|
|
8867
8832
|
allowfullscreen: '',
|
|
8868
|
-
class: 'uk-lightbox-iframe'
|
|
8869
|
-
|
|
8870
|
-
attrs)));
|
|
8871
|
-
|
|
8833
|
+
class: 'uk-lightbox-iframe',
|
|
8834
|
+
...attrs }));
|
|
8872
8835
|
|
|
8873
8836
|
|
|
8874
8837
|
|
|
@@ -8880,19 +8843,14 @@
|
|
|
8880
8843
|
{
|
|
8881
8844
|
this.setItem(
|
|
8882
8845
|
item,
|
|
8883
|
-
createEl(
|
|
8884
|
-
|
|
8885
|
-
assign(
|
|
8886
|
-
{
|
|
8887
|
-
src: "https://www.youtube" + (matches[1] || '') + ".com/embed/" +
|
|
8888
|
-
matches[2] + (
|
|
8846
|
+
createEl('iframe', {
|
|
8847
|
+
src: "https://www.youtube" + (matches[1] || '') + ".com/embed/" + matches[2] + (
|
|
8889
8848
|
matches[3] ? "?" + matches[3] : ''),
|
|
8890
|
-
width: 1920,
|
|
8891
|
-
height: 1080 },
|
|
8892
|
-
|
|
8893
|
-
iframeAttrs,
|
|
8894
|
-
attrs)));
|
|
8895
8849
|
|
|
8850
|
+
width: 1920,
|
|
8851
|
+
height: 1080,
|
|
8852
|
+
...iframeAttrs,
|
|
8853
|
+
...attrs }));
|
|
8896
8854
|
|
|
8897
8855
|
|
|
8898
8856
|
|
|
@@ -8912,19 +8870,14 @@
|
|
|
8912
8870
|
|
|
8913
8871
|
this.setItem(
|
|
8914
8872
|
item,
|
|
8915
|
-
createEl(
|
|
8916
|
-
'iframe',
|
|
8917
|
-
assign(
|
|
8918
|
-
{
|
|
8873
|
+
createEl('iframe', {
|
|
8919
8874
|
src: "https://player.vimeo.com/video/" + matches[1] + (
|
|
8920
8875
|
matches[2] ? "?" + matches[2] : ''),
|
|
8921
8876
|
|
|
8922
8877
|
width,
|
|
8923
|
-
height
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
attrs)));
|
|
8927
|
-
|
|
8878
|
+
height,
|
|
8879
|
+
...iframeAttrs,
|
|
8880
|
+
...attrs }));
|
|
8928
8881
|
|
|
8929
8882
|
|
|
8930
8883
|
} catch (e) {
|
|
@@ -9026,8 +8979,7 @@
|
|
|
9026
8979
|
index = findIndex(items, (_ref2) => {let { source: src } = _ref2;return source === src;});
|
|
9027
8980
|
}
|
|
9028
8981
|
|
|
9029
|
-
this.panel =
|
|
9030
|
-
this.panel || this.$create('lightboxPanel', assign({}, this.$props, { items }));
|
|
8982
|
+
this.panel = this.panel || this.$create('lightboxPanel', { ...this.$props, items });
|
|
9031
8983
|
|
|
9032
8984
|
on(this.panel.$el, 'hidden', () => this.panel = false);
|
|
9033
8985
|
|
|
@@ -9051,9 +9003,9 @@
|
|
|
9051
9003
|
function toItem(el) {
|
|
9052
9004
|
const item = {};
|
|
9053
9005
|
|
|
9054
|
-
['href', 'caption', 'type', 'poster', 'alt', 'attrs']
|
|
9006
|
+
for (const attr of ['href', 'caption', 'type', 'poster', 'alt', 'attrs']) {
|
|
9055
9007
|
item[attr === 'href' ? 'source' : attr] = data(el, attr);
|
|
9056
|
-
}
|
|
9008
|
+
}
|
|
9057
9009
|
|
|
9058
9010
|
item.attrs = parseOptions(item.attrs);
|
|
9059
9011
|
|
|
@@ -9243,39 +9195,35 @@
|
|
|
9243
9195
|
|
|
9244
9196
|
|
|
9245
9197
|
|
|
9246
|
-
function transformFn(prop, el,
|
|
9247
|
-
const unit = getUnit(
|
|
9198
|
+
function transformFn(prop, el, stops) {
|
|
9199
|
+
const unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
|
|
9200
|
+
let transformFn;
|
|
9248
9201
|
|
|
9249
9202
|
if (prop === 'x' || prop === 'y') {
|
|
9250
9203
|
prop = "translate" + ucfirst(prop);
|
|
9204
|
+
transformFn = (stop) => toFloat(toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
|
|
9251
9205
|
}
|
|
9252
9206
|
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
if (steps.length === 1) {
|
|
9256
|
-
steps.unshift(prop === 'scale' ? 1 : 0);
|
|
9207
|
+
if (stops.length === 1) {
|
|
9208
|
+
stops.unshift(prop === 'scale' ? 1 : 0);
|
|
9257
9209
|
}
|
|
9258
9210
|
|
|
9259
|
-
|
|
9260
|
-
let value = getValue(steps, percent);
|
|
9211
|
+
stops = parseStops(stops, transformFn);
|
|
9261
9212
|
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
}
|
|
9265
|
-
|
|
9266
|
-
css.transform += " " + prop + "(" + value + unit + ")";
|
|
9213
|
+
return (css, percent) => {
|
|
9214
|
+
css.transform += " " + prop + "(" + getValue(stops, percent) + unit + ")";
|
|
9267
9215
|
};
|
|
9268
9216
|
}
|
|
9269
9217
|
|
|
9270
|
-
function colorFn(prop, el,
|
|
9271
|
-
if (
|
|
9272
|
-
|
|
9218
|
+
function colorFn(prop, el, stops) {
|
|
9219
|
+
if (stops.length === 1) {
|
|
9220
|
+
stops.unshift(getCssValue(el, prop, ''));
|
|
9273
9221
|
}
|
|
9274
9222
|
|
|
9275
|
-
|
|
9223
|
+
stops = parseStops(stops, (stop) => parseColor(el, stop));
|
|
9276
9224
|
|
|
9277
9225
|
return (css, percent) => {
|
|
9278
|
-
const [start, end, p] =
|
|
9226
|
+
const [start, end, p] = getStop(stops, percent);
|
|
9279
9227
|
const value = start.
|
|
9280
9228
|
map((value, i) => {
|
|
9281
9229
|
value += p * (end[i] - value);
|
|
@@ -9295,85 +9243,83 @@
|
|
|
9295
9243
|
map(toFloat);
|
|
9296
9244
|
}
|
|
9297
9245
|
|
|
9298
|
-
function filterFn(prop, el,
|
|
9299
|
-
if (
|
|
9300
|
-
|
|
9246
|
+
function filterFn(prop, el, stops) {
|
|
9247
|
+
if (stops.length === 1) {
|
|
9248
|
+
stops.unshift(0);
|
|
9301
9249
|
}
|
|
9302
9250
|
|
|
9303
|
-
const unit = getUnit(
|
|
9251
|
+
const unit = getUnit(stops) || { blur: 'px', hue: 'deg' }[prop] || '%';
|
|
9304
9252
|
prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
|
|
9305
|
-
|
|
9253
|
+
stops = parseStops(stops);
|
|
9306
9254
|
|
|
9307
9255
|
return (css, percent) => {
|
|
9308
|
-
const value = getValue(
|
|
9256
|
+
const value = getValue(stops, percent);
|
|
9309
9257
|
css.filter += " " + prop + "(" + (value + unit) + ")";
|
|
9310
9258
|
};
|
|
9311
9259
|
}
|
|
9312
9260
|
|
|
9313
|
-
function cssPropFn(prop, el,
|
|
9314
|
-
if (
|
|
9315
|
-
|
|
9261
|
+
function cssPropFn(prop, el, stops) {
|
|
9262
|
+
if (stops.length === 1) {
|
|
9263
|
+
stops.unshift(getCssValue(el, prop, ''));
|
|
9316
9264
|
}
|
|
9317
9265
|
|
|
9318
|
-
|
|
9266
|
+
stops = parseStops(stops);
|
|
9319
9267
|
|
|
9320
9268
|
return (css, percent) => {
|
|
9321
|
-
css[prop] = getValue(
|
|
9269
|
+
css[prop] = getValue(stops, percent);
|
|
9322
9270
|
};
|
|
9323
9271
|
}
|
|
9324
9272
|
|
|
9325
|
-
function strokeFn(prop, el,
|
|
9326
|
-
if (
|
|
9327
|
-
|
|
9273
|
+
function strokeFn(prop, el, stops) {
|
|
9274
|
+
if (stops.length === 1) {
|
|
9275
|
+
stops.unshift(0);
|
|
9328
9276
|
}
|
|
9329
9277
|
|
|
9330
|
-
const unit = getUnit(
|
|
9331
|
-
|
|
9278
|
+
const unit = getUnit(stops);
|
|
9279
|
+
const length = getMaxPathLength(el);
|
|
9280
|
+
stops = parseStops(stops.reverse(), (stop) => {
|
|
9281
|
+
stop = toFloat(stop);
|
|
9282
|
+
return unit === '%' ? stop * length / 100 : stop;
|
|
9283
|
+
});
|
|
9332
9284
|
|
|
9333
|
-
if (!
|
|
9285
|
+
if (!stops.some((_ref) => {let [value] = _ref;return value;})) {
|
|
9334
9286
|
return noop;
|
|
9335
9287
|
}
|
|
9336
9288
|
|
|
9337
|
-
const length = getMaxPathLength(el);
|
|
9338
9289
|
css(el, 'strokeDasharray', length);
|
|
9339
9290
|
|
|
9340
|
-
if (unit === '%') {
|
|
9341
|
-
steps = steps.map((step) => step * length / 100);
|
|
9342
|
-
}
|
|
9343
|
-
|
|
9344
|
-
steps = steps.reverse();
|
|
9345
|
-
|
|
9346
9291
|
return (css, percent) => {
|
|
9347
|
-
css.strokeDashoffset = getValue(
|
|
9292
|
+
css.strokeDashoffset = getValue(stops, percent);
|
|
9348
9293
|
};
|
|
9349
9294
|
}
|
|
9350
9295
|
|
|
9351
|
-
function backgroundFn(prop, el,
|
|
9352
|
-
if (
|
|
9353
|
-
|
|
9296
|
+
function backgroundFn(prop, el, stops) {
|
|
9297
|
+
if (stops.length === 1) {
|
|
9298
|
+
stops.unshift(0);
|
|
9354
9299
|
}
|
|
9355
9300
|
|
|
9356
9301
|
prop = prop.substr(-1);
|
|
9357
9302
|
const attr = prop === 'y' ? 'height' : 'width';
|
|
9358
|
-
|
|
9303
|
+
stops = parseStops(stops, (stop) => toPx(stop, attr, el));
|
|
9359
9304
|
|
|
9360
9305
|
const bgPos = getCssValue(el, "background-position-" + prop, '');
|
|
9361
9306
|
|
|
9362
9307
|
return getCssValue(el, 'backgroundSize', '') === 'cover' ?
|
|
9363
|
-
backgroundCoverFn(prop, el,
|
|
9364
|
-
setBackgroundPosFn(prop,
|
|
9308
|
+
backgroundCoverFn(prop, el, stops, bgPos, attr) :
|
|
9309
|
+
setBackgroundPosFn(prop, stops, bgPos);
|
|
9365
9310
|
}
|
|
9366
9311
|
|
|
9367
|
-
function backgroundCoverFn(prop, el,
|
|
9312
|
+
function backgroundCoverFn(prop, el, stops, bgPos, attr) {
|
|
9368
9313
|
const dimImage = getBackgroundImageDimensions(el);
|
|
9369
9314
|
|
|
9370
9315
|
if (!dimImage.width) {
|
|
9371
9316
|
return noop;
|
|
9372
9317
|
}
|
|
9373
9318
|
|
|
9374
|
-
const
|
|
9375
|
-
const
|
|
9376
|
-
const
|
|
9319
|
+
const values = stops.map((_ref2) => {let [value] = _ref2;return value;});
|
|
9320
|
+
const min = Math.min(...values);
|
|
9321
|
+
const max = Math.max(...values);
|
|
9322
|
+
const down = values.indexOf(min) < values.indexOf(max);
|
|
9377
9323
|
|
|
9378
9324
|
const diff = max - min;
|
|
9379
9325
|
let pos = (down ? -diff : 0) - (down ? min : max);
|
|
@@ -9398,7 +9344,7 @@
|
|
|
9398
9344
|
|
|
9399
9345
|
const dim = Dimensions.cover(dimImage, dimEl);
|
|
9400
9346
|
|
|
9401
|
-
const fn = setBackgroundPosFn(prop,
|
|
9347
|
+
const fn = setBackgroundPosFn(prop, stops, pos + "px");
|
|
9402
9348
|
return (css, percent) => {
|
|
9403
9349
|
fn(css, percent);
|
|
9404
9350
|
css.backgroundSize = dim.width + "px " + dim.height + "px";
|
|
@@ -9406,9 +9352,9 @@
|
|
|
9406
9352
|
};
|
|
9407
9353
|
}
|
|
9408
9354
|
|
|
9409
|
-
function setBackgroundPosFn(prop,
|
|
9355
|
+
function setBackgroundPosFn(prop, stops, pos) {
|
|
9410
9356
|
return function (css, percent) {
|
|
9411
|
-
css["background-position-" + prop] = "calc(" + pos + " + " + getValue(
|
|
9357
|
+
css["background-position-" + prop] = "calc(" + pos + " + " + getValue(stops, percent) + "px)";
|
|
9412
9358
|
};
|
|
9413
9359
|
}
|
|
9414
9360
|
|
|
@@ -9442,27 +9388,69 @@
|
|
|
9442
9388
|
|
|
9443
9389
|
}
|
|
9444
9390
|
|
|
9445
|
-
function
|
|
9446
|
-
const
|
|
9447
|
-
const
|
|
9391
|
+
function parseStops(stops, fn) {if (fn === void 0) {fn = toFloat;}
|
|
9392
|
+
const result = [];
|
|
9393
|
+
const { length } = stops;
|
|
9394
|
+
for (let i = 0; i < length; i++) {
|
|
9395
|
+
let [value, percent] = isString(stops[i]) ? stops[i].trim().split(' ') : [stops[i]];
|
|
9396
|
+
value = fn(value);
|
|
9397
|
+
percent = percent ? toFloat(percent) / 100 : null;
|
|
9398
|
+
|
|
9399
|
+
if (i === 0) {
|
|
9400
|
+
if (percent === null) {
|
|
9401
|
+
percent = 0;
|
|
9402
|
+
} else if (percent) {
|
|
9403
|
+
result.push([value, 0]);
|
|
9404
|
+
}
|
|
9405
|
+
} else if (i === length - 1) {
|
|
9406
|
+
if (percent === null) {
|
|
9407
|
+
percent = 1;
|
|
9408
|
+
} else if (percent !== 1) {
|
|
9409
|
+
result.push([value, percent]);
|
|
9410
|
+
percent = 1;
|
|
9411
|
+
}
|
|
9412
|
+
}
|
|
9413
|
+
|
|
9414
|
+
result.push([value, percent]);
|
|
9415
|
+
}
|
|
9416
|
+
|
|
9417
|
+
for (let i = 1; i < result.length - 1; i++) {
|
|
9418
|
+
if (result[i][1] === null) {
|
|
9419
|
+
const nextIndex = findIndex(result.slice(i + 1), (_ref3) => {let [, percent] = _ref3;return percent !== null;}) + 1;
|
|
9420
|
+
const percent = (result[i + nextIndex][1] - result[i - 1][1]) / (nextIndex + 1);
|
|
9421
|
+
for (let j = 0; j < nextIndex; j++) {
|
|
9422
|
+
result[i + j][1] = result[i - 1][1] + percent * (j + 1);
|
|
9423
|
+
}
|
|
9424
|
+
i += nextIndex;
|
|
9425
|
+
}
|
|
9426
|
+
}
|
|
9427
|
+
|
|
9428
|
+
return result;
|
|
9429
|
+
}
|
|
9430
|
+
|
|
9431
|
+
function getStop(stops, percent) {
|
|
9432
|
+
const index = findIndex(stops.slice(1), (_ref4) => {let [, targetPercent] = _ref4;return percent <= targetPercent;}) + 1;
|
|
9433
|
+
return [
|
|
9434
|
+
stops[index - 1][0],
|
|
9435
|
+
stops[index][0],
|
|
9436
|
+
(percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])];
|
|
9448
9437
|
|
|
9449
|
-
return steps.
|
|
9450
|
-
slice(index, index + 2).
|
|
9451
|
-
concat(percent === 1 ? 1 : percent % (1 / count) * count);
|
|
9452
9438
|
}
|
|
9453
9439
|
|
|
9454
|
-
function getValue(
|
|
9455
|
-
const [start, end, p] =
|
|
9440
|
+
function getValue(stops, percent) {
|
|
9441
|
+
const [start, end, p] = getStop(stops, percent);
|
|
9456
9442
|
return isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
|
|
9457
9443
|
}
|
|
9458
9444
|
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9445
|
+
const unitRe = /^[\d-]+([^\s]+)/;
|
|
9446
|
+
function getUnit(stops, defaultUnit) {
|
|
9447
|
+
for (const stop of stops) {
|
|
9448
|
+
const match = stop.match == null ? void 0 : stop.match(unitRe);
|
|
9449
|
+
if (match) {
|
|
9450
|
+
return match[1];
|
|
9451
|
+
}
|
|
9452
|
+
}
|
|
9453
|
+
return defaultUnit;
|
|
9466
9454
|
}
|
|
9467
9455
|
|
|
9468
9456
|
function getCssValue(el, prop, value) {
|
|
@@ -9574,6 +9562,42 @@
|
|
|
9574
9562
|
|
|
9575
9563
|
events: ['resize'] } };
|
|
9576
9564
|
|
|
9565
|
+
var SliderPreload = {
|
|
9566
|
+
connected() {
|
|
9567
|
+
if (window.IntersectionObserver) {
|
|
9568
|
+
this.observer = new IntersectionObserver(
|
|
9569
|
+
(entries) => {
|
|
9570
|
+
if (entries.some((entry) => entry.isIntersecting)) {
|
|
9571
|
+
removeLazyLoad(this.getAdjacentSlides());
|
|
9572
|
+
}
|
|
9573
|
+
},
|
|
9574
|
+
{ rootMargin: '50% 50%' });
|
|
9575
|
+
|
|
9576
|
+
this.observer.observe(this.$el);
|
|
9577
|
+
}
|
|
9578
|
+
},
|
|
9579
|
+
|
|
9580
|
+
disconnected() {
|
|
9581
|
+
this.observer && this.observer.disconnect();
|
|
9582
|
+
},
|
|
9583
|
+
|
|
9584
|
+
update: {
|
|
9585
|
+
read() {
|
|
9586
|
+
if (isVisible(this.$el)) {
|
|
9587
|
+
removeLazyLoad(this.getAdjacentSlides());
|
|
9588
|
+
}
|
|
9589
|
+
},
|
|
9590
|
+
|
|
9591
|
+
events: ['resize'] } };
|
|
9592
|
+
|
|
9593
|
+
|
|
9594
|
+
|
|
9595
|
+
function removeLazyLoad(elements) {if (elements === void 0) {elements = [];}
|
|
9596
|
+
for (const el of elements) {
|
|
9597
|
+
el && $$('img[loading="lazy"]', el).forEach((el) => removeAttr(el, 'loading'));
|
|
9598
|
+
}
|
|
9599
|
+
}
|
|
9600
|
+
|
|
9577
9601
|
function Transitioner (prev, next, dir, _ref) {let { center, easing, list } = _ref;
|
|
9578
9602
|
const deferred = new Deferred();
|
|
9579
9603
|
|
|
@@ -9648,7 +9672,7 @@
|
|
|
9648
9672
|
|
|
9649
9673
|
percent = prev ? clamp(percent, -1, 1) : 0;
|
|
9650
9674
|
|
|
9651
|
-
children(list)
|
|
9675
|
+
for (const slide of children(list)) {
|
|
9652
9676
|
const isActive = includes(actives, slide);
|
|
9653
9677
|
const isIn = slide === itemIn;
|
|
9654
9678
|
const isOut = slide === itemOut;
|
|
@@ -9663,7 +9687,7 @@
|
|
|
9663
9687
|
dir,
|
|
9664
9688
|
percent: isOut ? 1 - percent : isIn ? percent : isActive ? 1 : 0 });
|
|
9665
9689
|
|
|
9666
|
-
}
|
|
9690
|
+
}
|
|
9667
9691
|
},
|
|
9668
9692
|
|
|
9669
9693
|
percent() {
|
|
@@ -9740,7 +9764,7 @@
|
|
|
9740
9764
|
}
|
|
9741
9765
|
|
|
9742
9766
|
var slider = {
|
|
9743
|
-
mixins: [Class, Slider, SliderReactive],
|
|
9767
|
+
mixins: [Class, Slider, SliderReactive, SliderPreload],
|
|
9744
9768
|
|
|
9745
9769
|
props: {
|
|
9746
9770
|
center: Boolean,
|
|
@@ -9850,7 +9874,7 @@
|
|
|
9850
9874
|
|
|
9851
9875
|
update: {
|
|
9852
9876
|
write() {
|
|
9853
|
-
this.navItems
|
|
9877
|
+
for (const el of this.navItems) {
|
|
9854
9878
|
const index = toNumber(data(el, this.attrItem));
|
|
9855
9879
|
if (index !== false) {
|
|
9856
9880
|
el.hidden =
|
|
@@ -9858,7 +9882,7 @@
|
|
|
9858
9882
|
index > this.maxIndex ||
|
|
9859
9883
|
this.sets && !includes(this.sets, index);
|
|
9860
9884
|
}
|
|
9861
|
-
}
|
|
9885
|
+
}
|
|
9862
9886
|
|
|
9863
9887
|
if (this.length && !this.dragging && !this.stack.length) {
|
|
9864
9888
|
this.reorder();
|
|
@@ -9866,14 +9890,13 @@
|
|
|
9866
9890
|
}
|
|
9867
9891
|
|
|
9868
9892
|
const actives = this._getTransitioner(this.index).getActives();
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
if (this.clsActivated && (!this.sets || includes(this.sets, toFloat(this.index)))) {
|
|
9874
|
-
this.slides.forEach((slide) =>
|
|
9875
|
-
toggleClass(slide, this.clsActivated || '', includes(actives, slide)));
|
|
9893
|
+
const activeClasses = [
|
|
9894
|
+
this.clsActive,
|
|
9895
|
+
(!this.sets || includes(this.sets, toFloat(this.index))) && this.clsActivated ||
|
|
9896
|
+
''];
|
|
9876
9897
|
|
|
9898
|
+
for (const slide of this.slides) {
|
|
9899
|
+
toggleClass(slide, activeClasses, includes(actives, slide));
|
|
9877
9900
|
}
|
|
9878
9901
|
},
|
|
9879
9902
|
|
|
@@ -9978,6 +10001,25 @@
|
|
|
9978
10001
|
} while (index !== prev);
|
|
9979
10002
|
|
|
9980
10003
|
return index;
|
|
10004
|
+
},
|
|
10005
|
+
|
|
10006
|
+
getAdjacentSlides() {
|
|
10007
|
+
const { width } = dimensions$1(this.list);
|
|
10008
|
+
const left = -width;
|
|
10009
|
+
const right = width * 2;
|
|
10010
|
+
const slideWidth = dimensions$1(this.slides[this.index]).width;
|
|
10011
|
+
const slideLeft = this.center ? width / 2 - slideWidth / 2 : 0;
|
|
10012
|
+
const slides = new Set();
|
|
10013
|
+
for (const i of [-1, 1]) {
|
|
10014
|
+
let currentLeft = slideLeft + (i > 0 ? slideWidth : 0);
|
|
10015
|
+
let j = 0;
|
|
10016
|
+
do {
|
|
10017
|
+
const slide = this.slides[this.getIndex(this.index + i + j++ * i)];
|
|
10018
|
+
currentLeft += dimensions$1(slide).width * i;
|
|
10019
|
+
slides.add(slide);
|
|
10020
|
+
} while (this.slides.length > j && currentLeft > left && currentLeft < right);
|
|
10021
|
+
}
|
|
10022
|
+
return Array.from(slides);
|
|
9981
10023
|
} } };
|
|
9982
10024
|
|
|
9983
10025
|
|
|
@@ -10064,7 +10106,8 @@
|
|
|
10064
10106
|
return isIn(type) ^ dir < 0 ? percent : 1 - percent;
|
|
10065
10107
|
}
|
|
10066
10108
|
|
|
10067
|
-
var Animations =
|
|
10109
|
+
var Animations = {
|
|
10110
|
+
...Animations$2,
|
|
10068
10111
|
fade: {
|
|
10069
10112
|
show() {
|
|
10070
10113
|
return [{ opacity: 0, zIndex: 0 }, { zIndex: -1 }];
|
|
@@ -10153,10 +10196,10 @@
|
|
|
10153
10196
|
{ transform: translate(-30 * percent), zIndex: -1 },
|
|
10154
10197
|
{ transform: translate(100 * (1 - percent)), zIndex: 0 }];
|
|
10155
10198
|
|
|
10156
|
-
} } }
|
|
10199
|
+
} } };
|
|
10157
10200
|
|
|
10158
10201
|
var slideshow = {
|
|
10159
|
-
mixins: [Class, Slideshow, SliderReactive],
|
|
10202
|
+
mixins: [Class, Slideshow, SliderReactive, SliderPreload],
|
|
10160
10203
|
|
|
10161
10204
|
props: {
|
|
10162
10205
|
ratio: String,
|
|
@@ -10199,7 +10242,13 @@
|
|
|
10199
10242
|
height > 0 && css(this.list, 'minHeight', height);
|
|
10200
10243
|
},
|
|
10201
10244
|
|
|
10202
|
-
events: ['resize'] }
|
|
10245
|
+
events: ['resize'] },
|
|
10246
|
+
|
|
10247
|
+
|
|
10248
|
+
methods: {
|
|
10249
|
+
getAdjacentSlides() {
|
|
10250
|
+
return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
|
|
10251
|
+
} } };
|
|
10203
10252
|
|
|
10204
10253
|
var sortable = {
|
|
10205
10254
|
mixins: [Class, Animate],
|
|
@@ -10234,13 +10283,13 @@
|
|
|
10234
10283
|
|
|
10235
10284
|
|
|
10236
10285
|
created() {
|
|
10237
|
-
['init', 'start', 'move', 'end']
|
|
10286
|
+
for (const key of ['init', 'start', 'move', 'end']) {
|
|
10238
10287
|
const fn = this[key];
|
|
10239
10288
|
this[key] = (e) => {
|
|
10240
10289
|
assign(this.pos, getEventPos(e));
|
|
10241
10290
|
fn(e);
|
|
10242
10291
|
};
|
|
10243
|
-
}
|
|
10292
|
+
}
|
|
10244
10293
|
},
|
|
10245
10294
|
|
|
10246
10295
|
events: {
|
|
@@ -10372,7 +10421,7 @@
|
|
|
10372
10421
|
|
|
10373
10422
|
this.touched = new Set([this]);
|
|
10374
10423
|
this.placeholder = placeholder;
|
|
10375
|
-
this.origin =
|
|
10424
|
+
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
10376
10425
|
|
|
10377
10426
|
on(document, pointerMove, this.move);
|
|
10378
10427
|
on(document, pointerUp, this.end);
|
|
@@ -10436,11 +10485,11 @@
|
|
|
10436
10485
|
remove$1(this.drag);
|
|
10437
10486
|
this.drag = null;
|
|
10438
10487
|
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
removeClass(sortable.items, clsPlaceholder, clsItem)
|
|
10442
|
-
|
|
10443
|
-
|
|
10488
|
+
for (const { clsPlaceholder, clsItem } of this.touched) {
|
|
10489
|
+
for (const sortable of this.touched) {
|
|
10490
|
+
removeClass(sortable.items, clsPlaceholder, clsItem);
|
|
10491
|
+
}
|
|
10492
|
+
}
|
|
10444
10493
|
this.touched = null;
|
|
10445
10494
|
removeClass(document.documentElement, this.clsDragState);
|
|
10446
10495
|
},
|
|
@@ -10874,9 +10923,9 @@
|
|
|
10874
10923
|
beforeSend: (env) => {
|
|
10875
10924
|
const { xhr } = env;
|
|
10876
10925
|
xhr.upload && on(xhr.upload, 'progress', this.progress);
|
|
10877
|
-
['loadStart', 'load', 'loadEnd', 'abort']
|
|
10878
|
-
|
|
10879
|
-
|
|
10926
|
+
for (const type of ['loadStart', 'load', 'loadEnd', 'abort']) {
|
|
10927
|
+
on(xhr, type.toLowerCase(), this[type]);
|
|
10928
|
+
}
|
|
10880
10929
|
|
|
10881
10930
|
return this.beforeSend(env);
|
|
10882
10931
|
} });
|