uikit 3.11.2-dev.72dbb9a19 → 3.11.2-dev.93483bd3e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/CHANGELOG.md +32 -18
  2. package/dist/css/uikit-core-rtl.css +80 -171
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +80 -171
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +82 -177
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +82 -177
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +108 -72
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +108 -72
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +57 -2
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +108 -72
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +45 -3
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -1
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +172 -165
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +345 -241
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/internal/slider-preload.js +37 -0
  44. package/src/js/components/slider.js +21 -1
  45. package/src/js/components/slideshow.js +8 -1
  46. package/src/js/core/img.js +129 -114
  47. package/src/js/core/sticky.js +1 -1
  48. package/src/js/core/svg.js +10 -6
  49. package/src/js/core/toggle.js +2 -1
  50. package/src/js/mixin/parallax.js +108 -72
  51. package/src/js/util/dom.js +27 -30
  52. package/src/js/util/lang.js +6 -5
  53. package/src/js/util/player.js +3 -2
  54. package/src/js/util/style.js +4 -4
  55. package/src/less/components/base.less +10 -28
  56. package/src/less/components/form-range.less +52 -97
  57. package/src/less/components/form.less +0 -1
  58. package/src/less/components/lightbox.less +0 -1
  59. package/src/less/components/modal.less +3 -7
  60. package/src/less/components/progress.less +14 -36
  61. package/src/less/components/slider.less +0 -3
  62. package/src/less/components/slideshow.less +0 -3
  63. package/src/less/components/text.less +16 -32
  64. package/src/scss/components/base.scss +10 -28
  65. package/src/scss/components/form-range.scss +52 -97
  66. package/src/scss/components/form.scss +0 -1
  67. package/src/scss/components/lightbox.scss +0 -1
  68. package/src/scss/components/modal.scss +3 -7
  69. package/src/scss/components/progress.scss +14 -36
  70. package/src/scss/components/slider.scss +0 -3
  71. package/src/scss/components/slideshow.scss +0 -3
  72. package/src/scss/components/text.scss +16 -32
  73. package/src/scss/mixins-theme.scss +1 -1
  74. package/src/scss/mixins.scss +1 -1
  75. package/src/scss/variables-theme.scss +3 -3
  76. package/src/scss/variables.scss +3 -3
  77. package/tests/align.html +10 -10
  78. package/tests/animation.html +2 -2
  79. package/tests/article.html +2 -2
  80. package/tests/base.html +3 -3
  81. package/tests/card.html +10 -10
  82. package/tests/column.html +3 -3
  83. package/tests/comment.html +9 -9
  84. package/tests/dotnav.html +3 -3
  85. package/tests/image.html +296 -64
  86. package/tests/images/image-type.avif +0 -0
  87. package/tests/images/image-type.jpeg +0 -0
  88. package/tests/images/image-type.webp +0 -0
  89. package/tests/index.html +8 -8
  90. package/tests/lightbox.html +10 -10
  91. package/tests/marker.html +2 -2
  92. package/tests/modal.html +8 -9
  93. package/tests/navbar.html +2 -2
  94. package/tests/overlay.html +7 -7
  95. package/tests/parallax.html +14 -5
  96. package/tests/position.html +12 -12
  97. package/tests/slidenav.html +12 -12
  98. package/tests/slider.html +20 -20
  99. package/tests/sortable.html +1 -1
  100. package/tests/sticky-parallax.html +47 -62
  101. package/tests/svg.html +6 -6
  102. package/tests/table.html +11 -11
  103. package/tests/thumbnav.html +12 -12
  104. package/tests/transition.html +30 -30
  105. package/tests/utility.html +33 -33
  106. package/tests/video.html +1 -1
  107. package/tests/width.html +1 -1
  108. package/tests/images/animated.gif +0 -0
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.72dbb9a19 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],u):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=u(r.UIkit.util))})(this,function(r){"use strict";var u={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const n=T(this.media);return!n||window.matchMedia(n).matches}}};function T(n){if(r.isString(n)){if(n[0]==="@"){const e="breakpoint-"+n.substr(1);n=r.toFloat(r.getCssVar(e))}else if(isNaN(n))return n}return n&&!isNaN(n)?"(min-width: "+n+"px)":!1}r.memoize(async n=>n?r.startsWith(n,"data:")?decodeURIComponent(n.split(",")[1]):(await fetch(n)).text():Promise.reject());function B(n){return Math.ceil(Math.max(0,...r.$$("[stroke]",n).map(e=>{try{return e.getTotalLength()}catch{return 0}})))}const b={x:y,y,rotate:y,scale:y,color:v,backgroundColor:v,borderColor:v,blur:f,hue:f,fopacity:f,grayscale:f,invert:f,saturate:f,sepia:f,opacity:q,stroke:H,bgx:I,bgy:I},{keys:w}=Object;var E={mixins:[u],props:O(w(b),"list"),data:O(w(b),void 0),computed:{props(n,e){return w(b).reduce((t,o)=>(r.isUndefined(n[o])||(t[o]=b[o](o,e,n[o].slice())),t),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){r.each(this.getCss(0),(n,e)=>r.css(this.$el,e,""))},getCss(n){return w(this.props).reduce((e,t)=>(this.props[t](e,n),e),{transform:"",filter:""})}}};function y(n,e,t){const o=C(t)||{x:"px",y:"px",rotate:"deg"}[n]||"";return(n==="x"||n==="y")&&(n="translate"+r.ucfirst(n)),t=t.map(r.toFloat),t.length===1&&t.unshift(n==="scale"?1:0),(a,c)=>{let s=h(t,c);r.startsWith(n,"translate")&&(s=r.toFloat(s).toFixed(o==="px"?0:6)),a.transform+=" "+n+"("+s+o+")"}}function v(n,e,t){return t.length===1&&t.unshift(g(e,n,"")),t=t.map(o=>V(e,o)),(o,a)=>{const[c,s,m]=N(t,a),M=c.map((i,l)=>(i+=m*(s[l]-i),l===3?r.toFloat(i):parseInt(i,10))).join(",");o[n]="rgba("+M+")"}}function V(n,e){return g(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function f(n,e,t){t.length===1&&t.unshift(0);const o=C(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=t.map(r.toFloat),(a,c)=>{const s=h(t,c);a.filter+=" "+n+"("+(s+o)+")"}}function q(n,e,t){return t.length===1&&t.unshift(g(e,n,"")),t=t.map(r.toFloat),(o,a)=>{o[n]=h(t,a)}}function H(n,e,t){t.length===1&&t.unshift(0);const o=C(t);if(t=t.map(r.toFloat),!t.some(c=>c))return r.noop;const a=B(e);return r.css(e,"strokeDasharray",a),o==="%"&&(t=t.map(c=>c*a/100)),t=t.reverse(),(c,s)=>{c.strokeDashoffset=h(t,s)}}function I(n,e,t){t.length===1&&t.unshift(0),n=n.substr(-1);const o=n==="y"?"height":"width";t=t.map(c=>r.toPx(c,o,e));const a=g(e,"background-position-"+n,"");return g(e,"backgroundSize","")==="cover"?L(n,e,t,a,o):S(n,t,a)}function L(n,e,t,o,a){const c=R(e);if(!c.width)return r.noop;const s=Math.min(...t),m=Math.max(...t),M=t.indexOf(s)<t.indexOf(m),i=m-s;let l=(M?-i:0)-(M?s:m);const x={width:e.offsetWidth,height:e.offsetHeight},W=r.Dimensions.cover(c,x),P=W[a]-x[a];if(P<i)x[a]=W[a]+i-P;else if(P>i){const d=x[a]/r.toPx(o,a,e,!0);d&&(l-=(P-i)/d)}const z=r.Dimensions.cover(c,x),A=S(n,t,l+"px");return(d,G)=>{A(d,G),d.backgroundSize=z.width+"px "+z.height+"px",d.backgroundRepeat="no-repeat"}}function S(n,e,t){return function(o,a){o["background-position-"+n]="calc("+t+" + "+h(e,a)+"px)"}}const F={};function R(n){const e=r.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[e])return F[e];const t=new Image;return e&&(t.src=e,t.naturalWidth||(t.onload=()=>{F[e]=D(t),r.trigger(n,"bgimageload")})),F[e]=D(t)}function D(n){return{width:n.naturalWidth,height:n.naturalHeight}}function N(n,e){const t=n.length-1,o=Math.min(Math.floor(t*e),t-1);return n.slice(o,o+2).concat(e===1?1:e%(1/t)*t)}function h(n,e){const[t,o,a]=N(n,e);return r.isNumber(t)?t+Math.abs(t-o)*a*(t<o?1:-1):+o}function C(n,e){return n.reduce((t,o)=>t||r.isString(o)&&o.replace(/[\d-]/g,"").trim(),"")||e}function g(n,e,t){const o=n.style[e],a=r.css(r.css(n,e,t),e);return n.style[e]=o,a}function O(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var $={mixins:[E],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target(n,e){let{target:t}=n;return j(t&&r.query(t,e)||e)},start(n){let{start:e}=n;return r.toPx(e,"height",this.target,!0)},end(n){let{end:e,viewport:t}=n;return r.toPx(e||(t=(1-t)*100)&&t+"vh+"+t+"%","height",this.target,!0)}},update:{read(n,e){let{percent:t}=n;if(e.has("scroll")||(t=!1),!this.matchMedia)return;const o=t;return t=_(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:t,style:o===t?!1:this.getCss(t)}},write(n){let{style:e}=n;if(!this.matchMedia){this.reset();return}e&&r.css(this.$el,e)},events:["scroll","resize"]}};function _(n,e){return e>=0?Math.pow(n,e+1):1-Math.pow(1-n,-e+1)}function j(n){return n?"offsetTop"in n?n:j(r.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",$),$});
1
+ /*! UIkit 3.11.2-dev.93483bd3e | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(a,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],m):(a=typeof globalThis<"u"?globalThis:a||self,a.UIkitParallax=m(a.UIkit.util))})(this,function(a){"use strict";var m={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const e=R(this.media);return!e||window.matchMedia(e).matches}}};function R(e){if(a.isString(e)){if(e[0]==="@"){const t="breakpoint-"+e.substr(1);e=a.toFloat(a.getCssVar(t))}else if(isNaN(e))return e}return e&&!isNaN(e)?"(min-width: "+e+"px)":!1}a.memoize(async e=>e?a.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function V(e){return Math.ceil(Math.max(0,...a.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const y={x:v,y:v,rotate:v,scale:v,color:P,backgroundColor:P,borderColor:P,blur:d,hue:d,fopacity:d,grayscale:d,invert:d,saturate:d,sepia:d,opacity:L,stroke:_,bgx:D,bgy:D},{keys:F}=Object;var q={mixins:[m],props:$(F(y),"list"),data:$(F(y),void 0),computed:{props(e,t){return F(y).reduce((n,o)=>(a.isUndefined(e[o])||(n[o]=y[o](o,t,e[o].slice())),n),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){a.each(this.getCss(0),(e,t)=>a.css(this.$el,t,""))},getCss(e){return F(this.props).reduce((t,n)=>(this.props[n](t,e),t),{transform:"",filter:""})}}};function v(e,t,n){const o=C(n)||{x:"px",y:"px",rotate:"deg"}[e]||"";let r;return(e==="x"||e==="y")&&(e="translate"+a.ucfirst(e),r=c=>a.toFloat(a.toFloat(c).toFixed(o==="px"?0:6))),n.length===1&&n.unshift(e==="scale"?1:0),n=l(n,r),(c,s)=>{c.transform+=" "+e+"("+x(n,s)+o+")"}}function P(e,t,n){return n.length===1&&n.unshift(b(t,e,"")),n=l(n,o=>H(t,o)),(o,r)=>{const[c,s,i]=O(n,r),h=c.map((g,f)=>(g+=i*(s[f]-g),f===3?a.toFloat(g):parseInt(g,10))).join(",");o[e]="rgba("+h+")"}}function H(e,t){return b(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(a.toFloat)}function d(e,t,n){n.length===1&&n.unshift(0);const o=C(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=l(n),(r,c)=>{const s=x(n,c);r.filter+=" "+e+"("+(s+o)+")"}}function L(e,t,n){return n.length===1&&n.unshift(b(t,e,"")),n=l(n),(o,r)=>{o[e]=x(n,r)}}function _(e,t,n){n.length===1&&n.unshift(0);const o=C(n),r=V(t);return n=l(n.reverse(),c=>(c=a.toFloat(c),o==="%"?c*r/100:c)),n.some(c=>{let[s]=c;return s})?(a.css(t,"strokeDasharray",r),(c,s)=>{c.strokeDashoffset=x(n,s)}):a.noop}function D(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const o=e==="y"?"height":"width";n=l(n,c=>a.toPx(c,o,t));const r=b(t,"background-position-"+e,"");return b(t,"backgroundSize","")==="cover"?A(e,t,n,r,o):N(e,n,r)}function A(e,t,n,o,r){const c=G(t);if(!c.width)return a.noop;const s=n.map(u=>{let[S]=u;return S}),i=Math.min(...s),h=Math.max(...s),g=s.indexOf(i)<s.indexOf(h),f=h-i;let W=(g?-f:0)-(g?i:h);const w={width:t.offsetWidth,height:t.offsetHeight},B=a.Dimensions.cover(c,w),I=B[r]-w[r];if(I<f)w[r]=B[r]+f-I;else if(I>f){const u=w[r]/a.toPx(o,r,t,!0);u&&(W-=(I-f)/u)}const E=a.Dimensions.cover(c,w),Q=N(e,n,W+"px");return(u,S)=>{Q(u,S),u.backgroundSize=E.width+"px "+E.height+"px",u.backgroundRepeat="no-repeat"}}function N(e,t,n){return function(o,r){o["background-position-"+e]="calc("+n+" + "+x(t,r)+"px)"}}const M={};function G(e){const t=a.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(M[t])return M[t];const n=new Image;return t&&(n.src=t,n.naturalWidth||(n.onload=()=>{M[t]=j(n),a.trigger(e,"bgimageload")})),M[t]=j(n)}function j(e){return{width:e.naturalWidth,height:e.naturalHeight}}function l(e,t){t===void 0&&(t=a.toFloat);const n=[],{length:o}=e;for(let r=0;r<o;r++){let[c,s]=a.isString(e[r])?e[r].trim().split(" "):[e[r]];c=t(c),s=s?a.toFloat(s)/100:null,r===0?s===null?s=0:s&&n.push([c,0]):r===o-1&&(s===null?s=1:s!==1&&(n.push([c,s]),s=1)),n.push([c,s])}for(let r=1;r<n.length-1;r++)if(n[r][1]===null){const c=a.findIndex(n.slice(r+1),i=>{let[,h]=i;return h!==null})+1,s=(n[r+c][1]-n[r-1][1])/(c+1);for(let i=0;i<c;i++)n[r+i][1]=n[r-1][1]+s*(i+1);r+=c}return n}function O(e,t){const n=a.findIndex(e.slice(1),o=>{let[,r]=o;return t<=r})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function x(e,t){const[n,o,r]=O(e,t);return a.isNumber(n)?n+Math.abs(n-o)*r*(n<o?1:-1):+o}const J=/^[\d-]+([^\s]+)/;function C(e,t){for(const n of e){const o=n.match==null?void 0:n.match(J);if(o)return o[1]}return t}function b(e,t,n){const o=e.style[t],r=a.css(a.css(e,t,n),t);return e.style[t]=o,r}function $(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var z={mixins:[q],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target(e,t){let{target:n}=e;return T(n&&a.query(n,t)||t)},start(e){let{start:t}=e;return a.toPx(t,"height",this.target,!0)},end(e){let{end:t,viewport:n}=e;return a.toPx(t||(n=(1-n)*100)&&n+"vh+"+n+"%","height",this.target,!0)}},update:{read(e,t){let{percent:n}=e;if(t.has("scroll")||(n=!1),!this.matchMedia)return;const o=n;return n=K(a.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:o===n?!1:this.getCss(n)}},write(e){let{style:t}=e;if(!this.matchMedia){this.reset();return}t&&a.css(this.$el,t)},events:["scroll","resize"]}};function K(e,t){return t>=0?Math.pow(e,t+1):1-Math.pow(1-e,-t+1)}function T(e){return e?"offsetTop"in e?e:T(a.parent(e)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",z),z});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.72dbb9a19 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.93483bd3e | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -127,39 +127,35 @@
127
127
 
128
128
 
129
129
 
130
- function transformFn(prop, el, steps) {
131
- const unit = getUnit(steps) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
130
+ function transformFn(prop, el, stops) {
131
+ const unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
132
+ let transformFn;
132
133
 
133
134
  if (prop === 'x' || prop === 'y') {
134
135
  prop = "translate" + uikitUtil.ucfirst(prop);
136
+ transformFn = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
135
137
  }
136
138
 
137
- steps = steps.map(uikitUtil.toFloat);
138
-
139
- if (steps.length === 1) {
140
- steps.unshift(prop === 'scale' ? 1 : 0);
139
+ if (stops.length === 1) {
140
+ stops.unshift(prop === 'scale' ? 1 : 0);
141
141
  }
142
142
 
143
- return (css, percent) => {
144
- let value = getValue(steps, percent);
145
-
146
- if (uikitUtil.startsWith(prop, 'translate')) {
147
- value = uikitUtil.toFloat(value).toFixed(unit === 'px' ? 0 : 6);
148
- }
143
+ stops = parseStops(stops, transformFn);
149
144
 
150
- css.transform += " " + prop + "(" + value + unit + ")";
145
+ return (css, percent) => {
146
+ css.transform += " " + prop + "(" + getValue(stops, percent) + unit + ")";
151
147
  };
152
148
  }
153
149
 
154
- function colorFn(prop, el, steps) {
155
- if (steps.length === 1) {
156
- steps.unshift(getCssValue(el, prop, ''));
150
+ function colorFn(prop, el, stops) {
151
+ if (stops.length === 1) {
152
+ stops.unshift(getCssValue(el, prop, ''));
157
153
  }
158
154
 
159
- steps = steps.map((step) => parseColor(el, step));
155
+ stops = parseStops(stops, (stop) => parseColor(el, stop));
160
156
 
161
157
  return (css, percent) => {
162
- const [start, end, p] = getStep(steps, percent);
158
+ const [start, end, p] = getStop(stops, percent);
163
159
  const value = start.
164
160
  map((value, i) => {
165
161
  value += p * (end[i] - value);
@@ -179,85 +175,83 @@
179
175
  map(uikitUtil.toFloat);
180
176
  }
181
177
 
182
- function filterFn(prop, el, steps) {
183
- if (steps.length === 1) {
184
- steps.unshift(0);
178
+ function filterFn(prop, el, stops) {
179
+ if (stops.length === 1) {
180
+ stops.unshift(0);
185
181
  }
186
182
 
187
- const unit = getUnit(steps) || { blur: 'px', hue: 'deg' }[prop] || '%';
183
+ const unit = getUnit(stops) || { blur: 'px', hue: 'deg' }[prop] || '%';
188
184
  prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
189
- steps = steps.map(uikitUtil.toFloat);
185
+ stops = parseStops(stops);
190
186
 
191
187
  return (css, percent) => {
192
- const value = getValue(steps, percent);
188
+ const value = getValue(stops, percent);
193
189
  css.filter += " " + prop + "(" + (value + unit) + ")";
194
190
  };
195
191
  }
196
192
 
197
- function cssPropFn(prop, el, steps) {
198
- if (steps.length === 1) {
199
- steps.unshift(getCssValue(el, prop, ''));
193
+ function cssPropFn(prop, el, stops) {
194
+ if (stops.length === 1) {
195
+ stops.unshift(getCssValue(el, prop, ''));
200
196
  }
201
197
 
202
- steps = steps.map(uikitUtil.toFloat);
198
+ stops = parseStops(stops);
203
199
 
204
200
  return (css, percent) => {
205
- css[prop] = getValue(steps, percent);
201
+ css[prop] = getValue(stops, percent);
206
202
  };
207
203
  }
208
204
 
209
- function strokeFn(prop, el, steps) {
210
- if (steps.length === 1) {
211
- steps.unshift(0);
205
+ function strokeFn(prop, el, stops) {
206
+ if (stops.length === 1) {
207
+ stops.unshift(0);
212
208
  }
213
209
 
214
- const unit = getUnit(steps);
215
- steps = steps.map(uikitUtil.toFloat);
210
+ const unit = getUnit(stops);
211
+ const length = getMaxPathLength(el);
212
+ stops = parseStops(stops.reverse(), (stop) => {
213
+ stop = uikitUtil.toFloat(stop);
214
+ return unit === '%' ? stop * length / 100 : stop;
215
+ });
216
216
 
217
- if (!steps.some((step) => step)) {
217
+ if (!stops.some((_ref) => {let [value] = _ref;return value;})) {
218
218
  return uikitUtil.noop;
219
219
  }
220
220
 
221
- const length = getMaxPathLength(el);
222
221
  uikitUtil.css(el, 'strokeDasharray', length);
223
222
 
224
- if (unit === '%') {
225
- steps = steps.map((step) => step * length / 100);
226
- }
227
-
228
- steps = steps.reverse();
229
-
230
223
  return (css, percent) => {
231
- css.strokeDashoffset = getValue(steps, percent);
224
+ css.strokeDashoffset = getValue(stops, percent);
232
225
  };
233
226
  }
234
227
 
235
- function backgroundFn(prop, el, steps) {
236
- if (steps.length === 1) {
237
- steps.unshift(0);
228
+ function backgroundFn(prop, el, stops) {
229
+ if (stops.length === 1) {
230
+ stops.unshift(0);
238
231
  }
239
232
 
240
233
  prop = prop.substr(-1);
241
234
  const attr = prop === 'y' ? 'height' : 'width';
242
- steps = steps.map((step) => uikitUtil.toPx(step, attr, el));
235
+ stops = parseStops(stops, (stop) => uikitUtil.toPx(stop, attr, el));
243
236
 
244
237
  const bgPos = getCssValue(el, "background-position-" + prop, '');
245
238
 
246
239
  return getCssValue(el, 'backgroundSize', '') === 'cover' ?
247
- backgroundCoverFn(prop, el, steps, bgPos, attr) :
248
- setBackgroundPosFn(prop, steps, bgPos);
240
+ backgroundCoverFn(prop, el, stops, bgPos, attr) :
241
+ setBackgroundPosFn(prop, stops, bgPos);
249
242
  }
250
243
 
251
- function backgroundCoverFn(prop, el, steps, bgPos, attr) {
244
+ function backgroundCoverFn(prop, el, stops, bgPos, attr) {
252
245
  const dimImage = getBackgroundImageDimensions(el);
253
246
 
254
247
  if (!dimImage.width) {
255
248
  return uikitUtil.noop;
256
249
  }
257
250
 
258
- const min = Math.min(...steps);
259
- const max = Math.max(...steps);
260
- const down = steps.indexOf(min) < steps.indexOf(max);
251
+ const values = stops.map((_ref2) => {let [value] = _ref2;return value;});
252
+ const min = Math.min(...values);
253
+ const max = Math.max(...values);
254
+ const down = values.indexOf(min) < values.indexOf(max);
261
255
 
262
256
  const diff = max - min;
263
257
  let pos = (down ? -diff : 0) - (down ? min : max);
@@ -282,7 +276,7 @@
282
276
 
283
277
  const dim = uikitUtil.Dimensions.cover(dimImage, dimEl);
284
278
 
285
- const fn = setBackgroundPosFn(prop, steps, pos + "px");
279
+ const fn = setBackgroundPosFn(prop, stops, pos + "px");
286
280
  return (css, percent) => {
287
281
  fn(css, percent);
288
282
  css.backgroundSize = dim.width + "px " + dim.height + "px";
@@ -290,9 +284,9 @@
290
284
  };
291
285
  }
292
286
 
293
- function setBackgroundPosFn(prop, steps, pos) {
287
+ function setBackgroundPosFn(prop, stops, pos) {
294
288
  return function (css, percent) {
295
- css["background-position-" + prop] = "calc(" + pos + " + " + getValue(steps, percent) + "px)";
289
+ css["background-position-" + prop] = "calc(" + pos + " + " + getValue(stops, percent) + "px)";
296
290
  };
297
291
  }
298
292
 
@@ -326,27 +320,69 @@
326
320
 
327
321
  }
328
322
 
329
- function getStep(steps, percent) {
330
- const count = steps.length - 1;
331
- const index = Math.min(Math.floor(count * percent), count - 1);
323
+ function parseStops(stops, fn) {if (fn === void 0) {fn = uikitUtil.toFloat;}
324
+ const result = [];
325
+ const { length } = stops;
326
+ for (let i = 0; i < length; i++) {
327
+ let [value, percent] = uikitUtil.isString(stops[i]) ? stops[i].trim().split(' ') : [stops[i]];
328
+ value = fn(value);
329
+ percent = percent ? uikitUtil.toFloat(percent) / 100 : null;
330
+
331
+ if (i === 0) {
332
+ if (percent === null) {
333
+ percent = 0;
334
+ } else if (percent) {
335
+ result.push([value, 0]);
336
+ }
337
+ } else if (i === length - 1) {
338
+ if (percent === null) {
339
+ percent = 1;
340
+ } else if (percent !== 1) {
341
+ result.push([value, percent]);
342
+ percent = 1;
343
+ }
344
+ }
345
+
346
+ result.push([value, percent]);
347
+ }
348
+
349
+ for (let i = 1; i < result.length - 1; i++) {
350
+ if (result[i][1] === null) {
351
+ const nextIndex = uikitUtil.findIndex(result.slice(i + 1), (_ref3) => {let [, percent] = _ref3;return percent !== null;}) + 1;
352
+ const percent = (result[i + nextIndex][1] - result[i - 1][1]) / (nextIndex + 1);
353
+ for (let j = 0; j < nextIndex; j++) {
354
+ result[i + j][1] = result[i - 1][1] + percent * (j + 1);
355
+ }
356
+ i += nextIndex;
357
+ }
358
+ }
359
+
360
+ return result;
361
+ }
362
+
363
+ function getStop(stops, percent) {
364
+ const index = uikitUtil.findIndex(stops.slice(1), (_ref4) => {let [, targetPercent] = _ref4;return percent <= targetPercent;}) + 1;
365
+ return [
366
+ stops[index - 1][0],
367
+ stops[index][0],
368
+ (percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])];
332
369
 
333
- return steps.
334
- slice(index, index + 2).
335
- concat(percent === 1 ? 1 : percent % (1 / count) * count);
336
370
  }
337
371
 
338
- function getValue(steps, percent) {
339
- const [start, end, p] = getStep(steps, percent);
372
+ function getValue(stops, percent) {
373
+ const [start, end, p] = getStop(stops, percent);
340
374
  return uikitUtil.isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
341
375
  }
342
376
 
343
- function getUnit(steps, defaultUnit) {
344
- return (
345
- steps.reduce(
346
- (unit, step) => unit || uikitUtil.isString(step) && step.replace(/[\d-]/g, '').trim(),
347
- '') ||
348
- defaultUnit);
349
-
377
+ const unitRe = /^[\d-]+([^\s]+)/;
378
+ function getUnit(stops, defaultUnit) {
379
+ for (const stop of stops) {
380
+ const match = stop.match == null ? void 0 : stop.match(unitRe);
381
+ if (match) {
382
+ return match[1];
383
+ }
384
+ }
385
+ return defaultUnit;
350
386
  }
351
387
 
352
388
  function getCssValue(el, prop, value) {
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.72dbb9a19 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,h){typeof exports=="object"&&typeof module<"u"?module.exports=h(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],h):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitSlider_parallax=h(o.UIkit.util))})(this,function(o){"use strict";var h={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const e=B(this.media);return!e||window.matchMedia(e).matches}}};function B(e){if(o.isString(e)){if(e[0]==="@"){const t="breakpoint-"+e.substr(1);e=o.toFloat(o.getCssVar(t))}else if(isNaN(e))return e}return e&&!isNaN(e)?"(min-width: "+e+"px)":!1}o.memoize(async e=>e?o.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function V(e){return Math.ceil(Math.max(0,...o.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const b={x:w,y:w,rotate:w,scale:w,color:M,backgroundColor:M,borderColor:M,blur:d,hue:d,fopacity:d,grayscale:d,invert:d,saturate:d,sepia:d,opacity:H,stroke:L,bgx:$,bgy:$},{keys:y}=Object;var _={mixins:[h],props:W(y(b),"list"),data:W(y(b),void 0),computed:{props(e,t){return y(b).reduce((n,r)=>(o.isUndefined(e[r])||(n[r]=b[r](r,t,e[r].slice())),n),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){o.each(this.getCss(0),(e,t)=>o.css(this.$el,t,""))},getCss(e){return y(this.props).reduce((t,n)=>(this.props[n](t,e),t),{transform:"",filter:""})}}};function w(e,t,n){const r=P(n)||{x:"px",y:"px",rotate:"deg"}[e]||"";return(e==="x"||e==="y")&&(e="translate"+o.ucfirst(e)),n=n.map(o.toFloat),n.length===1&&n.unshift(e==="scale"?1:0),(a,c)=>{let s=m(n,c);o.startsWith(e,"translate")&&(s=o.toFloat(s).toFixed(r==="px"?0:6)),a.transform+=" "+e+"("+s+r+")"}}function M(e,t,n){return n.length===1&&n.unshift(g(t,e,"")),n=n.map(r=>q(t,r)),(r,a)=>{const[c,s,f]=T(n,a),C=c.map((i,l)=>(i+=f*(s[l]-i),l===3?o.toFloat(i):parseInt(i,10))).join(",");r[e]="rgba("+C+")"}}function q(e,t){return g(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(o.toFloat)}function d(e,t,n){n.length===1&&n.unshift(0);const r=P(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=n.map(o.toFloat),(a,c)=>{const s=m(n,c);a.filter+=" "+e+"("+(s+r)+")"}}function H(e,t,n){return n.length===1&&n.unshift(g(t,e,"")),n=n.map(o.toFloat),(r,a)=>{r[e]=m(n,a)}}function L(e,t,n){n.length===1&&n.unshift(0);const r=P(n);if(n=n.map(o.toFloat),!n.some(c=>c))return o.noop;const a=V(t);return o.css(t,"strokeDasharray",a),r==="%"&&(n=n.map(c=>c*a/100)),n=n.reverse(),(c,s)=>{c.strokeDashoffset=m(n,s)}}function $(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const r=e==="y"?"height":"width";n=n.map(c=>o.toPx(c,r,t));const a=g(t,"background-position-"+e,"");return g(t,"backgroundSize","")==="cover"?R(e,t,n,a,r):D(e,n,a)}function R(e,t,n,r,a){const c=E(t);if(!c.width)return o.noop;const s=Math.min(...n),f=Math.max(...n),C=n.indexOf(s)<n.indexOf(f),i=f-s;let l=(C?-i:0)-(C?s:f);const x={width:t.offsetWidth,height:t.offsetHeight},O=o.Dimensions.cover(c,x),I=O[a]-x[a];if(I<i)x[a]=O[a]+i-I;else if(I>i){const u=x[a]/o.toPx(r,a,t,!0);u&&(l-=(I-i)/u)}const z=o.Dimensions.cover(c,x),A=D(e,n,l+"px");return(u,G)=>{A(u,G),u.backgroundSize=z.width+"px "+z.height+"px",u.backgroundRepeat="no-repeat"}}function D(e,t,n){return function(r,a){r["background-position-"+e]="calc("+n+" + "+m(t,a)+"px)"}}const F={};function E(e){const t=o.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const n=new Image;return t&&(n.src=t,n.naturalWidth||(n.onload=()=>{F[t]=S(n),o.trigger(e,"bgimageload")})),F[t]=S(n)}function S(e){return{width:e.naturalWidth,height:e.naturalHeight}}function T(e,t){const n=e.length-1,r=Math.min(Math.floor(n*t),n-1);return e.slice(r,r+2).concat(t===1?1:t%(1/n)*n)}function m(e,t){const[n,r,a]=T(e,t);return o.isNumber(n)?n+Math.abs(n-r)*a*(n<r?1:-1):+r}function P(e,t){return e.reduce((n,r)=>n||o.isString(r)&&r.replace(/[\d-]/g,"").trim(),"")||t}function g(e,t,n){const r=e.style[t],a=o.css(o.css(e,t,n),t);return e.style[t]=r,a}function W(e,t){return e.reduce((n,r)=>(n[r]=t,n),{})}var j={mixins:[_],data:{selItem:"!li"},computed:{item(e,t){let{selItem:n}=e;return o.query(n,t)}},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:r,timing:a,dir:c}}=e;o.fastdom.read(()=>{const s=this.getCss(N(t,c,n)),f=this.getCss(v(t)?.5:c>0?1:0);o.fastdom.write(()=>{o.css(this.$el,s),o.Transition.start(this.$el,f,r,a).catch(o.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){o.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:r}}=e;o.fastdom.read(()=>{const a=this.getCss(N(t,r,n));o.fastdom.write(()=>o.css(this.$el,a))})}}]};function v(e){return o.endsWith(e,"in")}function N(e,t,n){return n/=2,v(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",j),j});
1
+ /*! UIkit 3.11.2-dev.93483bd3e | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],g):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitSlider_parallax=g(o.UIkit.util))})(this,function(o){"use strict";var g={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const n=_(this.media);return!n||window.matchMedia(n).matches}}};function _(n){if(o.isString(n)){if(n[0]==="@"){const t="breakpoint-"+n.substr(1);n=o.toFloat(o.getCssVar(t))}else if(isNaN(n))return n}return n&&!isNaN(n)?"(min-width: "+n+"px)":!1}o.memoize(async n=>n?o.startsWith(n,"data:")?decodeURIComponent(n.split(",")[1]):(await fetch(n)).text():Promise.reject());function q(n){return Math.ceil(Math.max(0,...o.$$("[stroke]",n).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:I,y:I,rotate:I,scale:I,color:v,backgroundColor:v,borderColor:v,blur:u,hue:u,fopacity:u,grayscale:u,invert:u,saturate:u,sepia:u,opacity:E,stroke:A,bgx:D,bgy:D},{keys:F}=Object;var H={mixins:[g],props:N(F(w),"list"),data:N(F(w),void 0),computed:{props(n,t){return F(w).reduce((e,a)=>(o.isUndefined(n[a])||(e[a]=w[a](a,t,n[a].slice())),e),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){o.each(this.getCss(0),(n,t)=>o.css(this.$el,t,""))},getCss(n){return F(this.props).reduce((t,e)=>(this.props[e](t,n),t),{transform:"",filter:""})}}};function I(n,t,e){const a=M(e)||{x:"px",y:"px",rotate:"deg"}[n]||"";let r;return(n==="x"||n==="y")&&(n="translate"+o.ucfirst(n),r=s=>o.toFloat(o.toFloat(s).toFixed(a==="px"?0:6))),e.length===1&&e.unshift(n==="scale"?1:0),e=l(e,r),(s,c)=>{s.transform+=" "+n+"("+x(e,c)+a+")"}}function v(n,t,e){return e.length===1&&e.unshift(b(t,n,"")),e=l(e,a=>L(t,a)),(a,r)=>{const[s,c,i]=T(e,r),h=s.map((m,f)=>(m+=i*(c[f]-m),f===3?o.toFloat(m):parseInt(m,10))).join(",");a[n]="rgba("+h+")"}}function L(n,t){return b(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(o.toFloat)}function u(n,t,e){e.length===1&&e.unshift(0);const a=M(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=l(e),(r,s)=>{const c=x(e,s);r.filter+=" "+n+"("+(c+a)+")"}}function E(n,t,e){return e.length===1&&e.unshift(b(t,n,"")),e=l(e),(a,r)=>{a[n]=x(e,r)}}function A(n,t,e){e.length===1&&e.unshift(0);const a=M(e),r=q(t);return e=l(e.reverse(),s=>(s=o.toFloat(s),a==="%"?s*r/100:s)),e.some(s=>{let[c]=s;return c})?(o.css(t,"strokeDasharray",r),(s,c)=>{s.strokeDashoffset=x(e,c)}):o.noop}function D(n,t,e){e.length===1&&e.unshift(0),n=n.substr(-1);const a=n==="y"?"height":"width";e=l(e,s=>o.toPx(s,a,t));const r=b(t,"background-position-"+n,"");return b(t,"backgroundSize","")==="cover"?G(n,t,e,r,a):S(n,e,r)}function G(n,t,e,a,r){const s=J(t);if(!s.width)return o.noop;const c=e.map(d=>{let[$]=d;return $}),i=Math.min(...c),h=Math.max(...c),m=c.indexOf(i)<c.indexOf(h),f=h-i;let B=(m?-f:0)-(m?i:h);const y={width:t.offsetWidth,height:t.offsetHeight},R=o.Dimensions.cover(s,y),P=R[r]-y[r];if(P<f)y[r]=R[r]+f-P;else if(P>f){const d=y[r]/o.toPx(a,r,t,!0);d&&(B-=(P-f)/d)}const V=o.Dimensions.cover(s,y),Q=S(n,e,B+"px");return(d,$)=>{Q(d,$),d.backgroundSize=V.width+"px "+V.height+"px",d.backgroundRepeat="no-repeat"}}function S(n,t,e){return function(a,r){a["background-position-"+n]="calc("+e+" + "+x(t,r)+"px)"}}const C={};function J(n){const t=o.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(C[t])return C[t];const e=new Image;return t&&(e.src=t,e.naturalWidth||(e.onload=()=>{C[t]=j(e),o.trigger(n,"bgimageload")})),C[t]=j(e)}function j(n){return{width:n.naturalWidth,height:n.naturalHeight}}function l(n,t){t===void 0&&(t=o.toFloat);const e=[],{length:a}=n;for(let r=0;r<a;r++){let[s,c]=o.isString(n[r])?n[r].trim().split(" "):[n[r]];s=t(s),c=c?o.toFloat(c)/100:null,r===0?c===null?c=0:c&&e.push([s,0]):r===a-1&&(c===null?c=1:c!==1&&(e.push([s,c]),c=1)),e.push([s,c])}for(let r=1;r<e.length-1;r++)if(e[r][1]===null){const s=o.findIndex(e.slice(r+1),i=>{let[,h]=i;return h!==null})+1,c=(e[r+s][1]-e[r-1][1])/(s+1);for(let i=0;i<s;i++)e[r+i][1]=e[r-1][1]+c*(i+1);r+=s}return e}function T(n,t){const e=o.findIndex(n.slice(1),a=>{let[,r]=a;return t<=r})+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function x(n,t){const[e,a,r]=T(n,t);return o.isNumber(e)?e+Math.abs(e-a)*r*(e<a?1:-1):+a}const K=/^[\d-]+([^\s]+)/;function M(n,t){for(const e of n){const a=e.match==null?void 0:e.match(K);if(a)return a[1]}return t}function b(n,t,e){const a=n.style[t],r=o.css(o.css(n,t,e),t);return n.style[t]=a,r}function N(n,t){return n.reduce((e,a)=>(e[a]=t,e),{})}var W={mixins:[H],data:{selItem:"!li"},computed:{item(n,t){let{selItem:e}=n;return o.query(e,t)}},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(n){let{type:t,detail:{percent:e,duration:a,timing:r,dir:s}}=n;o.fastdom.read(()=>{const c=this.getCss(z(t,s,e)),i=this.getCss(O(t)?.5:s>0?1:0);o.fastdom.write(()=>{o.css(this.$el,c),o.Transition.start(this.$el,i,a,r).catch(o.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){o.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(n){let{type:t,detail:{percent:e,dir:a}}=n;o.fastdom.read(()=>{const r=this.getCss(z(t,a,e));o.fastdom.write(()=>o.css(this.$el,r))})}}]};function O(n){return o.endsWith(n,"in")}function z(n,t,e){return e/=2,O(n)^t<0?e:1-e}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",W),W});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.72dbb9a19 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.93483bd3e | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -574,6 +574,42 @@
574
574
 
575
575
  events: ['resize'] } };
576
576
 
577
+ var SliderPreload = {
578
+ connected() {
579
+ if (window.IntersectionObserver) {
580
+ this.observer = new IntersectionObserver(
581
+ (entries) => {
582
+ if (entries.some((entry) => entry.isIntersecting)) {
583
+ removeLazyLoad(this.getAdjacentSlides());
584
+ }
585
+ },
586
+ { rootMargin: '50% 50%' });
587
+
588
+ this.observer.observe(this.$el);
589
+ }
590
+ },
591
+
592
+ disconnected() {
593
+ this.observer && this.observer.disconnect();
594
+ },
595
+
596
+ update: {
597
+ read() {
598
+ if (uikitUtil.isVisible(this.$el)) {
599
+ removeLazyLoad(this.getAdjacentSlides());
600
+ }
601
+ },
602
+
603
+ events: ['resize'] } };
604
+
605
+
606
+
607
+ function removeLazyLoad(elements) {if (elements === void 0) {elements = [];}
608
+ for (const el of elements) {
609
+ el && uikitUtil.$$('img[loading="lazy"]', el).forEach((el) => uikitUtil.removeAttr(el, 'loading'));
610
+ }
611
+ }
612
+
577
613
  function translate(value, unit) {if (value === void 0) {value = 0;}if (unit === void 0) {unit = '%';}
578
614
  value += value ? unit : '';
579
615
  return "translate3d(" + value + ", 0, 0)";
@@ -745,7 +781,7 @@
745
781
  }
746
782
 
747
783
  var Component = {
748
- mixins: [Class, Slider, SliderReactive],
784
+ mixins: [Class, Slider, SliderReactive, SliderPreload],
749
785
 
750
786
  props: {
751
787
  center: Boolean,
@@ -982,6 +1018,25 @@
982
1018
  } while (index !== prev);
983
1019
 
984
1020
  return index;
1021
+ },
1022
+
1023
+ getAdjacentSlides() {
1024
+ const { width } = uikitUtil.dimensions(this.list);
1025
+ const left = -width;
1026
+ const right = width * 2;
1027
+ const slideWidth = uikitUtil.dimensions(this.slides[this.index]).width;
1028
+ const slideLeft = this.center ? width / 2 - slideWidth / 2 : 0;
1029
+ const slides = new Set();
1030
+ for (const i of [-1, 1]) {
1031
+ let currentLeft = slideLeft + (i > 0 ? slideWidth : 0);
1032
+ let j = 0;
1033
+ do {
1034
+ const slide = this.slides[this.getIndex(this.index + i + j++ * i)];
1035
+ currentLeft += uikitUtil.dimensions(slide).width * i;
1036
+ slides.add(slide);
1037
+ } while (this.slides.length > j && currentLeft > left && currentLeft < right);
1038
+ }
1039
+ return Array.from(slides);
985
1040
  } } };
986
1041
 
987
1042
 
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.72dbb9a19 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},S={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:e.pointerDown,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&T(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,e.pointerMove,this.move,{passive:!1}),e.on(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,a=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&a>h;)this.drag-=h*this.dir,i=r,a-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=a/h;const g=n[i],c=n[r],l=this.index!==r,o=i===r;let d;[this.index,this.prevIndex].filter(f=>!e.includes([r,i],f)).forEach(f=>{e.trigger(n[f],"itemhidden",[this]),o&&(d=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||d)&&e.trigger(n[this.index],"itemshown",[this]),l&&(this.prevIndex=i,this.index=r,!o&&e.trigger(g,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),g,!o&&c),l&&(!o&&e.trigger(g,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,e.pointerMove,this.move,{passive:!1}),e.off(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function T(s){return!s.children.length&&s.childNodes.length}var D={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},E={mixins:[R,S,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return b(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,a=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],g=this.getIndex(s,this.index),c=this.slides[g];if(h===c){a();return}if(this.dir=W(s,r),this.prevIndex=r,this.index=g,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,a();return}const l=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(o=>{e.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,o()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),l},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function W(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function b(s){return .5*s+300}var O={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==s)&&this.show(s)},events:["resize"]}};function _(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function B(s,t,n,i){let{center:a,easing:r,list:h}=i;const g=new e.Deferred,c=s?p(s,h,a):p(t,h,a)+e.dimensions(t).width*n,l=t?p(t,h,a):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(o,d,f){d===void 0&&(d=0);const m=f?"linear":r;return o-=Math.round(o*e.clamp(d,-1,1)),this.translate(d),d=s?d:e.clamp(d,0,1),u(this.getItemIn(),"itemin",{percent:d,duration:o,timing:m,dir:n}),s&&u(this.getItemIn(!0),"itemout",{percent:1-d,duration:o,timing:m,dir:n}),e.Transition.start(h,{transform:_(-l*(e.isRtl?-1:1),"px")},o,m).then(g.resolve,e.noop),g.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(o,d){return d===void 0&&(d=this.percent()),e.Transition.cancel(h),this.show(o,d,!0)},translate(o){const d=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",_(e.clamp(-l+(d-d*o),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),m=this.getItemIn(),L=this.getItemIn(!0);o=s?e.clamp(o,-1,1):0;for(const x of e.children(h)){const C=e.includes(f,x),M=x===m,N=x===L,z=M||!N&&(C||n*(e.isRtl?-1:1)===-1^w(x,h)>w(s||t));u(x,"itemtranslate"+(z?"in":"out"),{dir:n,percent:N?1-o:M?o:C?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(l-c))},getDistance(){return Math.abs(l-c)},getItemIn(o){o===void 0&&(o=!1);let d=this.getActives(),f=A(h,p(t||s,h,a));if(o){const m=d;d=f,f=m}return f[e.findIndex(f,m=>!e.includes(d,m))]},getActives(){return A(h,p(s||t,h,a))}}}function p(s,t,n){const i=w(s,t);return n?i-P(s,t):Math.min(i,y(t))}function y(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function P(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function w(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function A(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(a=>{const r=w(a,s),h=r+Math.min(e.dimensions(a).width,n);return r>=t&&h<=i})}function u(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var $={mixins:[v,E,O],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:B},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.floor(e.dimensions(this.list).width+V(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=y(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;const n=e.dimensions(this.list).width/(this.center?2:1);let i=0,a=n,r=0;return t=e.sortBy(this.slides,"offsetLeft").reduce((h,g,c)=>{const l=e.dimensions(g).width;if(r+l>i&&(!this.center&&c>this.maxIndex&&(c=this.maxIndex),!e.includes(h,c))){const d=this.slides[c+1];this.center&&d&&l<a-e.dimensions(d).width/2?a-=l:(a=n,h.push(c),i=r+n+(this.center?l/2:0))}return r+=l,h},[]),!e.isEmpty(t)&&t},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const n of this.navItems){const i=e.toNumber(e.data(n,this.attrItem));i!==!1&&(n.hidden=!this.maxIndex||i>this.maxIndex||this.sets&&!e.includes(this.sets,i))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1));const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((a,r)=>e.css(a,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const a=this.getIndex(--i+s,s),r=this.slides[a];e.css(r,"order",a>s?-2:-1),n-=e.dimensions(r).width}},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s}}};function V(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",$),$});
1
+ /*! UIkit 3.11.2-dev.93483bd3e | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider=v(s.UIkit.util))})(this,function(s){"use strict";var v={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},T={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&D(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,d=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&d>h;)this.drag-=h*this.dir,i=r,d-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=d/h;const f=n[i],c=n[r],l=this.index!==r,a=i===r;let o;[this.index,this.prevIndex].filter(g=>!s.includes([r,i],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),a&&(o=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||o)&&s.trigger(n[this.index],"itemshown",[this]),l&&(this.prevIndex=i,this.index=r,!a&&s.trigger(f,"beforeitemhide",[this]),s.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),f,!a&&c),l&&(!a&&s.trigger(f,"itemhide",[this]),s.trigger(c,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function D(e){return!e.children.length&&e.childNodes.length}var E={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},O={mixins:[R,T,E],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return b(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,d=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[r],f=this.getIndex(e,this.index),c=this.slides[f];if(h===c){d();return}if(this.dir=W(e,r),this.prevIndex=r,this.index=f,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,d();return}const l=this._show(h,c,t).then(()=>(h&&s.trigger(h,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),new Promise(a=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,a()})})));return h&&s.trigger(h,"itemhide",[this]),s.trigger(c,"itemshow",[this]),l},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(e),i},_getTransitioner(e,t,n,i){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),i)}}};function W(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function b(e){return .5*e+300}var L={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==e)&&this.show(e)},events:["resize"]}},z={connected(){window.IntersectionObserver&&(this.observer=new IntersectionObserver(e=>{e.some(t=>t.isIntersecting)&&y(this.getAdjacentSlides())},{rootMargin:"50% 50%"}),this.observer.observe(this.$el))},disconnected(){this.observer&&this.observer.disconnect()},update:{read(){s.isVisible(this.$el)&&y(this.getAdjacentSlides())},events:["resize"]}};function y(e){e===void 0&&(e=[]);for(const t of e)t&&s.$$('img[loading="lazy"]',t).forEach(n=>s.removeAttr(n,"loading"))}function _(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function B(e,t,n,i){let{center:d,easing:r,list:h}=i;const f=new s.Deferred,c=e?p(e,h,d):p(t,h,d)+s.dimensions(t).width*n,l=t?p(t,h,d):c+s.dimensions(e).width*n*(s.isRtl?-1:1);return{dir:n,show(a,o,g){o===void 0&&(o=0);const m=g?"linear":r;return a-=Math.round(a*s.clamp(o,-1,1)),this.translate(o),o=e?o:s.clamp(o,0,1),u(this.getItemIn(),"itemin",{percent:o,duration:a,timing:m,dir:n}),e&&u(this.getItemIn(!0),"itemout",{percent:1-o,duration:a,timing:m,dir:n}),s.Transition.start(h,{transform:_(-l*(s.isRtl?-1:1),"px")},a,m).then(f.resolve,s.noop),f.promise},cancel(){s.Transition.cancel(h)},reset(){s.css(h,"transform","")},forward(a,o){return o===void 0&&(o=this.percent()),s.Transition.cancel(h),this.show(a,o,!0)},translate(a){const o=this.getDistance()*n*(s.isRtl?-1:1);s.css(h,"transform",_(s.clamp(-l+(o-o*a),-I(h),s.dimensions(h).width)*(s.isRtl?-1:1),"px"));const g=this.getActives(),m=this.getItemIn(),j=this.getItemIn(!0);a=e?s.clamp(a,-1,1):0;for(const x of s.children(h)){const M=s.includes(g,x),C=x===m,N=x===j,H=C||!N&&(M||n*(s.isRtl?-1:1)===-1^w(x,h)>w(e||t));u(x,"itemtranslate"+(H?"in":"out"),{dir:n,percent:N?1-a:C?a:M?1:0})}},percent(){return Math.abs((s.css(h,"transform").split(",")[4]*(s.isRtl?-1:1)+c)/(l-c))},getDistance(){return Math.abs(l-c)},getItemIn(a){a===void 0&&(a=!1);let o=this.getActives(),g=$(h,p(t||e,h,d));if(a){const m=o;o=g,g=m}return g[s.findIndex(g,m=>!s.includes(o,m))]},getActives(){return $(h,p(e||t,h,d))}}}function p(e,t,n){const i=w(e,t);return n?i-P(e,t):Math.min(i,A(t))}function A(e){return Math.max(0,I(e)-s.dimensions(e).width)}function I(e){return s.children(e).reduce((t,n)=>s.dimensions(n).width+t,0)}function P(e,t){return s.dimensions(t).width/2-s.dimensions(e).width/2}function w(e,t){return e&&(s.position(e).left+(s.isRtl?s.dimensions(e).width-s.dimensions(t).width:0))*(s.isRtl?-1:1)||0}function $(e,t){t-=1;const n=s.dimensions(e).width,i=t+n+2;return s.children(e).filter(d=>{const r=w(d,e),h=r+Math.min(s.dimensions(d).width,n);return r>=t&&h<=i})}function u(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var S={mixins:[v,O,L,z],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:B},computed:{avgWidth(){return I(this.list)/this.length},finite(e){let{finite:t}=e;return t||Math.ceil(I(this.list))<Math.floor(s.dimensions(this.list).width+V(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return s.last(this.sets);let e=0;const t=A(this.list),n=s.findIndex(this.slides,i=>{if(e>=t)return!0;e+=s.dimensions(i).width});return~n?n:this.length-1},sets(e){let{sets:t}=e;if(!t)return;const n=s.dimensions(this.list).width/(this.center?2:1);let i=0,d=n,r=0;return t=s.sortBy(this.slides,"offsetLeft").reduce((h,f,c)=>{const l=s.dimensions(f).width;if(r+l>i&&(!this.center&&c>this.maxIndex&&(c=this.maxIndex),!s.includes(h,c))){const o=this.slides[c+1];this.center&&o&&l<d-s.dimensions(o).width/2?d-=l:(d=n,h.push(c),i=r+n+(this.center?l/2:0))}return r+=l,h},[]),!s.isEmpty(t)&&t},transitionOptions(){return{center:this.center,list:this.list}}},connected(){s.toggleClass(this.$el,this.clsContainer,!s.$("."+this.clsContainer,this.$el))},update:{write(){for(const n of this.navItems){const i=s.toNumber(s.data(n,this.attrItem));i!==!1&&(n.hidden=!this.maxIndex||i>this.maxIndex||this.sets&&!s.includes(this.sets,i))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1));const e=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||s.includes(this.sets,s.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)s.toggleClass(n,t,s.includes(e,n))},events:["resize"]},events:{beforeitemshow(e){!this.dragging&&this.sets&&this.stack.length<2&&!s.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");e.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(s.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&s.addClass(this._getTransitioner().getItemIn(),this.clsActive)}},methods:{reorder(){if(this.finite){s.css(this.slides,"order","");return}const e=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((d,r)=>s.css(d,"order",this.dir>0&&r<e?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[e];let n=s.dimensions(this.list).width/2-s.dimensions(t).width/2,i=0;for(;n>0;){const d=this.getIndex(--i+e,e),r=this.slides[d];s.css(r,"order",d>e?-2:-1),n-=s.dimensions(r).width}},getValidIndex(e,t){if(e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),e=this.getIndex(e,t),!this.sets)return e;let n;do{if(s.includes(this.sets,e))return e;n=e,e=this.getIndex(e+this.dir,t)}while(e!==n);return e},getAdjacentSlides(){const{width:e}=s.dimensions(this.list),t=-e,n=e*2,i=s.dimensions(this.slides[this.index]).width,d=this.center?e/2-i/2:0,r=new Set;for(const h of[-1,1]){let f=d+(h>0?i:0),c=0;do{const l=this.slides[this.getIndex(this.index+h+c++*h)];f+=s.dimensions(l).width*h,r.add(l)}while(this.slides.length>c&&f>t&&f<n)}return Array.from(r)}}};function V(e){return Math.max(0,...s.children(e).map(t=>s.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",S),S});