uikit 3.16.6 → 3.16.7-dev.fcb5a4616
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 +6 -0
- package/README.md +2 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +2 -2
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +2 -2
- 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 +5 -414
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +194 -1996
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +205 -1993
- 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 +3 -248
- 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 +143 -2429
- 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 +97 -2383
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -408
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +81 -2367
- 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 +85 -78
- 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 +85 -78
- package/dist/js/uikit.min.js +1 -1
- package/package.json +9 -8
- package/src/js/api/app.js +1 -1
- package/src/js/api/boot.js +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/api/computed.js +1 -1
- package/src/js/api/events.js +1 -1
- package/src/js/api/global.js +43 -43
- package/src/js/api/index.js +5 -5
- package/src/js/api/instance.js +42 -41
- package/src/js/api/observables.js +1 -1
- package/src/js/api/observer.js +9 -1
- package/src/js/api/options.js +1 -1
- package/src/js/api/props.js +1 -1
- package/src/js/api/state.js +1 -1
- package/src/js/api/update.js +1 -1
- package/src/js/api/watch.js +1 -1
- package/src/less/components/dropdown.less +1 -1
- package/src/less/theme/dropdown.less +2 -0
- package/src/scss/components/dropdown.scss +1 -1
- package/src/scss/theme/dropdown.scss +2 -0
- package/src/scss/variables-theme.scss +2 -2
- package/src/scss/variables.scss +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.6 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(c,nt){typeof exports=="object"&&typeof module<"u"?module.exports=nt(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],nt):(c=typeof globalThis<"u"?globalThis:c||self,c.UIkitSlideshow=nt(c.UIkit.util))})(this,function(c){"use strict";var nt={connected(){c.addClass(this.$el,this.$options.id)}},$e={slide:{show(t){return[{transform:v(t*-100)},{transform:v()}]},percent(t){return rt(t)},translate(t,e){return[{transform:v(e*-100*t)},{transform:v(e*100*(1-t))}]}}};function rt(t){return Math.abs(c.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function v(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function Ie(t){return`scale3d(${t}, ${t}, 1)`}function Ln(t,e,n,{animation:r,easing:o}){const{percent:s,translate:i,show:a=c.noop}=r,u=a(n),f=new c.Deferred;return{dir:n,show(d,p=0,b){const x=b?"linear":o;return d-=Math.round(d*c.clamp(p,-1,1)),this.translate(p),bt(e,"itemin",{percent:p,duration:d,timing:x,dir:n}),bt(t,"itemout",{percent:1-p,duration:d,timing:x,dir:n}),Promise.all([c.Transition.start(e,u[1],d,x),c.Transition.start(t,u[0],d,x)]).then(()=>{this.reset(),f.resolve()},c.noop),f.promise},cancel(){c.Transition.cancel([e,t])},reset(){for(const d in u[0])c.css([e,t],d,"")},forward(d,p=this.percent()){return c.Transition.cancel([e,t]),this.show(d,p,!0)},translate(d){this.reset();const p=i(d,n);c.css(e,p[1]),c.css(t,p[0]),bt(e,"itemtranslatein",{percent:d,dir:n}),bt(t,"itemtranslateout",{percent:1-d,dir:n})},percent(){return s(t||e,e,n)},getDistance(){return t==null?void 0:t.offsetWidth}}}function bt(t,e,n){c.trigger(t,c.createEvent(e,!1,!1,n))}var Hn={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var n,r,o;let s=0;return((o=((n=this.i18n)==null?void 0:n[t])||((r=this.$options.i18n)==null?void 0:r[t]))==null?void 0:o.replace(/%s/g,()=>e[s++]||""))||""}}};const ot={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40},{hasOwnProperty:jn,toString:Wn}=Object.prototype;function z(t,e){return jn.call(t,e)}const Fn=/\B([A-Z])/g,st=N(t=>t.replace(Fn,"-$1").toLowerCase()),Bn=/-(\w)/g,it=N(t=>(t.charAt(0).toLowerCase()+t.slice(1)).replace(Bn,(e,n)=>n.toUpperCase())),L=N(t=>t.charAt(0).toUpperCase()+t.slice(1));function H(t,e){var n;return(n=t==null?void 0:t.startsWith)==null?void 0:n.call(t,e)}function qn(t,e){var n;return(n=t==null?void 0:t.endsWith)==null?void 0:n.call(t,e)}function Y(t,e){var n;return(n=t==null?void 0:t.includes)==null?void 0:n.call(t,e)}function _e(t,e){var n;return(n=t==null?void 0:t.findIndex)==null?void 0:n.call(t,e)}const{isArray:$,from:Xn}=Array,{assign:St}=Object;function _(t){return typeof t=="function"}function M(t){return t!==null&&typeof t=="object"}function D(t){return Wn.call(t)==="[object Object]"}function J(t){return M(t)&&t===t.window}function xt(t){return Mt(t)===9}function zt(t){return Mt(t)>=1}function ct(t){return Mt(t)===1}function Mt(t){return!J(t)&&M(t)&&t.nodeType}function Ee(t){return typeof t=="boolean"}function w(t){return typeof t=="string"}function Dt(t){return typeof t=="number"}function yt(t){return Dt(t)||w(t)&&!isNaN(t-parseFloat(t))}function Ae(t){return!($(t)?t.length:M(t)&&Object.keys(t).length)}function E(t){return t===void 0}function Rt(t){return Ee(t)?t:t==="true"||t==="1"||t===""?!0:t==="false"||t==="0"?!1:t}function at(t){const e=Number(t);return isNaN(e)?!1:e}function I(t){return parseFloat(t)||0}function g(t){return h(t)[0]}function h(t){return zt(t)?[t]:Array.from(t||[]).filter(zt)}function G(t){if(J(t))return t;t=g(t);const e=xt(t)?t:t==null?void 0:t.ownerDocument;return(e==null?void 0:e.defaultView)||window}function Lt(t,e){return t===e||M(t)&&M(e)&&Object.keys(t).length===Object.keys(e).length&&$t(t,(n,r)=>n===e[r])}function Yn(t,e,n){return t.replace(new RegExp(`${e}|${n}`,"g"),r=>r===e?n:e)}function Oe(t){return t[t.length-1]}function $t(t,e){for(const n in t)if(e(t[n],n)===!1)return!1;return!0}function Ce(t,e){return t.slice().sort(({[e]:n=0},{[e]:r=0})=>n>r?1:r>n?-1:0)}function Ht(t,e){return t.reduce((n,r)=>n+I(_(e)?e(r):r[e]),0)}function Jn(t,e){const n=new Set;return t.filter(({[e]:r})=>n.has(r)?!1:n.add(r))}function Gn(t,e){return e.reduce((n,r)=>({...n,[r]:t[r]}),{})}function K(t,e=0,n=1){return Math.min(Math.max(at(t)||0,e),n)}function It(){}function Te(...t){return[["bottom","top"],["right","left"]].every(([e,n])=>Math.min(...t.map(({[e]:r})=>r))-Math.max(...t.map(({[n]:r})=>r))>0)}function jt(t,e){return t.x<=e.right&&t.x>=e.left&&t.y<=e.bottom&&t.y>=e.top}function Wt(t,e,n){const r=e==="width"?"height":"width";return{[r]:t[e]?Math.round(n*t[r]/t[e]):t[r],[e]:n}}function Pe(t,e){t={...t};for(const n in t)t=t[n]>e[n]?Wt(t,n,e[n]):t;return t}function Kn(t,e){t=Pe(t,e);for(const n in t)t=t[n]<e[n]?Wt(t,n,e[n]):t;return t}const Zn={ratio:Wt,contain:Pe,cover:Kn};function Qn(t,e,n=0,r=!1){e=h(e);const{length:o}=e;return o?(t=yt(t)?at(t):t==="next"?n+1:t==="previous"?n-1:t==="last"?o-1:e.indexOf(g(t)),r?K(t,0,o-1):(t%=o,t<0?t+o:t)):-1}function N(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}class Vn{constructor(){this.promise=new Promise((e,n)=>{this.reject=n,this.resolve=e})}}function j(t,e,n){var r;if(M(e)){for(const o in e)j(t,o,e[o]);return}if(E(n))return(r=g(t))==null?void 0:r.getAttribute(e);for(const o of h(t))_(n)&&(n=n.call(o,j(o,e))),n===null?Ft(o,e):o.setAttribute(e,n)}function Ne(t,e){return h(t).some(n=>n.hasAttribute(e))}function Ft(t,e){h(t).forEach(n=>n.removeAttribute(e))}function Bt(t,e){for(const n of[e,`data-${e}`])if(Ne(t,n))return j(t,n)}const kn={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function Un(t){return h(t).some(e=>kn[e.tagName.toLowerCase()])}function _t(t){return h(t).some(e=>e.offsetWidth||e.offsetHeight||e.getClientRects().length)}const qt="input,select,textarea,button";function tr(t){return h(t).some(e=>Z(e,qt))}const Se=`${qt},a[href],[tabindex]`;function er(t){return Z(t,Se)}function ut(t){var e;return(e=g(t))==null?void 0:e.parentElement}function ze(t,e){return h(t).filter(n=>Z(n,e))}function Z(t,e){return h(t).some(n=>n.matches(e))}function ft(t,e){return ct(t)?t.closest(H(e,">")?e.slice(1):e):h(t).map(n=>ft(n,e)).filter(Boolean)}function Et(t,e){return w(e)?!!ft(t,e):g(e).contains(g(t))}function Xt(t,e){const n=[];for(;t=ut(t);)(!e||Z(t,e))&&n.push(t);return n}function Me(t,e){t=g(t);const n=t?h(t.children):[];return e?ze(n,e):n}function De(t,e){return e?h(t).indexOf(g(e)):Me(ut(t)).indexOf(t)}function Re(t){return t=g(t),t&&["origin","pathname","search"].every(e=>t[e]===location[e])}function nr(t){if(Re(t)){t=g(t);const e=decodeURIComponent(t.hash).substring(1);return document.getElementById(e)||document.getElementsByName(e)[0]}}function rr(t,e){return Yt(t,He(t,e))}function or(t,e){return dt(t,He(t,e))}function Yt(t,e){return g(je(t,g(e),"querySelector"))}function dt(t,e){return h(je(t,g(e),"querySelectorAll"))}const sr=/(^|[^\\],)\s*[!>+~-]/,Le=N(t=>t.match(sr));function He(t,e=document){return w(t)&&Le(t)||xt(e)?e:e.ownerDocument}const ir=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,cr=N(t=>t.replace(ir,"$1 *"));function je(t,e=document,n){if(!t||!w(t))return t;if(t=cr(t),Le(t)){const r=ur(t);t="";for(let o of r){let s=e;if(o[0]==="!"){const i=o.substr(1).trim().split(" ");if(s=ft(ut(e),i[0]),o=i.slice(1).join(" ").trim(),!o.length&&r.length===1)return s}if(o[0]==="-"){const i=o.substr(1).trim().split(" "),a=(s||e).previousElementSibling;s=Z(a,o.substr(1))?a:null,o=i.slice(1).join(" ")}s&&(t+=`${t?",":""}${fr(s)} ${o}`)}e=document}try{return e[n](t)}catch{return null}}const ar=/.*?[^\\](?:,|$)/g,ur=N(t=>t.match(ar).map(e=>e.replace(/,$/,"").trim()));function fr(t){const e=[];for(;t.parentNode;){const n=j(t,"id");if(n){e.unshift(`#${We(n)}`);break}else{let{tagName:r}=t;r!=="HTML"&&(r+=`:nth-child(${De(t)+1})`),e.unshift(r),t=t.parentNode}}return e.join(" > ")}function We(t){return w(t)?CSS.escape(t):""}function W(...t){let[e,n,r,o,s=!1]=Jt(t);o.length>1&&(o=hr(o)),s!=null&&s.self&&(o=lr(o)),r&&(o=dr(r,o));for(const i of n)for(const a of e)a.addEventListener(i,o,s);return()=>Fe(e,n,o,s)}function Fe(...t){let[e,n,,r,o=!1]=Jt(t);for(const s of n)for(const i of e)i.removeEventListener(s,r,o)}function Q(...t){const[e,n,r,o,s=!1,i]=Jt(t),a=W(e,n,r,u=>{const f=!i||i(u);f&&(a(),o(u,f))},s);return a}function F(t,e,n){return Gt(t).every(r=>r.dispatchEvent(Be(e,!0,!0,n)))}function Be(t,e=!0,n=!1,r){return w(t)&&(t=new CustomEvent(t,{bubbles:e,cancelable:n,detail:r})),t}function Jt(t){return t[0]=Gt(t[0]),w(t[1])&&(t[1]=t[1].split(" ")),_(t[2])&&t.splice(2,0,!1),t}function dr(t,e){return n=>{const r=t[0]===">"?dt(t,n.currentTarget).reverse().filter(o=>Et(n.target,o))[0]:ft(n.target,t);r&&(n.current=r,e.call(this,n),delete n.current)}}function hr(t){return e=>$(e.detail)?t(e,...e.detail):t(e)}function lr(t){return function(e){if(e.target===e.currentTarget||e.target===e.current)return t.call(null,e)}}function qe(t){return t&&"addEventListener"in t}function pr(t){return qe(t)?t:g(t)}function Gt(t){return $(t)?t.map(pr).filter(Boolean):w(t)?dt(t):qe(t)?[t]:h(t)}function mr(t){return t.pointerType==="touch"||!!t.touches}function Xe(t){var e,n;const{clientX:r,clientY:o}=((e=t.touches)==null?void 0:e[0])||((n=t.changedTouches)==null?void 0:n[0])||t;return{x:r,y:o}}const gr={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function l(t,e,n,r){const o=h(t);for(const s of o)if(w(e)){if(e=Kt(e),E(n))return getComputedStyle(s).getPropertyValue(e);s.style.setProperty(e,yt(n)&&!gr[e]?`${n}px`:n||Dt(n)?n:"",r)}else if($(e)){const i={};for(const a of e)i[a]=l(s,a);return i}else M(e)&&(r=n,$t(e,(i,a)=>l(s,a,i,r)));return o[0]}const Kt=N(t=>vr(t));function vr(t){if(H(t,"--"))return t;t=st(t);const{style:e}=document.documentElement;if(t in e)return t;for(const n of["webkit","moz"]){const r=`-${n}-${t}`;if(r in e)return r}}function V(t,...e){Ge(t,e,"add")}function Zt(t,...e){Ge(t,e,"remove")}function Ye(t,e){j(t,"class",n=>(n||"").replace(new RegExp(`\\b${e}\\b\\s?`,"g"),""))}function wr(t,...e){e[0]&&Zt(t,e[0]),e[1]&&V(t,e[1])}function Je(t,e){return[e]=Qt(e),!!e&&h(t).some(n=>n.classList.contains(e))}function br(t,e,n){const r=Qt(e);E(n)||(n=!!n);for(const o of h(t))for(const s of r)o.classList.toggle(s,n)}function Ge(t,e,n){e=e.reduce((r,o)=>r.concat(Qt(o)),[]);for(const r of h(t))r.classList[n](...e)}function Qt(t){return String(t).split(/[ ,]/).filter(Boolean)}function xr(t,e,n=400,r="linear"){return n=Math.round(n),Promise.all(h(t).map(o=>new Promise((s,i)=>{for(const u in e){const f=l(o,u);f===""&&l(o,u,f)}const a=setTimeout(()=>F(o,"transitionend"),n);Q(o,"transitionend transitioncanceled",({type:u})=>{clearTimeout(a),Zt(o,"uk-transition"),l(o,{transitionProperty:"",transitionDuration:"",transitionTimingFunction:""}),u==="transitioncanceled"?i():s(o)},{self:!0}),V(o,"uk-transition"),l(o,{transitionProperty:Object.keys(e).map(Kt).join(","),transitionDuration:`${n}ms`,transitionTimingFunction:r,...e})})))}const yr={start:xr,async stop(t){F(t,"transitionend"),await Promise.resolve()},async cancel(t){F(t,"transitioncanceled"),await Promise.resolve()},inProgress(t){return Je(t,"uk-transition")}},ht="uk-animation-";function Ke(t,e,n=200,r,o){return Promise.all(h(t).map(s=>new Promise((i,a)=>{F(s,"animationcanceled");const u=setTimeout(()=>F(s,"animationend"),n);Q(s,"animationend animationcanceled",({type:f})=>{clearTimeout(u),f==="animationcanceled"?a():i(s),l(s,"animationDuration",""),Ye(s,`${ht}\\S*`)},{self:!0}),l(s,"animationDuration",`${n}ms`),V(s,e,ht+(o?"leave":"enter")),H(e,ht)&&(r&&V(s,`uk-transform-origin-${r}`),o&&V(s,`${ht}reverse`))})))}const $r=new RegExp(`${ht}(enter|leave)`),Ir={in:Ke,out(t,e,n,r){return Ke(t,e,n,r,!0)},inProgress(t){return $r.test(j(t,"class"))},cancel(t){F(t,"animationcanceled")}};function _r(t){if(document.readyState!=="loading"){t();return}Q(document,"DOMContentLoaded",t)}function Vt(t,...e){return e.some(n=>{var r;return((r=t==null?void 0:t.tagName)==null?void 0:r.toLowerCase())===n.toLowerCase()})}function Ze(t){return t=B(t),t.innerHTML="",t}function Er(t,e){return E(e)?B(t).innerHTML:lt(Ze(t),e)}const Ar=At("prepend"),lt=At("append"),Qe=At("before"),Or=At("after");function At(t){return function(e,n){var r;const o=h(w(n)?Ot(n):n);return(r=B(e))==null||r[t](...o),ke(o)}}function kt(t){h(t).forEach(e=>e.remove())}function Ve(t,e){for(e=g(Qe(t,e));e.firstChild;)e=e.firstChild;return lt(e,t),e}function Cr(t,e){return h(h(t).map(n=>n.hasChildNodes()?Ve(h(n.childNodes),e):lt(n,e)))}function Tr(t){h(t).map(ut).filter((e,n,r)=>r.indexOf(e)===n).forEach(e=>e.replaceWith(...e.childNodes))}const Pr=/^\s*<(\w+|!)[^>]*>/,Nr=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Ot(t){const e=Nr.exec(t);if(e)return document.createElement(e[1]);const n=document.createElement("div");return Pr.test(t)?n.insertAdjacentHTML("beforeend",t.trim()):n.textContent=t,ke(n.childNodes)}function ke(t){return t.length>1?t:t[0]}function Ut(t,e){if(ct(t))for(e(t),t=t.firstElementChild;t;){const n=t.nextElementSibling;Ut(t,e),t=n}}function B(t,e){return Ue(t)?g(Ot(t)):Yt(t,e)}function te(t,e){return Ue(t)?h(Ot(t)):dt(t,e)}function Ue(t){return w(t)&&H(t.trim(),"<")}const q={width:["left","right"],height:["top","bottom"]};function ee(t){const e=ct(t)?g(t).getBoundingClientRect():{height:en(t),width:re(t),top:0,left:0};return{height:e.height,width:e.width,top:e.top,left:e.left,bottom:e.top+e.height,right:e.left+e.width}}function C(t,e){const n=ee(t);if(t){const{scrollY:o,scrollX:s}=G(t),i={height:o,width:s};for(const a in q)for(const u of q[a])n[u]+=i[a]}if(!e)return n;const r=l(t,"position");$t(l(t,["left","top"]),(o,s)=>l(t,s,e[s]-n[s]+I(r==="absolute"&&o==="auto"?tn(t)[s]:o)))}function tn(t){let{top:e,left:n}=C(t);const{ownerDocument:{body:r,documentElement:o},offsetParent:s}=g(t);let i=s||o;for(;i&&(i===r||i===o)&&l(i,"position")==="static";)i=i.parentNode;if(ct(i)){const a=C(i);e-=a.top+I(l(i,"borderTopWidth")),n-=a.left+I(l(i,"borderLeftWidth"))}return{top:e-I(l(t,"marginTop")),left:n-I(l(t,"marginLeft"))}}function ne(t){t=g(t);const e=[t.offsetTop,t.offsetLeft];for(;t=t.offsetParent;)if(e[0]+=t.offsetTop+I(l(t,"borderTopWidth")),e[1]+=t.offsetLeft+I(l(t,"borderLeftWidth")),l(t,"position")==="fixed"){const n=G(t);return e[0]+=n.scrollY,e[1]+=n.scrollX,e}return e}const en=nn("height"),re=nn("width");function nn(t){const e=L(t);return(n,r)=>{if(E(r)){if(J(n))return n[`inner${e}`];if(xt(n)){const o=n.documentElement;return Math.max(o[`offset${e}`],o[`scroll${e}`])}return n=g(n),r=l(n,t),r=r==="auto"?n[`offset${e}`]:I(r)||0,r-oe(n,t)}else return l(n,t,!r&&r!==0?"":+r+oe(n,t)+"px")}}function oe(t,e,n="border-box"){return l(t,"boxSizing")===n?Ht(q[e].map(L),r=>I(l(t,`padding${r}`))+I(l(t,`border${r}Width`))):0}function Sr(t){for(const e in q)for(const n in q[e])if(q[e][n]===t)return q[e][1-n];return t}function zr(t,e="width",n=window,r=!1){return w(t)?Ht(Dr(t),o=>{const s=Lr(o);return s?Hr(s==="vh"?jr():s==="vw"?re(G(n)):r?n[`offset${L(e)}`]:ee(n)[e],o):o}):I(t)}const Mr=/-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g,Dr=N(t=>t.toString().replace(/\s/g,"").match(Mr)||[]),Rr=/(?:v[hw]|%)$/,Lr=N(t=>(t.match(Rr)||[])[0]);function Hr(t,e){return t*I(e)/100}let pt,k;function jr(){return pt||(k||(k=B("<div>"),l(k,{height:"100vh",position:"fixed"}),W(window,"resize",()=>pt=null)),lt(document.body,k),pt=k.clientHeight,kt(k),pt)}const mt=typeof window<"u",Wr=mt&&document.dir==="rtl",U=mt&&"ontouchstart"in window,tt=mt&&window.PointerEvent,Fr=tt?"pointerdown":U?"touchstart":"mousedown",Br=tt?"pointermove":U?"touchmove":"mousemove",qr=tt?"pointerup":U?"touchend":"mouseup",Xr=tt?"pointerenter":U?"":"mouseenter",Yr=tt?"pointerleave":U?"":"mouseleave",Jr=tt?"pointercancel":"touchcancel",T={reads:[],writes:[],read(t){return this.reads.push(t),ie(),t},write(t){return this.writes.push(t),ie(),t},clear(t){on(this.reads,t),on(this.writes,t)},flush:se};function se(t){rn(T.reads),rn(T.writes.splice(0)),T.scheduled=!1,(T.reads.length||T.writes.length)&&ie(t+1)}const Gr=4;function ie(t){T.scheduled||(T.scheduled=!0,t&&t<Gr?Promise.resolve().then(()=>se(t)):requestAnimationFrame(()=>se(1)))}function rn(t){let e;for(;e=t.shift();)try{e()}catch(n){console.error(n)}}function on(t,e){const n=t.indexOf(e);return~n&&t.splice(n,1)}function sn(){}sn.prototype={positions:[],init(){this.positions=[];let t;this.unbind=W(document,"mousemove",e=>t=Xe(e)),this.interval=setInterval(()=>{t&&(this.positions.push(t),this.positions.length>5&&this.positions.shift())},50)},cancel(){var t;(t=this.unbind)==null||t.call(this),clearInterval(this.interval)},movesTo(t){if(this.positions.length<2)return!1;const e=t.getBoundingClientRect(),{left:n,right:r,top:o,bottom:s}=e,[i]=this.positions,a=Oe(this.positions),u=[i,a];return jt(a,e)?!1:[[{x:n,y:o},{x:r,y:s}],[{x:n,y:s},{x:r,y:o}]].some(d=>{const p=Kr(u,d);return p&&jt(p,e)})}};function Kr([{x:t,y:e},{x:n,y:r}],[{x:o,y:s},{x:i,y:a}]){const u=(a-s)*(n-t)-(i-o)*(r-e);if(u===0)return!1;const f=((i-o)*(e-s)-(a-s)*(t-o))/u;return f<0?!1:{x:t+f*(n-t),y:e+f*(r-e)}}function cn(t,e,n={},r=!0){const o=new IntersectionObserver(r?(s,i)=>{s.some(a=>a.isIntersecting)&&e(s,i)}:e,n);for(const s of h(t))o.observe(s);return o}const Zr=mt&&window.ResizeObserver;function an(t,e,n={box:"border-box"}){return Zr?un(ResizeObserver,t,e,n):(Qr(),gt.add(e),{observe:It,unobserve:It,disconnect(){gt.delete(e)}})}let gt;function Qr(){if(gt)return;gt=new Set;let t;const e=()=>{if(!t){t=!0,requestAnimationFrame(()=>t=!1);for(const n of gt)n()}};W(window,"load resize",e),W(document,"loadedmetadata load",e,!0)}function Vr(t,e,n){return un(MutationObserver,t,e,n)}function un(t,e,n,r){const o=new t(n);for(const s of h(e))o.observe(s,r);return o}function kr(t){if(Tt(t)&&ce(t,{func:"playVideo",method:"play"}),Ct(t))try{t.play().catch(It)}catch{}}function Ur(t){Tt(t)&&ce(t,{func:"pauseVideo",method:"pause"}),Ct(t)&&t.pause()}function to(t){Tt(t)&&ce(t,{func:"mute",method:"setVolume",value:0}),Ct(t)&&(t.muted=!0)}function eo(t){return Ct(t)||Tt(t)}function Ct(t){return Vt(t,"video")}function Tt(t){return Vt(t,"iframe")&&(fn(t)||dn(t))}function fn(t){return!!t.src.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/)}function dn(t){return!!t.src.match(/vimeo\.com\/video\/.*/)}async function ce(t,e){await ro(t),hn(t,e)}function hn(t,e){try{t.contentWindow.postMessage(JSON.stringify({event:"command",...e}),"*")}catch{}}const ae="_ukPlayer";let no=0;function ro(t){if(t[ae])return t[ae];const e=fn(t),n=dn(t),r=++no;let o;return t[ae]=new Promise(s=>{e&&Q(t,"load",()=>{const i=()=>hn(t,{event:"listening",id:r});o=setInterval(i,100),i()}),Q(window,"message",s,!1,({data:i})=>{try{return i=JSON.parse(i),e&&(i==null?void 0:i.id)===r&&i.event==="onReady"||n&&Number(i==null?void 0:i.player_id)===r}catch{}}),t.src=`${t.src}${Y(t.src,"?")?"&":"?"}${e?"enablejsapi=1":`api=1&player_id=${r}`}`}).then(()=>clearInterval(o))}function oo(t,e=0,n=0){return _t(t)?Te(...ue(t).map(r=>{const{top:o,left:s,bottom:i,right:a}=S(r);return{top:o-e,left:s-n,bottom:i+e,right:a+n}}).concat(C(t))):!1}function so(t,{offset:e=0}={}){const n=_t(t)?Pt(t,!1,["hidden"]):[];return n.reduce((i,a,u)=>{const{scrollTop:f,scrollHeight:d,offsetHeight:p}=a,b=S(a),x=d-b.height,{height:P,top:R}=n[u-1]?S(n[u-1]):C(t);let O=Math.ceil(R-b.top-e+f);return e>0&&p<P+e?O+=e:e=0,O>x?(e-=O-x,O=x):O<0&&(e-=O,O=0),()=>r(a,O-f).then(i)},()=>Promise.resolve())();function r(i,a){return new Promise(u=>{const f=i.scrollTop,d=o(Math.abs(a)),p=Date.now();(function b(){const x=s(K((Date.now()-p)/d));i.scrollTop=f+a*x,x===1?u():requestAnimationFrame(b)})()})}function o(i){return 40*Math.pow(i,.375)}function s(i){return .5*(1-Math.cos(Math.PI*i))}}function io(t,e=0,n=0){if(!_t(t))return 0;const[r]=Pt(t,!0),{scrollHeight:o,scrollTop:s}=r,{height:i}=S(r),a=o-i,u=ne(t)[0]-ne(r)[0],f=Math.max(0,u-i+e),d=Math.min(a,u+t.offsetHeight-n);return K((s-f)/(d-f))}function Pt(t,e=!1,n=[]){const r=ln(t);let o=Xt(t).reverse();o=o.slice(o.indexOf(r)+1);const s=_e(o,i=>l(i,"position")==="fixed");return~s&&(o=o.slice(s)),[r].concat(o.filter(i=>l(i,"overflow").split(" ").some(a=>Y(["auto","scroll",...n],a))&&(!e||i.scrollHeight>S(i).height))).reverse()}function ue(t){return Pt(t,!1,["hidden","clip"])}function S(t){const e=G(t),{visualViewport:n,document:{documentElement:r}}=e;let o=t===ln(t)?e:t;if(J(o)&&n){let{height:i,width:a,scale:u,pageTop:f,pageLeft:d}=n;return i=Math.round(i*u),a=Math.round(a*u),{height:i,width:a,top:f,left:d,bottom:f+i,right:d+a}}let s=C(o);if(l(o,"display")==="inline")return s;for(let[i,a,u,f]of[["width","x","left","right"],["height","y","top","bottom"]])J(o)?o=r:s[u]+=I(l(o,`border-${u}-width`)),s[i]=s[a]=o[`client${L(i)}`],s[f]=s[i]+s[u];return s}function ln(t){return G(t).document.scrollingElement}const A=[["width","x","left","right"],["height","y","top","bottom"]];function co(t,e,n){n={attach:{element:["left","top"],target:["left","top"],...n.attach},offset:[0,0],placement:[],...n},$(e)||(e=[e,e]),C(t,pn(t,e,n))}function pn(t,e,n){const r=mn(t,e,n),{boundary:o,viewportOffset:s=0,placement:i}=n;let a=r;for(const[u,[f,,d,p]]of Object.entries(A)){const b=ao(t,e[u],s,o,u);if(Nt(r,b,u))continue;let x=0;if(i[u]==="flip"){const P=n.attach.target[u];if(P===p&&r[p]<=b[p]||P===d&&r[d]>=b[d])continue;x=fo(t,e,n,u)[d]-r[d];const R=uo(t,e[u],s,u);if(!Nt(fe(r,x,u),R,u)){if(Nt(r,R,u))continue;if(n.recursion)return!1;const O=ho(t,e,n);if(O&&Nt(O,R,1-u))return O;continue}}else if(i[u]==="shift"){const P=C(e[u]),{offset:R}=n;x=K(K(r[d],b[d],b[p]-r[f]),P[d]-r[f]+R[u],P[p]-R[u])-r[d]}a=fe(a,x,u)}return a}function mn(t,e,n){let{attach:r,offset:o}={attach:{element:["left","top"],target:["left","top"],...n.attach},offset:[0,0],...n},s=C(t);for(const[i,[a,,u,f]]of Object.entries(A)){const d=r.target[i]===r.element[i]?S(e[i]):C(e[i]);s=fe(s,d[u]-s[u]+gn(r.target[i],f,d[a])-gn(r.element[i],f,s[a])+ +o[i],i)}return s}function fe(t,e,n){const[,r,o,s]=A[n],i={...t};return i[o]=t[r]=t[o]+e,i[s]+=e,i}function gn(t,e,n){return t==="center"?n/2:t===e?n:0}function ao(t,e,n,r,o){let s=wn(...vn(t,e).map(S));return n&&(s[A[o][2]]+=n,s[A[o][3]]-=n),r&&(s=wn(s,C($(r)?r[o]:r))),s}function uo(t,e,n,r){const[o,s,i,a]=A[r],[u]=vn(t,e),f=S(u);return["auto","scroll"].includes(l(u,`overflow-${s}`))&&(f[i]-=u[`scroll${L(i)}`],f[a]=f[i]+u[`scroll${L(o)}`]),f[i]+=n,f[a]-=n,f}function vn(t,e){return ue(e).filter(n=>Et(t,n))}function wn(...t){let e={};for(const n of t)for(const[,,r,o]of A)e[r]=Math.max(e[r]||0,n[r]),e[o]=Math.min(...[e[o],n[o]].filter(Boolean));return e}function Nt(t,e,n){const[,,r,o]=A[n];return t[r]>=e[r]&&t[o]<=e[o]}function fo(t,e,{offset:n,attach:r},o){return mn(t,e,{attach:{element:bn(r.element,o),target:bn(r.target,o)},offset:lo(n,o)})}function ho(t,e,n){return pn(t,e,{...n,attach:{element:n.attach.element.map(xn).reverse(),target:n.attach.target.map(xn).reverse()},offset:n.offset.reverse(),placement:n.placement.reverse(),recursion:!0})}function bn(t,e){const n=[...t],r=A[e].indexOf(t[e]);return~r&&(n[e]=A[e][1-r%2+2]),n}function xn(t){for(let e=0;e<A.length;e++){const n=A[e].indexOf(t);if(~n)return A[1-e][n%2+2]}}function lo(t,e){return t=[...t],t[e]*=-1,t}var po=Object.freeze({__proto__:null,$:B,$$:te,Animation:Ir,Deferred:Vn,Dimensions:Zn,MouseTracker:sn,Transition:yr,addClass:V,after:Or,append:lt,apply:Ut,assign:St,attr:j,before:Qe,boxModelAdjust:oe,camelize:it,children:Me,clamp:K,closest:ft,createEvent:Be,css:l,data:Bt,dimensions:ee,each:$t,empty:Ze,endsWith:qn,escape:We,fastdom:T,filter:ze,find:Yt,findAll:dt,findIndex:_e,flipPosition:Sr,fragment:Ot,getEventPos:Xe,getIndex:Qn,getTargetedElement:nr,hasAttr:Ne,hasClass:Je,hasOwn:z,hasTouch:U,height:en,html:Er,hyphenate:st,inBrowser:mt,includes:Y,index:De,intersectRect:Te,isArray:$,isBoolean:Ee,isDocument:xt,isElement:ct,isEmpty:Ae,isEqual:Lt,isFocusable:er,isFunction:_,isInView:oo,isInput:tr,isNode:zt,isNumber:Dt,isNumeric:yt,isObject:M,isPlainObject:D,isRtl:Wr,isSameSiteAnchor:Re,isString:w,isTag:Vt,isTouch:mr,isUndefined:E,isVideo:eo,isVisible:_t,isVoidElement:Un,isWindow:J,last:Oe,matches:Z,memoize:N,mute:to,noop:It,observeIntersection:cn,observeMutation:Vr,observeResize:an,off:Fe,offset:C,offsetPosition:ne,offsetViewport:S,on:W,once:Q,overflowParents:ue,parent:ut,parents:Xt,pause:Ur,pick:Gn,play:kr,pointInRect:jt,pointerCancel:Jr,pointerDown:Fr,pointerEnter:Xr,pointerLeave:Yr,pointerMove:Br,pointerUp:qr,position:tn,positionAt:co,prepend:Ar,propName:Kt,query:rr,queryAll:or,ready:_r,remove:kt,removeAttr:Ft,removeClass:Zt,removeClasses:Ye,replaceClass:wr,scrollIntoView:so,scrollParents:Pt,scrolledOver:io,selFocusable:Se,selInput:qt,sortBy:Ce,startsWith:H,sumBy:Ht,swap:Yn,toArray:Xn,toBoolean:Rt,toEventTargets:Gt,toFloat:I,toNode:g,toNodes:h,toNumber:at,toPx:zr,toWindow:G,toggleClass:br,trigger:F,ucfirst:L,uniqueBy:Jn,unwrap:Tr,width:re,within:Et,wrapAll:Ve,wrapInner:Cr});function mo(t){t._observers=[],t._observerUpdates=new Map;for(const e of t.$options.observe||[])if(z(e,"handler"))yn(t,e);else for(const n in e)yn(t,e[n],n)}function de(t,...e){t._observers.push(...e)}function go(t){for(const e of t._observers)e==null||e.disconnect(),t._observerUpdates.delete(e)}function vo(t){for(const[e,n]of t._observerUpdates)n(e)}function yn(t,e,n){let{observe:r,target:o=t.$el,handler:s,options:i,filter:a,args:u}=D(e)?e:{type:n,handler:e};if(a&&!a.call(t,t))return;const f=_(o)?o.call(t,t):o;s=w(s)?t[s]:s.bind(t),_(i)&&(i=i.call(t,t));const d=r(f,s,i,u);_(o)&&$(f)&&d.unobserve&&t._observerUpdates.set(d,wo(t,o,f)),de(t,d)}function wo(t,e,n){return r=>{const o=e.call(t,t);Lt(n,o)||(n.forEach(s=>!Y(o,s)&&r.unobserve(s)),o.forEach(s=>!Y(n,s)&&r.observe(s)),n.splice(0,n.length,...o))}}function $n(t){if(t._watch)return;const e=!z(t,"_watch");t._watch=T.read(()=>{t._connected&&bo(t,e),t._watch=null})}function bo(t,e){const n={...t._computed};t._computed={};for(const[r,{watch:o,immediate:s}]of Object.entries(t.$options.computed||{}))o&&(e&&s||z(n,r)&&!Lt(n[r],t[r]))&&o.call(t,t[r],e?void 0:n[r]);vo(t)}function he(t,e="update"){t._connected&&((e==="update"||e==="resize")&&$n(t),t.$options.update&&(t._updates||(t._updates=new Set,T.read(()=>{t._connected&&xo(t,t._updates),delete t._updates})),t._updates.add(e.type||e)))}function xo(t,e){for(const{read:n,write:r,events:o=[]}of t.$options.update){if(!e.has("update")&&!o.some(i=>e.has(i)))continue;let s;n&&(s=n.call(t,t._data,e),s&&D(s)&&St(t._data,s)),r&&s!==!1&&T.write(()=>{t._connected&&r.call(t,t._data,e)})}}function yo(t){let{el:e,computed:n,observe:r}=t.$options;if(!n&&!(r!=null&&r.some(s=>_(s.target))))return;for(const s in n||{})if(n[s].document){e=e.ownerDocument;break}const o=new MutationObserver(()=>$n(t));o.observe(e,{childList:!0,subtree:!0}),de(t,o)}function $o(t){t._events=[];for(const e of t.$options.events||[])if(z(e,"handler"))le(t,e);else for(const n in e)le(t,e[n],n)}function Io(t){t._events.forEach(e=>e()),delete t._events}function le(t,e,n){let{name:r,el:o,handler:s,capture:i,passive:a,delegate:u,filter:f,self:d}=D(e)?e:{name:n,handler:e};if(o=_(o)?o.call(t,t):o||t.$el,$(o)){o.forEach(p=>le(t,{...e,el:p},n));return}!o||f&&!f.call(t)||t._events.push(W(o,r,u?w(u)?u:u.call(t,t):null,w(s)?t[s]:s.bind(t),{passive:a,capture:i,self:d}))}const y={};y.events=y.observe=y.created=y.beforeConnect=y.connected=y.beforeDisconnect=y.disconnected=y.destroy=pe,y.args=function(t,e){return e!==!1&&pe(e||t)},y.update=function(t,e){return Ce(pe(t,_(e)?{read:e}:e),"order")},y.props=function(t,e){if($(e)){const n={};for(const r of e)n[r]=String;e=n}return y.methods(t,e)},y.computed=y.methods=function(t,e){return e?t?{...t,...e}:e:t},y.i18n=y.data=function(t,e,n){return n?In(t,e,n):e?t?function(r){return In(t,e,r)}:e:t};function In(t,e,n){return y.computed(_(t)?t.call(n,n):t,_(e)?e.call(n,n):e)}function pe(t,e){return t=t&&!$(t)?[t]:t,e?t?t.concat(e):$(e)?e:[e]:t}function _o(t,e){return E(e)?t:e}function vt(t,e,n){const r={};if(_(e)&&(e=e.options),e.extends&&(t=vt(t,e.extends,n)),e.mixins)for(const s of e.mixins)t=vt(t,s,n);for(const s in t)o(s);for(const s in e)z(t,s)||o(s);function o(s){r[s]=(y[s]||_o)(t[s],e[s],n)}return r}function _n(t,e=[]){try{return t?H(t,"{")?JSON.parse(t):e.length&&!Y(t,":")?{[e[0]]:t}:t.split(";").reduce((n,r)=>{const[o,s]=r.split(/:(.*)/);return o&&!E(s)&&(n[o.trim()]=s.trim()),n},{}):{}}catch{return{}}}function me(t,e){return t===Boolean?Rt(e):t===Number?at(e):t==="list"?Eo(e):t===Object&&w(e)?_n(e):t?t(e):e}function Eo(t){return $(t)?t:w(t)?t.split(/,(?![^(]*\))/).map(e=>yt(e)?at(e):Rt(e.trim())):[t]}function Ao(t){const e=En(t.$options);for(let r in e)E(e[r])||(t.$props[r]=e[r]);const n=[t.$options.computed,t.$options.methods];for(let r in t.$props)r in e&&Oo(n,r)&&(t[r]=t.$props[r])}function En(t){const e={},{args:n=[],props:r={},el:o,id:s}=t;if(!r)return e;for(const a in r){const u=st(a);let f=Bt(o,u);E(f)||(f=r[a]===Boolean&&f===""?!0:me(r[a],f),!(u==="target"&&H(f,"_"))&&(e[a]=f))}const i=_n(Bt(o,s),n);for(const a in i){const u=it(a);E(r[u])||(e[u]=me(r[u],i[a]))}return e}function Oo(t,e){return t.every(n=>!n||!z(n,e))}function Co(t){const{$options:e,$props:n}=t,{id:r,attrs:o,props:s,el:i}=e;if(!s||o===!1)return;const a=$(o)?o:Object.keys(s),u=a.map(d=>st(d)).concat(r),f=new MutationObserver(d=>{const p=En(e);d.some(({attributeName:b})=>{const x=b.replace("data-","");return(x===r?a:[it(x),it(b)]).some(P=>!E(p[P])&&p[P]!==n[P])})&&t.$reset()});f.observe(i,{attributes:!0,attributeFilter:u.concat(u.map(d=>`data-${d}`))}),de(t,f)}function et(t,e){var n;(n=t.$options[e])==null||n.forEach(r=>r.call(t))}function An(t){t._connected||(t._data={},t._computed={},Ao(t),et(t,"beforeConnect"),t._connected=!0,$o(t),mo(t),Co(t),yo(t),et(t,"connected"),he(t))}function On(t){t._connected&&(et(t,"beforeDisconnect"),go(t),Io(t),et(t,"disconnected"),t._connected=!1,delete t._watch)}function To(t){const{computed:e}=t.$options;if(t._computed={},e)for(const n in e)Po(t,n,e[n])}function Po(t,e,n){Object.defineProperty(t,e,{enumerable:!0,get(){const{_computed:r,$props:o,$el:s}=t;return z(r,e)||(r[e]=(n.get||n).call(t,o,s)),r[e]},set(r){const{_computed:o}=t;o[e]=n.set?n.set.call(t,r):r,E(o[e])&&delete o[e]}})}let No=0;function Cn(t,e={}){e.data=Mo(e,t.constructor.options),t.$options=vt(t.constructor.options,e,t),t.$props={},t._uid=No++,So(t),zo(t),To(t),et(t,"created"),e.el&&t.$mount(e.el)}function So(t){const{data:e={}}=t.$options;for(const n in e)t.$props[n]=t[n]=e[n]}function zo(t){const{methods:e}=t.$options;if(e)for(const n in e)t[n]=e[n].bind(t)}function Mo({data:t={}},{args:e=[],props:n={}}){$(t)&&(t=t.slice(0,e.length).reduce((r,o,s)=>(D(o)?St(r,o):r[e[s]]=o,r),{}));for(const r in t)E(t[r])?delete t[r]:n[r]&&(t[r]=me(n[r],t[r]));return t}const m=function(t){Cn(this,t)};m.util=po,m.options={},m.version="3.16.6";const Do="uk-",X="__uikit__",wt={};function Tn(t,e){var n;const r=Do+st(t);if(!e)return D(wt[r])&&(wt[r]=m.extend(wt[r])),wt[r];t=it(t),m[t]=(s,i)=>ge(t,s,i);const o=D(e)?{...e}:e.options;return o.id=r,o.name=t,(n=o.install)==null||n.call(o,m,o,t),m._initialized&&!o.functional&&requestAnimationFrame(()=>ge(t,`[${r}],[data-${r}]`)),wt[r]=o}function ge(t,e,n,...r){const o=Tn(t);return o.options.functional?new o({data:D(e)?e:[e,n,...r]}):e?te(e).map(s)[0]:s();function s(i){const a=we(i,t);if(a)if(n)a.$destroy();else return a;return new o({el:i,data:n})}}function ve(t){return(t==null?void 0:t[X])||{}}function we(t,e){return ve(t)[e]}function Ro(t,e){t[X]||(t[X]={}),t[X][e.$options.name]=e}function Lo(t,e){var n;(n=t[X])==null||delete n[e.$options.name],Ae(t[X])||delete t[X]}m.component=Tn,m.getComponents=ve,m.getComponent=we,m.use=function(t){if(!t.installed)return t.call(null,this),t.installed=!0,this},m.mixin=function(t,e){e=(w(e)?this.component(e):e)||this,e.options=vt(e.options,t)},m.extend=function(t){t=t||{};const e=this,n=function(o){Cn(this,o)};return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.options=vt(e.options,t),n.super=e,n.extend=e.extend,n};function Pn(t,e){t=t?g(t):document.body;for(const n of Xt(t).reverse())Nn(n,e);Ut(t,n=>Nn(n,e))}m.update=Pn;function Nn(t,e){const n=ve(t);for(const r in n)he(n[r],e)}let Sn;Object.defineProperty(m,"container",{get(){return Sn||document.body},set(t){Sn=B(t)}}),m.prototype.$mount=function(t){const e=this;Ro(t,e),e.$options.el=t,Et(t,document)&&An(e)},m.prototype.$destroy=function(t=!1){const e=this,{el:n}=e.$options;n&&On(e),et(e,"destroy"),Lo(n,e),t&&kt(e.$el)},m.prototype.$create=ge,m.prototype.$emit=function(t){he(this,t)},m.prototype.$update=function(t=this.$el,e){Pn(t,e)},m.prototype.$reset=function(){On(this),An(this)},m.prototype.$getComponent=we,Object.defineProperties(m.prototype,{$el:{get(){return this.$options.el}},$container:Object.getOwnPropertyDescriptor(m,"container")});function be(t,e=t.$el,n=""){if(e.id)return e.id;let r=`${t.$options.id}-${t._uid}${n}`;return B(`#${r}`)&&(r=be(t,e,`${n}-2`)),r}var Ho={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s"},data:{selNav:!1},computed:{nav:{get({selNav:t},e){return c.$(t,e)},watch(t,e){c.attr(t,"role","tablist"),e&&this.$emit()},immediate:!0},selNavItem({attrItem:t}){return`[${t}],[data-${t}]`},navItems:{get(t,e){return c.$$(this.selNavItem,e)},watch(){this.$emit()}}},connected(){c.attr(this.$el,"aria-roledescription","carousel")},update:[{write(){this.slides.forEach((t,e)=>c.attr(t,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",e+1,this.length),"aria-roledescription":this.nav?null:"slide"})),this.nav&&this.length!==this.nav.children.length&&c.html(this.nav,this.slides.map((t,e)=>`<li ${this.attrItem}="${e}"><a href></a></li>`).join("")),c.attr(c.children(this.nav).concat(this.list),"role","presentation");for(const t of this.navItems){const e=c.data(t,this.attrItem),n=c.$("a,button",t)||t;let r,o=null;if(c.isNumeric(e)){const s=c.toNumber(e),i=this.slides[s];i&&(i.id||(i.id=be(this,i,`-item-${e}`)),o=i.id),r=this.t("slideX",c.toFloat(e)+1),c.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=be(this,this.list,"-items")),o=this.list.id),r=this.t(e);c.attr(n,{"aria-controls":o,"aria-label":c.attr(n,"aria-label")||r})}}},{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){c.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===ot.SPACE)&&(t.preventDefault(),this.show(c.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:n}=t,r=c.data(e,this.attrItem);if(!c.isNumeric(r))return;let o=n===ot.HOME?0:n===ot.END?"last":n===ot.LEFT?"previous":n===ot.RIGHT?"next":-1;~o&&(t.preventDefault(),this.show(o))}}],methods:{updateNav(){const t=this.getValidIndex();let e,n;for(const r of this.navItems){const o=c.data(r,this.attrItem),s=c.$("a,button",r)||r;if(c.isNumeric(o)){const a=c.toNumber(o)===t;c.toggleClass(r,this.clsActive,a),c.attr(s,{"aria-selected":a,tabindex:a?null:-1}),a&&(n=s),e=e||c.matches(s,":focus")}else c.toggleClass(r,"uk-invisible",this.finite&&(o==="previous"&&t===0||o==="next"&&t>=this.maxIndex));e&&n&&n.focus()}}}};const xe={passive:!1,capture:!0},zn={passive:!0,capture:!0},jo="touchstart mousedown",ye="touchmove mousemove",Mn="touchend touchcancel mouseup click input scroll";var Wo={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=n=>{const r=c.getEventPos(n).x*(c.isRtl?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,e(n)}}},events:[{name:jo,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!c.isTouch(t)&&Fo(t.target)||c.closest(t.target,c.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:ye,el(){return this.list},handler:c.noop,...xe}],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,c.on(document,ye,this.move,xe),c.on(document,Mn,this.end,zn),c.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;c.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;const{slides:n}=this;let{prevIndex:r}=this,o=Math.abs(e),s=this.getIndex(r+this.dir,r),i=this._getDistance(r,s)||n[r].offsetWidth;for(;s!==r&&o>i;)this.drag-=i*this.dir,r=s,o-=i,s=this.getIndex(r+this.dir,r),i=this._getDistance(r,s)||n[r].offsetWidth;this.percent=o/i;const a=n[r],u=n[s],f=this.index!==s,d=r===s;let p;[this.index,this.prevIndex].filter(b=>!c.includes([s,r],b)).forEach(b=>{c.trigger(n[b],"itemhidden",[this]),d&&(p=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||p)&&c.trigger(n[this.index],"itemshown",[this]),f&&(this.prevIndex=r,this.index=s,!d&&c.trigger(a,"beforeitemhide",[this]),c.trigger(u,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!d&&u),f&&(!d&&c.trigger(a,"itemhide",[this]),c.trigger(u,"itemshow",[this]))},end(){if(c.off(document,ye,this.move,xe),c.off(document,Mn,this.end,zn),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=(c.isRtl?this.dir*(c.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)}c.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function Fo(t){return c.css(t,"userSelect")!=="none"&&c.toNodes(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}var Bo={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){c.attr(this.list,"aria-live","polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){c.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}},{name:`${c.pointerEnter} focusin`,filter(){return this.autoplay},handler(t){(t.type!==c.pointerEnter||this.pauseOnHover)&&this.stopAutoplay()}},{name:`${c.pointerLeave} focusout`,filter(){return this.autoplay},handler(t){(t.type!==c.pointerLeave||this.pauseOnHover)&&this.startAutoplay()}}],methods:{startAutoplay(){this.draggable&&c.matches(this.$el,":focus-within")||this.pauseOnHover&&c.matches(this.$el,":hover")||(this.stopAutoplay(),this.interval=setInterval(()=>!this.stack.length&&this.show("next"),this.autoplayInterval),c.attr(this.list,"aria-live","off"))},stopAutoplay(){clearInterval(this.interval),c.attr(this.list,"aria-live","polite")}}};function qo(t){return Dn(an,t,"resize")}function Xo(t){return Dn(cn,t)}function Yo(t={}){return Xo({handler:function(e,n){const{targets:r=this.$el,preload:o=5}=t;for(const s of h(_(r)?r(this):r))te('[loading="lazy"]',s).slice(0,o-1).forEach(i=>Ft(i,"loading"));for(const s of e.filter(({isIntersecting:i})=>i).map(({target:i})=>i))n.unobserve(s)},...t})}function Dn(t,e,n){return{observe:t,handler(){this.$emit(n)},...e}}var Jo={mixins:[Bo,Wo,Ho,Hn],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(){c.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:t},e){return Ko(e.offsetWidth/t)},list({selList:t},e){return c.$(t,e)},maxIndex(){return this.length-1},slides:{get(){return c.children(this.list)},watch(){this.$emit()}},length(){return this.slides.length}},observe:qo(),methods:{show(t,e=!1){var n;if(this.dragging||!this.length)return;const{stack:r}=this,o=e?0:r.length,s=()=>{r.splice(o,1),r.length&&this.show(r.shift(),!0)};if(r[e?"unshift":"push"](t),!e&&r.length>1){r.length===2&&((n=this._transitioner)==null||n.forward(Math.min(this.duration,200)));return}const i=this.getIndex(this.index),a=c.hasClass(this.slides,this.clsActive)&&this.slides[i],u=this.getIndex(t,this.index),f=this.slides[u];if(a===f){s();return}if(this.dir=Go(t,i),this.prevIndex=i,this.index=u,a&&!c.trigger(a,"beforeitemhide",[this])||!c.trigger(f,"beforeitemshow",[this,a])){this.index=this.prevIndex,s();return}const d=this._show(a,f,e).then(()=>{a&&c.trigger(a,"itemhidden",[this]),c.trigger(f,"itemshown",[this]),r.shift(),this._transitioner=null,requestAnimationFrame(()=>r.length&&this.show(r.shift(),!0))});return a&&c.trigger(a,"itemhide",[this]),c.trigger(f,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return c.clamp(c.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,n){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:n?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}),!n&&!t)return this._translate(1),Promise.resolve();const{length:r}=this.stack;return this._transitioner[r>1?"forward":"show"](r>1?Math.min(this.duration,75+75/(r-1)):this.duration,this.percent)},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate(t,e=this.prevIndex,n=this.index){const r=this._getTransitioner(e===n?!1:e,n);return r.translate(t),r},_getTransitioner(t=this.prevIndex,e=this.index,n=this.dir||1,r=this.transitionOptions){return new this.Transitioner(c.isNumber(t)?this.slides[t]:t,c.isNumber(e)?this.slides[e]:e,n*(c.isRtl?-1:1),r)}}};function Go(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function Ko(t){return .5*t+300}var Zo={mixins:[Jo],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:$e,Transitioner:Ln},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){c.addClass(t,this.clsActive)},itemshown({target:t}){c.addClass(t,this.clsActivated)},itemhidden({target:t}){c.removeClass(t,this.clsActive,this.clsActivated)}}},Qo={...$e,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-c.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:Ie(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-c.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:Ie(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:v(30),zIndex:-1},{transform:v(),zIndex:0}]:[{transform:v(-100),zIndex:0},{transform:v(),zIndex:-1}]},percent(t,e,n){return n<0?1-rt(e):rt(t)},translate(t,e){return e<0?[{transform:v(30*t),zIndex:-1},{transform:v(-100*(1-t)),zIndex:0}]:[{transform:v(-t*100),zIndex:0},{transform:v(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:v(100),zIndex:0},{transform:v(),zIndex:-1}]:[{transform:v(-30),zIndex:-1},{transform:v(),zIndex:0}]},percent(t,e,n){return n>0?1-rt(e):rt(t)},translate(t,e){return e<0?[{transform:v(t*100),zIndex:0},{transform:v(-30*(1-t)),zIndex:-1}]:[{transform:v(-30*t),zIndex:-1},{transform:v(100*(1-t)),zIndex:0}]}}},Vo={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},ko={observe:Yo({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},Rn={mixins:[nt,Zo,Vo,ko],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:Qo},update:{read(){if(!this.list)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-c.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&c.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",Rn),Rn});
|
|
1
|
+
/*! UIkit 3.16.7-dev.fcb5a4616 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],f):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlideshow=f(e.UIkit.util))})(this,function(e){"use strict";var f={connected(){e.addClass(this.$el,this.$options.id)}},$={slide:{show(t){return[{transform:d(t*-100)},{transform:d()}]},percent(t){return g(t)},translate(t,s){return[{transform:d(s*-100*t)},{transform:d(s*100*(1-t))}]}}};function g(t){return Math.abs(e.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function d(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function z(t){return`scale3d(${t}, ${t}, 1)`}function S(t,s,n,{animation:i,easing:a}){const{percent:r,translate:o,show:c=e.noop}=i,p=c(n),m=new e.Deferred;return{dir:n,show(h,l=0,v){const I=v?"linear":a;return h-=Math.round(h*e.clamp(l,-1,1)),this.translate(l),x(s,"itemin",{percent:l,duration:h,timing:I,dir:n}),x(t,"itemout",{percent:1-l,duration:h,timing:I,dir:n}),Promise.all([e.Transition.start(s,p[1],h,I),e.Transition.start(t,p[0],h,I)]).then(()=>{this.reset(),m.resolve()},e.noop),m.promise},cancel(){e.Transition.cancel([s,t])},reset(){for(const h in p[0])e.css([s,t],h,"")},forward(h,l=this.percent()){return e.Transition.cancel([s,t]),this.show(h,l,!0)},translate(h){this.reset();const l=o(h,n);e.css(s,l[1]),e.css(t,l[0]),x(s,"itemtranslatein",{percent:h,dir:n}),x(t,"itemtranslateout",{percent:1-h,dir:n})},percent(){return r(t||s,s,n)},getDistance(){return t==null?void 0:t.offsetWidth}}}function x(t,s,n){e.trigger(t,e.createEvent(s,!1,!1,n))}var T={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var n,i,a;let r=0;return((a=((n=this.i18n)==null?void 0:n[t])||((i=this.$options.i18n)==null?void 0:i[t]))==null?void 0:a.replace(/%s/g,()=>s[r++]||""))||""}}};const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function w(t,s=t.$el,n=""){if(s.id)return s.id;let i=`${t.$options.id}-${t._uid}${n}`;return e.$(`#${i}`)&&(i=w(t,s,`${n}-2`)),i}var E={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s"},data:{selNav:!1},computed:{nav:{get({selNav:t},s){return e.$(t,s)},watch(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},immediate:!0},selNavItem({attrItem:t}){return`[${t}],[data-${t}]`},navItems:{get(t,s){return e.$$(this.selNavItem,s)},watch(){this.$emit()}}},connected(){e.attr(this.$el,"aria-roledescription","carousel")},update:[{write(){this.slides.forEach((t,s)=>e.attr(t,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",s+1,this.length),"aria-roledescription":this.nav?null:"slide"})),this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((t,s)=>`<li ${this.attrItem}="${s}"><a href></a></li>`).join("")),e.attr(e.children(this.nav).concat(this.list),"role","presentation");for(const t of this.navItems){const s=e.data(t,this.attrItem),n=e.$("a,button",t)||t;let i,a=null;if(e.isNumeric(s)){const r=e.toNumber(s),o=this.slides[r];o&&(o.id||(o.id=w(this,o,`-item-${s}`)),a=o.id),i=this.t("slideX",e.toFloat(s)+1),e.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=w(this,this.list,"-items")),a=this.list.id),i=this.t(s);e.attr(n,{"aria-controls":a,"aria-label":e.attr(n,"aria-label")||i})}}},{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===u.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 a=n===u.HOME?0:n===u.END?"last":n===u.LEFT?"previous":n===u.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],methods:{updateNav(){const t=this.getValidIndex();let s,n;for(const i of this.navItems){const a=e.data(i,this.attrItem),r=e.$("a,button",i)||i;if(e.isNumeric(a)){const c=e.toNumber(a)===t;e.toggleClass(i,this.clsActive,c),e.attr(r,{"aria-selected":c,tabindex:c?null:-1}),c&&(n=r),s=s||e.matches(r,":focus")}else e.toggleClass(i,"uk-invisible",this.finite&&(a==="previous"&&t===0||a==="next"&&t>=this.maxIndex));s&&n&&n.focus()}}}};const b={passive:!1,capture:!0},A={passive:!0,capture:!0},C="touchstart mousedown",y="touchmove mousemove",_="touchend touchcancel mouseup click input scroll";var H={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:C,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&D(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:y,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,y,this.move,b),e.on(document,_,this.end,A),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;const{slides:n}=this;let{prevIndex:i}=this,a=Math.abs(s),r=this.getIndex(i+this.dir,i),o=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&a>o;)this.drag-=o*this.dir,i=r,a-=o,r=this.getIndex(i+this.dir,i),o=this._getDistance(i,r)||n[i].offsetWidth;this.percent=a/o;const c=n[i],p=n[r],m=this.index!==r,h=i===r;let l;[this.index,this.prevIndex].filter(v=>!e.includes([r,i],v)).forEach(v=>{e.trigger(n[v],"itemhidden",[this]),h&&(l=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||l)&&e.trigger(n[this.index],"itemshown",[this]),m&&(this.prevIndex=i,this.index=r,!h&&e.trigger(c,"beforeitemhide",[this]),e.trigger(p,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),c,!h&&p),m&&(!h&&e.trigger(c,"itemhide",[this]),e.trigger(p,"itemshow",[this]))},end(){if(e.off(document,y,this.move,b),e.off(document,_,this.end,A),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const 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}}};function D(t){return e.css(t,"userSelect")!=="none"&&e.toNodes(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}var M={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live","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()}},{name:`${e.pointerEnter} focusin`,filter(){return this.autoplay},handler(t){(t.type!==e.pointerEnter||this.pauseOnHover)&&this.stopAutoplay()}},{name:`${e.pointerLeave} focusout`,filter(){return this.autoplay},handler(t){(t.type!==e.pointerLeave||this.pauseOnHover)&&this.startAutoplay()}}],methods:{startAutoplay(){this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||(this.stopAutoplay(),this.interval=setInterval(()=>!this.stack.length&&this.show("next"),this.autoplayInterval),e.attr(this.list,"aria-live","off"))},stopAutoplay(){clearInterval(this.interval),e.attr(this.list,"aria-live","polite")}}};function O(t){return N(e.observeResize,t,"resize")}function P(t){return N(e.observeIntersection,t)}function L(t={}){return P({handler:function(s,n){const{targets:i=this.$el,preload:a=5}=t;for(const r of e.toNodes(e.isFunction(i)?i(this):i))e.$$('[loading="lazy"]',r).slice(0,a-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 N(t,s,n){return{observe:t,handler(){this.$emit(n)},...s}}var U={mixins:[M,H,E,T],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){return W(s.offsetWidth/t)},list({selList:t},s){return e.$(t,s)},maxIndex(){return this.length-1},slides:{get(){return e.children(this.list)},watch(){this.$emit()}},length(){return this.slides.length}},observe:O(),methods:{show(t,s=!1){var n;if(this.dragging||!this.length)return;const{stack:i}=this,a=s?0:i.length,r=()=>{i.splice(a,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),c=e.hasClass(this.slides,this.clsActive)&&this.slides[o],p=this.getIndex(t,this.index),m=this.slides[p];if(c===m){r();return}if(this.dir=R(t,o),this.prevIndex=o,this.index=p,c&&!e.trigger(c,"beforeitemhide",[this])||!e.trigger(m,"beforeitemshow",[this,c])){this.index=this.prevIndex,r();return}const h=this._show(c,m,s).then(()=>{c&&e.trigger(c,"itemhidden",[this]),e.trigger(m,"itemshown",[this]),i.shift(),this._transitioner=null,requestAnimationFrame(()=>i.length&&this.show(i.shift(),!0))});return c&&e.trigger(c,"itemhide",[this]),e.trigger(m,"itemshow",[this]),h},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)},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()},_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 R(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function W(t){return .5*t+300}var j={mixins:[U],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:$,Transitioner:S},computed:{animation({animation:t,Animations:s}){return{...s[t]||s.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){e.addClass(t,this.clsActive)},itemshown({target:t}){e.addClass(t,this.clsActivated)},itemhidden({target:t}){e.removeClass(t,this.clsActive,this.clsActivated)}}},B={...$,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:z(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:d(30),zIndex:-1},{transform:d(),zIndex:0}]:[{transform:d(-100),zIndex:0},{transform:d(),zIndex:-1}]},percent(t,s,n){return n<0?1-g(s):g(t)},translate(t,s){return s<0?[{transform:d(30*t),zIndex:-1},{transform:d(-100*(1-t)),zIndex:0}]:[{transform:d(-t*100),zIndex:0},{transform:d(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:d(100),zIndex:0},{transform:d(),zIndex:-1}]:[{transform:d(-30),zIndex:-1},{transform:d(),zIndex:0}]},percent(t,s,n){return n>0?1-g(s):g(t)},translate(t,s){return s<0?[{transform:d(t*100),zIndex:0},{transform:d(-30*(1-t)),zIndex:-1}]:[{transform:d(-30*t),zIndex:-1},{transform:d(100*(1-t)),zIndex:0}]}}},F={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},V={observe:L({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},k={mixins:[f,j,F,V],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:B},update:{read(){if(!this.list)return!1;let[t,s]=this.ratio.split(":").map(Number);return s=s*this.list.offsetWidth/t||0,this.minHeight&&(s=Math.max(this.minHeight,s)),this.maxHeight&&(s=Math.min(this.maxHeight,s)),{height:s-e.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&e.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",k),k});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.7-dev.fcb5a4616 | 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')) :
|
|
@@ -6,416 +6,11 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitSortable = factory(global.UIkit.util));
|
|
7
7
|
})(this, (function (uikitUtil) { 'use strict';
|
|
8
8
|
|
|
9
|
-
const hyphenateRe = /\B([A-Z])/g;
|
|
10
|
-
const hyphenate = memoize((str) => str.replace(hyphenateRe, "-$1").toLowerCase());
|
|
11
|
-
const ucfirst = memoize((str) => str.charAt(0).toUpperCase() + str.slice(1));
|
|
12
|
-
function startsWith(str, search) {
|
|
13
|
-
var _a;
|
|
14
|
-
return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
|
|
15
|
-
}
|
|
16
|
-
const { isArray, from: toArray } = Array;
|
|
17
|
-
function isFunction(obj) {
|
|
18
|
-
return typeof obj === "function";
|
|
19
|
-
}
|
|
20
|
-
function isObject(obj) {
|
|
21
|
-
return obj !== null && typeof obj === "object";
|
|
22
|
-
}
|
|
23
|
-
function isWindow(obj) {
|
|
24
|
-
return isObject(obj) && obj === obj.window;
|
|
25
|
-
}
|
|
26
|
-
function isDocument(obj) {
|
|
27
|
-
return nodeType(obj) === 9;
|
|
28
|
-
}
|
|
29
|
-
function isNode(obj) {
|
|
30
|
-
return nodeType(obj) >= 1;
|
|
31
|
-
}
|
|
32
|
-
function isElement(obj) {
|
|
33
|
-
return nodeType(obj) === 1;
|
|
34
|
-
}
|
|
35
|
-
function nodeType(obj) {
|
|
36
|
-
return !isWindow(obj) && isObject(obj) && obj.nodeType;
|
|
37
|
-
}
|
|
38
|
-
function isString(value) {
|
|
39
|
-
return typeof value === "string";
|
|
40
|
-
}
|
|
41
|
-
function isNumber(value) {
|
|
42
|
-
return typeof value === "number";
|
|
43
|
-
}
|
|
44
|
-
function isNumeric(value) {
|
|
45
|
-
return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value));
|
|
46
|
-
}
|
|
47
|
-
function isUndefined(value) {
|
|
48
|
-
return value === void 0;
|
|
49
|
-
}
|
|
50
|
-
function toFloat(value) {
|
|
51
|
-
return parseFloat(value) || 0;
|
|
52
|
-
}
|
|
53
|
-
function toNode(element) {
|
|
54
|
-
return toNodes(element)[0];
|
|
55
|
-
}
|
|
56
|
-
function toNodes(element) {
|
|
57
|
-
return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
|
|
58
|
-
}
|
|
59
|
-
function each(obj, cb) {
|
|
60
|
-
for (const key in obj) {
|
|
61
|
-
if (false === cb(obj[key], key)) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
function sumBy(array, iteratee) {
|
|
68
|
-
return array.reduce(
|
|
69
|
-
(sum, item) => sum + toFloat(isFunction(iteratee) ? iteratee(item) : item[iteratee]),
|
|
70
|
-
0
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
function noop() {
|
|
74
|
-
}
|
|
75
|
-
function memoize(fn) {
|
|
76
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
|
77
|
-
return (key) => cache[key] || (cache[key] = fn(key));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function attr(element, name, value) {
|
|
81
|
-
var _a;
|
|
82
|
-
if (isObject(name)) {
|
|
83
|
-
for (const key in name) {
|
|
84
|
-
attr(element, key, name[key]);
|
|
85
|
-
}
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (isUndefined(value)) {
|
|
89
|
-
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
90
|
-
} else {
|
|
91
|
-
for (const el of toNodes(element)) {
|
|
92
|
-
if (isFunction(value)) {
|
|
93
|
-
value = value.call(el, attr(el, name));
|
|
94
|
-
}
|
|
95
|
-
if (value === null) {
|
|
96
|
-
removeAttr(el, name);
|
|
97
|
-
} else {
|
|
98
|
-
el.setAttribute(name, value);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
function removeAttr(element, name) {
|
|
104
|
-
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function parent(element) {
|
|
108
|
-
var _a;
|
|
109
|
-
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
110
|
-
}
|
|
111
|
-
function filter(element, selector) {
|
|
112
|
-
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
113
|
-
}
|
|
114
|
-
function matches(element, selector) {
|
|
115
|
-
return toNodes(element).some((element2) => element2.matches(selector));
|
|
116
|
-
}
|
|
117
|
-
function closest(element, selector) {
|
|
118
|
-
return isElement(element) ? element.closest(startsWith(selector, ">") ? selector.slice(1) : selector) : toNodes(element).map((element2) => closest(element2, selector)).filter(Boolean);
|
|
119
|
-
}
|
|
120
|
-
function within(element, selector) {
|
|
121
|
-
return isString(selector) ? !!closest(element, selector) : toNode(selector).contains(toNode(element));
|
|
122
|
-
}
|
|
123
|
-
function children(element, selector) {
|
|
124
|
-
element = toNode(element);
|
|
125
|
-
const children2 = element ? toNodes(element.children) : [];
|
|
126
|
-
return selector ? filter(children2, selector) : children2;
|
|
127
|
-
}
|
|
128
|
-
function index(element, ref) {
|
|
129
|
-
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function findAll(selector, context) {
|
|
133
|
-
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
134
|
-
}
|
|
135
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
136
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
137
|
-
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
138
|
-
const sanatize = memoize((selector) => selector.replace(contextSanitizeRe, "$1 *"));
|
|
139
|
-
function _query(selector, context = document, queryFn) {
|
|
140
|
-
if (!selector || !isString(selector)) {
|
|
141
|
-
return selector;
|
|
142
|
-
}
|
|
143
|
-
selector = sanatize(selector);
|
|
144
|
-
if (isContextSelector(selector)) {
|
|
145
|
-
const split = splitSelector(selector);
|
|
146
|
-
selector = "";
|
|
147
|
-
for (let sel of split) {
|
|
148
|
-
let ctx = context;
|
|
149
|
-
if (sel[0] === "!") {
|
|
150
|
-
const selectors = sel.substr(1).trim().split(" ");
|
|
151
|
-
ctx = closest(parent(context), selectors[0]);
|
|
152
|
-
sel = selectors.slice(1).join(" ").trim();
|
|
153
|
-
if (!sel.length && split.length === 1) {
|
|
154
|
-
return ctx;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if (sel[0] === "-") {
|
|
158
|
-
const selectors = sel.substr(1).trim().split(" ");
|
|
159
|
-
const prev = (ctx || context).previousElementSibling;
|
|
160
|
-
ctx = matches(prev, sel.substr(1)) ? prev : null;
|
|
161
|
-
sel = selectors.slice(1).join(" ");
|
|
162
|
-
}
|
|
163
|
-
if (ctx) {
|
|
164
|
-
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
context = document;
|
|
168
|
-
}
|
|
169
|
-
try {
|
|
170
|
-
return context[queryFn](selector);
|
|
171
|
-
} catch (e) {
|
|
172
|
-
return null;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
const selectorRe = /.*?[^\\](?:,|$)/g;
|
|
176
|
-
const splitSelector = memoize(
|
|
177
|
-
(selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
|
|
178
|
-
);
|
|
179
|
-
function domPath(element) {
|
|
180
|
-
const names = [];
|
|
181
|
-
while (element.parentNode) {
|
|
182
|
-
const id = attr(element, "id");
|
|
183
|
-
if (id) {
|
|
184
|
-
names.unshift(`#${escape(id)}`);
|
|
185
|
-
break;
|
|
186
|
-
} else {
|
|
187
|
-
let { tagName } = element;
|
|
188
|
-
if (tagName !== "HTML") {
|
|
189
|
-
tagName += `:nth-child(${index(element) + 1})`;
|
|
190
|
-
}
|
|
191
|
-
names.unshift(tagName);
|
|
192
|
-
element = element.parentNode;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
return names.join(" > ");
|
|
196
|
-
}
|
|
197
|
-
function escape(css) {
|
|
198
|
-
return isString(css) ? CSS.escape(css) : "";
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function on(...args) {
|
|
202
|
-
let [targets, types, selector, listener, useCapture = false] = getArgs(args);
|
|
203
|
-
if (listener.length > 1) {
|
|
204
|
-
listener = detail(listener);
|
|
205
|
-
}
|
|
206
|
-
if (useCapture == null ? void 0 : useCapture.self) {
|
|
207
|
-
listener = selfFilter(listener);
|
|
208
|
-
}
|
|
209
|
-
if (selector) {
|
|
210
|
-
listener = delegate(selector, listener);
|
|
211
|
-
}
|
|
212
|
-
for (const type of types) {
|
|
213
|
-
for (const target of targets) {
|
|
214
|
-
target.addEventListener(type, listener, useCapture);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
return () => off(targets, types, listener, useCapture);
|
|
218
|
-
}
|
|
219
|
-
function off(...args) {
|
|
220
|
-
let [targets, types, , listener, useCapture = false] = getArgs(args);
|
|
221
|
-
for (const type of types) {
|
|
222
|
-
for (const target of targets) {
|
|
223
|
-
target.removeEventListener(type, listener, useCapture);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function getArgs(args) {
|
|
228
|
-
args[0] = toEventTargets(args[0]);
|
|
229
|
-
if (isString(args[1])) {
|
|
230
|
-
args[1] = args[1].split(" ");
|
|
231
|
-
}
|
|
232
|
-
if (isFunction(args[2])) {
|
|
233
|
-
args.splice(2, 0, false);
|
|
234
|
-
}
|
|
235
|
-
return args;
|
|
236
|
-
}
|
|
237
|
-
function delegate(selector, listener) {
|
|
238
|
-
return (e) => {
|
|
239
|
-
const current = selector[0] === ">" ? findAll(selector, e.currentTarget).reverse().filter((element) => within(e.target, element))[0] : closest(e.target, selector);
|
|
240
|
-
if (current) {
|
|
241
|
-
e.current = current;
|
|
242
|
-
listener.call(this, e);
|
|
243
|
-
delete e.current;
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
function detail(listener) {
|
|
248
|
-
return (e) => isArray(e.detail) ? listener(e, ...e.detail) : listener(e);
|
|
249
|
-
}
|
|
250
|
-
function selfFilter(listener) {
|
|
251
|
-
return function(e) {
|
|
252
|
-
if (e.target === e.currentTarget || e.target === e.current) {
|
|
253
|
-
return listener.call(null, e);
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
function isEventTarget(target) {
|
|
258
|
-
return target && "addEventListener" in target;
|
|
259
|
-
}
|
|
260
|
-
function toEventTarget(target) {
|
|
261
|
-
return isEventTarget(target) ? target : toNode(target);
|
|
262
|
-
}
|
|
263
|
-
function toEventTargets(target) {
|
|
264
|
-
return isArray(target) ? target.map(toEventTarget).filter(Boolean) : isString(target) ? findAll(target) : isEventTarget(target) ? [target] : toNodes(target);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
const cssNumber = {
|
|
268
|
-
"animation-iteration-count": true,
|
|
269
|
-
"column-count": true,
|
|
270
|
-
"fill-opacity": true,
|
|
271
|
-
"flex-grow": true,
|
|
272
|
-
"flex-shrink": true,
|
|
273
|
-
"font-weight": true,
|
|
274
|
-
"line-height": true,
|
|
275
|
-
opacity: true,
|
|
276
|
-
order: true,
|
|
277
|
-
orphans: true,
|
|
278
|
-
"stroke-dasharray": true,
|
|
279
|
-
"stroke-dashoffset": true,
|
|
280
|
-
widows: true,
|
|
281
|
-
"z-index": true,
|
|
282
|
-
zoom: true
|
|
283
|
-
};
|
|
284
|
-
function css(element, property, value, priority) {
|
|
285
|
-
const elements = toNodes(element);
|
|
286
|
-
for (const element2 of elements) {
|
|
287
|
-
if (isString(property)) {
|
|
288
|
-
property = propName(property);
|
|
289
|
-
if (isUndefined(value)) {
|
|
290
|
-
return getComputedStyle(element2).getPropertyValue(property);
|
|
291
|
-
} else {
|
|
292
|
-
element2.style.setProperty(
|
|
293
|
-
property,
|
|
294
|
-
isNumeric(value) && !cssNumber[property] ? `${value}px` : value || isNumber(value) ? value : "",
|
|
295
|
-
priority
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
} else if (isArray(property)) {
|
|
299
|
-
const props = {};
|
|
300
|
-
for (const prop of property) {
|
|
301
|
-
props[prop] = css(element2, prop);
|
|
302
|
-
}
|
|
303
|
-
return props;
|
|
304
|
-
} else if (isObject(property)) {
|
|
305
|
-
priority = value;
|
|
306
|
-
each(property, (value2, property2) => css(element2, property2, value2, priority));
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
return elements[0];
|
|
310
|
-
}
|
|
311
|
-
const propName = memoize((name) => vendorPropName(name));
|
|
312
|
-
function vendorPropName(name) {
|
|
313
|
-
if (startsWith(name, "--")) {
|
|
314
|
-
return name;
|
|
315
|
-
}
|
|
316
|
-
name = hyphenate(name);
|
|
317
|
-
const { style } = document.documentElement;
|
|
318
|
-
if (name in style) {
|
|
319
|
-
return name;
|
|
320
|
-
}
|
|
321
|
-
for (const prefix of ["webkit", "moz"]) {
|
|
322
|
-
const prefixedName = `-${prefix}-${name}`;
|
|
323
|
-
if (prefixedName in style) {
|
|
324
|
-
return prefixedName;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
const dirs = {
|
|
330
|
-
width: ["left", "right"],
|
|
331
|
-
height: ["top", "bottom"]
|
|
332
|
-
};
|
|
333
|
-
dimension("height");
|
|
334
|
-
dimension("width");
|
|
335
|
-
function dimension(prop) {
|
|
336
|
-
const propName = ucfirst(prop);
|
|
337
|
-
return (element, value) => {
|
|
338
|
-
if (isUndefined(value)) {
|
|
339
|
-
if (isWindow(element)) {
|
|
340
|
-
return element[`inner${propName}`];
|
|
341
|
-
}
|
|
342
|
-
if (isDocument(element)) {
|
|
343
|
-
const doc = element.documentElement;
|
|
344
|
-
return Math.max(doc[`offset${propName}`], doc[`scroll${propName}`]);
|
|
345
|
-
}
|
|
346
|
-
element = toNode(element);
|
|
347
|
-
value = css(element, prop);
|
|
348
|
-
value = value === "auto" ? element[`offset${propName}`] : toFloat(value) || 0;
|
|
349
|
-
return value - boxModelAdjust(element, prop);
|
|
350
|
-
} else {
|
|
351
|
-
return css(
|
|
352
|
-
element,
|
|
353
|
-
prop,
|
|
354
|
-
!value && value !== 0 ? "" : +value + boxModelAdjust(element, prop) + "px"
|
|
355
|
-
);
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
function boxModelAdjust(element, prop, sizing = "border-box") {
|
|
360
|
-
return css(element, "boxSizing") === sizing ? sumBy(
|
|
361
|
-
dirs[prop].map(ucfirst),
|
|
362
|
-
(prop2) => toFloat(css(element, `padding${prop2}`)) + toFloat(css(element, `border${prop2}Width`))
|
|
363
|
-
) : 0;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
const inBrowser = typeof window !== "undefined";
|
|
367
|
-
|
|
368
|
-
const hasResizeObserver = inBrowser && window.ResizeObserver;
|
|
369
|
-
function observeResize(targets, cb, options = { box: "border-box" }) {
|
|
370
|
-
if (hasResizeObserver) {
|
|
371
|
-
return observe$1(ResizeObserver, targets, cb, options);
|
|
372
|
-
}
|
|
373
|
-
initResizeListener();
|
|
374
|
-
listeners.add(cb);
|
|
375
|
-
return {
|
|
376
|
-
observe: noop,
|
|
377
|
-
unobserve: noop,
|
|
378
|
-
disconnect() {
|
|
379
|
-
listeners.delete(cb);
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
let listeners;
|
|
384
|
-
function initResizeListener() {
|
|
385
|
-
if (listeners) {
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
listeners = /* @__PURE__ */ new Set();
|
|
389
|
-
let pendingResize;
|
|
390
|
-
const handleResize = () => {
|
|
391
|
-
if (pendingResize) {
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
pendingResize = true;
|
|
395
|
-
requestAnimationFrame(() => pendingResize = false);
|
|
396
|
-
for (const listener of listeners) {
|
|
397
|
-
listener();
|
|
398
|
-
}
|
|
399
|
-
};
|
|
400
|
-
on(window, "load resize", handleResize);
|
|
401
|
-
on(document, "loadedmetadata load", handleResize, true);
|
|
402
|
-
}
|
|
403
|
-
function observeMutation(targets, cb, options) {
|
|
404
|
-
return observe$1(MutationObserver, targets, cb, options);
|
|
405
|
-
}
|
|
406
|
-
function observe$1(Observer, targets, cb, options) {
|
|
407
|
-
const observer = new Observer(cb);
|
|
408
|
-
for (const el of toNodes(targets)) {
|
|
409
|
-
observer.observe(el, options);
|
|
410
|
-
}
|
|
411
|
-
return observer;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
9
|
function resize(options) {
|
|
415
|
-
return observe(observeResize, options, "resize");
|
|
10
|
+
return observe(uikitUtil.observeResize, options, "resize");
|
|
416
11
|
}
|
|
417
12
|
function mutation(options) {
|
|
418
|
-
return observe(observeMutation, options);
|
|
13
|
+
return observe(uikitUtil.observeMutation, options);
|
|
419
14
|
}
|
|
420
15
|
function observe(observe2, options, emit) {
|
|
421
16
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.6 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],v):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSortable=v(s.UIkit.util))})(this,function(s){"use strict";const v=/\B([A-Z])/g,ie=y(e=>e.replace(v,"-$1").toLowerCase()),B=y(e=>e.charAt(0).toUpperCase()+e.slice(1));function D(e,n){var t;return(t=e==null?void 0:e.startsWith)==null?void 0:t.call(e,n)}const{isArray:E,from:cn}=Array;function N(e){return typeof e=="function"}function x(e){return e!==null&&typeof e=="object"}function L(e){return x(e)&&e===e.window}function fe(e){return z(e)===9}function M(e){return z(e)>=1}function he(e){return z(e)===1}function z(e){return!L(e)&&x(e)&&e.nodeType}function b(e){return typeof e=="string"}function O(e){return typeof e=="number"}function de(e){return O(e)||b(e)&&!isNaN(e-parseFloat(e))}function A(e){return e===void 0}function S(e){return parseFloat(e)||0}function g(e){return p(e)[0]}function p(e){return M(e)?[e]:Array.from(e||[]).filter(M)}function ue(e,n){for(const t in e)if(n(e[t],t)===!1)return!1;return!0}function le(e,n){return e.reduce((t,o)=>t+S(N(n)?n(o):o[n]),0)}function H(){}function y(e){const n=Object.create(null);return t=>n[t]||(n[t]=e(t))}function I(e,n,t){var o;if(x(n)){for(const r in n)I(e,r,n[r]);return}if(A(t))return(o=g(e))==null?void 0:o.getAttribute(n);for(const r of p(e))N(t)&&(t=t.call(r,I(r,n))),t===null?pe(r,n):r.setAttribute(n,t)}function pe(e,n){p(e).forEach(t=>t.removeAttribute(n))}function V(e){var n;return(n=g(e))==null?void 0:n.parentElement}function me(e,n){return p(e).filter(t=>W(t,n))}function W(e,n){return p(e).some(t=>t.matches(n))}function T(e,n){return he(e)?e.closest(D(n,">")?n.slice(1):n):p(e).map(t=>T(t,n)).filter(Boolean)}function ge(e,n){return b(n)?!!T(e,n):g(n).contains(g(e))}function be(e,n){e=g(e);const t=e?p(e.children):[];return n?me(t,n):t}function we(e,n){return n?p(e).indexOf(g(n)):be(V(e)).indexOf(e)}function q(e,n){return p(Se(e,g(n),"querySelectorAll"))}const ye=/(^|[^\\],)\s*[!>+~-]/,ve=y(e=>e.match(ye)),Ce=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,xe=y(e=>e.replace(Ce,"$1 *"));function Se(e,n=document,t){if(!e||!b(e))return e;if(e=xe(e),ve(e)){const o=$e(e);e="";for(let r of o){let c=n;if(r[0]==="!"){const a=r.substr(1).trim().split(" ");if(c=T(V(n),a[0]),r=a.slice(1).join(" ").trim(),!r.length&&o.length===1)return c}if(r[0]==="-"){const a=r.substr(1).trim().split(" "),i=(c||n).previousElementSibling;c=W(i,r.substr(1))?i:null,r=a.slice(1).join(" ")}c&&(e+=`${e?",":""}${Pe(c)} ${r}`)}n=document}try{return n[t](e)}catch{return null}}const Te=/.*?[^\\](?:,|$)/g,$e=y(e=>e.match(Te).map(n=>n.replace(/,$/,"").trim()));function Pe(e){const n=[];for(;e.parentNode;){const t=I(e,"id");if(t){n.unshift(`#${Ee(t)}`);break}else{let{tagName:o}=e;o!=="HTML"&&(o+=`:nth-child(${we(e)+1})`),n.unshift(o),e=e.parentNode}}return n.join(" > ")}function Ee(e){return b(e)?CSS.escape(e):""}function j(...e){let[n,t,o,r,c=!1]=_(e);r.length>1&&(r=Ae(r)),c!=null&&c.self&&(r=Ie(r)),o&&(r=ze(o,r));for(const a of t)for(const i of n)i.addEventListener(a,r,c);return()=>Ne(n,t,r,c)}function Ne(...e){let[n,t,,o,r=!1]=_(e);for(const c of t)for(const a of n)a.removeEventListener(c,o,r)}function _(e){return e[0]=Fe(e[0]),b(e[1])&&(e[1]=e[1].split(" ")),N(e[2])&&e.splice(2,0,!1),e}function ze(e,n){return t=>{const o=e[0]===">"?q(e,t.currentTarget).reverse().filter(r=>ge(t.target,r))[0]:T(t.target,e);o&&(t.current=o,n.call(this,t),delete t.current)}}function Ae(e){return n=>E(n.detail)?e(n,...n.detail):e(n)}function Ie(e){return function(n){if(n.target===n.currentTarget||n.target===n.current)return e.call(null,n)}}function Z(e){return e&&"addEventListener"in e}function Re(e){return Z(e)?e:g(e)}function Fe(e){return E(e)?e.map(Re).filter(Boolean):b(e)?q(e):Z(e)?[e]:p(e)}const Be={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function w(e,n,t,o){const r=p(e);for(const c of r)if(b(n)){if(n=De(n),A(t))return getComputedStyle(c).getPropertyValue(n);c.style.setProperty(n,de(t)&&!Be[n]?`${t}px`:t||O(t)?t:"",o)}else if(E(n)){const a={};for(const i of n)a[i]=w(c,i);return a}else x(n)&&(o=t,ue(n,(a,i)=>w(c,i,a,o)));return r[0]}const De=y(e=>Le(e));function Le(e){if(D(e,"--"))return e;e=ie(e);const{style:n}=document.documentElement;if(e in n)return e;for(const t of["webkit","moz"]){const o=`-${t}-${e}`;if(o in n)return o}}const Me={width:["left","right"],height:["top","bottom"]};G("height"),G("width");function G(e){const n=B(e);return(t,o)=>{if(A(o)){if(L(t))return t[`inner${n}`];if(fe(t)){const r=t.documentElement;return Math.max(r[`offset${n}`],r[`scroll${n}`])}return t=g(t),o=w(t,e),o=o==="auto"?t[`offset${n}`]:S(o)||0,o-J(t,e)}else return w(t,e,!o&&o!==0?"":+o+J(t,e)+"px")}}function J(e,n,t="border-box"){return w(e,"boxSizing")===t?le(Me[n].map(B),o=>S(w(e,`padding${o}`))+S(w(e,`border${o}Width`))):0}const Oe=typeof window<"u"&&window.ResizeObserver;function He(e,n,t={box:"border-box"}){return Oe?K(ResizeObserver,e,n,t):(Ve(),C.add(n),{observe:H,unobserve:H,disconnect(){C.delete(n)}})}let C;function Ve(){if(C)return;C=new Set;let e;const n=()=>{if(!e){e=!0,requestAnimationFrame(()=>e=!1);for(const t of C)t()}};j(window,"load resize",n),j(document,"loadedmetadata load",n,!0)}function We(e,n,t){return K(MutationObserver,e,n,t)}function K(e,n,t,o){const r=new e(t);for(const c of p(n))r.observe(c,o);return r}function qe(e){return Q(He,e,"resize")}function je(e){return Q(We,e)}function Q(e,n,t){return{observe:e,handler(){this.$emit(t)},...n}}je({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),qe({target:({$el:e})=>[e,...s.toArray(e.children)]});function X(e){return Y(e,"top","bottom")}function _e(e){const n=[];for(const t of e){const o=Y(t,"left","right");for(let r=0;r<o.length;r++)n[r]=n[r]?n[r].concat(o[r]):o[r]}return s.isRtl?n.reverse():n}function Y(e,n,t){const o=[[]];for(const r of e){if(!s.isVisible(r))continue;let c=$(r);for(let a=o.length-1;a>=0;a--){const i=o[a];if(!i[0]){i.push(r);break}let f;if(i[0].offsetParent===r.offsetParent?f=$(i[0]):(c=$(r,!0),f=$(i[0],!0)),c[n]>=f[t]-1&&c[n]!==f[n]){o.push([r]);break}if(c[t]-1>f[n]||c[n]===f[n]){i.push(r);break}if(a===0){o.unshift([r]);break}}}return o}function $(e,n=!1){let{offsetTop:t,offsetLeft:o,offsetHeight:r,offsetWidth:c}=e;return n&&([t,o]=s.offsetPosition(e)),{top:t,left:o,bottom:t+r,right:o+c}}const R="uk-transition-leave",F="uk-transition-enter";function k(e,n,t,o=0){const r=P(n,!0),c={opacity:1},a={opacity:0},i=d=>()=>r===P(n)?d():Promise.reject(),f=i(async()=>{s.addClass(n,R),await Promise.all(ee(n).map((d,m)=>new Promise(h=>setTimeout(()=>s.Transition.start(d,a,t/2,"ease").then(h),m*o)))),s.removeClass(n,R)}),u=i(async()=>{const d=s.height(n);s.addClass(n,F),e(),s.css(s.children(n),{opacity:0}),await Ze();const m=s.children(n),h=s.height(n);s.css(n,"alignContent","flex-start"),s.height(n,d);const l=ee(n);s.css(m,a);const ae=l.map(async(on,rn)=>{await Ge(rn*o),await s.Transition.start(on,c,t/2,"ease")});d!==h&&ae.push(s.Transition.start(n,{height:h},t/2+l.length*o,"ease")),await Promise.all(ae).then(()=>{s.removeClass(n,F),r===P(n)&&(s.css(n,{height:"",alignContent:""}),s.css(m,{opacity:""}),delete n.dataset.transition)})});return s.hasClass(n,R)?U(n).then(u):s.hasClass(n,F)?U(n).then(f).then(u):f().then(u)}function P(e,n){return n&&(e.dataset.transition=1+P(e)),s.toNumber(e.dataset.transition)||0}function U(e){return Promise.all(s.children(e).filter(s.Transition.inProgress).map(n=>new Promise(t=>s.once(n,"transitionend transitioncanceled",t))))}function ee(e){return X(s.children(e)).reduce((n,t)=>n.concat(s.sortBy(t.filter(o=>s.isInView(o)),"offsetLeft")),[])}function Ze(){return new Promise(e=>requestAnimationFrame(e))}function Ge(e){return new Promise(n=>setTimeout(n,e))}async function Je(e,n,t){await se();let o=s.children(n);const r=o.map(h=>ne(h,!0)),c={...s.css(n,["height","padding"]),display:"block"};await Promise.all(o.concat(n).map(s.Transition.cancel)),e(),o=o.concat(s.children(n).filter(h=>!s.includes(o,h))),await Promise.resolve(),s.fastdom.flush();const a=s.attr(n,"style"),i=s.css(n,["height","padding"]),[f,u]=Ke(n,o,r),d=o.map(h=>({style:s.attr(h,"style")}));o.forEach((h,l)=>u[l]&&s.css(h,u[l])),s.css(n,c),s.trigger(n,"scroll"),s.fastdom.flush(),await se();const m=o.map((h,l)=>s.parent(h)===n&&s.Transition.start(h,f[l],t,"ease")).concat(s.Transition.start(n,i,t,"ease"));try{await Promise.all(m),o.forEach((h,l)=>{s.attr(h,d[l]),s.parent(h)===n&&s.css(h,"display",f[l].opacity===0?"none":"")}),s.attr(n,"style",a)}catch{s.attr(o,"style",""),Qe(n,c)}}function ne(e,n){const t=s.css(e,"zIndex");return s.isVisible(e)?{display:"",opacity:n?s.css(e,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:t==="auto"?s.index(e):t,...te(e)}:!1}function Ke(e,n,t){const o=n.map((c,a)=>s.parent(c)&&a in t?t[a]?s.isVisible(c)?te(c):{opacity:0}:{opacity:s.isVisible(c)?1:0}:!1),r=o.map((c,a)=>{const i=s.parent(n[a])===e&&(t[a]||ne(n[a]));if(!i)return!1;if(!c)delete i.opacity;else if(!("opacity"in c)){const{opacity:f}=i;f%1?c.opacity=1:delete i.opacity}return i});return[o,r]}function Qe(e,n){for(const t in n)s.css(e,t,"")}function te(e){const{height:n,width:t}=s.offset(e);return{height:n,width:t,transform:"",...s.position(e),...s.css(e,["marginTop","marginLeft"])}}function se(){return new Promise(e=>requestAnimationFrame(e))}var Xe={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(e,n=this.$el){const t=this.animation;return(t==="fade"?k:t==="delayed-fade"?(...r)=>k(...r,40):t?Je:()=>(e(),Promise.resolve()))(e,n,this.duration).catch(s.noop)}}},Ye={connected(){s.addClass(this.$el,this.$options.id)}},oe={mixins:[Ye,Xe],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 e of["init","start","move","end"]){const n=this[e];this[e]=t=>{s.assign(this.pos,s.getEventPos(t)),n(t)}}},events:{name:s.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return s.children(this.target)},isEmpty:{get(){return s.isEmpty(this.items)},watch(e){s.toggleClass(this.target,this.clsEmpty,e)},immediate:!0},handles:{get({handle:e},n){return e?s.$$(e,n):this.items},watch(e,n){s.css(n,{touchAction:"",userSelect:""}),s.css(e,{touchAction:s.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(e){if(!this.drag||!s.parent(this.placeholder))return;const{pos:{x:n,y:t},origin:{offsetTop:o,offsetLeft:r},placeholder:c}=this;s.css(this.drag,{top:t-o,left:n-r});const a=this.getSortable(document.elementFromPoint(n,t));if(!a)return;const{items:i}=a;if(i.some(s.Transition.inProgress))return;const f=nn(i,{x:n,y:t});if(i.length&&(!f||f===c))return;const u=this.getSortable(c),d=tn(a.target,f,c,n,t,a===u&&e.moved!==f);d!==!1&&(d&&c===d||(a!==u?(u.remove(c),e.moved=f):delete e.moved,a.insert(c,d),this.touched.add(a)))},events:["move"]},methods:{init(e){const{target:n,button:t,defaultPrevented:o}=e,[r]=this.items.filter(c=>s.within(n,c));!r||o||t>0||s.isInput(n)||s.within(n,`.${this.clsNoDrag}`)||this.handle&&!s.within(n,this.handle)||(e.preventDefault(),this.touched=new Set([this]),this.placeholder=r,this.origin={target:n,index:s.index(r),...this.pos},s.on(document,s.pointerMove,this.move),s.on(document,s.pointerUp,this.end),this.threshold||this.start(e))},start(e){this.drag=en(this.$container,this.placeholder);const{left:n,top:t}=this.placeholder.getBoundingClientRect();s.assign(this.origin,{offsetLeft:this.pos.x-n,offsetTop:this.pos.y-t}),s.addClass(this.drag,this.clsDrag,this.clsCustom),s.addClass(this.placeholder,this.clsPlaceholder),s.addClass(this.items,this.clsItem),s.addClass(document.documentElement,this.clsDragState),s.trigger(this.$el,"start",[this,this.placeholder]),ke(this.pos),this.move(e)},move(e){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(e)},end(){if(s.off(document,s.pointerMove,this.move),s.off(document,s.pointerUp,this.end),!this.drag)return;Ue();const e=this.getSortable(this.placeholder);this===e?this.origin.index!==s.index(this.placeholder)&&s.trigger(this.$el,"moved",[this,this.placeholder]):(s.trigger(e.$el,"added",[e,this.placeholder]),s.trigger(this.$el,"removed",[this,this.placeholder])),s.trigger(this.$el,"stop",[this,this.placeholder]),s.remove(this.drag),this.drag=null;for(const{clsPlaceholder:n,clsItem:t}of this.touched)for(const o of this.touched)s.removeClass(o.items,n,t);this.touched=null,s.removeClass(document.documentElement,this.clsDragState)},insert(e,n){s.addClass(this.items,this.clsItem);const t=()=>n?s.before(n,e):s.append(this.target,e);this.animate(t)},remove(e){s.within(e,this.target)&&this.animate(()=>s.remove(e))},getSortable(e){do{const n=this.$getComponent(e,"sortable");if(n&&(n===this||this.group!==!1&&n.group===this.group))return n}while(e=s.parent(e))}}};let re;function ke(e){let n=Date.now();re=setInterval(()=>{let{x:t,y:o}=e;o+=document.scrollingElement.scrollTop;const r=(Date.now()-n)*.3;n=Date.now(),s.scrollParents(document.elementFromPoint(t,e.y)).reverse().some(c=>{let{scrollTop:a,scrollHeight:i}=c;const{top:f,bottom:u,height:d}=s.offsetViewport(c);if(f<o&&f+35>o)a-=r;else if(u>o&&u-35<o)a+=r;else return;if(a>0&&a<i-d)return c.scrollTop=a,!0})},15)}function Ue(){clearInterval(re)}function en(e,n){let t;if(s.isTag(n,"li","tr")){t=s.$("<div>"),s.append(t,n.cloneNode(!0).children);for(const o of n.getAttributeNames())s.attr(t,o,n.getAttribute(o))}else t=n.cloneNode(!0);return s.append(e,t),s.css(t,"margin","0","important"),s.css(t,{boxSizing:"border-box",width:n.offsetWidth,height:n.offsetHeight,padding:s.css(n,"padding")}),s.height(t.firstElementChild,s.height(n.firstElementChild)),t}function nn(e,n){return e[s.findIndex(e,t=>s.pointInRect(n,t.getBoundingClientRect()))]}function tn(e,n,t,o,r,c){if(!s.children(e).length)return;const a=n.getBoundingClientRect();if(!c)return sn(e,t)||r<a.top+a.height/2?n:n.nextElementSibling;const i=t.getBoundingClientRect(),f=ce([a.top,a.bottom],[i.top,i.bottom]),[u,d,m,h]=f?[o,"width","left","right"]:[r,"height","top","bottom"],l=i[d]<a[d]?a[d]-i[d]:0;return i[m]<a[m]?l&&u<a[m]+l?!1:n.nextElementSibling:l&&u>a[h]-l?!1:n}function sn(e,n){const t=s.children(e).length===1;t&&s.append(e,n);const o=s.children(e),r=o.some((c,a)=>{const i=c.getBoundingClientRect();return o.slice(a+1).some(f=>{const u=f.getBoundingClientRect();return!ce([i.left,i.right],[u.left,u.right])})});return t&&s.remove(n),r}function ce(e,n){return e[1]>n[0]&&n[1]>e[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",oe),oe});
|
|
1
|
+
/*! UIkit 3.16.7-dev.fcb5a4616 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return y(e.observeResize,n,"resize")}function N(n){return y(e.observeMutation,n)}function y(n,s,o){return{observe:n,handler(){this.$emit(o)},...s}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),g({target:({$el:n})=>[n,...e.toArray(n.children)]});function C(n){return T(n,"top","bottom")}function z(n){const s=[];for(const o of n){const t=T(o,"left","right");for(let a=0;a<t.length;a++)s[a]=s[a]?s[a].concat(t[a]):t[a]}return e.isRtl?s.reverse():s}function T(n,s,o){const t=[[]];for(const a of n){if(!e.isVisible(a))continue;let c=u(a);for(let r=t.length-1;r>=0;r--){const h=t[r];if(!h[0]){h.push(a);break}let d;if(h[0].offsetParent===a.offsetParent?d=u(h[0]):(c=u(a,!0),d=u(h[0],!0)),c[s]>=d[o]-1&&c[s]!==d[s]){t.push([a]);break}if(c[o]-1>d[s]||c[s]===d[s]){h.push(a);break}if(r===0){t.unshift([a]);break}}}return t}function u(n,s=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:a,offsetWidth:c}=n;return s&&([o,t]=e.offsetPosition(n)),{top:o,left:t,bottom:o+a,right:t+c}}const v="uk-transition-leave",w="uk-transition-enter";function P(n,s,o,t=0){const a=b(s,!0),c={opacity:1},r={opacity:0},h=i=>()=>a===b(s)?i():Promise.reject(),d=h(async()=>{e.addClass(s,v),await Promise.all(x(s).map((i,l)=>new Promise(f=>setTimeout(()=>e.Transition.start(i,r,o/2,"ease").then(f),l*t)))),e.removeClass(s,v)}),m=h(async()=>{const i=e.height(s);e.addClass(s,w),n(),e.css(e.children(s),{opacity:0}),await A();const l=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,i);const p=x(s);e.css(l,r);const R=p.map(async(X,Y)=>{await H(Y*t),await e.Transition.start(X,c,o/2,"ease")});i!==f&&R.push(e.Transition.start(s,{height:f},o/2+p.length*t,"ease")),await Promise.all(R).then(()=>{e.removeClass(s,w),a===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(l,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,v)?S(s).then(m):e.hasClass(s,w)?S(s).then(d).then(m):d().then(m)}function b(n,s){return s&&(n.dataset.transition=1+b(n)),e.toNumber(n.dataset.transition)||0}function S(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function x(n){return C(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(t=>e.isInView(t)),"offsetLeft")),[])}function A(){return new Promise(n=>requestAnimationFrame(n))}function H(n){return new Promise(s=>setTimeout(s,n))}async function L(n,s,o){await D();let t=e.children(s);const a=t.map(f=>I(f,!0)),c={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),n(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,m]=M(s,t,a),i=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,p)=>m[p]&&e.css(f,m[p])),e.css(s,c),e.trigger(s,"scroll"),e.fastdom.flush(),await D();const l=t.map((f,p)=>e.parent(f)===s&&e.Transition.start(f,d[p],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));try{await Promise.all(l),t.forEach((f,p)=>{e.attr(f,i[p]),e.parent(f)===s&&e.css(f,"display",d[p].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),V(s,c)}}function I(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?{display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o,...$(n)}:!1}function M(n,s,o){const t=s.map((c,r)=>e.parent(c)&&r in o?o[r]?e.isVisible(c)?$(c):{opacity:0}:{opacity:e.isVisible(c)?1:0}:!1),a=t.map((c,r)=>{const h=e.parent(s[r])===n&&(o[r]||I(s[r]));if(!h)return!1;if(!c)delete h.opacity;else if(!("opacity"in c)){const{opacity:d}=h;d%1?c.opacity=1:delete h.opacity}return h});return[t,a]}function V(n,s){for(const o in s)e.css(n,o,"")}function $(n){const{height:s,width:o}=e.offset(n);return{height:s,width:o,transform:"",...e.position(n),...e.css(n,["marginTop","marginLeft"])}}function D(){return new Promise(n=>requestAnimationFrame(n))}var j={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s=this.$el){const o=this.animation;return(o==="fade"?P:o==="delayed-fade"?(...a)=>P(...a,40):o?L:()=>(n(),Promise.resolve()))(n,s,this.duration).catch(e.noop)}}},q={connected(){e.addClass(this.$el,this.$options.id)}},E={mixins:[q,j],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty:{get(){return e.isEmpty(this.items)},watch(n){e.toggleClass(this.target,this.clsEmpty,n)},immediate:!0},handles:{get({handle:n},s){return n?e.$$(n,s):this.items},watch(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:t,offsetLeft:a},placeholder:c}=this;e.css(this.drag,{top:o-t,left:s-a});const r=this.getSortable(document.elementFromPoint(s,o));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=J(h,{x:s,y:o});if(h.length&&(!d||d===c))return;const m=this.getSortable(c),i=K(r.target,d,c,s,o,r===m&&n.moved!==d);i!==!1&&(i&&c===i||(r!==m?(m.remove(c),n.moved=d):delete n.moved,r.insert(c,i),this.touched.add(r)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:t}=n,[a]=this.items.filter(c=>e.within(s,c));!a||t||o>0||e.isInput(s)||e.within(s,`.${this.clsNoDrag}`)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=a,this.origin={target:s,index:e.index(a),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=G(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),W(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;O();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){e.within(n,this.target)&&this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let F;function W(n){let s=Date.now();F=setInterval(()=>{let{x:o,y:t}=n;t+=document.scrollingElement.scrollTop;const a=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y)).reverse().some(c=>{let{scrollTop:r,scrollHeight:h}=c;const{top:d,bottom:m,height:i}=e.offsetViewport(c);if(d<t&&d+35>t)r-=a;else if(m>t&&m-35<t)r+=a;else return;if(r>0&&r<h-i)return c.scrollTop=r,!0})},15)}function O(){clearInterval(F)}function G(n,s){let o;if(e.isTag(s,"li","tr")){o=e.$("<div>"),e.append(o,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(o,t,s.getAttribute(t))}else o=s.cloneNode(!0);return e.append(n,o),e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function J(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function K(n,s,o,t,a,c){if(!e.children(n).length)return;const r=s.getBoundingClientRect();if(!c)return Q(n,o)||a<r.top+r.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=B([r.top,r.bottom],[h.top,h.bottom]),[m,i,l,f]=d?[t,"width","left","right"]:[a,"height","top","bottom"],p=h[i]<r[i]?r[i]-h[i]:0;return h[l]<r[l]?p&&m<r[l]+p?!1:s.nextElementSibling:p&&m>r[f]-p?!1:s}function Q(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const t=e.children(n),a=t.some((c,r)=>{const h=c.getBoundingClientRect();return t.slice(r+1).some(d=>{const m=d.getBoundingClientRect();return!B([h.left,h.right],[m.left,m.right])})});return o&&e.remove(s),a}function B(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",E),E});
|