');
+ addClass(parent(this.panel), 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 || !isVisible(this.$el)) {
+ return false;
+ }
+
+ return {
+ current: toFloat(css(this.$el, 'maxHeight')),
+ max: Math.max(150, height(this.container) - (dimensions(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(parent(this.$el)), 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: {
+ offset: Number
+ },
+
+ data: {
+ offset: 0
+ },
+
+ methods: {
+
+ scrollTo: function(el) {
+ var this$1 = this;
+
+
+ el = el && $(el) || document.body;
+
+ if (trigger(this.$el, 'beforescroll', [this, el])) {
+ scrollIntoView(el, {offset: this.offset}).then(function () { return trigger(this$1.$el, 'scrolled', [this$1, el]); }
+ );
+ }
+
+ }
+
+ },
+
+ events: {
+
+ click: function(e) {
+
+ if (e.defaultPrevented) {
+ return;
+ }
+
+ e.preventDefault();
+ this.scrollTo(("#" + (escape(decodeURIComponent((this.$el.hash || '').substr(1))))));
+ }
+
+ }
+
+ };
+
+ var stateKey = '_ukScrollspy';
+ 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: {
+
+ get: function(ref, $el) {
+ var target = ref.target;
+
+ return target ? $$(target, $el) : [$el];
+ },
+
+ watch: function(elements) {
+ if (this.hidden) {
+ css(filter$1(elements, (":not(." + (this.inViewClass) + ")")), 'visibility', 'hidden');
+ }
+ },
+
+ immediate: true
+
+ }
+
+ },
+
+ disconnected: function() {
+ var this$1 = this;
+
+ this.elements.forEach(function (el) {
+ removeClass(el, this$1.inViewClass, el[stateKey] ? el[stateKey].cls : '');
+ delete el[stateKey];
+ });
+ },
+
+ update: [
+
+ {
+
+ read: function(data$1) {
+ var this$1 = this;
+
+
+ // Let child components be applied at least once first
+ if (!data$1.update) {
+ Promise$1.resolve().then(function () {
+ this$1.$emit();
+ data$1.update = true;
+ });
+ return false;
+ }
+
+ this.elements.forEach(function (el) {
+
+ if (!el[stateKey]) {
+ el[stateKey] = {cls: data(el, 'uk-scrollspy-class') || this$1.cls};
+ }
+
+ el[stateKey].show = isInView(el, this$1.offsetTop, this$1.offsetLeft);
+
+ });
+
+ },
+
+ write: function(data) {
+ var this$1 = this;
+
+
+ this.elements.forEach(function (el) {
+
+ var state = el[stateKey];
+
+ if (state.show && !state.inview && !state.queued) {
+
+ state.queued = true;
+
+ data.promise = (data.promise || Promise$1.resolve()).then(function () { return new Promise$1(function (resolve) { return setTimeout(resolve, this$1.delay); }
+ ); }
+ ).then(function () {
+ this$1.toggle(el, true);
+ setTimeout(function () {
+ state.queued = false;
+ this$1.$emit();
+ }, 300);
+ });
+
+ } else if (!state.show && state.inview && !state.queued && this$1.repeat) {
+
+ this$1.toggle(el, false);
+
+ }
+
+ });
+
+ },
+
+ events: ['scroll', 'resize']
+
+ }
+
+ ],
+
+ methods: {
+
+ toggle: function(el, inview) {
+
+ var state = el[stateKey];
+
+ state.off && state.off();
+
+ css(el, 'visibility', !inview && this.hidden ? 'hidden' : '');
+
+ toggleClass(el, this.inViewClass, inview);
+ toggleClass(el, state.cls);
+
+ if (/\buk-animation-/.test(state.cls)) {
+ state.off = once(el, 'animationcancel animationend', function () { return removeClasses(el, 'uk-animation-\\w*'); }
+ );
+ }
+
+ trigger(el, inview ? 'inview' : 'outview');
+
+ state.inview = inview;
+
+ this.$update(el);
+ }
+
+ }
+
+ };
+
+ 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: {
+
+ get: function(_, $el) {
+ return $$('a[href^="#"]', $el).filter(function (el) { return el.hash; });
+ },
+
+ watch: function(links) {
+ if (this.scroll) {
+ this.$create('scroll', links, {offset: this.offset || 0});
+ }
+ },
+
+ immediate: true
+
+ },
+
+ targets: function() {
+ return $$(this.links.map(function (el) { return escape(el.hash).substr(1); }).join(','));
+ },
+
+ elements: function(ref) {
+ var selector = ref.closest;
+
+ return closest(this.links, selector || '*');
+ }
+
+ },
+
+ update: [
+
+ {
+
+ read: function() {
+ var this$1 = this;
+
+
+ var ref = this.targets;
+ var length = ref.length;
+
+ if (!length || !isVisible(this.$el)) {
+ return false;
+ }
+
+ var ref$1 = scrollParents(this.targets, /auto|scroll/, true);
+ var scrollElement = ref$1[0];
+ var scrollTop = scrollElement.scrollTop;
+ var scrollHeight = scrollElement.scrollHeight;
+ var max = scrollHeight - getViewportClientHeight(scrollElement);
+ var active = false;
+
+ if (scrollTop === max) {
+ active = length - 1;
+ } else {
+
+ this.targets.every(function (el, i) {
+ if (offset(el).top - offset(getViewport$1(scrollElement)).top - this$1.offset <= 0) {
+ active = i;
+ return true;
+ }
+ });
+
+ if (active === false && this.overflow) {
+ active = 0;
+ }
+ }
+
+ return {active: active};
+ },
+
+ write: function(ref) {
+ var active = ref.active;
+
+
+ this.links.forEach(function (el) { return el.blur(); });
+ removeClass(this.elements, this.cls);
+
+ if (active !== false) {
+ trigger(this.$el, 'active', [active, addClass(this.elements[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$1(this.placeholder);
+ this.placeholder = null;
+ this.widthElement = null;
+ },
+
+ events: [
+
+ {
+
+ name: 'load hashchange popstate',
+
+ el: function() {
+ return 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, types) {
+ var height = ref.height;
+
+
+ this.inactive = !this.matchMedia || !isVisible(this.$el);
+
+ if (this.inactive) {
+ return false;
+ }
+
+ if (this.isActive && types.has('resize')) {
+ 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 - this.$el.offsetHeight;
+ this.width = dimensions(isVisible(this.widthElement) ? this.widthElement : this.$el).width;
+
+ return {
+ height: height,
+ top: offsetPosition(this.placeholder)[0],
+ 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);
+ placeholder.hidden = true;
+ }
+
+ this.isActive = !!this.isActive; // force self-assign
+
+ },
+
+ events: ['resize']
+
+ },
+
+ {
+
+ read: function(ref) {
+ var scroll = ref.scroll; if ( scroll === void 0 ) scroll = 0;
+
+
+ this.scroll = window.pageYOffset;
+
+ return {
+ dir: scroll <= this.scroll ? 'down' : 'up',
+ scroll: this.scroll
+ };
+ },
+
+ write: function(data, types) {
+ var this$1 = this;
+
+
+ var now = Date.now();
+ var isScrollUpdate = types.has('scroll');
+ 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;
+
+ data.lastScroll = scroll;
+
+ if (scroll < 0 || scroll === lastScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
+ return;
+ }
+
+ if (now - initTimestamp > 300 || dir !== lastDir) {
+ data.initScroll = scroll;
+ data.initTimestamp = now;
+ }
+
+ data.lastDir = dir;
+
+ if (this.showOnUp && !this.isFixed && 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' && isScrollUpdate || 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();
+ this.placeholder.hidden = false;
+
+ },
+
+ hide: function() {
+
+ this.isActive = false;
+ removeClass(this.$el, this.clsFixed, this.clsBelow);
+ css(this.$el, {position: '', top: '', width: ''});
+ this.placeholder.hidden = true;
+
+ },
+
+ update: function() {
+
+ var active = this.top !== 0 || this.scroll > this.top;
+ var top = Math.max(0, this.offset);
+
+ if (isNumeric(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 (isString(value) && value.match(/^-?\d/)) {
+
+ return propOffset + toPx(value);
+
+ } else {
+
+ return offset(value === true ? parent($el) : 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',
+ attrItem: 'uk-switcher-item'
+ },
+
+ computed: {
+
+ connects: {
+
+ get: function(ref, $el) {
+ var connect = ref.connect;
+
+ return queryAll(connect, $el);
+ },
+
+ watch: function(connects) {
+ var this$1 = this;
+
+
+ if (this.swiping) {
+ css(connects, 'touch-action', 'pan-y pinch-zoom');
+ }
+
+ var index = this.index();
+ this.connects.forEach(function (el) { return children(el).forEach(function (child, i) { return toggleClass(child, this$1.cls, i === index); }
+ ); }
+ );
+
+ },
+
+ immediate: true
+
+ },
+
+ toggles: {
+
+ get: function(ref, $el) {
+ var toggle = ref.toggle;
+
+ return $$(toggle, $el).filter(function (el) { return !matches(el, '.uk-disabled *, .uk-disabled, [disabled]'); });
+ },
+
+ watch: function(toggles) {
+ var active = this.index();
+ this.show(~active ? active : toggles[this.active] || toggles[0]);
+ },
+
+ immediate: true
+
+ },
+
+ children: function() {
+ var this$1 = this;
+
+ return children(this.$el).filter(function (child) { return this$1.toggles.some(function (toggle) { return within(toggle, child); }); });
+ }
+
+ },
+
+ events: [
+
+ {
+
+ name: 'click',
+
+ delegate: function() {
+ return this.toggle;
+ },
+
+ handler: function(e) {
+ e.preventDefault();
+ this.show(e.current);
+ }
+
+ },
+
+ {
+ 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');
+ }
+ }
+
+ ],
+
+ methods: {
+
+ index: function() {
+ var this$1 = this;
+
+ return findIndex(this.children, function (el) { return hasClass(el, this$1.cls); });
+ },
+
+ show: function(item) {
+ var this$1 = this;
+
+
+ var prev = this.index();
+ var next = getIndex(
+ this.children[getIndex(item, this.toggles, prev)],
+ children(this.$el)
+ );
+
+ if (prev === next) {
+ return;
+ }
+
+ this.children.forEach(function (child, i) {
+ toggleClass(child, this$1.cls, next === i);
+ attr(this$1.toggles[i], 'aria-expanded', next === i);
+ });
+
+ this.connects.forEach(function (ref) {
+ var children = ref.children;
+
+ return this$1.toggleElement(toNodes(children).filter(function (child) { return hasClass(child, this$1.cls); }
+ ), false, prev >= 0).then(function () { return this$1.toggleElement(children[next], true, prev >= 0); }
+ );
+ }
+ );
+ }
+
+ }
+
+ };
+
+ 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',
+ queued: Boolean
+ },
+
+ data: {
+ href: false,
+ target: false,
+ mode: 'click',
+ queued: true
+ },
+
+ connected: function() {
+ if (!isFocusable(this.$el)) {
+ attr(this.$el, 'tabindex', '0');
+ }
+ },
+
+ computed: {
+
+ target: {
+
+ get: function(ref, $el) {
+ var href = ref.href;
+ var target = ref.target;
+
+ target = queryAll(target || href, $el);
+ return target.length && target || [$el];
+ },
+
+ watch: function() {
+ this.updateAria();
+ },
+
+ immediate: true
+
+ }
+
+ },
+
+ events: [
+
+ {
+
+ name: (pointerEnter + " " + pointerLeave + " focus blur"),
+
+ filter: function() {
+ return includes(this.mode, 'hover');
+ },
+
+ handler: function(e) {
+ if (!isTouch(e)) {
+ this.toggle(("toggle" + (includes([pointerEnter, 'focus'], e.type) ? 'show' : 'hide')));
+ }
+ }
+
+ },
+
+ {
+
+ name: 'click',
+
+ filter: function() {
+ return includes(this.mode, 'click') || hasTouch && includes(this.mode, 'hover');
+ },
+
+ handler: function(e) {
+
+ var link;
+ if (closest(e.target, 'a[href="#"], a[href=""]')
+ || (link = closest(e.target, 'a[href]')) && (
+ !isToggled(this.target, this.cls)
+ || link.hash && matches(this.target, link.hash)
+ )
+ ) {
+ e.preventDefault();
+ }
+
+ this.toggle();
+ }
+
+ },
+
+ {
+
+ name: 'toggled',
+
+ self: true,
+
+ el: function() {
+ return this.target;
+ },
+
+ handler: function(e, toggled) {
+ this.updateAria(toggled);
+ }
+ }
+
+ ],
+
+ 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) {
+ var this$1 = this;
+
+
+ if (!trigger(this.target, type || 'toggle', [this])) {
+ return;
+ }
+
+ if (!this.queued) {
+ return this.toggleElement(this.target);
+ }
+
+ var leaving = this.target.filter(function (el) { return hasClass(el, this$1.clsLeave); });
+
+ if (leaving.length) {
+ this.target.forEach(function (el) {
+ var isLeaving = includes(leaving, el);
+ this$1.toggleElement(el, isLeaving, isLeaving);
+ });
+ return;
+ }
+
+ var toggled = this.target.filter(this.isToggled);
+ this.toggleElement(toggled, false).then(function () { return this$1.toggleElement(this$1.target.filter(function (el) { return !includes(toggled, el); }
+ ), true); }
+ );
+
+ },
+
+ updateAria: function(toggled) {
+ attr(this.$el, 'aria-expanded', isBoolean(toggled)
+ ? toggled
+ : isToggled(this.target, this.cls)
+ );
+ }
+
+ }
+
+ };
+
+ // TODO improve isToggled handling
+ function isToggled(target, cls) {
+ return cls
+ ? hasClass(target, cls.split(' ')[0])
+ : isVisible(target);
+ }
+
+ var components$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ Accordion: Accordion,
+ Alert: alert,
+ Cover: cover,
+ Drop: drop,
+ Dropdown: drop,
+ FormCustom: formCustom,
+ Gif: gif,
+ Grid: grid,
+ HeightMatch: heightMatch,
+ HeightViewport: heightViewport,
+ Icon: Icon,
+ Img: img,
+ Leader: leader,
+ Margin: Margin,
+ Modal: modal,
+ Nav: nav,
+ Navbar: navbar,
+ Offcanvas: offcanvas,
+ OverflowAuto: overflowAuto,
+ Responsive: responsive,
+ Scroll: scroll,
+ Scrollspy: scrollspy,
+ ScrollspyNav: scrollspyNav,
+ Sticky: sticky,
+ Svg: SVG,
+ Switcher: Switcher,
+ Tab: tab,
+ Toggle: toggle,
+ Video: Video,
+ Close: Close,
+ Spinner: Spinner,
+ SlidenavNext: Slidenav,
+ SlidenavPrevious: Slidenav,
+ SearchIcon: Search,
+ Marker: IconComponent,
+ NavbarToggleIcon: IconComponent,
+ OverlayIcon: IconComponent,
+ PaginationNext: IconComponent,
+ PaginationPrevious: IconComponent,
+ Totop: IconComponent
+ });
+
+ // register components
+ each(components$1, function (component, name) { return UIkit.component(name, component); }
+ );
+
+ // core functionality
+ UIkit.use(Core);
+
+ boot(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: function() {
+ return 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() {
+
+ this.stop();
+
+ if (this.date && this.units.length) {
+ this.$update();
+ this.timer = setInterval(this.$update, 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 clsLeave = 'uk-transition-leave';
+ var clsEnter = 'uk-transition-enter';
+
+ function fade(action, target, duration, stagger) {
+ if ( stagger === void 0 ) stagger = 0;
+
+
+ var index = transitionIndex(target, true);
+ var propsIn = {opacity: 1};
+ var propsOut = {opacity: 0};
+
+ var wrapIndexFn = function (fn) { return function () { return index === transitionIndex(target) ? fn() : Promise$1.reject(); }; };
+
+ var leaveFn = wrapIndexFn(function () {
+
+ addClass(target, clsLeave);
+
+ return Promise$1.all(getTransitionNodes(target).map(function (child, i) { return new Promise$1(function (resolve) { return setTimeout(function () { return Transition.start(child, propsOut, duration / 2, 'ease').then(resolve); }, i * stagger); }
+ ); }
+ )).then(function () { return removeClass(target, clsLeave); });
+
+ });
+
+ var enterFn = wrapIndexFn(function () {
+
+ var oldHeight = height(target);
+
+ addClass(target, clsEnter);
+ action();
+
+ css(children(target), {opacity: 0});
+
+ // Ensure UIkit updates have propagated
+ return new Promise$1(function (resolve) { return requestAnimationFrame(function () {
+
+ var nodes = children(target);
+ var newHeight = height(target);
+
+ // Ensure Grid cells do not stretch when height is applied
+ css(target, 'alignContent', 'flex-start');
+ height(target, oldHeight);
+
+ var transitionNodes = getTransitionNodes(target);
+ css(nodes, propsOut);
+
+ var transitions = transitionNodes.map(function (child, i) { return new Promise$1(function (resolve) { return setTimeout(function () { return Transition.start(child, propsIn, duration / 2, 'ease').then(resolve); }, i * stagger); }
+ ); }
+ );
+
+ if (oldHeight !== newHeight) {
+ transitions.push(Transition.start(target, {height: newHeight}, duration / 2 + transitionNodes.length * stagger, 'ease'));
+ }
+
+ Promise$1.all(transitions).then(function () {
+ removeClass(target, clsEnter);
+ if (index === transitionIndex(target)) {
+ css(target, {height: '', alignContent: ''});
+ css(nodes, {opacity: ''});
+ delete target.dataset.transition;
+ }
+ resolve();
+ });
+ }); }
+ );
+ });
+
+ return hasClass(target, clsLeave)
+ ? waitTransitionend(target).then(enterFn)
+ : hasClass(target, clsEnter)
+ ? waitTransitionend(target).then(leaveFn).then(enterFn)
+ : leaveFn().then(enterFn);
+ }
+
+ function transitionIndex(target, next) {
+ if (next) {
+ target.dataset.transition = 1 + transitionIndex(target);
+ }
+
+ return toNumber(target.dataset.transition) || 0;
+ }
+
+ function waitTransitionend(target) {
+ return Promise$1.all(children(target).filter(Transition.inProgress).map(function (el) { return new Promise$1(function (resolve) { return once(el, 'transitionend transitioncanceled', resolve); }); }
+ ));
+ }
+
+ function getTransitionNodes(target) {
+ return getRows(children(target)).reduce(function (nodes, row) { return nodes.concat(sortBy$1(row.filter(function (el) { return isInView(el); }), 'offsetLeft')); }, []);
+ }
+
+ function slide (action, target, duration) {
+
+ return new Promise$1(function (resolve) { return requestAnimationFrame(function () {
+
+ var nodes = children(target);
+
+ // Get current state
+ var currentProps = nodes.map(function (el) { return getProps(el, true); });
+ var targetProps = css(target, ['height', 'padding']);
+
+ // Cancel previous animations
+ Transition.cancel(target);
+ nodes.forEach(Transition.cancel);
+ reset(target);
+
+ // Adding, sorting, removing nodes
+ action();
+
+ // Find new nodes
+ nodes = nodes.concat(children(target).filter(function (el) { return !includes(nodes, el); }));
+
+ // Wait for update to propagate
+ Promise$1.resolve().then(function () {
+
+ // Force update
+ fastdom.flush();
+
+ // Get new state
+ var targetPropsTo = css(target, ['height', 'padding']);
+ var ref = getTransitionProps(target, nodes, currentProps);
+ var propsTo = ref[0];
+ var propsFrom = ref[1];
+
+ // Reset to previous state
+ nodes.forEach(function (el, i) { return propsFrom[i] && css(el, propsFrom[i]); });
+ css(target, assign({display: 'block'}, targetProps));
+
+ // Start transitions on next frame
+ requestAnimationFrame(function () {
+
+ var transitions = nodes.map(function (el, i) { return parent(el) === target && Transition.start(el, propsTo[i], duration, 'ease'); }
+ ).concat(Transition.start(target, targetPropsTo, duration, 'ease'));
+
+ Promise$1.all(transitions).then(function () {
+ nodes.forEach(function (el, i) { return parent(el) === target && css(el, 'display', propsTo[i].opacity === 0 ? 'none' : ''); });
+ reset(target);
+ }, noop).then(resolve);
+
+ });
+ });
+ }); });
+ }
+
+ 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 getTransitionProps(target, nodes, currentProps) {
+
+ var propsTo = nodes.map(function (el, i) { return parent(el) && i in currentProps
+ ? currentProps[i]
+ ? isVisible(el)
+ ? getPositionWithMargin(el)
+ : {opacity: 0}
+ : {opacity: isVisible(el) ? 1 : 0}
+ : false; });
+
+ var propsFrom = propsTo.map(function (props, i) {
+
+ var from = parent(nodes[i]) === target && (currentProps[i] || getProps(nodes[i]));
+
+ if (!from) {
+ return false;
+ }
+
+ 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;
+ });
+
+ return [propsTo, propsFrom];
+ }
+
+ function reset(el) {
+ css(el.children, {
+ height: '',
+ left: '',
+ opacity: '',
+ pointerEvents: '',
+ position: '',
+ top: '',
+ marginTop: '',
+ marginLeft: '',
+ transform: '',
+ width: '',
+ zIndex: ''
+ });
+ css(el, {height: '', display: '', padding: ''});
+ }
+
+ function getPositionWithMargin(el) {
+ var ref = offset(el);
+ var height = ref.height;
+ var width = ref.width;
+ var ref$1 = position(el);
+ var top = ref$1.top;
+ var left = ref$1.left;
+ var ref$2 = css(el, ['marginTop', 'marginLeft']);
+ var marginLeft = ref$2.marginLeft;
+ var marginTop = ref$2.marginTop;
+
+ return {top: top, left: left, height: height, width: width, marginLeft: marginLeft, marginTop: marginTop, transform: ''};
+ }
+
+ var Animate = {
+
+ props: {
+ duration: Number,
+ animation: Boolean
+ },
+
+ data: {
+ duration: 150,
+ animation: 'slide'
+ },
+
+ methods: {
+
+ animate: function(action, target) {
+ var this$1 = this;
+ if ( target === void 0 ) target = this.$el;
+
+
+ var name = this.animation;
+ var animationFn = name === 'fade'
+ ? fade
+ : name === 'delayed-fade'
+ ? function () {
+ var args = [], len = arguments.length;
+ while ( len-- ) args[ len ] = arguments[ len ];
+
+ return fade.apply(void 0, args.concat( [40] ));
+ }
+ : !name
+ ? function () {
+ action();
+ return Promise$1.resolve();
+ }
+ : slide;
+
+ return animationFn(action, target, this.duration)
+ .then(function () { return this$1.$update(target, 'resize'); }, noop);
+ }
+
+ }
+ };
+
+ var filter = {
+
+ mixins: [Animate],
+
+ args: 'target',
+
+ props: {
+ target: Boolean,
+ selActive: Boolean
+ },
+
+ data: {
+ target: null,
+ selActive: false,
+ attrItem: 'uk-filter-control',
+ cls: 'uk-active',
+ duration: 250
+ },
+
+ computed: {
+
+ toggles: {
+
+ get: function(ref, $el) {
+ var attrItem = ref.attrItem;
+
+ return $$(("[" + attrItem + "],[data-" + attrItem + "]"), $el);
+ },
+
+ watch: function() {
+ var this$1 = this;
+
+
+ this.updateState();
+
+ if (this.selActive !== false) {
+ var actives = $$(this.selActive, this.$el);
+ this.toggles.forEach(function (el) { return toggleClass(el, this$1.cls, includes(actives, el)); });
+ }
+
+ },
+
+ immediate: true
+
+ },
+
+ children: {
+
+ get: function(ref, $el) {
+ var target = ref.target;
+
+ return $$((target + " > *"), $el);
+ },
+
+ watch: function(list, old) {
+ if (old && !isEqualList(list, old)) {
+ this.updateState();
+ }
+ },
+
+ immediate: true
+
+ }
+
+ },
+
+ events: [
+
+ {
+
+ name: 'click',
+
+ delegate: function() {
+ return ("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]");
+ },
+
+ handler: function(e) {
+
+ e.preventDefault();
+ this.apply(e.current);
+
+ }
+
+ }
+
+ ],
+
+ methods: {
+
+ apply: function(el) {
+ var prevState = this.getState();
+ var newState = mergeState(el, this.attrItem, this.getState());
+
+ if (!isEqualState(prevState, newState)) {
+ this.setState(newState);
+ }
+ },
+
+ getState: function() {
+ var this$1 = this;
+
+ return this.toggles
+ .filter(function (item) { return hasClass(item, this$1.cls); })
+ .reduce(function (state, el) { return mergeState(el, this$1.attrItem, state); }, {filter: {'': ''}, sort: []});
+ },
+
+ setState: function(state, animate) {
+ var this$1 = this;
+ if ( animate === void 0 ) animate = true;
+
+
+ state = assign({filter: {'': ''}, sort: []}, state);
+
+ trigger(this.$el, 'beforeFilter', [this, state]);
+
+ this.toggles.forEach(function (el) { return toggleClass(el, this$1.cls, !!matchFilter(el, this$1.attrItem, state)); });
+
+ Promise$1.all($$(this.target, this.$el).map(function (target) {
+ var filterFn = function () {
+ applyState(state, target, children(target));
+ this$1.$update(this$1.$el);
+ };
+ return animate ? this$1.animate(filterFn, target) : filterFn();
+ })).then(function () { return trigger(this$1.$el, 'afterFilter', [this$1]); });
+
+ },
+
+ updateState: function() {
+ var this$1 = this;
+
+ fastdom.write(function () { return this$1.setState(this$1.getState(), false); });
+ }
+
+ }
+
+ };
+
+ function getFilter(el, attr) {
+ return parseOptions(data(el, attr), ['filter']);
+ }
+
+ function isEqualState(stateA, stateB) {
+ return ['filter', 'sort'].every(function (prop) { return isEqual(stateA[prop], stateB[prop]); });
+ }
+
+ function applyState(state, target, children) {
+ var selector = getSelector(state);
+
+ children.forEach(function (el) { return css(el, 'display', selector && !matches(el, selector) ? 'none' : ''); });
+
+ var ref = state.sort;
+ var sort = ref[0];
+ var order = ref[1];
+
+ if (sort) {
+ var sorted = sortItems(children, sort, order);
+ if (!isEqual(sorted, children)) {
+ append(target, sorted);
+ }
+ }
+ }
+
+ function mergeState(el, attr, state) {
+
+ var filterBy = getFilter(el, attr);
+ var filter = filterBy.filter;
+ var group = filterBy.group;
+ var sort = filterBy.sort;
+ var order = filterBy.order; if ( order === void 0 ) order = 'asc';
+
+ if (filter || isUndefined(sort)) {
+
+ if (group) {
+
+ if (filter) {
+ delete state.filter[''];
+ state.filter[group] = filter;
+ } else {
+ delete state.filter[group];
+
+ if (isEmpty(state.filter) || '' in state.filter) {
+ state.filter = {'': filter || ''};
+ }
+
+ }
+
+ } else {
+ state.filter = {'': filter || ''};
+ }
+
+ }
+
+ if (!isUndefined(sort)) {
+ state.sort = [sort, order];
+ }
+
+ return state;
+ }
+
+ function matchFilter(el, attr, ref) {
+ var stateFilter = ref.filter; if ( stateFilter === void 0 ) stateFilter = {'': ''};
+ var ref_sort = ref.sort;
+ var stateSort = ref_sort[0];
+ var stateOrder = ref_sort[1];
+
+
+ var ref$1 = getFilter(el, attr);
+ var filter = ref$1.filter; if ( filter === void 0 ) filter = '';
+ var group = ref$1.group; if ( group === void 0 ) group = '';
+ var sort = ref$1.sort;
+ var order = ref$1.order; if ( order === void 0 ) order = 'asc';
+
+ return isUndefined(sort)
+ ? group in stateFilter && filter === stateFilter[group]
+ || !filter && group && !(group in stateFilter) && !stateFilter['']
+ : stateSort === sort && stateOrder === order;
+ }
+
+ function isEqualList(listA, listB) {
+ return listA.length === listB.length
+ && listA.every(function (el) { return ~listB.indexOf(el); });
+ }
+
+ function getSelector(ref) {
+ var filter = ref.filter;
+
+ var selector = '';
+ each(filter, function (value) { return selector += value || ''; });
+ return selector;
+ }
+
+ function sortItems(nodes, sort, order) {
+ return assign([], nodes).sort(function (a, b) { return data(a, sort).localeCompare(data(b, sort), undefined, {numeric: true}) * (order === 'asc' || -1); });
+ }
+
+ var Animations$2 = {
+
+ slide: {
+
+ show: function(dir) {
+ return [
+ {transform: translate(dir * -100)},
+ {transform: translate()}
+ ];
+ },
+
+ percent: function(current) {
+ return translated(current);
+ },
+
+ translate: function(percent, dir) {
+ return [
+ {transform: translate(dir * -100 * percent)},
+ {transform: translate(dir * 100 * (1 - percent))}
+ ];
+ }
+
+ }
+
+ };
+
+ function translated(el) {
+ return Math.abs(css(el, 'transform').split(',')[4] / el.offsetWidth) || 0;
+ }
+
+ function translate(value, unit) {
+ if ( value === void 0 ) value = 0;
+ if ( unit === void 0 ) unit = '%';
+
+ value += value ? unit : '';
+ return isIE ? ("translateX(" + value + ")") : ("translate3d(" + value + ", 0, 0)"); // currently not translate3d in IE, translate3d within translate3d does not work while transitioning
+ }
+
+ function scale3d(value) {
+ return ("scale3d(" + value + ", " + value + ", 1)");
+ }
+
+ var Animations$1 = assign({}, Animations$2, {
+
+ fade: {
+
+ show: function() {
+ return [
+ {opacity: 0},
+ {opacity: 1}
+ ];
+ },
+
+ percent: function(current) {
+ return 1 - css(current, 'opacity');
+ },
+
+ translate: function(percent) {
+ return [
+ {opacity: 1 - percent},
+ {opacity: percent}
+ ];
+ }
+
+ },
+
+ scale: {
+
+ show: function() {
+ return [
+ {opacity: 0, transform: scale3d(1 - .2)},
+ {opacity: 1, transform: scale3d(1)}
+ ];
+ },
+
+ percent: function(current) {
+ return 1 - css(current, 'opacity');
+ },
+
+ translate: function(percent) {
+ return [
+ {opacity: 1 - percent, transform: scale3d(1 - .2 * percent)},
+ {opacity: percent, transform: scale3d(1 - .2 + .2 * percent)}
+ ];
+ }
+
+ }
+
+ });
+
+ function Transitioner$1(prev, next, dir, ref) {
+ var animation = ref.animation;
+ var easing = ref.easing;
+
+
+ var percent = animation.percent;
+ var translate = animation.translate;
+ var show = animation.show; if ( show === void 0 ) show = noop;
+ var props = show(dir);
+ var deferred = new Deferred();
+
+ return {
+
+ dir: dir,
+
+ show: function(duration, percent, linear) {
+ var this$1 = this;
+ if ( percent === void 0 ) percent = 0;
+
+
+ var timing = linear ? 'linear' : easing;
+ duration -= Math.round(duration * clamp(percent, -1, 1));
+
+ this.translate(percent);
+
+ triggerUpdate$1(next, 'itemin', {percent: percent, duration: duration, timing: timing, dir: dir});
+ triggerUpdate$1(prev, 'itemout', {percent: 1 - percent, duration: duration, timing: timing, dir: dir});
+
+ Promise$1.all([
+ Transition.start(next, props[1], duration, timing),
+ Transition.start(prev, props[0], duration, timing)
+ ]).then(function () {
+ this$1.reset();
+ deferred.resolve();
+ }, noop);
+
+ return deferred.promise;
+ },
+
+ cancel: function() {
+ Transition.cancel([next, prev]);
+ },
+
+ reset: function() {
+ for (var prop in props[0]) {
+ css([next, prev], prop, '');
+ }
+ },
+
+ forward: function(duration, percent) {
+ if ( percent === void 0 ) percent = this.percent();
+
+ Transition.cancel([next, prev]);
+ return this.show(duration, percent, true);
+ },
+
+ translate: function(percent) {
+
+ this.reset();
+
+ var props = translate(percent, dir);
+ css(next, props[1]);
+ css(prev, props[0]);
+ triggerUpdate$1(next, 'itemtranslatein', {percent: percent, dir: dir});
+ triggerUpdate$1(prev, 'itemtranslateout', {percent: 1 - percent, dir: dir});
+
+ },
+
+ percent: function() {
+ return percent(prev || next, next, dir);
+ },
+
+ getDistance: function() {
+ return prev && prev.offsetWidth;
+ }
+
+ };
+
+ }
+
+ function triggerUpdate$1(el, type, data) {
+ trigger(el, createEvent(type, false, false, data));
+ }
+
+ var SliderAutoplay = {
+
+ props: {
+ autoplay: Boolean,
+ autoplayInterval: Number,
+ pauseOnHover: Boolean
+ },
+
+ data: {
+ autoplay: false,
+ autoplayInterval: 7000,
+ pauseOnHover: true
+ },
+
+ connected: function() {
+ this.autoplay && this.startAutoplay();
+ },
+
+ disconnected: function() {
+ this.stopAutoplay();
+ },
+
+ update: function() {
+ attr(this.slides, 'tabindex', '-1');
+ },
+
+ events: [
+
+ {
+
+ name: 'visibilitychange',
+
+ el: function() {
+ return document;
+ },
+
+ filter: function() {
+ return this.autoplay;
+ },
+
+ handler: function() {
+ if (document.hidden) {
+ this.stopAutoplay();
+ } else {
+ this.startAutoplay();
+ }
+ }
+
+ }
+
+ ],
+
+ methods: {
+
+ startAutoplay: function() {
+ var this$1 = this;
+
+
+ this.stopAutoplay();
+
+ this.interval = setInterval(
+ function () { return (!this$1.draggable || !$(':focus', this$1.$el))
+ && (!this$1.pauseOnHover || !matches(this$1.$el, ':hover'))
+ && !this$1.stack.length
+ && this$1.show('next'); },
+ this.autoplayInterval
+ );
+
+ },
+
+ stopAutoplay: function() {
+ this.interval && clearInterval(this.interval);
+ }
+
+ }
+
+ };
+
+ var SliderDrag = {
+
+ props: {
+ draggable: Boolean
+ },
+
+ data: {
+ draggable: true,
+ threshold: 10
+ },
+
+ created: function() {
+ var this$1 = this;
+
+
+ ['start', 'move', 'end'].forEach(function (key) {
+
+ var fn = this$1[key];
+ this$1[key] = function (e) {
+
+ var pos = getEventPos(e).x * (isRtl ? -1 : 1);
+
+ this$1.prevPos = pos !== this$1.pos ? this$1.pos : this$1.prevPos;
+ this$1.pos = pos;
+
+ fn(e);
+ };
+
+ });
+
+ },
+
+ events: [
+
+ {
+
+ name: pointerDown,
+
+ delegate: function() {
+ return this.selSlides;
+ },
+
+ handler: function(e) {
+
+ if (!this.draggable
+ || !isTouch(e) && hasTextNodesOnly(e.target)
+ || closest(e.target, selInput)
+ || e.button > 0
+ || this.length < 2
+ ) {
+ return;
+ }
+
+ this.start(e);
+ }
+
+ },
+
+ {
+ name: 'dragstart',
+
+ handler: function(e) {
+ e.preventDefault();
+ }
+ }
+
+ ],
+
+ methods: {
+
+ start: function() {
+
+ this.drag = this.pos;
+
+ if (this._transitioner) {
+
+ this.percent = this._transitioner.percent();
+ this.drag += this._transitioner.getDistance() * this.percent * this.dir;
+
+ this._transitioner.cancel();
+ this._transitioner.translate(this.percent);
+
+ this.dragging = true;
+
+ this.stack = [];
+
+ } else {
+ this.prevIndex = this.index;
+ }
+
+ on(document, pointerMove, this.move, {passive: false});
+
+ // 'input' event is triggered by video controls
+ on(document, (pointerUp + " " + pointerCancel + " input"), this.end, true);
+
+ css(this.list, 'userSelect', 'none');
+
+ },
+
+ move: function(e) {
+ var this$1 = this;
+
+
+ var distance = this.pos - this.drag;
+
+ if (distance === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(distance) < this.threshold) {
+ return;
+ }
+
+ // prevent click event
+ css(this.list, 'pointerEvents', 'none');
+
+ e.cancelable && e.preventDefault();
+
+ this.dragging = true;
+ this.dir = (distance < 0 ? 1 : -1);
+
+ var ref = this;
+ var slides = ref.slides;
+ var ref$1 = this;
+ var prevIndex = ref$1.prevIndex;
+ var dis = Math.abs(distance);
+ var nextIndex = this.getIndex(prevIndex + this.dir, prevIndex);
+ var width = this._getDistance(prevIndex, nextIndex) || slides[prevIndex].offsetWidth;
+
+ while (nextIndex !== prevIndex && dis > width) {
+
+ this.drag -= width * this.dir;
+
+ prevIndex = nextIndex;
+ dis -= width;
+ nextIndex = this.getIndex(prevIndex + this.dir, prevIndex);
+ width = this._getDistance(prevIndex, nextIndex) || slides[prevIndex].offsetWidth;
+
+ }
+
+ this.percent = dis / width;
+
+ var prev = slides[prevIndex];
+ var next = slides[nextIndex];
+ var changed = this.index !== nextIndex;
+ var edge = prevIndex === nextIndex;
+
+ var itemShown;
+
+ [this.index, this.prevIndex].filter(function (i) { return !includes([nextIndex, prevIndex], i); }).forEach(function (i) {
+ trigger(slides[i], 'itemhidden', [this$1]);
+
+ if (edge) {
+ itemShown = true;
+ this$1.prevIndex = prevIndex;
+ }
+
+ });
+
+ if (this.index === prevIndex && this.prevIndex !== prevIndex || itemShown) {
+ trigger(slides[this.index], 'itemshown', [this]);
+ }
+
+ if (changed) {
+ this.prevIndex = prevIndex;
+ this.index = nextIndex;
+
+ !edge && trigger(prev, 'beforeitemhide', [this]);
+ trigger(next, 'beforeitemshow', [this]);
+ }
+
+ this._transitioner = this._translate(Math.abs(this.percent), prev, !edge && next);
+
+ if (changed) {
+ !edge && trigger(prev, 'itemhide', [this]);
+ trigger(next, 'itemshow', [this]);
+ }
+
+ },
+
+ end: function() {
+
+ off(document, pointerMove, this.move, {passive: false});
+ off(document, (pointerUp + " " + pointerCancel + " input"), this.end, true);
+
+ if (this.dragging) {
+
+ this.dragging = null;
+
+ if (this.index === this.prevIndex) {
+ this.percent = 1 - this.percent;
+ this.dir *= -1;
+ this._show(false, this.index, true);
+ this._transitioner = null;
+ } else {
+
+ var dirChange = (isRtl ? this.dir * (isRtl ? 1 : -1) : this.dir) < 0 === this.prevPos > this.pos;
+ this.index = dirChange ? this.index : this.prevIndex;
+
+ if (dirChange) {
+ this.percent = 1 - this.percent;
+ }
+
+ this.show(this.dir > 0 && !dirChange || this.dir < 0 && dirChange ? 'next' : 'previous', true);
+ }
+
+ }
+
+ css(this.list, {userSelect: '', pointerEvents: ''});
+
+ this.drag
+ = this.percent
+ = null;
+
+ }
+
+ }
+
+ };
+
+ function hasTextNodesOnly(el) {
+ return !el.children.length && el.childNodes.length;
+ }
+
+ var SliderNav = {
+
+ data: {
+ selNav: false
+ },
+
+ computed: {
+
+ nav: function(ref, $el) {
+ var selNav = ref.selNav;
+
+ return $(selNav, $el);
+ },
+
+ selNavItem: function(ref) {
+ var attrItem = ref.attrItem;
+
+ return ("[" + attrItem + "],[data-" + attrItem + "]");
+ },
+
+ navItems: function(_, $el) {
+ return $$(this.selNavItem, $el);
+ }
+
+ },
+
+ update: {
+
+ write: function() {
+ var this$1 = this;
+
+
+ if (this.nav && this.length !== this.nav.children.length) {
+ html(this.nav, this.slides.map(function (_, i) { return ("
"); }).join(''));
+ }
+
+ this.navItems.concat(this.nav).forEach(function (el) { return el && (el.hidden = !this$1.maxIndex); });
+
+ this.updateNav();
+
+ },
+
+ events: ['resize']
+
+ },
+
+ events: [
+
+ {
+
+ name: 'click',
+
+ delegate: function() {
+ return this.selNavItem;
+ },
+
+ handler: function(e) {
+ e.preventDefault();
+ this.show(data(e.current, this.attrItem));
+ }
+
+ },
+
+ {
+
+ name: 'itemshow',
+ handler: 'updateNav'
+
+ }
+
+ ],
+
+ methods: {
+
+ updateNav: function() {
+ var this$1 = this;
+
+
+ var i = this.getValidIndex();
+ this.navItems.forEach(function (el) {
+
+ var cmd = data(el, this$1.attrItem);
+
+ toggleClass(el, this$1.clsActive, toNumber(cmd) === i);
+ toggleClass(el, 'uk-invisible', this$1.finite && (cmd === 'previous' && i === 0 || cmd === 'next' && i >= this$1.maxIndex));
+ });
+
+ }
+
+ }
+
+ };
+
+ var Slider = {
+
+ mixins: [SliderAutoplay, SliderDrag, SliderNav],
+
+ props: {
+ clsActivated: Boolean,
+ easing: String,
+ index: Number,
+ finite: Boolean,
+ velocity: Number,
+ selSlides: String
+ },
+
+ data: function () { return ({
+ easing: 'ease',
+ finite: false,
+ velocity: 1,
+ index: 0,
+ prevIndex: -1,
+ stack: [],
+ percent: 0,
+ clsActive: 'uk-active',
+ clsActivated: false,
+ Transitioner: false,
+ transitionOptions: {}
+ }); },
+
+ connected: function() {
+ this.prevIndex = -1;
+ this.index = this.getValidIndex(this.$props.index);
+ this.stack = [];
+ },
+
+ disconnected: function() {
+ removeClass(this.slides, this.clsActive);
+ },
+
+ computed: {
+
+ duration: function(ref, $el) {
+ var velocity = ref.velocity;
+
+ return speedUp($el.offsetWidth / velocity);
+ },
+
+ list: function(ref, $el) {
+ var selList = ref.selList;
+
+ return $(selList, $el);
+ },
+
+ maxIndex: function() {
+ return this.length - 1;
+ },
+
+ selSlides: function(ref) {
+ var selList = ref.selList;
+ var selSlides = ref.selSlides;
+
+ return (selList + " " + (selSlides || '> *'));
+ },
+
+ slides: {
+
+ get: function() {
+ return $$(this.selSlides, this.$el);
+ },
+
+ watch: function() {
+ this.$reset();
+ }
+
+ },
+
+ length: function() {
+ return this.slides.length;
+ }
+
+ },
+
+ events: {
+
+ itemshown: function() {
+ this.$update(this.list);
+ }
+
+ },
+
+ methods: {
+
+ show: function(index, force) {
+ var this$1 = this;
+ if ( force === void 0 ) force = false;
+
+
+ if (this.dragging || !this.length) {
+ return;
+ }
+
+ var ref = this;
+ var stack = ref.stack;
+ var queueIndex = force ? 0 : stack.length;
+ var reset = function () {
+ stack.splice(queueIndex, 1);
+
+ if (stack.length) {
+ this$1.show(stack.shift(), true);
+ }
+ };
+
+ stack[force ? 'unshift' : 'push'](index);
+
+ if (!force && stack.length > 1) {
+
+ if (stack.length === 2) {
+ this._transitioner.forward(Math.min(this.duration, 200));
+ }
+
+ return;
+ }
+
+ var prevIndex = this.getIndex(this.index);
+ var prev = hasClass(this.slides, this.clsActive) && this.slides[prevIndex];
+ var nextIndex = this.getIndex(index, this.index);
+ var next = this.slides[nextIndex];
+
+ if (prev === next) {
+ reset();
+ return;
+ }
+
+ this.dir = getDirection(index, prevIndex);
+ this.prevIndex = prevIndex;
+ this.index = nextIndex;
+
+ if (prev && !trigger(prev, 'beforeitemhide', [this])
+ || !trigger(next, 'beforeitemshow', [this, prev])
+ ) {
+ this.index = this.prevIndex;
+ reset();
+ return;
+ }
+
+ var promise = this._show(prev, next, force).then(function () {
+
+ prev && trigger(prev, 'itemhidden', [this$1]);
+ trigger(next, 'itemshown', [this$1]);
+
+ return new Promise$1(function (resolve) {
+ fastdom.write(function () {
+ stack.shift();
+ if (stack.length) {
+ this$1.show(stack.shift(), true);
+ } else {
+ this$1._transitioner = null;
+ }
+ resolve();
+ });
+ });
+
+ });
+
+ prev && trigger(prev, 'itemhide', [this]);
+ trigger(next, 'itemshow', [this]);
+
+ return promise;
+
+ },
+
+ getIndex: function(index, prev) {
+ if ( index === void 0 ) index = this.index;
+ if ( prev === void 0 ) prev = this.index;
+
+ return clamp(getIndex(index, this.slides, prev, this.finite), 0, this.maxIndex);
+ },
+
+ getValidIndex: function(index, prevIndex) {
+ if ( index === void 0 ) index = this.index;
+ if ( prevIndex === void 0 ) prevIndex = this.prevIndex;
+
+ return this.getIndex(index, prevIndex);
+ },
+
+ _show: function(prev, next, force) {
+
+ this._transitioner = this._getTransitioner(
+ prev,
+ next,
+ this.dir,
+ assign({
+ easing: force
+ ? next.offsetWidth < 600
+ ? 'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */
+ : 'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */
+ : this.easing
+ }, this.transitionOptions)
+ );
+
+ if (!force && !prev) {
+ this._translate(1);
+ return Promise$1.resolve();
+ }
+
+ var ref = this.stack;
+ var length = ref.length;
+ return this._transitioner[length > 1 ? 'forward' : 'show'](length > 1 ? Math.min(this.duration, 75 + 75 / (length - 1)) : this.duration, this.percent);
+
+ },
+
+ _getDistance: function(prev, next) {
+ return this._getTransitioner(prev, prev !== next && next).getDistance();
+ },
+
+ _translate: function(percent, prev, next) {
+ if ( prev === void 0 ) prev = this.prevIndex;
+ if ( next === void 0 ) next = this.index;
+
+ var transitioner = this._getTransitioner(prev !== next ? prev : false, next);
+ transitioner.translate(percent);
+ return transitioner;
+ },
+
+ _getTransitioner: function(prev, next, dir, options) {
+ if ( prev === void 0 ) prev = this.prevIndex;
+ if ( next === void 0 ) next = this.index;
+ if ( dir === void 0 ) dir = this.dir || 1;
+ if ( options === void 0 ) options = this.transitionOptions;
+
+ return new this.Transitioner(
+ isNumber(prev) ? this.slides[prev] : prev,
+ isNumber(next) ? this.slides[next] : next,
+ dir * (isRtl ? -1 : 1),
+ options
+ );
+ }
+
+ }
+
+ };
+
+ function getDirection(index, prevIndex) {
+ return index === 'next'
+ ? 1
+ : index === 'previous'
+ ? -1
+ : index < prevIndex
+ ? -1
+ : 1;
+ }
+
+ function speedUp(x) {
+ return .5 * x + 300; // parabola through (400,500; 600,600; 1800,1200)
+ }
+
+ var Slideshow = {
+
+ mixins: [Slider],
+
+ props: {
+ animation: String
+ },
+
+ data: {
+ animation: 'slide',
+ clsActivated: 'uk-transition-active',
+ Animations: Animations$2,
+ Transitioner: Transitioner$1
+ },
+
+ computed: {
+
+ animation: function(ref) {
+ var animation = ref.animation;
+ var Animations = ref.Animations;
+
+ return assign(Animations[animation] || Animations.slide, {name: animation});
+ },
+
+ transitionOptions: function() {
+ return {animation: this.animation};
+ }
+
+ },
+
+ events: {
+
+ 'itemshow itemhide itemshown itemhidden': function(ref) {
+ var target = ref.target;
+
+ this.$update(target);
+ },
+
+ beforeitemshow: function(ref) {
+ var target = ref.target;
+
+ addClass(target, this.clsActive);
+ },
+
+ itemshown: function(ref) {
+ var target = ref.target;
+
+ addClass(target, this.clsActivated);
+ },
+
+ itemhidden: function(ref) {
+ var target = ref.target;
+
+ removeClass(target, this.clsActive, this.clsActivated);
+ }
+
+ }
+
+ };
+
+ var LightboxPanel = {
+
+ mixins: [Container, Modal, Togglable, Slideshow],
+
+ functional: true,
+
+ props: {
+ delayControls: Number,
+ preload: Number,
+ videoAutoplay: Boolean,
+ template: String
+ },
+
+ data: function () { return ({
+ preload: 1,
+ videoAutoplay: false,
+ delayControls: 3000,
+ items: [],
+ cls: 'uk-open',
+ clsPage: 'uk-lightbox-page',
+ selList: '.uk-lightbox-items',
+ attrItem: 'uk-lightbox-item',
+ selClose: '.uk-close-large',
+ selCaption: '.uk-lightbox-caption',
+ pauseOnHover: false,
+ velocity: 2,
+ Animations: Animations$1,
+ template: "
"
+ }); },
+
+ created: function() {
+
+ var $el = $(this.template);
+ var list = $(this.selList, $el);
+ this.items.forEach(function () { return append(list, '
'); });
+
+ this.$mount(append(this.container, $el));
+
+ },
+
+ computed: {
+
+ caption: function(ref, $el) {
+ var selCaption = ref.selCaption;
+
+ return $(selCaption, $el);
+ }
+
+ },
+
+ events: [
+
+ {
+
+ name: (pointerMove + " " + pointerDown + " keydown"),
+
+ handler: 'showControls'
+
+ },
+
+ {
+
+ name: 'click',
+
+ self: true,
+
+ delegate: function() {
+ return this.selSlides;
+ },
+
+ handler: function(e) {
+
+ if (e.defaultPrevented) {
+ return;
+ }
+
+ this.hide();
+ }
+
+ },
+
+ {
+
+ name: 'shown',
+
+ self: true,
+
+ handler: function() {
+ this.showControls();
+ }
+
+ },
+
+ {
+
+ name: 'hide',
+
+ self: true,
+
+ handler: function() {
+
+ this.hideControls();
+
+ removeClass(this.slides, this.clsActive);
+ Transition.stop(this.slides);
+
+ }
+ },
+
+ {
+
+ name: 'hidden',
+
+ self: true,
+
+ handler: function() {
+ this.$destroy(true);
+ }
+
+ },
+
+ {
+
+ name: 'keyup',
+
+ el: function() {
+ return document;
+ },
+
+ handler: function(e) {
+
+ if (!this.isToggled(this.$el) || !this.draggable) {
+ return;
+ }
+
+ switch (e.keyCode) {
+ case 37:
+ this.show('previous');
+ break;
+ case 39:
+ this.show('next');
+ break;
+ }
+ }
+ },
+
+ {
+
+ name: 'beforeitemshow',
+
+ handler: function(e) {
+
+ if (this.isToggled()) {
+ return;
+ }
+
+ this.draggable = false;
+
+ e.preventDefault();
+
+ this.toggleElement(this.$el, true, false);
+
+ this.animation = Animations$1['scale'];
+ removeClass(e.target, this.clsActive);
+ this.stack.splice(1, 0, this.index);
+
+ }
+
+ },
+
+ {
+
+ name: 'itemshow',
+
+ handler: function() {
+
+ html(this.caption, this.getItem().caption || '');
+
+ for (var j = -this.preload; j <= this.preload; j++) {
+ this.loadItem(this.index + j);
+ }
+
+ }
+
+ },
+
+ {
+
+ name: 'itemshown',
+
+ handler: function() {
+ this.draggable = this.$props.draggable;
+ }
+
+ },
+
+ {
+
+ name: 'itemload',
+
+ handler: function(_, item) {
+ var this$1 = this;
+
+
+ var src = item.source;
+ var type = item.type;
+ var alt = item.alt; if ( alt === void 0 ) alt = '';
+ var poster = item.poster;
+ var attrs = item.attrs; if ( attrs === void 0 ) attrs = {};
+
+ this.setItem(item, '');
+
+ if (!src) {
+ return;
+ }
+
+ var matches;
+ var iframeAttrs = {
+ frameborder: '0',
+ allow: 'autoplay',
+ allowfullscreen: '',
+ style: 'max-width: 100%; box-sizing: border-box;',
+ 'uk-responsive': '',
+ 'uk-video': ("" + (this.videoAutoplay))
+ };
+
+ // Image
+ if (type === 'image' || src.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i)) {
+
+ getImage(src, attrs.srcset, attrs.size).then(
+ function (ref) {
+ var width = ref.width;
+ var height = ref.height;
+
+ return this$1.setItem(item, createEl('img', assign({src: src, width: width, height: height, alt: alt}, attrs)));
+ },
+ function () { return this$1.setError(item); }
+ );
+
+ // Video
+ } else if (type === 'video' || src.match(/\.(mp4|webm|ogv)($|\?)/i)) {
+
+ var video = createEl('video', assign({
+ src: src,
+ poster: poster,
+ controls: '',
+ playsinline: '',
+ 'uk-video': ("" + (this.videoAutoplay))
+ }, attrs));
+
+ on(video, 'loadedmetadata', function () {
+ attr(video, {width: video.videoWidth, height: video.videoHeight});
+ this$1.setItem(item, video);
+ });
+ on(video, 'error', function () { return this$1.setError(item); });
+
+ // Iframe
+ } else if (type === 'iframe' || src.match(/\.(html|php)($|\?)/i)) {
+
+ this.setItem(item, createEl('iframe', assign({
+ src: src,
+ frameborder: '0',
+ allowfullscreen: '',
+ class: 'uk-lightbox-iframe'
+ }, attrs)));
+
+ // YouTube
+ } else if ((matches = src.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))) {
+
+ this.setItem(item, createEl('iframe', assign({
+ src: ("https://www.youtube" + (matches[1] || '') + ".com/embed/" + (matches[2]) + (matches[3] ? ("?" + (matches[3])) : '')),
+ width: 1920,
+ height: 1080
+ }, iframeAttrs, attrs)));
+
+ // Vimeo
+ } else if ((matches = src.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))) {
+
+ ajax(("https://vimeo.com/api/oembed.json?maxwidth=1920&url=" + (encodeURI(src))), {
+ responseType: 'json',
+ withCredentials: false
+ }).then(
+ function (ref) {
+ var ref_response = ref.response;
+ var height = ref_response.height;
+ var width = ref_response.width;
+
+ return this$1.setItem(item, createEl('iframe', assign({
+ src: ("https://player.vimeo.com/video/" + (matches[1]) + (matches[2] ? ("?" + (matches[2])) : '')),
+ width: width,
+ height: height
+ }, iframeAttrs, attrs)));
+ },
+ function () { return this$1.setError(item); }
+ );
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ methods: {
+
+ loadItem: function(index) {
+ if ( index === void 0 ) index = this.index;
+
+
+ var item = this.getItem(index);
+
+ if (!this.getSlide(item).childElementCount) {
+ trigger(this.$el, 'itemload', [item]);
+ }
+ },
+
+ getItem: function(index) {
+ if ( index === void 0 ) index = this.index;
+
+ return this.items[getIndex(index, this.slides)];
+ },
+
+ setItem: function(item, content) {
+ trigger(this.$el, 'itemloaded', [this, html(this.getSlide(item), content) ]);
+ },
+
+ getSlide: function(item) {
+ return this.slides[this.items.indexOf(item)];
+ },
+
+ setError: function(item) {
+ this.setItem(item, '');
+ },
+
+ showControls: function() {
+
+ clearTimeout(this.controlsTimer);
+ this.controlsTimer = setTimeout(this.hideControls, this.delayControls);
+
+ addClass(this.$el, 'uk-active', 'uk-transition-active');
+
+ },
+
+ hideControls: function() {
+ removeClass(this.$el, 'uk-active', 'uk-transition-active');
+ }
+
+ }
+
+ };
+
+ function createEl(tag, attrs) {
+ var el = fragment(("<" + tag + ">"));
+ attr(el, attrs);
+ return el;
+ }
+
+ var lightbox = {
+
+ install: install$1,
+
+ props: {toggle: String},
+
+ data: {toggle: 'a'},
+
+ computed: {
+
+ toggles: {
+
+ get: function(ref, $el) {
+ var toggle = ref.toggle;
+
+ return $$(toggle, $el);
+ },
+
+ watch: function() {
+ this.hide();
+ }
+
+ }
+
+ },
+
+ disconnected: function() {
+ this.hide();
+ },
+
+ events: [
+
+ {
+
+ name: 'click',
+
+ delegate: function() {
+ return ((this.toggle) + ":not(.uk-disabled)");
+ },
+
+ handler: function(e) {
+ e.preventDefault();
+ this.show(e.current);
+ }
+
+ }
+
+ ],
+
+ methods: {
+
+ show: function(index) {
+ var this$1 = this;
+
+
+ var items = uniqueBy(this.toggles.map(toItem), 'source');
+
+ if (isElement(index)) {
+ var ref = toItem(index);
+ var source = ref.source;
+ index = findIndex(items, function (ref) {
+ var src = ref.source;
+
+ return source === src;
+ });
+ }
+
+ this.panel = this.panel || this.$create('lightboxPanel', assign({}, this.$props, {items: items}));
+
+ on(this.panel.$el, 'hidden', function () { return this$1.panel = false; });
+
+ return this.panel.show(index);
+
+ },
+
+ hide: function() {
+
+ return this.panel && this.panel.hide();
+
+ }
+
+ }
+
+ };
+
+ function install$1(UIkit, Lightbox) {
+
+ if (!UIkit.lightboxPanel) {
+ UIkit.component('lightboxPanel', LightboxPanel);
+ }
+
+ assign(
+ Lightbox.props,
+ UIkit.component('lightboxPanel').options.props
+ );
+
+ }
+
+ function toItem(el) {
+
+ var item = {};
+
+ ['href', 'caption', 'type', 'poster', 'alt', 'attrs'].forEach(function (attr) {
+ item[attr === 'href' ? 'source' : attr] = data(el, attr);
+ });
+
+ item.attrs = parseOptions(item.attrs);
+
+ return item;
+ }
+
+ var obj$1;
+
+ var notification = {
+
+ mixins: [Container],
+
+ functional: true,
+
+ args: ['message', 'status'],
+
+ data: {
+ message: '',
+ status: '',
+ timeout: 5000,
+ group: null,
+ pos: 'top-center',
+ clsContainer: 'uk-notification',
+ clsClose: 'uk-notification-close',
+ clsMsg: 'uk-notification-message'
+ },
+
+ install: install,
+
+ computed: {
+
+ marginProp: function(ref) {
+ var pos = ref.pos;
+
+ return ("margin" + (startsWith(pos, 'top') ? 'Top' : 'Bottom'));
+ },
+
+ startProps: function() {
+ var obj;
+
+ return ( obj = {opacity: 0}, obj[this.marginProp] = -this.$el.offsetHeight, obj );
+ }
+
+ },
+
+ created: function() {
+
+ var container = $(("." + (this.clsContainer) + "-" + (this.pos)), this.container)
+ || append(this.container, (""));
+
+ this.$mount(append(container,
+ ("")
+ ));
+
+ },
+
+ connected: function() {
+ var this$1 = this;
+ var obj;
+
+
+ var margin = toFloat(css(this.$el, this.marginProp));
+ Transition.start(
+ css(this.$el, this.startProps),
+ ( obj = {opacity: 1}, obj[this.marginProp] = margin, obj )
+ ).then(function () {
+ if (this$1.timeout) {
+ this$1.timer = setTimeout(this$1.close, this$1.timeout);
+ }
+ });
+
+ },
+
+ events: ( obj$1 = {
+
+ click: function(e) {
+ if (closest(e.target, 'a[href="#"],a[href=""]')) {
+ e.preventDefault();
+ }
+ this.close();
+ }
+
+ }, obj$1[pointerEnter] = function () {
+ if (this.timer) {
+ clearTimeout(this.timer);
+ }
+ }, obj$1[pointerLeave] = function () {
+ if (this.timeout) {
+ this.timer = setTimeout(this.close, this.timeout);
+ }
+ }, obj$1 ),
+
+ methods: {
+
+ close: function(immediate) {
+ var this$1 = this;
+
+
+ var removeFn = function (el) {
+
+ var container = parent(el);
+
+ trigger(el, 'close', [this$1]);
+ remove$1(el);
+
+ if (container && !container.hasChildNodes()) {
+ remove$1(container);
+ }
+
+ };
+
+ if (this.timer) {
+ clearTimeout(this.timer);
+ }
+
+ if (immediate) {
+ removeFn(this.$el);
+ } else {
+ Transition.start(this.$el, this.startProps).then(removeFn);
+ }
+ }
+
+ }
+
+ };
+
+ function install(UIkit) {
+ UIkit.notification.closeAll = function (group, immediate) {
+ apply$1(document.body, function (el) {
+ var notification = UIkit.getComponent(el, 'notification');
+ if (notification && (!group || group === notification.group)) {
+ notification.close(immediate);
+ }
+ });
+ };
+ }
+
+ var props = ['x', 'y', 'bgx', 'bgy', 'rotate', 'scale', 'color', 'backgroundColor', 'borderColor', 'opacity', 'blur', 'hue', 'grayscale', 'invert', 'saturate', 'sepia', 'fopacity', 'stroke'];
+
+ var Parallax = {
+
+ mixins: [Media],
+
+ props: props.reduce(function (props, prop) {
+ props[prop] = 'list';
+ return props;
+ }, {}),
+
+ data: props.reduce(function (data, prop) {
+ data[prop] = undefined;
+ return data;
+ }, {}),
+
+ computed: {
+
+ props: function(properties, $el) {
+ var this$1 = this;
+
+
+ return props.reduce(function (props, prop) {
+
+ if (isUndefined(properties[prop])) {
+ return props;
+ }
+
+ var isColor = prop.match(/color/i);
+ var isCssProp = isColor || prop === 'opacity';
+
+ var pos, bgPos, diff;
+ var steps = properties[prop].slice();
+
+ if (isCssProp) {
+ css($el, prop, '');
+ }
+
+ if (steps.length < 2) {
+ steps.unshift((prop === 'scale'
+ ? 1
+ : isCssProp
+ ? css($el, prop)
+ : 0) || 0);
+ }
+
+ var unit = getUnit(steps);
+
+ if (isColor) {
+
+ var ref = $el.style;
+ var color = ref.color;
+ steps = steps.map(function (step) { return parseColor($el, step); });
+ $el.style.color = color;
+
+ } else if (startsWith(prop, 'bg')) {
+
+ var attr = prop === 'bgy' ? 'height' : 'width';
+ steps = steps.map(function (step) { return toPx(step, attr, this$1.$el); });
+
+ css($el, ("background-position-" + (prop[2])), '');
+ bgPos = css($el, 'backgroundPosition').split(' ')[prop[2] === 'x' ? 0 : 1]; // IE 11 can't read background-position-[x|y]
+
+ if (this$1.covers) {
+
+ var min = Math.min.apply(Math, steps);
+ var max = Math.max.apply(Math, steps);
+ var down = steps.indexOf(min) < steps.indexOf(max);
+
+ diff = max - min;
+
+ steps = steps.map(function (step) { return step - (down ? min : max); });
+ pos = (down ? -diff : 0) + "px";
+
+ } else {
+
+ pos = bgPos;
+
+ }
+
+ } else {
+
+ steps = steps.map(toFloat);
+
+ }
+
+ if (prop === 'stroke') {
+
+ if (!steps.some(function (step) { return step; })) {
+ return props;
+ }
+
+ var length = getMaxPathLength(this$1.$el);
+ css($el, 'strokeDasharray', length);
+
+ if (unit === '%') {
+ steps = steps.map(function (step) { return step * length / 100; });
+ }
+
+ steps = steps.reverse();
+
+ prop = 'strokeDashoffset';
+ }
+
+ props[prop] = {steps: steps, unit: unit, pos: pos, bgPos: bgPos, diff: diff};
+
+ return props;
+
+ }, {});
+
+ },
+
+ bgProps: function() {
+ var this$1 = this;
+
+ return ['bgx', 'bgy'].filter(function (bg) { return bg in this$1.props; });
+ },
+
+ covers: function(_, $el) {
+ return covers($el);
+ }
+
+ },
+
+ disconnected: function() {
+ delete this._image;
+ },
+
+ update: {
+
+ read: function(data) {
+ var this$1 = this;
+
+
+ if (!this.matchMedia) {
+ return;
+ }
+
+ if (!data.image && this.covers && this.bgProps.length) {
+ var src = css(this.$el, 'backgroundImage').replace(/^none|url\(["']?(.+?)["']?\)$/, '$1');
+
+ if (src) {
+ var img = new Image();
+ img.src = src;
+ data.image = img;
+
+ if (!img.naturalWidth) {
+ img.onload = function () { return this$1.$update(); };
+ }
+ }
+
+ }
+
+ var image = data.image;
+
+ if (!image || !image.naturalWidth) {
+ return;
+ }
+
+ var dimEl = {
+ width: this.$el.offsetWidth,
+ height: this.$el.offsetHeight
+ };
+ var dimImage = {
+ width: image.naturalWidth,
+ height: image.naturalHeight
+ };
+
+ var dim = Dimensions.cover(dimImage, dimEl);
+
+ this.bgProps.forEach(function (prop) {
+
+ var ref = this$1.props[prop];
+ var diff = ref.diff;
+ var bgPos = ref.bgPos;
+ var steps = ref.steps;
+ var attr = prop === 'bgy' ? 'height' : 'width';
+ var span = dim[attr] - dimEl[attr];
+
+ if (span < diff) {
+ dimEl[attr] = dim[attr] + diff - span;
+ } else if (span > diff) {
+
+ var posPercentage = dimEl[attr] / toPx(bgPos, attr, this$1.$el);
+
+ if (posPercentage) {
+ this$1.props[prop].steps = steps.map(function (step) { return step - (span - diff) / posPercentage; });
+ }
+ }
+
+ dim = Dimensions.cover(dimImage, dimEl);
+ });
+
+ data.dim = dim;
+ },
+
+ write: function(ref) {
+ var dim = ref.dim;
+
+
+ if (!this.matchMedia) {
+ css(this.$el, {backgroundSize: '', backgroundRepeat: ''});
+ return;
+ }
+
+ dim && css(this.$el, {
+ backgroundSize: ((dim.width) + "px " + (dim.height) + "px"),
+ backgroundRepeat: 'no-repeat'
+ });
+
+ },
+
+ events: ['resize']
+
+ },
+
+ methods: {
+
+ reset: function() {
+ var this$1 = this;
+
+ each(this.getCss(0), function (_, prop) { return css(this$1.$el, prop, ''); });
+ },
+
+ getCss: function(percent) {
+
+ var ref = this;
+ var props = ref.props;
+ return Object.keys(props).reduce(function (css, prop) {
+
+ var ref = props[prop];
+ var steps = ref.steps;
+ var unit = ref.unit;
+ var pos = ref.pos;
+ var value = getValue(steps, percent);
+
+ switch (prop) {
+
+ // transforms
+ case 'x':
+ case 'y': {
+ unit = unit || 'px';
+ css.transform += " translate" + (ucfirst(prop)) + "(" + (toFloat(value).toFixed(unit === 'px' ? 0 : 2)) + unit + ")";
+ break;
+ }
+ case 'rotate':
+ unit = unit || 'deg';
+ css.transform += " rotate(" + (value + unit) + ")";
+ break;
+ case 'scale':
+ css.transform += " scale(" + value + ")";
+ break;
+
+ // bg image
+ case 'bgy':
+ case 'bgx':
+ css[("background-position-" + (prop[2]))] = "calc(" + pos + " + " + value + "px)";
+ break;
+
+ // color
+ case 'color':
+ case 'backgroundColor':
+ case 'borderColor': {
+
+ var ref$1 = getStep(steps, percent);
+ var start = ref$1[0];
+ var end = ref$1[1];
+ var p = ref$1[2];
+
+ css[prop] = "rgba(" + (start.map(function (value, i) {
+ value = value + p * (end[i] - value);
+ return i === 3 ? toFloat(value) : parseInt(value, 10);
+ }).join(',')) + ")";
+ break;
+ }
+ // CSS Filter
+ case 'blur':
+ unit = unit || 'px';
+ css.filter += " blur(" + (value + unit) + ")";
+ break;
+ case 'hue':
+ unit = unit || 'deg';
+ css.filter += " hue-rotate(" + (value + unit) + ")";
+ break;
+ case 'fopacity':
+ unit = unit || '%';
+ css.filter += " opacity(" + (value + unit) + ")";
+ break;
+ case 'grayscale':
+ case 'invert':
+ case 'saturate':
+ case 'sepia':
+ unit = unit || '%';
+ css.filter += " " + prop + "(" + (value + unit) + ")";
+ break;
+ default:
+ css[prop] = value;
+ }
+
+ return css;
+
+ }, {transform: '', filter: ''});
+
+ }
+
+ }
+
+ };
+
+ function parseColor(el, color) {
+ return css(css(el, 'color', color), 'color')
+ .split(/[(),]/g)
+ .slice(1, -1)
+ .concat(1)
+ .slice(0, 4)
+ .map(toFloat);
+ }
+
+ function getStep(steps, percent) {
+ var count = steps.length - 1;
+ var index = Math.min(Math.floor(count * percent), count - 1);
+ var step = steps.slice(index, index + 2);
+
+ step.push(percent === 1 ? 1 : percent % (1 / count) * count);
+
+ return step;
+ }
+
+ function getValue(steps, percent, digits) {
+ if ( digits === void 0 ) digits = 2;
+
+ var ref = getStep(steps, percent);
+ var start = ref[0];
+ var end = ref[1];
+ var p = ref[2];
+ return (isNumber(start)
+ ? start + Math.abs(start - end) * p * (start < end ? 1 : -1)
+ : +end
+ ).toFixed(digits);
+ }
+
+ function getUnit(steps) {
+ return steps.reduce(function (unit, step) { return isString(step) && step.replace(/-|\d/g, '').trim() || unit; }, '');
+ }
+
+ function covers(el) {
+ var ref = el.style;
+ var backgroundSize = ref.backgroundSize;
+ var covers = css(css(el, 'backgroundSize', ''), 'backgroundSize') === 'cover';
+ el.style.backgroundSize = backgroundSize;
+ return covers;
+ }
+
+ var parallax = {
+
+ mixins: [Parallax],
+
+ props: {
+ target: String,
+ viewport: Number,
+ easing: Number
+ },
+
+ data: {
+ target: false,
+ viewport: 1,
+ easing: 1
+ },
+
+ computed: {
+
+ target: function(ref, $el) {
+ var target = ref.target;
+
+ return getOffsetElement(target && query(target, $el) || $el);
+ }
+
+ },
+
+ update: {
+
+ read: function(ref, types) {
+ var percent = ref.percent;
+
+
+ if (!types.has('scroll')) {
+ percent = false;
+ }
+
+ if (!this.matchMedia) {
+ return;
+ }
+
+ var prev = percent;
+ percent = ease(scrolledOver(this.target) / (this.viewport || 1), this.easing);
+
+ return {
+ percent: percent,
+ style: prev !== percent ? this.getCss(percent) : false
+ };
+ },
+
+ write: function(ref) {
+ var style = ref.style;
+
+
+ if (!this.matchMedia) {
+ this.reset();
+ return;
+ }
+
+ style && css(this.$el, style);
+
+ },
+
+ events: ['scroll', 'resize']
+ }
+
+ };
+
+ function ease(percent, easing) {
+ return clamp(percent * (1 - (easing - easing * percent)));
+ }
+
+ // SVG elements do not inherit from HTMLElement
+ function getOffsetElement(el) {
+ return el
+ ? 'offsetTop' in el
+ ? el
+ : getOffsetElement(parent(el))
+ : document.body;
+ }
+
+ var SliderReactive = {
+
+ update: {
+
+ write: function() {
+
+ if (this.stack.length || this.dragging) {
+ return;
+ }
+
+ var index = this.getValidIndex(this.index);
+
+ if (!~this.prevIndex || this.index !== index) {
+ this.show(index);
+ }
+
+ },
+
+ events: ['resize']
+
+ }
+
+ };
+
+ function Transitioner (prev, next, dir, ref) {
+ var center = ref.center;
+ var easing = ref.easing;
+ var list = ref.list;
+
+
+ var deferred = new Deferred();
+
+ var from = prev
+ ? getLeft(prev, list, center)
+ : getLeft(next, list, center) + dimensions(next).width * dir;
+ var to = next
+ ? getLeft(next, list, center)
+ : from + dimensions(prev).width * dir * (isRtl ? -1 : 1);
+
+ return {
+
+ dir: dir,
+
+ show: function(duration, percent, linear) {
+ if ( percent === void 0 ) percent = 0;
+
+
+ var timing = linear ? 'linear' : easing;
+ duration -= Math.round(duration * clamp(percent, -1, 1));
+
+ this.translate(percent);
+
+ percent = prev ? percent : clamp(percent, 0, 1);
+ triggerUpdate(this.getItemIn(), 'itemin', {percent: percent, duration: duration, timing: timing, dir: dir});
+ prev && triggerUpdate(this.getItemIn(true), 'itemout', {percent: 1 - percent, duration: duration, timing: timing, dir: dir});
+
+ Transition
+ .start(list, {transform: translate(-to * (isRtl ? -1 : 1), 'px')}, duration, timing)
+ .then(deferred.resolve, noop);
+
+ return deferred.promise;
+
+ },
+
+ cancel: function() {
+ Transition.cancel(list);
+ },
+
+ reset: function() {
+ css(list, 'transform', '');
+ },
+
+ forward: function(duration, percent) {
+ if ( percent === void 0 ) percent = this.percent();
+
+ Transition.cancel(list);
+ return this.show(duration, percent, true);
+ },
+
+ translate: function(percent) {
+
+ var distance = this.getDistance() * dir * (isRtl ? -1 : 1);
+
+ css(list, 'transform', translate(clamp(
+ -to + (distance - distance * percent),
+ -getWidth(list),
+ dimensions(list).width
+ ) * (isRtl ? -1 : 1), 'px'));
+
+ var actives = this.getActives();
+ var itemIn = this.getItemIn();
+ var itemOut = this.getItemIn(true);
+
+ percent = prev ? clamp(percent, -1, 1) : 0;
+
+ children(list).forEach(function (slide, i) {
+ var isActive = includes(actives, slide);
+ var isIn = slide === itemIn;
+ var isOut = slide === itemOut;
+ var translateIn = isIn || !isOut && (isActive || dir * (isRtl ? -1 : 1) === -1 ^ getElLeft(slide, list) > getElLeft(prev || next));
+
+ triggerUpdate(slide, ("itemtranslate" + (translateIn ? 'in' : 'out')), {
+ dir: dir,
+ percent: isOut
+ ? 1 - percent
+ : isIn
+ ? percent
+ : isActive
+ ? 1
+ : 0
+ });
+ });
+
+ },
+
+ percent: function() {
+ return Math.abs((css(list, 'transform').split(',')[4] * (isRtl ? -1 : 1) + from) / (to - from));
+ },
+
+ getDistance: function() {
+ return Math.abs(to - from);
+ },
+
+ getItemIn: function(out) {
+ if ( out === void 0 ) out = false;
+
+
+ var actives = this.getActives();
+ var nextActives = inView(list, getLeft(next || prev, list, center));
+
+ if (out) {
+ var temp = actives;
+ actives = nextActives;
+ nextActives = temp;
+ }
+
+ return nextActives[findIndex(nextActives, function (el) { return !includes(actives, el); })];
+
+ },
+
+ getActives: function() {
+ return inView(list, getLeft(prev || next, list, center));
+ }
+
+ };
+
+ }
+
+ function getLeft(el, list, center) {
+
+ var left = getElLeft(el, list);
+
+ return center
+ ? left - centerEl(el, list)
+ : Math.min(left, getMax(list));
+
+ }
+
+ function getMax(list) {
+ return Math.max(0, getWidth(list) - dimensions(list).width);
+ }
+
+ function getWidth(list) {
+ return children(list).reduce(function (right, el) { return dimensions(el).width + right; }, 0);
+ }
+
+ function centerEl(el, list) {
+ return dimensions(list).width / 2 - dimensions(el).width / 2;
+ }
+
+ function getElLeft(el, list) {
+ return el && (position(el).left + (isRtl ? dimensions(el).width - dimensions(list).width : 0)) * (isRtl ? -1 : 1) || 0;
+ }
+
+ function inView(list, listLeft) {
+
+ listLeft -= 1;
+ var listRight = listLeft + dimensions(list).width + 2;
+
+ return children(list).filter(function (slide) {
+ var slideLeft = getElLeft(slide, list);
+ var slideRight = slideLeft + dimensions(slide).width;
+
+ return slideLeft >= listLeft && slideRight <= listRight;
+ });
+ }
+
+ function triggerUpdate(el, type, data) {
+ trigger(el, createEvent(type, false, false, data));
+ }
+
+ var slider = {
+
+ mixins: [Class, Slider, SliderReactive],
+
+ props: {
+ center: Boolean,
+ sets: Boolean
+ },
+
+ data: {
+ center: false,
+ sets: false,
+ attrItem: 'uk-slider-item',
+ selList: '.uk-slider-items',
+ selNav: '.uk-slider-nav',
+ clsContainer: 'uk-slider-container',
+ Transitioner: Transitioner
+ },
+
+ computed: {
+
+ avgWidth: function() {
+ return getWidth(this.list) / this.length;
+ },
+
+ finite: function(ref) {
+ var finite = ref.finite;
+
+ return finite || Math.ceil(getWidth(this.list)) < dimensions(this.list).width + getMaxElWidth(this.list) + this.center;
+ },
+
+ maxIndex: function() {
+
+ if (!this.finite || this.center && !this.sets) {
+ return this.length - 1;
+ }
+
+ if (this.center) {
+ return last(this.sets);
+ }
+
+ var lft = 0;
+ var max = getMax(this.list);
+ var index = findIndex(this.slides, function (el) {
+
+ if (lft >= max) {
+ return true;
+ }
+
+ lft += dimensions(el).width;
+
+ });
+
+ return ~index ? index : this.length - 1;
+ },
+
+ sets: function(ref) {
+ var this$1 = this;
+ var sets = ref.sets;
+
+
+ if (!sets) {
+ return;
+ }
+
+ var width = dimensions(this.list).width / (this.center ? 2 : 1);
+
+ var left = 0;
+ var leftCenter = width;
+ var slideLeft = 0;
+
+ sets = sortBy$1(this.slides, 'offsetLeft').reduce(function (sets, slide, i) {
+
+ var slideWidth = dimensions(slide).width;
+ var slideRight = slideLeft + slideWidth;
+
+ if (slideRight > left) {
+
+ if (!this$1.center && i > this$1.maxIndex) {
+ i = this$1.maxIndex;
+ }
+
+ if (!includes(sets, i)) {
+
+ var cmp = this$1.slides[i + 1];
+ if (this$1.center && cmp && slideWidth < leftCenter - dimensions(cmp).width / 2) {
+ leftCenter -= slideWidth;
+ } else {
+ leftCenter = width;
+ sets.push(i);
+ left = slideLeft + width + (this$1.center ? slideWidth / 2 : 0);
+ }
+
+ }
+ }
+
+ slideLeft += slideWidth;
+
+ return sets;
+
+ }, []);
+
+ return !isEmpty(sets) && sets;
+
+ },
+
+ transitionOptions: function() {
+ return {
+ center: this.center,
+ list: this.list
+ };
+ }
+
+ },
+
+ connected: function() {
+ toggleClass(this.$el, this.clsContainer, !$(("." + (this.clsContainer)), this.$el));
+ },
+
+ update: {
+
+ write: function() {
+ var this$1 = this;
+
+ this.navItems.forEach(function (el) {
+ var index = toNumber(data(el, this$1.attrItem));
+ if (index !== false) {
+ el.hidden = !this$1.maxIndex || index > this$1.maxIndex || this$1.sets && !includes(this$1.sets, index);
+ }
+ });
+
+ if (this.length && !this.dragging && !this.stack.length) {
+ this.reorder();
+ this._translate(1);
+ }
+
+ var actives = this._getTransitioner(this.index).getActives();
+ this.slides.forEach(function (slide) { return toggleClass(slide, this$1.clsActive, includes(actives, slide)); });
+
+ if (this.clsActivated && (!this.sets || includes(this.sets, toFloat(this.index)))) {
+ this.slides.forEach(function (slide) { return toggleClass(slide, this$1.clsActivated || '', includes(actives, slide)); });
+ }
+ },
+
+ events: ['resize']
+
+ },
+
+ events: {
+
+ beforeitemshow: function(e) {
+
+ if (!this.dragging && this.sets && this.stack.length < 2 && !includes(this.sets, this.index)) {
+ this.index = this.getValidIndex();
+ }
+
+ var diff = Math.abs(
+ this.index
+ - this.prevIndex
+ + (this.dir > 0 && this.index < this.prevIndex || this.dir < 0 && this.index > this.prevIndex ? (this.maxIndex + 1) * this.dir : 0)
+ );
+
+ if (!this.dragging && diff > 1) {
+
+ for (var i = 0; i < diff; i++) {
+ this.stack.splice(1, 0, this.dir > 0 ? 'next' : 'previous');
+ }
+
+ e.preventDefault();
+ return;
+ }
+
+ var index = this.dir < 0 || !this.slides[this.prevIndex] ? this.index : this.prevIndex;
+ this.duration = speedUp(this.avgWidth / this.velocity) * (dimensions(this.slides[index]).width / this.avgWidth);
+
+ this.reorder();
+
+ },
+
+ itemshow: function() {
+ ~this.prevIndex && addClass(this._getTransitioner().getItemIn(), this.clsActive);
+ }
+
+ },
+
+ methods: {
+
+ reorder: function() {
+ var this$1 = this;
+
+
+ if (this.finite) {
+ css(this.slides, 'order', '');
+ return;
+ }
+
+ var index = this.dir > 0 && this.slides[this.prevIndex] ? this.prevIndex : this.index;
+
+ this.slides.forEach(function (slide, i) { return css(slide, 'order', this$1.dir > 0 && i < index
+ ? 1
+ : this$1.dir < 0 && i >= this$1.index
+ ? -1
+ : ''
+ ); }
+ );
+
+ if (!this.center) {
+ return;
+ }
+
+ var next = this.slides[index];
+ var width = dimensions(this.list).width / 2 - dimensions(next).width / 2;
+ var j = 0;
+
+ while (width > 0) {
+ var slideIndex = this.getIndex(--j + index, index);
+ var slide = this.slides[slideIndex];
+
+ css(slide, 'order', slideIndex > index ? -2 : -1);
+ width -= dimensions(slide).width;
+ }
+
+ },
+
+ getValidIndex: function(index, prevIndex) {
+ if ( index === void 0 ) index = this.index;
+ if ( prevIndex === void 0 ) prevIndex = this.prevIndex;
+
+
+ index = this.getIndex(index, prevIndex);
+
+ if (!this.sets) {
+ return index;
+ }
+
+ var prev;
+
+ do {
+
+ if (includes(this.sets, index)) {
+ return index;
+ }
+
+ prev = index;
+ index = this.getIndex(index + this.dir, prevIndex);
+
+ } while (index !== prev);
+
+ return index;
+ }
+
+ }
+
+ };
+
+ function getMaxElWidth(list) {
+ return Math.max.apply(Math, [ 0 ].concat( children(list).map(function (el) { return dimensions(el).width; }) ));
+ }
+
+ var sliderParallax = {
+
+ mixins: [Parallax],
+
+ data: {
+ selItem: '!li'
+ },
+
+ computed: {
+
+ item: function(ref, $el) {
+ var selItem = ref.selItem;
+
+ return query(selItem, $el);
+ }
+
+ },
+
+ events: [
+
+ {
+ name: 'itemin itemout',
+
+ self: true,
+
+ el: function() {
+ return this.item;
+ },
+
+ handler: function(ref) {
+ var this$1 = this;
+ var type = ref.type;
+ var ref_detail = ref.detail;
+ var percent = ref_detail.percent;
+ var duration = ref_detail.duration;
+ var timing = ref_detail.timing;
+ var dir = ref_detail.dir;
+
+
+ fastdom.read(function () {
+ var propsFrom = this$1.getCss(getCurrentPercent(type, dir, percent));
+ var propsTo = this$1.getCss(isIn(type) ? .5 : dir > 0 ? 1 : 0);
+ fastdom.write(function () {
+ css(this$1.$el, propsFrom);
+ Transition.start(this$1.$el, propsTo, duration, timing).catch(noop);
+ });
+ });
+
+ }
+ },
+
+ {
+ name: 'transitioncanceled transitionend',
+
+ self: true,
+
+ el: function() {
+ return this.item;
+ },
+
+ handler: function() {
+ Transition.cancel(this.$el);
+ }
+
+ },
+
+ {
+ name: 'itemtranslatein itemtranslateout',
+
+ self: true,
+
+ el: function() {
+ return this.item;
+ },
+
+ handler: function(ref) {
+ var this$1 = this;
+ var type = ref.type;
+ var ref_detail = ref.detail;
+ var percent = ref_detail.percent;
+ var dir = ref_detail.dir;
+
+ fastdom.read(function () {
+ var props = this$1.getCss(getCurrentPercent(type, dir, percent));
+ fastdom.write(function () { return css(this$1.$el, props); });
+ });
+ }
+ }
+
+ ]
+
+ };
+
+ function isIn(type) {
+ return endsWith(type, 'in');
+ }
+
+ function getCurrentPercent(type, dir, percent) {
+
+ percent /= 2;
+
+ return !isIn(type)
+ ? dir < 0
+ ? percent
+ : 1 - percent
+ : dir < 0
+ ? 1 - percent
+ : percent;
+ }
+
+ var Animations = assign({}, Animations$2, {
+
+ fade: {
+
+ show: function() {
+ return [
+ {opacity: 0, zIndex: 0},
+ {zIndex: -1}
+ ];
+ },
+
+ percent: function(current) {
+ return 1 - css(current, 'opacity');
+ },
+
+ translate: function(percent) {
+ return [
+ {opacity: 1 - percent, zIndex: 0},
+ {zIndex: -1}
+ ];
+ }
+
+ },
+
+ scale: {
+
+ show: function() {
+ return [
+ {opacity: 0, transform: scale3d(1 + .5), zIndex: 0},
+ {zIndex: -1}
+ ];
+ },
+
+ percent: function(current) {
+ return 1 - css(current, 'opacity');
+ },
+
+ translate: function(percent) {
+ return [
+ {opacity: 1 - percent, transform: scale3d(1 + .5 * percent), zIndex: 0},
+ {zIndex: -1}
+ ];
+ }
+
+ },
+
+ pull: {
+
+ show: function(dir) {
+ return dir < 0
+ ? [
+ {transform: translate(30), zIndex: -1},
+ {transform: translate(), zIndex: 0}
+ ]
+ : [
+ {transform: translate(-100), zIndex: 0},
+ {transform: translate(), zIndex: -1}
+ ];
+ },
+
+ percent: function(current, next, dir) {
+ return dir < 0
+ ? 1 - translated(next)
+ : translated(current);
+ },
+
+ translate: function(percent, dir) {
+ return dir < 0
+ ? [
+ {transform: translate(30 * percent), zIndex: -1},
+ {transform: translate(-100 * (1 - percent)), zIndex: 0}
+ ]
+ : [
+ {transform: translate(-percent * 100), zIndex: 0},
+ {transform: translate(30 * (1 - percent)), zIndex: -1}
+ ];
+ }
+
+ },
+
+ push: {
+
+ show: function(dir) {
+ return dir < 0
+ ? [
+ {transform: translate(100), zIndex: 0},
+ {transform: translate(), zIndex: -1}
+ ]
+ : [
+ {transform: translate(-30), zIndex: -1},
+ {transform: translate(), zIndex: 0}
+ ];
+ },
+
+ percent: function(current, next, dir) {
+ return dir > 0
+ ? 1 - translated(next)
+ : translated(current);
+ },
+
+ translate: function(percent, dir) {
+ return dir < 0
+ ? [
+ {transform: translate(percent * 100), zIndex: 0},
+ {transform: translate(-30 * (1 - percent)), zIndex: -1}
+ ]
+ : [
+ {transform: translate(-30 * percent), zIndex: -1},
+ {transform: translate(100 * (1 - percent)), zIndex: 0}
+ ];
+ }
+
+ }
+
+ });
+
+ var slideshow = {
+
+ mixins: [Class, Slideshow, SliderReactive],
+
+ props: {
+ ratio: String,
+ minHeight: Number,
+ maxHeight: Number
+ },
+
+ data: {
+ ratio: '16:9',
+ minHeight: false,
+ maxHeight: false,
+ selList: '.uk-slideshow-items',
+ attrItem: 'uk-slideshow-item',
+ selNav: '.uk-slideshow-nav',
+ Animations: Animations
+ },
+
+ update: {
+
+ read: function() {
+
+ var ref = this.ratio.split(':').map(Number);
+ var width = ref[0];
+ var height = ref[1];
+
+ height = height * this.list.offsetWidth / width || 0;
+
+ if (this.minHeight) {
+ height = Math.max(this.minHeight, height);
+ }
+
+ if (this.maxHeight) {
+ height = Math.min(this.maxHeight, height);
+ }
+
+ return {height: height - boxModelAdjust(this.list, 'height', 'content-box')};
+ },
+
+ write: function(ref) {
+ var height = ref.height;
+
+ height > 0 && css(this.list, 'minHeight', height);
+ },
+
+ events: ['resize']
+
+ }
+
+ };
+
+ var sortable = {
+
+ mixins: [Class, Animate],
+
+ props: {
+ group: String,
+ threshold: Number,
+ clsItem: String,
+ clsPlaceholder: String,
+ clsDrag: String,
+ clsDragState: String,
+ clsBase: String,
+ clsNoDrag: String,
+ clsEmpty: String,
+ clsCustom: String,
+ handle: String
+ },
+
+ data: {
+ group: false,
+ 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: false,
+ pos: {}
+ },
+
+ created: function() {
+ var this$1 = this;
+
+ ['init', 'start', 'move', 'end'].forEach(function (key) {
+ var fn = this$1[key];
+ this$1[key] = function (e) {
+ assign(this$1.pos, getEventPos(e));
+ fn(e);
+ };
+ });
+ },
+
+ events: {
+
+ name: pointerDown,
+ passive: false,
+ handler: 'init'
+
+ },
+
+ computed: {
+
+ target: function() {
+ return (this.$el.tBodies || [this.$el])[0];
+ },
+
+ items: function() {
+ return children(this.target);
+ },
+
+ isEmpty: {
+
+ get: function() {
+ return isEmpty(this.items);
+ },
+
+ watch: function(empty) {
+ toggleClass(this.target, this.clsEmpty, empty);
+ },
+
+ immediate: true
+
+ },
+
+ handles: {
+
+ get: function(ref, el) {
+ var handle = ref.handle;
+
+ return handle ? $$(handle, el) : this.items;
+ },
+
+ watch: function(handles, prev) {
+ css(prev, {touchAction: '', userSelect: ''});
+ css(handles, {touchAction: hasTouch ? 'none' : '', userSelect: 'none'}); // touchAction set to 'none' causes a performance drop in Chrome 80
+ },
+
+ immediate: true
+
+ }
+
+ },
+
+ update: {
+
+ write: function(data) {
+
+ if (!this.drag || !parent(this.placeholder)) {
+ return;
+ }
+
+ var ref = this;
+ var ref_pos = ref.pos;
+ var x = ref_pos.x;
+ var y = ref_pos.y;
+ var ref_origin = ref.origin;
+ var offsetTop = ref_origin.offsetTop;
+ var offsetLeft = ref_origin.offsetLeft;
+ var placeholder = ref.placeholder;
+
+ css(this.drag, {
+ top: y - offsetTop,
+ left: x - offsetLeft
+ });
+
+ var sortable = this.getSortable(document.elementFromPoint(x, y));
+
+ if (!sortable) {
+ return;
+ }
+
+ var items = sortable.items;
+
+ if (items.some(Transition.inProgress)) {
+ return;
+ }
+
+ var target = findTarget(items, {x: x, y: y});
+
+ if (items.length && (!target || target === placeholder)) {
+ return;
+ }
+
+ var previous = this.getSortable(placeholder);
+ var insertTarget = findInsertTarget(sortable.target, target, placeholder, x, y, sortable === previous && data.moved !== target);
+
+ if (insertTarget === false) {
+ return;
+ }
+
+ if (insertTarget && placeholder === insertTarget) {
+ return;
+ }
+
+ if (sortable !== previous) {
+ previous.remove(placeholder);
+ data.moved = target;
+ } else {
+ delete data.moved;
+ }
+
+ sortable.insert(placeholder, insertTarget);
+
+ this.touched.add(sortable);
+ },
+
+ events: ['move']
+
+ },
+
+ methods: {
+
+ init: function(e) {
+
+ var target = e.target;
+ var button = e.button;
+ var defaultPrevented = e.defaultPrevented;
+ var ref = this.items.filter(function (el) { return within(target, el); });
+ var placeholder = ref[0];
+
+ if (!placeholder
+ || defaultPrevented
+ || button > 0
+ || isInput(target)
+ || within(target, ("." + (this.clsNoDrag)))
+ || this.handle && !within(target, this.handle)
+ ) {
+ return;
+ }
+
+ e.preventDefault();
+
+ this.touched = new Set([this]);
+ this.placeholder = placeholder;
+ this.origin = assign({target: target, index: index(placeholder)}, this.pos);
+
+ on(document, pointerMove, this.move);
+ on(document, pointerUp, this.end);
+
+ if (!this.threshold) {
+ this.start(e);
+ }
+
+ },
+
+ start: function(e) {
+
+ this.drag = appendDrag(this.$container, this.placeholder);
+ var ref = this.placeholder.getBoundingClientRect();
+ var left = ref.left;
+ var top = ref.top;
+ assign(this.origin, {offsetLeft: this.pos.x - left, offsetTop: this.pos.y - top});
+
+ addClass(this.drag, this.clsDrag, this.clsCustom);
+ addClass(this.placeholder, this.clsPlaceholder);
+ addClass(this.items, this.clsItem);
+ addClass(document.documentElement, this.clsDragState);
+
+ trigger(this.$el, 'start', [this, this.placeholder]);
+
+ trackScroll(this.pos);
+
+ this.move(e);
+ },
+
+ move: function(e) {
+
+ if (this.drag) {
+ this.$emit('move');
+ } else if (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold) {
+ this.start(e);
+ }
+
+ },
+
+ end: function() {
+ var this$1 = this;
+
+
+ off(document, pointerMove, this.move);
+ off(document, pointerUp, this.end);
+ off(window, 'scroll', this.scroll);
+
+ if (!this.drag) {
+ return;
+ }
+
+ untrackScroll();
+
+ var sortable = this.getSortable(this.placeholder);
+
+ if (this === sortable) {
+ if (this.origin.index !== index(this.placeholder)) {
+ trigger(this.$el, 'moved', [this, this.placeholder]);
+ }
+ } else {
+ trigger(sortable.$el, 'added', [sortable, this.placeholder]);
+ trigger(this.$el, 'removed', [this, this.placeholder]);
+ }
+
+ trigger(this.$el, 'stop', [this, this.placeholder]);
+
+ remove$1(this.drag);
+ this.drag = null;
+
+ this.touched.forEach(function (ref) {
+ var clsPlaceholder = ref.clsPlaceholder;
+ var clsItem = ref.clsItem;
+
+ return this$1.touched.forEach(function (sortable) { return removeClass(sortable.items, clsPlaceholder, clsItem); }
+ );
+ }
+ );
+ this.touched = null;
+ removeClass(document.documentElement, this.clsDragState);
+
+ },
+
+ insert: function(element, target) {
+ var this$1 = this;
+
+
+ addClass(this.items, this.clsItem);
+
+ var insert = function () { return target
+ ? before(target, element)
+ : append(this$1.target, element); };
+
+ this.animate(insert);
+
+ },
+
+ remove: function(element) {
+
+ if (!within(element, this.target)) {
+ return;
+ }
+
+ this.animate(function () { return remove$1(element); });
+
+ },
+
+ getSortable: function(element) {
+ do {
+ var sortable = this.$getComponent(element, 'sortable');
+
+ if (sortable && (sortable === this || this.group !== false && sortable.group === this.group)) {
+ return sortable;
+ }
+ } while ((element = parent(element)));
+ }
+
+ }
+
+ };
+
+ var trackTimer;
+ function trackScroll(pos) {
+
+ var last = Date.now();
+ trackTimer = setInterval(function () {
+
+ var x = pos.x;
+ var y = pos.y;
+ y += window.pageYOffset;
+
+ var dist = (Date.now() - last) * .3;
+ last = Date.now();
+
+ scrollParents(document.elementFromPoint(x, pos.y)).reverse().some(function (scrollEl) {
+
+ var scroll = scrollEl.scrollTop;
+ var scrollHeight = scrollEl.scrollHeight;
+
+ var ref = offset(getViewport$1(scrollEl));
+ var top = ref.top;
+ var bottom = ref.bottom;
+ var height = ref.height;
+
+ if (top < y && top + 35 > y) {
+ scroll -= dist;
+ } else if (bottom > y && bottom - 35 < y) {
+ scroll += dist;
+ } else {
+ return;
+ }
+
+ if (scroll > 0 && scroll < scrollHeight - height) {
+ scrollTop(scrollEl, scroll);
+ return true;
+ }
+
+ });
+
+ }, 15);
+
+ }
+
+ function untrackScroll() {
+ clearInterval(trackTimer);
+ }
+
+ function appendDrag(container, element) {
+ var clone = append(container, element.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g, '$1div$2'));
+
+ css(clone, 'margin', '0', 'important');
+ css(clone, assign({
+ boxSizing: 'border-box',
+ width: element.offsetWidth,
+ height: element.offsetHeight
+ }, css(element, ['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom'])));
+
+ height(clone.firstElementChild, height(element.firstElementChild));
+
+ return clone;
+ }
+
+ function findTarget(items, point) {
+ return items[findIndex(items, function (item) { return pointInRect(point, item.getBoundingClientRect()); })];
+ }
+
+ function findInsertTarget(list, target, placeholder, x, y, sameList) {
+
+ if (!children(list).length) {
+ return;
+ }
+
+ var rect = target.getBoundingClientRect();
+ if (!sameList) {
+
+ if (!isHorizontal(list, placeholder)) {
+ return y < rect.top + rect.height / 2
+ ? target
+ : target.nextElementSibling;
+ }
+
+ return target;
+ }
+
+ var placeholderRect = placeholder.getBoundingClientRect();
+ var sameRow = linesIntersect(
+ [rect.top, rect.bottom],
+ [placeholderRect.top, placeholderRect.bottom]
+ );
+
+ var pointerPos = sameRow ? x : y;
+ var lengthProp = sameRow ? 'width' : 'height';
+ var startProp = sameRow ? 'left' : 'top';
+ var endProp = sameRow ? 'right' : 'bottom';
+
+ var diff = placeholderRect[lengthProp] < rect[lengthProp] ? rect[lengthProp] - placeholderRect[lengthProp] : 0;
+
+ if (placeholderRect[startProp] < rect[startProp]) {
+
+ if (diff && pointerPos < rect[startProp] + diff) {
+ return false;
+ }
+
+ return target.nextElementSibling;
+ }
+
+ if (diff && pointerPos > rect[endProp] - diff) {
+ return false;
+ }
+
+ return target;
+ }
+
+ function isHorizontal(list, placeholder) {
+
+ var single = children(list).length === 1;
+
+ if (single) {
+ append(list, placeholder);
+ }
+
+ var items = children(list);
+ var isHorizontal = items.some(function (el, i) {
+ var rectA = el.getBoundingClientRect();
+ return items.slice(i + 1).some(function (el) {
+ var rectB = el.getBoundingClientRect();
+ return !linesIntersect([rectA.left, rectA.right], [rectB.left, rectB.right]);
+ });
+ });
+
+ if (single) {
+ remove$1(placeholder);
+ }
+
+ return isHorizontal;
+ }
+
+ function linesIntersect(lineA, lineB) {
+ return lineA[1] > lineB[0] && lineB[1] > lineA[0];
+ }
+
+ var obj;
+
+ var tooltip = {
+
+ mixins: [Container, Togglable, Position],
+
+ args: 'title',
+
+ props: {
+ delay: Number,
+ title: String
+ },
+
+ data: {
+ pos: 'top',
+ title: '',
+ delay: 0,
+ animation: ['uk-animation-scale-up'],
+ duration: 100,
+ cls: 'uk-active',
+ clsPos: 'uk-tooltip'
+ },
+
+ beforeConnect: function() {
+ this._hasTitle = hasAttr(this.$el, 'title');
+ attr(this.$el, 'title', '');
+ this.updateAria(false);
+ makeFocusable(this.$el);
+ },
+
+ disconnected: function() {
+ this.hide();
+ attr(this.$el, 'title', this._hasTitle ? this.title : null);
+ },
+
+ methods: {
+
+ show: function() {
+ var this$1 = this;
+
+
+ if (this.isToggled(this.tooltip || null) || !this.title) {
+ return;
+ }
+
+ this._unbind = once(document, ("show keydown " + pointerDown), this.hide, false, function (e) { return e.type === pointerDown && !within(e.target, this$1.$el)
+ || e.type === 'keydown' && e.keyCode === 27
+ || e.type === 'show' && e.detail[0] !== this$1 && e.detail[0].$name === this$1.$name; }
+ );
+
+ clearTimeout(this.showTimer);
+ this.showTimer = setTimeout(this._show, this.delay);
+ },
+
+ hide: function() {
+ var this$1 = this;
+
+
+ if (matches(this.$el, 'input:focus')) {
+ return;
+ }
+
+ clearTimeout(this.showTimer);
+
+ if (!this.isToggled(this.tooltip || null)) {
+ return;
+ }
+
+ this.toggleElement(this.tooltip, false, false).then(function () {
+ this$1.tooltip = remove$1(this$1.tooltip);
+ this$1._unbind();
+ });
+ },
+
+ _show: function() {
+ var this$1 = this;
+
+
+ this.tooltip = append(this.container,
+ ("")
+ );
+
+ on(this.tooltip, 'toggled', function (e, toggled) {
+
+ this$1.updateAria(toggled);
+
+ if (!toggled) {
+ return;
+ }
+
+ this$1.positionAt(this$1.tooltip, this$1.$el);
+
+ this$1.origin = this$1.getAxis() === 'y'
+ ? ((flipPosition(this$1.dir)) + "-" + (this$1.align))
+ : ((this$1.align) + "-" + (flipPosition(this$1.dir)));
+ });
+
+ this.toggleElement(this.tooltip, true);
+
+ },
+
+ updateAria: function(toggled) {
+ attr(this.$el, 'aria-expanded', toggled);
+ }
+
+ },
+
+ events: ( obj = {
+
+ focus: 'show',
+ blur: 'hide'
+
+ }, obj[(pointerEnter + " " + pointerLeave)] = function (e) {
+ if (!isTouch(e)) {
+ this[e.type === pointerEnter ? 'show' : 'hide']();
+ }
+ }, obj[pointerDown] = function (e) {
+ if (isTouch(e)) {
+ this.show();
+ }
+ }, obj )
+
+ };
+
+ function makeFocusable(el) {
+ if (!isFocusable(el)) {
+ attr(el, 'tabindex', '0');
+ }
+ }
+
+ var upload = {
+
+ props: {
+ allow: String,
+ clsDragover: String,
+ concurrent: Number,
+ maxSize: Number,
+ method: String,
+ mime: String,
+ msgInvalidMime: String,
+ msgInvalidName: String,
+ msgInvalidSize: String,
+ multiple: Boolean,
+ name: String,
+ params: Object,
+ type: String,
+ url: String
+ },
+
+ data: {
+ allow: false,
+ clsDragover: 'uk-dragover',
+ concurrent: 1,
+ maxSize: 0,
+ method: 'POST',
+ mime: false,
+ msgInvalidMime: 'Invalid File Type: %s',
+ msgInvalidName: 'Invalid File Name: %s',
+ msgInvalidSize: 'Invalid File Size: %s Kilobytes Max',
+ multiple: false,
+ name: 'files[]',
+ params: {},
+ type: '',
+ url: '',
+ abort: noop,
+ beforeAll: noop,
+ beforeSend: noop,
+ complete: noop,
+ completeAll: noop,
+ error: noop,
+ fail: noop,
+ load: noop,
+ loadEnd: noop,
+ loadStart: noop,
+ progress: noop
+ },
+
+ events: {
+
+ change: function(e) {
+
+ if (!matches(e.target, 'input[type="file"]')) {
+ return;
+ }
+
+ e.preventDefault();
+
+ if (e.target.files) {
+ this.upload(e.target.files);
+ }
+
+ e.target.value = '';
+ },
+
+ drop: function(e) {
+ stop(e);
+
+ var transfer = e.dataTransfer;
+
+ if (!transfer || !transfer.files) {
+ return;
+ }
+
+ removeClass(this.$el, this.clsDragover);
+
+ this.upload(transfer.files);
+ },
+
+ dragenter: function(e) {
+ stop(e);
+ },
+
+ dragover: function(e) {
+ stop(e);
+ addClass(this.$el, this.clsDragover);
+ },
+
+ dragleave: function(e) {
+ stop(e);
+ removeClass(this.$el, this.clsDragover);
+ }
+
+ },
+
+ methods: {
+
+ upload: function(files) {
+ var this$1 = this;
+
+
+ if (!files.length) {
+ return;
+ }
+
+ trigger(this.$el, 'upload', [files]);
+
+ for (var i = 0; i < files.length; i++) {
+
+ if (this.maxSize && this.maxSize * 1000 < files[i].size) {
+ this.fail(this.msgInvalidSize.replace('%s', this.maxSize));
+ return;
+ }
+
+ if (this.allow && !match(this.allow, files[i].name)) {
+ this.fail(this.msgInvalidName.replace('%s', this.allow));
+ return;
+ }
+
+ if (this.mime && !match(this.mime, files[i].type)) {
+ this.fail(this.msgInvalidMime.replace('%s', this.mime));
+ return;
+ }
+
+ }
+
+ if (!this.multiple) {
+ files = [files[0]];
+ }
+
+ this.beforeAll(this, files);
+
+ var chunks = chunk(files, this.concurrent);
+ var upload = function (files) {
+
+ var data = new FormData();
+
+ files.forEach(function (file) { return data.append(this$1.name, file); });
+
+ for (var key in this$1.params) {
+ data.append(key, this$1.params[key]);
+ }
+
+ ajax(this$1.url, {
+ data: data,
+ method: this$1.method,
+ responseType: this$1.type,
+ beforeSend: function (env) {
+
+ var xhr = env.xhr;
+ xhr.upload && on(xhr.upload, 'progress', this$1.progress);
+ ['loadStart', 'load', 'loadEnd', 'abort'].forEach(function (type) { return on(xhr, type.toLowerCase(), this$1[type]); }
+ );
+
+ return this$1.beforeSend(env);
+
+ }
+ }).then(
+ function (xhr) {
+
+ this$1.complete(xhr);
+
+ if (chunks.length) {
+ upload(chunks.shift());
+ } else {
+ this$1.completeAll(xhr);
+ }
+
+ },
+ function (e) { return this$1.error(e); }
+ );
+
+ };
+
+ upload(chunks.shift());
+
+ }
+
+ }
+
+ };
+
+ function match(pattern, path) {
+ return path.match(new RegExp(("^" + (pattern.replace(/\//g, '\\/').replace(/\*\*/g, '(\\/[^\\/]+)*').replace(/\*/g, '[^\\/]+').replace(/((?!\\))\?/g, '$1.')) + "$"), 'i'));
+ }
+
+ function chunk(files, size) {
+ var chunks = [];
+ for (var i = 0; i < files.length; i += size) {
+ var chunk = [];
+ for (var j = 0; j < size; j++) {
+ chunk.push(files[i + j]);
+ }
+ chunks.push(chunk);
+ }
+ return chunks;
+ }
+
+ function stop(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ var components = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ Countdown: countdown,
+ Filter: filter,
+ Lightbox: lightbox,
+ LightboxPanel: LightboxPanel,
+ Notification: notification,
+ Parallax: parallax,
+ Slider: slider,
+ SliderParallax: sliderParallax,
+ Slideshow: slideshow,
+ SlideshowParallax: sliderParallax,
+ Sortable: sortable,
+ Tooltip: tooltip,
+ Upload: upload
+ });
+
+ each(components, function (component, name) { return UIkit.component(name, component); }
+ );
+
+ return UIkit;
+
+})));
diff --git a/week-04/homework/media/js/uikit.min.js b/week-04/homework/media/js/uikit.min.js
new file mode 100644
index 0000000..58dde2b
--- /dev/null
+++ b/week-04/homework/media/js/uikit.min.js
@@ -0,0 +1,3 @@
+/*! UIkit 3.6.22 | https://www.getuikit.com | (c) 2014 - 2021 YOOtheme | MIT License */
+
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("uikit",e):(t="undefined"!=typeof globalThis?globalThis:t||self).UIkit=e()}(this,function(){"use strict";var t=Object.prototype,n=t.hasOwnProperty;function c(t,e){return n.call(t,e)}var e=/\B([A-Z])/g,d=rt(function(t){return t.replace(e,"-$1").toLowerCase()}),i=/-(\w)/g,f=rt(function(t){return t.replace(i,r)}),p=rt(function(t){return t.length?r(0,t.charAt(0))+t.slice(1):""});function r(t,e){return e?e.toUpperCase():""}var o=String.prototype,s=o.startsWith||function(t){return 0===this.lastIndexOf(t,0)};function g(t,e){return s.call(t,e)}var a=o.endsWith||function(t){return this.substr(-t.length)===t};function u(t,e){return a.call(t,e)}var h=Array.prototype,l=function(t,e){return!!~this.indexOf(t,e)},m=o.includes||l,v=h.includes||l;function w(t,e){return t&&(z(t)?m:v).call(t,e)}var b=h.findIndex||function(t){for(var e=arguments,n=0;n=e.left&&t.y<=e.bottom&&t.y>=e.top}var nt={ratio:function(t,e,n){var i="width"===e?"height":"width",r={};return r[i]=t[e]?Math.round(n*t[i]/t[e]):t[i],r[e]=n,r},contain:function(n,i){var r=this;return G(n=Y({},n),function(t,e){return n=n[e]>i[e]?r.ratio(n,e,i[e]):n}),n},cover:function(n,i){var r=this;return G(n=this.contain(n,i),function(t,e){return n=n[e]")&&(e=e.slice(1)),_(t)?zt.call(t,e):W(t).map(function(t){return Nt(t,e)}).filter(Boolean)}function Bt(t,e){return z(e)?Mt(t,e)||!!Nt(t,e):t===e||(T(e)?e.documentElement:F(e)).contains(F(t))}function Dt(t,e){for(var n=[];t=Tt(t);)e&&!Mt(t,e)||n.push(t);return n}function Ot(t,e){t=(t=F(t))?W(t.children):[];return e?Ct(t,e):t}function Pt(t,e){return e?W(t).indexOf(F(e)):Ot(Tt(t)).indexOf(t)}function Ht(t,e){return F(t)||Ft(t,jt(t,e))}function Lt(t,e){var n=W(t);return n.length&&n||Wt(t,jt(t,e))}function jt(t,e){return void 0===e&&(e=document),z(t)&&Ut(t)||T(e)?e:e.ownerDocument}function Ft(t,e){return F(Vt(t,e,"querySelector"))}function Wt(t,e){return W(Vt(t,e,"querySelectorAll"))}function Vt(t,o,e){if(void 0===o&&(o=document),!t||!z(t))return null;t=t.replace(qt,"$1 *"),Ut(t)&&(t=Xt(t).map(function(t,e){var n,i,r=o;return"!"===t[0]&&(i=t.substr(1).trim().split(" "),r=Nt(Tt(o),i[0]),t=i.slice(1).join(" ").trim()),"-"===t[0]&&(n=t.substr(1).trim().split(" "),r=Mt(i=(r||o).previousElementSibling,t.substr(1))?i:null,t=n.slice(1).join(" ")),r?function(t){var e=[];for(;t.parentNode;){if(t.id){e.unshift("#"+Kt(t.id));break}var n=t.tagName;"HTML"!==n&&(n+=":nth-child("+(Pt(t)+1)+")"),e.unshift(n),t=t.parentNode}return e.join(" > ")}(r)+" "+t:null}).filter(Boolean).join(","),o=document);try{return o[e](t)}catch(t){return null}}var Rt=/(^|[^\\],)\s*[!>+~-]/,qt=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,Ut=rt(function(t){return t.match(Rt)}),Yt=/.*?[^\\](?:,|$)/g,Xt=rt(function(t){return t.match(Yt).map(function(t){return t.replace(/,$/,"").trim()})});var Gt=ct&&window.CSS&&CSS.escape||function(t){return t.replace(/([^\x7f-\uFFFF\w-])/g,function(t){return"\\"+t})};function Kt(t){return z(t)?Gt.call(null,t):""}function Jt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n,i,r=ne(t),o=r[0],s=r[1],a=r[2],u=r[3],c=r[4],o=se(o);return 1]*>/,Ce=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function _e(t){var e=Ce.exec(t);if(e)return document.createElement(e[1]);e=document.createElement("div");return Te.test(t)?e.insertAdjacentHTML("beforeend",t.trim()):e.textContent=t,1qn(t))})).reverse()}function Rn(t){return t===Un(t)?window:t}function qn(t){return(t===Un(t)?document.documentElement:t).clientHeight}function Un(t){t=V(t).document;return t.scrollingElement||t.documentElement}var Yn={width:["x","left","right"],height:["y","top","bottom"]};function Xn(t,e,h,l,d,n,i,r){h=Kn(h),l=Kn(l);var f={element:h,target:l};if(!t||!e)return f;var o,p=sn(t),m=sn(e),g=m;return Gn(g,h,p,-1),Gn(g,l,m,1),d=Jn(d,p.width,p.height),n=Jn(n,m.width,m.height),d.x+=n.x,d.y+=n.y,g.left+=d.x,g.top+=d.y,i&&(o=Vn(t).map(Rn),r&&!w(o,r)&&o.unshift(r),o=o.map(function(t){return sn(t)}),G(Yn,function(t,s){var a=t[0],u=t[1],c=t[2];!0!==i&&!w(i,a)||o.some(function(n){var t=h[a]===u?-p[s]:h[a]===c?p[s]:0,e=l[a]===u?m[s]:l[a]===c?-m[s]:0;if(g[u]n[c]){var i=p[s]/2,r="center"===l[a]?-m[s]/2:0;return"center"===h[a]&&(o(i,r)||o(-i,-r))||o(t,e)}function o(e,t){t=L((g[u]+e+t-2*d[a]).toFixed(4));if(t>=n[u]&&t+p[s]<=n[c])return g[u]=t,["element","target"].forEach(function(t){f[t][a]=e?f[t][a]===Yn[s][1]?Yn[s][2]:Yn[s][1]:f[t][a]}),!0}})})),sn(t,g),f}function Gn(r,o,s,a){G(Yn,function(t,e){var n=t[0],i=t[1],t=t[2];o[n]===t?r[i]+=s[e]*a:"center"===o[n]&&(r[i]+=s[e]*a/2)})}function Kn(t){var e=/left|center|right/,n=/top|center|bottom/;return 1===(t=(t||"").split(" ")).length&&(t=e.test(t[0])?t.concat("center"):n.test(t[0])?["center"].concat(t):["center","center"]),{x:e.test(t[0])?t[0]:"center",y:n.test(t[1])?t[1]:"center"}}function Jn(t,e,n){var i=(t||"").split(" "),t=i[0],i=i[1];return{x:t?L(t)*(u(t,"%")?e/100:1):0,y:i?L(i)*(u(i,"%")?n/100:1):0}}var Zn=Object.freeze({__proto__:null,ajax:me,getImage:ge,transition:Je,Transition:Ze,animate:tn,Animation:nn,attr:ot,hasAttr:st,removeAttr:at,data:ut,addClass:Be,removeClass:De,removeClasses:Oe,replaceClass:Pe,hasClass:He,toggleClass:Le,dimensions:on,offset:sn,position:an,offsetPosition:un,height:cn,width:hn,boxModelAdjust:dn,flipPosition:fn,toPx:pn,ready:function(t){var e;"loading"===document.readyState?e=Jt(document,"DOMContentLoaded",function(){e(),t()}):t()},empty:ve,html:we,prepend:function(e,t){return(e=Me(e)).hasChildNodes()?ke(t,function(t){return e.insertBefore(t,e.firstChild)}):be(e,t)},append:be,before:xe,after:ye,remove:$e,wrapAll:Se,wrapInner:Ie,unwrap:Ee,fragment:_e,apply:Ae,$:Me,$$:ze,inBrowser:ct,isIE:ht,isRtl:lt,hasTouch:pt,pointerDown:mt,pointerMove:gt,pointerUp:vt,pointerEnter:wt,pointerLeave:bt,pointerCancel:xt,on:Jt,off:Zt,once:Qt,trigger:te,createEvent:ee,toEventTargets:se,isTouch:ae,getEventPos:ue,fastdom:gn,isVoidElement:kt,isVisible:$t,selInput:St,isInput:It,isFocusable:Et,parent:Tt,filter:Ct,matches:Mt,closest:Nt,within:Bt,parents:Dt,children:Ot,index:Pt,hasOwn:c,hyphenate:d,camelize:f,ucfirst:p,startsWith:g,endsWith:u,includes:w,findIndex:x,isArray:y,isFunction:k,isObject:$,isPlainObject:I,isWindow:E,isDocument:T,isNode:C,isElement:_,isBoolean:M,isString:z,isNumber:N,isNumeric:B,isEmpty:D,isUndefined:O,toBoolean:P,toNumber:H,toFloat:L,toArray:j,toNode:F,toNodes:W,toWindow:V,toMs:R,isEqual:q,swap:U,assign:Y,last:X,each:G,sortBy:K,uniqueBy:J,clamp:Z,noop:Q,intersectRect:tt,pointInRect:et,Dimensions:nt,getIndex:it,memoize:rt,MouseTracker:kn,mergeOptions:En,parseOptions:Tn,play:Cn,pause:_n,mute:An,positionAt:Xn,Promise:he,Deferred:ce,query:Ht,queryAll:Lt,find:Ft,findAll:Wt,escape:Kt,css:Re,getCssVar:Xe,propName:Ge,isInView:Ln,scrollTop:jn,scrollIntoView:Fn,scrolledOver:Wn,scrollParents:Vn,getViewport:Rn,getViewportClientHeight:qn});function Qn(t){this._init(t)}var ti,ei,ni,ii,ri,oi,si,ai,ui,ci=rt(function(t){return!(!g(t,"uk-")&&!g(t,"data-uk-"))&&f(t.replace("data-uk-","").replace("uk-",""))});function hi(t,e){if(t)for(var n in t)t[n]._connected&&t[n]._callUpdate(e)}function li(t,e){var n={},i=t.args;void 0===i&&(i=[]);var r,o=t.props,s=t.el;if(!(o=void 0===o?{}:o))return n;for(r in o){var a=d(r),u=ut(s,a);O(u)||(u=o[r]===Boolean&&""===u||fi(o[r],u),("target"!==a||u&&!g(u,"_"))&&(n[r]=u))}var c,h=Tn(ut(s,e),i);for(c in h){var l=f(c);void 0!==o[l]&&(n[l]=fi(o[l],h[c]))}return n}function di(e,n,i){var t=(n=!I(n)?{name:i,handler:n}:n).name,r=n.el,o=n.handler,s=n.capture,a=n.passive,u=n.delegate,c=n.filter,h=n.self,r=k(r)?r.call(e):r||e.$el;y(r)?r.forEach(function(t){return di(e,Y({},n,{el:t}),i)}):!r||c&&!c.call(e)||e._events.push(Jt(r,t,u?z(u)?u:u.call(e):null,z(o)?e[o]:o.bind(e),{passive:a,capture:s,self:h}))}function fi(t,e){return t===Boolean?P(e):t===Number?H(e):"list"===t?y(n=e)?n:z(n)?n.split(/,(?![^(]*\))/).map(function(t){return B(t)?H(t):P(t.trim())}):[n]:t?t(e):e;var n}Qn.util=Zn,Qn.data="__uikit__",Qn.prefix="uk-",Qn.options={},Qn.version="3.6.22",ni=(ti=Qn).data,ti.use=function(t){if(!t.installed)return t.call(null,this),t.installed=!0,this},ti.mixin=function(t,e){(e=(z(e)?ti.component(e):e)||this).options=En(e.options,t)},ti.extend=function(t){t=t||{};function e(t){this._init(t)}return((e.prototype=Object.create(this.prototype)).constructor=e).options=En(this.options,t),e.super=this,e.extend=this.extend,e},ti.update=function(t,e){Dt(t=t?F(t):document.body).reverse().forEach(function(t){return hi(t[ni],e)}),Ae(t,function(t){return hi(t[ni],e)})},Object.defineProperty(ti,"container",{get:function(){return ei||document.body},set:function(t){ei=Me(t)}}),(ii=Qn).prototype._callHook=function(t){var e=this,t=this.$options[t];t&&t.forEach(function(t){return t.call(e)})},ii.prototype._callConnected=function(){this._connected||(this._data={},this._computeds={},this._initProps(),this._callHook("beforeConnect"),this._connected=!0,this._initEvents(),this._initObservers(),this._callHook("connected"),this._callUpdate())},ii.prototype._callDisconnected=function(){this._connected&&(this._callHook("beforeDisconnect"),this._disconnectObservers(),this._unbindEvents(),this._callHook("disconnected"),this._connected=!1,delete this._watch)},ii.prototype._callUpdate=function(t){var e=this;void 0===t&&(t="update"),this._connected&&("update"!==t&&"resize"!==t||this._callWatches(),this.$options.update&&(this._updates||(this._updates=new Set,gn.read(function(){!function(i){for(var r=this,o=this.$options.update,t=0;t *",active:!1,animation:[!0],collapsible:!0,multiple:!1,clsOpen:"uk-open",toggle:"> .uk-accordion-title",content:"> .uk-accordion-content",transition:"ease",offset:0},computed:{items:{get:function(t,e){return ze(t.targets,e)},watch:function(t,e){var n=this;t.forEach(function(t){return wi(Me(n.content,t),!He(t,n.clsOpen))}),e||He(t,this.clsOpen)||(t=!1!==this.active&&t[Number(this.active)]||!this.collapsible&&t[0])&&this.toggle(t,!1)},immediate:!0},toggles:function(t){var e=t.toggle;return this.items.map(function(t){return Me(e,t)})}},events:[{name:"click",delegate:function(){return this.targets+" "+this.$props.toggle},handler:function(t){t.preventDefault(),this.toggle(Pt(this.toggles,t.current))}}],methods:{toggle:function(t,r){var o=this,e=[this.items[it(t,this.items)]],t=Ct(this.items,"."+this.clsOpen);this.multiple||w(t,e[0])||(e=e.concat(t)),!this.collapsible&&t.length<2&&!Ct(e,":not(."+this.clsOpen+")").length||e.forEach(function(t){return o.toggleElement(t,!He(t,o.clsOpen),function(e,n){Le(e,o.clsOpen,n),ot(Me(o.$props.toggle,e),"aria-expanded",n);var i=Me((e._wrapper?"> * ":"")+o.content,e);if(!1!==r&&o.hasTransition)return e._wrapper||(e._wrapper=Se(i,"")),wi(i,!1),gi(o)(e._wrapper,n).then(function(){var t;wi(i,!n),delete e._wrapper,Ee(i),n&&(Ln(t=Me(o.$props.toggle,e))||Fn(t,{offset:o.offset}))});wi(i,!n)})})}}};function wi(t,e){t&&(t.hidden=e)}var bi={mixins:[pi,mi],args:"animation",props:{close:String},data:{animation:[!0],selClose:".uk-alert-close",duration:150,hideProps:Y({opacity:0},mi.data.hideProps)},events:[{name:"click",delegate:function(){return this.selClose},handler:function(t){t.preventDefault(),this.close()}}],methods:{close:function(){var t=this;this.toggleElement(this.$el).then(function(){return t.$destroy(!0)})}}},xi={args:"autoplay",props:{automute:Boolean,autoplay:Boolean},data:{automute:!1,autoplay:!0},computed:{inView:function(t){return"inview"===t.autoplay}},connected:function(){this.inView&&!st(this.$el,"preload")&&(this.$el.preload="none"),this.automute&&An(this.$el)},update:{read:function(){return{visible:$t(this.$el)&&"hidden"!==Re(this.$el,"visibility"),inView:this.inView&&Ln(this.$el)}},write:function(t){var e=t.visible,t=t.inView;!e||this.inView&&!t?_n(this.$el):(!0===this.autoplay||this.inView&&t)&&Cn(this.$el)},events:["resize","scroll"]}},yi={mixins:[pi,xi],props:{width:Number,height:Number},data:{automute:!0},update:{read:function(){var t=this.$el,e=function(t){for(;t=Tt(t);)if("static"!==Re(t,"position"))return t}(t)||Tt(t),n=e.offsetHeight,e=e.offsetWidth,n=nt.cover({width:this.width||t.naturalWidth||t.videoWidth||t.clientWidth,height:this.height||t.naturalHeight||t.videoHeight||t.clientHeight},{width:e+(e%2?1:0),height:n+(n%2?1:0)});return!(!n.width||!n.height)&&n},write:function(t){var e=t.height,t=t.width;Re(this.$el,{height:e,width:t})},events:["resize"]}};var ki,$i={props:{pos:String,offset:null,flip:Boolean,clsPos:String},data:{pos:"bottom-"+(lt?"right":"left"),flip:!0,offset:!1,clsPos:""},computed:{pos:function(t){t=t.pos;return(t+(w(t,"-")?"":"-center")).split("-")},dir:function(){return this.pos[0]},align:function(){return this.pos[1]}},methods:{positionAt:function(t,e,n){Oe(t,this.clsPos+"-(top|bottom|left|right)(-[a-z]+)?");var i,r=this.offset,o=this.getAxis();B(r)||(r=(i=Me(r))?sn(i)["x"===o?"left":"top"]-sn(e)["x"===o?"right":"bottom"]:0);r=Xn(t,e,"x"===o?fn(this.dir)+" "+this.align:this.align+" "+fn(this.dir),"x"===o?this.dir+" "+this.align:this.align+" "+this.dir,"x"===o?""+("left"===this.dir?-r:r):" "+("top"===this.dir?-r:r),null,this.flip,n).target,n=r.x,r=r.y;this.dir="x"===o?n:r,this.align="x"===o?r:n,Le(t,this.clsPos+"-"+this.dir+"-"+this.align,!1===this.offset)},getAxis:function(){return"top"===this.dir||"bottom"===this.dir?"y":"x"}}},Si={mixins:[$i,mi],args:"pos",props:{mode:"list",toggle:Boolean,boundary:Boolean,boundaryAlign:Boolean,delayShow:Number,delayHide:Number,clsDrop:String},data:{mode:["click","hover"],toggle:"- *",boundary:!0,boundaryAlign:!1,delayShow:0,delayHide:800,clsDrop:!1,animation:["uk-animation-fade"],cls:"uk-open"},computed:{boundary:function(t,e){t=t.boundary;return!0===t?window:Ht(t,e)},clsDrop:function(t){return t.clsDrop||"uk-"+this.$options.name},clsPos:function(){return this.clsDrop}},created:function(){this.tracker=new kn},connected:function(){Be(this.$el,this.clsDrop);var t=this.$props.toggle;this.toggle=t&&this.$create("toggle",Ht(t,this.$el),{target:this.$el,mode:this.mode})},disconnected:function(){this.isActive()&&(ki=null)},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){var e=t.defaultPrevented,t=t.current.hash;e||!t||Bt(t,this.$el)||this.hide(!1)}},{name:"beforescroll",handler:function(){this.hide(!1)}},{name:"toggle",self:!0,handler:function(t,e){t.preventDefault(),this.isToggled()?this.hide(!1):this.show(e,!1)}},{name:"toggleshow",self:!0,handler:function(t,e){t.preventDefault(),this.show(e)}},{name:"togglehide",self:!0,handler:function(t){t.preventDefault(),this.hide()}},{name:wt+" focusin",filter:function(){return w(this.mode,"hover")},handler:function(t){ae(t)||this.clearTimers()}},{name:bt+" focusout",filter:function(){return w(this.mode,"hover")},handler:function(t){!ae(t)&&t.relatedTarget&&this.hide()}},{name:"toggled",self:!0,handler:function(t,e){e&&(this.clearTimers(),this.position())}},{name:"show",self:!0,handler:function(){var r=this;(ki=this).tracker.init(),Qt(this.$el,"hide",Jt(document,mt,function(t){var i=t.target;return!Bt(i,r.$el)&&Qt(document,vt+" "+xt+" scroll",function(t){var e=t.defaultPrevented,n=t.type,t=t.target;e||n!==vt||i!==t||r.toggle&&Bt(i,r.toggle.$el)||r.hide(!1)},!0)}),{self:!0}),Qt(this.$el,"hide",Jt(document,"keydown",function(t){27===t.keyCode&&r.hide(!1)}),{self:!0})}},{name:"beforehide",self:!0,handler:function(){this.clearTimers()}},{name:"hide",handler:function(t){t=t.target;this.$el===t?(ki=this.isActive()?null:ki,this.tracker.cancel()):ki=null===ki&&Bt(t,this.$el)&&this.isToggled()?this:ki}}],update:{write:function(){this.isToggled()&&!He(this.$el,this.clsEnter)&&this.position()},events:["resize"]},methods:{show:function(t,e){var n,i=this;if(void 0===t&&(t=this.toggle),void 0===e&&(e=!0),this.isToggled()&&t&&this.toggle&&t.$el!==this.toggle.$el&&this.hide(!1),this.toggle=t,this.clearTimers(),!this.isActive()){if(ki){if(e&&ki.isDelaying)return void(this.showTimer=setTimeout(this.show,10));for(;ki&&n!==ki&&!Bt(this.$el,ki.$el);)(n=ki).hide(!1)}this.showTimer=setTimeout(function(){return!i.isToggled()&&i.toggleElement(i.$el,!0)},e&&this.delayShow||0)}},hide:function(t){var e=this;void 0===t&&(t=!0);function n(){return e.toggleElement(e.$el,!1,!1)}var i,r;this.clearTimers(),this.isDelaying=(i=this.$el,r=[],Ae(i,function(t){return"static"!==Re(t,"position")&&r.push(t)}),r.some(function(t){return e.tracker.movesTo(t)})),t&&this.isDelaying?this.hideTimer=setTimeout(this.hide,50):t&&this.delayHide?this.hideTimer=setTimeout(n,this.delayHide):n()},clearTimers:function(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null,this.isDelaying=!1},isActive:function(){return ki===this},position:function(){De(this.$el,this.clsDrop+"-stack"),Le(this.$el,this.clsDrop+"-boundary",this.boundaryAlign);var t,e=sn(this.boundary),n=this.boundaryAlign?e:sn(this.toggle.$el);"justify"===this.align?(t="y"===this.getAxis()?"width":"height",Re(this.$el,t,n[t])):this.boundary&&this.$el.offsetWidth>Math.max(e.right-n.left,n.right-e.left)&&Be(this.$el,this.clsDrop+"-stack"),this.positionAt(this.$el,this.boundaryAlign?this.boundary:this.toggle.$el,this.boundary)}}};var Ii={mixins:[pi],args:"target",props:{target:Boolean},data:{target:!1},computed:{input:function(t,e){return Me(St,e)},state:function(){return this.input.nextElementSibling},target:function(t,e){t=t.target;return t&&(!0===t&&Tt(this.input)===e&&this.input.nextElementSibling||Ht(t,e))}},update:function(){var t,e,n=this.target,i=this.input;!n||n[e=It(n)?"value":"textContent"]!==(i=i.files&&i.files[0]?i.files[0].name:Mt(i,"select")&&(t=ze("option",i).filter(function(t){return t.selected})[0])?t.textContent:i.value)&&(n[e]=i)},events:[{name:"change",handler:function(){this.$update()}},{name:"reset",el:function(){return Nt(this.$el,"form")},handler:function(){this.$update()}}]},Ei={update:{read:function(t){var e=Ln(this.$el);if(!e||t.isInView===e)return!1;t.isInView=e},write:function(){this.$el.src=""+this.$el.src},events:["scroll","resize"]}},Ti={props:{margin:String,firstColumn:Boolean},data:{margin:"uk-margin-small-top",firstColumn:"uk-first-column"},update:{read:function(){var t=Ci(this.$el.children);return{rows:t,columns:function(t){for(var e=[],n=0;n
=c[n]-1&&s[e]!==c[e]){i.push([o]);break}if(s[n]-1>c[e]||s[e]===c[e]){u.push(o);break}if(0===a){i.unshift([o]);break}}}return i}function Ai(t,e){var n=t.offsetTop,i=t.offsetLeft,r=t.offsetHeight,o=t.offsetWidth;return(e=void 0===e?!1:e)&&(n=(t=un(t))[0],i=t[1]),{top:n,left:i,bottom:n+r,right:i+o}}var Mi={extends:Ti,mixins:[pi],name:"grid",props:{masonry:Boolean,parallax:Number},data:{margin:"uk-grid-margin",clsStack:"uk-grid-stack",masonry:!1,parallax:0},connected:function(){this.masonry&&Be(this.$el,"uk-flex-top uk-flex-wrap-top")},update:[{write:function(t){t=t.columns;Le(this.$el,this.clsStack,t.length<2)},events:["resize"]},{read:function(t){var e=t.columns,n=t.rows;if(!e.length||!this.masonry&&!this.parallax||zi(this.$el))return t.translates=!1;var i,r,o=!1,s=Ot(this.$el),a=e.map(function(t){return t.reduce(function(t,e){return t+e.offsetHeight},0)}),u=(t=s,i=this.margin,L((s=t.filter(function(t){return He(t,i)})[0])?Re(s,"marginTop"):Re(t[0],"paddingLeft"))*(n.length-1)),c=Math.max.apply(Math,a)+u;this.masonry&&(e=e.map(function(t){return K(t,"offsetTop")}),t=e,r=n.map(function(t){return Math.max.apply(Math,t.map(function(t){return t.offsetHeight}))}),o=t.map(function(n){var i=0;return n.map(function(t,e){return i+=e?r[e-1]-n[e-1].offsetHeight:0})}));var h=Math.abs(this.parallax);return{padding:h=h&&a.reduce(function(t,e,n){return Math.max(t,e+u+(n%2?h:h/8)-c)},0),columns:e,translates:o,height:o?c:""}},write:function(t){var e=t.height,t=t.padding;Re(this.$el,"paddingBottom",t||""),!1!==e&&Re(this.$el,"height",e)},events:["resize"]},{read:function(t){t=t.height;return!zi(this.$el)&&{scrolled:!!this.parallax&&Wn(this.$el,t?t-cn(this.$el):0)*Math.abs(this.parallax)}},write:function(t){var e=t.columns,i=t.scrolled,r=t.translates;!1===i&&!r||e.forEach(function(t,n){return t.forEach(function(t,e){return Re(t,"transform",i||r?"translateY("+((r&&-r[n][e])+(i?n%2?i:i/8:0))+"px)":"")})})},events:["scroll","resize"]}]};function zi(t){return Ot(t).some(function(t){return"absolute"===Re(t,"position")})}var Ni=ht?{props:{selMinHeight:String},data:{selMinHeight:!1,forceHeight:!1},computed:{elements:function(t,e){t=t.selMinHeight;return t?ze(t,e):[e]}},update:[{read:function(){Re(this.elements,"height","")},order:-5,events:["resize"]},{write:function(){var n=this;this.elements.forEach(function(t){var e=L(Re(t,"minHeight"));e&&(n.forceHeight||Math.round(e+dn(t,"height","content-box"))>=t.offsetHeight)&&Re(t,"height",e)})},order:5,events:["resize"]}]}:{},Bi={mixins:[Ni],args:"target",props:{target:String,row:Boolean},data:{target:"> *",row:!0,forceHeight:!0},computed:{elements:function(t,e){return ze(t.target,e)}},update:{read:function(){return{rows:(this.row?Ci(this.elements):[this.elements]).map(Di)}},write:function(t){t.rows.forEach(function(t){var n=t.heights;return t.elements.forEach(function(t,e){return Re(t,"minHeight",n[e])})})},events:["resize"]}};function Di(t){if(t.length<2)return{heights:[""],elements:t};var n=t.map(Oi),i=Math.max.apply(Math,n),e=t.some(function(t){return t.style.minHeight}),r=t.some(function(t,e){return!t.style.minHeight&&n[e]"}return Fi[t][e]}(t,e)||t);return(t=Me(t.substr(t.indexOf(" ",e);return n.show(),Jt(n.$el,"hidden",function(){return he.resolve().then(function(){return n.$destroy(!0)})},{self:!0}),n},a.alert=function(e,t){return i(function(t){t=t.labels;return''+(z(e)?e:we(e))+'
"},t,function(t){return t.resolve()})},a.confirm=function(e,t){return i(function(t){t=t.labels;return'"},t,function(t){return t.reject()})},a.prompt=function(e,n,t){return i(function(t){t=t.labels;return'"},t,function(t){return t.resolve(null)},function(t){return Me("input",t.$el).value})},a.labels={ok:"Ok",cancel:"Cancel"}},mixins:[mr],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:!0,handler:function(){He(this.panel,"uk-margin-auto-vertical")?Be(this.$el,"uk-flex"):Re(this.$el,"display","block"),cn(this.$el)}},{name:"hidden",self:!0,handler:function(){Re(this.$el,"display",""),De(this.$el,"uk-flex")}}]},Nav:{extends:vi,data:{targets:"> .uk-parent",toggle:"> a",content:"> ul"}},Navbar:o,Offcanvas:l,OverflowAuto:t,Responsive:{props:["width","height"],connected:function(){Be(this.$el,"uk-responsive-width")},update:{read:function(){return!!($t(this.$el)&&this.width&&this.height)&&{width:hn(Tt(this.$el)),height:this.height}},write:function(t){cn(this.$el,nt.contain({height:this.height,width:this.width},t).height)},events:["resize"]}},Scroll:dt,Scrollspy:ft,ScrollspyNav:_t,Sticky:pe,Svg:Hi,Switcher:Zn,Tab:hr,Toggle:Ni,Video:xi,Close:Ji,Spinner:Zi,SlidenavNext:Gi,SlidenavPrevious:Gi,SearchIcon:Ki,Marker:Xi,NavbarToggleIcon:Xi,OverlayIcon:Xi,PaginationNext:Xi,PaginationPrevious:Xi,Totop:Xi}),function(t,e){return Qn.component(e,t)}),Qn.use(function(e){var t,n,i,r;ct&&(n=function(){t||(t=!0,gn.write(function(){return t=!1}),e.update(null,"resize"))},Jt(window,"load resize",n),Jt(document,"loadedmetadata load",n,!0),"ResizeObserver"in window&&new ResizeObserver(n).observe(document.documentElement),Jt(window,"scroll",function(t){i||(i=!0,gn.write(function(){return i=!1}),e.update(null,t.type))},{passive:!0,capture:!0}),r=0,Jt(document,"animationstart",function(t){t=t.target;(Re(t,"animationName")||"").match(/^uk-.*(left|right)/)&&(r++,Re(document.documentElement,"overflowX","hidden"),setTimeout(function(){--r||Re(document.documentElement,"overflowX","")},R(Re(t,"animationDuration"))+100))},!0),Jt(document,mt,function(t){var s,a;ae(t)&&(s=ue(t),a="tagName"in t.target?t.target:Tt(t.target),Qt(document,vt+" "+xt+" scroll",function(t){var e=ue(t),r=e.x,o=e.y;("scroll"!==t.type&&a&&r&&100=Math.abs(e-i)?0"}).join("")),e.forEach(function(t,e){return n.children[e].textContent=t}))})}},methods:{start:function(){this.stop(),this.date&&this.units.length&&(this.$update(),this.timer=setInterval(this.$update,1e3))},stop:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}}};var Er="uk-transition-leave",Tr="uk-transition-enter";function Cr(t,s,a,u){void 0===u&&(u=0);var c=_r(s,!0),h={opacity:1},l={opacity:0},e=function(t){return function(){return c===_r(s)?t():he.reject()}},n=e(function(){return Be(s,Er),he.all(Mr(s).map(function(e,n){return new he(function(t){return setTimeout(function(){return Ze.start(e,l,a/2,"ease").then(t)},n*u)})})).then(function(){return De(s,Er)})}),e=e(function(){var o=cn(s);return Be(s,Tr),t(),Re(Ot(s),{opacity:0}),new he(function(r){return requestAnimationFrame(function(){var t=Ot(s),e=cn(s);Re(s,"alignContent","flex-start"),cn(s,o);var n=Mr(s);Re(t,l);var i=n.map(function(e,n){return new he(function(t){return setTimeout(function(){return Ze.start(e,h,a/2,"ease").then(t)},n*u)})});o!==e&&i.push(Ze.start(s,{height:e},a/2+n.length*u,"ease")),he.all(i).then(function(){De(s,Tr),c===_r(s)&&(Re(s,{height:"",alignContent:""}),Re(t,{opacity:""}),delete s.dataset.transition),r()})})})});return(He(s,Er)?Ar(s):He(s,Tr)?Ar(s).then(n):n()).then(e)}function _r(t,e){return e&&(t.dataset.transition=1+_r(t)),H(t.dataset.transition)||0}function Ar(t){return he.all(Ot(t).filter(Ze.inProgress).map(function(e){return new he(function(t){return Qt(e,"transitionend transitioncanceled",t)})}))}function Mr(t){return Ci(Ot(t)).reduce(function(t,e){return t.concat(K(e.filter(function(t){return Ln(t)}),"offsetLeft"))},[])}function zr(t,d,f){return new he(function(l){return requestAnimationFrame(function(){var u=Ot(d),c=u.map(function(t){return Nr(t,!0)}),h=Re(d,["height","padding"]);Ze.cancel(d),u.forEach(Ze.cancel),Br(d),t(),u=u.concat(Ot(d).filter(function(t){return!w(u,t)})),he.resolve().then(function(){gn.flush();var n,i,r,t,e,o=Re(d,["height","padding"]),e=(n=d,r=c,t=(i=u).map(function(t,e){return!!(Tt(t)&&e in r)&&(r[e]?$t(t)?Dr(t):{opacity:0}:{opacity:$t(t)?1:0})}),e=t.map(function(t,e){e=Tt(i[e])===n&&(r[e]||Nr(i[e]));return!!e&&(t?"opacity"in t||(e.opacity%1?t.opacity=1:delete e.opacity):delete e.opacity,e)}),[t,e]),s=e[0],a=e[1];u.forEach(function(t,e){return a[e]&&Re(t,a[e])}),Re(d,Y({display:"block"},h)),requestAnimationFrame(function(){var t=u.map(function(t,e){return Tt(t)===d&&Ze.start(t,s[e],f,"ease")}).concat(Ze.start(d,o,f,"ease"));he.all(t).then(function(){u.forEach(function(t,e){return Tt(t)===d&&Re(t,"display",0===s[e].opacity?"none":"")}),Br(d)},Q).then(l)})})})})}function Nr(t,e){var n=Re(t,"zIndex");return!!$t(t)&&Y({display:"",opacity:e?Re(t,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:"auto"===n?Pt(t):n},Dr(t))}function Br(t){Re(t.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),Re(t,{height:"",display:"",padding:""})}function Dr(t){var e=sn(t),n=e.height,i=e.width,r=an(t),e=r.top,r=r.left,t=Re(t,["marginTop","marginLeft"]);return{top:e,left:r,height:n,width:i,marginLeft:t.marginLeft,marginTop:t.marginTop,transform:""}}hr={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate:function(t,e){var n=this;void 0===e&&(e=this.$el);var i=this.animation;return("fade"===i?Cr:"delayed-fade"===i?function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Cr.apply(void 0,t.concat([40]))}:i?zr:function(){return t(),he.resolve()})(t,e,this.duration).then(function(){return n.$update(e,"resize")},Q)}}},Ni={mixins:[hr],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get:function(t,e){t=t.attrItem;return ze("["+t+"],[data-"+t+"]",e)},watch:function(){var e,n=this;this.updateState(),!1!==this.selActive&&(e=ze(this.selActive,this.$el),this.toggles.forEach(function(t){return Le(t,n.cls,w(e,t))}))},immediate:!0},children:{get:function(t,e){return ze(t.target+" > *",e)},watch:function(t,e){var n;e&&(n=e,(t=t).length!==n.length||!t.every(function(t){return~n.indexOf(t)}))&&this.updateState()},immediate:!0}},events:[{name:"click",delegate:function(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler:function(t){t.preventDefault(),this.apply(t.current)}}],methods:{apply:function(t){var e,n,i=this.getState(),t=Pr(t,this.attrItem,this.getState());e=i,n=t,["filter","sort"].every(function(t){return q(e[t],n[t])})||this.setState(t)},getState:function(){var n=this;return this.toggles.filter(function(t){return He(t,n.cls)}).reduce(function(t,e){return Pr(e,n.attrItem,t)},{filter:{"":""},sort:[]})},setState:function(n,i){var r=this;void 0===i&&(i=!0),n=Y({filter:{"":""},sort:[]},n),te(this.$el,"beforeFilter",[this,n]),this.toggles.forEach(function(t){return Le(t,r.cls,!!function(t,e,n){var i=n.filter;void 0===i&&(i={"":""});var r=n.sort,o=r[0],s=r[1],n=Or(t,e),r=n.filter;void 0===r&&(r="");t=n.group;void 0===t&&(t="");e=n.sort,n=n.order;void 0===n&&(n="asc");return O(e)?t in i&&r===i[t]||!r&&t&&!(t in i)&&!i[""]:o===e&&s===n}(t,r.attrItem,n))}),he.all(ze(this.target,this.$el).map(function(t){function e(){!function(t,e,n){var i=function(t){var t=t.filter,e="";return G(t,function(t){return e+=t||""}),e}(t);n.forEach(function(t){return Re(t,"display",i&&!Mt(t,i)?"none":"")});var r=t.sort,t=r[0],r=r[1];t&&(q(r=function(t,n,i){return Y([],t).sort(function(t,e){return ut(t,n).localeCompare(ut(e,n),void 0,{numeric:!0})*("asc"===i||-1)})}(n,t,r),n)||be(e,r))}(n,t,Ot(t)),r.$update(r.$el)}return i?r.animate(e,t):e()})).then(function(){return te(r.$el,"afterFilter",[r])})},updateState:function(){var t=this;gn.write(function(){return t.setState(t.getState(),!1)})}}};function Or(t,e){return Tn(ut(t,e),["filter"])}function Pr(t,e,n){var i=Or(t,e),r=i.filter,t=i.group,e=i.sort,i=i.order;return void 0===i&&(i="asc"),(r||O(e))&&(t?r?(delete n.filter[""],n.filter[t]=r):(delete n.filter[t],(D(n.filter)||""in n.filter)&&(n.filter={"":r||""})):n.filter={"":r||""}),O(e)||(n.sort=[e,i]),n}xi={slide:{show:function(t){return[{transform:Lr(-100*t)},{transform:Lr()}]},percent:Hr,translate:function(t,e){return[{transform:Lr(-100*e*t)},{transform:Lr(100*e*(1-t))}]}}};function Hr(t){return Math.abs(Re(t,"transform").split(",")[4]/t.offsetWidth)||0}function Lr(t,e){return void 0===t&&(t=0),void 0===e&&(e="%"),t+=t?e:"",ht?"translateX("+t+")":"translate3d("+t+", 0, 0)"}function jr(t){return"scale3d("+t+", "+t+", 1)"}var Fr=Y({},xi,{fade:{show:function(){return[{opacity:0},{opacity:1}]},percent:function(t){return 1-Re(t,"opacity")},translate:function(t){return[{opacity:1-t},{opacity:t}]}},scale:{show:function(){return[{opacity:0,transform:jr(.8)},{opacity:1,transform:jr(1)}]},percent:function(t){return 1-Re(t,"opacity")},translate:function(t){return[{opacity:1-t,transform:jr(1-.2*t)},{opacity:t,transform:jr(.8+.2*t)}]}}});function Wr(t,e,n){te(t,ee(e,!1,!1,n))}Ji={mixins:[{props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){ot(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var t=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!t.draggable||!Me(":focus",t.$el))&&(!t.pauseOnHover||!Mt(t.$el,":hover"))&&!t.stack.length&&t.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},{props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var i=this;["start","move","end"].forEach(function(t){var n=i[t];i[t]=function(t){var e=ue(t).x*(lt?-1:1);i.prevPos=e!==i.pos?i.pos:i.prevPos,i.pos=e,n(t)}})},events:[{name:mt,delegate:function(){return this.selSlides},handler:function(t){var e;!this.draggable||!ae(t)&&(!(e=t.target).children.length&&e.childNodes.length)||Nt(t.target,St)||0this.pos,this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(0'}).join("")),this.navItems.concat(this.nav).forEach(function(t){return t&&(t.hidden=!n.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(t){t.preventDefault(),this.show(ut(t.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var n=this,i=this.getValidIndex();this.navItems.forEach(function(t){var e=ut(t,n.attrItem);Le(t,n.clsActive,H(e)===i),Le(t,"uk-invisible",n.finite&&("previous"===e&&0===i||"next"===e&&i>=n.maxIndex))})}}}],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){De(this.slides,this.clsActive)},computed:{duration:function(t,e){t=t.velocity;return Vr(e.offsetWidth/t)},list:function(t,e){return Me(t.selList,e)},maxIndex:function(){return this.length-1},selSlides:function(t){return t.selList+" "+(t.selSlides||"> *")},slides:{get:function(){return ze(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(t,e){var n=this;if(void 0===e&&(e=!1),!this.dragging&&this.length){var i=this.stack,r=e?0:i.length,o=function(){i.splice(r,1),i.length&&n.show(i.shift(),!0)};if(i[e?"unshift":"push"](t),!e&&1
'}},created:function(){var t=Me(this.template),e=Me(this.selList,t);this.items.forEach(function(){return be(e,"