uikit-reset 3.2.0 → 3.3.0

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.
@@ -1,12 +1,12 @@
1
1
  //= require jquery
2
2
 
3
- /*! UIkit 3.2.0 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
3
+ /*! UIkit 3.3.0 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
4
4
 
5
5
  (function (global, factory) {
6
6
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
7
7
  typeof define === 'function' && define.amd ? define('uikit', factory) :
8
8
  (global = global || self, global.UIkit = factory());
9
- }(this, function () {
9
+ }(this, (function () {
10
10
  'use strict';
11
11
 
12
12
  var objPrototype = Object.prototype;
@@ -98,8 +98,10 @@
98
98
  return obj !== null && typeof obj === 'object';
99
99
  }
100
100
 
101
+ var toString = objPrototype.toString;
102
+
101
103
  function isPlainObject(obj) {
102
- return isObject(obj) && Object.getPrototypeOf(obj) === objPrototype;
104
+ return toString.call(obj) === '[object Object]';
103
105
  }
104
106
 
105
107
  function isWindow(obj) {
@@ -115,10 +117,12 @@
115
117
  }
116
118
 
117
119
  function isNode(obj) {
118
- return obj instanceof Node || isObject(obj) && obj.nodeType >= 1;
120
+ return isObject(obj) && obj.nodeType >= 1;
119
121
  }
120
122
 
121
- var toString = objPrototype.toString;
123
+ function isElement(obj) {
124
+ return isObject(obj) && obj.nodeType === 1;
125
+ }
122
126
 
123
127
  function isNodeCollection(obj) {
124
128
  return toString.call(obj).match(/^\[object (NodeList|HTMLCollection)\]$/);
@@ -173,7 +177,7 @@
173
177
  }
174
178
 
175
179
  function toNode(element) {
176
- return isNode(element) || isWindow(element) || isDocument(element) ?
180
+ return isNode(element) ?
177
181
  element :
178
182
  isNodeCollection(element) || isJQuery(element) ?
179
183
  element[0] :
@@ -194,6 +198,21 @@
194
198
  [];
195
199
  }
196
200
 
201
+ function toWindow(element) {
202
+ if (isWindow(element)) {
203
+ return element;
204
+ }
205
+
206
+ element = toNode(element);
207
+
208
+ return element ?
209
+ (isDocument(element) ?
210
+ element :
211
+ element.ownerDocument
212
+ ).defaultView :
213
+ window;
214
+ }
215
+
197
216
  function toList(value) {
198
217
  return isArray(value) ?
199
218
  value :
@@ -471,7 +490,7 @@
471
490
  if (selector[0] === '!') {
472
491
 
473
492
  var selectors = selector.substr(1).trim().split(' ');
474
- ctx = closest(context.parentNode, selectors[0]);
493
+ ctx = closest(parent(context), selectors[0]);
475
494
  selector = selectors.slice(1).join(' ').trim();
476
495
 
477
496
  }
@@ -555,9 +574,7 @@
555
574
  return ancestor;
556
575
  }
557
576
 
558
- ancestor = ancestor.parentNode;
559
-
560
- } while (ancestor && ancestor.nodeType === 1);
577
+ } while ((ancestor = parent(ancestor)));
561
578
  };
562
579
 
563
580
  function closest(element, selector) {
@@ -566,19 +583,23 @@
566
583
  selector = selector.slice(1);
567
584
  }
568
585
 
569
- return isNode(element) ?
586
+ return isElement(element) ?
570
587
  closestFn.call(element, selector) :
571
588
  toNodes(element).map(function (element) {
572
589
  return closest(element, selector);
573
590
  }).filter(Boolean);
574
591
  }
575
592
 
593
+ function parent(element) {
594
+ element = toNode(element);
595
+ return element && isElement(element.parentNode) && element.parentNode;
596
+ }
597
+
576
598
  function parents(element, selector) {
577
599
  var elements = [];
578
- element = toNode(element);
579
600
 
580
- while ((element = element.parentNode) && element.nodeType === 1) {
581
- if (matches(element, selector)) {
601
+ while ((element = parent(element))) {
602
+ if (!selector || matches(element, selector)) {
582
603
  elements.push(element);
583
604
  }
584
605
  }
@@ -586,6 +607,14 @@
586
607
  return elements;
587
608
  }
588
609
 
610
+ function children(element, selector) {
611
+ element = toNode(element);
612
+ var children = element ? toNodes(element.children) : [];
613
+ return selector ? children.filter(function (element) {
614
+ return matches(element, selector);
615
+ }) : children;
616
+ }
617
+
589
618
  var escapeFn = window.CSS && CSS.escape || function (css) {
590
619
  return css.replace(/([^\x7f-\uFFFF\w-])/g, function (match) {
591
620
  return ("\\" + match);
@@ -669,14 +698,14 @@
669
698
  listener = detail(listener);
670
699
  }
671
700
 
672
- if (selector) {
673
- listener = delegate(targets, selector, listener);
674
- }
675
-
676
701
  if (useCapture && useCapture.self) {
677
702
  listener = selfFilter(listener);
678
703
  }
679
704
 
705
+ if (selector) {
706
+ listener = delegate(targets, selector, listener);
707
+ }
708
+
680
709
  useCapture = useCaptureFilter(useCapture);
681
710
 
682
711
  type.split(' ').forEach(function (type) {
@@ -1124,7 +1153,7 @@
1124
1153
  function index(element, ref) {
1125
1154
  return ref ?
1126
1155
  toNodes(element).indexOf(toNode(ref)) :
1127
- toNodes((element = toNode(element)) && element.parentNode.children).indexOf(element);
1156
+ children(parent(element)).indexOf(element);
1128
1157
  }
1129
1158
 
1130
1159
  function getIndex(i, elements, current, finite) {
@@ -1238,9 +1267,7 @@
1238
1267
 
1239
1268
  function unwrap(element) {
1240
1269
  toNodes(element)
1241
- .map(function (element) {
1242
- return element.parentNode;
1243
- })
1270
+ .map(parent)
1244
1271
  .filter(function (value, index, self) {
1245
1272
  return self.indexOf(value) === index;
1246
1273
  })
@@ -1273,15 +1300,16 @@
1273
1300
 
1274
1301
  function apply(node, fn) {
1275
1302
 
1276
- if (!node || node.nodeType !== 1) {
1303
+ if (!isElement(node)) {
1277
1304
  return;
1278
1305
  }
1279
1306
 
1280
1307
  fn(node);
1281
1308
  node = node.firstElementChild;
1282
1309
  while (node) {
1310
+ var next = node.nextElementSibling;
1283
1311
  apply(node, fn);
1284
- node = node.nextElementSibling;
1312
+ node = next;
1285
1313
  }
1286
1314
  }
1287
1315
 
@@ -1569,9 +1597,9 @@
1569
1597
  clearTimeout(timer);
1570
1598
  removeClass(element, 'uk-transition');
1571
1599
  css(element, {
1572
- 'transition-property': '',
1573
- 'transition-duration': '',
1574
- 'transition-timing-function': ''
1600
+ transitionProperty: '',
1601
+ transitionDuration: '',
1602
+ transitionTimingFunction: ''
1575
1603
  });
1576
1604
  type === 'transitioncanceled' ? reject() : resolve();
1577
1605
  }, {
@@ -1580,9 +1608,9 @@
1580
1608
 
1581
1609
  addClass(element, 'uk-transition');
1582
1610
  css(element, assign({
1583
- 'transition-property': Object.keys(props).map(propName).join(','),
1584
- 'transition-duration': (duration + "ms"),
1585
- 'transition-timing-function': timing
1611
+ transitionProperty: Object.keys(props).map(propName).join(','),
1612
+ transitionDuration: (duration + "ms"),
1613
+ transitionTimingFunction: timing
1586
1614
  }, props));
1587
1615
 
1588
1616
  });
@@ -1747,7 +1775,7 @@
1747
1775
 
1748
1776
  if (flip) {
1749
1777
 
1750
- var boundaries = [getDimensions(getWindow(element))];
1778
+ var boundaries = [getDimensions(toWindow(element))];
1751
1779
 
1752
1780
  if (boundary) {
1753
1781
  boundaries.unshift(getDimensions(boundary));
@@ -1821,39 +1849,32 @@
1821
1849
 
1822
1850
  function offset(element, coordinates) {
1823
1851
 
1824
- element = toNode(element);
1825
-
1826
- if (coordinates) {
1827
-
1828
- var currentOffset = offset(element);
1829
- var pos = css(element, 'position');
1830
-
1831
- ['left', 'top'].forEach(function (prop) {
1832
- if (prop in coordinates) {
1833
- var value = css(element, prop);
1834
- css(element, prop, coordinates[prop] - currentOffset[prop] +
1835
- toFloat(pos === 'absolute' && value === 'auto' ?
1836
- position(element)[prop] :
1837
- value)
1838
- );
1839
- }
1840
- });
1841
-
1842
- return;
1852
+ if (!coordinates) {
1853
+ return getDimensions(element);
1843
1854
  }
1844
1855
 
1845
- return getDimensions(element);
1856
+ var currentOffset = offset(element);
1857
+ var pos = css(element, 'position');
1858
+
1859
+ ['left', 'top'].forEach(function (prop) {
1860
+ if (prop in coordinates) {
1861
+ var value = css(element, prop);
1862
+ css(element, prop, coordinates[prop] - currentOffset[prop] +
1863
+ toFloat(pos === 'absolute' && value === 'auto' ?
1864
+ position(element)[prop] :
1865
+ value)
1866
+ );
1867
+ }
1868
+ });
1846
1869
  }
1847
1870
 
1848
1871
  function getDimensions(element) {
1849
1872
 
1850
- element = toNode(element);
1851
-
1852
1873
  if (!element) {
1853
1874
  return {};
1854
1875
  }
1855
1876
 
1856
- var ref = getWindow(element);
1877
+ var ref = toWindow(element);
1857
1878
  var top = ref.pageYOffset;
1858
1879
  var left = ref.pageXOffset;
1859
1880
 
@@ -1885,6 +1906,8 @@
1885
1906
  });
1886
1907
  }
1887
1908
 
1909
+ element = toNode(element);
1910
+
1888
1911
  var rect = element.getBoundingClientRect();
1889
1912
 
1890
1913
  if (!isUndefined(style)) {
@@ -1904,27 +1927,41 @@
1904
1927
  };
1905
1928
  }
1906
1929
 
1907
- function position(element) {
1908
- element = toNode(element);
1930
+ function position(element, parent) {
1931
+
1932
+ parent = parent || toNode(element).offsetParent || toWindow(element).document.documentElement;
1909
1933
 
1910
- var parent = element.offsetParent || getDocEl(element);
1934
+ var elementOffset = offset(element);
1911
1935
  var parentOffset = offset(parent);
1912
- var ref = ['top', 'left'].reduce(function (props, prop) {
1913
- var propName = ucfirst(prop);
1914
- props[prop] -= parentOffset[prop] +
1915
- toFloat(css(element, ("margin" + propName))) +
1916
- toFloat(css(parent, ("border" + propName + "Width")));
1917
- return props;
1918
- }, offset(element));
1919
- var top = ref.top;
1920
- var left = ref.left;
1921
1936
 
1922
1937
  return {
1923
- top: top,
1924
- left: left
1938
+ top: elementOffset.top - parentOffset.top - toFloat(css(parent, 'borderTopWidth')),
1939
+ left: elementOffset.left - parentOffset.left - toFloat(css(parent, 'borderLeftWidth'))
1925
1940
  };
1926
1941
  }
1927
1942
 
1943
+ function offsetPosition(element) {
1944
+ var offset = [0, 0];
1945
+
1946
+ element = toNode(element);
1947
+
1948
+ do {
1949
+
1950
+ offset[0] += element.offsetTop;
1951
+ offset[1] += element.offsetLeft;
1952
+
1953
+ if (css(element, 'position') === 'fixed') {
1954
+ var win = toWindow(element);
1955
+ offset[0] += win.pageYOffset;
1956
+ offset[1] += win.pageXOffset;
1957
+ return offset;
1958
+ }
1959
+
1960
+ } while ((element = element.offsetParent));
1961
+
1962
+ return offset;
1963
+ }
1964
+
1928
1965
  var height = dimension('height');
1929
1966
  var width = dimension('width');
1930
1967
 
@@ -1932,8 +1969,6 @@
1932
1969
  var propName = ucfirst(prop);
1933
1970
  return function (element, value) {
1934
1971
 
1935
- element = toNode(element);
1936
-
1937
1972
  if (isUndefined(value)) {
1938
1973
 
1939
1974
  if (isWindow(element)) {
@@ -1945,16 +1980,18 @@
1945
1980
  return Math.max(doc[("offset" + propName)], doc[("scroll" + propName)]);
1946
1981
  }
1947
1982
 
1983
+ element = toNode(element);
1984
+
1948
1985
  value = css(element, prop);
1949
1986
  value = value === 'auto' ? element[("offset" + propName)] : toFloat(value) || 0;
1950
1987
 
1951
- return value - boxModelAdjust(prop, element);
1988
+ return value - boxModelAdjust(element, prop);
1952
1989
 
1953
1990
  } else {
1954
1991
 
1955
1992
  css(element, prop, !value && value !== 0 ?
1956
1993
  '' :
1957
- +value + boxModelAdjust(prop, element) + 'px'
1994
+ +value + boxModelAdjust(element, prop) + 'px'
1958
1995
  );
1959
1996
 
1960
1997
  }
@@ -1962,7 +1999,7 @@
1962
1999
  };
1963
2000
  }
1964
2001
 
1965
- function boxModelAdjust(prop, element, sizing) {
2002
+ function boxModelAdjust(element, prop, sizing) {
1966
2003
  if (sizing === void 0) sizing = 'border-box';
1967
2004
 
1968
2005
  return css(element, 'boxSizing') === sizing ?
@@ -2036,88 +2073,6 @@
2036
2073
  }
2037
2074
  }
2038
2075
 
2039
- function isInView(element, topOffset, leftOffset) {
2040
- if (topOffset === void 0) topOffset = 0;
2041
- if (leftOffset === void 0) leftOffset = 0;
2042
-
2043
-
2044
- if (!isVisible(element)) {
2045
- return false;
2046
- }
2047
-
2048
- element = toNode(element);
2049
-
2050
- var win = getWindow(element);
2051
- var client = element.getBoundingClientRect();
2052
- var bounding = {
2053
- top: -topOffset,
2054
- left: -leftOffset,
2055
- bottom: topOffset + height(win),
2056
- right: leftOffset + width(win)
2057
- };
2058
-
2059
- return intersectRect(client, bounding) || pointInRect({
2060
- x: client.left,
2061
- y: client.top
2062
- }, bounding);
2063
-
2064
- }
2065
-
2066
- function scrolledOver(element, heightOffset) {
2067
- if (heightOffset === void 0) heightOffset = 0;
2068
-
2069
-
2070
- if (!isVisible(element)) {
2071
- return 0;
2072
- }
2073
-
2074
- element = toNode(element);
2075
-
2076
- var win = getWindow(element);
2077
- var doc = getDocument(element);
2078
- var elHeight = element.offsetHeight + heightOffset;
2079
- var ref = offsetPosition(element);
2080
- var top = ref[0];
2081
- var vp = height(win);
2082
- var vh = vp + Math.min(0, top - vp);
2083
- var diff = Math.max(0, vp - (height(doc) + heightOffset - (top + elHeight)));
2084
-
2085
- return clamp(((vh + win.pageYOffset - top) / ((vh + (elHeight - (diff < vp ? diff : 0))) / 100)) / 100);
2086
- }
2087
-
2088
- function scrollTop(element, top) {
2089
- element = toNode(element);
2090
-
2091
- if (isWindow(element) || isDocument(element)) {
2092
- var ref = getWindow(element);
2093
- var scrollTo = ref.scrollTo;
2094
- var pageXOffset = ref.pageXOffset;
2095
- scrollTo(pageXOffset, top);
2096
- } else {
2097
- element.scrollTop = top;
2098
- }
2099
- }
2100
-
2101
- function offsetPosition(element) {
2102
- var offset = [0, 0];
2103
-
2104
- do {
2105
-
2106
- offset[0] += element.offsetTop;
2107
- offset[1] += element.offsetLeft;
2108
-
2109
- if (css(element, 'position') === 'fixed') {
2110
- var win = getWindow(element);
2111
- offset[0] += win.pageYOffset;
2112
- offset[1] += win.pageXOffset;
2113
- return offset;
2114
- }
2115
-
2116
- } while ((element = element.offsetParent));
2117
-
2118
- return offset;
2119
- }
2120
-
2121
2076
  function toPx(value, property, element) {
2122
2077
  if (property === void 0) property = 'width';
2123
2078
  if (element === void 0) element = window;
@@ -2125,9 +2080,9 @@
2125
2080
  return isNumeric(value) ?
2126
2081
  +value :
2127
2082
  endsWith(value, 'vh') ?
2128
- percent(height(getWindow(element)), value) :
2083
+ percent(height(toWindow(element)), value) :
2129
2084
  endsWith(value, 'vw') ?
2130
- percent(width(getWindow(element)), value) :
2085
+ percent(width(toWindow(element)), value) :
2131
2086
  endsWith(value, '%') ?
2132
2087
  percent(getDimensions(element)[property], value) :
2133
2088
  toFloat(value);
@@ -2137,18 +2092,6 @@
2137
2092
  return base * toFloat(value) / 100;
2138
2093
  }
2139
2094
 
2140
- function getWindow(element) {
2141
- return isWindow(element) ? element : getDocument(element).defaultView;
2142
- }
2143
-
2144
- function getDocument(element) {
2145
- return toNode(element).ownerDocument;
2146
- }
2147
-
2148
- function getDocEl(element) {
2149
- return getDocument(element).documentElement;
2150
- }
2151
-
2152
2095
  /*
2153
2096
  Based on:
2154
2097
  Copyright (c) 2016 Wilson Page wilsonpage@me.com
@@ -2180,26 +2123,34 @@
2180
2123
 
2181
2124
  };
2182
2125
 
2183
- function flush() {
2126
+ function flush(recursion) {
2127
+ if (recursion === void 0) recursion = 1;
2128
+
2184
2129
  runTasks(fastdom.reads);
2185
2130
  runTasks(fastdom.writes.splice(0, fastdom.writes.length));
2186
2131
 
2187
2132
  fastdom.scheduled = false;
2188
2133
 
2189
2134
  if (fastdom.reads.length || fastdom.writes.length) {
2190
- scheduleFlush(true);
2135
+ scheduleFlush(recursion + 1);
2191
2136
  }
2192
2137
  }
2193
2138
 
2194
- function scheduleFlush(microtask) {
2195
- if (microtask === void 0) microtask = false;
2139
+ var RECURSION_LIMIT = 5;
2196
2140
 
2141
+ function scheduleFlush(recursion) {
2197
2142
  if (!fastdom.scheduled) {
2198
2143
  fastdom.scheduled = true;
2199
- if (microtask) {
2200
- Promise.resolve().then(flush);
2144
+ if (recursion > RECURSION_LIMIT) {
2145
+ throw new Error('Maximum recursion limit reached.');
2146
+ } else if (recursion) {
2147
+ Promise.resolve().then(function () {
2148
+ return flush(recursion);
2149
+ });
2201
2150
  } else {
2202
- requestAnimationFrame(flush);
2151
+ requestAnimationFrame(function () {
2152
+ return flush();
2153
+ });
2203
2154
  }
2204
2155
  }
2205
2156
  }
@@ -2221,54 +2172,35 @@
2221
2172
  MouseTracker.prototype = {
2222
2173
 
2223
2174
  positions: [],
2224
- position: null,
2225
2175
 
2226
2176
  init: function () {
2227
2177
  var this$1 = this;
2228
2178
 
2229
2179
 
2230
2180
  this.positions = [];
2231
- this.position = null;
2232
2181
 
2233
- var ticking = false;
2182
+ var position;
2234
2183
  this.unbind = on(document, 'mousemove', function (e) {
2184
+ return position = getEventPos(e, 'page');
2185
+ });
2186
+ this.interval = setInterval(function () {
2235
2187
 
2236
- if (ticking) {
2188
+ if (!position) {
2237
2189
  return;
2238
2190
  }
2239
2191
 
2240
- setTimeout(function () {
2241
-
2242
- var time = Date.now();
2243
- var ref = this$1.positions;
2244
- var length = ref.length;
2245
-
2246
- if (length && (time - this$1.positions[length - 1].time > 100)) {
2247
- this$1.positions.splice(0, length);
2248
- }
2249
-
2250
- this$1.positions.push({
2251
- time: time,
2252
- x: e.pageX,
2253
- y: e.pageY
2254
- });
2255
-
2256
- if (this$1.positions.length > 5) {
2257
- this$1.positions.shift();
2258
- }
2259
-
2260
- ticking = false;
2261
- }, 5);
2192
+ this$1.positions.push(position);
2262
2193
 
2263
- ticking = true;
2264
- });
2194
+ if (this$1.positions.length > 5) {
2195
+ this$1.positions.shift();
2196
+ }
2197
+ }, 50);
2265
2198
 
2266
2199
  },
2267
2200
 
2268
2201
  cancel: function () {
2269
- if (this.unbind) {
2270
- this.unbind();
2271
- }
2202
+ this.unbind && this.unbind();
2203
+ this.interval && clearInterval(this.interval);
2272
2204
  },
2273
2205
 
2274
2206
  movesTo: function (target) {
@@ -2278,50 +2210,79 @@
2278
2210
  }
2279
2211
 
2280
2212
  var p = offset(target);
2281
- var position = last(this.positions);
2213
+ var left = p.left;
2214
+ var right = p.right;
2215
+ var top = p.top;
2216
+ var bottom = p.bottom;
2217
+
2282
2218
  var ref = this.positions;
2283
- var prevPos = ref[0];
2219
+ var prevPosition = ref[0];
2220
+ var position = last(this.positions);
2221
+ var path = [prevPosition, position];
2284
2222
 
2285
- if (p.left <= position.x && position.x <= p.right && p.top <= position.y && position.y <= p.bottom) {
2223
+ if (pointInRect(position, p)) {
2286
2224
  return false;
2287
2225
  }
2288
2226
 
2289
- var points = [
2227
+ var diagonals = [
2290
2228
  [{
2291
- x: p.left,
2292
- y: p.top
2229
+ x: left,
2230
+ y: top
2293
2231
  }, {
2294
- x: p.right,
2295
- y: p.bottom
2232
+ x: right,
2233
+ y: bottom
2296
2234
  }],
2297
2235
  [{
2298
- x: p.right,
2299
- y: p.top
2236
+ x: left,
2237
+ y: bottom
2300
2238
  }, {
2301
- x: p.left,
2302
- y: p.bottom
2239
+ x: right,
2240
+ y: top
2303
2241
  }]
2304
2242
  ];
2305
2243
 
2306
- if (p.right <= position.x);
2307
- else if (p.left >= position.x) {
2308
- points[0].reverse();
2309
- points[1].reverse();
2310
- } else if (p.bottom <= position.y) {
2311
- points[0].reverse();
2312
- } else if (p.top >= position.y) {
2313
- points[1].reverse();
2314
- }
2315
-
2316
- return !!points.reduce(function (result, point) {
2317
- return result + (slope(prevPos, point[0]) < slope(position, point[0]) && slope(prevPos, point[1]) > slope(position, point[1]));
2318
- }, 0);
2244
+ return diagonals.some(function (diagonal) {
2245
+ var intersection = intersect(path, diagonal);
2246
+ return intersection && pointInRect(intersection, p);
2247
+ });
2319
2248
  }
2320
2249
 
2321
2250
  };
2322
2251
 
2323
- function slope(a, b) {
2324
- return (b.y - a.y) / (b.x - a.x);
2252
+ // Inspired by http://paulbourke.net/geometry/pointlineplane/
2253
+ function intersect(ref, ref$1) {
2254
+ var ref_0 = ref[0];
2255
+ var x1 = ref_0.x;
2256
+ var y1 = ref_0.y;
2257
+ var ref_1 = ref[1];
2258
+ var x2 = ref_1.x;
2259
+ var y2 = ref_1.y;
2260
+ var ref$1_0 = ref$1[0];
2261
+ var x3 = ref$1_0.x;
2262
+ var y3 = ref$1_0.y;
2263
+ var ref$1_1 = ref$1[1];
2264
+ var x4 = ref$1_1.x;
2265
+ var y4 = ref$1_1.y;
2266
+
2267
+
2268
+ var denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
2269
+
2270
+ // Lines are parallel
2271
+ if (denominator === 0) {
2272
+ return false;
2273
+ }
2274
+
2275
+ var ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;
2276
+
2277
+ if (ua < 0) {
2278
+ return false;
2279
+ }
2280
+
2281
+ // Return a object with the x and y coordinates of the intersection
2282
+ return {
2283
+ x: x1 + ua * (x2 - x1),
2284
+ y: y1 + ua * (y2 - y1)
2285
+ };
2325
2286
  }
2326
2287
 
2327
2288
  var strats = {};
@@ -2665,6 +2626,163 @@
2665
2626
 
2666
2627
  }
2667
2628
 
2629
+ function isInView(element, offsetTop, offsetLeft) {
2630
+ if (offsetTop === void 0) offsetTop = 0;
2631
+ if (offsetLeft === void 0) offsetLeft = 0;
2632
+
2633
+
2634
+ if (!isVisible(element)) {
2635
+ return false;
2636
+ }
2637
+
2638
+ var parents = overflowParents(element).concat(element);
2639
+
2640
+ for (var i = 0; i < parents.length - 1; i++) {
2641
+ var ref = offset(getViewport(parents[i]));
2642
+ var top = ref.top;
2643
+ var left = ref.left;
2644
+ var bottom = ref.bottom;
2645
+ var right = ref.right;
2646
+ var vp = {
2647
+ top: top - offsetTop,
2648
+ left: left - offsetLeft,
2649
+ bottom: bottom + offsetTop,
2650
+ right: right + offsetLeft
2651
+ };
2652
+
2653
+ var client = offset(parents[i + 1]);
2654
+
2655
+ if (!intersectRect(client, vp) && !pointInRect({
2656
+ x: client.left,
2657
+ y: client.top
2658
+ }, vp)) {
2659
+ return false;
2660
+ }
2661
+ }
2662
+
2663
+ return true;
2664
+ }
2665
+
2666
+ function scrollTop(element, top) {
2667
+
2668
+ if (isWindow(element) || isDocument(element)) {
2669
+ element = getScrollingElement(element);
2670
+ } else {
2671
+ element = toNode(element);
2672
+ }
2673
+
2674
+ element.scrollTop = top;
2675
+ }
2676
+
2677
+ function scrollIntoView(element, ref) {
2678
+ if (ref === void 0) ref = {};
2679
+ var duration = ref.duration;
2680
+ if (duration === void 0) duration = 1000;
2681
+ var offset = ref.offset;
2682
+ if (offset === void 0) offset = 0;
2683
+
2684
+
2685
+ if (!isVisible(element)) {
2686
+ return;
2687
+ }
2688
+
2689
+ var parents = overflowParents(element).concat(element);
2690
+ duration /= parents.length - 1;
2691
+
2692
+ var promise = Promise.resolve();
2693
+ var loop = function (i) {
2694
+ promise = promise.then(function () {
2695
+ return new Promise(function (resolve) {
2696
+
2697
+ var scrollElement = parents[i];
2698
+ var element = parents[i + 1];
2699
+
2700
+ var scroll = scrollElement.scrollTop;
2701
+ var top = position(element, getViewport(scrollElement)).top - offset;
2702
+
2703
+ var start = Date.now();
2704
+ var step = function () {
2705
+
2706
+ var percent = ease(clamp((Date.now() - start) / duration));
2707
+
2708
+ scrollTop(scrollElement, scroll + top * percent);
2709
+
2710
+ // scroll more if we have not reached our destination
2711
+ if (percent !== 1) {
2712
+ requestAnimationFrame(step);
2713
+ } else {
2714
+ resolve();
2715
+ }
2716
+
2717
+ };
2718
+
2719
+ step();
2720
+ });
2721
+ });
2722
+ };
2723
+
2724
+ for (var i = 0; i < parents.length - 1; i++) loop(i);
2725
+
2726
+ return promise;
2727
+
2728
+ function ease(k) {
2729
+ return 0.5 * (1 - Math.cos(Math.PI * k));
2730
+ }
2731
+
2732
+ }
2733
+
2734
+ function scrolledOver(element, heightOffset) {
2735
+ if (heightOffset === void 0) heightOffset = 0;
2736
+
2737
+
2738
+ if (!isVisible(element)) {
2739
+ return 0;
2740
+ }
2741
+
2742
+ var scrollElement = last(scrollParents(element));
2743
+ var scrollHeight = scrollElement.scrollHeight;
2744
+ var scrollTop = scrollElement.scrollTop;
2745
+ var viewport = getViewport(scrollElement);
2746
+ var viewportHeight = offset(viewport).height;
2747
+ var viewportTop = offsetPosition(element)[0] - scrollTop - offsetPosition(scrollElement)[0];
2748
+ var viewportDist = Math.min(viewportHeight, viewportTop + scrollTop);
2749
+
2750
+ var top = viewportTop - viewportDist;
2751
+ var dist = Math.min(
2752
+ offset(element).height + heightOffset + viewportDist,
2753
+ scrollHeight - (viewportTop + scrollTop),
2754
+ scrollHeight - viewportHeight
2755
+ );
2756
+
2757
+ return clamp(-1 * top / dist);
2758
+ }
2759
+
2760
+ function scrollParents(element, overflowRe) {
2761
+ if (overflowRe === void 0) overflowRe = /auto|scroll/;
2762
+
2763
+ var scrollEl = getScrollingElement(element);
2764
+ var scrollParents = parents(element).filter(function (parent) {
2765
+ return parent === scrollEl ||
2766
+ overflowRe.test(css(parent, 'overflow')) &&
2767
+ parent.scrollHeight > Math.round(offset(parent).height);
2768
+ }).reverse();
2769
+ return scrollParents.length ? scrollParents : [scrollEl];
2770
+ }
2771
+
2772
+ function getViewport(scrollElement) {
2773
+ return scrollElement === getScrollingElement(scrollElement) ? window : scrollElement;
2774
+ }
2775
+
2776
+ function overflowParents(element) {
2777
+ return scrollParents(element, /auto|scroll|hidden/);
2778
+ }
2779
+
2780
+ function getScrollingElement(element) {
2781
+ var ref = toWindow(element);
2782
+ var document = ref.document;
2783
+ return document.scrollingElement || document.documentElement;
2784
+ }
2785
+
2668
2786
  var IntersectionObserver = 'IntersectionObserver' in window ?
2669
2787
  window.IntersectionObserver :
2670
2788
  /*@__PURE__*/ (function () {
@@ -2745,6 +2863,7 @@
2745
2863
 
2746
2864
 
2747
2865
  var util = /*#__PURE__*/ Object.freeze({
2866
+ __proto__: null,
2748
2867
  ajax: ajax,
2749
2868
  getImage: getImage,
2750
2869
  transition: transition,
@@ -2764,14 +2883,11 @@
2764
2883
  positionAt: positionAt,
2765
2884
  offset: offset,
2766
2885
  position: position,
2886
+ offsetPosition: offsetPosition,
2767
2887
  height: height,
2768
2888
  width: width,
2769
2889
  boxModelAdjust: boxModelAdjust,
2770
2890
  flipPosition: flipPosition,
2771
- isInView: isInView,
2772
- scrolledOver: scrolledOver,
2773
- scrollTop: scrollTop,
2774
- offsetPosition: offsetPosition,
2775
2891
  toPx: toPx,
2776
2892
  ready: ready,
2777
2893
  index: index,
@@ -2830,6 +2946,7 @@
2830
2946
  isDocument: isDocument,
2831
2947
  isJQuery: isJQuery,
2832
2948
  isNode: isNode,
2949
+ isElement: isElement,
2833
2950
  isNodeCollection: isNodeCollection,
2834
2951
  isBoolean: isBoolean,
2835
2952
  isString: isString,
@@ -2842,6 +2959,7 @@
2842
2959
  toFloat: toFloat,
2843
2960
  toNode: toNode,
2844
2961
  toNodes: toNodes,
2962
+ toWindow: toWindow,
2845
2963
  toList: toList,
2846
2964
  toMs: toMs,
2847
2965
  isEqual: isEqual,
@@ -2869,257 +2987,22 @@
2869
2987
  findAll: findAll,
2870
2988
  matches: matches,
2871
2989
  closest: closest,
2990
+ parent: parent,
2872
2991
  parents: parents,
2992
+ children: children,
2873
2993
  escape: escape,
2874
2994
  css: css,
2875
2995
  getStyles: getStyles,
2876
2996
  getStyle: getStyle,
2877
2997
  getCssVar: getCssVar,
2878
- propName: propName
2879
- });
2880
-
2881
- function componentAPI(UIkit) {
2882
-
2883
- var DATA = UIkit.data;
2884
-
2885
- var components = {};
2886
-
2887
- UIkit.component = function (name, options) {
2888
-
2889
- if (!options) {
2890
-
2891
- if (isPlainObject(components[name])) {
2892
- components[name] = UIkit.extend(components[name]);
2893
- }
2894
-
2895
- return components[name];
2896
-
2897
- }
2898
-
2899
- UIkit[name] = function (element, data) {
2900
- var i = arguments.length,
2901
- argsArray = Array(i);
2902
- while (i--) argsArray[i] = arguments[i];
2903
-
2904
-
2905
- var component = UIkit.component(name);
2906
-
2907
- if (isPlainObject(element)) {
2908
- return new component({
2909
- data: element
2910
- });
2911
- }
2912
-
2913
- if (component.options.functional) {
2914
- return new component({
2915
- data: [].concat(argsArray)
2916
- });
2917
- }
2918
-
2919
- return element && element.nodeType ? init(element) : $$(element).map(init)[0];
2920
-
2921
- function init(element) {
2922
-
2923
- var instance = UIkit.getComponent(element, name);
2924
-
2925
- if (instance) {
2926
- if (!data) {
2927
- return instance;
2928
- } else {
2929
- instance.$destroy();
2930
- }
2931
- }
2932
-
2933
- return new component({
2934
- el: element,
2935
- data: data
2936
- });
2937
-
2938
- }
2939
-
2940
- };
2941
-
2942
- var opt = isPlainObject(options) ? assign({}, options) : options.options;
2943
-
2944
- opt.name = name;
2945
-
2946
- if (opt.install) {
2947
- opt.install(UIkit, opt, name);
2948
- }
2949
-
2950
- if (UIkit._initialized && !opt.functional) {
2951
- var id = hyphenate(name);
2952
- fastdom.read(function () {
2953
- return UIkit[name](("[uk-" + id + "],[data-uk-" + id + "]"));
2954
- });
2955
- }
2956
-
2957
- return components[name] = isPlainObject(options) ? opt : options;
2958
- };
2959
-
2960
- UIkit.getComponents = function (element) {
2961
- return element && element[DATA] || {};
2962
- };
2963
- UIkit.getComponent = function (element, name) {
2964
- return UIkit.getComponents(element)[name];
2965
- };
2966
-
2967
- UIkit.connect = function (node) {
2968
-
2969
- if (node[DATA]) {
2970
- for (var name in node[DATA]) {
2971
- node[DATA][name]._callConnected();
2972
- }
2973
- }
2974
-
2975
- for (var i = 0; i < node.attributes.length; i++) {
2976
-
2977
- var name$1 = getComponentName(node.attributes[i].name);
2978
-
2979
- if (name$1 && name$1 in components) {
2980
- UIkit[name$1](node);
2981
- }
2982
-
2983
- }
2984
-
2985
- };
2986
-
2987
- UIkit.disconnect = function (node) {
2988
- for (var name in node[DATA]) {
2989
- node[DATA][name]._callDisconnected();
2990
- }
2991
- };
2992
-
2993
- }
2994
-
2995
- function getComponentName(attribute) {
2996
- return startsWith(attribute, 'uk-') || startsWith(attribute, 'data-uk-') ?
2997
- camelize(attribute.replace('data-uk-', '').replace('uk-', '')) :
2998
- false;
2999
- }
3000
-
3001
- function boot(UIkit) {
3002
-
3003
- var connect = UIkit.connect;
3004
- var disconnect = UIkit.disconnect;
3005
-
3006
- if (!('MutationObserver' in window)) {
3007
- return;
3008
- }
3009
-
3010
- if (document.body) {
3011
-
3012
- fastdom.read(init);
3013
-
3014
- } else {
3015
-
3016
- (new MutationObserver(function () {
3017
-
3018
- if (document.body) {
3019
- this.disconnect();
3020
- init();
3021
- }
3022
-
3023
- })).observe(document, {
3024
- childList: true,
3025
- subtree: true
3026
- });
3027
-
3028
- }
3029
-
3030
- function init() {
3031
-
3032
- apply(document.body, connect);
3033
-
3034
- // Safari renders prior to first animation frame
3035
- fastdom.flush();
3036
-
3037
- (new MutationObserver(function (mutations) {
3038
- return mutations.forEach(applyMutation);
3039
- })).observe(document, {
3040
- childList: true,
3041
- subtree: true,
3042
- characterData: true,
3043
- attributes: true
3044
- });
3045
-
3046
- UIkit._initialized = true;
3047
- }
3048
-
3049
- function applyMutation(mutation) {
3050
-
3051
- var target = mutation.target;
3052
- var type = mutation.type;
3053
-
3054
- var update = type !== 'attributes' ?
3055
- applyChildList(mutation) :
3056
- applyAttribute(mutation);
3057
-
3058
- update && UIkit.update(target);
3059
-
3060
- }
3061
-
3062
- function applyAttribute(ref) {
3063
- var target = ref.target;
3064
- var attributeName = ref.attributeName;
3065
-
3066
-
3067
- if (attributeName === 'href') {
3068
- return true;
3069
- }
3070
-
3071
- var name = getComponentName(attributeName);
3072
-
3073
- if (!name || !(name in UIkit)) {
3074
- return;
3075
- }
3076
-
3077
- if (hasAttr(target, attributeName)) {
3078
- UIkit[name](target);
3079
- return true;
3080
- }
3081
-
3082
- var component = UIkit.getComponent(target, name);
3083
-
3084
- if (component) {
3085
- component.$destroy();
3086
- return true;
3087
- }
3088
-
3089
- }
3090
-
3091
- function applyChildList(ref) {
3092
- var addedNodes = ref.addedNodes;
3093
- var removedNodes = ref.removedNodes;
3094
-
3095
-
3096
- for (var i = 0; i < addedNodes.length; i++) {
3097
- apply(addedNodes[i], connect);
3098
- }
3099
-
3100
- for (var i$1 = 0; i$1 < removedNodes.length; i$1++) {
3101
- apply(removedNodes[i$1], disconnect);
3102
- }
3103
-
3104
- return true;
3105
- }
3106
-
3107
- function apply(node, fn) {
3108
-
3109
- if (node.nodeType !== 1 || hasAttr(node, 'uk-no-boot')) {
3110
- return;
3111
- }
3112
-
3113
- fn(node);
3114
- node = node.firstElementChild;
3115
- while (node) {
3116
- var next = node.nextElementSibling;
3117
- apply(node, fn);
3118
- node = next;
3119
- }
3120
- }
3121
-
3122
- }
2998
+ propName: propName,
2999
+ isInView: isInView,
3000
+ scrollTop: scrollTop,
3001
+ scrollIntoView: scrollIntoView,
3002
+ scrolledOver: scrolledOver,
3003
+ scrollParents: scrollParents,
3004
+ getViewport: getViewport
3005
+ });
3123
3006
 
