uikit 3.17.6 → 3.17.7-dev.fbae993df
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 +5 -0
- package/dist/css/uikit-core-rtl.css +22 -19
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +22 -19
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +22 -19
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +22 -19
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- 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 +5 -5
- 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 +5 -5
- package/dist/js/uikit.min.js +1 -1
- package/package.json +3 -3
- package/src/js/core/sticky.js +3 -3
- package/src/less/components/cover.less +15 -19
- package/src/less/components/transition.less +8 -1
- package/src/scss/components/cover.scss +15 -19
- package/src/scss/components/transition.scss +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.6 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=p(e.UIkit.util))})(this,function(e){"use strict";function p(t,s="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,e.fastdom.read(()=>{t._connected&&P(t,t._queued),delete t._queued})),t._queued.add(s.type||s))}function P(t,s){for(const{read:n,write:i,events:h=[]}of t._updates){if(!s.has("update")&&!h.some(o=>s.has(o)))continue;let r;n&&(r=n.call(t,t._data,s),r&&e.isPlainObject(r)&&e.assign(t._data,r)),i&&r!==!1&&e.fastdom.write(()=>{t._connected&&i.call(t,t._data,s)})}}function A(t){return k(e.observeResize,t,"resize")}function L(t){return k(e.observeIntersection,t)}function U(t={}){return L({handler:function(s,n){const{targets:i=this.$el,preload:h=5}=t;for(const r of e.toNodes(e.isFunction(i)?i(this):i))e.$$('[loading="lazy"]',r).slice(0,h-1).forEach(o=>e.removeAttr(o,"loading"));for(const r of s.filter(({isIntersecting:o})=>o).map(({target:o})=>o))n.unobserve(r)},...t})}function k(t,s,n){return{observe:t,handler(){p(this,n)},...s}}var z={connected(){e.addClass(this.$el,this.$options.id)}},B={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var n,i,h;let r=0;return((h=((n=this.i18n)==null?void 0:n[t])||((i=this.$options.i18n)==null?void 0:i[t]))==null?void 0:h.replace(/%s/g,()=>s[r++]||""))||""}}},V={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const b={passive:!1,capture:!0},C={passive:!0,capture:!0},j="touchstart mousedown",_="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var q={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,s(n)}}},events:[{name:j,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&F(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:_,el(){return this.list},handler:e.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,e.on(document,_,this.move,b),e.on(document,N,this.end,C),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:n,prevIndex:i}=this,h=Math.abs(s),r=this.getIndex(i+this.dir),o=this._getDistance(i,r);for(;r!==i&&h>o;)this.drag-=o*this.dir,i=r,h-=o,r=this.getIndex(i+this.dir),o=this._getDistance(i,r);this.percent=h/o;const a=n[i],l=n[r],d=this.index!==r,c=i===r;let f;for(const g of[this.index,this.prevIndex])e.includes([r,i],g)||(e.trigger(n[g],"itemhidden",[this]),c&&(f=!0,this.prevIndex=i));(this.index===i&&this.prevIndex!==i||f)&&e.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=i,this.index=r,!c&&e.trigger(a,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!c&&l),d&&(!c&&e.trigger(a,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,_,this.move,b),e.off(document,N,this.end,C),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=(e.isRtl?this.dir*(e.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)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function F(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}function $(t,s=t.$el,n=""){if(s.id)return s.id;let i=`${t.$options.id}-${t._uid}${n}`;return e.$(`#${i}`)&&(i=$(t,s,`${n}-2`)),i}const v={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var H={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},s)=>e.$(t,s),navChildren(){return e.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;let h,r=null;if(e.isNumeric(n)){const o=e.toNumber(n),a=this.slides[o];a&&(a.id||(a.id=$(this,a,`-item-${n}`)),r=a.id),h=this.t("slideX",e.toFloat(n)+1),e.attr(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=$(this,this.list,"-items")),r=this.list.id),h=this.t(n);e.attr(i,{"aria-controls":r,"aria-label":e.attr(i,"aria-label")||h})}},slides(t){t.forEach((s,n)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",n+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let n=0;n<t;n++)e.append(this.nav,`<li ${this.attrItem}="${n}"><a href></a></li>`)}}},connected(){e.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},handler(t){e.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===v.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:n}=t,i=e.data(s,this.attrItem);if(!e.isNumeric(i))return;let h=n===v.HOME?0:n===v.END?"last":n===v.LEFT?"previous":n===v.RIGHT?"next":-1;~h&&(t.preventDefault(),this.show(h))}}],methods:{updateNav(){const t=this.getValidIndex();for(const s of this.navItems){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;if(e.isNumeric(n)){const r=e.toNumber(n)===t;e.toggleClass(s,this.clsActive,r),e.attr(i,{"aria-selected":r,tabindex:r?null:-1}),r&&i&&e.matches(e.parent(s),":focus-within")&&i.focus()}else e.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},G={mixins:[V,q,H,B],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},s)=>M(s.offsetWidth/t),list:({selList:t},s)=>e.$(t,s),maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:A(),methods:{show(t,s=!1){var n;if(this.dragging||!this.length)return;const{stack:i}=this,h=s?0:i.length,r=()=>{i.splice(h,1),i.length&&this.show(i.shift(),!0)};if(i[s?"unshift":"push"](t),!s&&i.length>1){i.length===2&&((n=this._transitioner)==null||n.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[o],l=this.getIndex(t,this.index),d=this.slides[l];if(a===d){r();return}if(this.dir=X(t,o),this.prevIndex=o,this.index=l,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(d,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const c=this._show(a,d,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(d,"itemshown",[this]),i.shift(),this._transitioner=null,requestAnimationFrame(()=>i.length&&this.show(i.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(d,"itemshow",[this]),c},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,n){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:n?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,n=this.index){const i=this._getTransitioner(s===n?!1:s,n);return i.translate(t),i},_getTransitioner(t=this.prevIndex,s=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,n*(e.isRtl?-1:1),i)}}};function X(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function M(t){return .5*t+300}var J={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},K={observe:U({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})};function S(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function Q(t,s,n,{center:i,easing:h,list:r}){const o=t?x(t,r,i):x(s,r,i)+e.dimensions(s).width*n,a=s?x(s,r,i):o+e.dimensions(t).width*n*(e.isRtl?-1:1);let l;return{dir:n,show(d,c=0,f){const g=f?"linear":h;return d-=Math.round(d*e.clamp(c,-1,1)),this.translate(c),c=t?c:e.clamp(c,0,1),y(this.getItemIn(),"itemin",{percent:c,duration:d,timing:g,dir:n}),t&&y(this.getItemIn(!0),"itemout",{percent:1-c,duration:d,timing:g,dir:n}),new Promise(m=>{l||(l=m),e.Transition.start(r,{transform:S(-a*(e.isRtl?-1:1),"px")},d,g).then(l,e.noop)})},cancel(){return e.Transition.cancel(r)},reset(){e.css(r,"transform","")},async forward(d,c=this.percent()){return await this.cancel(),this.show(d,c,!0)},translate(d){const c=this.getDistance()*n*(e.isRtl?-1:1);e.css(r,"transform",S(e.clamp(-a+(c-c*d),-I(r),e.dimensions(r).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),m=this.getItemIn(!0);d=t?e.clamp(d,-1,1):0;for(const u of e.children(r)){const R=e.includes(f,u),O=u===g,W=u===m,et=O||!W&&(R||n*(e.isRtl?-1:1)===-1^w(u,r)>w(t||s));y(u,`itemtranslate${et?"in":"out"}`,{dir:n,percent:W?1-d:O?d:R?1:0})}},percent(){return Math.abs((e.css(r,"transform").split(",")[4]*(e.isRtl?-1:1)+o)/(a-o))},getDistance(){return Math.abs(a-o)},getItemIn(d=!1){let c=this.getActives(),f=E(r,x(s||t,r,i));if(d){const g=c;c=f,f=g}return f[e.findIndex(f,g=>!e.includes(c,g))]},getActives(){return E(r,x(t||s,r,i))}}}function x(t,s,n){const i=w(t,s);return n?i-Y(t,s):Math.min(i,T(s))}function T(t){return Math.max(0,I(t)-e.dimensions(t).width)}function I(t){return e.sumBy(e.children(t),s=>e.dimensions(s).width)}function Y(t,s){return e.dimensions(s).width/2-e.dimensions(t).width/2}function w(t,s){return t&&(e.position(t).left+(e.isRtl?e.dimensions(t).width-e.dimensions(s).width:0))*(e.isRtl?-1:1)||0}function E(t,s){s-=1;const n=e.dimensions(t).width,i=s+n+2;return e.children(t).filter(h=>{const r=w(h,t),o=r+Math.min(e.dimensions(h).width,n);return r>=s&&o<=i})}function y(t,s,n){e.trigger(t,e.createEvent(s,!1,!1,n))}var D={mixins:[z,G,J,K],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:Q},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:t}){return t||Z(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let t=0;const s=T(this.list),n=e.findIndex(this.slides,i=>{if(t>=s)return!0;t+=e.dimensions(i).width});return~n?n:this.length-1},sets({sets:t}){if(!t)return;let s=0;const n=[],i=e.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=e.dimensions(this.slides[h]).width;s+r>i&&(s=0),this.center?s<i/2&&s+r+e.dimensions(e.getIndex(+h+1,this.slides)).width/2>i/2&&(n.push(+h),s=i/2-r/2):s===0&&n.push(Math.min(+h,this.maxIndex)),s+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}},slides(){return e.children(this.list).filter(e.isVisible)}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$(`.${this.clsContainer}`,this.$el))},observe:A({target:({slides:t})=>t}),update:{write(){for(const t of this.navItems){const s=e.toNumber(e.data(t,this.attrItem));s!==!1&&(t.hidden=!this.maxIndex||s>this.maxIndex||this.sets&&!e.includes(this.sets,s))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const s=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&&s>1){for(let i=0;i<s;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");t.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=M(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,r)=>e.css(h,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const s=this.slides[t];let n=e.dimensions(this.list).width/2-e.dimensions(s).width/2,i=0;for(;n>0;){const h=this.getIndex(--i+t,t),r=this.slides[h];e.css(r,"order",h>t?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const t=this._getTransitioner(this.index).getActives(),s=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides){const i=e.includes(t,n);e.toggleClass(n,s,i),e.attr(n,"aria-hidden",!i);for(const h of e.$$(e.selFocusable,n))e.hasOwn(h,"_tabindex")||(h._tabindex=e.attr(h,"tabindex")),e.attr(h,"tabindex",i?h._tabindex:-1)}},getValidIndex(t=this.index,s=this.prevIndex){if(t=this.getIndex(t,s),!this.sets)return t;let n;do{if(e.includes(this.sets,t))return t;n=t,t=this.getIndex(t+this.dir,s)}while(t!==n);return t},getAdjacentSlides(){const{width:t}=e.dimensions(this.list),s=-t,n=t*2,i=e.dimensions(this.slides[this.index]).width,h=this.center?t/2-i/2:0,r=new Set;for(const o of[-1,1]){let a=h+(o>0?i:0),l=0;do{const d=this.slides[this.getIndex(this.index+o+l++*o)];a+=e.dimensions(d).width*o,r.add(d)}while(this.length>l&&a>s&&a<n)}return Array.from(r)}}};function Z(t,s){if(!t||t.length<2)return!0;const{width:n}=e.dimensions(t);if(!s)return Math.ceil(I(t))<Math.trunc(n+tt(t));const i=e.children(t),h=Math.trunc(n/2);for(const r in i){const o=i[r],a=e.dimensions(o).width,l=new Set([o]);let d=0;for(const c of[-1,1]){let f=a/2,g=0;for(;f<h;){const m=i[e.getIndex(+r+c+g++*c,i)];if(l.has(m))return!0;f+=e.dimensions(m).width,l.add(m)}d=Math.max(d,a/2+e.dimensions(i[e.getIndex(+r+c,i)]).width/2-(f-h))}if(d>e.sumBy(i.filter(c=>!l.has(c)),c=>e.dimensions(c).width))return!0}return!1}function tt(t){return Math.max(0,...e.children(t).map(s=>e.dimensions(s).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",D),D});
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=p(e.UIkit.util))})(this,function(e){"use strict";function p(t,s="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,e.fastdom.read(()=>{t._connected&&P(t,t._queued),delete t._queued})),t._queued.add(s.type||s))}function P(t,s){for(const{read:n,write:i,events:h=[]}of t._updates){if(!s.has("update")&&!h.some(o=>s.has(o)))continue;let r;n&&(r=n.call(t,t._data,s),r&&e.isPlainObject(r)&&e.assign(t._data,r)),i&&r!==!1&&e.fastdom.write(()=>{t._connected&&i.call(t,t._data,s)})}}function A(t){return k(e.observeResize,t,"resize")}function L(t){return k(e.observeIntersection,t)}function U(t={}){return L({handler:function(s,n){const{targets:i=this.$el,preload:h=5}=t;for(const r of e.toNodes(e.isFunction(i)?i(this):i))e.$$('[loading="lazy"]',r).slice(0,h-1).forEach(o=>e.removeAttr(o,"loading"));for(const r of s.filter(({isIntersecting:o})=>o).map(({target:o})=>o))n.unobserve(r)},...t})}function k(t,s,n){return{observe:t,handler(){p(this,n)},...s}}var z={connected(){e.addClass(this.$el,this.$options.id)}},B={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var n,i,h;let r=0;return((h=((n=this.i18n)==null?void 0:n[t])||((i=this.$options.i18n)==null?void 0:i[t]))==null?void 0:h.replace(/%s/g,()=>s[r++]||""))||""}}},V={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const b={passive:!1,capture:!0},C={passive:!0,capture:!0},j="touchstart mousedown",_="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var q={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,s(n)}}},events:[{name:j,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&F(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:_,el(){return this.list},handler:e.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,e.on(document,_,this.move,b),e.on(document,N,this.end,C),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:n,prevIndex:i}=this,h=Math.abs(s),r=this.getIndex(i+this.dir),o=this._getDistance(i,r);for(;r!==i&&h>o;)this.drag-=o*this.dir,i=r,h-=o,r=this.getIndex(i+this.dir),o=this._getDistance(i,r);this.percent=h/o;const a=n[i],l=n[r],d=this.index!==r,c=i===r;let f;for(const g of[this.index,this.prevIndex])e.includes([r,i],g)||(e.trigger(n[g],"itemhidden",[this]),c&&(f=!0,this.prevIndex=i));(this.index===i&&this.prevIndex!==i||f)&&e.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=i,this.index=r,!c&&e.trigger(a,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!c&&l),d&&(!c&&e.trigger(a,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,_,this.move,b),e.off(document,N,this.end,C),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=(e.isRtl?this.dir*(e.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)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function F(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}function $(t,s=t.$el,n=""){if(s.id)return s.id;let i=`${t.$options.id}-${t._uid}${n}`;return e.$(`#${i}`)&&(i=$(t,s,`${n}-2`)),i}const v={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var H={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},s)=>e.$(t,s),navChildren(){return e.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;let h,r=null;if(e.isNumeric(n)){const o=e.toNumber(n),a=this.slides[o];a&&(a.id||(a.id=$(this,a,`-item-${n}`)),r=a.id),h=this.t("slideX",e.toFloat(n)+1),e.attr(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=$(this,this.list,"-items")),r=this.list.id),h=this.t(n);e.attr(i,{"aria-controls":r,"aria-label":e.attr(i,"aria-label")||h})}},slides(t){t.forEach((s,n)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",n+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let n=0;n<t;n++)e.append(this.nav,`<li ${this.attrItem}="${n}"><a href></a></li>`)}}},connected(){e.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},handler(t){e.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===v.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:n}=t,i=e.data(s,this.attrItem);if(!e.isNumeric(i))return;let h=n===v.HOME?0:n===v.END?"last":n===v.LEFT?"previous":n===v.RIGHT?"next":-1;~h&&(t.preventDefault(),this.show(h))}}],methods:{updateNav(){const t=this.getValidIndex();for(const s of this.navItems){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;if(e.isNumeric(n)){const r=e.toNumber(n)===t;e.toggleClass(s,this.clsActive,r),e.attr(i,{"aria-selected":r,tabindex:r?null:-1}),r&&i&&e.matches(e.parent(s),":focus-within")&&i.focus()}else e.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},G={mixins:[V,q,H,B],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},s)=>M(s.offsetWidth/t),list:({selList:t},s)=>e.$(t,s),maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:A(),methods:{show(t,s=!1){var n;if(this.dragging||!this.length)return;const{stack:i}=this,h=s?0:i.length,r=()=>{i.splice(h,1),i.length&&this.show(i.shift(),!0)};if(i[s?"unshift":"push"](t),!s&&i.length>1){i.length===2&&((n=this._transitioner)==null||n.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[o],l=this.getIndex(t,this.index),d=this.slides[l];if(a===d){r();return}if(this.dir=X(t,o),this.prevIndex=o,this.index=l,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(d,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const c=this._show(a,d,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(d,"itemshown",[this]),i.shift(),this._transitioner=null,requestAnimationFrame(()=>i.length&&this.show(i.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(d,"itemshow",[this]),c},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,n){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:n?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,n=this.index){const i=this._getTransitioner(s===n?!1:s,n);return i.translate(t),i},_getTransitioner(t=this.prevIndex,s=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,n*(e.isRtl?-1:1),i)}}};function X(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function M(t){return .5*t+300}var J={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},K={observe:U({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})};function S(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function Q(t,s,n,{center:i,easing:h,list:r}){const o=t?x(t,r,i):x(s,r,i)+e.dimensions(s).width*n,a=s?x(s,r,i):o+e.dimensions(t).width*n*(e.isRtl?-1:1);let l;return{dir:n,show(d,c=0,f){const g=f?"linear":h;return d-=Math.round(d*e.clamp(c,-1,1)),this.translate(c),c=t?c:e.clamp(c,0,1),y(this.getItemIn(),"itemin",{percent:c,duration:d,timing:g,dir:n}),t&&y(this.getItemIn(!0),"itemout",{percent:1-c,duration:d,timing:g,dir:n}),new Promise(m=>{l||(l=m),e.Transition.start(r,{transform:S(-a*(e.isRtl?-1:1),"px")},d,g).then(l,e.noop)})},cancel(){return e.Transition.cancel(r)},reset(){e.css(r,"transform","")},async forward(d,c=this.percent()){return await this.cancel(),this.show(d,c,!0)},translate(d){const c=this.getDistance()*n*(e.isRtl?-1:1);e.css(r,"transform",S(e.clamp(-a+(c-c*d),-I(r),e.dimensions(r).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),m=this.getItemIn(!0);d=t?e.clamp(d,-1,1):0;for(const u of e.children(r)){const R=e.includes(f,u),O=u===g,W=u===m,et=O||!W&&(R||n*(e.isRtl?-1:1)===-1^w(u,r)>w(t||s));y(u,`itemtranslate${et?"in":"out"}`,{dir:n,percent:W?1-d:O?d:R?1:0})}},percent(){return Math.abs((e.css(r,"transform").split(",")[4]*(e.isRtl?-1:1)+o)/(a-o))},getDistance(){return Math.abs(a-o)},getItemIn(d=!1){let c=this.getActives(),f=E(r,x(s||t,r,i));if(d){const g=c;c=f,f=g}return f[e.findIndex(f,g=>!e.includes(c,g))]},getActives(){return E(r,x(t||s,r,i))}}}function x(t,s,n){const i=w(t,s);return n?i-Y(t,s):Math.min(i,T(s))}function T(t){return Math.max(0,I(t)-e.dimensions(t).width)}function I(t){return e.sumBy(e.children(t),s=>e.dimensions(s).width)}function Y(t,s){return e.dimensions(s).width/2-e.dimensions(t).width/2}function w(t,s){return t&&(e.position(t).left+(e.isRtl?e.dimensions(t).width-e.dimensions(s).width:0))*(e.isRtl?-1:1)||0}function E(t,s){s-=1;const n=e.dimensions(t).width,i=s+n+2;return e.children(t).filter(h=>{const r=w(h,t),o=r+Math.min(e.dimensions(h).width,n);return r>=s&&o<=i})}function y(t,s,n){e.trigger(t,e.createEvent(s,!1,!1,n))}var D={mixins:[z,G,J,K],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:Q},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:t}){return t||Z(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let t=0;const s=T(this.list),n=e.findIndex(this.slides,i=>{if(t>=s)return!0;t+=e.dimensions(i).width});return~n?n:this.length-1},sets({sets:t}){if(!t)return;let s=0;const n=[],i=e.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=e.dimensions(this.slides[h]).width;s+r>i&&(s=0),this.center?s<i/2&&s+r+e.dimensions(e.getIndex(+h+1,this.slides)).width/2>i/2&&(n.push(+h),s=i/2-r/2):s===0&&n.push(Math.min(+h,this.maxIndex)),s+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}},slides(){return e.children(this.list).filter(e.isVisible)}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$(`.${this.clsContainer}`,this.$el))},observe:A({target:({slides:t})=>t}),update:{write(){for(const t of this.navItems){const s=e.toNumber(e.data(t,this.attrItem));s!==!1&&(t.hidden=!this.maxIndex||s>this.maxIndex||this.sets&&!e.includes(this.sets,s))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const s=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&&s>1){for(let i=0;i<s;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");t.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=M(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,r)=>e.css(h,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const s=this.slides[t];let n=e.dimensions(this.list).width/2-e.dimensions(s).width/2,i=0;for(;n>0;){const h=this.getIndex(--i+t,t),r=this.slides[h];e.css(r,"order",h>t?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const t=this._getTransitioner(this.index).getActives(),s=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides){const i=e.includes(t,n);e.toggleClass(n,s,i),e.attr(n,"aria-hidden",!i);for(const h of e.$$(e.selFocusable,n))e.hasOwn(h,"_tabindex")||(h._tabindex=e.attr(h,"tabindex")),e.attr(h,"tabindex",i?h._tabindex:-1)}},getValidIndex(t=this.index,s=this.prevIndex){if(t=this.getIndex(t,s),!this.sets)return t;let n;do{if(e.includes(this.sets,t))return t;n=t,t=this.getIndex(t+this.dir,s)}while(t!==n);return t},getAdjacentSlides(){const{width:t}=e.dimensions(this.list),s=-t,n=t*2,i=e.dimensions(this.slides[this.index]).width,h=this.center?t/2-i/2:0,r=new Set;for(const o of[-1,1]){let a=h+(o>0?i:0),l=0;do{const d=this.slides[this.getIndex(this.index+o+l++*o)];a+=e.dimensions(d).width*o,r.add(d)}while(this.length>l&&a>s&&a<n)}return Array.from(r)}}};function Z(t,s){if(!t||t.length<2)return!0;const{width:n}=e.dimensions(t);if(!s)return Math.ceil(I(t))<Math.trunc(n+tt(t));const i=e.children(t),h=Math.trunc(n/2);for(const r in i){const o=i[r],a=e.dimensions(o).width,l=new Set([o]);let d=0;for(const c of[-1,1]){let f=a/2,g=0;for(;f<h;){const m=i[e.getIndex(+r+c+g++*c,i)];if(l.has(m))return!0;f+=e.dimensions(m).width,l.add(m)}d=Math.max(d,a/2+e.dimensions(i[e.getIndex(+r+c,i)]).width/2-(f-h))}if(d>e.sumBy(i.filter(c=>!l.has(c)),c=>e.dimensions(c).width))return!0}return!1}function tt(t){return Math.max(0,...e.children(t).map(s=>e.dimensions(s).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",D),D});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 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=K(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);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 n;(n=this.offMediaObj)==null||n.call(this)}};function K(n,e){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(e,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function T(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}const{isArray:In,from:Q}=Array;function X(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function Y(n){return M(n)&&n===n.window}function A(n){return Z(n)>=1}function Z(n){return!Y(n)&&M(n)&&n.nodeType}function C(n){return typeof n=="string"}function k(n){return n===void 0}function g(n){return d(n)[0]}function d(n){return A(n)?[n]:Array.from(n||[]).filter(A)}function O(n){const e=Object.create(null);return t=>e[t]||(e[t]=n(t))}function W(n){var e;return(e=g(n))==null?void 0:e.parentElement}function U(n,e){return d(n).filter(t=>_(t,e))}function _(n,e){return d(n).some(t=>t.matches(e))}function nn(n,e){var t;return(t=g(n))==null?void 0:t.closest(T(e,">")?e.slice(1):e)}function tn(n,e){n=g(n);const t=n?Q(n.children):[];return e?U(t,e):t}function en(n,e){return e?d(n).indexOf(g(e)):tn(W(n)).indexOf(n)}function j(n,e,t){var o;if(M(e)){for(const r in e)j(n,r,e[r]);return}if(k(t))return(o=g(n))==null?void 0:o.getAttribute(e);for(const r of d(n))X(t)&&(t=t.call(r,j(r,e))),t===null?rn(r,e):r.setAttribute(e,t)}function rn(n,e){d(n).forEach(t=>t.removeAttribute(e))}function on(n,e){return d(un(n,g(e),"querySelectorAll"))}const sn=/(^|[^\\],)\s*[!>+~-]/,cn=O(n=>n.match(sn)),an=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,fn=O(n=>n.replace(an,"$1 *"));function un(n,e=document,t){if(!n||!C(n))return n;if(n=fn(n),cn(n)){const o=hn(n);n="";for(let r of o){let i=e;if(r[0]==="!"){const c=r.substr(1).trim().split(" ");if(i=nn(W(e),c[0]),r=c.slice(1).join(" ").trim(),!r.length&&o.length===1)return i}if(r[0]==="-"){const c=r.substr(1).trim().split(" "),a=(i||e).previousElementSibling;i=_(a,r.substr(1))?a:null,r=c.slice(1).join(" ")}i&&(n+=`${n?",":""}${ln(i)} ${r}`)}e=document}try{return e[t](n)}catch{return null}}const dn=/.*?[^\\](?:,|$)/g,hn=O(n=>n.match(dn).map(e=>e.replace(/,$/,"").trim()));function ln(n){const e=[];for(;n.parentNode;){const t=j(n,"id");if(t){e.unshift(`#${mn(t)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${en(n)+1})`),e.unshift(o),n=n.parentNode}}return e.join(" > ")}function mn(n){return C(n)?CSS.escape(n):""}const gn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function bn(n){const e=gn.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("template");return t.innerHTML=n.trim(),$n(t.content.childNodes)}function $n(n){return n.length>1?n:n[0]}function xn(n,e){return yn(n)?d(bn(n)):on(n,e)}function yn(n){return C(n)&&T(n.trim(),"<")}function wn(n){return Math.ceil(Math.max(0,...xn("[stroke]",n).map(e=>{try{return e.getTotalLength()}catch{return 0}})))}const p={x:v,y:v,rotate:v,scale:v,color:I,backgroundColor:I,borderColor:I,blur:m,hue:m,fopacity:m,grayscale:m,invert:m,saturate:m,sepia:m,opacity:Fn,stroke:Sn,bgx:z,bgy:z},{keys:E}=Object;var pn={mixins:[$],props:q(E(p),"list"),data:q(E(p),void 0),computed:{props(n,e){const t={};for(const r in n)r in p&&!s.isUndefined(n[r])&&(t[r]=n[r].slice());const o={};for(const r in t)o[r]=p[r](r,e,t[r],t);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const e={};for(const t in this.props)this.props[t](e,s.clamp(n));return e.willChange=Object.keys(e).map(s.propName).join(","),e}}};function v(n,e,t){let o=S(t)||{x:"px",y:"px",rotate:"deg"}[n]||"",r;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,r=i=>s.toFloat(s.toFloat(i).toFixed(o==="px"?0:6))):n==="scale"&&(o="",r=i=>{var c;return S([i])?s.toPx(i,"width",e,!0)/e[`offset${(c=i.endsWith)!=null&&c.call(i,"vh")?"Height":"Width"}`]:s.toFloat(i)}),t.length===1&&t.unshift(n==="scale"?1:0),t=b(t,r),(i,c)=>{i.transform=`${i.transform||""} ${n}(${x(t,c)}${o})`}}function I(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=b(t,o=>vn(e,o)),(o,r)=>{const[i,c,a]=D(t,r),h=i.map((l,f)=>(l+=a*(c[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function vn(n,e){return y(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function m(n,e,t){t.length===1&&t.unshift(0);const o=S(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=b(t),(r,i)=>{const c=x(t,i);r.filter=`${r.filter||""} ${n}(${c+o})`}}function Fn(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=b(t),(o,r)=>{o[n]=x(t,r)}}function Sn(n,e,t){t.length===1&&t.unshift(0);const o=S(t),r=wn(e);return t=b(t.reverse(),i=>(i=s.toFloat(i),o==="%"?i*r/100:i)),t.some(([i])=>i)?(s.css(e,"strokeDasharray",r),(i,c)=>{i.strokeDashoffset=x(t,c)}):s.noop}function z(n,e,t,o){t.length===1&&t.unshift(0);const r=n==="bgy"?"height":"width";o[n]=b(t,a=>s.toPx(a,r,e));const i=["bgx","bgy"].filter(a=>a in o);if(i.length===2&&n==="bgx")return s.noop;if(y(e,"backgroundSize","")==="cover")return Mn(n,e,t,o);const c={};for(const a of i)c[a]=H(e,a);return R(i,c,o)}function Mn(n,e,t,o){const r=Cn(e);if(!r.width)return s.noop;const i={width:e.offsetWidth,height:e.offsetHeight},c=["bgx","bgy"].filter(f=>f in o),a={};for(const f of c){const u=o[f].map(([jn])=>jn),w=Math.min(...u),N=Math.max(...u),G=u.indexOf(w)<u.indexOf(N),J=N-w;a[f]=`${(G?-J:0)-(G?w:N)}px`,i[f==="bgy"?"height":"width"]+=J}const h=s.Dimensions.cover(r,i);for(const f of c){const u=f==="bgy"?"height":"width",w=h[u]-i[u];a[f]=`max(${H(e,f)},-${w}px) + ${a[f]}`}const l=R(c,a,o);return(f,u)=>{l(f,u),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function H(n,e){return y(n,`background-position-${e.substr(-1)}`,"")}function R(n,e,t){return function(o,r){for(const i of n){const c=x(t[i],r);o[`background-position-${i.substr(-1)}`]=`calc(${e[i]} + ${c}px)`}}}const F={};function Cn(n){const e=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[e])return F[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth)?(t.onload=()=>{F[e]=P(t),s.trigger(n,s.createEvent("load",!1))},P(t)):F[e]=P(t)}function P(n){return{width:n.naturalWidth,height:n.naturalHeight}}function b(n,e=s.toFloat){const t=[],{length:o}=n;let r=0;for(let i=0;i<o;i++){let[c,a]=s.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(c=e(c),a=a?s.toFloat(a)/100:null,i===0?a===null?a=0:a&&t.push([c,0]):i===o-1&&(a===null?a=1:a!==1&&(t.push([c,a]),a=1)),t.push([c,a]),a===null)r++;else if(r){const h=t[i-r-1][1],l=(a-h)/(r+1);for(let f=r;f>0;f--)t[i-f][1]=h+l*(r-f+1);r=0}}return t}function D(n,e){const t=s.findIndex(n.slice(1),([,o])=>e<=o)+1;return[n[t-1][0],n[t][0],(e-n[t-1][1])/(n[t][1]-n[t-1][1])]}function x(n,e){const[t,o,r]=D(n,e);return t+Math.abs(t-o)*r*(t<o?1:-1)}const On=/^-?\d+(?:\.\d+)?(\S+)?/;function S(n,e){var t;for(const o of n){const r=(t=o.match)==null?void 0:t.call(o,On);if(r)return r[1]}return e}function y(n,e,t){const o=n.style[e],r=s.css(s.css(n,e,t),e);return n.style[e]=o,r}function q(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var B={mixins:[pn],data:{selItem:"!li"},beforeConnect(){this.item=s.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,duration:t,timing:o,dir:r}}){s.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(V(n,r,e)),c=this.getCss(L(n)?.5:r>0?1:0);s.fastdom.write(()=>{s.css(this.$el,i),s.Transition.start(this.$el,c,t,o).catch(s.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){s.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,dir:t}}){s.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(V(n,t,e));s.fastdom.write(()=>s.css(this.$el,o))})}}]};function L(n){return s.endsWith(n,"in")}function V(n,e,t){return t/=2,L(n)^e<0?t:1-t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",B),B});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.6 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){s.addClass(this.$el,this.$options.id)}},C={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},y={slide:{show(t){return[{transform:c(t*-100)},{transform:c()}]},percent(t){return g(t)},translate(t,e){return[{transform:c(e*-100*t)},{transform:c(e*100*(1-t))}]}}};function g(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)}function c(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function $(t){return`scale3d(${t}, ${t}, 1)`}function H(t,e,i,{animation:n,easing:a}){const{percent:r,translate:o,show:h=s.noop}=n,m=h(i);let l;return{dir:i,show(d,f=0,x){const I=x?"linear":a;return d-=Math.round(d*s.clamp(f,-1,1)),this.translate(f),v(e,"itemin",{percent:f,duration:d,timing:I,dir:i}),v(t,"itemout",{percent:1-f,duration:d,timing:I,dir:i}),new Promise(J=>{l||(l=J),Promise.all([s.Transition.start(e,m[1],d,I),s.Transition.start(t,m[0],d,I)]).then(()=>{this.reset(),l()},s.noop)})},cancel(){return s.Transition.cancel([e,t])},reset(){for(const d in m[0])s.css([e,t],d,"")},async forward(d,f=this.percent()){return await this.cancel(),this.show(d,f,!0)},translate(d){this.reset();const f=o(d,i);s.css(e,f[1]),s.css(t,f[0]),v(e,"itemtranslatein",{percent:d,dir:i}),v(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return r(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}function T(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&D(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function D(t,e){for(const{read:i,write:n,events:a=[]}of t._updates){if(!e.has("update")&&!a.some(o=>e.has(o)))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 E(t){return z(s.observeResize,t,"resize")}function M(t){return z(s.observeIntersection,t)}function O(t={}){return M({handler:function(e,i){const{targets:n=this.$el,preload:a=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,a-1).forEach(o=>s.removeAttr(o,"loading"));for(const r of e.filter(({isIntersecting:o})=>o).map(({target:o})=>o))i.unobserve(r)},...t})}function z(t,e,i){return{observe:t,handler(){T(this,i)},...e}}var P={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,a;let r=0;return((a=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:a.replace(/%s/g,()=>e[r++]||""))||""}}},U={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(){return 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")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},R="touchstart mousedown",b="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var W={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:R,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&q(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:b,el(){return this.list},handler:s.noop,...w}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,b,this.move,w),s.on(document,N,this.end,A),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;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,a=Math.abs(e),r=this.getIndex(n+this.dir),o=this._getDistance(n,r);for(;r!==n&&a>o;)this.drag-=o*this.dir,n=r,a-=o,r=this.getIndex(n+this.dir),o=this._getDistance(n,r);this.percent=a/o;const h=i[n],m=i[r],l=this.index!==r,d=n===r;let f;for(const x of[this.index,this.prevIndex])s.includes([r,n],x)||(s.trigger(i[x],"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(h,"beforeitemhide",[this]),s.trigger(m,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&m),l&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(m,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),s.off(document,N,this.end,A),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const 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)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}}};function q(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}function _(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return s.$(`#${n}`)&&(n=_(t,e,`${i}-2`)),n}const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var L={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.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 a,r=null;if(s.isNumeric(i)){const o=s.toNumber(i),h=this.slides[o];h&&(h.id||(h.id=_(this,h,`-item-${i}`)),r=h.id),a=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=_(this,this.list,"-items")),r=this.list.id),a=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||a})}},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},handler(t){s.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let a=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],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.attr(n,{"aria-selected":r,tabindex:r?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))}}}},B={mixins:[U,W,L,P],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},e)=>F(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()}},observe:E(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,a=e?0:n.length,r=()=>{n.splice(a,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 o=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[o],m=this.getIndex(t,this.index),l=this.slides[m];if(h===l){r();return}if(this.dir=j(t,o),this.prevIndex=o,this.index=m,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,r();return}const d=this._show(h,l,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"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 j(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function F(t){return .5*t+300}var V={mixins:[B],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:H},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){s.addClass(t,this.clsActive)},itemshown({target:t}){s.addClass(t,this.clsActivated)},itemhidden({target:t}){s.removeClass(t,this.clsActive,this.clsActivated)}}},G={observe:O({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},X={...y,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:$(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:$(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:c(30),zIndex:-1},{transform:c(),zIndex:0}]:[{transform:c(-100),zIndex:0},{transform:c(),zIndex:-1}]},percent(t,e,i){return i<0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(30*t),zIndex:-1},{transform:c(-100*(1-t)),zIndex:0}]:[{transform:c(-t*100),zIndex:0},{transform:c(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:c(100),zIndex:0},{transform:c(),zIndex:-1}]:[{transform:c(-30),zIndex:-1},{transform:c(),zIndex:0}]},percent(t,e,i){return i>0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(t*100),zIndex:0},{transform:c(-30*(1-t)),zIndex:-1}]:[{transform:c(-30*t),zIndex:-1},{transform:c(100*(1-t)),zIndex:0}]}}};const k=s.inBrowser&&CSS.supports("aspect-ratio","1/1");var S={mixins:[p,V,C,G],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:X},watch:{list(t){t&&k&&s.css(t,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||k)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",S),S});
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){s.addClass(this.$el,this.$options.id)}},C={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},y={slide:{show(t){return[{transform:c(t*-100)},{transform:c()}]},percent(t){return g(t)},translate(t,e){return[{transform:c(e*-100*t)},{transform:c(e*100*(1-t))}]}}};function g(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)}function c(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function $(t){return`scale3d(${t}, ${t}, 1)`}function H(t,e,i,{animation:n,easing:a}){const{percent:r,translate:o,show:h=s.noop}=n,m=h(i);let l;return{dir:i,show(d,f=0,x){const I=x?"linear":a;return d-=Math.round(d*s.clamp(f,-1,1)),this.translate(f),v(e,"itemin",{percent:f,duration:d,timing:I,dir:i}),v(t,"itemout",{percent:1-f,duration:d,timing:I,dir:i}),new Promise(J=>{l||(l=J),Promise.all([s.Transition.start(e,m[1],d,I),s.Transition.start(t,m[0],d,I)]).then(()=>{this.reset(),l()},s.noop)})},cancel(){return s.Transition.cancel([e,t])},reset(){for(const d in m[0])s.css([e,t],d,"")},async forward(d,f=this.percent()){return await this.cancel(),this.show(d,f,!0)},translate(d){this.reset();const f=o(d,i);s.css(e,f[1]),s.css(t,f[0]),v(e,"itemtranslatein",{percent:d,dir:i}),v(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return r(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}function T(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&D(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function D(t,e){for(const{read:i,write:n,events:a=[]}of t._updates){if(!e.has("update")&&!a.some(o=>e.has(o)))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 E(t){return z(s.observeResize,t,"resize")}function M(t){return z(s.observeIntersection,t)}function O(t={}){return M({handler:function(e,i){const{targets:n=this.$el,preload:a=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,a-1).forEach(o=>s.removeAttr(o,"loading"));for(const r of e.filter(({isIntersecting:o})=>o).map(({target:o})=>o))i.unobserve(r)},...t})}function z(t,e,i){return{observe:t,handler(){T(this,i)},...e}}var P={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,a;let r=0;return((a=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:a.replace(/%s/g,()=>e[r++]||""))||""}}},U={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(){return 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")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},R="touchstart mousedown",b="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var W={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:R,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&q(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:b,el(){return this.list},handler:s.noop,...w}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,b,this.move,w),s.on(document,N,this.end,A),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;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,a=Math.abs(e),r=this.getIndex(n+this.dir),o=this._getDistance(n,r);for(;r!==n&&a>o;)this.drag-=o*this.dir,n=r,a-=o,r=this.getIndex(n+this.dir),o=this._getDistance(n,r);this.percent=a/o;const h=i[n],m=i[r],l=this.index!==r,d=n===r;let f;for(const x of[this.index,this.prevIndex])s.includes([r,n],x)||(s.trigger(i[x],"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(h,"beforeitemhide",[this]),s.trigger(m,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&m),l&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(m,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),s.off(document,N,this.end,A),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const 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)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}}};function q(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}function _(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return s.$(`#${n}`)&&(n=_(t,e,`${i}-2`)),n}const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var L={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.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 a,r=null;if(s.isNumeric(i)){const o=s.toNumber(i),h=this.slides[o];h&&(h.id||(h.id=_(this,h,`-item-${i}`)),r=h.id),a=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=_(this,this.list,"-items")),r=this.list.id),a=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||a})}},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},handler(t){s.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let a=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],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.attr(n,{"aria-selected":r,tabindex:r?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))}}}},B={mixins:[U,W,L,P],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},e)=>F(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()}},observe:E(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,a=e?0:n.length,r=()=>{n.splice(a,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 o=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[o],m=this.getIndex(t,this.index),l=this.slides[m];if(h===l){r();return}if(this.dir=j(t,o),this.prevIndex=o,this.index=m,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,r();return}const d=this._show(h,l,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"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 j(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function F(t){return .5*t+300}var V={mixins:[B],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:H},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){s.addClass(t,this.clsActive)},itemshown({target:t}){s.addClass(t,this.clsActivated)},itemhidden({target:t}){s.removeClass(t,this.clsActive,this.clsActivated)}}},G={observe:O({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},X={...y,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:$(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:$(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:c(30),zIndex:-1},{transform:c(),zIndex:0}]:[{transform:c(-100),zIndex:0},{transform:c(),zIndex:-1}]},percent(t,e,i){return i<0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(30*t),zIndex:-1},{transform:c(-100*(1-t)),zIndex:0}]:[{transform:c(-t*100),zIndex:0},{transform:c(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:c(100),zIndex:0},{transform:c(),zIndex:-1}]:[{transform:c(-30),zIndex:-1},{transform:c(),zIndex:0}]},percent(t,e,i){return i>0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(t*100),zIndex:0},{transform:c(-30*(1-t)),zIndex:-1}]:[{transform:c(-30*t),zIndex:-1},{transform:c(100*(1-t)),zIndex:0}]}}};const k=s.inBrowser&&CSS.supports("aspect-ratio","1/1");var S={mixins:[p,V,C,G],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:X},watch:{list(t){t&&k&&s.css(t,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||k)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",S),S});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.6 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(o,s="update"){o._connected&&o._updates.length&&(o._queued||(o._queued=new Set,e.fastdom.read(()=>{o._connected&&R(o,o._queued),delete o._queued})),o._queued.add(s.type||s))}function R(o,s){for(const{read:n,write:t,events:c=[]}of o._updates){if(!s.has("update")&&!c.some(r=>s.has(r)))continue;let a;n&&(a=n.call(o,o._data,s),a&&e.isPlainObject(a)&&e.assign(o._data,a)),t&&a!==!1&&e.fastdom.write(()=>{o._connected&&t.call(o,o._data,s)})}}function B(o){return y(e.observeResize,o,"resize")}function N(o){return y(e.observeMutation,o)}function y(o,s,n){return{observe:o,handler(){g(this,n)},...s}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),B({target:({$el:o})=>[o,...e.children(o)]});function C(o){const s=[[]],n=o.some((t,c)=>c&&o[c-1].offsetParent!==t.offsetParent);for(const t of o){if(!e.isVisible(t))continue;const c=b(t,n);for(let a=s.length-1;a>=0;a--){const r=s[a];if(!r[0]){r.push(t);break}const h=b(r[0],n);if(c.top>=h.bottom-1&&c.top!==h.top){s.push([t]);break}if(c.bottom-1>h.top||c.top===h.top){let d=r.length-1;for(;d>=0;d--){const p=b(r[d],n);if(c.left>=p.left)break}r.splice(d+1,0,t);break}if(a===0){s.unshift([t]);break}}}return s}function b(o,s=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:a}=o;return s&&([n,t]=e.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+a}}const w="uk-transition-leave",v="uk-transition-enter";function P(o,s,n,t=0){const c=u(s,!0),a={opacity:1},r={opacity:0},h=l=>()=>c===u(s)?l():Promise.reject(),d=h(async()=>{e.addClass(s,w),await Promise.all(S(s).map((l,i)=>new Promise(f=>setTimeout(()=>e.Transition.start(l,r,n/2,"ease").then(f),i*t)))),e.removeClass(s,w)}),p=h(async()=>{const l=e.height(s);e.addClass(s,v),o(),e.css(e.children(s),{opacity:0}),await z();const i=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,l);const m=S(s);e.css(i,r);const _=m.map(async(Q,X)=>{await q(X*t),await e.Transition.start(Q,a,n/2,"ease")});l!==f&&_.push(e.Transition.start(s,{height:f},n/2+m.length*t,"ease")),await Promise.all(_).then(()=>{e.removeClass(s,v),c===u(s)&&(e.css(s,{height:"",alignContent:""}),e.css(i,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,w)?T(s).then(p):e.hasClass(s,v)?T(s).then(d).then(p):d().then(p)}function u(o,s){return s&&(o.dataset.transition=1+u(o)),e.toNumber(o.dataset.transition)||0}function T(o){return Promise.all(e.children(o).filter(e.Transition.inProgress).map(s=>new Promise(n=>e.once(s,"transitionend transitioncanceled",n))))}function S(o){return C(e.children(o)).flat().filter(s=>e.isVisible(s))}function z(){return new Promise(o=>requestAnimationFrame(o))}function q(o){return new Promise(s=>setTimeout(s,o))}async function A(o,s,n){await D();let t=e.children(s);const c=t.map(f=>x(f,!0)),a={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),o(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,p]=H(s,t,c),l=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>p[m]&&e.css(f,p[m])),e.css(s,a),e.trigger(s,"scroll"),e.fastdom.flush(),await D();const i=t.map((f,m)=>e.parent(f)===s&&e.Transition.start(f,d[m],n,"ease")).concat(e.Transition.start(s,h,n,"ease"));try{await Promise.all(i),t.forEach((f,m)=>{e.attr(f,l[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),L(s,a)}}function x(o,s){const n=e.css(o,"zIndex");return e.isVisible(o)?{display:"",opacity:s?e.css(o,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:n==="auto"?e.index(o):n,...I(o)}:!1}function H(o,s,n){const t=s.map((a,r)=>e.parent(a)&&r in n?n[r]?e.isVisible(a)?I(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===o&&(n[r]||x(s[r]));if(!h)return!1;if(!a)delete h.opacity;else if(!("opacity"in a)){const{opacity:d}=h;d%1?a.opacity=1:delete h.opacity}return h});return[t,c]}function L(o,s){for(const n in s)e.css(o,n,"")}function I(o){const{height:s,width:n}=e.offset(o);return{height:s,width:n,transform:"",...e.position(o),...e.css(o,["marginTop","marginLeft"])}}function D(){return new Promise(o=>requestAnimationFrame(o))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,s=this.$el){const n=this.animation;return(n==="fade"?P:n==="delayed-fade"?(...c)=>P(...c,40):n?A:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},V={connected(){e.addClass(this.$el,this.$options.id)}},E={mixins:[V,M],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const o of["init","start","move","end"]){const s=this[o];this[o]=n=>{e.assign(this.pos,e.getEventPos(n)),s(n)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target:(o,s)=>(s.tBodies||[s])[0],items(){return e.children(this.target)},isEmpty(){return e.isEmpty(this.items)},handles({handle:o},s){return o?e.$$(o,s):this.items}},watch:{isEmpty(o){e.toggleClass(this.target,this.clsEmpty,o)},handles(o,s){e.css(s,{touchAction:"",userSelect:""}),e.css(o,{touchAction:e.hasTouch?"none":"",userSelect:"none"})}},update:{write(o){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:n-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,n));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=G(h,{x:s,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),l=J(r.target,d,a,s,n,r===p&&o.moved!==d);l!==!1&&(l&&a===l||(r!==p?(p.remove(a),o.moved=d):delete o.moved,r.insert(a,l),this.touched.add(r)))},events:["move"]},methods:{init(o){const{target:s,button:n,defaultPrevented:t}=o,[c]=this.items.filter(a=>e.within(s,a));!c||t||n>0||e.isInput(s)||e.within(s,`.${this.clsNoDrag}`)||this.handle&&!e.within(s,this.handle)||(o.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:s,index:e.index(c),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(o))},start(o){this.drag=W(this.$container,this.placeholder);const{left:s,top:n}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-n}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),j(this.pos),this.move(o)},move(o){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(o)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;O();const o=this.getSortable(this.placeholder);this===o?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(o.$el,"added",[o,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:n}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,n);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(o,s){e.addClass(this.items,this.clsItem);const n=()=>s?e.before(s,o):e.append(this.target,o);this.animate(n)},remove(o){e.within(o,this.target)&&this.animate(()=>e.remove(o))},getSortable(o){do{const s=this.$getComponent(o,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(o=e.parent(o))}}};let $;function j(o){let s=Date.now();$=setInterval(()=>{let{x:n,y:t}=o;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(n,o.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:l}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(p>t&&p-35<t)r+=c;else return;if(r>0&&r<h-l)return a.scrollTop=r,!0})},15)}function O(){clearInterval($)}function W(o,s){let n;if(e.isTag(s,"li","tr")){n=e.$("<div>"),e.append(n,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(n,t,s.getAttribute(t))}else n=s.cloneNode(!0);return e.append(o,n),e.css(n,"margin","0","important"),e.css(n,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(n.firstElementChild,e.height(s.firstElementChild)),n}function G(o,s){return o[e.findIndex(o,n=>e.pointInRect(s,n.getBoundingClientRect()))]}function J(o,s,n,t,c,a){if(!e.children(o).length)return;const r=s.getBoundingClientRect();if(!a)return K(o,n)||c<r.top+r.height/2?s:s.nextElementSibling;const h=n.getBoundingClientRect(),d=F([r.top,r.bottom],[h.top,h.bottom]),[p,l,i,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[l]<r[l]?r[l]-h[l]:0;return h[i]<r[i]?m&&p<r[i]+m?!1:s.nextElementSibling:m&&p>r[f]-m?!1:s}function K(o,s){const n=e.children(o).length===1;n&&e.append(o,s);const t=e.children(o),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const p=d.getBoundingClientRect();return!F([h.left,h.right],[p.left,p.right])})});return n&&e.remove(s),c}function F(o,s){return o[1]>s[0]&&s[1]>o[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",E),E});
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(o,s="update"){o._connected&&o._updates.length&&(o._queued||(o._queued=new Set,e.fastdom.read(()=>{o._connected&&R(o,o._queued),delete o._queued})),o._queued.add(s.type||s))}function R(o,s){for(const{read:n,write:t,events:c=[]}of o._updates){if(!s.has("update")&&!c.some(r=>s.has(r)))continue;let a;n&&(a=n.call(o,o._data,s),a&&e.isPlainObject(a)&&e.assign(o._data,a)),t&&a!==!1&&e.fastdom.write(()=>{o._connected&&t.call(o,o._data,s)})}}function B(o){return y(e.observeResize,o,"resize")}function N(o){return y(e.observeMutation,o)}function y(o,s,n){return{observe:o,handler(){g(this,n)},...s}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),B({target:({$el:o})=>[o,...e.children(o)]});function C(o){const s=[[]],n=o.some((t,c)=>c&&o[c-1].offsetParent!==t.offsetParent);for(const t of o){if(!e.isVisible(t))continue;const c=b(t,n);for(let a=s.length-1;a>=0;a--){const r=s[a];if(!r[0]){r.push(t);break}const h=b(r[0],n);if(c.top>=h.bottom-1&&c.top!==h.top){s.push([t]);break}if(c.bottom-1>h.top||c.top===h.top){let d=r.length-1;for(;d>=0;d--){const p=b(r[d],n);if(c.left>=p.left)break}r.splice(d+1,0,t);break}if(a===0){s.unshift([t]);break}}}return s}function b(o,s=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:a}=o;return s&&([n,t]=e.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+a}}const w="uk-transition-leave",v="uk-transition-enter";function P(o,s,n,t=0){const c=u(s,!0),a={opacity:1},r={opacity:0},h=l=>()=>c===u(s)?l():Promise.reject(),d=h(async()=>{e.addClass(s,w),await Promise.all(S(s).map((l,i)=>new Promise(f=>setTimeout(()=>e.Transition.start(l,r,n/2,"ease").then(f),i*t)))),e.removeClass(s,w)}),p=h(async()=>{const l=e.height(s);e.addClass(s,v),o(),e.css(e.children(s),{opacity:0}),await z();const i=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,l);const m=S(s);e.css(i,r);const _=m.map(async(Q,X)=>{await q(X*t),await e.Transition.start(Q,a,n/2,"ease")});l!==f&&_.push(e.Transition.start(s,{height:f},n/2+m.length*t,"ease")),await Promise.all(_).then(()=>{e.removeClass(s,v),c===u(s)&&(e.css(s,{height:"",alignContent:""}),e.css(i,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,w)?T(s).then(p):e.hasClass(s,v)?T(s).then(d).then(p):d().then(p)}function u(o,s){return s&&(o.dataset.transition=1+u(o)),e.toNumber(o.dataset.transition)||0}function T(o){return Promise.all(e.children(o).filter(e.Transition.inProgress).map(s=>new Promise(n=>e.once(s,"transitionend transitioncanceled",n))))}function S(o){return C(e.children(o)).flat().filter(s=>e.isVisible(s))}function z(){return new Promise(o=>requestAnimationFrame(o))}function q(o){return new Promise(s=>setTimeout(s,o))}async function A(o,s,n){await D();let t=e.children(s);const c=t.map(f=>x(f,!0)),a={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),o(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,p]=H(s,t,c),l=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>p[m]&&e.css(f,p[m])),e.css(s,a),e.trigger(s,"scroll"),e.fastdom.flush(),await D();const i=t.map((f,m)=>e.parent(f)===s&&e.Transition.start(f,d[m],n,"ease")).concat(e.Transition.start(s,h,n,"ease"));try{await Promise.all(i),t.forEach((f,m)=>{e.attr(f,l[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),L(s,a)}}function x(o,s){const n=e.css(o,"zIndex");return e.isVisible(o)?{display:"",opacity:s?e.css(o,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:n==="auto"?e.index(o):n,...I(o)}:!1}function H(o,s,n){const t=s.map((a,r)=>e.parent(a)&&r in n?n[r]?e.isVisible(a)?I(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===o&&(n[r]||x(s[r]));if(!h)return!1;if(!a)delete h.opacity;else if(!("opacity"in a)){const{opacity:d}=h;d%1?a.opacity=1:delete h.opacity}return h});return[t,c]}function L(o,s){for(const n in s)e.css(o,n,"")}function I(o){const{height:s,width:n}=e.offset(o);return{height:s,width:n,transform:"",...e.position(o),...e.css(o,["marginTop","marginLeft"])}}function D(){return new Promise(o=>requestAnimationFrame(o))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,s=this.$el){const n=this.animation;return(n==="fade"?P:n==="delayed-fade"?(...c)=>P(...c,40):n?A:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},V={connected(){e.addClass(this.$el,this.$options.id)}},E={mixins:[V,M],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const o of["init","start","move","end"]){const s=this[o];this[o]=n=>{e.assign(this.pos,e.getEventPos(n)),s(n)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target:(o,s)=>(s.tBodies||[s])[0],items(){return e.children(this.target)},isEmpty(){return e.isEmpty(this.items)},handles({handle:o},s){return o?e.$$(o,s):this.items}},watch:{isEmpty(o){e.toggleClass(this.target,this.clsEmpty,o)},handles(o,s){e.css(s,{touchAction:"",userSelect:""}),e.css(o,{touchAction:e.hasTouch?"none":"",userSelect:"none"})}},update:{write(o){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:n-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,n));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=G(h,{x:s,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),l=J(r.target,d,a,s,n,r===p&&o.moved!==d);l!==!1&&(l&&a===l||(r!==p?(p.remove(a),o.moved=d):delete o.moved,r.insert(a,l),this.touched.add(r)))},events:["move"]},methods:{init(o){const{target:s,button:n,defaultPrevented:t}=o,[c]=this.items.filter(a=>e.within(s,a));!c||t||n>0||e.isInput(s)||e.within(s,`.${this.clsNoDrag}`)||this.handle&&!e.within(s,this.handle)||(o.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:s,index:e.index(c),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(o))},start(o){this.drag=W(this.$container,this.placeholder);const{left:s,top:n}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-n}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),j(this.pos),this.move(o)},move(o){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(o)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;O();const o=this.getSortable(this.placeholder);this===o?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(o.$el,"added",[o,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:n}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,n);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(o,s){e.addClass(this.items,this.clsItem);const n=()=>s?e.before(s,o):e.append(this.target,o);this.animate(n)},remove(o){e.within(o,this.target)&&this.animate(()=>e.remove(o))},getSortable(o){do{const s=this.$getComponent(o,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(o=e.parent(o))}}};let $;function j(o){let s=Date.now();$=setInterval(()=>{let{x:n,y:t}=o;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(n,o.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:l}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(p>t&&p-35<t)r+=c;else return;if(r>0&&r<h-l)return a.scrollTop=r,!0})},15)}function O(){clearInterval($)}function W(o,s){let n;if(e.isTag(s,"li","tr")){n=e.$("<div>"),e.append(n,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(n,t,s.getAttribute(t))}else n=s.cloneNode(!0);return e.append(o,n),e.css(n,"margin","0","important"),e.css(n,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(n.firstElementChild,e.height(s.firstElementChild)),n}function G(o,s){return o[e.findIndex(o,n=>e.pointInRect(s,n.getBoundingClientRect()))]}function J(o,s,n,t,c,a){if(!e.children(o).length)return;const r=s.getBoundingClientRect();if(!a)return K(o,n)||c<r.top+r.height/2?s:s.nextElementSibling;const h=n.getBoundingClientRect(),d=F([r.top,r.bottom],[h.top,h.bottom]),[p,l,i,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[l]<r[l]?r[l]-h[l]:0;return h[i]<r[i]?m&&p<r[i]+m?!1:s.nextElementSibling:m&&p>r[f]-m?!1:s}function K(o,s){const n=e.children(o).length===1;n&&e.append(o,s);const t=e.children(o),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const p=d.getBoundingClientRect();return!F([h.left,h.right],[p.left,p.right])})});return n&&e.remove(s),c}function F(o,s){return o[1]>s[0]&&s[1]>o[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",E),E});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],d):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitTooltip=d(t.UIkit.util))})(this,function(t){"use strict";function d(s,i=s.$el,e=""){if(i.id)return i.id;let o=`${s.$options.id}-${s._uid}${e}`;return t.$(`#${o}`)&&(o=d(s,i,`${e}-2`)),o}var S={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},A={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:`bottom-${t.isRtl?"right":"left"}`,offset:!1,flip:!0,shift:!0,inset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=t.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(s,i,e){let o=[this.getPositionOffset(s),this.getShiftOffset(s)];const n=[this.flip&&"flip",this.shift&&"shift"],h={element:[this.inset?this.dir:t.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const c in h)h[c].reverse();o.reverse(),n.reverse()}const r=O(s),a=t.dimensions(s);t.css(s,{top:-a.height,left:-a.width}),t.positionAt(s,i,{attach:h,offset:o,boundary:e,placement:n,viewportOffset:this.getViewportOffset(s)}),r()},getPositionOffset(s){return t.toPx(this.offset===!1?t.css(s,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",s)*(t.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(s){return this.align==="center"?0:t.toPx(t.css(s,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",s)*(t.includes(["left","top"],this.align)?1:-1)},getViewportOffset(s){return t.toPx(t.css(s,"--uk-position-viewport-offset"))}}};function O(s){const i=t.scrollParent(s),{scrollTop:e}=i;return()=>{e!==i.scrollTop&&(i.scrollTop=e)}}var B={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation:({animation:s})=>!!s[0],hasTransition:({animation:s})=>["slide","reveal"].some(i=>t.startsWith(s[0],i))},methods:{async toggleElement(s,i,e){try{return await Promise.all(t.toNodes(s).map(o=>{const n=t.isBoolean(i)?i:!this.isToggled(o);if(!t.trigger(o,`before${n?"show":"hide"}`,[this]))return Promise.reject();const h=(t.isFunction(e)?e:e===!1||!this.hasAnimation?I:this.hasTransition?D:N)(o,n,this),r=n?this.clsEnter:this.clsLeave;t.addClass(o,r),t.trigger(o,n?"show":"hide",[this]);const a=()=>{t.removeClass(o,r),t.trigger(o,n?"shown":"hidden",[this])};return h?h.then(a,()=>(t.removeClass(o,r),Promise.reject())):a()})),!0}catch{return!1}},isToggled(s=this.$el){return s=t.toNode(s),t.hasClass(s,this.clsEnter)?!0:t.hasClass(s,this.clsLeave)?!1:this.cls?t.hasClass(s,this.cls.split(" ")[0]):t.isVisible(s)},_toggle(s,i){if(!s)return;i=!!i;let e;this.cls?(e=t.includes(this.cls," ")||i!==t.hasClass(s,this.cls),e&&t.toggleClass(s,this.cls,t.includes(this.cls," ")?void 0:i)):(e=i===s.hidden,e&&(s.hidden=!i)),t.$$("[autofocus]",s).some(o=>t.isVisible(o)?o.focus()||!0:o.blur()),e&&t.trigger(s,"toggled",[i,this])}}};function I(s,i,{_toggle:e}){return t.Animation.cancel(s),t.Transition.cancel(s),e(s,i)}async function D(s,i,{animation:e,duration:o,velocity:n,transition:h,_toggle:r}){var a;const[c="reveal",v="top"]=((a=e[0])==null?void 0:a.split("-"))||[],b=[["left","right"],["top","bottom"]],T=b[t.includes(b[0],v)?0:1],k=T[1]===v,m=["width","height"][b.indexOf(T)],p=`margin-${T[0]}`,w=`margin-${v}`;let g=t.dimensions(s)[m];const U=t.Transition.inProgress(s);await t.Transition.cancel(s),i&&r(s,!0);const j=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",p,w].map(C=>[C,s.style[C]])),l=t.dimensions(s),y=t.toFloat(t.css(s,p)),u=t.toFloat(t.css(s,w)),f=l[m]+u;!U&&!i&&(g+=u);const[$]=t.wrapInner(s,"<div>");t.css($,{boxSizing:"border-box",height:l.height,width:l.width,...t.css(s,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",w])}),t.css(s,{padding:0,border:0,minWidth:0,minHeight:0,[w]:0,width:l.width,height:l.height,overflow:"hidden",[m]:g});const E=g/f;o=(n*f+o)*(i?1-E:E);const x={[m]:i?f:0};k&&(t.css(s,p,f-g+y),x[p]=i?y:f+y),!k^c==="reveal"&&(t.css($,p,-f+g),t.Transition.start($,{[p]:i?0:-f},o,h));try{await t.Transition.start(s,x,o,h)}finally{t.css(s,j),t.unwrap($.firstChild),i||r(s,!1)}}function N(s,i,e){const{animation:o,duration:n,_toggle:h}=e;return i?(h(s,!0),t.Animation.in(s,o[0],n,e.origin)):t.Animation.out(s,o[1]||o[0],n,e.origin).then(()=>h(s,!1))}const _={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var P={mixins:[S,B,A],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this.id=d(this,{}),this._hasTitle=t.hasAttr(this.$el,"title"),t.attr(this.$el,{title:"","aria-describedby":this.id}),F(this.$el)},disconnected(){this.hide(),t.attr(this.$el,"title")||t.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){t.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&await this.toggleElement(this.tooltip,!1,!1),t.remove(this.tooltip),this.tooltip=null)},async _show(){this.tooltip=t.append(this.container,`<div id="${this.id}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${this.title}</div> </div>`),t.on(this.tooltip,"toggled",(s,i)=>{if(!i)return;const e=()=>this.positionAt(this.tooltip,this.$el);e();const[o,n]=L(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${t.flipPosition(o)}-${n}`:`${n}-${t.flipPosition(o)}`;const h=[t.once(document,`keydown ${t.pointerDown}`,this.hide,!1,r=>r.type===t.pointerDown&&!t.within(r.target,this.$el)||r.type==="keydown"&&r.keyCode===_.ESC),t.on([document,...t.overflowParents(this.$el)],"scroll",e,{passive:!0})];t.once(this.tooltip,"hide",()=>h.forEach(r=>r()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{focus:"show",blur:"hide",[`${t.pointerEnter} ${t.pointerLeave}`](s){t.isTouch(s)||this[s.type===t.pointerEnter?"show":"hide"]()},[t.pointerDown](s){t.isTouch(s)&&this.show()}}};function F(s){t.isFocusable(s)||t.attr(s,"tabindex","0")}function L(s,i,[e,o]){const n=t.offset(s),h=t.offset(i),r=[["left","right"],["top","bottom"]];for(const c of r){if(n[c[0]]>=h[c[1]]){e=c[1];break}if(n[c[1]]<=h[c[0]]){e=c[0];break}}const a=t.includes(r[0],e)?r[1]:r[0];return n[a[0]]===h[a[0]]?o=a[0]:n[a[1]]===h[a[1]]?o=a[1]:o="center",[e,o]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",P),P});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(o,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],i):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=i(o.UIkit.util))})(this,function(o){"use strict";var i={props:{i18n:Object},data:{i18n:null},methods:{t(e,...r){var a,s,t;let n=0;return((t=((a=this.i18n)==null?void 0:a[e])||((s=this.$options.i18n)==null?void 0:s[e]))==null?void 0:t.replace(/%s/g,()=>r[n++]||""))||""}}},d={mixins:[i],i18n:{invalidMime:"Invalid File Type: %s",invalidName:"Invalid File Name: %s",invalidSize:"Invalid File Size: %s Kilobytes Max"},props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,multiple:!1,name:"files[]",params:{},type:"",url:"",abort:o.noop,beforeAll:o.noop,beforeSend:o.noop,complete:o.noop,completeAll:o.noop,error:o.noop,fail:o.noop,load:o.noop,loadEnd:o.noop,loadStart:o.noop,progress:o.noop},events:{change(e){o.matches(e.target,'input[type="file"]')&&(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){l(e);const r=e.dataTransfer;r!=null&&r.files&&(o.removeClass(this.$el,this.clsDragover),this.upload(r.files))},dragenter(e){l(e)},dragover(e){l(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){l(e),o.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){if(e=o.toArray(e),!e.length)return;o.trigger(this.$el,"upload",[e]);for(const s of e){if(this.maxSize&&this.maxSize*1e3<s.size){this.fail(this.t("invalidSize",this.maxSize));return}if(this.allow&&!h(this.allow,s.name)){this.fail(this.t("invalidName",this.allow));return}if(this.mime&&!h(this.mime,s.type)){this.fail(this.t("invalidMime",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const r=f(e,this.concurrent),a=async s=>{const t=new FormData;s.forEach(n=>t.append(this.name,n));for(const n in this.params)t.append(n,this.params[n]);try{const n=await u(this.url,{data:t,method:this.method,responseType:this.type,beforeSend:p=>{const{xhr:m}=p;o.on(m.upload,"progress",this.progress);for(const c of["loadStart","load","loadEnd","abort"])o.on(m,c.toLowerCase(),this[c]);return this.beforeSend(p)}});this.complete(n),r.length?await a(r.shift()):this.completeAll(n)}catch(n){this.error(n)}};await a(r.shift())}}};function h(e,r){return r.match(new RegExp(`^${e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")}$`,"i"))}function f(e,r){const a=[];for(let s=0;s<e.length;s+=r)a.push(e.slice(s,s+r));return a}function l(e){e.preventDefault(),e.stopPropagation()}function u(e,r){const a={data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:o.noop,responseType:"",...r};return Promise.resolve().then(()=>a.beforeSend(a)).then(()=>g(e,a))}function g(e,r){return new Promise((a,s)=>{const{xhr:t}=r;for(const n in r)if(n in t)try{t[n]=r[n]}catch{}t.open(r.method.toUpperCase(),e);for(const n in r.headers)t.setRequestHeader(n,r.headers[n]);o.on(t,"load",()=>{t.status===0||t.status>=200&&t.status<300||t.status===304?a(t):s(o.assign(Error(t.statusText),{xhr:t,status:t.status}))}),o.on(t,"error",()=>s(o.assign(Error("Network Error"),{xhr:t}))),o.on(t,"timeout",()=>s(o.assign(Error("Network Timeout"),{xhr:t}))),t.send(r.data)})}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",d),d});
|
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.7-dev.fbae993df | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -2150,7 +2150,7 @@
|
|
|
2150
2150
|
};
|
|
2151
2151
|
App.util = util;
|
|
2152
2152
|
App.options = {};
|
|
2153
|
-
App.version = "3.17.
|
|
2153
|
+
App.version = "3.17.7-dev.fbae993df";
|
|
2154
2154
|
|
|
2155
2155
|
const PREFIX = "uk-";
|
|
2156
2156
|
const DATA = "__uikit__";
|
|
@@ -5773,7 +5773,7 @@
|
|
|
5773
5773
|
}
|
|
5774
5774
|
const hide = this.isFixed && !this.transitionInProgress;
|
|
5775
5775
|
if (hide) {
|
|
5776
|
-
preventTransition(this
|
|
5776
|
+
preventTransition(this.$el);
|
|
5777
5777
|
this.hide();
|
|
5778
5778
|
}
|
|
5779
5779
|
if (!this.active) {
|
|
@@ -6015,8 +6015,8 @@
|
|
|
6015
6015
|
css(el, { position: "", top: "", marginTop: "", width: "" });
|
|
6016
6016
|
}
|
|
6017
6017
|
function preventTransition(el) {
|
|
6018
|
-
|
|
6019
|
-
requestAnimationFrame(() =>
|
|
6018
|
+
addClass(el, "uk-transition-disable");
|
|
6019
|
+
requestAnimationFrame(() => removeClass(el, "uk-transition-disable"));
|
|
6020
6020
|
}
|
|
6021
6021
|
|
|
6022
6022
|
function getMaxPathLength(el) {
|