diff --git a/common/uikit-icons-max.js b/common/uikit-icons-max.js deleted file mode 100644 index 851b348..0000000 --- a/common/uikit-icons-max.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! UIkit 3.0.0-beta.22 | http://www.getuikit.com | (c) 2014 - 2017 YOOtheme | MIT License */ - -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("uikitmax",e):t.UIkitMax=e()}(this,function(){"use strict";function t(i){t.installed||i.icon.add(e)}var e={album:'',ban:'',behance:'',bell:'',bold:'',bolt:'',bookmark:'',calendar:'',camera:'',cart:'',check:'',clock:'',close:'',code:'',cog:'',comment:'',commenting:'',comments:'',copy:'',database:'',desktop:'',download:'',dribbble:'',expand:'',facebook:'',file:'',flickr:'',folder:'',forward:'',foursquare:'',future:'',github:'',gitter:'',google:'',grid:'',happy:'',hashtag:'',heart:'',history:'',home:'',image:'',info:'',instagram:'',italic:'',joomla:'',laptop:'',lifesaver:'',link:'',linkedin:'',list:'',location:'',lock:'',mail:'',menu:'',minus:'',more:'',move:'',nut:'',pagekit:'',pencil:'',phone:'',pinterest:'',play:'',plus:'',pull:'',push:'',question:'',receiver:'',refresh:'',reply:'',rss:'',search:'',server:'',settings:'',shrink:'', -social:'',soundcloud:'',star:'',strikethrough:'',table:'',tablet:'',tag:'',thumbnails:'',trash:'',tripadvisor:'',tumblr:'',tv:'',twitter:'',uikit:'',unlock:'',upload:'',user:'',users:'',vimeo:'',warning:'',whatsapp:'',wordpress:'',world:'',xing:'',yelp:'',youtube:'',totop:'',"arrow-down":'',"arrow-left":'',"arrow-right":'',"arrow-up":'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"cloud-download":'',"cloud-upload":'',"credit-card":'',"file-edit":'',"git-branch":'',"git-fork":'',"github-alt":'',"google-plus":'',"minus-circle":'',"more-vertical":'',"paint-bucket":'',"phone-landscape":'',"play-circle":'',"plus-circle":'',"quote-right":'',"sign-in":'',"sign-out":'',"tablet-landscape":'',"triangle-down":'',"triangle-left":'',"triangle-right":'',"triangle-up":'',"video-camera":''};return"undefined"!=typeof window&&window.UIkit&&window.UIkit.use(t),t}); \ No newline at end of file diff --git a/common/uikit-icons.js b/common/uikit-icons.js new file mode 100644 index 0000000..a5142e9 --- /dev/null +++ b/common/uikit-icons.js @@ -0,0 +1,167 @@ +/*! UIkit 3.2.3 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define('uikiticons', factory) : + (global = global || self, global.UIkitIcons = factory()); +}(this, function () { 'use strict'; + + function plugin(UIkit) { + + if (plugin.installed) { + return; + } + + UIkit.icon.add({ + "500px": "", + "album": "", + "arrow-down": "", + "arrow-left": "", + "arrow-right": "", + "arrow-up": "", + "ban": "", + "behance": "", + "bell": "", + "bold": "", + "bolt": "", + "bookmark": "", + "calendar": "", + "camera": "", + "cart": "", + "check": "", + "chevron-double-left": "", + "chevron-double-right": "", + "chevron-down": "", + "chevron-left": "", + "chevron-right": "", + "chevron-up": "", + "clock": "", + "close": "", + "cloud-download": "", + "cloud-upload": "", + "code": "", + "cog": "", + "comment": "", + "commenting": "", + "comments": "", + "copy": "", + "credit-card": "", + "database": "", + "desktop": "", + "download": "", + "dribbble": "", + "etsy": "", + "expand": "", + "facebook": "", + "file-edit": "", + "file-pdf": "", + "file-text": "", + "file": "", + "flickr": "", + "folder": "", + "forward": "", + "foursquare": "", + "future": "", + "git-branch": "", + "git-fork": "", + "github-alt": "", + "github": "", + "gitter": "", + "google-plus": "", + "google": "", + "grid": "", + "happy": "", + "hashtag": "", + "heart": "", + "history": "", + "home": "", + "image": "", + "info": "", + "instagram": "", + "italic": "", + "joomla": "", + "laptop": "", + "lifesaver": "", + "link": "", + "linkedin": "", + "list": "", + "location": "", + "lock": "", + "mail": "", + "menu": "", + "microphone": "", + "minus-circle": "", + "minus": "", + "more-vertical": "", + "more": "", + "move": "", + "nut": "", + "pagekit": "", + "paint-bucket": "", + "pencil": "", + "phone-landscape": "", + "phone": "", + "pinterest": "", + "play-circle": "", + "play": "", + "plus-circle": "", + "plus": "", + "print": "", + "pull": "", + "push": "", + "question": "", + "quote-right": "", + "receiver": "", + "reddit": "", + "refresh": "", + "reply": "", + "rss": "", + "search": "", + "server": "", + "settings": "", + "shrink": "", + "sign-in": "", + "sign-out": "", + "social": "", + "soundcloud": "", + "star": "", + "strikethrough": "", + "table": "", + "tablet-landscape": "", + "tablet": "", + "tag": "", + "thumbnails": "", + "trash": "", + "triangle-down": "", + "triangle-left": "", + "triangle-right": "", + "triangle-up": "", + "tripadvisor": "", + "tumblr": "", + "tv": "", + "twitter": "", + "uikit": "", + "unlock": "", + "upload": "", + "user": "", + "users": "", + "video-camera": "", + "vimeo": "", + "warning": "", + "whatsapp": "", + "wordpress": "", + "world": "", + "xing": "", + "yelp": "", + "youtube": "" + }); + + } + + if (typeof window !== 'undefined' && window.UIkit) { + window.UIkit.use(plugin); + } + + return plugin; + +})); diff --git a/common/uikit-icons.min.js b/common/uikit-icons.min.js index df17f98..ce0e1e4 100644 --- a/common/uikit-icons.min.js +++ b/common/uikit-icons.min.js @@ -1,3 +1,3 @@ -/*! UIkit 3.1.5 | http://www.getuikit.com | (c) 2014 - 2018 YOOtheme | MIT License */ +/*! UIkit 3.2.3 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define("uikiticons",i):(t=t||self).UIkitIcons=i()}(this,function(){"use strict";function i(t){i.installed||t.icon.add({"500px":'',album:'',"arrow-down":'',"arrow-left":'',"arrow-right":'',"arrow-up":'',ban:'',behance:'',bell:'',bold:'',bolt:'',bookmark:'',calendar:'',camera:'',cart:'',check:'',"chevron-double-left":'',"chevron-double-right":'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',clock:'',close:'',"cloud-download":'',"cloud-upload":'',code:'',cog:'',comment:'',commenting:'',comments:'',copy:'',"credit-card":'',database:'',desktop:'',download:'',dribbble:'',etsy:'',expand:'',facebook:'',"file-edit":'',"file-pdf":'',"file-text":'',file:'',flickr:'',folder:'',forward:'',foursquare:'',future:'',"git-branch":'',"git-fork":'',"github-alt":'',github:'',gitter:'',"google-plus":'',google:'',grid:'',happy:'',hashtag:'',heart:'',history:'',home:'',image:'',info:'',instagram:'',italic:'',joomla:'',laptop:'',lifesaver:'',link:'',linkedin:'',list:'',location:'',lock:'',mail:'',menu:'',microphone:'',"minus-circle":'',minus:'',"more-vertical":'',more:'',move:'',nut:'',pagekit:'',"paint-bucket":'',pencil:'',"phone-landscape":'',phone:'',pinterest:'',"play-circle":'',play:'',"plus-circle":'',plus:'',print:'',pull:'',push:'',question:'',"quote-right":'',receiver:'',reddit:'',refresh:'',reply:'',rss:'',search:'',server:'',settings:'',shrink:'',"sign-in":'',"sign-out":'',social:'',soundcloud:'',star:'',strikethrough:'',table:'',"tablet-landscape":'',tablet:'',tag:'',thumbnails:'',trash:'',"triangle-down":'',"triangle-left":'',"triangle-right":'',"triangle-up":'',tripadvisor:'',tumblr:'',tv:'',twitter:'',uikit:'',unlock:'',upload:'',user:'',users:'',"video-camera":'',vimeo:'',warning:'',whatsapp:'',wordpress:'',world:'',xing:'',yelp:'',youtube:''})}return"undefined"!=typeof window&&window.UIkit&&window.UIkit.use(i),i}); \ No newline at end of file +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define("uikiticons",i):(t=t||self).UIkitIcons=i()}(this,function(){"use strict";function i(t){i.installed||t.icon.add({"500px":'',album:'',"arrow-down":'',"arrow-left":'',"arrow-right":'',"arrow-up":'',ban:'',behance:'',bell:'',bold:'',bolt:'',bookmark:'',calendar:'',camera:'',cart:'',check:'',"chevron-double-left":'',"chevron-double-right":'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',clock:'',close:'',"cloud-download":'',"cloud-upload":'',code:'',cog:'',comment:'',commenting:'',comments:'',copy:'',"credit-card":'',database:'',desktop:'',download:'',dribbble:'',etsy:'',expand:'',facebook:'',"file-edit":'',"file-pdf":'',"file-text":'',file:'',flickr:'',folder:'',forward:'',foursquare:'',future:'',"git-branch":'',"git-fork":'',"github-alt":'',github:'',gitter:'',"google-plus":'',google:'',grid:'',happy:'',hashtag:'',heart:'',history:'',home:'',image:'',info:'',instagram:'',italic:'',joomla:'',laptop:'',lifesaver:'',link:'',linkedin:'',list:'',location:'',lock:'',mail:'',menu:'',microphone:'',"minus-circle":'',minus:'',"more-vertical":'',more:'',move:'',nut:'',pagekit:'',"paint-bucket":'',pencil:'',"phone-landscape":'',phone:'',pinterest:'',"play-circle":'',play:'',"plus-circle":'',plus:'',print:'',pull:'',push:'',question:'',"quote-right":'',receiver:'',reddit:'',refresh:'',reply:'',rss:'',search:'',server:'',settings:'',shrink:'',"sign-in":'',"sign-out":'',social:'',soundcloud:'',star:'',strikethrough:'',table:'',"tablet-landscape":'',tablet:'',tag:'',thumbnails:'',trash:'',"triangle-down":'',"triangle-left":'',"triangle-right":'',"triangle-up":'',tripadvisor:'',tumblr:'',tv:'',twitter:'',uikit:'',unlock:'',upload:'',user:'',users:'',"video-camera":'',vimeo:'',warning:'',whatsapp:'',wordpress:'',world:'',xing:'',yelp:'',youtube:''})}return"undefined"!=typeof window&&window.UIkit&&window.UIkit.use(i),i}); \ No newline at end of file diff --git a/common/uikit.js b/common/uikit.js index ed4df8a..fe9ff81 100644 --- a/common/uikit.js +++ b/common/uikit.js @@ -1,5 +1,12143 @@ -/*! UIkit 3.0.0-beta.22 | http://www.getuikit.com | (c) 2014 - 2017 YOOtheme | MIT License */ +/*! UIkit 3.2.3 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define("uikit",["jquery"],e):t.UIkit=e(t.jQuery)}(this,function(t){"use strict";function e(){return"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll}function i(t){var i=function(){o(document,"DOMContentLoaded",i),o(window,"load",i),t()};e()?t():(n(document,"DOMContentLoaded",i),n(window,"load",i))}function n(t,e,i,n){A(t).addEventListener(e,i,n)}function o(t,e,i,n){A(t).removeEventListener(e,i,n)}function s(t,e,i,n){void 0===i&&(i=400),void 0===n&&(n="linear");var o=w(function(s,r){t=Vt(t);for(var a in e)t.css(a,t.css(a));var l=setTimeout(function(){return t.trigger(we||"transitionend")},i);t.one(we||"transitionend",function(e,i){e.promise=o,clearTimeout(l),t.removeClass("uk-transition").css("transition",""),i?r():s()}).addClass("uk-transition").css("transition","all "+i+"ms "+n).css(e)}).then(null,function(){});return o}function r(t,e,i,n,o){void 0===i&&(i=200);var s=w(function(r){function a(){t.css("animation-duration","").removeClass(l+" "+e)}var l=o?"uk-animation-leave":"uk-animation-enter";t=Vt(t),0===e.lastIndexOf("uk-animation-",0)&&(n&&(e+=" uk-animation-"+n),o&&(e+=" uk-animation-reverse")),a(),t.one(be||"animationend",function(t){t.promise=s,s.then(a),r()}).css("animation-duration",i+"ms").addClass(e).addClass(l),be||ae(function(){return Kt.cancel(t)})});return s}function a(t){return t instanceof Vt}function l(e,i){return e=Vt(e),e.is(i)||!!(k(i)?e.parents(i).length:t.contains(A(i),e[0]))}function h(t,e,i,n){return t=Vt(t),t.attr(e,function(t,e){return e?e.replace(i,n):e})}function c(t,e){return h(t,"class",new RegExp("(^|\\s)"+e+"(?!\\S)","g"),"")}function u(e,i,n,o){if(void 0===i&&(i=!0),void 0===n&&(n=!1),void 0===o&&(o=!1),k(e)){var s=document.createEvent("Event");s.initEvent(e,i,n),e=s}return o&&t.extend(e,o),e}function d(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var n=A(t).getBoundingClientRect();return n.bottom>=-1*e&&n.right>=-1*i&&n.top<=(window.innerHeight||document.documentElement.clientHeight)+e&&n.left<=(window.innerWidth||document.documentElement.clientWidth)+i}function f(t,e,i){void 0===i&&(i=0),e=Vt(e);var n=Vt(e).length;return t=(C(t)?t:"next"===t?i+1:"previous"===t?i-1:k(t)?parseInt(t,10):e.index(t))%n,t<0?t+n:t}function p(t){return te[A(t).tagName.toLowerCase()]}function g(t,e){var i=S(t);return i?i.reduce(function(t,e){return E(e,t)},e):E(t)}function m(t,e){return function(i){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,i):t.call(e)}}function v(t,e){return ie.call(t,e)}function w(t){if(ce)return new Promise(t);var e=Vt.Deferred();return t(e.resolve,e.reject),e}function y(t){return t.replace(/(?:^|[-_\/])(\w)/g,function(t,e){return e?e.toUpperCase():""})}function b(t){return t.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()}function $(t){return t.replace(ne,x)}function x(t,e){return e?e.toUpperCase():""}function k(t){return"string"==typeof t}function C(t){return"number"==typeof t}function T(t){return void 0===t}function _(t){return k(t)&&t.match(/^[!>+-]/)}function S(t){return _(t)&&t.split(/(?=\s[!>+-])/g).map(function(t){return t.trim()})}function E(t,e){if(!0===t)return null;try{if(e&&_(t)&&">"!==t[0]){var i=oe[t[0]],n=t.substr(1);e=Vt(e),"closest"===i&&(e=e.parent(),n=n||"*"),t=e[i](n)}else t=Vt(t,e)}catch(t){return null}return t.length?t:null}function A(t){return t&&(a(t)?t[0]:t)}function O(t){return"boolean"==typeof t?t:"true"===t||"1"===t||""===t||"false"!==t&&"0"!==t&&t}function D(t){var e=Number(t);return!isNaN(e)&&e}function I(e){return t.isArray(e)?e:k(e)?e.split(",").map(function(t){return O(t.trim())}):[e]}function N(t){if(k(t))if("@"===t[0]){var e="media-"+t.substr(1);t=se[e]||(se[e]=parseFloat(j(e)))}else if(t.match(/^\(min-width:/))return t;return!(!t||isNaN(t))&&"(min-width: "+t+"px)"}function B(t,e,i){return t===Boolean?O(e):t===Number?D(e):"jQuery"===t?g(e,i):"list"===t?I(e):"media"===t?N(e):t?t(e):e}function P(t){return t?"ms"===t.substr(-2)?parseFloat(t):1e3*parseFloat(t):0}function H(t,e,i){return t.replace(new RegExp(e+"|"+i,"mg"),function(t){return t===e?i:e})}function M(t,e,i){return(window.getComputedStyle(t,i)||{})[e]}function j(t){var e,i=document.documentElement,n=i.appendChild(document.createElement("div"));n.classList.add("var-"+t);try{e=M(n,"content",":before").replace(/^["'](.*)["']$/,"$1"),e=JSON.parse(e)}catch(t){}return i.removeChild(n),e||void 0}function L(t,e){var i,n=y(t),o=y(e).toLowerCase(),s=y(e),r=document.body||document.documentElement,a=(i={},i["Webkit"+n]="webkit"+s,i["Moz"+n]=o,i["o"+n]="o"+s+" o"+o,i[t]=o,i);for(t in a)if(void 0!==r.style[t])return a[t]}function F(t){t.scheduled||(t.scheduled=!0,ae(W.bind(null,t)))}function W(t){z(t.reads),z(t.writes.splice(0,t.writes.length)),t.scheduled=!1,(t.reads.length||t.writes.length)&&F(t)}function z(t){for(var e;e=t.shift();)e()}function q(t,e){var i=t.indexOf(e);return!!~i&&!!t.splice(i,1)}function Y(){}function R(t,e){return(e.y-t.y)/(e.x-t.x)}function U(t,e){function i(i){o[i]=(xe[i]||Ee)(t[i],e[i])}var n,o={};if(e.mixins)for(var s=0,r=e.mixins.length;sl[f]){var m=d[r]+p+g-2*s[t];m>=l[r]&&m+c[i]<=l[f]&&(d[r]=m,["element","target"].forEach(function(e){h[e][t]=p?h[e][t]===Ae[t][1]?Ae[t][2]:Ae[t][1]:h[e][t]}))}}}),Vt(e).offset({left:d.left,top:d.top}),h}function X(t){t=A(t);var e=Q(t),i=e.pageYOffset,n=e.pageXOffset;if(!t.ownerDocument)return{top:i,left:n,height:e.innerHeight,width:e.innerWidth,bottom:i+e.innerHeight,right:n+e.innerWidth};var o=!1;t.offsetHeight||(o=t.style.display,t.style.display="block");var s=t.getBoundingClientRect();return!1!==o&&(t.style.display=o),{height:s.height,width:s.width,top:s.top+i,left:s.left+n,bottom:s.bottom+i,right:s.right+n}}function G(t){return t=A(t),t.getBoundingClientRect().top+Q(t).pageYOffset}function Q(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:window}function J(e,i,n,o){t.each(Ae,function(t,s){var r=s[0],a=s[1],l=s[2];i[t]===l?e[a]+=n[r]*o:"center"===i[t]&&(e[a]+=n[r]*o/2)})}function Z(t){var e=/left|center|right/,i=/top|center|bottom/;return t=(t||"").split(" "),1===t.length&&(t=e.test(t[0])?t.concat(["center"]):i.test(t[0])?["center"].concat(t):["center","center"]),{x:e.test(t[0])?t[0]:"center",y:i.test(t[1])?t[1]:"center"}}function K(t,e,i){return t=(t||"").split(" "),{x:t[0]?parseFloat(t[0])*("%"===t[0][t[0].length-1]?e/100:1):0,y:t[1]?parseFloat(t[1])*("%"===t[1][t[1].length-1]?i/100:1):0}}function tt(t){switch(t){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return t}}function et(t,e,i,n){return Math.abs(t-e)>=Math.abs(i-n)?t-e>0?"Left":"Right":i-n>0?"Up":"Down"}function it(){ke&&clearTimeout(ke),Ce&&clearTimeout(Ce),Te&&clearTimeout(Te),ke=Ce=Te=null,Oe={}}function nt(t){return De||"touch"===(t.originalEvent||t).pointerType}function ot(t){return new Function("return function "+y(t)+" (options) { this._init(options); }")()}function st(t,e){if(t.nodeType===Node.ELEMENT_NODE)for(e(t),t=t.firstChild;t;)st(t,e),t=t.nextSibling}function rt(t,e){if(t)for(var i in t)t[i]._isReady&&t[i]._callUpdate(e)}function at(t,e,i){Object.defineProperty(t,e,{enumerable:!0,get:function(){return v(t._computeds,e)||(t._computeds[e]=i.call(t)),t._computeds[e]},set:function(i){t._computeds[e]=i}})}function lt(e,i,n,o){t.isPlainObject(n)||(n={name:o,handler:n});var s=n.name,r=n.el,a=n.delegate,l=n.self,h=n.filter,c=n.handler,u="."+e.$options.name+"."+e._uid;if(r=r&&r.call(e)||e.$el,s=s.split(" ").map(function(t){return t+"."+u}).join(" "),i)r.off(s);else{if(h&&!h.call(e))return;c=k(c)?e[c]:m(c,e),l&&(c=ht(c,e)),a?r.on(s,k(a)?a:a.call(e),c):r.on(s,c)}}function ht(t,e){return function(i){if(i.target===i.currentTarget)return t.call(e,i)}}function ct(t,e){return t.every(function(t){return!t||!v(t,e)})}function ut(t,e){return T(t)||t===e||a(t)&&a(e)&&t.is(e)}function dt(t){Gt.on((e={},e["click."+t]=function(t){Be&&Be.bgClose&&!t.isDefaultPrevented()&&!l(t.target,Be.panel)&&Be.hide()},e["keydown."+t]=function(t){27===t.keyCode&&Be&&Be.escClose&&(t.preventDefault(),Be.hide())},e));var e}function ft(t){Gt.off("click."+t).off("keydown."+t)}function pt(t){t.component("accordion",{mixins:[He,Me],props:{targets:String,active:null,collapsible:Boolean,multiple:Boolean,toggle:String,content:String,transition:String},defaults:{targets:"> *",active:!1,animation:[!0],collapsible:!0,multiple:!1,clsOpen:"uk-open",toggle:"> .uk-accordion-title",content:"> .uk-accordion-content",transition:"ease"},computed:{items:function(){var t=this,e=Vt(this.targets,this.$el);return this._changed=!this._items||e.length!==this._items.length||e.toArray().some(function(e,i){return e!==t._items.get(i)}),this._items=e}},connected:function(){this.$emitSync()},events:[{name:"click",delegate:function(){return this.targets+" "+this.$props.toggle},handler:function(t){t.preventDefault(),this.toggle(this.items.find(this.$props.toggle).index(t.currentTarget))}}],update:function(){var t=this;if(this.items&&this._changed){this.items.each(function(e,i){i=Vt(i),t.toggleNow(i.find(t.content),i.hasClass(t.clsOpen))});var e=!1!==this.active&&E(this.items.eq(Number(this.active)))||!this.collapsible&&E(this.items.eq(0));e&&!e.hasClass(this.clsOpen)&&this.toggle(e,!1)}},methods:{toggle:function(t,e){var i=this,n=f(t,this.items),o=this.items.filter("."+this.clsOpen);t=this.items.eq(n),t.add(!this.multiple&&o).each(function(n,s){s=Vt(s);var r=s.is(t),a=r&&!s.hasClass(i.clsOpen);if(a||!r||i.collapsible||!(o.length<2)){s.toggleClass(i.clsOpen,a);var l=s[0]._wrapper?s[0]._wrapper.children().first():s.find(i.content);s[0]._wrapper||(s[0]._wrapper=l.wrap("
").parent().attr("hidden",a)),i._toggleImmediate(l,!0),i.toggleElement(s[0]._wrapper,a,e).then(function(){s.hasClass(i.clsOpen)===a&&(a||i._toggleImmediate(l,!1),s[0]._wrapper=null,l.unwrap())})}})}}})}function gt(t){t.component("alert",{mixins:[He,Me],args:"animation",props:{close:String},defaults:{animation:[!0],close:".uk-alert-close",duration:150,hideProps:{opacity:0}},events:[{name:"click",delegate:function(){return this.close},handler:function(t){t.preventDefault(),this.closeAlert()}}],methods:{closeAlert:function(){var t=this;this.toggleElement(this.$el).then(function(){return t.$destroy(!0)})}}})}function mt(t){t.component("cover",{mixins:[He],props:{automute:Boolean,width:Number,height:Number},defaults:{automute:!0},computed:{el:function(){return this.$el[0]},parent:function(){return this.$el.parent()[0]}},ready:function(){if(this.$el.is("iframe")&&(this.$el.css("pointerEvents","none"),this.automute)){var t=this.$el.attr("src");this.$el.attr("src",t+(~t.indexOf("?")?"&":"?")+"enablejsapi=1&api=1").on("load",function(t){return t.target.contentWindow.postMessage('{"event": "command", "func": "mute", "method":"setVolume", "value":0}',"*")})}},update:{write:function(){0!==this.el.offsetHeight&&this.$el.css({width:"",height:""}).css(ee.cover({width:this.width||this.el.clientWidth,height:this.height||this.el.clientHeight},{width:this.parent.offsetWidth,height:this.parent.offsetHeight}))},events:["load","resize"]},events:{loadedmetadata:function(){this.$emit()}}})}function vt(t){function e(){n||(n=!0,Gt.on("click",function(t){for(var e;i&&i!==e&&!l(t.target,i.$el)&&(!i.toggle||!l(t.target,i.toggle.$el));)e=i,i.hide(!1)}))}var i;t.component("drop",{mixins:[Le,Me],args:"pos",props:{mode:"list",toggle:Boolean,boundary:"jQuery",boundaryAlign:Boolean,delayShow:Number,delayHide:Number,clsDrop:String},defaults:{mode:["click","hover"],toggle:"- :first",boundary:window,boundaryAlign:!1,delayShow:0,delayHide:800,clsDrop:!1,hoverIdle:200,animation:["uk-animation-fade"],cls:"uk-open"},init:function(){this.tracker=new Y,this.clsDrop=this.clsDrop||"uk-"+this.$options.name,this.clsPos=this.clsDrop,this.$el.addClass(this.clsDrop)},ready:function(){this.updateAria(this.$el),this.toggle&&(this.toggle=t.toggle(g(this.toggle,this.$el),{target:this.$el,mode:this.mode}))},events:[{name:"click",delegate:function(){return"."+this.clsDrop+"-close"},handler:function(t){t.preventDefault(),this.hide(!1)}},{name:"click",delegate:function(){return'a[href^="#"]'},handler:function(t){if(!t.isDefaultPrevented()){var e=Vt(t.target).attr("href");1===e.length&&t.preventDefault(),1!==e.length&&l(e,this.$el)||this.hide(!1)}}},{name:"toggle",handler:function(t,e){e&&!this.$el.is(e.target)||(t.preventDefault(),this.isToggled()?this.hide(!1):this.show(e,!1))}},{name:ge,filter:function(){return~this.mode.indexOf("hover")},handler:function(t){nt(t)||(i&&i!==this&&i.toggle&&~i.toggle.mode.indexOf("hover")&&!l(t.target,i.$el)&&!l(t.target,i.toggle.$el)&&i.hide(!1),t.preventDefault(),this.show(this.toggle))}},{name:"toggleshow",handler:function(t,e){e&&!this.$el.is(e.target)||(t.preventDefault(),this.show(e||this.toggle))}},{name:"togglehide "+me,handler:function(t,e){nt(t)||e&&!this.$el.is(e.target)||(t.preventDefault(),this.toggle&&~this.toggle.mode.indexOf("hover")&&this.hide())}},{name:"beforeshow",self:!0,handler:function(){this.clearTimers()}},{name:"show",self:!0,handler:function(){this.tracker.init(),this.toggle.$el.addClass(this.cls).attr("aria-expanded","true"),e()}},{name:"beforehide",self:!0,handler:function(){this.clearTimers()}},{name:"hide",handler:function(t){var e=t.target;if(!this.$el.is(e))return void(i=null===i&&l(e,this.$el)&&this.isToggled()?this:i);i=this.isActive()?null:i,this.toggle.$el.removeClass(this.cls).attr("aria-expanded","false").blur().find("a, button").blur(),this.tracker.cancel()}}],update:{write:function(){this.isToggled()&&!Kt.inProgress(this.$el)&&this.position()},events:["resize"]},methods:{show:function(t,e){var n=this;void 0===e&&(e=!0);var o=function(){n.isToggled()||(n.position(),n.toggleElement(n.$el,!0))},s=function(){if(n.toggle=t||n.toggle,n.clearTimers(),!n.isActive()){if(e&&i&&i!==n&&i.isDelaying)return void(n.showTimer=setTimeout(n.show,10));if(n.isParentOf(i)){if(!i.hideTimer)return;i.hide(!1)}else if(i&&!n.isChildOf(i)&&!n.isParentOf(i))for(var s;i&&i!==s;)s=i,i.hide(!1);e&&n.delayShow?n.showTimer=setTimeout(o,n.delayShow):o(),i=n}};t&&this.toggle&&!this.toggle.$el.is(t.$el)?(this.$el.one("hide",s),this.hide(!1)):s()},hide:function(t){var e=this;void 0===t&&(t=!0);var i=function(){return e.toggleNow(e.$el,!1)};this.clearTimers(),this.isDelaying=this.tracker.movesTo(this.$el),t&&this.isDelaying?this.hideTimer=setTimeout(this.hide,this.hoverIdle):t&&this.delayHide?this.hideTimer=setTimeout(i,this.delayHide):i()},clearTimers:function(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null,this.isDelaying=!1},isActive:function(){return i===this},isChildOf:function(t){return t&&t!==this&&l(this.$el,t.$el)},isParentOf:function(t){return t&&t!==this&&l(t.$el,this.$el)},position:function(){c(this.$el,this.clsDrop+"-(stack|boundary)").css({top:"",left:""}),this.$el.show().toggleClass(this.clsDrop+"-boundary",this.boundaryAlign);var t=X(this.boundary),e=this.boundaryAlign?t:X(this.toggle.$el);if("justify"===this.align){var i="y"===this.getAxis()?"width":"height";this.$el.css(i,e[i])}else this.$el.outerWidth()>Math.max(t.right-e.left,e.right-t.left)&&(this.$el.addClass(this.clsDrop+"-stack"),this.$el.trigger("stack",[this]));this.positionAt(this.$el,this.boundaryAlign?this.boundary:this.toggle.$el,this.boundary),this.$el[0].style.display=""}}}),t.drop.getActive=function(){return i};var n}function wt(t){t.component("dropdown",t.components.drop.extend({name:"dropdown"}))}function yt(t){t.component("form-custom",{mixins:[He],args:"target",props:{target:Boolean},defaults:{target:!1},computed:{input:function(){return this.$el.find(":input:first")},state:function(){return this.input.next()},target:function(){return this.$props.target&&g(!0===this.$props.target?"> :input:first + :first":this.$props.target,this.$el)}},connected:function(){this.input.trigger("change")},events:[{name:"focusin focusout mouseenter mouseleave",delegate:":input:first",handler:function(t){var e=t.type;this.state.toggleClass("uk-"+(~e.indexOf("focus")?"focus":"hover"),~["focusin","mouseenter"].indexOf(e))}},{name:"change",handler:function(){this.target&&this.target[this.target.is(":input")?"val":"text"](this.input[0].files&&this.input[0].files[0]?this.input[0].files[0].name:this.input.is("select")?this.input.find("option:selected").text():this.input.val())}}]})}function bt(t){t.component("gif",{update:{read:function(){var t=d(this.$el);!this.isInView&&t&&(this.$el[0].src=this.$el[0].src),this.isInView=t},events:["scroll","load","resize"]}})}function $t(t){t.component("grid",t.components.margin.extend({mixins:[He],name:"grid",defaults:{margin:"uk-grid-margin",clsStack:"uk-grid-stack"},update:{write:function(){this.$el.toggleClass(this.clsStack,this.stacks)},events:["load","resize"]}}))}function xt(t){t.component("height-match",{args:"target",props:{target:String,row:Boolean},defaults:{target:"> *",row:!0},computed:{elements:function(){return Vt(this.target,this.$el)}},update:{read:function(){var t=this,e=!1;this.elements.css("minHeight",""),this.rows=this.row?this.elements.toArray().reduce(function(t,i){return e!==i.offsetTop?t.push([i]):t[t.length-1].push(i),e=i.offsetTop,t},[]).map(function(e){return t.match(Vt(e))}):[this.match(this.elements)]},write:function(){this.rows.forEach(function(t){var e=t.height,i=t.elements;return i&&i.each(function(t,i){return i.style.minHeight=e+"px"})})},events:["resize"]},methods:{match:function(t){if(t.length<2)return{};var e=0,i=[];return t=t.each(function(t,n){var o,s,r;0===n.offsetHeight&&(o=Vt(n),s=o.attr("style")||null,r=o.attr("hidden")||null,o.attr({style:s+";display:block !important;",hidden:null})),e=Math.max(e,n.offsetHeight),i.push(n.offsetHeight),o&&o.attr({style:s,hidden:r})}).filter(function(t){return i[t]0&&this.$el.css("min-height",e=this.$el.outerHeight()+o)}else{var s=G(this.$el);if(s=this.$el.outerHeight()&&this.$el.css("height",e)},events:["load","resize"]}})}function Ct(t){i(function(){if(ue){var e="uk-hover";Qt.on("tap",function(t){var i=t.target;return Vt("."+e).filter(function(t,e){return!l(i,e)}).removeClass(e)}),Object.defineProperty(t,"hoverSelector",{set:function(t){Qt.on("tap",t,function(t){return t.currentTarget.classList.add(e)})}}),t.hoverSelector=".uk-animation-toggle, .uk-transition-toggle, [uk-hover]"}})}function Tt(e){function i(t,i){e.component(t,e.components.icon.extend({name:t,mixins:i?[i]:[],defaults:{icon:t}}))}var n={},o={spinner:Ke,totop:ti,"close-icon":Fe,"close-large":We,"navbar-toggle-icon":ze,"overlay-icon":qe,"pagination-next":Ye,"pagination-previous":Re,"search-icon":Ue,"search-large":Ve,"search-navbar":Xe,"slidenav-next":Ge,"slidenav-next-large":Qe,"slidenav-previous":Je,"slidenav-previous-large":Ze};e.component("icon",e.components.svg.extend({attrs:["icon","ratio"],mixins:[He],name:"icon",args:"icon",props:["icon"],defaults:{exclude:["id","style","class","src"]},init:function(){this.$el.addClass("uk-icon"),Jt&&(this.icon=H(H(this.icon,"left","right"),"previous","next"))},update:{read:function(){if(this.delay){var t=this.getIcon();t&&this.delay(t)}},events:["load"]},methods:{getSvg:function(){var t=this,e=this.getIcon();return e?w.resolve(e):"complete"!==document.readyState?w(function(e){t.delay=e}):w.reject("Icon not found.")},getIcon:function(){return o[this.icon]?(n[this.icon]||(n[this.icon]=this.parse(o[this.icon])),n[this.icon]):null}}})),["navbar-toggle-icon","overlay-icon","pagination-previous","pagination-next","totop"].forEach(function(t){return i(t)}),["slidenav-previous","slidenav-next"].forEach(function(t){return i(t,{init:function(){this.$el.addClass("uk-slidenav"),this.$el.hasClass("uk-slidenav-large")&&(this.icon+="-large")}})}),i("search-icon",{init:function(){this.$el.hasClass("uk-search-icon")&&this.$el.parents(".uk-search-large").length?this.icon="search-large":this.$el.parents(".uk-search-navbar").length&&(this.icon="search-navbar")}}),i("close",{init:function(){this.icon="close-"+(this.$el.hasClass("uk-close-large")?"large":"icon")}}),i("spinner",{connected:function(){var t=this;this.height=this.width=this.$el.width(),this.svg.then(function(e){var i=Vt(e).find("circle"),n=Math.floor(t.width/2);e.setAttribute("viewBox","0 0 "+t.width+" "+t.width),i.attr({cx:n,cy:n,r:n-parseFloat(i.css("stroke-width")||0)})})}}),e.icon.add=function(e){return t.extend(o,e)}}function _t(t){t.component("margin",{props:{margin:String,firstColumn:Boolean},defaults:{margin:"uk-margin-small-top",firstColumn:"uk-first-column"},update:{read:function(){var t=this;if(0===this.$el[0].offsetHeight)return void(this.hidden=!0);this.hidden=!1,this.stacks=!0;var e=this.$el.children().filter(function(t,e){return e.offsetHeight>0});this.rows=[[e.get(0)]],e.slice(1).each(function(e,i){for(var n=Math.ceil(i.offsetTop),o=n+i.offsetHeight,s=t.rows.length-1;s>=0;s--){var r=t.rows[s],a=Math.ceil(r[0].offsetTop);if(n>=a+r[0].offsetHeight){t.rows.push([i]);break}if(o>a){if(t.stacks=!1,i.offsetLeftthis.panel.outerHeight(!0)).css("display",this.$el.hasClass("uk-flex")?"":"block")},events:["resize"]},events:[{name:"beforeshow",self:!0,handler:function(){this.$el.css("display","block").height()}},{name:"hidden",self:!0,handler:function(){this.$el.css("display","").removeClass("uk-flex uk-flex-center uk-flex-middle")}}]}),e.component("overflow-auto",{mixins:[He],computed:{panel:function(){return this.$el.closest(".uk-modal-dialog")}},connected:function(){this.$el.css("min-height",150)},update:{write:function(){var t=this.$el.css("max-height");this.$el.css("max-height",150).css("max-height",Math.max(150,150-(this.panel.outerHeight(!0)-window.innerHeight))),t!==this.$el.css("max-height")&&this.$el.trigger("resize")},events:["load","resize"]}}),e.modal.dialog=function(t,i){var n=e.modal('
\n
'+t+"
\n
",i);return n.$el.on("hidden",function(t){t.target===t.currentTarget&&n.$destroy(!0)}),n.show(),n},e.modal.alert=function(i,n){return n=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},n),w(function(t){return e.modal.dialog('\n
'+(k(i)?i:Vt(i).html())+'
\n \n ",n).$el.on("hide",t)})},e.modal.confirm=function(i,n){return n=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},n),w(function(t,o){return e.modal.dialog('\n
'+(k(i)?i:Vt(i).html())+'
\n \n ",n).$el.on("click",".uk-modal-footer button",function(e){return 0===Vt(e.target).index()?o():t()})})},e.modal.prompt=function(i,n,o){return o=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},o),w(function(t){var s=!1,r=e.modal.dialog('\n
\n
\n \n \n
\n \n
\n ",o),a=r.$el.find("input").val(n);r.$el.on("submit","form",function(e){e.preventDefault(),t(a.val()),s=!0,r.hide()}).on("hide",function(){s||t(null)})})},e.modal.labels={ok:"Ok",cancel:"Cancel"}}function Et(t){t.component("nav",t.components.accordion.extend({name:"nav",defaults:{targets:"> .uk-parent",toggle:"> a",content:"ul:first"}}))}function At(e){e.component("navbar",{mixins:[He],props:{dropdown:String,mode:"list",align:String,offset:Number,boundary:Boolean,boundaryAlign:Boolean,clsDrop:String,delayShow:Number,delayHide:Number,dropbar:Boolean,dropbarMode:String,dropbarAnchor:"jQuery",duration:Number},defaults:{dropdown:".uk-navbar-nav > li",align:Jt?"right":"left",clsDrop:"uk-navbar-dropdown",mode:void 0,offset:void 0,delayShow:void 0,delayHide:void 0,boundaryAlign:void 0,flip:"x",boundary:!0,dropbar:!1,dropbarMode:"slide",dropbarAnchor:!1,duration:200},computed:{boundary:function(){return!0===this.$props.boundary||this.boundaryAlign?this.$el:this.$props.boundary},pos:function(){return"bottom-"+this.align}},ready:function(){this.dropbar&&e.navbarDropbar(g(this.dropbar,this.$el)||Vt("
").insertAfter(this.dropbarAnchor||this.$el),{clsDrop:this.clsDrop,mode:this.dropbarMode,duration:this.duration,navbar:this})},update:function(){e.drop(Vt(this.dropdown+" ."+this.clsDrop,this.$el),t.extend({},this))},events:[{name:ge,delegate:function(){return this.dropdown},handler:function(t){var e=t.currentTarget,i=this.getActive();i&&i.toggle&&!l(i.toggle.$el,e)&&!i.tracker.movesTo(i.$el)&&i.hide(!1)}}],methods:{getActive:function(){var t=e.drop.getActive();return t&&"click"!==t.mode&&l(t.toggle.$el,this.$el)&&t}}}),e.component("navbar-dropbar",{mixins:[He],defaults:{clsDrop:"",mode:"slide",navbar:null,duration:200},init:function(){"slide"===this.mode&&this.$el.addClass("uk-navbar-dropbar-slide")},events:[{name:"beforeshow",el:function(){return this.navbar.$el},handler:function(t,e){var i=e.$el;if("bottom"===e.dir&&!l(i,this.$el))return i.appendTo(this.$el),e.show(),!1}},{name:"mouseleave",handler:function(){var t=this.navbar.getActive();t&&!this.$el.is(":hover")&&t.hide()}},{name:"beforeshow",handler:function(t,e){var i=e.$el;this.clsDrop&&i.addClass(this.clsDrop+"-dropbar"),this.transitionTo(i.outerHeight(!0))}},{name:"beforehide",handler:function(t,e){var i=e.$el,n=this.navbar.getActive();if(this.$el.is(":hover")&&n&&n.$el.is(i))return!1}},{name:"hide",handler:function(t,e){var i=e.$el,n=this.navbar.getActive();(!n||n&&n.$el.is(i))&&this.transitionTo(0)}}],methods:{transitionTo:function(t){var e=this;return this.$el.height(this.$el[0].offsetHeight?this.$el.height():0),Zt.cancel(this.$el).then(function(){return Zt.start(e.$el,{height:t},e.duration)})}}})}function Ot(t){t.component("offcanvas",{mixins:[je],args:"mode",props:{content:String,mode:String,flip:Boolean,overlay:Boolean},defaults:{content:".uk-offcanvas-content:first",mode:"slide",flip:!1,overlay:!1,clsPage:"uk-offcanvas-page",clsContainer:"uk-offcanvas-container",clsPanel:"uk-offcanvas-bar",clsFlip:"uk-offcanvas-flip",clsContent:"uk-offcanvas-content",clsContentAnimation:"uk-offcanvas-content-animation",clsSidebarAnimation:"uk-offcanvas-bar-animation",clsMode:"uk-offcanvas",clsOverlay:"uk-offcanvas-overlay",selClose:".uk-offcanvas-close"},computed:{content:function(){return Vt(g(this.$props.content,this.$el))},clsFlip:function(){return this.flip?this.$props.clsFlip:""},clsOverlay:function(){return this.overlay?this.$props.clsOverlay:""},clsMode:function(){return this.$props.clsMode+"-"+this.mode},clsSidebarAnimation:function(){return"none"===this.mode||"reveal"===this.mode?"":this.$props.clsSidebarAnimation},clsContentAnimation:function(){return"push"!==this.mode&&"reveal"!==this.mode?"":this.$props.clsContentAnimation},transitionElement:function(){return"reveal"===this.mode?this.panel.parent():this.panel}},update:{write:function(){this.isToggled()&&((this.overlay||this.clsContentAnimation)&&this.content.width(window.innerWidth-this.scrollbarWidth),this.overlay&&(this.content.height(window.innerHeight),Pe&&this.content.scrollTop(Pe.y)))},events:["resize"]},events:[{name:"beforeshow",self:!0,handler:function(){Pe=Pe||{x:window.pageXOffset,y:window.pageYOffset},"reveal"!==this.mode||this.panel.parent().hasClass(this.clsMode)||this.panel.wrap("
").parent().addClass(this.clsMode),Qt.css("overflow-y",(!this.clsContentAnimation||this.flip)&&this.scrollbarWidth&&this.overlay?"scroll":""),this.body.addClass(this.clsContainer+" "+this.clsFlip+" "+this.clsOverlay).height(),this.content.addClass(this.clsContentAnimation),this.panel.addClass(this.clsSidebarAnimation+" "+("reveal"!==this.mode?this.clsMode:"")),this.$el.addClass(this.clsOverlay).css("display","block").height()}},{name:"beforehide",self:!0,handler:function(){this.content.removeClass(this.clsContentAnimation),("none"===this.mode||this.getActive()&&this.getActive()!==this)&&this.panel.trigger(we)}},{name:"hidden",self:!0,handler:function(){"reveal"===this.mode&&this.panel.unwrap(),this.overlay||(Pe={x:window.pageXOffset,y:window.pageYOffset}),this.panel.removeClass(this.clsSidebarAnimation+" "+this.clsMode),this.$el.removeClass(this.clsOverlay).css("display",""),this.body.removeClass(this.clsContainer+" "+this.clsFlip+" "+this.clsOverlay).scrollTop(Pe.y),Qt.css("overflow-y",""),this.content.width("").height(""),window.scrollTo(Pe.x,Pe.y),Pe=null}},{name:"swipeLeft swipeRight",handler:function(t){this.isToggled()&&nt(t)&&("swipeLeft"===t.type&&!this.flip||"swipeRight"===t.type&&this.flip)&&this.hide()}}]})}function Dt(t){t.component("responsive",{props:["width","height"],init:function(){this.$el.addClass("uk-responsive-width")},update:{write:function(){this.$el.is(":visible")&&this.width&&this.height&&this.$el.height(ee.fit({height:this.height,width:this.width},{width:this.$el.parent().width(),height:this.height||this.$el.height()}).height)},events:["load","resize"]}})}function It(t){t.component("scroll",{props:{duration:Number,transition:String,offset:Number},defaults:{duration:1e3, -transition:"easeOutExpo",offset:0},methods:{scrollToElement:function(t){var e=this;t=Vt(t);var i=G(t)-this.offset,n=document.documentElement.offsetHeight,o=window.innerHeight;i+o>n&&(i=n-o),Vt("html,body").stop().animate({scrollTop:Math.round(i)},this.duration,this.transition).promise().then(function(){return e.$el.trigger("scrolled",[e])})}},events:{click:function(t){t.isDefaultPrevented()||(t.preventDefault(),this.scrollToElement(Vt(this.$el[0].hash).length?this.$el[0].hash:"body"))}}}),Vt.easing.easeOutExpo||(Vt.easing.easeOutExpo=function(t,e,i,n,o){return e===o?i+n:n*(1-Math.pow(2,-10*e/o))+i})}function Nt(t){t.component("scrollspy",{args:"cls",props:{cls:"list",target:String,hidden:Boolean,offsetTop:Number,offsetLeft:Number,repeat:Boolean,delay:Number},defaults:{cls:["uk-scrollspy-inview"],target:!1,hidden:!0,offsetTop:0,offsetLeft:0,repeat:!1,delay:0,inViewClass:"uk-scrollspy-inview"},init:function(){this.$emitSync()},computed:{elements:function(){return this.target&&Vt(this.target,this.$el)||this.$el}},update:[{write:function(){this.hidden&&this.elements.filter(":not(."+this.inViewClass+")").css("visibility","hidden")}},{read:function(){var t=this;this.elements.each(function(e,i){if(!i._scrollspy){var n=Vt(i).attr("uk-scrollspy-class");i._scrollspy={toggles:n&&n.split(",")||t.cls}}i._scrollspy.show=d(i,t.offsetTop,t.offsetLeft)})},write:function(){var t=this,e=1===this.elements.length?1:0;this.elements.each(function(i,n){var o=Vt(n),s=n._scrollspy;s.show?s.inview||s.timer||(s.timer=setTimeout(function(){o.css("visibility","").addClass(t.inViewClass).toggleClass(s.toggles[0]).trigger("inview"),s.inview=!0,delete s.timer},t.delay*e++)):s.inview&&t.repeat&&(s.timer&&(clearTimeout(s.timer),delete s.timer),o.removeClass(t.inViewClass).toggleClass(s.toggles[0]).css("visibility",t.hidden?"hidden":"").trigger("outview"),s.inview=!1),s.toggles.reverse()})},events:["scroll","load","resize"]}]})}function Bt(t){t.component("scrollspy-nav",{props:{cls:String,closest:String,scroll:Boolean,overflow:Boolean,offset:Number},defaults:{cls:"uk-active",closest:!1,scroll:!1,overflow:!0,offset:0},computed:{links:function(){return this.$el.find('a[href^="#"]').filter(function(t,e){return e.hash})},elements:function(){return this.closest?this.links.closest(this.closest):this.links},targets:function(){return Vt(this.links.toArray().map(function(t){return t.hash}).join(","))}},update:[{read:function(){this.scroll&&t.scroll(this.links,{offset:this.offset||0})}},{read:function(){var t=this,e=window.pageYOffset+this.offset,i=document.documentElement.scrollHeight-window.innerHeight+this.offset;this.active=!1,this.targets.each(function(n,o){o=Vt(o);var s=G(o),r=n+1===t.targets.length;if(!t.overflow&&(0===n&&s>e||r&&s+o[0].offsetTop=i)for(var a=t.targets.length-1;a>n;a--)if(d(t.targets.eq(a))){o=t.targets.eq(a);break}return!(t.active=E(t.links.filter('[href="#'+o.attr("id")+'"]')))}})},write:function(){this.links.blur(),this.elements.removeClass(this.cls),this.active&&this.$el.trigger("active",[this.active,(this.closest?this.active.closest(this.closest):this.active).addClass(this.cls)])},events:["scroll","load","resize"]}]})}function Pt(e){e.component("sticky",{mixins:[He],attrs:!0,props:{top:null,bottom:Boolean,offset:Number,animation:String,clsActive:String,clsInactive:String,clsFixed:String,widthElement:"jQuery",showOnUp:Boolean,media:"media",target:Number},defaults:{top:0,bottom:!1,offset:0,animation:"",clsActive:"uk-active",clsInactive:"",clsFixed:"uk-sticky-fixed",widthElement:!1,showOnUp:!1,media:!1,target:!1},connected:function(){this.placeholder=Vt('
'),this.widthElement=this.$props.widthElement||this.placeholder,this.isActive||this.$el.addClass(this.clsInactive)},disconnected:function(){this.isActive&&(this.isActive=!1,this.hide(),this.$el.removeClass(this.clsInactive)),this.placeholder.remove(),this.placeholder=null,this.widthElement=null},ready:function(){var t=this;if(this.target&&location.hash&&window.pageYOffset>0){var e=g(location.hash);e&&ae(function(){var i=G(e),n=G(t.$el),o=t.$el[0].offsetHeight;n+o>=i&&n<=i+e[0].offsetHeight&&window.scrollTo(0,i-o-t.target-t.offset)})}},update:[{write:function(){var e,i=this,n=this.$el[0].offsetHeight;this.placeholder.css("height","absolute"!==this.$el.css("position")?n:"").css(this.$el.css(["marginTop","marginBottom","marginLeft","marginRight"])),document.documentElement.contains(this.placeholder[0])||this.placeholder.insertAfter(this.$el).attr("hidden",!0),this.width=this.widthElement.attr("hidden",null)[0].offsetWidth,this.widthElement.attr("hidden",!this.isActive),this.topOffset=G(this.isActive?this.placeholder:this.$el),this.bottomOffset=this.topOffset+n,["top","bottom"].forEach(function(n){i[n]=i.$props[n],i[n]&&(t.isNumeric(i[n])?i[n]=i[n+"Offset"]+parseFloat(i[n]):k(i[n])&&i[n].match(/^-?\d+vh$/)?i[n]=window.innerHeight*parseFloat(i[n])/100:(e=!0===i[n]?i.$el.parent():g(i[n],i.$el))&&(i[n]=G(e)+e[0].offsetHeight))}),this.top=Math.max(parseFloat(this.top),this.topOffset)-this.offset,this.bottom=this.bottom&&this.bottom-n,this.inactive=this.media&&!window.matchMedia(this.media).matches,this.isActive&&this.update()},events:["load","resize"]},{read:function(){this.offsetTop=G(this.$el)},write:function(t){var e=this;void 0===t&&(t={});var i=t.dir,n=window.pageYOffset;if(!(n<0||!this.$el.is(":visible")||this.disabled||this.showOnUp&&!i))if(this.inactive||nthis.top;this.bottom&&e>this.bottom-this.offset&&(t=this.bottom-e),this.$el.css({position:"fixed",top:t+"px",width:this.width}).addClass(this.clsFixed).toggleClass(this.clsActive,i).toggleClass(this.clsInactive,!i)}}})}function Ht(e){e.component("svg",{attrs:!0,props:{id:String,icon:String,src:String,style:String,width:Number,height:Number,ratio:Number,class:String},defaults:{ratio:1,id:!1,exclude:["src"],class:""},init:function(){this.class+=" uk-svg"},connected:function(){var t=this;if(!this.icon&&this.src&&~this.src.indexOf("#")){var e=this.src.split("#");e.length>1&&(this.src=e[0],this.icon=e[1])}this.width=this.$props.width,this.height=this.$props.height,this.svg=this.getSvg().then(function(e){return w(function(i,n){return $e.mutate(function(){var o,s;if(!e)return void n("SVG not found.");if(t.icon)if(o=e.getElementById(t.icon)){var r=o.outerHTML;if(!r){var a=document.createElement("div");a.appendChild(o.cloneNode(!0)),r=a.innerHTML}r=r.replace(//g,"svg>"),s=ii.parseFromString(r,"image/svg+xml").documentElement}else e.querySelector("symbol")||(s=e.documentElement.cloneNode(!0));else s=e.documentElement.cloneNode(!0);if(!s)return void n("SVG not found.");var l=s.getAttribute("viewBox");l&&(l=l.split(" "),t.width=t.width||l[2],t.height=t.height||l[3]),t.width*=t.ratio,t.height*=t.ratio;for(var h in t.$options.props)t[h]&&!~t.exclude.indexOf(h)&&s.setAttribute(h,t[h]);t.id||s.removeAttribute("id"),t.width&&!t.height&&s.removeAttribute("height"),t.height&&!t.width&&s.removeAttribute("width");var c=t.$el[0];p(c)||"CANVAS"===c.tagName?(t.$el.attr({hidden:!0,id:null}),c.nextSibling?c.parentNode.insertBefore(s,c.nextSibling):c.parentNode.appendChild(s)):c.appendChild(s),i(s)})})}).then(null,function(){}),this._isReady||this.$emitSync()},disconnected:function(){p(this.$el)&&this.$el.attr({hidden:null,id:this.id||null}),this.svg&&(this.svg.then(function(t){return t&&t.parentNode&&t.parentNode.removeChild(t)}),this.svg=null)},methods:{getSvg:function(){var e=this;return this.src?ei[this.src]?ei[this.src]:(ei[this.src]=w(function(i,n){0===e.src.lastIndexOf("data:",0)?i(e.parse(decodeURIComponent(e.src.split(",")[1]))):t.ajax(e.src,{dataType:"html"}).then(function(t){i(e.parse(t))},function(){n("SVG not found.")})}),ei[this.src]):w.reject()},parse:function(t){var e=ii.parseFromString(t,"image/svg+xml");return e.documentElement&&"svg"===e.documentElement.nodeName?e:null}}})}function Mt(t){t.component("switcher",{mixins:[Me],args:"connect",props:{connect:String,toggle:String,active:Number,swiping:Boolean},defaults:{connect:!1,toggle:" > *",active:0,swiping:!0,cls:"uk-active",clsContainer:"uk-switcher",attrItem:"uk-switcher-item",queued:!0},connected:function(){this.$emitSync()},computed:{connects:function(){return g(this.connect,this.$el)||Vt(this.$el.next("."+this.clsContainer))},toggles:function(){return Vt(this.toggle,this.$el)}},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(t){t.preventDefault(),this.show(t.currentTarget)}},{name:"click",el:function(){return this.connects},delegate:function(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler:function(t){t.preventDefault(),this.show(Vt(t.currentTarget)[t.currentTarget.hasAttribute(this.attrItem)?"attr":"data"](this.attrItem))}},{name:"swipeRight swipeLeft",filter:function(){return this.swiping},el:function(){return this.connects},handler:function(t){nt(t)&&(t.preventDefault(),window.getSelection().toString()||this.show("swipeLeft"===t.type?"next":"previous"))}}],update:function(){this.updateAria(this.connects.children()),this.show(E(this.toggles.filter("."+this.cls+":first"))||E(this.toggles.eq(this.active))||this.toggles.first())},methods:{show:function(t){for(var e,i=this,n=this.toggles.length,o=this.connects.children("."+this.cls).index(),s=o>=0,r=f(t,this.toggles,o),a="previous"===t?-1:1,l=0;l=0&&e.hasClass(this.cls)||o===r||(this.toggles.removeClass(this.cls).attr("aria-expanded",!1),e.addClass(this.cls).attr("aria-expanded",!0),s?this.toggleElement(this.connects.children(":nth-child("+(o+1)+"),:nth-child("+(r+1)+")")):this.toggleNow(this.connects.children(":nth-child("+(r+1)+")")))}}})}function jt(t){t.component("tab",t.components.switcher.extend({mixins:[He],name:"tab",props:{media:"media"},defaults:{media:960,attrItem:"uk-tab-item"},init:function(){var e=this.$el.hasClass("uk-tab-left")&&"uk-tab-left"||this.$el.hasClass("uk-tab-right")&&"uk-tab-right";e&&t.toggle(this.$el,{cls:e,mode:"media",media:this.media})}}))}function Lt(e){e.component("toggle",{mixins:[e.mixin.togglable],args:"target",props:{href:String,target:null,mode:"list",media:"media"},defaults:{href:!1,target:!1,mode:"click",queued:!0,media:!1},computed:{target:function(){return g(this.$props.target||this.href,this.$el)||this.$el}},events:[{name:ge+" "+me,filter:function(){return~this.mode.indexOf("hover")},handler:function(t){nt(t)||this.toggle("toggle"+(t.type===ge?"show":"hide"))}},{name:"click",filter:function(){return~this.mode.indexOf("click")||ue},handler:function(t){if(nt(t)||~this.mode.indexOf("click")){var e=Vt(t.target).closest("a[href]");(Vt(t.target).closest('a[href="#"], button').length||e.length&&(this.cls||!this.target.is(":visible")||"#"===e.attr("href")[0]&&this.target.is(e.attr("href"))))&&t.preventDefault(),this.toggle()}}}],update:{write:function(){if(~this.mode.indexOf("media")&&this.media){var t=this.isToggled(this.target);(window.matchMedia(this.media).matches?!t:t)&&this.toggle()}},events:["load","resize"]},methods:{toggle:function(e){var i=t.Event(e||"toggle");this.target.triggerHandler(i,[this]),i.isDefaultPrevented()||this.toggleElement(this.target)}}})}function Ft(t){t.component("leader",{mixins:[He],props:{fill:String,media:"media"},defaults:{fill:"",media:!1,clsWrapper:"uk-leader-fill",clsHide:"uk-leader-hide",attrFill:"data-fill"},computed:{fill:function(){return this.$props.fill||j("leader-fill")}},connected:function(){this.wrapper=this.$el.wrapInner('').children().first()},disconnected:function(){this.wrapper.contents().unwrap()},update:[{read:function(){var t=this._width;this._width=Math.floor(this.$el[0].offsetWidth/2),this._changed=t!==this._width,this._hide=this.media&&!window.matchMedia(this.media).matches},write:function(){this.wrapper.toggleClass(this.clsHide,this._hide),this._changed&&this.wrapper.attr(this.attrFill,Array(this._width).join(this.fill))},events:["load","resize"]}]})}function Wt(t){function e(t){var e=t-Date.now();return{total:e,seconds:e/1e3%60,minutes:e/1e3/60%60,hours:e/1e3/60/60%24,days:e/1e3/60/60/24}}Wt.installed||t.component("countdown",{mixins:[t.mixin.class],attrs:!0,props:{date:String,clsWrapper:String},defaults:{date:"",clsWrapper:".uk-countdown-%unit%"},computed:{date:function(){return Date.parse(this.$props.date)},days:function(){return this.$el.find(this.clsWrapper.replace("%unit%","days"))},hours:function(){return this.$el.find(this.clsWrapper.replace("%unit%","hours"))},minutes:function(){return this.$el.find(this.clsWrapper.replace("%unit%","minutes"))},seconds:function(){return this.$el.find(this.clsWrapper.replace("%unit%","seconds"))},units:function(){var t=this;return["days","hours","minutes","seconds"].filter(function(e){return t[e].length})}},connected:function(){this.start()},disconnected:function(){var t=this;this.stop(),this.units.forEach(function(e){return t[e].empty()})},update:{write:function(){var t=this,i=e(this.date);i.total<=0&&(this.stop(),i.days=i.hours=i.minutes=i.seconds=0),this.units.forEach(function(e){var n=String(Math.floor(i[e]));if(n=n.length<2?"0"+n:n,t[e].text()!==n){var o=t[e];n=n.split(""),n.length!==o.children().length&&o.empty().append(n.map(function(){return""}).join("")),n.forEach(function(t,e){return o[0].childNodes[e].innerText=t})}})}},methods:{start:function(){var t=this;this.stop(),this.date&&this.units.length&&(this.$emit(),this.timer=setInterval(function(){return t.$emit()},1e3))},stop:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}}})}function zt(t){if(!zt.installed){var e=t.util,i=e.$,n=e.ajax,o=e.doc,s=e.Event,r=e.extend,a=e.Dimensions,l=e.getIndex,h=e.Transition;t.component("lightbox",{name:"lightbox",props:{toggle:String,duration:Number,inverse:Boolean},defaults:{toggle:"a",duration:400,dark:!1,attrItem:"uk-lightbox-item",items:[],index:0},computed:{toggles:function(){var t=this;return i(this.toggle,this.$el).each(function(e,i){return t.items.push({source:i.getAttribute("href"),title:i.getAttribute("title"),type:i.getAttribute("type")})})}},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(t){t.preventDefault(),this.show(this.toggles.index(t.currentTarget))}},{name:"showitem",handler:function(t){this.getItem().content&&(this.$update(),t.stopImmediatePropagation())}}],update:{write:function(){var t=this,e=this.getItem();if(this.modal&&e.content){var n=this.modal.panel,o={width:n.width(),height:n.height()},s={width:window.innerWidth-(n.outerWidth(!0)-o.width),height:window.innerHeight-(n.outerHeight(!0)-o.height)},r=a.fit({width:e.width,height:e.height},s);h.stop(n),h.stop(this.modal.content),this.modal.content&&this.modal.content.remove(),this.modal.content=i(e.content).css("opacity",0).appendTo(n),n.css(o),h.start(n,r,this.duration).then(function(){h.start(t.modal.content,{opacity:1},400).then(function(){n.find("[uk-transition-hide]").show(),n.find("[uk-transition-show]").hide()})})}},events:["resize"]},methods:{show:function(e){var n=this;this.index=l(e,this.items,this.index),this.modal||(this.modal=t.modal.dialog('\n \n \n ',{center:!0}),this.modal.$el.css("overflow","hidden").addClass("uk-modal-lightbox"),this.modal.panel.css({width:200,height:200}),this.modal.caption=i('
').appendTo(this.modal.panel),this.items.length>1&&i('
\n \n \n
\n ').appendTo(this.modal.panel.addClass("uk-slidenav-position")),this.modal.$el.on("hidden",this.hide).on("click","["+this.attrItem+"]",function(t){t.preventDefault(),n.show(i(t.currentTarget).attr(n.attrItem))}).on("swipeRight swipeLeft",function(t){t.preventDefault(),window.getSelection().toString()||n.show("swipeLeft"===t.type?"next":"previous")})),this.modal.panel.find("[uk-transition-hide]").hide(),this.modal.panel.find("[uk-transition-show]").show(),this.modal.content&&this.modal.content.remove(),this.modal.caption.text(this.getItem().title);var r=s("showitem");this.$el.trigger(r),r.isImmediatePropagationStopped()||this.setError(this.getItem()),o.on("keydown."+this.$options.name,function(t){switch(t.keyCode){case 37:n.show("previous");break;case 39:n.show("next")}})},hide:function(){var t=this;o.off("keydown."+this.$options.name),this.modal.hide().then(function(){t.modal.$destroy(!0),t.modal=null})},getItem:function(){return this.items[this.index]||{source:"",title:"",type:""}},setItem:function(t,e,i,n){void 0===i&&(i=200),void 0===n&&(n=200),r(t,{content:e,width:i,height:n}),this.$update()},setError:function(t){this.setItem(t,'
Loading resource failed!
',400,300)}}}),t.mixin({events:{showitem:function(t){var e=this,i=this.getItem();if("image"===i.type||!i.source||i.source.match(/\.(jp(e)?g|png|gif|svg)$/i)){var n=new Image;n.onerror=function(){return e.setError(i)},n.onload=function(){return e.setItem(i,'',n.width,n.height)},n.src=i.source,t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e=this,n=this.getItem();if("video"===n.type||!n.source||n.source.match(/\.(mp4|webm|ogv)$/i)){var o=i('').on("loadedmetadata",function(){return e.setItem(n,o.attr({width:o[0].videoWidth,height:o[0].videoHeight}),o[0].videoWidth,o[0].videoHeight)}).attr("src",n.source);t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e,i=this,n=this.getItem();if((e=n.source.match(/\/\/.*?youtube\.[a-z]+\/watch\?v=([^&]+)&?(.*)/))||n.source.match(/youtu\.be\/(.*)/)){var o=e[1],s=new Image,r=!1,a=function(t,e){return i.setItem(n,'',t,e)};s.onerror=function(){return a(640,320)},s.onload=function(){120===s.width&&90===s.height?r?a(640,320):(r=!0,s.src="//img.youtube.com/vi/"+o+"/0.jpg"):a(s.width,s.height)},s.src="//img.youtube.com/vi/"+o+"/maxresdefault.jpg",t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e,i=this,o=this.getItem();if(e=o.source.match(/(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/)){var s=e[2],r=function(t,e){return i.setItem(o,'',t,e)};n({type:"GET",url:"http://vimeo.com/api/oembed.json?url="+encodeURI(o.source),jsonp:"callback",dataType:"jsonp"}).then(function(t){return r(t.width,t.height)}),t.stopImmediatePropagation()}}}},"lightbox")}}function qt(t){if(!qt.installed){var e=t.util,i=e.$,n=e.each,o=e.pointerEnter,s=e.pointerLeave,r=e.Transition,a={};t.component("notification",{functional:!0,args:["message","status"],defaults:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",onClose:null,clsClose:"uk-notification-close"},created:function(){a[this.pos]||(a[this.pos]=i('
').appendTo(t.container)),this.$mount(i('
\n \n
'+this.message+"
\n
").appendTo(a[this.pos].show())[0])},ready:function(){var t=this,e=parseInt(this.$el.css("margin-bottom"),10);r.start(this.$el.css({opacity:0,marginTop:-1*this.$el.outerHeight(),marginBottom:0}),{opacity:1,marginTop:0,marginBottom:e}).then(function(){t.timeout&&(t.timer=setTimeout(t.close,t.timeout),t.$el.on(o,function(){return clearTimeout(t.timer)}).on(s,function(){return t.timer=setTimeout(t.close,t.timeout)}))})},events:{click:function(t){i(t.target).closest('a[href="#"]').length&&t.preventDefault(),this.close()}},methods:{close:function(t){var e=this,i=function(){e.onClose&&e.onClose(),e.$el.trigger("close",[e]).remove(),a[e.pos].children().length||a[e.pos].hide()};this.timer&&clearTimeout(this.timer),t?i():r.start(this.$el,{opacity:0,marginTop:-1*this.$el.outerHeight(),marginBottom:0}).then(i)}}}),t.notification.closeAll=function(e,i){n(t.instances,function(t,n){"notification"!==n.$options.name||e&&e!==n.group||n.close(i)})}}}function Yt(t){function e(i){return t.getComponent(i,"sortable")||i.parentNode&&e(i.parentNode)}function i(){var t=setTimeout(function(){return r.trigger("click")},0),e=function(i){i.preventDefault(),i.stopPropagation(),clearTimeout(t),u(r,"click",e,!0)};c(r,"click",e,!0)}if(!Yt.installed){var n=t.mixin,o=t.util,s=o.$,r=o.docElement,a=o.extend,l=o.getDimensions,h=o.isWithin,c=o.on,u=o.off,d=o.offsetTop,f=o.pointerDown,p=o.pointerMove,g=o.pointerUp,m=o.promise,v=o.win;t.component("sortable",{mixins:[n.class],props:{group:String,animation:Number,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},defaults:{group:!1,animation:150,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},init:function(){var t=this;["init","start","move","end"].forEach(function(e){var i=t[e];t[e]=function(e){e=e.originalEvent||e,t.scrollY=window.scrollY;var n=e.touches&&e.touches[0]||e,o=n.pageX,s=n.pageY;t.pos={x:o,y:s},i(e)}})},events:(w={},w[f]="init",w),update:{write:function(){var t=this;if(this.clsEmpty&&this.$el.toggleClass(this.clsEmpty,!this.$el.children().length),this.drag){this.drag.offset({top:this.pos.y+this.origin.top,left:this.pos.x+this.origin.left});var e=d(this.drag),i=e+this.drag[0].offsetHeight;e>0&&ewindow.innerHeight+this.scrollY&&setTimeout(function(){return v.scrollTop(t.scrollY+5)},5)}}},methods:{init:function(t){var e=s(t.target),i=this.$el.children().filter(function(e,i){return h(t.target,i)});!i.length||e.is(":input")||this.handle&&!h(e,this.handle)||t.button&&0!==t.button||h(e,"."+this.clsNoDrag)||(t.preventDefault(),t.stopPropagation(),this.touched=[this],this.placeholder=i,this.origin=a({target:e,index:this.placeholder.index()},this.pos),r.on(p,this.move),r.on(g,this.end),v.on("scroll",this.scroll),this.threshold||this.start(t))},start:function(e){this.drag=s(this.placeholder[0].outerHTML.replace(/^
  • $/i,"div>")).attr("uk-no-boot","").addClass(this.clsDrag+" "+this.clsCustom).css({boxSizing:"border-box",width:this.placeholder.outerWidth(),height:this.placeholder.outerHeight()}).css(this.placeholder.css(["paddingLeft","paddingRight","paddingTop","paddingBottom"])).appendTo(t.container),this.drag.children().first().height(this.placeholder.children().height());var i=l(this.placeholder),n=i.left,o=i.top;a(this.origin,{left:n-this.pos.x,top:o-this.pos.y}),this.placeholder.addClass(this.clsPlaceholder),this.$el.children().addClass(this.clsItem),r.addClass(this.clsDragState),this.$el.trigger("start",[this,this.placeholder,this.drag]),this.move(e)},move:function(t){if(!this.drag)return void((Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(t));this.$emit();var i="mousemove"===t.type?t.target:document.elementFromPoint(this.pos.x-document.body.scrollLeft,this.pos.y-document.body.scrollTop),n=e(i),o=e(this.placeholder[0]),r=n!==o;if(n&&!h(i,this.placeholder)&&(!r||n.group&&n.group===o.group)){if(i=n.$el.is(i.parentNode)&&s(i)||n.$el.children().has(i),r)o.remove(this.placeholder);else if(!i.length)return;n.insert(this.placeholder,i),~this.touched.indexOf(n)||this.touched.push(n)}},scroll:function(){var t=window.scrollY;t!==this.scrollY&&(this.pos.y+=t-this.scrollY,this.scrollY=t,this.$emit())},end:function(t){if(r.off(p,this.move),r.off(g,this.end),v.off("scroll",this.scroll),!this.drag)return void("mouseup"!==t.type&&h(t.target,"a[href]")&&(location.href=s(t.target).closest("a[href]").attr("href")));i();var n=e(this.placeholder[0]);this===n?this.origin.index!==this.placeholder.index()&&this.$el.trigger("change",[this,this.placeholder,"moved"]):(n.$el.trigger("change",[n,this.placeholder,"added"]),this.$el.trigger("change",[this,this.placeholder,"removed"])),this.$el.trigger("stop",[this]),this.drag.remove(),this.drag=null,this.touched.forEach(function(t){return t.$el.children().removeClass(t.clsPlaceholder+" "+t.clsItem)}),r.removeClass(this.clsDragState)},insert:function(t,e){var i=this;this.$el.children().addClass(this.clsItem);var n=function(){e.length?!i.$el.has(t).length||t.prevAll().filter(e).length?t.insertBefore(e):t.insertAfter(e):i.$el.append(t)};this.animation?this.animate(n):n()},remove:function(t){this.$el.has(t).length&&(this.animation?this.animate(function(){return t.detach()}):t.detach())},animate:function(t){var e=this,i=[],n=this.$el.children().toArray().map(function(t){return t=s(t),i.push(a({position:"absolute",pointerEvents:"none",width:t.outerWidth(),height:t.outerHeight()},t.position())),t}),o={position:"",width:"",height:"",pointerEvents:"",top:"",left:""};t(),n.forEach(function(t){return t.stop()}),this.$el.children().css(o),this.$updateSync("update",!0),this.$el.css("min-height",this.$el.height());var r=n.map(function(t){return t.position()});m.all(n.map(function(t,n){return t.css(i[n]).animate(r[n],e.animation).promise()})).then(function(){e.$el.css("min-height","").children().css(o),e.$updateSync("update",!0)})}}});var w}}function Rt(t){if(!Rt.installed){var e,i=t.util,n=t.mixin,o=i.$,s=i.doc,r=i.fastdom,a=i.flipPosition,l=i.isTouch,h=i.isWithin,c=i.pointerDown,u=i.pointerEnter,d=i.pointerLeave;t.component("tooltip",{attrs:!0,mixins:[n.togglable,n.position],props:{delay:Number,container:Boolean,title:String},defaults:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active",clsPos:"uk-tooltip",container:!0},computed:{container:function(){return o(!0===this.$props.container&&t.container||this.$props.container||t.container)}},connected:function(){var t=this;r.mutate(function(){return t.$el.removeAttr("title").attr("aria-expanded",!1)})},disconnected:function(){this.hide()},methods:{show:function(){var t=this;e!==this&&(e&&e.hide(),e=this,s.on("click."+this.$options.name,function(e){h(e.target,t.$el)||t.hide()}),clearTimeout(this.showTimer),this.tooltip=o('").appendTo(this.container),this.$el.attr("aria-expanded",!0),this.positionAt(this.tooltip,this.$el),this.origin="y"===this.getAxis()?a(this.dir)+"-"+this.align:this.align+"-"+a(this.dir),this.showTimer=setTimeout(function(){t.toggleElement(t.tooltip,!0),t.hideTimer=setInterval(function(){t.$el.is(":visible")||t.hide()},150)},this.delay))},hide:function(){this.$el.is("input")&&this.$el[0]===document.activeElement||(e=e!==this&&e||!1,clearTimeout(this.showTimer),clearInterval(this.hideTimer),this.$el.attr("aria-expanded",!1),this.toggleElement(this.tooltip,!1),this.tooltip&&this.tooltip.remove(),this.tooltip=!1,s.off("click."+this.$options.name))}},events:(f={blur:"hide"},f["focus "+u+" "+c]=function(t){t.type===c&&l(t)||this.show()},f[d]=function(t){l(t)||this.hide()},f)});var f}}function Ut(t){function e(t,e){return e.match(new RegExp("^"+t.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function i(t,e){for(var i=[],n=0;ni[t]?n.ratio(e,t,i[t]):e}),e},cover:function(e,i){var n=this;return e=this.fit(e,i),t.each(e,function(t){return e=e[t]0||navigator.pointerEnabled&&navigator.maxTouchPoints>0,de=ue?le?"touchstart":"pointerdown":"mousedown",fe=ue?le?"touchmove":"pointermove":"mousemove",pe=ue?le?"touchend":"pointerup":"mouseup",ge=ue&&he?"pointerenter":"mouseenter",me=ue&&he?"pointerleave":"mouseleave",ve=ue&&le?"touchcancel":"pointercancel",we=L("transition","transition-end"),ye=L("animation","animation-start"),be=L("animation","animation-end"),$e={reads:[],writes:[],measure:function(t){return this.reads.push(t),F(this),t},mutate:function(t){return this.writes.push(t),F(this),t},clear:function(t){return q(this.reads,t)||q(this.writes,t)}};Y.prototype={positions:[],position:null,init:function(){var t=this;this.positions=[],this.position=null;var e=!1;this.handler=function(i){e||setTimeout(function(){var n=Date.now(),o=t.positions.length;o&&n-t.positions[o-1].time>100&&t.positions.splice(0,o),t.positions.push({time:n,x:i.pageX,y:i.pageY}),t.positions.length>5&&t.positions.shift(),e=!1},5),e=!0},Gt.on("mousemove",this.handler)},cancel:function(){this.handler&&Gt.off("mousemove",this.handler)},movesTo:function(t){if(this.positions.length<2)return!1;var e=X(t),i=this.positions[this.positions.length-1],n=this.positions[0];if(e.left<=i.x&&i.x<=e.right&&e.top<=i.y&&i.y<=e.bottom)return!1;var o=[[{x:e.left,y:e.top},{x:e.right,y:e.bottom}],[{x:e.right,y:e.top},{x:e.left,y:e.bottom}]];return e.right<=i.x||(e.left>=i.x?(o[0].reverse(),o[1].reverse()):e.bottom<=i.y?o[0].reverse():e.top>=i.y&&o[1].reverse()),!!o.reduce(function(t,e){return t+(R(n,e[0])R(i,e[1]))},0)}};var xe={};xe.args=xe.created=xe.events=xe.init=xe.ready=xe.connected=xe.disconnected=xe.destroy=function(e,i){return e=e&&!t.isArray(e)?[e]:e,i?e?e.concat(i):t.isArray(i)?i:[i]:e},xe.update=function(e,i){return xe.args(e,t.isFunction(i)?{write:i}:i)},xe.props=function(e,i){return t.isArray(i)&&(i=i.reduce(function(t,e){return t[e]=String,t},{})),xe.methods(e,i)},xe.computed=xe.defaults=xe.methods=function(e,i){return i?e?t.extend(!0,{},e,i):i:e};var ke,Ce,Te,_e,Se,Ee=function(t,e){return T(e)?t:e},Ae={x:["width","left","right"],y:["height","top","bottom"]},Oe={};i(function(){var e,i,o,s=0,r=0;"MSGesture"in window&&(_e=new MSGesture,_e.target=document.body),n(document,"click",function(){return Se=!0},!0);var a=function(t){var e=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;e&&void 0!==Oe.el&&(Oe.el.trigger("swipe"),Oe.el.trigger("swipe"+e))};n(document,"MSGestureEnd",a),n(document,"gestureend",a),n(document,de,function(t){o=t.touches?t.touches[0]:t,e=Date.now(),i=e-(Oe.last||e),Oe.el=Vt("tagName"in o.target?o.target:o.target.parentNode),ke&&clearTimeout(ke),Oe.x1=o.pageX,Oe.y1=o.pageY,i>0&&i<=250&&(Oe.isDoubleTap=!0),Oe.last=e,!_e||"pointerdown"!==t.type&&"touchstart"!==t.type||_e.addPointer(t.pointerId),Se=t.button>0}),n(document,fe,function(t){o=t.touches?t.touches[0]:t,Oe.x2=o.pageX,Oe.y2=o.pageY,s+=Math.abs(Oe.x1-Oe.x2),r+=Math.abs(Oe.y1-Oe.y2)}),n(document,pe,function(){Oe.x2&&Math.abs(Oe.x1-Oe.x2)>30||Oe.y2&&Math.abs(Oe.y1-Oe.y2)>30?Te=setTimeout(function(){void 0!==Oe.el&&(Oe.el.trigger("swipe"),Oe.el.trigger("swipe"+et(Oe.x1,Oe.x2,Oe.y1,Oe.y2))),Oe={}},0):"last"in Oe&&(isNaN(s)||s<30&&r<30?Ce=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=it,void 0!==Oe.el&&Oe.el.trigger(e),Oe.isDoubleTap?(void 0!==Oe.el&&Oe.el.trigger("doubleTap"),Oe={}):ke=setTimeout(function(){ke=null,void 0!==Oe.el&&(Oe.el.trigger("singleTap"),Se||Oe.el.trigger("click")),Oe={}},300)}):Oe={},s=r=0)}),n(document,ve,it),n(window,"scroll",it)});var De=!1;n(document,"touchstart",function(){return De=!0},!0),n(document,"click",function(){De=!1}),n(document,"touchcancel",function(){return De=!1},!0);var Ie=Object.freeze({win:Xt,doc:Gt,docElement:Qt,isRtl:Jt,isReady:e,ready:i,on:n,off:o,transition:s,Transition:Zt,animate:r,Animation:Kt,isJQuery:a,isWithin:l,attrFilter:h,removeClass:c,createEvent:u,isInView:d,getIndex:f,isVoidElement:p,Dimensions:ee,query:g,Observer:re,requestAnimationFrame:ae,hasPromise:ce,hasTouch:ue,pointerDown:de,pointerMove:fe,pointerUp:pe,pointerEnter:ge,pointerLeave:me,pointerCancel:ve,transitionend:we,animationstart:ye,animationend:be,getStyle:M,getCssVar:j,fastdom:$e,$:Vt,bind:m,hasOwn:v,promise:w,classify:y,hyphenate:b,camelize:$,isString:k,isNumber:C,isUndefined:T,isContextSelector:_,getContextSelectors:S,toJQuery:E,toNode:A,toBoolean:O,toNumber:D,toList:I,toMedia:N,coerce:B,toMs:P,swap:H,ajax:t.ajax,contains:t.contains,each:t.each,Event:t.Event,extend:t.extend,map:t.map,merge:t.merge,isArray:t.isArray,isNumeric:t.isNumeric,isFunction:t.isFunction,isPlainObject:t.isPlainObject,MouseTracker:Y,mergeOptions:U,position:V,getDimensions:X,offsetTop:G,flipPosition:tt,isTouch:nt}),Ne=function(t){this._init(t)};Ne.util=Ie,Ne.data="__uikit__",Ne.prefix="uk-",Ne.options={},Ne.instances={},Ne.elements=[],function(t){var e=t.data;t.use=function(t){if(!t.installed)return t.call(null,this),t.installed=!0,this},t.mixin=function(e,i){i=(k(i)?t.components[i]:i)||this,e=U({},e),e.mixins=i.options.mixins,delete i.options.mixins,i.options=U(e,i.options)},t.extend=function(t){t=t||{};var e=this,i=t.name||e.options.name,n=ot(i||"UIkitComponent");return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.options=U(e.options,t),n.super=e,n.extend=e.extend,n},t.update=function(i,n,o){if(void 0===o&&(o=!1),i=u(i||"update"),!n)return void rt(t.instances,i);if(n=A(n),o)do{rt(n[e],i),n=n.parentNode}while(n);else st(n,function(t){return rt(t[e],i)})};var i;Object.defineProperty(t,"container",{get:function(){return i||document.body},set:function(t){i=t}})}(Ne),function(t){t.prototype._callHook=function(t){var e=this,i=this.$options[t];i&&i.forEach(function(t){return t.call(e)})},t.prototype._callReady=function(){this._isReady||(this._isReady=!0,this._callHook("ready"),this._callUpdate())},t.prototype._callConnected=function(){var e=this;this._connected||(~t.elements.indexOf(this.$options.el)||t.elements.push(this.$options.el),t.instances[this._uid]=this,this._initEvents(),this._callHook("connected"),this._connected=!0,this._initObserver(),this._isReady||i(function(){return e._callReady()}),this._callUpdate())},t.prototype._callDisconnected=function(){if(this._connected){this._observer&&(this._observer.disconnect(),this._observer=null);var e=t.elements.indexOf(this.$options.el);~e&&t.elements.splice(e,1),delete t.instances[this._uid],this._initEvents(!0),this._callHook("disconnected"),this._connected=!1}},t.prototype._callUpdate=function(t){var e=this;t=u(t||"update"),"update"===t.type&&(this._computeds={});var i=this.$options.update;i&&i.forEach(function(i,n){if("update"===t.type||i.events&&~i.events.indexOf(t.type)){if(t.sync)return i.read&&i.read.call(e,t),void(i.write&&i.write.call(e,t));i.read&&!~$e.reads.indexOf(e._frames.reads[n])&&(e._frames.reads[n]=$e.measure(function(){i.read.call(e,t),delete e._frames.reads[n]})),i.write&&!~$e.writes.indexOf(e._frames.writes[n])&&(e._frames.writes[n]=$e.mutate(function(){i.write.call(e,t),delete e._frames.writes[n]}))}})}}(Ne),function(e){var i=0;e.prototype.props={},e.prototype._init=function(t){t=t||{},t=this.$options=U(this.constructor.options,t,this),this.$el=null,this.$name=e.prefix+b(this.$options.name),this.$props={},this._uid=i++,this._initData(),this._initMethods(),this._initComputeds(),this._callHook("created"),this._frames={reads:{},writes:{}},t.el&&this.$mount(t.el)},e.prototype._initData=function(){var e=this,i=t.extend(!0,{},this.$options.defaults),n=this.$options.data||{},o=this.$options.args||[],s=this.$options.props||{};if(i){o.length&&t.isArray(n)&&(n=n.slice(0,o.length).reduce(function(e,i,n){return t.isPlainObject(i)?t.extend(e,i):e[o[n]]=i,e},{}));for(var r in i)e.$props[r]=e[r]=v(n,r)?B(s[r],n[r],e.$options.el):i[r]}},e.prototype._initMethods=function(){var t=this,e=this.$options.methods;if(e)for(var i in e)t[i]=m(e[i],t)},e.prototype._initComputeds=function(){var t=this,e=this.$options.computed;if(this._computeds={},e)for(var i in e)at(t,i,e[i])},e.prototype._initProps=function(e){var i=this;this._computeds={},t.extend(this.$props,e||this._getProps());var n=[this.$options.computed,this.$options.methods];for(var o in i.$props)ct(n,o)&&(i[o]=i.$props[o])},e.prototype._initEvents=function(t){var e=this,i=this.$options.events;i&&i.forEach(function(i){if(v(i,"handler"))lt(e,t,i);else for(var n in i)lt(e,t,i[n],n)})},e.prototype._initObserver=function(){var e=this;if(!this._observer&&this.$options.props&&this.$options.attrs&&re){var i=t.isArray(this.$options.attrs)?this.$options.attrs:Object.keys(this.$options.props).map(function(t){return b(t)});this._observer=new re(function(){var t=e._getProps();i.some(function(i){return!ut(t[i],e.$props[i])})&&e.$reset(t)}),this._observer.observe(this.$options.el,{attributes:!0,attributeFilter:i.concat([this.$name,"data-"+this.$name])})}},e.prototype._getProps=function(){var t,e,i={},n=this.$el[0],o=this.$options.args||[],s=this.$options.props||{},r=n.getAttribute(this.$name)||n.getAttribute("data-"+this.$name);if(!s)return i;for(t in s)if(e=b(t),n.hasAttribute(e)){var a=B(s[t],n.getAttribute(e),n);if("target"===e&&(!a||0===a.lastIndexOf("_",0)))continue;i[t]=a}if(!r)return i;if("{"===r[0])try{r=JSON.parse(r)}catch(t){console.warn("Invalid JSON."),r={}}else if(o.length&&!~r.indexOf(":")){l={},l[o[0]]=r,r=l;var l}else{var h={};r.split(";").forEach(function(t){var e=t.split(/:(.+)/),i=e[0],n=e[1];i&&n&&(h[i.trim()]=n.trim())}),r=h}for(t in r||{})e=$(t),void 0!==s[e]&&(i[e]=B(s[e],r[t],n));return i}}(Ne),function(t){var e=t.data;t.prototype.$mount=function(t){var i=this.$options.name;if(t[e]||(t[e]={}),t[e][i])return void console.warn('Component "'+i+'" is already mounted on element: ',t);t[e][i]=this,this.$el=Vt(t),this._initProps(),this._callHook("init"),document.documentElement.contains(t)&&this._callConnected()},t.prototype.$emit=function(t){this._callUpdate(t)},t.prototype.$emitSync=function(t){this._callUpdate(u(t||"update",!0,!1,{sync:!0}))},t.prototype.$update=function(e,i){t.update(e,this.$el,i)},t.prototype.$updateSync=function(t,e){this.$update(u(t||"update",!0,!1,{sync:!0}),e)},t.prototype.$reset=function(t){this._callDisconnected(),this._initProps(t),this._callConnected()},t.prototype.$destroy=function(t){void 0===t&&(t=!1);var i=this.$options.el;i&&this._callDisconnected(),this._callHook("destroy"),i&&i[e]&&(delete i[e][this.$options.name],Object.keys(i[e]).length||delete i[e],t&&this.$el.remove())}}(Ne),function(e){var i=e.data;e.components={},e.component=function(i,n){var o=$(i);return t.isPlainObject(n)?(n.name=o,n=e.extend(n)):n.options.name=o,e.components[o]=n,e[o]=function(i,n){for(var s=arguments.length,r=Array(s);s--;)r[s]=arguments[s];return t.isPlainObject(i)?new e.components[o]({data:i}):e.components[o].options.functional?new e.components[o]({data:[].concat(r)}):Vt(i).toArray().map(function(t){return e.getComponent(t,o)||new e.components[o]({el:t,data:n||{}})})[0]},e._initialized&&!n.options.functional&&$e.measure(function(){return e[o]("[uk-"+i+"],[data-uk-"+i+"]")}),e.components[o]},e.getComponents=function(t){return t&&(t=a(t)?t[0]:t)&&t[i]||{}},e.getComponent=function(t,i){return e.getComponents(t)[i]},e.connect=function(t){var n;if(t[i])for(n in t[i])t[i][n]._callConnected();for(var o=0;o',We='',ze='',qe='',Ye='',Re='',Ue='',Ve='',Xe='',Ge='',Qe='',Je='',Ze='',Ke='',ti='',ei={},ii=new DOMParser;return Ne.version="3.0.0-beta.22",function(t){t.mixin.class=He,t.mixin.modal=je,t.mixin.position=Le,t.mixin.togglable=Me}(Ne),function(t){var e,i,o,s=null,r=0;Xt.on("load",t.update).on("resize",function(e){o||(ae(function(){t.update(e),o=!1}),o=!0)}).on("scroll",function(n){null===s&&(s=0),s!==window.pageYOffset&&(e=s= 1; + } + + function isNodeCollection(obj) { + return toString.call(obj).match(/^\[object (NodeList|HTMLCollection)\]$/); + } + + function isBoolean(value) { + return typeof value === 'boolean'; + } + + function isString(value) { + return typeof value === 'string'; + } + + function isNumber(value) { + return typeof value === 'number'; + } + + function isNumeric(value) { + return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value)); + } + + function isEmpty(obj) { + return !(isArray(obj) + ? obj.length + : isObject(obj) + ? Object.keys(obj).length + : false + ); + } + + function isUndefined(value) { + return value === void 0; + } + + function toBoolean(value) { + return isBoolean(value) + ? value + : value === 'true' || value === '1' || value === '' + ? true + : value === 'false' || value === '0' + ? false + : value; + } + + function toNumber(value) { + var number = Number(value); + return !isNaN(number) ? number : false; + } + + function toFloat(value) { + return parseFloat(value) || 0; + } + + function toNode(element) { + return isNode(element) || isWindow(element) || isDocument(element) + ? element + : isNodeCollection(element) || isJQuery(element) + ? element[0] + : isArray(element) + ? toNode(element[0]) + : null; + } + + function toNodes(element) { + return isNode(element) + ? [element] + : isNodeCollection(element) + ? arrPrototype.slice.call(element) + : isArray(element) + ? element.map(toNode).filter(Boolean) + : isJQuery(element) + ? element.toArray() + : []; + } + + function toList(value) { + return isArray(value) + ? value + : isString(value) + ? value.split(/,(?![^(]*\))/).map(function (value) { return isNumeric(value) + ? toNumber(value) + : toBoolean(value.trim()); }) + : [value]; + } + + function toMs(time) { + return !time + ? 0 + : endsWith(time, 'ms') + ? toFloat(time) + : toFloat(time) * 1000; + } + + function isEqual(value, other) { + return value === other + || isObject(value) + && isObject(other) + && Object.keys(value).length === Object.keys(other).length + && each(value, function (val, key) { return val === other[key]; }); + } + + function swap(value, a, b) { + return value.replace(new RegExp((a + "|" + b), 'mg'), function (match) { + return match === a ? b : a; + }); + } + + var assign = Object.assign || function (target) { + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + + target = Object(target); + for (var i = 0; i < args.length; i++) { + var source = args[i]; + if (source !== null) { + for (var key in source) { + if (hasOwn(source, key)) { + target[key] = source[key]; + } + } + } + } + return target; + }; + + function last(array) { + return array[array.length - 1]; + } + + function each(obj, cb) { + for (var key in obj) { + if (false === cb(obj[key], key)) { + return false; + } + } + return true; + } + + function sortBy(array, prop) { + return array.sort(function (ref, ref$1) { + var propA = ref[prop]; if ( propA === void 0 ) propA = 0; + var propB = ref$1[prop]; if ( propB === void 0 ) propB = 0; + + return propA > propB + ? 1 + : propB > propA + ? -1 + : 0; + } + ); + } + + function uniqueBy(array, prop) { + var seen = new Set(); + return array.filter(function (ref) { + var check = ref[prop]; + + return seen.has(check) + ? false + : seen.add(check) || true; + } // IE 11 does not return the Set object + ); + } + + function clamp(number, min, max) { + if ( min === void 0 ) min = 0; + if ( max === void 0 ) max = 1; + + return Math.min(Math.max(toNumber(number) || 0, min), max); + } + + function noop() {} + + function intersectRect(r1, r2) { + return r1.left < r2.right && + r1.right > r2.left && + r1.top < r2.bottom && + r1.bottom > r2.top; + } + + function pointInRect(point, rect) { + return point.x <= rect.right && + point.x >= rect.left && + point.y <= rect.bottom && + point.y >= rect.top; + } + + var Dimensions = { + + ratio: function(dimensions, prop, value) { + var obj; + + + var aProp = prop === 'width' ? 'height' : 'width'; + + return ( obj = {}, obj[aProp] = dimensions[prop] ? Math.round(value * dimensions[aProp] / dimensions[prop]) : dimensions[aProp], obj[prop] = value, obj ); + }, + + contain: function(dimensions, maxDimensions) { + var this$1 = this; + + dimensions = assign({}, dimensions); + + each(dimensions, function (_, prop) { return dimensions = dimensions[prop] > maxDimensions[prop] + ? this$1.ratio(dimensions, prop, maxDimensions[prop]) + : dimensions; } + ); + + return dimensions; + }, + + cover: function(dimensions, maxDimensions) { + var this$1 = this; + + dimensions = this.contain(dimensions, maxDimensions); + + each(dimensions, function (_, prop) { return dimensions = dimensions[prop] < maxDimensions[prop] + ? this$1.ratio(dimensions, prop, maxDimensions[prop]) + : dimensions; } + ); + + return dimensions; + } + + }; + + function attr(element, name, value) { + + if (isObject(name)) { + for (var key in name) { + attr(element, key, name[key]); + } + return; + } + + if (isUndefined(value)) { + element = toNode(element); + return element && element.getAttribute(name); + } else { + toNodes(element).forEach(function (element) { + + if (isFunction(value)) { + value = value.call(element, attr(element, name)); + } + + if (value === null) { + removeAttr(element, name); + } else { + element.setAttribute(name, value); + } + }); + } + + } + + function hasAttr(element, name) { + return toNodes(element).some(function (element) { return element.hasAttribute(name); }); + } + + function removeAttr(element, name) { + element = toNodes(element); + name.split(' ').forEach(function (name) { return element.forEach(function (element) { return element.hasAttribute(name) && element.removeAttribute(name); } + ); } + ); + } + + function data(element, attribute) { + for (var i = 0, attrs = [attribute, ("data-" + attribute)]; i < attrs.length; i++) { + if (hasAttr(element, attrs[i])) { + return attr(element, attrs[i]); + } + } + } + + /* global DocumentTouch */ + + var isIE = /msie|trident/i.test(window.navigator.userAgent); + var isRtl = attr(document.documentElement, 'dir') === 'rtl'; + + var hasTouchEvents = 'ontouchstart' in window; + var hasPointerEvents = window.PointerEvent; + var hasTouch = hasTouchEvents + || window.DocumentTouch && document instanceof DocumentTouch + || navigator.maxTouchPoints; // IE >=11 + + var pointerDown = hasPointerEvents ? 'pointerdown' : hasTouchEvents ? 'touchstart' : 'mousedown'; + var pointerMove = hasPointerEvents ? 'pointermove' : hasTouchEvents ? 'touchmove' : 'mousemove'; + var pointerUp = hasPointerEvents ? 'pointerup' : hasTouchEvents ? 'touchend' : 'mouseup'; + var pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouchEvents ? '' : 'mouseenter'; + var pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouchEvents ? '' : 'mouseleave'; + var pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel'; + + function query(selector, context) { + return toNode(selector) || find(selector, getContext(selector, context)); + } + + function queryAll(selector, context) { + var nodes = toNodes(selector); + return nodes.length && nodes || findAll(selector, getContext(selector, context)); + } + + function getContext(selector, context) { + if ( context === void 0 ) context = document; + + return isContextSelector(selector) || isDocument(context) + ? context + : context.ownerDocument; + } + + function find(selector, context) { + return toNode(_query(selector, context, 'querySelector')); + } + + function findAll(selector, context) { + return toNodes(_query(selector, context, 'querySelectorAll')); + } + + function _query(selector, context, queryFn) { + if ( context === void 0 ) context = document; + + + if (!selector || !isString(selector)) { + return null; + } + + selector = selector.replace(contextSanitizeRe, '$1 *'); + + var removes; + + if (isContextSelector(selector)) { + + removes = []; + + selector = splitSelector(selector).map(function (selector, i) { + + var ctx = context; + + if (selector[0] === '!') { + + var selectors = selector.substr(1).trim().split(' '); + ctx = closest(context.parentNode, selectors[0]); + selector = selectors.slice(1).join(' ').trim(); + + } + + if (selector[0] === '-') { + + var selectors$1 = selector.substr(1).trim().split(' '); + var prev = (ctx || context).previousElementSibling; + ctx = matches(prev, selector.substr(1)) ? prev : null; + selector = selectors$1.slice(1).join(' '); + + } + + if (!ctx) { + return null; + } + + if (!ctx.id) { + ctx.id = "uk-" + (Date.now()) + i; + removes.push(function () { return removeAttr(ctx, 'id'); }); + } + + return ("#" + (escape(ctx.id)) + " " + selector); + + }).filter(Boolean).join(','); + + context = document; + + } + + try { + + return context[queryFn](selector); + + } catch (e) { + + return null; + + } finally { + + removes && removes.forEach(function (remove) { return remove(); }); + + } + + } + + var contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/; + var contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g; + + function isContextSelector(selector) { + return isString(selector) && selector.match(contextSelectorRe); + } + + var selectorRe = /.*?[^\\](?:,|$)/g; + + function splitSelector(selector) { + return selector.match(selectorRe).map(function (selector) { return selector.replace(/,$/, '').trim(); }); + } + + var elProto = Element.prototype; + var matchesFn = elProto.matches || elProto.webkitMatchesSelector || elProto.msMatchesSelector; + + function matches(element, selector) { + return toNodes(element).some(function (element) { return matchesFn.call(element, selector); }); + } + + var closestFn = elProto.closest || function (selector) { + var ancestor = this; + + do { + + if (matches(ancestor, selector)) { + return ancestor; + } + + ancestor = ancestor.parentNode; + + } while (ancestor && ancestor.nodeType === 1); + }; + + function closest(element, selector) { + + if (startsWith(selector, '>')) { + selector = selector.slice(1); + } + + return isNode(element) + ? closestFn.call(element, selector) + : toNodes(element).map(function (element) { return closest(element, selector); }).filter(Boolean); + } + + function parents(element, selector) { + var elements = []; + element = toNode(element); + + while ((element = element.parentNode) && element.nodeType === 1) { + if (matches(element, selector)) { + elements.push(element); + } + } + + return elements; + } + + var escapeFn = window.CSS && CSS.escape || function (css) { return css.replace(/([^\x7f-\uFFFF\w-])/g, function (match) { return ("\\" + match); }); }; + function escape(css) { + return isString(css) ? escapeFn.call(null, css) : ''; + } + + var voidElements = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + menuitem: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true + }; + function isVoidElement(element) { + return toNodes(element).some(function (element) { return voidElements[element.tagName.toLowerCase()]; }); + } + + function isVisible(element) { + return toNodes(element).some(function (element) { return element.offsetWidth || element.offsetHeight || element.getClientRects().length; }); + } + + var selInput = 'input,select,textarea,button'; + function isInput(element) { + return toNodes(element).some(function (element) { return matches(element, selInput); }); + } + + function filter(element, selector) { + return toNodes(element).filter(function (element) { return matches(element, selector); }); + } + + function within(element, selector) { + return !isString(selector) + ? element === selector || (isDocument(selector) + ? selector.documentElement + : toNode(selector)).contains(toNode(element)) // IE 11 document does not implement contains + : matches(element, selector) || closest(element, selector); + } + + function on() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + + var ref = getArgs(args); + var targets = ref[0]; + var type = ref[1]; + var selector = ref[2]; + var listener = ref[3]; + var useCapture = ref[4]; + + targets = toEventTargets(targets); + + if (listener.length > 1) { + listener = detail(listener); + } + + if (useCapture && useCapture.self) { + listener = selfFilter(listener); + } + + if (selector) { + listener = delegate(targets, selector, listener); + } + + useCapture = useCaptureFilter(useCapture); + + type.split(' ').forEach(function (type) { return targets.forEach(function (target) { return target.addEventListener(type, listener, useCapture); } + ); } + ); + return function () { return off(targets, type, listener, useCapture); }; + } + + function off(targets, type, listener, useCapture) { + if ( useCapture === void 0 ) useCapture = false; + + useCapture = useCaptureFilter(useCapture); + targets = toEventTargets(targets); + type.split(' ').forEach(function (type) { return targets.forEach(function (target) { return target.removeEventListener(type, listener, useCapture); } + ); } + ); + } + + function once() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + + var ref = getArgs(args); + var element = ref[0]; + var type = ref[1]; + var selector = ref[2]; + var listener = ref[3]; + var useCapture = ref[4]; + var condition = ref[5]; + var off = on(element, type, selector, function (e) { + var result = !condition || condition(e); + if (result) { + off(); + listener(e, result); + } + }, useCapture); + + return off; + } + + function trigger(targets, event, detail) { + return toEventTargets(targets).reduce(function (notCanceled, target) { return notCanceled && target.dispatchEvent(createEvent(event, true, true, detail)); } + , true); + } + + function createEvent(e, bubbles, cancelable, detail) { + if ( bubbles === void 0 ) bubbles = true; + if ( cancelable === void 0 ) cancelable = false; + + if (isString(e)) { + var event = document.createEvent('CustomEvent'); // IE 11 + event.initCustomEvent(e, bubbles, cancelable, detail); + e = event; + } + + return e; + } + + function getArgs(args) { + if (isFunction(args[2])) { + args.splice(2, 0, false); + } + return args; + } + + function delegate(delegates, selector, listener) { + var this$1 = this; + + return function (e) { + + delegates.forEach(function (delegate) { + + var current = selector[0] === '>' + ? findAll(selector, delegate).reverse().filter(function (element) { return within(e.target, element); })[0] + : closest(e.target, selector); + + if (current) { + e.delegate = delegate; + e.current = current; + + listener.call(this$1, e); + } + + }); + + }; + } + + function detail(listener) { + return function (e) { return isArray(e.detail) ? listener.apply(void 0, [e].concat(e.detail)) : listener(e); }; + } + + function selfFilter(listener) { + return function (e) { + if (e.target === e.currentTarget || e.target === e.current) { + return listener.call(null, e); + } + }; + } + + function useCaptureFilter(options) { + return options && isIE && !isBoolean(options) + ? !!options.capture + : options; + } + + function isEventTarget(target) { + return target && 'addEventListener' in target; + } + + function toEventTarget(target) { + return isEventTarget(target) ? target : toNode(target); + } + + function toEventTargets(target) { + return isArray(target) + ? target.map(toEventTarget).filter(Boolean) + : isString(target) + ? findAll(target) + : isEventTarget(target) + ? [target] + : toNodes(target); + } + + function isTouch(e) { + return e.pointerType === 'touch' || !!e.touches; + } + + function getEventPos(e, prop) { + if ( prop === void 0 ) prop = 'client'; + + var touches = e.touches; + var changedTouches = e.changedTouches; + var ref = touches && touches[0] || changedTouches && changedTouches[0] || e; + var x = ref[(prop + "X")]; + var y = ref[(prop + "Y")]; + + return {x: x, y: y}; + } + + /* global setImmediate */ + + var Promise = 'Promise' in window ? window.Promise : PromiseFn; + + var Deferred = function() { + var this$1 = this; + + this.promise = new Promise(function (resolve, reject) { + this$1.reject = reject; + this$1.resolve = resolve; + }); + }; + + /** + * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) + */ + + var RESOLVED = 0; + var REJECTED = 1; + var PENDING = 2; + + var async = 'setImmediate' in window ? setImmediate : setTimeout; + + function PromiseFn(executor) { + + this.state = PENDING; + this.value = undefined; + this.deferred = []; + + var promise = this; + + try { + executor( + function (x) { + promise.resolve(x); + }, + function (r) { + promise.reject(r); + } + ); + } catch (e) { + promise.reject(e); + } + } + + PromiseFn.reject = function (r) { + return new PromiseFn(function (resolve, reject) { + reject(r); + }); + }; + + PromiseFn.resolve = function (x) { + return new PromiseFn(function (resolve, reject) { + resolve(x); + }); + }; + + PromiseFn.all = function all(iterable) { + return new PromiseFn(function (resolve, reject) { + var result = []; + var count = 0; + + if (iterable.length === 0) { + resolve(result); + } + + function resolver(i) { + return function (x) { + result[i] = x; + count += 1; + + if (count === iterable.length) { + resolve(result); + } + }; + } + + for (var i = 0; i < iterable.length; i += 1) { + PromiseFn.resolve(iterable[i]).then(resolver(i), reject); + } + }); + }; + + PromiseFn.race = function race(iterable) { + return new PromiseFn(function (resolve, reject) { + for (var i = 0; i < iterable.length; i += 1) { + PromiseFn.resolve(iterable[i]).then(resolve, reject); + } + }); + }; + + var p = PromiseFn.prototype; + + p.resolve = function resolve(x) { + var promise = this; + + if (promise.state === PENDING) { + if (x === promise) { + throw new TypeError('Promise settled with itself.'); + } + + var called = false; + + try { + var then = x && x.then; + + if (x !== null && isObject(x) && isFunction(then)) { + then.call( + x, + function (x) { + if (!called) { + promise.resolve(x); + } + called = true; + }, + function (r) { + if (!called) { + promise.reject(r); + } + called = true; + } + ); + return; + } + } catch (e) { + if (!called) { + promise.reject(e); + } + return; + } + + promise.state = RESOLVED; + promise.value = x; + promise.notify(); + } + }; + + p.reject = function reject(reason) { + var promise = this; + + if (promise.state === PENDING) { + if (reason === promise) { + throw new TypeError('Promise settled with itself.'); + } + + promise.state = REJECTED; + promise.value = reason; + promise.notify(); + } + }; + + p.notify = function notify() { + var this$1 = this; + + async(function () { + if (this$1.state !== PENDING) { + while (this$1.deferred.length) { + var ref = this$1.deferred.shift(); + var onResolved = ref[0]; + var onRejected = ref[1]; + var resolve = ref[2]; + var reject = ref[3]; + + try { + if (this$1.state === RESOLVED) { + if (isFunction(onResolved)) { + resolve(onResolved.call(undefined, this$1.value)); + } else { + resolve(this$1.value); + } + } else if (this$1.state === REJECTED) { + if (isFunction(onRejected)) { + resolve(onRejected.call(undefined, this$1.value)); + } else { + reject(this$1.value); + } + } + } catch (e) { + reject(e); + } + } + } + }); + }; + + p.then = function then(onResolved, onRejected) { + var this$1 = this; + + return new PromiseFn(function (resolve, reject) { + this$1.deferred.push([onResolved, onRejected, resolve, reject]); + this$1.notify(); + }); + }; + + p.catch = function (onRejected) { + return this.then(undefined, onRejected); + }; + + function ajax(url, options) { + return new Promise(function (resolve, reject) { + + var env = assign({ + data: null, + method: 'GET', + headers: {}, + xhr: new XMLHttpRequest(), + beforeSend: noop, + responseType: '' + }, options); + + env.beforeSend(env); + + var xhr = env.xhr; + + for (var prop in env) { + if (prop in xhr) { + try { + + xhr[prop] = env[prop]; + + } catch (e) {} + } + } + + xhr.open(env.method.toUpperCase(), url); + + for (var header in env.headers) { + xhr.setRequestHeader(header, env.headers[header]); + } + + on(xhr, 'load', function () { + + if (xhr.status === 0 || xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) { + resolve(xhr); + } else { + reject(assign(Error(xhr.statusText), { + xhr: xhr, + status: xhr.status + })); + } + + }); + + on(xhr, 'error', function () { return reject(assign(Error('Network Error'), {xhr: xhr})); }); + on(xhr, 'timeout', function () { return reject(assign(Error('Network Timeout'), {xhr: xhr})); }); + + xhr.send(env.data); + }); + } + + function getImage(src, srcset, sizes) { + + return new Promise(function (resolve, reject) { + var img = new Image(); + + img.onerror = reject; + img.onload = function () { return resolve(img); }; + + sizes && (img.sizes = sizes); + srcset && (img.srcset = srcset); + img.src = src; + }); + + } + + function ready(fn) { + + if (document.readyState !== 'loading') { + fn(); + return; + } + + var unbind = on(document, 'DOMContentLoaded', function () { + unbind(); + fn(); + }); + } + + function index(element, ref) { + return ref + ? toNodes(element).indexOf(toNode(ref)) + : toNodes((element = toNode(element)) && element.parentNode.children).indexOf(element); + } + + function getIndex(i, elements, current, finite) { + if ( current === void 0 ) current = 0; + if ( finite === void 0 ) finite = false; + + + elements = toNodes(elements); + + var length = elements.length; + + i = isNumeric(i) + ? toNumber(i) + : i === 'next' + ? current + 1 + : i === 'previous' + ? current - 1 + : index(elements, i); + + if (finite) { + return clamp(i, 0, length - 1); + } + + i %= length; + + return i < 0 ? i + length : i; + } + + function empty(element) { + element = $(element); + element.innerHTML = ''; + return element; + } + + function html(parent, html) { + parent = $(parent); + return isUndefined(html) + ? parent.innerHTML + : append(parent.hasChildNodes() ? empty(parent) : parent, html); + } + + function prepend(parent, element) { + + parent = $(parent); + + if (!parent.hasChildNodes()) { + return append(parent, element); + } else { + return insertNodes(element, function (element) { return parent.insertBefore(element, parent.firstChild); }); + } + } + + function append(parent, element) { + parent = $(parent); + return insertNodes(element, function (element) { return parent.appendChild(element); }); + } + + function before(ref, element) { + ref = $(ref); + return insertNodes(element, function (element) { return ref.parentNode.insertBefore(element, ref); }); + } + + function after(ref, element) { + ref = $(ref); + return insertNodes(element, function (element) { return ref.nextSibling + ? before(ref.nextSibling, element) + : append(ref.parentNode, element); } + ); + } + + function insertNodes(element, fn) { + element = isString(element) ? fragment(element) : element; + return element + ? 'length' in element + ? toNodes(element).map(fn) + : fn(element) + : null; + } + + function remove(element) { + toNodes(element).map(function (element) { return element.parentNode && element.parentNode.removeChild(element); }); + } + + function wrapAll(element, structure) { + + structure = toNode(before(element, structure)); + + while (structure.firstChild) { + structure = structure.firstChild; + } + + append(structure, element); + + return structure; + } + + function wrapInner(element, structure) { + return toNodes(toNodes(element).map(function (element) { return element.hasChildNodes ? wrapAll(toNodes(element.childNodes), structure) : append(element, structure); } + )); + } + + function unwrap(element) { + toNodes(element) + .map(function (element) { return element.parentNode; }) + .filter(function (value, index, self) { return self.indexOf(value) === index; }) + .forEach(function (parent) { + before(parent, parent.childNodes); + remove(parent); + }); + } + + var fragmentRe = /^\s*<(\w+|!)[^>]*>/; + var singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/; + + function fragment(html) { + + var matches = singleTagRe.exec(html); + if (matches) { + return document.createElement(matches[1]); + } + + var container = document.createElement('div'); + if (fragmentRe.test(html)) { + container.insertAdjacentHTML('beforeend', html.trim()); + } else { + container.textContent = html; + } + + return container.childNodes.length > 1 ? toNodes(container.childNodes) : container.firstChild; + + } + + function apply(node, fn) { + + if (!node || node.nodeType !== 1) { + return; + } + + fn(node); + node = node.firstElementChild; + while (node) { + apply(node, fn); + node = node.nextElementSibling; + } + } + + function $(selector, context) { + return !isString(selector) + ? toNode(selector) + : isHtml(selector) + ? toNode(fragment(selector)) + : find(selector, context); + } + + function $$(selector, context) { + return !isString(selector) + ? toNodes(selector) + : isHtml(selector) + ? toNodes(fragment(selector)) + : findAll(selector, context); + } + + function isHtml(str) { + return str[0] === '<' || str.match(/^\s* 0 ) args[ len ] = arguments[ len + 1 ]; + + apply$1(element, args, 'add'); + } + + function removeClass(element) { + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + + apply$1(element, args, 'remove'); + } + + function removeClasses(element, cls) { + attr(element, 'class', function (value) { return (value || '').replace(new RegExp(("\\b" + cls + "\\b"), 'g'), ''); }); + } + + function replaceClass(element) { + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + + args[0] && removeClass(element, args[0]); + args[1] && addClass(element, args[1]); + } + + function hasClass(element, cls) { + return cls && toNodes(element).some(function (element) { return element.classList.contains(cls.split(' ')[0]); }); + } + + function toggleClass(element) { + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + + + if (!args.length) { + return; + } + + args = getArgs$1(args); + + var force = !isString(last(args)) ? args.pop() : []; // in iOS 9.3 force === undefined evaluates to false + + args = args.filter(Boolean); + + toNodes(element).forEach(function (ref) { + var classList = ref.classList; + + for (var i = 0; i < args.length; i++) { + supports.Force + ? classList.toggle.apply(classList, [args[i]].concat(force)) + : (classList[(!isUndefined(force) ? force : !classList.contains(args[i])) ? 'add' : 'remove'](args[i])); + } + }); + + } + + function apply$1(element, args, fn) { + args = getArgs$1(args).filter(Boolean); + + args.length && toNodes(element).forEach(function (ref) { + var classList = ref.classList; + + supports.Multiple + ? classList[fn].apply(classList, args) + : args.forEach(function (cls) { return classList[fn](cls); }); + }); + } + + function getArgs$1(args) { + return args.reduce(function (args, arg) { return args.concat.call(args, isString(arg) && includes(arg, ' ') ? arg.trim().split(' ') : arg); } + , []); + } + + // IE 11 + var supports = { + + get Multiple() { + return this.get('_multiple'); + }, + + get Force() { + return this.get('_force'); + }, + + get: function(key) { + + if (!hasOwn(this, key)) { + var ref = document.createElement('_'); + var classList = ref.classList; + classList.add('a', 'b'); + classList.toggle('c', false); + this._multiple = classList.contains('b'); + this._force = !classList.contains('c'); + } + + return this[key]; + } + + }; + + var cssNumber = { + 'animation-iteration-count': true, + 'column-count': true, + 'fill-opacity': true, + 'flex-grow': true, + 'flex-shrink': true, + 'font-weight': true, + 'line-height': true, + 'opacity': true, + 'order': true, + 'orphans': true, + 'stroke-dasharray': true, + 'stroke-dashoffset': true, + 'widows': true, + 'z-index': true, + 'zoom': true + }; + + function css(element, property, value) { + + return toNodes(element).map(function (element) { + + if (isString(property)) { + + property = propName(property); + + if (isUndefined(value)) { + return getStyle(element, property); + } else if (!value && !isNumber(value)) { + element.style.removeProperty(property); + } else { + element.style[property] = isNumeric(value) && !cssNumber[property] ? (value + "px") : value; + } + + } else if (isArray(property)) { + + var styles = getStyles(element); + + return property.reduce(function (props, property) { + props[property] = styles[propName(property)]; + return props; + }, {}); + + } else if (isObject(property)) { + each(property, function (value, property) { return css(element, property, value); }); + } + + return element; + + })[0]; + + } + + function getStyles(element, pseudoElt) { + element = toNode(element); + return element.ownerDocument.defaultView.getComputedStyle(element, pseudoElt); + } + + function getStyle(element, property, pseudoElt) { + return getStyles(element, pseudoElt)[property]; + } + + var vars = {}; + + function getCssVar(name) { + + var docEl = document.documentElement; + + if (!isIE) { + return getStyles(docEl).getPropertyValue(("--uk-" + name)); + } + + if (!(name in vars)) { + + /* usage in css: .uk-name:before { content:"xyz" } */ + + var element = append(docEl, document.createElement('div')); + + addClass(element, ("uk-" + name)); + + vars[name] = getStyle(element, 'content', ':before').replace(/^["'](.*)["']$/, '$1'); + + remove(element); + + } + + return vars[name]; + + } + + var cssProps = {}; + + function propName(name) { + + var ret = cssProps[name]; + if (!ret) { + ret = cssProps[name] = vendorPropName(name) || name; + } + return ret; + } + + var cssPrefixes = ['webkit', 'moz', 'ms']; + + function vendorPropName(name) { + + name = hyphenate(name); + + var ref = document.documentElement; + var style = ref.style; + + if (name in style) { + return name; + } + + var i = cssPrefixes.length, prefixedName; + + while (i--) { + prefixedName = "-" + (cssPrefixes[i]) + "-" + name; + if (prefixedName in style) { + return prefixedName; + } + } + } + + function transition(element, props, duration, timing) { + if ( duration === void 0 ) duration = 400; + if ( timing === void 0 ) timing = 'linear'; + + + return Promise.all(toNodes(element).map(function (element) { return new Promise(function (resolve, reject) { + + for (var name in props) { + var value = css(element, name); + if (value === '') { + css(element, name, value); + } + } + + var timer = setTimeout(function () { return trigger(element, 'transitionend'); }, duration); + + once(element, 'transitionend transitioncanceled', function (ref) { + var type = ref.type; + + clearTimeout(timer); + removeClass(element, 'uk-transition'); + css(element, { + 'transition-property': '', + 'transition-duration': '', + 'transition-timing-function': '' + }); + type === 'transitioncanceled' ? reject() : resolve(); + }, {self: true}); + + addClass(element, 'uk-transition'); + css(element, assign({ + 'transition-property': Object.keys(props).map(propName).join(','), + 'transition-duration': (duration + "ms"), + 'transition-timing-function': timing + }, props)); + + }); } + )); + + } + + var Transition = { + + start: transition, + + stop: function(element) { + trigger(element, 'transitionend'); + return Promise.resolve(); + }, + + cancel: function(element) { + trigger(element, 'transitioncanceled'); + }, + + inProgress: function(element) { + return hasClass(element, 'uk-transition'); + } + + }; + + var animationPrefix = 'uk-animation-'; + var clsCancelAnimation = 'uk-cancel-animation'; + + function animate(element, animation, duration, origin, out) { + var arguments$1 = arguments; + if ( duration === void 0 ) duration = 200; + + + return Promise.all(toNodes(element).map(function (element) { return new Promise(function (resolve, reject) { + + if (hasClass(element, clsCancelAnimation)) { + requestAnimationFrame(function () { return Promise.resolve().then(function () { return animate.apply(void 0, arguments$1).then(resolve, reject); } + ); } + ); + return; + } + + var cls = animation + " " + animationPrefix + (out ? 'leave' : 'enter'); + + if (startsWith(animation, animationPrefix)) { + + if (origin) { + cls += " uk-transform-origin-" + origin; + } + + if (out) { + cls += " " + animationPrefix + "reverse"; + } + + } + + reset(); + + once(element, 'animationend animationcancel', function (ref) { + var type = ref.type; + + + var hasReset = false; + + if (type === 'animationcancel') { + reject(); + reset(); + } else { + resolve(); + Promise.resolve().then(function () { + hasReset = true; + reset(); + }); + } + + requestAnimationFrame(function () { + if (!hasReset) { + addClass(element, clsCancelAnimation); + + requestAnimationFrame(function () { return removeClass(element, clsCancelAnimation); }); + } + }); + + }, {self: true}); + + css(element, 'animationDuration', (duration + "ms")); + addClass(element, cls); + + function reset() { + css(element, 'animationDuration', ''); + removeClasses(element, (animationPrefix + "\\S*")); + } + + }); } + )); + + } + + var inProgress = new RegExp((animationPrefix + "(enter|leave)")); + var Animation = { + + in: function(element, animation, duration, origin) { + return animate(element, animation, duration, origin, false); + }, + + out: function(element, animation, duration, origin) { + return animate(element, animation, duration, origin, true); + }, + + inProgress: function(element) { + return inProgress.test(attr(element, 'class')); + }, + + cancel: function(element) { + trigger(element, 'animationcancel'); + } + + }; + + var dirs = { + width: ['x', 'left', 'right'], + height: ['y', 'top', 'bottom'] + }; + + function positionAt(element, target, elAttach, targetAttach, elOffset, targetOffset, flip, boundary) { + + elAttach = getPos(elAttach); + targetAttach = getPos(targetAttach); + + var flipped = {element: elAttach, target: targetAttach}; + + if (!element || !target) { + return flipped; + } + + var dim = getDimensions(element); + var targetDim = getDimensions(target); + var position = targetDim; + + moveTo(position, elAttach, dim, -1); + moveTo(position, targetAttach, targetDim, 1); + + elOffset = getOffsets(elOffset, dim.width, dim.height); + targetOffset = getOffsets(targetOffset, targetDim.width, targetDim.height); + + elOffset['x'] += targetOffset['x']; + elOffset['y'] += targetOffset['y']; + + position.left += elOffset['x']; + position.top += elOffset['y']; + + if (flip) { + + var boundaries = [getDimensions(getWindow(element))]; + + if (boundary) { + boundaries.unshift(getDimensions(boundary)); + } + + each(dirs, function (ref, prop) { + var dir = ref[0]; + var align = ref[1]; + var alignFlip = ref[2]; + + + if (!(flip === true || includes(flip, dir))) { + return; + } + + boundaries.some(function (boundary) { + + var elemOffset = elAttach[dir] === align + ? -dim[prop] + : elAttach[dir] === alignFlip + ? dim[prop] + : 0; + + var targetOffset = targetAttach[dir] === align + ? targetDim[prop] + : targetAttach[dir] === alignFlip + ? -targetDim[prop] + : 0; + + if (position[align] < boundary[align] || position[align] + dim[prop] > boundary[alignFlip]) { + + var centerOffset = dim[prop] / 2; + var centerTargetOffset = targetAttach[dir] === 'center' ? -targetDim[prop] / 2 : 0; + + return elAttach[dir] === 'center' && ( + apply(centerOffset, centerTargetOffset) + || apply(-centerOffset, -centerTargetOffset) + ) || apply(elemOffset, targetOffset); + + } + + function apply(elemOffset, targetOffset) { + + var newVal = position[align] + elemOffset + targetOffset - elOffset[dir] * 2; + + if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) { + position[align] = newVal; + + ['element', 'target'].forEach(function (el) { + flipped[el][dir] = !elemOffset + ? flipped[el][dir] + : flipped[el][dir] === dirs[prop][1] + ? dirs[prop][2] + : dirs[prop][1]; + }); + + return true; + } + + } + + }); + + }); + } + + offset(element, position); + + return flipped; + } + + function offset(element, coordinates) { + + element = toNode(element); + + if (coordinates) { + + var currentOffset = offset(element); + var pos = css(element, 'position'); + + ['left', 'top'].forEach(function (prop) { + if (prop in coordinates) { + var value = css(element, prop); + css(element, prop, coordinates[prop] - currentOffset[prop] + + toFloat(pos === 'absolute' && value === 'auto' + ? position(element)[prop] + : value) + ); + } + }); + + return; + } + + return getDimensions(element); + } + + function getDimensions(element) { + + element = toNode(element); + + if (!element) { + return {}; + } + + var ref = getWindow(element); + var top = ref.pageYOffset; + var left = ref.pageXOffset; + + if (isWindow(element)) { + + var height = element.innerHeight; + var width = element.innerWidth; + + return { + top: top, + left: left, + height: height, + width: width, + bottom: top + height, + right: left + width + }; + } + + var style, hidden; + + if (!isVisible(element) && css(element, 'display') === 'none') { + + style = attr(element, 'style'); + hidden = attr(element, 'hidden'); + + attr(element, { + style: ((style || '') + ";display:block !important;"), + hidden: null + }); + } + + var rect = element.getBoundingClientRect(); + + if (!isUndefined(style)) { + attr(element, {style: style, hidden: hidden}); + } + + return { + height: rect.height, + width: rect.width, + top: rect.top + top, + left: rect.left + left, + bottom: rect.bottom + top, + right: rect.right + left + }; + } + + function position(element) { + element = toNode(element); + + var parent = element.offsetParent || getDocEl(element); + var parentOffset = offset(parent); + var ref = ['top', 'left'].reduce(function (props, prop) { + var propName = ucfirst(prop); + props[prop] -= parentOffset[prop] + + toFloat(css(element, ("margin" + propName))) + + toFloat(css(parent, ("border" + propName + "Width"))); + return props; + }, offset(element)); + var top = ref.top; + var left = ref.left; + + return {top: top, left: left}; + } + + var height = dimension('height'); + var width = dimension('width'); + + function dimension(prop) { + var propName = ucfirst(prop); + return function (element, value) { + + element = toNode(element); + + if (isUndefined(value)) { + + if (isWindow(element)) { + return element[("inner" + propName)]; + } + + if (isDocument(element)) { + var doc = element.documentElement; + return Math.max(doc[("offset" + propName)], doc[("scroll" + propName)]); + } + + value = css(element, prop); + value = value === 'auto' ? element[("offset" + propName)] : toFloat(value) || 0; + + return value - boxModelAdjust(prop, element); + + } else { + + css(element, prop, !value && value !== 0 + ? '' + : +value + boxModelAdjust(prop, element) + 'px' + ); + + } + + }; + } + + function boxModelAdjust(prop, element, sizing) { + if ( sizing === void 0 ) sizing = 'border-box'; + + return css(element, 'boxSizing') === sizing + ? dirs[prop].slice(1).map(ucfirst).reduce(function (value, prop) { return value + + toFloat(css(element, ("padding" + prop))) + + toFloat(css(element, ("border" + prop + "Width"))); } + , 0) + : 0; + } + + function moveTo(position, attach, dim, factor) { + each(dirs, function (ref, prop) { + var dir = ref[0]; + var align = ref[1]; + var alignFlip = ref[2]; + + if (attach[dir] === alignFlip) { + position[align] += dim[prop] * factor; + } else if (attach[dir] === 'center') { + position[align] += dim[prop] * factor / 2; + } + }); + } + + function getPos(pos) { + + var x = /left|center|right/; + var y = /top|center|bottom/; + + pos = (pos || '').split(' '); + + if (pos.length === 1) { + pos = x.test(pos[0]) + ? pos.concat(['center']) + : y.test(pos[0]) + ? ['center'].concat(pos) + : ['center', 'center']; + } + + return { + x: x.test(pos[0]) ? pos[0] : 'center', + y: y.test(pos[1]) ? pos[1] : 'center' + }; + } + + function getOffsets(offsets, width, height) { + + var ref = (offsets || '').split(' '); + var x = ref[0]; + var y = ref[1]; + + return { + x: x ? toFloat(x) * (endsWith(x, '%') ? width / 100 : 1) : 0, + y: y ? toFloat(y) * (endsWith(y, '%') ? height / 100 : 1) : 0 + }; + } + + function flipPosition(pos) { + switch (pos) { + case 'left': + return 'right'; + case 'right': + return 'left'; + case 'top': + return 'bottom'; + case 'bottom': + return 'top'; + default: + return pos; + } + } + + function isInView(element, topOffset, leftOffset) { + if ( topOffset === void 0 ) topOffset = 0; + if ( leftOffset === void 0 ) leftOffset = 0; + + + if (!isVisible(element)) { + return false; + } + + element = toNode(element); + + var win = getWindow(element); + var client = element.getBoundingClientRect(); + var bounding = { + top: -topOffset, + left: -leftOffset, + bottom: topOffset + height(win), + right: leftOffset + width(win) + }; + + return intersectRect(client, bounding) || pointInRect({x: client.left, y: client.top}, bounding); + + } + + function scrolledOver(element, heightOffset) { + if ( heightOffset === void 0 ) heightOffset = 0; + + + if (!isVisible(element)) { + return 0; + } + + element = toNode(element); + + var win = getWindow(element); + var doc = getDocument(element); + var elHeight = element.offsetHeight + heightOffset; + var ref = offsetPosition(element); + var top = ref[0]; + var vp = height(win); + var vh = vp + Math.min(0, top - vp); + var diff = Math.max(0, vp - (height(doc) + heightOffset - (top + elHeight))); + + return clamp(((vh + win.pageYOffset - top) / ((vh + (elHeight - (diff < vp ? diff : 0))) / 100)) / 100); + } + + function scrollTop(element, top) { + element = toNode(element); + + if (isWindow(element) || isDocument(element)) { + var ref = getWindow(element); + var scrollTo = ref.scrollTo; + var pageXOffset = ref.pageXOffset; + scrollTo(pageXOffset, top); + } else { + element.scrollTop = top; + } + } + + function offsetPosition(element) { + var offset = [0, 0]; + + do { + + offset[0] += element.offsetTop; + offset[1] += element.offsetLeft; + + if (css(element, 'position') === 'fixed') { + var win = getWindow(element); + offset[0] += win.pageYOffset; + offset[1] += win.pageXOffset; + return offset; + } + + } while ((element = element.offsetParent)); + + return offset; + } + + function toPx(value, property, element) { + if ( property === void 0 ) property = 'width'; + if ( element === void 0 ) element = window; + + return isNumeric(value) + ? +value + : endsWith(value, 'vh') + ? percent(height(getWindow(element)), value) + : endsWith(value, 'vw') + ? percent(width(getWindow(element)), value) + : endsWith(value, '%') + ? percent(getDimensions(element)[property], value) + : toFloat(value); + } + + function percent(base, value) { + return base * toFloat(value) / 100; + } + + function getWindow(element) { + return isWindow(element) ? element : getDocument(element).defaultView; + } + + function getDocument(element) { + return toNode(element).ownerDocument; + } + + function getDocEl(element) { + return getDocument(element).documentElement; + } + + /* + Based on: + Copyright (c) 2016 Wilson Page wilsonpage@me.com + https://github.com/wilsonpage/fastdom + */ + + var fastdom = { + + reads: [], + writes: [], + + read: function(task) { + this.reads.push(task); + scheduleFlush(); + return task; + }, + + write: function(task) { + this.writes.push(task); + scheduleFlush(); + return task; + }, + + clear: function(task) { + return remove$1(this.reads, task) || remove$1(this.writes, task); + }, + + flush: flush + + }; + + function flush(recursion) { + if ( recursion === void 0 ) recursion = 1; + + runTasks(fastdom.reads); + runTasks(fastdom.writes.splice(0, fastdom.writes.length)); + + fastdom.scheduled = false; + + if (fastdom.reads.length || fastdom.writes.length) { + scheduleFlush(recursion + 1); + } + } + + var RECURSION_LIMIT = 5; + function scheduleFlush(recursion) { + if (!fastdom.scheduled) { + fastdom.scheduled = true; + if (recursion > RECURSION_LIMIT) { + throw new Error('Maximum recursion limit reached.'); + } else if (recursion) { + Promise.resolve().then(function () { return flush(recursion); }); + } else { + requestAnimationFrame(function () { return flush(); }); + } + } + } + + function runTasks(tasks) { + var task; + while ((task = tasks.shift())) { + task(); + } + } + + function remove$1(array, item) { + var index = array.indexOf(item); + return !!~index && !!array.splice(index, 1); + } + + function MouseTracker() {} + + MouseTracker.prototype = { + + positions: [], + position: null, + + init: function() { + var this$1 = this; + + + this.positions = []; + this.position = null; + + var ticking = false; + this.unbind = on(document, 'mousemove', function (e) { + + if (ticking) { + return; + } + + setTimeout(function () { + + var time = Date.now(); + var ref = this$1.positions; + var length = ref.length; + + if (length && (time - this$1.positions[length - 1].time > 100)) { + this$1.positions.splice(0, length); + } + + this$1.positions.push({time: time, x: e.pageX, y: e.pageY}); + + if (this$1.positions.length > 5) { + this$1.positions.shift(); + } + + ticking = false; + }, 5); + + ticking = true; + }); + + }, + + cancel: function() { + if (this.unbind) { + this.unbind(); + } + }, + + movesTo: function(target) { + + if (this.positions.length < 2) { + return false; + } + + var p = offset(target); + var position = last(this.positions); + var ref = this.positions; + var prevPos = ref[0]; + + if (p.left <= position.x && position.x <= p.right && p.top <= position.y && position.y <= p.bottom) { + return false; + } + + var points = [ + [{x: p.left, y: p.top}, {x: p.right, y: p.bottom}], + [{x: p.right, y: p.top}, {x: p.left, y: p.bottom}] + ]; + + if (p.right <= position.x) ; else if (p.left >= position.x) { + points[0].reverse(); + points[1].reverse(); + } else if (p.bottom <= position.y) { + points[0].reverse(); + } else if (p.top >= position.y) { + points[1].reverse(); + } + + return !!points.reduce(function (result, point) { + return result + (slope(prevPos, point[0]) < slope(position, point[0]) && slope(prevPos, point[1]) > slope(position, point[1])); + }, 0); + } + + }; + + function slope(a, b) { + return (b.y - a.y) / (b.x - a.x); + } + + var strats = {}; + + strats.events = + strats.created = + strats.beforeConnect = + strats.connected = + strats.beforeDisconnect = + strats.disconnected = + strats.destroy = concatStrat; + + // args strategy + strats.args = function (parentVal, childVal) { + return childVal !== false && concatStrat(childVal || parentVal); + }; + + // update strategy + strats.update = function (parentVal, childVal) { + return sortBy(concatStrat(parentVal, isFunction(childVal) ? {read: childVal} : childVal), 'order'); + }; + + // property strategy + strats.props = function (parentVal, childVal) { + + if (isArray(childVal)) { + childVal = childVal.reduce(function (value, key) { + value[key] = String; + return value; + }, {}); + } + + return strats.methods(parentVal, childVal); + }; + + // extend strategy + strats.computed = + strats.methods = function (parentVal, childVal) { + return childVal + ? parentVal + ? assign({}, parentVal, childVal) + : childVal + : parentVal; + }; + + // data strategy + strats.data = function (parentVal, childVal, vm) { + + if (!vm) { + + if (!childVal) { + return parentVal; + } + + if (!parentVal) { + return childVal; + } + + return function (vm) { + return mergeFnData(parentVal, childVal, vm); + }; + + } + + return mergeFnData(parentVal, childVal, vm); + }; + + function mergeFnData(parentVal, childVal, vm) { + return strats.computed( + isFunction(parentVal) + ? parentVal.call(vm, vm) + : parentVal, + isFunction(childVal) + ? childVal.call(vm, vm) + : childVal + ); + } + + // concat strategy + function concatStrat(parentVal, childVal) { + + parentVal = parentVal && !isArray(parentVal) ? [parentVal] : parentVal; + + return childVal + ? parentVal + ? parentVal.concat(childVal) + : isArray(childVal) + ? childVal + : [childVal] + : parentVal; + } + + // default strategy + function defaultStrat(parentVal, childVal) { + return isUndefined(childVal) ? parentVal : childVal; + } + + function mergeOptions(parent, child, vm) { + + var options = {}; + + if (isFunction(child)) { + child = child.options; + } + + if (child.extends) { + parent = mergeOptions(parent, child.extends, vm); + } + + if (child.mixins) { + for (var i = 0, l = child.mixins.length; i < l; i++) { + parent = mergeOptions(parent, child.mixins[i], vm); + } + } + + for (var key in parent) { + mergeKey(key); + } + + for (var key$1 in child) { + if (!hasOwn(parent, key$1)) { + mergeKey(key$1); + } + } + + function mergeKey(key) { + options[key] = (strats[key] || defaultStrat)(parent[key], child[key], vm); + } + + return options; + } + + function parseOptions(options, args) { + var obj; + + if ( args === void 0 ) args = []; + + try { + + return !options + ? {} + : startsWith(options, '{') + ? JSON.parse(options) + : args.length && !includes(options, ':') + ? (( obj = {}, obj[args[0]] = options, obj )) + : options.split(';').reduce(function (options, option) { + var ref = option.split(/:(.*)/); + var key = ref[0]; + var value = ref[1]; + if (key && !isUndefined(value)) { + options[key.trim()] = value.trim(); + } + return options; + }, {}); + + } catch (e) { + return {}; + } + + } + + var id = 0; + + var Player = function(el) { + this.id = ++id; + this.el = toNode(el); + }; + + Player.prototype.isVideo = function () { + return this.isYoutube() || this.isVimeo() || this.isHTML5(); + }; + + Player.prototype.isHTML5 = function () { + return this.el.tagName === 'VIDEO'; + }; + + Player.prototype.isIFrame = function () { + return this.el.tagName === 'IFRAME'; + }; + + Player.prototype.isYoutube = function () { + return this.isIFrame() && !!this.el.src.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/); + }; + + Player.prototype.isVimeo = function () { + return this.isIFrame() && !!this.el.src.match(/vimeo\.com\/video\/.*/); + }; + + Player.prototype.enableApi = function () { + var this$1 = this; + + + if (this.ready) { + return this.ready; + } + + var youtube = this.isYoutube(); + var vimeo = this.isVimeo(); + + var poller; + + if (youtube || vimeo) { + + return this.ready = new Promise(function (resolve) { + + once(this$1.el, 'load', function () { + if (youtube) { + var listener = function () { return post(this$1.el, {event: 'listening', id: this$1.id}); }; + poller = setInterval(listener, 100); + listener(); + } + }); + + listen(function (data) { return youtube && data.id === this$1.id && data.event === 'onReady' || vimeo && Number(data.player_id) === this$1.id; }) + .then(function () { + resolve(); + poller && clearInterval(poller); + }); + + attr(this$1.el, 'src', ("" + (this$1.el.src) + (includes(this$1.el.src, '?') ? '&' : '?') + (youtube ? 'enablejsapi=1' : ("api=1&player_id=" + (this$1.id))))); + + }); + + } + + return Promise.resolve(); + + }; + + Player.prototype.play = function () { + var this$1 = this; + + + if (!this.isVideo()) { + return; + } + + if (this.isIFrame()) { + this.enableApi().then(function () { return post(this$1.el, {func: 'playVideo', method: 'play'}); }); + } else if (this.isHTML5()) { + try { + var promise = this.el.play(); + + if (promise) { + promise.catch(noop); + } + } catch (e) {} + } + }; + + Player.prototype.pause = function () { + var this$1 = this; + + + if (!this.isVideo()) { + return; + } + + if (this.isIFrame()) { + this.enableApi().then(function () { return post(this$1.el, {func: 'pauseVideo', method: 'pause'}); }); + } else if (this.isHTML5()) { + this.el.pause(); + } + }; + + Player.prototype.mute = function () { + var this$1 = this; + + + if (!this.isVideo()) { + return; + } + + if (this.isIFrame()) { + this.enableApi().then(function () { return post(this$1.el, {func: 'mute', method: 'setVolume', value: 0}); }); + } else if (this.isHTML5()) { + this.el.muted = true; + attr(this.el, 'muted', ''); + } + + }; + + function post(el, cmd) { + try { + el.contentWindow.postMessage(JSON.stringify(assign({event: 'command'}, cmd)), '*'); + } catch (e) {} + } + + function listen(cb) { + + return new Promise(function (resolve) { + + once(window, 'message', function (_, data) { return resolve(data); }, false, function (ref) { + var data = ref.data; + + + if (!data || !isString(data)) { + return; + } + + try { + data = JSON.parse(data); + } catch (e) { + return; + } + + return data && cb(data); + + }); + + }); + + } + + var IntersectionObserver = 'IntersectionObserver' in window + ? window.IntersectionObserver + : /*@__PURE__*/(function () { + function IntersectionObserverClass(callback, ref) { + var this$1 = this; + if ( ref === void 0 ) ref = {}; + var rootMargin = ref.rootMargin; if ( rootMargin === void 0 ) rootMargin = '0 0'; + + + this.targets = []; + + var ref$1 = (rootMargin || '0 0').split(' ').map(toFloat); + var offsetTop = ref$1[0]; + var offsetLeft = ref$1[1]; + + this.offsetTop = offsetTop; + this.offsetLeft = offsetLeft; + + var pending; + this.apply = function () { + + if (pending) { + return; + } + + pending = requestAnimationFrame(function () { return setTimeout(function () { + var records = this$1.takeRecords(); + + if (records.length) { + callback(records, this$1); + } + + pending = false; + }); }); + + }; + + this.off = on(window, 'scroll resize load', this.apply, {passive: true, capture: true}); + + } + + IntersectionObserverClass.prototype.takeRecords = function () { + var this$1 = this; + + return this.targets.filter(function (entry) { + + var inView = isInView(entry.target, this$1.offsetTop, this$1.offsetLeft); + + if (entry.isIntersecting === null || inView ^ entry.isIntersecting) { + entry.isIntersecting = inView; + return true; + } + + }); + }; + + IntersectionObserverClass.prototype.observe = function (target) { + this.targets.push({ + target: target, + isIntersecting: null + }); + this.apply(); + }; + + IntersectionObserverClass.prototype.disconnect = function () { + this.targets = []; + this.off(); + }; + + return IntersectionObserverClass; + }()); + + + + var util = /*#__PURE__*/Object.freeze({ + ajax: ajax, + getImage: getImage, + transition: transition, + Transition: Transition, + animate: animate, + Animation: Animation, + attr: attr, + hasAttr: hasAttr, + removeAttr: removeAttr, + data: data, + addClass: addClass, + removeClass: removeClass, + removeClasses: removeClasses, + replaceClass: replaceClass, + hasClass: hasClass, + toggleClass: toggleClass, + positionAt: positionAt, + offset: offset, + position: position, + height: height, + width: width, + boxModelAdjust: boxModelAdjust, + flipPosition: flipPosition, + isInView: isInView, + scrolledOver: scrolledOver, + scrollTop: scrollTop, + offsetPosition: offsetPosition, + toPx: toPx, + ready: ready, + index: index, + getIndex: getIndex, + empty: empty, + html: html, + prepend: prepend, + append: append, + before: before, + after: after, + remove: remove, + wrapAll: wrapAll, + wrapInner: wrapInner, + unwrap: unwrap, + fragment: fragment, + apply: apply, + $: $, + $$: $$, + isIE: isIE, + isRtl: isRtl, + hasTouch: hasTouch, + pointerDown: pointerDown, + pointerMove: pointerMove, + pointerUp: pointerUp, + pointerEnter: pointerEnter, + pointerLeave: pointerLeave, + pointerCancel: pointerCancel, + on: on, + off: off, + once: once, + trigger: trigger, + createEvent: createEvent, + toEventTargets: toEventTargets, + isTouch: isTouch, + getEventPos: getEventPos, + fastdom: fastdom, + isVoidElement: isVoidElement, + isVisible: isVisible, + selInput: selInput, + isInput: isInput, + filter: filter, + within: within, + hasOwn: hasOwn, + hyphenate: hyphenate, + camelize: camelize, + ucfirst: ucfirst, + startsWith: startsWith, + endsWith: endsWith, + includes: includes, + findIndex: findIndex, + isArray: isArray, + isFunction: isFunction, + isObject: isObject, + isPlainObject: isPlainObject, + isWindow: isWindow, + isDocument: isDocument, + isJQuery: isJQuery, + isNode: isNode, + isNodeCollection: isNodeCollection, + isBoolean: isBoolean, + isString: isString, + isNumber: isNumber, + isNumeric: isNumeric, + isEmpty: isEmpty, + isUndefined: isUndefined, + toBoolean: toBoolean, + toNumber: toNumber, + toFloat: toFloat, + toNode: toNode, + toNodes: toNodes, + toList: toList, + toMs: toMs, + isEqual: isEqual, + swap: swap, + assign: assign, + last: last, + each: each, + sortBy: sortBy, + uniqueBy: uniqueBy, + clamp: clamp, + noop: noop, + intersectRect: intersectRect, + pointInRect: pointInRect, + Dimensions: Dimensions, + MouseTracker: MouseTracker, + mergeOptions: mergeOptions, + parseOptions: parseOptions, + Player: Player, + Promise: Promise, + Deferred: Deferred, + IntersectionObserver: IntersectionObserver, + query: query, + queryAll: queryAll, + find: find, + findAll: findAll, + matches: matches, + closest: closest, + parents: parents, + escape: escape, + css: css, + getStyles: getStyles, + getStyle: getStyle, + getCssVar: getCssVar, + propName: propName + }); + + function componentAPI (UIkit) { + + var DATA = UIkit.data; + + var components = {}; + + UIkit.component = function (name, options) { + + if (!options) { + + if (isPlainObject(components[name])) { + components[name] = UIkit.extend(components[name]); + } + + return components[name]; + + } + + UIkit[name] = function (element, data) { + var i = arguments.length, argsArray = Array(i); + while ( i-- ) argsArray[i] = arguments[i]; + + + var component = UIkit.component(name); + + return component.options.functional + ? new component({data: isPlainObject(element) ? element : [].concat( argsArray )}) + : element && element.nodeType ? init(element) : $$(element).map(init)[0]; + + function init(element) { + + var instance = UIkit.getComponent(element, name); + + if (instance) { + if (!data) { + return instance; + } else { + instance.$destroy(); + } + } + + return new component({el: element, data: data}); + + } + + }; + + var opt = isPlainObject(options) ? assign({}, options) : options.options; + + opt.name = name; + + if (opt.install) { + opt.install(UIkit, opt, name); + } + + if (UIkit._initialized && !opt.functional) { + var id = hyphenate(name); + fastdom.read(function () { return UIkit[name](("[uk-" + id + "],[data-uk-" + id + "]")); }); + } + + return components[name] = isPlainObject(options) ? opt : options; + }; + + UIkit.getComponents = function (element) { return element && element[DATA] || {}; }; + UIkit.getComponent = function (element, name) { return UIkit.getComponents(element)[name]; }; + + UIkit.connect = function (node) { + + if (node[DATA]) { + for (var name in node[DATA]) { + node[DATA][name]._callConnected(); + } + } + + for (var i = 0; i < node.attributes.length; i++) { + + var name$1 = getComponentName(node.attributes[i].name); + + if (name$1 && name$1 in components) { + UIkit[name$1](node); + } + + } + + }; + + UIkit.disconnect = function (node) { + for (var name in node[DATA]) { + node[DATA][name]._callDisconnected(); + } + }; + + } + + function getComponentName(attribute) { + return startsWith(attribute, 'uk-') || startsWith(attribute, 'data-uk-') + ? camelize(attribute.replace('data-uk-', '').replace('uk-', '')) + : false; + } + + function boot (UIkit) { + + var connect = UIkit.connect; + var disconnect = UIkit.disconnect; + + if (!('MutationObserver' in window)) { + return; + } + + fastdom.read(init); + + function init() { + + if (document.body) { + apply(document.body, connect); + } + + (new MutationObserver(function (mutations) { return mutations.forEach(applyMutation); })).observe(document, { + childList: true, + subtree: true, + characterData: true, + attributes: true + }); + + UIkit._initialized = true; + } + + function applyMutation(mutation) { + + var target = mutation.target; + var type = mutation.type; + + var update = type !== 'attributes' + ? applyChildList(mutation) + : applyAttribute(mutation); + + update && UIkit.update(target); + + } + + function applyAttribute(ref) { + var target = ref.target; + var attributeName = ref.attributeName; + + + if (attributeName === 'href') { + return true; + } + + var name = getComponentName(attributeName); + + if (!name || !(name in UIkit)) { + return; + } + + if (hasAttr(target, attributeName)) { + UIkit[name](target); + return true; + } + + var component = UIkit.getComponent(target, name); + + if (component) { + component.$destroy(); + return true; + } + + } + + function applyChildList(ref) { + var addedNodes = ref.addedNodes; + var removedNodes = ref.removedNodes; + + + for (var i = 0; i < addedNodes.length; i++) { + apply(addedNodes[i], connect); + } + + for (var i$1 = 0; i$1 < removedNodes.length; i$1++) { + apply(removedNodes[i$1], disconnect); + } + + return true; + } + + function apply(node, fn) { + + if (node.nodeType !== 1 || hasAttr(node, 'uk-no-boot')) { + return; + } + + fn(node); + node = node.firstElementChild; + while (node) { + var next = node.nextElementSibling; + apply(node, fn); + node = next; + } + } + + } + + function globalAPI (UIkit) { + + var DATA = UIkit.data; + + UIkit.use = function (plugin) { + + if (plugin.installed) { + return; + } + + plugin.call(null, this); + plugin.installed = true; + + return this; + }; + + UIkit.mixin = function (mixin, component) { + component = (isString(component) ? UIkit.component(component) : component) || this; + component.options = mergeOptions(component.options, mixin); + }; + + UIkit.extend = function (options) { + + options = options || {}; + + var Super = this; + var Sub = function UIkitComponent(options) { + this._init(options); + }; + + Sub.prototype = Object.create(Super.prototype); + Sub.prototype.constructor = Sub; + Sub.options = mergeOptions(Super.options, options); + + Sub.super = Super; + Sub.extend = Super.extend; + + return Sub; + }; + + UIkit.update = function (element, e) { + + element = element ? toNode(element) : document.body; + + path(element, function (element) { return update(element[DATA], e); }); + apply(element, function (element) { return update(element[DATA], e); }); + + }; + + var container; + Object.defineProperty(UIkit, 'container', { + + get: function() { + return container || document.body; + }, + + set: function(element) { + container = $(element); + } + + }); + + function update(data, e) { + + if (!data) { + return; + } + + for (var name in data) { + if (data[name]._connected) { + data[name]._callUpdate(e); + } + } + + } + + function path(node, fn) { + if (node && node !== document.body && node.parentNode) { + path(node.parentNode, fn); + fn(node.parentNode); + } + } + + } + + function hooksAPI (UIkit) { + + UIkit.prototype._callHook = function (hook) { + var this$1 = this; + + + var handlers = this.$options[hook]; + + if (handlers) { + handlers.forEach(function (handler) { return handler.call(this$1); }); + } + }; + + UIkit.prototype._callConnected = function () { + + if (this._connected) { + return; + } + + this._data = {}; + this._computeds = {}; + this._initProps(); + + this._callHook('beforeConnect'); + this._connected = true; + + this._initEvents(); + this._initObserver(); + + this._callHook('connected'); + this._callUpdate(); + }; + + UIkit.prototype._callDisconnected = function () { + + if (!this._connected) { + return; + } + + this._callHook('beforeDisconnect'); + + if (this._observer) { + this._observer.disconnect(); + this._observer = null; + } + + this._unbindEvents(); + this._callHook('disconnected'); + + this._connected = false; + + }; + + UIkit.prototype._callUpdate = function (e) { + var this$1 = this; + if ( e === void 0 ) e = 'update'; + + + var type = e.type || e; + + if (includes(['update', 'resize'], type)) { + this._callWatches(); + } + + var updates = this.$options.update; + var ref = this._frames; + var reads = ref.reads; + var writes = ref.writes; + + if (!updates) { + return; + } + + updates.forEach(function (ref, i) { + var read = ref.read; + var write = ref.write; + var events = ref.events; + + + if (type !== 'update' && !includes(events, type)) { + return; + } + + if (read && !includes(fastdom.reads, reads[i])) { + reads[i] = fastdom.read(function () { + + var result = this$1._connected && read.call(this$1, this$1._data, type); + + if (result === false && write) { + fastdom.clear(writes[i]); + } else if (isPlainObject(result)) { + assign(this$1._data, result); + } + }); + } + + if (write && !includes(fastdom.writes, writes[i])) { + writes[i] = fastdom.write(function () { return this$1._connected && write.call(this$1, this$1._data, type); }); + } + + }); + + }; + + } + + function stateAPI (UIkit) { + + var uid = 0; + + UIkit.prototype._init = function (options) { + + options = options || {}; + options.data = normalizeData(options, this.constructor.options); + + this.$options = mergeOptions(this.constructor.options, options, this); + this.$el = null; + this.$props = {}; + + this._frames = {reads: {}, writes: {}}; + this._events = []; + + this._uid = uid++; + this._initData(); + this._initMethods(); + this._initComputeds(); + this._callHook('created'); + + if (options.el) { + this.$mount(options.el); + } + }; + + UIkit.prototype._initData = function () { + + var ref = this.$options; + var data = ref.data; if ( data === void 0 ) data = {}; + + for (var key in data) { + this.$props[key] = this[key] = data[key]; + } + }; + + UIkit.prototype._initMethods = function () { + + var ref = this.$options; + var methods = ref.methods; + + if (methods) { + for (var key in methods) { + this[key] = methods[key].bind(this); + } + } + }; + + UIkit.prototype._initComputeds = function () { + + var ref = this.$options; + var computed = ref.computed; + + this._computeds = {}; + + if (computed) { + for (var key in computed) { + registerComputed(this, key, computed[key]); + } + } + }; + + UIkit.prototype._callWatches = function () { + + var ref = this; + var computed = ref.$options.computed; + var _computeds = ref._computeds; + + for (var key in _computeds) { + + var value = _computeds[key]; + delete _computeds[key]; + + if (computed[key].watch && !isEqual(value, this[key])) { + computed[key].watch.call(this, this[key], value); + } + + } + + }; + + UIkit.prototype._initProps = function (props) { + + var key; + + props = props || getProps(this.$options, this.$name); + + for (key in props) { + if (!isUndefined(props[key])) { + this.$props[key] = props[key]; + } + } + + var exclude = [this.$options.computed, this.$options.methods]; + for (key in this.$props) { + if (key in props && notIn(exclude, key)) { + this[key] = this.$props[key]; + } + } + }; + + UIkit.prototype._initEvents = function () { + var this$1 = this; + + + var ref = this.$options; + var events = ref.events; + + if (events) { + + events.forEach(function (event) { + + if (!hasOwn(event, 'handler')) { + for (var key in event) { + registerEvent(this$1, event[key], key); + } + } else { + registerEvent(this$1, event); + } + + }); + } + }; + + UIkit.prototype._unbindEvents = function () { + this._events.forEach(function (unbind) { return unbind(); }); + this._events = []; + }; + + UIkit.prototype._initObserver = function () { + var this$1 = this; + + + var ref = this.$options; + var attrs = ref.attrs; + var props = ref.props; + var el = ref.el; + if (this._observer || !props || attrs === false) { + return; + } + + attrs = isArray(attrs) ? attrs : Object.keys(props); + + this._observer = new MutationObserver(function () { + + var data = getProps(this$1.$options, this$1.$name); + if (attrs.some(function (key) { return !isUndefined(data[key]) && data[key] !== this$1.$props[key]; })) { + this$1.$reset(); + } + + }); + + var filter = attrs.map(function (key) { return hyphenate(key); }).concat(this.$name); + + this._observer.observe(el, { + attributes: true, + attributeFilter: filter.concat(filter.map(function (key) { return ("data-" + key); })) + }); + }; + + function getProps(opts, name) { + + var data$1 = {}; + var args = opts.args; if ( args === void 0 ) args = []; + var props = opts.props; if ( props === void 0 ) props = {}; + var el = opts.el; + + if (!props) { + return data$1; + } + + for (var key in props) { + var prop = hyphenate(key); + var value = data(el, prop); + + if (!isUndefined(value)) { + + value = props[key] === Boolean && value === '' + ? true + : coerce(props[key], value); + + if (prop === 'target' && (!value || startsWith(value, '_'))) { + continue; + } + + data$1[key] = value; + } + } + + var options = parseOptions(data(el, name), args); + + for (var key$1 in options) { + var prop$1 = camelize(key$1); + if (props[prop$1] !== undefined) { + data$1[prop$1] = coerce(props[prop$1], options[key$1]); + } + } + + return data$1; + } + + function registerComputed(component, key, cb) { + Object.defineProperty(component, key, { + + enumerable: true, + + get: function() { + + var _computeds = component._computeds; + var $props = component.$props; + var $el = component.$el; + + if (!hasOwn(_computeds, key)) { + _computeds[key] = (cb.get || cb).call(component, $props, $el); + } + + return _computeds[key]; + }, + + set: function(value) { + + var _computeds = component._computeds; + + _computeds[key] = cb.set ? cb.set.call(component, value) : value; + + if (isUndefined(_computeds[key])) { + delete _computeds[key]; + } + } + + }); + } + + function registerEvent(component, event, key) { + + if (!isPlainObject(event)) { + event = ({name: key, handler: event}); + } + + var name = event.name; + var el = event.el; + var handler = event.handler; + var capture = event.capture; + var passive = event.passive; + var delegate = event.delegate; + var filter = event.filter; + var self = event.self; + el = isFunction(el) + ? el.call(component) + : el || component.$el; + + if (isArray(el)) { + el.forEach(function (el) { return registerEvent(component, assign({}, event, {el: el}), key); }); + return; + } + + if (!el || filter && !filter.call(component)) { + return; + } + + component._events.push( + on( + el, + name, + !delegate + ? null + : isString(delegate) + ? delegate + : delegate.call(component), + isString(handler) ? component[handler] : handler.bind(component), + {passive: passive, capture: capture, self: self} + ) + ); + + } + + function notIn(options, key) { + return options.every(function (arr) { return !arr || !hasOwn(arr, key); }); + } + + function coerce(type, value) { + + if (type === Boolean) { + return toBoolean(value); + } else if (type === Number) { + return toNumber(value); + } else if (type === 'list') { + return toList(value); + } + + return type ? type(value) : value; + } + + function normalizeData(ref, ref$1) { + var data = ref.data; + var el = ref.el; + var args = ref$1.args; + var props = ref$1.props; if ( props === void 0 ) props = {}; + + data = isArray(data) + ? !isEmpty(args) + ? data.slice(0, args.length).reduce(function (data, value, index) { + if (isPlainObject(value)) { + assign(data, value); + } else { + data[args[index]] = value; + } + return data; + }, {}) + : undefined + : data; + + if (data) { + for (var key in data) { + if (isUndefined(data[key])) { + delete data[key]; + } else { + data[key] = props[key] ? coerce(props[key], data[key]) : data[key]; + } + } + } + + return data; + } + } + + function instanceAPI (UIkit) { + + var DATA = UIkit.data; + + UIkit.prototype.$mount = function (el) { + + var ref = this.$options; + var name = ref.name; + + if (!el[DATA]) { + el[DATA] = {}; + } + + if (el[DATA][name]) { + return; + } + + el[DATA][name] = this; + + this.$el = this.$options.el = this.$options.el || el; + + if (within(el, document)) { + this._callConnected(); + } + }; + + UIkit.prototype.$emit = function (e) { + this._callUpdate(e); + }; + + UIkit.prototype.$reset = function () { + this._callDisconnected(); + this._callConnected(); + }; + + UIkit.prototype.$destroy = function (removeEl) { + if ( removeEl === void 0 ) removeEl = false; + + + var ref = this.$options; + var el = ref.el; + var name = ref.name; + + if (el) { + this._callDisconnected(); + } + + this._callHook('destroy'); + + if (!el || !el[DATA]) { + return; + } + + delete el[DATA][name]; + + if (!isEmpty(el[DATA])) { + delete el[DATA]; + } + + if (removeEl) { + remove(this.$el); + } + }; + + UIkit.prototype.$create = function (component, element, data) { + return UIkit[component](element, data); + }; + + UIkit.prototype.$update = UIkit.update; + UIkit.prototype.$getComponent = UIkit.getComponent; + + var names = {}; + Object.defineProperties(UIkit.prototype, { + + $container: Object.getOwnPropertyDescriptor(UIkit, 'container'), + + $name: { + + get: function() { + var ref = this.$options; + var name = ref.name; + + if (!names[name]) { + names[name] = UIkit.prefix + hyphenate(name); + } + + return names[name]; + } + + } + + }); + + } + + var UIkit = function (options) { + this._init(options); + }; + + UIkit.util = util; + UIkit.data = '__uikit__'; + UIkit.prefix = 'uk-'; + UIkit.options = {}; + + globalAPI(UIkit); + hooksAPI(UIkit); + stateAPI(UIkit); + componentAPI(UIkit); + instanceAPI(UIkit); + + var Class = { + + connected: function() { + !hasClass(this.$el, this.$name) && addClass(this.$el, this.$name); + } + + }; + + var Togglable = { + + props: { + cls: Boolean, + animation: 'list', + duration: Number, + origin: String, + transition: String, + queued: Boolean + }, + + data: { + cls: false, + animation: [false], + duration: 200, + origin: false, + transition: 'linear', + queued: false, + + initProps: { + overflow: '', + height: '', + paddingTop: '', + paddingBottom: '', + marginTop: '', + marginBottom: '' + }, + + hideProps: { + overflow: 'hidden', + height: 0, + paddingTop: 0, + paddingBottom: 0, + marginTop: 0, + marginBottom: 0 + } + + }, + + computed: { + + hasAnimation: function(ref) { + var animation = ref.animation; + + return !!animation[0]; + }, + + hasTransition: function(ref) { + var animation = ref.animation; + + return this.hasAnimation && animation[0] === true; + } + + }, + + methods: { + + toggleElement: function(targets, show, animate) { + var this$1 = this; + + return new Promise(function (resolve) { + + targets = toNodes(targets); + + var all = function (targets) { return Promise.all(targets.map(function (el) { return this$1._toggleElement(el, show, animate); })); }; + var toggled = targets.filter(function (el) { return this$1.isToggled(el); }); + var untoggled = targets.filter(function (el) { return !includes(toggled, el); }); + + var p; + + if (!this$1.queued || !isUndefined(animate) || !isUndefined(show) || !this$1.hasAnimation || targets.length < 2) { + + p = all(untoggled.concat(toggled)); + + } else { + + var body = document.body; + var scroll = body.scrollTop; + var el = toggled[0]; + var inProgress = Animation.inProgress(el) && hasClass(el, 'uk-animation-leave') + || Transition.inProgress(el) && el.style.height === '0px'; + + p = all(toggled); + + if (!inProgress) { + p = p.then(function () { + var p = all(untoggled); + body.scrollTop = scroll; + return p; + }); + } + + } + + p.then(resolve, noop); + + }); + }, + + toggleNow: function(targets, show) { + var this$1 = this; + + return new Promise(function (resolve) { return Promise.all(toNodes(targets).map(function (el) { return this$1._toggleElement(el, show, false); })).then(resolve, noop); }); + }, + + isToggled: function(el) { + var nodes = toNodes(el || this.$el); + return this.cls + ? hasClass(nodes, this.cls.split(' ')[0]) + : !hasAttr(nodes, 'hidden'); + }, + + updateAria: function(el) { + if (this.cls === false) { + attr(el, 'aria-hidden', !this.isToggled(el)); + } + }, + + _toggleElement: function(el, show, animate) { + var this$1 = this; + + + show = isBoolean(show) + ? show + : Animation.inProgress(el) + ? hasClass(el, 'uk-animation-leave') + : Transition.inProgress(el) + ? el.style.height === '0px' + : !this.isToggled(el); + + if (!trigger(el, ("before" + (show ? 'show' : 'hide')), [this])) { + return Promise.reject(); + } + + var promise = ( + isFunction(animate) + ? animate + : animate === false || !this.hasAnimation + ? this._toggle + : this.hasTransition + ? toggleHeight(this) + : toggleAnimation(this) + )(el, show); + + trigger(el, show ? 'show' : 'hide', [this]); + + var final = function () { + trigger(el, show ? 'shown' : 'hidden', [this$1]); + this$1.$update(el); + }; + + return promise ? promise.then(final) : Promise.resolve(final()); + }, + + _toggle: function(el, toggled) { + + if (!el) { + return; + } + + toggled = Boolean(toggled); + + var changed; + if (this.cls) { + changed = includes(this.cls, ' ') || toggled !== hasClass(el, this.cls); + changed && toggleClass(el, this.cls, includes(this.cls, ' ') ? undefined : toggled); + } else { + changed = toggled === hasAttr(el, 'hidden'); + changed && attr(el, 'hidden', !toggled ? '' : null); + } + + $$('[autofocus]', el).some(function (el) { return isVisible(el) ? el.focus() || true : el.blur(); }); + + this.updateAria(el); + changed && this.$update(el); + } + + } + + }; + + function toggleHeight(ref) { + var isToggled = ref.isToggled; + var duration = ref.duration; + var initProps = ref.initProps; + var hideProps = ref.hideProps; + var transition = ref.transition; + var _toggle = ref._toggle; + + return function (el, show) { + + var inProgress = Transition.inProgress(el); + var inner = el.hasChildNodes ? toFloat(css(el.firstElementChild, 'marginTop')) + toFloat(css(el.lastElementChild, 'marginBottom')) : 0; + var currentHeight = isVisible(el) ? height(el) + (inProgress ? 0 : inner) : 0; + + Transition.cancel(el); + + if (!isToggled(el)) { + _toggle(el, true); + } + + height(el, ''); + + // Update child components first + fastdom.flush(); + + var endHeight = height(el) + (inProgress ? 0 : inner); + height(el, currentHeight); + + return (show + ? Transition.start(el, assign({}, initProps, {overflow: 'hidden', height: endHeight}), Math.round(duration * (1 - currentHeight / endHeight)), transition) + : Transition.start(el, hideProps, Math.round(duration * (currentHeight / endHeight)), transition).then(function () { return _toggle(el, false); }) + ).then(function () { return css(el, initProps); }); + + }; + } + + function toggleAnimation(ref) { + var animation = ref.animation; + var duration = ref.duration; + var origin = ref.origin; + var _toggle = ref._toggle; + + return function (el, show) { + + Animation.cancel(el); + + if (show) { + _toggle(el, true); + return Animation.in(el, animation[0], duration, origin); + } + + return Animation.out(el, animation[1] || animation[0], duration, origin).then(function () { return _toggle(el, false); }); + }; + } + + var Accordion = { + + mixins: [Class, Togglable], + + props: { + targets: String, + active: null, + collapsible: Boolean, + multiple: Boolean, + toggle: String, + content: String, + transition: String + }, + + data: { + targets: '> *', + active: false, + animation: [true], + collapsible: true, + multiple: false, + clsOpen: 'uk-open', + toggle: '> .uk-accordion-title', + content: '> .uk-accordion-content', + transition: 'ease' + }, + + computed: { + + items: function(ref, $el) { + var targets = ref.targets; + + return $$(targets, $el); + } + + }, + + events: [ + + { + + name: 'click', + + delegate: function() { + return ((this.targets) + " " + (this.$props.toggle)); + }, + + handler: function(e) { + e.preventDefault(); + this.toggle(index($$(((this.targets) + " " + (this.$props.toggle)), this.$el), e.current)); + } + + } + + ], + + connected: function() { + + if (this.active === false) { + return; + } + + var active = this.items[Number(this.active)]; + if (active && !hasClass(active, this.clsOpen)) { + this.toggle(active, false); + } + }, + + update: function() { + var this$1 = this; + + + this.items.forEach(function (el) { return this$1._toggle($(this$1.content, el), hasClass(el, this$1.clsOpen)); }); + + var active = !this.collapsible && !hasClass(this.items, this.clsOpen) && this.items[0]; + if (active) { + this.toggle(active, false); + } + }, + + methods: { + + toggle: function(item, animate) { + var this$1 = this; + + + var index = getIndex(item, this.items); + var active = filter(this.items, ("." + (this.clsOpen))); + + item = this.items[index]; + + item && [item] + .concat(!this.multiple && !includes(active, item) && active || []) + .forEach(function (el) { + + var isItem = el === item; + var state = isItem && !hasClass(el, this$1.clsOpen); + + if (!state && isItem && !this$1.collapsible && active.length < 2) { + return; + } + + toggleClass(el, this$1.clsOpen, state); + + var content = el._wrapper ? el._wrapper.firstElementChild : $(this$1.content, el); + + if (!el._wrapper) { + el._wrapper = wrapAll(content, '
    '); + attr(el._wrapper, 'hidden', state ? '' : null); + } + + this$1._toggle(content, true); + this$1.toggleElement(el._wrapper, state, animate).then(function () { + + if (hasClass(el, this$1.clsOpen) !== state) { + return; + } + + if (!state) { + this$1._toggle(content, false); + } + + el._wrapper = null; + unwrap(content); + + }); + + }); + } + + } + + }; + + var Alert = { + + mixins: [Class, Togglable], + + args: 'animation', + + props: { + close: String + }, + + data: { + animation: [true], + selClose: '.uk-alert-close', + duration: 150, + hideProps: assign({opacity: 0}, Togglable.data.hideProps) + }, + + events: [ + + { + + name: 'click', + + delegate: function() { + return this.selClose; + }, + + handler: function(e) { + e.preventDefault(); + this.close(); + } + + } + + ], + + methods: { + + close: function() { + var this$1 = this; + + this.toggleElement(this.$el).then(function () { return this$1.$destroy(true); }); + } + + } + + }; + + function Core (UIkit) { + + ready(function () { + + UIkit.update(); + on(window, 'load resize', function () { return UIkit.update(null, 'resize'); }); + on(document, 'loadedmetadata load', function (ref) { + var target = ref.target; + + return UIkit.update(target, 'resize'); + }, true); + + // throttle `scroll` event (Safari triggers multiple `scroll` events per frame) + var pending; + on(window, 'scroll', function (e) { + + if (pending) { + return; + } + pending = true; + fastdom.write(function () { return pending = false; }); + + var target = e.target; + UIkit.update(target.nodeType !== 1 ? document.body : target, e.type); + + }, {passive: true, capture: true}); + + var started = 0; + on(document, 'animationstart', function (ref) { + var target = ref.target; + + if ((css(target, 'animationName') || '').match(/^uk-.*(left|right)/)) { + + started++; + css(document.body, 'overflowX', 'hidden'); + setTimeout(function () { + if (!--started) { + css(document.body, 'overflowX', ''); + } + }, toMs(css(target, 'animationDuration')) + 100); + } + }, true); + + var off; + on(document, pointerDown, function (e) { + + off && off(); + + if (!isTouch(e)) { + return; + } + + // Handle Swipe Gesture + var pos = getEventPos(e); + var target = 'tagName' in e.target ? e.target : e.target.parentNode; + off = once(document, (pointerUp + " " + pointerCancel), function (e) { + + var ref = getEventPos(e); + var x = ref.x; + var y = ref.y; + + // swipe + if (target && x && Math.abs(pos.x - x) > 100 || y && Math.abs(pos.y - y) > 100) { + + setTimeout(function () { + trigger(target, 'swipe'); + trigger(target, ("swipe" + (swipeDirection(pos.x, pos.y, x, y)))); + }); + + } + + }); + + // Force click event anywhere on iOS < 13 + if (pointerDown === 'touchstart') { + css(document.body, 'cursor', 'pointer'); + once(document, (pointerUp + " " + pointerCancel), function () { return setTimeout(function () { return css(document.body, 'cursor', ''); } + , 50); } + ); + } + + }, {passive: true}); + + }); + + } + + function swipeDirection(x1, y1, x2, y2) { + return Math.abs(x1 - x2) >= Math.abs(y1 - y2) + ? x1 - x2 > 0 + ? 'Left' + : 'Right' + : y1 - y2 > 0 + ? 'Up' + : 'Down'; + } + + var Video = { + + args: 'autoplay', + + props: { + automute: Boolean, + autoplay: Boolean + }, + + data: { + automute: false, + autoplay: true + }, + + computed: { + + inView: function(ref) { + var autoplay = ref.autoplay; + + return autoplay === 'inview'; + } + + }, + + connected: function() { + + if (this.inView && !hasAttr(this.$el, 'preload')) { + this.$el.preload = 'none'; + } + + this.player = new Player(this.$el); + + if (this.automute) { + this.player.mute(); + } + + }, + + update: { + + read: function() { + + return !this.player + ? false + : { + visible: isVisible(this.$el) && css(this.$el, 'visibility') !== 'hidden', + inView: this.inView && isInView(this.$el) + }; + }, + + write: function(ref) { + var visible = ref.visible; + var inView = ref.inView; + + + if (!visible || this.inView && !inView) { + this.player.pause(); + } else if (this.autoplay === true || this.inView && inView) { + this.player.play(); + } + + }, + + events: ['resize', 'scroll'] + + } + + }; + + var Cover = { + + mixins: [Class, Video], + + props: { + width: Number, + height: Number + }, + + data: { + automute: true + }, + + update: { + + read: function() { + + var el = this.$el; + var ref = el.parentNode; + var height = ref.offsetHeight; + var width = ref.offsetWidth; + var dim = Dimensions.cover( + { + width: this.width || el.naturalWidth || el.videoWidth || el.clientWidth, + height: this.height || el.naturalHeight || el.videoHeight || el.clientHeight + }, + { + width: width + (width % 2 ? 1 : 0), + height: height + (height % 2 ? 1 : 0) + } + ); + + if (!dim.width || !dim.height) { + return false; + } + + return dim; + }, + + write: function(ref) { + var height = ref.height; + var width = ref.width; + + css(this.$el, {height: height, width: width}); + }, + + events: ['resize'] + + } + + }; + + var Position = { + + props: { + pos: String, + offset: null, + flip: Boolean, + clsPos: String + }, + + data: { + pos: ("bottom-" + (!isRtl ? 'left' : 'right')), + flip: true, + offset: false, + clsPos: '' + }, + + computed: { + + pos: function(ref) { + var pos = ref.pos; + + return (pos + (!includes(pos, '-') ? '-center' : '')).split('-'); + }, + + dir: function() { + return this.pos[0]; + }, + + align: function() { + return this.pos[1]; + } + + }, + + methods: { + + positionAt: function(element, target, boundary) { + + removeClasses(element, ((this.clsPos) + "-(top|bottom|left|right)(-[a-z]+)?")); + css(element, {top: '', left: ''}); + + var node; + var ref = this; + var offset$1 = ref.offset; + var axis = this.getAxis(); + + if (!isNumeric(offset$1)) { + node = $(offset$1); + offset$1 = node + ? offset(node)[axis === 'x' ? 'left' : 'top'] - offset(target)[axis === 'x' ? 'right' : 'bottom'] + : 0; + } + + var ref$1 = positionAt( + element, + target, + axis === 'x' ? ((flipPosition(this.dir)) + " " + (this.align)) : ((this.align) + " " + (flipPosition(this.dir))), + axis === 'x' ? ((this.dir) + " " + (this.align)) : ((this.align) + " " + (this.dir)), + axis === 'x' ? ("" + (this.dir === 'left' ? -offset$1 : offset$1)) : (" " + (this.dir === 'top' ? -offset$1 : offset$1)), + null, + this.flip, + boundary + ).target; + var x = ref$1.x; + var y = ref$1.y; + + this.dir = axis === 'x' ? x : y; + this.align = axis === 'x' ? y : x; + + toggleClass(element, ((this.clsPos) + "-" + (this.dir) + "-" + (this.align)), this.offset === false); + + }, + + getAxis: function() { + return this.dir === 'top' || this.dir === 'bottom' ? 'y' : 'x'; + } + + } + + }; + + var active; + + var Drop = { + + mixins: [Position, Togglable], + + args: 'pos', + + props: { + mode: 'list', + toggle: Boolean, + boundary: Boolean, + boundaryAlign: Boolean, + delayShow: Number, + delayHide: Number, + clsDrop: String + }, + + data: { + mode: ['click', 'hover'], + toggle: '- *', + boundary: window, + boundaryAlign: false, + delayShow: 0, + delayHide: 800, + clsDrop: false, + hoverIdle: 200, + animation: ['uk-animation-fade'], + cls: 'uk-open' + }, + + computed: { + + boundary: function(ref, $el) { + var boundary = ref.boundary; + + return query(boundary, $el); + }, + + clsDrop: function(ref) { + var clsDrop = ref.clsDrop; + + return clsDrop || ("uk-" + (this.$options.name)); + }, + + clsPos: function() { + return this.clsDrop; + } + + }, + + created: function() { + this.tracker = new MouseTracker(); + }, + + connected: function() { + + addClass(this.$el, this.clsDrop); + + var ref = this.$props; + var toggle = ref.toggle; + this.toggle = toggle && this.$create('toggle', query(toggle, this.$el), { + target: this.$el, + mode: this.mode + }); + + !this.toggle && trigger(this.$el, 'updatearia'); + + }, + + events: [ + + + { + + name: 'click', + + delegate: function() { + return ("." + (this.clsDrop) + "-close"); + }, + + handler: function(e) { + e.preventDefault(); + this.hide(false); + } + + }, + + { + + name: 'click', + + delegate: function() { + return 'a[href^="#"]'; + }, + + handler: function(ref) { + var defaultPrevented = ref.defaultPrevented; + var hash = ref.current.hash; + + if (!defaultPrevented && hash && !within(hash, this.$el)) { + this.hide(false); + } + } + + }, + + { + + name: 'beforescroll', + + handler: function() { + this.hide(false); + } + + }, + + { + + name: 'toggle', + + self: true, + + handler: function(e, toggle) { + + e.preventDefault(); + + if (this.isToggled()) { + this.hide(false); + } else { + this.show(toggle, false); + } + } + + }, + + { + + name: pointerEnter, + + filter: function() { + return includes(this.mode, 'hover'); + }, + + handler: function(e) { + + if (isTouch(e)) { + return; + } + + if (active + && active !== this + && active.toggle + && includes(active.toggle.mode, 'hover') + && !within(e.target, active.toggle.$el) + && !pointInRect({x: e.pageX, y: e.pageY}, offset(active.$el)) + ) { + active.hide(false); + } + + e.preventDefault(); + this.show(this.toggle); + } + + }, + + { + + name: 'toggleshow', + + handler: function(e, toggle) { + + if (toggle && !includes(toggle.target, this.$el)) { + return; + } + + e.preventDefault(); + this.show(toggle || this.toggle); + } + + }, + + { + + name: ("togglehide " + pointerLeave), + + handler: function(e, toggle) { + + if (isTouch(e) || toggle && !includes(toggle.target, this.$el)) { + return; + } + + e.preventDefault(); + + if (this.toggle && includes(this.toggle.mode, 'hover')) { + this.hide(); + } + } + + }, + + { + + name: 'beforeshow', + + self: true, + + handler: function() { + this.clearTimers(); + Animation.cancel(this.$el); + this.position(); + } + + }, + + { + + name: 'show', + + self: true, + + handler: function() { + var this$1 = this; + + this.tracker.init(); + trigger(this.$el, 'updatearia'); + + // If triggered from an click event handler, delay adding the click handler + var off = delayOn(document, 'click', function (ref) { + var defaultPrevented = ref.defaultPrevented; + var target = ref.target; + + if (!defaultPrevented && !within(target, this$1.$el) && !(this$1.toggle && within(target, this$1.toggle.$el))) { + this$1.hide(false); + } + }); + + once(this.$el, 'hide', off, {self: true}); + } + + }, + + { + + name: 'beforehide', + + self: true, + + handler: function() { + this.clearTimers(); + } + + }, + + { + + name: 'hide', + + handler: function(ref) { + var target = ref.target; + + + if (this.$el !== target) { + active = active === null && within(target, this.$el) && this.isToggled() ? this : active; + return; + } + + active = this.isActive() ? null : active; + trigger(this.$el, 'updatearia'); + this.tracker.cancel(); + } + + }, + + { + + name: 'updatearia', + + self: true, + + handler: function(e, toggle) { + + e.preventDefault(); + + this.updateAria(this.$el); + + if (toggle || this.toggle) { + attr((toggle || this.toggle).$el, 'aria-expanded', this.isToggled()); + toggleClass(this.toggle.$el, this.cls, this.isToggled()); + } + } + } + + ], + + update: { + + write: function() { + + if (this.isToggled() && !Animation.inProgress(this.$el)) { + this.position(); + } + + }, + + events: ['resize'] + + }, + + methods: { + + show: function(toggle, delay) { + var this$1 = this; + if ( delay === void 0 ) delay = true; + + + var show = function () { return !this$1.isToggled() && this$1.toggleElement(this$1.$el, true); }; + var tryShow = function () { + + this$1.toggle = toggle || this$1.toggle; + + this$1.clearTimers(); + + if (this$1.isActive()) { + return; + } else if (delay && active && active !== this$1 && active.isDelaying) { + this$1.showTimer = setTimeout(this$1.show, 10); + return; + } else if (this$1.isParentOf(active)) { + + if (active.hideTimer) { + active.hide(false); + } else { + return; + } + + } else if (this$1.isChildOf(active)) { + + active.clearTimers(); + + } else if (active && !this$1.isChildOf(active) && !this$1.isParentOf(active)) { + + var prev; + while (active && active !== prev && !this$1.isChildOf(active)) { + prev = active; + active.hide(false); + } + + } + + if (delay && this$1.delayShow) { + this$1.showTimer = setTimeout(show, this$1.delayShow); + } else { + show(); + } + + active = this$1; + }; + + if (toggle && this.toggle && toggle.$el !== this.toggle.$el) { + + once(this.$el, 'hide', tryShow); + this.hide(false); + + } else { + tryShow(); + } + }, + + hide: function(delay) { + var this$1 = this; + if ( delay === void 0 ) delay = true; + + + var hide = function () { return this$1.toggleNow(this$1.$el, false); }; + + this.clearTimers(); + + this.isDelaying = this.tracker.movesTo(this.$el); + + if (delay && this.isDelaying) { + this.hideTimer = setTimeout(this.hide, this.hoverIdle); + } else if (delay && this.delayHide) { + this.hideTimer = setTimeout(hide, this.delayHide); + } else { + hide(); + } + }, + + clearTimers: function() { + clearTimeout(this.showTimer); + clearTimeout(this.hideTimer); + this.showTimer = null; + this.hideTimer = null; + this.isDelaying = false; + }, + + isActive: function() { + return active === this; + }, + + isChildOf: function(drop) { + return drop && drop !== this && within(this.$el, drop.$el); + }, + + isParentOf: function(drop) { + return drop && drop !== this && within(drop.$el, this.$el); + }, + + position: function() { + + removeClasses(this.$el, ((this.clsDrop) + "-(stack|boundary)")); + css(this.$el, {top: '', left: '', display: 'block'}); + toggleClass(this.$el, ((this.clsDrop) + "-boundary"), this.boundaryAlign); + + var boundary = offset(this.boundary); + var alignTo = this.boundaryAlign ? boundary : offset(this.toggle.$el); + + if (this.align === 'justify') { + var prop = this.getAxis() === 'y' ? 'width' : 'height'; + css(this.$el, prop, alignTo[prop]); + } else if (this.$el.offsetWidth > Math.max(boundary.right - alignTo.left, alignTo.right - boundary.left)) { + addClass(this.$el, ((this.clsDrop) + "-stack")); + } + + this.positionAt(this.$el, this.boundaryAlign ? this.boundary : this.toggle.$el, this.boundary); + + css(this.$el, 'display', ''); + + } + + } + + }; + + function delayOn(el, type, fn) { + var off = once(el, type, function () { return off = on(el, type, fn); } + , true); + return function () { return off(); }; + } + + var Dropdown = { + + extends: Drop + + }; + + var FormCustom = { + + mixins: [Class], + + args: 'target', + + props: { + target: Boolean + }, + + data: { + target: false + }, + + computed: { + + input: function(_, $el) { + return $(selInput, $el); + }, + + state: function() { + return this.input.nextElementSibling; + }, + + target: function(ref, $el) { + var target = ref.target; + + return target && (target === true + && this.input.parentNode === $el + && this.input.nextElementSibling + || query(target, $el)); + } + + }, + + update: function() { + + var ref = this; + var target = ref.target; + var input = ref.input; + + if (!target) { + return; + } + + var option; + var prop = isInput(target) ? 'value' : 'textContent'; + var prev = target[prop]; + var value = input.files && input.files[0] + ? input.files[0].name + : matches(input, 'select') && (option = $$('option', input).filter(function (el) { return el.selected; })[0]) // eslint-disable-line prefer-destructuring + ? option.textContent + : input.value; + + if (prev !== value) { + target[prop] = value; + } + + }, + + events: [ + + { + name: 'change', + + handler: function() { + this.$emit(); + } + }, + + { + name: 'reset', + + el: function() { + return closest(this.$el, 'form'); + }, + + handler: function() { + this.$emit(); + } + } + + ] + + }; + + // Deprecated + var Gif = { + + update: { + + read: function(data) { + + var inview = isInView(this.$el); + + if (!inview || data.isInView === inview) { + return false; + } + + data.isInView = inview; + }, + + write: function() { + this.$el.src = this.$el.src; + }, + + events: ['scroll', 'resize'] + } + + }; + + var Margin = { + + props: { + margin: String, + firstColumn: Boolean + }, + + data: { + margin: 'uk-margin-small-top', + firstColumn: 'uk-first-column' + }, + + update: { + + read: function(data) { + + var items = this.$el.children; + var rows = [[]]; + + if (!items.length || !isVisible(this.$el)) { + return data.rows = rows; + } + + data.rows = getRows(items); + data.stacks = !data.rows.some(function (row) { return row.length > 1; }); + + }, + + write: function(ref) { + var this$1 = this; + var rows = ref.rows; + + + rows.forEach(function (row, i) { return row.forEach(function (el, j) { + toggleClass(el, this$1.margin, i !== 0); + toggleClass(el, this$1.firstColumn, j === 0); + }); } + ); + + }, + + events: ['resize'] + + } + + }; + + function getRows(items) { + var rows = [[]]; + + for (var i = 0; i < items.length; i++) { + + var el = items[i]; + var dim = getOffset(el); + + if (!dim.height) { + continue; + } + + for (var j = rows.length - 1; j >= 0; j--) { + + var row = rows[j]; + + if (!row[0]) { + row.push(el); + break; + } + + var leftDim = (void 0); + if (row[0].offsetParent === el.offsetParent) { + leftDim = getOffset(row[0]); + } else { + dim = getOffset(el, true); + leftDim = getOffset(row[0], true); + } + + if (dim.top >= leftDim.bottom - 1 && dim.top !== leftDim.top) { + rows.push([el]); + break; + } + + if (dim.bottom > leftDim.top) { + + if (dim.left < leftDim.left && !isRtl) { + row.unshift(el); + break; + } + + row.push(el); + break; + } + + if (j === 0) { + rows.unshift([el]); + break; + } + + } + + } + + return rows; + + } + + function getOffset(element, offset) { + var assign; + + if ( offset === void 0 ) offset = false; + + var offsetTop = element.offsetTop; + var offsetLeft = element.offsetLeft; + var offsetHeight = element.offsetHeight; + + if (offset) { + (assign = offsetPosition(element), offsetTop = assign[0], offsetLeft = assign[1]); + } + + return { + top: offsetTop, + left: offsetLeft, + height: offsetHeight, + bottom: offsetTop + offsetHeight + }; + } + + var Grid = { + + extends: Margin, + + mixins: [Class], + + name: 'grid', + + props: { + masonry: Boolean, + parallax: Number + }, + + data: { + margin: 'uk-grid-margin', + clsStack: 'uk-grid-stack', + masonry: false, + parallax: 0 + }, + + computed: { + + length: function(_, $el) { + return $el.children.length; + }, + + parallax: function(ref) { + var parallax = ref.parallax; + + return parallax && this.length ? Math.abs(parallax) : ''; + } + + }, + + connected: function() { + this.masonry && addClass(this.$el, 'uk-flex-top uk-flex-wrap-top'); + }, + + update: [ + + { + + read: function(ref) { + var rows = ref.rows; + + + if (this.masonry || this.parallax) { + rows = rows.map(function (elements) { return sortBy(elements, 'offsetLeft'); }); + + if (isRtl) { + rows.map(function (row) { return row.reverse(); }); + } + + } + + var transitionInProgress = rows.some(function (elements) { return elements.some(Transition.inProgress); }); + var translates = false; + var elHeight = ''; + + if (this.masonry && this.length) { + + var height = 0; + + translates = rows.reduce(function (translates, row, i) { + + translates[i] = row.map(function (_, j) { return i === 0 ? 0 : toFloat(translates[i - 1][j]) + (height - toFloat(rows[i - 1][j] && rows[i - 1][j].offsetHeight)); }); + height = row.reduce(function (height, el) { return Math.max(height, el.offsetHeight); }, 0); + + return translates; + + }, []); + + elHeight = maxColumnHeight(rows) + getMarginTop(this.$el, this.margin) * (rows.length - 1); + + } + + var padding = this.parallax && getPaddingBottom(this.parallax, rows, translates); + + return {padding: padding, rows: rows, translates: translates, height: !transitionInProgress ? elHeight : false}; + + }, + + write: function(ref) { + var stacks = ref.stacks; + var height = ref.height; + var padding = ref.padding; + + + toggleClass(this.$el, this.clsStack, stacks); + + css(this.$el, 'paddingBottom', padding); + height !== false && css(this.$el, 'height', height); + + }, + + events: ['resize'] + + }, + + { + + read: function(ref) { + var height$1 = ref.height; + + return { + scrolled: this.parallax + ? scrolledOver(this.$el, height$1 ? height$1 - height(this.$el) : 0) * this.parallax + : false + }; + }, + + write: function(ref) { + var rows = ref.rows; + var scrolled = ref.scrolled; + var translates = ref.translates; + + + if (scrolled === false && !translates) { + return; + } + + rows.forEach(function (row, i) { return row.forEach(function (el, j) { return css(el, 'transform', !scrolled && !translates ? '' : ("translateY(" + ((translates && -translates[i][j]) + (scrolled ? j % 2 ? scrolled : scrolled / 8 : 0)) + "px)")); } + ); } + ); + + }, + + events: ['scroll', 'resize'] + + } + + ] + + }; + + function getPaddingBottom(distance, rows, translates) { + var column = 0; + var max = 0; + var maxScrolled = 0; + for (var i = rows.length - 1; i >= 0; i--) { + for (var j = column; j < rows[i].length; j++) { + var el = rows[i][j]; + var bottom = el.offsetTop + height(el) + (translates && -translates[i][j]); + max = Math.max(max, bottom); + maxScrolled = Math.max(maxScrolled, bottom + (j % 2 ? distance : distance / 8)); + column++; + } + } + return maxScrolled - max; + } + + function getMarginTop(root, cls) { + + var nodes = toNodes(root.children); + var ref = nodes.filter(function (el) { return hasClass(el, cls); }); + var node = ref[0]; + + return toFloat(node + ? css(node, 'marginTop') + : css(nodes[0], 'paddingLeft')); + } + + function maxColumnHeight(rows) { + return Math.max.apply(Math, rows.reduce(function (sum, row) { + row.forEach(function (el, i) { return sum[i] = (sum[i] || 0) + el.offsetHeight; }); + return sum; + }, [])); + } + + // IE 11 fix (min-height on a flex container won't apply to its flex items) + var FlexBug = isIE ? { + + props: { + selMinHeight: String + }, + + data: { + selMinHeight: false, + forceHeight: false + }, + + computed: { + + elements: function(ref, $el) { + var selMinHeight = ref.selMinHeight; + + return selMinHeight ? $$(selMinHeight, $el) : [$el]; + } + + }, + + update: [ + + { + + read: function() { + css(this.elements, 'height', ''); + }, + + order: -5, + + events: ['resize'] + + }, + + { + + write: function() { + var this$1 = this; + + this.elements.forEach(function (el) { + var height = toFloat(css(el, 'minHeight')); + if (height && (this$1.forceHeight || Math.round(height + boxModelAdjust('height', el, 'content-box')) >= el.offsetHeight)) { + css(el, 'height', height); + } + }); + }, + + order: 5, + + events: ['resize'] + + } + + ] + + } : {}; + + var HeightMatch = { + + mixins: [FlexBug], + + args: 'target', + + props: { + target: String, + row: Boolean + }, + + data: { + target: '> *', + row: true, + forceHeight: true + }, + + computed: { + + elements: function(ref, $el) { + var target = ref.target; + + return $$(target, $el); + } + + }, + + update: { + + read: function() { + return { + rows: (this.row ? getRows(this.elements) : [this.elements]).map(match) + }; + }, + + write: function(ref) { + var rows = ref.rows; + + rows.forEach(function (ref) { + var heights = ref.heights; + var elements = ref.elements; + + return elements.forEach(function (el, i) { return css(el, 'minHeight', heights[i]); } + ); + } + ); + }, + + events: ['resize'] + + } + + }; + + function match(elements) { + var assign; + + + if (elements.length < 2) { + return {heights: [''], elements: elements}; + } + + var ref = getHeights(elements); + var heights = ref.heights; + var max = ref.max; + var hasMinHeight = elements.some(function (el) { return el.style.minHeight; }); + var hasShrunk = elements.some(function (el, i) { return !el.style.minHeight && heights[i] < max; }); + + if (hasMinHeight && hasShrunk) { + css(elements, 'minHeight', ''); + ((assign = getHeights(elements), heights = assign.heights, max = assign.max)); + } + + heights = elements.map(function (el, i) { return heights[i] === max && toFloat(el.style.minHeight).toFixed(2) !== max.toFixed(2) ? '' : max; } + ); + + return {heights: heights, elements: elements}; + } + + function getHeights(elements) { + var heights = elements.map(function (el) { return offset(el).height - boxModelAdjust('height', el, 'content-box'); }); + var max = Math.max.apply(null, heights); + + return {heights: heights, max: max}; + } + + var HeightViewport = { + + mixins: [FlexBug], + + props: { + expand: Boolean, + offsetTop: Boolean, + offsetBottom: Boolean, + minHeight: Number + }, + + data: { + expand: false, + offsetTop: false, + offsetBottom: false, + minHeight: 0 + }, + + update: { + + read: function(ref) { + var prev = ref.minHeight; + + + if (!isVisible(this.$el)) { + return false; + } + + var minHeight = ''; + var box = boxModelAdjust('height', this.$el, 'content-box'); + + if (this.expand) { + + this.$el.dataset.heightExpand = ''; + + if ($('[data-height-expand]') !== this.$el) { + return false; + } + + minHeight = height(window) - (offsetHeight(document.documentElement) - offsetHeight(this.$el)) - box || ''; + + } else { + + // on mobile devices (iOS and Android) window.innerHeight !== 100vh + minHeight = 'calc(100vh'; + + if (this.offsetTop) { + + var ref$1 = offset(this.$el); + var top = ref$1.top; + minHeight += top > 0 && top < height(window) / 2 ? (" - " + top + "px") : ''; + + } + + if (this.offsetBottom === true) { + + minHeight += " - " + (offsetHeight(this.$el.nextElementSibling)) + "px"; + + } else if (isNumeric(this.offsetBottom)) { + + minHeight += " - " + (this.offsetBottom) + "vh"; + + } else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) { + + minHeight += " - " + (toFloat(this.offsetBottom)) + "px"; + + } else if (isString(this.offsetBottom)) { + + minHeight += " - " + (offsetHeight(query(this.offsetBottom, this.$el))) + "px"; + + } + + minHeight += (box ? (" - " + box + "px") : '') + ")"; + + } + + return {minHeight: minHeight, prev: prev}; + }, + + write: function(ref) { + var minHeight = ref.minHeight; + var prev = ref.prev; + + + css(this.$el, {minHeight: minHeight}); + + if (minHeight !== prev) { + this.$update(this.$el, 'resize'); + } + + if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) { + css(this.$el, 'minHeight', this.minHeight); + } + + }, + + events: ['resize'] + + } + + }; + + function offsetHeight(el) { + return el && offset(el).height || 0; + } + + var Svg = { + + args: 'src', + + props: { + id: Boolean, + icon: String, + src: String, + style: String, + width: Number, + height: Number, + ratio: Number, + class: String, + strokeAnimation: Boolean, + focusable: Boolean, // IE 11 + attributes: 'list' + }, + + data: { + ratio: 1, + include: ['style', 'class', 'focusable'], + class: '', + strokeAnimation: false + }, + + beforeConnect: function() { + var this$1 = this; + var assign; + + + this.class += ' uk-svg'; + + if (!this.icon && includes(this.src, '#')) { + + var parts = this.src.split('#'); + + if (parts.length > 1) { + (assign = parts, this.src = assign[0], this.icon = assign[1]); + } + } + + this.svg = this.getSvg().then(function (el) { + this$1.applyAttributes(el); + return this$1.svgEl = insertSVG(el, this$1.$el); + }, noop); + + }, + + disconnected: function() { + var this$1 = this; + + + if (isVoidElement(this.$el)) { + attr(this.$el, 'hidden', null); + } + + if (this.svg) { + this.svg.then(function (svg) { return (!this$1._connected || svg !== this$1.svgEl) && remove(svg); }, noop); + } + + this.svg = this.svgEl = null; + + }, + + update: { + + read: function() { + return !!(this.strokeAnimation && this.svgEl && isVisible(this.svgEl)); + }, + + write: function() { + applyAnimation(this.svgEl); + }, + + type: ['resize'] + + }, + + methods: { + + getSvg: function() { + var this$1 = this; + + return loadSVG(this.src).then(function (svg) { return parseSVG(svg, this$1.icon) || Promise.reject('SVG not found.'); } + ); + }, + + applyAttributes: function(el) { + var this$1 = this; + + + for (var prop in this.$options.props) { + if (this[prop] && includes(this.include, prop)) { + attr(el, prop, this[prop]); + } + } + + for (var attribute in this.attributes) { + var ref = this.attributes[attribute].split(':', 2); + var prop$1 = ref[0]; + var value = ref[1]; + attr(el, prop$1, value); + } + + if (!this.id) { + removeAttr(el, 'id'); + } + + var props = ['width', 'height']; + var dimensions = [this.width, this.height]; + + if (!dimensions.some(function (val) { return val; })) { + dimensions = props.map(function (prop) { return attr(el, prop); }); + } + + var viewBox = attr(el, 'viewBox'); + if (viewBox && !dimensions.some(function (val) { return val; })) { + dimensions = viewBox.split(' ').slice(2); + } + + dimensions.forEach(function (val, i) { + val = (val | 0) * this$1.ratio; + val && attr(el, props[i], val); + + if (val && !dimensions[i ^ 1]) { + removeAttr(el, props[i ^ 1]); + } + }); + + attr(el, 'data-svg', this.icon || this.src); + + } + + } + + }; + + var svgs = {}; + + function loadSVG(src) { + + if (svgs[src]) { + return svgs[src]; + } + + return svgs[src] = new Promise(function (resolve, reject) { + + if (!src) { + reject(); + return; + } + + if (startsWith(src, 'data:')) { + resolve(decodeURIComponent(src.split(',')[1])); + } else { + + ajax(src).then( + function (xhr) { return resolve(xhr.response); }, + function () { return reject('SVG not found.'); } + ); + + } + + }); + } + + function parseSVG(svg, icon) { + + if (icon && includes(svg, '/g; + var symbols = {}; + + function parseSymbols(svg, icon) { + + if (!symbols[svg]) { + + symbols[svg] = {}; + + var match; + while ((match = symbolRe.exec(svg))) { + symbols[svg][match[3]] = ""; + } + + symbolRe.lastIndex = 0; + + } + + return symbols[svg][icon]; + } + + function applyAnimation(el) { + + var length = getMaxPathLength(el); + + if (length) { + el.style.setProperty('--uk-animation-stroke', length); + } + + } + + function getMaxPathLength(el) { + return Math.ceil(Math.max.apply(Math, $$('[stroke]', el).map(function (stroke) { return stroke.getTotalLength && stroke.getTotalLength() || 0; } + ).concat([0]))); + } + + function insertSVG(el, root) { + if (isVoidElement(root) || root.tagName === 'CANVAS') { + + attr(root, 'hidden', true); + + var next = root.nextElementSibling; + return equals(el, next) + ? next + : after(root, el); + + } else { + + var last = root.lastElementChild; + return equals(el, last) + ? last + : append(root, el); + + } + } + + function equals(el, other) { + return attr(el, 'data-svg') === attr(other, 'data-svg'); + } + + var closeIcon = ""; + + var closeLarge = ""; + + var marker = ""; + + var navbarToggleIcon = ""; + + var overlayIcon = ""; + + var paginationNext = ""; + + var paginationPrevious = ""; + + var searchIcon = ""; + + var searchLarge = ""; + + var searchNavbar = ""; + + var slidenavNext = ""; + + var slidenavNextLarge = ""; + + var slidenavPrevious = ""; + + var slidenavPreviousLarge = ""; + + var spinner = ""; + + var totop = ""; + + var parsed = {}; + var icons = { + spinner: spinner, + totop: totop, + marker: marker, + 'close-icon': closeIcon, + 'close-large': closeLarge, + 'navbar-toggle-icon': navbarToggleIcon, + 'overlay-icon': overlayIcon, + 'pagination-next': paginationNext, + 'pagination-previous': paginationPrevious, + 'search-icon': searchIcon, + 'search-large': searchLarge, + 'search-navbar': searchNavbar, + 'slidenav-next': slidenavNext, + 'slidenav-next-large': slidenavNextLarge, + 'slidenav-previous': slidenavPrevious, + 'slidenav-previous-large': slidenavPreviousLarge + }; + + var Icon = { + + install: install, + + extends: Svg, + + args: 'icon', + + props: ['icon'], + + data: { + include: ['focusable'] + }, + + isIcon: true, + + beforeConnect: function() { + addClass(this.$el, 'uk-icon'); + }, + + methods: { + + getSvg: function() { + + var icon = getIcon(applyRtl(this.icon)); + + if (!icon) { + return Promise.reject('Icon not found.'); + } + + return Promise.resolve(icon); + } + + } + + }; + + var IconComponent = { + + args: false, + + extends: Icon, + + data: function (vm) { return ({ + icon: hyphenate(vm.constructor.options.name) + }); }, + + beforeConnect: function() { + addClass(this.$el, this.$name); + } + + }; + + var Slidenav = { + + extends: IconComponent, + + beforeConnect: function() { + addClass(this.$el, 'uk-slidenav'); + }, + + computed: { + + icon: function(ref, $el) { + var icon = ref.icon; + + return hasClass($el, 'uk-slidenav-large') + ? (icon + "-large") + : icon; + } + + } + + }; + + var Search = { + + extends: IconComponent, + + computed: { + + icon: function(ref, $el) { + var icon = ref.icon; + + return hasClass($el, 'uk-search-icon') && parents($el, '.uk-search-large').length + ? 'search-large' + : parents($el, '.uk-search-navbar').length + ? 'search-navbar' + : icon; + } + + } + + }; + + var Close = { + + extends: IconComponent, + + computed: { + + icon: function() { + return ("close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon')); + } + + } + + }; + + var Spinner = { + + extends: IconComponent, + + connected: function() { + var this$1 = this; + + this.svg.then(function (svg) { return this$1.ratio !== 1 && css($('circle', svg), 'strokeWidth', 1 / this$1.ratio); }, noop); + } + + }; + + function install(UIkit) { + UIkit.icon.add = function (name, svg) { + var obj; + + + var added = isString(name) ? (( obj = {}, obj[name] = svg, obj )) : name; + each(added, function (svg, name) { + icons[name] = svg; + delete parsed[name]; + }); + + if (UIkit._initialized) { + apply(document.body, function (el) { return each(UIkit.getComponents(el), function (cmp) { + cmp.$options.isIcon && cmp.icon in added && cmp.$reset(); + }); } + ); + } + }; + } + + function getIcon(icon) { + + if (!icons[icon]) { + return null; + } + + if (!parsed[icon]) { + parsed[icon] = $(icons[icon].trim()); + } + + return parsed[icon].cloneNode(true); + } + + function applyRtl(icon) { + return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon; + } + + var Img = { + + args: 'dataSrc', + + props: { + dataSrc: String, + dataSrcset: Boolean, + sizes: String, + width: Number, + height: Number, + offsetTop: String, + offsetLeft: String, + target: String + }, + + data: { + dataSrc: '', + dataSrcset: false, + sizes: false, + width: false, + height: false, + offsetTop: '50vh', + offsetLeft: 0, + target: false + }, + + computed: { + + cacheKey: function(ref) { + var dataSrc = ref.dataSrc; + + return ((this.$name) + "." + dataSrc); + }, + + width: function(ref) { + var width = ref.width; + var dataWidth = ref.dataWidth; + + return width || dataWidth; + }, + + height: function(ref) { + var height = ref.height; + var dataHeight = ref.dataHeight; + + return height || dataHeight; + }, + + sizes: function(ref) { + var sizes = ref.sizes; + var dataSizes = ref.dataSizes; + + return sizes || dataSizes; + }, + + isImg: function(_, $el) { + return isImg($el); + }, + + target: { + + get: function(ref) { + var target = ref.target; + + return [this.$el].concat(queryAll(target, this.$el)); + }, + + watch: function() { + this.observe(); + } + + }, + + offsetTop: function(ref) { + var offsetTop = ref.offsetTop; + + return toPx(offsetTop, 'height'); + }, + + offsetLeft: function(ref) { + var offsetLeft = ref.offsetLeft; + + return toPx(offsetLeft, 'width'); + } + + }, + + connected: function() { + + if (storage[this.cacheKey]) { + setSrcAttrs(this.$el, storage[this.cacheKey] || this.dataSrc, this.dataSrcset, this.sizes); + } else if (this.isImg && this.width && this.height) { + setSrcAttrs(this.$el, getPlaceholderImage(this.width, this.height, this.sizes)); + } + + this.observer = new IntersectionObserver(this.load, { + rootMargin: ((this.offsetTop) + "px " + (this.offsetLeft) + "px") + }); + + requestAnimationFrame(this.observe); + + }, + + disconnected: function() { + this.observer.disconnect(); + }, + + update: { + + read: function(ref) { + var this$1 = this; + var image = ref.image; + + + if (!image && document.readyState === 'complete') { + this.load(this.observer.takeRecords()); + } + + if (this.isImg) { + return false; + } + + image && image.then(function (img) { return img && img.currentSrc !== '' && setSrcAttrs(this$1.$el, currentSrc(img)); }); + + }, + + write: function(data) { + + if (this.dataSrcset && window.devicePixelRatio !== 1) { + + var bgSize = css(this.$el, 'backgroundSize'); + if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === data.bgSize) { + data.bgSize = getSourceSize(this.dataSrcset, this.sizes); + css(this.$el, 'backgroundSize', ((data.bgSize) + "px")); + } + + } + + }, + + events: ['resize'] + + }, + + methods: { + + load: function(entries) { + var this$1 = this; + + + // Old chromium based browsers (UC Browser) did not implement `isIntersecting` + if (!entries.some(function (entry) { return isUndefined(entry.isIntersecting) || entry.isIntersecting; })) { + return; + } + + this._data.image = getImage(this.dataSrc, this.dataSrcset, this.sizes).then(function (img) { + + setSrcAttrs(this$1.$el, currentSrc(img), img.srcset, img.sizes); + storage[this$1.cacheKey] = currentSrc(img); + return img; + + }, noop); + + this.observer.disconnect(); + }, + + observe: function() { + var this$1 = this; + + if (!this._data.image && this._connected) { + this.target.forEach(function (el) { return this$1.observer.observe(el); }); + } + } + + } + + }; + + function setSrcAttrs(el, src, srcset, sizes) { + + if (isImg(el)) { + sizes && (el.sizes = sizes); + srcset && (el.srcset = srcset); + src && (el.src = src); + } else if (src) { + + var change = !includes(el.style.backgroundImage, src); + if (change) { + css(el, 'backgroundImage', ("url(" + (escape(src)) + ")")); + trigger(el, createEvent('load', false)); + } + + } + + } + + function getPlaceholderImage(width, height, sizes) { + var assign; + + + if (sizes) { + ((assign = Dimensions.ratio({width: width, height: height}, 'width', toPx(sizesToPixel(sizes))), width = assign.width, height = assign.height)); + } + + return ("data:image/svg+xml;utf8,"); + } + + var sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g; + function sizesToPixel(sizes) { + var matches; + + sizesRe.lastIndex = 0; + + while ((matches = sizesRe.exec(sizes))) { + if (!matches[1] || window.matchMedia(matches[1]).matches) { + matches = evaluateSize(matches[2]); + break; + } + } + + return matches || '100vw'; + } + + var sizeRe = /\d+(?:\w+|%)/g; + var additionRe = /[+-]?(\d+)/g; + function evaluateSize(size) { + return startsWith(size, 'calc') + ? size + .substring(5, size.length - 1) + .replace(sizeRe, function (size) { return toPx(size); }) + .replace(/ /g, '') + .match(additionRe) + .reduce(function (a, b) { return a + +b; }, 0) + : size; + } + + var srcSetRe = /\s+\d+w\s*(?:,|$)/g; + function getSourceSize(srcset, sizes) { + var srcSize = toPx(sizesToPixel(sizes)); + var descriptors = (srcset.match(srcSetRe) || []).map(toFloat).sort(function (a, b) { return a - b; }); + + return descriptors.filter(function (size) { return size >= srcSize; })[0] || descriptors.pop() || ''; + } + + function isImg(el) { + return el.tagName === 'IMG'; + } + + function currentSrc(el) { + return el.currentSrc || el.src; + } + + var key = '__test__'; + var storage; + + // workaround for Safari's private browsing mode and accessing sessionStorage in Blink + try { + storage = window.sessionStorage || {}; + storage[key] = 1; + delete storage[key]; + } catch (e) { + storage = {}; + } + + var Media = { + + props: { + media: Boolean + }, + + data: { + media: false + }, + + computed: { + + matchMedia: function() { + var media = toMedia(this.media); + return !media || window.matchMedia(media).matches; + } + + } + + }; + + function toMedia(value) { + + if (isString(value)) { + if (value[0] === '@') { + var name = "breakpoint-" + (value.substr(1)); + value = toFloat(getCssVar(name)); + } else if (isNaN(value)) { + return value; + } + } + + return value && !isNaN(value) ? ("(min-width: " + value + "px)") : false; + } + + var Leader = { + + mixins: [Class, Media], + + props: { + fill: String + }, + + data: { + fill: '', + clsWrapper: 'uk-leader-fill', + clsHide: 'uk-leader-hide', + attrFill: 'data-fill' + }, + + computed: { + + fill: function(ref) { + var fill = ref.fill; + + return fill || getCssVar('leader-fill-content'); + } + + }, + + connected: function() { + var assign; + + (assign = wrapInner(this.$el, ("")), this.wrapper = assign[0]); + }, + + disconnected: function() { + unwrap(this.wrapper.childNodes); + }, + + update: { + + read: function(ref) { + var changed = ref.changed; + var width = ref.width; + + + var prev = width; + + width = Math.floor(this.$el.offsetWidth / 2); + + return { + width: width, + fill: this.fill, + changed: changed || prev !== width, + hide: !this.matchMedia + }; + }, + + write: function(data) { + + toggleClass(this.wrapper, this.clsHide, data.hide); + + if (data.changed) { + data.changed = false; + attr(this.wrapper, this.attrFill, new Array(data.width).join(data.fill)); + } + + }, + + events: ['resize'] + + } + + }; + + var Container = { + + props: { + container: Boolean + }, + + data: { + container: true + }, + + computed: { + + container: function(ref) { + var container = ref.container; + + return container === true && this.$container || container && $(container); + } + + } + + }; + + var active$1 = []; + + var Modal = { + + mixins: [Class, Container, Togglable], + + props: { + selPanel: String, + selClose: String, + escClose: Boolean, + bgClose: Boolean, + stack: Boolean + }, + + data: { + cls: 'uk-open', + escClose: true, + bgClose: true, + overlay: true, + stack: false + }, + + computed: { + + panel: function(ref, $el) { + var selPanel = ref.selPanel; + + return $(selPanel, $el); + }, + + transitionElement: function() { + return this.panel; + }, + + bgClose: function(ref) { + var bgClose = ref.bgClose; + + return bgClose && this.panel; + } + + }, + + beforeDisconnect: function() { + if (this.isToggled()) { + this.toggleNow(this.$el, false); + } + }, + + events: [ + + { + + name: 'click', + + delegate: function() { + return this.selClose; + }, + + handler: function(e) { + e.preventDefault(); + this.hide(); + } + + }, + + { + + name: 'toggle', + + self: true, + + handler: function(e) { + + if (e.defaultPrevented) { + return; + } + + e.preventDefault(); + this.toggle(); + } + + }, + + { + name: 'beforeshow', + + self: true, + + handler: function(e) { + + if (includes(active$1, this)) { + return false; + } + + if (!this.stack && active$1.length) { + Promise.all(active$1.map(function (modal) { return modal.hide(); })).then(this.show); + e.preventDefault(); + } else { + active$1.push(this); + } + } + + }, + + { + + name: 'show', + + self: true, + + handler: function() { + var this$1 = this; + + + if (width(window) - width(document) && this.overlay) { + css(document.body, 'overflowY', 'scroll'); + } + + addClass(document.documentElement, this.clsPage); + + if (this.bgClose) { + once(this.$el, 'hide', delayOn(document, 'click', function (ref) { + var defaultPrevented = ref.defaultPrevented; + var target = ref.target; + + var current = last(active$1); + if (!defaultPrevented + && current === this$1 + && (!current.overlay || within(target, current.$el)) + && !within(target, current.panel) + ) { + current.hide(); + } + }), {self: true}); + } + + if (this.escClose) { + once(this.$el, 'hide', on(document, 'keydown', function (e) { + var current = last(active$1); + if (e.keyCode === 27 && current === this$1) { + e.preventDefault(); + current.hide(); + } + }), {self: true}); + } + } + + }, + + { + + name: 'hidden', + + self: true, + + handler: function() { + var this$1 = this; + + + active$1.splice(active$1.indexOf(this), 1); + + if (!active$1.length) { + css(document.body, 'overflowY', ''); + } + + if (!active$1.some(function (modal) { return modal.clsPage === this$1.clsPage; })) { + removeClass(document.documentElement, this.clsPage); + } + + } + + } + + ], + + methods: { + + toggle: function() { + return this.isToggled() ? this.hide() : this.show(); + }, + + show: function() { + var this$1 = this; + + + if (this.container && this.$el.parentNode !== this.container) { + append(this.container, this.$el); + return new Promise(function (resolve) { return requestAnimationFrame(function () { return this$1.show().then(resolve); } + ); } + ); + } + + return this.toggleElement(this.$el, true, animate$1(this)); + }, + + hide: function() { + return this.toggleElement(this.$el, false, animate$1(this)); + } + + } + + }; + + function animate$1(ref) { + var transitionElement = ref.transitionElement; + var _toggle = ref._toggle; + + return function (el, show) { return new Promise(function (resolve, reject) { return once(el, 'show hide', function () { + el._reject && el._reject(); + el._reject = reject; + + _toggle(el, show); + + var off = once(transitionElement, 'transitionstart', function () { + once(transitionElement, 'transitionend transitioncancel', resolve, {self: true}); + clearTimeout(timer); + }, {self: true}); + + var timer = setTimeout(function () { + off(); + resolve(); + }, toMs(css(transitionElement, 'transitionDuration'))); + + }); } + ); }; + } + + var Modal$1 = { + + install: install$1, + + mixins: [Modal], + + data: { + clsPage: 'uk-modal-page', + selPanel: '.uk-modal-dialog', + selClose: '.uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full' + }, + + events: [ + + { + name: 'show', + + self: true, + + handler: function() { + + if (hasClass(this.panel, 'uk-margin-auto-vertical')) { + addClass(this.$el, 'uk-flex'); + } else { + css(this.$el, 'display', 'block'); + } + + height(this.$el); // force reflow + } + }, + + { + name: 'hidden', + + self: true, + + handler: function() { + + css(this.$el, 'display', ''); + removeClass(this.$el, 'uk-flex'); + + } + } + + ] + + }; + + function install$1(UIkit) { + + UIkit.modal.dialog = function (content, options) { + + var dialog = UIkit.modal(("
    " + content + "
    "), options); + + dialog.show(); + + on(dialog.$el, 'hidden', function () { return Promise.resolve(function () { return dialog.$destroy(true); }); }, {self: true}); + + return dialog; + }; + + UIkit.modal.alert = function (message, options) { + + options = assign({bgClose: false, escClose: false, labels: UIkit.modal.labels}, options); + + return new Promise( + function (resolve) { return on(UIkit.modal.dialog(("
    " + (isString(message) ? message : html(message)) + "
    "), options).$el, 'hide', resolve); } + ); + }; + + UIkit.modal.confirm = function (message, options) { + + options = assign({bgClose: false, escClose: true, labels: UIkit.modal.labels}, options); + + return new Promise(function (resolve, reject) { + + var confirm = UIkit.modal.dialog(("
    " + (isString(message) ? message : html(message)) + "
    "), options); + + var resolved = false; + + on(confirm.$el, 'submit', 'form', function (e) { + e.preventDefault(); + resolve(); + resolved = true; + confirm.hide(); + }); + on(confirm.$el, 'hide', function () { + if (!resolved) { + reject(); + } + }); + + }); + }; + + UIkit.modal.prompt = function (message, value, options) { + + options = assign({bgClose: false, escClose: true, labels: UIkit.modal.labels}, options); + + return new Promise(function (resolve) { + + var prompt = UIkit.modal.dialog(("
    "), options), + input = $('input', prompt.$el); + + input.value = value; + + var resolved = false; + + on(prompt.$el, 'submit', 'form', function (e) { + e.preventDefault(); + resolve(input.value); + resolved = true; + prompt.hide(); + }); + on(prompt.$el, 'hide', function () { + if (!resolved) { + resolve(null); + } + }); + + }); + }; + + UIkit.modal.labels = { + ok: 'Ok', + cancel: 'Cancel' + }; + + } + + var Nav = { + + extends: Accordion, + + data: { + targets: '> .uk-parent', + toggle: '> a', + content: '> ul' + } + + }; + + var Navbar = { + + mixins: [Class, FlexBug], + + props: { + dropdown: String, + mode: 'list', + align: String, + offset: Number, + boundary: Boolean, + boundaryAlign: Boolean, + clsDrop: String, + delayShow: Number, + delayHide: Number, + dropbar: Boolean, + dropbarMode: String, + dropbarAnchor: Boolean, + duration: Number + }, + + data: { + dropdown: '.uk-navbar-nav > li', + align: !isRtl ? 'left' : 'right', + clsDrop: 'uk-navbar-dropdown', + mode: undefined, + offset: undefined, + delayShow: undefined, + delayHide: undefined, + boundaryAlign: undefined, + flip: 'x', + boundary: true, + dropbar: false, + dropbarMode: 'slide', + dropbarAnchor: false, + duration: 200, + forceHeight: true, + selMinHeight: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle' + }, + + computed: { + + boundary: function(ref, $el) { + var boundary = ref.boundary; + var boundaryAlign = ref.boundaryAlign; + + return (boundary === true || boundaryAlign) ? $el : boundary; + }, + + dropbarAnchor: function(ref, $el) { + var dropbarAnchor = ref.dropbarAnchor; + + return query(dropbarAnchor, $el); + }, + + pos: function(ref) { + var align = ref.align; + + return ("bottom-" + align); + }, + + dropdowns: function(ref, $el) { + var dropdown = ref.dropdown; + var clsDrop = ref.clsDrop; + + return $$((dropdown + " ." + clsDrop), $el); + } + + }, + + beforeConnect: function() { + + var ref = this.$props; + var dropbar = ref.dropbar; + + this.dropbar = dropbar && (query(dropbar, this.$el) || $('+ .uk-navbar-dropbar', this.$el) || $('
    ')); + + if (this.dropbar) { + + addClass(this.dropbar, 'uk-navbar-dropbar'); + + if (this.dropbarMode === 'slide') { + addClass(this.dropbar, 'uk-navbar-dropbar-slide'); + } + } + + }, + + disconnected: function() { + this.dropbar && remove(this.dropbar); + }, + + update: function() { + var this$1 = this; + + + this.$create( + 'drop', + this.dropdowns.filter(function (el) { return !this$1.getDropdown(el); }), + assign({}, this.$props, {boundary: this.boundary, pos: this.pos, offset: this.dropbar || this.offset}) + ); + + }, + + events: [ + + { + name: 'mouseover', + + delegate: function() { + return this.dropdown; + }, + + handler: function(ref) { + var current = ref.current; + + var active = this.getActive(); + if (active && active.toggle && !within(active.toggle.$el, current) && !active.tracker.movesTo(active.$el)) { + active.hide(false); + } + } + + }, + + { + name: 'mouseleave', + + el: function() { + return this.dropbar; + }, + + handler: function() { + var active = this.getActive(); + + if (active && !this.dropdowns.some(function (el) { return matches(el, ':hover'); })) { + active.hide(); + } + } + }, + + { + name: 'beforeshow', + + capture: true, + + filter: function() { + return this.dropbar; + }, + + handler: function() { + + if (!this.dropbar.parentNode) { + after(this.dropbarAnchor || this.$el, this.dropbar); + } + + } + }, + + { + name: 'show', + + capture: true, + + filter: function() { + return this.dropbar; + }, + + handler: function(_, drop) { + + var $el = drop.$el; + var dir = drop.dir; + + this.clsDrop && addClass($el, ((this.clsDrop) + "-dropbar")); + + if (dir === 'bottom') { + this.transitionTo($el.offsetHeight + toFloat(css($el, 'marginTop')) + toFloat(css($el, 'marginBottom')), $el); + } + } + }, + + { + name: 'beforehide', + + filter: function() { + return this.dropbar; + }, + + handler: function(e, ref) { + var $el = ref.$el; + + + var active = this.getActive(); + + if (matches(this.dropbar, ':hover') && active && active.$el === $el) { + e.preventDefault(); + } + } + }, + + { + name: 'hide', + + filter: function() { + return this.dropbar; + }, + + handler: function(_, ref) { + var $el = ref.$el; + + + var active = this.getActive(); + + if (!active || active && active.$el === $el) { + this.transitionTo(0); + } + } + } + + ], + + methods: { + + getActive: function() { + var ref = this.dropdowns.map(this.getDropdown).filter(function (drop) { return drop && drop.isActive(); }); + var active = ref[0]; + return active && includes(active.mode, 'hover') && within(active.toggle.$el, this.$el) && active; + }, + + transitionTo: function(newHeight, el) { + var this$1 = this; + + + var ref = this; + var dropbar = ref.dropbar; + var oldHeight = isVisible(dropbar) ? height(dropbar) : 0; + + el = oldHeight < newHeight && el; + + css(el, 'clip', ("rect(0," + (el.offsetWidth) + "px," + oldHeight + "px,0)")); + + height(dropbar, oldHeight); + + Transition.cancel([el, dropbar]); + return Promise.all([ + Transition.start(dropbar, {height: newHeight}, this.duration), + Transition.start(el, {clip: ("rect(0," + (el.offsetWidth) + "px," + newHeight + "px,0)")}, this.duration) + ]) + .catch(noop) + .then(function () { + css(el, {clip: ''}); + this$1.$update(dropbar); + }); + }, + + getDropdown: function(el) { + return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown'); + } + + } + + }; + + var Offcanvas = { + + mixins: [Modal], + + args: 'mode', + + props: { + mode: String, + flip: Boolean, + overlay: Boolean + }, + + data: { + mode: 'slide', + flip: false, + overlay: false, + clsPage: 'uk-offcanvas-page', + clsContainer: 'uk-offcanvas-container', + selPanel: '.uk-offcanvas-bar', + clsFlip: 'uk-offcanvas-flip', + clsContainerAnimation: 'uk-offcanvas-container-animation', + clsSidebarAnimation: 'uk-offcanvas-bar-animation', + clsMode: 'uk-offcanvas', + clsOverlay: 'uk-offcanvas-overlay', + selClose: '.uk-offcanvas-close', + container: false + }, + + computed: { + + clsFlip: function(ref) { + var flip = ref.flip; + var clsFlip = ref.clsFlip; + + return flip ? clsFlip : ''; + }, + + clsOverlay: function(ref) { + var overlay = ref.overlay; + var clsOverlay = ref.clsOverlay; + + return overlay ? clsOverlay : ''; + }, + + clsMode: function(ref) { + var mode = ref.mode; + var clsMode = ref.clsMode; + + return (clsMode + "-" + mode); + }, + + clsSidebarAnimation: function(ref) { + var mode = ref.mode; + var clsSidebarAnimation = ref.clsSidebarAnimation; + + return mode === 'none' || mode === 'reveal' ? '' : clsSidebarAnimation; + }, + + clsContainerAnimation: function(ref) { + var mode = ref.mode; + var clsContainerAnimation = ref.clsContainerAnimation; + + return mode !== 'push' && mode !== 'reveal' ? '' : clsContainerAnimation; + }, + + transitionElement: function(ref) { + var mode = ref.mode; + + return mode === 'reveal' ? this.panel.parentNode : this.panel; + } + + }, + + events: [ + + { + + name: 'click', + + delegate: function() { + return 'a[href^="#"]'; + }, + + handler: function(ref) { + var hash = ref.current.hash; + var defaultPrevented = ref.defaultPrevented; + + if (!defaultPrevented && hash && $(hash, document.body)) { + this.hide(); + } + } + + }, + + { + name: 'touchstart', + + passive: true, + + el: function() { + return this.panel; + }, + + handler: function(ref) { + var targetTouches = ref.targetTouches; + + + if (targetTouches.length === 1) { + this.clientY = targetTouches[0].clientY; + } + + } + + }, + + { + name: 'touchmove', + + self: true, + passive: false, + + filter: function() { + return this.overlay; + }, + + handler: function(e) { + e.cancelable && e.preventDefault(); + } + + }, + + { + name: 'touchmove', + + passive: false, + + el: function() { + return this.panel; + }, + + handler: function(e) { + + if (e.targetTouches.length !== 1) { + return; + } + + var clientY = event.targetTouches[0].clientY - this.clientY; + var ref = this.panel; + var scrollTop = ref.scrollTop; + var scrollHeight = ref.scrollHeight; + var clientHeight = ref.clientHeight; + + if (clientHeight >= scrollHeight + || scrollTop === 0 && clientY > 0 + || scrollHeight - scrollTop <= clientHeight && clientY < 0 + ) { + e.cancelable && e.preventDefault(); + } + + } + + }, + + { + name: 'show', + + self: true, + + handler: function() { + + if (this.mode === 'reveal' && !hasClass(this.panel.parentNode, this.clsMode)) { + wrapAll(this.panel, '
    '); + addClass(this.panel.parentNode, this.clsMode); + } + + css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : ''); + addClass(document.body, this.clsContainer, this.clsFlip); + css(document.body, 'touch-action', 'pan-y pinch-zoom'); + css(this.$el, 'display', 'block'); + addClass(this.$el, this.clsOverlay); + addClass(this.panel, this.clsSidebarAnimation, this.mode !== 'reveal' ? this.clsMode : ''); + + height(document.body); // force reflow + addClass(document.body, this.clsContainerAnimation); + + this.clsContainerAnimation && suppressUserScale(); + + + } + }, + + { + name: 'hide', + + self: true, + + handler: function() { + removeClass(document.body, this.clsContainerAnimation); + css(document.body, 'touch-action', ''); + } + }, + + { + name: 'hidden', + + self: true, + + handler: function() { + + this.clsContainerAnimation && resumeUserScale(); + + if (this.mode === 'reveal') { + unwrap(this.panel); + } + + removeClass(this.panel, this.clsSidebarAnimation, this.clsMode); + removeClass(this.$el, this.clsOverlay); + css(this.$el, 'display', ''); + removeClass(document.body, this.clsContainer, this.clsFlip); + + css(document.documentElement, 'overflowY', ''); + + } + }, + + { + name: 'swipeLeft swipeRight', + + handler: function(e) { + + if (this.isToggled() && endsWith(e.type, 'Left') ^ this.flip) { + this.hide(); + } + + } + } + + ] + + }; + + // Chrome in responsive mode zooms page upon opening offcanvas + function suppressUserScale() { + getViewport().content += ',user-scalable=0'; + } + + function resumeUserScale() { + var viewport = getViewport(); + viewport.content = viewport.content.replace(/,user-scalable=0$/, ''); + } + + function getViewport() { + return $('meta[name="viewport"]', document.head) || append(document.head, ''); + } + + var OverflowAuto = { + + mixins: [Class], + + props: { + selContainer: String, + selContent: String + }, + + data: { + selContainer: '.uk-modal', + selContent: '.uk-modal-dialog' + }, + + computed: { + + container: function(ref, $el) { + var selContainer = ref.selContainer; + + return closest($el, selContainer); + }, + + content: function(ref, $el) { + var selContent = ref.selContent; + + return closest($el, selContent); + } + + }, + + connected: function() { + css(this.$el, 'minHeight', 150); + }, + + update: { + + read: function() { + + if (!this.content || !this.container) { + return false; + } + + return { + current: toFloat(css(this.$el, 'maxHeight')), + max: Math.max(150, height(this.container) - (offset(this.content).height - height(this.$el))) + }; + }, + + write: function(ref) { + var current = ref.current; + var max = ref.max; + + css(this.$el, 'maxHeight', max); + if (Math.round(current) !== Math.round(max)) { + trigger(this.$el, 'resize'); + } + }, + + events: ['resize'] + + } + + }; + + var Responsive = { + + props: ['width', 'height'], + + connected: function() { + addClass(this.$el, 'uk-responsive-width'); + }, + + update: { + + read: function() { + return isVisible(this.$el) && this.width && this.height + ? {width: width(this.$el.parentNode), height: this.height} + : false; + }, + + write: function(dim) { + height(this.$el, Dimensions.contain({ + height: this.height, + width: this.width + }, dim).height); + }, + + events: ['resize'] + + } + + }; + + var Scroll = { + + props: { + duration: Number, + offset: Number + }, + + data: { + duration: 1000, + offset: 0 + }, + + methods: { + + scrollTo: function(el) { + var this$1 = this; + + + el = el && $(el) || document.body; + + var docHeight = height(document); + var winHeight = height(window); + + var target = offset(el).top - this.offset; + if (target + winHeight > docHeight) { + target = docHeight - winHeight; + } + + if (!trigger(this.$el, 'beforescroll', [this, el])) { + return; + } + + var start = Date.now(); + var startY = window.pageYOffset; + var step = function () { + + var currentY = startY + (target - startY) * ease(clamp((Date.now() - start) / this$1.duration)); + + scrollTop(window, currentY); + + // scroll more if we have not reached our destination + if (currentY !== target) { + requestAnimationFrame(step); + } else { + trigger(this$1.$el, 'scrolled', [this$1, el]); + } + + }; + + step(); + + } + + }, + + events: { + + click: function(e) { + + if (e.defaultPrevented) { + return; + } + + e.preventDefault(); + this.scrollTo(escape(decodeURIComponent(this.$el.hash)).substr(1)); + } + + } + + }; + + function ease(k) { + return 0.5 * (1 - Math.cos(Math.PI * k)); + } + + var Scrollspy = { + + args: 'cls', + + props: { + cls: String, + target: String, + hidden: Boolean, + offsetTop: Number, + offsetLeft: Number, + repeat: Boolean, + delay: Number + }, + + data: function () { return ({ + cls: false, + target: false, + hidden: true, + offsetTop: 0, + offsetLeft: 0, + repeat: false, + delay: 0, + inViewClass: 'uk-scrollspy-inview' + }); }, + + computed: { + + elements: function(ref, $el) { + var target = ref.target; + + return target ? $$(target, $el) : [$el]; + } + + }, + + update: [ + + { + + write: function() { + if (this.hidden) { + css(filter(this.elements, (":not(." + (this.inViewClass) + ")")), 'visibility', 'hidden'); + } + } + + }, + + { + + read: function(ref) { + var this$1 = this; + var update = ref.update; + + + if (!update) { + return; + } + + this.elements.forEach(function (el) { + + var state = el._ukScrollspyState; + + if (!state) { + state = {cls: data(el, 'uk-scrollspy-class') || this$1.cls}; + } + + state.show = isInView(el, this$1.offsetTop, this$1.offsetLeft); + el._ukScrollspyState = state; + + }); + + }, + + write: function(data) { + var this$1 = this; + + + // Let child components be applied at least once first + if (!data.update) { + this.$emit(); + return data.update = true; + } + + this.elements.forEach(function (el) { + + var state = el._ukScrollspyState; + var toggle = function (inview) { + + css(el, 'visibility', !inview && this$1.hidden ? 'hidden' : ''); + + toggleClass(el, this$1.inViewClass, inview); + toggleClass(el, state.cls); + + trigger(el, inview ? 'inview' : 'outview'); + + state.inview = inview; + + this$1.$update(el); + + }; + + if (state.show && !state.inview && !state.queued) { + + state.queued = true; + + data.promise = (data.promise || Promise.resolve()).then(function () { return new Promise(function (resolve) { return setTimeout(resolve, this$1.delay); } + ); } + ).then(function () { + toggle(true); + setTimeout(function () { return state.queued = false; }, 300); + }); + + } else if (!state.show && state.inview && !state.queued && this$1.repeat) { + + toggle(false); + + } + + }); + + }, + + events: ['scroll', 'resize'] + + } + + ] + + }; + + var ScrollspyNav = { + + props: { + cls: String, + closest: String, + scroll: Boolean, + overflow: Boolean, + offset: Number + }, + + data: { + cls: 'uk-active', + closest: false, + scroll: false, + overflow: true, + offset: 0 + }, + + computed: { + + links: function(_, $el) { + return $$('a[href^="#"]', $el).filter(function (el) { return el.hash; }); + }, + + elements: function(ref) { + var selector = ref.closest; + + return closest(this.links, selector || '*'); + }, + + targets: function() { + return $$(this.links.map(function (el) { return escape(el.hash).substr(1); }).join(',')); + } + + }, + + update: [ + + { + + read: function() { + if (this.scroll) { + this.$create('scroll', this.links, {offset: this.offset || 0}); + } + } + + }, + + { + + read: function(data) { + var this$1 = this; + + + var scroll = window.pageYOffset + this.offset + 1; + var max = height(document) - height(window) + this.offset; + + data.active = false; + + this.targets.every(function (el, i) { + + var ref = offset(el); + var top = ref.top; + var last = i + 1 === this$1.targets.length; + + if (!this$1.overflow && (i === 0 && top > scroll || last && top + el.offsetTop < scroll)) { + return false; + } + + if (!last && offset(this$1.targets[i + 1]).top <= scroll) { + return true; + } + + if (scroll >= max) { + for (var j = this$1.targets.length - 1; j > i; j--) { + if (isInView(this$1.targets[j])) { + el = this$1.targets[j]; + break; + } + } + } + + return !(data.active = $(filter(this$1.links, ("[href=\"#" + (el.id) + "\"]")))); + + }); + + }, + + write: function(ref) { + var active = ref.active; + + + this.links.forEach(function (el) { return el.blur(); }); + removeClass(this.elements, this.cls); + + if (active) { + trigger(this.$el, 'active', [active, addClass(this.closest ? closest(active, this.closest) : active, this.cls)]); + } + + }, + + events: ['scroll', 'resize'] + + } + + ] + + }; + + var Sticky = { + + mixins: [Class, Media], + + props: { + top: null, + bottom: Boolean, + offset: String, + animation: String, + clsActive: String, + clsInactive: String, + clsFixed: String, + clsBelow: String, + selTarget: String, + widthElement: Boolean, + showOnUp: Boolean, + targetOffset: Number + }, + + data: { + top: 0, + bottom: false, + offset: 0, + animation: '', + clsActive: 'uk-active', + clsInactive: '', + clsFixed: 'uk-sticky-fixed', + clsBelow: 'uk-sticky-below', + selTarget: '', + widthElement: false, + showOnUp: false, + targetOffset: false + }, + + computed: { + + offset: function(ref) { + var offset = ref.offset; + + return toPx(offset); + }, + + selTarget: function(ref, $el) { + var selTarget = ref.selTarget; + + return selTarget && $(selTarget, $el) || $el; + }, + + widthElement: function(ref, $el) { + var widthElement = ref.widthElement; + + return query(widthElement, $el) || this.placeholder; + }, + + isActive: { + + get: function() { + return hasClass(this.selTarget, this.clsActive); + }, + + set: function(value) { + if (value && !this.isActive) { + replaceClass(this.selTarget, this.clsInactive, this.clsActive); + trigger(this.$el, 'active'); + } else if (!value && !hasClass(this.selTarget, this.clsInactive)) { + replaceClass(this.selTarget, this.clsActive, this.clsInactive); + trigger(this.$el, 'inactive'); + } + } + + } + + }, + + connected: function() { + this.placeholder = $('+ .uk-sticky-placeholder', this.$el) || $('
    '); + this.isFixed = false; + this.isActive = false; + }, + + disconnected: function() { + + if (this.isFixed) { + this.hide(); + removeClass(this.selTarget, this.clsInactive); + } + + remove(this.placeholder); + this.placeholder = null; + this.widthElement = null; + }, + + events: [ + + { + + name: 'load hashchange popstate', + + el: window, + + handler: function() { + var this$1 = this; + + + if (!(this.targetOffset !== false && location.hash && window.pageYOffset > 0)) { + return; + } + + var target = $(location.hash); + + if (target) { + fastdom.read(function () { + + var ref = offset(target); + var top = ref.top; + var elTop = offset(this$1.$el).top; + var elHeight = this$1.$el.offsetHeight; + + if (this$1.isFixed && elTop + elHeight >= top && elTop <= top + target.offsetHeight) { + scrollTop(window, top - elHeight - (isNumeric(this$1.targetOffset) ? this$1.targetOffset : 0) - this$1.offset); + } + + }); + } + + } + + } + + ], + + update: [ + + { + + read: function(ref, type) { + var height = ref.height; + + + if (this.isActive && type !== 'update') { + + this.hide(); + height = this.$el.offsetHeight; + this.show(); + + } + + height = !this.isActive ? this.$el.offsetHeight : height; + + this.topOffset = offset(this.isFixed ? this.placeholder : this.$el).top; + this.bottomOffset = this.topOffset + height; + + var bottom = parseProp('bottom', this); + + this.top = Math.max(toFloat(parseProp('top', this)), this.topOffset) - this.offset; + this.bottom = bottom && bottom - height; + this.inactive = !this.matchMedia; + + return { + lastScroll: false, + height: height, + margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight']) + }; + }, + + write: function(ref) { + var height = ref.height; + var margins = ref.margins; + + + var ref$1 = this; + var placeholder = ref$1.placeholder; + + css(placeholder, assign({height: height}, margins)); + + if (!within(placeholder, document)) { + after(this.$el, placeholder); + attr(placeholder, 'hidden', ''); + } + + // ensure active/inactive classes are applied + this.isActive = this.isActive; + + }, + + events: ['resize'] + + }, + + { + + read: function(ref) { + var scroll = ref.scroll; if ( scroll === void 0 ) scroll = 0; + + + this.width = (isVisible(this.widthElement) ? this.widthElement : this.$el).offsetWidth; + + this.scroll = window.pageYOffset; + + return { + dir: scroll <= this.scroll ? 'down' : 'up', + scroll: this.scroll, + visible: isVisible(this.$el), + top: offsetPosition(this.placeholder)[0] + }; + }, + + write: function(data, type) { + var this$1 = this; + + + var initTimestamp = data.initTimestamp; if ( initTimestamp === void 0 ) initTimestamp = 0; + var dir = data.dir; + var lastDir = data.lastDir; + var lastScroll = data.lastScroll; + var scroll = data.scroll; + var top = data.top; + var visible = data.visible; + var now = performance.now(); + + data.lastScroll = scroll; + + if (scroll < 0 || scroll === lastScroll || !visible || this.disabled || this.showOnUp && type !== 'scroll') { + return; + } + + if (now - initTimestamp > 300 || dir !== lastDir) { + data.initScroll = scroll; + data.initTimestamp = now; + } + + data.lastDir = dir; + + if (this.showOnUp && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(lastScroll - scroll) <= 10) { + return; + } + + if (this.inactive + || scroll < this.top + || this.showOnUp && (scroll <= this.top || dir === 'down' || dir === 'up' && !this.isFixed && scroll <= this.bottomOffset) + ) { + + if (!this.isFixed) { + + if (Animation.inProgress(this.$el) && top > scroll) { + Animation.cancel(this.$el); + this.hide(); + } + + return; + } + + this.isFixed = false; + + if (this.animation && scroll > this.topOffset) { + Animation.cancel(this.$el); + Animation.out(this.$el, this.animation).then(function () { return this$1.hide(); }, noop); + } else { + this.hide(); + } + + } else if (this.isFixed) { + + this.update(); + + } else if (this.animation) { + + Animation.cancel(this.$el); + this.show(); + Animation.in(this.$el, this.animation).catch(noop); + + } else { + this.show(); + } + + }, + + events: ['resize', 'scroll'] + + } + + ], + + methods: { + + show: function() { + + this.isFixed = true; + this.update(); + attr(this.placeholder, 'hidden', null); + + }, + + hide: function() { + + this.isActive = false; + removeClass(this.$el, this.clsFixed, this.clsBelow); + css(this.$el, {position: '', top: '', width: ''}); + attr(this.placeholder, 'hidden', ''); + + }, + + update: function() { + + var active = this.top !== 0 || this.scroll > this.top; + var top = Math.max(0, this.offset); + + if (this.bottom && this.scroll > this.bottom - this.offset) { + top = this.bottom - this.scroll; + } + + css(this.$el, { + position: 'fixed', + top: (top + "px"), + width: this.width + }); + + this.isActive = active; + toggleClass(this.$el, this.clsBelow, this.scroll > this.bottomOffset); + addClass(this.$el, this.clsFixed); + + } + + } + + }; + + function parseProp(prop, ref) { + var $props = ref.$props; + var $el = ref.$el; + var propOffset = ref[(prop + "Offset")]; + + + var value = $props[prop]; + + if (!value) { + return; + } + + if (isNumeric(value) && isString(value) && value.match(/^-?\d/)) { + + return propOffset + toPx(value); + + } else { + + return offset(value === true ? $el.parentNode : query(value, $el)).bottom; + + } + } + + var Switcher = { + + mixins: [Togglable], + + args: 'connect', + + props: { + connect: String, + toggle: String, + active: Number, + swiping: Boolean + }, + + data: { + connect: '~.uk-switcher', + toggle: '> * > :first-child', + active: 0, + swiping: true, + cls: 'uk-active', + clsContainer: 'uk-switcher', + attrItem: 'uk-switcher-item', + queued: true + }, + + computed: { + + connects: function(ref, $el) { + var connect = ref.connect; + + return queryAll(connect, $el); + }, + + toggles: function(ref, $el) { + var toggle = ref.toggle; + + return $$(toggle, $el); + } + + }, + + events: [ + + { + + name: 'click', + + delegate: function() { + return ((this.toggle) + ":not(.uk-disabled)"); + }, + + handler: function(e) { + e.preventDefault(); + this.show(toNodes(this.$el.children).filter(function (el) { return within(e.current, el); })[0]); + } + + }, + + { + name: 'click', + + el: function() { + return this.connects; + }, + + delegate: function() { + return ("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]"); + }, + + handler: function(e) { + e.preventDefault(); + this.show(data(e.current, this.attrItem)); + } + }, + + { + name: 'swipeRight swipeLeft', + + filter: function() { + return this.swiping; + }, + + el: function() { + return this.connects; + }, + + handler: function(ref) { + var type = ref.type; + + this.show(endsWith(type, 'Left') ? 'next' : 'previous'); + } + } + + ], + + update: function() { + var this$1 = this; + + + this.connects.forEach(function (list) { return this$1.updateAria(list.children); }); + var ref = this.$el; + var children = ref.children; + this.show(filter(children, ("." + (this.cls)))[0] || children[this.active] || children[0]); + + this.swiping && css(this.connects, 'touch-action', 'pan-y pinch-zoom'); + + }, + + methods: { + + index: function() { + return !isEmpty(this.connects) ? index(filter(this.connects[0].children, ("." + (this.cls)))[0]) : -1; + }, + + show: function(item) { + var this$1 = this; + + + var ref = this.$el; + var children = ref.children; + var length = children.length; + var prev = this.index(); + var hasPrev = prev >= 0; + var dir = item === 'previous' ? -1 : 1; + + var toggle, active, next = getIndex(item, children, prev); + + for (var i = 0; i < length; i++, next = (next + dir + length) % length) { + if (!matches(this.toggles[next], '.uk-disabled *, .uk-disabled, [disabled]')) { + toggle = this.toggles[next]; + active = children[next]; + break; + } + } + + if (!active || prev === next) { + return; + } + + removeClass(children, this.cls); + addClass(active, this.cls); + attr(this.toggles, 'aria-expanded', false); + attr(toggle, 'aria-expanded', true); + + this.connects.forEach(function (list) { + if (!hasPrev) { + this$1.toggleNow(list.children[next]); + } else { + this$1.toggleElement([list.children[prev], list.children[next]]); + } + }); + + } + + } + + }; + + var Tab = { + + mixins: [Class], + + extends: Switcher, + + props: { + media: Boolean + }, + + data: { + media: 960, + attrItem: 'uk-tab-item' + }, + + connected: function() { + + var cls = hasClass(this.$el, 'uk-tab-left') + ? 'uk-tab-left' + : hasClass(this.$el, 'uk-tab-right') + ? 'uk-tab-right' + : false; + + if (cls) { + this.$create('toggle', this.$el, {cls: cls, mode: 'media', media: this.media}); + } + } + + }; + + var Toggle = { + + mixins: [Media, Togglable], + + args: 'target', + + props: { + href: String, + target: null, + mode: 'list' + }, + + data: { + href: false, + target: false, + mode: 'click', + queued: true + }, + + computed: { + + target: function(ref, $el) { + var href = ref.href; + var target = ref.target; + + target = queryAll(target || href, $el); + return target.length && target || [$el]; + } + + }, + + connected: function() { + trigger(this.target, 'updatearia', [this]); + }, + + events: [ + + { + + name: (pointerEnter + " " + pointerLeave), + + filter: function() { + return includes(this.mode, 'hover'); + }, + + handler: function(e) { + if (!isTouch(e)) { + this.toggle(("toggle" + (e.type === pointerEnter ? 'show' : 'hide'))); + } + } + + }, + + { + + name: 'click', + + filter: function() { + return includes(this.mode, 'click') || hasTouch && includes(this.mode, 'hover'); + }, + + handler: function(e) { + + // TODO better isToggled handling + var link; + if (closest(e.target, 'a[href="#"], a[href=""]') + || (link = closest(e.target, 'a[href]')) && ( + this.cls && !hasClass(this.target, this.cls.split(' ')[0]) + || !isVisible(this.target) + || link.hash && matches(this.target, link.hash) + ) + ) { + e.preventDefault(); + } + + this.toggle(); + } + + } + + ], + + update: { + + read: function() { + return includes(this.mode, 'media') && this.media + ? {match: this.matchMedia} + : false; + }, + + write: function(ref) { + var match = ref.match; + + + var toggled = this.isToggled(this.target); + if (match ? !toggled : toggled) { + this.toggle(); + } + + }, + + events: ['resize'] + + }, + + methods: { + + toggle: function(type) { + if (trigger(this.target, type || 'toggle', [this])) { + this.toggleElement(this.target); + } + } + + } + + }; + + function core (UIkit) { + + // core components + UIkit.component('accordion', Accordion); + UIkit.component('alert', Alert); + UIkit.component('cover', Cover); + UIkit.component('drop', Drop); + UIkit.component('dropdown', Dropdown); + UIkit.component('formCustom', FormCustom); + UIkit.component('gif', Gif); + UIkit.component('grid', Grid); + UIkit.component('heightMatch', HeightMatch); + UIkit.component('heightViewport', HeightViewport); + UIkit.component('icon', Icon); + UIkit.component('img', Img); + UIkit.component('leader', Leader); + UIkit.component('margin', Margin); + UIkit.component('modal', Modal$1); + UIkit.component('nav', Nav); + UIkit.component('navbar', Navbar); + UIkit.component('offcanvas', Offcanvas); + UIkit.component('overflowAuto', OverflowAuto); + UIkit.component('responsive', Responsive); + UIkit.component('scroll', Scroll); + UIkit.component('scrollspy', Scrollspy); + UIkit.component('scrollspyNav', ScrollspyNav); + UIkit.component('sticky', Sticky); + UIkit.component('svg', Svg); + UIkit.component('switcher', Switcher); + UIkit.component('tab', Tab); + UIkit.component('toggle', Toggle); + UIkit.component('video', Video); + + // Icon components + UIkit.component('close', Close); + UIkit.component('marker', IconComponent); + UIkit.component('navbarToggleIcon', IconComponent); + UIkit.component('overlayIcon', IconComponent); + UIkit.component('paginationNext', IconComponent); + UIkit.component('paginationPrevious', IconComponent); + UIkit.component('searchIcon', Search); + UIkit.component('slidenavNext', Slidenav); + UIkit.component('slidenavPrevious', Slidenav); + UIkit.component('spinner', Spinner); + UIkit.component('totop', IconComponent); + + // core functionality + UIkit.use(Core); + + } + + UIkit.version = '3.2.3'; + + core(UIkit); + + var Countdown = { + + mixins: [Class], + + props: { + date: String, + clsWrapper: String + }, + + data: { + date: '', + clsWrapper: '.uk-countdown-%unit%' + }, + + computed: { + + date: function(ref) { + var date = ref.date; + + return Date.parse(date); + }, + + days: function(ref, $el) { + var clsWrapper = ref.clsWrapper; + + return $(clsWrapper.replace('%unit%', 'days'), $el); + }, + + hours: function(ref, $el) { + var clsWrapper = ref.clsWrapper; + + return $(clsWrapper.replace('%unit%', 'hours'), $el); + }, + + minutes: function(ref, $el) { + var clsWrapper = ref.clsWrapper; + + return $(clsWrapper.replace('%unit%', 'minutes'), $el); + }, + + seconds: function(ref, $el) { + var clsWrapper = ref.clsWrapper; + + return $(clsWrapper.replace('%unit%', 'seconds'), $el); + }, + + units: function() { + var this$1 = this; + + return ['days', 'hours', 'minutes', 'seconds'].filter(function (unit) { return this$1[unit]; }); + } + + }, + + connected: function() { + this.start(); + }, + + disconnected: function() { + var this$1 = this; + + this.stop(); + this.units.forEach(function (unit) { return empty(this$1[unit]); }); + }, + + events: [ + + { + + name: 'visibilitychange', + + el: document, + + handler: function() { + if (document.hidden) { + this.stop(); + } else { + this.start(); + } + } + + } + + ], + + update: { + + write: function() { + var this$1 = this; + + + var timespan = getTimeSpan(this.date); + + if (timespan.total <= 0) { + + this.stop(); + + timespan.days + = timespan.hours + = timespan.minutes + = timespan.seconds + = 0; + } + + this.units.forEach(function (unit) { + + var digits = String(Math.floor(timespan[unit])); + + digits = digits.length < 2 ? ("0" + digits) : digits; + + var el = this$1[unit]; + if (el.textContent !== digits) { + digits = digits.split(''); + + if (digits.length !== el.children.length) { + html(el, digits.map(function () { return ''; }).join('')); + } + + digits.forEach(function (digit, i) { return el.children[i].textContent = digit; }); + } + + }); + + } + + }, + + methods: { + + start: function() { + var this$1 = this; + + + this.stop(); + + if (this.date && this.units.length) { + this.$emit(); + this.timer = setInterval(function () { return this$1.$emit(); }, 1000); + } + + }, + + stop: function() { + + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } + + } + + } + + }; + + function getTimeSpan(date) { + + var total = date - Date.now(); + + return { + total: total, + seconds: total / 1000 % 60, + minutes: total / 1000 / 60 % 60, + hours: total / 1000 / 60 / 60 % 24, + days: total / 1000 / 60 / 60 / 24 + }; + } + + var targetClass = 'uk-animation-target'; + + var Animate = { + + props: { + animation: Number + }, + + data: { + animation: 150 + }, + + computed: { + + target: function() { + return this.$el; + } + + }, + + methods: { + + animate: function(action) { + var this$1 = this; + + + addStyle(); + + var children = toNodes(this.target.children); + var propsFrom = children.map(function (el) { return getProps(el, true); }); + + var oldHeight = height(this.target); + var oldScrollY = window.pageYOffset; + + action(); + + Transition.cancel(this.target); + children.forEach(Transition.cancel); + + reset(this.target); + this.$update(this.target); + fastdom.flush(); + + var newHeight = height(this.target); + + children = children.concat(toNodes(this.target.children).filter(function (el) { return !includes(children, el); })); + + var propsTo = children.map(function (el, i) { return el.parentNode && i in propsFrom + ? propsFrom[i] + ? isVisible(el) + ? getPositionWithMargin(el) + : {opacity: 0} + : {opacity: isVisible(el) ? 1 : 0} + : false; } + ); + + propsFrom = propsTo.map(function (props, i) { + var from = children[i].parentNode === this$1.target + ? propsFrom[i] || getProps(children[i]) + : false; + + if (from) { + if (!props) { + delete from.opacity; + } else if (!('opacity' in props)) { + var opacity = from.opacity; + + if (opacity % 1) { + props.opacity = 1; + } else { + delete from.opacity; + } + } + } + + return from; + }); + + addClass(this.target, targetClass); + children.forEach(function (el, i) { return propsFrom[i] && css(el, propsFrom[i]); }); + css(this.target, 'height', oldHeight); + scrollTop(window, oldScrollY); + + return Promise.all(children.map(function (el, i) { return propsFrom[i] && propsTo[i] + ? Transition.start(el, propsTo[i], this$1.animation, 'ease') + : Promise.resolve(); } + ).concat(Transition.start(this.target, {height: newHeight}, this.animation, 'ease'))).then(function () { + children.forEach(function (el, i) { return css(el, {display: propsTo[i].opacity === 0 ? 'none' : '', zIndex: ''}); }); + reset(this$1.target); + this$1.$update(this$1.target); + fastdom.flush(); // needed for IE11 + }, noop); + + } + } + }; + + function getProps(el, opacity) { + + var zIndex = css(el, 'zIndex'); + + return isVisible(el) + ? assign({ + display: '', + opacity: opacity ? css(el, 'opacity') : '0', + pointerEvents: 'none', + position: 'absolute', + zIndex: zIndex === 'auto' ? index(el) : zIndex + }, getPositionWithMargin(el)) + : false; + } + + function reset(el) { + css(el.children, { + height: '', + left: '', + opacity: '', + pointerEvents: '', + position: '', + top: '', + width: '' + }); + removeClass(el, targetClass); + css(el, 'height', ''); + } + + function getPositionWithMargin(el) { + var ref = el.getBoundingClientRect(); + var height = ref.height; + var width = ref.width; + var ref$1 = position(el); + var top = ref$1.top; + var left = ref$1.left; + top += toFloat(css(el, 'marginTop')); + + return {top: top, left: left, height: height, width: width}; + } + + var style; + + function addStyle() { + if (style) { + return; + } + style = append(document.head, '