PageSourceSearch

https://mountaincabinsutah.com/wp-content/plugins/homerunner/assets/vendor/uikit/js/uikit.js?ver=2.6.7

js mountaincabinsutah.com collected 2026-10-10 02:01:23 UTC 329,817 bytes, 9,897 lines download raw bytes

vendor: 18,331 bytes, lines 1-519
1/*! hkUIkit 3.21.16 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
3(function (global, factory) {
4    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
5    typeof define === 'function' && define.amd ? define('uikit', factory) :
6    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.hkUIkit = factory());
7})(this, (function () { 'use strict';
8
9    const { hasOwnProperty, toString } = Object.prototype;
10    function hasOwn(obj, key) {
11      return hasOwnProperty.call(obj, key);
12    }
13    const hyphenateRe = /\B([A-Z])/g;
14    const hyphenate = memoize((str) => str.replace(hyphenateRe, "-$1").toLowerCase());
15    const camelizeRe = /-(\w)/g;
16    const camelize = memoize(
17      (str) => (str.charAt(0).toLowerCase() + str.slice(1)).replace(camelizeRe, (_, c) => c.toUpperCase())
18    );
19    const ucfirst = memoize((str) => str.charAt(0).toUpperCase() + str.slice(1));
20    function startsWith(str, search) {
21      var _a;
22      return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
23    }
24    function endsWith(str, search) {
25      var _a;
26      return (_a = str == null ? void 0 : str.endsWith) == null ? void 0 : _a.call(str, search);
27    }
28    function includes(obj, search) {
29      var _a;
30      return (_a = obj == null ? void 0 : obj.includes) == null ? void 0 : _a.call(obj, search);
31    }
32    function findIndex(array, predicate) {
33      var _a;
34      return (_a = array == null ? void 0 : array.findIndex) == null ? void 0 : _a.call(array, predicate);
35    }
36    const { isArray, from: toArray } = Array;
37    const { assign } = Object;
38    function isFunction(obj) {
39      return typeof obj === "function";
40    }
41    function isObject(obj) {
42      return obj !== null && typeof obj === "object";
43    }
44    function isPlainObject(obj) {
45      return toString.call(obj) === "[object Object]";
46    }
47    function isWindow(obj) {
48      return isObject(obj) && obj === obj.window;
49    }
50    function isDocument(obj) {
51      return nodeType(obj) === 9;
52    }
53    function isNode(obj) {
54      return nodeType(obj) >= 1;
55    }
56    function isElement(obj) {
57      return nodeType(obj) === 1;
58    }
59    function nodeType(obj) {
60      return !isWindow(obj) && isObject(obj) && obj.nodeType;
61    }
62    function isBoolean(value) {
63      return typeof value === "boolean";
64    }
65    function isString(value) {
66      return typeof value === "string";
67    }
68    function isNumber(value) {
69      return typeof value === "number";
70    }
71    function isNumeric(value) {
72      return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value));
73    }
74    function isEmpty(obj) {
75      return !(isArray(obj) ? obj.length : isObject(obj) ? Object.keys(obj).length : false);
76    }
77    function isUndefined(value) {
78      return value === void 0;
79    }
80    function toBoolean(value) {
81      return isBoolean(value) ? value : value === "true" || value === "1" || value === "" ? true : value === "false" || value === "0" ? false : value;
82    }
83    function toNumber(value) {
84      const number = Number(value);
85      return isNaN(number) ? false : number;
86    }
87    function toFloat(value) {
88      return parseFloat(value) || 0;
89    }
90    function toNode(element) {
91      return element && toNodes(element)[0];
92    }
93    function toNodes(element) {
94      return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
95    }
96    function toWindow(element) {
97      if (isWindow(element)) {
98        return element;
99      }
100      element = toNode(element);
101      const document = isDocument(element) ? element : element == null ? void 0 : element.ownerDocument;
102      return (document == null ? void 0 : document.defaultView) || window;
103    }
104    function isEqual(value, other) {
105      return value === other || isObject(value) && isObject(other) && Object.keys(value).length === Object.keys(other).length && each(value, (val, key) => val === other[key]);
106    }
107    function swap(value, a, b) {
108      return value.replace(new RegExp(`${a}|${b}`, "g"), (match) => match === a ? b : a);
109    }
110    function last(array) {
111      return array[array.length - 1];
112    }
113    function each(obj, cb) {
114      for (const key in obj) {
115        if (false === cb(obj[key], key)) {
116          return false;
117        }
118      }
119      return true;
120    }
121    function sortBy(array, prop) {
122      return array.slice().sort(
123        ({ [prop]: propA = 0 }, { [prop]: propB = 0 }) => propA > propB ? 1 : propB > propA ? -1 : 0
124      );
125    }
126    function sumBy(array, iteratee) {
127      return array.reduce(
128        (sum, item) => sum + toFloat(isFunction(iteratee) ? iteratee(item) : item[iteratee]),
129        0
130      );
131    }
132    function uniqueBy(array, prop) {
133      const seen = /* @__PURE__ */ new Set();
134      return array.filter(({ [prop]: check }) => seen.has(check) ? false : seen.add(check));
135    }
136    function pick(obj, props) {
137      return props.reduce((res, prop) => ({ ...res, [prop]: obj[prop] }), {});
138    }
139    function clamp(number, min = 0, max = 1) {
140      return Math.min(Math.max(toNumber(number) || 0, min), max);
141    }
142    function noop() {
143    }
144    function intersectRect(...rects) {
145      return [
146        ["bottom", "top"],
147        ["right", "left"]
148      ].every(
149        ([minProp, maxProp]) => Math.min(...rects.map(({ [minProp]: min }) => min)) - Math.max(...rects.map(({ [maxProp]: max }) => max)) > 0
150      );
151    }
152    function pointInRect(point, rect) {
153      return point.x <= rect.right && point.x >= rect.left && point.y <= rect.bottom && point.y >= rect.top;
154    }
155    function ratio(dimensions, prop, value) {
156      const aProp = prop === "width" ? "height" : "width";
157      return {
158        [aProp]: dimensions[prop] ? Math.round(value * dimensions[aProp] / dimensions[prop]) : dimensions[aProp],
159        [prop]: value
160      };
161    }
162    function contain(dimensions, maxDimensions) {
163      dimensions = { ...dimensions };
164      for (const prop in dimensions) {
165        dimensions = dimensions[prop] > maxDimensions[prop] ? ratio(dimensions, prop, maxDimensions[prop]) : dimensions;
166      }
167      return dimensions;
168    }
169    function cover$1(dimensions, maxDimensions) {
170      dimensions = contain(dimensions, maxDimensions);
171      for (const prop in dimensions) {
172        dimensions = dimensions[prop] < maxDimensions[prop] ? ratio(dimensions, prop, maxDimensions[prop]) : dimensions;
173      }
174      return dimensions;
175    }
176    const Dimensions = { ratio, contain, cover: cover$1 };
177    function getIndex(i, elements, current = 0, finite = false) {
178      elements = toNodes(elements);
179      const { length } = elements;
180      if (!length) {
181        return -1;
182      }
183      i = isNumeric(i) ? toNumber(i) : i === "next" ? current + 1 : i === "previous" ? current - 1 : i === "last" ? length - 1 : elements.indexOf(toNode(i));
184      if (finite) {
185        return clamp(i, 0, length - 1);
186      }
187      i %= length;
188      return i < 0 ? i + length : i;
189    }
190    function memoize(fn) {
191      const cache = /* @__PURE__ */ Object.create(null);
192      return (key, ...args) => cache[key] || (cache[key] = fn(key, ...args));
193    }
194
195    function addClass(element, ...classes) {
196      for (const node of toNodes(element)) {
197        const add = toClasses(classes).filter((cls) => !hasClass(node, cls));
198        if (add.length) {
199          node.classList.add(...add);
200        }
201      }
202    }
203    function removeClass(element, ...classes) {
204      for (const node of toNodes(element)) {
205        const remove = toClasses(classes).filter((cls) => hasClass(node, cls));
206        if (remove.length) {
207          node.classList.remove(...remove);
208        }
209      }
210    }
211    function replaceClass(element, oldClass, newClass) {
212      newClass = toClasses(newClass);
213      oldClass = toClasses(oldClass).filter((cls) => !includes(newClass, cls));
214      removeClass(element, oldClass);
215      addClass(element, newClass);
216    }
217    function hasClass(element, cls) {
218      [cls] = toClasses(cls);
219      return toNodes(element).some((node) => node.classList.contains(cls));
220    }
221    function toggleClass(element, cls, force) {
222      const classes = toClasses(cls);
223      if (!isUndefined(force)) {
224        force = !!force;
225      }
226      for (const node of toNodes(element)) {
227        for (const cls2 of classes) {
228          node.classList.toggle(cls2, force);
229        }
230      }
231    }
232    function toClasses(str) {
233      return str ? isArray(str) ? str.map(toClasses).flat() : String(str).split(" ").filter(Boolean) : [];
234    }
235
236    function attr(element, name, value) {
237      var _a;
238      if (isObject(name)) {
239        for (const key in name) {
240          attr(element, key, name[key]);
241        }
242        return;
243      }
244      if (isUndefined(value)) {
245        return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
246      } else {
247        for (const el of toNodes(element)) {
248          if (isFunction(value)) {
249            value = value.call(el, attr(el, name));
250          }
251          if (value === null) {
252            removeAttr(el, name);
253          } else {
254            el.setAttribute(name, value);
255          }
256        }
257      }
258    }
259    function hasAttr(element, name) {
260      return toNodes(element).some((element2) => element2.hasAttribute(name));
261    }
262    function removeAttr(element, name) {
263      toNodes(element).forEach((element2) => element2.removeAttribute(name));
264    }
265    function data(element, attribute) {
266      for (const name of [attribute, `data-${attribute}`]) {
267        if (hasAttr(element, name)) {
268          return attr(element, name);
269        }
270      }
271    }
272
273    const inBrowser = typeof window !== "undefined";
274    const isRtl = inBrowser && document.dir === "rtl";
275    const hasTouch = inBrowser && "ontouchstart" in window;
276    const hasPointerEvents = inBrowser && window.PointerEvent;
277    const pointerDown$1 = hasPointerEvents ? "pointerdown" : hasTouch ? "touchstart" : "mousedown";
278    const pointerMove$1 = hasPointerEvents ? "pointermove" : hasTouch ? "touchmove" : "mousemove";
279    const pointerUp$1 = hasPointerEvents ? "pointerup" : hasTouch ? "touchend" : "mouseup";
280    const pointerEnter = hasPointerEvents ? "pointerenter" : hasTouch ? "" : "mouseenter";
281    const pointerLeave = hasPointerEvents ? "pointerleave" : hasTouch ? "" : "mouseleave";
282    const pointerCancel = hasPointerEvents ? "pointercancel" : "touchcancel";
283
284    const voidElements = {
285      area: true,
286      base: true,
287      br: true,
288      col: true,
289      embed: true,
290      hr: true,
291      img: true,
292      input: true,
293      keygen: true,
294      link: true,
295      meta: true,
296      param: true,
297      source: true,
298      track: true,
299      wbr: true
300    };
301    function isVoidElement(element) {
302      return toNodes(element).some((element2) => voidElements[element2.tagName.toLowerCase()]);
303    }
304    const isVisibleFn = inBrowser && Element.prototype.checkVisibility || function() {
305      return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
306    };
307    function isVisible(element) {
308      return toNodes(element).some((element2) => isVisibleFn.call(element2));
309    }
310    const selInput = "input,select,textarea,button";
311    function isInput(element) {
312      return toNodes(element).some((element2) => matches(element2, selInput));
313    }
314    const selFocusable = `${selInput},a[href],[tabindex]`;
315    function isFocusable(element) {
316      return matches(element, selFocusable);
317    }
318    function parent(element) {
319      var _a;
320      return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
321    }
322    function filter$1(element, selector) {
323      return toNodes(element).filter((element2) => matches(element2, selector));
324    }
325    function matches(element, selector) {
326      return toNodes(element).some((element2) => element2.matches(selector));
327    }
328    function parents(element, selector) {
329      const elements = [];
330      while (element = parent(element)) {
331        if (!selector || matches(element, selector)) {
332          elements.push(element);
333        }
334      }
335      return elements;
336    }
337    function children(element, selector) {
338      element = toNode(element);
339      const children2 = element ? toArray(element.children) : [];
340      return selector ? filter$1(children2, selector) : children2;
341    }
342    function index(element, ref) {
343      return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
344    }
345    function isSameSiteAnchor(el) {
346      el = toNode(el);
347      return el && ["origin", "pathname", "search"].every((part) => el[part] === location[part]);
348    }
349    function getTargetedElement(el) {
350      if (isSameSiteAnchor(el)) {
351        const { hash, ownerDocument } = toNode(el);
352        const id = decodeURIComponent(hash).slice(1);
353        return id ? ownerDocument.getElementById(id) || ownerDocument.getElementsByName(id)[0] : ownerDocument.documentElement;
354      }
355    }
356
357    function query(selector, context) {
358      return find(selector, getContext(selector, context));
359    }
360    function queryAll(selector, context) {
361      return findAll(selector, getContext(selector, context));
362    }
363    function find(selector, context) {
364      return toNode(_query(selector, toNode(context), "querySelector"));
365    }
366    function findAll(selector, context) {
367      return toNodes(_query(selector, toNode(context), "querySelectorAll"));
368    }
369    function getContext(selector, context = document) {
370      return isDocument(context) || parseSelector(selector).isContextSelector ? context : context.ownerDocument;
371    }
372    const addStarRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
373    const splitSelectorRe = /(\([^)]*\)|[^,])+/g;
374    const parseSelector = memoize((selector) => {
375      let isContextSelector = false;
376      if (!selector || !isString(selector)) {
377        return {};
378      }
379      const selectors = [];
380      for (let sel of selector.match(splitSelectorRe)) {
381        sel = sel.trim().replace(addStarRe, "$1 *");
382        isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
383        selectors.push(sel);
384      }
385      return {
386        selector: selectors.join(","),
387        selectors,
388        isContextSelector
389      };
390    });
391    const positionRe = /(\([^)]*\)|\S)*/;
392    const parsePositionSelector = memoize((selector) => {
393      selector = selector.slice(1).trim();
394      const [position] = selector.match(positionRe);
395      return [position, selector.slice(position.length + 1)];
396    });
397    function _query(selector, context = document, queryFn) {
398      const parsed = parseSelector(selector);
399      if (!parsed.isContextSelector) {
400        return parsed.selector ? _doQuery(context, queryFn, parsed.selector) : selector;
401      }
402      selector = "";
403      const isSingle = parsed.selectors.length === 1;
404      for (let sel of parsed.selectors) {
405        let positionSel;
406        let ctx = context;
407        if (sel[0] === "!") {
408          [positionSel, sel] = parsePositionSelector(sel);
409          ctx = context.parentElement.closest(positionSel);
410          if (!sel && isSingle) {
411            return ctx;
412          }
413        }
414        if (ctx && sel[0] === "-") {
415          [positionSel, sel] = parsePositionSelector(sel);
416          ctx = ctx.previousElementSibling;
417          ctx = matches(ctx, positionSel) ? ctx : null;
418          if (!sel && isSingle) {
419            return ctx;
420          }
421        }
422        if (!ctx) {
423          continue;
424        }
425        if (isSingle) {
426          if (sel[0] === "~" || sel[0] === "+") {
427            sel = `:scope > :nth-child(${index(ctx) + 1}) ${sel}`;
428            ctx = ctx.parentElement;
429          } else if (sel[0] === ">") {
430            sel = `:scope ${sel}`;
431          }
432          return _doQuery(ctx, queryFn, sel);
433        }
434        selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
435      }
436      if (!isDocument(context)) {
437        context = context.ownerDocument;
438      }
439      return _doQuery(context, queryFn, selector);
440    }
441    function _doQuery(context, queryFn, selector) {
442      try {
443        return context[queryFn](selector);
444      } catch (e) {
445        return null;
446      }
447    }
448    function domPath(element) {
449      const names = [];
450      while (element.parentNode) {
451        const id = attr(element, "id");
452        if (id) {
453          names.unshift(`#${escape(id)}`);
454          break;
455        } else {
456          let { tagName } = element;
457          if (tagName !== "HTML") {
458            tagName += `:nth-child(${index(element) + 1})`;
459          }
460          names.unshift(tagName);
461          element = element.parentNode;
462        }
463      }
464      return names.join(" > ");
465    }
466    function escape(css) {
467      return isString(css) ? CSS.escape(css) : "";
468    }
469
470    function on(...args) {
471      let [targets, types, selector, listener, useCapture = false] = getArgs(args);
472      if (listener.length > 1) {
473        listener = detail(listener);
474      }
475      if (useCapture == null ? void 0 : useCapture.self) {
476        listener = selfFilter(listener);
477      }
478      if (selector) {
479        listener = delegate(selector, listener);
480      }
481      for (const type of types) {
482        for (const target of targets) {
483          target.addEventListener(type, listener, useCapture);
484        }
485      }
486      return () => off(targets, types, listener, useCapture);
487    }
488    function off(...args) {
489      let [targets, types, , listener, useCapture = false] = getArgs(args);
490      for (const type of types) {
491        for (const target of targets) {
492          target.removeEventListener(type, listener, useCapture);
493        }
494      }
495    }
496    function once(...args) {
497      const [element, types, selector, listener, useCapture = false, condition] = getArgs(args);
498      const off2 = on(
499        element,
500        types,
501        selector,
502        (e) => {
503          const result = !condition || condition(e);
504          if (result) {
505            off2();
506            listener(e, result);
507          }
508        },
509        useCapture
510      );
511      return off2;
512    }
513    function trigger(targets, event, detail2) {
514      return toEventTargets(targets).every(
515        (target) => target.dispatchEvent(createEvent(event, true, true, detail2))
516      );
517    }
518    function createEvent(e, bubbles = true, cancelable = false, detail2) {
519      if (isString(e)) {
vendor: 8,034 bytes, lines 520-764
520        e = new CustomEvent(e, { bubbles, cancelable, detail: detail2 });
521      }
522      return e;
523    }
524    function getArgs(args) {
525      args[0] = toEventTargets(args[0]);
526      if (isString(args[1])) {
527        args[1] = args[1].split(" ");
528      }
529      if (isFunction(args[2])) {
530        args.splice(2, 0, false);
531      }
532      return args;
533    }
534    function delegate(selector, listener) {
535      return (e) => {
536        const current = selector[0] === ">" ? findAll(selector, e.currentTarget).reverse().find((element) => element.contains(e.target)) : e.target.closest(selector);
537        if (current) {
538          e.current = current;
539          listener.call(this, e);
540          delete e.current;
541        }
542      };
543    }
544    function detail(listener) {
545      return (e) => isArray(e.detail) ? listener(e, ...e.detail) : listener(e);
546    }
547    function selfFilter(listener) {
548      return function(e) {
549        if (e.target === e.currentTarget || e.target === e.current) {
550          return listener.call(null, e);
551        }
552      };
553    }
554    function isEventTarget(target) {
555      return target && "addEventListener" in target;
556    }
557    function toEventTarget(target) {
558      return isEventTarget(target) ? target : toNode(target);
559    }
560    function toEventTargets(target) {
561      return isArray(target) ? target.map(toEventTarget).filter(Boolean) : isString(target) ? findAll(target) : isEventTarget(target) ? [target] : toNodes(target);
562    }
563    function isTouch(e) {
564      return e.pointerType === "touch" || !!e.touches;
565    }
566    function getEventPos(e) {
567      var _a, _b;
568      const { clientX: x, clientY: y } = ((_a = e.touches) == null ? void 0 : _a[0]) || ((_b = e.changedTouches) == null ? void 0 : _b[0]) || e;
569      return { x, y };
570    }
571
572    const cssNumber = {
573      "animation-iteration-count": true,
574      "column-count": true,
575      "fill-opacity": true,
576      "flex-grow": true,
577      "flex-shrink": true,
578      "font-weight": true,
579      "line-height": true,
580      opacity: true,
581      order: true,
582      orphans: true,
583      "stroke-dasharray": true,
584      "stroke-dashoffset": true,
585      widows: true,
586      "z-index": true,
587      zoom: true
588    };
589    function css(element, property, value, priority) {
590      const elements = toNodes(element);
591      for (const element2 of elements) {
592        if (isString(property)) {
593          property = propName(property);
594          if (isUndefined(value)) {
595            return getComputedStyle(element2).getPropertyValue(property);
596          } else {
597            element2.style.setProperty(
598              property,
599              isNumeric(value) && !cssNumber[property] ? `${value}px` : value || isNumber(value) ? value : "",
600              priority
601            );
602          }
603        } else if (isArray(property)) {
604          const props = {};
605          for (const prop of property) {
606            props[prop] = css(element2, prop);
607          }
608          return props;
609        } else if (isObject(property)) {
610          for (const prop in property) {
611            css(element2, prop, property[prop], value);
612          }
613        }
614      }
615      return elements[0];
616    }
617    const propName = memoize((name) => {
618      if (startsWith(name, "--")) {
619        return name;
620      }
621      name = hyphenate(name);
622      const { style } = document.documentElement;
623      if (name in style) {
624        return name;
625      }
626      for (const prefix of ["webkit", "moz"]) {
627        const prefixedName = `-${prefix}-${name}`;
628        if (prefixedName in style) {
629          return prefixedName;
630        }
631      }
632    });
633
634    const clsTransition = "hk-transition";
635    const transitionEnd = "transitionend";
636    const transitionCanceled = "transitioncanceled";
637    function transition$1(element, props, duration = 400, timing = "linear") {
638      duration = Math.round(duration);
639      return Promise.all(
640        toNodes(element).map(
641          (element2) => new Promise((resolve, reject) => {
642            for (const name in props) {
643              css(element2, name);
644            }
645            const timer = setTimeout(() => trigger(element2, transitionEnd), duration);
646            once(
647              element2,
648              [transitionEnd, transitionCanceled],
649              ({ type }) => {
650                clearTimeout(timer);
651                removeClass(element2, clsTransition);
652                css(element2, {
653                  transitionProperty: "",
654                  transitionDuration: "",
655                  transitionTimingFunction: ""
656                });
657                type === transitionCanceled ? reject() : resolve(element2);
658              },
659              { self: true }
660            );
661            addClass(element2, clsTransition);
662            css(element2, {
663              transitionProperty: Object.keys(props).map(propName).join(","),
664              transitionDuration: `${duration}ms`,
665              transitionTimingFunction: timing,
666              ...props
667            });
668          })
669        )
670      );
671    }
672    const Transition = {
673      start: transition$1,
674      async stop(element) {
675        trigger(element, transitionEnd);
676        await Promise.resolve();
677      },
678      async cancel(element) {
679        trigger(element, transitionCanceled);
680        await Promise.resolve();
681      },
682      inProgress(element) {
683        return hasClass(element, clsTransition);
684      }
685    };
686    const clsAnimation = "hk-animation";
687    const animationEnd = "animationend";
688    const animationCanceled = "animationcanceled";
689    function animate$2(element, animation, duration = 200, origin, out) {
690      return Promise.all(
691        toNodes(element).map(
692          (element2) => new Promise((resolve, reject) => {
693            if (hasClass(element2, clsAnimation)) {
694              trigger(element2, animationCanceled);
695            }
696            const classes = [
697              animation,
698              clsAnimation,
699              `${clsAnimation}-${out ? "leave" : "enter"}`,
700              origin && `hk-transform-origin-${origin}`,
701              out && `${clsAnimation}-reverse`
702            ];
703            const timer = setTimeout(() => trigger(element2, animationEnd), duration);
704            once(
705              element2,
706              [animationEnd, animationCanceled],
707              ({ type }) => {
708                clearTimeout(timer);
709                type === animationCanceled ? reject() : resolve(element2);
710                css(element2, "animationDuration", "");
711                removeClass(element2, classes);
712              },
713              { self: true }
714            );
715            css(element2, "animationDuration", `${duration}ms`);
716            addClass(element2, classes);
717          })
718        )
719      );
720    }
721    const Animation = {
722      in: animate$2,
723      out(element, animation, duration, origin) {
724        return animate$2(element, animation, duration, origin, true);
725      },
726      inProgress(element) {
727        return hasClass(element, clsAnimation);
728      },
729      cancel(element) {
730        trigger(element, animationCanceled);
731      }
732    };
733
734    function ready(fn) {
735      if (document.readyState !== "loading") {
736        fn();
737        return;
738      }
739      once(document, "DOMContentLoaded", fn);
740    }
741    function isTag(element, ...tagNames) {
742      return tagNames.some((tagName) => {
743        var _a;
744        return ((_a = element == null ? void 0 : element.tagName) == null ? void 0 : _a.toLowerCase()) === tagName.toLowerCase();
745      });
746    }
747    function empty(element) {
748      element = $(element);
749      if (element) {
750        element.innerHTML = "";
751      }
752      return element;
753    }
754    function html(parent2, html2) {
755      return isUndefined(html2) ? $(parent2).innerHTML : append(empty(parent2), html2);
756    }
757    const prepend = applyFn("prepend");
758    const append = applyFn("append");
759    const before = applyFn("before");
760    const after = applyFn("after");
761    function applyFn(fn) {
762      return function(ref, element) {
763        var _a;
764        const nodes = toNodes(isString(element) ? fragment(element) : element);
vendor: 4,262 bytes, lines 765-885
765        (_a = $(ref)) == null ? void 0 : _a[fn](...nodes);
766        return unwrapSingle(nodes);
767      };
768    }
769    function remove$1(element) {
770      toNodes(element).forEach((element2) => element2.remove());
771    }
772    function wrapAll(element, structure) {
773      structure = toNode(before(element, structure));
774      while (structure.firstElementChild) {
775        structure = structure.firstElementChild;
776      }
777      append(structure, element);
778      return structure;
779    }
780    function wrapInner(element, structure) {
781      return toNodes(
782        toNodes(element).map(
783          (element2) => element2.hasChildNodes() ? wrapAll(toArray(element2.childNodes), structure) : append(element2, structure)
784        )
785      );
786    }
787    function unwrap(element) {
788      toNodes(element).map(parent).filter((value, index, self) => self.indexOf(value) === index).forEach((parent2) => parent2.replaceWith(...parent2.childNodes));
789    }
790    const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
791    function fragment(html2) {
792      const matches = singleTagRe.exec(html2);
793      if (matches) {
794        return document.createElement(matches[1]);
795      }
796      const container = document.createElement("template");
797      container.innerHTML = html2.trim();
798      return unwrapSingle(container.content.childNodes);
799    }
800    function unwrapSingle(nodes) {
801      return nodes.length > 1 ? nodes : nodes[0];
802    }
803    function apply(node, fn) {
804      if (!isElement(node)) {
805        return;
806      }
807      fn(node);
808      node = node.firstElementChild;
809      while (node) {
810        apply(node, fn);
811        node = node.nextElementSibling;
812      }
813    }
814    function $(selector, context) {
815      return isHtml(selector) ? toNode(fragment(selector)) : find(selector, context);
816    }
817    function $$(selector, context) {
818      return isHtml(selector) ? toNodes(fragment(selector)) : findAll(selector, context);
819    }
820    function isHtml(str) {
821      return isString(str) && startsWith(str.trim(), "<");
822    }
823
824    const dirs$1 = {
825      width: ["left", "right"],
826      height: ["top", "bottom"]
827    };
828    function dimensions$1(element) {
829      const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height(element), width: width(element), top: 0, left: 0 };
830      return {
831        height: rect.height,
832        width: rect.width,
833        top: rect.top,
834        left: rect.left,
835        bottom: rect.top + rect.height,
836        right: rect.left + rect.width
837      };
838    }
839    function offset(element, coordinates) {
840      if (coordinates) {
841        css(element, { left: 0, top: 0 });
842      }
843      const currentOffset = dimensions$1(element);
844      if (element) {
845        const { scrollY, scrollX } = toWindow(element);
846        const offsetBy = { height: scrollY, width: scrollX };
847        for (const dir in dirs$1) {
848          for (const prop of dirs$1[dir]) {
849            currentOffset[prop] += offsetBy[dir];
850          }
851        }
852      }
853      if (!coordinates) {
854        return currentOffset;
855      }
856      for (const prop of ["left", "top"]) {
857        css(element, prop, coordinates[prop] - currentOffset[prop]);
858      }
859    }
860    function position(element) {
861      let { top, left } = offset(element);
862      const {
863        ownerDocument: { body, documentElement },
864        offsetParent
865      } = toNode(element);
866      let parent = offsetParent || documentElement;
867      while (parent && (parent === body || parent === documentElement) && css(parent, "position") === "static") {
868        parent = parent.parentNode;
869      }
870      if (isElement(parent)) {
871        const parentOffset = offset(parent);
872        top -= parentOffset.top + toFloat(css(parent, "borderTopWidth"));
873        left -= parentOffset.left + toFloat(css(parent, "borderLeftWidth"));
874      }
875      return {
876        top: top - toFloat(css(element, "marginTop")),
877        left: left - toFloat(css(element, "marginLeft"))
878      };
879    }
880    function offsetPosition(element) {
881      element = toNode(element);
882      const offset2 = [element.offsetTop, element.offsetLeft];
883      while (element = element.offsetParent) {
884        offset2[0] += element.offsetTop + toFloat(css(element, `borderTopWidth`));
885        offset2[1] += element.offsetLeft + toFloat(css(element, `borderLeftWidth`
vendor: 6,647 bytes, lines 885-1103
885));
886        if (css(element, "position") === "fixed") {
887          const win = toWindow(element);
888          offset2[0] += win.scrollY;
889          offset2[1] += win.scrollX;
890          return offset2;
891        }
892      }
893      return offset2;
894    }
895    const height = dimension("height");
896    const width = dimension("width");
897    function dimension(prop) {
898      const propName = ucfirst(prop);
899      return (element, value) => {
900        if (isUndefined(value)) {
901          if (isWindow(element)) {
902            return element[`inner${propName}`];
903          }
904          if (isDocument(element)) {
905            const doc = element.documentElement;
906            return Math.max(doc[`offset${propName}`], doc[`scroll${propName}`]);
907          }
908          element = toNode(element);
909          value = css(element, prop);
910          value = value === "auto" ? element[`offset${propName}`] : toFloat(value) || 0;
911          return value - boxModelAdjust(element, prop);
912        } else {
913          return css(
914            element,
915            prop,
916            !value && value !== 0 ? "" : +value + boxModelAdjust(element, prop) + "px"
917          );
918        }
919      };
920    }
921    function boxModelAdjust(element, prop, sizing = "border-box") {
922      return css(element, "boxSizing") === sizing ? sumBy(
923        dirs$1[prop],
924        (prop2) => toFloat(css(element, `padding-${prop2}`)) + toFloat(css(element, `border-${prop2}-width`))
925      ) : 0;
926    }
927    function flipPosition(pos) {
928      for (const dir in dirs$1) {
929        for (const i in dirs$1[dir]) {
930          if (dirs$1[dir][i] === pos) {
931            return dirs$1[dir][1 - i];
932          }
933        }
934      }
935      return pos;
936    }
937    function toPx(value, property = "width", element = window, offsetDim = false) {
938      if (!isString(value)) {
939        return toFloat(value);
940      }
941      return sumBy(parseCalc(value), (value2) => {
942        const unit = parseUnit(value2);
943        return unit ? percent(
944          unit === "vh" ? getViewportHeight() : unit === "vw" ? width(toWindow(element)) : offsetDim ? element[`offset${ucfirst(property)}`] : dimensions$1(element)[property],
945          value2
946        ) : value2;
947      });
948    }
949    const calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
950    const parseCalc = memoize((calc) => calc.toString().replace(/\s/g, "").match(calcRe) || []);
951    const unitRe$1 = /(?:v[hw]|%)$/;
952    const parseUnit = memoize((str) => (str.match(unitRe$1) || [])[0]);
953    function percent(base, value) {
954      return base * toFloat(value) / 100;
955    }
956    let vh;
957    let vhEl;
958    function getViewportHeight() {
959      if (vh) {
960        return vh;
961      }
962      if (!vhEl) {
963        vhEl = $("<div>");
964        css(vhEl, {
965          height: "100vh",
966          position: "fixed"
967        });
968        on(window, "resize", () => vh = null);
969      }
970      append(document.body, vhEl);
971      vh = vhEl.clientHeight;
972      remove$1(vhEl);
973      return vh;
974    }
975
976    const fastdom = { read, write, clear, flush };
977    const reads = [];
978    const writes = [];
979    function read(task) {
980      reads.push(task);
981      scheduleFlush();
982      return task;
983    }
984    function write(task) {
985      writes.push(task);
986      scheduleFlush();
987      return task;
988    }
989    function clear(task) {
990      remove(reads, task);
991      remove(writes, task);
992    }
993    let scheduled = false;
994    function flush() {
995      runTasks(reads);
996      runTasks(writes.splice(0));
997      scheduled = false;
998      if (reads.length || writes.length) {
999        scheduleFlush();
1000      }
1001    }
1002    function scheduleFlush() {
1003      if (!scheduled) {
1004        scheduled = true;
1005        queueMicrotask(flush);
1006      }
1007    }
1008    function runTasks(tasks) {
1009      let task;
1010      while (task = tasks.shift()) {
1011        try {
1012          task();
1013        } catch (e) {
1014          console.error(e);
1015        }
1016      }
1017    }
1018    function remove(array, item) {
1019      const index = array.indexOf(item);
1020      return ~index && array.splice(index, 1);
1021    }
1022
1023    class MouseTracker {
1024      init() {
1025        this.positions = [];
1026        let position;
1027        this.unbind = on(document, "mousemove", (e) => position = getEventPos(e));
1028        this.interval = setInterval(() => {
1029          if (!position) {
1030            return;
1031          }
1032          this.positions.push(position);
1033          if (this.positions.length > 5) {
1034            this.positions.shift();
1035          }
1036        }, 50);
1037      }
1038      cancel() {
1039        var _a;
1040        (_a = this.unbind) == null ? void 0 : _a.call(this);
1041        clearInterval(this.interval);
1042      }
1043      movesTo(target) {
1044        if (!this.positions || this.positions.length < 2) {
1045          return false;
1046        }
1047        const p = dimensions$1(target);
1048        const { left, right, top, bottom } = p;
1049        const [prevPosition] = this.positions;
1050        const position = last(this.positions);
1051        const path = [prevPosition, position];
1052        if (pointInRect(position, p)) {
1053          return false;
1054        }
1055        const diagonals = [
1056          [
1057            { x: left, y: top },
1058            { x: right, y: bottom }
1059          ],
1060          [
1061            { x: left, y: bottom },
1062            { x: right, y: top }
1063          ]
1064        ];
1065        return diagonals.some((diagonal) => {
1066          const intersection = intersect(path, diagonal);
1067          return intersection && pointInRect(intersection, p);
1068        });
1069      }
1070    }
1071    function intersect([{ x: x1, y: y1 }, { x: x2, y: y2 }], [{ x: x3, y: y3 }, { x: x4, y: y4 }]) {
1072      const denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
1073      if (denominator === 0) {
1074        return false;
1075      }
1076      const ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;
1077      if (ua < 0) {
1078        return false;
1079      }
1080      return { x: x1 + ua * (x2 - x1), y: y1 + ua * (y2 - y1) };
1081    }
1082
1083    function observeIntersection(targets, cb, options = {}, { intersecting = true } = {}) {
1084      const observer = new IntersectionObserver(
1085        intersecting ? (entries, observer2) => {
1086          if (entries.some((entry) => entry.isIntersecting)) {
1087            cb(entries, observer2);
1088          }
1089        } : cb,
1090        options
1091      );
1092      for (const el of toNodes(targets)) {
1093        observer.observe(el);
1094      }
1095      return observer;
1096    }
1097    const hasResizeObserver = inBrowser && window.ResizeObserver;
1098    function observeResize(targets, cb, options = { box: "border-box" }) {
1099      if (hasResizeObserver) {
1100        return observe$1(ResizeObserver, targets, cb, options);
1101      }
1102      const off = [on(window, "load resize", cb), on(document, "loadedmetadata load", cb, true)];
1103      return { disconnect: () => off.
vendor: 6,036 bytes, lines 1103-1273
1103map((cb2) => cb2()) };
1104    }
1105    function observeViewportResize(cb) {
1106      return { disconnect: on([window, window.visualViewport], "resize", cb) };
1107    }
1108    function observeMutation(targets, cb, options) {
1109      return observe$1(MutationObserver, targets, cb, options);
1110    }
1111    function observe$1(Observer, targets, cb, options) {
1112      const observer = new Observer(cb);
1113      for (const el of toNodes(targets)) {
1114        observer.observe(el, options);
1115      }
1116      return observer;
1117    }
1118
1119    function play(el) {
1120      if (isIFrame(el)) {
1121        call(el, { func: "playVideo", method: "play" });
1122      }
1123      if (isHTML5(el)) {
1124        el.play().catch(noop);
1125      }
1126    }
1127    function pause(el) {
1128      if (isIFrame(el)) {
1129        call(el, { func: "pauseVideo", method: "pause" });
1130      }
1131      if (isHTML5(el)) {
1132        el.pause();
1133      }
1134    }
1135    function mute(el) {
1136      if (isIFrame(el)) {
1137        call(el, { func: "mute", method: "setVolume", value: 0 });
1138      }
1139      if (isHTML5(el)) {
1140        el.muted = true;
1141      }
1142    }
1143    function isHTML5(el) {
1144      return isTag(el, "video");
1145    }
1146    function isIFrame(el) {
1147      return isTag(el, "iframe") && (isYoutube(el) || isVimeo(el));
1148    }
1149    function isYoutube(el) {
1150      return !!el.src.match(
1151        /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/
1152      );
1153    }
1154    function isVimeo(el) {
1155      return !!el.src.match(/vimeo\.com\/video\/.*/);
1156    }
1157    async function call(el, cmd) {
1158      await enableApi(el);
1159      post(el, cmd);
1160    }
1161    function post(el, cmd) {
1162      el.contentWindow.postMessage(JSON.stringify({ event: "command", ...cmd }), "*");
1163    }
1164    const stateKey = "_ukPlayer";
1165    let counter = 0;
1166    function enableApi(el) {
1167      if (el[stateKey]) {
1168        return el[stateKey];
1169      }
1170      const youtube = isYoutube(el);
1171      const vimeo = isVimeo(el);
1172      const id = ++counter;
1173      let poller;
1174      return el[stateKey] = new Promise((resolve) => {
1175        youtube && once(el, "load", () => {
1176          const listener = () => post(el, { event: "listening", id });
1177          poller = setInterval(listener, 100);
1178          listener();
1179        });
1180        once(window, "message", resolve, false, ({ data }) => {
1181          try {
1182            data = JSON.parse(data);
1183            return youtube && (data == null ? void 0 : data.id) === id && data.event === "onReady" || vimeo && Number(data == null ? void 0 : data.player_id) === id;
1184          } catch (e) {
1185          }
1186        });
1187        el.src = `${el.src}${includes(el.src, "?") ? "&" : "?"}${youtube ? "enablejsapi=1" : `api=1&player_id=${id}`}`;
1188      }).then(() => clearInterval(poller));
1189    }
1190
1191    function isInView(element, offsetTop = 0, offsetLeft = 0) {
1192      if (!isVisible(element)) {
1193        return false;
1194      }
1195      return intersectRect(
1196        ...overflowParents(element).map((parent2) => {
1197          const { top, left, bottom, right } = offsetViewport(parent2);
1198          return {
1199            top: top - offsetTop,
1200            left: left - offsetLeft,
1201            bottom: bottom + offsetTop,
1202            right: right + offsetLeft
1203          };
1204        }).concat(offset(element))
1205      );
1206    }
1207    function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
1208      const parents2 = isVisible(element) ? scrollParents(element, false, ["hidden"]) : [];
1209      return parents2.reduce(
1210        (fn, scrollElement, i) => {
1211          const { scrollTop, scrollHeight, offsetHeight } = scrollElement;
1212          const viewport = offsetViewport(scrollElement);
1213          const maxScroll = scrollHeight - viewport.height;
1214          const { height: elHeight, top: elTop } = parents2[i - 1] ? offsetViewport(parents2[i - 1]) : offset(element);
1215          let top = Math.ceil(elTop - viewport.top - offsetBy + scrollTop);
1216          if (offsetBy > 0 && offsetHeight < elHeight + offsetBy) {
1217            top += offsetBy;
1218          } else {
1219            offsetBy = 0;
1220          }
1221          if (top > maxScroll) {
1222            offsetBy -= top - maxScroll;
1223            top = maxScroll;
1224          } else if (top < 0) {
1225            offsetBy -= top;
1226            top = 0;
1227          }
1228          return () => scrollTo(scrollElement, top - scrollTop, element, maxScroll).then(fn);
1229        },
1230        () => Promise.resolve()
1231      )();
1232      function scrollTo(element2, top, targetEl, maxScroll) {
1233        return new Promise((resolve) => {
1234          const scroll = element2.scrollTop;
1235          const duration = getDuration(Math.abs(top));
1236          const start = Date.now();
1237          const isScrollingElement = scrollingElement(element2) === element2;
1238          const targetTop = offset(targetEl).top + (isScrollingElement ? 0 : scroll);
1239          let prev = 0;
1240          let frames = 15;
1241          (function step() {
1242            const percent = ease(clamp((Date.now() - start) / duration));
1243            let diff = 0;
1244            if (parents2[0] === element2 && scroll + top < maxScroll) {
1245              diff = offset(targetEl).top + (isScrollingElement ? 0 : element2.scrollTop) - targetTop - dimensions$1(getCoveringElement(targetEl)).height;
1246            }
1247            if (css(element2, "scrollBehavior") !== "auto") {
1248              css(element2, "scrollBehavior", "auto");
1249            }
1250            element2.scrollTop = scroll + (top + diff) * percent;
1251            css(element2, "scrollBehavior", "");
1252            if (percent === 1 && (prev === diff || !frames--)) {
1253              resolve();
1254            } else {
1255              prev = diff;
1256              requestAnimationFrame(step);
1257            }
1258          })();
1259        });
1260      }
1261      function getDuration(dist) {
1262        return 40 * Math.pow(dist, 0.375);
1263      }
1264      function ease(k) {
1265        return 0.5 * (1 - Math.cos(Math.PI * k));
1266      }
1267    }
1268    function scrolledOver(element, startOffset = 0, endOffset = 0) {
1269      if (!isVisible(element)) {
1270        return 0;
1271      }
1272      const scrollElement = scrollParent(element, true);
1273      const { scrollHeight, scrollTop } = scrollElement;
vendor: 12,219 bytes, lines 1274-1595
1274      const { height: viewportHeight } = offsetViewport(scrollElement);
1275      const maxScroll = scrollHeight - viewportHeight;
1276      const elementOffsetTop = offsetPosition(element)[0] - offsetPosition(scrollElement)[0];
1277      const start = Math.max(0, elementOffsetTop - viewportHeight + startOffset);
1278      const end = Math.min(maxScroll, elementOffsetTop + element.offsetHeight - endOffset);
1279      return start < end ? clamp((scrollTop - start) / (end - start)) : 1;
1280    }
1281    function scrollParents(element, scrollable = false, props = []) {
1282      const scrollEl = scrollingElement(element);
1283      let ancestors = parents(element).reverse();
1284      ancestors = ancestors.slice(ancestors.indexOf(scrollEl) + 1);
1285      const fixedIndex = findIndex(ancestors, (el) => css(el, "position") === "fixed");
1286      if (~fixedIndex) {
1287        ancestors = ancestors.slice(fixedIndex);
1288      }
1289      return [scrollEl].concat(
1290        ancestors.filter(
1291          (parent2) => css(parent2, "overflow").split(" ").some((prop) => includes(["auto", "scroll", ...props], prop)) && (!scrollable || parent2.scrollHeight > offsetViewport(parent2).height)
1292        )
1293      ).reverse();
1294    }
1295    function scrollParent(...args) {
1296      return scrollParents(...args)[0];
1297    }
1298    function overflowParents(element) {
1299      return scrollParents(element, false, ["hidden", "clip"]);
1300    }
1301    function offsetViewport(scrollElement) {
1302      const window = toWindow(scrollElement);
1303      const documentScrollingElement = scrollingElement(scrollElement);
1304      const useWindow = !isNode(scrollElement) || scrollElement.contains(documentScrollingElement);
1305      if (useWindow && window.visualViewport) {
1306        let { height, width, scale, pageTop: top, pageLeft: left } = window.visualViewport;
1307        height = Math.round(height * scale);
1308        width = Math.round(width * scale);
1309        return { height, width, top, left, bottom: top + height, right: left + width };
1310      }
1311      let rect = offset(useWindow ? window : scrollElement);
1312      if (css(scrollElement, "display") === "inline") {
1313        return rect;
1314      }
1315      const { body, documentElement } = window.document;
1316      const viewportElement = useWindow ? documentScrollingElement === documentElement || // In quirks mode the scrolling element is body, even though the viewport is html
1317      documentScrollingElement.clientHeight < body.clientHeight ? documentScrollingElement : body : scrollElement;
1318      for (let [prop, dir, start, end] of [
1319        ["width", "x", "left", "right"],
1320        ["height", "y", "top", "bottom"]
1321      ]) {
1322        const subpixel = rect[prop] % 1;
1323        rect[start] += toFloat(css(viewportElement, `border-${start}-width`));
1324        rect[prop] = rect[dir] = viewportElement[`client${ucfirst(prop)}`] - (subpixel ? subpixel < 0.5 ? -subpixel : 1 - subpixel : 0);
1325        rect[end] = rect[prop] + rect[start];
1326      }
1327      return rect;
1328    }
1329    function getCoveringElement(target) {
1330      const { left, width, top } = dimensions$1(target);
1331      for (const position of top ? [0, top] : [0]) {
1332        let coverEl;
1333        for (const el of toWindow(target).document.elementsFromPoint(left + width / 2, position)) {
1334          if (!el.contains(target) && // If e.g. Offcanvas is not yet closed
1335          !hasClass(el, "hk-togglable-leave") && (hasPosition(el, "fixed") && zIndex(
1336            parents(target).reverse().find(
1337              (parent2) => !parent2.contains(el) && !hasPosition(parent2, "static")
1338            )
1339          ) < zIndex(el) || hasPosition(el, "sticky") && parent(el).contains(target)) && (!coverEl || dimensions$1(coverEl).height < dimensions$1(el).height)) {
1340            coverEl = el;
1341          }
1342        }
1343        if (coverEl) {
1344          return coverEl;
1345        }
1346      }
1347    }
1348    function zIndex(element) {
1349      return toFloat(css(element, "zIndex"));
1350    }
1351    function hasPosition(element, position) {
1352      return css(element, "position") === position;
1353    }
1354    function scrollingElement(element) {
1355      return toWindow(element).document.scrollingElement;
1356    }
1357
1358    const dirs = [
1359      ["width", "x", "left", "right"],
1360      ["height", "y", "top", "bottom"]
1361    ];
1362    function positionAt(element, target, options) {
1363      options = {
1364        attach: {
1365          element: ["left", "top"],
1366          target: ["left", "top"],
1367          ...options.attach
1368        },
1369        offset: [0, 0],
1370        placement: [],
1371        ...options
1372      };
1373      if (!isArray(target)) {
1374        target = [target, target];
1375      }
1376      offset(element, getPosition(element, target, options));
1377    }
1378    function getPosition(element, target, options) {
1379      const position = attachTo(element, target, options);
1380      const { boundary, viewportOffset = 0, placement } = options;
1381      let offsetPosition = position;
1382      for (const [i, [prop, , start, end]] of Object.entries(dirs)) {
1383        const viewport = getViewport$2(element, target[i], viewportOffset, boundary, i);
1384        if (isWithin(position, viewport, i)) {
1385          continue;
1386        }
1387        let offsetBy = 0;
1388        if (placement[i] === "flip") {
1389          const attach = options.attach.target[i];
1390          if (attach === end && position[end] <= viewport[end] || attach === start && position[start] >= viewport[start]) {
1391            continue;
1392          }
1393          offsetBy = flip(element, target, options, i)[start] - position[start];
1394          const scrollArea = getScrollArea(element, target[i], viewportOffset, i);
1395          if (!isWithin(applyOffset(position, offsetBy, i), scrollArea, i)) {
1396            if (isWithin(position, scrollArea, i)) {
1397              continue;
1398            }
1399            if (options.recursion) {
1400              return false;
1401            }
1402            const newPos = flipAxis(element, target, options);
1403            if (newPos && isWithin(newPos, scrollArea, 1 - i)) {
1404              return newPos;
1405            }
1406            continue;
1407          }
1408        } else if (placement[i] === "shift") {
1409          const targetDim = offset(target[i]);
1410          const { offset: elOffset } = options;
1411          offsetBy = clamp(
1412            clamp(position[start], viewport[start], viewport[end] - position[prop]),
1413            targetDim[start] - position[prop] + elOffset[i],
1414            targetDim[end] - elOffset[i]
1415          ) - position[start];
1416        }
1417        offsetPosition = applyOffset(offsetPosition, offsetBy, i);
1418      }
1419      return offsetPosition;
1420    }
1421    function attachTo(element, target, options) {
1422      let { attach, offset: offsetBy } = {
1423        attach: {
1424          element: ["left", "top"],
1425          target: ["left", "top"],
1426          ...options.attach
1427        },
1428        offset: [0, 0],
1429        ...options
1430      };
1431      let elOffset = offset(element);
1432      for (const [i, [prop, , start, end]] of Object.entries(dirs)) {
1433        const targetOffset = attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
1434        elOffset = applyOffset(
1435          elOffset,
1436          targetOffset[start] - elOffset[start] + moveBy(attach.target[i], end, targetOffset[prop]) - moveBy(attach.element[i], end, elOffset[prop]) + +offsetBy[i],
1437          i
1438        );
1439      }
1440      return elOffset;
1441    }
1442    function applyOffset(position, offset2, i) {
1443      const [, dir, start, end] = dirs[i];
1444      const newPos = { ...position };
1445      newPos[start] = position[dir] = position[start] + offset2;
1446      newPos[end] += offset2;
1447      return newPos;
1448    }
1449    function moveBy(attach, end, dim) {
1450      return attach === "center" ? dim / 2 : attach === end ? dim : 0;
1451    }
1452    function getViewport$2(element, target, viewportOffset, boundary, i) {
1453      let viewport = getIntersectionArea(...commonScrollParents(element, target).map(offsetViewport));
1454      if (viewportOffset) {
1455        viewport[dirs[i][2]] += viewportOffset;
1456        viewport[dirs[i][3]] -= viewportOffset;
1457      }
1458      if (boundary) {
1459        viewport = getIntersectionArea(
1460          viewport,
1461          offset(isArray(boundary) ? boundary[i] : boundary)
1462        );
1463      }
1464      return viewport;
1465    }
1466    function getScrollArea(element, target, viewportOffset, i) {
1467      const [prop, axis, start, end] = dirs[i];
1468      const [scrollElement] = commonScrollParents(element, target);
1469      const viewport = offsetViewport(scrollElement);
1470      if (["auto", "scroll"].includes(css(scrollElement, `overflow-${axis}`))) {
1471        viewport[start] -= scrollElement[`scroll${ucfirst(start)}`];
1472        viewport[end] = viewport[start] + scrollElement[`scroll${ucfirst(prop)}`];
1473      }
1474      viewport[start] += viewportOffset;
1475      viewport[end] -= viewportOffset;
1476      return viewport;
1477    }
1478    function commonScrollParents(element, target) {
1479      return overflowParents(target).filter((parent) => parent.contains(element));
1480    }
1481    function getIntersectionArea(...rects) {
1482      let area = {};
1483      for (const rect of rects) {
1484        for (const [, , start, end] of dirs) {
1485          area[start] = Math.max(area[start] || 0, rect[start]);
1486          area[end] = Math.min(...[area[end], rect[end]].filter(Boolean));
1487        }
1488      }
1489      return area;
1490    }
1491    function isWithin(positionA, positionB, i) {
1492      const [, , start, end] = dirs[i];
1493      return positionA[start] >= positionB[start] && positionA[end] <= positionB[end];
1494    }
1495    function flip(element, target, { offset: offset2, attach }, i) {
1496      return attachTo(element, target, {
1497        attach: {
1498          element: flipAttach(attach.element, i),
1499          target: flipAttach(attach.target, i)
1500        },
1501        offset: flipOffset(offset2, i)
1502      });
1503    }
1504    function flipAxis(element, target, options) {
1505      return getPosition(element, target, {
1506        ...options,
1507        attach: {
1508          element: options.attach.element.map(flipAttachAxis).reverse(),
1509          target: options.attach.target.map(flipAttachAxis).reverse()
1510        },
1511        offset: options.offset.reverse(),
1512        placement: options.placement.reverse(),
1513        recursion: true
1514      });
1515    }
1516    function flipAttach(attach, i) {
1517      const newAttach = [...attach];
1518      const index = dirs[i].indexOf(attach[i]);
1519      if (~index) {
1520        newAttach[i] = dirs[i][1 - index % 2 + 2];
1521      }
1522      return newAttach;
1523    }
1524    function flipAttachAxis(prop) {
1525      for (let i = 0; i < dirs.length; i++) {
1526        const index = dirs[i].indexOf(prop);
1527        if (~index) {
1528          return dirs[1 - i][index % 2 + 2];
1529        }
1530      }
1531    }
1532    function flipOffset(offset2, i) {
1533      offset2 = [...offset2];
1534      offset2[i] *= -1;
1535      return offset2;
1536    }
1537
1538    var util = /*#__PURE__*/Object.freeze({
1539        __proto__: null,
1540        $: $,
1541        $$: $$,
1542        Animation: Animation,
1543        Dimensions: Dimensions,
1544        MouseTracker: MouseTracker,
1545        Transition: Transition,
1546        addClass: addClass,
1547        after: after,
1548        append: append,
1549        apply: apply,
1550        assign: assign,
1551        attr: attr,
1552        before: before,
1553        boxModelAdjust: boxModelAdjust,
1554        camelize: camelize,
1555        children: children,
1556        clamp: clamp,
1557        createEvent: createEvent,
1558        css: css,
1559        data: data,
1560        dimensions: dimensions$1,
1561        each: each,
1562        empty: empty,
1563        endsWith: endsWith,
1564        escape: escape,
1565        fastdom: fastdom,
1566        filter: filter$1,
1567        find: find,
1568        findAll: findAll,
1569        findIndex: findIndex,
1570        flipPosition: flipPosition,
1571        fragment: fragment,
1572        getCoveringElement: getCoveringElement,
1573        getEventPos: getEventPos,
1574        getIndex: getIndex,
1575        getTargetedElement: getTargetedElement,
1576        hasAttr: hasAttr,
1577        hasClass: hasClass,
1578        hasOwn: hasOwn,
1579        hasTouch: hasTouch,
1580        height: height,
1581        html: html,
1582        hyphenate: hyphenate,
1583        inBrowser: inBrowser,
1584        includes: includes,
1585        index: index,
1586        intersectRect: intersectRect,
1587        isArray: isArray,
1588        isBoolean: isBoolean,
1589        isDocument: isDocument,
1590        isElement: isElement,
1591        isEmpty: isEmpty,
1592        isEqual: isEqual,
1593        isFocusable: isFocusable,
1594        isFunction: isFunction,
1595        isInView: isInView,
vendor: 16,465 bytes, lines 1596-2120
1596        isInput: isInput,
1597        isNode: isNode,
1598        isNumber: isNumber,
1599        isNumeric: isNumeric,
1600        isObject: isObject,
1601        isPlainObject: isPlainObject,
1602        isRtl: isRtl,
1603        isSameSiteAnchor: isSameSiteAnchor,
1604        isString: isString,
1605        isTag: isTag,
1606        isTouch: isTouch,
1607        isUndefined: isUndefined,
1608        isVisible: isVisible,
1609        isVoidElement: isVoidElement,
1610        isWindow: isWindow,
1611        last: last,
1612        matches: matches,
1613        memoize: memoize,
1614        mute: mute,
1615        noop: noop,
1616        observeIntersection: observeIntersection,
1617        observeMutation: observeMutation,
1618        observeResize: observeResize,
1619        observeViewportResize: observeViewportResize,
1620        off: off,
1621        offset: offset,
1622        offsetPosition: offsetPosition,
1623        offsetViewport: offsetViewport,
1624        on: on,
1625        once: once,
1626        overflowParents: overflowParents,
1627        parent: parent,
1628        parents: parents,
1629        pause: pause,
1630        pick: pick,
1631        play: play,
1632        pointInRect: pointInRect,
1633        pointerCancel: pointerCancel,
1634        pointerDown: pointerDown$1,
1635        pointerEnter: pointerEnter,
1636        pointerLeave: pointerLeave,
1637        pointerMove: pointerMove$1,
1638        pointerUp: pointerUp$1,
1639        position: position,
1640        positionAt: positionAt,
1641        prepend: prepend,
1642        propName: propName,
1643        query: query,
1644        queryAll: queryAll,
1645        ready: ready,
1646        remove: remove$1,
1647        removeAttr: removeAttr,
1648        removeClass: removeClass,
1649        replaceClass: replaceClass,
1650        scrollIntoView: scrollIntoView,
1651        scrollParent: scrollParent,
1652        scrollParents: scrollParents,
1653        scrolledOver: scrolledOver,
1654        selFocusable: selFocusable,
1655        selInput: selInput,
1656        sortBy: sortBy,
1657        startsWith: startsWith,
1658        sumBy: sumBy,
1659        swap: swap,
1660        toArray: toArray,
1661        toBoolean: toBoolean,
1662        toEventTargets: toEventTargets,
1663        toFloat: toFloat,
1664        toNode: toNode,
1665        toNodes: toNodes,
1666        toNumber: toNumber,
1667        toPx: toPx,
1668        toWindow: toWindow,
1669        toggleClass: toggleClass,
1670        trigger: trigger,
1671        ucfirst: ucfirst,
1672        uniqueBy: uniqueBy,
1673        unwrap: unwrap,
1674        width: width,
1675        wrapAll: wrapAll,
1676        wrapInner: wrapInner
1677    });
1678
1679    var Class = {
1680      connected() {
1681        addClass(this.$el, this.$options.id);
1682      }
1683    };
1684
1685    const units = ["days", "hours", "minutes", "seconds"];
1686    var countdown = {
1687      mixins: [Class],
1688      props: {
1689        date: String,
1690        clsWrapper: String,
1691        role: String
1692      },
1693      data: {
1694        date: "",
1695        clsWrapper: ".hk-countdown-%unit%",
1696        role: "timer"
1697      },
1698      connected() {
1699        attr(this.$el, "role", this.role);
1700        this.date = toFloat(Date.parse(this.$props.date));
1701        this.end = false;
1702        this.start();
1703      },
1704      disconnected() {
1705        this.stop();
1706      },
1707      events: {
1708        name: "visibilitychange",
1709        el: () => document,
1710        handler() {
1711          if (document.hidden) {
1712            this.stop();
1713          } else {
1714            this.start();
1715          }
1716        }
1717      },
1718      methods: {
1719        start() {
1720          this.stop();
1721          this.update();
1722          if (!this.timer) {
1723            trigger(this.$el, "countdownstart");
1724            this.timer = setInterval(this.update, 1e3);
1725          }
1726        },
1727        stop() {
1728          if (this.timer) {
1729            clearInterval(this.timer);
1730            trigger(this.$el, "countdownstop");
1731            this.timer = null;
1732          }
1733        },
1734        update() {
1735          const timespan = getTimeSpan(this.date);
1736          if (!timespan.total) {
1737            this.stop();
1738            if (!this.end) {
1739              trigger(this.$el, "countdownend");
1740              this.end = true;
1741            }
1742          }
1743          for (const unit of units) {
1744            const el = $(this.clsWrapper.replace("%unit%", unit), this.$el);
1745            if (!el) {
1746              continue;
1747            }
1748            let digits = Math.trunc(timespan[unit]).toString().padStart(2, "0");
1749            if (el.textContent !== digits) {
1750              digits = digits.split("");
1751              if (digits.length !== el.children.length) {
1752                html(el, digits.map(() => "<span></span>").join(""));
1753              }
1754              digits.forEach((digit, i) => el.children[i].textContent = digit);
1755            }
1756          }
1757        }
1758      }
1759    };
1760    function getTimeSpan(date) {
1761      const total = Math.max(0, date - Date.now()) / 1e3;
1762      return {
1763        total,
1764        seconds: total % 60,
1765        minutes: total / 60 % 60,
1766        hours: total / 60 / 60 % 24,
1767        days: total / 60 / 60 / 24
1768      };
1769    }
1770
1771    const strats = {};
1772    strats.events = strats.watch = strats.observe = strats.created = strats.beforeConnect = strats.connected = strats.beforeDisconnect = strats.disconnected = strats.destroy = concatStrat;
1773    strats.args = function(parentVal, childVal) {
1774      return childVal !== false && concatStrat(childVal || parentVal);
1775    };
1776    strats.update = function(parentVal, childVal) {
1777      return sortBy(
1778        concatStrat(parentVal, isFunction(childVal) ? { read: childVal } : childVal),
1779        "order"
1780      );
1781    };
1782    strats.props = function(parentVal, childVal) {
1783      if (isArray(childVal)) {
1784        const value = {};
1785        for (const key of childVal) {
1786          value[key] = String;
1787        }
1788        childVal = value;
1789      }
1790      return strats.methods(parentVal, childVal);
1791    };
1792    strats.computed = strats.methods = function(parentVal, childVal) {
1793      return childVal ? parentVal ? { ...parentVal, ...childVal } : childVal : parentVal;
1794    };
1795    strats.i18n = strats.data = function(parentVal, childVal, vm) {
1796      if (!vm) {
1797        if (!childVal) {
1798          return parentVal;
1799        }
1800        if (!parentVal) {
1801          return childVal;
1802        }
1803        return function(vm2) {
1804          return mergeFnData(parentVal, childVal, vm2);
1805        };
1806      }
1807      return mergeFnData(parentVal, childVal, vm);
1808    };
1809    function mergeFnData(parentVal, childVal, vm) {
1810      return strats.computed(
1811        isFunction(parentVal) ? parentVal.call(vm, vm) : parentVal,
1812        isFunction(childVal) ? childVal.call(vm, vm) : childVal
1813      );
1814    }
1815    function concatStrat(parentVal, childVal) {
1816      parentVal = parentVal && !isArray(parentVal) ? [parentVal] : parentVal;
1817      return childVal ? parentVal ? parentVal.concat(childVal) : isArray(childVal) ? childVal : [childVal] : parentVal;
1818    }
1819    function defaultStrat(parentVal, childVal) {
1820      return isUndefined(childVal) ? parentVal : childVal;
1821    }
1822    function mergeOptions(parent, child, vm) {
1823      const options = {};
1824      if (isFunction(child)) {
1825        child = child.options;
1826      }
1827      if (child.extends) {
1828        parent = mergeOptions(parent, child.extends, vm);
1829      }
1830      if (child.mixins) {
1831        for (const mixin of child.mixins) {
1832          parent = mergeOptions(parent, mixin, vm);
1833        }
1834      }
1835      for (const key in parent) {
1836        mergeKey(key);
1837      }
1838      for (const key in child) {
1839        if (!hasOwn(parent, key)) {
1840          mergeKey(key);
1841        }
1842      }
1843      function mergeKey(key) {
1844        options[key] = (strats[key] || defaultStrat)(parent[key], child[key], vm);
1845      }
1846      return options;
1847    }
1848    function parseOptions(options, args = []) {
1849      try {
1850        return options ? startsWith(options, "{") ? JSON.parse(options) : args.length && !includes(options, ":") ? { [args[0]]: options } : options.split(";").reduce((options2, option) => {
1851          const [key, value] = option.split(/:(.*)/);
1852          if (key && !isUndefined(value)) {
1853            options2[key.trim()] = value.trim();
1854          }
1855          return options2;
1856        }, {}) : {};
1857      } catch (e) {
1858        return {};
1859      }
1860    }
1861    function coerce$1(type, value) {
1862      if (type === Boolean) {
1863        return toBoolean(value);
1864      } else if (type === Number) {
1865        return toNumber(value);
1866      } else if (type === "list") {
1867        return toList(value);
1868      } else if (type === Object && isString(value)) {
1869        return parseOptions(value);
1870      }
1871      return type ? type(value) : value;
1872    }
1873    const listRe = /,(?![^(]*\))/;
1874    function toList(value) {
1875      return isArray(value) ? value : isString(value) ? value.split(listRe).map((value2) => isNumeric(value2) ? toNumber(value2) : toBoolean(value2.trim())) : [value];
1876    }
1877
1878    function initUpdates(instance) {
1879      instance._data = {};
1880      instance._updates = [...instance.$options.update || []];
1881      instance._disconnect.push(() => instance._updates = instance._data = null);
1882    }
1883    function prependUpdate(instance, update) {
1884      instance._updates.unshift(update);
1885    }
1886    function callUpdate(instance, e = "update") {
1887      if (!instance._connected) {
1888        return;
1889      }
1890      if (!instance._updates.length) {
1891        return;
1892      }
1893      if (!instance._queued) {
1894        instance._queued = /* @__PURE__ */ new Set();
1895        fastdom.read(() => {
1896          if (instance._connected) {
1897            runUpdates(instance, instance._queued);
1898          }
1899          instance._queued = null;
1900        });
1901      }
1902      instance._queued.add(e.type || e);
1903    }
1904    function runUpdates(instance, types) {
1905      for (const { read, write, events = [] } of instance._updates) {
1906        if (!types.has("update") && !events.some((type) => types.has(type))) {
1907          continue;
1908        }
1909        let result;
1910        if (read) {
1911          result = read.call(instance, instance._data, types);
1912          if (result && isPlainObject(result)) {
1913            assign(instance._data, result);
1914          }
1915        }
1916        if (write && result !== false) {
1917          fastdom.write(() => {
1918            if (instance._connected) {
1919              write.call(instance, instance._data, types);
1920            }
1921          });
1922        }
1923      }
1924    }
1925
1926    function resize(options) {
1927      return observe(observeResize, options, "resize");
1928    }
1929    function intersection(options) {
1930      return observe(observeIntersection, options);
1931    }
1932    function mutation(options) {
1933      return observe(observeMutation, options);
1934    }
1935    function lazyload(options = {}) {
1936      return intersection({
1937        handler: function(entries, observer) {
1938          const { targets = this.$el, preload = 5 } = options;
1939          for (const el of toNodes(isFunction(targets) ? targets(this) : targets)) {
1940            $$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => removeAttr(el2, "loading"));
1941          }
1942          for (const el of entries.filter(({ isIntersecting }) => isIntersecting).map(({ target }) => target)) {
1943            observer.unobserve(el);
1944          }
1945        },
1946        ...options
1947      });
1948    }
1949    function viewport(options) {
1950      return observe((target, handler) => observeViewportResize(handler), options, "resize");
1951    }
1952    function scroll$1(options) {
1953      return observe(
1954        (target, handler) => ({
1955          disconnect: on(toScrollTargets(target), "scroll", handler, { passive: true })
1956        }),
1957        options,
1958        "scroll"
1959      );
1960    }
1961    function swipe(options) {
1962      return {
1963        observe(target, handler) {
1964          return {
1965            observe: noop,
1966            unobserve: noop,
1967            disconnect: on(target, pointerDown$1, handler, { passive: true })
1968          };
1969        },
1970        handler(e) {
1971          if (!isTouch(e)) {
1972            return;
1973          }
1974          const pos = getEventPos(e);
1975          const target = "tagName" in e.target ? e.target : parent(e.target);
1976          once(document, `${pointerUp$1} ${pointerCancel} scroll`, (e2) => {
1977            const { x, y } = getEventPos(e2);
1978            if (e2.type !== "scroll" && target && x && Math.abs(pos.x - x) > 100 || y && Math.abs(pos.y - y) > 100) {
1979              setTimeout(() => {
1980                trigger(target, "swipe");
1981                trigger(target, `swipe${swipeDirection(pos.x, pos.y, x, y)}`);
1982              });
1983            }
1984          });
1985        },
1986        ...options
1987      };
1988    }
1989    function observe(observe2, options, emit) {
1990      return {
1991        observe: observe2,
1992        handler() {
1993          callUpdate(this, emit);
1994        },
1995        ...options
1996      };
1997    }
1998    function swipeDirection(x1, y1, x2, y2) {
1999      return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ? x1 - x2 > 0 ? "Left" : "Right" : y1 - y2 > 0 ? "Up" : "Down";
2000    }
2001    function toScrollTargets(elements) {
2002      return toNodes(elements).map((node) => {
2003        const { ownerDocument } = node;
2004        const parent2 = scrollParent(node, true);
2005        return parent2 === ownerDocument.scrollingElement ? ownerDocument : parent2;
2006      });
2007    }
2008
2009    var Margin = {
2010      props: {
2011        margin: String,
2012        firstColumn: Boolean
2013      },
2014      data: {
2015        margin: "hk-margin-small-top",
2016        firstColumn: "hk-first-column"
2017      },
2018      observe: [
2019        mutation({
2020          options: {
2021            childList: true
2022          }
2023        }),
2024        mutation({
2025          options: {
2026            attributes: true,
2027            attributeFilter: ["style"]
2028          },
2029          target: ({ $el }) => [$el, ...children($el)]
2030        }),
2031        resize({
2032          target: ({ $el }) => [$el, ...children($el)]
2033        })
2034      ],
2035      update: {
2036        read() {
2037          return {
2038            rows: getRows(children(this.$el))
2039          };
2040        },
2041        write({ rows }) {
2042          for (const row of rows) {
2043            for (const el of row) {
2044              toggleClass(el, this.margin, rows[0] !== row);
2045              toggleClass(el, this.firstColumn, row[isRtl ? row.length - 1 : 0] === el);
2046            }
2047          }
2048        },
2049        events: ["resize"]
2050      }
2051    };
2052    function getRows(elements) {
2053      const sorted = [[]];
2054      const withOffset = elements.some(
2055        (el, i) => i && elements[i - 1].offsetParent !== el.offsetParent
2056      );
2057      for (const el of elements) {
2058        if (!isVisible(el)) {
2059          continue;
2060        }
2061        const offset = getOffset(el, withOffset);
2062        for (let i = sorted.length - 1; i >= 0; i--) {
2063          const current = sorted[i];
2064          if (!current[0]) {
2065            current.push(el);
2066            break;
2067          }
2068          const offsetCurrent = getOffset(current[0], withOffset);
2069          if (offset.top >= offsetCurrent.bottom - 1 && offset.top !== offsetCurrent.top) {
2070            sorted.push([el]);
2071            break;
2072          }
2073          if (offset.bottom - 1 > offsetCurrent.top || offset.top === offsetCurrent.top) {
2074            let j = current.length - 1;
2075            for (; j >= 0; j--) {
2076              const offsetCurrent2 = getOffset(current[j], withOffset);
2077              if (offset.left >= offsetCurrent2.left) {
2078                break;
2079              }
2080            }
2081            current.splice(j + 1, 0, el);
2082            break;
2083          }
2084          if (i === 0) {
2085            sorted.unshift([el]);
2086            break;
2087          }
2088        }
2089      }
2090      return sorted;
2091    }
2092    function getOffset(element, offset = false) {
2093      let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
2094      if (offset) {
2095        [offsetTop, offsetLeft] = offsetPosition(element);
2096      }
2097      return {
2098        top: offsetTop,
2099        left: offsetLeft,
2100        bottom: offsetTop + offsetHeight,
2101        right: offsetLeft + offsetWidth
2102      };
2103    }
2104
2105    async function slide(action, target, duration) {
2106      await awaitFrame();
2107      let nodes = children(target);
2108      const currentProps = nodes.map((el) => getProps$1(el, true));
2109      const targetProps = { ...css(target, ["height", "padding"]), display: "block" };
2110      const targets = nodes.concat(target);
2111      await Promise.all(targets.map(Transition.cancel));
2112      css(targets, "transitionProperty", "none");
2113      await action();
2114      nodes = nodes.concat(children(target).filter((el) => !includes(nodes, el)));
2115      await Promise.resolve();
2116      css(targets, "transitionProperty", "");
2117      const targetStyle = attr(target, "style");
2118      const targetPropsTo = css(target, ["height", "padding"]);
2119      const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
2120      const attrsTo = nodes.map((el) => ({ style: attr(el, "style") }));
2121      nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
2122      css(target, targetProps);
2123      trigger(target, "scroll");
2124      await awaitFrame();
2125      const transitions = nodes.map((el, i) => parent(el) === target && Transition.start(el, propsTo[i], duration, "ease")).concat(Transition.start(target, targetPropsTo, duration, "ease"));
2126      try {
2127        await Promise.all(transitions);
2128        nodes.forEach((el, i) => {
2129          attr(el, attrsTo[i]);
2130          if (parent(el) === target) {
2131            css(el, "display", propsTo[i].opacity === 0 ? "none" : "");
2132          }
2133        });
2134        attr(target, "style", targetStyle);
2135      } catch (e) {
2136        attr(nodes, "style", "");
2137        resetProps(target, targetProps);
2138      }
2139    }
2140    function getProps$1(el, opacity) {
2141      const zIndex = css(el, "zIndex");
2142      return isVisible(el) ? {
2143        display: "",
2144        opacity: opacity ? css(el, "opacity") : "0",
2145        pointerEvents: "none",
2146        position: "absolute",
2147        zIndex: zIndex === "auto" ? index(el) : zIndex,
2148        ...getPositionWithMargin(el)
2149      } : false;
2150    }
2151    function getTransitionProps(target, nodes, currentProps) {
2152      const propsTo = nodes.map(
2153        (el, i) => parent(el) && i in currentProps ? currentProps[i] ? isVisible(el) ? getPositionWithMargin(el) : { opacity: 0 } : { opacity: isVisible(el) ? 1 : 0 } : false
2154      );
2155      const propsFrom = propsTo.map((props, i) => {
2156        const from = parent(nodes[i]) === target && (currentProps[i] || getProps$1(nodes[i]));
2157        if (!from) {
2158          return false;
2159        }
2160        if (!props) {
2161          delete from.opacity;
2162        } else if (!("opacity" in props)) {
2163          const { opacity } = from;
2164          if (opacity % 1) {
2165            props.opacity = 1;
2166          } else {
2167            delete from.opacity;
2168          }
2169        }
2170        return from;
2171      });
2172      return [propsTo, propsFrom];
2173    }
2174    function resetProps(el, props) {
2175      for (const prop in props) {
2176        css(el, prop, "");
2177      }
2178    }
2179    function getPositionWithMargin(el) {
2180      const { height, width } = dimensions$1(el);
2181      return {
2182        height,
2183        width,
2184        transform: "",
2185        ...position(el),
2186        ...css(el, ["marginTop", "marginLeft"])
2187      };
2188    }
2189    function awaitFrame() {
2190      return new Promise((resolve) => requestAnimationFrame(resolve));
2191    }
2192
2193    const clsLeave = "hk-transition-leave";
2194    const clsEnter = "hk-transition-enter";
2195    function fade(action, target, duration, stagger = 0) {
2196      const index = transitionIndex(target, true);
2197      const propsIn = { opacity: 1 };
2198      const propsOut = { opacity: 0 };
2199      const wrapIndexFn = (fn) => () => index === transitionIndex(target) ? fn() : Promise.reject();
2200      const leaveFn = wrapIndexFn(async () => {
2201        addClass(target, clsLeave);
2202        await Promise.all(
2203          getTransitionNodes(target).map(
2204            (child, i) => new Promise(
2205              (resolve) => setTimeout(
2206                () => Transition.start(child, propsOut, duration / 2, "ease").then(
2207                  resolve
2208                ),
2209                i * stagger
2210              )
2211            )
2212          )
2213        );
2214        removeClass(target, clsLeave);
2215      });
2216      const enterFn = wrapIndexFn(async () => {
2217        const oldHeight = height(target);
2218        addClass(target, clsEnter);
2219        action();
2220        css(children(target), { opacity: 0 });
2221        await awaitFrame();
2222        const nodes = children(target);
2223        const newHeight = height(target);
2224        css(target, "alignContent", "flex-start");
2225        height(target, oldHeight);
2226        const transitionNodes = getTransitionNodes(target);
2227        css(nodes, propsOut);
2228        const transitions = transitionNodes.map(async (child, i) => {
2229          await awaitTimeout(i * stagger);
2230          await Transition.start(child, propsIn, duration / 2, "ease");
2231        });
2232        if (oldHeight !== newHeight) {
2233          transitions.push(
2234            Transition.start(
2235              target,
2236              { height: newHeight },
2237              duration / 2 + transitionNodes.length * stagger,
2238              "ease"
2239            )
2240          );
2241        }
2242        await Promise.all(transitions).then(() => {
2243          removeClass(target, clsEnter);
2244          if (index === transitionIndex(target)) {
2245            css(target, { height: "", alignContent: "" });
2246            css(nodes, { opacity: "" });
2247            delete target.dataset.transition;
2248          }
2249        });
2250      });
2251      return hasClass(target, clsLeave) ? waitTransitionend(target).then(enterFn) : hasClass(target, clsEnter) ? waitTransitionend(target).then(leaveFn).then(enterFn) : leaveFn().then(enterFn);
2252    }
2253    function transitionIndex(target, next) {
2254      if (next) {
2255        target.dataset.transition = 1 + transitionIndex(target);
2256      }
2257      return toNumber(target.dataset.transition) || 0;
2258    }
2259    function waitTransitionend(target) {
2260      return Promise.all(
2261        children(target).filter(Transition.inProgress).map(
2262          (el) => new Promise((resolve) => once(el, "transitionend transitioncanceled", resolve))
2263        )
2264      );
2265    }
2266    function getTransitionNodes(target) {
2267      return getRows(children(target)).flat().filter(isVisible);
2268    }
2269    function awaitTimeout(timeout) {
2270      return new Promise((resolve) => setTimeout(resolve, timeout));
2271    }
2272
2273    var Animate = {
2274      props: {
2275        duration: Number,
2276        animation: Boolean
2277      },
2278      data: {
2279        duration: 150,
2280        animation: "slide"
2281      },
2282      methods: {
2283        animate(action, target = this.$el) {
2284          const name = this.animation;
2285          const animationFn = name === "fade" ? fade : name === "delayed-fade" ? (...args) => fade(...args, 40) : name ? slide : () => {
2286            action();
2287            return Promise.resolve();
2288          };
2289          return animationFn(action, target, this.duration).catch(noop);
2290        }
2291      }
2292    };
2293
vendor: 19,480 bytes, lines 2294-2908
2294    const keyMap = {
2295      TAB: 9,
2296      ESC: 27,
2297      SPACE: 32,
2298      END: 35,
2299      HOME: 36,
2300      LEFT: 37,
2301      UP: 38,
2302      RIGHT: 39,
2303      DOWN: 40
2304    };
2305
2306    var filter = {
2307      mixins: [Animate],
2308      args: "target",
2309      props: {
2310        target: String,
2311        selActive: Boolean
2312      },
2313      data: {
2314        target: "",
2315        selActive: false,
2316        attrItem: "hk-filter-control",
2317        cls: "hk-active",
2318        duration: 250
2319      },
2320      computed: {
2321        children: ({ target }, $el) => $$(`${target} > *`, $el),
2322        toggles: ({ attrItem }, $el) => $$(`[${attrItem}],[data-${attrItem}]`, $el)
2323      },
2324      watch: {
2325        toggles(toggles) {
2326          this.updateState();
2327          const actives = $$(this.selActive, this.$el);
2328          for (const toggle of toggles) {
2329            if (this.selActive !== false) {
2330              toggleClass(toggle, this.cls, includes(actives, toggle));
2331            }
2332            const button = findButton(toggle);
2333            if (isTag(button, "a")) {
2334              attr(button, "role", "button");
2335            }
2336          }
2337        },
2338        children(list, prev) {
2339          if (prev) {
2340            this.updateState();
2341          }
2342        }
2343      },
2344      events: {
2345        name: "click keydown",
2346        delegate: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
2347        handler(e) {
2348          if (e.type === "keydown" && e.keyCode !== keyMap.SPACE) {
2349            return;
2350          }
2351          if (e.target.closest("a,button")) {
2352            e.preventDefault();
2353            this.apply(e.current);
2354          }
2355        }
2356      },
2357      methods: {
2358        apply(el) {
2359          const prevState = this.getState();
2360          const newState = mergeState(el, this.attrItem, this.getState());
2361          if (!isEqualState(prevState, newState)) {
2362            this.setState(newState);
2363          }
2364        },
2365        getState() {
2366          return this.toggles.filter((item) => hasClass(item, this.cls)).reduce((state, el) => mergeState(el, this.attrItem, state), {
2367            filter: { "": "" },
2368            sort: []
2369          });
2370        },
2371        async setState(state, animate = true) {
2372          state = { filter: { "": "" }, sort: [], ...state };
2373          trigger(this.$el, "beforeFilter", [this, state]);
2374          for (const toggle of this.toggles) {
2375            toggleClass(toggle, this.cls, matchFilter(toggle, this.attrItem, state));
2376          }
2377          await Promise.all(
2378            $$(this.target, this.$el).map((target) => {
2379              const filterFn = () => applyState(state, target, children(target));
2380              return animate ? this.animate(filterFn, target) : filterFn();
2381            })
2382          );
2383          trigger(this.$el, "afterFilter", [this]);
2384        },
2385        updateState() {
2386          fastdom.write(() => this.setState(this.getState(), false));
2387        }
2388      }
2389    };
2390    function getFilter(el, attr2) {
2391      return parseOptions(data(el, attr2), ["filter"]);
2392    }
2393    function isEqualState(stateA, stateB) {
2394      return ["filter", "sort"].every((prop) => isEqual(stateA[prop], stateB[prop]));
2395    }
2396    function applyState(state, target, children) {
2397      for (const el of children) {
2398        css(
2399          el,
2400          "display",
2401          Object.values(state.filter).every((selector) => !selector || matches(el, selector)) ? "" : "none"
2402        );
2403      }
2404      const [sort, order] = state.sort;
2405      if (sort) {
2406        const sorted = sortItems(children, sort, order);
2407        if (!isEqual(sorted, children)) {
2408          append(target, sorted);
2409        }
2410      }
2411    }
2412    function mergeState(el, attr2, state) {
2413      const { filter, group, sort, order = "asc" } = getFilter(el, attr2);
2414      if (filter || isUndefined(sort)) {
2415        if (group) {
2416          if (filter) {
2417            delete state.filter[""];
2418            state.filter[group] = filter;
2419          } else {
2420            delete state.filter[group];
2421            if (isEmpty(state.filter) || "" in state.filter) {
2422              state.filter = { "": filter || "" };
2423            }
2424          }
2425        } else {
2426          state.filter = { "": filter || "" };
2427        }
2428      }
2429      if (!isUndefined(sort)) {
2430        state.sort = [sort, order];
2431      }
2432      return state;
2433    }
2434    function matchFilter(el, attr2, { filter: stateFilter = { "": "" }, sort: [stateSort, stateOrder] }) {
2435      const { filter = "", group = "", sort, order = "asc" } = getFilter(el, attr2);
2436      return isUndefined(sort) ? group in stateFilter && filter === stateFilter[group] || !filter && group && !(group in stateFilter) && !stateFilter[""] : stateSort === sort && stateOrder === order;
2437    }
2438    function sortItems(nodes, sort, order) {
2439      return [...nodes].sort(
2440        (a, b) => data(a, sort).localeCompare(data(b, sort), void 0, { numeric: true }) * (order === "asc" || -1)
2441      );
2442    }
2443    function findButton(el) {
2444      return $("a,button", el) || el;
2445    }
2446
2447    var img = {
2448      args: "dataSrc",
2449      props: {
2450        dataSrc: String,
2451        sources: String,
2452        margin: String,
2453        target: String,
2454        loading: String
2455      },
2456      data: {
2457        dataSrc: "",
2458        sources: false,
2459        margin: "50%",
2460        target: false,
2461        loading: "lazy"
2462      },
2463      connected() {
2464        if (this.loading !== "lazy") {
2465          this.load();
2466        } else if (isImg(this.$el)) {
2467          this.$el.loading = "lazy";
2468          setSrcAttrs(this.$el);
2469        }
2470      },
2471      disconnected() {
2472        if (this.img) {
2473          this.img.onload = "";
2474        }
2475        delete this.img;
2476      },
2477      observe: intersection({
2478        handler(entries, observer) {
2479          this.load();
2480          observer.disconnect();
2481        },
2482        options: ({ margin }) => ({ rootMargin: margin }),
2483        filter: ({ loading }) => loading === "lazy",
2484        target: ({ $el, $props }) => $props.target ? [$el, ...queryAll($props.target, $el)] : $el
2485      }),
2486      methods: {
2487        load() {
2488          if (this.img) {
2489            return this.img;
2490          }
2491          const image = isImg(this.$el) ? this.$el : getImageFromElement(this.$el, this.dataSrc, this.sources);
2492          removeAttr(image, "loading");
2493          setSrcAttrs(this.$el, image.currentSrc);
2494          return this.img = image;
2495        }
2496      }
2497    };
2498    function setSrcAttrs(el, src) {
2499      if (isImg(el)) {
2500        const parentNode = parent(el);
2501        const elements = isTag(parentNode, "picture") ? children(parentNode) : [el];
2502        elements.forEach((el2) => setSourceProps(el2, el2));
2503      } else if (src) {
2504        const change = !includes(el.style.backgroundImage, src);
2505        if (change) {
2506          css(el, "backgroundImage", `url(${escape(src)})`);
2507          trigger(el, createEvent("load", false));
2508        }
2509      }
2510    }
2511    const srcProps = ["data-src", "data-srcset", "sizes"];
2512    function setSourceProps(sourceEl, targetEl) {
2513      for (const prop of srcProps) {
2514        const value = data(sourceEl, prop);
2515        if (value) {
2516          attr(targetEl, prop.replace(/data-/g, ""), value);
2517        }
2518      }
2519    }
2520    function getImageFromElement(el, src, sources) {
2521      const img = new Image();
2522      wrapInPicture(img, sources);
2523      setSourceProps(el, img);
2524      img.onload = () => setSrcAttrs(el, img.currentSrc);
2525      attr(img, "src", src);
2526      return img;
2527    }
2528    function wrapInPicture(img, sources) {
2529      sources = parseSources(sources);
2530      if (sources.length) {
2531        const picture = fragment("<picture>");
2532        for (const attrs of sources) {
2533          const source = fragment("<source>");
2534          attr(source, attrs);
2535          append(picture, source);
2536        }
2537        append(picture, img);
2538      }
2539    }
2540    function parseSources(sources) {
2541      if (!sources) {
2542        return [];
2543      }
2544      if (startsWith(sources, "[")) {
2545        try {
2546          sources = JSON.parse(sources);
2547        } catch (e) {
2548          sources = [];
2549        }
2550      } else {
2551        sources = parseOptions(sources);
2552      }
2553      if (!isArray(sources)) {
2554        sources = [sources];
2555      }
2556      return sources.filter((source) => !isEmpty(source));
2557    }
2558    function isImg(el) {
2559      return isTag(el, "img");
2560    }
2561
2562    let prevented;
2563    function preventBackgroundScroll(el) {
2564      const off = on(
2565        el,
2566        "touchstart",
2567        (e) => {
2568          if (e.targetTouches.length !== 1 || matches(e.target, 'input[type="range"')) {
2569            return;
2570          }
2571          let prev = getEventPos(e).y;
2572          const offMove = on(
2573            el,
2574            "touchmove",
2575            (e2) => {
2576              const pos = getEventPos(e2).y;
2577              if (pos === prev) {
2578                return;
2579              }
2580              prev = pos;
2581              if (!scrollParents(e2.target).some((scrollParent) => {
2582                if (!el.contains(scrollParent)) {
2583                  return false;
2584                }
2585                let { scrollHeight, clientHeight } = scrollParent;
2586                return clientHeight < scrollHeight;
2587              })) {
2588                e2.preventDefault();
2589              }
2590            },
2591            { passive: false }
2592          );
2593          once(el, "scroll touchend touchcanel", offMove, { capture: true });
2594        },
2595        { passive: true }
2596      );
2597      if (prevented) {
2598        return off;
2599      }
2600      prevented = true;
2601      const { scrollingElement } = document;
2602      css(scrollingElement, {
2603        overflowY: CSS.supports("overflow", "clip") ? "clip" : "hidden",
2604        touchAction: "none",
2605        paddingRight: width(window) - scrollingElement.clientWidth || ""
2606      });
2607      return () => {
2608        prevented = false;
2609        off();
2610        css(scrollingElement, { overflowY: "", touchAction: "", paddingRight: "" });
2611      };
2612    }
2613
2614    var Container = {
2615      props: {
2616        container: Boolean
2617      },
2618      data: {
2619        container: true
2620      },
2621      computed: {
2622        container({ container }) {
2623          return container === true && this.$container || container && $(container);
2624        }
2625      }
2626    };
2627
2628    var Position = {
2629      props: {
2630        pos: String,
2631        offset: Boolean,
2632        flip: Boolean,
2633        shift: Boolean,
2634        inset: Boolean
2635      },
2636      data: {
2637        pos: `bottom-${isRtl ? "right" : "left"}`,
2638        offset: false,
2639        flip: true,
2640        shift: true,
2641        inset: false
2642      },
2643      connected() {
2644        this.pos = this.$props.pos.split("-").concat("center").slice(0, 2);
2645        [this.dir, this.align] = this.pos;
2646        this.axis = includes(["top", "bottom"], this.dir) ? "y" : "x";
2647      },
2648      methods: {
2649        positionAt(element, target, boundary) {
2650          let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
2651          const placement = [this.flip && "flip", this.shift && "shift"];
2652          const attach = {
2653            element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
2654            target: [this.dir, this.align]
2655          };
2656          if (this.axis === "y") {
2657            for (const prop in attach) {
2658              attach[prop].reverse();
2659            }
2660            offset.reverse();
2661            placement.reverse();
2662          }
2663          const restoreScrollPosition = storeScrollPosition(element);
2664          const elDim = dimensions$1(element);
2665          css(element, { top: -elDim.height, left: -elDim.width });
2666          positionAt(element, target, {
2667            attach,
2668            offset,
2669            boundary,
2670            placement,
2671            viewportOffset: this.getViewportOffset(element)
2672          });
2673          restoreScrollPosition();
2674        },
2675        getPositionOffset(element = this.$el) {
2676          return toPx(
2677            this.offset === false ? css(element, "--hk-position-offset") : this.offset,
2678            this.axis === "x" ? "width" : "height",
2679            element
2680          ) * (includes(["left", "top"], this.dir) ? -1 : 1) * (this.inset ? -1 : 1);
2681        },
2682        getShiftOffset(element = this.$el) {
2683          return this.align === "center" ? 0 : toPx(
2684            css(element, "--hk-position-shift-offset"),
2685            this.axis === "y" ? "width" : "height",
2686            element
2687          ) * (includes(["left", "top"], this.align) ? 1 : -1);
2688        },
2689        getViewportOffset(element) {
2690          return toPx(css(element, "--hk-position-viewport-offset"));
2691        }
2692      }
2693    };
2694    function storeScrollPosition(element) {
2695      const scrollElement = scrollParent(element);
2696      const { scrollTop } = scrollElement;
2697      return () => {
2698        if (scrollTop !== scrollElement.scrollTop) {
2699          scrollElement.scrollTop = scrollTop;
2700        }
2701      };
2702    }
2703
2704    var Togglable = {
2705      props: {
2706        cls: Boolean,
2707        animation: "list",
2708        duration: Number,
2709        velocity: Number,
2710        origin: String,
2711        transition: String
2712      },
2713      data: {
2714        cls: false,
2715        animation: [false],
2716        duration: 200,
2717        velocity: 0.2,
2718        origin: false,
2719        transition: "ease",
2720        clsEnter: "hk-togglable-enter",
2721        clsLeave: "hk-togglable-leave"
2722      },
2723      computed: {
2724        hasAnimation: ({ animation }) => !!animation[0],
2725        hasTransition: ({ animation }) => ["slide", "reveal"].some((transition) => startsWith(animation[0], transition))
2726      },
2727      methods: {
2728        async toggleElement(targets, toggle, animate) {
2729          try {
2730            await Promise.all(
2731              toNodes(targets).map((el) => {
2732                const show = isBoolean(toggle) ? toggle : !this.isToggled(el);
2733                if (!trigger(el, `before${show ? "show" : "hide"}`, [this])) {
2734                  return Promise.reject();
2735                }
2736                const promise = (isFunction(animate) ? animate : animate === false || !this.hasAnimation ? toggleInstant : this.hasTransition ? toggleTransition : toggleAnimation)(el, show, this);
2737                const cls = show ? this.clsEnter : this.clsLeave;
2738                addClass(el, cls);
2739                trigger(el, show ? "show" : "hide", [this]);
2740                const done = () => {
2741                  var _a;
2742                  removeClass(el, cls);
2743                  trigger(el, show ? "shown" : "hidden", [this]);
2744                  if (show) {
2745                    const restoreScrollPosition = storeScrollPosition(el);
2746                    (_a = $$("[autofocus]", el).find(isVisible)) == null ? void 0 : _a.focus();
2747                    restoreScrollPosition();
2748                  }
2749                };
2750                return promise ? promise.then(done, () => {
2751                  removeClass(el, cls);
2752                  return Promise.reject();
2753                }) : done();
2754              })
2755            );
2756            return true;
2757          } catch (e) {
2758            return false;
2759          }
2760        },
2761        isToggled(el = this.$el) {
2762          el = toNode(el);
2763          return hasClass(el, this.clsEnter) ? true : hasClass(el, this.clsLeave) ? false : this.cls ? hasClass(el, this.cls.split(" ")[0]) : isVisible(el);
2764        },
2765        _toggle(el, toggled) {
2766          if (!el) {
2767            return;
2768          }
2769          toggled = Boolean(toggled);
2770          let changed;
2771          if (this.cls) {
2772            changed = includes(this.cls, " ") || toggled !== hasClass(el, this.cls);
2773            changed && toggleClass(el, this.cls, includes(this.cls, " ") ? void 0 : toggled);
2774          } else {
2775            changed = toggled === el.hidden;
2776            changed && (el.hidden = !toggled);
2777          }
2778          if (changed) {
2779            trigger(el, "toggled", [toggled, this]);
2780          }
2781        }
2782      }
2783    };
2784    function toggleInstant(el, show, { _toggle }) {
2785      Animation.cancel(el);
2786      Transition.cancel(el);
2787      return _toggle(el, show);
2788    }
2789    async function toggleTransition(el, show, { animation, duration, velocity, transition, _toggle }) {
2790      var _a;
2791      const [mode = "reveal", startProp = "top"] = ((_a = animation[0]) == null ? void 0 : _a.split("-")) || [];
2792      const dirs = [
2793        ["left", "right"],
2794        ["top", "bottom"]
2795      ];
2796      const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
2797      const end = dir[1] === startProp;
2798      const props = ["width", "height"];
2799      const dimProp = props[dirs.indexOf(dir)];
2800      const marginProp = `margin-${dir[0]}`;
2801      const marginStartProp = `margin-${startProp}`;
2802      let currentDim = dimensions$1(el)[dimProp];
2803      const inProgress = Transition.inProgress(el);
2804      await Transition.cancel(el);
2805      if (show) {
2806        _toggle(el, true);
2807      }
2808      const prevProps = Object.fromEntries(
2809        [
2810          "padding",
2811          "border",
2812          "width",
2813          "height",
2814          "minWidth",
2815          "minHeight",
2816          "overflowY",
2817          "overflowX",
2818          marginProp,
2819          marginStartProp
2820        ].map((key) => [key, el.style[key]])
2821      );
2822      const dim = dimensions$1(el);
2823      const currentMargin = toFloat(css(el, marginProp));
2824      const marginStart = toFloat(css(el, marginStartProp));
2825      const endDim = dim[dimProp] + marginStart;
2826      if (!inProgress && !show) {
2827        currentDim += marginStart;
2828      }
2829      const [wrapper] = wrapInner(el, "<div>");
2830      css(wrapper, {
2831        boxSizing: "border-box",
2832        height: dim.height,
2833        width: dim.width,
2834        ...css(el, [
2835          "overflow",
2836          "padding",
2837          "borderTop",
2838          "borderRight",
2839          "borderBottom",
2840          "borderLeft",
2841          "borderImage",
2842          marginStartProp
2843        ])
2844      });
2845      css(el, {
2846        padding: 0,
2847        border: 0,
2848        minWidth: 0,
2849        minHeight: 0,
2850        [marginStartProp]: 0,
2851        width: dim.width,
2852        height: dim.height,
2853        overflow: "hidden",
2854        [dimProp]: currentDim
2855      });
2856      const percent = currentDim / endDim;
2857      duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
2858      const endProps = { [dimProp]: show ? endDim : 0 };
2859      if (end) {
2860        css(el, marginProp, endDim - currentDim + currentMargin);
2861        endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
2862      }
2863      if (!end ^ mode === "reveal") {
2864        css(wrapper, marginProp, -endDim + currentDim);
2865        Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
2866      }
2867      try {
2868        await Transition.start(el, endProps, duration, transition);
2869      } finally {
2870        css(el, prevProps);
2871        unwrap(wrapper.firstChild);
2872        if (!show) {
2873          _toggle(el, false);
2874        }
2875      }
2876    }
2877    function toggleAnimation(el, show, cmp) {
2878      const { animation, duration, _toggle } = cmp;
2879      if (show) {
2880        _toggle(el, true);
2881        return Animation.in(el, animation[0], duration, cmp.origin);
2882      }
2883      return Animation.out(el, animation[1] || animation[0], duration, cmp.origin).then(
2884        () => _toggle(el, false)
2885      );
2886    }
2887
2888    const active$1 = [];
2889    var Modal = {
2890      mixins: [Class, Container, Togglable],
2891      props: {
2892        selPanel: String,
2893        selClose: String,
2894        escClose: Boolean,
2895        bgClose: Boolean,
2896        stack: Boolean,
2897        role: String
2898      },
2899      data: {
2900        cls: "hk-open",
2901        escClose: true,
2902        bgClose: true,
2903        overlay: true,
2904        stack: false,
2905        role: "dialog"
2906      },
2907      computed: {
2908        panel: ({ selPanel }, $el) => $(selPanel, $el),
vendor: 2,038 bytes, lines 2909-2976
2909        transitionElement() {
2910          return this.panel;
2911        }
2912      },
2913      connected() {
2914        attr(this.panel || this.$el, "role", this.role);
2915        if (this.overlay) {
2916          attr(this.panel || this.$el, "aria-modal", true);
2917        }
2918      },
2919      beforeDisconnect() {
2920        if (includes(active$1, this)) {
2921          this.toggleElement(this.$el, false, false);
2922        }
2923      },
2924      events: [
2925        {
2926          name: "click",
2927          delegate: ({ selClose }) => `${selClose},a[href*="#"]`,
2928          handler(e) {
2929            const { current, defaultPrevented } = e;
2930            const { hash } = current;
2931            if (!defaultPrevented && hash && isSameSiteAnchor(current) && !this.$el.contains($(hash))) {
2932              this.hide();
2933            } else if (matches(current, this.selClose)) {
2934              e.preventDefault();
2935              this.hide();
2936            }
2937          }
2938        },
2939        {
2940          name: "toggle",
2941          self: true,
2942          handler(e) {
2943            if (e.defaultPrevented) {
2944              return;
2945            }
2946            e.preventDefault();
2947            if (this.isToggled() === includes(active$1, this)) {
2948              this.toggle();
2949            }
2950          }
2951        },
2952        {
2953          name: "beforeshow",
2954          self: true,
2955          handler(e) {
2956            if (includes(active$1, this)) {
2957              return false;
2958            }
2959            if (!this.stack && active$1.length) {
2960              Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
2961              e.preventDefault();
2962            } else {
2963              active$1.push(this);
2964            }
2965          }
2966        },
2967        {
2968          name: "show",
2969          self: true,
2970          handler() {
2971            if (this.stack) {
2972              css(this.$el, "zIndex", toFloat(css(this.$el, "zIndex")) + active$1.length);
2973            }
2974            const handlers = [
2975              this.overlay && preventBackgroundFocus(this),
2976              this.overlay && preventBackgroundScroll(this.$el),
2977              this.bgClose && listenForBackgroundClose$1(this),
2978              this.escClose && listenForEscClose$1(this)
2979            ];
2980            once(
2981              this.$el,
2982              "hidden",
2983              () => handlers.forEach((handler) => handler && handler()),
2984              { self: true }
2985            );
2986            addClass(document.documentElement, this.clsPage);
2987          }
2988        },
2989        {
2990          name: "shown",
2991          self: true,
2992          handler() {
2993            if (!isFocusable(this.$el)) {
2994              attr(this.$el, "tabindex", "-1");
2995            }
2996            if (!matches(this.$el, ":focus-within")) {
2997              this.$el.focus();
2998            }
2999          }
3000        },
3001        {
3002          name: "hidden",
3003          self: true,
3004          handler() {
3005            if (includes(active$1, this)) {
3006              active$1.splice(active$1.indexOf(this), 1);
3007            }
3008            css(this.$el, "zIndex", "");
3009            if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
3010              removeClass(document.documentElement, this.clsPage);
3011            }
3012          }
3013        }
3014      ],
3015      methods: {
3016        toggle() {
3017          return this.isToggled() ? this.hide() : this.show();
3018        },
3019        show() {
3020          if (this.container && parent(this.$el) !== this.container) {
3021            append(this.container, this.$el);
3022            return new Promise(
3023              (resolve) => requestAnimationFrame(() => this.show().then(resolve))
3024            );
3025          }
3026          return this.toggleElement(this.$el, true, animate$1);
3027        },
3028        hide() {
3029          return this.toggleElement(this.$el, false, animate$1);
3030        }
3031      }
3032    };
3033    function animate$1(el, show, { transitionElement, _toggle }) {
3034      return new Promise(
3035        (resolve, reject) => once(el, "show hide", () => {
3036          var _a;
3037          (_a = el._reject) == null ? void 0 : _a.call(el);
3038          el._reject = reject;
3039          _toggle(el, show);
3040          const off = once(
3041            transitionElement,
3042            "transitionstart",
3043            () => {
3044              once(transitionElement, "transitionend transitioncancel", resolve, {
3045                self: true
3046              });
3047              clearTimeout(timer);
3048            },
3049            { self: true }
3050          );
3051          const timer = setTimeout(
3052            () => {
3053              off();
3054              resolve();
3055            },
3056            toMs(css(transitionElement, "transitionDuration"))
3057          );
3058        })
3059      ).then(() => delete el._reject);
3060    }
3061    function toMs(time) {
3062      return time ? endsWith(time, "ms") ? toFloat(time) : toFloat(time) * 1e3 : 0;
3063    }
3064    function preventBackgroundFocus(modal) {
3065      return on(document, "focusin", (e) => {
3066        if (last(active$1) === modal && !modal.$el.contains(e.target)) {
3067          modal.$el.focus();
3068        }
3069      });
3070    }
vendor: 18,132 bytes, lines 3071-3605
3071    function listenForBackgroundClose$1(modal) {
3072      return on(document, pointerDown$1, ({ target }) => {
3073        if (last(active$1) !== modal || modal.overlay && !modal.$el.contains(target) || !modal.panel || modal.panel.contains(target)) {
3074          return;
3075        }
3076        once(
3077          document,
3078          `${pointerUp$1} ${pointerCancel} scroll`,
3079          ({ defaultPrevented, type, target: newTarget }) => {
3080            if (!defaultPrevented && type === pointerUp$1 && target === newTarget) {
3081              modal.hide();
3082            }
3083          },
3084          true
3085        );
3086      });
3087    }
3088    function listenForEscClose$1(modal) {
3089      return on(document, "keydown", (e) => {
3090        if (e.keyCode === 27 && last(active$1) === modal) {
3091          modal.hide();
3092        }
3093      });
3094    }
3095
3096    var Animations$2 = {
3097      slide: {
3098        show(dir) {
3099          return [{ transform: translate(dir * -100) }, { transform: translate() }];
3100        },
3101        percent(current) {
3102          return translated(current);
3103        },
3104        translate(percent, dir) {
3105          return [
3106            { transform: translate(dir * -100 * percent) },
3107            { transform: translate(dir * 100 * (1 - percent)) }
3108          ];
3109        }
3110      }
3111    };
3112    function translated(el) {
3113      return Math.abs(new DOMMatrix(css(el, "transform")).m41 / el.offsetWidth);
3114    }
3115    function translate(value = 0, unit = "%") {
3116      return value ? `translate3d(${value + unit}, 0, 0)` : "";
3117    }
3118
3119    function Transitioner$1(prev, next, dir, { animation, easing }) {
3120      const { percent, translate, show = noop } = animation;
3121      const props = show(dir);
3122      const { promise, resolve } = withResolvers();
3123      return {
3124        dir,
3125        show(duration, percent2 = 0, linear) {
3126          const timing = linear ? "linear" : easing;
3127          duration -= Math.round(duration * clamp(percent2, -1, 1));
3128          this.translate(percent2);
3129          triggerUpdate(next, "itemin", { percent: percent2, duration, timing, dir });
3130          triggerUpdate(prev, "itemout", { percent: 1 - percent2, duration, timing, dir });
3131          Promise.all([
3132            Transition.start(next, props[1], duration, timing),
3133            Transition.start(prev, props[0], duration, timing)
3134          ]).then(() => {
3135            this.reset();
3136            resolve();
3137          }, noop);
3138          return promise;
3139        },
3140        cancel() {
3141          return Transition.cancel([next, prev]);
3142        },
3143        reset() {
3144          for (const prop in props[0]) {
3145            css([next, prev], prop, "");
3146          }
3147        },
3148        async forward(duration, percent2 = this.percent()) {
3149          await this.cancel();
3150          return this.show(duration, percent2, true);
3151        },
3152        translate(percent2) {
3153          this.reset();
3154          const props2 = translate(percent2, dir);
3155          css(next, props2[1]);
3156          css(prev, props2[0]);
3157          triggerUpdate(next, "itemtranslatein", { percent: percent2, dir });
3158          triggerUpdate(prev, "itemtranslateout", { percent: 1 - percent2, dir });
3159        },
3160        percent() {
3161          return percent(prev || next, next, dir);
3162        },
3163        getDistance() {
3164          return prev == null ? void 0 : prev.offsetWidth;
3165        }
3166      };
3167    }
3168    function triggerUpdate(el, type, data) {
3169      trigger(el, createEvent(type, false, false, data));
3170    }
3171    function withResolvers() {
3172      let resolve;
3173      return { promise: new Promise((res) => resolve = res), resolve };
3174    }
3175
3176    var I18n = {
3177      props: {
3178        i18n: Object
3179      },
3180      data: {
3181        i18n: null
3182      },
3183      methods: {
3184        t(key, ...params) {
3185          var _a, _b, _c;
3186          let i = 0;
3187          return ((_c = ((_a = this.i18n) == null ? void 0 : _a[key]) || ((_b = this.$options.i18n) == null ? void 0 : _b[key])) == null ? void 0 : _c.replace(
3188            /%s/g,
3189            () => params[i++] || ""
3190          )) || "";
3191        }
3192      }
3193    };
3194
3195    var SliderAutoplay = {
3196      props: {
3197        autoplay: Boolean,
3198        autoplayInterval: Number,
3199        pauseOnHover: Boolean
3200      },
3201      data: {
3202        autoplay: false,
3203        autoplayInterval: 7e3,
3204        pauseOnHover: true
3205      },
3206      connected() {
3207        attr(this.list, "aria-live", this.autoplay ? "off" : "polite");
3208        this.autoplay && this.startAutoplay();
3209      },
3210      disconnected() {
3211        this.stopAutoplay();
3212      },
3213      update() {
3214        attr(this.slides, "tabindex", "-1");
3215      },
3216      events: [
3217        {
3218          name: "visibilitychange",
3219          el: () => document,
3220          filter: ({ autoplay }) => autoplay,
3221          handler() {
3222            if (document.hidden) {
3223              this.stopAutoplay();
3224            } else {
3225              this.startAutoplay();
3226            }
3227          }
3228        }
3229      ],
3230      methods: {
3231        startAutoplay() {
3232          this.stopAutoplay();
3233          this.interval = setInterval(() => {
3234            if (!(this.stack.length || this.draggable && matches(this.$el, ":focus-within") && !matches(this.$el, ":focus") || this.pauseOnHover && matches(this.$el, ":hover"))) {
3235              this.show("next");
3236            }
3237          }, this.autoplayInterval);
3238        },
3239        stopAutoplay() {
3240          clearInterval(this.interval);
3241        }
3242      }
3243    };
3244
3245    const pointerOptions = { passive: false, capture: true };
3246    const pointerUpOptions = { passive: true, capture: true };
3247    const pointerDown = "touchstart mousedown";
3248    const pointerMove = "touchmove mousemove";
3249    const pointerUp = "touchend touchcancel mouseup click input scroll";
3250    var SliderDrag = {
3251      props: {
3252        draggable: Boolean
3253      },
3254      data: {
3255        draggable: true,
3256        threshold: 10
3257      },
3258      created() {
3259        for (const key of ["start", "move", "end"]) {
3260          const fn = this[key];
3261          this[key] = (e) => {
3262            const pos = getEventPos(e).x * (isRtl ? -1 : 1);
3263            this.prevPos = pos === this.pos ? this.prevPos : this.pos;
3264            this.pos = pos;
3265            fn(e);
3266          };
3267        }
3268      },
3269      events: [
3270        {
3271          name: pointerDown,
3272          passive: true,
3273          delegate: ({ selList }) => `${selList} > *`,
3274          handler(e) {
3275            if (!this.draggable || this.parallax || !isTouch(e) && hasSelectableText(e.target) || e.target.closest(selInput) || e.button > 0 || this.length < 2) {
3276              return;
3277            }
3278            this.start(e);
3279          }
3280        },
3281        {
3282          name: "dragstart",
3283          handler(e) {
3284            e.preventDefault();
3285          }
3286        },
3287        {
3288          // iOS workaround for slider stopping if swiping fast
3289          name: pointerMove,
3290          el: ({ list }) => list,
3291          handler: noop,
3292          ...pointerOptions
3293        }
3294      ],
3295      methods: {
3296        start() {
3297          this.drag = this.pos;
3298          if (this._transitioner) {
3299            this.percent = this._transitioner.percent();
3300            this.drag += this._transitioner.getDistance() * this.percent * this.dir;
3301            this._transitioner.cancel();
3302            this._transitioner.translate(this.percent);
3303            this.dragging = true;
3304            this.stack = [];
3305          } else {
3306            this.prevIndex = this.index;
3307          }
3308          on(document, pointerMove, this.move, pointerOptions);
3309          on(document, pointerUp, this.end, pointerUpOptions);
3310          css(this.list, "userSelect", "none");
3311        },
3312        move(e) {
3313          const distance = this.pos - this.drag;
3314          if (distance === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(distance) < this.threshold) {
3315            return;
3316          }
3317          e.cancelable && e.preventDefault();
3318          this.dragging = true;
3319          this.dir = distance < 0 ? 1 : -1;
3320          let { slides, prevIndex } = this;
3321          let dis = Math.abs(distance);
3322          let nextIndex = this.getIndex(prevIndex + this.dir);
3323          let width = getDistance.call(this, prevIndex, nextIndex);
3324          while (nextIndex !== prevIndex && dis > width) {
3325            this.drag -= width * this.dir;
3326            prevIndex = nextIndex;
3327            dis -= width;
3328            nextIndex = this.getIndex(prevIndex + this.dir);
3329            width = getDistance.call(this, prevIndex, nextIndex);
3330          }
3331          this.percent = dis / width;
3332          const prev = slides[prevIndex];
3333          const next = slides[nextIndex];
3334          const changed = this.index !== nextIndex;
3335          const edge = prevIndex === nextIndex;
3336          let itemShown;
3337          for (const i of [this.index, this.prevIndex]) {
3338            if (!includes([nextIndex, prevIndex], i)) {
3339              trigger(slides[i], "itemhidden", [this]);
3340              if (edge) {
3341                itemShown = true;
3342                this.prevIndex = prevIndex;
3343              }
3344            }
3345          }
3346          if (this.index === prevIndex && this.prevIndex !== prevIndex || itemShown) {
3347            trigger(slides[this.index], "itemshown", [this]);
3348          }
3349          if (changed) {
3350            this.prevIndex = prevIndex;
3351            this.index = nextIndex;
3352            if (!edge) {
3353              trigger(prev, "beforeitemhide", [this]);
3354              trigger(prev, "itemhide", [this]);
3355            }
3356            trigger(next, "beforeitemshow", [this]);
3357            trigger(next, "itemshow", [this]);
3358          }
3359          this._transitioner = this._translate(Math.abs(this.percent), prev, !edge && next);
3360        },
3361        end() {
3362          off(document, pointerMove, this.move, pointerOptions);
3363          off(document, pointerUp, this.end, pointerUpOptions);
3364          if (this.dragging) {
3365            setTimeout(on(this.list, "click", (e) => e.preventDefault(), pointerOptions));
3366            this.dragging = null;
3367            if (this.index === this.prevIndex) {
3368              this.percent = 1 - this.percent;
3369              this.dir *= -1;
3370              this._show(false, this.index, true);
3371              this._transitioner = null;
3372            } else {
3373              const dirChange = (isRtl ? this.dir * (isRtl ? 1 : -1) : this.dir) < 0 === this.prevPos > this.pos;
3374              this.index = dirChange ? this.index : this.prevIndex;
3375              if (dirChange) {
3376                trigger(this.slides[this.prevIndex], "itemhidden", [this]);
3377                trigger(this.slides[this.index], "itemshown", [this]);
3378                this.percent = 1 - this.percent;
3379              }
3380              this.show(
3381                this.dir > 0 && !dirChange || this.dir < 0 && dirChange ? "next" : "previous",
3382                true
3383              );
3384            }
3385          }
3386          css(this.list, { userSelect: "" });
3387          this.drag = this.percent = null;
3388        }
3389      }
3390    };
3391    function getDistance(prev, next) {
3392      return this._getTransitioner(prev, prev !== next && next).getDistance() || this.slides[prev].offsetWidth;
3393    }
3394    function hasSelectableText(el) {
3395      return css(el, "userSelect") !== "none" && toArray(el.childNodes).some((el2) => el2.nodeType === 3 && el2.textContent.trim());
3396    }
3397
3398    function initWatches(instance) {
3399      instance._watches = [];
3400      for (const watches of instance.$options.watch || []) {
3401        for (const [name, watch] of Object.entries(watches)) {
3402          registerWatch(instance, watch, name);
3403        }
3404      }
3405      instance._initial = true;
3406    }
3407    function registerWatch(instance, watch, name) {
3408      instance._watches.push({
3409        name,
3410        ...isPlainObject(watch) ? watch : { handler: watch }
3411      });
3412    }
3413    function runWatches(instance, values) {
3414      for (const { name, handler, immediate = true } of instance._watches) {
3415        if (instance._initial && immediate || hasOwn(values, name) && !isEqual(values[name], instance[name])) {
3416          handler.call(instance, instance[name], values[name]);
3417        }
3418      }
3419      instance._initial = false;
3420    }
3421
3422    function initComputed(instance) {
3423      const { computed } = instance.$options;
3424      instance._computed = {};
3425      if (computed) {
3426        for (const key in computed) {
3427          registerComputed(instance, key, computed[key]);
3428        }
3429      }
3430    }
3431    const mutationOptions = { subtree: true, childList: true };
3432    function registerComputed(instance, key, cb) {
3433      instance._hasComputed = true;
3434      Object.defineProperty(instance, key, {
3435        enumerable: true,
3436        get() {
3437          const { _computed, $props, $el } = instance;
3438          if (!hasOwn(_computed, key)) {
3439            _computed[key] = (cb.get || cb).call(instance, $props, $el);
3440            if (cb.observe && instance._computedObserver) {
3441              const selector = cb.observe.call(instance, $props);
3442              instance._computedObserver.observe(
3443                ["~", "+", "-"].includes(selector[0]) ? $el.parentElement : $el.getRootNode(),
3444                mutationOptions
3445              );
3446            }
3447          }
3448          return _computed[key];
3449        },
3450        set(value) {
3451          const { _computed } = instance;
3452          _computed[key] = cb.set ? cb.set.call(instance, value) : value;
3453          if (isUndefined(_computed[key])) {
3454            delete _computed[key];
3455          }
3456        }
3457      });
3458    }
3459    function initComputedUpdates(instance) {
3460      if (!instance._hasComputed) {
3461        return;
3462      }
3463      prependUpdate(instance, {
3464        read: () => runWatches(instance, resetComputed(instance)),
3465        events: ["resize", "computed"]
3466      });
3467      instance._computedObserver = observeMutation(
3468        instance.$el,
3469        () => callUpdate(instance, "computed"),
3470        mutationOptions
3471      );
3472      instance._disconnect.push(() => {
3473        instance._computedObserver.disconnect();
3474        instance._computedObserver = null;
3475        resetComputed(instance);
3476      });
3477    }
3478    function resetComputed(instance) {
3479      const values = { ...instance._computed };
3480      instance._computed = {};
3481      return values;
3482    }
3483
3484    function initEvents(instance) {
3485      for (const event of instance.$options.events || []) {
3486        if (hasOwn(event, "handler")) {
3487          registerEvent(instance, event);
3488        } else {
3489          for (const key in event) {
3490            registerEvent(instance, { name: key, handler: event[key] });
3491          }
3492        }
3493      }
3494    }
3495    function registerEvent(instance, { name, el, handler, capture, passive, delegate, filter, self }) {
3496      if (filter && !filter.call(instance, instance)) {
3497        return;
3498      }
3499      instance._disconnect.push(
3500        on(
3501          el ? el.call(instance, instance) : instance.$el,
3502          name,
3503          delegate == null ? void 0 : delegate.call(instance, instance),
3504          handler.bind(instance),
3505          {
3506            passive,
3507            capture,
3508            self
3509          }
3510        )
3511      );
3512    }
3513
3514    function initObservers(instance) {
3515      for (const observer of instance.$options.observe || []) {
3516        registerObservable(instance, observer);
3517      }
3518    }
3519    function registerObservable(instance, observable) {
3520      let { observe, target = instance.$el, handler, options, filter, args } = observable;
3521      if (filter && !filter.call(instance, instance)) {
3522        return;
3523      }
3524      const key = `_observe${instance._disconnect.length}`;
3525      if (isFunction(target) && !hasOwn(instance, key)) {
3526        registerComputed(instance, key, () => {
3527          const targets2 = target.call(instance, instance);
3528          return isArray(targets2) ? toNodes(targets2) : targets2;
3529        });
3530      }
3531      handler = isString(handler) ? instance[handler] : handler.bind(instance);
3532      if (isFunction(options)) {
3533        options = options.call(instance, instance);
3534      }
3535      const targets = hasOwn(instance, key) ? instance[key] : target;
3536      const observer = observe(targets, handler, options, args);
3537      if (isFunction(target) && isArray(instance[key])) {
3538        registerWatch(
3539          instance,
3540          { handler: updateTargets(observer, options), immediate: false },
3541          key
3542        );
3543      }
3544      instance._disconnect.push(() => observer.disconnect());
3545    }
3546    function updateTargets(observer, options) {
3547      return (targets, prev) => {
3548        for (const target of prev) {
3549          if (!includes(targets, target)) {
3550            if (observer.unobserve) {
3551              observer.unobserve(target);
3552            } else if (observer.observe) {
3553              observer.disconnect();
3554            }
3555          }
3556        }
3557        for (const target of targets) {
3558          if (!includes(prev, target) || !observer.unobserve) {
3559            observer.observe(target, options);
3560          }
3561        }
3562      };
3563    }
3564
3565    function initProps(instance) {
3566      const { $options, $props } = instance;
3567      const props = getProps($options);
3568      assign($props, props);
3569      const { computed, methods } = $options;
3570      for (let key in $props) {
3571        if (key in props && (!computed || !hasOwn(computed, key)) && (!methods || !hasOwn(methods, key))) {
3572          instance[key] = $props[key];
3573        }
3574      }
3575    }
3576    function getProps(opts) {
3577      const data$1 = {};
3578      const { args = [], props = {}, el, id } = opts;
3579      if (!props) {
3580        return data$1;
3581      }
3582      for (const key in props) {
3583        const prop = hyphenate(key);
3584        let value = data(el, prop);
3585        if (isUndefined(value)) {
3586          continue;
3587        }
3588        value = props[key] === Boolean && value === "" ? true : coerce$1(props[key], value);
3589        if (prop === "target" && startsWith(value, "_")) {
3590          continue;
3591        }
3592        data$1[key] = value;
3593      }
3594      const options = parseOptions(data(el, id), args);
3595      for (const key in options) {
3596        const prop = camelize(key);
3597        if (!isUndefined(props[prop])) {
3598          data$1[prop] = coerce$1(props[prop], options[key]);
3599        }
3600      }
3601      return data$1;
3602    }
3603    const getAttributes = memoize((id, props) => {
3604      const attributes = Object.keys(props);
3605      const filter = attributes.concat(id).map((key) => [hyphenate(key), `data-${hyphenate(key)}`]).flat(
vendor: 3,373 bytes, lines 3605-3714
3605);
3606      return { attributes, filter };
3607    });
3608    function initPropsObserver(instance) {
3609      const { $options, $props } = instance;
3610      const { id, props, el } = $options;
3611      if (!props) {
3612        return;
3613      }
3614      const { attributes, filter } = getAttributes(id, props);
3615      const observer = new MutationObserver((records) => {
3616        const data = getProps($options);
3617        if (records.some(({ attributeName }) => {
3618          const prop = attributeName.replace("data-", "");
3619          return (prop === id ? attributes : [camelize(prop), camelize(attributeName)]).some(
3620            (prop2) => !isUndefined(data[prop2]) && data[prop2] !== $props[prop2]
3621          );
3622        })) {
3623          instance.$reset();
3624        }
3625      });
3626      observer.observe(el, {
3627        attributes: true,
3628        attributeFilter: filter
3629      });
3630      instance._disconnect.push(() => observer.disconnect());
3631    }
3632
3633    function callHook(instance, hook) {
3634      var _a;
3635      (_a = instance.$options[hook]) == null ? void 0 : _a.forEach((handler) => handler.call(instance));
3636    }
3637    function callConnected(instance) {
3638      if (instance._connected) {
3639        return;
3640      }
3641      initProps(instance);
3642      callHook(instance, "beforeConnect");
3643      instance._connected = true;
3644      instance._disconnect = [];
3645      initEvents(instance);
3646      initUpdates(instance);
3647      initWatches(instance);
3648      initObservers(instance);
3649      initPropsObserver(instance);
3650      initComputedUpdates(instance);
3651      callHook(instance, "connected");
3652      callUpdate(instance);
3653    }
3654    function callDisconnected(instance) {
3655      if (!instance._connected) {
3656        return;
3657      }
3658      callHook(instance, "beforeDisconnect");
3659      instance._disconnect.forEach((off) => off());
3660      instance._disconnect = null;
3661      callHook(instance, "disconnected");
3662      instance._connected = false;
3663    }
3664
3665    let uid = 0;
3666    function init$1(instance, options = {}) {
3667      options.data = normalizeData(options, instance.constructor.options);
3668      instance.$options = mergeOptions(instance.constructor.options, options, instance);
3669      instance.$props = {};
3670      instance._uid = uid++;
3671      initData(instance);
3672      initMethods(instance);
3673      initComputed(instance);
3674      callHook(instance, "created");
3675      if (options.el) {
3676        instance.$mount(options.el);
3677      }
3678    }
3679    function initData(instance) {
3680      const { data = {} } = instance.$options;
3681      for (const key in data) {
3682        instance.$props[key] = instance[key] = data[key];
3683      }
3684    }
3685    function initMethods(instance) {
3686      const { methods } = instance.$options;
3687      if (methods) {
3688        for (const key in methods) {
3689          instance[key] = methods[key].bind(instance);
3690        }
3691      }
3692    }
3693    function normalizeData({ data = {} }, { args = [], props = {} }) {
3694      if (isArray(data)) {
3695        data = data.slice(0, args.length).reduce((data2, value, index) => {
3696          if (isPlainObject(value)) {
3697            assign(data2, value);
3698          } else {
3699            data2[args[index]] = value;
3700          }
3701          return data2;
3702        }, {});
3703      }
3704      for (const key in data) {
3705        if (isUndefined(data[key])) {
3706          delete data[key];
3707        } else if (props[key]) {
3708          data[key] = coerce$1(props[key], data[key]);
3709        }
3710      }
3711      return data;
3712    }
3713
3714    
vendor: 2,781 bytes, lines 3714-3796
3714const App = function(options) {
3715      init$1(this, options);
3716    };
3717    App.util = util;
3718    App.options = {};
3719    App.version = "3.21.16";
3720
3721    const PREFIX = "hk-";
3722    const DATA = "__uikit__";
3723    const components$2 = {};
3724    function component(name, options) {
3725      var _a, _b;
3726      const id = PREFIX + hyphenate(name);
3727      if (!options) {
3728        if (!components$2[id].options) {
3729          components$2[id] = App.extend(components$2[id]);
3730        }
3731        return components$2[id];
3732      }
3733      name = camelize(name);
3734      App[name] = (element, data) => createComponent(name, element, data);
3735      const opt = (_a = options.options) != null ? _a : { ...options };
3736      opt.id = id;
3737      opt.name = name;
3738      (_b = opt.install) == null ? void 0 : _b.call(opt, App, opt, name);
3739      if (App._initialized && !opt.functional) {
3740        requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
3741      }
3742      return components$2[id] = opt;
3743    }
3744    function createComponent(name, element, data, ...args) {
3745      const Component = component(name);
3746      return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ? $$(element).map(init)[0] : init();
3747      function init(element2) {
3748        const instance = getComponent(element2, name);
3749        if (instance) {
3750          if (data) {
3751            instance.$destroy();
3752          } else {
3753            return instance;
3754          }
3755        }
3756        return new Component({ el: element2, data });
3757      }
3758    }
3759    function getComponents(element) {
3760      return (element == null ? void 0 : element[DATA]) || {};
3761    }
3762    function getComponent(element, name) {
3763      return getComponents(element)[name];
3764    }
3765    function attachToElement(element, instance) {
3766      if (!element[DATA]) {
3767        element[DATA] = {};
3768      }
3769      element[DATA][instance.$options.name] = instance;
3770    }
3771    function detachFromElement(element, instance) {
3772      var _a;
3773      (_a = element[DATA]) == null ? true : delete _a[instance.$options.name];
3774      if (isEmpty(element[DATA])) {
3775        delete element[DATA];
3776      }
3777    }
3778
3779    function globalApi(App) {
3780      App.component = component;
3781      App.getComponents = getComponents;
3782      App.getComponent = getComponent;
3783      App.update = update;
3784      App.use = function(plugin) {
3785        if (plugin.installed) {
3786          return;
3787        }
3788        plugin.call(null, this);
3789        plugin.installed = true;
3790        return this;
3791      };
3792      App.mixin = function(mixin, component2) {
3793        component2 = (isString(component2) ? this.component(component2) : component2) || this;
3794        component2.options = mergeOptions(component2.options, mixin);
3795      };
3796      App.extend = function(options) {
vendor: 4,315 bytes, lines 3797-3941
3797        options || (options = {});
3798        const Super = this;
3799        const Sub = function hkUIkitComponent(options2) {
3800          init$1(this, options2);
3801        };
3802        Sub.prototype = Object.create(Super.prototype);
3803        Sub.prototype.constructor = Sub;
3804        Sub.options = mergeOptions(Super.options, options);
3805        Sub.super = Super;
3806        Sub.extend = Super.extend;
3807        return Sub;
3808      };
3809      let container;
3810      Object.defineProperty(App, "container", {
3811        get() {
3812          return container || document.body;
3813        },
3814        set(element) {
3815          container = $(element);
3816        }
3817      });
3818    }
3819    function update(element, e) {
3820      element = element ? toNode(element) : document.body;
3821      for (const parentEl of parents(element).reverse()) {
3822        updateElement(parentEl, e);
3823      }
3824      apply(element, (element2) => updateElement(element2, e));
3825    }
3826    function updateElement(element, e) {
3827      const components = getComponents(element);
3828      for (const name in components) {
3829        callUpdate(components[name], e);
3830      }
3831    }
3832
3833    function instanceApi(App) {
3834      App.prototype.$mount = function(el) {
3835        const instance = this;
3836        attachToElement(el, instance);
3837        instance.$options.el = el;
3838        if (el.isConnected) {
3839          callConnected(instance);
3840        }
3841      };
3842      App.prototype.$destroy = function(removeEl = false) {
3843        const instance = this;
3844        const { el } = instance.$options;
3845        if (el) {
3846          callDisconnected(instance);
3847        }
3848        callHook(instance, "destroy");
3849        detachFromElement(el, instance);
3850        if (removeEl) {
3851          remove$1(instance.$el);
3852        }
3853      };
3854      App.prototype.$create = createComponent;
3855      App.prototype.$emit = function(e) {
3856        callUpdate(this, e);
3857      };
3858      App.prototype.$update = function(element = this.$el, e) {
3859        update(element, e);
3860      };
3861      App.prototype.$reset = function() {
3862        callDisconnected(this);
3863        callConnected(this);
3864      };
3865      App.prototype.$getComponent = getComponent;
3866      Object.defineProperties(App.prototype, {
3867        $el: {
3868          get() {
3869            return this.$options.el;
3870          }
3871        },
3872        $container: Object.getOwnPropertyDescriptor(App, "container")
3873      });
3874    }
3875    let id = 1;
3876    function generateId(instance, el = null) {
3877      return (el == null ? void 0 : el.id) || `${instance.$options.id}-${id++}`;
3878    }
3879
3880    var SliderNav = {
3881      i18n: {
3882        next: "Next slide",
3883        previous: "Previous slide",
3884        slideX: "Slide %s",
3885        slideLabel: "%s of %s",
3886        role: "String"
3887      },
3888      data: {
3889        selNav: false,
3890        role: "region"
3891      },
3892      computed: {
3893        nav: ({ selNav }, $el) => $(selNav, $el),
3894        navChildren() {
3895          return children(this.nav);
3896        },
3897        selNavItem: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
3898        navItems(_, $el) {
3899          return $$(this.selNavItem, $el);
3900        }
3901      },
3902      watch: {
3903        nav(nav, prev) {
3904          attr(nav, "role", "tablist");
3905          this.padNavitems();
3906          if (prev) {
3907            this.$emit();
3908          }
3909        },
3910        list(list) {
3911          if (isTag(list, "ul")) {
3912            attr(list, "role", "presentation");
3913          }
3914        },
3915        navChildren(children2) {
3916          attr(children2, "role", "presentation");
3917          this.padNavitems();
3918          this.updateNav();
3919        },
3920        navItems(items) {
3921          for (const el of items) {
3922            const cmd = data(el, this.attrItem);
3923            const button = $("a,button", el) || el;
3924            let ariaLabel;
3925            let ariaControls = null;
3926            if (isNumeric(cmd)) {
3927              const item = toNumber(cmd);
3928              const slide = this.slides[item];
3929              if (slide) {
3930                if (!slide.id) {
3931                  slide.id = generateId(this, slide);
3932                }
3933                ariaControls = slide.id;
3934              }
3935              ariaLabel = this.t("slideX", toFloat(cmd) + 1);
3936              attr(button, "role", "tab");
3937            } else {
3938              if (this.list) {
3939                if (!this.list.id) {
3940                  this.list.id = generateId(this, this.list);
3941                }
3942                ariaControls = this.list.id;
3943              }
3944              ariaLabel = this.t(cmd);
3945            }
3946            attr(button, {
3947              "aria-controls": ariaControls,
3948              "aria-label": attr(button, "aria-label") || ariaLabel
3949            });
3950          }
3951        },
3952        slides(slides) {
3953          slides.forEach(
3954            (slide, i) => attr(slide, {
3955              role: this.nav ? "tabpanel" : "group",
3956              "aria-label": this.t("slideLabel", i + 1, this.length),
3957              "aria-roledescription": this.nav ? null : "slide"
3958            })
3959          );
3960          this.padNavitems();
3961        }
3962      },
3963      connected() {
3964        attr(this.$el, {
3965          role: this.role,
3966          "aria-roledescription": "carousel"
3967        });
3968      },
3969      update: [
3970        {
3971          write() {
3972            this.navItems.concat(this.nav).forEach((el) => el && (el.hidden = !this.maxIndex));
3973            this.updateNav();
3974          },
3975          events: ["resize"]
3976        }
3977      ],
3978      events: [
3979        {
3980          name: "click keydown",
3981          delegate: ({ selNavItem }) => selNavItem,
3982          filter: ({ parallax }) => !parallax,
3983          handler(e) {
3984            if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
3985              e.preventDefault();
3986              this.show(data(e.current, this.attrItem));
3987            }
3988          }
3989        },
3990        {
3991          name: "itemshow",
3992          handler() {
3993            this.updateNav();
3994          }
3995        },
3996        {
3997          name: "keydown",
3998          delegate: ({ selNavItem }) => selNavItem,
3999          filter: ({ parallax }) => !parallax,
4000          handler(e) {
4001            const { current, keyCode } = e;
4002            const cmd = data(current, this.attrItem);
4003            if (!isNumeric(cmd)) {
4004              return;
4005            }
4006            let i = keyCode === keyMap.HOME ? 0 : keyCode === keyMap.END ? "last" : keyCode === keyMap.LEFT ? "previous" : keyCode === keyMap.RIGHT ? "next" : -1;
4007            if (~i) {
4008              e.preventDefault();
4009              this.show(i);
4010            }
4011          }
4012        }
4013      ],
4014      methods: {
4015        updateNav() {
4016          const index = this.getValidIndex();
4017          for (const el of this.navItems) {
4018            const cmd = data(el, this.attrItem);
4019            const button = $("a,button", el) || el;
4020            if (isNumeric(cmd)) {
4021              const item = toNumber(cmd);
4022              const active = item === index;
4023              toggleClass(el, this.clsActive, active);
4024              toggleClass(button, "hk-disabled", !!this.parallax);
4025              attr(button, {
4026                "aria-selected": active,
4027                tabindex: active && !this.parallax ? null : -1
4028              });
4029              if (active && button && matches(parent(el), ":focus-within")) {
4030                button.focus();
4031              }
4032            } else {
4033              toggleClass(
4034                el,
4035                "hk-invisible",
4036                this.finite && (cmd === "previous" && index === 0 || cmd === "next" && index >= this.maxIndex)
4037              );
4038            }
4039          }
4040        },
4041        padNavitems() {
4042          if (!this.nav) {
4043            return;
4044          }
4045          const children2 = [];
4046          for (let i = 0; i < this.length; i++) {
4047            const attr2 = `${this.attrItem}="${i}"`;
4048            children2[i] = this.navChildren.findLast((el) => el.matches(`[${attr2}]`)) || $(`<li ${attr2}><a href></a></li>`);
4049          }
4050          if (!isEqual(children2, this.navChildren)) {
4051            html(this.nav, children2);
4052          }
4053        }
4054      }
4055    };
4056
4057    const easeOutQuad = "cubic-bezier(0.25, 0.46, 0.45, 0.94)";
4058    const easeOutQuart = "cubic-bezier(0.165, 0.84, 0.44, 1)";
4059    var Slider = {
4060      mixins: [SliderAutoplay, SliderDrag, SliderNav, I18n],
4061      props: {
4062        clsActivated: String,
4063        easing: String,
4064        index: Number,
4065        finite: Boolean,
4066        velocity: Number
4067      },
4068      data: () => ({
4069        easing: "ease",
4070        finite: false,
4071        velocity: 1,
4072        index: 0,
4073        prevIndex: -1,
4074        stack: [],
4075        percent: 0,
4076        clsActive: "hk-active",
4077        clsActivated: "",
4078        clsEnter: "hk-slide-enter",
4079        clsLeave: "hk-slide-leave",
4080        clsSlideActive: "hk-slide-active",
4081        Transitioner: false,
4082        transitionOptions: {}
4083      }),
4084      connected() {
4085        this.prevIndex = -1;
4086        this.index = this.getValidIndex(this.$props.index);
4087        this.stack = [];
4088      },
4089      disconnected() {
4090        removeClass(this.slides, this.clsActive);
4091      },
4092      computed: {
4093        duration: ({ velocity }, $el) => speedUp($el.offsetWidth / velocity),
4094        list: ({ selList }, $el) => $(selList, $el),
vendor: 37,316 bytes, lines 4095-5199
4095        maxIndex() {
4096          return this.length - 1;
4097        },
4098        slides() {
4099          return children(this.list);
4100        },
4101        length() {
4102          return this.slides.length;
4103        }
4104      },
4105      watch: {
4106        slides(slides, prev) {
4107          if (prev) {
4108            this.$emit();
4109          }
4110        }
4111      },
4112      events: {
4113        itemshow({ target }) {
4114          addClass(target, this.clsEnter, this.clsSlideActive);
4115        },
4116        itemshown({ target }) {
4117          removeClass(target, this.clsEnter);
4118        },
4119        itemhide({ target }) {
4120          addClass(target, this.clsLeave);
4121        },
4122        itemhidden({ target }) {
4123          removeClass(target, this.clsLeave, this.clsSlideActive);
4124        }
4125      },
4126      methods: {
4127        async show(index, force = false) {
4128          var _a;
4129          if (this.dragging || !this.length || this.parallax) {
4130            return;
4131          }
4132          const { stack } = this;
4133          const queueIndex = force ? 0 : stack.length;
4134          const reset = () => {
4135            stack.splice(queueIndex, 1);
4136            if (stack.length) {
4137              this.show(stack.shift(), true);
4138            }
4139          };
4140          stack[force ? "unshift" : "push"](index);
4141          if (!force && stack.length > 1) {
4142            if (stack.length === 2) {
4143              (_a = this._transitioner) == null ? void 0 : _a.forward(Math.min(this.duration, 200));
4144            }
4145            return;
4146          }
4147          const prevIndex = this.getIndex(this.index);
4148          const prev = hasClass(this.slides, this.clsActive) && this.slides[prevIndex];
4149          const nextIndex = this.getIndex(index, this.index);
4150          const next = this.slides[nextIndex];
4151          if (prev === next) {
4152            reset();
4153            return;
4154          }
4155          this.dir = getDirection(index, prevIndex);
4156          this.prevIndex = prevIndex;
4157          this.index = nextIndex;
4158          if (prev && !trigger(prev, "beforeitemhide", [this]) || !trigger(next, "beforeitemshow", [this, prev])) {
4159            this.index = this.prevIndex;
4160            reset();
4161            return;
4162          }
4163          prev && trigger(prev, "itemhide", [this]);
4164          trigger(next, "itemshow", [this]);
4165          await this._show(prev, next, force);
4166          prev && trigger(prev, "itemhidden", [this]);
4167          trigger(next, "itemshown", [this]);
4168          stack.shift();
4169          this._transitioner = null;
4170          if (stack.length) {
4171            requestAnimationFrame(() => stack.length && this.show(stack.shift(), true));
4172          }
4173        },
4174        getIndex(index = this.index, prev = this.index) {
4175          return clamp(
4176            getIndex(index, this.slides, prev, this.finite),
4177            0,
4178            Math.max(0, this.maxIndex)
4179          );
4180        },
4181        getValidIndex(index = this.index, prevIndex = this.prevIndex) {
4182          return this.getIndex(index, prevIndex);
4183        },
4184        async _show(prev, next, force) {
4185          this._transitioner = this._getTransitioner(prev, next, this.dir, {
4186            easing: force ? next.offsetWidth < 600 ? easeOutQuad : easeOutQuart : this.easing,
4187            ...this.transitionOptions
4188          });
4189          if (!force && !prev) {
4190            this._translate(1);
4191            return;
4192          }
4193          const { length } = this.stack;
4194          return this._transitioner[length > 1 ? "forward" : "show"](
4195            length > 1 ? Math.min(this.duration, 75 + 75 / (length - 1)) : this.duration,
4196            this.percent
4197          );
4198        },
4199        _translate(percent, prev = this.prevIndex, next = this.index) {
4200          const transitioner = this._getTransitioner(prev === next ? false : prev, next);
4201          transitioner.translate(percent);
4202          return transitioner;
4203        },
4204        _getTransitioner(prev = this.prevIndex, next = this.index, dir = this.dir || 1, options = this.transitionOptions) {
4205          return new this.Transitioner(
4206            isNumber(prev) ? this.slides[prev] : prev,
4207            isNumber(next) ? this.slides[next] : next,
4208            dir * (isRtl ? -1 : 1),
4209            options
4210          );
4211        }
4212      }
4213    };
4214    function getDirection(index, prevIndex) {
4215      return index === "next" ? 1 : index === "previous" ? -1 : index < prevIndex ? -1 : 1;
4216    }
4217    function speedUp(x) {
4218      return 0.5 * x + 300;
4219    }
4220
4221    var Slideshow = {
4222      mixins: [Slider],
4223      props: {
4224        animation: String
4225      },
4226      data: {
4227        animation: "slide",
4228        clsActivated: "hk-transition-active",
4229        Animations: Animations$2,
4230        Transitioner: Transitioner$1
4231      },
4232      computed: {
4233        animation({ animation, Animations: Animations2 }) {
4234          return { ...Animations2[animation] || Animations2.slide, name: animation };
4235        },
4236        transitionOptions() {
4237          return { animation: this.animation };
4238        }
4239      },
4240      observe: resize(),
4241      events: {
4242        itemshow({ target }) {
4243          addClass(target, this.clsActive);
4244        },
4245        itemshown({ target }) {
4246          addClass(target, this.clsActivated);
4247        },
4248        itemhidden({ target }) {
4249          removeClass(target, this.clsActive, this.clsActivated);
4250        }
4251      }
4252    };
4253
4254    var Animations$1 = {
4255      ...Animations$2,
4256      fade: {
4257        show() {
4258          return [{ opacity: 0, zIndex: 0 }, { zIndex: -1 }];
4259        },
4260        percent(current) {
4261          return 1 - css(current, "opacity");
4262        },
4263        translate(percent) {
4264          return [{ opacity: 1 - percent, zIndex: 0 }, { zIndex: -1 }];
4265        }
4266      },
4267      scale: {
4268        show() {
4269          return [{ opacity: 0, transform: scale3d(1 + 0.5), zIndex: 0 }, { zIndex: -1 }];
4270        },
4271        percent(current) {
4272          return 1 - css(current, "opacity");
4273        },
4274        translate(percent) {
4275          return [
4276            { opacity: 1 - percent, transform: scale3d(1 + 0.5 * percent), zIndex: 0 },
4277            { zIndex: -1 }
4278          ];
4279        }
4280      },
4281      pull: {
4282        show(dir) {
4283          return dir < 0 ? [
4284            { transform: translate(30), zIndex: -1 },
4285            { transform: translate(), zIndex: 0 }
4286          ] : [
4287            { transform: translate(-100), zIndex: 0 },
4288            { transform: translate(), zIndex: -1 }
4289          ];
4290        },
4291        percent(current, next, dir) {
4292          return dir < 0 ? 1 - translated(next) : translated(current);
4293        },
4294        translate(percent, dir) {
4295          return dir < 0 ? [
4296            { transform: translate(30 * percent), zIndex: -1 },
4297            { transform: translate(-100 * (1 - percent)), zIndex: 0 }
4298          ] : [
4299            { transform: translate(-percent * 100), zIndex: 0 },
4300            { transform: translate(30 * (1 - percent)), zIndex: -1 }
4301          ];
4302        }
4303      },
4304      push: {
4305        show(dir) {
4306          return dir < 0 ? [
4307            { transform: translate(100), zIndex: 0 },
4308            { transform: translate(), zIndex: -1 }
4309          ] : [
4310            { transform: translate(-30), zIndex: -1 },
4311            { transform: translate(), zIndex: 0 }
4312          ];
4313        },
4314        percent(current, next, dir) {
4315          return dir > 0 ? 1 - translated(next) : translated(current);
4316        },
4317        translate(percent, dir) {
4318          return dir < 0 ? [
4319            { transform: translate(percent * 100), zIndex: 0 },
4320            { transform: translate(-30 * (1 - percent)), zIndex: -1 }
4321          ] : [
4322            { transform: translate(-30 * percent), zIndex: -1 },
4323            { transform: translate(100 * (1 - percent)), zIndex: 0 }
4324          ];
4325        }
4326      }
4327    };
4328    function scale3d(value) {
4329      return `scale3d(${value}, ${value}, 1)`;
4330    }
4331
4332    var Animations = {
4333      ...Animations$2,
4334      fade: {
4335        show() {
4336          return [{ opacity: 0 }, { opacity: 1 }];
4337        },
4338        percent(current) {
4339          return 1 - css(current, "opacity");
4340        },
4341        translate(percent) {
4342          return [{ opacity: 1 - percent }, { opacity: percent }];
4343        }
4344      },
4345      scale: {
4346        show() {
4347          return [
4348            { opacity: 0, transform: scale3d(1 - 0.2) },
4349            { opacity: 1, transform: scale3d(1) }
4350          ];
4351        },
4352        percent(current) {
4353          return 1 - css(current, "opacity");
4354        },
4355        translate(percent) {
4356          return [
4357            { opacity: 1 - percent, transform: scale3d(1 - 0.2 * percent) },
4358            { opacity: percent, transform: scale3d(1 - 0.2 + 0.2 * percent) }
4359          ];
4360        }
4361      }
4362    };
4363
4364    var LightboxPanel = {
4365      i18n: {
4366        counter: "%s / %s"
4367      },
4368      mixins: [Modal, Slideshow],
4369      functional: true,
4370      props: {
4371        counter: Boolean,
4372        preload: Number,
4373        nav: Boolean,
4374        slidenav: Boolean,
4375        delayControls: Number,
4376        videoAutoplay: Boolean,
4377        template: String
4378      },
4379      data: () => ({
4380        counter: false,
4381        preload: 1,
4382        nav: false,
4383        slidenav: true,
4384        delayControls: 3e3,
4385        videoAutoplay: false,
4386        items: [],
4387        cls: "hk-open",
4388        clsPage: "hk-lightbox-page",
4389        clsFit: "hk-lightbox-items-fit",
4390        clsZoom: "hk-lightbox-zoom",
4391        attrItem: "hk-lightbox-item",
4392        selList: ".hk-lightbox-items",
4393        selClose: ".hk-close-large",
4394        selNav: ".hk-lightbox-thumbnav, .hk-lightbox-dotnav",
4395        selCaption: ".hk-lightbox-caption",
4396        selCounter: ".hk-lightbox-counter",
4397        pauseOnHover: false,
4398        velocity: 2,
4399        Animations,
4400        template: `<div class="hk-lightbox hk-overflow-hidden"> <div class="hk-lightbox-items"></div> <div class="hk-position-top-right hk-position-small hk-transition-fade" hk-inverse> <button class="hk-lightbox-close hk-close-large" type="button" hk-close></button> </div> <div class="hk-lightbox-slidenav hk-position-center-left hk-position-medium hk-transition-fade" hk-inverse> <a href hk-slidenav-previous hk-lightbox-item="previous"></a> </div> <div class="hk-lightbox-slidenav hk-position-center-right hk-position-medium hk-transition-fade" hk-inverse> <a href hk-slidenav-next hk-lightbox-item="next"></a> </div> <div class="hk-position-center-right hk-position-medium hk-transition-fade" hk-inverse style="max-height: 90vh; overflow: auto;"> <ul class="hk-lightbox-thumbnav hk-lightbox-thumbnav-vertical hk-thumbnav hk-thumbnav-vertical"></ul> <ul class="hk-lightbox-dotnav hk-dotnav hk-dotnav-vertical"></ul> </div> <div class="hk-lightbox-counter hk-text-large hk-position-top-left hk-position-small hk-transition-fade" hk-inverse></div> <div class="hk-lightbox-caption hk-position-bottom hk-text-center hk-transition-slide-bottom hk-transition-opaque"></div> </div>`
4401      }),
4402      created() {
4403        let $el = $(this.template);
4404        if (isTag($el, "template")) {
4405          $el = fragment(html($el));
4406        }
4407        const list = $(this.selList, $el);
4408        const navType = this.$props.nav;
4409        remove$1($$(this.selNav, $el).filter((el) => !matches(el, `.hk-${navType}`)));
4410        for (const [i, item] of this.items.entries()) {
4411          append(list, "<div>");
4412          if (navType === "thumbnav") {
4413            wrapAll(
4414              toThumbnavItem(item, this.videoAutoplay),
4415              append($(this.selNav, $el), `<li hk-lightbox-item="${i}"><a href></a></li>`)
4416            );
4417          }
4418        }
4419        if (!this.slidenav) {
4420          remove$1($$(".hk-lightbox-slidenav", $el));
4421        }
4422        if (!this.counter) {
4423          remove$1($(this.selCounter, $el));
4424        }
4425        addClass(list, this.clsFit);
4426        const close = $("[hk-close]", $el);
4427        const closeLabel = this.t("close");
4428        if (close && closeLabel) {
4429          close.dataset.i18n = JSON.stringify({ label: closeLabel });
4430        }
4431        this.$mount(append(this.container, $el));
4432      },
4433      events: [
4434        {
4435          name: "click",
4436          self: true,
4437          filter: ({ bgClose }) => bgClose,
4438          delegate: ({ selList }) => `${selList} > *`,
4439          handler(e) {
4440            if (!e.defaultPrevented) {
4441              this.hide();
4442            }
4443          }
4444        },
4445        {
4446          name: "click",
4447          self: true,
4448          delegate: ({ clsZoom }) => `.${clsZoom}`,
4449          handler(e) {
4450            if (!e.defaultPrevented) {
4451              toggleClass(this.list, this.clsFit);
4452            }
4453          }
4454        },
4455        {
4456          name: `${pointerMove$1} ${pointerDown$1} keydown`,
4457          filter: ({ delayControls }) => delayControls,
4458          handler() {
4459            this.showControls();
4460          }
4461        },
4462        {
4463          name: "shown",
4464          self: true,
4465          handler() {
4466            this.showControls();
4467          }
4468        },
4469        {
4470          name: "hide",
4471          self: true,
4472          handler() {
4473            this.hideControls();
4474            removeClass(this.slides, this.clsActive);
4475            Transition.stop(this.slides);
4476          }
4477        },
4478        {
4479          name: "hidden",
4480          self: true,
4481          handler() {
4482            this.$destroy(true);
4483          }
4484        },
4485        {
4486          name: "keyup",
4487          el: () => document,
4488          handler({ keyCode }) {
4489            if (!this.isToggled(this.$el) || !this.draggable) {
4490              return;
4491            }
4492            let i = -1;
4493            if (keyCode === keyMap.LEFT) {
4494              i = "previous";
4495            } else if (keyCode === keyMap.RIGHT) {
4496              i = "next";
4497            } else if (keyCode === keyMap.HOME) {
4498              i = 0;
4499            } else if (keyCode === keyMap.END) {
4500              i = "last";
4501            }
4502            if (~i) {
4503              this.show(i);
4504            }
4505          }
4506        },
4507        {
4508          name: "beforeitemshow",
4509          handler(e) {
4510            html($(this.selCaption, this.$el), this.getItem().caption || "");
4511            html(
4512              $(this.selCounter, this.$el),
4513              this.t("counter", this.index + 1, this.slides.length)
4514            );
4515            for (let j = -this.preload; j <= this.preload; j++) {
4516              this.loadItem(this.index + j);
4517            }
4518            if (this.isToggled()) {
4519              return;
4520            }
4521            this.draggable = false;
4522            e.preventDefault();
4523            this.toggleElement(this.$el, true, false);
4524            this.animation = Animations.scale;
4525            removeClass(e.target, this.clsActive);
4526            this.stack.splice(1, 0, this.index);
4527          }
4528        },
4529        {
4530          name: "itemshown",
4531          handler() {
4532            this.draggable = this.$props.draggable;
4533          }
4534        },
4535        {
4536          name: "itemload",
4537          async handler(_, item) {
4538            const { source: src, type, attrs = {} } = item;
4539            this.setItem(item, "<span hk-spinner hk-inverse></span>");
4540            if (!src) {
4541              return;
4542            }
4543            let matches2;
4544            const iframeAttrs = {
4545              allowfullscreen: "",
4546              style: "max-width: 100%; box-sizing: border-box;",
4547              "hk-responsive": "",
4548              "hk-video": `${Boolean(this.videoAutoplay)}`
4549            };
4550            if (type === "image" || isImage(src)) {
4551              const img = createEl("img");
4552              wrapInPicture(img, item.sources);
4553              attr(img, {
4554                src,
4555                ...pick(item, ["alt", "srcset", "sizes"]),
4556                ...attrs
4557              });
4558              on(img, "load", () => this.setItem(item, parent(img) || img));
4559              on(img, "error", () => this.setError(item));
4560            } else if (type === "video" || isVideo(src)) {
4561              const inline = this.videoAutoplay === "inline";
4562              const video = createEl("video", {
4563                src,
4564                playsinline: "",
4565                controls: inline ? null : "",
4566                loop: inline ? "" : null,
4567                poster: this.videoAutoplay ? null : item.poster,
4568                "hk-video": inline ? "automute: true" : Boolean(this.videoAutoplay),
4569                ...attrs
4570              });
4571              on(video, "loadedmetadata", () => this.setItem(item, video));
4572              on(video, "error", () => this.setError(item));
4573            } else if (type === "iframe" || src.match(/\.(html|php)($|\?)/i)) {
4574              this.setItem(
4575                item,
4576                createEl("iframe", {
4577                  src,
4578                  allowfullscreen: "",
4579                  class: "hk-lightbox-iframe",
4580                  ...attrs
4581                })
4582              );
4583            } else if (matches2 = src.match(
4584              /\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/
4585            )) {
4586              this.setItem(
4587                item,
4588                createEl("iframe", {
4589                  src: `https://www.youtube${matches2[1] || ""}.com/embed/${matches2[2]}${matches2[3] ? `?${matches2[3]}` : ""}`,
4590                  width: 1920,
4591                  height: 1080,
4592                  ...iframeAttrs,
4593                  ...attrs
4594                })
4595              );
4596            } else if (matches2 = src.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/)) {
4597              try {
4598                const { height, width } = await (await fetch(
4599                  `https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(
4600                src
4601              )}`,
4602                  { credentials: "omit" }
4603                )).json();
4604                this.setItem(
4605                  item,
4606                  createEl("iframe", {
4607                    src: `https://player.vimeo.com/video/${matches2[1]}${matches2[2] ? `?${matches2[2]}` : ""}`,
4608                    width,
4609                    height,
4610                    ...iframeAttrs,
4611                    ...attrs
4612                  })
4613                );
4614              } catch (e) {
4615                this.setError(item);
4616              }
4617            }
4618          }
4619        },
4620        {
4621          name: "itemloaded",
4622          handler() {
4623            this.$emit("resize");
4624          }
4625        }
4626      ],
4627      update: {
4628        read() {
4629          for (const media of $$(`${this.selList} :not([controls]):is(img,video)`, this.$el)) {
4630            toggleClass(
4631              media,
4632              this.clsZoom,
4633              (media.naturalHeight || media.videoHeight) - this.$el.offsetHeight > Math.max(
4634                0,
4635                (media.naturalWidth || media.videoWidth) - this.$el.offsetWidth
4636              )
4637            );
4638          }
4639        },
4640        events: ["resize"]
4641      },
4642      methods: {
4643        loadItem(index = this.index) {
4644          const item = this.getItem(index);
4645          if (!this.getSlide(item).childElementCount) {
4646            trigger(this.$el, "itemload", [item]);
4647          }
4648        },
4649        getItem(index = this.index) {
4650          return this.items[getIndex(index, this.slides)];
4651        },
4652        setItem(item, content) {
4653          trigger(this.$el, "itemloaded", [this, html(this.getSlide(item), content)]);
4654        },
4655        getSlide(item) {
4656          return this.slides[this.items.indexOf(item)];
4657        },
4658        setError(item) {
4659          this.setItem(item, '<span hk-icon="icon: bolt; ratio: 2" hk-inverse></span>');
4660        },
4661        showControls() {
4662          clearTimeout(this.controlsTimer);
4663          this.controlsTimer = this.delayControls && setTimeout(this.hideControls, this.delayControls);
4664          addClass(this.$el, "hk-active", "hk-transition-active");
4665        },
4666        hideControls() {
4667          removeClass(this.$el, "hk-active", "hk-transition-active");
4668        }
4669      }
4670    };
4671    function createEl(tag, attrs) {
4672      const el = fragment(`<${tag}>`);
4673      attr(el, attrs);
4674      return el;
4675    }
4676    function toThumbnavItem(item, videoAutoplay) {
4677      const el = item.poster || item.thumb && (item.type === "image" || isImage(item.thumb)) ? createEl("img", { src: item.poster || item.thumb, alt: "" }) : item.thumb && (item.type === "video" || isVideo(item.thumb)) ? createEl("video", {
4678        src: item.thumb,
4679        loop: "",
4680        playsinline: "",
4681        "hk-video": `autoplay: ${Boolean(videoAutoplay)}; automute: true`
4682      }) : createEl("canvas");
4683      if (item.thumbRatio) {
4684        el.style.aspectRatio = item.thumbRatio;
4685      }
4686      return el;
4687    }
4688    function isImage(src) {
4689      return src == null ? void 0 : src.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i);
4690    }
4691    function isVideo(src) {
4692      return src == null ? void 0 : src.match(/\.(mp4|webm|ogv)($|\?)/i);
4693    }
4694
4695    const selDisabled$1 = ".hk-disabled *, .hk-disabled, [disabled]";
4696    var lightbox = {
4697      install: install$3,
4698      props: { toggle: String },
4699      data: { toggle: "a" },
4700      computed: {
4701        toggles: ({ toggle }, $el) => $$(toggle, $el)
4702      },
4703      watch: {
4704        toggles(toggles) {
4705          this.hide();
4706          for (const toggle of toggles) {
4707            if (isTag(toggle, "a")) {
4708              attr(toggle, "role", "button");
4709            }
4710          }
4711        }
4712      },
4713      disconnected() {
4714        this.hide();
4715      },
4716      events: {
4717        name: "click",
4718        delegate: ({ toggle }) => toggle,
4719        handler(e) {
4720          if (!e.defaultPrevented) {
4721            e.preventDefault();
4722            if (!matches(e.current, selDisabled$1)) {
4723              this.show(e.current);
4724            }
4725          }
4726        }
4727      },
4728      methods: {
4729        show(index) {
4730          let items = this.toggles.map(toItem);
4731          if (this.nav === "thumbnav") {
4732            ensureThumb.call(this, this.toggles, items);
4733          }
4734          items = uniqueBy(items, "source");
4735          if (isElement(index)) {
4736            const { source } = toItem(index);
4737            index = findIndex(items, ({ source: src }) => source === src);
4738          }
4739          this.panel = this.panel || this.$create("lightboxPanel", { ...this.$props, items });
4740          on(this.panel.$el, "hidden", () => this.panel = null);
4741          return this.panel.show(index);
4742        },
4743        hide() {
4744          var _a;
4745          return (_a = this.panel) == null ? void 0 : _a.hide();
4746        }
4747      }
4748    };
4749    function install$3(hkUIkit, Lightbox) {
4750      if (!hkUIkit.lightboxPanel) {
4751        hkUIkit.component("lightboxPanel", LightboxPanel);
4752      }
4753      assign(Lightbox.props, hkUIkit.component("lightboxPanel").options.props);
4754    }
4755    function ensureThumb(toggles, items) {
4756      for (const [i, toggle] of Object.entries(toggles)) {
4757        if (items[i].thumb) {
4758          continue;
4759        }
4760        const parent = parents(toggle).reverse().concat(toggle).find(
4761          (parent2) => this.$el.contains(parent2) && (parent2 === toggle || $$(this.toggle, parent2).length === 1)
4762        );
4763        if (!parent) {
4764          continue;
4765        }
4766        const media = $("img,video", parent);
4767        if (media) {
4768          items[i].thumb = media.currentSrc || media.poster || media.src;
4769          items[i].thumbRatio = (media.naturalWidth || media.videoWidth) / (media.naturalHeight || media.videoHeight);
4770        }
4771      }
4772    }
4773    function toItem(el) {
4774      const item = {};
4775      for (const attribute of el.getAttributeNames()) {
4776        const key = attribute.replace(/^data-/, "");
4777        item[key === "href" ? "source" : key] = el.getAttribute(attribute);
4778      }
4779      item.attrs = parseOptions(item.attrs);
4780      return item;
4781    }
4782
4783    var notification = {
4784      mixins: [Container],
4785      functional: true,
4786      args: ["message", "status"],
4787      data: {
4788        message: "",
4789        status: "",
4790        timeout: 5e3,
4791        group: "",
4792        pos: "top-center",
4793        clsContainer: "hk-notification",
4794        clsClose: "hk-notification-close",
4795        clsMsg: "hk-notification-message"
4796      },
4797      install: install$2,
4798      computed: {
4799        marginProp: ({ pos }) => `margin-${pos.match(/[a-z]+(?=-)/)[0]}`,
4800        startProps() {
4801          return { opacity: 0, [this.marginProp]: -this.$el.offsetHeight };
4802        }
4803      },
4804      created() {
4805        const posClass = `${this.clsContainer}-${this.pos}`;
4806        const containerAttr = `data-${this.clsContainer}-container`;
4807        const container = $(`.${posClass}[${containerAttr}]`, this.container) || append(
4808          this.container,
4809          `<div class="${this.clsContainer} ${posClass}" ${containerAttr}></div>`
4810        );
4811        this.$mount(
4812          append(
4813            container,
4814            `<div class="${this.clsMsg}${this.status ? ` ${this.clsMsg}-${this.status}` : ""}" role="alert"> <a href class="${this.clsClose}" data-hk-close></a> <div>${this.message}</div> </div>`
4815          )
4816        );
4817      },
4818      async connected() {
4819        const margin = toFloat(css(this.$el, this.marginProp));
4820        await Transition.start(css(this.$el, this.startProps), {
4821          opacity: 1,
4822          [this.marginProp]: margin
4823        });
4824        if (this.timeout) {
4825          this.timer = setTimeout(this.close, this.timeout);
4826        }
4827      },
4828      events: {
4829        click(e) {
4830          if (e.target.closest('a[href="#"],a[href=""]')) {
4831            e.preventDefault();
4832          }
4833          this.close();
4834        },
4835        [pointerEnter]() {
4836          if (this.timer) {
4837            clearTimeout(this.timer);
4838          }
4839        },
4840        [pointerLeave]() {
4841          if (this.timeout) {
4842            this.timer = setTimeout(this.close, this.timeout);
4843          }
4844        }
4845      },
4846      methods: {
4847        async close(immediate) {
4848          const removeFn = (el) => {
4849            const container = parent(el);
4850            trigger(el, "close", [this]);
4851            remove$1(el);
4852            if (!(container == null ? void 0 : container.hasChildNodes())) {
4853              remove$1(container);
4854            }
4855          };
4856          if (this.timer) {
4857            clearTimeout(this.timer);
4858          }
4859          if (!immediate) {
4860            await Transition.start(this.$el, this.startProps);
4861          }
4862          removeFn(this.$el);
4863        }
4864      }
4865    };
4866    function install$2(hkUIkit) {
4867      hkUIkit.notification.closeAll = function(group, immediate) {
4868        apply(document.body, (el) => {
4869          const notification = hkUIkit.getComponent(el, "notification");
4870          if (notification && (!group || group === notification.group)) {
4871            notification.close(immediate);
4872          }
4873        });
4874      };
4875    }
4876
4877    var Media = {
4878      props: {
4879        media: Boolean
4880      },
4881      data: {
4882        media: false
4883      },
4884      connected() {
4885        const media = toMedia(this.media, this.$el);
4886        this.matchMedia = true;
4887        if (media) {
4888          this.mediaObj = window.matchMedia(media);
4889          const handler = () => {
4890            this.matchMedia = this.mediaObj.matches;
4891            trigger(this.$el, createEvent("mediachange", false, true, [this.mediaObj]));
4892          };
4893          this.offMediaObj = on(this.mediaObj, "change", () => {
4894            handler();
4895            this.$emit("resize");
4896          });
4897          handler();
4898        }
4899      },
4900      disconnected() {
4901        var _a;
4902        (_a = this.offMediaObj) == null ? void 0 : _a.call(this);
4903      }
4904    };
4905    function toMedia(value, element) {
4906      if (isString(value)) {
4907        if (startsWith(value, "@")) {
4908          value = toFloat(css(element, `--hk-breakpoint-${value.slice(1)}`));
4909        } else if (isNaN(value)) {
4910          return value;
4911        }
4912      }
4913      return value && isNumeric(value) ? `(min-width: ${value}px)` : "";
4914    }
4915
4916    function getMaxPathLength(el) {
4917      return isVisible(el) ? Math.ceil(
4918        Math.max(0, ...$$("[stroke]", el).map((stroke) => {
4919          var _a;
4920          return ((_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke)) || 0;
4921        }))
4922      ) : 0;
4923    }
4924
4925    const props = {
4926      x: transformFn,
4927      y: transformFn,
4928      rotate: transformFn,
4929      scale: transformFn,
4930      color: colorFn,
4931      backgroundColor: colorFn,
4932      borderColor: colorFn,
4933      blur: filterFn,
4934      hue: filterFn,
4935      fopacity: filterFn,
4936      grayscale: filterFn,
4937      invert: filterFn,
4938      saturate: filterFn,
4939      sepia: filterFn,
4940      opacity: cssPropFn,
4941      stroke: strokeFn,
4942      bgx: backgroundFn,
4943      bgy: backgroundFn
4944    };
4945    const { keys } = Object;
4946    var Parallax = {
4947      mixins: [Media],
4948      props: fillObject(keys(props), "list"),
4949      data: fillObject(keys(props), void 0),
4950      computed: {
4951        props(properties, $el) {
4952          const stops = {};
4953          for (const prop in properties) {
4954            if (prop in props && !isUndefined(properties[prop])) {
4955              stops[prop] = properties[prop].slice();
4956            }
4957          }
4958          const result = {};
4959          for (const prop in stops) {
4960            result[prop] = props[prop](prop, $el, stops[prop], stops);
4961          }
4962          return result;
4963        }
4964      },
4965      events: {
4966        load() {
4967          this.$emit();
4968        }
4969      },
4970      methods: {
4971        reset() {
4972          for (const prop in this.getCss(0)) {
4973            css(this.$el, prop, "");
4974          }
4975        },
4976        getCss(percent) {
4977          const css2 = {};
4978          for (const prop in this.props) {
4979            this.props[prop](css2, clamp(percent));
4980          }
4981          css2.willChange = Object.keys(css2).map(propName).join(",");
4982          return css2;
4983        }
4984      }
4985    };
4986    function transformFn(prop, el, stops) {
4987      let unit = getUnit(stops) || { x: "px", y: "px", rotate: "deg" }[prop] || "";
4988      let transformFn2;
4989      if (prop === "x" || prop === "y") {
4990        prop = `translate${ucfirst(prop)}`;
4991        transformFn2 = (stop) => toFloat(toFloat(stop).toFixed(unit === "px" ? 0 : 6));
4992      } else if (prop === "scale") {
4993        unit = "";
4994        transformFn2 = (stop) => {
4995          var _a;
4996          return getUnit([stop]) ? toPx(stop, "width", el, true) / el[`offset${((_a = stop.endsWith) == null ? void 0 : _a.call(stop, "vh")) ? "Height" : "Width"}`] : toFloat(stop);
4997        };
4998      }
4999      if (stops.length === 1) {
5000        stops.unshift(prop === "scale" ? 1 : 0);
5001      }
5002      stops = parseStops(stops, transformFn2);
5003      return (css2, percent) => {
5004        css2.transform = `${css2.transform || ""} ${prop}(${getValue(stops, percent)}${unit})`;
5005      };
5006    }
5007    function colorFn(prop, el, stops) {
5008      if (stops.length === 1) {
5009        stops.unshift(getCssValue(el, prop, ""));
5010      }
5011      stops = parseStops(stops, (stop) => parseColor(el, stop));
5012      return (css2, percent) => {
5013        const [start, end, p] = getStop(stops, percent);
5014        const value = start.map((value2, i) => {
5015          value2 += p * (end[i] - value2);
5016          return i === 3 ? toFloat(value2) : parseInt(value2, 10);
5017        }).join(",");
5018        css2[prop] = `rgba(${value})`;
5019      };
5020    }
5021    function parseColor(el, color) {
5022      return getCssValue(el, "color", color).split(/[(),]/g).slice(1, -1).concat(1).slice(0, 4).map(toFloat);
5023    }
5024    function filterFn(prop, el, stops) {
5025      if (stops.length === 1) {
5026        stops.unshift(0);
5027      }
5028      const unit = getUnit(stops) || { blur: "px", hue: "deg" }[prop] || "%";
5029      prop = { fopacity: "opacity", hue: "hue-rotate" }[prop] || prop;
5030      stops = parseStops(stops);
5031      return (css2, percent) => {
5032        const value = getValue(stops, percent);
5033        css2.filter = `${css2.filter || ""} ${prop}(${value + unit})`;
5034      };
5035    }
5036    function cssPropFn(prop, el, stops) {
5037      if (stops.length === 1) {
5038        stops.unshift(getCssValue(el, prop, ""));
5039      }
5040      stops = parseStops(stops);
5041      return (css2, percent) => {
5042        css2[prop] = getValue(stops, percent);
5043      };
5044    }
5045    function strokeFn(prop, el, stops) {
5046      if (stops.length === 1) {
5047        stops.unshift(0);
5048      }
5049      const unit = getUnit(stops);
5050      const length = getMaxPathLength(el);
5051      stops = parseStops(stops.reverse(), (stop) => {
5052        stop = toFloat(stop);
5053        return unit === "%" ? stop * length / 100 : stop;
5054      });
5055      if (!stops.some(([value]) => value)) {
5056        return noop;
5057      }
5058      css(el, "strokeDasharray", length);
5059      return (css2, percent) => {
5060        css2.strokeDashoffset = getValue(stops, percent);
5061      };
5062    }
5063    function backgroundFn(prop, el, stops, props2) {
5064      if (stops.length === 1) {
5065        stops.unshift(0);
5066      }
5067      const attr = prop === "bgy" ? "height" : "width";
5068      props2[prop] = parseStops(stops, (stop) => toPx(stop, attr, el));
5069      const bgProps = ["bgx", "bgy"].filter((prop2) => prop2 in props2);
5070      if (bgProps.length === 2 && prop === "bgx") {
5071        return noop;
5072      }
5073      if (getCssValue(el, "backgroundSize", "") === "cover") {
5074        return backgroundCoverFn(prop, el, stops, props2);
5075      }
5076      const positions = {};
5077      for (const prop2 of bgProps) {
5078        positions[prop2] = getBackgroundPos(el, prop2);
5079      }
5080      return setBackgroundPosFn(bgProps, positions, props2);
5081    }
5082    function backgroundCoverFn(prop, el, stops, props2) {
5083      const dimImage = getBackgroundImageDimensions(el);
5084      if (!dimImage.width) {
5085        return noop;
5086      }
5087      const dimEl = {
5088        width: el.offsetWidth,
5089        height: el.offsetHeight
5090      };
5091      const bgProps = ["bgx", "bgy"].filter((prop2) => prop2 in props2);
5092      const positions = {};
5093      for (const prop2 of bgProps) {
5094        const values = props2[prop2].map(([value]) => value);
5095        const min = Math.min(...values);
5096        const max = Math.max(...values);
5097        const down = values.indexOf(min) < values.indexOf(max);
5098        const diff = max - min;
5099        positions[prop2] = `${(down ? -diff : 0) - (down ? min : max)}px`;
5100        dimEl[prop2 === "bgy" ? "height" : "width"] += diff;
5101      }
5102      const dim = Dimensions.cover(dimImage, dimEl);
5103      for (const prop2 of bgProps) {
5104        const attr = prop2 === "bgy" ? "height" : "width";
5105        const overflow = dim[attr] - dimEl[attr];
5106        positions[prop2] = `max(${getBackgroundPos(el, prop2)},-${overflow}px) + ${positions[prop2]}`;
5107      }
5108      const fn = setBackgroundPosFn(bgProps, positions, props2);
5109      return (css2, percent) => {
5110        fn(css2, percent);
5111        css2.backgroundSize = `${dim.width}px ${dim.height}px`;
5112        css2.backgroundRepeat = "no-repeat";
5113      };
5114    }
5115    function getBackgroundPos(el, prop) {
5116      return getCssValue(el, `background-position-${prop.slice(-1)}`, "");
5117    }
5118    function setBackgroundPosFn(bgProps, positions, props2) {
5119      return function(css2, percent) {
5120        for (const prop of bgProps) {
5121          const value = getValue(props2[prop], percent);
5122          css2[`background-position-${prop.slice(-1)}`] = `calc(${positions[prop]} + ${value}px)`;
5123        }
5124      };
5125    }
5126    const loading = {};
5127    const dimensions = {};
5128    function getBackgroundImageDimensions(el) {
5129      const src = css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
5130      if (dimensions[src]) {
5131        return dimensions[src];
5132      }
5133      const image = new Image();
5134      if (src) {
5135        image.src = src;
5136        if (!image.naturalWidth && !loading[src]) {
5137          once(image, "error load", () => {
5138            dimensions[src] = toDimensions(image);
5139            trigger(el, createEvent("load", false));
5140          });
5141          loading[src] = true;
5142          return toDimensions(image);
5143        }
5144      }
5145      return dimensions[src] = toDimensions(image);
5146    }
5147    function toDimensions(image) {
5148      return {
5149        width: image.naturalWidth,
5150        height: image.naturalHeight
5151      };
5152    }
5153    function parseStops(stops, fn = toFloat) {
5154      const result = [];
5155      const { length } = stops;
5156      let nullIndex = 0;
5157      for (let i = 0; i < length; i++) {
5158        let [value, percent] = isString(stops[i]) ? stops[i].trim().split(/ (?![^(]*\))/) : [stops[i]];
5159        value = fn(value);
5160        percent = percent ? toFloat(percent) / 100 : null;
5161        if (i === 0) {
5162          if (percent === null) {
5163            percent = 0;
5164          } else if (percent) {
5165            result.push([value, 0]);
5166          }
5167        } else if (i === length - 1) {
5168          if (percent === null) {
5169            percent = 1;
5170          } else if (percent !== 1) {
5171            result.push([value, percent]);
5172            percent = 1;
5173          }
5174        }
5175        result.push([value, percent]);
5176        if (percent === null) {
5177          nullIndex++;
5178        } else if (nullIndex) {
5179          const leftPercent = result[i - nullIndex - 1][1];
5180          const p = (percent - leftPercent) / (nullIndex + 1);
5181          for (let j = nullIndex; j > 0; j--) {
5182            result[i - j][1] = leftPercent + p * (nullIndex - j + 1);
5183          }
5184          nullIndex = 0;
5185        }
5186      }
5187      return result;
5188    }
5189    function getStop(stops, percent) {
5190      const index = findIndex(stops.slice(1), ([, targetPercent]) => percent <= targetPercent) + 1;
5191      return [
5192        stops[index - 1][0],
5193        stops[index][0],
5194        (percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])
5195      ];
5196    }
5197    function getValue(stops, percent) {
5198      const [start, end, p] = getStop(stops, percent);
5199      return start + Math.abs(start - end) * p * (start < end ? 1 : -1)
vendor: 8,619 bytes, lines 5199-5478
5199;
5200    }
5201    const unitRe = /^-?\d+(?:\.\d+)?(\S+)?/;
5202    function getUnit(stops, defaultUnit) {
5203      var _a;
5204      for (const stop of stops) {
5205        const match = (_a = stop.match) == null ? void 0 : _a.call(stop, unitRe);
5206        if (match) {
5207          return match[1];
5208        }
5209      }
5210      return defaultUnit;
5211    }
5212    function getCssValue(el, prop, value) {
5213      const prev = el.style[prop];
5214      const val = css(css(el, prop, value), prop);
5215      el.style[prop] = prev;
5216      return val;
5217    }
5218    function fillObject(keys2, value) {
5219      return keys2.reduce((data, prop) => {
5220        data[prop] = value;
5221        return data;
5222      }, {});
5223    }
5224    function ease(percent, easing) {
5225      return easing >= 0 ? Math.pow(percent, easing + 1) : 1 - Math.pow(1 - percent, 1 - easing);
5226    }
5227
5228    var parallax = {
5229      mixins: [Parallax],
5230      props: {
5231        target: String,
5232        viewport: Number,
5233        // Deprecated
5234        easing: Number,
5235        start: String,
5236        end: String
5237      },
5238      data: {
5239        target: false,
5240        viewport: 1,
5241        easing: 1,
5242        start: 0,
5243        end: 0
5244      },
5245      computed: {
5246        target: ({ target }, $el) => getOffsetElement(target && query(target, $el) || $el),
5247        start({ start }) {
5248          return toPx(start, "height", this.target, true);
5249        },
5250        end({ end, viewport: viewport2 }) {
5251          return toPx(
5252            end || (viewport2 = (1 - viewport2) * 100) && `${viewport2}vh+${viewport2}%`,
5253            "height",
5254            this.target,
5255            true
5256          );
5257        }
5258      },
5259      observe: [
5260        viewport(),
5261        scroll$1({ target: ({ target }) => target }),
5262        resize({ target: ({ $el, target }) => [$el, target, scrollParent(target, true)] })
5263      ],
5264      update: {
5265        read({ percent }, types) {
5266          if (!types.has("scroll")) {
5267            percent = false;
5268          }
5269          if (!isVisible(this.$el)) {
5270            return false;
5271          }
5272          if (!this.matchMedia) {
5273            return;
5274          }
5275          const prev = percent;
5276          percent = ease(scrolledOver(this.target, this.start, this.end), this.easing);
5277          return {
5278            percent,
5279            style: prev === percent ? false : this.getCss(percent)
5280          };
5281        },
5282        write({ style }) {
5283          if (!this.matchMedia) {
5284            this.reset();
5285            return;
5286          }
5287          style && css(this.$el, style);
5288        },
5289        events: ["scroll", "resize"]
5290      }
5291    };
5292    function getOffsetElement(el) {
5293      return el ? "offsetTop" in el ? el : getOffsetElement(parent(el)) : document.documentElement;
5294    }
5295
5296    var SliderParallax = {
5297      props: {
5298        parallax: Boolean,
5299        parallaxTarget: Boolean,
5300        parallaxStart: String,
5301        parallaxEnd: String,
5302        parallaxEasing: Number
5303      },
5304      data: {
5305        parallax: false,
5306        parallaxTarget: false,
5307        parallaxStart: 0,
5308        parallaxEnd: 0,
5309        parallaxEasing: 0
5310      },
5311      observe: [
5312        resize({
5313          target: ({ $el, parallaxTarget }) => [$el, parallaxTarget],
5314          filter: ({ parallax }) => parallax
5315        }),
5316        scroll$1({ filter: ({ parallax }) => parallax })
5317      ],
5318      computed: {
5319        parallaxTarget({ parallaxTarget }, $el) {
5320          return parallaxTarget && query(parallaxTarget, $el) || this.list;
5321        }
5322      },
5323      update: {
5324        read() {
5325          if (!this.parallax) {
5326            return false;
5327          }
5328          const target = this.parallaxTarget;
5329          if (!target) {
5330            return false;
5331          }
5332          const start = toPx(this.parallaxStart, "height", target, true);
5333          const end = toPx(this.parallaxEnd, "height", target, true);
5334          const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
5335          return { parallax: this.getIndexAt(percent) };
5336        },
5337        write({ parallax }) {
5338          const [prevIndex, slidePercent] = parallax;
5339          const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
5340          const prev = this.slides[prevIndex];
5341          const next = this.slides[nextIndex];
5342          const { triggerShow, triggerShown, triggerHide, triggerHidden } = useTriggers(this);
5343          if (~this.prevIndex) {
5344            for (const i of /* @__PURE__ */ new Set([this.index, this.prevIndex])) {
5345              if (!includes([nextIndex, prevIndex], i)) {
5346                triggerHide(this.slides[i]);
5347                triggerHidden(this.slides[i]);
5348              }
5349            }
5350          }
5351          const changed = this.prevIndex !== prevIndex || this.index !== nextIndex;
5352          this.dir = 1;
5353          this.prevIndex = prevIndex;
5354          this.index = nextIndex;
5355          if (prev !== next) {
5356            triggerHide(prev);
5357          }
5358          triggerShow(next);
5359          if (changed) {
5360            triggerShown(prev);
5361          }
5362          this._translate(prev === next ? 1 : slidePercent, prev, next);
5363        },
5364        events: ["scroll", "resize"]
5365      },
5366      methods: {
5367        getIndexAt(percent) {
5368          const index = percent * (this.length - 1);
5369          return [Math.floor(index), index % 1];
5370        }
5371      }
5372    };
5373    function useTriggers(cmp) {
5374      const { clsSlideActive, clsEnter, clsLeave } = cmp;
5375      return { triggerShow, triggerShown, triggerHide, triggerHidden };
5376      function triggerShow(el) {
5377        if (hasClass(el, clsLeave)) {
5378          triggerHide(el);
5379          triggerHidden(el);
5380        }
5381        if (!hasClass(el, clsSlideActive)) {
5382          trigger(el, "beforeitemshow", [cmp]);
5383          trigger(el, "itemshow", [cmp]);
5384        }
5385      }
5386      function triggerShown(el) {
5387        if (hasClass(el, clsEnter)) {
5388          trigger(el, "itemshown", [cmp]);
5389        }
5390      }
5391      function triggerHide(el) {
5392        if (!hasClass(el, clsSlideActive)) {
5393          triggerShow(el);
5394        }
5395        if (hasClass(el, clsEnter)) {
5396          triggerShown(el);
5397        }
5398        if (!hasClass(el, clsLeave)) {
5399          trigger(el, "beforeitemhide", [cmp]);
5400          trigger(el, "itemhide", [cmp]);
5401        }
5402      }
5403      function triggerHidden(el) {
5404        if (hasClass(el, clsLeave)) {
5405          trigger(el, "itemhidden", [cmp]);
5406        }
5407      }
5408    }
5409
5410    var SliderReactive = {
5411      update: {
5412        write() {
5413          if (this.stack.length || this.dragging || this.parallax) {
5414            return;
5415          }
5416          const index = this.getValidIndex();
5417          if (!~this.prevIndex || this.index !== index) {
5418            this.show(index);
5419          } else {
5420            this._translate(1);
5421          }
5422        },
5423        events: ["resize"]
5424      }
5425    };
5426
5427    var SliderPreload = {
5428      observe: lazyload({
5429        target: ({ slides }) => slides,
5430        targets: (instance) => instance.getAdjacentSlides()
5431      }),
5432      methods: {
5433        getAdjacentSlides() {
5434          return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
5435        }
5436      }
5437    };
5438
5439    function Transitioner(prev, next, dir, { center, easing, list }) {
5440      const from = prev ? getLeft(prev, list, center) : getLeft(next, list, center) + dimensions$1(next).width * dir;
5441      const to = next ? getLeft(next, list, center) : from + dimensions$1(prev).width * dir * (isRtl ? -1 : 1);
5442      const { promise, resolve } = withResolvers();
5443      return {
5444        dir,
5445        show(duration, percent = 0, linear) {
5446          const timing = linear ? "linear" : easing;
5447          duration -= Math.round(duration * clamp(percent, -1, 1));
5448          css(list, "transitionProperty", "none");
5449          this.translate(percent);
5450          css(list, "transitionProperty", "");
5451          percent = prev ? percent : clamp(percent, 0, 1);
5452          triggerUpdate(this.getItemIn(), "itemin", { percent, duration, timing, dir });
5453          prev && triggerUpdate(this.getItemIn(true), "itemout", {
5454            percent: 1 - percent,
5455            duration,
5456            timing,
5457            dir
5458          });
5459          Transition.start(
5460            list,
5461            { transform: translate(-to * (isRtl ? -1 : 1), "px") },
5462            duration,
5463            timing
5464          ).then(resolve, noop);
5465          return promise;
5466        },
5467        cancel() {
5468          return Transition.cancel(list);
5469        },
5470        reset() {
5471          css(list, "transform", "");
5472        },
5473        async forward(duration, percent = this.percent()) {
5474          await this.cancel();
5475          return this.show(duration, percent, true);
5476        },
5477        translate(percent) {
5478          if (percent 
vendor: 54,063 bytes, lines 5478-7168
5478=== this.percent()) {
5479            return;
5480          }
5481          const distance = this.getDistance() * dir * (isRtl ? -1 : 1);
5482          css(
5483            list,
5484            "transform",
5485            translate(
5486              clamp(
5487                -to + (distance - distance * percent),
5488                -getWidth(list),
5489                dimensions$1(list).width
5490              ) * (isRtl ? -1 : 1),
5491              "px"
5492            )
5493          );
5494          const actives = this.getActives();
5495          const itemIn = this.getItemIn();
5496          const itemOut = this.getItemIn(true);
5497          percent = prev ? clamp(percent, -1, 1) : 0;
5498          for (const slide of children(list)) {
5499            const isActive = includes(actives, slide);
5500            const isIn = slide === itemIn;
5501            const isOut = slide === itemOut;
5502            const translateIn = isIn || !isOut && (isActive || dir * (isRtl ? -1 : 1) === -1 ^ getElLeft(slide, list) > getElLeft(prev || next));
5503            triggerUpdate(slide, `itemtranslate${translateIn ? "in" : "out"}`, {
5504              dir,
5505              percent: isOut ? 1 - percent : isIn ? percent : isActive ? 1 : 0
5506            });
5507          }
5508        },
5509        percent() {
5510          return Math.abs(
5511            (new DOMMatrix(css(list, "transform")).m41 * (isRtl ? -1 : 1) + from) / (to - from)
5512          );
5513        },
5514        getDistance() {
5515          return Math.abs(to - from);
5516        },
5517        getItemIn(out = false) {
5518          let actives = this.getActives();
5519          let nextActives = inView(list, getLeft(next || prev, list, center));
5520          if (out) {
5521            const temp = actives;
5522            actives = nextActives;
5523            nextActives = temp;
5524          }
5525          return nextActives[findIndex(nextActives, (el) => !includes(actives, el))];
5526        },
5527        getActives() {
5528          return inView(list, getLeft(prev || next, list, center));
5529        }
5530      };
5531    }
5532    function getLeft(el, list, center) {
5533      const left = getElLeft(el, list);
5534      return center ? left - centerEl(el, list) : Math.min(left, getMax(list));
5535    }
5536    function getMax(list) {
5537      return Math.max(0, getWidth(list) - dimensions$1(list).width);
5538    }
5539    function getWidth(list, index) {
5540      return sumBy(children(list).slice(0, index), (el) => dimensions$1(el).width);
5541    }
5542    function centerEl(el, list) {
5543      return dimensions$1(list).width / 2 - dimensions$1(el).width / 2;
5544    }
5545    function getElLeft(el, list) {
5546      return el && (position(el).left + (isRtl ? dimensions$1(el).width - dimensions$1(list).width : 0)) * (isRtl ? -1 : 1) || 0;
5547    }
5548    function inView(list, listLeft) {
5549      listLeft -= 1;
5550      const listWidth = dimensions$1(list).width;
5551      const listRight = listLeft + listWidth + 2;
5552      return children(list).filter((slide) => {
5553        const slideLeft = getElLeft(slide, list);
5554        const slideRight = slideLeft + Math.min(dimensions$1(slide).width, listWidth);
5555        return slideLeft >= listLeft && slideRight <= listRight;
5556      });
5557    }
5558
5559    var slider = {
5560      mixins: [Class, Slider, SliderReactive, SliderParallax, SliderPreload],
5561      props: {
5562        center: Boolean,
5563        sets: Boolean,
5564        active: String
5565      },
5566      data: {
5567        center: false,
5568        sets: false,
5569        attrItem: "hk-slider-item",
5570        selList: ".hk-slider-items",
5571        selNav: ".hk-slider-nav",
5572        clsContainer: "hk-slider-container",
5573        active: "all",
5574        Transitioner
5575      },
5576      computed: {
5577        finite({ finite }) {
5578          return finite || isFinite(this.list, this.center);
5579        },
5580        maxIndex() {
5581          if (!this.finite || this.center && !this.sets) {
5582            return this.length - 1;
5583          }
5584          if (this.center) {
5585            return last(this.sets);
5586          }
5587          let lft = 0;
5588          const max = getMax(this.list);
5589          const index = findIndex(this.slides, (el) => {
5590            if (lft >= max - 5e-3) {
5591              return true;
5592            }
5593            lft += dimensions$1(el).width;
5594          });
5595          return ~index ? index : this.length - 1;
5596        },
5597        sets({ sets: enabled }) {
5598          if (!enabled || this.parallax) {
5599            return;
5600          }
5601          let left = 0;
5602          const sets = [];
5603          const width = dimensions$1(this.list).width;
5604          for (let i = 0; i < this.length; i++) {
5605            const slideWidth = dimensions$1(this.slides[i]).width;
5606            if (left + slideWidth > width) {
5607              left = 0;
5608            }
5609            if (this.center) {
5610              if (left < width / 2 && left + slideWidth + dimensions$1(this.slides[getIndex(i + 1, this.slides)]).width / 2 > width / 2) {
5611                sets.push(i);
5612                left = width / 2 - slideWidth / 2;
5613              }
5614            } else if (left === 0) {
5615              sets.push(Math.min(i, this.maxIndex));
5616            }
5617            left += slideWidth;
5618          }
5619          if (sets.length) {
5620            return sets;
5621          }
5622        },
5623        transitionOptions() {
5624          return {
5625            center: this.center,
5626            list: this.list
5627          };
5628        },
5629        slides() {
5630          return children(this.list).filter(isVisible);
5631        }
5632      },
5633      connected() {
5634        toggleClass(this.$el, this.clsContainer, !$(`.${this.clsContainer}`, this.$el));
5635      },
5636      observe: resize({
5637        target: ({ slides, $el }) => [$el, ...slides]
5638      }),
5639      update: {
5640        write() {
5641          for (const el of this.navItems) {
5642            const index = toNumber(data(el, this.attrItem));
5643            if (index !== false) {
5644              el.hidden = !this.maxIndex || index > this.maxIndex || this.sets && !includes(this.sets, index);
5645            }
5646          }
5647          this.reorder();
5648          if (!this.parallax) {
5649            this._translate(1);
5650          }
5651          this.updateActiveClasses();
5652        },
5653        events: ["resize"]
5654      },
5655      events: {
5656        beforeitemshow(e) {
5657          if (!this.dragging && this.sets && this.stack.length < 2 && !includes(this.sets, this.index)) {
5658            this.index = this.getValidIndex();
5659          }
5660          const diff = Math.abs(
5661            this.index - this.prevIndex + (this.dir > 0 && this.index < this.prevIndex || this.dir < 0 && this.index > this.prevIndex ? (this.maxIndex + 1) * this.dir : 0)
5662          );
5663          if (!this.dragging && diff > 1) {
5664            for (let i = 0; i < diff; i++) {
5665              this.stack.splice(1, 0, this.dir > 0 ? "next" : "previous");
5666            }
5667            e.preventDefault();
5668            return;
5669          }
5670          const index = this.dir < 0 || !this.slides[this.prevIndex] ? this.index : this.prevIndex;
5671          const avgWidth = getWidth(this.list) / this.length;
5672          this.duration = speedUp(avgWidth / this.velocity) * (dimensions$1(this.slides[index]).width / avgWidth);
5673          this.reorder();
5674        },
5675        itemshow() {
5676          if (~this.prevIndex) {
5677            addClass(this._getTransitioner().getItemIn(), this.clsActive);
5678          }
5679          this.updateActiveClasses(this.prevIndex);
5680        },
5681        itemshown() {
5682          this.updateActiveClasses();
5683        }
5684      },
5685      methods: {
5686        reorder() {
5687          if (this.finite) {
5688            css(this.slides, "order", "");
5689            return;
5690          }
5691          const index = this.dir > 0 && this.slides[this.prevIndex] ? this.prevIndex : this.index;
5692          this.slides.forEach(
5693            (slide, i) => css(
5694              slide,
5695              "order",
5696              this.dir > 0 && i < index ? 1 : this.dir < 0 && i >= this.index ? -1 : ""
5697            )
5698          );
5699          if (!this.center || !this.length) {
5700            return;
5701          }
5702          const next = this.slides[index];
5703          let width = dimensions$1(this.list).width / 2 - dimensions$1(next).width / 2;
5704          let j = 0;
5705          while (width > 0) {
5706            const slideIndex = this.getIndex(--j + index, index);
5707            const slide = this.slides[slideIndex];
5708            css(slide, "order", slideIndex > index ? -2 : -1);
5709            width -= dimensions$1(slide).width;
5710          }
5711        },
5712        updateActiveClasses(currentIndex = this.index) {
5713          let actives = this._getTransitioner(currentIndex).getActives();
5714          if (this.active !== "all") {
5715            actives = [this.slides[this.getValidIndex(currentIndex)]];
5716          }
5717          const activeClasses = [
5718            this.clsActive,
5719            !this.sets || includes(this.sets, toFloat(this.index)) ? this.clsActivated : ""
5720          ];
5721          for (const slide of this.slides) {
5722            const active = includes(actives, slide);
5723            toggleClass(slide, activeClasses, active);
5724            attr(slide, "aria-hidden", !active);
5725            for (const focusable of $$(selFocusable, slide)) {
5726              if (!hasOwn(focusable, "_tabindex")) {
5727                focusable._tabindex = attr(focusable, "tabindex");
5728              }
5729              attr(focusable, "tabindex", active ? focusable._tabindex : -1);
5730            }
5731          }
5732        },
5733        getValidIndex(index = this.index, prevIndex = this.prevIndex) {
5734          index = this.getIndex(index, prevIndex);
5735          if (!this.sets) {
5736            return index;
5737          }
5738          let prev;
5739          do {
5740            if (includes(this.sets, index)) {
5741              return index;
5742            }
5743            prev = index;
5744            index = this.getIndex(index + this.dir, prevIndex);
5745          } while (index !== prev);
5746          return index;
5747        },
5748        getAdjacentSlides() {
5749          const { width } = dimensions$1(this.list);
5750          const left = -width;
5751          const right = width * 2;
5752          const slideWidth = dimensions$1(this.slides[this.index]).width;
5753          const slideLeft = this.center ? width / 2 - slideWidth / 2 : 0;
5754          const slides = /* @__PURE__ */ new Set();
5755          for (const i of [-1, 1]) {
5756            let currentLeft = slideLeft + (i > 0 ? slideWidth : 0);
5757            let j = 0;
5758            do {
5759              const slide = this.slides[this.getIndex(this.index + i + j++ * i)];
5760              currentLeft += dimensions$1(slide).width * i;
5761              slides.add(slide);
5762            } while (this.length > j && currentLeft > left && currentLeft < right);
5763          }
5764          return Array.from(slides);
5765        },
5766        getIndexAt(percent) {
5767          let index = -1;
5768          const scrollDist = this.center ? getWidth(this.list) - (dimensions$1(this.slides[0]).width / 2 + dimensions$1(last(this.slides)).width / 2) : getWidth(this.list, this.maxIndex);
5769          let dist = percent * scrollDist;
5770          let slidePercent = 0;
5771          do {
5772            const slideWidth = dimensions$1(this.slides[++index]).width;
5773            const slideDist = this.center ? slideWidth / 2 + dimensions$1(this.slides[index + 1]).width / 2 : slideWidth;
5774            slidePercent = dist / slideDist % 1;
5775            dist -= slideDist;
5776          } while (dist >= 0 && index < this.maxIndex);
5777          return [index, slidePercent];
5778        }
5779      }
5780    };
5781    function isFinite(list, center) {
5782      if (!list || list.length < 2) {
5783        return true;
5784      }
5785      const { width: listWidth } = dimensions$1(list);
5786      if (!center) {
5787        return Math.ceil(getWidth(list)) < Math.trunc(listWidth + getMaxElWidth(list));
5788      }
5789      const slides = children(list);
5790      const listHalf = Math.trunc(listWidth / 2);
5791      for (const index in slides) {
5792        const slide = slides[index];
5793        const slideWidth = dimensions$1(slide).width;
5794        const slidesInView = /* @__PURE__ */ new Set([slide]);
5795        let diff = 0;
5796        for (const i of [-1, 1]) {
5797          let left = slideWidth / 2;
5798          let j = 0;
5799          while (left < listHalf) {
5800            const nextSlide = slides[getIndex(+index + i + j++ * i, slides)];
5801            if (slidesInView.has(nextSlide)) {
5802              return true;
5803            }
5804            left += dimensions$1(nextSlide).width;
5805            slidesInView.add(nextSlide);
5806          }
5807          diff = Math.max(
5808            diff,
5809            slideWidth / 2 + dimensions$1(slides[getIndex(+index + i, slides)]).width / 2 - (left - listHalf)
5810          );
5811        }
5812        if (Math.trunc(diff) > sumBy(
5813          slides.filter((slide2) => !slidesInView.has(slide2)),
5814          (slide2) => dimensions$1(slide2).width
5815        )) {
5816          return true;
5817        }
5818      }
5819      return false;
5820    }
5821    function getMaxElWidth(list) {
5822      return Math.max(0, ...children(list).map((el) => dimensions$1(el).width));
5823    }
5824
5825    var sliderParallax = {
5826      mixins: [Parallax],
5827      beforeConnect() {
5828        this.item = this.$el.closest(`.${this.$options.id.replace("parallax", "items")} > *`);
5829      },
5830      disconnected() {
5831        this.item = null;
5832      },
5833      events: [
5834        {
5835          name: "itemin itemout",
5836          self: true,
5837          el: ({ item }) => item,
5838          handler({ type, detail: { percent, duration, timing, dir } }) {
5839            fastdom.read(() => {
5840              if (!this.matchMedia) {
5841                return;
5842              }
5843              const propsFrom = this.getCss(getCurrentPercent(type, dir, percent));
5844              const propsTo = this.getCss(isIn(type) ? 0.5 : dir > 0 ? 1 : 0);
5845              fastdom.write(() => {
5846                css(this.$el, propsFrom);
5847                Transition.start(this.$el, propsTo, duration, timing).catch(noop);
5848              });
5849            });
5850          }
5851        },
5852        {
5853          name: "transitioncanceled transitionend",
5854          self: true,
5855          el: ({ item }) => item,
5856          handler() {
5857            Transition.cancel(this.$el);
5858          }
5859        },
5860        {
5861          name: "itemtranslatein itemtranslateout",
5862          self: true,
5863          el: ({ item }) => item,
5864          handler({ type, detail: { percent, dir } }) {
5865            fastdom.read(() => {
5866              if (!this.matchMedia) {
5867                this.reset();
5868                return;
5869              }
5870              const props = this.getCss(getCurrentPercent(type, dir, percent));
5871              fastdom.write(() => css(this.$el, props));
5872            });
5873          }
5874        }
5875      ]
5876    };
5877    function isIn(type) {
5878      return endsWith(type, "in");
5879    }
5880    function getCurrentPercent(type, dir, percent) {
5881      percent /= 2;
5882      return isIn(type) ^ dir < 0 ? percent : 1 - percent;
5883    }
5884
5885    var slideshow = {
5886      mixins: [Class, Slideshow, SliderReactive, SliderParallax, SliderPreload],
5887      props: {
5888        ratio: String,
5889        minHeight: String,
5890        maxHeight: String
5891      },
5892      data: {
5893        ratio: "16:9",
5894        minHeight: void 0,
5895        maxHeight: void 0,
5896        selList: ".hk-slideshow-items",
5897        attrItem: "hk-slideshow-item",
5898        selNav: ".hk-slideshow-nav",
5899        Animations: Animations$1
5900      },
5901      watch: {
5902        list(list) {
5903          css(list, {
5904            aspectRatio: this.ratio ? this.ratio.replace(":", "/") : void 0,
5905            minHeight: this.minHeight,
5906            maxHeight: this.maxHeight,
5907            width: "100%"
5908          });
5909        }
5910      },
5911      methods: {
5912        getAdjacentSlides() {
5913          return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
5914        }
5915      }
5916    };
5917
5918    var sortable = {
5919      mixins: [Class, Animate],
5920      props: {
5921        group: String,
5922        threshold: Number,
5923        clsItem: String,
5924        clsPlaceholder: String,
5925        clsDrag: String,
5926        clsDragState: String,
5927        clsBase: String,
5928        clsNoDrag: String,
5929        clsEmpty: String,
5930        clsCustom: String,
5931        handle: String
5932      },
5933      data: {
5934        group: false,
5935        threshold: 5,
5936        clsItem: "hk-sortable-item",
5937        clsPlaceholder: "hk-sortable-placeholder",
5938        clsDrag: "hk-sortable-drag",
5939        clsDragState: "hk-drag",
5940        clsBase: "hk-sortable",
5941        clsNoDrag: "hk-sortable-nodrag",
5942        clsEmpty: "hk-sortable-empty",
5943        clsCustom: "",
5944        handle: false,
5945        pos: {}
5946      },
5947      events: {
5948        name: pointerDown$1,
5949        passive: false,
5950        handler(e) {
5951          this.init(e);
5952        }
5953      },
5954      computed: {
5955        target: (_, $el) => ($el.tBodies || [$el])[0],
5956        items() {
5957          return children(this.target);
5958        },
5959        isEmpty() {
5960          return !this.items.length;
5961        },
5962        handles({ handle }, $el) {
5963          return handle ? $$(handle, $el) : this.items;
5964        }
5965      },
5966      watch: {
5967        isEmpty(empty) {
5968          toggleClass(this.target, this.clsEmpty, empty);
5969        },
5970        handles(handles, prev) {
5971          css(prev, { touchAction: "", userSelect: "" });
5972          css(handles, { touchAction: "none", userSelect: "none" });
5973        }
5974      },
5975      update: {
5976        write(data) {
5977          if (!this.drag || !parent(this.placeholder)) {
5978            return;
5979          }
5980          const {
5981            pos: { x, y },
5982            origin: { offsetTop, offsetLeft },
5983            placeholder
5984          } = this;
5985          css(this.drag, {
5986            top: y - offsetTop,
5987            left: x - offsetLeft
5988          });
5989          const sortable = this.getSortable(document.elementFromPoint(x, y));
5990          if (!sortable) {
5991            return;
5992          }
5993          const { items } = sortable;
5994          if (items.some(Transition.inProgress)) {
5995            return;
5996          }
5997          const target = findTarget(items, { x, y });
5998          if (items.length && (!target || target === placeholder)) {
5999            return;
6000          }
6001          const previous = this.getSortable(placeholder);
6002          const insertTarget = findInsertTarget(
6003            sortable.target,
6004            target,
6005            placeholder,
6006            x,
6007            y,
6008            sortable === previous && data.moved !== target
6009          );
6010          if (insertTarget === false) {
6011            return;
6012          }
6013          if (insertTarget && placeholder === insertTarget) {
6014            return;
6015          }
6016          if (sortable !== previous) {
6017            previous.remove(placeholder);
6018            data.moved = target;
6019          } else {
6020            delete data.moved;
6021          }
6022          sortable.insert(placeholder, insertTarget);
6023          this.touched.add(sortable);
6024        },
6025        events: ["move"]
6026      },
6027      methods: {
6028        init(e) {
6029          const { target, button, defaultPrevented } = e;
6030          const [placeholder] = this.items.filter((el) => el.contains(target));
6031          if (!placeholder || defaultPrevented || button > 0 || isInput(target) || target.closest(`.${this.clsNoDrag}`) || this.handle && !target.closest(this.handle)) {
6032            return;
6033          }
6034          e.preventDefault();
6035          this.pos = getEventPos(e);
6036          this.touched = /* @__PURE__ */ new Set([this]);
6037          this.placeholder = placeholder;
6038          this.origin = { target, index: index(placeholder), ...this.pos };
6039          on(document, pointerMove$1, this.move);
6040          on(document, pointerUp$1, this.end);
6041          if (!this.threshold) {
6042            this.start(e);
6043          }
6044        },
6045        start(e) {
6046          this.drag = appendDrag(this.$container, this.placeholder);
6047          const { left, top } = dimensions$1(this.placeholder);
6048          assign(this.origin, { offsetLeft: this.pos.x - left, offsetTop: this.pos.y - top });
6049          addClass(this.drag, this.clsDrag, this.clsCustom);
6050          addClass(this.placeholder, this.clsPlaceholder);
6051          addClass(this.items, this.clsItem);
6052          addClass(document.documentElement, this.clsDragState);
6053          trigger(this.$el, "start", [this, this.placeholder]);
6054          trackScroll(this.pos);
6055          this.move(e);
6056        },
6057        move: throttle(function(e) {
6058          assign(this.pos, getEventPos(e));
6059          if (!this.drag && (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold)) {
6060            this.start(e);
6061          }
6062          this.$emit("move");
6063        }),
6064        end() {
6065          off(document, pointerMove$1, this.move);
6066          off(document, pointerUp$1, this.end);
6067          if (!this.drag) {
6068            return;
6069          }
6070          untrackScroll();
6071          const sortable = this.getSortable(this.placeholder);
6072          if (this === sortable) {
6073            if (this.origin.index !== index(this.placeholder)) {
6074              trigger(this.$el, "moved", [this, this.placeholder]);
6075            }
6076          } else {
6077            trigger(sortable.$el, "added", [sortable, this.placeholder]);
6078            trigger(this.$el, "removed", [this, this.placeholder]);
6079          }
6080          trigger(this.$el, "stop", [this, this.placeholder]);
6081          remove$1(this.drag);
6082          this.drag = null;
6083          for (const { clsPlaceholder, clsItem } of this.touched) {
6084            for (const sortable2 of this.touched) {
6085              removeClass(sortable2.items, clsPlaceholder, clsItem);
6086            }
6087          }
6088          this.touched = null;
6089          removeClass(document.documentElement, this.clsDragState);
6090        },
6091        insert(element, target) {
6092          addClass(this.items, this.clsItem);
6093          if (target && target.previousElementSibling !== element) {
6094            this.animate(() => before(target, element));
6095          } else if (!target && this.target.lastElementChild !== element) {
6096            this.animate(() => append(this.target, element));
6097          }
6098        },
6099        remove(element) {
6100          if (this.target.contains(element)) {
6101            this.animate(() => remove$1(element));
6102          }
6103        },
6104        getSortable(element) {
6105          do {
6106            const sortable = this.$getComponent(element, "sortable");
6107            if (sortable && (sortable === this || this.group !== false && sortable.group === this.group)) {
6108              return sortable;
6109            }
6110          } while (element = parent(element));
6111        }
6112      }
6113    };
6114    let trackTimer;
6115    function trackScroll(pos) {
6116      let last = Date.now();
6117      trackTimer = setInterval(() => {
6118        let { x, y } = pos;
6119        y += document.scrollingElement.scrollTop;
6120        const dist = (Date.now() - last) * 0.3;
6121        last = Date.now();
6122        scrollParents(document.elementFromPoint(x, pos.y)).reverse().some((scrollEl) => {
6123          let { scrollTop: scroll, scrollHeight } = scrollEl;
6124          const { top, bottom, height: height2 } = offsetViewport(scrollEl);
6125          if (top < y && top + 35 > y) {
6126            scroll -= dist;
6127          } else if (bottom > y && bottom - 35 < y) {
6128            scroll += dist;
6129          } else {
6130            return;
6131          }
6132          if (scroll > 0 && scroll < scrollHeight - height2) {
6133            scrollEl.scrollTop = scroll;
6134            return true;
6135          }
6136        });
6137      }, 15);
6138    }
6139    function untrackScroll() {
6140      clearInterval(trackTimer);
6141    }
6142    function appendDrag(container, element) {
6143      let clone;
6144      if (isTag(element, "li", "tr")) {
6145        clone = $("<div>");
6146        append(clone, element.cloneNode(true).children);
6147        for (const attribute of element.getAttributeNames()) {
6148          attr(clone, attribute, element.getAttribute(attribute));
6149        }
6150      } else {
6151        clone = element.cloneNode(true);
6152      }
6153      append(container, clone);
6154      css(clone, "margin", "0", "important");
6155      css(clone, {
6156        boxSizing: "border-box",
6157        width: element.offsetWidth,
6158        height: element.offsetHeight,
6159        padding: css(element, "padding")
6160      });
6161      height(clone.firstElementChild, height(element.firstElementChild));
6162      return clone;
6163    }
6164    function findTarget(items, point) {
6165      return items[findIndex(items, (item) => pointInRect(point, dimensions$1(item)))];
6166    }
6167    function findInsertTarget(list, target, placeholder, x, y, sameList) {
6168      if (!children(list).length) {
6169        return;
6170      }
6171      const rect = dimensions$1(target);
6172      if (!sameList) {
6173        if (!isHorizontal(list, placeholder)) {
6174          return y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
6175        }
6176        return target;
6177      }
6178      const placeholderRect = dimensions$1(placeholder);
6179      const sameRow = linesIntersect(
6180        [rect.top, rect.bottom],
6181        [placeholderRect.top, placeholderRect.bottom]
6182      );
6183      const [pointerPos, lengthProp, startProp, endProp] = sameRow ? [x, "width", "left", "right"] : [y, "height", "top", "bottom"];
6184      const diff = placeholderRect[lengthProp] < rect[lengthProp] ? rect[lengthProp] - placeholderRect[lengthProp] : 0;
6185      if (placeholderRect[startProp] < rect[startProp]) {
6186        if (diff && pointerPos < rect[startProp] + diff) {
6187          return false;
6188        }
6189        return target.nextElementSibling;
6190      }
6191      if (diff && pointerPos > rect[endProp] - diff) {
6192        return false;
6193      }
6194      return target;
6195    }
6196    function isHorizontal(list, placeholder) {
6197      const single = children(list).length === 1;
6198      if (single) {
6199        append(list, placeholder);
6200      }
6201      const items = children(list);
6202      const isHorizontal2 = items.some((el, i) => {
6203        const rectA = dimensions$1(el);
6204        return items.slice(i + 1).some((el2) => {
6205          const rectB = dimensions$1(el2);
6206          return !linesIntersect([rectA.left, rectA.right], [rectB.left, rectB.right]);
6207        });
6208      });
6209      if (single) {
6210        remove$1(placeholder);
6211      }
6212      return isHorizontal2;
6213    }
6214    function linesIntersect(lineA, lineB) {
6215      return lineA[1] > lineB[0] && lineB[1] > lineA[0];
6216    }
6217    function throttle(fn) {
6218      let throttled;
6219      return function(...args) {
6220        if (!throttled) {
6221          throttled = true;
6222          fn.call(this, ...args);
6223          requestAnimationFrame(() => throttled = false);
6224        }
6225      };
6226    }
6227
6228    var tooltip = {
6229      mixins: [Container, Togglable, Position],
6230      data: {
6231        pos: "top",
6232        animation: ["hk-animation-scale-up"],
6233        duration: 100,
6234        cls: "hk-active"
6235      },
6236      connected() {
6237        makeFocusable(this.$el);
6238      },
6239      disconnected() {
6240        this.hide();
6241      },
6242      methods: {
6243        show() {
6244          if (this.isToggled(this.tooltip || null)) {
6245            return;
6246          }
6247          const { delay = 0, title } = parseProps(this.$options);
6248          if (!title) {
6249            return;
6250          }
6251          const titleAttr = attr(this.$el, "title");
6252          const off = on(this.$el, ["blur", pointerLeave], (e) => !isTouch(e) && this.hide());
6253          this.reset = () => {
6254            attr(this.$el, { title: titleAttr, "aria-describedby": null });
6255            off();
6256          };
6257          const id = generateId(this);
6258          attr(this.$el, { title: null, "aria-describedby": id });
6259          clearTimeout(this.showTimer);
6260          this.showTimer = setTimeout(() => this._show(title, id), delay);
6261        },
6262        async hide() {
6263          var _a;
6264          if (matches(this.$el, "input:focus")) {
6265            return;
6266          }
6267          clearTimeout(this.showTimer);
6268          if (this.isToggled(this.tooltip || null)) {
6269            await this.toggleElement(this.tooltip, false, false);
6270          }
6271          (_a = this.reset) == null ? void 0 : _a.call(this);
6272          remove$1(this.tooltip);
6273          this.tooltip = null;
6274        },
6275        async _show(title, id) {
6276          this.tooltip = append(
6277            this.container,
6278            `<div id="${id}" class="hk-${this.$options.name}" role="tooltip"> <div class="hk-${this.$options.name}-inner">${title}</div> </div>`
6279          );
6280          on(this.tooltip, "toggled", (e, toggled) => {
6281            if (!toggled) {
6282              return;
6283            }
6284            const update = () => this.positionAt(this.tooltip, this.$el);
6285            update();
6286            const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
6287            this.origin = this.axis === "y" ? `${flipPosition(dir)}-${align}` : `${align}-${flipPosition(dir)}`;
6288            const handlers = [
6289              once(
6290                document,
6291                `keydown ${pointerDown$1}`,
6292                this.hide,
6293                false,
6294                (e2) => e2.type === pointerDown$1 && !this.$el.contains(e2.target) || e2.type === "keydown" && e2.keyCode === keyMap.ESC
6295              ),
6296              on([document, ...overflowParents(this.$el)], "scroll", update, {
6297                passive: true
6298              })
6299            ];
6300            once(this.tooltip, "hide", () => handlers.forEach((handler) => handler()), {
6301              self: true
6302            });
6303          });
6304          if (!await this.toggleElement(this.tooltip, true)) {
6305            this.hide();
6306          }
6307        }
6308      },
6309      events: {
6310        // Clicking a button does not give it focus on all browsers and platforms
6311        // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
6312        [`focus ${pointerEnter} ${pointerDown$1}`](e) {
6313          if ((!isTouch(e) || e.type === pointerDown$1) && document.readyState !== "loading") {
6314            this.show();
6315          }
6316        }
6317      }
6318    };
6319    function makeFocusable(el) {
6320      if (!isFocusable(el)) {
6321        attr(el, "tabindex", "0");
6322      }
6323    }
6324    function getAlignment(el, target, [dir, align]) {
6325      const elOffset = offset(el);
6326      const targetOffset = offset(target);
6327      const properties = [
6328        ["left", "right"],
6329        ["top", "bottom"]
6330      ];
6331      for (const props2 of properties) {
6332        if (elOffset[props2[0]] >= targetOffset[props2[1]]) {
6333          dir = props2[1];
6334          break;
6335        }
6336        if (elOffset[props2[1]] <= targetOffset[props2[0]]) {
6337          dir = props2[0];
6338          break;
6339        }
6340      }
6341      const props = includes(properties[0], dir) ? properties[1] : properties[0];
6342      align = props.find((prop) => elOffset[prop] === targetOffset[prop]) || "center";
6343      return [dir, align];
6344    }
6345    function parseProps(options) {
6346      const { el, id, data: data$1 } = options;
6347      return ["delay", "title"].reduce((obj, key) => ({ [key]: data(el, key), ...obj }), {
6348        ...parseOptions(data(el, id), ["title"]),
6349        ...data$1
6350      });
6351    }
6352
6353    var upload = {
6354      mixins: [I18n],
6355      i18n: {
6356        invalidMime: "Invalid File Type: %s",
6357        invalidName: "Invalid File Name: %s",
6358        invalidSize: "Invalid File Size: %s Kilobytes Max"
6359      },
6360      props: {
6361        allow: String,
6362        clsDragover: String,
6363        concurrent: Number,
6364        maxSize: Number,
6365        method: String,
6366        mime: String,
6367        multiple: Boolean,
6368        name: String,
6369        params: Object,
6370        type: String,
6371        url: String
6372      },
6373      data: {
6374        allow: false,
6375        clsDragover: "hk-dragover",
6376        concurrent: 1,
6377        maxSize: 0,
6378        method: "POST",
6379        mime: false,
6380        multiple: false,
6381        name: "files[]",
6382        params: {},
6383        type: "",
6384        url: "",
6385        abort: noop,
6386        beforeAll: noop,
6387        beforeSend: noop,
6388        complete: noop,
6389        completeAll: noop,
6390        error: noop,
6391        fail: noop,
6392        load: noop,
6393        loadEnd: noop,
6394        loadStart: noop,
6395        progress: noop
6396      },
6397      events: {
6398        change(e) {
6399          if (!matches(e.target, 'input[type="file"]')) {
6400            return;
6401          }
6402          e.preventDefault();
6403          if (e.target.files) {
6404            this.upload(e.target.files);
6405          }
6406          e.target.value = "";
6407        },
6408        drop(e) {
6409          stop(e);
6410          const transfer = e.dataTransfer;
6411          if (!(transfer == null ? void 0 : transfer.files)) {
6412            return;
6413          }
6414          removeClass(this.$el, this.clsDragover);
6415          this.upload(transfer.files);
6416        },
6417        dragenter(e) {
6418          stop(e);
6419        },
6420        dragover(e) {
6421          stop(e);
6422          addClass(this.$el, this.clsDragover);
6423        },
6424        dragleave(e) {
6425          stop(e);
6426          removeClass(this.$el, this.clsDragover);
6427        }
6428      },
6429      methods: {
6430        async upload(files) {
6431          files = toArray(files);
6432          if (!files.length) {
6433            return;
6434          }
6435          trigger(this.$el, "upload", [files]);
6436          for (const file of files) {
6437            if (this.maxSize && this.maxSize * 1e3 < file.size) {
6438              this.fail(this.t("invalidSize", this.maxSize));
6439              return;
6440            }
6441            if (this.allow && !match$1(this.allow, file.name)) {
6442              this.fail(this.t("invalidName", this.allow));
6443              return;
6444            }
6445            if (this.mime && !match$1(this.mime, file.type)) {
6446              this.fail(this.t("invalidMime", this.mime));
6447              return;
6448            }
6449          }
6450          if (!this.multiple) {
6451            files = files.slice(0, 1);
6452          }
6453          this.beforeAll(this, files);
6454          const chunks = chunk(files, this.concurrent);
6455          const upload = async (files2) => {
6456            const data = new FormData();
6457            files2.forEach((file) => data.append(this.name, file));
6458            for (const key in this.params) {
6459              data.append(key, this.params[key]);
6460            }
6461            try {
6462              const xhr = await ajax(this.url, {
6463                data,
6464                method: this.method,
6465                responseType: this.type,
6466                beforeSend: (env) => {
6467                  const { xhr: xhr2 } = env;
6468                  on(xhr2.upload, "progress", this.progress);
6469                  for (const type of ["loadStart", "load", "loadEnd", "abort"]) {
6470                    on(xhr2, type.toLowerCase(), this[type]);
6471                  }
6472                  return this.beforeSend(env);
6473                }
6474              });
6475              this.complete(xhr);
6476              if (chunks.length) {
6477                await upload(chunks.shift());
6478              } else {
6479                this.completeAll(xhr);
6480              }
6481            } catch (e) {
6482              this.error(e);
6483            }
6484          };
6485          await upload(chunks.shift());
6486        }
6487      }
6488    };
6489    function match$1(pattern, path) {
6490      return path.match(
6491        new RegExp(
6492          `^${pattern.replace(/\//g, "\\/").replace(/\*\*/g, "(\\/[^\\/]+)*").replace(/\*/g, "[^\\/]+").replace(/((?!\\))\?/g, "$1.")}$`,
6493          "i"
6494        )
6495      );
6496    }
6497    function chunk(files, size) {
6498      const chunks = [];
6499      for (let i = 0; i < files.length; i += size) {
6500        chunks.push(files.slice(i, i + size));
6501      }
6502      return chunks;
6503    }
6504    function stop(e) {
6505      e.preventDefault();
6506      e.stopPropagation();
6507    }
6508    async function ajax(url, options) {
6509      const env = {
6510        data: null,
6511        method: "GET",
6512        headers: {},
6513        xhr: new XMLHttpRequest(),
6514        beforeSend: noop,
6515        responseType: "",
6516        ...options
6517      };
6518      await env.beforeSend(env);
6519      return send(url, env);
6520    }
6521    function send(url, env) {
6522      return new Promise((resolve, reject) => {
6523        const { xhr } = env;
6524        for (const prop in env) {
6525          if (prop in xhr) {
6526            try {
6527              xhr[prop] = env[prop];
6528            } catch (e) {
6529            }
6530          }
6531        }
6532        xhr.open(env.method.toUpperCase(), url);
6533        for (const header in env.headers) {
6534          xhr.setRequestHeader(header, env.headers[header]);
6535        }
6536        on(xhr, "load", () => {
6537          if (xhr.status === 0 || xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {
6538            resolve(xhr);
6539          } else {
6540            reject(
6541              assign(Error(xhr.statusText), {
6542                xhr,
6543                status: xhr.status
6544              })
6545            );
6546          }
6547        });
6548        on(xhr, "error", () => reject(assign(Error("Network Error"), { xhr })));
6549        on(xhr, "timeout", () => reject(assign(Error("Network Timeout"), { xhr })));
6550        xhr.send(env.data);
6551      });
6552    }
6553
6554    var components$1 = /*#__PURE__*/Object.freeze({
6555        __proto__: null,
6556        Countdown: countdown,
6557        Filter: filter,
6558        Lightbox: lightbox,
6559        LightboxPanel: LightboxPanel,
6560        Notification: notification,
6561        Parallax: parallax,
6562        Slider: slider,
6563        SliderParallax: sliderParallax,
6564        Slideshow: slideshow,
6565        SlideshowParallax: sliderParallax,
6566        Sortable: sortable,
6567        Tooltip: tooltip,
6568        Upload: upload
6569    });
6570
6571    function boot(App) {
6572      if (inBrowser && window.MutationObserver) {
6573        if (document.body) {
6574          requestAnimationFrame(() => init(App));
6575        } else {
6576          new MutationObserver((records, observer) => {
6577            if (document.body) {
6578              init(App);
6579              observer.disconnect();
6580            }
6581          }).observe(document.documentElement, { childList: true });
6582        }
6583      }
6584    }
6585    function init(App) {
6586      trigger(document, "uikit:init", App);
6587      if (document.body) {
6588        apply(document.body, connect);
6589      }
6590      new MutationObserver(handleMutation).observe(document, {
6591        subtree: true,
6592        childList: true,
6593        attributes: true
6594      });
6595      App._initialized = true;
6596    }
6597    function handleMutation(records) {
6598      var _a;
6599      for (const { addedNodes, removedNodes, target, attributeName } of records) {
6600        for (const node of addedNodes) {
6601          apply(node, connect);
6602        }
6603        for (const node of removedNodes) {
6604          apply(node, disconnect);
6605        }
6606        const name = attributeName && getComponentName(attributeName);
6607        if (name) {
6608          if (hasAttr(target, attributeName)) {
6609            createComponent(name, target);
6610          } else {
6611            (_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
6612          }
6613        }
6614      }
6615    }
6616    function connect(node) {
6617      const components2 = getComponents(node);
6618      for (const name in components2) {
6619        callConnected(components2[name]);
6620      }
6621      for (const attributeName of node.getAttributeNames()) {
6622        const name = getComponentName(attributeName);
6623        name && createComponent(name, node);
6624      }
6625    }
6626    function disconnect(node) {
6627      const components2 = getComponents(node);
6628      for (const name in components2) {
6629        callDisconnected(components2[name]);
6630      }
6631    }
6632    function getComponentName(attribute) {
6633      if (startsWith(attribute, "data-")) {
6634        attribute = attribute.slice(5);
6635      }
6636      const cmp = components$2[attribute];
6637      return cmp && (cmp.options || cmp).name;
6638    }
6639
6640    globalApi(App);
6641    instanceApi(App);
6642
6643    var Accordion = {
6644      mixins: [Class, Togglable],
6645      props: {
6646        animation: Boolean,
6647        targets: String,
6648        active: null,
6649        collapsible: Boolean,
6650        multiple: Boolean,
6651        toggle: String,
6652        content: String,
6653        offset: Number
6654      },
6655      data: {
6656        targets: "> *",
6657        active: false,
6658        animation: true,
6659        collapsible: true,
6660        multiple: false,
6661        clsOpen: "hk-open",
6662        toggle: "> .hk-accordion-title",
6663        content: "> .hk-accordion-content",
6664        offset: 0
6665      },
6666      computed: {
6667        items: ({ targets }, $el) => $$(targets, $el),
6668        toggles({ toggle }) {
6669          return this.items.map((item) => $(toggle, item));
6670        },
6671        contents({ content }) {
6672          return this.items.map((item) => {
6673            var _a;
6674            return ((_a = item._wrapper) == null ? void 0 : _a.firstElementChild) || $(content, item);
6675          });
6676        }
6677      },
6678      watch: {
6679        items(items, prev) {
6680          if (prev || hasClass(items, this.clsOpen)) {
6681            return;
6682          }
6683          const active = this.active !== false && items[Number(this.active)] || !this.collapsible && items[0];
6684          if (active) {
6685            this.toggle(active, false);
6686          }
6687        },
6688        toggles() {
6689          this.$emit();
6690        },
6691        contents(items) {
6692          for (const el of items) {
6693            const isOpen = hasClass(
6694              this.items.find((item) => item.contains(el)),
6695              this.clsOpen
6696            );
6697            hide(el, !isOpen);
6698          }
6699          this.$emit();
6700        }
6701      },
6702      observe: lazyload(),
6703      events: [
6704        {
6705          name: "click keydown",
6706          delegate: ({ targets, $props }) => `${targets} ${$props.toggle}`,
6707          async handler(e) {
6708            var _a;
6709            if (e.type === "keydown" && e.keyCode !== keyMap.SPACE) {
6710              return;
6711            }
6712            e.preventDefault();
6713            (_a = this._off) == null ? void 0 : _a.call(this);
6714            this._off = keepScrollPosition(e.target);
6715            await this.toggle(index(this.toggles, e.current));
6716            this._off();
6717          }
6718        },
6719        {
6720          name: "shown hidden",
6721          self: true,
6722          delegate: ({ targets }) => targets,
6723          handler() {
6724            this.$emit();
6725          }
6726        }
6727      ],
6728      update() {
6729        const activeItems = filter$1(this.items, `.${this.clsOpen}`);
6730        for (const index2 in this.items) {
6731          const toggle = this.toggles[index2];
6732          const content = this.contents[index2];
6733          if (!toggle || !content) {
6734            continue;
6735          }
6736          toggle.id = generateId(this, toggle);
6737          content.id = generateId(this, content);
6738          const active = includes(activeItems, this.items[index2]);
6739          attr(toggle, {
6740            role: isTag(toggle, "a") ? "button" : null,
6741            "aria-controls": content.id,
6742            "aria-expanded": active,
6743            "aria-disabled": !this.collapsible && activeItems.length < 2 && active
6744          });
6745          attr(content, { role: "region", "aria-labelledby": toggle.id });
6746          if (isTag(content, "ul")) {
6747            attr(children(content), "role", "presentation");
6748          }
6749        }
6750      },
6751      methods: {
6752        toggle(item, animate) {
6753          item = this.items[getIndex(item, this.items)];
6754          let items = [item];
6755          const activeItems = filter$1(this.items, `.${this.clsOpen}`);
6756          if (!this.multiple && !includes(activeItems, items[0])) {
6757            items = items.concat(activeItems);
6758          }
6759          if (!this.collapsible && activeItems.length < 2 && includes(activeItems, item)) {
6760            return;
6761          }
6762          return Promise.all(
6763            items.map(
6764              (el) => this.toggleElement(el, !includes(activeItems, el), (el2, show) => {
6765                toggleClass(el2, this.clsOpen, show);
6766                if (animate === false || !this.animation) {
6767                  hide($(this.content, el2), !show);
6768                  return;
6769                }
6770                return transition(el2, show, this);
6771              })
6772            )
6773          );
6774        }
6775      }
6776    };
6777    function hide(el, hide2) {
6778      el && (el.hidden = hide2);
6779    }
6780    async function transition(el, show, { content, duration, velocity, transition: transition2 }) {
6781      var _a;
6782      content = ((_a = el._wrapper) == null ? void 0 : _a.firstElementChild) || $(content, el);
6783      if (!el._wrapper) {
6784        el._wrapper = wrapAll(content, "<div>");
6785      }
6786      const wrapper = el._wrapper;
6787      css(wrapper, "overflow", "hidden");
6788      const currentHeight = toFloat(css(wrapper, "height"));
6789      await Transition.cancel(wrapper);
6790      hide(content, false);
6791      const endHeight = sumBy(["marginTop", "marginBottom"], (prop) => css(content, prop)) + dimensions$1(content).height;
6792      const percent = currentHeight / endHeight;
6793      duration = (velocity * endHeight + duration) * (show ? 1 - percent : percent);
6794      css(wrapper, "height", currentHeight);
6795      await Transition.start(wrapper, { height: show ? endHeight : 0 }, duration, transition2);
6796      unwrap(content);
6797      delete el._wrapper;
6798      if (!show) {
6799        hide(content, true);
6800      }
6801    }
6802    function keepScrollPosition(el) {
6803      const scrollElement = scrollParent(el, true);
6804      let frame;
6805      (function scroll() {
6806        frame = requestAnimationFrame(() => {
6807          const { top } = dimensions$1(el);
6808          if (top < 0) {
6809            scrollElement.scrollTop += top;
6810          }
6811          scroll();
6812        });
6813      })();
6814      return () => requestAnimationFrame(() => cancelAnimationFrame(frame));
6815    }
6816
6817    var alert = {
6818      mixins: [Class, Togglable],
6819      args: "animation",
6820      props: {
6821        animation: Boolean,
6822        close: String
6823      },
6824      data: {
6825        animation: true,
6826        selClose: ".hk-alert-close",
6827        duration: 150
6828      },
6829      events: {
6830        name: "click",
6831        delegate: ({ selClose }) => selClose,
6832        handler(e) {
6833          e.preventDefault();
6834          this.close();
6835        }
6836      },
6837      methods: {
6838        async close() {
6839          await this.toggleElement(this.$el, false, animate);
6840          this.$destroy(true);
6841        }
6842      }
6843    };
6844    function animate(el, show, { duration, transition, velocity }) {
6845      const height = toFloat(css(el, "height"));
6846      css(el, "height", height);
6847      return Transition.start(
6848        el,
6849        {
6850          height: 0,
6851          marginTop: 0,
6852          marginBottom: 0,
6853          paddingTop: 0,
6854          paddingBottom: 0,
6855          borderTop: 0,
6856          borderBottom: 0,
6857          opacity: 0
6858        },
6859        velocity * height + duration,
6860        transition
6861      );
6862    }
6863
6864    var Video = {
6865      args: "autoplay",
6866      props: {
6867        automute: Boolean,
6868        autoplay: Boolean
6869      },
6870      data: {
6871        automute: false,
6872        autoplay: true
6873      },
6874      beforeConnect() {
6875        if (this.autoplay === "inview" && !hasAttr(this.$el, "preload")) {
6876          this.$el.preload = "none";
6877        }
6878        if (isTag(this.$el, "iframe") && !hasAttr(this.$el, "allow")) {
6879          this.$el.allow = "autoplay";
6880        }
6881        if (this.autoplay === "hover") {
6882          if (isTag(this.$el, "video")) {
6883            this.$el.tabindex = 0;
6884          } else {
6885            this.autoplay = true;
6886          }
6887        }
6888        if (this.automute) {
6889          mute(this.$el);
6890        }
6891      },
6892      events: [
6893        {
6894          name: `${pointerEnter} focusin`,
6895          filter: ({ autoplay }) => includes(autoplay, "hover"),
6896          handler(e) {
6897            if (!isTouch(e) || !isPlaying(this.$el)) {
6898              play(this.$el);
6899            } else {
6900              pause(this.$el);
6901            }
6902          }
6903        },
6904        {
6905          name: `${pointerLeave} focusout`,
6906          filter: ({ autoplay }) => includes(autoplay, "hover"),
6907          handler(e) {
6908            if (!isTouch(e)) {
6909              pause(this.$el);
6910            }
6911          }
6912        }
6913      ],
6914      observe: [
6915        intersection({
6916          filter: ({ autoplay }) => autoplay !== "hover",
6917          handler([{ isIntersecting }]) {
6918            if (!document.fullscreenElement) {
6919              if (isIntersecting) {
6920                if (this.autoplay) {
6921                  play(this.$el);
6922                }
6923              } else {
6924                pause(this.$el);
6925              }
6926            }
6927          },
6928          args: { intersecting: false },
6929          options: ({ $el, autoplay }) => ({
6930            root: autoplay === "inview" ? null : parent($el).closest(":not(a)")
6931          })
6932        })
6933      ]
6934    };
6935    function isPlaying(videoEl) {
6936      return !videoEl.paused && !videoEl.ended;
6937    }
6938
6939    var cover = {
6940      mixins: [Video],
6941      props: {
6942        width: Number,
6943        height: Number
6944      },
6945      data: {
6946        automute: true
6947      },
6948      created() {
6949        this.useObjectFit = isTag(this.$el, "img", "video");
6950      },
6951      observe: resize({
6952        target: ({ $el }) => getPositionedParent($el) || parent($el),
6953        filter: ({ useObjectFit }) => !useObjectFit
6954      }),
6955      update: {
6956        read() {
6957          if (this.useObjectFit) {
6958            return false;
6959          }
6960          const { ratio, cover } = Dimensions;
6961          const { $el, width, height } = this;
6962          let dim = { width, height };
6963          if (!width || !height) {
6964            const intrinsic = {
6965              width: $el.naturalWidth || $el.videoWidth || $el.clientWidth,
6966              height: $el.naturalHeight || $el.videoHeight || $el.clientHeight
6967            };
6968            if (width) {
6969              dim = ratio(intrinsic, "width", width);
6970            } else if (height) {
6971              dim = ratio(intrinsic, "height", height);
6972            } else {
6973              dim = intrinsic;
6974            }
6975          }
6976          const { offsetHeight: coverHeight, offsetWidth: coverWidth } = getPositionedParent($el) || parent($el);
6977          const coverDim = cover(dim, { width: coverWidth, height: coverHeight });
6978          if (!coverDim.width || !coverDim.height) {
6979            return false;
6980          }
6981          return coverDim;
6982        },
6983        write({ height, width }) {
6984          css(this.$el, { height, width });
6985        },
6986        events: ["resize"]
6987      }
6988    };
6989    function getPositionedParent(el) {
6990      while (el = parent(el)) {
6991        if (css(el, "position") !== "static") {
6992          return el;
6993        }
6994      }
6995    }
6996
6997    let active;
6998    var drop = {
6999      mixins: [Container, Position, Togglable],
7000      args: "pos",
7001      props: {
7002        mode: "list",
7003        toggle: Boolean,
7004        boundary: Boolean,
7005        boundaryX: Boolean,
7006        boundaryY: Boolean,
7007        target: Boolean,
7008        targetX: Boolean,
7009        targetY: Boolean,
7010        stretch: Boolean,
7011        delayShow: Number,
7012        delayHide: Number,
7013        autoUpdate: Boolean,
7014        clsDrop: String,
7015        animateOut: Boolean,
7016        bgScroll: Boolean,
7017        closeOnScroll: Boolean
7018      },
7019      data: {
7020        mode: ["click", "hover"],
7021        toggle: "- *",
7022        boundary: false,
7023        boundaryX: false,
7024        boundaryY: false,
7025        target: false,
7026        targetX: false,
7027        targetY: false,
7028        stretch: false,
7029        delayShow: 0,
7030        delayHide: 800,
7031        autoUpdate: true,
7032        clsDrop: false,
7033        animateOut: false,
7034        bgScroll: true,
7035        animation: ["hk-animation-fade"],
7036        cls: "hk-open",
7037        container: false,
7038        closeOnScroll: false
7039      },
7040      computed: {
7041        boundary({ boundary, boundaryX, boundaryY }, $el) {
7042          return [
7043            query(boundaryX || boundary, $el) || window,
7044            query(boundaryY || boundary, $el) || window
7045          ];
7046        },
7047        target({ target, targetX, targetY }, $el) {
7048          targetX || (targetX = target || this.targetEl);
7049          targetY || (targetY = target || this.targetEl);
7050          return [
7051            targetX === true ? window : query(targetX, $el),
7052            targetY === true ? window : query(targetY, $el)
7053          ];
7054        }
7055      },
7056      created() {
7057        this.tracker = new MouseTracker();
7058      },
7059      beforeConnect() {
7060        this.clsDrop = this.$props.clsDrop || this.$options.id;
7061      },
7062      connected() {
7063        addClass(this.$el, "hk-drop", this.clsDrop);
7064        if (this.toggle && !this.targetEl) {
7065          this.targetEl = createToggleComponent(this);
7066        }
7067        this._style = pick(this.$el.style, ["width", "height"]);
7068      },
7069      disconnected() {
7070        if (this.isActive()) {
7071          this.hide(false);
7072          active = null;
7073        }
7074        css(this.$el, this._style);
7075      },
7076      events: [
7077        {
7078          name: "click",
7079          delegate: () => ".hk-drop-close",
7080          handler(e) {
7081            e.preventDefault();
7082            this.hide(false);
7083          }
7084        },
7085        {
7086          name: "click",
7087          delegate: () => 'a[href*="#"]',
7088          handler({ defaultPrevented, current }) {
7089            const { hash } = current;
7090            if (!defaultPrevented && hash && isSameSiteAnchor(current) && !this.$el.contains($(hash))) {
7091              this.hide(false);
7092            }
7093          }
7094        },
7095        {
7096          name: "beforescroll",
7097          handler() {
7098            this.hide(false);
7099          }
7100        },
7101        {
7102          name: "toggle",
7103          self: true,
7104          handler(e, toggle) {
7105            e.preventDefault();
7106            if (this.isToggled()) {
7107              this.hide(false);
7108            } else {
7109              this.show(toggle == null ? void 0 : toggle.$el, false);
7110            }
7111          }
7112        },
7113        {
7114          name: "toggleshow",
7115          self: true,
7116          handler(e, toggle) {
7117            e.preventDefault();
7118            this.show(toggle == null ? void 0 : toggle.$el);
7119          }
7120        },
7121        {
7122          name: "togglehide",
7123          self: true,
7124          handler(e) {
7125            e.preventDefault();
7126            if (!matches(this.$el, ":focus,:hover")) {
7127              this.hide();
7128            }
7129          }
7130        },
7131        {
7132          name: `${pointerEnter} focusin`,
7133          filter: ({ mode }) => includes(mode, "hover"),
7134          handler(e) {
7135            if (!isTouch(e)) {
7136              this.clearTimers();
7137            }
7138          }
7139        },
7140        {
7141          name: `${pointerLeave} focusout`,
7142          filter: ({ mode }) => includes(mode, "hover"),
7143          handler(e) {
7144            if (!isTouch(e) && e.relatedTarget) {
7145              this.hide();
7146            }
7147          }
7148        },
7149        {
7150          name: "toggled",
7151          self: true,
7152          handler(e, toggled) {
7153            if (toggled) {
7154              this.clearTimers();
7155              this.position();
7156            }
7157          }
7158        },
7159        {
7160          name: "show",
7161          self: true,
7162          handler() {
7163            active = this;
7164            this.tracker.init();
7165            attr(this.targetEl, "aria-expanded", true);
7166            const handlers = [
7167              listenForResize(this),
7168              listenForEscClose(this),
vendor: 6,515 bytes, lines 7169-7346
7169              listenForBackgroundClose(this),
7170              this.autoUpdate && listenForScroll(this),
7171              this.closeOnScroll && listenForScrollClose(this)
7172            ];
7173            once(this.$el, "hide", () => handlers.forEach((handler) => handler && handler()), {
7174              self: true
7175            });
7176            if (!this.bgScroll) {
7177              once(this.$el, "hidden", preventBackgroundScroll(this.$el), { self: true });
7178            }
7179          }
7180        },
7181        {
7182          name: "beforehide",
7183          self: true,
7184          handler() {
7185            this.clearTimers();
7186          }
7187        },
7188        {
7189          name: "hide",
7190          handler({ target }) {
7191            if (this.$el !== target) {
7192              active = active === null && this.$el.contains(target) && this.isToggled() ? this : active;
7193              return;
7194            }
7195            active = this.isActive() ? null : active;
7196            this.tracker.cancel();
7197            attr(this.targetEl, "aria-expanded", null);
7198          }
7199        }
7200      ],
7201      update: {
7202        write() {
7203          if (this.isToggled() && !hasClass(this.$el, this.clsEnter)) {
7204            this.position();
7205          }
7206        }
7207      },
7208      methods: {
7209        show(target = this.targetEl, delay = true) {
7210          if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
7211            this.hide(false, false);
7212          }
7213          this.targetEl = target;
7214          this.clearTimers();
7215          if (this.isActive()) {
7216            return;
7217          }
7218          if (active) {
7219            if (delay && active.isDelaying()) {
7220              this.showTimer = setTimeout(() => matches(target, ":hover") && this.show(), 10);
7221              return;
7222            }
7223            let prev;
7224            while (active && prev !== active && !active.$el.contains(this.$el)) {
7225              prev = active;
7226              active.hide(false, false);
7227            }
7228          }
7229          if (this.container && parent(this.$el) !== this.container) {
7230            append(this.container, this.$el);
7231          }
7232          this.showTimer = setTimeout(
7233            () => this.toggleElement(this.$el, true),
7234            delay && this.delayShow || 0
7235          );
7236        },
7237        hide(delay = true, animate = true) {
7238          const hide = () => this.toggleElement(this.$el, false, this.animateOut && animate);
7239          this.clearTimers();
7240          this.isDelayedHide = delay;
7241          if (delay && this.isDelaying()) {
7242            this.hideTimer = setTimeout(this.hide, 50);
7243          } else if (delay && this.delayHide) {
7244            this.hideTimer = setTimeout(hide, this.delayHide);
7245          } else {
7246            hide();
7247          }
7248        },
7249        clearTimers() {
7250          clearTimeout(this.showTimer);
7251          clearTimeout(this.hideTimer);
7252          this.showTimer = null;
7253          this.hideTimer = null;
7254        },
7255        isActive() {
7256          return active === this;
7257        },
7258        isDelaying() {
7259          return [this.$el, ...$$(".hk-drop", this.$el)].some((el) => this.tracker.movesTo(el));
7260        },
7261        position() {
7262          const restoreScrollPosition = storeScrollPosition(this.$el);
7263          removeClass(this.$el, "hk-drop-stack");
7264          css(this.$el, this._style);
7265          this.$el.hidden = true;
7266          const viewports = this.target.map((target) => getViewport$1(this.$el, target));
7267          const viewportOffset = this.getViewportOffset(this.$el);
7268          const dirs = [
7269            [0, ["x", "width", "left", "right"]],
7270            [1, ["y", "height", "top", "bottom"]]
7271          ];
7272          for (const [i, [axis, prop]] of dirs) {
7273            if (this.axis !== axis && includes([axis, true], this.stretch)) {
7274              css(this.$el, {
7275                [prop]: Math.min(
7276                  offset(this.boundary[i])[prop],
7277                  viewports[i][prop] - 2 * viewportOffset
7278                ),
7279                [`overflow-${axis}`]: "auto"
7280              });
7281            }
7282          }
7283          const maxWidth = viewports[0].width - 2 * viewportOffset;
7284          this.$el.hidden = false;
7285          css(this.$el, "maxWidth", "");
7286          if (this.$el.offsetWidth > maxWidth) {
7287            addClass(this.$el, "hk-drop-stack");
7288          }
7289          css(this.$el, "maxWidth", maxWidth);
7290          this.positionAt(this.$el, this.target, this.boundary);
7291          for (const [i, [axis, prop, start, end]] of dirs) {
7292            if (this.axis === axis && includes([axis, true], this.stretch)) {
7293              const positionOffset = Math.abs(this.getPositionOffset());
7294              const targetOffset = offset(this.target[i]);
7295              const elOffset = offset(this.$el);
7296              css(this.$el, {
7297                [prop]: (targetOffset[start] > elOffset[start] ? targetOffset[this.inset ? end : start] - Math.max(
7298                  offset(this.boundary[i])[start],
7299                  viewports[i][start] + viewportOffset
7300                ) : Math.min(
7301                  offset(this.boundary[i])[end],
7302                  viewports[i][end] - viewportOffset
7303                ) - targetOffset[this.inset ? start : end]) - positionOffset,
7304                [`overflow-${axis}`]: "auto"
7305              });
7306              this.positionAt(this.$el, this.target, this.boundary);
7307            }
7308          }
7309          restoreScrollPosition();
7310        }
7311      }
7312    };
7313    function getViewport$1(el, target) {
7314      return offsetViewport(overflowParents(target).find((parent2) => parent2.contains(el)));
7315    }
7316    function createToggleComponent(drop) {
7317      const { $el } = drop.$create("toggle", query(drop.toggle, drop.$el), {
7318        target: drop.$el,
7319        mode: drop.mode
7320      });
7321      attr($el, "aria-haspopup", true);
7322      return $el;
7323    }
7324    function listenForResize(drop) {
7325      const update = () => drop.$emit();
7326      const off = [
7327        observeViewportResize(update),
7328        observeResize(overflowParents(drop.$el).concat(drop.target), update)
7329      ];
7330      return () => off.map((observer) => observer.disconnect());
7331    }
7332    function listenForScroll(drop, fn = () => drop.$emit()) {
7333      return on([document, ...overflowParents(drop.$el)], "scroll", fn, {
7334        passive: true
7335      });
7336    }
7337    function listenForEscClose(drop) {
7338      return on(document, "keydown", (e) => {
7339        if (e.keyCode === keyMap.ESC) {
7340          drop.hide(false);
7341        }
7342      });
7343    }
7344    function listenForScrollClose(drop) {
7345      return listenForScroll(drop, () => drop.hide(false));
7346    }
vendor: 13,574 bytes, lines 7347-7752
7347    function listenForBackgroundClose(drop) {
7348      return on(document, pointerDown$1, ({ target }) => {
7349        if (drop.$el.contains(target)) {
7350          return;
7351        }
7352        once(
7353          document,
7354          `${pointerUp$1} ${pointerCancel} scroll`,
7355          ({ defaultPrevented, type, target: newTarget }) => {
7356            var _a;
7357            if (!defaultPrevented && type === pointerUp$1 && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
7358              drop.hide(false);
7359            }
7360          },
7361          true
7362        );
7363      });
7364    }
7365
7366    var Dropnav = {
7367      mixins: [Class, Container],
7368      props: {
7369        align: String,
7370        clsDrop: String,
7371        boundary: Boolean,
7372        dropbar: Boolean,
7373        dropbarAnchor: Boolean,
7374        duration: Number,
7375        mode: Boolean,
7376        offset: Boolean,
7377        stretch: Boolean,
7378        delayShow: Boolean,
7379        delayHide: Boolean,
7380        target: Boolean,
7381        targetX: Boolean,
7382        targetY: Boolean,
7383        animation: Boolean,
7384        animateOut: Boolean,
7385        closeOnScroll: Boolean
7386      },
7387      data: {
7388        align: isRtl ? "right" : "left",
7389        clsDrop: "hk-dropdown",
7390        clsDropbar: "hk-dropnav-dropbar",
7391        boundary: true,
7392        dropbar: false,
7393        dropbarAnchor: false,
7394        duration: 200,
7395        container: false,
7396        selNavItem: "> li > a, > ul > li > a"
7397      },
7398      computed: {
7399        dropbarAnchor: ({ dropbarAnchor }, $el) => query(dropbarAnchor, $el) || $el,
7400        dropbar({ dropbar }) {
7401          if (!dropbar) {
7402            return null;
7403          }
7404          dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
7405          return dropbar ? dropbar : this._dropbar = $("<div></div>");
7406        },
7407        dropContainer(_, $el) {
7408          return this.container || $el;
7409        },
7410        dropdowns({ clsDrop }, $el) {
7411          var _a;
7412          const dropdowns = $$(`.${clsDrop}`, $el);
7413          if (this.dropContainer !== $el) {
7414            for (const el of $$(`.${clsDrop}`, this.dropContainer)) {
7415              const target = (_a = this.getDropdown(el)) == null ? void 0 : _a.targetEl;
7416              if (!includes(dropdowns, el) && target && this.$el.contains(target)) {
7417                dropdowns.push(el);
7418              }
7419            }
7420          }
7421          return dropdowns;
7422        },
7423        items({ selNavItem }, $el) {
7424          return $$(selNavItem, $el);
7425        }
7426      },
7427      watch: {
7428        dropbar(dropbar) {
7429          addClass(
7430            dropbar,
7431            "hk-dropbar",
7432            "hk-dropbar-top",
7433            this.clsDropbar,
7434            `hk-${this.$options.name}-dropbar`
7435          );
7436        },
7437        dropdowns() {
7438          this.initializeDropdowns();
7439        }
7440      },
7441      connected() {
7442        this.initializeDropdowns();
7443      },
7444      disconnected() {
7445        remove$1(this._dropbar);
7446        delete this._dropbar;
7447      },
7448      events: [
7449        {
7450          name: "mouseover focusin",
7451          delegate: ({ selNavItem }) => selNavItem,
7452          handler({ current }) {
7453            const active2 = this.getActive();
7454            if (active2 && includes(active2.mode, "hover") && active2.targetEl && !current.contains(active2.targetEl) && !active2.isDelaying()) {
7455              active2.hide(false);
7456            }
7457          }
7458        },
7459        {
7460          name: "keydown",
7461          self: true,
7462          delegate: ({ selNavItem }) => selNavItem,
7463          handler(e) {
7464            var _a;
7465            const { current, keyCode } = e;
7466            const active2 = this.getActive();
7467            if (keyCode === keyMap.DOWN && (active2 == null ? void 0 : active2.targetEl) === current) {
7468              e.preventDefault();
7469              (_a = $(selFocusable, active2.$el)) == null ? void 0 : _a.focus();
7470            }
7471            handleNavItemNavigation(e, this.items, active2);
7472          }
7473        },
7474        {
7475          name: "keydown",
7476          el: ({ dropContainer }) => dropContainer,
7477          delegate: ({ clsDrop }) => `.${clsDrop}`,
7478          handler(e) {
7479            var _a;
7480            const { current, keyCode, target } = e;
7481            if (isInput(target) || !includes(this.dropdowns, current)) {
7482              return;
7483            }
7484            const active2 = this.getActive();
7485            let next = -1;
7486            if (keyCode === keyMap.HOME) {
7487              next = 0;
7488            } else if (keyCode === keyMap.END) {
7489              next = "last";
7490            } else if (keyCode === keyMap.UP) {
7491              next = "previous";
7492            } else if (keyCode === keyMap.DOWN) {
7493              next = "next";
7494            } else if (keyCode === keyMap.ESC) {
7495              (_a = active2.targetEl) == null ? void 0 : _a.focus();
7496            }
7497            if (~next) {
7498              e.preventDefault();
7499              const elements = $$(selFocusable, current);
7500              elements[getIndex(
7501                next,
7502                elements,
7503                findIndex(elements, (el) => matches(el, ":focus"))
7504              )].focus();
7505            }
7506            handleNavItemNavigation(e, this.items, active2);
7507          }
7508        },
7509        {
7510          name: "mouseleave",
7511          el: ({ dropbar }) => dropbar,
7512          filter: ({ dropbar }) => dropbar,
7513          handler() {
7514            const active2 = this.getActive();
7515            if (active2 && includes(active2.mode, "hover") && !this.dropdowns.some((el) => matches(el, ":hover"))) {
7516              active2.hide();
7517            }
7518          }
7519        },
7520        {
7521          name: "beforeshow",
7522          el: ({ dropContainer }) => dropContainer,
7523          filter: ({ dropbar }) => dropbar,
7524          handler({ target }) {
7525            if (!this.isDropbarDrop(target)) {
7526              return;
7527            }
7528            if (this.dropbar.previousElementSibling !== this.dropbarAnchor) {
7529              after(this.dropbarAnchor, this.dropbar);
7530            }
7531            addClass(target, `${this.clsDrop}-dropbar`);
7532          }
7533        },
7534        {
7535          name: "show",
7536          el: ({ dropContainer }) => dropContainer,
7537          filter: ({ dropbar }) => dropbar,
7538          handler({ target }) {
7539            if (!this.isDropbarDrop(target)) {
7540              return;
7541            }
7542            const drop = this.getDropdown(target);
7543            const adjustHeight = () => {
7544              const maxBottom = Math.max(
7545                ...parents(target, `.${this.clsDrop}`).concat(target).map((el) => offset(el).bottom)
7546              );
7547              offset(this.dropbar, {
7548                left: offset(this.dropbar).left,
7549                top: this.getDropbarOffset(drop.getPositionOffset())
7550              });
7551              this.transitionTo(
7552                maxBottom - offset(this.dropbar).top + toFloat(css(target, "marginBottom")),
7553                target
7554              );
7555            };
7556            this._observer = observeResize([drop.$el, ...drop.target], adjustHeight);
7557            adjustHeight();
7558          }
7559        },
7560        {
7561          name: "beforehide",
7562          el: ({ dropContainer }) => dropContainer,
7563          filter: ({ dropbar }) => dropbar,
7564          handler(e) {
7565            const active2 = this.getActive();
7566            if (matches(this.dropbar, ":hover") && active2.$el === e.target && this.isDropbarDrop(active2.$el) && includes(active2.mode, "hover") && active2.isDelayedHide && !this.items.some((el) => active2.targetEl !== el && matches(el, ":focus"))) {
7567              e.preventDefault();
7568            }
7569          }
7570        },
7571        {
7572          name: "hide",
7573          el: ({ dropContainer }) => dropContainer,
7574          filter: ({ dropbar }) => dropbar,
7575          handler({ target }) {
7576            var _a;
7577            if (!this.isDropbarDrop(target)) {
7578              return;
7579            }
7580            (_a = this._observer) == null ? void 0 : _a.disconnect();
7581            const active2 = this.getActive();
7582            if (!active2 || active2.$el === target) {
7583              this.transitionTo(0);
7584            }
7585          }
7586        }
7587      ],
7588      methods: {
7589        getActive() {
7590          var _a;
7591          return includes(this.dropdowns, (_a = active) == null ? void 0 : _a.$el) && active;
7592        },
7593        async transitionTo(newHeight, el) {
7594          const { dropbar } = this;
7595          const oldHeight = height(dropbar);
7596          el = oldHeight < newHeight && el;
7597          await Transition.cancel([el, dropbar]);
7598          if (el) {
7599            const diff = offset(el).top - offset(dropbar).top - oldHeight;
7600            if (diff > 0) {
7601              css(el, "transitionDelay", `${diff / newHeight * this.duration}ms`);
7602            }
7603          }
7604          css(el, "clipPath", `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
7605          height(dropbar, oldHeight);
7606          await Promise.all([
7607            Transition.start(dropbar, { height: newHeight }, this.duration),
7608            Transition.start(
7609              el,
7610              { clipPath: `polygon(0 0,100% 0,100% ${newHeight}px,0 ${newHeight}px)` },
7611              this.duration
7612            ).finally(() => css(el, { clipPath: "", transitionDelay: "" }))
7613          ]).catch(noop);
7614        },
7615        getDropdown(el) {
7616          return this.$getComponent(el, "drop") || this.$getComponent(el, "dropdown");
7617        },
7618        isDropbarDrop(el) {
7619          return includes(this.dropdowns, el) && hasClass(el, this.clsDrop);
7620        },
7621        getDropbarOffset(offsetTop) {
7622          const { $el, target, targetY } = this;
7623          const { top, height: height2 } = offset(query(targetY || target || $el, $el));
7624          return top + height2 + offsetTop;
7625        },
7626        initializeDropdowns() {
7627          this.$create(
7628            "drop",
7629            this.dropdowns.filter((el) => !this.getDropdown(el)),
7630            {
7631              ...this.$props,
7632              flip: false,
7633              shift: true,
7634              pos: `bottom-${this.align}`,
7635              boundary: this.boundary === true ? this.$el : this.boundary
7636            }
7637          );
7638        }
7639      }
7640    };
7641    function handleNavItemNavigation(e, toggles, active2) {
7642      var _a, _b, _c;
7643      const { current, keyCode } = e;
7644      let next = -1;
7645      if (keyCode === keyMap.HOME) {
7646        next = 0;
7647      } else if (keyCode === keyMap.END) {
7648        next = "last";
7649      } else if (keyCode === keyMap.LEFT) {
7650        next = "previous";
7651      } else if (keyCode === keyMap.RIGHT) {
7652        next = "next";
7653      } else if (keyCode === keyMap.TAB) {
7654        (_a = active2.targetEl) == null ? void 0 : _a.focus();
7655        (_b = active2.hide) == null ? void 0 : _b.call(active2, false);
7656      }
7657      if (~next) {
7658        e.preventDefault();
7659        (_c = active2.hide) == null ? void 0 : _c.call(active2, false);
7660        toggles[getIndex(next, toggles, toggles.indexOf(active2.targetEl || current))].focus();
7661      }
7662    }
7663
7664    var formCustom = {
7665      mixins: [Class],
7666      args: "target",
7667      props: {
7668        target: Boolean
7669      },
7670      data: {
7671        target: false
7672      },
7673      computed: {
7674        input: (_, $el) => $(selInput, $el),
7675        state() {
7676          return this.input.nextElementSibling;
7677        },
7678        target({ target }, $el) {
7679          return target && (target === true && parent(this.input) === $el && this.input.nextElementSibling || $(target, $el));
7680        }
7681      },
7682      update() {
7683        var _a;
7684        const { target, input } = this;
7685        if (!target) {
7686          return;
7687        }
7688        let option;
7689        const prop = isInput(target) ? "value" : "textContent";
7690        const prev = target[prop];
7691        const value = ((_a = input.files) == null ? void 0 : _a[0]) ? input.files[0].name : matches(input, "select") && (option = $$("option", input).filter((el) => el.selected)[0]) ? option.textContent : input.value;
7692        if (prev !== value) {
7693          target[prop] = value;
7694        }
7695      },
7696      events: [
7697        {
7698          name: "change",
7699          handler() {
7700            this.$emit();
7701          }
7702        },
7703        {
7704          name: "reset",
7705          el: ({ $el }) => $el.closest("form"),
7706          handler() {
7707            this.$emit();
7708          }
7709        }
7710      ]
7711    };
7712
7713    var grid = {
7714      extends: Margin,
7715      mixins: [Class],
7716      name: "grid",
7717      props: {
7718        masonry: Boolean,
7719        parallax: String,
7720        parallaxStart: String,
7721        parallaxEnd: String,
7722        parallaxJustify: Boolean
7723      },
7724      data: {
7725        margin: "hk-grid-margin",
7726        clsStack: "hk-grid-stack",
7727        masonry: false,
7728        parallax: 0,
7729        parallaxStart: 0,
7730        parallaxEnd: 0,
7731        parallaxJustify: false
7732      },
7733      connected() {
7734        this.masonry && addClass(this.$el, "hk-flex-top", "hk-flex-wrap-top");
7735      },
7736      observe: scroll$1({ filter: ({ parallax, parallaxJustify }) => parallax || parallaxJustify }),
7737      update: [
7738        {
7739          write({ rows }) {
7740            toggleClass(this.$el, this.clsStack, !rows.some((row) => row.length > 1));
7741          },
7742          events: ["resize"]
7743        },
7744        {
7745          read(data) {
7746            const { rows } = data;
7747            let { masonry, parallax, parallaxJustify, margin } = this;
7748            parallax = Math.max(0, toPx(parallax));
7749            if (!(masonry || parallax || parallaxJustify) || positionedAbsolute(rows) || rows[0].some(
7750              (el, i) => rows.some((row) => row[i] && row[i].offsetWidth !== el.offsetWidth)
7751            )) {
7752              return data.translates = data.scrollColumns = false;
vendor: 4,893 bytes, lines 7753-7900
7753            }
7754            let gutter = getGutter(rows, margin);
7755            let columns;
7756            let translates;
7757            if (masonry) {
7758              [columns, translates] = applyMasonry(rows, gutter, masonry === "next");
7759            } else {
7760              columns = transpose(rows);
7761            }
7762            const columnHeights = columns.map(
7763              (column) => sumBy(column, "offsetHeight") + gutter * (column.length - 1)
7764            );
7765            const height = Math.max(0, ...columnHeights);
7766            let scrollColumns;
7767            let parallaxStart;
7768            let parallaxEnd;
7769            if (parallax || parallaxJustify) {
7770              scrollColumns = columnHeights.map(
7771                (hgt, i) => parallaxJustify ? height - hgt + parallax : parallax / (i % 2 || 8)
7772              );
7773              if (!parallaxJustify) {
7774                parallax = Math.max(
7775                  ...columnHeights.map((hgt, i) => hgt + scrollColumns[i] - height)
7776                );
7777              }
7778              parallaxStart = toPx(this.parallaxStart, "height", this.$el, true);
7779              parallaxEnd = toPx(this.parallaxEnd, "height", this.$el, true);
7780            }
7781            return {
7782              columns,
7783              translates,
7784              scrollColumns,
7785              parallaxStart,
7786              parallaxEnd,
7787              padding: parallax,
7788              height: translates ? height : ""
7789            };
7790          },
7791          write({ height, padding }) {
7792            css(this.$el, "paddingBottom", padding || "");
7793            height !== false && css(this.$el, "height", height);
7794          },
7795          events: ["resize"]
7796        },
7797        {
7798          read({ rows, scrollColumns, parallaxStart, parallaxEnd }) {
7799            return {
7800              scrolled: scrollColumns && !positionedAbsolute(rows) ? scrolledOver(this.$el, parallaxStart, parallaxEnd) : false
7801            };
7802          },
7803          write({ columns, scrolled, scrollColumns, translates }) {
7804            if (!scrolled && !translates) {
7805              return;
7806            }
7807            columns.forEach(
7808              (column, i) => column.forEach((el, j) => {
7809                let [x, y] = translates && translates[i][j] || [0, 0];
7810                if (scrolled) {
7811                  y += scrolled * scrollColumns[i];
7812                }
7813                css(el, "transform", `translate(${x}px, ${y}px)`);
7814              })
7815            );
7816          },
7817          events: ["scroll", "resize"]
7818        }
7819      ]
7820    };
7821    function positionedAbsolute(rows) {
7822      return rows.flat().some((el) => css(el, "position") === "absolute");
7823    }
7824    function applyMasonry(rows, gutter, next) {
7825      const columns = [];
7826      const translates = [];
7827      const columnHeights = Array(rows[0].length).fill(0);
7828      let rowHeights = 0;
7829      for (let row of rows) {
7830        if (isRtl) {
7831          row.reverse();
7832        }
7833        let height = 0;
7834        for (const j in row) {
7835          const { offsetWidth, offsetHeight } = row[j];
7836          const index = next ? j : columnHeights.indexOf(Math.min(...columnHeights));
7837          push(columns, index, row[j]);
7838          push(translates, index, [
7839            (index - j) * offsetWidth * (isRtl ? -1 : 1),
7840            columnHeights[index] - rowHeights
7841          ]);
7842          columnHeights[index] += offsetHeight + gutter;
7843          height = Math.max(height, offsetHeight);
7844        }
7845        rowHeights += height + gutter;
7846      }
7847      return [columns, translates];
7848    }
7849    function getGutter(rows, cls) {
7850      const node = rows.flat().find((el) => hasClass(el, cls));
7851      return toFloat(node ? css(node, "marginTop") : css(rows[0][0], "paddingLeft"));
7852    }
7853    function transpose(rows) {
7854      const columns = [];
7855      for (const row of rows) {
7856        for (const i in row) {
7857          push(columns, i, row[i]);
7858        }
7859      }
7860      return columns;
7861    }
7862    function push(array, index, value) {
7863      if (!array[index]) {
7864        array[index] = [];
7865      }
7866      array[index].push(value);
7867    }
7868
7869    var heightMatch = {
7870      args: "target",
7871      props: {
7872        target: String,
7873        row: Boolean
7874      },
7875      data: {
7876        target: "> *",
7877        row: true
7878      },
7879      computed: {
7880        elements: ({ target }, $el) => $$(target, $el)
7881      },
7882      observe: resize({
7883        target: ({ $el, elements }) => elements.reduce((elements2, el) => elements2.concat(el, ...el.children), [$el])
7884      }),
7885      events: {
7886        // Hidden elements may change height when fonts load
7887        name: "loadingdone",
7888        el: () => document.fonts,
7889        handler() {
7890          this.$emit("resize");
7891        }
7892      },
7893      update: {
7894        read() {
7895          return {
7896            rows: (this.row ? getRows(this.elements) : [this.elements]).map(match)
7897          };
7898        },
7899        write({ rows }) {
7900          for (const { heights, elements } of rows) {
vendor: 5,847 bytes, lines 7901-8034
7901            elements.forEach((el, i) => css(el, "minHeight", heights[i]));
7902          }
7903        },
7904        events: ["resize"]
7905      }
7906    };
7907    function match(elements) {
7908      if (elements.length < 2) {
7909        return { heights: [""], elements };
7910      }
7911      let heights = elements.map(getHeight);
7912      const max = Math.max(...heights);
7913      return {
7914        heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? "" : max),
7915        elements
7916      };
7917    }
7918    function getHeight(element) {
7919      const style = pick(element.style, ["display", "minHeight"]);
7920      if (!isVisible(element)) {
7921        css(element, "display", "block", "important");
7922      }
7923      css(element, "minHeight", "");
7924      const height = dimensions$1(element).height - boxModelAdjust(element, "height", "content-box");
7925      css(element, style);
7926      return height;
7927    }
7928
7929    var heightPlaceholder = {
7930      args: "target",
7931      props: {
7932        target: String
7933      },
7934      data: {
7935        target: ""
7936      },
7937      computed: {
7938        target: {
7939          get: ({ target }, $el) => query(target, $el),
7940          observe: ({ target }) => target
7941        }
7942      },
7943      observe: resize({ target: ({ target }) => target }),
7944      update: {
7945        read() {
7946          return this.target ? { height: this.target.offsetHeight } : false;
7947        },
7948        write({ height }) {
7949          css(this.$el, { minHeight: height });
7950        },
7951        events: ["resize"]
7952      }
7953    };
7954
7955    var heightViewport = {
7956      props: {
7957        expand: Boolean,
7958        offsetTop: Boolean,
7959        offsetBottom: Boolean,
7960        minHeight: Number
7961      },
7962      data: {
7963        expand: false,
7964        offsetTop: false,
7965        offsetBottom: false,
7966        minHeight: 0
7967      },
7968      // check for offsetTop change
7969      observe: [
7970        viewport({ filter: ({ expand }) => expand }),
7971        resize({ target: ({ $el }) => scrollParents($el) })
7972      ],
7973      update: {
7974        read() {
7975          if (!isVisible(this.$el)) {
7976            return false;
7977          }
7978          let minHeight = "";
7979          const box = boxModelAdjust(this.$el, "height", "content-box");
7980          const { body, scrollingElement } = document;
7981          const scrollElement = scrollParent(this.$el);
7982          const { height: viewportHeight } = offsetViewport(
7983            scrollElement === body ? scrollingElement : scrollElement
7984          );
7985          const isScrollingElement = scrollingElement === scrollElement || body === scrollElement;
7986          minHeight = `calc(${isScrollingElement ? "100vh" : `${viewportHeight}px`}`;
7987          if (this.expand) {
7988            const diff = dimensions$1(scrollElement).height - dimensions$1(this.$el).height;
7989            minHeight += ` - ${diff}px`;
7990          } else {
7991            if (this.offsetTop) {
7992              if (isScrollingElement) {
7993                const offsetTopEl = this.offsetTop === true ? this.$el : query(this.offsetTop, this.$el);
7994                const { top } = offset(offsetTopEl);
7995                minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : "";
7996              } else {
7997                minHeight += ` - ${boxModelAdjust(scrollElement, "height", css(scrollElement, "boxSizing"))}px`;
7998              }
7999            }
8000            if (this.offsetBottom === true) {
8001              minHeight += ` - ${dimensions$1(this.$el.nextElementSibling).height}px`;
8002            } else if (isNumeric(this.offsetBottom)) {
8003              minHeight += ` - ${this.offsetBottom}vh`;
8004            } else if (this.offsetBottom && endsWith(this.offsetBottom, "px")) {
8005              minHeight += ` - ${toFloat(this.offsetBottom)}px`;
8006            } else if (isString(this.offsetBottom)) {
8007              minHeight += ` - ${dimensions$1(query(this.offsetBottom, this.$el)).height}px`;
8008            }
8009          }
8010          minHeight += `${box ? ` - ${box}px` : ""})`;
8011          return { minHeight };
8012        },
8013        write({ minHeight }) {
8014          css(this.$el, "minHeight", `max(${this.minHeight || 0}px, ${minHeight})`);
8015        },
8016        events: ["resize"]
8017      }
8018    };
8019
8020    var closeIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"1\" y1=\"1\" x2=\"13\" y2=\"13\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13\" y1=\"1\" x2=\"1\" y2=\"13\"/></svg>";
8021
8022    var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
8023
8024    var dropParentIcon = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
8025
8026    var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><rect width=\"1\" height=\"11\" x=\"9\" y=\"4\"/><rect width=\"11\" height=\"1\" x=\"4\" y=\"9\"/></svg>";
8027
8028    var navParentIconLarge = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 4 7 10 13 4\"/></svg>";
8029
8030    var navParentIcon = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
8031
8032    var navbarParentIcon = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
8033
8034    var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><style>.hk-navbar-toggle-icon svg&gt;[class*=&quot;line-&quot;]{transition:0.2s ease-in-out;transition-property:transform, opacity;transform-origin:center;opacity:1}.hk-navbar-toggle-icon svg&gt;.line-3{opacity:0}
8034.hk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-3{opacity:1}.hk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-2{transform:rotate(45deg)}.hk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-3{transform:rotate(-45deg)}.hk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-1,.hk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-4{opacity:0}.hk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-1{transform:translateY(6px) scaleX(0)}.hk-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-4{transform:translateY(-6px) scaleX(0)}</style><rect width=\"20\" height=\"2\" y=\"3\" class=\"line-1\"/><rect width=\"20\" height=\"2\" y=\"9\" class=\"line-2\"/><rect width=\"20\" height=\"2\" y=\"9\" class=\"line-3\"/><rect width=\"20\" height=\"2\" y=\"15\" class=\"line-4\"/></svg>";
8035
8036    var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><rect width=\"1\" height=\"40\" x=\"19\" y=\"0\"/><rect width=\"40\" height=\"1\" x=\"0\" y=\"19\"/></svg>";
8037
8038    var paginationNext = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 1 6 6 1 11\"/></svg>";
8039
8040    var paginationPrevious = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"6 1 1 6 6 11\"/></svg>";
8041
8042    var searchIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>";
8043
8044    var searchLarge = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" cx=\"17.5\" cy=\"17.5\" r=\"16.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" x1=\"38\" y1=\"39\" x2=\"29\" y2=\"30\"/></svg>";
8045
8046    var searchMedium = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10.5\" cy=\"10.5\" r=\"9.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"23\" y1=\"23\" x2=\"17\" y2=\"17\"/></svg>";
8047
8048    var slidenavNextLarge = "<svg width=\"25\" height=\"40\" viewBox=\"0 0 25 40\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"4.002,38.547 22.527,20.024 4,1.5\"/></svg>";
8049
8050    var slidenavNext = "<svg width=\"14\" height=\"24\" viewBox=\"0 0 14 24\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"1.225,23 12.775,12 1.225,1\"/></svg>";
8051
8052    var slidenavPreviousLarge = "<svg width=\"25\" height=\"40\" viewBox=\"0 0 25 40\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"20.527,1.5 2,20.024 20.525,38.547\"/></svg>";
8053
8054    var slidenavPrevious = "<svg width=\"14\" height=\"24\" viewBox=\"0 0 14 24\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"12.775,1 1.225,12 12.775,23\"/></svg>";
8055
8056    var spinner = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 30 30\"><circle fill=\"none\" stroke=\"#000\" cx=\"15\" cy=\"15\" r=\"14\"/></svg>";
8057
8058    var totop = "<svg width=\"18\" height=\"10\" viewBox=\"0 0 18 10\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 9 9 1 17 9\"/></svg>";
8059
8060    var Svg = {
8061      args: "src",
8062      props: {
8063        width: Number,
8064        height: Number,
8065        ratio: Number
8066      },
8067      data: {
8068        ratio: 1
8069      },
8070      connected() {
8071        this.svg = this.getSvg().then((el) => {
8072          if (!this._connected) {
8073            return;
8074          }
8075          const svg = insertSVG(el, this.$el);
8076          if (this.svgEl && svg !== this.svgEl) {
8077            remove$1(this.svgEl);
8078          }
8079          applyWidthAndHeight.call(this, svg, el);
8080          return this.svgEl = svg;
8081        }, noop);
8082      },
8083      disconnected() {
8084        this.svg.then((svg) => {
8085          if (this._connected) {
8086            return;
8087          }
8088          if (isVoidElement(this.$el)) {
8089            this.$el.hidden = false;
vendor: 13,952 bytes, lines 8090-8541
8090          }
8091          remove$1(svg);
8092          this.svgEl = null;
8093        });
8094        this.svg = null;
8095      },
8096      methods: {
8097        async getSvg() {
8098        }
8099      }
8100    };
8101    function insertSVG(el, root) {
8102      if (isVoidElement(root) || isTag(root, "canvas")) {
8103        root.hidden = true;
8104        const next = root.nextElementSibling;
8105        return equals(el, next) ? next : after(root, el);
8106      }
8107      const last = root.lastElementChild;
8108      return equals(el, last) ? last : append(root, el);
8109    }
8110    function equals(el, other) {
8111      return isTag(el, "svg") && isTag(other, "svg") && el.innerHTML === other.innerHTML;
8112    }
8113    function applyWidthAndHeight(el, ref) {
8114      const props = ["width", "height"];
8115      let dimensions = props.map((prop) => this[prop]);
8116      if (!dimensions.some((val) => val)) {
8117        dimensions = props.map((prop) => attr(ref, prop));
8118      }
8119      const viewBox = attr(ref, "viewBox");
8120      if (viewBox && !dimensions.some((val) => val)) {
8121        dimensions = viewBox.split(" ").slice(2);
8122      }
8123      dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
8124    }
8125    function parseSVG(svg, icon) {
8126      if (icon && includes(svg, "<symbol")) {
8127        svg = parseSymbols(svg)[icon] || svg;
8128      }
8129      return toNodes(fragment(svg)).filter(isElement)[0];
8130    }
8131    const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
8132    const parseSymbols = memoize(function(svg) {
8133      const symbols = {};
8134      symbolRe.lastIndex = 0;
8135      let match;
8136      while (match = symbolRe.exec(svg)) {
8137        symbols[match[3]] = `<svg ${match[1]}svg>`;
8138      }
8139      return symbols;
8140    });
8141
8142    const icons = {
8143      spinner,
8144      totop,
8145      marker,
8146      "close-icon": closeIcon,
8147      "close-large": closeLarge,
8148      "drop-parent-icon": dropParentIcon,
8149      "nav-parent-icon": navParentIcon,
8150      "nav-parent-icon-large": navParentIconLarge,
8151      "navbar-parent-icon": navbarParentIcon,
8152      "navbar-toggle-icon": navbarToggleIcon,
8153      "overlay-icon": overlayIcon,
8154      "pagination-next": paginationNext,
8155      "pagination-previous": paginationPrevious,
8156      "search-icon": searchIcon,
8157      "search-medium": searchMedium,
8158      "search-large": searchLarge,
8159      "search-toggle-icon": searchIcon,
8160      "slidenav-next": slidenavNext,
8161      "slidenav-next-large": slidenavNextLarge,
8162      "slidenav-previous": slidenavPrevious,
8163      "slidenav-previous-large": slidenavPreviousLarge
8164    };
8165    const Icon = {
8166      install: install$1,
8167      mixins: [Svg],
8168      args: "icon",
8169      props: { icon: String },
8170      isIcon: true,
8171      beforeConnect() {
8172        addClass(this.$el, "hk-icon");
8173      },
8174      methods: {
8175        async getSvg() {
8176          const icon = getIcon(this.icon);
8177          if (!icon) {
8178            throw "Icon not found.";
8179          }
8180          return icon;
8181        }
8182      }
8183    };
8184    const IconComponent = {
8185      args: false,
8186      extends: Icon,
8187      data: (vm) => ({
8188        icon: hyphenate(vm.constructor.options.name)
8189      }),
8190      beforeConnect() {
8191        addClass(this.$el, this.$options.id);
8192      }
8193    };
8194    const NavParentIcon = {
8195      extends: IconComponent,
8196      beforeConnect() {
8197        const icon = this.$props.icon;
8198        this.icon = this.$el.closest(".hk-nav-primary") ? `${icon}-large` : icon;
8199      }
8200    };
8201    const Search = {
8202      extends: IconComponent,
8203      mixins: [I18n],
8204      i18n: { toggle: "Open Search", submit: "Submit Search" },
8205      beforeConnect() {
8206        const isToggle = hasClass(this.$el, "hk-search-toggle") || hasClass(this.$el, "hk-navbar-toggle");
8207        this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "hk-search-icon") && this.$el.closest(".hk-search-large") ? "search-large" : this.$el.closest(".hk-search-medium") ? "search-medium" : this.$props.icon;
8208        if (hasAttr(this.$el, "aria-label")) {
8209          return;
8210        }
8211        if (isToggle) {
8212          const label = this.t("toggle");
8213          attr(this.$el, "aria-label", label);
8214        } else {
8215          const button = this.$el.closest("a,button");
8216          if (button) {
8217            const label = this.t("submit");
8218            attr(button, "aria-label", label);
8219          }
8220        }
8221      }
8222    };
8223    const Spinner = {
8224      extends: IconComponent,
8225      beforeConnect() {
8226        attr(this.$el, "role", "status");
8227      },
8228      methods: {
8229        async getSvg() {
8230          const icon = await Icon.methods.getSvg.call(this);
8231          if (this.ratio !== 1) {
8232            css($("circle", icon), "strokeWidth", 1 / this.ratio);
8233          }
8234          return icon;
8235        }
8236      }
8237    };
8238    const ButtonComponent = {
8239      extends: IconComponent,
8240      mixins: [I18n],
8241      beforeConnect() {
8242        const button = this.$el.closest("a,button");
8243        attr(button, "role", this.role !== null && isTag(button, "a") ? "button" : this.role);
8244        const label = this.t("label");
8245        if (label && !hasAttr(button, "aria-label")) {
8246          attr(button, "aria-label", label);
8247        }
8248      }
8249    };
8250    const Slidenav = {
8251      extends: ButtonComponent,
8252      beforeConnect() {
8253        addClass(this.$el, "hk-slidenav");
8254        const icon = this.$props.icon;
8255        this.icon = hasClass(this.$el, "hk-slidenav-large") ? `${icon}-large` : icon;
8256      }
8257    };
8258    const NavbarToggleIcon = {
8259      extends: ButtonComponent,
8260      i18n: { label: "Open menu" }
8261    };
8262    const Close = {
8263      extends: ButtonComponent,
8264      i18n: { label: "Close" },
8265      beforeConnect() {
8266        this.icon = `close-${hasClass(this.$el, "hk-close-large") ? "large" : "icon"}`;
8267      }
8268    };
8269    const Marker = {
8270      extends: ButtonComponent,
8271      i18n: { label: "Open" }
8272    };
8273    const Totop = {
8274      extends: ButtonComponent,
8275      i18n: { label: "Back to top" }
8276    };
8277    const PaginationNext = {
8278      extends: ButtonComponent,
8279      i18n: { label: "Next page" },
8280      data: { role: null }
8281    };
8282    const PaginationPrevious = {
8283      extends: ButtonComponent,
8284      i18n: { label: "Previous page" },
8285      data: { role: null }
8286    };
8287    const parsed = {};
8288    function install$1(hkUIkit) {
8289      hkUIkit.icon.add = (name, svg) => {
8290        const added = isString(name) ? { [name]: svg } : name;
8291        each(added, (svg2, name2) => {
8292          icons[name2] = svg2;
8293          delete parsed[name2];
8294        });
8295        if (hkUIkit._initialized) {
8296          apply(
8297            document.body,
8298            (el) => each(hkUIkit.getComponents(el), (cmp) => {
8299              cmp.$options.isIcon && cmp.icon in added && cmp.$reset();
8300            })
8301          );
8302        }
8303      };
8304    }
8305    const aliases = { twitter: "x" };
8306    function getIcon(icon) {
8307      icon = aliases[icon] || icon;
8308      if (!icons[icon]) {
8309        return null;
8310      }
8311      if (!parsed[icon]) {
8312        parsed[icon] = parseSVG(icons[applyRtl(icon)] || icons[icon]);
8313      }
8314      return parsed[icon].cloneNode(true);
8315    }
8316    function applyRtl(icon) {
8317      return isRtl ? swap(swap(icon, "left", "right"), "previous", "next") : icon;
8318    }
8319
8320    var inverse = {
8321      props: {
8322        target: String,
8323        selActive: String
8324      },
8325      data: {
8326        target: false,
8327        selActive: false
8328      },
8329      computed: {
8330        target: ({ target }, $el) => target ? $$(target, $el) : $el
8331      },
8332      observe: [
8333        intersection({
8334          handler(entries) {
8335            this.isIntersecting = entries.some(({ isIntersecting }) => isIntersecting);
8336            this.$emit();
8337          },
8338          target: ({ target }) => target,
8339          args: { intersecting: false }
8340        }),
8341        mutation({
8342          target: ({ target }) => target,
8343          options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
8344        }),
8345        {
8346          target: ({ target }) => target,
8347          observe: (target, handler) => {
8348            const observer = observeResize(
8349              [...toNodes(target), document.documentElement],
8350              handler
8351            );
8352            const listener = [
8353              on(document, "scroll itemshown itemhidden", handler, {
8354                passive: true,
8355                capture: true
8356              }),
8357              on(document, "show hide transitionstart", (e) => {
8358                handler();
8359                return observer.observe(e.target);
8360              }),
8361              on(document, "shown hidden transitionend transitioncancel", (e) => {
8362                handler();
8363                return observer.unobserve(e.target);
8364              })
8365            ];
8366            return {
8367              observe: observer.observe.bind(observer),
8368              unobserve: observer.unobserve.bind(observer),
8369              disconnect() {
8370                observer.disconnect();
8371                listener.map((off) => off());
8372              }
8373            };
8374          },
8375          handler() {
8376            this.$emit();
8377          }
8378        }
8379      ],
8380      update: {
8381        read() {
8382          if (!this.isIntersecting) {
8383            return false;
8384          }
8385          for (const target of toNodes(this.target)) {
8386            let color = !this.selActive || matches(target, this.selActive) ? findTargetColor(target) : "";
8387            if (color !== false) {
8388              replaceClass(target, "hk-light hk-dark", color);
8389            }
8390          }
8391        }
8392      }
8393    };
8394    function findTargetColor(target) {
8395      const dim = dimensions$1(target);
8396      const viewport = dimensions$1(window);
8397      if (!intersectRect(dim, viewport)) {
8398        return false;
8399      }
8400      const { left, top, height, width } = dim;
8401      let last;
8402      for (const percent of [0.25, 0.5, 0.75]) {
8403        const elements = target.ownerDocument.elementsFromPoint(
8404          Math.max(0, Math.min(left + width * percent, viewport.width - 1)),
8405          Math.max(0, Math.min(top + height / 2, viewport.height - 1))
8406        );
8407        for (const element of elements) {
8408          if (target.contains(element) || !checkVisibility(element) || element.closest('[class*="-leave"]') && elements.some((el) => element !== el && matches(el, '[class*="-enter"]'))) {
8409            continue;
8410          }
8411          const color = css(element, "--hk-inverse");
8412          if (color) {
8413            if (color === last) {
8414              return `hk-${color}`;
8415            }
8416            last = color;
8417            break;
8418          }
8419        }
8420      }
8421      return last ? `hk-${last}` : "";
8422    }
8423    function checkVisibility(element) {
8424      if (css(element, "visibility") !== "visible") {
8425        return false;
8426      }
8427      while (element) {
8428        if (css(element, "opacity") === "0") {
8429          return false;
8430        }
8431        element = parent(element);
8432      }
8433      return true;
8434    }
8435
8436    var leader = {
8437      mixins: [Class, Media],
8438      props: {
8439        fill: String
8440      },
8441      data: {
8442        fill: "",
8443        clsWrapper: "hk-leader-fill",
8444        clsHide: "hk-leader-hide",
8445        attrFill: "data-fill"
8446      },
8447      computed: {
8448        fill: ({ fill }, $el) => fill || css($el, "--hk-leader-fill-content")
8449      },
8450      connected() {
8451        [this.wrapper] = wrapInner(this.$el, `<span class="${this.clsWrapper}">`);
8452      },
8453      disconnected() {
8454        unwrap(this.wrapper.childNodes);
8455      },
8456      observe: resize(),
8457      update: {
8458        read() {
8459          const width = Math.trunc(this.$el.offsetWidth / 2);
8460          return {
8461            width,
8462            fill: this.fill,
8463            hide: !this.matchMedia
8464          };
8465        },
8466        write({ width, fill, hide }) {
8467          toggleClass(this.wrapper, this.clsHide, hide);
8468          attr(this.wrapper, this.attrFill, new Array(width).join(fill));
8469        },
8470        events: ["resize"]
8471      }
8472    };
8473
8474    var modal = {
8475      install,
8476      mixins: [Modal],
8477      data: {
8478        clsPage: "hk-modal-page",
8479        selPanel: ".hk-modal-dialog",
8480        selClose: '[class*="hk-modal-close"]'
8481      },
8482      events: [
8483        {
8484          name: "fullscreenchange webkitendfullscreen",
8485          capture: true,
8486          handler(e) {
8487            if (isTag(e.target, "video") && this.isToggled() && !document.fullscreenElement) {
8488              this.hide();
8489            }
8490          }
8491        },
8492        {
8493          name: "show",
8494          self: true,
8495          handler() {
8496            if (hasClass(this.panel, "hk-margin-auto-vertical")) {
8497              addClass(this.$el, "hk-flex");
8498            } else {
8499              css(this.$el, "display", "block");
8500            }
8501            height(this.$el);
8502          }
8503        },
8504        {
8505          name: "hidden",
8506          self: true,
8507          handler() {
8508            css(this.$el, "display", "");
8509            removeClass(this.$el, "hk-flex");
8510          }
8511        }
8512      ]
8513    };
8514    function install({ modal }) {
8515      modal.dialog = function(content, options) {
8516        const dialog = modal($(`<div><div class="hk-modal-dialog">${content}</div></div>`), {
8517          stack: true,
8518          role: "alertdialog",
8519          ...options
8520        });
8521        dialog.show();
8522        on(
8523          dialog.$el,
8524          "hidden",
8525          async () => {
8526            await Promise.resolve();
8527            dialog.$destroy(true);
8528          },
8529          { self: true }
8530        );
8531        return dialog;
8532      };
8533      modal.alert = function(message, options) {
8534        return openDialog(
8535          ({ i18n }) => `<div class="hk-modal-body">${isString(message) ? message : html(message)}</div> <div class="hk-modal-footer hk-text-right"> <button class="hk-button hk-button-primary hk-modal-close" autofocus>${i18n.ok}</button> </div>`,
8536          options
8537        );
8538      };
8539      modal.confirm = function(message, options) {
8540        return openDialog(
8541          ({ i18n }) => `<form> <div class="hk-modal-body">${isString(message) ? message : html(message)}</div> <div class="hk-modal-footer hk-text-right"> <button class="hk-button hk-button-default hk-modal-close" type="button">
8541${i18n.cancel}</button> <button class="hk-button hk-button-primary" autofocus>${i18n.ok}</button> </div> </form>`,
8542          options,
8543          () => Promise.reject()
8544        );
8545      };
8546      modal.prompt = function(message, value, options) {
8547        const promise = openDialog(
8548          ({ i18n }) => `<form class="hk-form-stacked"> <div class="hk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="hk-input" autofocus> </div> <div class="hk-modal-footer hk-text-right"> <button class="hk-button hk-button-default hk-modal-close" type="button">${i18n.cancel}</button> <button class="hk-button hk-button-primary">${i18n.ok}</button> </div> </form>`,
8549          options,
8550          () => null,
8551          () => input.value
8552        );
8553        const { $el } = promise.dialog;
8554        const input = $("input", $el);
8555        input.value = value || "";
8556        on($el, "show", () => input.select());
8557        return promise;
8558      };
8559      modal.i18n = {
8560        ok: "Ok",
8561        cancel: "Cancel"
8562      };
8563      function openDialog(tmpl, options, hideFn = noop, submitFn = noop) {
8564        options = {
8565          bgClose: false,
8566          escClose: true,
8567          ...options,
8568          i18n: { ...modal.i18n, ...options == null ? void 0 : options.i18n }
8569        };
8570        const dialog = modal.dialog(tmpl(options), options);
8571        return assign(
8572          new Promise((resolve) => {
8573            const off = on(dialog.$el, "hide", () => resolve(hideFn()));
8574            on(dialog.$el, "submit", "form", (e) => {
8575              e.preventDefault();
8576              resolve(submitFn(dialog));
8577              off();
8578              dialog.hide();
8579            });
8580          }),
8581          { dialog }
8582        );
8583      }
8584    }
8585
8586    var nav = {
8587      extends: Accordion,
8588      data: {
8589        targets: "> .hk-parent",
8590        toggle: "> a",
8591        content: "> ul"
8592      }
8593    };
8594
8595    const clsNavbarTransparent = "hk-navbar-transparent";
8596    var navbar = {
8597      extends: Dropnav,
8598      props: {
8599        dropbarTransparentMode: Boolean
8600      },
8601      data: {
8602        clsDrop: "hk-navbar-dropdown",
8603        selNavItem: ".hk-navbar-nav > li > a,a.hk-navbar-item,button.hk-navbar-item,.hk-navbar-item a,.hk-navbar-item button,.hk-navbar-toggle",
8604        // Simplify with :where() selector once browser target is Safari 14+
8605        dropbarTransparentMode: false
8606      },
8607      computed: {
8608        navbarContainer: (_, $el) => $el.closest(".hk-navbar-container")
8609      },
8610      watch: {
8611        items() {
8612          const justify = hasClass(this.$el, "hk-navbar-justify");
8613          const containers = $$(".hk-navbar-nav, .hk-navbar-left, .hk-navbar-right", this.$el);
8614          for (const container of containers) {
8615            const items = justify ? $$(".hk-navbar-nav > li > a, .hk-navbar-item, .hk-navbar-toggle", container).length : "";
8616            css(container, "flexGrow", items);
8617          }
8618        }
8619      },
8620      events: [
8621        {
8622          name: "show",
8623          el: ({ dropContainer }) => dropContainer,
8624          handler({ target }) {
8625            if (this.getTransparentMode(target) === "remove" && hasClass(this.navbarContainer, clsNavbarTransparent)) {
8626              removeClass(this.navbarContainer, clsNavbarTransparent);
8627              this._transparent = true;
8628            }
8629          }
8630        },
8631        {
8632          name: "hide",
8633          el: ({ dropContainer }) => dropContainer,
8634          async handler(e) {
8635            if (parent(e.target) !== this.dropContainer) {
8636              return;
8637            }
8638            await awaitMacroTask();
8639            if (!this.getActive() && this._transparent) {
8640              addClass(this.navbarContainer, clsNavbarTransparent);
8641              this._transparent = null;
8642            }
8643          }
8644        }
8645      ],
8646      methods: {
8647        getTransparentMode(el) {
8648          if (!this.navbarContainer) {
8649            return;
8650          }
8651          if (this.dropbar && this.isDropbarDrop(el)) {
8652            return this.dropbarTransparentMode;
8653          }
8654          const drop = this.getDropdown(el);
8655          if (drop && hasClass(el, "hk-dropbar")) {
8656            return drop.inset ? "behind" : "remove";
8657          }
8658        },
8659        getDropbarOffset(offsetTop) {
8660          const { top, height }
vendor: 9,202 bytes, lines 8660-8955
8660 = offset(this.navbarContainer);
8661          return top + (this.dropbarTransparentMode === "behind" ? 0 : height + offsetTop);
8662        }
8663      }
8664    };
8665    function awaitMacroTask() {
8666      return new Promise((resolve) => setTimeout(resolve));
8667    }
8668
8669    var offcanvas = {
8670      mixins: [Modal],
8671      args: "mode",
8672      props: {
8673        mode: String,
8674        flip: Boolean,
8675        overlay: Boolean,
8676        swiping: Boolean
8677      },
8678      data: {
8679        mode: "slide",
8680        flip: false,
8681        overlay: false,
8682        clsPage: "hk-offcanvas-page",
8683        clsContainer: "hk-offcanvas-container",
8684        selPanel: ".hk-offcanvas-bar",
8685        clsFlip: "hk-offcanvas-flip",
8686        clsContainerAnimation: "hk-offcanvas-container-animation",
8687        clsSidebarAnimation: "hk-offcanvas-bar-animation",
8688        clsMode: "hk-offcanvas",
8689        clsOverlay: "hk-offcanvas-overlay",
8690        selClose: ".hk-offcanvas-close",
8691        container: false,
8692        swiping: true
8693      },
8694      computed: {
8695        clsFlip: ({ flip, clsFlip }) => flip ? clsFlip : "",
8696        clsOverlay: ({ overlay, clsOverlay }) => overlay ? clsOverlay : "",
8697        clsMode: ({ mode, clsMode }) => `${clsMode}-${mode}`,
8698        clsSidebarAnimation: ({ mode, clsSidebarAnimation }) => mode === "none" || mode === "reveal" ? "" : clsSidebarAnimation,
8699        clsContainerAnimation: ({ mode, clsContainerAnimation }) => mode !== "push" && mode !== "reveal" ? "" : clsContainerAnimation,
8700        transitionElement({ mode }) {
8701          return mode === "reveal" ? parent(this.panel) : this.panel;
8702        }
8703      },
8704      observe: swipe({ filter: ({ swiping }) => swiping }),
8705      update: {
8706        read() {
8707          if (this.isToggled() && !isVisible(this.$el)) {
8708            this.hide();
8709          }
8710        },
8711        events: ["resize"]
8712      },
8713      events: [
8714        {
8715          name: "touchmove",
8716          self: true,
8717          passive: false,
8718          filter: ({ overlay }) => overlay,
8719          handler(e) {
8720            e.cancelable && e.preventDefault();
8721          }
8722        },
8723        {
8724          name: "show",
8725          self: true,
8726          handler() {
8727            if (this.mode === "reveal" && !hasClass(parent(this.panel), this.clsMode)) {
8728              addClass(wrapAll(this.panel, "<div>"), this.clsMode);
8729            }
8730            const { body, scrollingElement } = document;
8731            addClass(body, this.clsContainer, this.clsFlip);
8732            css(body, "touchAction", "pan-y pinch-zoom");
8733            css(this.$el, "display", "block");
8734            css(this.panel, "maxWidth", scrollingElement.clientWidth);
8735            addClass(this.$el, this.clsOverlay);
8736            addClass(
8737              this.panel,
8738              this.clsSidebarAnimation,
8739              this.mode === "reveal" ? "" : this.clsMode
8740            );
8741            height(body);
8742            addClass(body, this.clsContainerAnimation);
8743            this.clsContainerAnimation && suppressUserScale();
8744          }
8745        },
8746        {
8747          name: "hide",
8748          self: true,
8749          handler() {
8750            removeClass(document.body, this.clsContainerAnimation);
8751            css(document.body, "touchAction", "");
8752          }
8753        },
8754        {
8755          name: "hidden",
8756          self: true,
8757          handler() {
8758            this.clsContainerAnimation && resumeUserScale();
8759            if (this.mode === "reveal" && hasClass(parent(this.panel), this.clsMode)) {
8760              unwrap(this.panel);
8761            }
8762            removeClass(this.panel, this.clsSidebarAnimation, this.clsMode);
8763            removeClass(this.$el, this.clsOverlay);
8764            css(this.$el, "display", "");
8765            css(this.panel, "maxWidth", "");
8766            removeClass(document.body, this.clsContainer, this.clsFlip);
8767          }
8768        },
8769        {
8770          name: "swipeLeft swipeRight",
8771          handler(e) {
8772            if (this.isToggled() && endsWith(e.type, "Left") ^ this.flip) {
8773              this.hide();
8774            }
8775          }
8776        }
8777      ]
8778    };
8779    function suppressUserScale() {
8780      getViewport().content += ",user-scalable=0";
8781    }
8782    function resumeUserScale() {
8783      const viewport = getViewport();
8784      viewport.content = viewport.content.replace(/,user-scalable=0$/, "");
8785    }
8786    function getViewport() {
8787      return $('meta[name="viewport"]', document.head) || append(document.head, '<meta name="viewport">');
8788    }
8789
8790    var overflowAuto = {
8791      mixins: [Class],
8792      props: {
8793        selContainer: String,
8794        selContent: String,
8795        minHeight: Number
8796      },
8797      data: {
8798        selContainer: ".hk-modal",
8799        selContent: ".hk-modal-dialog",
8800        minHeight: 150
8801      },
8802      computed: {
8803        container: ({ selContainer }, $el) => $el.closest(selContainer),
8804        content: ({ selContent }, $el) => $el.closest(selContent)
8805      },
8806      observe: resize({
8807        target: ({ container, content }) => [container, content]
8808      }),
8809      update: {
8810        read() {
8811          if (!this.content || !this.container || !isVisible(this.$el)) {
8812            return false;
8813          }
8814          return {
8815            max: Math.max(
8816              this.minHeight,
8817              height(this.container) - (dimensions$1(this.content).height - height(this.$el))
8818            )
8819          };
8820        },
8821        write({ max }) {
8822          css(this.$el, { minHeight: this.minHeight, maxHeight: max });
8823        },
8824        events: ["resize"]
8825      }
8826    };
8827
8828    var responsive = {
8829      props: ["width", "height"],
8830      connected() {
8831        addClass(this.$el, "hk-responsive-width");
8832        css(this.$el, "aspectRatio", `${this.width}/${this.height}`);
8833      }
8834    };
8835
8836    var scroll = {
8837      props: {
8838        offset: Number
8839      },
8840      data: {
8841        offset: 0
8842      },
8843      connected() {
8844        registerClick(this);
8845      },
8846      disconnected() {
8847        unregisterClick(this);
8848      },
8849      methods: {
8850        async scrollTo(el) {
8851          el = el && $(el) || document.body;
8852          if (trigger(this.$el, "beforescroll", [this, el])) {
8853            await scrollIntoView(el, { offset: this.offset });
8854            trigger(this.$el, "scrolled", [this, el]);
8855          }
8856        }
8857      }
8858    };
8859    const instances = /* @__PURE__ */ new Set();
8860    function registerClick(cmp) {
8861      if (!instances.size) {
8862        on(document, "click", clickHandler);
8863      }
8864      instances.add(cmp);
8865    }
8866    function unregisterClick(cmp) {
8867      instances.delete(cmp);
8868      if (!instances.size) {
8869        off(document, "click", clickHandler);
8870      }
8871    }
8872    function clickHandler(e) {
8873      if (e.defaultPrevented) {
8874        return;
8875      }
8876      for (const instance of instances) {
8877        if (instance.$el.contains(e.target) && isSameSiteAnchor(instance.$el)) {
8878          e.preventDefault();
8879          if (window.location.href !== instance.$el.href) {
8880            window.history.pushState({}, "", instance.$el.href);
8881          }
8882          instance.scrollTo(getTargetedElement(instance.$el));
8883        }
8884      }
8885    }
8886
8887    const clsInView = "hk-scrollspy-inview";
8888    var scrollspy = {
8889      args: "cls",
8890      props: {
8891        cls: String,
8892        target: String,
8893        hidden: Boolean,
8894        margin: String,
8895        repeat: Boolean,
8896        delay: Number
8897      },
8898      data: () => ({
8899        cls: "",
8900        target: false,
8901        hidden: true,
8902        margin: "-1px",
8903        repeat: false,
8904        delay: 0
8905      }),
8906      computed: {
8907        elements: ({ target }, $el) => target ? $$(target, $el) : [$el]
8908      },
8909      watch: {
8910        elements(elements) {
8911          if (this.hidden) {
8912            css(filter$1(elements, `:not(.${clsInView})`), "opacity", 0);
8913          }
8914        }
8915      },
8916      connected() {
8917        this.elementData = /* @__PURE__ */ new Map();
8918      },
8919      disconnected() {
8920        for (const [el, state] of this.elementData.entries()) {
8921          removeClass(el, clsInView, (state == null ? void 0 : state.cls) || "");
8922        }
8923        delete this.elementData;
8924      },
8925      observe: intersection({
8926        target: ({ elements }) => elements,
8927        handler(records) {
8928          const elements = this.elementData;
8929          for (const { target: el, isIntersecting } of records) {
8930            if (!elements.has(el)) {
8931              elements.set(el, {
8932                cls: data(el, "hk-scrollspy-class") || this.cls
8933              });
8934            }
8935            const state = elements.get(el);
8936            if (!this.repeat && state.show) {
8937              continue;
8938            }
8939            state.show = isIntersecting;
8940          }
8941          this.$emit();
8942        },
8943        options: ({ margin }) => ({ rootMargin: margin }),
8944        args: { intersecting: false }
8945      }),
8946      update: [
8947        {
8948          write(data) {
8949            for (const [el, state] of this.elementData.entries()) {
8950              if (state.show && !state.inview && !state.queued) {
8951                state.queued = true;
8952                data.promise = (data.promise || Promise.resolve()).then(() => new Promise((resolve) => setTimeout(resolve, this.delay))).then(() => {
8953                  this.toggle(el, true);
8954                  setTimeout(() => {
8955                    state.queued = false;
vendor: 4,758 bytes, lines 8956-9107
8956                    this.$emit();
8957                  }, 300);
8958                });
8959              } else if (!state.show && state.inview && !state.queued && this.repeat) {
8960                this.toggle(el, false);
8961              }
8962            }
8963          }
8964        }
8965      ],
8966      methods: {
8967        toggle(el, inview) {
8968          var _a, _b;
8969          const state = (_a = this.elementData) == null ? void 0 : _a.get(el);
8970          if (!state) {
8971            return;
8972          }
8973          (_b = state.off) == null ? void 0 : _b.call(state);
8974          css(el, "opacity", !inview && this.hidden ? 0 : "");
8975          toggleClass(el, clsInView, inview);
8976          toggleClass(el, state.cls);
8977          let match;
8978          if (match = state.cls.match(/\bhk-animation-[\w-]+/g)) {
8979            const removeAnimationClasses = () => removeClass(el, match);
8980            if (inview) {
8981              state.off = once(el, "animationcancel animationend", removeAnimationClasses, {
8982                self: true
8983              });
8984            } else {
8985              removeAnimationClasses();
8986            }
8987          }
8988          trigger(el, inview ? "inview" : "outview");
8989          state.inview = inview;
8990        }
8991      }
8992    };
8993
8994    var scrollspyNav = {
8995      props: {
8996        cls: String,
8997        closest: Boolean,
8998        scroll: Boolean,
8999        target: String,
9000        offset: Number
9001      },
9002      data: {
9003        cls: "hk-active",
9004        closest: false,
9005        scroll: false,
9006        target: 'a[href]:not([role="button"])',
9007        offset: 0
9008      },
9009      computed: {
9010        links: ({ target }, $el) => $$(target, $el).filter((el) => isSameSiteAnchor(el)),
9011        elements({ closest }) {
9012          return this.links.map((el) => el.closest(closest || "*"));
9013        }
9014      },
9015      watch: {
9016        links(links) {
9017          if (this.scroll) {
9018            this.$create("scroll", links, { offset: this.offset });
9019          }
9020        }
9021      },
9022      observe: [intersection(), scroll$1()],
9023      update: [
9024        {
9025          read() {
9026            const targets = this.links.map((el) => getTargetedElement(el)).filter(Boolean);
9027            const { length } = targets;
9028            if (!length || !isVisible(this.$el)) {
9029              return false;
9030            }
9031            const scrollElement = scrollParent(targets, true);
9032            const { scrollTop, scrollHeight } = scrollElement;
9033            const viewport = offsetViewport(scrollElement);
9034            const max = scrollHeight - viewport.height;
9035            let active = false;
9036            if (scrollTop >= max) {
9037              active = length - 1;
9038            } else {
9039              const offsetBy = this.offset + dimensions$1(getCoveringElement()).height + viewport.height * 0.1;
9040              for (let i = 0; i < targets.length; i++) {
9041                if (offset(targets[i]).top - viewport.top - offsetBy > 0) {
9042                  break;
9043                }
9044                active = +i;
9045              }
9046            }
9047            return { active };
9048          },
9049          write({ active }) {
9050            const changed = active !== false && !hasClass(this.elements[active], this.cls);
9051            this.links.forEach((el) => el.blur());
9052            for (let i = 0; i < this.elements.length; i++) {
9053              toggleClass(this.elements[i], this.cls, +i === active);
9054            }
9055            if (changed) {
9056              trigger(this.$el, "active", [active, this.elements[active]]);
9057            }
9058          },
9059          events: ["scroll", "resize"]
9060        }
9061      ]
9062    };
9063
9064    var sticky = {
9065      mixins: [Class, Media],
9066      props: {
9067        position: String,
9068        top: null,
9069        bottom: null,
9070        start: null,
9071        end: null,
9072        offset: String,
9073        overflowFlip: Boolean,
9074        animation: String,
9075        clsActive: String,
9076        clsInactive: String,
9077        clsFixed: String,
9078        clsBelow: String,
9079        selTarget: String,
9080        showOnUp: Boolean,
9081        targetOffset: Number
9082      },
9083      data: {
9084        position: "top",
9085        top: false,
9086        bottom: false,
9087        start: false,
9088        end: false,
9089        offset: 0,
9090        overflowFlip: false,
9091        animation: "",
9092        clsActive: "hk-active",
9093        clsInactive: "",
9094        clsFixed: "hk-sticky-fixed",
9095        clsBelow: "hk-sticky-below",
9096        selTarget: "",
9097        showOnUp: false,
9098        targetOffset: false
9099      },
9100      computed: {
9101        target: ({ selTarget }, $el) => selTarget && $(selTarget, $el) || $el
9102      },
9103      connected() {
9104        this.start = coerce(this.start || this.top);
9105        this.end = coerce(this.end || this.bottom);
9106        this.placeholder = $("+ .hk-sticky-placeholder", this.$el) || $('<div class="hk-sticky-placeholder"></div>');
9107        this.isFixed = false;
vendor: 8,466 bytes, lines 9108-9326
9108        this.setActive(false);
9109      },
9110      beforeDisconnect() {
9111        if (this.isFixed) {
9112          this.hide();
9113          removeClass(this.target, this.clsInactive);
9114        }
9115        reset(this.$el);
9116        remove$1(this.placeholder);
9117        this.placeholder = null;
9118      },
9119      observe: [
9120        viewport(),
9121        scroll$1({ target: () => document.scrollingElement }),
9122        resize({
9123          target: ({ $el }) => [$el, getVisibleParent($el), document.scrollingElement],
9124          handler(entries) {
9125            this.$emit(
9126              this._data.resized && entries.some(({ target }) => target === getVisibleParent(this.$el)) ? "update" : "resize"
9127            );
9128            this._data.resized = true;
9129          }
9130        })
9131      ],
9132      events: [
9133        {
9134          name: "load hashchange popstate",
9135          el: () => window,
9136          filter: ({ targetOffset }) => targetOffset !== false,
9137          handler() {
9138            const { scrollingElement } = document;
9139            if (!location.hash || scrollingElement.scrollTop === 0) {
9140              return;
9141            }
9142            setTimeout(() => {
9143              const targetOffset = offset($(location.hash));
9144              const elOffset = offset(this.$el);
9145              if (this.isFixed && intersectRect(targetOffset, elOffset)) {
9146                scrollingElement.scrollTop = Math.ceil(
9147                  targetOffset.top - elOffset.height - toPx(this.targetOffset, "height", this.placeholder) - toPx(this.offset, "height", this.placeholder)
9148                );
9149              }
9150            });
9151          }
9152        }
9153      ],
9154      update: [
9155        {
9156          read({ height: height$1, width, margin, sticky }, types) {
9157            this.inactive = !this.matchMedia || !isVisible(this.$el) || !this.$el.offsetHeight;
9158            if (this.inactive) {
9159              return;
9160            }
9161            const dynamicViewport = height(window);
9162            const maxScrollHeight = Math.max(
9163              0,
9164              document.scrollingElement.scrollHeight - dynamicViewport
9165            );
9166            if (!maxScrollHeight) {
9167              this.inactive = true;
9168              return;
9169            }
9170            const hide = this.isFixed && types.has("update");
9171            if (hide) {
9172              preventTransition(this.target);
9173              this.hide();
9174            }
9175            if (!this.active) {
9176              ({ height: height$1, width } = dimensions$1(this.$el));
9177              margin = css(this.$el, "margin");
9178            }
9179            if (hide) {
9180              this.show();
9181            }
9182            const viewport2 = toPx("100vh", "height");
9183            let position = this.position;
9184            if (this.overflowFlip && height$1 > viewport2) {
9185              position = position === "top" ? "bottom" : "top";
9186            }
9187            const referenceElement = this.isFixed ? this.placeholder : this.$el;
9188            let offset$1 = toPx(this.offset, "height", sticky ? this.$el : referenceElement);
9189            if (position === "bottom" && (height$1 < dynamicViewport || this.overflowFlip)) {
9190              offset$1 += dynamicViewport - height$1;
9191            }
9192            const overflow = this.overflowFlip ? 0 : Math.max(0, height$1 + offset$1 - viewport2);
9193            const topOffset = offset(referenceElement).top - // offset possible `transform: translateY` animation 'hk-animation-slide-top' while hiding
9194            new DOMMatrix(css(referenceElement, "transform")).m42;
9195            const elHeight = dimensions$1(this.$el).height;
9196            const start = (this.start === false ? topOffset : parseProp(this.start, this.$el, topOffset)) - offset$1;
9197            const end = this.end === false ? maxScrollHeight : Math.min(
9198              maxScrollHeight,
9199              parseProp(this.end, this.$el, topOffset + height$1, true) - elHeight - offset$1 + overflow
9200            );
9201            sticky = !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
9202              maxScrollHeight,
9203              parseProp(true, this.$el, 0, true) - elHeight - offset$1 + overflow
9204            ) && css(getVisibleParent(this.$el), "overflowY") !== "hidden";
9205            return {
9206              start,
9207              end,
9208              offset: offset$1,
9209              overflow,
9210              height: height$1,
9211              elHeight,
9212              width,
9213              margin,
9214              top: offsetPosition(referenceElement)[0],
9215              sticky,
9216              viewport: viewport2,
9217              maxScrollHeight
9218            };
9219          },
9220          write({ height, width, margin, offset, sticky }) {
9221            if (this.inactive || sticky || !this.isFixed) {
9222              reset(this.$el);
9223            }
9224            if (this.inactive) {
9225              return;
9226            }
9227            if (sticky) {
9228              height = width = margin = 0;
9229              css(this.$el, { position: "sticky", top: offset });
9230            }
9231            const { placeholder } = this;
9232            css(placeholder, { height, width, margin });
9233            if (parent(placeholder) !== parent(this.$el) || sticky ^ index(placeholder) < index(this.$el)) {
9234              (sticky ? before : after)(this.$el, placeholder);
9235              placeholder.hidden = true;
9236            }
9237          },
9238          events: ["resize"]
9239        },
9240        {
9241          read({
9242            scroll: prevScroll = 0,
9243            dir: prevDir = "down",
9244            overflow,
9245            overflowScroll = 0,
9246            start,
9247            end,
9248            elHeight,
9249            height,
9250            sticky,
9251            maxScrollHeight
9252          }) {
9253            const scroll2 = Math.min(document.scrollingElement.scrollTop, maxScrollHeight);
9254            const dir = prevScroll <= scroll2 ? "down" : "up";
9255            const referenceElement = this.isFixed ? this.placeholder : this.$el;
9256            return {
9257              dir,
9258              prevDir,
9259              scroll: scroll2,
9260              prevScroll,
9261              below: scroll2 > offset(referenceElement).top + (sticky ? Math.min(height, elHeight) : height),
9262              offsetParentTop: offset(referenceElement.offsetParent).top,
9263              overflowScroll: clamp(
9264                overflowScroll + clamp(scroll2, start, end) - clamp(prevScroll, start, end),
9265                0,
9266                overflow
9267              )
9268            };
9269          },
9270          write(data, types) {
9271            const isScrollUpdate = types.has("scroll");
9272            const {
9273              initTimestamp = 0,
9274              dir,
9275              prevDir,
9276              scroll: scroll2,
9277              prevScroll = 0,
9278              top,
9279              start,
9280              below
9281            } = data;
9282            if (scroll2 < 0 || scroll2 === prevScroll && isScrollUpdate || this.showOnUp && !isScrollUpdate && !this.isFixed) {
9283              return;
9284            }
9285            const now = Date.now();
9286            if (now - initTimestamp > 300 || dir !== prevDir) {
9287              data.initScroll = scroll2;
9288              data.initTimestamp = now;
9289            }
9290            if (this.showOnUp && !this.isFixed && Math.abs(data.initScroll - scroll2) <= 30 && Math.abs(prevScroll - scroll2) <= 10) {
9291              return;
9292            }
9293            if (this.inactive || scroll2 < start || this.showOnUp && (scroll2 <= start || dir === "down" && isScrollUpdate || dir === "up" && !this.isFixed && !below)) {
9294              if (!this.isFixed) {
9295                if (Animation.inProgress(this.$el) && top > scroll2) {
9296                  Animation.cancel(this.$el);
9297                  this.hide();
9298                }
9299                return;
9300              }
9301              if (this.animation && below) {
9302                if (hasClass(this.$el, "hk-animation-leave")) {
9303                  return;
9304                }
9305                Animation.out(this.$el, this.animation).then(() => this.hide(), noop);
9306              } else {
9307                this.hide();
9308              }
9309            } else if (this.isFixed) {
9310              this.update();
9311            } else if (this.animation && below) {
9312              this.show();
9313              Animation.in(this.$el, this.animation).catch(noop);
9314            } else {
9315              preventTransition(this.target);
9316              this.show();
9317            }
9318          },
9319          events: ["resize", "resizeViewport", "scroll"]
9320        }
9321      ],
9322      methods: {
9323        show() {
9324          this.isFixed = true;
9325          this.update();
9326          this.placeholder.hidden = false;
vendor: 10,682 bytes, lines 9327-9655
9327        },
9328        hide() {
9329          const { offset, sticky } = this._data;
9330          this.setActive(false);
9331          removeClass(this.$el, this.clsFixed, this.clsBelow);
9332          if (sticky) {
9333            css(this.$el, "top", offset);
9334          } else {
9335            css(this.$el, {
9336              position: "",
9337              top: "",
9338              width: "",
9339              marginTop: ""
9340            });
9341          }
9342          this.placeholder.hidden = true;
9343          this.isFixed = false;
9344        },
9345        update() {
9346          let {
9347            width,
9348            scroll: scroll2 = 0,
9349            overflow,
9350            overflowScroll = 0,
9351            start,
9352            end,
9353            offset,
9354            offsetParentTop,
9355            sticky,
9356            below
9357          } = this._data;
9358          const active = start !== 0 || scroll2 > start;
9359          if (!sticky) {
9360            let position = "fixed";
9361            if (scroll2 > end) {
9362              offset += end - offsetParentTop + overflowScroll - overflow;
9363              position = "absolute";
9364            }
9365            css(this.$el, { position, width, marginTop: 0 }, "important");
9366          }
9367          css(this.$el, "top", offset - overflowScroll);
9368          this.setActive(active);
9369          toggleClass(this.$el, this.clsBelow, below);
9370          addClass(this.$el, this.clsFixed);
9371        },
9372        setActive(active) {
9373          const prev = this.active;
9374          this.active = active;
9375          if (active) {
9376            replaceClass(this.target, this.clsInactive, this.clsActive);
9377            prev !== active && trigger(this.$el, "active");
9378          } else {
9379            replaceClass(this.target, this.clsActive, this.clsInactive);
9380            if (prev !== active) {
9381              preventTransition(this.target);
9382              trigger(this.$el, "inactive");
9383            }
9384          }
9385        }
9386      }
9387    };
9388    function parseProp(value, el, propOffset, padding) {
9389      if (!value) {
9390        return 0;
9391      }
9392      if (isNumeric(value) || isString(value) && value.match(/^-?\d/)) {
9393        return propOffset + toPx(value, "height", el, true);
9394      } else {
9395        const refElement = value === true ? getVisibleParent(el) : query(value, el);
9396        return offset(refElement).bottom - (padding && (refElement == null ? void 0 : refElement.contains(el)) ? toFloat(css(refElement, "paddingBottom")) + toFloat(css(refElement, "borderBottomWidth")) : 0);
9397      }
9398    }
9399    function coerce(value) {
9400      if (value === "true") {
9401        return true;
9402      } else if (value === "false") {
9403        return false;
9404      }
9405      return value;
9406    }
9407    function reset(el) {
9408      css(el, { position: "", top: "", marginTop: "", width: "" });
9409    }
9410    const clsTransitionDisable = "hk-transition-disable";
9411    function preventTransition(element) {
9412      if (!hasClass(element, clsTransitionDisable)) {
9413        addClass(element, clsTransitionDisable);
9414        requestAnimationFrame(() => removeClass(element, clsTransitionDisable));
9415      }
9416    }
9417    function getVisibleParent(element) {
9418      while (element = parent(element)) {
9419        if (isVisible(element)) {
9420          return element;
9421        }
9422      }
9423    }
9424
9425    var svg = {
9426      mixins: [Svg],
9427      args: "src",
9428      props: {
9429        src: String,
9430        icon: String,
9431        attributes: "list",
9432        strokeAnimation: Boolean
9433      },
9434      data: {
9435        strokeAnimation: false
9436      },
9437      observe: [
9438        mutation({
9439          async handler() {
9440            const svg = await this.svg;
9441            if (svg) {
9442              applyAttributes.call(this, svg);
9443            }
9444          },
9445          options: {
9446            attributes: true,
9447            attributeFilter: ["id", "class", "style"]
9448          }
9449        })
9450      ],
9451      async connected() {
9452        if (includes(this.src, "#")) {
9453          [this.src, this.icon] = this.src.split("#", 2);
9454        }
9455        const svg = await this.svg;
9456        if (svg) {
9457          applyAttributes.call(this, svg);
9458          if (this.strokeAnimation) {
9459            applyAnimation(svg);
9460          }
9461        }
9462      },
9463      methods: {
9464        async getSvg() {
9465          if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
9466            await new Promise((resolve) => once(this.$el, "load", resolve));
9467          }
9468          return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
9469        }
9470      }
9471    };
9472    function applyAttributes(el) {
9473      const { $el } = this;
9474      addClass(el, attr($el, "class"), "hk-svg");
9475      for (let i = 0; i < $el.style.length; i++) {
9476        const prop = $el.style[i];
9477        css(el, prop, css($el, prop));
9478      }
9479      for (const attribute in this.attributes) {
9480        const [prop, value] = this.attributes[attribute].split(":", 2);
9481        attr(el, prop, value);
9482      }
9483      if (!this.$el.id) {
9484        removeAttr(el, "id");
9485      }
9486    }
9487    const loadSVG = memoize(async (src) => {
9488      if (src) {
9489        if (startsWith(src, "data:")) {
9490          return decodeURIComponent(src.split(",", 2)[1]);
9491        } else {
9492          const response = await fetch(src);
9493          if (response.headers.get("Content-Type") === "image/svg+xml") {
9494            return response.text();
9495          }
9496        }
9497      }
9498      return Promise.reject();
9499    });
9500    function applyAnimation(el) {
9501      const length = getMaxPathLength(el);
9502      if (length) {
9503        css(el, "--hk-animation-stroke", length);
9504      }
9505    }
9506
9507    const selDisabled = ".hk-disabled *, .hk-disabled, [disabled]";
9508    var Switcher = {
9509      mixins: [Togglable],
9510      args: "connect",
9511      props: {
9512        connect: String,
9513        toggle: String,
9514        itemNav: String,
9515        active: Number,
9516        followFocus: Boolean,
9517        swiping: Boolean
9518      },
9519      data: {
9520        connect: "~.hk-switcher",
9521        toggle: "> * > :first-child",
9522        itemNav: false,
9523        active: 0,
9524        cls: "hk-active",
9525        attrItem: "hk-switcher-item",
9526        selVertical: ".hk-nav",
9527        followFocus: false,
9528        swiping: true
9529      },
9530      computed: {
9531        connects: {
9532          get: ({ connect }, $el) => queryAll(connect, $el),
9533          observe: ({ connect }) => connect
9534        },
9535        connectChildren() {
9536          return this.connects.map((el) => children(el)).flat();
9537        },
9538        toggles: ({ toggle }, $el) => $$(toggle, $el),
9539        children(_, $el) {
9540          return children($el).filter(
9541            (child) => this.toggles.some((toggle) => child.contains(toggle))
9542          );
9543        }
9544      },
9545      watch: {
9546        connects(connects) {
9547          if (this.swiping) {
9548            css(connects, "touchAction", "pan-y pinch-zoom");
9549          }
9550          this.$emit();
9551        },
9552        connectChildren() {
9553          let index = Math.max(0, this.index());
9554          for (const el of this.connects) {
9555            children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
9556          }
9557          this.$emit();
9558        },
9559        toggles(toggles) {
9560          this.$emit();
9561          const active = this.index();
9562          this.show(~active ? active : toggles[this.active] || toggles[0]);
9563        }
9564      },
9565      connected() {
9566        attr(this.$el, "role", "tablist");
9567      },
9568      observe: [
9569        lazyload({ targets: ({ connectChildren }) => connectChildren }),
9570        swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping })
9571      ],
9572      events: [
9573        {
9574          name: "click keydown",
9575          delegate: ({ toggle }) => toggle,
9576          handler(e) {
9577            if (!matches(e.current, selDisabled) && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
9578              e.preventDefault();
9579              this.show(e.current);
9580            }
9581          }
9582        },
9583        {
9584          name: "keydown",
9585          delegate: ({ toggle }) => toggle,
9586          handler(e) {
9587            const { current, keyCode } = e;
9588            const isVertical = matches(this.$el, this.selVertical);
9589            let i = keyCode === keyMap.HOME ? 0 : keyCode === keyMap.END ? "last" : keyCode === keyMap.LEFT && !isVertical || keyCode === keyMap.UP && isVertical ? "previous" : keyCode === keyMap.RIGHT && !isVertical || keyCode === keyMap.DOWN && isVertical ? "next" : -1;
9590            if (~i) {
9591              e.preventDefault();
9592              const toggles = this.toggles.filter((el) => !matches(el, selDisabled));
9593              const next = toggles[getIndex(i, toggles, toggles.indexOf(current))];
9594              next.focus();
9595              if (this.followFocus) {
9596                this.show(next);
9597              }
9598            }
9599          }
9600        },
9601        {
9602          name: "click",
9603          el: ({ $el, connects, itemNav }) => connects.concat(itemNav ? queryAll(itemNav, $el) : []),
9604          delegate: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
9605          handler(e) {
9606            if (e.target.closest("a,button")) {
9607              e.preventDefault();
9608              this.show(data(e.current, this.attrItem));
9609            }
9610          }
9611        },
9612        {
9613          name: "swipeRight swipeLeft",
9614          filter: ({ swiping }) => swiping,
9615          el: ({ connects }) => connects,
9616          handler({ type }) {
9617            this.show(endsWith(type, "Left") ? "next" : "previous");
9618          }
9619        }
9620      ],
9621      update() {
9622        var _a;
9623        for (const el of this.connects) {
9624          if (isTag(el, "ul")) {
9625            attr(el, "role", "presentation");
9626          }
9627        }
9628        attr(children(this.$el), "role", "presentation");
9629        for (const index in this.toggles) {
9630          const toggle = this.toggles[index];
9631          const item = (_a = this.connects[0]) == null ? void 0 : _a.children[index];
9632          attr(toggle, "role", "tab");
9633          if (!item) {
9634            continue;
9635          }
9636          toggle.id = generateId(this, toggle);
9637          item.id = generateId(this, item);
9638          attr(toggle, "aria-controls", item.id);
9639          attr(item, { role: "tabpanel", "aria-labelledby": toggle.id });
9640        }
9641        attr(this.$el, "aria-orientation", matches(this.$el, this.selVertical) ? "vertical" : null);
9642      },
9643      methods: {
9644        index() {
9645          return findIndex(this.children, (el) => hasClass(el, this.cls));
9646        },
9647        show(item) {
9648          const toggles = this.toggles.filter((el) => !matches(el, selDisabled));
9649          const prev = this.index();
9650          const next = getIndex(
9651            !isNode(item) || includes(toggles, item) ? item : 0,
9652            toggles,
9653            getIndex(this.toggles[prev], toggles)
9654          );
9655          const active = getIndex(toggles[next], this.toggles);
vendor: 1,114 bytes, lines 9656-9688
9656          this.children.forEach((child, i) => {
9657            toggleClass(child, this.cls, active === i);
9658            attr(this.toggles[i], {
9659              "aria-selected": active === i,
9660              tabindex: active === i ? null : -1
9661            });
9662          });
9663          const animate = prev >= 0 && prev !== next;
9664          this.connects.forEach(async ({ children: children2 }) => {
9665            const actives = toArray(children2).filter(
9666              (child, i) => i !== active && hasClass(child, this.cls)
9667            );
9668            if (await this.toggleElement(actives, false, animate)) {
9669              await this.toggleElement(children2[active], true, animate);
9670            }
9671          });
9672        }
9673      }
9674    };
9675
9676    var tab = {
9677      mixins: [Class],
9678      extends: Switcher,
9679      props: {
9680        media: Boolean
9681      },
9682      data: {
9683        media: 960,
9684        attrItem: "hk-tab-item",
9685        selVertical: ".hk-tab-left,.hk-tab-right"
9686      },
9687      connected() {
9688        const cls = hasClass(this.$el, "hk-tab-left") ? "hk-tab-left" : hasClass(this.$el, "hk-tab-right") ? "hk-tab-right" : false;
vendor: 5,644 bytes, lines 9689-9862
9689        if (cls) {
9690          this.$create("toggle", this.$el, { cls, mode: "media", media: this.media });
9691        }
9692      }
9693    };
9694
9695    const KEY_SPACE = 32;
9696    var toggle = {
9697      mixins: [Media, Togglable],
9698      args: "target",
9699      props: {
9700        href: String,
9701        target: null,
9702        mode: "list",
9703        queued: Boolean
9704      },
9705      data: {
9706        href: false,
9707        target: false,
9708        mode: "click",
9709        queued: true
9710      },
9711      computed: {
9712        target: {
9713          get: ({ target }, $el) => {
9714            target = queryAll(target || $el.hash, $el);
9715            return target.length ? target : [$el];
9716          },
9717          observe: ({ target }) => target
9718        }
9719      },
9720      connected() {
9721        if (!includes(this.mode, "media")) {
9722          if (!isFocusable(this.$el)) {
9723            attr(this.$el, "tabindex", "0");
9724          }
9725          if (!this.cls && isTag(this.$el, "a")) {
9726            attr(this.$el, "role", "button");
9727          }
9728        }
9729      },
9730      observe: lazyload({ targets: ({ target }) => target }),
9731      events: [
9732        {
9733          name: pointerDown$1,
9734          filter: ({ mode }) => includes(mode, "hover"),
9735          handler(e) {
9736            this._preventClick = null;
9737            if (!isTouch(e) || isBoolean(this._showState) || this.$el.disabled) {
9738              return;
9739            }
9740            trigger(this.$el, "focus");
9741            once(
9742              document,
9743              pointerDown$1,
9744              () => trigger(this.$el, "blur"),
9745              true,
9746              (e2) => !this.$el.contains(e2.target)
9747            );
9748            if (includes(this.mode, "click")) {
9749              this._preventClick = true;
9750            }
9751          }
9752        },
9753        {
9754          // mouseenter mouseleave are added because of Firefox bug,
9755          // where pointerleave is triggered immediately after pointerenter on scroll
9756          name: `mouseenter mouseleave ${pointerEnter} ${pointerLeave} focus blur`,
9757          filter: ({ mode }) => includes(mode, "hover"),
9758          handler(e) {
9759            if (isTouch(e) || this.$el.disabled || document.readyState === "loading") {
9760              return;
9761            }
9762            const show = includes(["mouseenter", pointerEnter, "focus"], e.type);
9763            const expanded = this.isToggled(this.target);
9764            if (!show && (!isBoolean(this._showState) || e.type !== "blur" && matches(this.$el, ":focus") || e.type === "blur" && matches(this.$el, ":hover"))) {
9765              if (expanded === this._showState) {
9766                this._showState = null;
9767              }
9768              return;
9769            }
9770            if (show && isBoolean(this._showState) && expanded !== this._showState) {
9771              return;
9772            }
9773            this._showState = show ? expanded : null;
9774            this.toggle(`toggle${show ? "show" : "hide"}`);
9775          }
9776        },
9777        {
9778          name: "keydown",
9779          filter: ({ $el, mode }) => includes(mode, "click") && !isTag($el, "input"),
9780          handler(e) {
9781            if (e.keyCode === KEY_SPACE) {
9782              e.preventDefault();
9783              this.$el.click();
9784            }
9785          }
9786        },
9787        {
9788          name: "click",
9789          filter: ({ mode }) => ["click", "hover"].some((m) => includes(mode, m)),
9790          handler(e) {
9791            let link;
9792            if (this._preventClick || e.target.closest('a[href="#"], a[href=""]') || (link = e.target.closest("a[href]")) && (!this.isToggled(this.target) || link.hash && matches(this.target, link.hash))) {
9793              e.preventDefault();
9794            }
9795            if (!this._preventClick && includes(this.mode, "click")) {
9796              this.toggle();
9797            }
9798          }
9799        },
9800        {
9801          name: "mediachange",
9802          filter: ({ mode }) => includes(mode, "media"),
9803          el: ({ target }) => target,
9804          handler(e, mediaObj) {
9805            if (mediaObj.matches ^ this.isToggled(this.target)) {
9806              this.toggle();
9807            }
9808          }
9809        }
9810      ],
9811      methods: {
9812        async toggle(type) {
9813          if (!trigger(this.target, type || "toggle", [this])) {
9814            return;
9815          }
9816          if (hasAttr(this.$el, "aria-expanded")) {
9817            attr(this.$el, "aria-expanded", !this.isToggled(this.target));
9818          }
9819          if (!this.queued) {
9820            return this.toggleElement(this.target);
9821          }
9822          const leaving = this.target.filter((el) => hasClass(el, this.clsLeave));
9823          if (leaving.length) {
9824            for (const el of this.target) {
9825              const isLeaving = includes(leaving, el);
9826              this.toggleElement(el, isLeaving, isLeaving);
9827            }
9828            return;
9829          }
9830          const toggled = this.target.filter(this.isToggled);
9831          if (await this.toggleElement(toggled, false)) {
9832            await this.toggleElement(
9833              this.target.filter((el) => !includes(toggled, el)),
9834              true
9835            );
9836          }
9837        }
9838      }
9839    };
9840
9841    var components = /*#__PURE__*/Object.freeze({
9842        __proto__: null,
9843        Accordion: Accordion,
9844        Alert: alert,
9845        Close: Close,
9846        Cover: cover,
9847        Drop: drop,
9848        DropParentIcon: IconComponent,
9849        Dropdown: drop,
9850        Dropnav: Dropnav,
9851        FormCustom: formCustom,
9852        Grid: grid,
9853        HeightMatch: heightMatch,
9854        HeightPlaceholder: heightPlaceholder,
9855        HeightViewport: heightViewport,
9856        Icon: Icon,
9857        Img: img,
9858        Inverse: inverse,
9859        Leader: leader,
9860        Margin: Margin,
9861        Marker: Marker,
9862        Modal: modal,
9863        Nav: nav,
9864        NavParentIcon: NavParentIcon,
9865        Navbar: navbar,
9866        NavbarParentIcon: IconComponent,
9867        NavbarToggleIcon: NavbarToggleIcon,
9868        Offcanvas: offcanvas,
9869        OverflowAuto: overflowAuto,
9870        OverlayIcon: IconComponent,
9871        PaginationNext: PaginationNext,
9872        PaginationPrevious: PaginationPrevious,
9873        Responsive: responsive,
9874        Scroll: scroll,
9875        Scrollspy: scrollspy,
9876        ScrollspyNav: scrollspyNav,
9877        SearchIcon: Search,
9878        SlidenavNext: Slidenav,
9879        SlidenavPrevious: Slidenav,
9880        Spinner: Spinner,
9881        Sticky: sticky,
9882        Svg: svg,
9883        Switcher: Switcher,
9884        Tab: tab,
9885        Toggle: toggle,
9886        Totop: Totop,
9887        Video: Video
9888    });
9889
9890    each(components, (component, name) => App.component(name, component));
9891    boot(App);
9892
9893    each(components$1, (component, name) => App.component(name, component));
9894
9895    return App;
9896
9897}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.