3124
3007
  function globalAPI(UIkit) {
3125
3008
 
@@ -3165,7 +3048,7 @@
3165
3048
 
3166
3049
  element = element ? toNode(element) : document.body;
3167
3050
 
3168
- path(element, function (element) {
3051
+ parents(element).reverse().forEach(function (element) {
3169
3052
  return update(element[DATA], e);
3170
3053
  });
3171
3054
  apply(element, function (element) {
@@ -3201,13 +3084,6 @@
3201
3084
 
3202
3085
  }
3203
3086
 
3204
- function path(node, fn) {
3205
- if (node && node !== document.body && node.parentNode) {
3206
- path(node.parentNode, fn);
3207
- fn(node.parentNode);
3208
- }
3209
- }
3210
-
3211
3087
  }
3212
3088
 
3213
3089
  function hooksAPI(UIkit) {
@@ -3769,37 +3645,349 @@
3769
3645
 
3770
3646
  }
3771
3647
 
3772
- var UIkit = function (options) {
3773
- this._init(options);
3774
- };
3648
+ function componentAPI(UIkit) {
3775
3649
 
3776
- UIkit.util = util;
3777
- UIkit.data = '__uikit__';
3778
- UIkit.prefix = 'uk-';
3779
- UIkit.options = {};
3650
+ var DATA = UIkit.data;
3780
3651
 
3781
- globalAPI(UIkit);
3782
- hooksAPI(UIkit);
3783
- stateAPI(UIkit);
3784
- componentAPI(UIkit);
3785
- instanceAPI(UIkit);
3652
+ var components = {};
3786
3653
 
3787
- var Class = {
3654
+ UIkit.component = function (name, options) {
3788
3655
 
3789
- connected: function () {
3790
- !hasClass(this.$el, this.$name) && addClass(this.$el, this.$name);
3791
- }
3656
+ var id = hyphenate(name);
3792
3657
 
3793
- };
3658
+ name = camelize(id);
3794
3659
 
3795
- var Togglable = {
3660
+ if (!options) {
3796
3661
 
3797
- props: {
3798
- cls: Boolean,
3799
- animation: 'list',
3800
- duration: Number,
3801
- origin: String,
3802
- transition: String,
3662
+ if (isPlainObject(components[name])) {
3663
+ components[name] = UIkit.extend(components[name]);
3664
+ }
3665
+
3666
+ return components[name];
3667
+
3668
+ }
3669
+
3670
+ UIkit[name] = function (element, data) {
3671
+ var i = arguments.length,
3672
+ argsArray = Array(i);
3673
+ while (i--) argsArray[i] = arguments[i];
3674
+
3675
+
3676
+ var component = UIkit.component(name);
3677
+
3678
+ return component.options.functional ?
3679
+ new component({
3680
+ data: isPlainObject(element) ? element : [].concat(argsArray)
3681
+ }) :
3682
+ !element ? init(element) : $$(element).map(init)[0];
3683
+
3684
+ function init(element) {
3685
+
3686
+ var instance = UIkit.getComponent(element, name);
3687
+
3688
+ if (instance) {
3689
+ if (!data) {
3690
+ return instance;
3691
+ } else {
3692
+ instance.$destroy();
3693
+ }
3694
+ }
3695
+
3696
+ return new component({
3697
+ el: element,
3698
+ data: data
3699
+ });
3700
+
3701
+ }
3702
+
3703
+ };
3704
+
3705
+ var opt = isPlainObject(options) ? assign({}, options) : options.options;
3706
+
3707
+ opt.name = name;
3708
+
3709
+ if (opt.install) {
3710
+ opt.install(UIkit, opt, name);
3711
+ }
3712
+
3713
+ if (UIkit._initialized && !opt.functional) {
3714
+ fastdom.read(function () {
3715
+ return UIkit[name](("[uk-" + id + "],[data-uk-" + id + "]"));
3716
+ });
3717
+ }
3718
+
3719
+ return components[name] = isPlainObject(options) ? opt : options;
3720
+ };
3721
+
3722
+ UIkit.getComponents = function (element) {
3723
+ return element && element[DATA] || {};
3724
+ };
3725
+ UIkit.getComponent = function (element, name) {
3726
+ return UIkit.getComponents(element)[name];
3727
+ };
3728
+
3729
+ UIkit.connect = function (node) {
3730
+
3731
+ if (node[DATA]) {
3732
+ for (var name in node[DATA]) {
3733
+ node[DATA][name]._callConnected();
3734
+ }
3735
+ }
3736
+
3737
+ for (var i = 0; i < node.attributes.length; i++) {
3738
+
3739
+ var name$1 = getComponentName(node.attributes[i].name);
3740
+
3741
+ if (name$1 && name$1 in components) {
3742
+ UIkit[name$1](node);
3743
+ }
3744
+
3745
+ }
3746
+
3747
+ };
3748
+
3749
+ UIkit.disconnect = function (node) {
3750
+ for (var name in node[DATA]) {
3751
+ node[DATA][name]._callDisconnected();
3752
+ }
3753
+ };
3754
+
3755
+ }
3756
+
3757
+ function getComponentName(attribute) {
3758
+ return startsWith(attribute, 'uk-') || startsWith(attribute, 'data-uk-') ?
3759
+ camelize(attribute.replace('data-uk-', '').replace('uk-', '')) :
3760
+ false;
3761
+ }
3762
+
3763
+ var UIkit = function (options) {
3764
+ this._init(options);
3765
+ };
3766
+
3767
+ UIkit.util = util;
3768
+ UIkit.data = '__uikit__';
3769
+ UIkit.prefix = 'uk-';
3770
+ UIkit.options = {};
3771
+ UIkit.version = '3.3.0';
3772
+
3773
+ globalAPI(UIkit);
3774
+ hooksAPI(UIkit);
3775
+ stateAPI(UIkit);
3776
+ componentAPI(UIkit);
3777
+ instanceAPI(UIkit);
3778
+
3779
+ function Core(UIkit) {
3780
+
3781
+ ready(function () {
3782
+
3783
+ UIkit.update();
3784
+ on(window, 'load resize', function () {
3785
+ return UIkit.update(null, 'resize');
3786
+ });
3787
+ on(document, 'loadedmetadata load', function (ref) {
3788
+ var target = ref.target;
3789
+
3790
+ return UIkit.update(target, 'resize');
3791
+ }, true);
3792
+
3793
+ // throttle `scroll` event (Safari triggers multiple `scroll` events per frame)
3794
+ var pending;
3795
+ on(window, 'scroll', function (e) {
3796
+
3797
+ if (pending) {
3798
+ return;
3799
+ }
3800
+ pending = true;
3801
+ fastdom.write(function () {
3802
+ return pending = false;
3803
+ });
3804
+
3805
+ UIkit.update(null, e.type);
3806
+
3807
+ }, {
3808
+ passive: true,
3809
+ capture: true
3810
+ });
3811
+
3812
+ var started = 0;
3813
+ on(document, 'animationstart', function (ref) {
3814
+ var target = ref.target;
3815
+
3816
+ if ((css(target, 'animationName') || '').match(/^uk-.*(left|right)/)) {
3817
+
3818
+ started++;
3819
+ css(document.body, 'overflowX', 'hidden');
3820
+ setTimeout(function () {
3821
+ if (!--started) {
3822
+ css(document.body, 'overflowX', '');
3823
+ }
3824
+ }, toMs(css(target, 'animationDuration')) + 100);
3825
+ }
3826
+ }, true);
3827
+
3828
+ var off;
3829
+ on(document, pointerDown, function (e) {
3830
+
3831
+ off && off();
3832
+
3833
+ if (!isTouch(e)) {
3834
+ return;
3835
+ }
3836
+
3837
+ // Handle Swipe Gesture
3838
+ var pos = getEventPos(e);
3839
+ var target = 'tagName' in e.target ? e.target : e.target.parentNode;
3840
+ off = once(document, (pointerUp + " " + pointerCancel), function (e) {
3841
+
3842
+ var ref = getEventPos(e);
3843
+ var x = ref.x;
3844
+ var y = ref.y;
3845
+
3846
+ // swipe
3847
+ if (target && x && Math.abs(pos.x - x) > 100 || y && Math.abs(pos.y - y) > 100) {
3848
+
3849
+ setTimeout(function () {
3850
+ trigger(target, 'swipe');
3851
+ trigger(target, ("swipe" + (swipeDirection(pos.x, pos.y, x, y))));
3852
+ });
3853
+
3854
+ }
3855
+
3856
+ });
3857
+
3858
+ // Force click event anywhere on iOS < 13
3859
+ if (pointerDown === 'touchstart') {
3860
+ css(document.body, 'cursor', 'pointer');
3861
+ once(document, (pointerUp + " " + pointerCancel), function () {
3862
+ return setTimeout(function () {
3863
+ return css(document.body, 'cursor', '');
3864
+ }, 50);
3865
+ });
3866
+ }
3867
+
3868
+ }, {
3869
+ passive: true
3870
+ });
3871
+
3872
+ });
3873
+
3874
+ }
3875
+
3876
+ function swipeDirection(x1, y1, x2, y2) {
3877
+ return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ?
3878
+ x1 - x2 > 0 ?
3879
+ 'Left' :
3880
+ 'Right' :
3881
+ y1 - y2 > 0 ?
3882
+ 'Up' :
3883
+ 'Down';
3884
+ }
3885
+
3886
+ function boot(UIkit) {
3887
+
3888
+ var connect = UIkit.connect;
3889
+ var disconnect = UIkit.disconnect;
3890
+
3891
+ if (!('MutationObserver' in window)) {
3892
+ return;
3893
+ }
3894
+
3895
+ fastdom.read(init);
3896
+
3897
+ function init() {
3898
+
3899
+ if (document.body) {
3900
+ apply(document.body, connect);
3901
+ }
3902
+
3903
+ (new MutationObserver(function (mutations) {
3904
+ return mutations.forEach(applyMutation);
3905
+ })).observe(document, {
3906
+ childList: true,
3907
+ subtree: true,
3908
+ characterData: true,
3909
+ attributes: true
3910
+ });
3911
+
3912
+ UIkit._initialized = true;
3913
+ }
3914
+
3915
+ function applyMutation(mutation) {
3916
+
3917
+ var target = mutation.target;
3918
+ var type = mutation.type;
3919
+
3920
+ var update = type !== 'attributes' ?
3921
+ applyChildList(mutation) :
3922
+ applyAttribute(mutation);
3923
+
3924
+ update && UIkit.update(target);
3925
+
3926
+ }
3927
+
3928
+ function applyAttribute(ref) {
3929
+ var target = ref.target;
3930
+ var attributeName = ref.attributeName;
3931
+
3932
+
3933
+ if (attributeName === 'href') {
3934
+ return true;
3935
+ }
3936
+
3937
+ var name = getComponentName(attributeName);
3938
+
3939
+ if (!name || !(name in UIkit)) {
3940
+ return;
3941
+ }
3942
+
3943
+ if (hasAttr(target, attributeName)) {
3944
+ UIkit[name](target);
3945
+ return true;
3946
+ }
3947
+
3948
+ var component = UIkit.getComponent(target, name);
3949
+
3950
+ if (component) {
3951
+ component.$destroy();
3952
+ return true;
3953
+ }
3954
+
3955
+ }
3956
+
3957
+ function applyChildList(ref) {
3958
+ var addedNodes = ref.addedNodes;
3959
+ var removedNodes = ref.removedNodes;
3960
+
3961
+
3962
+ for (var i = 0; i < addedNodes.length; i++) {
3963
+ apply(addedNodes[i], connect);
3964
+ }
3965
+
3966
+ for (var i$1 = 0; i$1 < removedNodes.length; i$1++) {
3967
+ apply(removedNodes[i$1], disconnect);
3968
+ }
3969
+
3970
+ return true;
3971
+ }
3972
+
3973
+ }
3974
+
3975
+ var Class = {
3976
+
3977
+ connected: function () {
3978
+ !hasClass(this.$el, this.$name) && addClass(this.$el, this.$name);
3979
+ }
3980
+
3981
+ };
3982
+
3983
+ var Togglable = {
3984
+
3985
+ props: {
3986
+ cls: Boolean,
3987
+ animation: 'list',
3988
+ duration: Number,
3989
+ origin: String,
3990
+ transition: String,
3803
3991
  queued: Boolean
3804
3992
  },
3805
3993
 
@@ -3861,21 +4049,21 @@
3861
4049
  return this$1._toggleElement(el, show, animate);
3862
4050
  }));
3863
4051
  };
3864
- var toggled = targets.filter(function (el) {
3865
- return this$1.isToggled(el);
3866
- });
3867
- var untoggled = targets.filter(function (el) {
3868
- return !includes(toggled, el);
3869
- });
3870
4052
 
3871
4053
  var p;
3872
4054
 
3873
4055
  if (!this$1.queued || !isUndefined(animate) || !isUndefined(show) || !this$1.hasAnimation || targets.length < 2) {
3874
4056
 
3875
- p = all(untoggled.concat(toggled));
4057
+ p = all(targets);
3876
4058
 
3877
4059
  } else {
3878
4060
 
4061
+ var toggled = targets.filter(function (el) {
4062
+ return this$1.isToggled(el);
4063
+ });
4064
+ var untoggled = targets.filter(function (el) {
4065
+ return !includes(toggled, el);
4066
+ });
3879
4067
  var body = document.body;
3880
4068
  var scroll = body.scrollTop;
3881
4069
  var el = toggled[0];
@@ -3900,13 +4088,7 @@
3900
4088
  },
3901
4089
 
3902
4090
  toggleNow: function (targets, show) {
3903
- var this$1 = this;
3904
-
3905
- return new Promise(function (resolve) {
3906
- return Promise.all(toNodes(targets).map(function (el) {
3907
- return this$1._toggleElement(el, show, false);
3908
- })).then(resolve, noop);
3909
- });
4091
+ return this.toggleElement(targets, show, false);
3910
4092
  },
3911
4093
 
3912
4094
  isToggled: function (el) {
@@ -4172,6 +4354,11 @@
4172
4354
 
4173
4355
  if (!state) {
4174
4356
  this$1._toggle(content, false);
4357
+ } else {
4358
+ var toggle = $(this$1.$props.toggle, el);
4359
+ if (animate !== false && !isInView(toggle)) {
4360
+ scrollIntoView(toggle);
4361
+ }
4175
4362
  }
4176
4363
 
4177
4364
  el._wrapper = null;
@@ -4186,7 +4373,7 @@
4186
4373
 
4187
4374
  };
4188
4375
 
4189
- var Alert = {
4376
+ var alert = {
4190
4377
 
4191
4378
  mixins: [Class, Togglable],
4192
4379
 
@@ -4209,142 +4396,34 @@
4209
4396
 
4210
4397
  {
4211
4398
 
4212
- name: 'click',
4213
-
4214
- delegate: function () {
4215
- return this.selClose;
4216
- },
4217
-
4218
- handler: function (e) {
4219
- e.preventDefault();
4220
- this.close();
4221
- }
4222
-
4223
- }
4224
-
4225
- ],
4226
-
4227
- methods: {
4228
-
4229
- close: function () {
4230
- var this$1 = this;
4231
-
4232
- this.toggleElement(this.$el).then(function () {
4233
- return this$1.$destroy(true);
4234
- });
4235
- }
4236
-
4237
- }
4238
-
4239
- };
4240
-
4241
- function Core(UIkit) {
4242
-
4243
- ready(function () {
4244
-
4245
- UIkit.update();
4246
- on(window, 'load resize', function () {
4247
- return UIkit.update(null, 'resize');
4248
- });
4249
- on(document, 'loadedmetadata load', function (ref) {
4250
- var target = ref.target;
4251
-
4252
- return UIkit.update(target, 'resize');
4253
- }, true);
4254
-
4255
- // throttle `scroll` event (Safari triggers multiple `scroll` events per frame)
4256
- var pending;
4257
- on(window, 'scroll', function (e) {
4258
-
4259
- if (pending) {
4260
- return;
4261
- }
4262
- pending = true;
4263
- fastdom.write(function () {
4264
- return pending = false;
4265
- });
4266
-
4267
- var target = e.target;
4268
- UIkit.update(target.nodeType !== 1 ? document.body : target, e.type);
4269
-
4270
- }, {
4271
- passive: true,
4272
- capture: true
4273
- });
4274
-
4275
- var started = 0;
4276
- on(document, 'animationstart', function (ref) {
4277
- var target = ref.target;
4278
-
4279
- if ((css(target, 'animationName') || '').match(/^uk-.*(left|right)/)) {
4280
-
4281
- started++;
4282
- css(document.body, 'overflowX', 'hidden');
4283
- setTimeout(function () {
4284
- if (!--started) {
4285
- css(document.body, 'overflowX', '');
4286
- }
4287
- }, toMs(css(target, 'animationDuration')) + 100);
4288
- }
4289
- }, true);
4290
-
4291
- var off;
4292
- on(document, pointerDown, function (e) {
4293
-
4294
- off && off();
4295
-
4296
- if (!isTouch(e)) {
4297
- return;
4298
- }
4299
-
4300
- // Handle Swipe Gesture
4301
- var pos = getEventPos(e);
4302
- var target = 'tagName' in e.target ? e.target : e.target.parentNode;
4303
- off = once(document, (pointerUp + " " + pointerCancel), function (e) {
4304
-
4305
- var ref = getEventPos(e);
4306
- var x = ref.x;
4307
- var y = ref.y;
4308
-
4309
- // swipe
4310
- if (target && x && Math.abs(pos.x - x) > 100 || y && Math.abs(pos.y - y) > 100) {
4311
-
4312
- setTimeout(function () {
4313
- trigger(target, 'swipe');
4314
- trigger(target, ("swipe" + (swipeDirection(pos.x, pos.y, x, y))));
4315
- });
4316
-
4317
- }
4399
+ name: 'click',
4318
4400
 
4319
- });
4401
+ delegate: function () {
4402
+ return this.selClose;
4403
+ },
4320
4404
 
4321
- // Force click event anywhere on iOS < 13
4322
- if (pointerDown === 'touchstart') {
4323
- css(document.body, 'cursor', 'pointer');
4324
- once(document, (pointerUp + " " + pointerCancel), function () {
4325
- return setTimeout(function () {
4326
- return css(document.body, 'cursor', '');
4327
- }, 50);
4328
- });
4405
+ handler: function (e) {
4406
+ e.preventDefault();
4407
+ this.close();
4329
4408
  }
4330
4409
 
4331
- }, {
4332
- passive: true
4333
- });
4410
+ }
4334
4411
 
4335
- });
4412
+ ],
4336
4413
 
4337
- }
4414
+ methods: {
4338
4415
 
4339
- function swipeDirection(x1, y1, x2, y2) {
4340
- return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ?
4341
- x1 - x2 > 0 ?
4342
- 'Left' :
4343
- 'Right' :
4344
- y1 - y2 > 0 ?
4345
- 'Up' :
4346
- 'Down';
4347
- }
4416
+ close: function () {
4417
+ var this$1 = this;
4418
+
4419
+ this.toggleElement(this.$el).then(function () {
4420
+ return this$1.$destroy(true);
4421
+ });
4422
+ }
4423
+
4424
+ }
4425
+
4426
+ };
4348
4427
 
