uikit 3.16.4-dev.fd2458e3b → 3.16.5-dev.dda1f1b31
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/.eslintrc.json +1 -0
- package/CHANGELOG.md +9 -1
- package/build/build.js +5 -4
- package/build/icons.js +2 -1
- package/build/less.js +2 -11
- package/build/prefix.js +2 -1
- package/build/release.js +4 -3
- package/build/scope.js +2 -1
- package/build/scss.js +2 -1
- package/build/util.js +3 -3
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +12 -14
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +506 -22
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +2601 -310
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +2612 -323
- 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 +466 -43
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +184 -2
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +2345 -49
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +184 -2
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +2339 -49
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +472 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2298 -11
- 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 +951 -931
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +153 -152
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +979 -954
- package/dist/js/uikit.min.js +1 -1
- package/package.json +2 -2
- package/src/images/icons/mastodon.svg +3 -0
- package/src/js/api/app.js +12 -0
- package/src/js/api/boot.js +64 -43
- package/src/js/api/component.js +60 -61
- package/src/js/api/computed.js +39 -0
- package/src/js/api/events.js +45 -0
- package/src/js/api/global.js +58 -56
- package/src/js/api/hooks.js +35 -114
- package/src/js/api/index.js +8 -24
- package/src/js/api/instance.js +55 -55
- package/src/js/api/log.js +10 -0
- package/src/js/api/observables.js +125 -0
- package/src/js/api/observer.js +76 -0
- package/src/js/{util → api}/options.js +38 -1
- package/src/js/api/props.js +102 -0
- package/src/js/api/state.js +26 -280
- package/src/js/api/update.js +77 -0
- package/src/js/api/watch.js +34 -0
- package/src/js/components/countdown.js +14 -16
- package/src/js/components/filter.js +18 -24
- package/src/js/components/internal/slider-preload.js +5 -6
- package/src/js/components/lightbox-panel.js +1 -1
- package/src/js/components/lightbox.js +11 -23
- package/src/js/components/parallax.js +8 -6
- package/src/js/components/slider.js +10 -0
- package/src/js/components/tooltip.js +2 -1
- package/src/js/core/accordion.js +5 -6
- package/src/js/core/cover.js +9 -9
- package/src/js/core/drop.js +13 -6
- package/src/js/core/dropnav.js +1 -1
- package/src/js/core/grid.js +2 -5
- package/src/js/core/height-match.js +9 -16
- package/src/js/core/height-viewport.js +5 -7
- package/src/js/core/img.js +12 -19
- package/src/js/core/leader.js +4 -2
- package/src/js/core/margin.js +11 -21
- package/src/js/core/modal.js +1 -1
- package/src/js/core/offcanvas.js +6 -2
- package/src/js/core/overflow-auto.js +5 -5
- package/src/js/core/responsive.js +5 -7
- package/src/js/core/scroll.js +19 -10
- package/src/js/core/scrollspy-nav.js +6 -5
- package/src/js/core/scrollspy.js +27 -36
- package/src/js/core/sticky.js +12 -10
- package/src/js/core/svg.js +4 -2
- package/src/js/core/switcher.js +11 -9
- package/src/js/core/toggle.js +4 -4
- package/src/js/core/video.js +6 -14
- package/src/js/mixin/modal.js +2 -1
- package/src/js/mixin/parallax.js +1 -1
- package/src/js/mixin/slider-nav.js +2 -1
- package/src/js/mixin/slider.js +9 -3
- package/src/js/util/filter.js +13 -0
- package/src/js/util/index.js +0 -1
- package/src/js/util/keys.js +11 -0
- package/src/js/util/lang.js +7 -7
- package/src/js/util/observer.js +4 -2
- package/src/js/util/scroll.js +42 -0
- package/src/js/util/svg.js +16 -0
- package/src/js/util/viewport.js +1 -1
- package/src/scss/mixins-theme.scss +1640 -1596
- package/src/scss/mixins.scss +1370 -1370
- package/src/scss/variables-theme.scss +1255 -1255
- package/src/scss/variables.scss +1113 -1113
- package/src/js/mixin/lazyload.js +0 -27
- package/src/js/mixin/resize.js +0 -11
- package/src/js/mixin/scroll.js +0 -32
- package/src/js/mixin/swipe.js +0 -72
- package/src/js/mixin/utils.js +0 -91
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.fd2458e3b | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return F(n,"top","bottom")}function F(n,s,o){const t=[[]];for(const c of n){if(!e.isVisible(c))continue;let a=b(c);for(let r=t.length-1;r>=0;r--){const h=t[r];if(!h[0]){h.push(c);break}let d;if(h[0].offsetParent===c.offsetParent?d=b(h[0]):(a=b(c,!0),d=b(h[0],!0)),a[s]>=d[o]-1&&a[s]!==d[s]){t.push([c]);break}if(a[o]-1>d[s]||a[s]===d[s]){h.push(c);break}if(r===0){t.unshift([c]);break}}}return t}function b(n,s=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:c,offsetWidth:a}=n;return s&&([o,t]=e.offsetPosition(n)),{top:o,left:t,bottom:o+c,right:t+a}}const y="uk-transition-leave",u="uk-transition-enter";function v(n,s,o,t=0){const c=w(s,!0),a={opacity:1},r={opacity:0},h=p=>()=>c===w(s)?p():Promise.reject(),d=h(async()=>{e.addClass(s,y),await Promise.all(C(s).map((p,l)=>new Promise(f=>setTimeout(()=>e.Transition.start(p,r,o/2,"ease").then(f),l*t)))),e.removeClass(s,y)}),i=h(async()=>{const p=e.height(s);e.addClass(s,u),n(),e.css(e.children(s),{opacity:0}),await B();const l=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,p);const m=C(s);e.css(l,r);const E=m.map(async(G,J)=>{await N(J*t),await e.Transition.start(G,a,o/2,"ease")});p!==f&&E.push(e.Transition.start(s,{height:f},o/2+m.length*t,"ease")),await Promise.all(E).then(()=>{e.removeClass(s,u),c===w(s)&&(e.css(s,{height:"",alignContent:""}),e.css(l,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,y)?T(s).then(i):e.hasClass(s,u)?T(s).then(d).then(i):d().then(i)}function w(n,s){return s&&(n.dataset.transition=1+w(n)),e.toNumber(n.dataset.transition)||0}function T(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function C(n){return g(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(t=>e.isInView(t)),"offsetLeft")),[])}function B(){return new Promise(n=>requestAnimationFrame(n))}function N(n){return new Promise(s=>setTimeout(s,n))}async function R(n,s,o){await x();let t=e.children(s);const c=t.map(f=>P(f,!0)),a={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),n(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,i]=A(s,t,c),p=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>i[m]&&e.css(f,i[m])),e.css(s,a),e.trigger(s,"scroll"),e.fastdom.flush(),await x();const l=t.map((f,m)=>e.parent(f)===s&&e.Transition.start(f,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));try{await Promise.all(l),t.forEach((f,m)=>{e.attr(f,p[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),H(s,a)}}function P(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?{display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o,...S(n)}:!1}function A(n,s,o){const t=s.map((a,r)=>e.parent(a)&&r in o?o[r]?e.isVisible(a)?S(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===n&&(o[r]||P(s[r]));if(!h)return!1;if(!a)delete h.opacity;else if(!("opacity"in a)){const{opacity:d}=h;d%1?a.opacity=1:delete h.opacity}return h});return[t,c]}function H(n,s){for(const o in s)e.css(n,o,"")}function S(n){const{height:s,width:o}=e.offset(n);return{height:s,width:o,transform:"",...e.position(n),...e.css(n,["marginTop","marginLeft"])}}function x(){return new Promise(n=>requestAnimationFrame(n))}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s=this.$el){const o=this.animation;return(o==="fade"?v:o==="delayed-fade"?(...c)=>v(...c,40):o?R:()=>(n(),Promise.resolve()))(n,s,this.duration).catch(e.noop)}}},L={connected(){e.addClass(this.$el,this.$options.id)}},I={mixins:[L,z],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty:{get(){return e.isEmpty(this.items)},watch(n){e.toggleClass(this.target,this.clsEmpty,n)},immediate:!0},handles:{get({handle:n},s){return n?e.$$(n,s):this.items},watch(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:o-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,o));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=W(h,{x:s,y:o});if(h.length&&(!d||d===a))return;const i=this.getSortable(a),p=j(r.target,d,a,s,o,r===i&&n.moved!==d);p!==!1&&(p&&a===p||(r!==i?(i.remove(a),n.moved=d):delete n.moved,r.insert(a,p),this.touched.add(r)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:t}=n,[c]=this.items.filter(a=>e.within(s,a));!c||t||o>0||e.isInput(s)||e.within(s,`.${this.clsNoDrag}`)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:s,index:e.index(c),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=q(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),V(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;M();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){e.within(n,this.target)&&this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let $;function V(n){let s=Date.now();$=setInterval(()=>{let{x:o,y:t}=n;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:i,height:p}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(i>t&&i-35<t)r+=c;else return;if(r>0&&r<h-p)return a.scrollTop=r,!0})},15)}function M(){clearInterval($)}function q(n,s){let o;if(e.isTag(s,"li","tr")){o=e.$("<div>"),e.append(o,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(o,t,s.getAttribute(t))}else o=s.cloneNode(!0);return e.append(n,o),e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function W(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function j(n,s,o,t,c,a){if(!e.children(n).length)return;const r=s.getBoundingClientRect();if(!a)return O(n,o)||c<r.top+r.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=D([r.top,r.bottom],[h.top,h.bottom]),[i,p,l,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[p]<r[p]?r[p]-h[p]:0;return h[l]<r[l]?m&&i<r[l]+m?!1:s.nextElementSibling:m&&i>r[f]-m?!1:s}function O(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const t=e.children(n),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const i=d.getBoundingClientRect();return!D([h.left,h.right],[i.left,i.right])})});return o&&e.remove(s),c}function D(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",I),I});
|
|
1
|
+
/*! UIkit 3.16.5-dev.dda1f1b31 | 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});
|