');\n addClass(parent(this.panel), this.clsMode);\n }\n\n const { body, scrollingElement } = document;\n\n addClass(body, this.clsContainer, this.clsFlip);\n css(body, 'touch-action', 'pan-y pinch-zoom');\n css(this.$el, 'display', 'block');\n css(this.panel, 'maxWidth', scrollingElement.clientWidth);\n addClass(this.$el, this.clsOverlay);\n addClass(\n this.panel,\n this.clsSidebarAnimation,\n this.mode === 'reveal' ? '' : this.clsMode);\n\n\n height(body); // force reflow\n addClass(body, this.clsContainerAnimation);\n\n this.clsContainerAnimation && suppressUserScale();\n }\n },\n\n {\n name: 'hide',\n\n self: true,\n\n handler() {\n removeClass(document.body, this.clsContainerAnimation);\n css(document.body, 'touch-action', '');\n }\n },\n\n {\n name: 'hidden',\n\n self: true,\n\n handler() {\n this.clsContainerAnimation && resumeUserScale();\n\n if (this.mode === 'reveal') {\n unwrap(this.panel);\n }\n\n removeClass(this.panel, this.clsSidebarAnimation, this.clsMode);\n removeClass(this.$el, this.clsOverlay);\n css(this.$el, 'display', '');\n css(this.panel, 'maxWidth', '');\n removeClass(document.body, this.clsContainer, this.clsFlip);\n }\n },\n\n {\n name: 'swipeLeft swipeRight',\n\n handler(e) {\n if (this.isToggled() && endsWith(e.type, 'Left') ^ this.flip) {\n this.hide();\n }\n }\n }]\n\n };\n\n // Chrome in responsive mode zooms page upon opening offcanvas\n function suppressUserScale() {\n getViewport().content += ',user-scalable=0';\n }\n\n function resumeUserScale() {\n const viewport = getViewport();\n viewport.content = viewport.content.replace(/,user-scalable=0$/, '');\n }\n\n function getViewport() {\n return (\n $('meta[name=\"viewport\"]', document.head) || append(document.head, '
'));\n\n }\n\n var overflowAuto = {\n mixins: [Class, Resize],\n\n props: {\n selContainer: String,\n selContent: String,\n minHeight: Number\n },\n\n data: {\n selContainer: '.uk-modal',\n selContent: '.uk-modal-dialog',\n minHeight: 150\n },\n\n computed: {\n container(_ref, $el) {let { selContainer } = _ref;\n return closest($el, selContainer);\n },\n\n content(_ref2, $el) {let { selContent } = _ref2;\n return closest($el, selContent);\n }\n },\n\n resizeTargets() {\n return [this.container, this.content];\n },\n\n update: {\n read() {\n if (!this.content || !this.container || !isVisible(this.$el)) {\n return false;\n }\n\n return {\n max: Math.max(\n this.minHeight,\n height(this.container) - (dimensions(this.content).height - height(this.$el)))\n\n };\n },\n\n write(_ref3) {let { max } = _ref3;\n css(this.$el, { minHeight: this.minHeight, maxHeight: max });\n },\n\n events: ['resize']\n }\n };\n\n var responsive = {\n mixins: [Resize],\n\n props: ['width', 'height'],\n\n resizeTargets() {\n return [this.$el, parent(this.$el)];\n },\n\n connected() {\n addClass(this.$el, 'uk-responsive-width');\n },\n\n update: {\n read() {\n return isVisible(this.$el) && this.width && this.height ?\n { width: width(parent(this.$el)), height: this.height } :\n false;\n },\n\n write(dim) {\n height(\n this.$el,\n Dimensions.contain(\n {\n height: this.height,\n width: this.width\n },\n dim).\n height);\n\n },\n\n events: ['resize']\n }\n };\n\n var scroll = {\n props: {\n offset: Number\n },\n\n data: {\n offset: 0\n },\n\n connected() {\n registerClick(this);\n },\n\n disconnected() {\n unregisterClick(this);\n },\n\n methods: {\n async scrollTo(el) {\n el = el && $(el) || document.body;\n\n if (trigger(this.$el, 'beforescroll', [this, el])) {\n await scrollIntoView(el, { offset: this.offset });\n trigger(this.$el, 'scrolled', [this, el]);\n }\n }\n }\n };\n\n const components$1 = new Set();\n function registerClick(cmp) {\n if (!components$1.size) {\n on(document, 'click', clickHandler);\n }\n\n components$1.add(cmp);\n }\n\n function unregisterClick(cmp) {\n components$1.delete(cmp);\n\n if (!components$1.size) {\n off(document, 'click', clickHandler);\n }\n }\n\n function clickHandler(e) {\n if (e.defaultPrevented) {\n return;\n }\n\n for (const component of components$1) {\n if (within(e.target, component.$el)) {\n e.preventDefault();\n component.scrollTo(getTargetElement(component.$el));\n }\n }\n }\n\n function getTargetElement(el) {\n return document.getElementById(decodeURIComponent(el.hash).substring(1));\n }\n\n var scrollspy = {\n mixins: [Scroll],\n\n args: 'cls',\n\n props: {\n cls: String,\n target: String,\n hidden: Boolean,\n offsetTop: Number,\n offsetLeft: Number,\n repeat: Boolean,\n delay: Number\n },\n\n data: () => ({\n cls: '',\n target: false,\n hidden: true,\n offsetTop: 0,\n offsetLeft: 0,\n repeat: false,\n delay: 0,\n inViewClass: 'uk-scrollspy-inview'\n }),\n\n computed: {\n elements: {\n get(_ref, $el) {let { target } = _ref;\n return target ? $$(target, $el) : [$el];\n },\n\n watch(elements, prev) {\n if (this.hidden) {\n // use `opacity:0` instead of `visibility:hidden` to make content focusable with keyboard\n css(filter(elements, \":not(.\" + this.inViewClass + \")\"), 'opacity', 0);\n }\n\n if (!isEqual(elements, prev)) {\n this.$reset();\n }\n },\n\n immediate: true\n }\n },\n\n connected() {\n this._data.elements = new Map();\n this.registerObserver(\n observeIntersection(\n this.elements,\n (records) => {\n const elements = this._data.elements;\n for (const { target: el, isIntersecting } of records) {\n if (!elements.has(el)) {\n elements.set(el, {\n cls: data(el, 'uk-scrollspy-class') || this.cls\n });\n }\n\n const state = elements.get(el);\n if (!this.repeat && state.show) {\n continue;\n }\n\n state.show = isIntersecting;\n }\n\n this.$emit();\n },\n {\n rootMargin: toPx(this.offsetTop, 'height') - 1 + \"px \" + (\n toPx(this.offsetLeft, 'width') - 1) + \"px\"\n\n },\n false));\n\n\n },\n\n disconnected() {\n for (const [el, state] of this._data.elements.entries()) {\n removeClass(el, this.inViewClass, (state == null ? void 0 : state.cls) || '');\n }\n },\n\n update: [\n {\n write(data) {\n for (const [el, state] of data.elements.entries()) {\n if (state.show && !state.inview && !state.queued) {\n state.queued = true;\n\n data.promise = (data.promise || Promise.resolve()).\n then(() => new Promise((resolve) => setTimeout(resolve, this.delay))).\n then(() => {\n this.toggle(el, true);\n setTimeout(() => {\n state.queued = false;\n this.$emit();\n }, 300);\n });\n } else if (!state.show && state.inview && !state.queued && this.repeat) {\n this.toggle(el, false);\n }\n }\n }\n }],\n\n\n methods: {\n toggle(el, inview) {\n const state = this._data.elements.get(el);\n\n if (!state) {\n return;\n }\n\n state.off == null ? void 0 : state.off();\n\n css(el, 'opacity', !inview && this.hidden ? 0 : '');\n\n toggleClass(el, this.inViewClass, inview);\n toggleClass(el, state.cls);\n\n if (/\\buk-animation-/.test(state.cls)) {\n const removeAnimationClasses = () => removeClasses(el, 'uk-animation-[\\\\w-]+');\n if (inview) {\n state.off = once(el, 'animationcancel animationend', removeAnimationClasses);\n } else {\n removeAnimationClasses();\n }\n }\n\n trigger(el, inview ? 'inview' : 'outview');\n\n state.inview = inview;\n\n // change to `visibility: hidden` does not trigger observers\n this.$update(el);\n }\n }\n };\n\n var scrollspyNav = {\n mixins: [Scroll],\n\n props: {\n cls: String,\n closest: String,\n scroll: Boolean,\n overflow: Boolean,\n offset: Number\n },\n\n data: {\n cls: 'uk-active',\n closest: false,\n scroll: false,\n overflow: true,\n offset: 0\n },\n\n computed: {\n links: {\n get(_, $el) {\n return $$('a[href*=\"#\"]', $el).filter((el) => el.hash && isSameSiteAnchor(el));\n },\n\n watch(links) {\n if (this.scroll) {\n this.$create('scroll', links, { offset: this.offset || 0 });\n }\n },\n\n immediate: true\n },\n\n elements(_ref) {let { closest: selector } = _ref;\n return closest(this.links, selector || '*');\n }\n },\n\n update: [\n {\n read() {\n const targets = this.links.map(getTargetElement).filter(Boolean);\n\n const { length } = targets;\n\n if (!length || !isVisible(this.$el)) {\n return false;\n }\n\n const [scrollElement] = scrollParents(targets, /auto|scroll/, true);\n const { scrollTop, scrollHeight } = scrollElement;\n const viewport = offsetViewport(scrollElement);\n const max = scrollHeight - viewport.height;\n let active = false;\n\n if (scrollTop === max) {\n active = length - 1;\n } else {\n for (let i = 0; i < targets.length; i++) {\n if (offset(targets[i]).top - viewport.top - this.offset > 0) {\n break;\n }\n active = +i;\n }\n\n if (active === false && this.overflow) {\n active = 0;\n }\n }\n\n return { active };\n },\n\n write(_ref2) {let { active } = _ref2;\n const changed = active !== false && !hasClass(this.elements[active], this.cls);\n\n this.links.forEach((el) => el.blur());\n for (let i = 0; i < this.elements.length; i++) {\n toggleClass(this.elements[i], this.cls, +i === active);\n }\n\n if (changed) {\n trigger(this.$el, 'active', [active, this.elements[active]]);\n }\n },\n\n events: ['scroll', 'resize']\n }]\n\n };\n\n var sticky = {\n mixins: [Class, Media, Resize, Scroll],\n\n props: {\n position: String,\n top: null,\n bottom: null,\n start: null,\n end: null,\n offset: String,\n overflowFlip: Boolean,\n animation: String,\n clsActive: String,\n clsInactive: String,\n clsFixed: String,\n clsBelow: String,\n selTarget: String,\n showOnUp: Boolean,\n targetOffset: Number\n },\n\n data: {\n position: 'top',\n top: false,\n bottom: false,\n start: false,\n end: false,\n offset: 0,\n overflowFlip: false,\n animation: '',\n clsActive: 'uk-active',\n clsInactive: '',\n clsFixed: 'uk-sticky-fixed',\n clsBelow: 'uk-sticky-below',\n selTarget: '',\n showOnUp: false,\n targetOffset: false\n },\n\n computed: {\n selTarget(_ref, $el) {let { selTarget } = _ref;\n return selTarget && $(selTarget, $el) || $el;\n }\n },\n\n resizeTargets() {\n return document.documentElement;\n },\n\n connected() {\n this.start = coerce(this.start || this.top);\n this.end = coerce(this.end || this.bottom);\n\n this.placeholder =\n $('+ .uk-sticky-placeholder', this.$el) ||\n $('
');\n this.isFixed = false;\n this.setActive(false);\n },\n\n disconnected() {\n if (this.isFixed) {\n this.hide();\n removeClass(this.selTarget, this.clsInactive);\n }\n\n remove$1(this.placeholder);\n this.placeholder = null;\n },\n\n events: [\n {\n name: 'resize',\n\n el() {\n return window;\n },\n\n handler() {\n this.$emit('resize');\n }\n },\n {\n name: 'load hashchange popstate',\n\n el() {\n return window;\n },\n\n filter() {\n return this.targetOffset !== false;\n },\n\n handler() {\n const { scrollingElement } = document;\n\n if (!location.hash || scrollingElement.scrollTop === 0) {\n return;\n }\n\n setTimeout(() => {\n const targetOffset = offset($(location.hash));\n const elOffset = offset(this.$el);\n\n if (this.isFixed && intersectRect(targetOffset, elOffset)) {\n scrollingElement.scrollTop =\n targetOffset.top -\n elOffset.height -\n toPx(this.targetOffset, 'height', this.placeholder) -\n toPx(this.offset, 'height', this.placeholder);\n }\n });\n }\n }],\n\n\n update: [\n {\n read(_ref2, types) {let { height: height$1, width, margin } = _ref2;\n this.inactive = !this.matchMedia || !isVisible(this.$el);\n\n if (this.inactive) {\n return false;\n }\n\n const hide = this.active && types.has('resize');\n if (hide) {\n css(this.selTarget, 'transition', '0s');\n this.hide();\n }\n\n if (!this.active) {\n ({ height: height$1, width } = offset(this.$el));\n margin = css(this.$el, 'margin');\n }\n\n if (hide) {\n this.show();\n requestAnimationFrame(() => css(this.selTarget, 'transition', ''));\n }\n\n const windowHeight = height(window);\n\n let position = this.position;\n if (this.overflowFlip && height$1 > windowHeight) {\n position = position === 'top' ? 'bottom' : 'top';\n }\n\n const referenceElement = this.isFixed ? this.placeholder : this.$el;\n let offset$1 = toPx(this.offset, 'height', referenceElement);\n if (position === 'bottom' && (height$1 < windowHeight || this.overflowFlip)) {\n offset$1 += windowHeight - height$1;\n }\n\n const overflow = this.overflowFlip ?\n 0 :\n Math.max(0, height$1 + offset$1 - windowHeight);\n const topOffset = offset(referenceElement).top;\n\n const start =\n (this.start === false ?\n topOffset :\n parseProp(this.start, this.$el, topOffset)) - offset$1;\n const end =\n this.end === false ?\n document.scrollingElement.scrollHeight - windowHeight :\n parseProp(this.end, this.$el, topOffset + height$1, true) -\n offset(this.$el).height +\n overflow -\n offset$1;\n\n return {\n start,\n end,\n offset: offset$1,\n overflow,\n topOffset,\n height: height$1,\n width,\n margin,\n top: offsetPosition(referenceElement)[0]\n };\n },\n\n write(_ref3) {let { height, width, margin } = _ref3;\n const { placeholder } = this;\n\n css(placeholder, { height, width, margin });\n\n if (!within(placeholder, document)) {\n after(this.$el, placeholder);\n placeholder.hidden = true;\n }\n },\n\n events: ['resize']\n },\n\n {\n read(_ref4)\n\n\n\n\n\n\n {let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;\n const scroll = document.scrollingElement.scrollTop;\n const dir = prevScroll <= scroll ? 'down' : 'up';\n\n return {\n dir,\n prevDir,\n scroll,\n prevScroll,\n offsetParentTop: offset(\n (this.isFixed ? this.placeholder : this.$el).offsetParent).\n top,\n overflowScroll: clamp(\n overflowScroll + clamp(scroll, start, end) - clamp(prevScroll, start, end),\n 0,\n overflow)\n\n };\n },\n\n write(data, types) {\n const isScrollUpdate = types.has('scroll');\n const {\n initTimestamp = 0,\n dir,\n prevDir,\n scroll,\n prevScroll = 0,\n top,\n start,\n topOffset,\n height\n } = data;\n\n if (\n scroll < 0 ||\n scroll === prevScroll && isScrollUpdate ||\n this.showOnUp && !isScrollUpdate && !this.isFixed)\n {\n return;\n }\n\n const now = Date.now();\n if (now - initTimestamp > 300 || dir !== prevDir) {\n data.initScroll = scroll;\n data.initTimestamp = now;\n }\n\n if (\n this.showOnUp &&\n !this.isFixed &&\n Math.abs(data.initScroll - scroll) <= 30 &&\n Math.abs(prevScroll - scroll) <= 10)\n {\n return;\n }\n\n if (\n this.inactive ||\n scroll < start ||\n this.showOnUp && (\n scroll <= start ||\n dir === 'down' && isScrollUpdate ||\n dir === 'up' && !this.isFixed && scroll <= topOffset + height))\n {\n if (!this.isFixed) {\n if (Animation.inProgress(this.$el) && top > scroll) {\n Animation.cancel(this.$el);\n this.hide();\n }\n\n return;\n }\n\n this.isFixed = false;\n\n if (this.animation && scroll > topOffset) {\n Animation.cancel(this.$el);\n Animation.out(this.$el, this.animation).then(() => this.hide(), noop);\n } else {\n this.hide();\n }\n } else if (this.isFixed) {\n this.update();\n } else if (this.animation && scroll > topOffset) {\n Animation.cancel(this.$el);\n this.show();\n Animation.in(this.$el, this.animation).catch(noop);\n } else {\n this.show();\n }\n },\n\n events: ['resize', 'scroll']\n }],\n\n\n methods: {\n show() {\n this.isFixed = true;\n this.update();\n this.placeholder.hidden = false;\n },\n\n hide() {\n this.setActive(false);\n removeClass(this.$el, this.clsFixed, this.clsBelow);\n css(this.$el, { position: '', top: '', width: '' });\n this.placeholder.hidden = true;\n },\n\n update() {\n let {\n width,\n scroll = 0,\n overflow,\n overflowScroll = 0,\n start,\n end,\n offset,\n topOffset,\n height,\n offsetParentTop\n } = this._data;\n const active = start !== 0 || scroll > start;\n let position = 'fixed';\n\n if (scroll > end) {\n offset += end - offsetParentTop;\n position = 'absolute';\n }\n\n if (overflow) {\n offset -= overflowScroll;\n }\n\n css(this.$el, {\n position,\n top: offset + \"px\",\n width\n });\n\n this.setActive(active);\n toggleClass(this.$el, this.clsBelow, scroll > topOffset + height);\n addClass(this.$el, this.clsFixed);\n },\n\n setActive(active) {\n const prev = this.active;\n this.active = active;\n if (active) {\n replaceClass(this.selTarget, this.clsInactive, this.clsActive);\n prev !== active && trigger(this.$el, 'active');\n } else {\n replaceClass(this.selTarget, this.clsActive, this.clsInactive);\n prev !== active && trigger(this.$el, 'inactive');\n }\n }\n }\n };\n\n function parseProp(value, el, propOffset, padding) {\n if (!value) {\n return 0;\n }\n\n if (isNumeric(value) || isString(value) && value.match(/^-?\\d/)) {\n return propOffset + toPx(value, 'height', el, true);\n } else {\n const refElement = value === true ? parent(el) : query(value, el);\n return (\n offset(refElement).bottom - (\n padding && refElement && within(el, refElement) ?\n toFloat(css(refElement, 'paddingBottom')) :\n 0));\n\n }\n }\n\n function coerce(value) {\n if (value === 'true') {\n return true;\n } else if (value === 'false') {\n return false;\n }\n return value;\n }\n\n var Switcher = {\n mixins: [Lazyload, Swipe, Togglable],\n\n args: 'connect',\n\n props: {\n connect: String,\n toggle: String,\n itemNav: String,\n active: Number\n },\n\n data: {\n connect: '~.uk-switcher',\n toggle: '> * > :first-child',\n itemNav: false,\n active: 0,\n cls: 'uk-active',\n attrItem: 'uk-switcher-item'\n },\n\n computed: {\n connects: {\n get(_ref, $el) {let { connect } = _ref;\n return queryAll(connect, $el);\n },\n\n watch(connects) {\n if (this.swiping) {\n css(connects, 'touchAction', 'pan-y pinch-zoom');\n }\n },\n\n document: true,\n immediate: true\n },\n\n connectChildren: {\n get() {\n return this.connects.map((el) => children(el)).flat();\n },\n\n watch() {\n const index = this.index();\n for (const el of this.connects) {\n children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));\n this.lazyload(this.$el, children(el));\n }\n },\n\n immediate: true\n },\n\n toggles: {\n get(_ref2, $el) {let { toggle } = _ref2;\n return $$(toggle, $el).filter(\n (el) => !matches(el, '.uk-disabled *, .uk-disabled, [disabled]'));\n\n },\n\n watch(toggles) {\n const active = this.index();\n this.show(~active ? active : toggles[this.active] || toggles[0]);\n },\n\n immediate: true\n },\n\n children() {\n return children(this.$el).filter((child) =>\n this.toggles.some((toggle) => within(toggle, child)));\n\n },\n\n swipeTarget() {\n return this.connects;\n }\n },\n\n events: [\n {\n name: 'click',\n\n delegate() {\n return this.toggle;\n },\n\n handler(e) {\n e.preventDefault();\n this.show(e.current);\n }\n },\n\n {\n name: 'click',\n\n el() {\n return this.connects.concat(this.itemNav ? queryAll(this.itemNav, this.$el) : []);\n },\n\n delegate() {\n return \"[\" + this.attrItem + \"],[data-\" + this.attrItem + \"]\";\n },\n\n handler(e) {\n e.preventDefault();\n this.show(data(e.current, this.attrItem));\n }\n },\n\n {\n name: 'swipeRight swipeLeft',\n\n filter() {\n return this.swiping;\n },\n\n el() {\n return this.connects;\n },\n\n handler(_ref3) {let { type } = _ref3;\n this.show(endsWith(type, 'Left') ? 'next' : 'previous');\n }\n }],\n\n\n methods: {\n index() {\n return findIndex(this.children, (el) => hasClass(el, this.cls));\n },\n\n show(item) {\n const prev = this.index();\n const next = getIndex(item, this.toggles, prev);\n const active = getIndex(this.children[next], children(this.$el));\n children(this.$el).forEach((child, i) => {\n toggleClass(child, this.cls, active === i);\n attr(this.toggles[i], 'aria-expanded', active === i);\n });\n\n const animate = prev >= 0 && prev !== next;\n this.connects.forEach(async (_ref4) => {let { children } = _ref4;\n await this.toggleElement(\n toNodes(children).filter((child) => hasClass(child, this.cls)),\n false,\n animate);\n\n await this.toggleElement(children[active], true, animate);\n });\n }\n }\n };\n\n var tab = {\n mixins: [Class],\n\n extends: Switcher,\n\n props: {\n media: Boolean\n },\n\n data: {\n media: 960,\n attrItem: 'uk-tab-item'\n },\n\n connected() {\n const cls = hasClass(this.$el, 'uk-tab-left') ?\n 'uk-tab-left' :\n hasClass(this.$el, 'uk-tab-right') ?\n 'uk-tab-right' :\n false;\n\n if (cls) {\n this.$create('toggle', this.$el, { cls, mode: 'media', media: this.media });\n }\n }\n };\n\n const KEY_SPACE = 32;\n\n var toggle = {\n mixins: [Lazyload, Media, Togglable],\n\n args: 'target',\n\n props: {\n href: String,\n target: null,\n mode: 'list',\n queued: Boolean\n },\n\n data: {\n href: false,\n target: false,\n mode: 'click',\n queued: true\n },\n\n computed: {\n target: {\n get(_ref, $el) {let { href, target } = _ref;\n target = queryAll(target || href, $el);\n return target.length && target || [$el];\n },\n\n watch() {\n this.updateAria();\n this.lazyload(this.$el, this.target);\n },\n\n document: true,\n immediate: true\n }\n },\n\n connected() {\n if (!includes(this.mode, 'media') && !isFocusable(this.$el)) {\n attr(this.$el, 'tabindex', '0');\n }\n },\n\n events: [\n {\n name: pointerDown,\n\n filter() {\n return includes(this.mode, 'hover');\n },\n\n handler(e) {\n this._preventClick = null;\n\n if (!isTouch(e) || this._showState) {\n return;\n }\n\n // Clicking a button does not give it focus on all browsers and platforms\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus\n trigger(this.$el, 'focus');\n once(\n document,\n pointerDown,\n () => trigger(this.$el, 'blur'),\n true,\n (e) => !within(e.target, this.$el));\n\n\n // Prevent initial click to prevent double toggle through focus + click\n if (includes(this.mode, 'click')) {\n this._preventClick = true;\n }\n }\n },\n\n {\n name: pointerEnter + \" \" + pointerLeave + \" focus blur\",\n\n filter() {\n return includes(this.mode, 'hover');\n },\n\n handler(e) {\n if (isTouch(e)) {\n return;\n }\n\n const show = includes([pointerEnter, 'focus'], e.type);\n const expanded = attr(this.$el, 'aria-expanded');\n\n // Skip hide if still hovered or focused\n if (\n !show && (\n e.type === pointerLeave && matches(this.$el, ':focus') ||\n e.type === 'blur' && matches(this.$el, ':hover')))\n {\n return;\n }\n\n // Skip if state does not change e.g. hover + focus received\n if (this._showState && show && expanded !== this._showState) {\n // Ensure reset if state has changed through click\n if (!show) {\n this._showState = null;\n }\n return;\n }\n\n this._showState = show ? expanded : null;\n\n this.toggle(\"toggle\" + (show ? 'show' : 'hide'));\n }\n },\n\n {\n name: 'keydown',\n\n filter() {\n return includes(this.mode, 'click') && !isTag(this.$el, 'input');\n },\n\n handler(e) {\n if (e.keyCode === KEY_SPACE) {\n e.preventDefault();\n this.$el.click();\n }\n }\n },\n\n {\n name: 'click',\n\n filter() {\n return ['click', 'hover'].some((mode) => includes(this.mode, mode));\n },\n\n handler(e) {\n let link;\n if (\n this._preventClick ||\n closest(e.target, 'a[href=\"#\"], a[href=\"\"]') ||\n (link = closest(e.target, 'a[href]')) && (\n attr(this.$el, 'aria-expanded') !== 'true' ||\n link.hash && matches(this.target, link.hash)))\n {\n e.preventDefault();\n }\n\n if (!this._preventClick && includes(this.mode, 'click')) {\n this.toggle();\n }\n }\n },\n\n {\n name: 'hide show',\n\n self: true,\n\n el() {\n return this.target;\n },\n\n handler(_ref2) {let { target, type } = _ref2;\n this.updateAria(target === this.target[0] && type === 'show');\n }\n },\n\n {\n name: 'mediachange',\n\n filter() {\n return includes(this.mode, 'media');\n },\n\n el() {\n return this.target;\n },\n\n handler(e, mediaObj) {\n if (mediaObj.matches ^ this.isToggled(this.target)) {\n this.toggle();\n }\n }\n }],\n\n\n methods: {\n async toggle(type) {\n if (!trigger(this.target, type || 'toggle', [this])) {\n return;\n }\n\n if (!this.queued) {\n return this.toggleElement(this.target);\n }\n\n const leaving = this.target.filter((el) => hasClass(el, this.clsLeave));\n\n if (leaving.length) {\n for (const el of this.target) {\n const isLeaving = includes(leaving, el);\n this.toggleElement(el, isLeaving, isLeaving);\n }\n return;\n }\n\n const toggled = this.target.filter(this.isToggled);\n await this.toggleElement(toggled, false);\n await this.toggleElement(\n this.target.filter((el) => !includes(toggled, el)),\n true);\n\n },\n\n updateAria(toggled) {\n if (includes(this.mode, 'media')) {\n return;\n }\n\n attr(\n this.$el,\n 'aria-expanded',\n isBoolean(toggled) ? toggled : this.isToggled(this.target));\n\n }\n }\n };\n\n var components = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Accordion: Accordion,\n Alert: alert,\n Cover: cover,\n Drop: drop,\n Dropdown: drop,\n FormCustom: formCustom,\n Grid: grid,\n HeightMatch: heightMatch,\n HeightViewport: heightViewport,\n Icon: Icon,\n Img: img,\n Leader: leader,\n Margin: Margin,\n Modal: modal,\n Nav: nav,\n Navbar: navbar,\n Offcanvas: offcanvas,\n OverflowAuto: overflowAuto,\n Responsive: responsive,\n Scroll: scroll,\n Scrollspy: scrollspy,\n ScrollspyNav: scrollspyNav,\n Sticky: sticky,\n Svg: SVG,\n Switcher: Switcher,\n Tab: tab,\n Toggle: toggle,\n Video: Video,\n Close: Close,\n Spinner: Spinner,\n NavParentIcon: NavParentIcon,\n SlidenavNext: Slidenav,\n SlidenavPrevious: Slidenav,\n SearchIcon: Search,\n Marker: IconComponent,\n NavbarParentIcon: IconComponent,\n NavbarToggleIcon: IconComponent,\n OverlayIcon: IconComponent,\n PaginationNext: IconComponent,\n PaginationPrevious: IconComponent,\n Totop: IconComponent\n });\n\n // register components\n each(components, (component, name) => UIkit.component(name, component));\n\n boot(UIkit);\n\n return UIkit;\n\n}));\n","const { hasOwnProperty, toString } = Object.prototype;\n\nexport function hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n\nconst hyphenateRe = /\\B([A-Z])/g;\n\nexport const hyphenate = memoize((str) => str.replace(hyphenateRe, '-$1').toLowerCase());\n\nconst camelizeRe = /-(\\w)/g;\n\nexport const camelize = memoize((str) => str.replace(camelizeRe, toUpper));\n\nexport const ucfirst = memoize((str) =>\n str.length ? toUpper(null, str.charAt(0)) + str.slice(1) : ''\n);\n\nfunction toUpper(_, c) {\n return c ? c.toUpperCase() : '';\n}\n\nexport function startsWith(str, search) {\n return str?.startsWith?.(search);\n}\n\nexport function endsWith(str, search) {\n return str?.endsWith?.(search);\n}\n\nexport function includes(obj, search) {\n return obj?.includes?.(search);\n}\n\nexport function findIndex(array, predicate) {\n return array?.findIndex?.(predicate);\n}\n\nexport const { isArray, from: toArray } = Array;\nexport const { assign } = Object;\n\nexport function isFunction(obj) {\n return typeof obj === 'function';\n}\n\nexport function isObject(obj) {\n return obj !== null && typeof obj === 'object';\n}\n\nexport function isPlainObject(obj) {\n return toString.call(obj) === '[object Object]';\n}\n\nexport function isWindow(obj) {\n return isObject(obj) && obj === obj.window;\n}\n\nexport function isDocument(obj) {\n return nodeType(obj) === 9;\n}\n\nexport function isNode(obj) {\n return nodeType(obj) >= 1;\n}\n\nexport function isElement(obj) {\n return nodeType(obj) === 1;\n}\n\nfunction nodeType(obj) {\n return !isWindow(obj) && isObject(obj) && obj.nodeType;\n}\n\nexport function isBoolean(value) {\n return typeof value === 'boolean';\n}\n\nexport function isString(value) {\n return typeof value === 'string';\n}\n\nexport function isNumber(value) {\n return typeof value === 'number';\n}\n\nexport function isNumeric(value) {\n return isNumber(value) || (isString(value) && !isNaN(value - parseFloat(value)));\n}\n\nexport function isEmpty(obj) {\n return !(isArray(obj) ? obj.length : isObject(obj) ? Object.keys(obj).length : false);\n}\n\nexport function isUndefined(value) {\n return value === void 0;\n}\n\nexport function toBoolean(value) {\n return isBoolean(value)\n ? value\n : value === 'true' || value === '1' || value === ''\n ? true\n : value === 'false' || value === '0'\n ? false\n : value;\n}\n\nexport function toNumber(value) {\n const number = Number(value);\n return isNaN(number) ? false : number;\n}\n\nexport function toFloat(value) {\n return parseFloat(value) || 0;\n}\n\nexport function toNode(element) {\n return toNodes(element)[0];\n}\n\nexport function toNodes(element) {\n return (element && (isNode(element) ? [element] : Array.from(element).filter(isNode))) || [];\n}\n\nexport function toWindow(element) {\n if (isWindow(element)) {\n return element;\n }\n\n element = toNode(element);\n const document = isDocument(element) ? element : element?.ownerDocument;\n\n return document?.defaultView || window;\n}\n\nexport function isEqual(value, other) {\n return (\n value === other ||\n (isObject(value) &&\n isObject(other) &&\n Object.keys(value).length === Object.keys(other).length &&\n each(value, (val, key) => val === other[key]))\n );\n}\n\nexport function swap(value, a, b) {\n return value.replace(new RegExp(`${a}|${b}`, 'g'), (match) => (match === a ? b : a));\n}\n\nexport function last(array) {\n return array[array.length - 1];\n}\n\nexport function each(obj, cb) {\n for (const key in obj) {\n if (false === cb(obj[key], key)) {\n return false;\n }\n }\n return true;\n}\n\nexport function sortBy(array, prop) {\n return array\n .slice()\n .sort(({ [prop]: propA = 0 }, { [prop]: propB = 0 }) =>\n propA > propB ? 1 : propB > propA ? -1 : 0\n );\n}\n\nexport function uniqueBy(array, prop) {\n const seen = new Set();\n return array.filter(({ [prop]: check }) => (seen.has(check) ? false : seen.add(check)));\n}\n\nexport function clamp(number, min = 0, max = 1) {\n return Math.min(Math.max(toNumber(number) || 0, min), max);\n}\n\nexport function noop() {}\n\nexport function intersectRect(...rects) {\n return [\n ['bottom', 'top'],\n ['right', 'left'],\n ].every(\n ([minProp, maxProp]) =>\n Math.min(...rects.map(({ [minProp]: min }) => min)) -\n Math.max(...rects.map(({ [maxProp]: max }) => max)) >\n 0\n );\n}\n\nexport function pointInRect(point, rect) {\n return (\n point.x <= rect.right &&\n point.x >= rect.left &&\n point.y <= rect.bottom &&\n point.y >= rect.top\n );\n}\n\nfunction ratio(dimensions, prop, value) {\n const aProp = prop === 'width' ? 'height' : 'width';\n\n return {\n [aProp]: dimensions[prop]\n ? Math.round((value * dimensions[aProp]) / dimensions[prop])\n : dimensions[aProp],\n [prop]: value,\n };\n}\n\nfunction contain(dimensions, maxDimensions) {\n dimensions = { ...dimensions };\n\n for (const prop in dimensions) {\n dimensions =\n dimensions[prop] > maxDimensions[prop]\n ? ratio(dimensions, prop, maxDimensions[prop])\n : dimensions;\n }\n\n return dimensions;\n}\n\nfunction cover(dimensions, maxDimensions) {\n dimensions = contain(dimensions, maxDimensions);\n\n for (const prop in dimensions) {\n dimensions =\n dimensions[prop] < maxDimensions[prop]\n ? ratio(dimensions, prop, maxDimensions[prop])\n : dimensions;\n }\n\n return dimensions;\n}\n\nexport const Dimensions = { ratio, contain, cover };\n\nexport function getIndex(i, elements, current = 0, finite = false) {\n elements = toNodes(elements);\n\n const { length } = elements;\n\n if (!length) {\n return -1;\n }\n\n i = isNumeric(i)\n ? toNumber(i)\n : i === 'next'\n ? current + 1\n : i === 'previous'\n ? current - 1\n : elements.indexOf(toNode(i));\n\n if (finite) {\n return clamp(i, 0, length - 1);\n }\n\n i %= length;\n\n return i < 0 ? i + length : i;\n}\n\nexport function memoize(fn) {\n const cache = Object.create(null);\n return (key) => cache[key] || (cache[key] = fn(key));\n}\n\nexport class Deferred {\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.reject = reject;\n this.resolve = resolve;\n });\n }\n}\n","import { isFunction, isObject, isUndefined, toNode, toNodes } from './lang';\n\nexport function attr(element, name, value) {\n if (isObject(name)) {\n for (const key in name) {\n attr(element, key, name[key]);\n }\n return;\n }\n\n if (isUndefined(value)) {\n return toNode(element)?.getAttribute(name);\n } else {\n for (const el of toNodes(element)) {\n if (isFunction(value)) {\n value = value.call(el, attr(el, name));\n }\n\n if (value === null) {\n removeAttr(el, name);\n } else {\n el.setAttribute(name, value);\n }\n }\n }\n}\n\nexport function hasAttr(element, name) {\n return toNodes(element).some((element) => element.hasAttribute(name));\n}\n\nexport function removeAttr(element, name) {\n const elements = toNodes(element);\n for (const attribute of name.split(' ')) {\n for (const element of elements) {\n element.removeAttribute(attribute);\n }\n }\n}\n\nexport function data(element, attribute) {\n for (const name of [attribute, `data-${attribute}`]) {\n if (hasAttr(element, name)) {\n return attr(element, name);\n }\n }\n}\n","import { isElement, isString, startsWith, toNode, toNodes } from './lang';\n\nconst voidElements = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n menuitem: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true,\n};\nexport function isVoidElement(element) {\n return toNodes(element).some((element) => voidElements[element.tagName.toLowerCase()]);\n}\n\nexport function isVisible(element) {\n return toNodes(element).some(\n (element) => element.offsetWidth || element.offsetHeight || element.getClientRects().length\n );\n}\n\nexport const selInput = 'input,select,textarea,button';\nexport function isInput(element) {\n return toNodes(element).some((element) => matches(element, selInput));\n}\n\nexport const selFocusable = `${selInput},a[href],[tabindex]`;\nexport function isFocusable(element) {\n return matches(element, selFocusable);\n}\n\nexport function parent(element) {\n return toNode(element)?.parentElement;\n}\n\nexport function filter(element, selector) {\n return toNodes(element).filter((element) => matches(element, selector));\n}\n\nexport function matches(element, selector) {\n return toNodes(element).some((element) => element.matches(selector));\n}\n\nexport function closest(element, selector) {\n return isElement(element)\n ? element.closest(startsWith(selector, '>') ? selector.slice(1) : selector)\n : toNodes(element)\n .map((element) => closest(element, selector))\n .filter(Boolean);\n}\n\nexport function within(element, selector) {\n return isString(selector)\n ? !!closest(element, selector)\n : toNode(selector).contains(toNode(element));\n}\n\nexport function parents(element, selector) {\n const elements = [];\n\n while ((element = parent(element))) {\n if (!selector || matches(element, selector)) {\n elements.push(element);\n }\n }\n\n return elements;\n}\n\nexport function children(element, selector) {\n element = toNode(element);\n const children = element ? toNodes(element.children) : [];\n return selector ? filter(children, selector) : children;\n}\n\nexport function index(element, ref) {\n return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);\n}\n","import { attr } from './attr';\nimport { closest, index, matches, parent } from './filter';\nimport { isDocument, isString, memoize, toNode, toNodes } from './lang';\n\nexport function query(selector, context) {\n return find(selector, getContext(selector, context));\n}\n\nexport function queryAll(selector, context) {\n return findAll(selector, getContext(selector, context));\n}\n\nexport function find(selector, context) {\n return toNode(_query(selector, context, 'querySelector'));\n}\n\nexport function findAll(selector, context) {\n return toNodes(_query(selector, context, 'querySelectorAll'));\n}\n\nconst contextSelectorRe = /(^|[^\\\\],)\\s*[!>+~-]/;\nconst isContextSelector = memoize((selector) => selector.match(contextSelectorRe));\n\nfunction getContext(selector, context = document) {\n return (isString(selector) && isContextSelector(selector)) || isDocument(context)\n ? context\n : context.ownerDocument;\n}\n\nconst contextSanitizeRe = /([!>+~-])(?=\\s+[!>+~-]|\\s*$)/g;\nconst sanatize = memoize((selector) => selector.replace(contextSanitizeRe, '$1 *'));\n\nfunction _query(selector, context = document, queryFn) {\n if (!selector || !isString(selector)) {\n return selector;\n }\n\n selector = sanatize(selector);\n\n if (isContextSelector(selector)) {\n const split = splitSelector(selector);\n selector = '';\n for (let sel of split) {\n let ctx = context;\n\n if (sel[0] === '!') {\n const selectors = sel.substr(1).trim().split(' ');\n ctx = closest(parent(context), selectors[0]);\n sel = selectors.slice(1).join(' ').trim();\n if (!sel.length && split.length === 1) {\n return ctx;\n }\n }\n\n if (sel[0] === '-') {\n const selectors = sel.substr(1).trim().split(' ');\n const prev = (ctx || context).previousElementSibling;\n ctx = matches(prev, sel.substr(1)) ? prev : null;\n sel = selectors.slice(1).join(' ');\n }\n\n if (ctx) {\n selector += `${selector ? ',' : ''}${domPath(ctx)} ${sel}`;\n }\n }\n\n context = document;\n }\n\n try {\n return context[queryFn](selector);\n } catch (e) {\n return null;\n }\n}\n\nconst selectorRe = /.*?[^\\\\](?:,|$)/g;\n\nconst splitSelector = memoize((selector) =>\n selector.match(selectorRe).map((selector) => selector.replace(/,$/, '').trim())\n);\n\nfunction domPath(element) {\n const names = [];\n while (element.parentNode) {\n const id = attr(element, 'id');\n if (id) {\n names.unshift(`#${escape(id)}`);\n break;\n } else {\n let { tagName } = element;\n if (tagName !== 'HTML') {\n tagName += `:nth-child(${index(element) + 1})`;\n }\n names.unshift(tagName);\n element = element.parentNode;\n }\n }\n return names.join(' > ');\n}\n\nexport function escape(css) {\n return isString(css) ? CSS.escape(css) : '';\n}\n","import { findAll } from './selector';\nimport { closest, within } from './filter';\nimport { isArray, isFunction, isString, toNode, toNodes } from './lang';\n\nexport function on(...args) {\n let [targets, types, selector, listener, useCapture = false] = getArgs(args);\n\n if (listener.length > 1) {\n listener = detail(listener);\n }\n\n if (useCapture?.self) {\n listener = selfFilter(listener);\n }\n\n if (selector) {\n listener = delegate(selector, listener);\n }\n\n for (const type of types) {\n for (const target of targets) {\n target.addEventListener(type, listener, useCapture);\n }\n }\n\n return () => off(targets, types, listener, useCapture);\n}\n\nexport function off(...args) {\n let [targets, types, , listener, useCapture = false] = getArgs(args);\n for (const type of types) {\n for (const target of targets) {\n target.removeEventListener(type, listener, useCapture);\n }\n }\n}\n\nexport function once(...args) {\n const [element, types, selector, listener, useCapture = false, condition] = getArgs(args);\n const off = on(\n element,\n types,\n selector,\n (e) => {\n const result = !condition || condition(e);\n if (result) {\n off();\n listener(e, result);\n }\n },\n useCapture\n );\n\n return off;\n}\n\nexport function trigger(targets, event, detail) {\n return toEventTargets(targets).every((target) =>\n target.dispatchEvent(createEvent(event, true, true, detail))\n );\n}\n\nexport function createEvent(e, bubbles = true, cancelable = false, detail) {\n if (isString(e)) {\n e = new CustomEvent(e, { bubbles, cancelable, detail });\n }\n\n return e;\n}\n\nfunction getArgs(args) {\n // Event targets\n args[0] = toEventTargets(args[0]);\n\n // Event types\n if (isString(args[1])) {\n args[1] = args[1].split(' ');\n }\n\n // Delegate?\n if (isFunction(args[2])) {\n args.splice(2, 0, false);\n }\n\n return args;\n}\n\nfunction delegate(selector, listener) {\n return (e) => {\n const current =\n selector[0] === '>'\n ? findAll(selector, e.currentTarget)\n .reverse()\n .filter((element) => within(e.target, element))[0]\n : closest(e.target, selector);\n\n if (current) {\n e.current = current;\n listener.call(this, e);\n }\n };\n}\n\nfunction detail(listener) {\n return (e) => (isArray(e.detail) ? listener(e, ...e.detail) : listener(e));\n}\n\nfunction selfFilter(listener) {\n return function (e) {\n if (e.target === e.currentTarget || e.target === e.current) {\n return listener.call(null, e);\n }\n };\n}\n\nfunction isEventTarget(target) {\n return target && 'addEventListener' in target;\n}\n\nfunction toEventTarget(target) {\n return isEventTarget(target) ? target : toNode(target);\n}\n\nexport function toEventTargets(target) {\n return isArray(target)\n ? target.map(toEventTarget).filter(Boolean)\n : isString(target)\n ? findAll(target)\n : isEventTarget(target)\n ? [target]\n : toNodes(target);\n}\n\nexport function isTouch(e) {\n return e.pointerType === 'touch' || !!e.touches;\n}\n\nexport function getEventPos(e) {\n const { clientX: x, clientY: y } = e.touches?.[0] || e.changedTouches?.[0] || e;\n\n return { x, y };\n}\n","import {\n each,\n hyphenate,\n isArray,\n isNumber,\n isNumeric,\n isObject,\n isString,\n isUndefined,\n memoize,\n startsWith,\n toNodes,\n} from './lang';\n\nconst cssNumber = {\n 'animation-iteration-count': true,\n 'column-count': true,\n 'fill-opacity': true,\n 'flex-grow': true,\n 'flex-shrink': true,\n 'font-weight': true,\n 'line-height': true,\n opacity: true,\n order: true,\n orphans: true,\n 'stroke-dasharray': true,\n 'stroke-dashoffset': true,\n widows: true,\n 'z-index': true,\n zoom: true,\n};\n\nexport function css(element, property, value, priority = '') {\n const elements = toNodes(element);\n for (const element of elements) {\n if (isString(property)) {\n property = propName(property);\n\n if (isUndefined(value)) {\n return getComputedStyle(element).getPropertyValue(property);\n } else {\n element.style.setProperty(\n property,\n isNumeric(value) && !cssNumber[property]\n ? `${value}px`\n : value || isNumber(value)\n ? value\n : '',\n priority\n );\n }\n } else if (isArray(property)) {\n const props = {};\n for (const prop of property) {\n props[prop] = css(element, prop);\n }\n return props;\n } else if (isObject(property)) {\n priority = value;\n each(property, (value, property) => css(element, property, value, priority));\n }\n }\n return elements[0];\n}\n\n// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty\nexport const propName = memoize((name) => vendorPropName(name));\n\nfunction vendorPropName(name) {\n if (startsWith(name, '--')) {\n return name;\n }\n\n name = hyphenate(name);\n\n const { style } = document.documentElement;\n\n if (name in style) {\n return name;\n }\n\n for (const prefix of ['webkit', 'moz']) {\n const prefixedName = `-${prefix}-${name}`;\n if (prefixedName in style) {\n return prefixedName;\n }\n }\n}\n","import { attr } from './attr';\nimport { isUndefined, toNodes } from './lang';\n\nexport function addClass(element, ...args) {\n apply(element, args, 'add');\n}\n\nexport function removeClass(element, ...args) {\n apply(element, args, 'remove');\n}\n\nexport function removeClasses(element, cls) {\n attr(element, 'class', (value) =>\n (value || '').replace(new RegExp(`\\\\b${cls}\\\\b\\\\s?`, 'g'), '')\n );\n}\n\nexport function replaceClass(element, ...args) {\n args[0] && removeClass(element, args[0]);\n args[1] && addClass(element, args[1]);\n}\n\nexport function hasClass(element, cls) {\n [cls] = getClasses(cls);\n return !!cls && toNodes(element).some((node) => node.classList.contains(cls));\n}\n\nexport function toggleClass(element, cls, force) {\n const classes = getClasses(cls);\n\n if (!isUndefined(force)) {\n force = !!force;\n }\n\n for (const node of toNodes(element)) {\n for (const cls of classes) {\n node.classList.toggle(cls, force);\n }\n }\n}\n\nfunction apply(element, args, fn) {\n args = args.reduce((args, arg) => args.concat(getClasses(arg)), []);\n\n for (const node of toNodes(element)) {\n node.classList[fn](...args);\n }\n}\n\nfunction getClasses(str) {\n return String(str).split(/\\s|,/).filter(Boolean);\n}\n","import { attr } from './attr';\nimport { once, trigger } from './event';\nimport { css, propName } from './style';\nimport { startsWith, toNodes } from './lang';\nimport { addClass, hasClass, removeClass, removeClasses } from './class';\n\nfunction transition(element, props, duration = 400, timing = 'linear') {\n duration = Math.round(duration);\n return Promise.all(\n toNodes(element).map(\n (element) =>\n new Promise((resolve, reject) => {\n for (const name in props) {\n const value = css(element, name);\n if (value === '') {\n css(element, name, value);\n }\n }\n\n const timer = setTimeout(() => trigger(element, 'transitionend'), duration);\n\n once(\n element,\n 'transitionend transitioncanceled',\n ({ type }) => {\n clearTimeout(timer);\n removeClass(element, 'uk-transition');\n css(element, {\n transitionProperty: '',\n transitionDuration: '',\n transitionTimingFunction: '',\n });\n type === 'transitioncanceled' ? reject() : resolve(element);\n },\n { self: true }\n );\n\n addClass(element, 'uk-transition');\n css(element, {\n transitionProperty: Object.keys(props).map(propName).join(','),\n transitionDuration: `${duration}ms`,\n transitionTimingFunction: timing,\n ...props,\n });\n })\n )\n );\n}\n\nexport const Transition = {\n start: transition,\n\n async stop(element) {\n trigger(element, 'transitionend');\n await Promise.resolve();\n },\n\n async cancel(element) {\n trigger(element, 'transitioncanceled');\n await Promise.resolve();\n },\n\n inProgress(element) {\n return hasClass(element, 'uk-transition');\n },\n};\n\nconst animationPrefix = 'uk-animation-';\n\nfunction animate(element, animation, duration = 200, origin, out) {\n return Promise.all(\n toNodes(element).map(\n (element) =>\n new Promise((resolve, reject) => {\n trigger(element, 'animationcanceled');\n const timer = setTimeout(() => trigger(element, 'animationend'), duration);\n\n once(\n element,\n 'animationend animationcanceled',\n ({ type }) => {\n clearTimeout(timer);\n\n type === 'animationcanceled' ? reject() : resolve(element);\n\n css(element, 'animationDuration', '');\n removeClasses(element, `${animationPrefix}\\\\S*`);\n },\n { self: true }\n );\n\n css(element, 'animationDuration', `${duration}ms`);\n addClass(element, animation, animationPrefix + (out ? 'leave' : 'enter'));\n\n if (startsWith(animation, animationPrefix)) {\n origin && addClass(element, `uk-transform-origin-${origin}`);\n out && addClass(element, `${animationPrefix}reverse`);\n }\n })\n )\n );\n}\n\nconst inProgressRe = new RegExp(`${animationPrefix}(enter|leave)`);\n\nexport const Animation = {\n in: animate,\n\n out(element, animation, duration, origin) {\n return animate(element, animation, duration, origin, true);\n },\n\n inProgress(element) {\n return inProgressRe.test(attr(element, 'class'));\n },\n\n cancel(element) {\n trigger(element, 'animationcanceled');\n },\n};\n","import { css } from './style';\nimport {\n each,\n isDocument,\n isElement,\n isString,\n isUndefined,\n isWindow,\n memoize,\n toFloat,\n toNode,\n toWindow,\n ucfirst,\n} from './lang';\n\nconst dirs = {\n width: ['left', 'right'],\n height: ['top', 'bottom'],\n};\n\nexport function dimensions(element) {\n const rect = isElement(element)\n ? toNode(element).getBoundingClientRect()\n : { height: height(element), width: width(element), top: 0, left: 0 };\n\n return {\n height: rect.height,\n width: rect.width,\n top: rect.top,\n left: rect.left,\n bottom: rect.top + rect.height,\n right: rect.left + rect.width,\n };\n}\n\nexport function offset(element, coordinates) {\n const currentOffset = dimensions(element);\n\n if (element) {\n const { scrollY, scrollX } = toWindow(element);\n const offsetBy = { height: scrollY, width: scrollX };\n\n for (const dir in dirs) {\n for (const prop of dirs[dir]) {\n currentOffset[prop] += offsetBy[dir];\n }\n }\n }\n\n if (!coordinates) {\n return currentOffset;\n }\n\n const pos = css(element, 'position');\n\n each(css(element, ['left', 'top']), (value, prop) =>\n css(\n element,\n prop,\n coordinates[prop] -\n currentOffset[prop] +\n toFloat(pos === 'absolute' && value === 'auto' ? position(element)[prop] : value)\n )\n );\n}\n\nexport function position(element) {\n let { top, left } = offset(element);\n\n const {\n ownerDocument: { body, documentElement },\n offsetParent,\n } = toNode(element);\n let parent = offsetParent || documentElement;\n\n while (\n parent &&\n (parent === body || parent === documentElement) &&\n css(parent, 'position') === 'static'\n ) {\n parent = parent.parentNode;\n }\n\n if (isElement(parent)) {\n const parentOffset = offset(parent);\n top -= parentOffset.top + toFloat(css(parent, 'borderTopWidth'));\n left -= parentOffset.left + toFloat(css(parent, 'borderLeftWidth'));\n }\n\n return {\n top: top - toFloat(css(element, 'marginTop')),\n left: left - toFloat(css(element, 'marginLeft')),\n };\n}\n\nexport function offsetPosition(element) {\n element = toNode(element);\n\n const offset = [element.offsetTop, element.offsetLeft];\n\n while ((element = element.offsetParent)) {\n offset[0] += element.offsetTop + toFloat(css(element, `borderTopWidth`));\n offset[1] += element.offsetLeft + toFloat(css(element, `borderLeftWidth`));\n\n if (css(element, 'position') === 'fixed') {\n const win = toWindow(element);\n offset[0] += win.scrollY;\n offset[1] += win.scrollX;\n return offset;\n }\n }\n\n return offset;\n}\n\nexport const height = dimension('height');\nexport const width = dimension('width');\n\nfunction dimension(prop) {\n const propName = ucfirst(prop);\n return (element, value) => {\n if (isUndefined(value)) {\n if (isWindow(element)) {\n return element[`inner${propName}`];\n }\n\n if (isDocument(element)) {\n const doc = element.documentElement;\n return Math.max(doc[`offset${propName}`], doc[`scroll${propName}`]);\n }\n\n element = toNode(element);\n\n value = css(element, prop);\n value = value === 'auto' ? element[`offset${propName}`] : toFloat(value) || 0;\n\n return value - boxModelAdjust(element, prop);\n } else {\n return css(\n element,\n prop,\n !value && value !== 0 ? '' : +value + boxModelAdjust(element, prop) + 'px'\n );\n }\n };\n}\n\nexport function boxModelAdjust(element, prop, sizing = 'border-box') {\n return css(element, 'boxSizing') === sizing\n ? dirs[prop]\n .map(ucfirst)\n .reduce(\n (value, prop) =>\n value +\n toFloat(css(element, `padding${prop}`)) +\n toFloat(css(element, `border${prop}Width`)),\n 0\n )\n : 0;\n}\n\nexport function flipPosition(pos) {\n for (const dir in dirs) {\n for (const i in dirs[dir]) {\n if (dirs[dir][i] === pos) {\n return dirs[dir][1 - i];\n }\n }\n }\n return pos;\n}\n\nexport function toPx(value, property = 'width', element = window, offsetDim = false) {\n if (!isString(value)) {\n return toFloat(value);\n }\n\n return parseCalc(value).reduce((result, value) => {\n const unit = parseUnit(value);\n if (unit) {\n value = percent(\n unit === 'vh'\n ? height(toWindow(element))\n : unit === 'vw'\n ? width(toWindow(element))\n : offsetDim\n ? element[`offset${ucfirst(property)}`]\n : dimensions(element)[property],\n value\n );\n }\n\n return result + toFloat(value);\n }, 0);\n}\n\nconst calcRe = /-?\\d+(?:\\.\\d+)?(?:v[wh]|%|px)?/g;\nconst parseCalc = memoize((calc) => calc.toString().replace(/\\s/g, '').match(calcRe) || []);\nconst unitRe = /(?:v[hw]|%)$/;\nconst parseUnit = memoize((str) => (str.match(unitRe) || [])[0]);\n\nfunction percent(base, value) {\n return (base * toFloat(value)) / 100;\n}\n","import { once } from './event';\nimport { parent } from './filter';\nimport { find, findAll } from './selector';\nimport { isElement, isString, isUndefined, startsWith, toNode, toNodes } from './lang';\n\nexport function ready(fn) {\n if (document.readyState !== 'loading') {\n fn();\n return;\n }\n\n once(document, 'DOMContentLoaded', fn);\n}\n\nexport function isTag(element, tagName) {\n return element?.tagName?.toLowerCase() === tagName.toLowerCase();\n}\n\nexport function empty(element) {\n element = $(element);\n element.innerHTML = '';\n return element;\n}\n\nexport function html(parent, html) {\n return isUndefined(html) ? $(parent).innerHTML : append(empty(parent), html);\n}\n\nexport const prepend = applyFn('prepend');\nexport const append = applyFn('append');\nexport const before = applyFn('before');\nexport const after = applyFn('after');\n\nfunction applyFn(fn) {\n return function (ref, element) {\n const nodes = toNodes(isString(element) ? fragment(element) : element);\n $(ref)?.[fn](...nodes);\n return unwrapSingle(nodes);\n };\n}\n\nexport function remove(element) {\n toNodes(element).forEach((element) => element.remove());\n}\n\nexport function wrapAll(element, structure) {\n structure = toNode(before(element, structure));\n\n while (structure.firstChild) {\n structure = structure.firstChild;\n }\n\n append(structure, element);\n\n return structure;\n}\n\nexport function wrapInner(element, structure) {\n return toNodes(\n toNodes(element).map((element) =>\n element.hasChildNodes()\n ? wrapAll(toNodes(element.childNodes), structure)\n : append(element, structure)\n )\n );\n}\n\nexport function unwrap(element) {\n toNodes(element)\n .map(parent)\n .filter((value, index, self) => self.indexOf(value) === index)\n .forEach((parent) => parent.replaceWith(...parent.childNodes));\n}\n\nconst fragmentRe = /^\\s*<(\\w+|!)[^>]*>/;\nconst singleTagRe = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/;\n\nexport function fragment(html) {\n const matches = singleTagRe.exec(html);\n if (matches) {\n return document.createElement(matches[1]);\n }\n\n const container = document.createElement('div');\n if (fragmentRe.test(html)) {\n container.insertAdjacentHTML('beforeend', html.trim());\n } else {\n container.textContent = html;\n }\n\n return unwrapSingle(container.childNodes);\n}\n\nfunction unwrapSingle(nodes) {\n return nodes.length > 1 ? nodes : nodes[0];\n}\n\nexport function apply(node, fn) {\n if (!isElement(node)) {\n return;\n }\n\n fn(node);\n node = node.firstElementChild;\n while (node) {\n const next = node.nextElementSibling;\n apply(node, fn);\n node = next;\n }\n}\n\nexport function $(selector, context) {\n return isHtml(selector) ? toNode(fragment(selector)) : find(selector, context);\n}\n\nexport function $$(selector, context) {\n return isHtml(selector) ? toNodes(fragment(selector)) : findAll(selector, context);\n}\n\nfunction isHtml(str) {\n return isString(str) && startsWith(str.trim(), '<');\n}\n","export const inBrowser = typeof window !== 'undefined';\nexport const isRtl = inBrowser && document.dir === 'rtl';\n\nexport const hasTouch = inBrowser && 'ontouchstart' in window;\nconst hasPointerEvents = inBrowser && window.PointerEvent;\n\nexport const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';\nexport const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';\nexport const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';\nexport const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';\nexport const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';\nexport const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';\n","import { on } from './event';\nimport { toNodes } from './lang';\nimport { inBrowser } from './env';\n\nexport function observeIntersection(targets, cb, options, intersecting = true) {\n const observer = new IntersectionObserver(\n intersecting\n ? (entries, observer) => {\n if (entries.some((entry) => entry.isIntersecting)) {\n cb(entries, observer);\n }\n }\n : cb,\n options\n );\n for (const el of toNodes(targets)) {\n observer.observe(el);\n }\n\n return observer;\n}\n\nconst hasResizeObserver = inBrowser && window.ResizeObserver;\nexport function observeResize(targets, cb, options = { box: 'border-box' }) {\n if (hasResizeObserver) {\n return observe(ResizeObserver, targets, cb, options);\n }\n\n // Fallback Safari < 13.1\n initResizeListener();\n listeners.add(cb);\n\n return {\n disconnect() {\n listeners.delete(cb);\n },\n };\n}\n\nlet listeners;\nfunction initResizeListener() {\n if (listeners) {\n return;\n }\n\n listeners = new Set();\n\n // throttle 'resize'\n let pendingResize;\n const handleResize = () => {\n if (pendingResize) {\n return;\n }\n pendingResize = true;\n requestAnimationFrame(() => (pendingResize = false));\n for (const listener of listeners) {\n listener();\n }\n };\n\n on(window, 'load resize', handleResize);\n on(document, 'loadedmetadata load', handleResize, true);\n}\n\nexport function observeMutation(targets, cb, options) {\n return observe(MutationObserver, targets, cb, options);\n}\n\nfunction observe(Observer, targets, cb, options) {\n const observer = new Observer(cb);\n for (const el of toNodes(targets)) {\n observer.observe(el, options);\n }\n\n return observer;\n}\n","import { css } from './style';\nimport { isVisible, parents } from './filter';\nimport { offset, offsetPosition } from './dimensions';\nimport { clamp, findIndex, intersectRect, isWindow, toFloat, toWindow, ucfirst } from './lang';\n\nexport function isInView(element, offsetTop = 0, offsetLeft = 0) {\n if (!isVisible(element)) {\n return false;\n }\n\n return intersectRect(\n ...scrollParents(element)\n .map((parent) => {\n const { top, left, bottom, right } = offsetViewport(parent);\n\n return {\n top: top - offsetTop,\n left: left - offsetLeft,\n bottom: bottom + offsetTop,\n right: right + offsetLeft,\n };\n })\n .concat(offset(element))\n );\n}\n\nexport function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {\n const parents = isVisible(element) ? scrollParents(element) : [];\n return parents.reduce(\n (fn, scrollElement, i) => {\n const { scrollTop, scrollHeight, offsetHeight } = scrollElement;\n const viewport = offsetViewport(scrollElement);\n const maxScroll = scrollHeight - viewport.height;\n const { height: elHeight, top: elTop } = parents[i - 1]\n ? offsetViewport(parents[i - 1])\n : offset(element);\n\n let top = Math.ceil(elTop - viewport.top - offsetBy + scrollTop);\n\n if (offsetBy > 0 && offsetHeight < elHeight + offsetBy) {\n top += offsetBy;\n } else {\n offsetBy = 0;\n }\n\n if (top > maxScroll) {\n offsetBy -= top - maxScroll;\n top = maxScroll;\n } else if (top < 0) {\n offsetBy -= top;\n top = 0;\n }\n\n return () => scrollTo(scrollElement, top - scrollTop).then(fn);\n },\n () => Promise.resolve()\n )();\n\n function scrollTo(element, top) {\n return new Promise((resolve) => {\n const scroll = element.scrollTop;\n const duration = getDuration(Math.abs(top));\n const start = Date.now();\n\n (function step() {\n const percent = ease(clamp((Date.now() - start) / duration));\n\n element.scrollTop = scroll + top * percent;\n\n // scroll more if we have not reached our destination\n if (percent === 1) {\n resolve();\n } else {\n requestAnimationFrame(step);\n }\n })();\n });\n }\n\n function getDuration(dist) {\n return 40 * Math.pow(dist, 0.375);\n }\n\n function ease(k) {\n return 0.5 * (1 - Math.cos(Math.PI * k));\n }\n}\n\nexport function scrolledOver(element, startOffset = 0, endOffset = 0) {\n if (!isVisible(element)) {\n return 0;\n }\n\n const [scrollElement] = scrollParents(element, /auto|scroll/, true);\n const { scrollHeight, scrollTop } = scrollElement;\n const { height: viewportHeight } = offsetViewport(scrollElement);\n const maxScroll = scrollHeight - viewportHeight;\n const elementOffsetTop = offsetPosition(element)[0] - offsetPosition(scrollElement)[0];\n\n const start = Math.max(0, elementOffsetTop - viewportHeight + startOffset);\n const end = Math.min(maxScroll, elementOffsetTop + element.offsetHeight - endOffset);\n\n return clamp((scrollTop - start) / (end - start));\n}\n\nexport function scrollParents(element, overflowRe = /auto|scroll|hidden|clip/, scrollable = false) {\n const scrollEl = scrollingElement(element);\n\n let ancestors = parents(element).reverse();\n ancestors = ancestors.slice(ancestors.indexOf(scrollEl) + 1);\n\n const fixedIndex = findIndex(ancestors, (el) => css(el, 'position') === 'fixed');\n if (~fixedIndex) {\n ancestors = ancestors.slice(fixedIndex);\n }\n\n return [scrollEl]\n .concat(\n ancestors.filter(\n (parent) =>\n overflowRe.test(css(parent, 'overflow')) &&\n (!scrollable || parent.scrollHeight > offsetViewport(parent).height)\n )\n )\n .reverse();\n}\n\nexport function offsetViewport(scrollElement) {\n const window = toWindow(scrollElement);\n const {\n document: { documentElement },\n } = window;\n let viewportElement =\n scrollElement === scrollingElement(scrollElement) ? window : scrollElement;\n\n const { visualViewport } = window;\n if (isWindow(viewportElement) && visualViewport) {\n let { height, width, scale, pageTop: top, pageLeft: left } = visualViewport;\n height = Math.round(height * scale);\n width = Math.round(width * scale);\n return { height, width, top, left, bottom: top + height, right: left + width };\n }\n\n let rect = offset(viewportElement);\n for (let [prop, dir, start, end] of [\n ['width', 'x', 'left', 'right'],\n ['height', 'y', 'top', 'bottom'],\n ]) {\n if (isWindow(viewportElement)) {\n // iOS 12 returns as scrollingElement\n viewportElement = documentElement;\n } else {\n rect[start] += toFloat(css(viewportElement, `border-${start}-width`));\n }\n rect[prop] = rect[dir] = viewportElement[`client${ucfirst(prop)}`];\n rect[end] = rect[prop] + rect[start];\n }\n return rect;\n}\n\nfunction scrollingElement(element) {\n return toWindow(element).document.scrollingElement;\n}\n","import { observeResize } from 'uikit-util';\n\nexport default {\n connected() {\n this.registerObserver(\n observeResize(this.$options.resizeTargets?.call(this) || this.$el, () =>\n this.$emit('resize')\n )\n );\n },\n};\n","import { on } from 'uikit-util';\n\nexport default {\n connected() {\n registerScrollListener(this._uid, () => this.$emit('scroll'));\n },\n\n disconnected() {\n unregisterScrollListener(this._uid);\n },\n};\n\nconst scrollListeners = new Map();\nlet unbindScrollListener;\nexport function registerScrollListener(id, listener) {\n unbindScrollListener =\n unbindScrollListener ||\n on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {\n passive: true,\n capture: true,\n });\n\n scrollListeners.set(id, listener);\n}\n\nexport function unregisterScrollListener(id) {\n scrollListeners.delete(id);\n if (unbindScrollListener && !scrollListeners.size) {\n unbindScrollListener();\n unbindScrollListener = null;\n }\n}\n","import {\n createEvent,\n css,\n isNumeric,\n isString,\n on,\n startsWith,\n toFloat,\n trigger,\n} from 'uikit-util';\n\nexport default {\n props: {\n media: Boolean,\n },\n\n data: {\n media: false,\n },\n\n connected() {\n const media = toMedia(this.media, this.$el);\n this.matchMedia = true;\n if (media) {\n this.mediaObj = window.matchMedia(media);\n const handler = () => {\n this.matchMedia = this.mediaObj.matches;\n trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));\n };\n this.offMediaObj = on(this.mediaObj, 'change', () => {\n handler();\n this.$emit('resize');\n });\n handler();\n }\n },\n\n disconnected() {\n this.offMediaObj?.();\n },\n};\n\nfunction toMedia(value, element) {\n if (isString(value)) {\n if (startsWith(value, '@')) {\n value = toFloat(css(element, `--uk-breakpoint-${value.substr(1)}`));\n } else if (isNaN(value)) {\n return value;\n }\n }\n\n return value && isNumeric(value) ? `(min-width: ${value}px)` : '';\n}\n","import {\n $,\n $$,\n after,\n append,\n attr,\n includes,\n isTag,\n isVoidElement,\n memoize,\n noop,\n observeIntersection,\n once,\n remove,\n removeAttr,\n startsWith,\n toFloat,\n} from 'uikit-util';\n\nexport default {\n args: 'src',\n\n props: {\n id: Boolean,\n icon: String,\n src: String,\n style: String,\n width: Number,\n height: Number,\n ratio: Number,\n class: String,\n strokeAnimation: Boolean,\n attributes: 'list',\n },\n\n data: {\n ratio: 1,\n include: ['style', 'class'],\n class: '',\n strokeAnimation: false,\n },\n\n beforeConnect() {\n this.class += ' uk-svg';\n },\n\n connected() {\n if (!this.icon && includes(this.src, '#')) {\n [this.src, this.icon] = this.src.split('#');\n }\n\n this.svg = this.getSvg().then((el) => {\n if (this._connected) {\n const svg = insertSVG(el, this.$el);\n\n if (this.svgEl && svg !== this.svgEl) {\n remove(this.svgEl);\n }\n\n this.applyAttributes(svg, el);\n\n return (this.svgEl = svg);\n }\n }, noop);\n\n if (this.strokeAnimation) {\n this.svg.then((el) => {\n if (this._connected) {\n applyAnimation(el);\n this.registerObserver(\n observeIntersection(el, (records, observer) => {\n applyAnimation(el);\n observer.disconnect();\n })\n );\n }\n });\n }\n },\n\n disconnected() {\n this.svg.then((svg) => {\n if (this._connected) {\n return;\n }\n\n if (isVoidElement(this.$el)) {\n this.$el.hidden = false;\n }\n\n remove(svg);\n this.svgEl = null;\n });\n\n this.svg = null;\n },\n\n methods: {\n async getSvg() {\n if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {\n return new Promise((resolve) =>\n once(this.$el, 'load', () => resolve(this.getSvg()))\n );\n }\n\n return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');\n },\n\n applyAttributes(el, ref) {\n for (const prop in this.$options.props) {\n if (includes(this.include, prop) && prop in this) {\n attr(el, prop, this[prop]);\n }\n }\n\n for (const attribute in this.attributes) {\n const [prop, value] = this.attributes[attribute].split(':', 2);\n attr(el, prop, value);\n }\n\n if (!this.id) {\n removeAttr(el, 'id');\n }\n\n const props = ['width', 'height'];\n let dimensions = props.map((prop) => this[prop]);\n\n if (!dimensions.some((val) => val)) {\n dimensions = props.map((prop) => attr(ref, prop));\n }\n\n const viewBox = attr(ref, 'viewBox');\n if (viewBox && !dimensions.some((val) => val)) {\n dimensions = viewBox.split(' ').slice(2);\n }\n\n dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));\n },\n },\n};\n\nconst loadSVG = memoize(async (src) => {\n if (src) {\n if (startsWith(src, 'data:')) {\n return decodeURIComponent(src.split(',')[1]);\n } else {\n return (await fetch(src)).text();\n }\n } else {\n return Promise.reject();\n }\n});\n\nfunction parseSVG(svg, icon) {\n if (icon && includes(svg, '
/g;\nconst symbols = {};\n\nfunction parseSymbols(svg, icon) {\n if (!symbols[svg]) {\n symbols[svg] = {};\n\n symbolRe.lastIndex = 0;\n\n let match;\n while ((match = symbolRe.exec(svg))) {\n symbols[svg][match[3]] = `