4349
4428
  var Video = {
4350
4429
 
@@ -4415,7 +4494,7 @@
4415
4494
 
4416
4495
  };
4417
4496
 
4418
- var Cover = {
4497
+ var cover = {
4419
4498
 
4420
4499
  mixins: [Class, Video],
4421
4500
 
@@ -4577,7 +4656,6 @@
4577
4656
  delayShow: 0,
4578
4657
  delayHide: 800,
4579
4658
  clsDrop: false,
4580
- hoverIdle: 200,
4581
4659
  animation: ['uk-animation-fade'],
4582
4660
  cls: 'uk-open'
4583
4661
  },
@@ -4621,8 +4699,13 @@
4621
4699
 
4622
4700
  },
4623
4701
 
4624
- events: [
4702
+ disconnected: function () {
4703
+ if (this.isActive()) {
4704
+ active = null;
4705
+ }
4706
+ },
4625
4707
 
4708
+ events: [
4626
4709
 
4627
4710
  {
4628
4711
 
@@ -4689,66 +4772,56 @@
4689
4772
 
4690
4773
  {
4691
4774
 
4692
- name: pointerEnter,
4693
-
4694
- filter: function () {
4695
- return includes(this.mode, 'hover');
4696
- },
4697
-
4698
- handler: function (e) {
4699
-
4700
- if (isTouch(e)) {
4701
- return;
4702
- }
4775
+ name: 'toggleshow',
4703
4776
 
4704
- if (active &&
4705
- active !== this &&
4706
- active.toggle &&
4707
- includes(active.toggle.mode, 'hover') &&
4708
- !within(e.target, active.toggle.$el) &&
4709
- !pointInRect({
4710
- x: e.pageX,
4711
- y: e.pageY
4712
- }, offset(active.$el))
4713
- ) {
4714
- active.hide(false);
4715
- }
4777
+ self: true,
4716
4778
 
4779
+ handler: function (e, toggle) {
4717
4780
  e.preventDefault();
4718
- this.show(this.toggle);
4781
+ this.show(toggle);
4719
4782
  }
4720
4783
 
4721
4784
  },
4722
4785
 
4723
4786
  {
4724
4787
 
4725
- name: 'toggleshow',
4726
-
4727
- handler: function (e, toggle) {
4788
+ name: 'togglehide',
4728
4789
 
4729
- if (toggle && !includes(toggle.target, this.$el)) {
4730
- return;
4731
- }
4790
+ self: true,
4732
4791
 
4792
+ handler: function (e) {
4733
4793
  e.preventDefault();
4734
- this.show(toggle || this.toggle);
4794
+ this.hide();
4735
4795
  }
4736
4796
 
4737
4797
  },
4738
4798
 
4739
4799
  {
4740
4800
 
4741
- name: ("togglehide " + pointerLeave),
4801
+ name: pointerEnter,
4742
4802
 
4743
- handler: function (e, toggle) {
4803
+ filter: function () {
4804
+ return includes(this.mode, 'hover');
4805
+ },
4744
4806
 
4745
- if (isTouch(e) || toggle && !includes(toggle.target, this.$el)) {
4746
- return;
4807
+ handler: function (e) {
4808
+ if (!isTouch(e)) {
4809
+ this.clearTimers();
4747
4810
  }
4811
+ }
4748
4812
 
4749
- e.preventDefault();
4813
+ },
4814
+
4815
+ {
4816
+
4817
+ name: pointerLeave,
4750
4818
 
4751
- if (this.toggle && includes(this.toggle.mode, 'hover')) {
4819
+ filter: function () {
4820
+ return includes(this.mode, 'hover');
4821
+ },
4822
+
4823
+ handler: function (e) {
4824
+ if (!isTouch(e) && !matches(this.$el, ':hover')) {
4752
4825
  this.hide();
4753
4826
  }
4754
4827
  }
@@ -4778,6 +4851,9 @@
4778
4851
  handler: function () {
4779
4852
  var this$1 = this;
4780
4853
 
4854
+
4855
+ active = this;
4856
+
4781
4857
  this.tracker.init();
4782
4858
  trigger(this.$el, 'updatearia');
4783
4859
 
@@ -4869,62 +4945,38 @@
4869
4945
 
4870
4946
  show: function (toggle, delay) {
4871
4947
  var this$1 = this;
4948
+ if (toggle === void 0) toggle = this.toggle;
4872
4949
  if (delay === void 0) delay = true;
4873
4950
 
4874
4951
 
4875
- var show = function () {
4876
- return !this$1.isToggled() && this$1.toggleElement(this$1.$el, true);
4877
- };
4878
- var tryShow = function () {
4879
-
4880
- this$1.toggle = toggle || this$1.toggle;
4881
-
4882
- this$1.clearTimers();
4883
-
4884
- if (this$1.isActive()) {
4885
- return;
4886
- } else if (delay && active && active !== this$1 && active.isDelaying) {
4887
- this$1.showTimer = setTimeout(this$1.show, 10);
4888
- return;
4889
- } else if (this$1.isParentOf(active)) {
4890
-
4891
- if (active.hideTimer) {
4892
- active.hide(false);
4893
- } else {
4894
- return;
4895
- }
4952
+ if (this.isToggled() && toggle && this.toggle && toggle.$el !== this.toggle.$el) {
4953
+ this.hide(false);
4954
+ }
4896
4955
 
4897
- } else if (this$1.isChildOf(active)) {
4956
+ this.toggle = toggle;
4898
4957
 
4899
- active.clearTimers();
4958
+ this.clearTimers();
4900
4959
 
4901
- } else if (active && !this$1.isChildOf(active) && !this$1.isParentOf(active)) {
4960
+ if (this.isActive()) {
4961
+ return;
4962
+ }
4902
4963
 
4903
- var prev;
4904
- while (active && active !== prev && !this$1.isChildOf(active)) {
4905
- prev = active;
4906
- active.hide(false);
4907
- }
4964
+ if (active) {
4908
4965
 
4966
+ if (delay && active.isDelaying) {
4967
+ this.showTimer = setTimeout(this.show, 10);
4968
+ return;
4909
4969
  }
4910
4970
 
4911
- if (delay && this$1.delayShow) {
4912
- this$1.showTimer = setTimeout(show, this$1.delayShow);
4913
- } else {
4914
- show();
4971
+ while (active && !within(this.$el, active.$el)) {
4972
+ active.hide(false);
4915
4973
  }
4974
+ }
4916
4975
 
4917
- active = this$1;
4918
- };
4919
-
4920
- if (toggle && this.toggle && toggle.$el !== this.toggle.$el) {
4921
-
4922
- once(this.$el, 'hide', tryShow);
4923
- this.hide(false);
4976
+ this.showTimer = setTimeout(function () {
4977
+ return !this$1.isToggled() && this$1.toggleElement(this$1.$el, true);
4978
+ }, delay && this.delayShow || 0);
4924
4979
 
4925
- } else {
4926
- tryShow();
4927
- }
4928
4980
  },
4929
4981
 
4930
4982
  hide: function (delay) {
@@ -4938,10 +4990,12 @@
4938
4990
 
4939
4991
  this.clearTimers();
4940
4992
 
4941
- this.isDelaying = this.tracker.movesTo(this.$el);
4993
+ this.isDelaying = getPositionedElements(this.$el).some(function (el) {
4994
+ return this$1.tracker.movesTo(el);
4995
+ });
4942
4996
 
4943
4997
  if (delay && this.isDelaying) {
4944
- this.hideTimer = setTimeout(this.hide, this.hoverIdle);
4998
+ this.hideTimer = setTimeout(this.hide, 50);
4945
4999
  } else if (delay && this.delayHide) {
4946
5000
  this.hideTimer = setTimeout(hide, this.delayHide);
4947
5001
  } else {
@@ -4961,14 +5015,6 @@
4961
5015
  return active === this;
4962
5016
  },
4963
5017
 
4964
- isChildOf: function (drop) {
4965
- return drop && drop !== this && within(this.$el, drop.$el);
4966
- },
4967
-
4968
- isParentOf: function (drop) {
4969
- return drop && drop !== this && within(drop.$el, this.$el);
4970
- },
4971
-
4972
5018
  position: function () {
4973
5019
 
4974
5020
  removeClasses(this.$el, ((this.clsDrop) + "-(stack|boundary)"));
@@ -4999,6 +5045,11 @@
4999
5045
 
5000
5046
  };
5001
5047
 
5048
+ function getPositionedElements(el) {
5049
+ var result = css(el, 'position') !== 'static' ? [el] : [];
5050
+ return result.concat.apply(result, children(el).map(getPositionedElements));
5051
+ }
5052
+
5002
5053
  function delayOn(el, type, fn) {
5003
5054
  var off = once(el, type, function () {
5004
5055
  return off = on(el, type, fn);
@@ -5008,13 +5059,13 @@
5008
5059
  };
5009
5060
  }
5010
5061
 
5011
- var Dropdown = {
5062
+ var dropdown = {
5012
5063
 
5013
5064
  extends: Drop
5014
5065
 
5015
5066
  };
5016
5067
 
5017
- var FormCustom = {
5068
+ var formCustom = {
5018
5069
 
5019
5070
  mixins: [Class],
5020
5071
 
@@ -5104,7 +5155,7 @@
5104
5155
  };
5105
5156
 
5106
5157
  // Deprecated
5107
- var Gif = {
5158
+ var gif = {
5108
5159
 
5109
5160
  update: {
5110
5161
 
@@ -5261,7 +5312,7 @@
5261
5312
  };
5262
5313
  }
5263
5314
 
5264
- var Grid = {
5315
+ var grid = {
5265
5316
 
5266
5317
  extends: Margin,
5267
5318
 
@@ -5301,6 +5352,18 @@
5301
5352
 
5302
5353
  update: [
5303
5354
 
5355
+ {
5356
+
5357
+ write: function (ref) {
5358
+ var stacks = ref.stacks;
5359
+
5360
+ toggleClass(this.$el, this.clsStack, stacks);
5361
+ },
5362
+
5363
+ events: ['resize']
5364
+
5365
+ },
5366
+
5304
5367
  {
5305
5368
 
5306
5369
  read: function (ref) {
@@ -5318,6 +5381,8 @@
5318
5381
  });
5319
5382
  }
5320
5383
 
5384
+ } else {
5385
+ return false;
5321
5386
  }
5322
5387
 
5323
5388
  var transitionInProgress = rows.some(function (elements) {
@@ -5431,7 +5496,7 @@
5431
5496
 
5432
5497
  function getMarginTop(root, cls) {
5433
5498
 
5434
- var nodes = toNodes(root.children);
5499
+ var nodes = children(root);
5435
5500
  var ref = nodes.filter(function (el) {
5436
5501
  return hasClass(el, cls);
5437
5502
  });
@@ -5494,7 +5559,7 @@
5494
5559
 
5495
5560
  this.elements.forEach(function (el) {
5496
5561
  var height = toFloat(css(el, 'minHeight'));
5497
- if (height && (this$1.forceHeight || Math.round(height + boxModelAdjust('height', el, 'content-box')) >= el.offsetHeight)) {
5562
+ if (height && (this$1.forceHeight || Math.round(height + boxModelAdjust(el, 'height', 'content-box')) >= el.offsetHeight)) {
5498
5563
  css(el, 'height', height);
5499
5564
  }
5500
5565
  });
@@ -5510,7 +5575,7 @@
5510
5575
 
5511
5576
  } : {};
5512
5577
 
5513
- var HeightMatch = {
5578
+ var heightMatch = {
5514
5579
 
5515
5580
  mixins: [FlexBug],
5516
5581
 
@@ -5602,7 +5667,7 @@
5602
5667
 
5603
5668
  function getHeights(elements) {
5604
5669
  var heights = elements.map(function (el) {
5605
- return offset(el).height - boxModelAdjust('height', el, 'content-box');
5670
+ return offset(el).height - boxModelAdjust(el, 'height', 'content-box');
5606
5671
  });
5607
5672
  var max = Math.max.apply(null, heights);
5608
5673
 
@@ -5612,7 +5677,7 @@
5612
5677
  };
5613
5678
  }
5614
5679
 
5615
- var HeightViewport = {
5680
+ var heightViewport = {
5616
5681
 
5617
5682
  mixins: [FlexBug],
5618
5683
 
@@ -5641,7 +5706,7 @@
5641
5706
  }
5642
5707
 
5643
5708
  var minHeight = '';
5644
- var box = boxModelAdjust('height', this.$el, 'content-box');
5709
+ var box = boxModelAdjust(this.$el, 'height', 'content-box');
5645
5710
 
5646
5711
  if (this.expand) {
5647
5712
 
@@ -5723,7 +5788,7 @@
5723
5788
  return el && offset(el).height || 0;
5724
5789
  }
5725
5790
 
5726
- var Svg = {
5791
+ var SVG = {
5727
5792
 
5728
5793
  args: 'src',
5729
5794
 
@@ -6029,7 +6094,7 @@
6029
6094
 
6030
6095
  install: install,
6031
6096
 
6032
- extends: Svg,
6097
+ extends: SVG,
6033
6098
 
6034
6099
  args: 'icon',
6035
6100
 
@@ -6188,7 +6253,7 @@
6188
6253
  return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
6189
6254
  }
6190
6255
 
6191
- var Img = {
6256
+ var img = {
6192
6257
 
6193
6258
  args: 'dataSrc',
6194
6259
 
@@ -6507,7 +6572,7 @@
6507
6572
  return value && !isNaN(value) ? ("(min-width: " + value + "px)") : false;
6508
6573
  }
6509
6574
 
6510
- var Leader = {
6575
+ var leader = {
6511
6576
 
6512
6577
  mixins: [Class, Media],
6513
6578
 
@@ -6844,7 +6909,7 @@
6844
6909
  };
6845
6910
  }
6846
6911
 
6847
- var Modal$1 = {
6912
+ var modal = {
6848
6913
 
6849
6914
  install: install$1,
6850
6915
 
@@ -6994,7 +7059,7 @@
6994
7059
 
6995
7060
  }
6996
7061
 
6997
- var Nav = {
7062
+ var nav = {
6998
7063
 
6999
7064
  extends: Accordion,
7000
7065
 
@@ -7006,7 +7071,7 @@
7006
7071
 
7007
7072
  };
7008
7073
 
7009
- var Navbar = {
7074
+ var navbar = {
7010
7075
 
7011
7076
  mixins: [Class, FlexBug],
7012
7077
 
@@ -7283,7 +7348,7 @@
7283
7348
 
7284
7349
  };
7285
7350
 
7286
- var Offcanvas = {
7351
+ var offcanvas = {
7287
7352
 
7288
7353
  mixins: [Modal],
7289
7354
 
@@ -7526,19 +7591,19 @@
7526
7591
 
7527
7592
  // Chrome in responsive mode zooms page upon opening offcanvas
7528
7593
  function suppressUserScale() {
7529
- getViewport().content += ',user-scalable=0';
7594
+ getViewport$1().content += ',user-scalable=0';
7530
7595
  }
7531
7596
 
7532
7597
  function resumeUserScale() {
7533
- var viewport = getViewport();
7598
+ var viewport = getViewport$1();
7534
7599
  viewport.content = viewport.content.replace(/,user-scalable=0$/, '');
7535
7600
  }
7536
7601
 
7537
- function getViewport() {
7602
+ function getViewport$1() {
7538
7603
  return $('meta[name="viewport"]', document.head) || append(document.head, '<meta name="viewport">');
7539
7604
  }
7540
7605
 
7541
- var OverflowAuto = {
7606
+ var overflowAuto = {
7542
7607
 
7543
7608
  mixins: [Class],
7544
7609
 
@@ -7602,7 +7667,7 @@
7602
7667
 
7603
7668
  };
7604
7669
 
7605
- var Responsive = {
7670
+ var responsive = {
7606
7671
 
7607
7672
  props: ['width', 'height'],
7608
7673
 
@@ -7634,7 +7699,7 @@
7634
7699
 
7635
7700
  };
7636
7701
 
7637
- var Scroll = {
7702
+ var scroll = {
7638
7703
 
7639
7704
  props: {
7640
7705
  duration: Number,
@@ -7654,37 +7719,12 @@
7654
7719
 
7655
7720
  el = el && $(el) || document.body;
7656
7721
 
7657
- var docHeight = height(document);
7658
- var winHeight = height(window);
7659
-
7660
- var target = offset(el).top - this.offset;
7661
- if (target + winHeight > docHeight) {
7662
- target = docHeight - winHeight;
7663
- }
7664
-
7665
- if (!trigger(this.$el, 'beforescroll', [this, el])) {
7666
- return;
7722
+ if (trigger(this.$el, 'beforescroll', [this, el])) {
7723
+ scrollIntoView(el, this.$props).then(function () {
7724
+ return trigger(this$1.$el, 'scrolled', [this$1, el]);
7725
+ });
7667
7726
  }
7668
7727
 
7669
- var start = Date.now();
7670
- var startY = window.pageYOffset;
7671
- var step = function () {
7672
-
7673
- var currentY = startY + (target - startY) * ease(clamp((Date.now() - start) / this$1.duration));
7674
-
7675
- scrollTop(window, currentY);
7676
-
7677
- // scroll more if we have not reached our destination
7678
- if (currentY !== target) {
7679
- requestAnimationFrame(step);
7680
- } else {
7681
- trigger(this$1.$el, 'scrolled', [this$1, el]);
7682
- }
7683
-
7684
- };
7685
-
7686
- step();
7687
-
7688
7728
  }
7689
7729
 
7690
7730
  },
@@ -7705,11 +7745,7 @@
7705
7745
 
7706
7746
  };
7707
7747
 
7708
- function ease(k) {
7709
- return 0.5 * (1 - Math.cos(Math.PI * k));
7710
- }
7711
-
7712
- var Scrollspy = {
7748
+ var scrollspy = {
7713
7749
 
7714
7750
  args: 'cls',
7715
7751
 
@@ -7799,72 +7835,42 @@
7799
7835
  this.elements.forEach(function (el) {
7800
7836
 
7801
7837
  var state = el._ukScrollspyState;
7802
- var cls = state.cls;
7803
-
7804
- if (state.show && !state.inview && !state.queued) {
7805
-
7806
- var show = function () {
7838
+ var toggle = function (inview) {
7807
7839
 
7808
- css(el, 'visibility', '');
7809
- addClass(el, this$1.inViewClass);
7810
- toggleClass(el, cls);
7811
-
7812
- trigger(el, 'inview');
7813
-
7814
- this$1.$update(el);
7815
-
7816
- state.inview = true;
7817
- state.abort && state.abort();
7818
- };
7840
+ css(el, 'visibility', !inview && this$1.hidden ? 'hidden' : '');
7819
7841
 
7820
- if (this$1.delay) {
7842
+ toggleClass(el, this$1.inViewClass, inview);
7843
+ toggleClass(el, state.cls);
7821
7844
 
7822
- state.queued = true;
7823
- data.promise = (data.promise || Promise.resolve()).then(function () {
7824
- return !state.inview && new Promise(function (resolve) {
7845
+ trigger(el, inview ? 'inview' : 'outview');
7825
7846
 
7826
- var timer = setTimeout(function () {
7847
+ state.inview = inview;
7827
7848
 
7828
- show();
7829
- resolve();
7849
+ this$1.$update(el);
7830
7850
 
7831
- }, data.promise || this$1.elements.length === 1 ? this$1.delay : 0);
7851
+ };
7832
7852
 
7833
- state.abort = function () {
7834
- clearTimeout(timer);
7835
- resolve();
7836
- state.queued = false;
7837
- };
7853
+ if (state.show && !state.inview && !state.queued) {
7838
7854
 
7839
- });
7855
+ state.queued = true;
7840
7856
 
7857
+ data.promise = (data.promise || Promise.resolve()).then(function () {
7858
+ return new Promise(function (resolve) {
7859
+ return setTimeout(resolve, this$1.delay);
7841
7860
  });
7861
+ }).then(function () {
7862
+ toggle(true);
7863
+ setTimeout(function () {
7864
+ return state.queued = false;
7865
+ }, 300);
7866
+ });
7842
7867
 
7843
- } else {
7844
- show();
7845
- }
7846
-
7847
- } else if (!state.show && (state.inview || state.queued) && this$1.repeat) {
7848
-
7849
- state.abort && state.abort();
7850
-
7851
- if (!state.inview) {
7852
- return;
7853
- }
7854
-
7855
- css(el, 'visibility', this$1.hidden ? 'hidden' : '');
7856
- removeClass(el, this$1.inViewClass);
7857
- toggleClass(el, cls);
7858
-
7859
- trigger(el, 'outview');
7860
-
7861
- this$1.$update(el);
7868
+ } else if (!state.show && state.inview && !state.queued && this$1.repeat) {
7862
7869
 
7863
- state.inview = false;
7870
+ toggle(false);
7864
7871
 
7865
7872
  }
7866
7873
 
7867
-
7868
7874
  });
7869
7875
 
7870
7876
  },
@@ -7877,7 +7883,7 @@
7877
7883
 
7878
7884
  };
7879
7885
 
7880
- var ScrollspyNav = {
7886
+ var scrollspyNav = {
7881
7887
 
7882
7888
  props: {
7883
7889
  cls: String,
@@ -7903,16 +7909,18 @@
7903
7909
  });
7904
7910
  },
7905
7911
 
7906
- elements: function (ref) {
7907
- var selector = ref.closest;
7908
-
7909
- return closest(this.links, selector || '*');
7910
- },
7911
-
7912
7912
  targets: function () {
7913
7913
  return $$(this.links.map(function (el) {
7914
7914
  return escape(el.hash).substr(1);
7915
7915
  }).join(','));
7916
+ },
7917
+
7918
+ elements: function (ref) {
7919
+ var selector = ref.closest;
7920
+
7921
+ return closest($$(this.targets.map(function (el) {
7922
+ return ("[href=\"#" + (el.id) + "\"]");
7923
+ }).join(',')), selector || '*');
7916
7924
  }
7917
7925
 
7918
7926
  },
@@ -7933,42 +7941,46 @@
7933
7941
 
7934
7942
  {
7935
7943
 
7936
- read: function (data) {
7944
+ read: function () {
7937
7945
  var this$1 = this;
7938
7946
 
7939
7947
 
7940
- var scroll = window.pageYOffset + this.offset + 1;
7941
- var max = height(document) - height(window) + this.offset;
7942
-
7943
- data.active = false;
7944
-
7945
- this.targets.every(function (el, i) {
7948
+ var ref = this.targets;
7949
+ var length = ref.length;
7946
7950
 
7947
- var ref = offset(el);
7948
- var top = ref.top;
7949
- var last = i + 1 === this$1.targets.length;
7951
+ if (!length || !isVisible(this.$el)) {
7952
+ return false;
7953
+ }
7950
7954
 
7951
- if (!this$1.overflow && (i === 0 && top > scroll || last && top + el.offsetTop < scroll)) {
7952
- return false;
7953
- }
7955
+ var scrollElement = last(scrollParents(this.targets[0]));
7956
+ var scrollTop = scrollElement.scrollTop;
7957
+ var scrollHeight = scrollElement.scrollHeight;
7958
+ var viewport = getViewport(scrollElement);
7959
+ var scroll = scrollTop;
7960
+ var max = scrollHeight - offset(viewport).height;
7961
+ var active = false;
7954
7962
 
7955
- if (!last && offset(this$1.targets[i + 1]).top <= scroll) {
7956
- return true;
7957
- }
7963
+ if (scroll === max) {
7964
+ active = length - 1;
7965
+ } else {
7958
7966
 
7959
- if (scroll >= max) {
7960
- for (var j = this$1.targets.length - 1; j > i; j--) {
7961
- if (isInView(this$1.targets[j])) {
7962
- el = this$1.targets[j];
7963
- break;
7964
- }
7967
+ this.targets.every(function (el, i) {
7968
+ var ref = position(el, viewport);
7969
+ var top = ref.top;
7970
+ if (top - this$1.offset <= 0) {
7971
+ active = i;
7972
+ return true;
7965
7973
  }
7966
- }
7967
-
7968
- return !(data.active = $(filter(this$1.links, ("[href=\"#" + (el.id) + "\"]"))));
7974
+ });
7969
7975
 
7970
- });
7976
+ if (active === false && this.overflow) {
7977
+ active = 0;
7978
+ }
7979
+ }
7971
7980
 
7981
+ return {
7982
+ active: active
7983
+ };
7972
7984
  },
7973
7985
 
7974
7986
  write: function (ref) {
@@ -7980,8 +7992,8 @@
7980
7992
  });
7981
7993
  removeClass(this.elements, this.cls);
7982
7994
 
7983
- if (active) {
7984
- trigger(this.$el, 'active', [active, addClass(this.closest ? closest(active, this.closest) : active, this.cls)]);
7995
+ if (active !== false) {
7996
+ trigger(this.$el, 'active', [active, addClass(this.elements[active], this.cls)]);
7985
7997
  }
7986
7998
 
7987
7999
  },
@@ -7994,7 +8006,7 @@
7994
8006
 
7995
8007
  };
7996
8008
 
7997
- var Sticky = {
8009
+ var sticky = {
7998
8010
 
7999
8011
  mixins: [Class, Media],
8000
8012
 
@@ -8406,7 +8418,7 @@
8406
8418
 
8407
8419
  handler: function (e) {
8408
8420
  e.preventDefault();
8409
- this.show(toNodes(this.$el.children).filter(function (el) {
8421
+ this.show(children(this.$el).filter(function (el) {
8410
8422
  return within(e.current, el);
8411
8423
  })[0]);
8412
8424
  }
@@ -8468,7 +8480,7 @@
8468
8480
  methods: {
8469
8481
 
8470
8482
  index: function () {
8471
- return !isEmpty(this.connects) && index(filter(this.connects[0].children, ("." + (this.cls)))[0]);
8483
+ return !isEmpty(this.connects) ? index(filter(this.connects[0].children, ("." + (this.cls)))[0]) : -1;
8472
8484
  },
8473
8485
 
8474
8486
  show: function (item) {
@@ -8492,7 +8504,7 @@
8492
8504
  }
8493
8505
  }
8494
8506
 
8495
- if (!active || prev >= 0 && hasClass(active, this.cls) || prev === next) {
8507
+ if (!active || prev === next) {
8496
8508
  return;
8497
8509
  }
8498
8510
 
@@ -8515,7 +8527,7 @@
8515
8527
 
8516
8528
  };
8517
8529
 
8518
- var Tab = {
8530
+ var tab = {
8519
8531
 
8520
8532
  mixins: [Class],
8521
8533
 
@@ -8549,7 +8561,7 @@
8549
8561
 
8550
8562
  };
8551
8563
 
8552
- var Toggle = {
8564
+ var toggle = {
8553
8565
 
8554
8566
  mixins: [Media, Togglable],
8555
8567
 
@@ -8616,7 +8628,7 @@
8616
8628
  var link;
8617
8629
  if (closest(e.target, 'a[href="#"], a[href=""]') ||
8618
8630
  (link = closest(e.target, 'a[href]')) && (
8619
- this.cls ||
8631
+ this.cls && !hasClass(this.target, this.cls.split(' ')[0]) ||
8620
8632
  !isVisible(this.target) ||
8621
8633
  link.hash && matches(this.target, link.hash)
8622
8634
  )
@@ -8668,62 +8680,52 @@
8668
8680
 
8669
8681
  };
8670
8682
 
8671
- function core(UIkit) {
8672
-
8673
- // core components
8674
- UIkit.component('accordion', Accordion);
8675
- UIkit.component('alert', Alert);
8676
- UIkit.component('cover', Cover);
8677
- UIkit.component('drop', Drop);
8678
- UIkit.component('dropdown', Dropdown);
8679
- UIkit.component('formCustom', FormCustom);
8680
- UIkit.component('gif', Gif);
8681
- UIkit.component('grid', Grid);
8682
- UIkit.component('heightMatch', HeightMatch);
8683
- UIkit.component('heightViewport', HeightViewport);
8684
- UIkit.component('icon', Icon);
8685
- UIkit.component('img', Img);
8686
- UIkit.component('leader', Leader);
8687
- UIkit.component('margin', Margin);
8688
- UIkit.component('modal', Modal$1);
8689
- UIkit.component('nav', Nav);
8690
- UIkit.component('navbar', Navbar);
8691
- UIkit.component('offcanvas', Offcanvas);
8692
- UIkit.component('overflowAuto', OverflowAuto);
8693
- UIkit.component('responsive', Responsive);
8694
- UIkit.component('scroll', Scroll);
8695
- UIkit.component('scrollspy', Scrollspy);
8696
- UIkit.component('scrollspyNav', ScrollspyNav);
8697
- UIkit.component('sticky', Sticky);
8698
- UIkit.component('svg', Svg);
8699
- UIkit.component('switcher', Switcher);
8700
- UIkit.component('tab', Tab);
8701
- UIkit.component('toggle', Toggle);
8702
- UIkit.component('video', Video);
8703
-
8704
- // Icon components
8705
- UIkit.component('close', Close);
8706
- UIkit.component('marker', IconComponent);
8707
- UIkit.component('navbarToggleIcon', IconComponent);
8708
- UIkit.component('overlayIcon', IconComponent);
8709
- UIkit.component('paginationNext', IconComponent);
8710
- UIkit.component('paginationPrevious', IconComponent);
8711
- UIkit.component('searchIcon', Search);
8712
- UIkit.component('slidenavNext', Slidenav);
8713
- UIkit.component('slidenavPrevious', Slidenav);
8714
- UIkit.component('spinner', Spinner);
8715
- UIkit.component('totop', IconComponent);
8716
-
8717
- // core functionality
8718
- UIkit.use(Core);
8719
-
8720
- }
8721
-
8722
- UIkit.version = '3.2.0';
8723
-
8724
- core(UIkit);
8725
-
8726
- var Countdown = {
8683
+
8684
+ var coreComponents = /*#__PURE__*/ Object.freeze({
8685
+ __proto__: null,
8686
+ Accordion: Accordion,
8687
+ Alert: alert,
8688
+ Cover: cover,
8689
+ Drop: Drop,
8690
+ Dropdown: dropdown,
8691
+ FormCustom: formCustom,
8692
+ Gif: gif,
8693
+ Grid: grid,
8694
+ HeightMatch: heightMatch,
8695
+ HeightViewport: heightViewport,
8696
+ Icon: Icon,
8697
+ Img: img,
8698
+ Leader: leader,
8699
+ Margin: Margin,
8700
+ Modal: modal,
8701
+ Nav: nav,
8702
+ Navbar: navbar,
8703
+ Offcanvas: offcanvas,
8704
+ OverflowAuto: overflowAuto,
8705
+ Responsive: responsive,
8706
+ Scroll: scroll,
8707
+ Scrollspy: scrollspy,
8708
+ ScrollspyNav: scrollspyNav,
8709
+ Sticky: sticky,
8710
+ Svg: SVG,
8711
+ Switcher: Switcher,
8712
+ Tab: tab,
8713
+ Toggle: toggle,
8714
+ Video: Video,
8715
+ Close: Close,
8716
+ Spinner: Spinner,
8717
+ SlidenavNext: Slidenav,
8718
+ SlidenavPrevious: Slidenav,
8719
+ SearchIcon: Search,
8720
+ Marker: IconComponent,
8721
+ NavbarToggleIcon: IconComponent,
8722
+ OverlayIcon: IconComponent,
8723
+ PaginationNext: IconComponent,
8724
+ PaginationPrevious: IconComponent,
8725
+ Totop: IconComponent
8726
+ });
8727
+
8728
+ var countdown = {
8727
8729
 
8728
8730
  mixins: [Class],
8729
8731
 
@@ -8925,8 +8927,8 @@
8925
8927
 
8926
8928
  addStyle();
8927
8929
 
8928
- var children = toNodes(this.target.children);
8929
- var propsFrom = children.map(function (el) {
8930
+ var children$1 = children(this.target);
8931
+ var propsFrom = children$1.map(function (el) {
8930
8932
  return getProps(el, true);
8931
8933
  });
8932
8934
 
@@ -8936,7 +8938,7 @@
8936
8938
  action();
8937
8939
 
8938
8940
  Transition.cancel(this.target);
8939
- children.forEach(Transition.cancel);
8941
+ children$1.forEach(Transition.cancel);
8940
8942
 
8941
8943
  reset(this.target);
8942
8944
  this.$update(this.target);
@@ -8944,11 +8946,11 @@
8944
8946
 
8945
8947
  var newHeight = height(this.target);
8946
8948
 
8947
- children = children.concat(toNodes(this.target.children).filter(function (el) {
8948
- return !includes(children, el);
8949
+ children$1 = children$1.concat(children(this.target).filter(function (el) {
8950
+ return !includes(children$1, el);
8949
8951
  }));
8950
8952
 
8951
- var propsTo = children.map(function (el, i) {
8953
+ var propsTo = children$1.map(function (el, i) {
8952
8954
  return el.parentNode && i in propsFrom ?
8953
8955
  propsFrom[i] ?
8954
8956
  isVisible(el) ?
@@ -8963,8 +8965,8 @@
8963
8965
  });
8964
8966
 
8965
8967
  propsFrom = propsTo.map(function (props, i) {
8966
- var from = children[i].parentNode === this$1.target ?
8967
- propsFrom[i] || getProps(children[i]) :
8968
+ var from = children$1[i].parentNode === this$1.target ?
8969
+ propsFrom[i] || getProps(children$1[i]) :
8968
8970
  false;
8969
8971
 
8970
8972
  if (from) {
@@ -8985,20 +8987,20 @@
8985
8987
  });
8986
8988
 
8987
8989
  addClass(this.target, targetClass);
8988
- children.forEach(function (el, i) {
8990
+ children$1.forEach(function (el, i) {
8989
8991
  return propsFrom[i] && css(el, propsFrom[i]);
8990
8992
  });
8991
8993
  css(this.target, 'height', oldHeight);
8992
8994
  scrollTop(window, oldScrollY);
8993
8995
 
8994
- return Promise.all(children.map(function (el, i) {
8996
+ return Promise.all(children$1.map(function (el, i) {
8995
8997
  return propsFrom[i] && propsTo[i] ?
8996
8998
  Transition.start(el, propsTo[i], this$1.animation, 'ease') :
8997
8999
  Promise.resolve();
8998
9000
  }).concat(Transition.start(this.target, {
8999
9001
  height: newHeight
9000
9002
  }, this.animation, 'ease'))).then(function () {
9001
- children.forEach(function (el, i) {
9003
+ children$1.forEach(function (el, i) {
9002
9004
  return css(el, {
9003
9005
  display: propsTo[i].opacity === 0 ? 'none' : '',
9004
9006
  zIndex: ''
@@ -9043,13 +9045,12 @@
9043
9045
  }
9044
9046
 
9045
9047
  function getPositionWithMargin(el) {
9046
- var ref = el.getBoundingClientRect();
9048
+ var ref = offset(el);
9047
9049
  var height = ref.height;
9048
9050
  var width = ref.width;
9049
9051
  var ref$1 = position(el);
9050
9052
  var top = ref$1.top;
9051
9053
  var left = ref$1.left;
9052
- top += toFloat(css(el, 'marginTop'));
9053
9054
 
9054
9055
  return {
9055
9056
  top: top,
@@ -9071,7 +9072,7 @@
9071
9072
  );
9072
9073
  }
9073
9074
 
9074
- var Filter = {
9075
+ var filter$1 = {
9075
9076
 
9076
9077
  mixins: [Animate],
9077
9078
 
@@ -9115,7 +9116,7 @@
9115
9116
  children: {
9116
9117
 
9117
9118
  get: function () {
9118
- return toNodes(this.target && this.target.children);
9119
+ return children(this.target);
9119
9120
  },
9120
9121
 
9121
9122
  watch: function (list, old) {
@@ -9691,6 +9692,7 @@
9691
9692
 
9692
9693
  if (!this.draggable ||
9693
9694
  !isTouch(e) && hasTextNodesOnly(e.target) ||
9695
+ closest(e.target, selInput) ||
9694
9696
  e.button > 0 ||
9695
9697
  this.length < 2
9696
9698
  ) {
@@ -9999,7 +10001,8 @@
9999
10001
  easing: String,
10000
10002
  index: Number,
10001
10003
  finite: Boolean,
10002
- velocity: Number
10004
+ velocity: Number,
10005
+ selSlides: String
10003
10006
  },
10004
10007
 
10005
10008
  data: function () {
@@ -10048,14 +10051,15 @@
10048
10051
 
10049
10052
  selSlides: function (ref) {
10050
10053
  var selList = ref.selList;
10054
+ var selSlides = ref.selSlides;
10051
10055
 
10052
- return (selList + " > *");
10056
+ return (selList + " " + (selSlides || '> *'));
10053
10057
  },
10054
10058
 
10055
10059
  slides: {
10056
10060
 
10057
10061
  get: function () {
10058
- return toNodes(this.list.children);
10062
+ return $$(this.selSlides, this.$el);
10059
10063
  },
10060
10064
 
10061
10065
  watch: function () {
@@ -10188,7 +10192,7 @@
10188
10192
  );
10189
10193
 
10190
10194
  if (!force && !prev) {
10191
- this._transitioner.translate(1);
10195
+ this._translate(1);
10192
10196
  return Promise.resolve();
10193
10197
  }
10194
10198
 
@@ -10307,7 +10311,7 @@
10307
10311
 
10308
10312
  };
10309
10313
 
10310
- var lightboxPanel = {
10314
+ var LightboxPanel = {
10311
10315
 
10312
10316
  mixins: [Container, Modal, Togglable, Slideshow],
10313
10317
 
@@ -10534,7 +10538,7 @@
10534
10538
  var matches;
10535
10539
 
10536
10540
  // Image
10537
- if (type === 'image' || source.match(/\.(jp(e)?g|png|gif|svg|webp)($|\?)/i)) {
10541
+ if (type === 'image' || source.match(/\.(jpe?g|png|gif|svg|webp)($|\?)/i)) {
10538
10542
 
10539
10543
  getImage(source).then(
10540
10544
  function (img) {
@@ -10685,7 +10689,7 @@
10685
10689
  return ("<iframe src=\"" + src + "\" width=\"" + width + "\" height=\"" + height + "\" style=\"max-width: 100%; box-sizing: border-box;\" frameborder=\"0\" allowfullscreen uk-video=\"autoplay: " + autoplay + "\" uk-responsive></iframe>");
10686
10690
  }
10687
10691
 
10688
- var Lightbox = {
10692
+ var lightbox = {
10689
10693
 
10690
10694
  install: install$2,
10691
10695
 
@@ -10778,7 +10782,7 @@
10778
10782
  function install$2(UIkit, Lightbox) {
10779
10783
 
10780
10784
  if (!UIkit.lightboxPanel) {
10781
- UIkit.component('lightboxPanel', lightboxPanel);
10785
+ UIkit.component('lightboxPanel', LightboxPanel);
10782
10786
  }
10783
10787
 
10784
10788
  assign(
@@ -10799,7 +10803,7 @@
10799
10803
 
10800
10804
  var containers = {};
10801
10805
 
10802
- var Notification = {
10806
+ var notification = {
10803
10807
 
10804
10808
  functional: true,
10805
10809
 
@@ -11318,7 +11322,7 @@
11318
11322
  return covers;
11319
11323
  }
11320
11324
 
11321
- var Parallax$1 = {
11325
+ var parallax = {
11322
11326
 
11323
11327
  mixins: [Parallax],
11324
11328
 
@@ -11360,7 +11364,7 @@
11360
11364
  }
11361
11365
 
11362
11366
  var prev = percent;
11363
- percent = ease$1(scrolledOver(this.target) / (this.viewport || 1), this.easing);
11367
+ percent = ease(scrolledOver(this.target) / (this.viewport || 1), this.easing);
11364
11368
 
11365
11369
  return {
11366
11370
  percent: percent,
@@ -11387,7 +11391,7 @@
11387
11391
 
11388
11392
  };
11389
11393
 
11390
- function ease$1(percent, easing) {
11394
+ function ease(percent, easing) {
11391
11395
  return clamp(percent * (1 - (easing - easing * percent)));
11392
11396
  }
11393
11397
 
@@ -11434,10 +11438,10 @@
11434
11438
 
11435
11439
  var from = prev ?
11436
11440
  getLeft(prev, list, center) :
11437
- getLeft(next, list, center) + bounds(next).width * dir;
11441
+ getLeft(next, list, center) + offset(next).width * dir;
11438
11442
  var to = next ?
11439
11443
  getLeft(next, list, center) :
11440
- from + bounds(prev).width * dir * (isRtl ? -1 : 1);
11444
+ from + offset(prev).width * dir * (isRtl ? -1 : 1);
11441
11445
 
11442
11446
  return {
11443
11447
 
@@ -11503,7 +11507,7 @@
11503
11507
  css(list, 'transform', translate(clamp(
11504
11508
  -to + (distance - distance * percent),
11505
11509
  -getWidth(list),
11506
- bounds(list).width
11510
+ offset(list).width
11507
11511
  ) * (isRtl ? -1 : 1), 'px'));
11508
11512
 
11509
11513
  this.updateTranslates();
@@ -11548,7 +11552,7 @@
11548
11552
 
11549
11553
  return sortBy(slides(list).filter(function (slide) {
11550
11554
  var slideLeft = getElLeft(slide, list);
11551
- return slideLeft >= left && slideLeft + bounds(slide).width <= bounds(list).width + left;
11555
+ return slideLeft >= left && slideLeft + offset(slide).width <= offset(list).width + left;
11552
11556
  }), 'offsetLeft');
11553
11557
 
11554
11558
  },
@@ -11582,31 +11586,27 @@
11582
11586
  }
11583
11587
 
11584
11588
  function getMax(list) {
11585
- return Math.max(0, getWidth(list) - bounds(list).width);
11589
+ return Math.max(0, getWidth(list) - offset(list).width);
11586
11590
  }
11587
11591
 
11588
11592
  function getWidth(list) {
11589
11593
  return slides(list).reduce(function (right, el) {
11590
- return bounds(el).width + right;
11594
+ return offset(el).width + right;
11591
11595
  }, 0);
11592
11596
  }
11593
11597
 
11594
11598
  function getMaxWidth(list) {
11595
11599
  return slides(list).reduce(function (right, el) {
11596
- return Math.max(right, bounds(el).width);
11600
+ return Math.max(right, offset(el).width);
11597
11601
  }, 0);
11598
11602
  }
11599
11603
 
11600
11604
  function centerEl(el, list) {
11601
- return bounds(list).width / 2 - bounds(el).width / 2;
11605
+ return offset(list).width / 2 - offset(el).width / 2;
11602
11606
  }
11603
11607
 
11604
11608
  function getElLeft(el, list) {
11605
- return (position(el).left + (isRtl ? bounds(el).width - bounds(list).width : 0)) * (isRtl ? -1 : 1);
11606
- }
11607
-
11608
- function bounds(el) {
11609
- return el.getBoundingClientRect();
11609
+ return (position(el).left + (isRtl ? offset(el).width - offset(list).width : 0)) * (isRtl ? -1 : 1);
11610
11610
  }
11611
11611
 
11612
11612
  function triggerUpdate$1(el, type, data) {
@@ -11614,10 +11614,10 @@
11614
11614
  }
11615
11615
 
11616
11616
  function slides(list) {
11617
- return toNodes(list.children);
11617
+ return children(list);
11618
11618
  }
11619
11619
 
11620
- var Slider$1 = {
11620
+ var slider = {
11621
11621
 
11622
11622
  mixins: [Class, Slider, SliderReactive],
11623
11623
 
@@ -11645,7 +11645,7 @@
11645
11645
  finite: function (ref) {
11646
11646
  var finite = ref.finite;
11647
11647
 
11648
- return finite || getWidth(this.list) < bounds(this.list).width + getMaxWidth(this.list) + this.center;
11648
+ return finite || Math.ceil(getWidth(this.list)) < offset(this.list).width + getMaxWidth(this.list) + this.center;
11649
11649
  },
11650
11650
 
11651
11651
  maxIndex: function () {
@@ -11677,7 +11677,7 @@
11677
11677
  var sets = ref.sets;
11678
11678
 
11679
11679
 
11680
- var width = bounds(this.list).width / (this.center ? 2 : 1);
11680
+ var width = offset(this.list).width / (this.center ? 2 : 1);
11681
11681
 
11682
11682
  var left = 0;
11683
11683
  var leftCenter = width;
@@ -11685,7 +11685,7 @@
11685
11685
 
11686
11686
  sets = sets && this.slides.reduce(function (sets, slide, i) {
11687
11687
 
11688
- var ref = bounds(slide);
11688
+ var ref = offset(slide);
11689
11689
  var slideWidth = ref.width;
11690
11690
  var slideRight = slideLeft + slideWidth;
11691
11691
 
@@ -11698,7 +11698,7 @@
11698
11698
  if (!includes(sets, i)) {
11699
11699
 
11700
11700
  var cmp = this$1.slides[i + 1];
11701
- if (this$1.center && cmp && slideWidth < leftCenter - bounds(cmp).width / 2) {
11701
+ if (this$1.center && cmp && slideWidth < leftCenter - offset(cmp).width / 2) {
11702
11702
  leftCenter -= slideWidth;
11703
11703
  } else {
11704
11704
  leftCenter = width;
@@ -11743,8 +11743,8 @@
11743
11743
  this$1.maxIndex && toggleClass(el, 'uk-hidden', isNumeric(index) && (this$1.sets && !includes(this$1.sets, toFloat(index)) || index > this$1.maxIndex));
11744
11744
  });
11745
11745
 
11746
- if (!this.dragging && !this.stack.length) {
11747
- this._getTransitioner().translate(1);
11746
+ if (this.length && !this.dragging && !this.stack.length) {
11747
+ this._translate(1);
11748
11748
  }
11749
11749
 
11750
11750
  },
@@ -11778,7 +11778,7 @@
11778
11778
  }
11779
11779
 
11780
11780
  this.duration = speedUp(this.avgWidth / this.velocity) *
11781
- (bounds(
11781
+ (offset(
11782
11782
  this.dir < 0 || !this.slides[this.prevIndex] ?
11783
11783
  this.slides[this.index] :
11784
11784
  this.slides[this.prevIndex]
@@ -11834,7 +11834,7 @@
11834
11834
  }
11835
11835
 
11836
11836
  var next = this.slides[index];
11837
- var width = bounds(this.list).width / 2 - bounds(next).width / 2;
11837
+ var width = offset(this.list).width / 2 - offset(next).width / 2;
11838
11838
  var j = 0;
11839
11839
 
11840
11840
  while (width > 0) {
@@ -11842,7 +11842,7 @@
11842
11842
  var slide = this.slides[slideIndex];
11843
11843
 
11844
11844
  css(slide, 'order', slideIndex > index ? -2 : -1);
11845
- width -= bounds(slide).width;
11845
+ width -= offset(slide).width;
11846
11846
  }
11847
11847
 
11848
11848
  },
@@ -11878,7 +11878,7 @@
11878
11878
 
11879
11879
  };
11880
11880
 
11881
- var SlideshowParallax = {
11881
+ var sliderParallax = {
11882
11882
 
11883
11883
  mixins: [Parallax],
11884
11884
 
@@ -12175,7 +12175,7 @@
12175
12175
 
12176
12176
  });
12177
12177
 
12178
- var Slideshow$1 = {
12178
+ var slideshow = {
12179
12179
 
12180
12180
  mixins: [Class, Slideshow, SliderReactive],
12181
12181
 
@@ -12214,7 +12214,7 @@
12214
12214
  }
12215
12215
 
12216
12216
  return {
12217
- height: height - boxModelAdjust(this.list, 'content-box')
12217
+ height: height - boxModelAdjust(this.list, 'height', 'content-box')
12218
12218
  };
12219
12219
  },
12220
12220
 
@@ -12230,7 +12230,7 @@
12230
12230
 
12231
12231
  };
12232
12232
 
12233
- var Sortable = {
12233
+ var sortable = {
12234
12234
 
12235
12235
  mixins: [Class, Animate],
12236
12236
 
@@ -12259,7 +12259,8 @@
12259
12259
  clsNoDrag: 'uk-sortable-nodrag',
12260
12260
  clsEmpty: 'uk-sortable-empty',
12261
12261
  clsCustom: '',
12262
- handle: false
12262
+ handle: false,
12263
+ pos: {}
12263
12264
  },
12264
12265
 
12265
12266
  created: function () {
@@ -12269,13 +12270,7 @@
12269
12270
  var fn = this$1[key];
12270
12271
  this$1[key] = function (e) {
12271
12272
  this$1.scrollY = window.pageYOffset;
12272
- var ref = getEventPos(e, 'page');
12273
- var x = ref.x;
12274
- var y = ref.y;
12275
- this$1.pos = {
12276
- x: x,
12277
- y: y
12278
- };
12273
+ assign(this$1.pos, getEventPos(e, 'page'));
12279
12274
 
12280
12275
  fn(e);
12281
12276
  };
@@ -12314,8 +12309,6 @@
12314
12309
  left: clamp(this.pos.x + this.origin.left, 0, right - this.drag.offsetWidth)
12315
12310
  });
12316
12311
 
12317
- trackScroll(this.pos);
12318
-
12319
12312
  }
12320
12313
 
12321
12314
  }
@@ -12329,7 +12322,7 @@
12329
12322
  var target = e.target;
12330
12323
  var button = e.button;
12331
12324
  var defaultPrevented = e.defaultPrevented;
12332
- var ref = toNodes(this.$el.children).filter(function (el) {
12325
+ var ref = children(this.$el).filter(function (el) {
12333
12326
  return within(target, el);
12334
12327
  });
12335
12328
  var placeholder = ref[0];
@@ -12365,18 +12358,7 @@
12365
12358
 
12366
12359
  start: function (e) {
12367
12360
 
12368
- this.drag = append(this.$container, this.placeholder.outerHTML.replace(/^<li/i, '<div').replace(/li>$/i, 'div>'));
12369
-
12370
- css(this.drag, assign({
12371
- boxSizing: 'border-box',
12372
- width: this.placeholder.offsetWidth,
12373
- height: this.placeholder.offsetHeight,
12374
- overflow: 'hidden'
12375
- }, css(this.placeholder, ['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom'])));
12376
- attr(this.drag, 'uk-no-boot', '');
12377
- addClass(this.drag, this.clsDrag, this.clsCustom);
12378
-
12379
- height(this.drag.firstElementChild, height(this.placeholder.firstElementChild));
12361
+ this.drag = appendDrag(this.$container, this.placeholder);
12380
12362
 
12381
12363
  var ref = offset(this.placeholder);
12382
12364
  var left = ref.left;
@@ -12386,12 +12368,15 @@
12386
12368
  top: top - this.pos.y
12387
12369
  });
12388
12370
 
12371
+ addClass(this.drag, this.clsDrag, this.clsCustom);
12389
12372
  addClass(this.placeholder, this.clsPlaceholder);
12390
12373
  addClass(this.$el.children, this.clsItem);
12391
12374
  addClass(document.documentElement, this.clsDragState);
12392
12375
 
12393
12376
  trigger(this.$el, 'start', [this, this.placeholder]);
12394
12377
 
12378
+ trackScroll(this.pos);
12379
+
12395
12380
  this.move(e);
12396
12381
  },
12397
12382
 
@@ -12418,7 +12403,7 @@
12418
12403
  return;
12419
12404
  }
12420
12405
 
12421
- target = sortable.$el === target.parentNode && target || toNodes(sortable.$el.children).filter(function (element) {
12406
+ target = sortable.$el === target.parentNode && target || children(sortable.$el).filter(function (element) {
12422
12407
  return within(target, element);
12423
12408
  })[0];
12424
12409
 
@@ -12553,79 +12538,65 @@
12553
12538
 
12554
12539
  var trackTimer;
12555
12540
 
12556
- function trackScroll(ref) {
12557
- var x = ref.x;
12558
- var y = ref.y;
12541
+ function trackScroll(pos) {
12559
12542
 
12543
+ trackTimer = setInterval(function () {
12560
12544
 
12561
- clearTimeout(trackTimer);
12545
+ var x = pos.x;
12546
+ var y = pos.y;
12547
+ scrollParents(document.elementFromPoint(x - window.pageXOffset, y - window.pageYOffset)).some(function (scrollEl) {
12562
12548
 
12563
- scrollParents(document.elementFromPoint(x - window.pageXOffset, y - window.pageYOffset)).some(function (scrollEl) {
12549
+ var scroll = scrollEl.scrollTop;
12550
+ var scrollHeight = scrollEl.scrollHeight;
12564
12551
 
12565
- var scroll = scrollEl.scrollTop;
12566
- var scrollHeight = scrollEl.scrollHeight;
12567
-
12568
- if (getScrollingElement() === scrollEl) {
12569
- scrollEl = window;
12570
- scrollHeight -= window.innerHeight;
12571
- }
12572
-
12573
- var ref = offset(scrollEl);
12574
- var top = ref.top;
12575
- var bottom = ref.bottom;
12552
+ var ref = offset(getViewport(scrollEl));
12553
+ var top = ref.top;
12554
+ var bottom = ref.bottom;
12555
+ var height = ref.height;
12576
12556
 
12577
- if (top < y && top + 30 > y) {
12578
- scroll -= 5;
12579
- } else if (bottom > y && bottom - 20 < y) {
12580
- scroll += 5;
12581
- }
12557
+ if (top < y && top + 30 > y) {
12558
+ scroll -= 5;
12559
+ } else if (bottom > y && bottom - 30 < y) {
12560
+ scroll += 5;
12561
+ } else {
12562
+ return;
12563
+ }
12582
12564
 
12583
- if (scroll > 0 && scroll < scrollHeight) {
12584
- return trackTimer = setTimeout(function () {
12565
+ if (scroll > 0 && scroll < scrollHeight - height) {
12585
12566
  scrollTop(scrollEl, scroll);
12586
- trackScroll({
12587
- x: x,
12588
- y: y
12589
- });
12590
- }, 10);
12591
- }
12567
+ return true;
12568
+ }
12592
12569
 
12593
- });
12570
+ });
12571
+
12572
+ }, 15);
12594
12573
 
12595
12574
  }
12596
12575
 
12597
12576
  function untrackScroll() {
12598
- clearTimeout(trackTimer);
12577
+ clearInterval(trackTimer);
12599
12578
  }
12600
12579
 
12601
- var overflowRe = /auto|scroll/;
12580
+ function appendDrag(container, element) {
12581
+ var clone = append(container, element.outerHTML.replace(/(^<)li|li(\/>$)/g, '$1div$2'));
12602
12582
 
12603
- function scrollParents(element) {
12604
- var scrollEl = getScrollingElement();
12605
- return parents$1(element, function (parent) {
12606
- return parent === scrollEl || overflowRe.test(css(parent, 'overflow'));
12607
- });
12608
- }
12583
+ css(clone, assign({
12584
+ boxSizing: 'border-box',
12585
+ width: element.offsetWidth,
12586
+ height: element.offsetHeight,
12587
+ overflow: 'hidden'
12588
+ }, css(element, ['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom'])));
12609
12589
 
12610
- function parents$1(element, fn) {
12611
- var parents = [];
12612
- do {
12613
- if (fn(element)) {
12614
- parents.unshift(element);
12615
- }
12616
- } while (element && (element = element.parentElement));
12617
- return parents;
12618
- }
12590
+ height(clone.firstElementChild, height(element.firstElementChild));
12619
12591
 
12620
- function getScrollingElement() {
12621
- return document.scrollingElement || document.documentElement;
12592
+ return clone;
12622
12593
  }
12623
12594
 
12624
12595
  var obj$1;
12625
12596
 
12626
12597
  var actives = [];
12627
12598
 
12628
- var Tooltip = {
12599
+ var tooltip = {
12629
12600
 
12630
12601
  mixins: [Container, Togglable, Position],
12631
12602
 
@@ -12757,7 +12728,7 @@
12757
12728
 
12758
12729
  };
12759
12730
 
12760
- var Upload = {
12731
+ var upload = {
12761
12732
 
12762
12733
  props: {
12763
12734
  allow: String,
@@ -12964,24 +12935,37 @@
12964
12935
  e.stopPropagation();
12965
12936
  }
12966
12937
 
12967
- UIkit.component('countdown', Countdown);
12968
- UIkit.component('filter', Filter);
12969
- UIkit.component('lightbox', Lightbox);
12970
- UIkit.component('lightboxPanel', lightboxPanel);
12971
- UIkit.component('notification', Notification);
12972
- UIkit.component('parallax', Parallax$1);
12973
- UIkit.component('slider', Slider$1);
12974
- UIkit.component('sliderParallax', SlideshowParallax);
12975
- UIkit.component('slideshow', Slideshow$1);
12976
- UIkit.component('slideshowParallax', SlideshowParallax);
12977
- UIkit.component('sortable', Sortable);
12978
- UIkit.component('tooltip', Tooltip);
12979
- UIkit.component('upload', Upload);
12980
12938
 
12981
- {
12982
- boot(UIkit);
12939
+ var components = /*#__PURE__*/ Object.freeze({
12940
+ __proto__: null,
12941
+ Countdown: countdown,
12942
+ Filter: filter$1,
12943
+ Lightbox: lightbox,
12944
+ LightboxPanel: LightboxPanel,
12945
+ Notification: notification,
12946
+ Parallax: parallax,
12947
+ Slider: slider,
12948
+ SliderParallax: sliderParallax,
12949
+ Slideshow: slideshow,
12950
+ SlideshowParallax: sliderParallax,
12951
+ Sortable: sortable,
12952
+ Tooltip: tooltip,
12953
+ Upload: upload
12954
+ });
12955
+
12956
+ // register components
12957
+ each(coreComponents, register);
12958
+ each(components, register);
12959
+
12960
+ // core functionality
12961
+ UIkit.use(Core);
12962
+
12963
+ boot(UIkit);
12964
+
12965
+ function register(component, name) {
12966
+ UIkit.component(name, component);
12983
12967
  }
12984
12968
 
12985
12969
  return UIkit;
12986
12970
 
12987
- }));
12971
+ })));