uikit 3.14.4-dev.e2919bbf7 → 3.14.4-dev.eb440d70c

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.
Files changed (122) hide show
  1. package/CHANGELOG.md +30 -17
  2. package/build/util.js +1 -0
  3. package/dist/css/uikit-core-rtl.css +281 -61
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +281 -61
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +301 -65
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +301 -65
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +1 -1
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +96 -131
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +96 -131
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +4 -2
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +2 -2
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +2 -2
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +1 -1
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +2 -2
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +1 -1
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +99 -136
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +483 -455
  38. package/dist/js/uikit-core.min.js +17 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +486 -456
  42. package/dist/js/uikit.min.js +17 -1
  43. package/package.json +11 -11
  44. package/src/images/components/navbar-toggle-icon.svg +25 -3
  45. package/src/js/api/hooks.js +5 -1
  46. package/src/js/api/state.js +2 -2
  47. package/src/js/components/notification.js +3 -1
  48. package/src/js/core/accordion.js +9 -17
  49. package/src/js/core/alert.js +35 -14
  50. package/src/js/core/drop.js +110 -82
  51. package/src/js/core/height-viewport.js +4 -2
  52. package/src/js/core/navbar.js +30 -45
  53. package/src/js/core/scroll.js +37 -10
  54. package/src/js/core/toggle.js +3 -5
  55. package/src/js/mixin/media.js +1 -1
  56. package/src/js/mixin/modal.js +15 -12
  57. package/src/js/mixin/position.js +21 -22
  58. package/src/js/mixin/style.js +11 -0
  59. package/src/js/mixin/togglable.js +88 -124
  60. package/src/js/util/animation.js +9 -7
  61. package/src/js/util/class.js +3 -1
  62. package/src/js/util/filter.js +3 -7
  63. package/src/js/util/position.js +107 -107
  64. package/src/js/util/viewport.js +3 -5
  65. package/src/less/components/_import.less +1 -0
  66. package/src/less/components/drop.less +1 -18
  67. package/src/less/components/dropbar.less +126 -0
  68. package/src/less/components/dropdown.less +6 -20
  69. package/src/less/components/nav.less +211 -22
  70. package/src/less/components/navbar.less +17 -51
  71. package/src/less/theme/_import.less +1 -0
  72. package/src/less/theme/dropbar.less +44 -0
  73. package/src/less/theme/dropdown.less +0 -11
  74. package/src/less/theme/nav.less +46 -0
  75. package/src/less/theme/navbar.less +1 -5
  76. package/src/scss/components/_import.scss +1 -0
  77. package/src/scss/components/drop.scss +1 -18
  78. package/src/scss/components/dropbar.scss +126 -0
  79. package/src/scss/components/dropdown.scss +6 -20
  80. package/src/scss/components/nav.scss +160 -21
  81. package/src/scss/components/navbar.scss +17 -51
  82. package/src/scss/mixins-theme.scss +78 -7
  83. package/src/scss/mixins.scss +75 -3
  84. package/src/scss/theme/_import.scss +1 -0
  85. package/src/scss/theme/dropbar.scss +44 -0
  86. package/src/scss/theme/dropdown.scss +0 -8
  87. package/src/scss/theme/nav.scss +44 -0
  88. package/src/scss/theme/navbar.scss +1 -5
  89. package/src/scss/variables-theme.scss +54 -9
  90. package/src/scss/variables.scss +43 -7
  91. package/tests/accordion.html +2 -2
  92. package/tests/alert.html +2 -2
  93. package/tests/countdown.html +1 -1
  94. package/tests/drop.html +446 -416
  95. package/tests/dropbar.html +458 -0
  96. package/tests/dropdown.html +8 -470
  97. package/tests/filter.html +9 -12
  98. package/tests/form.html +1 -1
  99. package/tests/index.html +124 -105
  100. package/tests/js/index.js +1 -4
  101. package/tests/lightbox.html +5 -5
  102. package/tests/list.html +8 -8
  103. package/tests/modal.html +13 -13
  104. package/tests/nav.html +121 -12
  105. package/tests/navbar.html +112 -227
  106. package/tests/offcanvas.html +10 -14
  107. package/tests/parallax.html +1 -1
  108. package/tests/position.html +18 -16
  109. package/tests/progress.html +9 -9
  110. package/tests/scroll.html +7 -10
  111. package/tests/search.html +6 -6
  112. package/tests/slider.html +6 -5
  113. package/tests/slideshow.html +8 -8
  114. package/tests/sortable.html +6 -8
  115. package/tests/sticky-navbar.html +15 -15
  116. package/tests/sticky.html +8 -8
  117. package/tests/switcher.html +1 -1
  118. package/tests/tab.html +1 -1
  119. package/tests/table.html +7 -7
  120. package/tests/toggle.html +2 -2
  121. package/tests/tooltip.html +1 -1
  122. package/tests/upload.html +11 -11
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.e2919bbf7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.eb440d70c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -1 +1 @@
1
- /*! UIkit 3.14.4-dev.e2919bbf7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],i):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=i(e.UIkit.util))})(this,function(e){"use strict";var i={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}};const a=["days","hours","minutes","seconds"];var d={mixins:[i],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),this.start()},disconnected(){this.stop()},events:[{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}}],methods:{start(){this.stop(),this.update(),this.timer=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const n=r(this.date);(!this.date||n.total<=0)&&(this.stop(),n.days=n.hours=n.minutes=n.seconds=0);for(const s of a){const o=e.$(this.clsWrapper.replace("%unit%",s),this.$el);if(!o)continue;let t=String(Math.trunc(n[s]));t=t.length<2?"0"+t:t,o.textContent!==t&&(t=t.split(""),t.length!==o.children.length&&e.html(o,t.map(()=>"<span></span>").join("")),t.forEach((h,u)=>o.children[u].textContent=h))}}}};function r(n){const s=n-Date.now();return{total:s,seconds:s/1e3%60,minutes:s/1e3/60%60,hours:s/1e3/60/60%24,days:s/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
1
+ /*! UIkit 3.14.4-dev.eb440d70c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],i):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=i(e.UIkit.util))})(this,function(e){"use strict";var i={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}};const a=["days","hours","minutes","seconds"];var d={mixins:[i],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),this.start()},disconnected(){this.stop()},events:[{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}}],methods:{start(){this.stop(),this.update(),this.timer=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const n=r(this.date);(!this.date||n.total<=0)&&(this.stop(),n.days=n.hours=n.minutes=n.seconds=0);for(const s of a){const o=e.$(this.clsWrapper.replace("%unit%",s),this.$el);if(!o)continue;let t=String(Math.trunc(n[s]));t=t.length<2?"0"+t:t,o.textContent!==t&&(t=t.split(""),t.length!==o.children.length&&e.html(o,t.map(()=>"<span></span>").join("")),t.forEach((h,u)=>o.children[u].textContent=h))}}}};function r(n){const s=n-Date.now();return{total:s,seconds:s/1e3%60,minutes:s/1e3/60%60,hours:s/1e3/60/60%24,days:s/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.e2919bbf7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.eb440d70c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -1 +1 @@
1
- /*! UIkit 3.14.4-dev.e2919bbf7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],l):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=l(n.UIkit.util))})(this,function(n){"use strict";function l(s){return A(s,"top","bottom")}function A(s,e,o){const r=[[]];for(const t of s){if(!n.isVisible(t))continue;let c=u(t);for(let a=r.length-1;a>=0;a--){const f=r[a];if(!f[0]){f.push(t);break}let d;if(f[0].offsetParent===t.offsetParent?d=u(f[0]):(c=u(t,!0),d=u(f[0],!0)),c[e]>=d[o]-1&&c[e]!==d[e]){r.push([t]);break}if(c[o]-1>d[e]||c[e]===d[e]){f.push(t);break}if(a===0){r.unshift([t]);break}}}return r}function u(s,e){e===void 0&&(e=!1);let{offsetTop:o,offsetLeft:r,offsetHeight:t,offsetWidth:c}=s;return e&&([o,r]=n.offsetPosition(s)),{top:o,left:r,bottom:o+t,right:r+c}}const g="uk-transition-leave",v="uk-transition-enter";function w(s,e,o,r){r===void 0&&(r=0);const t=y(e,!0),c={opacity:1},a={opacity:0},f=i=>()=>t===y(e)?i():Promise.reject(),d=f(()=>(n.addClass(e,g),Promise.all(I(e).map((i,h)=>new Promise(m=>setTimeout(()=>n.Transition.start(i,a,o/2,"ease").then(m),h*r)))).then(()=>n.removeClass(e,g)))),p=f(()=>{const i=n.height(e);return n.addClass(e,v),s(),n.css(n.children(e),{opacity:0}),new Promise(h=>requestAnimationFrame(()=>{const m=n.children(e),C=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,i);const x=I(e);n.css(m,a);const q=x.map((W,M)=>new Promise(R=>setTimeout(()=>n.Transition.start(W,c,o/2,"ease").then(R),M*r)));i!==C&&q.push(n.Transition.start(e,{height:C},o/2+x.length*r,"ease")),Promise.all(q).then(()=>{n.removeClass(e,v),t===y(e)&&(n.css(e,{height:"",alignContent:""}),n.css(m,{opacity:""}),delete e.dataset.transition),h()})}))});return n.hasClass(e,g)?T(e).then(p):n.hasClass(e,v)?T(e).then(d).then(p):d().then(p)}function y(s,e){return e&&(s.dataset.transition=1+y(s)),n.toNumber(s.dataset.transition)||0}function T(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(o=>n.once(e,"transitionend transitioncanceled",o))))}function I(s){return l(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(r=>n.isInView(r)),"offsetLeft")),[])}function L(s,e,o){return new Promise(r=>requestAnimationFrame(()=>{let t=n.children(e);const c=t.map(f=>F(f,!0)),a=n.css(e,["height","padding"]);n.Transition.cancel(e),t.forEach(n.Transition.cancel),S(e),s(),t=t.concat(n.children(e).filter(f=>!n.includes(t,f))),Promise.resolve().then(()=>{n.fastdom.flush();const f=n.css(e,["height","padding"]),[d,p]=z(e,t,c);t.forEach((i,h)=>p[h]&&n.css(i,p[h])),n.css(e,{display:"block",...a}),requestAnimationFrame(()=>{const i=t.map((h,m)=>n.parent(h)===e&&n.Transition.start(h,d[m],o,"ease")).concat(n.Transition.start(e,f,o,"ease"));Promise.all(i).then(()=>{t.forEach((h,m)=>n.parent(h)===e&&n.css(h,"display",d[m].opacity===0?"none":"")),S(e)},n.noop).then(r)})})}))}function F(s,e){const o=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?n.index(s):o,...$(s)}:!1}function z(s,e,o){const r=e.map((c,a)=>n.parent(c)&&a in o?o[a]?n.isVisible(c)?$(c):{opacity:0}:{opacity:n.isVisible(c)?1:0}:!1),t=r.map((c,a)=>{const f=n.parent(e[a])===s&&(o[a]||F(e[a]));if(!f)return!1;if(!c)delete f.opacity;else if(!("opacity"in c)){const{opacity:d}=f;d%1?c.opacity=1:delete f.opacity}return f});return[r,t]}function S(s){n.css(s.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),n.css(s,{height:"",display:"",padding:""})}function $(s){const{height:e,width:o}=n.offset(s),{top:r,left:t}=n.position(s),{marginLeft:c,marginTop:a}=n.css(s,["marginTop","marginLeft"]);return{top:r,left:t,height:e,width:o,marginLeft:c,marginTop:a,transform:""}}var B={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e){e===void 0&&(e=this.$el);const o=this.animation;return(o==="fade"?w:o==="delayed-fade"?function(){for(var t=arguments.length,c=new Array(t),a=0;a<t;a++)c[a]=arguments[a];return w(...c,40)}:o?L:()=>(s(),Promise.resolve()))(s,e,this.duration).then(()=>this.$update(e,"resize"),n.noop)}}},b={mixins:[B],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get(s,e){let{attrItem:o}=s;return n.$$("["+o+"],[data-"+o+"]",e)},watch(){if(this.updateState(),this.selActive!==!1){const s=n.$$(this.selActive,this.$el);this.toggles.forEach(e=>n.toggleClass(e,this.cls,n.includes(s,e)))}},immediate:!0},children:{get(s,e){let{target:o}=s;return n.$$(o+" > *",e)},watch(s,e){e&&!H(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler(s){s.preventDefault(),this.apply(s.current)}}],methods:{apply(s){const e=this.getState(),o=E(s,this.attrItem,this.getState());V(e,o)||this.setState(o)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>E(e,this.attrItem,s),{filter:{"":""},sort:[]})},async setState(s,e){e===void 0&&(e=!0),s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(o=>n.toggleClass(o,this.cls,!!O(o,this.attrItem,s))),await Promise.all(n.$$(this.target,this.$el).map(o=>{const r=()=>{N(s,o,n.children(o)),this.$update(this.$el)};return e?this.animate(r,o):r()})),n.trigger(this.$el,"afterFilter",[this])},updateState(){n.fastdom.write(()=>this.setState(this.getState(),!1))}}};function P(s,e){return n.parseOptions(n.data(s,e),["filter"])}function V(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function N(s,e,o){const r=j(s);o.forEach(a=>n.css(a,"display",r&&!n.matches(a,r)?"none":""));const[t,c]=s.sort;if(t){const a=D(o,t,c);n.isEqual(a,o)||n.append(e,a)}}function E(s,e,o){const r=P(s,e),{filter:t,group:c,sort:a,order:f="asc"}=r;return(t||n.isUndefined(a))&&(c?t?(delete o.filter[""],o.filter[c]=t):(delete o.filter[c],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),n.isUndefined(a)||(o.sort=[a,f]),o}function O(s,e,o){let{filter:r={"":""},sort:[t,c]}=o;const{filter:a="",group:f="",sort:d,order:p="asc"}=P(s,e);return n.isUndefined(d)?f in r&&a===r[f]||!a&&f&&!(f in r)&&!r[""]:t===d&&c===p}function H(s,e){return s.length===e.length&&s.every(o=>e.includes(o))}function j(s){let{filter:e}=s,o="";return n.each(e,r=>o+=r||""),o}function D(s,e,o){return[...s].sort((r,t)=>n.data(r,e).localeCompare(n.data(t,e),void 0,{numeric:!0})*(o==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",b),b});
1
+ /*! UIkit 3.14.4-dev.eb440d70c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],l):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=l(n.UIkit.util))})(this,function(n){"use strict";function l(s){return A(s,"top","bottom")}function A(s,e,o){const r=[[]];for(const t of s){if(!n.isVisible(t))continue;let c=u(t);for(let a=r.length-1;a>=0;a--){const f=r[a];if(!f[0]){f.push(t);break}let d;if(f[0].offsetParent===t.offsetParent?d=u(f[0]):(c=u(t,!0),d=u(f[0],!0)),c[e]>=d[o]-1&&c[e]!==d[e]){r.push([t]);break}if(c[o]-1>d[e]||c[e]===d[e]){f.push(t);break}if(a===0){r.unshift([t]);break}}}return r}function u(s,e){e===void 0&&(e=!1);let{offsetTop:o,offsetLeft:r,offsetHeight:t,offsetWidth:c}=s;return e&&([o,r]=n.offsetPosition(s)),{top:o,left:r,bottom:o+t,right:r+c}}const g="uk-transition-leave",v="uk-transition-enter";function w(s,e,o,r){r===void 0&&(r=0);const t=y(e,!0),c={opacity:1},a={opacity:0},f=i=>()=>t===y(e)?i():Promise.reject(),d=f(()=>(n.addClass(e,g),Promise.all(I(e).map((i,h)=>new Promise(m=>setTimeout(()=>n.Transition.start(i,a,o/2,"ease").then(m),h*r)))).then(()=>n.removeClass(e,g)))),p=f(()=>{const i=n.height(e);return n.addClass(e,v),s(),n.css(n.children(e),{opacity:0}),new Promise(h=>requestAnimationFrame(()=>{const m=n.children(e),C=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,i);const x=I(e);n.css(m,a);const q=x.map((W,M)=>new Promise(R=>setTimeout(()=>n.Transition.start(W,c,o/2,"ease").then(R),M*r)));i!==C&&q.push(n.Transition.start(e,{height:C},o/2+x.length*r,"ease")),Promise.all(q).then(()=>{n.removeClass(e,v),t===y(e)&&(n.css(e,{height:"",alignContent:""}),n.css(m,{opacity:""}),delete e.dataset.transition),h()})}))});return n.hasClass(e,g)?T(e).then(p):n.hasClass(e,v)?T(e).then(d).then(p):d().then(p)}function y(s,e){return e&&(s.dataset.transition=1+y(s)),n.toNumber(s.dataset.transition)||0}function T(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(o=>n.once(e,"transitionend transitioncanceled",o))))}function I(s){return l(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(r=>n.isInView(r)),"offsetLeft")),[])}function L(s,e,o){return new Promise(r=>requestAnimationFrame(()=>{let t=n.children(e);const c=t.map(f=>F(f,!0)),a=n.css(e,["height","padding"]);n.Transition.cancel(e),t.forEach(n.Transition.cancel),S(e),s(),t=t.concat(n.children(e).filter(f=>!n.includes(t,f))),Promise.resolve().then(()=>{n.fastdom.flush();const f=n.css(e,["height","padding"]),[d,p]=z(e,t,c);t.forEach((i,h)=>p[h]&&n.css(i,p[h])),n.css(e,{display:"block",...a}),requestAnimationFrame(()=>{const i=t.map((h,m)=>n.parent(h)===e&&n.Transition.start(h,d[m],o,"ease")).concat(n.Transition.start(e,f,o,"ease"));Promise.all(i).then(()=>{t.forEach((h,m)=>n.parent(h)===e&&n.css(h,"display",d[m].opacity===0?"none":"")),S(e)},n.noop).then(r)})})}))}function F(s,e){const o=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?n.index(s):o,...$(s)}:!1}function z(s,e,o){const r=e.map((c,a)=>n.parent(c)&&a in o?o[a]?n.isVisible(c)?$(c):{opacity:0}:{opacity:n.isVisible(c)?1:0}:!1),t=r.map((c,a)=>{const f=n.parent(e[a])===s&&(o[a]||F(e[a]));if(!f)return!1;if(!c)delete f.opacity;else if(!("opacity"in c)){const{opacity:d}=f;d%1?c.opacity=1:delete f.opacity}return f});return[r,t]}function S(s){n.css(s.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),n.css(s,{height:"",display:"",padding:""})}function $(s){const{height:e,width:o}=n.offset(s),{top:r,left:t}=n.position(s),{marginLeft:c,marginTop:a}=n.css(s,["marginTop","marginLeft"]);return{top:r,left:t,height:e,width:o,marginLeft:c,marginTop:a,transform:""}}var B={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e){e===void 0&&(e=this.$el);const o=this.animation;return(o==="fade"?w:o==="delayed-fade"?function(){for(var t=arguments.length,c=new Array(t),a=0;a<t;a++)c[a]=arguments[a];return w(...c,40)}:o?L:()=>(s(),Promise.resolve()))(s,e,this.duration).then(()=>this.$update(e,"resize"),n.noop)}}},b={mixins:[B],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get(s,e){let{attrItem:o}=s;return n.$$("["+o+"],[data-"+o+"]",e)},watch(){if(this.updateState(),this.selActive!==!1){const s=n.$$(this.selActive,this.$el);this.toggles.forEach(e=>n.toggleClass(e,this.cls,n.includes(s,e)))}},immediate:!0},children:{get(s,e){let{target:o}=s;return n.$$(o+" > *",e)},watch(s,e){e&&!H(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler(s){s.preventDefault(),this.apply(s.current)}}],methods:{apply(s){const e=this.getState(),o=E(s,this.attrItem,this.getState());V(e,o)||this.setState(o)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>E(e,this.attrItem,s),{filter:{"":""},sort:[]})},async setState(s,e){e===void 0&&(e=!0),s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(o=>n.toggleClass(o,this.cls,!!O(o,this.attrItem,s))),await Promise.all(n.$$(this.target,this.$el).map(o=>{const r=()=>{N(s,o,n.children(o)),this.$update(this.$el)};return e?this.animate(r,o):r()})),n.trigger(this.$el,"afterFilter",[this])},updateState(){n.fastdom.write(()=>this.setState(this.getState(),!1))}}};function P(s,e){return n.parseOptions(n.data(s,e),["filter"])}function V(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function N(s,e,o){const r=j(s);o.forEach(a=>n.css(a,"display",r&&!n.matches(a,r)?"none":""));const[t,c]=s.sort;if(t){const a=D(o,t,c);n.isEqual(a,o)||n.append(e,a)}}function E(s,e,o){const r=P(s,e),{filter:t,group:c,sort:a,order:f="asc"}=r;return(t||n.isUndefined(a))&&(c?t?(delete o.filter[""],o.filter[c]=t):(delete o.filter[c],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),n.isUndefined(a)||(o.sort=[a,f]),o}function O(s,e,o){let{filter:r={"":""},sort:[t,c]}=o;const{filter:a="",group:f="",sort:d,order:p="asc"}=P(s,e);return n.isUndefined(d)?f in r&&a===r[f]||!a&&f&&!(f in r)&&!r[""]:t===d&&c===p}function H(s,e){return s.length===e.length&&s.every(o=>e.includes(o))}function j(s){let{filter:e}=s,o="";return n.each(e,r=>o+=r||""),o}function D(s,e,o){return[...s].sort((r,t)=>n.data(r,e).localeCompare(n.data(t,e),void 0,{numeric:!0})*(o==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",b),b});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.e2919bbf7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.eb440d70c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -110,27 +110,7 @@
110
110
  origin: false,
111
111
  transition: 'ease',
112
112
  clsEnter: 'uk-togglabe-enter',
113
- clsLeave: 'uk-togglabe-leave',
114
-
115
- initProps: {
116
- overflow: '',
117
- maxHeight: '',
118
- paddingTop: '',
119
- paddingBottom: '',
120
- marginTop: '',
121
- marginBottom: '',
122
- boxShadow: '' },
123
-
124
-
125
- hideProps: {
126
- overflow: 'hidden',
127
- maxHeight: 0,
128
- paddingTop: 0,
129
- paddingBottom: 0,
130
- marginTop: 0,
131
- marginBottom: 0,
132
- boxShadow: 'none' } },
133
-
113
+ clsLeave: 'uk-togglabe-leave' },
134
114
 
135
115
 
136
116
  computed: {
@@ -139,7 +119,7 @@
139
119
  },
140
120
 
141
121
  hasTransition(_ref2) {let { animation } = _ref2;
142
- return uikitUtil.startsWith(animation[0], 'slide');
122
+ return ['slide', 'reveal'].some((transition) => uikitUtil.startsWith(animation[0], transition));
143
123
  } },
144
124
 
145
125
 
@@ -232,122 +212,105 @@
232
212
  };
233
213
  }
234
214
 
235
- function toggleTransition(cmp) {
236
- switch (cmp.animation[0]) {
237
- case 'slide-left':
238
- return slideHorizontal(cmp);
239
- case 'slide-right':
240
- return slideHorizontal(cmp, true);}
215
+ function toggleTransition(cmp) {var _cmp$animation$;
216
+ const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
241
217
 
242
- return slide(cmp);
243
- }
218
+ const dirs = [
219
+ ['left', 'right'],
220
+ ['top', 'bottom']];
244
221
 
245
- function slide(_ref4)
222
+ const dir = dirs[uikitUtil.includes(dirs[0], startProp) ? 0 : 1];
223
+ const end = dir[1] === startProp;
224
+ const props = ['width', 'height'];
225
+ const dimProp = props[dirs.indexOf(dir)];
226
+ const marginProp = "margin-" + dir[0];
227
+ const marginStartProp = "margin-" + startProp;
246
228
 
229
+ return async (el, show) => {
230
+ let { duration, velocity, transition, _toggle } = cmp;
247
231
 
232
+ let currentDim = uikitUtil.dimensions(el)[dimProp];
248
233
 
249
-
250
-
251
-
252
-
253
- {let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
254
- return (el, show) => {
255
234
  const inProgress = uikitUtil.Transition.inProgress(el);
256
- const inner =
257
- !inProgress && el.hasChildNodes() ?
258
- uikitUtil.toFloat(uikitUtil.css(el.firstElementChild, 'marginTop')) +
259
- uikitUtil.toFloat(uikitUtil.css(el.lastElementChild, 'marginBottom')) :
260
- 0;
261
- const currentHeight = uikitUtil.isVisible(el) ? uikitUtil.toFloat(uikitUtil.css(el, 'height')) + inner : 0;
235
+ await uikitUtil.Transition.cancel(el);
262
236
 
263
- const props = inProgress ? uikitUtil.css(el, Object.keys(initProps)) : show ? hideProps : initProps;
264
-
265
- uikitUtil.Transition.cancel(el);
266
-
267
- if (!isToggled(el)) {
237
+ if (show) {
268
238
  _toggle(el, true);
269
239
  }
270
240
 
271
- uikitUtil.css(el, 'maxHeight', '');
272
-
273
- // Update child components first
274
- uikitUtil.fastdom.flush();
275
-
276
- const endHeight = uikitUtil.toFloat(uikitUtil.css(el, 'height')) + inner;
277
- duration = velocity * endHeight + duration;
278
-
279
- uikitUtil.css(el, { ...props, maxHeight: currentHeight });
280
-
281
- return (
282
- show ?
283
- uikitUtil.Transition.start(
284
- el,
285
- { ...initProps, overflow: 'hidden', maxHeight: endHeight },
286
- duration * (1 - currentHeight / endHeight),
287
- transition) :
288
-
289
- uikitUtil.Transition.start(
290
- el,
291
- hideProps,
292
- duration * (currentHeight / endHeight),
293
- transition).
294
- then(() => _toggle(el, false))).
295
- then(() => uikitUtil.css(el, initProps));
296
- };
297
- }
298
-
299
- function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
300
- return (el, show) => {
301
- const visible = uikitUtil.isVisible(el);
302
- const marginLeft = uikitUtil.toFloat(uikitUtil.css(el, 'marginLeft'));
303
-
304
- uikitUtil.Transition.cancel(el);
305
-
306
- const [scrollElement] = uikitUtil.scrollParents(el.offsetParent);
307
- uikitUtil.css(scrollElement, 'overflowX', 'hidden');
308
-
309
- if (!isToggled(el)) {
310
- _toggle(el, true);
241
+ const prevProps = Object.fromEntries(
242
+ [
243
+ 'padding',
244
+ 'border',
245
+ 'width',
246
+ 'height',
247
+ 'overflowY',
248
+ 'overflowX',
249
+ marginProp,
250
+ marginStartProp].
251
+ map((key) => [key, el.style[key]]));
252
+
253
+
254
+ const dim = uikitUtil.dimensions(el);
255
+ const currentMargin = uikitUtil.toFloat(uikitUtil.css(el, marginProp));
256
+ const marginStart = uikitUtil.toFloat(uikitUtil.css(el, marginStartProp));
257
+ const endDim = dim[dimProp] + marginStart;
258
+
259
+ if (!inProgress && !show) {
260
+ currentDim += marginStart;
311
261
  }
312
262
 
313
- const width = uikitUtil.toFloat(uikitUtil.css(el, 'width'));
314
- duration = velocity * width + duration;
263
+ const [wrapper] = uikitUtil.wrapInner(el, '<div>');
264
+ uikitUtil.css(wrapper, {
265
+ boxSizing: 'border-box',
266
+ height: dim.height,
267
+ width: dim.width,
268
+ ...uikitUtil.css(el, [
269
+ 'overflow',
270
+ 'padding',
271
+ 'borderTop',
272
+ 'borderRight',
273
+ 'borderBottom',
274
+ 'borderLeft',
275
+ 'borderImage',
276
+ marginStartProp]) });
277
+
315
278
 
316
- const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
317
279
 
318
280
  uikitUtil.css(el, {
319
- clipPath: right ? "polygon(0 0," +
320
- percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
321
- 100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)",
322
- marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
281
+ padding: 0,
282
+ border: 0,
283
+ [marginStartProp]: 0,
284
+ width: dim.width,
285
+ height: dim.height,
286
+ overflow: 'hidden',
287
+ [dimProp]: currentDim });
323
288
 
324
289
 
325
- return (
326
- show ?
327
- uikitUtil.Transition.start(
328
- el,
329
- {
330
- clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
331
- marginLeft: 0 },
290
+ const percent = currentDim / endDim;
291
+ duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
292
+ const endProps = { [dimProp]: show ? endDim : 0 };
332
293
 
333
- duration * (1 - percent / 100),
334
- transition) :
335
-
336
- uikitUtil.Transition.start(
337
- el,
338
- {
339
- clipPath: right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)",
294
+ if (end) {
295
+ uikitUtil.css(el, marginProp, endDim - currentDim + currentMargin);
296
+ endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
297
+ }
340
298
 
299
+ if (!end ^ mode === 'reveal') {
300
+ uikitUtil.css(wrapper, marginProp, -endDim + currentDim);
301
+ uikitUtil.Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
302
+ }
341
303
 
342
- marginLeft: (right ? 1 : -1) * width },
304
+ try {
305
+ await uikitUtil.Transition.start(el, endProps, duration, transition);
306
+ } finally {
307
+ uikitUtil.css(el, prevProps);
308
+ uikitUtil.unwrap(wrapper.firstChild);
343
309
 
344
- duration * (percent / 100),
345
- transition).
346
- then(() => _toggle(el, false))).
347
- then(() => {
348
- uikitUtil.css(scrollElement, 'overflowX', '');
349
- uikitUtil.css(el, { clipPath: '', marginLeft: '' });
350
- });
310
+ if (!show) {
311
+ _toggle(el, false);
312
+ }
313
+ }
351
314
  };
352
315
  }
353
316
 
@@ -477,8 +440,8 @@
477
440
 
478
441
 
479
442
  if (this.overlay) {
480
- uikitUtil.once(this.$el, 'hide', preventOverscroll(this.$el));
481
- uikitUtil.once(this.$el, 'hide', preventBackgroundScroll());
443
+ uikitUtil.once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
444
+ uikitUtil.once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
482
445
  }
483
446
 
484
447
  if (this.stack) {
@@ -560,10 +523,6 @@
560
523
  active.splice(active.indexOf(this), 1);
561
524
  }
562
525
 
563
- if (!active.length) {
564
- uikitUtil.css(document.body, 'overflowY', '');
565
- }
566
-
567
526
  uikitUtil.css(this.$el, 'zIndex', '');
568
527
 
569
528
  if (!active.some((modal) => modal.clsPage === this.clsPage)) {
@@ -680,16 +639,22 @@
680
639
  return () => events.forEach((fn) => fn());
681
640
  }
682
641
 
642
+ let prevented;
683
643
  function preventBackgroundScroll() {
684
- const { body, documentElement } = document;
685
- uikitUtil.css(body, {
686
- overflowY: uikitUtil.width(window) > documentElement.clientWidth ? 'scroll' : '',
687
- touchAction: 'none' });
644
+ if (prevented) {
645
+ return uikitUtil.noop;
646
+ }
647
+ prevented = true;
648
+
649
+ const { scrollingElement } = document;
650
+ uikitUtil.css(scrollingElement, {
651
+ overflowY: 'hidden',
652
+ touchAction: 'none',
653
+ paddingRight: uikitUtil.width(window) - scrollingElement.clientWidth });
688
654
 
689
- uikitUtil.css(documentElement, 'overflowY', 'hidden');
690
655
  return () => {
691
- uikitUtil.css(documentElement, 'overflowY', '');
692
- uikitUtil.css(body, { overflowY: '', touchAction: '' });
656
+ prevented = false;
657
+ uikitUtil.css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
693
658
  };
694
659
  }
695
660
 
@@ -1 +1 @@
1
- /*! UIkit 3.14.4-dev.e2919bbf7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=u(s.UIkit.util))})(this,function(s){"use strict";var u={slide:{show(e){return[{transform:x(e*-100)},{transform:x()}]},percent(e){return N(e)},translate(e,t){return[{transform:x(t*-100*e)},{transform:x(t*100*(1-e))}]}}};function N(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function x(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function y(e){return"scale3d("+e+", "+e+", 1)"}var T={...u,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:y(1-.2)},{opacity:1,transform:y(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:y(1-.2*e)},{opacity:e,transform:y(1-.2+.2*e)}]}}},A={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},D={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},P={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",maxHeight:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",maxHeight:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},computed:{hasAnimation(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return s.startsWith(t[0],"slide")}},methods:{toggleElement(e,t,n){return new Promise(o=>Promise.all(s.toNodes(e).map(r=>{const i=s.isBoolean(t)?t:!this.isToggled(r);if(!s.trigger(r,"before"+(i?"show":"hide"),[this]))return Promise.reject();const d=(s.isFunction(n)?n:n===!1||!this.hasAnimation?B(this):this.hasTransition?z(this):O(this))(r,i),a=i?this.clsEnter:this.clsLeave;s.addClass(r,a),s.trigger(r,i?"show":"hide",[this]);const h=()=>{s.removeClass(r,a),s.trigger(r,i?"shown":"hidden",[this]),this.$update(r)};return d?d.then(h,()=>(s.removeClass(r,a),Promise.reject())):h()})).then(o,s.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(o=>s.isVisible(o)?o.focus()||!0:o.blur()),n&&(s.trigger(e,"toggled",[t,this]),this.$update(e))}}};function B(e){let{_toggle:t}=e;return(n,o)=>(s.Animation.cancel(n),s.Transition.cancel(n),t(n,o))}function z(e){switch(e.animation[0]){case"slide-left":return _(e);case"slide-right":return _(e,!0)}return H(e)}function H(e){let{isToggled:t,duration:n,velocity:o,initProps:r,hideProps:i,transition:d,_toggle:a}=e;return(h,l)=>{const m=s.Transition.inProgress(h),g=!m&&h.hasChildNodes()?s.toFloat(s.css(h.firstElementChild,"marginTop"))+s.toFloat(s.css(h.lastElementChild,"marginBottom")):0,c=s.isVisible(h)?s.toFloat(s.css(h,"height"))+g:0,p=m?s.css(h,Object.keys(r)):l?i:r;s.Transition.cancel(h),t(h)||a(h,!0),s.css(h,"maxHeight",""),s.fastdom.flush();const v=s.toFloat(s.css(h,"height"))+g;return n=o*v+n,s.css(h,{...p,maxHeight:c}),(l?s.Transition.start(h,{...r,overflow:"hidden",maxHeight:v},n*(1-c/v),d):s.Transition.start(h,i,n*(c/v),d).then(()=>a(h,!1))).then(()=>s.css(h,r))}}function _(e,t){let{isToggled:n,duration:o,velocity:r,transition:i,_toggle:d}=e;return(a,h)=>{const l=s.isVisible(a),m=s.toFloat(s.css(a,"marginLeft"));s.Transition.cancel(a);const[g]=s.scrollParents(a.offsetParent);s.css(g,"overflowX","hidden"),n(a)||d(a,!0);const c=s.toFloat(s.css(a,"width"));o=r*c+o;const p=l?(c+m*(t?-1:1))/c*100:0;return s.css(a,{clipPath:t?"polygon(0 0,"+p+"% 0,"+p+"% 100%,0 100%)":"polygon("+(100-p)+"% 0,100% 0,100% 100%,"+(100-p)+"% 100%)",marginLeft:(100-p)*(t?1:-1)/100*c}),(h?s.Transition.start(a,{clipPath:"polygon(0 0,100% 0,100% 100%,0 100%)",marginLeft:0},o*(1-p/100),i):s.Transition.start(a,{clipPath:t?"polygon(0 0,0 0,0 100%,0 100%)":"polygon(100% 0,100% 0,100% 100%,100% 100%)",marginLeft:(t?1:-1)*c},o*(p/100),i).then(()=>d(a,!1))).then(()=>{s.css(g,"overflowX",""),s.css(a,{clipPath:"",marginLeft:""})})}}function O(e){return(t,n)=>{s.Animation.cancel(t);const{animation:o,duration:r,_toggle:i}=e;return n?(i(t,!0),s.Animation.in(t,o[0],r,e.origin)):s.Animation.out(t,o[1]||o[0],r,e.origin).then(()=>i(t,!1))}}const f=[];var j={mixins:[D,A,P],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,t){let{selPanel:n}=e;return s.$(n,t)},transitionElement(){return this.panel},bgClose(e){let{bgClose:t}=e;return t&&this.panel}},beforeDisconnect(){s.includes(f,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(f,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(f,this))return!1;!this.stack&&f.length?(Promise.all(f.map(t=>t.hide())).then(this.show),e.preventDefault()):f.push(this)}},{name:"show",self:!0,handler(){s.once(this.$el,"hide",s.on(document,"focusin",e=>{s.last(f)===this&&!s.within(e.target,this.$el)&&this.$el.focus()})),this.overlay&&(s.once(this.$el,"hide",F(this.$el)),s.once(this.$el,"hide",M())),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+f.length),s.addClass(document.documentElement,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,e=>{let{target:t}=e;s.last(f)!==this||this.overlay&&!s.within(t,this.$el)||s.within(t,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",n=>{let{defaultPrevented:o,type:r,target:i}=n;!o&&r===s.pointerUp&&t===i&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",e=>{e.keyCode===27&&s.last(f)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(f,this)&&f.splice(f.indexOf(this),1),f.length||s.css(document.body,"overflowY",""),s.css(this.$el,"zIndex",""),f.some(e=>e.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,E(this))},hide(){return this.toggleElement(this.$el,!1,E(this))}}};function E(e){let{transitionElement:t,_toggle:n}=e;return(o,r)=>new Promise((i,d)=>s.once(o,"show hide",()=>{o._reject==null||o._reject(),o._reject=d,n(o,r);const a=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",i,{self:!0}),clearTimeout(h)},{self:!0}),h=setTimeout(()=>{a(),i()},L(s.css(t,"transitionDuration")))})).then(()=>delete o._reject)}function L(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}function F(e){if(CSS.supports("overscroll-behavior","contain")){const o=W(e,r=>/auto|scroll/.test(s.css(r,"overflow")));return s.css(o,"overscrollBehavior","contain"),()=>s.css(o,"overscrollBehavior","")}let t;const n=[s.on(e,"touchstart",o=>{let{targetTouches:r}=o;r.length===1&&(t=r[0].clientY)},{passive:!0}),s.on(e,"touchmove",o=>{if(o.targetTouches.length!==1)return;let[r]=s.scrollParents(o.target,/auto|scroll/);s.within(r,e)||(r=e);const i=o.targetTouches[0].clientY-t,{scrollTop:d,scrollHeight:a,clientHeight:h}=r;(h>=a||d===0&&i>0||a-d<=h&&i<0)&&o.cancelable&&o.preventDefault()},{passive:!1})];return()=>n.forEach(o=>o())}function M(){const{body:e,documentElement:t}=document;return s.css(e,{overflowY:s.width(window)>t.clientWidth?"scroll":"",touchAction:"none"}),s.css(t,"overflowY","hidden"),()=>{s.css(t,"overflowY",""),s.css(e,{overflowY:"",touchAction:""})}}function W(e,t){const n=[];return s.apply(e,o=>{t(o)&&n.push(o)}),n}function Y(e,t,n,o){let{animation:r,easing:i}=o;const{percent:d,translate:a,show:h=s.noop}=r,l=h(n),m=new s.Deferred;return{dir:n,show(g,c,p){c===void 0&&(c=0);const v=p?"linear":i;return g-=Math.round(g*s.clamp(c,-1,1)),this.translate(c),I(t,"itemin",{percent:c,duration:g,timing:v,dir:n}),I(e,"itemout",{percent:1-c,duration:g,timing:v,dir:n}),Promise.all([s.Transition.start(t,l[1],g,v),s.Transition.start(e,l[0],g,v)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const g in l[0])s.css([t,e],g,"")},forward(g,c){return c===void 0&&(c=this.percent()),s.Transition.cancel([t,e]),this.show(g,c,!0)},translate(g){this.reset();const c=a(g,n);s.css(t,c[1]),s.css(e,c[0]),I(t,"itemtranslatein",{percent:g,dir:n}),I(e,"itemtranslateout",{percent:1-g,dir:n})},percent(){return d(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function I(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var R={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},V={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}};const w={passive:!1,capture:!0},q="touchstart mousedown",$="touchmove mousemove",C="touchend touchcancel mouseup click input";var X={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const o=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=o===this.pos?this.prevPos:this.pos,this.pos=o,t(n)}}},events:[{name:q,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&G(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:$+" "+C,el(){return this.list},handler:s.noop,...w}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,$,this.move,w),s.on(document,C,this.end,w),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:o}=this,r=Math.abs(t),i=this.getIndex(o+this.dir,o),d=this._getDistance(o,i)||n[o].offsetWidth;for(;i!==o&&r>d;)this.drag-=d*this.dir,o=i,r-=d,i=this.getIndex(o+this.dir,o),d=this._getDistance(o,i)||n[o].offsetWidth;this.percent=r/d;const a=n[o],h=n[i],l=this.index!==i,m=o===i;let g;[this.index,this.prevIndex].filter(c=>!s.includes([i,o],c)).forEach(c=>{s.trigger(n[c],"itemhidden",[this]),m&&(g=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||g)&&s.trigger(n[this.index],"itemshown",[this]),l&&(this.prevIndex=o,this.index=i,!m&&s.trigger(a,"beforeitemhide",[this]),s.trigger(h,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!m&&h),l&&(!m&&s.trigger(a,"itemhide",[this]),s.trigger(h,"itemshow",[this]))},end(){if(s.off(document,$,this.move,w),s.off(document,C,this.end,w),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function G(e){return!e.children.length&&e.childNodes.length}var J={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},K={mixins:[V,X,J,R],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return Z(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,o=t?0:n.length,r=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const i=this.getIndex(this.index),d=s.hasClass(this.slides,this.clsActive)&&this.slides[i],a=this.getIndex(e,this.index),h=this.slides[a];if(d===h){r();return}if(this.dir=Q(e,i),this.prevIndex=i,this.index=a,d&&!s.trigger(d,"beforeitemhide",[this])||!s.trigger(h,"beforeitemshow",[this,d])){this.index=this.prevIndex,r();return}const l=this._show(d,h,t).then(()=>(d&&s.trigger(d,"itemhidden",[this]),s.trigger(h,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return d&&s.trigger(d,"itemhide",[this]),s.trigger(h,"itemshow",[this]),l},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:o}=this.stack;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const o=this._getTransitioner(t!==n?t:!1,n);return o.translate(e),o},_getTransitioner(e,t,n,o){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),o===void 0&&(o=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),o)}}};function Q(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function Z(e){return .5*e+300}var k={mixins:[K],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:Y},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},S={mixins:[A,j,P,k],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:T,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption(e,t){let{selCaption:n}=e;return s.$(n,t)}},events:[{name:s.pointerMove+" "+s.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=T.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:o,alt:r="",poster:i,attrs:d={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let a;const h={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||n.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))try{const{width:l,height:m}=await s.getImage(n,d.srcset,d.size);this.setItem(t,b("img",{src:n,width:l,height:m,alt:r,...d}))}catch{this.setError(t)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const l=b("video",{src:n,poster:i,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...d});s.on(l,"loadedmetadata",()=>{s.attr(l,{width:l.videoWidth,height:l.videoHeight}),this.setItem(t,l)}),s.on(l,"error",()=>this.setError(t))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,b("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...d}));else if(a=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,b("iframe",{src:"https://www.youtube"+(a[1]||"")+".com/embed/"+a[2]+(a[3]?"?"+a[3]:""),width:1920,height:1080,...h,...d}));else if(a=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:l,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,b("iframe",{src:"https://player.vimeo.com/video/"+a[1]+(a[2]?"?"+a[2]:""),width:m,height:l,...h,...d}))}catch{this.setError(t)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e){return e===void 0&&(e=this.index),this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function b(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",S),S});
1
+ /*! UIkit 3.14.4-dev.eb440d70c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=u(s.UIkit.util))})(this,function(s){"use strict";var u={slide:{show(e){return[{transform:$(e*-100)},{transform:$()}]},percent(e){return H(e)},translate(e,t){return[{transform:$(t*-100*e)},{transform:$(t*100*(1-e))}]}}};function H(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function $(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function C(e){return"scale3d("+e+", "+e+", 1)"}var D={...u,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:C(1-.2)},{opacity:1,transform:C(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:C(1-.2*e)},{opacity:e,transform:C(1-.2+.2*e)}]}}},N={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},Y={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},B={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return["slide","reveal"].some(n=>s.startsWith(t[0],n))}},methods:{toggleElement(e,t,n){return new Promise(r=>Promise.all(s.toNodes(e).map(o=>{const a=s.isBoolean(t)?t:!this.isToggled(o);if(!s.trigger(o,"before"+(a?"show":"hide"),[this]))return Promise.reject();const i=(s.isFunction(n)?n:n===!1||!this.hasAnimation?q(this):this.hasTransition?V(this):X(this))(o,a),d=a?this.clsEnter:this.clsLeave;s.addClass(o,d),s.trigger(o,a?"show":"hide",[this]);const l=()=>{s.removeClass(o,d),s.trigger(o,a?"shown":"hidden",[this]),this.$update(o)};return i?i.then(l,()=>(s.removeClass(o,d),Promise.reject())):l()})).then(r,s.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(r=>s.isVisible(r)?r.focus()||!0:r.blur()),n&&(s.trigger(e,"toggled",[t,this]),this.$update(e))}}};function q(e){let{_toggle:t}=e;return(n,r)=>(s.Animation.cancel(n),s.Transition.cancel(n),t(n,r))}function V(e){var t;const[n="reveal",r="top"]=((t=e.animation[0])==null?void 0:t.split("-"))||[],o=[["left","right"],["top","bottom"]],a=o[s.includes(o[0],r)?0:1],i=a[1]===r,l=["width","height"][o.indexOf(a)],c="margin-"+a[0],m="margin-"+r;return async(h,g)=>{let{duration:v,velocity:w,transition:j,_toggle:M}=e,I=s.dimensions(h)[l];const de=s.Transition.inProgress(h);await s.Transition.cancel(h),g&&M(h,!0);const ce=Object.fromEntries(["padding","border","width","height","overflowY","overflowX",c,m].map(F=>[F,h.style[F]])),y=s.dimensions(h),E=s.toFloat(s.css(h,c)),R=s.toFloat(s.css(h,m)),p=y[l]+R;!de&&!g&&(I+=R);const[A]=s.wrapInner(h,"<div>");s.css(A,{boxSizing:"border-box",height:y.height,width:y.width,...s.css(h,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",m])}),s.css(h,{padding:0,border:0,[m]:0,width:y.width,height:y.height,overflow:"hidden",[l]:I});const W=I/p;v=(w*p+v)*(g?1-W:W);const L={[l]:g?p:0};i&&(s.css(h,c,p-I+E),L[c]=g?E:p+E),!i^n==="reveal"&&(s.css(A,c,-p+I),s.Transition.start(A,{[c]:g?0:-p},v,j));try{await s.Transition.start(h,L,v,j)}finally{s.css(h,ce),s.unwrap(A.firstChild),g||M(h,!1)}}}function X(e){return(t,n)=>{s.Animation.cancel(t);const{animation:r,duration:o,_toggle:a}=e;return n?(a(t,!0),s.Animation.in(t,r[0],o,e.origin)):s.Animation.out(t,r[1]||r[0],o,e.origin).then(()=>a(t,!1))}}const f=[];var G={mixins:[Y,N,B],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,t){let{selPanel:n}=e;return s.$(n,t)},transitionElement(){return this.panel},bgClose(e){let{bgClose:t}=e;return t&&this.panel}},beforeDisconnect(){s.includes(f,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(f,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(f,this))return!1;!this.stack&&f.length?(Promise.all(f.map(t=>t.hide())).then(this.show),e.preventDefault()):f.push(this)}},{name:"show",self:!0,handler(){s.once(this.$el,"hide",s.on(document,"focusin",e=>{s.last(f)===this&&!s.within(e.target,this.$el)&&this.$el.focus()})),this.overlay&&(s.once(this.$el,"hidden",K(this.$el),{self:!0}),s.once(this.$el,"hidden",Q(),{self:!0})),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+f.length),s.addClass(document.documentElement,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,e=>{let{target:t}=e;s.last(f)!==this||this.overlay&&!s.within(t,this.$el)||s.within(t,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",n=>{let{defaultPrevented:r,type:o,target:a}=n;!r&&o===s.pointerUp&&t===a&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",e=>{e.keyCode===27&&s.last(f)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(f,this)&&f.splice(f.indexOf(this),1),s.css(this.$el,"zIndex",""),f.some(e=>e.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,O(this))},hide(){return this.toggleElement(this.$el,!1,O(this))}}};function O(e){let{transitionElement:t,_toggle:n}=e;return(r,o)=>new Promise((a,i)=>s.once(r,"show hide",()=>{r._reject==null||r._reject(),r._reject=i,n(r,o);const d=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{d(),a()},J(s.css(t,"transitionDuration")))})).then(()=>delete r._reject)}function J(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}function K(e){if(CSS.supports("overscroll-behavior","contain")){const r=Z(e,o=>/auto|scroll/.test(s.css(o,"overflow")));return s.css(r,"overscrollBehavior","contain"),()=>s.css(r,"overscrollBehavior","")}let t;const n=[s.on(e,"touchstart",r=>{let{targetTouches:o}=r;o.length===1&&(t=o[0].clientY)},{passive:!0}),s.on(e,"touchmove",r=>{if(r.targetTouches.length!==1)return;let[o]=s.scrollParents(r.target,/auto|scroll/);s.within(o,e)||(o=e);const a=r.targetTouches[0].clientY-t,{scrollTop:i,scrollHeight:d,clientHeight:l}=o;(l>=d||i===0&&a>0||d-i<=l&&a<0)&&r.cancelable&&r.preventDefault()},{passive:!1})];return()=>n.forEach(r=>r())}let _;function Q(){if(_)return s.noop;_=!0;const{scrollingElement:e}=document;return s.css(e,{overflowY:"hidden",touchAction:"none",paddingRight:s.width(window)-e.clientWidth}),()=>{_=!1,s.css(e,{overflowY:"",touchAction:"",paddingRight:""})}}function Z(e,t){const n=[];return s.apply(e,r=>{t(r)&&n.push(r)}),n}function k(e,t,n,r){let{animation:o,easing:a}=r;const{percent:i,translate:d,show:l=s.noop}=o,c=l(n),m=new s.Deferred;return{dir:n,show(h,g,v){g===void 0&&(g=0);const w=v?"linear":a;return h-=Math.round(h*s.clamp(g,-1,1)),this.translate(g),T(t,"itemin",{percent:g,duration:h,timing:w,dir:n}),T(e,"itemout",{percent:1-g,duration:h,timing:w,dir:n}),Promise.all([s.Transition.start(t,c[1],h,w),s.Transition.start(e,c[0],h,w)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const h in c[0])s.css([t,e],h,"")},forward(h,g){return g===void 0&&(g=this.percent()),s.Transition.cancel([t,e]),this.show(h,g,!0)},translate(h){this.reset();const g=d(h,n);s.css(t,g[1]),s.css(e,g[0]),T(t,"itemtranslatein",{percent:h,dir:n}),T(e,"itemtranslateout",{percent:1-h,dir:n})},percent(){return i(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function T(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var U={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},ee={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}};const b={passive:!1,capture:!0},se="touchstart mousedown",P="touchmove mousemove",S="touchend touchcancel mouseup click input";var te={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const r=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,t(n)}}},events:[{name:se,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&ne(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:P+" "+S,el(){return this.list},handler:s.noop,...b}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,P,this.move,b),s.on(document,S,this.end,b),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:r}=this,o=Math.abs(t),a=this.getIndex(r+this.dir,r),i=this._getDistance(r,a)||n[r].offsetWidth;for(;a!==r&&o>i;)this.drag-=i*this.dir,r=a,o-=i,a=this.getIndex(r+this.dir,r),i=this._getDistance(r,a)||n[r].offsetWidth;this.percent=o/i;const d=n[r],l=n[a],c=this.index!==a,m=r===a;let h;[this.index,this.prevIndex].filter(g=>!s.includes([a,r],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),m&&(h=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||h)&&s.trigger(n[this.index],"itemshown",[this]),c&&(this.prevIndex=r,this.index=a,!m&&s.trigger(d,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),d,!m&&l),c&&(!m&&s.trigger(d,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,P,this.move,b),s.off(document,S,this.end,b),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function ne(e){return!e.children.length&&e.childNodes.length}var re={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},oe={mixins:[ee,te,re,U],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return ie(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,o=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),i=s.hasClass(this.slides,this.clsActive)&&this.slides[a],d=this.getIndex(e,this.index),l=this.slides[d];if(i===l){o();return}if(this.dir=ae(e,a),this.prevIndex=a,this.index=d,i&&!s.trigger(i,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,o();return}const c=this._show(i,l,t).then(()=>(i&&s.trigger(i,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&s.trigger(i,"itemhide",[this]),s.trigger(l,"itemshow",[this]),c},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:r}=this.stack;return this._transitioner[r>1?"forward":"show"](r>1?Math.min(this.duration,75+75/(r-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e,t,n,r){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),r===void 0&&(r=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),r)}}};function ae(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function ie(e){return .5*e+300}var he={mixins:[oe],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:k},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},z={mixins:[N,G,B,he],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:D,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption(e,t){let{selCaption:n}=e;return s.$(n,t)}},events:[{name:s.pointerMove+" "+s.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=D.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:r,alt:o="",poster:a,attrs:i={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let d;const l={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(r==="image"||n.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))try{const{width:c,height:m}=await s.getImage(n,i.srcset,i.size);this.setItem(t,x("img",{src:n,width:c,height:m,alt:o,...i}))}catch{this.setError(t)}else if(r==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=x("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...i});s.on(c,"loadedmetadata",()=>{s.attr(c,{width:c.videoWidth,height:c.videoHeight}),this.setItem(t,c)}),s.on(c,"error",()=>this.setError(t))}else if(r==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,x("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(d=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,x("iframe",{src:"https://www.youtube"+(d[1]||"")+".com/embed/"+d[2]+(d[3]?"?"+d[3]:""),width:1920,height:1080,...l,...i}));else if(d=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,x("iframe",{src:"https://player.vimeo.com/video/"+d[1]+(d[2]?"?"+d[2]:""),width:m,height:c,...l,...i}))}catch{this.setError(t)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e){return e===void 0&&(e=this.index),this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function x(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",z),z});