uikit 3.11.2-dev.72dbb9a19 → 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 -171
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +80 -171
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +82 -177
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +82 -177
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- 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 +57 -2
- 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 +45 -3
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +172 -165
- 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 +345 -241
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/internal/slider-preload.js +37 -0
- package/src/js/components/slider.js +21 -1
- package/src/js/components/slideshow.js +8 -1
- package/src/js/core/img.js +129 -114
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/svg.js +10 -6
- package/src/js/core/toggle.js +2 -1
- package/src/js/mixin/parallax.js +108 -72
- package/src/js/util/dom.js +27 -30
- package/src/js/util/lang.js +6 -5
- package/src/js/util/player.js +3 -2
- package/src/js/util/style.js +4 -4
- package/src/less/components/base.less +10 -28
- package/src/less/components/form-range.less +52 -97
- package/src/less/components/form.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 -28
- package/src/scss/components/form-range.scss +52 -97
- package/src/scss/components/form.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/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) {
|
|
@@ -756,7 +757,8 @@
|
|
|
756
757
|
|
|
757
758
|
|
|
758
759
|
function css(element, property, value, priority) {if (priority === void 0) {priority = '';}
|
|
759
|
-
|
|
760
|
+
const elements = toNodes(element);
|
|
761
|
+
for (const element of elements) {
|
|
760
762
|
if (isString(property)) {
|
|
761
763
|
property = propName(property);
|
|
762
764
|
|
|
@@ -782,9 +784,8 @@
|
|
|
782
784
|
priority = value;
|
|
783
785
|
each(property, (value, property) => css(element, property, value, priority));
|
|
784
786
|
}
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
})[0];
|
|
787
|
+
}
|
|
788
|
+
return elements[0];
|
|
788
789
|
}
|
|
789
790
|
|
|
790
791
|
function getStyles(element, pseudoElt) {
|
|
@@ -1174,8 +1175,8 @@
|
|
|
1174
1175
|
|
|
1175
1176
|
const calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
|
|
1176
1177
|
const parseCalc = memoize((calc) => calc.toString().replace(/\s/g, '').match(calcRe) || []);
|
|
1177
|
-
const unitRe = /(?:v[hw]|%)$/;
|
|
1178
|
-
const parseUnit = memoize((str) => (str.match(unitRe) || [])[0]);
|
|
1178
|
+
const unitRe$1 = /(?:v[hw]|%)$/;
|
|
1179
|
+
const parseUnit = memoize((str) => (str.match(unitRe$1) || [])[0]);
|
|
1179
1180
|
|
|
1180
1181
|
function percent(base, value) {
|
|
1181
1182
|
return base * toFloat(value) / 100;
|
|
@@ -1190,6 +1191,10 @@
|
|
|
1190
1191
|
once(document, 'DOMContentLoaded', fn);
|
|
1191
1192
|
}
|
|
1192
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
|
+
|
|
1193
1198
|
function empty(element) {
|
|
1194
1199
|
return replaceChildren(element, '');
|
|
1195
1200
|
}
|
|
@@ -1198,34 +1203,20 @@
|
|
|
1198
1203
|
return isUndefined(html) ? $(parent).innerHTML : replaceChildren(parent, html);
|
|
1199
1204
|
}
|
|
1200
1205
|
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
function prepend(parent, element) {
|
|
1208
|
-
const nodes = $$(element);
|
|
1209
|
-
$(parent).prepend(...nodes);
|
|
1210
|
-
return nodes;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
function append(parent, element) {
|
|
1214
|
-
const nodes = $$(element);
|
|
1215
|
-
$(parent).append(...nodes);
|
|
1216
|
-
return nodes;
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
function before(ref, element) {
|
|
1220
|
-
const nodes = $$(element);
|
|
1221
|
-
$(ref).before(...nodes);
|
|
1222
|
-
return nodes;
|
|
1223
|
-
}
|
|
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');
|
|
1224
1211
|
|
|
1225
|
-
function
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
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
|
+
};
|
|
1229
1220
|
}
|
|
1230
1221
|
|
|
1231
1222
|
function remove$1(element) {
|
|
@@ -1263,9 +1254,16 @@
|
|
|
1263
1254
|
|
|
1264
1255
|
function fragment(html) {
|
|
1265
1256
|
const template = document.createElement('template');
|
|
1266
|
-
template.innerHTML = html;
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1257
|
+
template.innerHTML = html.trim();
|
|
1258
|
+
const nodes = toNodes(template.content.childNodes);
|
|
1259
|
+
for (const node of nodes) {
|
|
1260
|
+
document.adoptNode(node);
|
|
1261
|
+
}
|
|
1262
|
+
return unwrapSingle(nodes);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
function unwrapSingle(nodes) {
|
|
1266
|
+
return nodes.length > 1 ? nodes : nodes[0];
|
|
1269
1267
|
}
|
|
1270
1268
|
|
|
1271
1269
|
function apply(node, fn) {
|
|
@@ -1638,11 +1636,11 @@
|
|
|
1638
1636
|
}
|
|
1639
1637
|
|
|
1640
1638
|
function isHTML5(el) {
|
|
1641
|
-
return (el
|
|
1639
|
+
return isTag(el, 'video');
|
|
1642
1640
|
}
|
|
1643
1641
|
|
|
1644
1642
|
function isIFrame(el) {
|
|
1645
|
-
return (el
|
|
1643
|
+
return isTag(el, 'iframe') && (isYoutube(el) || isVimeo(el));
|
|
1646
1644
|
}
|
|
1647
1645
|
|
|
1648
1646
|
function isYoutube(el) {
|
|
@@ -2042,6 +2040,7 @@
|
|
|
2042
2040
|
flipPosition: flipPosition,
|
|
2043
2041
|
toPx: toPx,
|
|
2044
2042
|
ready: ready,
|
|
2043
|
+
isTag: isTag,
|
|
2045
2044
|
empty: empty,
|
|
2046
2045
|
html: html,
|
|
2047
2046
|
replaceChildren: replaceChildren,
|
|
@@ -2808,7 +2807,7 @@
|
|
|
2808
2807
|
UIkit.data = '__uikit__';
|
|
2809
2808
|
UIkit.prefix = 'uk-';
|
|
2810
2809
|
UIkit.options = {};
|
|
2811
|
-
UIkit.version = '3.11.2-dev.
|
|
2810
|
+
UIkit.version = '3.11.2-dev.93483bd3e';
|
|
2812
2811
|
|
|
2813
2812
|
globalAPI(UIkit);
|
|
2814
2813
|
hooksAPI(UIkit);
|
|
@@ -4460,6 +4459,12 @@
|
|
|
4460
4459
|
|
|
4461
4460
|
methods: {
|
|
4462
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
|
+
|
|
4463
4468
|
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
|
|
4464
4469
|
},
|
|
4465
4470
|
|
|
@@ -4559,7 +4564,7 @@
|
|
|
4559
4564
|
}
|
|
4560
4565
|
|
|
4561
4566
|
function insertSVG(el, root) {
|
|
4562
|
-
if (isVoidElement(root) || root
|
|
4567
|
+
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
4563
4568
|
root.hidden = true;
|
|
4564
4569
|
|
|
4565
4570
|
const next = root.nextElementSibling;
|
|
@@ -4571,11 +4576,7 @@
|
|
|
4571
4576
|
}
|
|
4572
4577
|
|
|
4573
4578
|
function equals(el, other) {
|
|
4574
|
-
return
|
|
4575
|
-
}
|
|
4576
|
-
|
|
4577
|
-
function isSVG(el) {
|
|
4578
|
-
return (el == null ? void 0 : el.tagName) === 'svg';
|
|
4579
|
+
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
4579
4580
|
}
|
|
4580
4581
|
|
|
4581
4582
|
function innerHTML(el) {
|
|
@@ -4762,120 +4763,95 @@
|
|
|
4762
4763
|
return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
|
|
4763
4764
|
}
|
|
4764
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
|
+
|
|
4765
4769
|
var img = {
|
|
4766
4770
|
args: 'dataSrc',
|
|
4767
4771
|
|
|
4768
4772
|
props: {
|
|
4769
4773
|
dataSrc: String,
|
|
4770
|
-
|
|
4771
|
-
sizes: String,
|
|
4772
|
-
width: Number,
|
|
4773
|
-
height: Number,
|
|
4774
|
+
sources: String,
|
|
4774
4775
|
offsetTop: String,
|
|
4775
4776
|
offsetLeft: String,
|
|
4776
|
-
target: String
|
|
4777
|
+
target: String,
|
|
4778
|
+
loading: String },
|
|
4777
4779
|
|
|
4778
4780
|
|
|
4779
4781
|
data: {
|
|
4780
4782
|
dataSrc: '',
|
|
4781
|
-
|
|
4782
|
-
sizes: false,
|
|
4783
|
-
width: false,
|
|
4784
|
-
height: false,
|
|
4783
|
+
sources: false,
|
|
4785
4784
|
offsetTop: '50vh',
|
|
4786
4785
|
offsetLeft: '50vw',
|
|
4787
|
-
target: false
|
|
4786
|
+
target: false,
|
|
4787
|
+
loading: 'lazy' },
|
|
4788
4788
|
|
|
4789
4789
|
|
|
4790
4790
|
computed: {
|
|
4791
|
-
cacheKey(_ref) {let { dataSrc } = _ref;
|
|
4792
|
-
return this.$name + "." + dataSrc;
|
|
4793
|
-
},
|
|
4794
|
-
|
|
4795
|
-
width(_ref2) {let { width, dataWidth } = _ref2;
|
|
4796
|
-
return width || dataWidth;
|
|
4797
|
-
},
|
|
4798
|
-
|
|
4799
|
-
height(_ref3) {let { height, dataHeight } = _ref3;
|
|
4800
|
-
return height || dataHeight;
|
|
4801
|
-
},
|
|
4802
|
-
|
|
4803
|
-
sizes(_ref4) {let { sizes, dataSizes } = _ref4;
|
|
4804
|
-
return sizes || dataSizes;
|
|
4805
|
-
},
|
|
4806
|
-
|
|
4807
|
-
isImg(_, $el) {
|
|
4808
|
-
return isImg($el);
|
|
4809
|
-
},
|
|
4810
|
-
|
|
4811
4791
|
target: {
|
|
4812
|
-
get(
|
|
4792
|
+
get(_ref) {let { target } = _ref;
|
|
4813
4793
|
return [this.$el, ...queryAll(target, this.$el)];
|
|
4814
4794
|
},
|
|
4815
4795
|
|
|
4816
4796
|
watch() {
|
|
4817
4797
|
this.observe();
|
|
4818
|
-
} },
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
offsetTop(_ref6) {let { offsetTop } = _ref6;
|
|
4822
|
-
return toPx(offsetTop, 'height');
|
|
4823
|
-
},
|
|
4798
|
+
} } },
|
|
4824
4799
|
|
|
4825
|
-
offsetLeft(_ref7) {let { offsetLeft } = _ref7;
|
|
4826
|
-
return toPx(offsetLeft, 'width');
|
|
4827
|
-
} },
|
|
4828
4800
|
|
|
4829
4801
|
|
|
4830
4802
|
connected() {
|
|
4831
|
-
if (!window.IntersectionObserver) {
|
|
4832
|
-
|
|
4803
|
+
if (this.loading !== 'lazy' || !window.IntersectionObserver || !nativeIsIntersecting) {
|
|
4804
|
+
this.load();
|
|
4833
4805
|
return;
|
|
4834
4806
|
}
|
|
4835
4807
|
|
|
4836
|
-
if (
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
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
|
+
}
|
|
4840
4815
|
}
|
|
4841
4816
|
|
|
4842
|
-
|
|
4843
|
-
rootMargin: this.offsetTop + "px " + this.offsetLeft + "px" });
|
|
4817
|
+
ensureSrcAttribute(this.$el);
|
|
4844
4818
|
|
|
4819
|
+
const rootMargin = toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
4820
|
+
this.offsetLeft,
|
|
4821
|
+
'width') + "px";
|
|
4845
4822
|
|
|
4846
|
-
|
|
4847
|
-
|
|
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 });
|
|
4848
4831
|
|
|
4849
|
-
|
|
4850
|
-
this.observer && this.observer.disconnect();
|
|
4832
|
+
this.observe();
|
|
4851
4833
|
},
|
|
4852
4834
|
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
}
|
|
4835
|
+
disconnected() {var _this$observer;
|
|
4836
|
+
if (this._data.image) {
|
|
4837
|
+
this._data.image.onload = '';
|
|
4838
|
+
}
|
|
4858
4839
|
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
}
|
|
4840
|
+
(_this$observer = this.observer) == null ? void 0 : _this$observer.disconnect();
|
|
4841
|
+
},
|
|
4862
4842
|
|
|
4863
|
-
|
|
4843
|
+
update: {
|
|
4844
|
+
write(store) {
|
|
4845
|
+
if (!this.observer || isImg(this.$el)) {
|
|
4864
4846
|
return false;
|
|
4865
4847
|
}
|
|
4866
4848
|
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
(img) => img && img.currentSrc !== '' && setSrcAttrs(this.$el, currentSrc(img)));
|
|
4870
|
-
|
|
4871
|
-
},
|
|
4872
|
-
|
|
4873
|
-
write(data) {
|
|
4874
|
-
if (this.dataSrcset && window.devicePixelRatio !== 1) {
|
|
4849
|
+
const srcset = data(this.$el, 'data-srcset');
|
|
4850
|
+
if (srcset && window.devicePixelRatio !== 1) {
|
|
4875
4851
|
const bgSize = css(this.$el, 'backgroundSize');
|
|
4876
|
-
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) ===
|
|
4877
|
-
|
|
4878
|
-
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");
|
|
4879
4855
|
}
|
|
4880
4856
|
}
|
|
4881
4857
|
},
|
|
@@ -4884,24 +4860,18 @@
|
|
|
4884
4860
|
|
|
4885
4861
|
|
|
4886
4862
|
methods: {
|
|
4887
|
-
load(
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
!entries.some((entry) => isUndefined(entry.isIntersecting) || entry.isIntersecting))
|
|
4891
|
-
{
|
|
4892
|
-
return;
|
|
4863
|
+
load() {
|
|
4864
|
+
if (this._data.image) {
|
|
4865
|
+
return this._data.image;
|
|
4893
4866
|
}
|
|
4894
4867
|
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
storage[this.cacheKey] = currentSrc(img);
|
|
4899
|
-
return img;
|
|
4900
|
-
},
|
|
4901
|
-
(e) => trigger(this.$el, new e.constructor(e.type, e)));
|
|
4868
|
+
const image = isImg(this.$el) ?
|
|
4869
|
+
this.$el :
|
|
4870
|
+
getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
4902
4871
|
|
|
4903
|
-
|
|
4904
|
-
this.
|
|
4872
|
+
removeAttr(image, 'loading');
|
|
4873
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
4874
|
+
return this._data.image = image;
|
|
4905
4875
|
},
|
|
4906
4876
|
|
|
4907
4877
|
observe() {
|
|
@@ -4914,12 +4884,11 @@
|
|
|
4914
4884
|
|
|
4915
4885
|
|
|
4916
4886
|
|
|
4917
|
-
function setSrcAttrs(el, src
|
|
4887
|
+
function setSrcAttrs(el, src) {
|
|
4918
4888
|
if (isImg(el)) {
|
|
4919
|
-
const
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
set('src', src);
|
|
4889
|
+
const parentNode = parent(el);
|
|
4890
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
4891
|
+
elements.forEach((el) => setSourceProps(el, el));
|
|
4923
4892
|
} else if (src) {
|
|
4924
4893
|
const change = !includes(el.style.backgroundImage, src);
|
|
4925
4894
|
if (change) {
|
|
@@ -4929,16 +4898,60 @@
|
|
|
4929
4898
|
}
|
|
4930
4899
|
}
|
|
4931
4900
|
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
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
|
+
}
|
|
4910
|
+
|
|
4911
|
+
function getImageFromElement(el, src, sources) {
|
|
4912
|
+
const img = new Image();
|
|
4938
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 [];
|
|
4938
|
+
}
|
|
4939
|
+
|
|
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];
|
|
4939
4952
|
}
|
|
4940
4953
|
|
|
4941
|
-
return
|
|
4954
|
+
return sources.filter((source) => !isEmpty(source));
|
|
4942
4955
|
}
|
|
4943
4956
|
|
|
4944
4957
|
const sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;
|
|
@@ -4978,24 +4991,18 @@
|
|
|
4978
4991
|
return descriptors.filter((size) => size >= srcSize)[0] || descriptors.pop() || '';
|
|
4979
4992
|
}
|
|
4980
4993
|
|
|
4981
|
-
function
|
|
4982
|
-
|
|
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
|
+
}
|
|
4983
4998
|
}
|
|
4984
4999
|
|
|
4985
|
-
function
|
|
4986
|
-
return el
|
|
5000
|
+
function isPicture(el) {
|
|
5001
|
+
return isTag(el, 'picture');
|
|
4987
5002
|
}
|
|
4988
5003
|
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
// workaround for Safari's private browsing mode and accessing sessionStorage in Blink
|
|
4993
|
-
try {
|
|
4994
|
-
storage = window.sessionStorage || {};
|
|
4995
|
-
storage[key] = 1;
|
|
4996
|
-
delete storage[key];
|
|
4997
|
-
} catch (e) {
|
|
4998
|
-
storage = {};
|
|
5004
|
+
function isImg(el) {
|
|
5005
|
+
return isTag(el, 'img');
|
|
4999
5006
|
}
|
|
5000
5007
|
|
|
5001
5008
|
var Media = {
|
|
@@ -6622,7 +6629,7 @@
|
|
|
6622
6629
|
margin,
|
|
6623
6630
|
width: dimensions$1(isVisible(this.widthElement) ? this.widthElement : this.$el).
|
|
6624
6631
|
width,
|
|
6625
|
-
top: offsetPosition(
|
|
6632
|
+
top: offsetPosition(referenceElement)[0] };
|
|
6626
6633
|
|
|
6627
6634
|
},
|
|
6628
6635
|
|
|
@@ -7100,7 +7107,7 @@
|
|
|
7100
7107
|
name: 'keydown',
|
|
7101
7108
|
|
|
7102
7109
|
filter() {
|
|
7103
|
-
return includes(this.mode, 'click') && this.$el
|
|
7110
|
+
return includes(this.mode, 'click') && isTag(this.$el, 'input');
|
|
7104
7111
|
},
|
|
7105
7112
|
|
|
7106
7113
|
handler(e) {
|
|
@@ -9188,39 +9195,35 @@
|
|
|
9188
9195
|
|
|
9189
9196
|
|
|
9190
9197
|
|
|
9191
|
-
function transformFn(prop, el,
|
|
9192
|
-
const unit = getUnit(
|
|
9198
|
+
function transformFn(prop, el, stops) {
|
|
9199
|
+
const unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
|
|
9200
|
+
let transformFn;
|
|
9193
9201
|
|
|
9194
9202
|
if (prop === 'x' || prop === 'y') {
|
|
9195
9203
|
prop = "translate" + ucfirst(prop);
|
|
9204
|
+
transformFn = (stop) => toFloat(toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
|
|
9196
9205
|
}
|
|
9197
9206
|
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
if (steps.length === 1) {
|
|
9201
|
-
steps.unshift(prop === 'scale' ? 1 : 0);
|
|
9207
|
+
if (stops.length === 1) {
|
|
9208
|
+
stops.unshift(prop === 'scale' ? 1 : 0);
|
|
9202
9209
|
}
|
|
9203
9210
|
|
|
9204
|
-
|
|
9205
|
-
let value = getValue(steps, percent);
|
|
9211
|
+
stops = parseStops(stops, transformFn);
|
|
9206
9212
|
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
}
|
|
9210
|
-
|
|
9211
|
-
css.transform += " " + prop + "(" + value + unit + ")";
|
|
9213
|
+
return (css, percent) => {
|
|
9214
|
+
css.transform += " " + prop + "(" + getValue(stops, percent) + unit + ")";
|
|
9212
9215
|
};
|
|
9213
9216
|
}
|
|
9214
9217
|
|
|
9215
|
-
function colorFn(prop, el,
|
|
9216
|
-
if (
|
|
9217
|
-
|
|
9218
|
+
function colorFn(prop, el, stops) {
|
|
9219
|
+
if (stops.length === 1) {
|
|
9220
|
+
stops.unshift(getCssValue(el, prop, ''));
|
|
9218
9221
|
}
|
|
9219
9222
|
|
|
9220
|
-
|
|
9223
|
+
stops = parseStops(stops, (stop) => parseColor(el, stop));
|
|
9221
9224
|
|
|
9222
9225
|
return (css, percent) => {
|
|
9223
|
-
const [start, end, p] =
|
|
9226
|
+
const [start, end, p] = getStop(stops, percent);
|
|
9224
9227
|
const value = start.
|
|
9225
9228
|
map((value, i) => {
|
|
9226
9229
|
value += p * (end[i] - value);
|
|
@@ -9240,85 +9243,83 @@
|
|
|
9240
9243
|
map(toFloat);
|
|
9241
9244
|
}
|
|
9242
9245
|
|
|
9243
|
-
function filterFn(prop, el,
|
|
9244
|
-
if (
|
|
9245
|
-
|
|
9246
|
+
function filterFn(prop, el, stops) {
|
|
9247
|
+
if (stops.length === 1) {
|
|
9248
|
+
stops.unshift(0);
|
|
9246
9249
|
}
|
|
9247
9250
|
|
|
9248
|
-
const unit = getUnit(
|
|
9251
|
+
const unit = getUnit(stops) || { blur: 'px', hue: 'deg' }[prop] || '%';
|
|
9249
9252
|
prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
|
|
9250
|
-
|
|
9253
|
+
stops = parseStops(stops);
|
|
9251
9254
|
|
|
9252
9255
|
return (css, percent) => {
|
|
9253
|
-
const value = getValue(
|
|
9256
|
+
const value = getValue(stops, percent);
|
|
9254
9257
|
css.filter += " " + prop + "(" + (value + unit) + ")";
|
|
9255
9258
|
};
|
|
9256
9259
|
}
|
|
9257
9260
|
|
|
9258
|
-
function cssPropFn(prop, el,
|
|
9259
|
-
if (
|
|
9260
|
-
|
|
9261
|
+
function cssPropFn(prop, el, stops) {
|
|
9262
|
+
if (stops.length === 1) {
|
|
9263
|
+
stops.unshift(getCssValue(el, prop, ''));
|
|
9261
9264
|
}
|
|
9262
9265
|
|
|
9263
|
-
|
|
9266
|
+
stops = parseStops(stops);
|
|
9264
9267
|
|
|
9265
9268
|
return (css, percent) => {
|
|
9266
|
-
css[prop] = getValue(
|
|
9269
|
+
css[prop] = getValue(stops, percent);
|
|
9267
9270
|
};
|
|
9268
9271
|
}
|
|
9269
9272
|
|
|
9270
|
-
function strokeFn(prop, el,
|
|
9271
|
-
if (
|
|
9272
|
-
|
|
9273
|
+
function strokeFn(prop, el, stops) {
|
|
9274
|
+
if (stops.length === 1) {
|
|
9275
|
+
stops.unshift(0);
|
|
9273
9276
|
}
|
|
9274
9277
|
|
|
9275
|
-
const unit = getUnit(
|
|
9276
|
-
|
|
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
|
+
});
|
|
9277
9284
|
|
|
9278
|
-
if (!
|
|
9285
|
+
if (!stops.some((_ref) => {let [value] = _ref;return value;})) {
|
|
9279
9286
|
return noop;
|
|
9280
9287
|
}
|
|
9281
9288
|
|
|
9282
|
-
const length = getMaxPathLength(el);
|
|
9283
9289
|
css(el, 'strokeDasharray', length);
|
|
9284
9290
|
|
|
9285
|
-
if (unit === '%') {
|
|
9286
|
-
steps = steps.map((step) => step * length / 100);
|
|
9287
|
-
}
|
|
9288
|
-
|
|
9289
|
-
steps = steps.reverse();
|
|
9290
|
-
|
|
9291
9291
|
return (css, percent) => {
|
|
9292
|
-
css.strokeDashoffset = getValue(
|
|
9292
|
+
css.strokeDashoffset = getValue(stops, percent);
|
|
9293
9293
|
};
|
|
9294
9294
|
}
|
|
9295
9295
|
|
|
9296
|
-
function backgroundFn(prop, el,
|
|
9297
|
-
if (
|
|
9298
|
-
|
|
9296
|
+
function backgroundFn(prop, el, stops) {
|
|
9297
|
+
if (stops.length === 1) {
|
|
9298
|
+
stops.unshift(0);
|
|
9299
9299
|
}
|
|
9300
9300
|
|
|
9301
9301
|
prop = prop.substr(-1);
|
|
9302
9302
|
const attr = prop === 'y' ? 'height' : 'width';
|
|
9303
|
-
|
|
9303
|
+
stops = parseStops(stops, (stop) => toPx(stop, attr, el));
|
|
9304
9304
|
|
|
9305
9305
|
const bgPos = getCssValue(el, "background-position-" + prop, '');
|
|
9306
9306
|
|
|
9307
9307
|
return getCssValue(el, 'backgroundSize', '') === 'cover' ?
|
|
9308
|
-
backgroundCoverFn(prop, el,
|
|
9309
|
-
setBackgroundPosFn(prop,
|
|
9308
|
+
backgroundCoverFn(prop, el, stops, bgPos, attr) :
|
|
9309
|
+
setBackgroundPosFn(prop, stops, bgPos);
|
|
9310
9310
|
}
|
|
9311
9311
|
|
|
9312
|
-
function backgroundCoverFn(prop, el,
|
|
9312
|
+
function backgroundCoverFn(prop, el, stops, bgPos, attr) {
|
|
9313
9313
|
const dimImage = getBackgroundImageDimensions(el);
|
|
9314
9314
|
|
|
9315
9315
|
if (!dimImage.width) {
|
|
9316
9316
|
return noop;
|
|
9317
9317
|
}
|
|
9318
9318
|
|
|
9319
|
-
const
|
|
9320
|
-
const
|
|
9321
|
-
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);
|
|
9322
9323
|
|
|
9323
9324
|
const diff = max - min;
|
|
9324
9325
|
let pos = (down ? -diff : 0) - (down ? min : max);
|
|
@@ -9343,7 +9344,7 @@
|
|
|
9343
9344
|
|
|
9344
9345
|
const dim = Dimensions.cover(dimImage, dimEl);
|
|
9345
9346
|
|
|
9346
|
-
const fn = setBackgroundPosFn(prop,
|
|
9347
|
+
const fn = setBackgroundPosFn(prop, stops, pos + "px");
|
|
9347
9348
|
return (css, percent) => {
|
|
9348
9349
|
fn(css, percent);
|
|
9349
9350
|
css.backgroundSize = dim.width + "px " + dim.height + "px";
|
|
@@ -9351,9 +9352,9 @@
|
|
|
9351
9352
|
};
|
|
9352
9353
|
}
|
|
9353
9354
|
|
|
9354
|
-
function setBackgroundPosFn(prop,
|
|
9355
|
+
function setBackgroundPosFn(prop, stops, pos) {
|
|
9355
9356
|
return function (css, percent) {
|
|
9356
|
-
css["background-position-" + prop] = "calc(" + pos + " + " + getValue(
|
|
9357
|
+
css["background-position-" + prop] = "calc(" + pos + " + " + getValue(stops, percent) + "px)";
|
|
9357
9358
|
};
|
|
9358
9359
|
}
|
|
9359
9360
|
|
|
@@ -9387,27 +9388,69 @@
|
|
|
9387
9388
|
|
|
9388
9389
|
}
|
|
9389
9390
|
|
|
9390
|
-
function
|
|
9391
|
-
const
|
|
9392
|
-
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;
|
|
9393
9398
|
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
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;
|
|
9397
9429
|
}
|
|
9398
9430
|
|
|
9399
|
-
function
|
|
9400
|
-
const
|
|
9401
|
-
return
|
|
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])];
|
|
9437
|
+
|
|
9402
9438
|
}
|
|
9403
9439
|
|
|
9404
|
-
function
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
'') ||
|
|
9409
|
-
defaultUnit);
|
|
9440
|
+
function getValue(stops, percent) {
|
|
9441
|
+
const [start, end, p] = getStop(stops, percent);
|
|
9442
|
+
return isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
|
|
9443
|
+
}
|
|
9410
9444
|
|
|
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;
|
|
9411
9454
|
}
|
|
9412
9455
|
|
|
9413
9456
|
function getCssValue(el, prop, value) {
|
|
@@ -9519,6 +9562,42 @@
|
|
|
9519
9562
|
|
|
9520
9563
|
events: ['resize'] } };
|
|
9521
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
|
+
|
|
9522
9601
|
function Transitioner (prev, next, dir, _ref) {let { center, easing, list } = _ref;
|
|
9523
9602
|
const deferred = new Deferred();
|
|
9524
9603
|
|
|
@@ -9685,7 +9764,7 @@
|
|
|
9685
9764
|
}
|
|
9686
9765
|
|
|
9687
9766
|
var slider = {
|
|
9688
|
-
mixins: [Class, Slider, SliderReactive],
|
|
9767
|
+
mixins: [Class, Slider, SliderReactive, SliderPreload],
|
|
9689
9768
|
|
|
9690
9769
|
props: {
|
|
9691
9770
|
center: Boolean,
|
|
@@ -9922,6 +10001,25 @@
|
|
|
9922
10001
|
} while (index !== prev);
|
|
9923
10002
|
|
|
9924
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);
|
|
9925
10023
|
} } };
|
|
9926
10024
|
|
|
9927
10025
|
|
|
@@ -10101,7 +10199,7 @@
|
|
|
10101
10199
|
} } };
|
|
10102
10200
|
|
|
10103
10201
|
var slideshow = {
|
|
10104
|
-
mixins: [Class, Slideshow, SliderReactive],
|
|
10202
|
+
mixins: [Class, Slideshow, SliderReactive, SliderPreload],
|
|
10105
10203
|
|
|
10106
10204
|
props: {
|
|
10107
10205
|
ratio: String,
|
|
@@ -10144,7 +10242,13 @@
|
|
|
10144
10242
|
height > 0 && css(this.list, 'minHeight', height);
|
|
10145
10243
|
},
|
|
10146
10244
|
|
|
10147
|
-
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
|
+
} } };
|
|
10148
10252
|
|
|
10149
10253
|
var sortable = {
|
|
10150
10254
|
mixins: [Class, Animate],
|