uikit 3.11.2-dev.7dd548556 → 3.11.2-dev.92f357b93

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.
Files changed (141) hide show
  1. package/CHANGELOG.md +32 -18
  2. package/dist/css/uikit-core-rtl.css +80 -186
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +80 -186
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +82 -192
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +82 -192
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +3 -3
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +6 -8
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +31 -60
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +34 -64
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +110 -72
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +110 -72
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +75 -28
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +110 -72
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +57 -21
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +12 -14
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +2 -2
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +4 -4
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +271 -287
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +509 -458
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/component.js +2 -11
  44. package/src/js/api/hooks.js +1 -1
  45. package/src/js/api/state.js +3 -3
  46. package/src/js/components/countdown.js +2 -2
  47. package/src/js/components/filter.js +2 -3
  48. package/src/js/components/internal/lightbox-animations.js +4 -3
  49. package/src/js/components/internal/slider-preload.js +37 -0
  50. package/src/js/components/internal/slider-transitioner.js +2 -2
  51. package/src/js/components/internal/slideshow-animations.js +4 -3
  52. package/src/js/components/lightbox-panel.js +34 -58
  53. package/src/js/components/lightbox.js +3 -4
  54. package/src/js/components/slider.js +30 -11
  55. package/src/js/components/slideshow.js +8 -1
  56. package/src/js/components/sortable.js +8 -8
  57. package/src/js/components/upload.js +3 -3
  58. package/src/js/core/accordion.js +3 -3
  59. package/src/js/core/alert.js +1 -2
  60. package/src/js/core/height-match.js +3 -3
  61. package/src/js/core/img.js +132 -115
  62. package/src/js/core/modal.js +1 -2
  63. package/src/js/core/navbar.js +5 -5
  64. package/src/js/core/scrollspy.js +6 -6
  65. package/src/js/core/sticky.js +1 -1
  66. package/src/js/core/svg.js +10 -6
  67. package/src/js/core/toggle.js +4 -3
  68. package/src/js/mixin/internal/animate-slide.js +9 -12
  69. package/src/js/mixin/parallax.js +110 -72
  70. package/src/js/mixin/slider-drag.js +3 -3
  71. package/src/js/mixin/slider-nav.js +2 -2
  72. package/src/js/mixin/slider.js +8 -16
  73. package/src/js/mixin/slideshow.js +2 -2
  74. package/src/js/mixin/togglable.js +1 -2
  75. package/src/js/util/ajax.js +9 -12
  76. package/src/js/util/animation.js +7 -12
  77. package/src/js/util/attr.js +11 -9
  78. package/src/js/util/dom.js +27 -45
  79. package/src/js/util/lang.js +7 -6
  80. package/src/js/util/options.js +2 -11
  81. package/src/js/util/player.js +5 -4
  82. package/src/js/util/position.js +2 -2
  83. package/src/js/util/selector.js +12 -18
  84. package/src/js/util/style.js +4 -4
  85. package/src/less/components/base.less +10 -33
  86. package/src/less/components/form-range.less +52 -97
  87. package/src/less/components/form.less +0 -1
  88. package/src/less/components/leader.less +0 -1
  89. package/src/less/components/lightbox.less +0 -1
  90. package/src/less/components/modal.less +3 -7
  91. package/src/less/components/progress.less +14 -36
  92. package/src/less/components/slider.less +0 -3
  93. package/src/less/components/slideshow.less +0 -3
  94. package/src/less/components/text.less +16 -32
  95. package/src/scss/components/base.scss +10 -33
  96. package/src/scss/components/form-range.scss +52 -97
  97. package/src/scss/components/form.scss +0 -1
  98. package/src/scss/components/leader.scss +0 -1
  99. package/src/scss/components/lightbox.scss +0 -1
  100. package/src/scss/components/modal.scss +3 -7
  101. package/src/scss/components/progress.scss +14 -36
  102. package/src/scss/components/slider.scss +0 -3
  103. package/src/scss/components/slideshow.scss +0 -3
  104. package/src/scss/components/text.scss +16 -32
  105. package/src/scss/mixins-theme.scss +1 -1
  106. package/src/scss/mixins.scss +1 -1
  107. package/src/scss/variables-theme.scss +3 -3
  108. package/src/scss/variables.scss +3 -3
  109. package/tests/align.html +10 -10
  110. package/tests/animation.html +2 -2
  111. package/tests/article.html +2 -2
  112. package/tests/base.html +3 -3
  113. package/tests/card.html +10 -10
  114. package/tests/column.html +3 -3
  115. package/tests/comment.html +9 -9
  116. package/tests/dotnav.html +3 -3
  117. package/tests/image.html +296 -64
  118. package/tests/images/image-type.avif +0 -0
  119. package/tests/images/image-type.jpeg +0 -0
  120. package/tests/images/image-type.webp +0 -0
  121. package/tests/index.html +8 -8
  122. package/tests/lightbox.html +10 -10
  123. package/tests/marker.html +2 -2
  124. package/tests/modal.html +8 -9
  125. package/tests/navbar.html +2 -2
  126. package/tests/overlay.html +7 -7
  127. package/tests/parallax.html +14 -5
  128. package/tests/position.html +12 -12
  129. package/tests/slidenav.html +12 -12
  130. package/tests/slider.html +20 -20
  131. package/tests/sortable.html +1 -1
  132. package/tests/sticky-parallax.html +47 -62
  133. package/tests/svg.html +6 -6
  134. package/tests/table.html +11 -11
  135. package/tests/thumbnav.html +12 -12
  136. package/tests/transition.html +30 -30
  137. package/tests/utility.html +33 -33
  138. package/tests/video.html +1 -1
  139. package/tests/width.html +1 -1
  140. package/src/js/util/promise.js +0 -0
  141. package/tests/images/animated.gif +0 -0
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.7dd548556 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.92f357b93 | 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 && obj.includes(search);
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 element ? (isDocument(element) ? element : element.ownerDocument).defaultView : window;
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 = assign({}, 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).forEach((element) => {
308
+ for (const el of toNodes(element)) {
308
309
  if (isFunction(value)) {
309
- value = value.call(element, attr(element, name));
310
+ value = value.call(el, attr(el, name));
310
311
  }
311
312
 
312
313
  if (value === null) {
313
- removeAttr(element, name);
314
+ removeAttr(el, name);
314
315
  } else {
315
- element.setAttribute(name, value);
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
- element = toNodes(element);
327
- name.split(' ').forEach((name) =>
328
- element.forEach((element) => element.hasAttribute(name) && element.removeAttribute(name)));
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) ? escapeFn.call(null, 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 = assign(
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
- return toNodes(element).map((element) => {
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
- return element;
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
- function replaceChildren(parent, element) {
1226
- const nodes = $$(element);
1227
- $(parent).replaceChildren(...nodes);
1228
- return nodes;
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 after(ref, element) {
1250
- const nodes = $$(element);
1251
- $(ref).after(...nodes);
1252
- return nodes;
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 matches = singleTagRe.exec(html);
1296
- if (matches) {
1297
- return document.createElement(matches[1]);
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
- return container.childNodes.length > 1 ? toNodes(container.childNodes) : container.firstChild;
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 ? assign({}, parentVal, childVal) : 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 == null ? void 0 : el.tagName) === 'VIDEO';
1639
+ return isTag(el, 'video');
1668
1640
  }
1669
1641
 
1670
1642
  function isIFrame(el) {
1671
- return (el == null ? void 0 : el.tagName) === 'IFRAME' && (isYoutube(el) || isVimeo(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(assign({ event: 'command' }, cmd)), '*');
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'].forEach((el) => {
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 = assign({}, this._computeds);
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 () {var _this$$options$events;
2425
+ UIkit.prototype._initEvents = function () {
2453
2426
  this._events = [];
2454
- (_this$$options$events = this.$options.events) == null ? void 0 : _this$$options$events.forEach((event) => {
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, assign({}, event, { el }), key));
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) ? assign({}, options) : options.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.7dd548556';
2810
+ UIkit.version = '3.11.2-dev.92f357b93';
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
- assign({}, initProps, { overflow: 'hidden', height: endHeight }),
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
- items.forEach((el) =>
3281
- this.toggleElement(el, !hasClass(el, this.clsOpen), async (el, show) => {
3282
- toggleClass(el, this.clsOpen, show);
3283
- attr($(this.$props.toggle, el), 'aria-expanded', show);
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
- const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
3258
+ const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
3286
3259
 
3287
- if (animate === false || !this.hasTransition) {
3288
- hide(content, !show);
3289
- return;
3290
- }
3260
+ if (animate === false || !this.hasTransition) {
3261
+ hide(content, !show);
3262
+ return;
3263
+ }
3291
3264
 
3292
- if (!el._wrapper) {
3293
- el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
3294
- }
3265
+ if (!el._wrapper) {
3266
+ el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
3267
+ }
3295
3268
 
3296
- hide(content, false);
3297
- await toggleHeight(this)(el._wrapper, show);
3298
- hide(content, !show);
3269
+ hide(content, false);
3270
+ await toggleHeight(this)(el._wrapper, show);
3271
+ hide(content, !show);
3299
3272
 
3300
- delete el._wrapper;
3301
- unwrap(content);
3273
+ delete el._wrapper;
3274
+ unwrap(content);
3302
3275
 
3303
- if (show) {
3304
- const toggle = $(this.$props.toggle, el);
3305
- if (!isInView(toggle)) {
3306
- scrollIntoView(toggle, { offset: this.offset });
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: assign({ opacity: 0 }, Togglable.data.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
- rows.forEach((_ref3) => {let { heights, elements } = _ref3;return (
4294
- elements.forEach((el, i) => css(el, 'minHeight', heights[i])));});
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.tagName === 'CANVAS') {
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 isSVG(el) && isSVG(other) && innerHTML(el) === innerHTML(other);
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
- dataSrcset: Boolean,
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
- dataSrcset: false,
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(_ref5) {let { target } = _ref5;
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
- setSrcAttrs(this.$el, this.dataSrc, this.dataSrcset, this.sizes);
4803
+ if (this.loading !== 'lazy' || !window.IntersectionObserver || !nativeIsIntersecting) {
4804
+ this.load();
4859
4805
  return;
4860
4806
  }
4861
4807
 
4862
- if (storage[this.cacheKey]) {
4863
- setSrcAttrs(this.$el, storage[this.cacheKey], this.dataSrcset, this.sizes);
4864
- } else if (this.isImg && this.width && this.height) {
4865
- setSrcAttrs(this.$el, getPlaceholderImage(this.width, this.height, this.sizes));
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
- this.observer = new IntersectionObserver(this.load, {
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
- requestAnimationFrame(this.observe);
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
- disconnected() {
4876
- this.observer && this.observer.disconnect();
4832
+ this.observe();
4877
4833
  },
4878
4834
 
4879
- update: {
4880
- read(_ref8) {let { image } = _ref8;
4881
- if (!this.observer) {
4882
- return false;
4883
- }
4835
+ disconnected() {var _this$observer;
4836
+ if (this._data.image) {
4837
+ this._data.image.onload = '';
4838
+ }
4884
4839
 
4885
- if (!image && document.readyState === 'complete') {
4886
- this.load(this.observer.takeRecords());
4887
- }
4840
+ (_this$observer = this.observer) == null ? void 0 : _this$observer.disconnect();
4841
+ },
4888
4842
 
4889
- if (this.isImg) {
4843
+ update: {
4844
+ write(store) {
4845
+ if (!this.observer || isImg(this.$el)) {
4890
4846
  return false;
4891
4847
  }
4892
4848
 
4893
- image &&
4894
- image.then(
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) === data.bgSize) {
4903
- data.bgSize = getSourceSize(this.dataSrcset, this.sizes);
4904
- css(this.$el, 'backgroundSize', data.bgSize + "px");
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(entries) {
4914
- // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
4915
- if (
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
- this._data.image = getImage(this.dataSrc, this.dataSrcset, this.sizes).then(
4922
- (img) => {
4923
- setSrcAttrs(this.$el, currentSrc(img), img.srcset, img.sizes);
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
- this.observer.disconnect();
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
- this.target.forEach((el) => this.observer.observe(el));
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, srcset, sizes) {
4887
+ function setSrcAttrs(el, src) {
4942
4888
  if (isImg(el)) {
4943
- const set = (prop, val) => val && val !== el[prop] && (el[prop] = val);
4944
- set('sizes', sizes);
4945
- set('srcset', srcset);
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
- function getPlaceholderImage(width, height, sizes) {
4957
- if (sizes) {
4958
- ({ width, height } = Dimensions.ratio(
4959
- { width, height },
4960
- 'width',
4961
- toPx(sizesToPixel(sizes))));
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
- return "data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"" + width + "\" height=\"" + height + "\"></svg>";
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 isImg(el) {
5006
- return el.tagName === 'IMG';
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 currentSrc(el) {
5010
- return el.currentSrc || el.src;
5000
+ function isPicture(el) {
5001
+ return isTag(el, 'picture');
5011
5002
  }
5012
5003
 
5013
- const key = '__test__';
5014
- let storage;
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 = assign({ bgClose: false, escClose: true, labels: modal.labels }, 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).forEach((el) => {var _this$getDropdown;
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
- assign({}, this.$props, {
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.forEach((el) => {
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.forEach((el) => {
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.forEach((el) => {
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(this.placeholder)[0] };
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.tagName !== 'INPUT';
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.forEach((el) => {
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.forEach((unit) => {
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, assign({ display: 'block' }, targetProps));
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 = assign({ filter: { '': '' }, sort: [] }, 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 assign([], nodes).sort(
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 = assign({}, Animations$2, {
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'].forEach((key) => {
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 !== this.pos ? this.pos : this.prevPos;
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.forEach((el) => {
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 assign(Animations[animation] || Animations.slide, { name: animation });
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
- 'iframe',
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
- iframeAttrs,
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'].forEach((attr) => {
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, steps) {
9247
- const unit = getUnit(steps) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
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
- steps = steps.map(toFloat);
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
- return (css, percent) => {
9260
- let value = getValue(steps, percent);
9211
+ stops = parseStops(stops, transformFn);
9261
9212
 
9262
- if (startsWith(prop, 'translate')) {
9263
- value = toFloat(value).toFixed(unit === 'px' ? 0 : 6);
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, steps) {
9271
- if (steps.length === 1) {
9272
- steps.unshift(getCssValue(el, prop, ''));
9218
+ function colorFn(prop, el, stops) {
9219
+ if (stops.length === 1) {
9220
+ stops.unshift(getCssValue(el, prop, ''));
9273
9221
  }
9274
9222
 
9275
- steps = steps.map((step) => parseColor(el, step));
9223
+ stops = parseStops(stops, (stop) => parseColor(el, stop));
9276
9224
 
9277
9225
  return (css, percent) => {
9278
- const [start, end, p] = getStep(steps, percent);
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, steps) {
9299
- if (steps.length === 1) {
9300
- steps.unshift(0);
9246
+ function filterFn(prop, el, stops) {
9247
+ if (stops.length === 1) {
9248
+ stops.unshift(0);
9301
9249
  }
9302
9250
 
9303
- const unit = getUnit(steps) || { blur: 'px', hue: 'deg' }[prop] || '%';
9251
+ const unit = getUnit(stops) || { blur: 'px', hue: 'deg' }[prop] || '%';
9304
9252
  prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
9305
- steps = steps.map(toFloat);
9253
+ stops = parseStops(stops);
9306
9254
 
9307
9255
  return (css, percent) => {
9308
- const value = getValue(steps, percent);
9256
+ const value = getValue(stops, percent);
9309
9257
  css.filter += " " + prop + "(" + (value + unit) + ")";
9310
9258
  };
9311
9259
  }
9312
9260
 
9313
- function cssPropFn(prop, el, steps) {
9314
- if (steps.length === 1) {
9315
- steps.unshift(getCssValue(el, prop, ''));
9261
+ function cssPropFn(prop, el, stops) {
9262
+ if (stops.length === 1) {
9263
+ stops.unshift(getCssValue(el, prop, ''));
9316
9264
  }
9317
9265
 
9318
- steps = steps.map(toFloat);
9266
+ stops = parseStops(stops);
9319
9267
 
9320
9268
  return (css, percent) => {
9321
- css[prop] = getValue(steps, percent);
9269
+ css[prop] = getValue(stops, percent);
9322
9270
  };
9323
9271
  }
9324
9272
 
9325
- function strokeFn(prop, el, steps) {
9326
- if (steps.length === 1) {
9327
- steps.unshift(0);
9273
+ function strokeFn(prop, el, stops) {
9274
+ if (stops.length === 1) {
9275
+ stops.unshift(0);
9328
9276
  }
9329
9277
 
9330
- const unit = getUnit(steps);
9331
- steps = steps.map(toFloat);
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 (!steps.some((step) => step)) {
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(steps, percent);
9292
+ css.strokeDashoffset = getValue(stops, percent);
9348
9293
  };
9349
9294
  }
9350
9295
 
9351
- function backgroundFn(prop, el, steps) {
9352
- if (steps.length === 1) {
9353
- steps.unshift(0);
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
- steps = steps.map((step) => toPx(step, attr, el));
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, steps, bgPos, attr) :
9364
- setBackgroundPosFn(prop, steps, bgPos);
9308
+ backgroundCoverFn(prop, el, stops, bgPos, attr) :
9309
+ setBackgroundPosFn(prop, stops, bgPos);
9365
9310
  }
9366
9311
 
9367
- function backgroundCoverFn(prop, el, steps, bgPos, attr) {
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 min = Math.min(...steps);
9375
- const max = Math.max(...steps);
9376
- const down = steps.indexOf(min) < steps.indexOf(max);
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, steps, pos + "px");
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, steps, pos) {
9355
+ function setBackgroundPosFn(prop, stops, pos) {
9410
9356
  return function (css, percent) {
9411
- css["background-position-" + prop] = "calc(" + pos + " + " + getValue(steps, percent) + "px)";
9357
+ css["background-position-" + prop] = "calc(" + pos + " + " + getValue(stops, percent) + "px)";
9412
9358
  };
9413
9359
  }
9414
9360
 
@@ -9442,27 +9388,71 @@
9442
9388
 
9443
9389
  }
9444
9390
 
9445
- function getStep(steps, percent) {
9446
- const count = steps.length - 1;
9447
- const index = Math.min(Math.floor(count * percent), count - 1);
9391
+ function parseStops(stops, fn) {if (fn === void 0) {fn = toFloat;}
9392
+ const result = [];
9393
+ const { length } = stops;
9394
+ let nullIndex = 0;
9395
+ for (let i = 0; i < length; i++) {
9396
+ let [value, percent] = isString(stops[i]) ? stops[i].trim().split(' ') : [stops[i]];
9397
+ value = fn(value);
9398
+ percent = percent ? toFloat(percent) / 100 : null;
9399
+
9400
+ if (i === 0) {
9401
+ if (percent === null) {
9402
+ percent = 0;
9403
+ } else if (percent) {
9404
+ result.push([value, 0]);
9405
+ }
9406
+ } else if (i === length - 1) {
9407
+ if (percent === null) {
9408
+ percent = 1;
9409
+ } else if (percent !== 1) {
9410
+ result.push([value, percent]);
9411
+ percent = 1;
9412
+ }
9413
+ }
9414
+
9415
+ result.push([value, percent]);
9416
+
9417
+ if (percent === null) {
9418
+ nullIndex++;
9419
+ } else if (nullIndex) {
9420
+ const leftPercent = result[i - nullIndex - 1][1];
9421
+ const p = (percent - leftPercent) / (nullIndex + 1);
9422
+ for (let j = nullIndex; j > 0; j--) {
9423
+ result[i - j][1] = leftPercent + p * (nullIndex - j + 1);
9424
+ }
9425
+
9426
+ nullIndex = 0;
9427
+ }
9428
+ }
9429
+
9430
+ return result;
9431
+ }
9432
+
9433
+ function getStop(stops, percent) {
9434
+ const index = findIndex(stops.slice(1), (_ref3) => {let [, targetPercent] = _ref3;return percent <= targetPercent;}) + 1;
9435
+ return [
9436
+ stops[index - 1][0],
9437
+ stops[index][0],
9438
+ (percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])];
9448
9439
 
9449
- return steps.
9450
- slice(index, index + 2).
9451
- concat(percent === 1 ? 1 : percent % (1 / count) * count);
9452
9440
  }
9453
9441
 
9454
- function getValue(steps, percent) {
9455
- const [start, end, p] = getStep(steps, percent);
9442
+ function getValue(stops, percent) {
9443
+ const [start, end, p] = getStop(stops, percent);
9456
9444
  return isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
9457
9445
  }
9458
9446
 
9459
- function getUnit(steps, defaultUnit) {
9460
- return (
9461
- steps.reduce(
9462
- (unit, step) => unit || isString(step) && step.replace(/[\d-]/g, '').trim(),
9463
- '') ||
9464
- defaultUnit);
9465
-
9447
+ const unitRe = /^[\d-]+([^\s]+)/;
9448
+ function getUnit(stops, defaultUnit) {
9449
+ for (const stop of stops) {
9450
+ const match = stop.match == null ? void 0 : stop.match(unitRe);
9451
+ if (match) {
9452
+ return match[1];
9453
+ }
9454
+ }
9455
+ return defaultUnit;
9466
9456
  }
9467
9457
 
9468
9458
  function getCssValue(el, prop, value) {
@@ -9574,6 +9564,42 @@
9574
9564
 
9575
9565
  events: ['resize'] } };
9576
9566
 
9567
+ var SliderPreload = {
9568
+ connected() {
9569
+ if (window.IntersectionObserver) {
9570
+ this.observer = new IntersectionObserver(
9571
+ (entries) => {
9572
+ if (entries.some((entry) => entry.isIntersecting)) {
9573
+ removeLazyLoad(this.getAdjacentSlides());
9574
+ }
9575
+ },
9576
+ { rootMargin: '50% 50%' });
9577
+
9578
+ this.observer.observe(this.$el);
9579
+ }
9580
+ },
9581
+
9582
+ disconnected() {
9583
+ this.observer && this.observer.disconnect();
9584
+ },
9585
+
9586
+ update: {
9587
+ read() {
9588
+ if (isVisible(this.$el)) {
9589
+ removeLazyLoad(this.getAdjacentSlides());
9590
+ }
9591
+ },
9592
+
9593
+ events: ['resize'] } };
9594
+
9595
+
9596
+
9597
+ function removeLazyLoad(elements) {if (elements === void 0) {elements = [];}
9598
+ for (const el of elements) {
9599
+ el && $$('img[loading="lazy"]', el).forEach((el) => removeAttr(el, 'loading'));
9600
+ }
9601
+ }
9602
+
9577
9603
  function Transitioner (prev, next, dir, _ref) {let { center, easing, list } = _ref;
9578
9604
  const deferred = new Deferred();
9579
9605
 
@@ -9648,7 +9674,7 @@
9648
9674
 
9649
9675
  percent = prev ? clamp(percent, -1, 1) : 0;
9650
9676
 
9651
- children(list).forEach((slide) => {
9677
+ for (const slide of children(list)) {
9652
9678
  const isActive = includes(actives, slide);
9653
9679
  const isIn = slide === itemIn;
9654
9680
  const isOut = slide === itemOut;
@@ -9663,7 +9689,7 @@
9663
9689
  dir,
9664
9690
  percent: isOut ? 1 - percent : isIn ? percent : isActive ? 1 : 0 });
9665
9691
 
9666
- });
9692
+ }
9667
9693
  },
9668
9694
 
9669
9695
  percent() {
@@ -9740,7 +9766,7 @@
9740
9766
  }
9741
9767
 
9742
9768
  var slider = {
9743
- mixins: [Class, Slider, SliderReactive],
9769
+ mixins: [Class, Slider, SliderReactive, SliderPreload],
9744
9770
 
9745
9771
  props: {
9746
9772
  center: Boolean,
@@ -9850,7 +9876,7 @@
9850
9876
 
9851
9877
  update: {
9852
9878
  write() {
9853
- this.navItems.forEach((el) => {
9879
+ for (const el of this.navItems) {
9854
9880
  const index = toNumber(data(el, this.attrItem));
9855
9881
  if (index !== false) {
9856
9882
  el.hidden =
@@ -9858,7 +9884,7 @@
9858
9884
  index > this.maxIndex ||
9859
9885
  this.sets && !includes(this.sets, index);
9860
9886
  }
9861
- });
9887
+ }
9862
9888
 
9863
9889
  if (this.length && !this.dragging && !this.stack.length) {
9864
9890
  this.reorder();
@@ -9866,14 +9892,13 @@
9866
9892
  }
9867
9893
 
9868
9894
  const actives = this._getTransitioner(this.index).getActives();
9869
- this.slides.forEach((slide) =>
9870
- toggleClass(slide, this.clsActive, includes(actives, slide)));
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)));
9895
+ const activeClasses = [
9896
+ this.clsActive,
9897
+ (!this.sets || includes(this.sets, toFloat(this.index))) && this.clsActivated ||
9898
+ ''];
9876
9899
 
9900
+ for (const slide of this.slides) {
9901
+ toggleClass(slide, activeClasses, includes(actives, slide));
9877
9902
  }
9878
9903
  },
9879
9904
 
@@ -9978,6 +10003,25 @@
9978
10003
  } while (index !== prev);
9979
10004
 
9980
10005
  return index;
10006
+ },
10007
+
10008
+ getAdjacentSlides() {
10009
+ const { width } = dimensions$1(this.list);
10010
+ const left = -width;
10011
+ const right = width * 2;
10012
+ const slideWidth = dimensions$1(this.slides[this.index]).width;
10013
+ const slideLeft = this.center ? width / 2 - slideWidth / 2 : 0;
10014
+ const slides = new Set();
10015
+ for (const i of [-1, 1]) {
10016
+ let currentLeft = slideLeft + (i > 0 ? slideWidth : 0);
10017
+ let j = 0;
10018
+ do {
10019
+ const slide = this.slides[this.getIndex(this.index + i + j++ * i)];
10020
+ currentLeft += dimensions$1(slide).width * i;
10021
+ slides.add(slide);
10022
+ } while (this.slides.length > j && currentLeft > left && currentLeft < right);
10023
+ }
10024
+ return Array.from(slides);
9981
10025
  } } };
9982
10026
 
9983
10027
 
@@ -10064,7 +10108,8 @@
10064
10108
  return isIn(type) ^ dir < 0 ? percent : 1 - percent;
10065
10109
  }
10066
10110
 
10067
- var Animations = assign({}, Animations$2, {
10111
+ var Animations = {
10112
+ ...Animations$2,
10068
10113
  fade: {
10069
10114
  show() {
10070
10115
  return [{ opacity: 0, zIndex: 0 }, { zIndex: -1 }];
@@ -10153,10 +10198,10 @@
10153
10198
  { transform: translate(-30 * percent), zIndex: -1 },
10154
10199
  { transform: translate(100 * (1 - percent)), zIndex: 0 }];
10155
10200
 
10156
- } } });
10201
+ } } };
10157
10202
 
10158
10203
  var slideshow = {
10159
- mixins: [Class, Slideshow, SliderReactive],
10204
+ mixins: [Class, Slideshow, SliderReactive, SliderPreload],
10160
10205
 
10161
10206
  props: {
10162
10207
  ratio: String,
@@ -10199,7 +10244,13 @@
10199
10244
  height > 0 && css(this.list, 'minHeight', height);
10200
10245
  },
10201
10246
 
10202
- events: ['resize'] } };
10247
+ events: ['resize'] },
10248
+
10249
+
10250
+ methods: {
10251
+ getAdjacentSlides() {
10252
+ return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
10253
+ } } };
10203
10254
 
10204
10255
  var sortable = {
10205
10256
  mixins: [Class, Animate],
@@ -10234,13 +10285,13 @@
10234
10285
 
10235
10286
 
10236
10287
  created() {
10237
- ['init', 'start', 'move', 'end'].forEach((key) => {
10288
+ for (const key of ['init', 'start', 'move', 'end']) {
10238
10289
  const fn = this[key];
10239
10290
  this[key] = (e) => {
10240
10291
  assign(this.pos, getEventPos(e));
10241
10292
  fn(e);
10242
10293
  };
10243
- });
10294
+ }
10244
10295
  },
10245
10296
 
10246
10297
  events: {
@@ -10372,7 +10423,7 @@
10372
10423
 
10373
10424
  this.touched = new Set([this]);
10374
10425
  this.placeholder = placeholder;
10375
- this.origin = assign({ target, index: index(placeholder) }, this.pos);
10426
+ this.origin = { target, index: index(placeholder), ...this.pos };
10376
10427
 
10377
10428
  on(document, pointerMove, this.move);
10378
10429
  on(document, pointerUp, this.end);
@@ -10436,11 +10487,11 @@
10436
10487
  remove$1(this.drag);
10437
10488
  this.drag = null;
10438
10489
 
10439
- this.touched.forEach((_ref2) => {let { clsPlaceholder, clsItem } = _ref2;return (
10440
- this.touched.forEach((sortable) =>
10441
- removeClass(sortable.items, clsPlaceholder, clsItem)));});
10442
-
10443
-
10490
+ for (const { clsPlaceholder, clsItem } of this.touched) {
10491
+ for (const sortable of this.touched) {
10492
+ removeClass(sortable.items, clsPlaceholder, clsItem);
10493
+ }
10494
+ }
10444
10495
  this.touched = null;
10445
10496
  removeClass(document.documentElement, this.clsDragState);
10446
10497
  },
@@ -10874,9 +10925,9 @@
10874
10925
  beforeSend: (env) => {
10875
10926
  const { xhr } = env;
10876
10927
  xhr.upload && on(xhr.upload, 'progress', this.progress);
10877
- ['loadStart', 'load', 'loadEnd', 'abort'].forEach((type) =>
10878
- on(xhr, type.toLowerCase(), this[type]));
10879
-
10928
+ for (const type of ['loadStart', 'load', 'loadEnd', 'abort']) {
10929
+ on(xhr, type.toLowerCase(), this[type]);
10930
+ }
10880
10931
 
10881
10932
  return this.beforeSend(env);
10882
10933
  } });