uikit 3.20.9-dev.b50e1953b → 3.20.9-dev.e2e1b058d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +2 -4
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +13 -28
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +18 -33
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -10
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +18 -26
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +4 -10
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +17 -25
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +125 -214
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +155 -259
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/api/events.js +1 -1
- package/src/js/components/filter.js +1 -3
- package/src/js/components/internal/slider-transitioner.js +4 -0
- package/src/js/components/lightbox-panel.js +1 -3
- package/src/js/components/lightbox.js +5 -5
- package/src/js/components/slider-parallax.js +3 -9
- package/src/js/components/slider.js +1 -1
- package/src/js/core/accordion.js +2 -6
- package/src/js/core/alert.js +1 -3
- package/src/js/core/cover.js +6 -12
- package/src/js/core/drop.js +5 -13
- package/src/js/core/dropnav.js +14 -42
- package/src/js/core/form-custom.js +1 -3
- package/src/js/core/grid.js +4 -7
- package/src/js/core/height-match.js +1 -3
- package/src/js/core/inverse.js +31 -3
- package/src/js/core/modal.js +2 -1
- package/src/js/core/navbar.js +2 -6
- package/src/js/core/offcanvas.js +1 -3
- package/src/js/core/scrollspy-nav.js +2 -2
- package/src/js/core/scrollspy.js +1 -1
- package/src/js/core/sticky.js +18 -28
- package/src/js/core/switcher.js +7 -18
- package/src/js/core/toggle.js +6 -18
- package/src/js/core/video.js +6 -6
- package/src/js/mixin/internal/slideshow-transitioner.js +4 -0
- package/src/js/mixin/modal.js +1 -3
- package/src/js/mixin/slider-autoplay.js +1 -3
- package/src/js/mixin/slider-drag.js +2 -6
- package/src/js/mixin/slider-nav.js +4 -12
- package/src/js/mixin/slider-parallax.js +7 -3
- package/src/js/util/fastdom.js +24 -25
- package/src/js/util/viewport.js +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.b50e1953b | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],b):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitParallax=b(s.UIkit.util))})(this,function(s){"use strict";function b(n,t="update"){n._connected&&n._updates.length&&(n._queued||(n._queued=new Set,s.fastdom.read(()=>{n._connected&&Y(n,n._queued),delete n._queued})),n._queued.add(t.type||t))}function Y(n,t){for(const{read:e,write:o,events:i=[]}of n._updates){if(!t.has("update")&&!i.some(a=>t.has(a)))continue;let r;e&&(r=e.call(n,n._data,t),r&&s.isPlainObject(r)&&s.assign(n._data,r)),o&&r!==!1&&s.fastdom.write(()=>{n._connected&&o.call(n,n._data,t)})}}function Z(n){return F(s.observeResize,n,"resize")}function k(n){return F((t,e)=>s.observeViewportResize(e),n,"resize")}function U(n){return F((t,e)=>({disconnect:s.on(nn(t),"scroll",e,{passive:!0})}),n,"scroll")}function F(n,t,e){return{observe:n,handler(){b(this,e)},...t}}function nn(n){return s.toNodes(n).map(t=>{const{ownerDocument:e}=t,o=s.scrollParent(t,!0);return o===e.scrollingElement?e:o})}var tn={props:{media:Boolean},data:{media:!1},connected(){const n=en(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function en(n,t){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function rn(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:Dn,from:on}=Array;function sn(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function cn(n){return M(n)&&n===n.window}function an(n){return z(n)===9}function I(n){return z(n)>=1}function z(n){return!cn(n)&&M(n)&&n.nodeType}function O(n){return typeof n=="string"}function fn(n){return n===void 0}function $(n){return n&&u(n)[0]}function u(n){return I(n)?[n]:Array.from(n||[]).filter(I)}function A(n){const t=Object.create(null);return(e,...o)=>t[e]||(t[e]=n(e,...o))}function P(n,t,e){var o;if(M(t)){for(const i in t)P(n,i,t[i]);return}if(fn(e))return(o=$(n))==null?void 0:o.getAttribute(t);for(const i of u(n))sn(e)&&(e=e.call(i,P(i,t))),e===null?un(i,t):i.setAttribute(t,e)}function un(n,t){u(n).forEach(e=>e.removeAttribute(t))}const dn=typeof window<"u"&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function hn(n){return u(n).some(t=>dn.call(t))}function ln(n){var t;return(t=$(n))==null?void 0:t.parentElement}function gn(n,t){return u(n).filter(e=>T(e,t))}function T(n,t){return u(n).some(e=>e.matches(t))}function mn(n,t){n=$(n);const e=n?on(n.children):[];return t?gn(e,t):e}function W(n,t){return t?u(n).indexOf($(t)):mn(ln(n)).indexOf(n)}function bn(n,t){return u(vn(n,$(t),"querySelectorAll"))}const $n=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,pn=/.*?[^\\](?![^(]*\))(?:,|$)/g,xn=/\s*,$/,wn=A(n=>{var t;n=n.replace($n,"$1 *");let e=!1;const o=[];for(let i of(t=n.match(pn))!=null?t:[])i=i.replace(xn,"").trim(),e||(e=["!","+","~","-",">"].includes(i[0])),o.push(i);return{selector:o.join(","),selectors:o,isContextSelector:e}}),R=A(n=>{n=n.substr(1).trim();const t=n.indexOf(" ");return~t?[n.substring(0,t),n.substring(t+1)]:[n,""]});function vn(n,t=document,e){if(!n||!O(n))return n;const o=wn(n);if(!o.isContextSelector)return C(t,e,o.selector);n="";const i=o.selectors.length===1;for(let r of o.selectors){let a,c=t;if(r[0]==="!"&&([a,r]=R(r),c=t.parentElement.closest(a),!r&&i)||c&&r[0]==="-"&&([a,r]=R(r),c=c.previousElementSibling,c=T(c,a)?c:null,!r&&i))return c;if(c){if(i)return r[0]==="~"||r[0]==="+"?(r=`:scope > :nth-child(${W(c)+1}) ${r}`,c=c.parentElement):r[0]===">"&&(r=`:scope ${r}`),C(c,e,r);n+=`${n?",":""}${yn(c)} ${r}`}}return an(t)||(t=t.ownerDocument),C(t,e,n)}function C(n,t,e){try{return n[t](e)}catch{return null}}function yn(n){const t=[];for(;n.parentNode;){const e=P(n,"id");if(e){t.unshift(`#${Sn(e)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${W(n)+1})`),t.unshift(o),n=n.parentNode}}return t.join(" > ")}function Sn(n){return O(n)?CSS.escape(n):""}const _n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Fn(n){const t=_n.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("template");return e.innerHTML=n.trim(),Mn(e.content.childNodes)}function Mn(n){return n.length>1?n:n[0]}function On(n,t){return Pn(n)?u(Fn(n)):bn(n,t)}function Pn(n){return O(n)&&rn(n.trim(),"<")}function Cn(n){return hn(n)?Math.ceil(Math.max(0,...On("[stroke]",n).map(t=>t.getTotalLength()))):0}const v={x:y,y,rotate:y,scale:y,color:j,backgroundColor:j,borderColor:j,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Nn,stroke:In,bgx:q,bgy:q},{keys:D}=Object;var jn={mixins:[tn],props:Q(D(v),"list"),data:Q(D(v),void 0),computed:{props(n,t){const e={};for(const i in n)i in v&&!s.isUndefined(n[i])&&(e[i]=n[i].slice());const o={};for(const i in e)o[i]=v[i](i,t,e[i],e);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const t={};for(const e in this.props)this.props[e](t,s.clamp(n));return t.willChange=Object.keys(t).map(s.propName).join(","),t}}};function y(n,t,e){let o=_(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",i;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,i=r=>s.toFloat(s.toFloat(r).toFixed(o==="px"?0:6))):n==="scale"&&(o="",i=r=>{var a;return _([r])?s.toPx(r,"width",t,!0)/t[`offset${(a=r.endsWith)!=null&&a.call(r,"vh")?"Height":"Width"}`]:s.toFloat(r)}),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,i),(r,a)=>{r.transform=`${r.transform||""} ${n}(${p(e,a)}${o})`}}function j(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e,o=>En(t,o)),(o,i)=>{const[r,a,c]=L(e,i),h=r.map((l,f)=>(l+=c*(a[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function En(n,t){return x(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const o=_(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(i,r)=>{const a=p(e,r);i.filter=`${i.filter||""} ${n}(${a+o})`}}function Nn(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e),(o,i)=>{o[n]=p(e,i)}}function In(n,t,e){e.length===1&&e.unshift(0);const o=_(e),i=Cn(t);return e=m(e.reverse(),r=>(r=s.toFloat(r),o==="%"?r*i/100:r)),e.some(([r])=>r)?(s.css(t,"strokeDasharray",i),(r,a)=>{r.strokeDashoffset=p(e,a)}):s.noop}function q(n,t,e,o){e.length===1&&e.unshift(0);const i=n==="bgy"?"height":"width";o[n]=m(e,c=>s.toPx(c,i,t));const r=["bgx","bgy"].filter(c=>c in o);if(r.length===2&&n==="bgx")return s.noop;if(x(t,"backgroundSize","")==="cover")return zn(n,t,e,o);const a={};for(const c of r)a[c]=H(t,c);return V(r,a,o)}function zn(n,t,e,o){const i=An(t);if(!i.width)return s.noop;const r={width:t.offsetWidth,height:t.offsetHeight},a=["bgx","bgy"].filter(f=>f in o),c={};for(const f of a){const d=o[f].map(([Rn])=>Rn),w=Math.min(...d),N=Math.max(...d),K=d.indexOf(w)<d.indexOf(N),X=N-w;c[f]=`${(K?-X:0)-(K?w:N)}px`,r[f==="bgy"?"height":"width"]+=X}const h=s.Dimensions.cover(i,r);for(const f of a){const d=f==="bgy"?"height":"width",w=h[d]-r[d];c[f]=`max(${H(t,f)},-${w}px) + ${c[f]}`}const l=V(a,c,o);return(f,d)=>{l(f,d),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function H(n,t){return x(n,`background-position-${t.substr(-1)}`,"")}function V(n,t,e){return function(o,i){for(const r of n){const a=p(e[r],i);o[`background-position-${r.substr(-1)}`]=`calc(${t[r]} + ${a}px)`}}}const B={},S={};function An(n){const t=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[t])return S[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth&&!B[t])?(s.once(e,"error load",()=>{S[t]=E(e),s.trigger(n,s.createEvent("load",!1))}),B[t]=!0,E(e)):S[t]=E(e)}function E(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=s.toFloat){const e=[],{length:o}=n;let i=0;for(let r=0;r<o;r++){let[a,c]=s.isString(n[r])?n[r].trim().split(/ (?![^(]*\))/):[n[r]];if(a=t(a),c=c?s.toFloat(c)/100:null,r===0?c===null?c=0:c&&e.push([a,0]):r===o-1&&(c===null?c=1:c!==1&&(e.push([a,c]),c=1)),e.push([a,c]),c===null)i++;else if(i){const h=e[r-i-1][1],l=(c-h)/(i+1);for(let f=i;f>0;f--)e[r-f][1]=h+l*(i-f+1);i=0}}return e}function L(n,t){const e=s.findIndex(n.slice(1),([,o])=>t<=o)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function p(n,t){const[e,o,i]=L(n,t);return e+Math.abs(e-o)*i*(e<o?1:-1)}const Tn=/^-?\d+(?:\.\d+)?(\S+)?/;function _(n,t){var e;for(const o of n){const i=(e=o.match)==null?void 0:e.call(o,Tn);if(i)return i[1]}return t}function x(n,t,e){const o=n.style[t],i=s.css(s.css(n,t,e),t);return n.style[t]=o,i}function Q(n,t){return n.reduce((e,o)=>(e[o]=t,e),{})}function Wn(n,t){return t>=0?Math.pow(n,t+1):1-Math.pow(1-n,1-t)}var G={mixins:[jn],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:n},t)=>J(n&&s.query(n,t)||t),start({start:n}){return s.toPx(n,"height",this.target,!0)},end({end:n,viewport:t}){return s.toPx(n||(t=(1-t)*100)&&`${t}vh+${t}%`,"height",this.target,!0)}},observe:[k(),U({target:({target:n})=>n}),Z({target:({$el:n,target:t})=>[n,t,s.scrollParent(t,!0)]})],update:{read({percent:n},t){if(t.has("scroll")||(n=!1),!s.isVisible(this.$el))return!1;if(!this.matchMedia)return;const e=n;return n=Wn(s.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:e===n?!1:this.getCss(n)}},write({style:n}){if(!this.matchMedia){this.reset();return}n&&s.css(this.$el,n)},events:["scroll","resize"]}};function J(n){return n?"offsetTop"in n?n:J(s.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",G),G});
|
|
1
|
+
/*! UIkit 3.20.9-dev.e2e1b058d | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],b):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitParallax=b(s.UIkit.util))})(this,function(s){"use strict";function b(n,t="update"){n._connected&&n._updates.length&&(n._queued||(n._queued=new Set,s.fastdom.read(()=>{n._connected&&Y(n,n._queued),delete n._queued})),n._queued.add(t.type||t))}function Y(n,t){for(const{read:e,write:o,events:i=[]}of n._updates){if(!t.has("update")&&!i.some(a=>t.has(a)))continue;let r;e&&(r=e.call(n,n._data,t),r&&s.isPlainObject(r)&&s.assign(n._data,r)),o&&r!==!1&&s.fastdom.write(()=>{n._connected&&o.call(n,n._data,t)})}}function Z(n){return F(s.observeResize,n,"resize")}function k(n){return F((t,e)=>s.observeViewportResize(e),n,"resize")}function U(n){return F((t,e)=>({disconnect:s.on(nn(t),"scroll",e,{passive:!0})}),n,"scroll")}function F(n,t,e){return{observe:n,handler(){b(this,e)},...t}}function nn(n){return s.toNodes(n).map(t=>{const{ownerDocument:e}=t,o=s.scrollParent(t,!0);return o===e.scrollingElement?e:o})}var tn={props:{media:Boolean},data:{media:!1},connected(){const n=en(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function en(n,t){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function rn(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:Dn,from:on}=Array;function sn(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function cn(n){return M(n)&&n===n.window}function an(n){return z(n)===9}function I(n){return z(n)>=1}function z(n){return!cn(n)&&M(n)&&n.nodeType}function O(n){return typeof n=="string"}function fn(n){return n===void 0}function $(n){return n&&u(n)[0]}function u(n){return I(n)?[n]:Array.from(n||[]).filter(I)}function A(n){const t=Object.create(null);return(e,...o)=>t[e]||(t[e]=n(e,...o))}function P(n,t,e){var o;if(M(t)){for(const i in t)P(n,i,t[i]);return}if(fn(e))return(o=$(n))==null?void 0:o.getAttribute(t);for(const i of u(n))sn(e)&&(e=e.call(i,P(i,t))),e===null?un(i,t):i.setAttribute(t,e)}function un(n,t){u(n).forEach(e=>e.removeAttribute(t))}const dn=typeof window<"u"&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function hn(n){return u(n).some(t=>dn.call(t))}function ln(n){var t;return(t=$(n))==null?void 0:t.parentElement}function gn(n,t){return u(n).filter(e=>T(e,t))}function T(n,t){return u(n).some(e=>e.matches(t))}function mn(n,t){n=$(n);const e=n?on(n.children):[];return t?gn(e,t):e}function W(n,t){return t?u(n).indexOf($(t)):mn(ln(n)).indexOf(n)}function bn(n,t){return u(vn(n,$(t),"querySelectorAll"))}const $n=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,pn=/.*?[^\\](?![^(]*\))(?:,|$)/g,xn=/\s*,$/,wn=A(n=>{var t;n=n.replace($n,"$1 *");let e=!1;const o=[];for(let i of(t=n.match(pn))!=null?t:[])i=i.replace(xn,"").trim(),e||(e=["!","+","~","-",">"].includes(i[0])),o.push(i);return{selector:o.join(","),selectors:o,isContextSelector:e}}),R=A(n=>{n=n.substr(1).trim();const t=n.indexOf(" ");return~t?[n.substring(0,t),n.substring(t+1)]:[n,""]});function vn(n,t=document,e){if(!n||!O(n))return n;const o=wn(n);if(!o.isContextSelector)return C(t,e,o.selector);n="";const i=o.selectors.length===1;for(let r of o.selectors){let a,c=t;if(r[0]==="!"&&([a,r]=R(r),c=t.parentElement.closest(a),!r&&i)||c&&r[0]==="-"&&([a,r]=R(r),c=c.previousElementSibling,c=T(c,a)?c:null,!r&&i))return c;if(c){if(i)return r[0]==="~"||r[0]==="+"?(r=`:scope > :nth-child(${W(c)+1}) ${r}`,c=c.parentElement):r[0]===">"&&(r=`:scope ${r}`),C(c,e,r);n+=`${n?",":""}${yn(c)} ${r}`}}return an(t)||(t=t.ownerDocument),C(t,e,n)}function C(n,t,e){try{return n[t](e)}catch{return null}}function yn(n){const t=[];for(;n.parentNode;){const e=P(n,"id");if(e){t.unshift(`#${Sn(e)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${W(n)+1})`),t.unshift(o),n=n.parentNode}}return t.join(" > ")}function Sn(n){return O(n)?CSS.escape(n):""}const _n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Fn(n){const t=_n.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("template");return e.innerHTML=n.trim(),Mn(e.content.childNodes)}function Mn(n){return n.length>1?n:n[0]}function On(n,t){return Pn(n)?u(Fn(n)):bn(n,t)}function Pn(n){return O(n)&&rn(n.trim(),"<")}function Cn(n){return hn(n)?Math.ceil(Math.max(0,...On("[stroke]",n).map(t=>t.getTotalLength()))):0}const v={x:y,y,rotate:y,scale:y,color:j,backgroundColor:j,borderColor:j,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Nn,stroke:In,bgx:q,bgy:q},{keys:D}=Object;var jn={mixins:[tn],props:Q(D(v),"list"),data:Q(D(v),void 0),computed:{props(n,t){const e={};for(const i in n)i in v&&!s.isUndefined(n[i])&&(e[i]=n[i].slice());const o={};for(const i in e)o[i]=v[i](i,t,e[i],e);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const t={};for(const e in this.props)this.props[e](t,s.clamp(n));return t.willChange=Object.keys(t).map(s.propName).join(","),t}}};function y(n,t,e){let o=_(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",i;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,i=r=>s.toFloat(s.toFloat(r).toFixed(o==="px"?0:6))):n==="scale"&&(o="",i=r=>{var a;return _([r])?s.toPx(r,"width",t,!0)/t[`offset${(a=r.endsWith)!=null&&a.call(r,"vh")?"Height":"Width"}`]:s.toFloat(r)}),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,i),(r,a)=>{r.transform=`${r.transform||""} ${n}(${p(e,a)}${o})`}}function j(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e,o=>En(t,o)),(o,i)=>{const[r,a,c]=L(e,i),h=r.map((l,f)=>(l+=c*(a[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function En(n,t){return x(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const o=_(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(i,r)=>{const a=p(e,r);i.filter=`${i.filter||""} ${n}(${a+o})`}}function Nn(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e),(o,i)=>{o[n]=p(e,i)}}function In(n,t,e){e.length===1&&e.unshift(0);const o=_(e),i=Cn(t);return e=m(e.reverse(),r=>(r=s.toFloat(r),o==="%"?r*i/100:r)),e.some(([r])=>r)?(s.css(t,"strokeDasharray",i),(r,a)=>{r.strokeDashoffset=p(e,a)}):s.noop}function q(n,t,e,o){e.length===1&&e.unshift(0);const i=n==="bgy"?"height":"width";o[n]=m(e,c=>s.toPx(c,i,t));const r=["bgx","bgy"].filter(c=>c in o);if(r.length===2&&n==="bgx")return s.noop;if(x(t,"backgroundSize","")==="cover")return zn(n,t,e,o);const a={};for(const c of r)a[c]=H(t,c);return V(r,a,o)}function zn(n,t,e,o){const i=An(t);if(!i.width)return s.noop;const r={width:t.offsetWidth,height:t.offsetHeight},a=["bgx","bgy"].filter(f=>f in o),c={};for(const f of a){const d=o[f].map(([Rn])=>Rn),w=Math.min(...d),N=Math.max(...d),K=d.indexOf(w)<d.indexOf(N),X=N-w;c[f]=`${(K?-X:0)-(K?w:N)}px`,r[f==="bgy"?"height":"width"]+=X}const h=s.Dimensions.cover(i,r);for(const f of a){const d=f==="bgy"?"height":"width",w=h[d]-r[d];c[f]=`max(${H(t,f)},-${w}px) + ${c[f]}`}const l=V(a,c,o);return(f,d)=>{l(f,d),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function H(n,t){return x(n,`background-position-${t.substr(-1)}`,"")}function V(n,t,e){return function(o,i){for(const r of n){const a=p(e[r],i);o[`background-position-${r.substr(-1)}`]=`calc(${t[r]} + ${a}px)`}}}const B={},S={};function An(n){const t=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[t])return S[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth&&!B[t])?(s.once(e,"error load",()=>{S[t]=E(e),s.trigger(n,s.createEvent("load",!1))}),B[t]=!0,E(e)):S[t]=E(e)}function E(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=s.toFloat){const e=[],{length:o}=n;let i=0;for(let r=0;r<o;r++){let[a,c]=s.isString(n[r])?n[r].trim().split(/ (?![^(]*\))/):[n[r]];if(a=t(a),c=c?s.toFloat(c)/100:null,r===0?c===null?c=0:c&&e.push([a,0]):r===o-1&&(c===null?c=1:c!==1&&(e.push([a,c]),c=1)),e.push([a,c]),c===null)i++;else if(i){const h=e[r-i-1][1],l=(c-h)/(i+1);for(let f=i;f>0;f--)e[r-f][1]=h+l*(i-f+1);i=0}}return e}function L(n,t){const e=s.findIndex(n.slice(1),([,o])=>t<=o)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function p(n,t){const[e,o,i]=L(n,t);return e+Math.abs(e-o)*i*(e<o?1:-1)}const Tn=/^-?\d+(?:\.\d+)?(\S+)?/;function _(n,t){var e;for(const o of n){const i=(e=o.match)==null?void 0:e.call(o,Tn);if(i)return i[1]}return t}function x(n,t,e){const o=n.style[t],i=s.css(s.css(n,t,e),t);return n.style[t]=o,i}function Q(n,t){return n.reduce((e,o)=>(e[o]=t,e),{})}function Wn(n,t){return t>=0?Math.pow(n,t+1):1-Math.pow(1-n,1-t)}var G={mixins:[jn],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:n},t)=>J(n&&s.query(n,t)||t),start({start:n}){return s.toPx(n,"height",this.target,!0)},end({end:n,viewport:t}){return s.toPx(n||(t=(1-t)*100)&&`${t}vh+${t}%`,"height",this.target,!0)}},observe:[k(),U({target:({target:n})=>n}),Z({target:({$el:n,target:t})=>[n,t,s.scrollParent(t,!0)]})],update:{read({percent:n},t){if(t.has("scroll")||(n=!1),!s.isVisible(this.$el))return!1;if(!this.matchMedia)return;const e=n;return n=Wn(s.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:e===n?!1:this.getCss(n)}},write({style:n}){if(!this.matchMedia){this.reset();return}n&&s.css(this.$el,n)},events:["scroll","resize"]}};function J(n){return n?"offsetTop"in n?n:J(s.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",G),G});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.e2e1b058d | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -578,9 +578,7 @@
|
|
|
578
578
|
{
|
|
579
579
|
name: "itemin itemout",
|
|
580
580
|
self: true,
|
|
581
|
-
el()
|
|
582
|
-
return this.item;
|
|
583
|
-
},
|
|
581
|
+
el: ({ item }) => item,
|
|
584
582
|
handler({ type, detail: { percent, duration, timing, dir } }) {
|
|
585
583
|
uikitUtil.fastdom.read(() => {
|
|
586
584
|
if (!this.matchMedia) {
|
|
@@ -598,9 +596,7 @@
|
|
|
598
596
|
{
|
|
599
597
|
name: "transitioncanceled transitionend",
|
|
600
598
|
self: true,
|
|
601
|
-
el()
|
|
602
|
-
return this.item;
|
|
603
|
-
},
|
|
599
|
+
el: ({ item }) => item,
|
|
604
600
|
handler() {
|
|
605
601
|
uikitUtil.Transition.cancel(this.$el);
|
|
606
602
|
}
|
|
@@ -608,9 +604,7 @@
|
|
|
608
604
|
{
|
|
609
605
|
name: "itemtranslatein itemtranslateout",
|
|
610
606
|
self: true,
|
|
611
|
-
el()
|
|
612
|
-
return this.item;
|
|
613
|
-
},
|
|
607
|
+
el: ({ item }) => item,
|
|
614
608
|
handler({ type, detail: { percent, dir } }) {
|
|
615
609
|
uikitUtil.fastdom.read(() => {
|
|
616
610
|
if (!this.matchMedia) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.e2e1b058d | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],$):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider_parallax=$(s.UIkit.util))})(this,function(s){"use strict";var $={props:{media:Boolean},data:{media:!1},connected(){const n=Y(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function Y(n,t){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function Z(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:Nn,from:k}=Array;function U(n){return typeof n=="function"}function C(n){return n!==null&&typeof n=="object"}function nn(n){return C(n)&&n===n.window}function tn(n){return T(n)===9}function N(n){return T(n)>=1}function T(n){return!nn(n)&&C(n)&&n.nodeType}function M(n){return typeof n=="string"}function en(n){return n===void 0}function b(n){return n&&u(n)[0]}function u(n){return N(n)?[n]:Array.from(n||[]).filter(N)}function W(n){const t=Object.create(null);return(e,...r)=>t[e]||(t[e]=n(e,...r))}function O(n,t,e){var r;if(C(t)){for(const o in t)O(n,o,t[o]);return}if(en(e))return(r=b(n))==null?void 0:r.getAttribute(t);for(const o of u(n))U(e)&&(e=e.call(o,O(o,t))),e===null?rn(o,t):o.setAttribute(t,e)}function rn(n,t){u(n).forEach(e=>e.removeAttribute(t))}const on=typeof window<"u"&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function sn(n){return u(n).some(t=>on.call(t))}function cn(n){var t;return(t=b(n))==null?void 0:t.parentElement}function an(n,t){return u(n).filter(e=>_(e,t))}function _(n,t){return u(n).some(e=>e.matches(t))}function fn(n,t){n=b(n);const e=n?k(n.children):[];return t?an(e,t):e}function A(n,t){return t?u(n).indexOf(b(t)):fn(cn(n)).indexOf(n)}function un(n,t){return u(mn(n,b(t),"querySelectorAll"))}const dn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,hn=/.*?[^\\](?![^(]*\))(?:,|$)/g,ln=/\s*,$/,gn=W(n=>{var t;n=n.replace(dn,"$1 *");let e=!1;const r=[];for(let o of(t=n.match(hn))!=null?t:[])o=o.replace(ln,"").trim(),e||(e=["!","+","~","-",">"].includes(o[0])),r.push(o);return{selector:r.join(","),selectors:r,isContextSelector:e}}),D=W(n=>{n=n.substr(1).trim();const t=n.indexOf(" ");return~t?[n.substring(0,t),n.substring(t+1)]:[n,""]});function mn(n,t=document,e){if(!n||!M(n))return n;const r=gn(n);if(!r.isContextSelector)return P(t,e,r.selector);n="";const o=r.selectors.length===1;for(let i of r.selectors){let a,c=t;if(i[0]==="!"&&([a,i]=D(i),c=t.parentElement.closest(a),!i&&o)||c&&i[0]==="-"&&([a,i]=D(i),c=c.previousElementSibling,c=_(c,a)?c:null,!i&&o))return c;if(c){if(o)return i[0]==="~"||i[0]==="+"?(i=`:scope > :nth-child(${A(c)+1}) ${i}`,c=c.parentElement):i[0]===">"&&(i=`:scope ${i}`),P(c,e,i);n+=`${n?",":""}${$n(c)} ${i}`}}return tn(t)||(t=t.ownerDocument),P(t,e,n)}function P(n,t,e){try{return n[t](e)}catch{return null}}function $n(n){const t=[];for(;n.parentNode;){const e=O(n,"id");if(e){t.unshift(`#${bn(e)}`);break}else{let{tagName:r}=n;r!=="HTML"&&(r+=`:nth-child(${A(n)+1})`),t.unshift(r),n=n.parentNode}}return t.join(" > ")}function bn(n){return M(n)?CSS.escape(n):""}const xn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function pn(n){const t=xn.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("template");return e.innerHTML=n.trim(),wn(e.content.childNodes)}function wn(n){return n.length>1?n:n[0]}function yn(n,t){return vn(n)?u(pn(n)):un(n,t)}function vn(n){return M(n)&&Z(n.trim(),"<")}function Sn(n){return sn(n)?Math.ceil(Math.max(0,...yn("[stroke]",n).map(t=>t.getTotalLength()))):0}const y={x:v,y:v,rotate:v,scale:v,color:j,backgroundColor:j,borderColor:j,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Mn,stroke:On,bgx:R,bgy:R},{keys:H}=Object;var Fn={mixins:[$],props:q(H(y),"list"),data:q(H(y),void 0),computed:{props(n,t){const e={};for(const o in n)o in y&&!s.isUndefined(n[o])&&(e[o]=n[o].slice());const r={};for(const o in e)r[o]=y[o](o,t,e[o],e);return r}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const t={};for(const e in this.props)this.props[e](t,s.clamp(n));return t.willChange=Object.keys(t).map(s.propName).join(","),t}}};function v(n,t,e){let r=F(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",o;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,o=i=>s.toFloat(s.toFloat(i).toFixed(r==="px"?0:6))):n==="scale"&&(r="",o=i=>{var a;return F([i])?s.toPx(i,"width",t,!0)/t[`offset${(a=i.endsWith)!=null&&a.call(i,"vh")?"Height":"Width"}`]:s.toFloat(i)}),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,o),(i,a)=>{i.transform=`${i.transform||""} ${n}(${x(e,a)}${r})`}}function j(n,t,e){return e.length===1&&e.unshift(p(t,n,"")),e=m(e,r=>Cn(t,r)),(r,o)=>{const[i,a,c]=L(e,o),h=i.map((l,f)=>(l+=c*(a[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");r[n]=`rgba(${h})`}}function Cn(n,t){return p(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const r=F(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(o,i)=>{const a=x(e,i);o.filter=`${o.filter||""} ${n}(${a+r})`}}function Mn(n,t,e){return e.length===1&&e.unshift(p(t,n,"")),e=m(e),(r,o)=>{r[n]=x(e,o)}}function On(n,t,e){e.length===1&&e.unshift(0);const r=F(e),o=Sn(t);return e=m(e.reverse(),i=>(i=s.toFloat(i),r==="%"?i*o/100:i)),e.some(([i])=>i)?(s.css(t,"strokeDasharray",o),(i,a)=>{i.strokeDashoffset=x(e,a)}):s.noop}function R(n,t,e,r){e.length===1&&e.unshift(0);const o=n==="bgy"?"height":"width";r[n]=m(e,c=>s.toPx(c,o,t));const i=["bgx","bgy"].filter(c=>c in r);if(i.length===2&&n==="bgx")return s.noop;if(p(t,"backgroundSize","")==="cover")return Pn(n,t,e,r);const a={};for(const c of i)a[c]=B(t,c);return V(i,a,r)}function Pn(n,t,e,r){const o=jn(t);if(!o.width)return s.noop;const i={width:t.offsetWidth,height:t.offsetHeight},a=["bgx","bgy"].filter(f=>f in r),c={};for(const f of a){const d=r[f].map(([En])=>En),w=Math.min(...d),E=Math.max(...d),K=d.indexOf(w)<d.indexOf(E),X=E-w;c[f]=`${(K?-X:0)-(K?w:E)}px`,i[f==="bgy"?"height":"width"]+=X}const h=s.Dimensions.cover(o,i);for(const f of a){const d=f==="bgy"?"height":"width",w=h[d]-i[d];c[f]=`max(${B(t,f)},-${w}px) + ${c[f]}`}const l=V(a,c,r);return(f,d)=>{l(f,d),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function B(n,t){return p(n,`background-position-${t.substr(-1)}`,"")}function V(n,t,e){return function(r,o){for(const i of n){const a=x(e[i],o);r[`background-position-${i.substr(-1)}`]=`calc(${t[i]} + ${a}px)`}}}const z={},S={};function jn(n){const t=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[t])return S[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth&&!z[t])?(s.once(e,"error load",()=>{S[t]=I(e),s.trigger(n,s.createEvent("load",!1))}),z[t]=!0,I(e)):S[t]=I(e)}function I(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=s.toFloat){const e=[],{length:r}=n;let o=0;for(let i=0;i<r;i++){let[a,c]=s.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(a=t(a),c=c?s.toFloat(c)/100:null,i===0?c===null?c=0:c&&e.push([a,0]):i===r-1&&(c===null?c=1:c!==1&&(e.push([a,c]),c=1)),e.push([a,c]),c===null)o++;else if(o){const h=e[i-o-1][1],l=(c-h)/(o+1);for(let f=o;f>0;f--)e[i-f][1]=h+l*(o-f+1);o=0}}return e}function L(n,t){const e=s.findIndex(n.slice(1),([,r])=>t<=r)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function x(n,t){const[e,r,o]=L(n,t);return e+Math.abs(e-r)*o*(e<r?1:-1)}const In=/^-?\d+(?:\.\d+)?(\S+)?/;function F(n,t){var e;for(const r of n){const o=(e=r.match)==null?void 0:e.call(r,In);if(o)return o[1]}return t}function p(n,t,e){const r=n.style[t],o=s.css(s.css(n,t,e),t);return n.style[t]=r,o}function q(n,t){return n.reduce((e,r)=>(e[r]=t,e),{})}var Q={mixins:[Fn],beforeConnect(){this.item=this.$el.closest(`.${this.$options.id.replace("parallax","items")} > *`)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el:({item:n})=>n,handler({type:n,detail:{percent:t,duration:e,timing:r,dir:o}}){s.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(J(n,o,t)),a=this.getCss(G(n)?.5:o>0?1:0);s.fastdom.write(()=>{s.css(this.$el,i),s.Transition.start(this.$el,a,e,r).catch(s.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el:({item:n})=>n,handler(){s.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el:({item:n})=>n,handler({type:n,detail:{percent:t,dir:e}}){s.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const r=this.getCss(J(n,e,t));s.fastdom.write(()=>s.css(this.$el,r))})}}]};function G(n){return s.endsWith(n,"in")}function J(n,t,e){return e/=2,G(n)^t<0?e:1-e}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",Q),Q});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.e2e1b058d | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -142,9 +142,7 @@
|
|
|
142
142
|
{
|
|
143
143
|
name: "visibilitychange",
|
|
144
144
|
el: () => document,
|
|
145
|
-
filter()
|
|
146
|
-
return this.autoplay;
|
|
147
|
-
},
|
|
145
|
+
filter: ({ autoplay }) => autoplay,
|
|
148
146
|
handler() {
|
|
149
147
|
if (document.hidden) {
|
|
150
148
|
this.stopAutoplay();
|
|
@@ -198,9 +196,7 @@
|
|
|
198
196
|
{
|
|
199
197
|
name: pointerDown,
|
|
200
198
|
passive: true,
|
|
201
|
-
delegate() {
|
|
202
|
-
return `${this.selList} > *`;
|
|
203
|
-
},
|
|
199
|
+
delegate: ({ selList }) => `${selList} > *`,
|
|
204
200
|
handler(e) {
|
|
205
201
|
if (!this.draggable || this.parallax || !util.isTouch(e) && hasSelectableText(e.target) || e.target.closest(util.selInput) || e.button > 0 || this.length < 2) {
|
|
206
202
|
return;
|
|
@@ -217,9 +213,7 @@
|
|
|
217
213
|
{
|
|
218
214
|
// iOS workaround for slider stopping if swiping fast
|
|
219
215
|
name: pointerMove,
|
|
220
|
-
el()
|
|
221
|
-
return this.list;
|
|
222
|
-
},
|
|
216
|
+
el: ({ list }) => list,
|
|
223
217
|
handler: util.noop,
|
|
224
218
|
...pointerOptions
|
|
225
219
|
}
|
|
@@ -457,12 +451,8 @@
|
|
|
457
451
|
events: [
|
|
458
452
|
{
|
|
459
453
|
name: "click keydown",
|
|
460
|
-
delegate()
|
|
461
|
-
|
|
462
|
-
},
|
|
463
|
-
filter() {
|
|
464
|
-
return !this.parallax;
|
|
465
|
-
},
|
|
454
|
+
delegate: ({ selNavItem }) => selNavItem,
|
|
455
|
+
filter: ({ parallax }) => !parallax,
|
|
466
456
|
handler(e) {
|
|
467
457
|
if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
|
|
468
458
|
e.preventDefault();
|
|
@@ -476,12 +466,8 @@
|
|
|
476
466
|
},
|
|
477
467
|
{
|
|
478
468
|
name: "keydown",
|
|
479
|
-
delegate()
|
|
480
|
-
|
|
481
|
-
},
|
|
482
|
-
filter() {
|
|
483
|
-
return !this.parallax;
|
|
484
|
-
},
|
|
469
|
+
delegate: ({ selNavItem }) => selNavItem,
|
|
470
|
+
filter: ({ parallax }) => !parallax,
|
|
485
471
|
handler(e) {
|
|
486
472
|
const { current, keyCode } = e;
|
|
487
473
|
const cmd = util.data(current, this.attrItem);
|
|
@@ -1281,15 +1267,18 @@
|
|
|
1281
1267
|
}
|
|
1282
1268
|
},
|
|
1283
1269
|
update: {
|
|
1284
|
-
|
|
1270
|
+
read() {
|
|
1285
1271
|
if (!this.parallax) {
|
|
1286
|
-
return;
|
|
1272
|
+
return false;
|
|
1287
1273
|
}
|
|
1288
1274
|
const target = this.parallaxTarget;
|
|
1289
1275
|
const start = util.toPx(this.parallaxStart, "height", target, true);
|
|
1290
1276
|
const end = util.toPx(this.parallaxEnd, "height", target, true);
|
|
1291
1277
|
const percent = ease(util.scrolledOver(target, start, end), this.parallaxEasing);
|
|
1292
|
-
|
|
1278
|
+
return { parallax: this.getIndexAt(percent) };
|
|
1279
|
+
},
|
|
1280
|
+
write({ parallax }) {
|
|
1281
|
+
const [prevIndex, slidePercent] = parallax;
|
|
1293
1282
|
const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
|
|
1294
1283
|
const prev = this.slides[prevIndex];
|
|
1295
1284
|
const next = this.slides[nextIndex];
|
|
@@ -1434,6 +1423,9 @@
|
|
|
1434
1423
|
return this.show(duration, percent, true);
|
|
1435
1424
|
},
|
|
1436
1425
|
translate(percent) {
|
|
1426
|
+
if (percent === this.percent()) {
|
|
1427
|
+
return;
|
|
1428
|
+
}
|
|
1437
1429
|
const distance = this.getDistance() * dir * (util.isRtl ? -1 : 1);
|
|
1438
1430
|
util.css(
|
|
1439
1431
|
list,
|
|
@@ -1652,7 +1644,7 @@
|
|
|
1652
1644
|
this.dir > 0 && i < index ? 1 : this.dir < 0 && i >= this.index ? -1 : ""
|
|
1653
1645
|
)
|
|
1654
1646
|
);
|
|
1655
|
-
if (!this.center) {
|
|
1647
|
+
if (!this.center || !this.length) {
|
|
1656
1648
|
return;
|
|
1657
1649
|
}
|
|
1658
1650
|
const next = this.slides[index];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.b50e1953b | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,I){typeof exports=="object"&&typeof module<"u"?module.exports=I(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],I):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider=I(s.UIkit.util))})(this,function(s){"use strict";function I(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&ut(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function ut(t,e){for(const{read:i,write:n,events:o=[]}of t._updates){if(!e.has("update")&&!o.some(h=>e.has(h)))continue;let r;i&&(r=i.call(t,t._data,e),r&&s.isPlainObject(r)&&s.assign(t._data,r)),n&&r!==!1&&s.fastdom.write(()=>{t._connected&&n.call(t,t._data,e)})}}function z(t){return P(s.observeResize,t,"resize")}function mt(t){return P(s.observeIntersection,t)}function pt(t={}){return mt({handler:function(e,i){const{targets:n=this.$el,preload:o=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,o-1).forEach(h=>s.removeAttr(h,"loading"));for(const r of e.filter(({isIntersecting:h})=>h).map(({target:h})=>h))i.unobserve(r)},...t})}function xt(t){return P((e,i)=>({disconnect:s.on(vt(e),"scroll",i,{passive:!0})}),t,"scroll")}function P(t,e,i){return{observe:t,handler(){I(this,i)},...e}}function vt(t){return s.toNodes(t).map(e=>{const{ownerDocument:i}=e,n=s.scrollParent(e,!0);return n===i.scrollingElement?i:n})}var wt={connected(){s.addClass(this.$el,this.$options.id)}},It={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,o;let r=0;return((o=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:o.replace(/%s/g,()=>e[r++]||""))||""}}},bt={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:()=>document,filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&s.matches(this.$el,":focus-within")&&!s.matches(this.$el,":focus")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const b={passive:!1,capture:!0},V={passive:!0,capture:!0},$t="touchstart mousedown",D="touchmove mousemove",U="touchend touchcancel mouseup click input scroll",q=t=>t.preventDefault();var yt={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,e(i)}}},events:[{name:$t,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||this.parallax||!s.isTouch(t)&&St(t.target)||t.target.closest(s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:D,el(){return this.list},handler:s.noop,...b}],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,D,this.move,b),s.on(document,U,this.end,V),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;this.dragging||s.on(this.list,"click",q,b),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,o=Math.abs(e),r=this.getIndex(n+this.dir),h=G.call(this,n,r);for(;r!==n&&o>h;)this.drag-=h*this.dir,n=r,o-=h,r=this.getIndex(n+this.dir),h=G.call(this,n,r);this.percent=o/h;const a=i[n],c=i[r],l=this.index!==r,d=n===r;let f;for(const g of[this.index,this.prevIndex])s.includes([r,n],g)||(s.trigger(i[g],"itemhidden",[this]),d&&(f=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||f)&&s.trigger(i[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=r,d||(s.trigger(a,"beforeitemhide",[this]),s.trigger(a,"itemhide",[this])),s.trigger(c,"beforeitemshow",[this]),s.trigger(c,"itemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!d&&c)},end(){if(s.off(document,D,this.move,b),s.off(document,U,this.end,V),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 t=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}setTimeout(()=>s.off(this.list,"click",q,b)),s.css(this.list,{userSelect:""}),this.drag=this.percent=null}}};function G(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}function St(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}s.memoize((t,e)=>{const i=Object.keys(e),n=i.concat(t).map(o=>[s.hyphenate(o),`data-${s.hyphenate(o)}`]).flat();return{attributes:i,filter:n}});let kt=1;function X(t,e=null){return(e==null?void 0:e.id)||`${t.$options.id}-${kt++}`}const $={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var Ct={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},e)=>s.$(t,e),navChildren(){return s.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,e){return s.$$(this.selNavItem,e)}},watch:{nav(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},list(t){s.isTag(t,"ul")&&s.attr(t,"role","presentation")},navChildren(t){s.attr(t,"role","presentation")},navItems(t){for(const e of t){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;let o,r=null;if(s.isNumeric(i)){const h=s.toNumber(i),a=this.slides[h];a&&(a.id||(a.id=X(this,a)),r=a.id),o=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=X(this,this.list)),r=this.list.id),o=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||o})}},slides(t){t.forEach((e,i)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const e=this.navChildren.length;if(this.nav&&t!==e){s.empty(this.nav);for(let i=0;i<t;i++)s.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){s.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},filter(){return!this.parallax},handler(t){t.target.closest("a,button")&&(t.type==="click"||t.keyCode===$.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},filter(){return!this.parallax},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let o=i===$.HOME?0:i===$.END?"last":i===$.LEFT?"previous":i===$.RIGHT?"next":-1;~o&&(t.preventDefault(),this.show(o))}}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;if(s.isNumeric(i)){const r=s.toNumber(i)===t;s.toggleClass(e,this.clsActive,r),s.toggleClass(n,"uk-disabled",this.parallax),s.attr(n,{"aria-selected":r,tabindex:r&&!this.parallax?null:-1}),r&&n&&s.matches(s.parent(e),":focus-within")&&n.focus()}else s.toggleClass(e,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},_t={mixins:[bt,yt,Ct,It],props:{clsActivated:String,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:"",clsEnter:"uk-slide-enter",clsLeave:"uk-slide-leave",clsSlideActive:"uk-slide-active",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:t},e)=>Q(e.offsetWidth/t),list:({selList:t},e)=>s.$(t,e),maxIndex(){return this.length-1},slides(){return s.children(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},events:{itemshow({target:t}){s.addClass(t,this.clsEnter,this.clsSlideActive)},itemshown({target:t}){s.removeClass(t,this.clsEnter)},itemhide({target:t}){s.addClass(t,this.clsLeave)},itemhidden({target:t}){s.removeClass(t,this.clsLeave,this.clsSlideActive)}},methods:{show(t,e=!1){var i;if(this.dragging||!this.length||this.parallax)return;const{stack:n}=this,o=e?0:n.length,r=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const h=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[h],c=this.getIndex(t,this.index),l=this.slides[c];if(a===l){r();return}if(this.dir=At(t,h),this.prevIndex=h,this.index=c,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const d=this._show(a,l,e).then(()=>{a&&s.trigger(a,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,n.length&&requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&s.trigger(a,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return s.clamp(s.getIndex(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?e.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}),!i&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e===i?!1:e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,i*(s.isRtl?-1:1),n)}}};function At(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function Q(t){return .5*t+300}var Mt={props:{media:Boolean},data:{media:!1},connected(){const t=Et(this.media,this.$el);if(this.matchMedia=!0,t){this.mediaObj=window.matchMedia(t);const e=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var t;(t=this.offMediaObj)==null||t.call(this)}};function Et(t,e){if(s.isString(t)){if(s.startsWith(t,"@"))t=s.toFloat(s.css(e,`--uk-breakpoint-${t.substr(1)}`));else if(isNaN(t))return t}return t&&s.isNumeric(t)?`(min-width: ${t}px)`:""}function Nt(t,e){var i;return(i=t==null?void 0:t.startsWith)==null?void 0:i.call(t,e)}const{isArray:we,from:Ot}=Array;function Tt(t){return typeof t=="function"}function F(t){return t!==null&&typeof t=="object"}function Pt(t){return F(t)&&t===t.window}function Dt(t){return K(t)===9}function J(t){return K(t)>=1}function K(t){return!Pt(t)&&F(t)&&t.nodeType}function R(t){return typeof t=="string"}function Ft(t){return t===void 0}function y(t){return t&&p(t)[0]}function p(t){return J(t)?[t]:Array.from(t||[]).filter(J)}function Y(t){const e=Object.create(null);return(i,...n)=>e[i]||(e[i]=t(i,...n))}function W(t,e,i){var n;if(F(e)){for(const o in e)W(t,o,e[o]);return}if(Ft(i))return(n=y(t))==null?void 0:n.getAttribute(e);for(const o of p(t))Tt(i)&&(i=i.call(o,W(o,e))),i===null?Rt(o,e):o.setAttribute(e,i)}function Rt(t,e){p(t).forEach(i=>i.removeAttribute(e))}const Wt=typeof window<"u"&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function jt(t){return p(t).some(e=>Wt.call(e))}function Ht(t){var e;return(e=y(t))==null?void 0:e.parentElement}function Lt(t,e){return p(t).filter(i=>Z(i,e))}function Z(t,e){return p(t).some(i=>i.matches(e))}function Bt(t,e){t=y(t);const i=t?Ot(t.children):[];return e?Lt(i,e):i}function tt(t,e){return e?p(t).indexOf(y(e)):Bt(Ht(t)).indexOf(t)}function zt(t,e){return p(Xt(t,y(e),"querySelectorAll"))}const Vt=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,Ut=/.*?[^\\](?![^(]*\))(?:,|$)/g,qt=/\s*,$/,Gt=Y(t=>{var e;t=t.replace(Vt,"$1 *");let i=!1;const n=[];for(let o of(e=t.match(Ut))!=null?e:[])o=o.replace(qt,"").trim(),i||(i=["!","+","~","-",">"].includes(o[0])),n.push(o);return{selector:n.join(","),selectors:n,isContextSelector:i}}),et=Y(t=>{t=t.substr(1).trim();const e=t.indexOf(" ");return~e?[t.substring(0,e),t.substring(e+1)]:[t,""]});function Xt(t,e=document,i){if(!t||!R(t))return t;const n=Gt(t);if(!n.isContextSelector)return j(e,i,n.selector);t="";const o=n.selectors.length===1;for(let r of n.selectors){let h,a=e;if(r[0]==="!"&&([h,r]=et(r),a=e.parentElement.closest(h),!r&&o)||a&&r[0]==="-"&&([h,r]=et(r),a=a.previousElementSibling,a=Z(a,h)?a:null,!r&&o))return a;if(a){if(o)return r[0]==="~"||r[0]==="+"?(r=`:scope > :nth-child(${tt(a)+1}) ${r}`,a=a.parentElement):r[0]===">"&&(r=`:scope ${r}`),j(a,i,r);t+=`${t?",":""}${Qt(a)} ${r}`}}return Dt(e)||(e=e.ownerDocument),j(e,i,t)}function j(t,e,i){try{return t[e](i)}catch{return null}}function Qt(t){const e=[];for(;t.parentNode;){const i=W(t,"id");if(i){e.unshift(`#${Jt(i)}`);break}else{let{tagName:n}=t;n!=="HTML"&&(n+=`:nth-child(${tt(t)+1})`),e.unshift(n),t=t.parentNode}}return e.join(" > ")}function Jt(t){return R(t)?CSS.escape(t):""}const Kt=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Yt(t){const e=Kt.exec(t);if(e)return document.createElement(e[1]);const i=document.createElement("template");return i.innerHTML=t.trim(),Zt(i.content.childNodes)}function Zt(t){return t.length>1?t:t[0]}function te(t,e){return ee(t)?p(Yt(t)):zt(t,e)}function ee(t){return R(t)&&Nt(t.trim(),"<")}function se(t){return jt(t)?Math.ceil(Math.max(0,...te("[stroke]",t).map(e=>e.getTotalLength()))):0}const A={x:M,y:M,rotate:M,scale:M,color:H,backgroundColor:H,borderColor:H,blur:x,hue:x,fopacity:x,grayscale:x,invert:x,saturate:x,sepia:x,opacity:ne,stroke:re,bgx:it,bgy:it},{keys:st}=Object;ht(st(A),"list"),ht(st(A),void 0);function M(t,e,i){let n=N(i)||{x:"px",y:"px",rotate:"deg"}[t]||"",o;return t==="x"||t==="y"?(t=`translate${s.ucfirst(t)}`,o=r=>s.toFloat(s.toFloat(r).toFixed(n==="px"?0:6))):t==="scale"&&(n="",o=r=>{var h;return N([r])?s.toPx(r,"width",e,!0)/e[`offset${(h=r.endsWith)!=null&&h.call(r,"vh")?"Height":"Width"}`]:s.toFloat(r)}),i.length===1&&i.unshift(t==="scale"?1:0),i=v(i,o),(r,h)=>{r.transform=`${r.transform||""} ${t}(${S(i,h)}${n})`}}function H(t,e,i){return i.length===1&&i.unshift(k(e,t,"")),i=v(i,n=>ie(e,n)),(n,o)=>{const[r,h,a]=at(i,o),c=r.map((l,d)=>(l+=a*(h[d]-l),d===3?s.toFloat(l):parseInt(l,10))).join(",");n[t]=`rgba(${c})`}}function ie(t,e){return k(t,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function x(t,e,i){i.length===1&&i.unshift(0);const n=N(i)||{blur:"px",hue:"deg"}[t]||"%";return t={fopacity:"opacity",hue:"hue-rotate"}[t]||t,i=v(i),(o,r)=>{const h=S(i,r);o.filter=`${o.filter||""} ${t}(${h+n})`}}function ne(t,e,i){return i.length===1&&i.unshift(k(e,t,"")),i=v(i),(n,o)=>{n[t]=S(i,o)}}function re(t,e,i){i.length===1&&i.unshift(0);const n=N(i),o=se(e);return i=v(i.reverse(),r=>(r=s.toFloat(r),n==="%"?r*o/100:r)),i.some(([r])=>r)?(s.css(e,"strokeDasharray",o),(r,h)=>{r.strokeDashoffset=S(i,h)}):s.noop}function it(t,e,i,n){i.length===1&&i.unshift(0);const o=t==="bgy"?"height":"width";n[t]=v(i,a=>s.toPx(a,o,e));const r=["bgx","bgy"].filter(a=>a in n);if(r.length===2&&t==="bgx")return s.noop;if(k(e,"backgroundSize","")==="cover")return oe(t,e,i,n);const h={};for(const a of r)h[a]=nt(e,a);return rt(r,h,n)}function oe(t,e,i,n){const o=ae(e);if(!o.width)return s.noop;const r={width:e.offsetWidth,height:e.offsetHeight},h=["bgx","bgy"].filter(d=>d in n),a={};for(const d of h){const f=n[d].map(([T])=>T),g=Math.min(...f),u=Math.max(...f),m=f.indexOf(g)<f.indexOf(u),_=u-g;a[d]=`${(m?-_:0)-(m?g:u)}px`,r[d==="bgy"?"height":"width"]+=_}const c=s.Dimensions.cover(o,r);for(const d of h){const f=d==="bgy"?"height":"width",g=c[f]-r[f];a[d]=`max(${nt(e,d)},-${g}px) + ${a[d]}`}const l=rt(h,a,n);return(d,f)=>{l(d,f),d.backgroundSize=`${c.width}px ${c.height}px`,d.backgroundRepeat="no-repeat"}}function nt(t,e){return k(t,`background-position-${e.substr(-1)}`,"")}function rt(t,e,i){return function(n,o){for(const r of t){const h=S(i[r],o);n[`background-position-${r.substr(-1)}`]=`calc(${e[r]} + ${h}px)`}}}const ot={},E={};function ae(t){const e=s.css(t,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(E[e])return E[e];const i=new Image;return e&&(i.src=e,!i.naturalWidth&&!ot[e])?(s.once(i,"error load",()=>{E[e]=L(i),s.trigger(t,s.createEvent("load",!1))}),ot[e]=!0,L(i)):E[e]=L(i)}function L(t){return{width:t.naturalWidth,height:t.naturalHeight}}function v(t,e=s.toFloat){const i=[],{length:n}=t;let o=0;for(let r=0;r<n;r++){let[h,a]=s.isString(t[r])?t[r].trim().split(/ (?![^(]*\))/):[t[r]];if(h=e(h),a=a?s.toFloat(a)/100:null,r===0?a===null?a=0:a&&i.push([h,0]):r===n-1&&(a===null?a=1:a!==1&&(i.push([h,a]),a=1)),i.push([h,a]),a===null)o++;else if(o){const c=i[r-o-1][1],l=(a-c)/(o+1);for(let d=o;d>0;d--)i[r-d][1]=c+l*(o-d+1);o=0}}return i}function at(t,e){const i=s.findIndex(t.slice(1),([,n])=>e<=n)+1;return[t[i-1][0],t[i][0],(e-t[i-1][1])/(t[i][1]-t[i-1][1])]}function S(t,e){const[i,n,o]=at(t,e);return i+Math.abs(i-n)*o*(i<n?1:-1)}const he=/^-?\d+(?:\.\d+)?(\S+)?/;function N(t,e){var i;for(const n of t){const o=(i=n.match)==null?void 0:i.call(n,he);if(o)return o[1]}return e}function k(t,e,i){const n=t.style[e],o=s.css(s.css(t,e,i),e);return t.style[e]=n,o}function ht(t,e){return t.reduce((i,n)=>(i[n]=e,i),{})}function de(t,e){return e>=0?Math.pow(t,e+1):1-Math.pow(1-t,1-e)}var ce={props:{parallax:Boolean,parallaxTarget:Boolean,parallaxStart:String,parallaxEnd:String,parallaxEasing:Number},data:{parallax:!1,parallaxTarget:!1,parallaxStart:0,parallaxEnd:0,parallaxEasing:0},observe:[z({target:({$el:t,parallaxTarget:e})=>[t,e],filter:({parallax:t})=>t}),xt({filter:({parallax:t})=>t})],computed:{parallaxTarget({parallaxTarget:t},e){return t&&s.query(t,e)||this.list}},update:{write(){if(!this.parallax)return;const t=this.parallaxTarget,e=s.toPx(this.parallaxStart,"height",t,!0),i=s.toPx(this.parallaxEnd,"height",t,!0),n=de(s.scrolledOver(t,e,i),this.parallaxEasing),[o,r]=this.getIndexAt(n),h=this.getValidIndex(o+Math.ceil(r)),a=this.slides[o],c=this.slides[h],{triggerShow:l,triggerShown:d,triggerHide:f,triggerHidden:g}=le(this);if(~this.prevIndex)for(const m of new Set([this.index,this.prevIndex]))s.includes([h,o],m)||(f(this.slides[m]),g(this.slides[m]));const u=this.prevIndex!==o||this.index!==h;this.dir=1,this.prevIndex=o,this.index=h,a!==c&&f(a),l(c),u&&d(a),this._translate(a===c?1:r,a,c)},events:["scroll","resize"]},methods:{getIndexAt(t){const e=t*(this.length-1);return[Math.floor(e),e%1]}}};function le(t){const{clsSlideActive:e,clsEnter:i,clsLeave:n}=t;return{triggerShow:o,triggerShown:r,triggerHide:h,triggerHidden:a};function o(c){s.hasClass(c,n)&&(h(c),a(c)),s.hasClass(c,e)||(s.trigger(c,"beforeitemshow",[t]),s.trigger(c,"itemshow",[t]))}function r(c){s.hasClass(c,i)&&s.trigger(c,"itemshown",[t])}function h(c){s.hasClass(c,e)||o(c),s.hasClass(c,i)&&r(c),s.hasClass(c,n)||(s.trigger(c,"beforeitemhide",[t]),s.trigger(c,"itemhide",[t]))}function a(c){s.hasClass(c,n)&&s.trigger(c,"itemhidden",[t])}}var fe={update:{write(){if(this.stack.length||this.dragging||this.parallax)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},ge={observe:pt({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()}),methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};function dt(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function ue(t,e,i,{center:n,easing:o,list:r}){const h=t?C(t,r,n):C(e,r,n)+s.dimensions(e).width*i,a=e?C(e,r,n):h+s.dimensions(t).width*i*(s.isRtl?-1:1);let c;return{dir:i,show(l,d=0,f){const g=f?"linear":o;return l-=Math.round(l*s.clamp(d,-1,1)),this.translate(d),d=t?d:s.clamp(d,0,1),B(this.getItemIn(),"itemin",{percent:d,duration:l,timing:g,dir:i}),t&&B(this.getItemIn(!0),"itemout",{percent:1-d,duration:l,timing:g,dir:i}),new Promise(u=>{c||(c=u),s.Transition.start(r,{transform:dt(-a*(s.isRtl?-1:1),"px")},l,g).then(c,s.noop)})},cancel(){return s.Transition.cancel(r)},reset(){s.css(r,"transform","")},async forward(l,d=this.percent()){return await this.cancel(),this.show(l,d,!0)},translate(l){const d=this.getDistance()*i*(s.isRtl?-1:1);s.css(r,"transform",dt(s.clamp(-a+(d-d*l),-w(r),s.dimensions(r).width)*(s.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),u=this.getItemIn(!0);l=t?s.clamp(l,-1,1):0;for(const m of s.children(r)){const _=s.includes(f,m),T=m===g,gt=m===u,ve=T||!gt&&(_||i*(s.isRtl?-1:1)===-1^O(m,r)>O(t||e));B(m,`itemtranslate${ve?"in":"out"}`,{dir:i,percent:gt?1-l:T?l:_?1:0})}},percent(){return Math.abs((s.css(r,"transform").split(",")[4]*(s.isRtl?-1:1)+h)/(a-h))},getDistance(){return Math.abs(a-h)},getItemIn(l=!1){let d=this.getActives(),f=lt(r,C(e||t,r,n));if(l){const g=d;d=f,f=g}return f[s.findIndex(f,g=>!s.includes(d,g))]},getActives(){return lt(r,C(t||e,r,n))}}}function C(t,e,i){const n=O(t,e);return i?n-me(t,e):Math.min(n,ct(e))}function ct(t){return Math.max(0,w(t)-s.dimensions(t).width)}function w(t,e){return s.sumBy(s.children(t).slice(0,e),i=>s.dimensions(i).width)}function me(t,e){return s.dimensions(e).width/2-s.dimensions(t).width/2}function O(t,e){return t&&(s.position(t).left+(s.isRtl?s.dimensions(t).width-s.dimensions(e).width:0))*(s.isRtl?-1:1)||0}function lt(t,e){e-=1;const i=s.dimensions(t).width,n=e+i+2;return s.children(t).filter(o=>{const r=O(o,t),h=r+Math.min(s.dimensions(o).width,i);return r>=e&&h<=n})}function B(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}var ft={mixins:[wt,_t,fe,ce,ge],props:{center:Boolean,sets:Boolean,active:String},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",active:"all",Transitioner:ue},computed:{finite({finite:t}){return t||pe(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 t=0;const e=ct(this.list),i=s.findIndex(this.slides,n=>{if(t>=e)return!0;t+=s.dimensions(n).width});return~i?i:this.length-1},sets({sets:t}){if(!t||this.parallax)return;let e=0;const i=[],n=s.dimensions(this.list).width;for(let o=0;o<this.length;o++){const r=s.dimensions(this.slides[o]).width;e+r>n&&(e=0),this.center?e<n/2&&e+r+s.dimensions(this.slides[s.getIndex(+o+1,this.slides)]).width/2>n/2&&(i.push(+o),e=n/2-r/2):e===0&&i.push(Math.min(+o,this.maxIndex)),e+=r}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}},slides(){return s.children(this.list).filter(s.isVisible)}},connected(){s.toggleClass(this.$el,this.clsContainer,!s.$(`.${this.clsContainer}`,this.$el))},observe:z({target:({slides:t,$el:e})=>[e,...t]}),update:{write(){for(const t of this.navItems){const e=s.toNumber(s.data(t,this.attrItem));e!==!1&&(t.hidden=!this.maxIndex||e>this.maxIndex||this.sets&&!s.includes(this.sets,e))}this.reorder(),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!s.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const e=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&&e>1){for(let o=0;o<e;o++)this.stack.splice(1,0,this.dir>0?"next":"previous");t.preventDefault();return}const i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex,n=w(this.list)/this.length;this.duration=Q(n/this.velocity)*(s.dimensions(this.slides[i]).width/n),this.reorder()},itemshow(){~this.prevIndex&&s.addClass(this._getTransitioner().getItemIn(),this.clsActive),this.updateActiveClasses(this.prevIndex)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){s.css(this.slides,"order","");return}const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((o,r)=>s.css(o,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const e=this.slides[t];let i=s.dimensions(this.list).width/2-s.dimensions(e).width/2,n=0;for(;i>0;){const o=this.getIndex(--n+t,t),r=this.slides[o];s.css(r,"order",o>t?-2:-1),i-=s.dimensions(r).width}},updateActiveClasses(t=this.index){let e=this._getTransitioner(t).getActives();this.active!=="all"&&(e=[this.slides[this.getValidIndex(t)]]);const i=[this.clsActive,!this.sets||s.includes(this.sets,s.toFloat(this.index))?this.clsActivated:""];for(const n of this.slides){const o=s.includes(e,n);s.toggleClass(n,i,o),s.attr(n,"aria-hidden",!o);for(const r of s.$$(s.selFocusable,n))s.hasOwn(r,"_tabindex")||(r._tabindex=s.attr(r,"tabindex")),s.attr(r,"tabindex",o?r._tabindex:-1)}},getValidIndex(t=this.index,e=this.prevIndex){if(t=this.getIndex(t,e),!this.sets)return t;let i;do{if(s.includes(this.sets,t))return t;i=t,t=this.getIndex(t+this.dir,e)}while(t!==i);return t},getAdjacentSlides(){const{width:t}=s.dimensions(this.list),e=-t,i=t*2,n=s.dimensions(this.slides[this.index]).width,o=this.center?t/2-n/2:0,r=new Set;for(const h of[-1,1]){let a=o+(h>0?n:0),c=0;do{const l=this.slides[this.getIndex(this.index+h+c++*h)];a+=s.dimensions(l).width*h,r.add(l)}while(this.length>c&&a>e&&a<i)}return Array.from(r)},getIndexAt(t){let e=-1;const i=this.center?w(this.list)-(s.dimensions(this.slides[0]).width/2+s.dimensions(s.last(this.slides)).width/2):w(this.list,this.maxIndex);let n=t*i,o=0;do{const r=s.dimensions(this.slides[++e]).width,h=this.center?r/2+s.dimensions(this.slides[e+1]).width/2:r;o=n/h%1,n-=h}while(n>=0&&e<this.maxIndex);return[e,o]}}};function pe(t,e){if(!t||t.length<2)return!0;const{width:i}=s.dimensions(t);if(!e)return Math.ceil(w(t))<Math.trunc(i+xe(t));const n=s.children(t),o=Math.trunc(i/2);for(const r in n){const h=n[r],a=s.dimensions(h).width,c=new Set([h]);let l=0;for(const d of[-1,1]){let f=a/2,g=0;for(;f<o;){const u=n[s.getIndex(+r+d+g++*d,n)];if(c.has(u))return!0;f+=s.dimensions(u).width,c.add(u)}l=Math.max(l,a/2+s.dimensions(n[s.getIndex(+r+d,n)]).width/2-(f-o))}if(Math.trunc(l)>s.sumBy(n.filter(d=>!c.has(d)),d=>s.dimensions(d).width))return!0}return!1}function xe(t){return Math.max(0,...s.children(t).map(e=>s.dimensions(e).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",ft),ft});
|
|
1
|
+
/*! UIkit 3.20.9-dev.e2e1b058d | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,I){typeof exports=="object"&&typeof module<"u"?module.exports=I(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],I):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider=I(s.UIkit.util))})(this,function(s){"use strict";function I(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&ut(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function ut(t,e){for(const{read:i,write:n,events:o=[]}of t._updates){if(!e.has("update")&&!o.some(h=>e.has(h)))continue;let r;i&&(r=i.call(t,t._data,e),r&&s.isPlainObject(r)&&s.assign(t._data,r)),n&&r!==!1&&s.fastdom.write(()=>{t._connected&&n.call(t,t._data,e)})}}function z(t){return P(s.observeResize,t,"resize")}function mt(t){return P(s.observeIntersection,t)}function pt(t={}){return mt({handler:function(e,i){const{targets:n=this.$el,preload:o=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,o-1).forEach(h=>s.removeAttr(h,"loading"));for(const r of e.filter(({isIntersecting:h})=>h).map(({target:h})=>h))i.unobserve(r)},...t})}function xt(t){return P((e,i)=>({disconnect:s.on(vt(e),"scroll",i,{passive:!0})}),t,"scroll")}function P(t,e,i){return{observe:t,handler(){I(this,i)},...e}}function vt(t){return s.toNodes(t).map(e=>{const{ownerDocument:i}=e,n=s.scrollParent(e,!0);return n===i.scrollingElement?i:n})}var wt={connected(){s.addClass(this.$el,this.$options.id)}},It={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,o;let r=0;return((o=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:o.replace(/%s/g,()=>e[r++]||""))||""}}},bt={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:()=>document,filter:({autoplay:t})=>t,handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&s.matches(this.$el,":focus-within")&&!s.matches(this.$el,":focus")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const b={passive:!1,capture:!0},V={passive:!0,capture:!0},$t="touchstart mousedown",D="touchmove mousemove",U="touchend touchcancel mouseup click input scroll",q=t=>t.preventDefault();var yt={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,e(i)}}},events:[{name:$t,passive:!0,delegate:({selList:t})=>`${t} > *`,handler(t){!this.draggable||this.parallax||!s.isTouch(t)&&St(t.target)||t.target.closest(s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:D,el:({list:t})=>t,handler:s.noop,...b}],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,D,this.move,b),s.on(document,U,this.end,V),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;this.dragging||s.on(this.list,"click",q,b),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,o=Math.abs(e),r=this.getIndex(n+this.dir),h=G.call(this,n,r);for(;r!==n&&o>h;)this.drag-=h*this.dir,n=r,o-=h,r=this.getIndex(n+this.dir),h=G.call(this,n,r);this.percent=o/h;const a=i[n],c=i[r],l=this.index!==r,d=n===r;let f;for(const g of[this.index,this.prevIndex])s.includes([r,n],g)||(s.trigger(i[g],"itemhidden",[this]),d&&(f=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||f)&&s.trigger(i[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=r,d||(s.trigger(a,"beforeitemhide",[this]),s.trigger(a,"itemhide",[this])),s.trigger(c,"beforeitemshow",[this]),s.trigger(c,"itemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!d&&c)},end(){if(s.off(document,D,this.move,b),s.off(document,U,this.end,V),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 t=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}setTimeout(()=>s.off(this.list,"click",q,b)),s.css(this.list,{userSelect:""}),this.drag=this.percent=null}}};function G(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}function St(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}s.memoize((t,e)=>{const i=Object.keys(e),n=i.concat(t).map(o=>[s.hyphenate(o),`data-${s.hyphenate(o)}`]).flat();return{attributes:i,filter:n}});let kt=1;function X(t,e=null){return(e==null?void 0:e.id)||`${t.$options.id}-${kt++}`}const $={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var Ct={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},e)=>s.$(t,e),navChildren(){return s.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,e){return s.$$(this.selNavItem,e)}},watch:{nav(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},list(t){s.isTag(t,"ul")&&s.attr(t,"role","presentation")},navChildren(t){s.attr(t,"role","presentation")},navItems(t){for(const e of t){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;let o,r=null;if(s.isNumeric(i)){const h=s.toNumber(i),a=this.slides[h];a&&(a.id||(a.id=X(this,a)),r=a.id),o=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=X(this,this.list)),r=this.list.id),o=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||o})}},slides(t){t.forEach((e,i)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const e=this.navChildren.length;if(this.nav&&t!==e){s.empty(this.nav);for(let i=0;i<t;i++)s.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){s.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate:({selNavItem:t})=>t,filter:({parallax:t})=>!t,handler(t){t.target.closest("a,button")&&(t.type==="click"||t.keyCode===$.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate:({selNavItem:t})=>t,filter:({parallax:t})=>!t,handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let o=i===$.HOME?0:i===$.END?"last":i===$.LEFT?"previous":i===$.RIGHT?"next":-1;~o&&(t.preventDefault(),this.show(o))}}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;if(s.isNumeric(i)){const r=s.toNumber(i)===t;s.toggleClass(e,this.clsActive,r),s.toggleClass(n,"uk-disabled",this.parallax),s.attr(n,{"aria-selected":r,tabindex:r&&!this.parallax?null:-1}),r&&n&&s.matches(s.parent(e),":focus-within")&&n.focus()}else s.toggleClass(e,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},_t={mixins:[bt,yt,Ct,It],props:{clsActivated:String,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:"",clsEnter:"uk-slide-enter",clsLeave:"uk-slide-leave",clsSlideActive:"uk-slide-active",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:t},e)=>Q(e.offsetWidth/t),list:({selList:t},e)=>s.$(t,e),maxIndex(){return this.length-1},slides(){return s.children(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},events:{itemshow({target:t}){s.addClass(t,this.clsEnter,this.clsSlideActive)},itemshown({target:t}){s.removeClass(t,this.clsEnter)},itemhide({target:t}){s.addClass(t,this.clsLeave)},itemhidden({target:t}){s.removeClass(t,this.clsLeave,this.clsSlideActive)}},methods:{show(t,e=!1){var i;if(this.dragging||!this.length||this.parallax)return;const{stack:n}=this,o=e?0:n.length,r=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const h=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[h],c=this.getIndex(t,this.index),l=this.slides[c];if(a===l){r();return}if(this.dir=At(t,h),this.prevIndex=h,this.index=c,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const d=this._show(a,l,e).then(()=>{a&&s.trigger(a,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,n.length&&requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&s.trigger(a,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return s.clamp(s.getIndex(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?e.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}),!i&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e===i?!1:e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,i*(s.isRtl?-1:1),n)}}};function At(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function Q(t){return .5*t+300}var Mt={props:{media:Boolean},data:{media:!1},connected(){const t=Et(this.media,this.$el);if(this.matchMedia=!0,t){this.mediaObj=window.matchMedia(t);const e=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var t;(t=this.offMediaObj)==null||t.call(this)}};function Et(t,e){if(s.isString(t)){if(s.startsWith(t,"@"))t=s.toFloat(s.css(e,`--uk-breakpoint-${t.substr(1)}`));else if(isNaN(t))return t}return t&&s.isNumeric(t)?`(min-width: ${t}px)`:""}function Nt(t,e){var i;return(i=t==null?void 0:t.startsWith)==null?void 0:i.call(t,e)}const{isArray:we,from:Ot}=Array;function Tt(t){return typeof t=="function"}function F(t){return t!==null&&typeof t=="object"}function Pt(t){return F(t)&&t===t.window}function Dt(t){return K(t)===9}function J(t){return K(t)>=1}function K(t){return!Pt(t)&&F(t)&&t.nodeType}function R(t){return typeof t=="string"}function Ft(t){return t===void 0}function y(t){return t&&m(t)[0]}function m(t){return J(t)?[t]:Array.from(t||[]).filter(J)}function Y(t){const e=Object.create(null);return(i,...n)=>e[i]||(e[i]=t(i,...n))}function W(t,e,i){var n;if(F(e)){for(const o in e)W(t,o,e[o]);return}if(Ft(i))return(n=y(t))==null?void 0:n.getAttribute(e);for(const o of m(t))Tt(i)&&(i=i.call(o,W(o,e))),i===null?Rt(o,e):o.setAttribute(e,i)}function Rt(t,e){m(t).forEach(i=>i.removeAttribute(e))}const Wt=typeof window<"u"&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function jt(t){return m(t).some(e=>Wt.call(e))}function Ht(t){var e;return(e=y(t))==null?void 0:e.parentElement}function Lt(t,e){return m(t).filter(i=>Z(i,e))}function Z(t,e){return m(t).some(i=>i.matches(e))}function Bt(t,e){t=y(t);const i=t?Ot(t.children):[];return e?Lt(i,e):i}function tt(t,e){return e?m(t).indexOf(y(e)):Bt(Ht(t)).indexOf(t)}function zt(t,e){return m(Xt(t,y(e),"querySelectorAll"))}const Vt=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,Ut=/.*?[^\\](?![^(]*\))(?:,|$)/g,qt=/\s*,$/,Gt=Y(t=>{var e;t=t.replace(Vt,"$1 *");let i=!1;const n=[];for(let o of(e=t.match(Ut))!=null?e:[])o=o.replace(qt,"").trim(),i||(i=["!","+","~","-",">"].includes(o[0])),n.push(o);return{selector:n.join(","),selectors:n,isContextSelector:i}}),et=Y(t=>{t=t.substr(1).trim();const e=t.indexOf(" ");return~e?[t.substring(0,e),t.substring(e+1)]:[t,""]});function Xt(t,e=document,i){if(!t||!R(t))return t;const n=Gt(t);if(!n.isContextSelector)return j(e,i,n.selector);t="";const o=n.selectors.length===1;for(let r of n.selectors){let h,a=e;if(r[0]==="!"&&([h,r]=et(r),a=e.parentElement.closest(h),!r&&o)||a&&r[0]==="-"&&([h,r]=et(r),a=a.previousElementSibling,a=Z(a,h)?a:null,!r&&o))return a;if(a){if(o)return r[0]==="~"||r[0]==="+"?(r=`:scope > :nth-child(${tt(a)+1}) ${r}`,a=a.parentElement):r[0]===">"&&(r=`:scope ${r}`),j(a,i,r);t+=`${t?",":""}${Qt(a)} ${r}`}}return Dt(e)||(e=e.ownerDocument),j(e,i,t)}function j(t,e,i){try{return t[e](i)}catch{return null}}function Qt(t){const e=[];for(;t.parentNode;){const i=W(t,"id");if(i){e.unshift(`#${Jt(i)}`);break}else{let{tagName:n}=t;n!=="HTML"&&(n+=`:nth-child(${tt(t)+1})`),e.unshift(n),t=t.parentNode}}return e.join(" > ")}function Jt(t){return R(t)?CSS.escape(t):""}const Kt=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Yt(t){const e=Kt.exec(t);if(e)return document.createElement(e[1]);const i=document.createElement("template");return i.innerHTML=t.trim(),Zt(i.content.childNodes)}function Zt(t){return t.length>1?t:t[0]}function te(t,e){return ee(t)?m(Yt(t)):zt(t,e)}function ee(t){return R(t)&&Nt(t.trim(),"<")}function se(t){return jt(t)?Math.ceil(Math.max(0,...te("[stroke]",t).map(e=>e.getTotalLength()))):0}const A={x:M,y:M,rotate:M,scale:M,color:H,backgroundColor:H,borderColor:H,blur:x,hue:x,fopacity:x,grayscale:x,invert:x,saturate:x,sepia:x,opacity:ne,stroke:re,bgx:it,bgy:it},{keys:st}=Object;ht(st(A),"list"),ht(st(A),void 0);function M(t,e,i){let n=N(i)||{x:"px",y:"px",rotate:"deg"}[t]||"",o;return t==="x"||t==="y"?(t=`translate${s.ucfirst(t)}`,o=r=>s.toFloat(s.toFloat(r).toFixed(n==="px"?0:6))):t==="scale"&&(n="",o=r=>{var h;return N([r])?s.toPx(r,"width",e,!0)/e[`offset${(h=r.endsWith)!=null&&h.call(r,"vh")?"Height":"Width"}`]:s.toFloat(r)}),i.length===1&&i.unshift(t==="scale"?1:0),i=v(i,o),(r,h)=>{r.transform=`${r.transform||""} ${t}(${S(i,h)}${n})`}}function H(t,e,i){return i.length===1&&i.unshift(k(e,t,"")),i=v(i,n=>ie(e,n)),(n,o)=>{const[r,h,a]=at(i,o),c=r.map((l,d)=>(l+=a*(h[d]-l),d===3?s.toFloat(l):parseInt(l,10))).join(",");n[t]=`rgba(${c})`}}function ie(t,e){return k(t,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function x(t,e,i){i.length===1&&i.unshift(0);const n=N(i)||{blur:"px",hue:"deg"}[t]||"%";return t={fopacity:"opacity",hue:"hue-rotate"}[t]||t,i=v(i),(o,r)=>{const h=S(i,r);o.filter=`${o.filter||""} ${t}(${h+n})`}}function ne(t,e,i){return i.length===1&&i.unshift(k(e,t,"")),i=v(i),(n,o)=>{n[t]=S(i,o)}}function re(t,e,i){i.length===1&&i.unshift(0);const n=N(i),o=se(e);return i=v(i.reverse(),r=>(r=s.toFloat(r),n==="%"?r*o/100:r)),i.some(([r])=>r)?(s.css(e,"strokeDasharray",o),(r,h)=>{r.strokeDashoffset=S(i,h)}):s.noop}function it(t,e,i,n){i.length===1&&i.unshift(0);const o=t==="bgy"?"height":"width";n[t]=v(i,a=>s.toPx(a,o,e));const r=["bgx","bgy"].filter(a=>a in n);if(r.length===2&&t==="bgx")return s.noop;if(k(e,"backgroundSize","")==="cover")return oe(t,e,i,n);const h={};for(const a of r)h[a]=nt(e,a);return rt(r,h,n)}function oe(t,e,i,n){const o=ae(e);if(!o.width)return s.noop;const r={width:e.offsetWidth,height:e.offsetHeight},h=["bgx","bgy"].filter(d=>d in n),a={};for(const d of h){const f=n[d].map(([T])=>T),g=Math.min(...f),u=Math.max(...f),p=f.indexOf(g)<f.indexOf(u),_=u-g;a[d]=`${(p?-_:0)-(p?g:u)}px`,r[d==="bgy"?"height":"width"]+=_}const c=s.Dimensions.cover(o,r);for(const d of h){const f=d==="bgy"?"height":"width",g=c[f]-r[f];a[d]=`max(${nt(e,d)},-${g}px) + ${a[d]}`}const l=rt(h,a,n);return(d,f)=>{l(d,f),d.backgroundSize=`${c.width}px ${c.height}px`,d.backgroundRepeat="no-repeat"}}function nt(t,e){return k(t,`background-position-${e.substr(-1)}`,"")}function rt(t,e,i){return function(n,o){for(const r of t){const h=S(i[r],o);n[`background-position-${r.substr(-1)}`]=`calc(${e[r]} + ${h}px)`}}}const ot={},E={};function ae(t){const e=s.css(t,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(E[e])return E[e];const i=new Image;return e&&(i.src=e,!i.naturalWidth&&!ot[e])?(s.once(i,"error load",()=>{E[e]=L(i),s.trigger(t,s.createEvent("load",!1))}),ot[e]=!0,L(i)):E[e]=L(i)}function L(t){return{width:t.naturalWidth,height:t.naturalHeight}}function v(t,e=s.toFloat){const i=[],{length:n}=t;let o=0;for(let r=0;r<n;r++){let[h,a]=s.isString(t[r])?t[r].trim().split(/ (?![^(]*\))/):[t[r]];if(h=e(h),a=a?s.toFloat(a)/100:null,r===0?a===null?a=0:a&&i.push([h,0]):r===n-1&&(a===null?a=1:a!==1&&(i.push([h,a]),a=1)),i.push([h,a]),a===null)o++;else if(o){const c=i[r-o-1][1],l=(a-c)/(o+1);for(let d=o;d>0;d--)i[r-d][1]=c+l*(o-d+1);o=0}}return i}function at(t,e){const i=s.findIndex(t.slice(1),([,n])=>e<=n)+1;return[t[i-1][0],t[i][0],(e-t[i-1][1])/(t[i][1]-t[i-1][1])]}function S(t,e){const[i,n,o]=at(t,e);return i+Math.abs(i-n)*o*(i<n?1:-1)}const he=/^-?\d+(?:\.\d+)?(\S+)?/;function N(t,e){var i;for(const n of t){const o=(i=n.match)==null?void 0:i.call(n,he);if(o)return o[1]}return e}function k(t,e,i){const n=t.style[e],o=s.css(s.css(t,e,i),e);return t.style[e]=n,o}function ht(t,e){return t.reduce((i,n)=>(i[n]=e,i),{})}function de(t,e){return e>=0?Math.pow(t,e+1):1-Math.pow(1-t,1-e)}var ce={props:{parallax:Boolean,parallaxTarget:Boolean,parallaxStart:String,parallaxEnd:String,parallaxEasing:Number},data:{parallax:!1,parallaxTarget:!1,parallaxStart:0,parallaxEnd:0,parallaxEasing:0},observe:[z({target:({$el:t,parallaxTarget:e})=>[t,e],filter:({parallax:t})=>t}),xt({filter:({parallax:t})=>t})],computed:{parallaxTarget({parallaxTarget:t},e){return t&&s.query(t,e)||this.list}},update:{read(){if(!this.parallax)return!1;const t=this.parallaxTarget,e=s.toPx(this.parallaxStart,"height",t,!0),i=s.toPx(this.parallaxEnd,"height",t,!0),n=de(s.scrolledOver(t,e,i),this.parallaxEasing);return{parallax:this.getIndexAt(n)}},write({parallax:t}){const[e,i]=t,n=this.getValidIndex(e+Math.ceil(i)),o=this.slides[e],r=this.slides[n],{triggerShow:h,triggerShown:a,triggerHide:c,triggerHidden:l}=le(this);if(~this.prevIndex)for(const f of new Set([this.index,this.prevIndex]))s.includes([n,e],f)||(c(this.slides[f]),l(this.slides[f]));const d=this.prevIndex!==e||this.index!==n;this.dir=1,this.prevIndex=e,this.index=n,o!==r&&c(o),h(r),d&&a(o),this._translate(o===r?1:i,o,r)},events:["scroll","resize"]},methods:{getIndexAt(t){const e=t*(this.length-1);return[Math.floor(e),e%1]}}};function le(t){const{clsSlideActive:e,clsEnter:i,clsLeave:n}=t;return{triggerShow:o,triggerShown:r,triggerHide:h,triggerHidden:a};function o(c){s.hasClass(c,n)&&(h(c),a(c)),s.hasClass(c,e)||(s.trigger(c,"beforeitemshow",[t]),s.trigger(c,"itemshow",[t]))}function r(c){s.hasClass(c,i)&&s.trigger(c,"itemshown",[t])}function h(c){s.hasClass(c,e)||o(c),s.hasClass(c,i)&&r(c),s.hasClass(c,n)||(s.trigger(c,"beforeitemhide",[t]),s.trigger(c,"itemhide",[t]))}function a(c){s.hasClass(c,n)&&s.trigger(c,"itemhidden",[t])}}var fe={update:{write(){if(this.stack.length||this.dragging||this.parallax)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},ge={observe:pt({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()}),methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};function dt(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function ue(t,e,i,{center:n,easing:o,list:r}){const h=t?C(t,r,n):C(e,r,n)+s.dimensions(e).width*i,a=e?C(e,r,n):h+s.dimensions(t).width*i*(s.isRtl?-1:1);let c;return{dir:i,show(l,d=0,f){const g=f?"linear":o;return l-=Math.round(l*s.clamp(d,-1,1)),this.translate(d),d=t?d:s.clamp(d,0,1),B(this.getItemIn(),"itemin",{percent:d,duration:l,timing:g,dir:i}),t&&B(this.getItemIn(!0),"itemout",{percent:1-d,duration:l,timing:g,dir:i}),new Promise(u=>{c||(c=u),s.Transition.start(r,{transform:dt(-a*(s.isRtl?-1:1),"px")},l,g).then(c,s.noop)})},cancel(){return s.Transition.cancel(r)},reset(){s.css(r,"transform","")},async forward(l,d=this.percent()){return await this.cancel(),this.show(l,d,!0)},translate(l){if(l===this.percent())return;const d=this.getDistance()*i*(s.isRtl?-1:1);s.css(r,"transform",dt(s.clamp(-a+(d-d*l),-w(r),s.dimensions(r).width)*(s.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),u=this.getItemIn(!0);l=t?s.clamp(l,-1,1):0;for(const p of s.children(r)){const _=s.includes(f,p),T=p===g,gt=p===u,ve=T||!gt&&(_||i*(s.isRtl?-1:1)===-1^O(p,r)>O(t||e));B(p,`itemtranslate${ve?"in":"out"}`,{dir:i,percent:gt?1-l:T?l:_?1:0})}},percent(){return Math.abs((s.css(r,"transform").split(",")[4]*(s.isRtl?-1:1)+h)/(a-h))},getDistance(){return Math.abs(a-h)},getItemIn(l=!1){let d=this.getActives(),f=lt(r,C(e||t,r,n));if(l){const g=d;d=f,f=g}return f[s.findIndex(f,g=>!s.includes(d,g))]},getActives(){return lt(r,C(t||e,r,n))}}}function C(t,e,i){const n=O(t,e);return i?n-me(t,e):Math.min(n,ct(e))}function ct(t){return Math.max(0,w(t)-s.dimensions(t).width)}function w(t,e){return s.sumBy(s.children(t).slice(0,e),i=>s.dimensions(i).width)}function me(t,e){return s.dimensions(e).width/2-s.dimensions(t).width/2}function O(t,e){return t&&(s.position(t).left+(s.isRtl?s.dimensions(t).width-s.dimensions(e).width:0))*(s.isRtl?-1:1)||0}function lt(t,e){e-=1;const i=s.dimensions(t).width,n=e+i+2;return s.children(t).filter(o=>{const r=O(o,t),h=r+Math.min(s.dimensions(o).width,i);return r>=e&&h<=n})}function B(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}var ft={mixins:[wt,_t,fe,ce,ge],props:{center:Boolean,sets:Boolean,active:String},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",active:"all",Transitioner:ue},computed:{finite({finite:t}){return t||pe(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 t=0;const e=ct(this.list),i=s.findIndex(this.slides,n=>{if(t>=e)return!0;t+=s.dimensions(n).width});return~i?i:this.length-1},sets({sets:t}){if(!t||this.parallax)return;let e=0;const i=[],n=s.dimensions(this.list).width;for(let o=0;o<this.length;o++){const r=s.dimensions(this.slides[o]).width;e+r>n&&(e=0),this.center?e<n/2&&e+r+s.dimensions(this.slides[s.getIndex(+o+1,this.slides)]).width/2>n/2&&(i.push(+o),e=n/2-r/2):e===0&&i.push(Math.min(+o,this.maxIndex)),e+=r}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}},slides(){return s.children(this.list).filter(s.isVisible)}},connected(){s.toggleClass(this.$el,this.clsContainer,!s.$(`.${this.clsContainer}`,this.$el))},observe:z({target:({slides:t,$el:e})=>[e,...t]}),update:{write(){for(const t of this.navItems){const e=s.toNumber(s.data(t,this.attrItem));e!==!1&&(t.hidden=!this.maxIndex||e>this.maxIndex||this.sets&&!s.includes(this.sets,e))}this.reorder(),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!s.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const e=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&&e>1){for(let o=0;o<e;o++)this.stack.splice(1,0,this.dir>0?"next":"previous");t.preventDefault();return}const i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex,n=w(this.list)/this.length;this.duration=Q(n/this.velocity)*(s.dimensions(this.slides[i]).width/n),this.reorder()},itemshow(){~this.prevIndex&&s.addClass(this._getTransitioner().getItemIn(),this.clsActive),this.updateActiveClasses(this.prevIndex)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){s.css(this.slides,"order","");return}const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((o,r)=>s.css(o,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:"")),!this.center||!this.length)return;const e=this.slides[t];let i=s.dimensions(this.list).width/2-s.dimensions(e).width/2,n=0;for(;i>0;){const o=this.getIndex(--n+t,t),r=this.slides[o];s.css(r,"order",o>t?-2:-1),i-=s.dimensions(r).width}},updateActiveClasses(t=this.index){let e=this._getTransitioner(t).getActives();this.active!=="all"&&(e=[this.slides[this.getValidIndex(t)]]);const i=[this.clsActive,!this.sets||s.includes(this.sets,s.toFloat(this.index))?this.clsActivated:""];for(const n of this.slides){const o=s.includes(e,n);s.toggleClass(n,i,o),s.attr(n,"aria-hidden",!o);for(const r of s.$$(s.selFocusable,n))s.hasOwn(r,"_tabindex")||(r._tabindex=s.attr(r,"tabindex")),s.attr(r,"tabindex",o?r._tabindex:-1)}},getValidIndex(t=this.index,e=this.prevIndex){if(t=this.getIndex(t,e),!this.sets)return t;let i;do{if(s.includes(this.sets,t))return t;i=t,t=this.getIndex(t+this.dir,e)}while(t!==i);return t},getAdjacentSlides(){const{width:t}=s.dimensions(this.list),e=-t,i=t*2,n=s.dimensions(this.slides[this.index]).width,o=this.center?t/2-n/2:0,r=new Set;for(const h of[-1,1]){let a=o+(h>0?n:0),c=0;do{const l=this.slides[this.getIndex(this.index+h+c++*h)];a+=s.dimensions(l).width*h,r.add(l)}while(this.length>c&&a>e&&a<i)}return Array.from(r)},getIndexAt(t){let e=-1;const i=this.center?w(this.list)-(s.dimensions(this.slides[0]).width/2+s.dimensions(s.last(this.slides)).width/2):w(this.list,this.maxIndex);let n=t*i,o=0;do{const r=s.dimensions(this.slides[++e]).width,h=this.center?r/2+s.dimensions(this.slides[e+1]).width/2:r;o=n/h%1,n-=h}while(n>=0&&e<this.maxIndex);return[e,o]}}};function pe(t,e){if(!t||t.length<2)return!0;const{width:i}=s.dimensions(t);if(!e)return Math.ceil(w(t))<Math.trunc(i+xe(t));const n=s.children(t),o=Math.trunc(i/2);for(const r in n){const h=n[r],a=s.dimensions(h).width,c=new Set([h]);let l=0;for(const d of[-1,1]){let f=a/2,g=0;for(;f<o;){const u=n[s.getIndex(+r+d+g++*d,n)];if(c.has(u))return!0;f+=s.dimensions(u).width,c.add(u)}l=Math.max(l,a/2+s.dimensions(n[s.getIndex(+r+d,n)]).width/2-(f-o))}if(Math.trunc(l)>s.sumBy(n.filter(d=>!c.has(d)),d=>s.dimensions(d).width))return!0}return!1}function xe(t){return Math.max(0,...s.children(t).map(e=>s.dimensions(e).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",ft),ft});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.e2e1b058d | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -578,9 +578,7 @@
|
|
|
578
578
|
{
|
|
579
579
|
name: "itemin itemout",
|
|
580
580
|
self: true,
|
|
581
|
-
el()
|
|
582
|
-
return this.item;
|
|
583
|
-
},
|
|
581
|
+
el: ({ item }) => item,
|
|
584
582
|
handler({ type, detail: { percent, duration, timing, dir } }) {
|
|
585
583
|
uikitUtil.fastdom.read(() => {
|
|
586
584
|
if (!this.matchMedia) {
|
|
@@ -598,9 +596,7 @@
|
|
|
598
596
|
{
|
|
599
597
|
name: "transitioncanceled transitionend",
|
|
600
598
|
self: true,
|
|
601
|
-
el()
|
|
602
|
-
return this.item;
|
|
603
|
-
},
|
|
599
|
+
el: ({ item }) => item,
|
|
604
600
|
handler() {
|
|
605
601
|
uikitUtil.Transition.cancel(this.$el);
|
|
606
602
|
}
|
|
@@ -608,9 +604,7 @@
|
|
|
608
604
|
{
|
|
609
605
|
name: "itemtranslatein itemtranslateout",
|
|
610
606
|
self: true,
|
|
611
|
-
el()
|
|
612
|
-
return this.item;
|
|
613
|
-
},
|
|
607
|
+
el: ({ item }) => item,
|
|
614
608
|
handler({ type, detail: { percent, dir } }) {
|
|
615
609
|
uikitUtil.fastdom.read(() => {
|
|
616
610
|
if (!this.matchMedia) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.e2e1b058d | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],$):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow_parallax=$(s.UIkit.util))})(this,function(s){"use strict";var $={props:{media:Boolean},data:{media:!1},connected(){const n=Y(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function Y(n,t){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function Z(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:Nn,from:k}=Array;function U(n){return typeof n=="function"}function C(n){return n!==null&&typeof n=="object"}function nn(n){return C(n)&&n===n.window}function tn(n){return T(n)===9}function N(n){return T(n)>=1}function T(n){return!nn(n)&&C(n)&&n.nodeType}function M(n){return typeof n=="string"}function en(n){return n===void 0}function b(n){return n&&u(n)[0]}function u(n){return N(n)?[n]:Array.from(n||[]).filter(N)}function W(n){const t=Object.create(null);return(e,...r)=>t[e]||(t[e]=n(e,...r))}function O(n,t,e){var r;if(C(t)){for(const o in t)O(n,o,t[o]);return}if(en(e))return(r=b(n))==null?void 0:r.getAttribute(t);for(const o of u(n))U(e)&&(e=e.call(o,O(o,t))),e===null?rn(o,t):o.setAttribute(t,e)}function rn(n,t){u(n).forEach(e=>e.removeAttribute(t))}const on=typeof window<"u"&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function sn(n){return u(n).some(t=>on.call(t))}function cn(n){var t;return(t=b(n))==null?void 0:t.parentElement}function an(n,t){return u(n).filter(e=>_(e,t))}function _(n,t){return u(n).some(e=>e.matches(t))}function fn(n,t){n=b(n);const e=n?k(n.children):[];return t?an(e,t):e}function A(n,t){return t?u(n).indexOf(b(t)):fn(cn(n)).indexOf(n)}function un(n,t){return u(mn(n,b(t),"querySelectorAll"))}const dn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,hn=/.*?[^\\](?![^(]*\))(?:,|$)/g,ln=/\s*,$/,gn=W(n=>{var t;n=n.replace(dn,"$1 *");let e=!1;const r=[];for(let o of(t=n.match(hn))!=null?t:[])o=o.replace(ln,"").trim(),e||(e=["!","+","~","-",">"].includes(o[0])),r.push(o);return{selector:r.join(","),selectors:r,isContextSelector:e}}),D=W(n=>{n=n.substr(1).trim();const t=n.indexOf(" ");return~t?[n.substring(0,t),n.substring(t+1)]:[n,""]});function mn(n,t=document,e){if(!n||!M(n))return n;const r=gn(n);if(!r.isContextSelector)return P(t,e,r.selector);n="";const o=r.selectors.length===1;for(let i of r.selectors){let a,c=t;if(i[0]==="!"&&([a,i]=D(i),c=t.parentElement.closest(a),!i&&o)||c&&i[0]==="-"&&([a,i]=D(i),c=c.previousElementSibling,c=_(c,a)?c:null,!i&&o))return c;if(c){if(o)return i[0]==="~"||i[0]==="+"?(i=`:scope > :nth-child(${A(c)+1}) ${i}`,c=c.parentElement):i[0]===">"&&(i=`:scope ${i}`),P(c,e,i);n+=`${n?",":""}${$n(c)} ${i}`}}return tn(t)||(t=t.ownerDocument),P(t,e,n)}function P(n,t,e){try{return n[t](e)}catch{return null}}function $n(n){const t=[];for(;n.parentNode;){const e=O(n,"id");if(e){t.unshift(`#${bn(e)}`);break}else{let{tagName:r}=n;r!=="HTML"&&(r+=`:nth-child(${A(n)+1})`),t.unshift(r),n=n.parentNode}}return t.join(" > ")}function bn(n){return M(n)?CSS.escape(n):""}const xn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function pn(n){const t=xn.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("template");return e.innerHTML=n.trim(),wn(e.content.childNodes)}function wn(n){return n.length>1?n:n[0]}function yn(n,t){return vn(n)?u(pn(n)):un(n,t)}function vn(n){return M(n)&&Z(n.trim(),"<")}function Sn(n){return sn(n)?Math.ceil(Math.max(0,...yn("[stroke]",n).map(t=>t.getTotalLength()))):0}const y={x:v,y:v,rotate:v,scale:v,color:j,backgroundColor:j,borderColor:j,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Mn,stroke:On,bgx:R,bgy:R},{keys:H}=Object;var Fn={mixins:[$],props:q(H(y),"list"),data:q(H(y),void 0),computed:{props(n,t){const e={};for(const o in n)o in y&&!s.isUndefined(n[o])&&(e[o]=n[o].slice());const r={};for(const o in e)r[o]=y[o](o,t,e[o],e);return r}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const t={};for(const e in this.props)this.props[e](t,s.clamp(n));return t.willChange=Object.keys(t).map(s.propName).join(","),t}}};function v(n,t,e){let r=F(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",o;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,o=i=>s.toFloat(s.toFloat(i).toFixed(r==="px"?0:6))):n==="scale"&&(r="",o=i=>{var a;return F([i])?s.toPx(i,"width",t,!0)/t[`offset${(a=i.endsWith)!=null&&a.call(i,"vh")?"Height":"Width"}`]:s.toFloat(i)}),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,o),(i,a)=>{i.transform=`${i.transform||""} ${n}(${x(e,a)}${r})`}}function j(n,t,e){return e.length===1&&e.unshift(p(t,n,"")),e=m(e,r=>Cn(t,r)),(r,o)=>{const[i,a,c]=L(e,o),h=i.map((l,f)=>(l+=c*(a[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");r[n]=`rgba(${h})`}}function Cn(n,t){return p(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const r=F(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(o,i)=>{const a=x(e,i);o.filter=`${o.filter||""} ${n}(${a+r})`}}function Mn(n,t,e){return e.length===1&&e.unshift(p(t,n,"")),e=m(e),(r,o)=>{r[n]=x(e,o)}}function On(n,t,e){e.length===1&&e.unshift(0);const r=F(e),o=Sn(t);return e=m(e.reverse(),i=>(i=s.toFloat(i),r==="%"?i*o/100:i)),e.some(([i])=>i)?(s.css(t,"strokeDasharray",o),(i,a)=>{i.strokeDashoffset=x(e,a)}):s.noop}function R(n,t,e,r){e.length===1&&e.unshift(0);const o=n==="bgy"?"height":"width";r[n]=m(e,c=>s.toPx(c,o,t));const i=["bgx","bgy"].filter(c=>c in r);if(i.length===2&&n==="bgx")return s.noop;if(p(t,"backgroundSize","")==="cover")return Pn(n,t,e,r);const a={};for(const c of i)a[c]=B(t,c);return V(i,a,r)}function Pn(n,t,e,r){const o=jn(t);if(!o.width)return s.noop;const i={width:t.offsetWidth,height:t.offsetHeight},a=["bgx","bgy"].filter(f=>f in r),c={};for(const f of a){const d=r[f].map(([En])=>En),w=Math.min(...d),E=Math.max(...d),K=d.indexOf(w)<d.indexOf(E),X=E-w;c[f]=`${(K?-X:0)-(K?w:E)}px`,i[f==="bgy"?"height":"width"]+=X}const h=s.Dimensions.cover(o,i);for(const f of a){const d=f==="bgy"?"height":"width",w=h[d]-i[d];c[f]=`max(${B(t,f)},-${w}px) + ${c[f]}`}const l=V(a,c,r);return(f,d)=>{l(f,d),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function B(n,t){return p(n,`background-position-${t.substr(-1)}`,"")}function V(n,t,e){return function(r,o){for(const i of n){const a=x(e[i],o);r[`background-position-${i.substr(-1)}`]=`calc(${t[i]} + ${a}px)`}}}const z={},S={};function jn(n){const t=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[t])return S[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth&&!z[t])?(s.once(e,"error load",()=>{S[t]=I(e),s.trigger(n,s.createEvent("load",!1))}),z[t]=!0,I(e)):S[t]=I(e)}function I(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=s.toFloat){const e=[],{length:r}=n;let o=0;for(let i=0;i<r;i++){let[a,c]=s.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(a=t(a),c=c?s.toFloat(c)/100:null,i===0?c===null?c=0:c&&e.push([a,0]):i===r-1&&(c===null?c=1:c!==1&&(e.push([a,c]),c=1)),e.push([a,c]),c===null)o++;else if(o){const h=e[i-o-1][1],l=(c-h)/(o+1);for(let f=o;f>0;f--)e[i-f][1]=h+l*(o-f+1);o=0}}return e}function L(n,t){const e=s.findIndex(n.slice(1),([,r])=>t<=r)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function x(n,t){const[e,r,o]=L(n,t);return e+Math.abs(e-r)*o*(e<r?1:-1)}const In=/^-?\d+(?:\.\d+)?(\S+)?/;function F(n,t){var e;for(const r of n){const o=(e=r.match)==null?void 0:e.call(r,In);if(o)return o[1]}return t}function p(n,t,e){const r=n.style[t],o=s.css(s.css(n,t,e),t);return n.style[t]=r,o}function q(n,t){return n.reduce((e,r)=>(e[r]=t,e),{})}var Q={mixins:[Fn],beforeConnect(){this.item=this.$el.closest(`.${this.$options.id.replace("parallax","items")} > *`)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el:({item:n})=>n,handler({type:n,detail:{percent:t,duration:e,timing:r,dir:o}}){s.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(J(n,o,t)),a=this.getCss(G(n)?.5:o>0?1:0);s.fastdom.write(()=>{s.css(this.$el,i),s.Transition.start(this.$el,a,e,r).catch(s.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el:({item:n})=>n,handler(){s.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el:({item:n})=>n,handler({type:n,detail:{percent:t,dir:e}}){s.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const r=this.getCss(J(n,e,t));s.fastdom.write(()=>s.css(this.$el,r))})}}]};function G(n){return s.endsWith(n,"in")}function J(n,t,e){return e/=2,G(n)^t<0?e:1-e}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",Q),Q});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.9-dev.
|
|
1
|
+
/*! UIkit 3.20.9-dev.e2e1b058d | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -689,15 +689,18 @@
|
|
|
689
689
|
}
|
|
690
690
|
},
|
|
691
691
|
update: {
|
|
692
|
-
|
|
692
|
+
read() {
|
|
693
693
|
if (!this.parallax) {
|
|
694
|
-
return;
|
|
694
|
+
return false;
|
|
695
695
|
}
|
|
696
696
|
const target = this.parallaxTarget;
|
|
697
697
|
const start = util.toPx(this.parallaxStart, "height", target, true);
|
|
698
698
|
const end = util.toPx(this.parallaxEnd, "height", target, true);
|
|
699
699
|
const percent = ease(util.scrolledOver(target, start, end), this.parallaxEasing);
|
|
700
|
-
|
|
700
|
+
return { parallax: this.getIndexAt(percent) };
|
|
701
|
+
},
|
|
702
|
+
write({ parallax }) {
|
|
703
|
+
const [prevIndex, slidePercent] = parallax;
|
|
701
704
|
const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
|
|
702
705
|
const prev = this.slides[prevIndex];
|
|
703
706
|
const next = this.slides[nextIndex];
|
|
@@ -849,6 +852,9 @@
|
|
|
849
852
|
return this.show(duration, percent2, true);
|
|
850
853
|
},
|
|
851
854
|
translate(percent2) {
|
|
855
|
+
if (percent2 === this.percent()) {
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
852
858
|
this.reset();
|
|
853
859
|
const props2 = translate(percent2, dir);
|
|
854
860
|
util.css(next, props2[1]);
|
|
@@ -912,9 +918,7 @@
|
|
|
912
918
|
{
|
|
913
919
|
name: "visibilitychange",
|
|
914
920
|
el: () => document,
|
|
915
|
-
filter()
|
|
916
|
-
return this.autoplay;
|
|
917
|
-
},
|
|
921
|
+
filter: ({ autoplay }) => autoplay,
|
|
918
922
|
handler() {
|
|
919
923
|
if (document.hidden) {
|
|
920
924
|
this.stopAutoplay();
|
|
@@ -968,9 +972,7 @@
|
|
|
968
972
|
{
|
|
969
973
|
name: pointerDown,
|
|
970
974
|
passive: true,
|
|
971
|
-
delegate() {
|
|
972
|
-
return `${this.selList} > *`;
|
|
973
|
-
},
|
|
975
|
+
delegate: ({ selList }) => `${selList} > *`,
|
|
974
976
|
handler(e) {
|
|
975
977
|
if (!this.draggable || this.parallax || !util.isTouch(e) && hasSelectableText(e.target) || e.target.closest(util.selInput) || e.button > 0 || this.length < 2) {
|
|
976
978
|
return;
|
|
@@ -987,9 +989,7 @@
|
|
|
987
989
|
{
|
|
988
990
|
// iOS workaround for slider stopping if swiping fast
|
|
989
991
|
name: pointerMove,
|
|
990
|
-
el()
|
|
991
|
-
return this.list;
|
|
992
|
-
},
|
|
992
|
+
el: ({ list }) => list,
|
|
993
993
|
handler: util.noop,
|
|
994
994
|
...pointerOptions
|
|
995
995
|
}
|
|
@@ -1227,12 +1227,8 @@
|
|
|
1227
1227
|
events: [
|
|
1228
1228
|
{
|
|
1229
1229
|
name: "click keydown",
|
|
1230
|
-
delegate()
|
|
1231
|
-
|
|
1232
|
-
},
|
|
1233
|
-
filter() {
|
|
1234
|
-
return !this.parallax;
|
|
1235
|
-
},
|
|
1230
|
+
delegate: ({ selNavItem }) => selNavItem,
|
|
1231
|
+
filter: ({ parallax }) => !parallax,
|
|
1236
1232
|
handler(e) {
|
|
1237
1233
|
if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
|
|
1238
1234
|
e.preventDefault();
|
|
@@ -1246,12 +1242,8 @@
|
|
|
1246
1242
|
},
|
|
1247
1243
|
{
|
|
1248
1244
|
name: "keydown",
|
|
1249
|
-
delegate()
|
|
1250
|
-
|
|
1251
|
-
},
|
|
1252
|
-
filter() {
|
|
1253
|
-
return !this.parallax;
|
|
1254
|
-
},
|
|
1245
|
+
delegate: ({ selNavItem }) => selNavItem,
|
|
1246
|
+
filter: ({ parallax }) => !parallax,
|
|
1255
1247
|
handler(e) {
|
|
1256
1248
|
const { current, keyCode } = e;
|
|
1257
1249
|
const cmd = util.data(current, this.attrItem);
|