uikit 3.15.23-dev.aeae9bcb1 → 3.15.23-dev.b2c6f9d01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/util.js +22 -24
- package/dist/css/uikit-core-rtl.css +1 -5
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -5
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -5
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -5
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +2 -2
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +2 -2
- package/dist/js/components/lightbox-panel.js +20 -67
- package/dist/js/components/lightbox-panel.min.js +2 -2
- package/dist/js/components/lightbox.js +20 -67
- package/dist/js/components/lightbox.min.js +2 -2
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +2 -2
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +2 -2
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +2 -2
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +2 -2
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +2 -2
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +2 -2
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +2 -2
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +2 -2
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +2 -2
- package/dist/js/uikit-core.js +19 -71
- package/dist/js/uikit-core.min.js +2 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +2 -2
- package/dist/js/uikit.js +20 -72
- package/dist/js/uikit.min.js +2 -2
- package/package.json +1 -1
- package/src/js/components/lightbox-panel.js +1 -2
- package/src/js/core/drop.js +8 -13
- package/src/js/mixin/modal.js +21 -70
- package/src/less/components/modal.less +0 -1
- package/src/less/components/offcanvas.less +0 -1
- package/src/less/components/utility.less +1 -5
- package/src/scss/components/modal.scss +0 -1
- package/src/scss/components/offcanvas.scss +0 -1
- package/src/scss/components/utility.scss +1 -5
- package/tests/dropdown.html +0 -1
- package/tests/navbar.html +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
2
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(r,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],m):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=m(r.UIkit.util))})(this,function(r){"use strict";var m={connected(){var e;this.registerObserver(r.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},R={connected(){B(this._uid,()=>this.$emit("scroll"))},disconnected(){_(this._uid)}};const y=new Map;let b;function B(e,t){b=b||r.on(window,"scroll",()=>y.forEach(n=>n()),{passive:!0,capture:!0}),y.set(e,t)}function _(e){y.delete(e),b&&!y.size&&(b(),b=null)}var V={props:{media:Boolean},data:{media:!1},connected(){const e=q(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function q(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,`--uk-breakpoint-${e.substr(1)}`));else if(isNaN(e))return e}return e&&r.isNumeric(e)?`(min-width: ${e}px)`:""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function H(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const v={x:M,y:M,rotate:M,scale:M,color:O,backgroundColor:O,borderColor:O,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:J,stroke:K,bgx:I,bgy:I},{keys:z}=Object;var A={mixins:[V],props:L(z(v),"list"),data:L(z(v),void 0),computed:{props(e,t){const n={};for(const a in e)a in v&&!r.isUndefined(e[a])&&(n[a]=e[a].slice());const o={};for(const a in n)o[a]=v[a](a,t,n[a],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t.willChange=Object.keys(t).filter(n=>t[n]!=="").join(","),t}}};function M(e,t,n){let o=j(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",a;return e==="x"||e==="y"?(e=`translate${r.ucfirst(e)}`,a=s=>r.toFloat(r.toFloat(s).toFixed(o==="px"?0:6))):e==="scale"&&(o="",a=s=>j([s])?r.toPx(s,"width",t,!0)/t.offsetWidth:s),n.length===1&&n.unshift(e==="scale"?1:0),n=g(n,a),(s,c)=>{s.transform+=` ${e}(${x(n,c)}${o})`}}function O(e,t,n){return n.length===1&&n.unshift($(t,e,"")),n=g(n,o=>G(t,o)),(o,a)=>{const[s,c,i]=E(n,a),d=s.map((u,f)=>(u+=i*(c[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]=`rgba(${d})`}}function G(e,t){return $(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=j(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=g(n),(a,s)=>{const c=x(n,s);a.filter+=` ${e}(${c+o})`}}function J(e,t,n){return n.length===1&&n.unshift($(t,e,"")),n=g(n),(o,a)=>{o[e]=x(n,a)}}function K(e,t,n){n.length===1&&n.unshift(0);const o=j(n),a=H(t);return n=g(n.reverse(),s=>(s=r.toFloat(s),o==="%"?s*a/100:s)),n.some(([s])=>s)?(r.css(t,"strokeDasharray",a),(s,c)=>{s.strokeDashoffset=x(n,c)}):r.noop}function I(e,t,n,o){n.length===1&&n.unshift(0);const a=e==="bgy"?"height":"width";o[e]=g(n,i=>r.toPx(i,a,t));const s=["bgx","bgy"].filter(i=>i in o);if(s.length===2&&e==="bgx")return r.noop;if($(t,"backgroundSize","")==="cover")return Q(e,t,n,o);const c={};for(const i of s)c[i]=p(t,i);return C(s,c,o)}function Q(e,t,n,o){const a=X(t);if(!a.width)return r.noop;const s={width:t.offsetWidth,height:t.offsetHeight},c=["bgx","bgy"].filter(f=>f in o),i={};for(const f of c){const h=o[f].map(([k])=>k),w=Math.min(...h),S=Math.max(...h),W=h.indexOf(w)<h.indexOf(S),D=S-w;i[f]=`${(W?-D:0)-(W?w:S)}px`,s[f==="bgy"?"height":"width"]+=D}const d=r.Dimensions.cover(a,s);for(const f of c){const h=f==="bgy"?"height":"width",w=d[h]-s[h];i[f]=`max(${p(t,f)},-${w}px) + ${i[f]}`}const u=C(c,i,o);return(f,h)=>{u(f,h),f.backgroundSize=`${d.width}px ${d.height}px`,f.backgroundRepeat="no-repeat"}}function p(e,t){return $(e,`background-position-${t.substr(-1)}`,"")}function C(e,t,n){return function(o,a){for(const s of e){const c=x(n[s],a);o[`background-position-${s.substr(-1)}`]=`calc(${t[s]} + ${c}px)`}}}const F={};function X(e){const t=r.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]=P(n),r.trigger(e,r.createEvent("load",!1))},P(n)):F[t]=P(n)}function P(e){return{width:e.naturalWidth,height:e.naturalHeight}}function g(e,t=r.toFloat){const n=[],{length:o}=e;let a=0;for(let s=0;s<o;s++){let[c,i]=r.isString(e[s])?e[s].trim().split(" "):[e[s]];if(c=t(c),i=i?r.toFloat(i)/100:null,s===0?i===null?i=0:i&&n.push([c,0]):s===o-1&&(i===null?i=1:i!==1&&(n.push([c,i]),i=1)),n.push([c,i]),i===null)a++;else if(a){const d=n[s-a-1][1],u=(i-d)/(a+1);for(let f=a;f>0;f--)n[s-f][1]=d+u*(a-f+1);a=0}}return n}function E(e,t){const n=r.findIndex(e.slice(1),([,o])=>t<=o)+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,a]=E(e,t);return r.isNumber(n)?n+Math.abs(n-o)*a*(n<o?1:-1):+o}const Y=/^-?\d+(\S+)?/;function j(e,t){for(const n of e){const o=n.match==null?void 0:n.match(Y);if(o)return o[1]}return t}function $(e,t,n){const o=e.style[t],a=r.css(r.css(e,t,n),t);return e.style[t]=o,a}function L(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var N={mixins:[A,m,R],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target({target:e},t){return T(e&&r.query(e,t)||t)},start({start:e}){return r.toPx(e,"height",this.target,!0)},end({end:e,viewport:t}){return r.toPx(e||(t=(1-t)*100)&&`${t}vh+${t}%`,"height",this.target,!0)}},resizeTargets(){return[this.$el,this.target]},update:{read({percent:e},t){if(t.has("scroll")||(e=!1),!r.isVisible(this.$el))return!1;if(!this.matchMedia)return;const n=e;return e=Z(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:e,style:n===e?!1:this.getCss(e)}},write({style:e}){if(!this.matchMedia){this.reset();return}e&&r.css(this.$el,e)},events:["scroll","resize"]}};function Z(e,t){return t>=0?Math.pow(e,t+1):1-Math.pow(1-e,1-t)}function T(e){return e?"offsetTop"in e?e:T(r.parent(e)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",N),N});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
2
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlider_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=E(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function E(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,`--uk-breakpoint-${e.substr(1)}`));else if(isNaN(e))return e}return e&&r.isNumeric(e)?`(min-width: ${e}px)`:""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function R(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:y,y,rotate:y,scale:y,color:j,backgroundColor:j,borderColor:j,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:H,stroke:L,bgx:v,bgy:v},{keys:P}=Object;var _={mixins:[g],props:W(P(w),"list"),data:W(P(w),void 0),computed:{props(e,t){const n={};for(const s in e)s in w&&!r.isUndefined(e[s])&&(n[s]=e[s].slice());const o={};for(const s in n)o[s]=w[s](s,t,n[s],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t.willChange=Object.keys(t).filter(n=>t[n]!=="").join(","),t}}};function y(e,t,n){let o=M(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",s;return e==="x"||e==="y"?(e=`translate${r.ucfirst(e)}`,s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):e==="scale"&&(o="",s=a=>M([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,s),(a,i)=>{a.transform+=` ${e}(${b(n,i)}${o})`}}function j(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n,o=>q(t,o)),(o,s)=>{const[a,i,c]=S(n,s),d=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]=`rgba(${d})`}}function q(e,t){return x(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=M(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(s,a)=>{const i=b(n,a);s.filter+=` ${e}(${i+o})`}}function H(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n),(o,s)=>{o[e]=b(n,s)}}function L(e,t,n){n.length===1&&n.unshift(0);const o=M(n),s=R(t);return n=m(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(([a])=>a)?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(n,i)}):r.noop}function v(e,t,n,o){n.length===1&&n.unshift(0);const s=e==="bgy"?"height":"width";o[e]=m(n,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return V(e,t,n,o);const i={};for(const c of a)i[c]=O(t,c);return p(a,i,o)}function V(e,t,n,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const h=o[f].map(([J])=>J),$=Math.min(...h),I=Math.max(...h),B=h.indexOf($)<h.indexOf(I),N=I-$;c[f]=`${(B?-N:0)-(B?$:I)}px`,a[f==="bgy"?"height":"width"]+=N}const d=r.Dimensions.cover(s,a);for(const f of i){const h=f==="bgy"?"height":"width",$=d[h]-a[h];c[f]=`max(${O(t,f)},-${$}px) + ${c[f]}`}const u=p(i,c,o);return(f,h)=>{u(f,h),f.backgroundSize=`${d.width}px ${d.height}px`,f.backgroundRepeat="no-repeat"}}function O(e,t){return x(e,`background-position-${t.substr(-1)}`,"")}function p(e,t,n){return function(o,s){for(const a of e){const i=b(n[a],s);o[`background-position-${a.substr(-1)}`]=`calc(${t[a]} + ${i}px)`}}}const F={};function A(e){const t=r.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]=C(n),r.trigger(e,r.createEvent("load",!1))},C(n)):F[t]=C(n)}function C(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t=r.toFloat){const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&n.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(n.push([i,c]),c=1)),n.push([i,c]),c===null)s++;else if(s){const d=n[a-s-1][1],u=(c-d)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=d+u*(s-f+1);s=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),([,o])=>t<=o)+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function b(e,t){const[n,o,s]=S(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const G=/^-?\d+(\S+)?/;function M(e,t){for(const n of e){const o=n.match==null?void 0:n.match(G);if(o)return o[1]}return t}function x(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function W(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var T={mixins:[_],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:e,detail:{percent:t,duration:n,timing:o,dir:s}}){r.fastdom.read(()=>{if(!this.matchMedia)return;const a=this.getCss(z(e,s,t)),i=this.getCss(D(e)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,a),r.Transition.start(this.$el,i,n,o).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:e,detail:{percent:t,dir:n}}){r.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(z(e,n,t));r.fastdom.write(()=>r.css(this.$el,o))})}}]};function D(e){return r.endsWith(e,"in")}function z(e,t,n){return n/=2,D(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",T),T});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
2
|
-
/*! UIkit 3.15.23-dev.aeae9bcb1 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],m):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider=m(s.UIkit.util))})(this,function(s){"use strict";var m={connected(){s.addClass(this.$el,this.$options.id)}},D={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},W={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)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},O="touchstart mousedown",b="touchmove mousemove",$="touchend touchcancel mouseup click input scroll";var E={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:O,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&B(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:b,el(){return this.list},handler:s.noop,...w}],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,b,this.move,w),s.on(document,$,this.end,A),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,h=Math.abs(t),r=this.getIndex(i+this.dir,i),c=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&h>c;)this.drag-=c*this.dir,i=r,h-=c,r=this.getIndex(i+this.dir,i),c=this._getDistance(i,r)||n[i].offsetWidth;this.percent=h/c;const a=n[i],l=n[r],o=this.index!==r,d=i===r;let g;[this.index,this.prevIndex].filter(f=>!s.includes([r,i],f)).forEach(f=>{s.trigger(n[f],"itemhidden",[this]),d&&(g=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||g)&&s.trigger(n[this.index],"itemshown",[this]),o&&(this.prevIndex=i,this.index=r,!d&&s.trigger(a,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!d&&l),o&&(!d&&s.trigger(a,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),s.off(document,$,this.end,A),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 B(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var V={data:{selNav:!1},computed:{nav({selNav:e},t){return s.$(e,t)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},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))}}}},j={mixins:[W,E,V,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},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({velocity:e},t){return _(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t=!1){if(this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,h=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){if(n.length===2){var r;(r=this._transitioner)==null||r.forward(Math.min(this.duration,200))}return}const c=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[c],l=this.getIndex(e,this.index),o=this.slides[l];if(a===o){h();return}if(this.dir=P(e,c),this.prevIndex=c,this.index=l,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(o,"beforeitemshow",[this,a])){this.index=this.prevIndex,h();return}const d=this._show(a,o,t).then(()=>{a&&s.trigger(a,"itemhidden",[this]),s.trigger(o,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&s.trigger(a,"itemhide",[this]),s.trigger(o,"itemshow",[this]),d},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return 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=this.prevIndex,n=this.index){const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(e),i},_getTransitioner(e=this.prevIndex,t=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),i)}}};function P(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function _(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):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},F={data:{preload:5},methods:{lazyload(e=this.$el,t=this.$el){this.registerObserver(s.observeIntersection(e,(n,i)=>{for(const h of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',h).slice(0,this.preload-1).forEach(r=>s.removeAttr(r,"loading"));for(const h of n.filter(({isIntersecting:r})=>r).map(({target:r})=>r))i.unobserve(h)}))}}},H={mixins:[F],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function M(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function q(e,t,n,{center:i,easing:h,list:r}){const c=new s.Deferred,a=e?p(e,r,i):p(t,r,i)+s.dimensions(t).width*n,l=t?p(t,r,i):a+s.dimensions(e).width*n*(s.isRtl?-1:1);return{dir:n,show(o,d=0,g){const f=g?"linear":h;return o-=Math.round(o*s.clamp(d,-1,1)),this.translate(d),d=e?d:s.clamp(d,0,1),y(this.getItemIn(),"itemin",{percent:d,duration:o,timing:f,dir:n}),e&&y(this.getItemIn(!0),"itemout",{percent:1-d,duration:o,timing:f,dir:n}),s.Transition.start(r,{transform:M(-l*(s.isRtl?-1:1),"px")},o,f).then(c.resolve,s.noop),c.promise},cancel(){s.Transition.cancel(r)},reset(){s.css(r,"transform","")},forward(o,d=this.percent()){return s.Transition.cancel(r),this.show(o,d,!0)},translate(o){const d=this.getDistance()*n*(s.isRtl?-1:1);s.css(r,"transform",M(s.clamp(-l+(d-d*o),-I(r),s.dimensions(r).width)*(s.isRtl?-1:1),"px"));const g=this.getActives(),f=this.getItemIn(),v=this.getItemIn(!0);o=e?s.clamp(o,-1,1):0;for(const x of s.children(r)){const T=s.includes(g,x),R=x===f,z=x===v,Q=R||!z&&(T||n*(s.isRtl?-1:1)===-1^u(x,r)>u(e||t));y(x,`itemtranslate${Q?"in":"out"}`,{dir:n,percent:z?1-o:R?o:T?1:0})}},percent(){return Math.abs((s.css(r,"transform").split(",")[4]*(s.isRtl?-1:1)+a)/(l-a))},getDistance(){return Math.abs(l-a)},getItemIn(o=!1){let d=this.getActives(),g=N(r,p(t||e,r,i));if(o){const f=d;d=g,g=f}return g[s.findIndex(g,f=>!s.includes(d,f))]},getActives(){return N(r,p(e||t,r,i))}}}function p(e,t,n){const i=u(e,t);return n?i-G(e,t):Math.min(i,C(t))}function C(e){return Math.max(0,I(e)-s.dimensions(e).width)}function I(e){return s.sumBy(s.children(e),t=>s.dimensions(t).width)}function G(e,t){return s.dimensions(t).width/2-s.dimensions(e).width/2}function u(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 N(e,t){t-=1;const n=s.dimensions(e).width,i=t+n+2;return s.children(e).filter(h=>{const r=u(h,e),c=r+Math.min(s.dimensions(h).width,n);return r>=t&&c<=i})}function y(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var S={mixins:[m,j,L,H],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:q},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:e}){return e||J(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=C(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({sets:e}){if(!e)return;let t=0;const n=[],i=s.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=s.dimensions(this.slides[h]).width;t+r>i&&(t=0),this.center?t<i/2&&t+r+s.dimensions(this.slides[+h+1]).width/2>i/2&&(n.push(+h),t=i/2-r/2):t===0&&n.push(Math.min(+h,this.maxIndex)),t+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}}},connected(){s.toggleClass(this.$el,this.clsContainer,!s.$(`.${this.clsContainer}`,this.$el))},update:{write(){for(const e of this.navItems){const t=s.toNumber(s.data(e,this.attrItem));t!==!1&&(e.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!s.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},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=_(this.avgWidth/this.velocity)*(s.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&s.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},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((h,r)=>s.css(h,"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 h=this.getIndex(--i+e,e),r=this.slides[h];s.css(r,"order",h>e?-2:-1),n-=s.dimensions(r).width}},updateActiveClasses(){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))},getValidIndex(e=this.index,t=this.prevIndex){if(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,h=this.center?e/2-i/2:0,r=new Set;for(const c of[-1,1]){let a=h+(c>0?i:0),l=0;do{const o=this.slides[this.getIndex(this.index+c+l++*c)];a+=s.dimensions(o).width*c,r.add(o)}while(this.length>l&&a>t&&a<n)}return Array.from(r)}}};function J(e,t){if(!e||e.length<2)return!0;const{width:n}=s.dimensions(e);if(!t)return Math.ceil(I(e))<Math.trunc(n+K(e));const i=s.children(e),h=Math.trunc(n/2);for(const r in i){const c=i[r],a=s.dimensions(c).width,l=new Set([c]);let o=0;for(const d of[-1,1]){let g=a/2,f=0;for(;g<h;){const v=i[s.getIndex(+r+d+f++*d,i)];if(l.has(v))return!0;g+=s.dimensions(v).width,l.add(v)}o=Math.max(o,a/2+s.dimensions(i[s.getIndex(+r+d,i)]).width/2-(g-h))}if(o>s.sumBy(i.filter(d=>!l.has(d)),d=>s.dimensions(d).width))return!0}return!1}function K(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});
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],m):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider=m(s.UIkit.util))})(this,function(s){"use strict";var m={connected(){s.addClass(this.$el,this.$options.id)}},D={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},W={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)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},O="touchstart mousedown",b="touchmove mousemove",$="touchend touchcancel mouseup click input scroll";var E={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:O,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&B(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:b,el(){return this.list},handler:s.noop,...w}],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,b,this.move,w),s.on(document,$,this.end,A),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,h=Math.abs(t),r=this.getIndex(i+this.dir,i),c=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&h>c;)this.drag-=c*this.dir,i=r,h-=c,r=this.getIndex(i+this.dir,i),c=this._getDistance(i,r)||n[i].offsetWidth;this.percent=h/c;const a=n[i],l=n[r],o=this.index!==r,d=i===r;let g;[this.index,this.prevIndex].filter(f=>!s.includes([r,i],f)).forEach(f=>{s.trigger(n[f],"itemhidden",[this]),d&&(g=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||g)&&s.trigger(n[this.index],"itemshown",[this]),o&&(this.prevIndex=i,this.index=r,!d&&s.trigger(a,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!d&&l),o&&(!d&&s.trigger(a,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),s.off(document,$,this.end,A),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 B(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var V={data:{selNav:!1},computed:{nav({selNav:e},t){return s.$(e,t)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},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))}}}},j={mixins:[W,E,V,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},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({velocity:e},t){return _(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t=!1){if(this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,h=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){if(n.length===2){var r;(r=this._transitioner)==null||r.forward(Math.min(this.duration,200))}return}const c=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[c],l=this.getIndex(e,this.index),o=this.slides[l];if(a===o){h();return}if(this.dir=P(e,c),this.prevIndex=c,this.index=l,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(o,"beforeitemshow",[this,a])){this.index=this.prevIndex,h();return}const d=this._show(a,o,t).then(()=>{a&&s.trigger(a,"itemhidden",[this]),s.trigger(o,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&s.trigger(a,"itemhide",[this]),s.trigger(o,"itemshow",[this]),d},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return 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=this.prevIndex,n=this.index){const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(e),i},_getTransitioner(e=this.prevIndex,t=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),i)}}};function P(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function _(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):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},F={data:{preload:5},methods:{lazyload(e=this.$el,t=this.$el){this.registerObserver(s.observeIntersection(e,(n,i)=>{for(const h of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',h).slice(0,this.preload-1).forEach(r=>s.removeAttr(r,"loading"));for(const h of n.filter(({isIntersecting:r})=>r).map(({target:r})=>r))i.unobserve(h)}))}}},H={mixins:[F],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function M(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function q(e,t,n,{center:i,easing:h,list:r}){const c=new s.Deferred,a=e?p(e,r,i):p(t,r,i)+s.dimensions(t).width*n,l=t?p(t,r,i):a+s.dimensions(e).width*n*(s.isRtl?-1:1);return{dir:n,show(o,d=0,g){const f=g?"linear":h;return o-=Math.round(o*s.clamp(d,-1,1)),this.translate(d),d=e?d:s.clamp(d,0,1),y(this.getItemIn(),"itemin",{percent:d,duration:o,timing:f,dir:n}),e&&y(this.getItemIn(!0),"itemout",{percent:1-d,duration:o,timing:f,dir:n}),s.Transition.start(r,{transform:M(-l*(s.isRtl?-1:1),"px")},o,f).then(c.resolve,s.noop),c.promise},cancel(){s.Transition.cancel(r)},reset(){s.css(r,"transform","")},forward(o,d=this.percent()){return s.Transition.cancel(r),this.show(o,d,!0)},translate(o){const d=this.getDistance()*n*(s.isRtl?-1:1);s.css(r,"transform",M(s.clamp(-l+(d-d*o),-I(r),s.dimensions(r).width)*(s.isRtl?-1:1),"px"));const g=this.getActives(),f=this.getItemIn(),v=this.getItemIn(!0);o=e?s.clamp(o,-1,1):0;for(const x of s.children(r)){const T=s.includes(g,x),R=x===f,z=x===v,Q=R||!z&&(T||n*(s.isRtl?-1:1)===-1^u(x,r)>u(e||t));y(x,`itemtranslate${Q?"in":"out"}`,{dir:n,percent:z?1-o:R?o:T?1:0})}},percent(){return Math.abs((s.css(r,"transform").split(",")[4]*(s.isRtl?-1:1)+a)/(l-a))},getDistance(){return Math.abs(l-a)},getItemIn(o=!1){let d=this.getActives(),g=N(r,p(t||e,r,i));if(o){const f=d;d=g,g=f}return g[s.findIndex(g,f=>!s.includes(d,f))]},getActives(){return N(r,p(e||t,r,i))}}}function p(e,t,n){const i=u(e,t);return n?i-G(e,t):Math.min(i,C(t))}function C(e){return Math.max(0,I(e)-s.dimensions(e).width)}function I(e){return s.sumBy(s.children(e),t=>s.dimensions(t).width)}function G(e,t){return s.dimensions(t).width/2-s.dimensions(e).width/2}function u(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 N(e,t){t-=1;const n=s.dimensions(e).width,i=t+n+2;return s.children(e).filter(h=>{const r=u(h,e),c=r+Math.min(s.dimensions(h).width,n);return r>=t&&c<=i})}function y(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var S={mixins:[m,j,L,H],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:q},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:e}){return e||J(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=C(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({sets:e}){if(!e)return;let t=0;const n=[],i=s.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=s.dimensions(this.slides[h]).width;t+r>i&&(t=0),this.center?t<i/2&&t+r+s.dimensions(this.slides[+h+1]).width/2>i/2&&(n.push(+h),t=i/2-r/2):t===0&&n.push(Math.min(+h,this.maxIndex)),t+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}}},connected(){s.toggleClass(this.$el,this.clsContainer,!s.$(`.${this.clsContainer}`,this.$el))},update:{write(){for(const e of this.navItems){const t=s.toNumber(s.data(e,this.attrItem));t!==!1&&(e.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!s.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},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=_(this.avgWidth/this.velocity)*(s.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&s.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},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((h,r)=>s.css(h,"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 h=this.getIndex(--i+e,e),r=this.slides[h];s.css(r,"order",h>e?-2:-1),n-=s.dimensions(r).width}},updateActiveClasses(){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))},getValidIndex(e=this.index,t=this.prevIndex){if(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,h=this.center?e/2-i/2:0,r=new Set;for(const c of[-1,1]){let a=h+(c>0?i:0),l=0;do{const o=this.slides[this.getIndex(this.index+c+l++*c)];a+=s.dimensions(o).width*c,r.add(o)}while(this.length>l&&a>t&&a<n)}return Array.from(r)}}};function J(e,t){if(!e||e.length<2)return!0;const{width:n}=s.dimensions(e);if(!t)return Math.ceil(I(e))<Math.trunc(n+K(e));const i=s.children(e),h=Math.trunc(n/2);for(const r in i){const c=i[r],a=s.dimensions(c).width,l=new Set([c]);let o=0;for(const d of[-1,1]){let g=a/2,f=0;for(;g<h;){const v=i[s.getIndex(+r+d+f++*d,i)];if(l.has(v))return!0;g+=s.dimensions(v).width,l.add(v)}o=Math.max(o,a/2+s.dimensions(i[s.getIndex(+r+d,i)]).width/2-(g-h))}if(o>s.sumBy(i.filter(d=>!l.has(d)),d=>s.dimensions(d).width))return!0}return!1}function K(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});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
2
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlideshow_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=E(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function E(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,`--uk-breakpoint-${e.substr(1)}`));else if(isNaN(e))return e}return e&&r.isNumeric(e)?`(min-width: ${e}px)`:""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function R(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:y,y,rotate:y,scale:y,color:j,backgroundColor:j,borderColor:j,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:H,stroke:L,bgx:v,bgy:v},{keys:P}=Object;var _={mixins:[g],props:W(P(w),"list"),data:W(P(w),void 0),computed:{props(e,t){const n={};for(const s in e)s in w&&!r.isUndefined(e[s])&&(n[s]=e[s].slice());const o={};for(const s in n)o[s]=w[s](s,t,n[s],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t.willChange=Object.keys(t).filter(n=>t[n]!=="").join(","),t}}};function y(e,t,n){let o=M(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",s;return e==="x"||e==="y"?(e=`translate${r.ucfirst(e)}`,s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):e==="scale"&&(o="",s=a=>M([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,s),(a,i)=>{a.transform+=` ${e}(${b(n,i)}${o})`}}function j(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n,o=>q(t,o)),(o,s)=>{const[a,i,c]=S(n,s),d=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]=`rgba(${d})`}}function q(e,t){return x(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=M(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(s,a)=>{const i=b(n,a);s.filter+=` ${e}(${i+o})`}}function H(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n),(o,s)=>{o[e]=b(n,s)}}function L(e,t,n){n.length===1&&n.unshift(0);const o=M(n),s=R(t);return n=m(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(([a])=>a)?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(n,i)}):r.noop}function v(e,t,n,o){n.length===1&&n.unshift(0);const s=e==="bgy"?"height":"width";o[e]=m(n,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return V(e,t,n,o);const i={};for(const c of a)i[c]=O(t,c);return p(a,i,o)}function V(e,t,n,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const h=o[f].map(([J])=>J),$=Math.min(...h),I=Math.max(...h),B=h.indexOf($)<h.indexOf(I),N=I-$;c[f]=`${(B?-N:0)-(B?$:I)}px`,a[f==="bgy"?"height":"width"]+=N}const d=r.Dimensions.cover(s,a);for(const f of i){const h=f==="bgy"?"height":"width",$=d[h]-a[h];c[f]=`max(${O(t,f)},-${$}px) + ${c[f]}`}const u=p(i,c,o);return(f,h)=>{u(f,h),f.backgroundSize=`${d.width}px ${d.height}px`,f.backgroundRepeat="no-repeat"}}function O(e,t){return x(e,`background-position-${t.substr(-1)}`,"")}function p(e,t,n){return function(o,s){for(const a of e){const i=b(n[a],s);o[`background-position-${a.substr(-1)}`]=`calc(${t[a]} + ${i}px)`}}}const F={};function A(e){const t=r.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]=C(n),r.trigger(e,r.createEvent("load",!1))},C(n)):F[t]=C(n)}function C(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t=r.toFloat){const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&n.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(n.push([i,c]),c=1)),n.push([i,c]),c===null)s++;else if(s){const d=n[a-s-1][1],u=(c-d)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=d+u*(s-f+1);s=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),([,o])=>t<=o)+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function b(e,t){const[n,o,s]=S(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const G=/^-?\d+(\S+)?/;function M(e,t){for(const n of e){const o=n.match==null?void 0:n.match(G);if(o)return o[1]}return t}function x(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function W(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var T={mixins:[_],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:e,detail:{percent:t,duration:n,timing:o,dir:s}}){r.fastdom.read(()=>{if(!this.matchMedia)return;const a=this.getCss(z(e,s,t)),i=this.getCss(D(e)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,a),r.Transition.start(this.$el,i,n,o).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:e,detail:{percent:t,dir:n}}){r.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(z(e,n,t));r.fastdom.write(()=>r.css(this.$el,o))})}}]};function D(e){return r.endsWith(e,"in")}function z(e,t,n){return n/=2,D(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",T),T});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
2
|
-
/*! UIkit 3.15.23-dev.aeae9bcb1 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=g(s.UIkit.util))})(this,function(s){"use strict";var g={connected(){s.addClass(this.$el,this.$options.id)}},b={slide:{show(e){return[{transform:h(e*-100)},{transform:h()}]},percent(e){return f(e)},translate(e,t){return[{transform:h(t*-100*e)},{transform:h(t*100*(1-e))}]}}};function f(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function h(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function z(e){return`scale3d(${e}, ${e}, 1)`}function _(e,t,n,{animation:r,easing:d}){const{percent:i,translate:l,show:o=s.noop}=r,p=o(n),m=new s.Deferred;return{dir:n,show(a,c=0,u){const x=u?"linear":d;return a-=Math.round(a*s.clamp(c,-1,1)),this.translate(c),v(t,"itemin",{percent:c,duration:a,timing:x,dir:n}),v(e,"itemout",{percent:1-c,duration:a,timing:x,dir:n}),Promise.all([s.Transition.start(t,p[1],a,x),s.Transition.start(e,p[0],a,x)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const a in p[0])s.css([t,e],a,"")},forward(a,c=this.percent()){return s.Transition.cancel([t,e]),this.show(a,c,!0)},translate(a){this.reset();const c=l(a,n);s.css(t,c[1]),s.css(e,c[0]),v(t,"itemtranslatein",{percent:a,dir:n}),v(e,"itemtranslateout",{percent:1-a,dir:n})},percent(){return i(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function v(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var N={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},S={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)}}};const I={passive:!1,capture:!0},y={passive:!0,capture:!0},T="touchstart mousedown",w="touchmove mousemove",$="touchend touchcancel mouseup click input scroll";var D={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const r=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,t(n)}}},events:[{name:T,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&C(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:w,el(){return this.list},handler:s.noop,...I}],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,w,this.move,I),s.on(document,$,this.end,y),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:r}=this,d=Math.abs(t),i=this.getIndex(r+this.dir,r),l=this._getDistance(r,i)||n[r].offsetWidth;for(;i!==r&&d>l;)this.drag-=l*this.dir,r=i,d-=l,i=this.getIndex(r+this.dir,r),l=this._getDistance(r,i)||n[r].offsetWidth;this.percent=d/l;const o=n[r],p=n[i],m=this.index!==i,a=r===i;let c;[this.index,this.prevIndex].filter(u=>!s.includes([i,r],u)).forEach(u=>{s.trigger(n[u],"itemhidden",[this]),a&&(c=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||c)&&s.trigger(n[this.index],"itemshown",[this]),m&&(this.prevIndex=r,this.index=i,!a&&s.trigger(o,"beforeitemhide",[this]),s.trigger(p,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!a&&p),m&&(!a&&s.trigger(o,"itemhide",[this]),s.trigger(p,"itemshow",[this]))},end(){if(s.off(document,w,this.move,I),s.off(document,$,this.end,y),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 C(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var H={data:{selNav:!1},computed:{nav({selNav:e},t){return s.$(e,t)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},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))}}}},M={mixins:[S,D,H,N],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},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({velocity:e},t){return P(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t=!1){if(this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,d=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){if(n.length===2){var i;(i=this._transitioner)==null||i.forward(Math.min(this.duration,200))}return}const l=this.getIndex(this.index),o=s.hasClass(this.slides,this.clsActive)&&this.slides[l],p=this.getIndex(e,this.index),m=this.slides[p];if(o===m){d();return}if(this.dir=O(e,l),this.prevIndex=l,this.index=p,o&&!s.trigger(o,"beforeitemhide",[this])||!s.trigger(m,"beforeitemshow",[this,o])){this.index=this.prevIndex,d();return}const a=this._show(o,m,t).then(()=>{o&&s.trigger(o,"itemhidden",[this]),s.trigger(m,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return o&&s.trigger(o,"itemhide",[this]),s.trigger(m,"itemshow",[this]),a},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return 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:r}=this.stack;return this._transitioner[r>1?"forward":"show"](r>1?Math.min(this.duration,75+75/(r-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t=this.prevIndex,n=this.index){const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e=this.prevIndex,t=this.index,n=this.dir||1,r=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),r)}}};function O(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function P(e){return .5*e+300}var E={mixins:[M],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:b,Transitioner:_},computed:{animation({animation:e,Animations:t}){return{...t[e]||t.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){s.addClass(e,this.clsActive)},itemshown({target:e}){s.addClass(e,this.clsActivated)},itemhidden({target:e}){s.removeClass(e,this.clsActive,this.clsActivated)}}},R={...b,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:z(1+.5*e),zIndex:0},{zIndex:-1}]}},pull:{show(e){return e<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent(e,t,n){return n<0?1-f(t):f(e)},translate(e,t){return t<0?[{transform:h(30*e),zIndex:-1},{transform:h(-100*(1-e)),zIndex:0}]:[{transform:h(-e*100),zIndex:0},{transform:h(30*(1-e)),zIndex:-1}]}},push:{show(e){return e<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent(e,t,n){return n>0?1-f(t):f(e)},translate(e,t){return t<0?[{transform:h(e*100),zIndex:0},{transform:h(-30*(1-e)),zIndex:-1}]:[{transform:h(-30*e),zIndex:-1},{transform:h(100*(1-e)),zIndex:0}]}}},W={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);!~this.prevIndex||this.index!==e?this.show(e):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},j={data:{preload:5},methods:{lazyload(e=this.$el,t=this.$el){this.registerObserver(s.observeIntersection(e,(n,r)=>{for(const d of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',d).slice(0,this.preload-1).forEach(i=>s.removeAttr(i,"loading"));for(const d of n.filter(({isIntersecting:i})=>i).map(({target:i})=>i))r.unobserve(d)}))}}},B={mixins:[j],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}},A={mixins:[g,E,W,B],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:R},update:{read(){if(!this.list)return!1;let[e,t]=this.ratio.split(":").map(Number);return t=t*this.list.offsetWidth/e||0,this.minHeight&&(t=Math.max(this.minHeight,t)),this.maxHeight&&(t=Math.min(this.maxHeight,t)),{height:t-s.boxModelAdjust(this.list,"height","content-box")}},write({height:e}){e>0&&s.css(this.list,"minHeight",e)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(e=>this.slides[this.getIndex(this.index+e)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",A),A});
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=g(s.UIkit.util))})(this,function(s){"use strict";var g={connected(){s.addClass(this.$el,this.$options.id)}},b={slide:{show(e){return[{transform:h(e*-100)},{transform:h()}]},percent(e){return f(e)},translate(e,t){return[{transform:h(t*-100*e)},{transform:h(t*100*(1-e))}]}}};function f(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function h(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function z(e){return`scale3d(${e}, ${e}, 1)`}function _(e,t,n,{animation:r,easing:d}){const{percent:i,translate:l,show:o=s.noop}=r,p=o(n),m=new s.Deferred;return{dir:n,show(a,c=0,u){const x=u?"linear":d;return a-=Math.round(a*s.clamp(c,-1,1)),this.translate(c),v(t,"itemin",{percent:c,duration:a,timing:x,dir:n}),v(e,"itemout",{percent:1-c,duration:a,timing:x,dir:n}),Promise.all([s.Transition.start(t,p[1],a,x),s.Transition.start(e,p[0],a,x)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const a in p[0])s.css([t,e],a,"")},forward(a,c=this.percent()){return s.Transition.cancel([t,e]),this.show(a,c,!0)},translate(a){this.reset();const c=l(a,n);s.css(t,c[1]),s.css(e,c[0]),v(t,"itemtranslatein",{percent:a,dir:n}),v(e,"itemtranslateout",{percent:1-a,dir:n})},percent(){return i(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function v(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var N={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},S={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)}}};const I={passive:!1,capture:!0},y={passive:!0,capture:!0},T="touchstart mousedown",w="touchmove mousemove",$="touchend touchcancel mouseup click input scroll";var D={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const r=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,t(n)}}},events:[{name:T,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&C(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:w,el(){return this.list},handler:s.noop,...I}],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,w,this.move,I),s.on(document,$,this.end,y),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:r}=this,d=Math.abs(t),i=this.getIndex(r+this.dir,r),l=this._getDistance(r,i)||n[r].offsetWidth;for(;i!==r&&d>l;)this.drag-=l*this.dir,r=i,d-=l,i=this.getIndex(r+this.dir,r),l=this._getDistance(r,i)||n[r].offsetWidth;this.percent=d/l;const o=n[r],p=n[i],m=this.index!==i,a=r===i;let c;[this.index,this.prevIndex].filter(u=>!s.includes([i,r],u)).forEach(u=>{s.trigger(n[u],"itemhidden",[this]),a&&(c=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||c)&&s.trigger(n[this.index],"itemshown",[this]),m&&(this.prevIndex=r,this.index=i,!a&&s.trigger(o,"beforeitemhide",[this]),s.trigger(p,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!a&&p),m&&(!a&&s.trigger(o,"itemhide",[this]),s.trigger(p,"itemshow",[this]))},end(){if(s.off(document,w,this.move,I),s.off(document,$,this.end,y),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 C(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var H={data:{selNav:!1},computed:{nav({selNav:e},t){return s.$(e,t)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},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))}}}},M={mixins:[S,D,H,N],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},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({velocity:e},t){return P(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t=!1){if(this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,d=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){if(n.length===2){var i;(i=this._transitioner)==null||i.forward(Math.min(this.duration,200))}return}const l=this.getIndex(this.index),o=s.hasClass(this.slides,this.clsActive)&&this.slides[l],p=this.getIndex(e,this.index),m=this.slides[p];if(o===m){d();return}if(this.dir=O(e,l),this.prevIndex=l,this.index=p,o&&!s.trigger(o,"beforeitemhide",[this])||!s.trigger(m,"beforeitemshow",[this,o])){this.index=this.prevIndex,d();return}const a=this._show(o,m,t).then(()=>{o&&s.trigger(o,"itemhidden",[this]),s.trigger(m,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return o&&s.trigger(o,"itemhide",[this]),s.trigger(m,"itemshow",[this]),a},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return 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:r}=this.stack;return this._transitioner[r>1?"forward":"show"](r>1?Math.min(this.duration,75+75/(r-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t=this.prevIndex,n=this.index){const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e=this.prevIndex,t=this.index,n=this.dir||1,r=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),r)}}};function O(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function P(e){return .5*e+300}var E={mixins:[M],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:b,Transitioner:_},computed:{animation({animation:e,Animations:t}){return{...t[e]||t.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){s.addClass(e,this.clsActive)},itemshown({target:e}){s.addClass(e,this.clsActivated)},itemhidden({target:e}){s.removeClass(e,this.clsActive,this.clsActivated)}}},R={...b,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:z(1+.5*e),zIndex:0},{zIndex:-1}]}},pull:{show(e){return e<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent(e,t,n){return n<0?1-f(t):f(e)},translate(e,t){return t<0?[{transform:h(30*e),zIndex:-1},{transform:h(-100*(1-e)),zIndex:0}]:[{transform:h(-e*100),zIndex:0},{transform:h(30*(1-e)),zIndex:-1}]}},push:{show(e){return e<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent(e,t,n){return n>0?1-f(t):f(e)},translate(e,t){return t<0?[{transform:h(e*100),zIndex:0},{transform:h(-30*(1-e)),zIndex:-1}]:[{transform:h(-30*e),zIndex:-1},{transform:h(100*(1-e)),zIndex:0}]}}},W={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);!~this.prevIndex||this.index!==e?this.show(e):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},j={data:{preload:5},methods:{lazyload(e=this.$el,t=this.$el){this.registerObserver(s.observeIntersection(e,(n,r)=>{for(const d of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',d).slice(0,this.preload-1).forEach(i=>s.removeAttr(i,"loading"));for(const d of n.filter(({isIntersecting:i})=>i).map(({target:i})=>i))r.unobserve(d)}))}}},B={mixins:[j],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}},A={mixins:[g,E,W,B],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:R},update:{read(){if(!this.list)return!1;let[e,t]=this.ratio.split(":").map(Number);return t=t*this.list.offsetWidth/e||0,this.minHeight&&(t=Math.max(this.minHeight,t)),this.maxHeight&&(t=Math.min(this.maxHeight,t)),{height:t-s.boxModelAdjust(this.list,"height","content-box")}},write({height:e}){e>0&&s.css(this.list,"minHeight",e)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(e=>this.slides[this.getIndex(this.index+e)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",A),A});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
2
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return F(n,"top","bottom")}function F(n,s,o){const t=[[]];for(const c of n){if(!e.isVisible(c))continue;let a=b(c);for(let r=t.length-1;r>=0;r--){const h=t[r];if(!h[0]){h.push(c);break}let d;if(h[0].offsetParent===c.offsetParent?d=b(h[0]):(a=b(c,!0),d=b(h[0],!0)),a[s]>=d[o]-1&&a[s]!==d[s]){t.push([c]);break}if(a[o]-1>d[s]||a[s]===d[s]){h.push(c);break}if(r===0){t.unshift([c]);break}}}return t}function b(n,s=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:c,offsetWidth:a}=n;return s&&([o,t]=e.offsetPosition(n)),{top:o,left:t,bottom:o+c,right:t+a}}const u="uk-transition-leave",y="uk-transition-enter";function v(n,s,o,t=0){const c=w(s,!0),a={opacity:1},r={opacity:0},h=p=>()=>c===w(s)?p():Promise.reject(),d=h(async()=>{e.addClass(s,u),await Promise.all(C(s).map((p,l)=>new Promise(f=>setTimeout(()=>e.Transition.start(p,r,o/2,"ease").then(f),l*t)))),e.removeClass(s,u)}),i=h(async()=>{const p=e.height(s);e.addClass(s,y),n(),e.css(e.children(s),{opacity:0}),await B();const l=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,p);const m=C(s);e.css(l,r);const E=m.map(async(G,J)=>{await N(J*t),await e.Transition.start(G,a,o/2,"ease")});p!==f&&E.push(e.Transition.start(s,{height:f},o/2+m.length*t,"ease")),await Promise.all(E).then(()=>{e.removeClass(s,y),c===w(s)&&(e.css(s,{height:"",alignContent:""}),e.css(l,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,u)?T(s).then(i):e.hasClass(s,y)?T(s).then(d).then(i):d().then(i)}function w(n,s){return s&&(n.dataset.transition=1+w(n)),e.toNumber(n.dataset.transition)||0}function T(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function C(n){return g(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(t=>e.isInView(t)),"offsetLeft")),[])}function B(){return new Promise(n=>requestAnimationFrame(n))}function N(n){return new Promise(s=>setTimeout(s,n))}async function R(n,s,o){await x();let t=e.children(s);const c=t.map(f=>P(f,!0)),a={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),n(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,i]=A(s,t,c),p=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>i[m]&&e.css(f,i[m])),e.css(s,a),await x();const l=t.map((f,m)=>e.parent(f)===s&&e.Transition.start(f,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));try{await Promise.all(l),t.forEach((f,m)=>{e.attr(f,p[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),H(s,a)}}function P(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?{display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o,...S(n)}:!1}function A(n,s,o){const t=s.map((a,r)=>e.parent(a)&&r in o?o[r]?e.isVisible(a)?S(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===n&&(o[r]||P(s[r]));if(!h)return!1;if(!a)delete h.opacity;else if(!("opacity"in a)){const{opacity:d}=h;d%1?a.opacity=1:delete h.opacity}return h});return[t,c]}function H(n,s){for(const o in s)e.css(n,o,"")}function S(n){const{height:s,width:o}=e.offset(n);return{height:s,width:o,transform:"",...e.position(n),...e.css(n,["marginTop","marginLeft"])}}function x(){return new Promise(n=>requestAnimationFrame(n))}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s=this.$el){const o=this.animation;return(o==="fade"?v:o==="delayed-fade"?(...c)=>v(...c,40):o?R:()=>(n(),Promise.resolve()))(n,s,this.duration).catch(e.noop)}}},L={connected(){e.addClass(this.$el,this.$options.id)}},I={mixins:[L,z],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty:{get(){return e.isEmpty(this.items)},watch(n){e.toggleClass(this.target,this.clsEmpty,n)},immediate:!0},handles:{get({handle:n},s){return n?e.$$(n,s):this.items},watch(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:o-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,o));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=W(h,{x:s,y:o});if(h.length&&(!d||d===a))return;const i=this.getSortable(a),p=j(r.target,d,a,s,o,r===i&&n.moved!==d);p!==!1&&(p&&a===p||(r!==i?(i.remove(a),n.moved=d):delete n.moved,r.insert(a,p),this.touched.add(r)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:t}=n,[c]=this.items.filter(a=>e.within(s,a));!c||t||o>0||e.isInput(s)||e.within(s,`.${this.clsNoDrag}`)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:s,index:e.index(c),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=q(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),V(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;M();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){e.within(n,this.target)&&this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let $;function V(n){let s=Date.now();$=setInterval(()=>{let{x:o,y:t}=n;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:i,height:p}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(i>t&&i-35<t)r+=c;else return;if(r>0&&r<h-p)return a.scrollTop=r,!0})},15)}function M(){clearInterval($)}function q(n,s){let o;if(e.isTag(s,"li","tr")){o=e.$("<div>"),e.append(o,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(o,t,s.getAttribute(t))}else o=s.cloneNode(!0);return e.append(n,o),e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function W(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function j(n,s,o,t,c,a){if(!e.children(n).length)return;const r=s.getBoundingClientRect();if(!a)return O(n,o)||c<r.top+r.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=D([r.top,r.bottom],[h.top,h.bottom]),i=d?t:c,p=d?"width":"height",l=d?"left":"top",f=d?"right":"bottom",m=h[p]<r[p]?r[p]-h[p]:0;return h[l]<r[l]?m&&i<r[l]+m?!1:s.nextElementSibling:m&&i>r[f]-m?!1:s}function O(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const t=e.children(n),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const i=d.getBoundingClientRect();return!D([h.left,h.right],[i.left,i.right])})});return o&&e.remove(s),c}function D(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",I),I});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
2
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=g(s.UIkit.util))})(this,function(s){"use strict";var g={props:{container:Boolean},data:{container:!0},computed:{container({container:o}){return o===!0&&this.$container||o&&s.$(o)}}},E={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:o}){return!!o[0]},hasTransition({animation:o}){return["slide","reveal"].some(t=>s.startsWith(o[0],t))}},methods:{toggleElement(o,t,e){return new Promise(n=>Promise.all(s.toNodes(o).map(r=>{const i=s.isBoolean(t)?t:!this.isToggled(r);if(!s.trigger(r,`before${i?"show":"hide"}`,[this]))return Promise.reject();const a=(s.isFunction(e)?e:e===!1||!this.hasAnimation?S:this.hasTransition?_:B)(r,i,this),h=i?this.clsEnter:this.clsLeave;s.addClass(r,h),s.trigger(r,i?"show":"hide",[this]);const c=()=>{s.removeClass(r,h),s.trigger(r,i?"shown":"hidden",[this])};return a?a.then(c,()=>(s.removeClass(r,h),Promise.reject())):c()})).then(n,s.noop))},isToggled(o=this.$el){return[o]=s.toNodes(o),s.hasClass(o,this.clsEnter)?!0:s.hasClass(o,this.clsLeave)?!1:this.cls?s.hasClass(o,this.cls.split(" ")[0]):s.isVisible(o)},_toggle(o,t){if(!o)return;t=Boolean(t);let e;this.cls?(e=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),e&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(e=t===o.hidden,e&&(o.hidden=!t)),s.$$("[autofocus]",o).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),e&&s.trigger(o,"toggled",[t,this])}}};function S(o,t,{_toggle:e}){return s.Animation.cancel(o),s.Transition.cancel(o),e(o,t)}async function _(o,t,{animation:e,duration:n,velocity:r,transition:i,_toggle:a}){var h;const[c="reveal",d="top"]=((h=e[0])==null?void 0:h.split("-"))||[],l=[["left","right"],["top","bottom"]],T=l[s.includes(l[0],d)?0:1],u=T[1]===d,b=["width","height"][l.indexOf(T)],p=`margin-${T[0]}`,v=`margin-${d}`;let m=s.dimensions(o)[b];const F=s.Transition.inProgress(o);await s.Transition.cancel(o),t&&a(o,!0);const N=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",p,v].map(O=>[O,o.style[O]])),w=s.dimensions(o),P=s.toFloat(s.css(o,p)),x=s.toFloat(s.css(o,v)),f=w[b]+x;!F&&!t&&(m+=x);const[$]=s.wrapInner(o,"<div>");s.css($,{boxSizing:"border-box",height:w.height,width:w.width,...s.css(o,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",v])}),s.css(o,{padding:0,border:0,minWidth:0,minHeight:0,[v]:0,width:w.width,height:w.height,overflow:"hidden",[b]:m});const C=m/f;n=(r*f+n)*(t?1-C:C);const A={[b]:t?f:0};u&&(s.css(o,p,f-m+P),A[p]=t?P:f+P),!u^c==="reveal"&&(s.css($,p,-f+m),s.Transition.start($,{[p]:t?0:-f},n,i));try{await s.Transition.start(o,A,n,i)}finally{s.css(o,N),s.unwrap($.firstChild),t||a(o,!1)}}function B(o,t,e){s.Animation.cancel(o);const{animation:n,duration:r,_toggle:i}=e;return t?(i(o,!0),s.Animation.in(o,n[0],r,e.origin)):s.Animation.out(o,n[1]||n[0],r,e.origin).then(()=>i(o,!1))}var I={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:`bottom-${s.isRtl?"right":"left"}`,offset:!1,flip:!0,shift:!0,inset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=s.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(o,t,e){let n=[this.getPositionOffset(o),this.getShiftOffset(o)];const r=[this.flip&&"flip",this.shift&&"shift"],i={element:[this.inset?this.dir:s.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const l in i)i[l].reverse();n.reverse(),r.reverse()}const[a]=s.scrollParents(o),{scrollTop:h,scrollLeft:c}=a,d=s.dimensions(o);s.css(o,{top:-d.height,left:-d.width}),s.positionAt(o,t,{attach:i,offset:n,boundary:e,placement:r,viewportOffset:this.getViewportOffset(o)}),a.scrollTop=h,a.scrollLeft=c},getPositionOffset(o){return s.toPx(this.offset===!1?s.css(o,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(o){return this.align==="center"?0:s.toPx(s.css(o,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],this.align)?1:-1)},getViewportOffset(o){return s.toPx(s.css(o,"--uk-position-viewport-offset"))}}},y={mixins:[g,E,I],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this.id=`uk-tooltip-${this._uid}`,this._hasTitle=s.hasAttr(this.$el,"title"),s.attr(this.$el,{title:"","aria-describedby":this.id}),L(this.$el)},disconnected(){this.hide(),s.attr(this.$el,"title")||s.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(this._unbind=s.once(document,`keydown ${s.pointerDown}`,this.hide,!1,o=>o.type===s.pointerDown&&!s.within(o.target,this.$el)||o.type==="keydown"&&o.keyCode===27),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){s.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),s.remove(this.tooltip),this.tooltip=null,this._unbind()))},_show(){const[o]=s.scrollParents(this.$el);this.tooltip=s.append(s.within(o,this.container)?o:this.container,`<div id="${this.id}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${this.title}</div> </div>`),s.on(this.tooltip,"toggled",(t,e)=>{if(!e)return;this.positionAt(this.tooltip,this.$el);const[n,r]=D(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${s.flipPosition(n)}-${r}`:`${r}-${s.flipPosition(n)}`}),this.toggleElement(this.tooltip,!0)}},events:{focus:"show",blur:"hide",[`${s.pointerEnter} ${s.pointerLeave}`](o){s.isTouch(o)||this[o.type===s.pointerEnter?"show":"hide"]()},[s.pointerDown](o){s.isTouch(o)&&this.show()}}};function L(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function D(o,t,[e,n]){const r=s.offset(o),i=s.offset(t),a=[["left","right"],["top","bottom"]];for(const c of a){if(r[c[0]]>=i[c[1]]){e=c[1];break}if(r[c[1]]<=i[c[0]]){e=c[0];break}}const h=s.includes(a[0],e)?a[1]:a[0];return r[h[0]]===i[h[0]]?n=h[0]:r[h[1]]===i[h[1]]?n=h[1]:n="center",[e,n]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",y),y});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
2
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(o,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],n):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=n(o.UIkit.util))})(this,function(o){"use strict";var n={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:o.noop,beforeAll:o.noop,beforeSend:o.noop,complete:o.noop,completeAll:o.noop,error:o.noop,fail:o.noop,load:o.noop,loadEnd:o.noop,loadStart:o.noop,progress:o.noop},events:{change(e){o.matches(e.target,'input[type="file"]')&&(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){i(e);const t=e.dataTransfer;t!=null&&t.files&&(o.removeClass(this.$el,this.clsDragover),this.upload(t.files))},dragenter(e){i(e)},dragover(e){i(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){i(e),o.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){if(e=o.toArray(e),!e.length)return;o.trigger(this.$el,"upload",[e]);for(const a of e){if(this.maxSize&&this.maxSize*1e3<a.size){this.fail(this.msgInvalidSize.replace("%s",this.maxSize));return}if(this.allow&&!d(this.allow,a.name)){this.fail(this.msgInvalidName.replace("%s",this.allow));return}if(this.mime&&!d(this.mime,a.type)){this.fail(this.msgInvalidMime.replace("%s",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const t=c(e,this.concurrent),s=async a=>{const l=new FormData;a.forEach(r=>l.append(this.name,r));for(const r in this.params)l.append(r,this.params[r]);try{const r=await o.ajax(this.url,{data:l,method:this.method,responseType:this.type,beforeSend:h=>{const{xhr:p}=h;p.upload&&o.on(p.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(p,m.toLowerCase(),this[m]);return this.beforeSend(h)}});this.complete(r),t.length?await s(t.shift()):this.completeAll(r)}catch(r){this.error(r)}};await s(t.shift())}}};function d(e,t){return t.match(new RegExp(`^${e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")}$`,"i"))}function c(e,t){const s=[];for(let a=0;a<e.length;a+=t)s.push(e.slice(a,a+t));return s}function i(e){e.preventDefault(),e.stopPropagation()}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",n),n});
|
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.23-dev.
|
|
1
|
+
/*! UIkit 3.15.23-dev.b2c6f9d01 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -2975,7 +2975,7 @@
|
|
|
2975
2975
|
UIkit.data = '__uikit__';
|
|
2976
2976
|
UIkit.prefix = 'uk-';
|
|
2977
2977
|
UIkit.options = {};
|
|
2978
|
-
UIkit.version = '3.15.23-dev.
|
|
2978
|
+
UIkit.version = '3.15.23-dev.b2c6f9d01';
|
|
2979
2979
|
|
|
2980
2980
|
globalAPI(UIkit);
|
|
2981
2981
|
hooksAPI(UIkit);
|
|
@@ -3908,8 +3908,7 @@
|
|
|
3908
3908
|
|
|
3909
3909
|
|
|
3910
3910
|
if (this.overlay) {
|
|
3911
|
-
once(this.$el, 'hidden',
|
|
3912
|
-
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3911
|
+
once(this.$el, 'hidden', preventBackgroundScroll(this.$el), { self: true });
|
|
3913
3912
|
}
|
|
3914
3913
|
|
|
3915
3914
|
if (this.stack) {
|
|
@@ -4052,31 +4051,10 @@
|
|
|
4052
4051
|
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
4053
4052
|
}
|
|
4054
4053
|
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
...filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')))];
|
|
4060
|
-
|
|
4061
|
-
css(elements, 'overscrollBehavior', 'contain');
|
|
4062
|
-
return () => css(elements, 'overscrollBehavior', '');
|
|
4063
|
-
}
|
|
4064
|
-
|
|
4065
|
-
let startClientY;
|
|
4066
|
-
|
|
4067
|
-
const events = [
|
|
4068
|
-
on(
|
|
4069
|
-
el,
|
|
4070
|
-
'touchstart',
|
|
4071
|
-
({ targetTouches }) => {
|
|
4072
|
-
if (targetTouches.length === 1) {
|
|
4073
|
-
startClientY = targetTouches[0].clientY;
|
|
4074
|
-
}
|
|
4075
|
-
},
|
|
4076
|
-
{ passive: true }),
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
on(
|
|
4054
|
+
let prevented;
|
|
4055
|
+
function preventBackgroundScroll(el) {
|
|
4056
|
+
// 'overscroll-behavior: contain' only works consistently if el overflows (Safari)
|
|
4057
|
+
const off = on(
|
|
4080
4058
|
el,
|
|
4081
4059
|
'touchmove',
|
|
4082
4060
|
(e) => {
|
|
@@ -4084,33 +4062,17 @@
|
|
|
4084
4062
|
return;
|
|
4085
4063
|
}
|
|
4086
4064
|
|
|
4087
|
-
let [
|
|
4088
|
-
if (!within(scrollParent, el)) {
|
|
4089
|
-
scrollParent = el;
|
|
4090
|
-
}
|
|
4091
|
-
|
|
4092
|
-
const clientY = e.targetTouches[0].clientY - startClientY;
|
|
4093
|
-
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
4065
|
+
let [{ scrollHeight, clientHeight }] = scrollParents(e.target);
|
|
4094
4066
|
|
|
4095
|
-
if (
|
|
4096
|
-
|
|
4097
|
-
scrollTop === 0 && clientY > 0 ||
|
|
4098
|
-
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
4099
|
-
{
|
|
4100
|
-
e.cancelable && e.preventDefault();
|
|
4067
|
+
if (clientHeight >= scrollHeight && e.cancelable) {
|
|
4068
|
+
e.preventDefault();
|
|
4101
4069
|
}
|
|
4102
4070
|
},
|
|
4103
|
-
{ passive: false })
|
|
4071
|
+
{ passive: false });
|
|
4104
4072
|
|
|
4105
4073
|
|
|
4106
|
-
|
|
4107
|
-
return () => events.forEach((fn) => fn());
|
|
4108
|
-
}
|
|
4109
|
-
|
|
4110
|
-
let prevented;
|
|
4111
|
-
function preventBackgroundScroll() {
|
|
4112
4074
|
if (prevented) {
|
|
4113
|
-
return
|
|
4075
|
+
return off;
|
|
4114
4076
|
}
|
|
4115
4077
|
prevented = true;
|
|
4116
4078
|
|
|
@@ -4118,24 +4080,15 @@
|
|
|
4118
4080
|
css(scrollingElement, {
|
|
4119
4081
|
overflowY: CSS.supports('overflow', 'clip') ? 'clip' : 'hidden',
|
|
4120
4082
|
touchAction: 'none',
|
|
4121
|
-
paddingRight: width(window) - scrollingElement.clientWidth
|
|
4083
|
+
paddingRight: width(window) - scrollingElement.clientWidth || ''
|
|
4122
4084
|
});
|
|
4123
4085
|
return () => {
|
|
4124
4086
|
prevented = false;
|
|
4087
|
+
off();
|
|
4125
4088
|
css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
|
|
4126
4089
|
};
|
|
4127
4090
|
}
|
|
4128
4091
|
|
|
4129
|
-
function filterChildren(el, fn) {
|
|
4130
|
-
const children = [];
|
|
4131
|
-
apply(el, (node) => {
|
|
4132
|
-
if (fn(node)) {
|
|
4133
|
-
children.push(node);
|
|
4134
|
-
}
|
|
4135
|
-
});
|
|
4136
|
-
return children;
|
|
4137
|
-
}
|
|
4138
|
-
|
|
4139
4092
|
function isSameSiteAnchor(a) {
|
|
4140
4093
|
return ['origin', 'pathname', 'search'].every((part) => a[part] === location[part]);
|
|
4141
4094
|
}
|
|
@@ -4410,20 +4363,15 @@
|
|
|
4410
4363
|
return () => observer.disconnect();
|
|
4411
4364
|
})(),
|
|
4412
4365
|
|
|
4413
|
-
|
|
4414
|
-
[
|
|
4415
|
-
on([document, overflowParents(this.$el)], 'scroll', update, {
|
|
4366
|
+
this.autoUpdate &&
|
|
4367
|
+
on([document, ...overflowParents(this.$el)], 'scroll', update, {
|
|
4416
4368
|
passive: true
|
|
4417
|
-
})
|
|
4418
|
-
|
|
4419
|
-
[]),
|
|
4369
|
+
}),
|
|
4420
4370
|
|
|
4421
|
-
|
|
4422
|
-
[] :
|
|
4423
|
-
[preventOverscroll(this.$el), preventBackgroundScroll()])];
|
|
4371
|
+
!this.bgScroll && preventBackgroundScroll(this.$el)];
|
|
4424
4372
|
|
|
4425
4373
|
|
|
4426
|
-
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
4374
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler && handler()), {
|
|
4427
4375
|
self: true
|
|
4428
4376
|
});
|
|
4429
4377
|
}
|