import { openBlock as p, createElementBlock as R, createElementVNode as le, reactive as Mt, computed as L, unref as $, ref as H, watch as ot, toRef as It, onMounted as Ge, nextTick as st, defineComponent as qe, renderSlot as K, createCommentVNode as P, normalizeClass as he, withKeys as de, createBlock as ge, withModifiers as He, normalizeStyle as it, normalizeProps as Be, mergeProps as Ce, Fragment as ve, createTextVNode as Qe, toDisplayString as Ye, renderList as Ne, createVNode as kt, Transition as At, withCtx as fe, onBeforeUpdate as ia, onUnmounted as pn, withDirectives as Ut, vShow as Wt, createSlots as We, guardReactiveProps as Ze, resolveDynamicComponent as Kn, useSlots as kn, getCurrentScope as ua, onScopeDispose as da, isRef as An, Teleport as ca } from "vue";
import { isBefore as Ot, isEqual as mt, isAfter as Bt, set as Re, setHours as jn, setMinutes as Gn, setSeconds as Zn, setMilliseconds as wn, getHours as at, getMinutes as lt, getSeconds as $t, parse as cn, isValid as Ht, isDate as fa, format as pt, getMonth as we, getDay as va, getYear as De, parseISO as ma, startOfWeek as Tn, endOfWeek as ya, setMonth as Ct, setYear as rt, addDays as yt, add as qn, addMonths as gt, subMonths as Nt, getWeek as ga, getISOWeek as ha, differenceInCalendarDays as pa, eachDayOfInterval as Sn, addYears as ka, subYears as wa, sub as ba } from "date-fns";
function Kt() {
  return p(), R(
    "svg",
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 32 32",
      fill: "currentColor",
      "aria-hidden": "true",
      class: "dp__icon"
    },
    [
      le("path", {
        d: "M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"
      }),
      le("path", {
        d: "M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"
      }),
      le("path", {
        d: "M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"
      }),
      le("path", {
        d: "M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"
      })
    ]
  );
}
function Da() {
  return p(), R(
    "svg",
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 32 32",
      fill: "currentColor",
      "aria-hidden": "true",
      class: "dp__icon"
    },
    [
      le("path", {
        d: "M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"
      }),
      le("path", {
        d: "M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"
      })
    ]
  );
}
function Pn() {
  return p(), R(
    "svg",
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 32 32",
      fill: "currentColor",
      "aria-hidden": "true",
      class: "dp__icon"
    },
    [
      le("path", {
        d: "M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"
      })
    ]
  );
}
function _n() {
  return p(), R(
    "svg",
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 32 32",
      fill: "currentColor",
      "aria-hidden": "true",
      class: "dp__icon"
    },
    [
      le("path", {
        d: "M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"
      })
    ]
  );
}
function Xn() {
  return p(), R(
    "svg",
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 32 32",
      fill: "currentColor",
      "aria-hidden": "true",
      class: "dp__icon"
    },
    [
      le("path", {
        d: "M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"
      }),
      le("path", {
        d: "M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"
      })
    ]
  );
}
function Jn() {
  return p(), R(
    "svg",
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 32 32",
      fill: "currentColor",
      "aria-hidden": "true",
      class: "dp__icon"
    },
    [
      le("path", {
        d: "M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"
      })
    ]
  );
}
function Qn() {
  return p(), R(
    "svg",
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 32 32",
      fill: "currentColor",
      "aria-hidden": "true",
      class: "dp__icon"
    },
    [
      le("path", {
        d: "M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"
      })
    ]
  );
}
const Cn = (e, n, a, t, i) => {
  const v = cn(e, n.slice(0, e.length), /* @__PURE__ */ new Date());
  return Ht(v) && fa(v) ? t || i ? v : Re(v, {
    hours: +a.hours,
    minutes: +(a == null ? void 0 : a.minutes),
    seconds: +(a == null ? void 0 : a.seconds),
    milliseconds: 0
  }) : null;
}, $a = (e, n, a, t, i) => {
  const v = Array.isArray(a) ? a[0] : a;
  if (typeof n == "string")
    return Cn(e, n, v, t, i);
  if (Array.isArray(n)) {
    let m = null;
    for (const T of n)
      if (m = Cn(e, T, v, t, i), m)
        break;
    return m;
  }
  return typeof n == "function" ? n(e) : null;
}, A = (e) => e ? new Date(e) : /* @__PURE__ */ new Date(), Ma = (e, n, a) => {
  if (n) {
    const i = (e.getMonth() + 1).toString().padStart(2, "0"), v = e.getDate().toString().padStart(2, "0"), m = e.getHours().toString().padStart(2, "0"), T = e.getMinutes().toString().padStart(2, "0"), Y = a ? e.getSeconds().toString().padStart(2, "0") : "00";
    return `${e.getFullYear()}-${i}-${v}T${m}:${T}:${Y}.000Z`;
  }
  const t = Date.UTC(
    e.getUTCFullYear(),
    e.getUTCMonth(),
    e.getUTCDate(),
    e.getUTCHours(),
    e.getUTCMinutes(),
    e.getUTCSeconds()
  );
  return new Date(t).toISOString();
}, je = (e) => {
  let n = A(JSON.parse(JSON.stringify(e)));
  return n = jn(n, 0), n = Gn(n, 0), n = Zn(n, 0), n = wn(n, 0), n;
}, Ke = (e, n, a, t) => {
  let i = e ? A(e) : A();
  return (n || n === 0) && (i = jn(i, +n)), (a || a === 0) && (i = Gn(i, +a)), (t || t === 0) && (i = Zn(i, +t)), wn(i, 0);
}, Ve = (e, n) => !e || !n ? !1 : Ot(je(e), je(n)), ke = (e, n) => !e || !n ? !1 : mt(je(e), je(n)), Fe = (e, n) => !e || !n ? !1 : Bt(je(e), je(n)), ea = (e, n, a) => e && e[0] && e[1] ? Fe(a, e[0]) && Ve(a, e[1]) : e && e[0] && n ? Fe(a, e[0]) && Ve(a, n) || Ve(a, e[0]) && Fe(a, n) : !1, Pt = (e) => {
  const n = Re(new Date(e), { date: 1 });
  return je(n);
}, Qt = (e, n, a) => n && (a || a === 0) ? Object.fromEntries(
  ["hours", "minutes", "seconds"].map((t) => t === n ? [t, a] : [t, isNaN(+e[t]) ? void 0 : +e[t]])
) : {
  hours: isNaN(+e.hours) ? void 0 : +e.hours,
  minutes: isNaN(+e.minutes) ? void 0 : +e.minutes,
  seconds: isNaN(+e.seconds) ? void 0 : +e.seconds
}, Lt = (e) => ({
  hours: at(e),
  minutes: lt(e),
  seconds: $t(e)
}), _t = Mt({
  menuFocused: !1,
  shiftKeyInMenu: !1
}), ta = () => {
  const e = (t) => {
    _t.menuFocused = t;
  }, n = (t) => {
    _t.shiftKeyInMenu !== t && (_t.shiftKeyInMenu = t);
  };
  return {
    control: L(() => ({ shiftKeyInMenu: _t.shiftKeyInMenu, menuFocused: _t.menuFocused })),
    setMenuFocused: e,
    setShiftKey: n
  };
};
function bn(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var na = { exports: {} };
(function(e) {
  function n(a) {
    return a && a.__esModule ? a : {
      default: a
    };
  }
  e.exports = n, e.exports.__esModule = !0, e.exports.default = e.exports;
})(na);
var Aa = na.exports, fn = { exports: {} };
(function(e, n) {
  Object.defineProperty(n, "__esModule", {
    value: !0
  }), n.default = a;
  function a(t) {
    if (t === null || t === !0 || t === !1)
      return NaN;
    var i = Number(t);
    return isNaN(i) ? i : i < 0 ? Math.ceil(i) : Math.floor(i);
  }
  e.exports = n.default;
})(fn, fn.exports);
var Ta = fn.exports;
const Sa = /* @__PURE__ */ bn(Ta);
var vn = { exports: {} };
(function(e, n) {
  Object.defineProperty(n, "__esModule", {
    value: !0
  }), n.default = a;
  function a(t) {
    var i = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
    return i.setUTCFullYear(t.getFullYear()), t.getTime() - i.getTime();
  }
  e.exports = n.default;
})(vn, vn.exports);
var Pa = vn.exports;
const Nn = /* @__PURE__ */ bn(Pa);
function _a(e, n) {
  var a = Ia(n);
  return a.formatToParts ? Na(a, e) : Ra(a, e);
}
var Ca = {
  year: 0,
  month: 1,
  day: 2,
  hour: 3,
  minute: 4,
  second: 5
};
function Na(e, n) {
  try {
    for (var a = e.formatToParts(n), t = [], i = 0; i < a.length; i++) {
      var v = Ca[a[i].type];
      v >= 0 && (t[v] = parseInt(a[i].value, 10));
    }
    return t;
  } catch (m) {
    if (m instanceof RangeError)
      return [NaN];
    throw m;
  }
}
function Ra(e, n) {
  var a = e.format(n).replace(/\u200E/g, ""), t = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(a);
  return [t[3], t[1], t[2], t[4], t[5], t[6]];
}
var en = {};
function Ia(e) {
  if (!en[e]) {
    var n = new Intl.DateTimeFormat("en-US", {
      hour12: !1,
      timeZone: "America/New_York",
      year: "numeric",
      month: "numeric",
      day: "2-digit",
      hour: "2-digit",
      minute: "2-digit",
      second: "2-digit"
    }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), a = n === "06/25/2014, 00:00:00" || n === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
    en[e] = a ? new Intl.DateTimeFormat("en-US", {
      hour12: !1,
      timeZone: e,
      year: "numeric",
      month: "numeric",
      day: "2-digit",
      hour: "2-digit",
      minute: "2-digit",
      second: "2-digit"
    }) : new Intl.DateTimeFormat("en-US", {
      hourCycle: "h23",
      timeZone: e,
      year: "numeric",
      month: "numeric",
      day: "2-digit",
      hour: "2-digit",
      minute: "2-digit",
      second: "2-digit"
    });
  }
  return en[e];
}
function Dn(e, n, a, t, i, v, m) {
  var T = /* @__PURE__ */ new Date(0);
  return T.setUTCFullYear(e, n, a), T.setUTCHours(t, i, v, m), T;
}
var Rn = 36e5, Oa = 6e4, tn = {
  timezone: /([Z+-].*)$/,
  timezoneZ: /^(Z)$/,
  timezoneHH: /^([+-]\d{2})$/,
  timezoneHHMM: /^([+-]\d{2}):?(\d{2})$/
};
function $n(e, n, a) {
  var t, i;
  if (!e || (t = tn.timezoneZ.exec(e), t))
    return 0;
  var v;
  if (t = tn.timezoneHH.exec(e), t)
    return v = parseInt(t[1], 10), In(v) ? -(v * Rn) : NaN;
  if (t = tn.timezoneHHMM.exec(e), t) {
    v = parseInt(t[1], 10);
    var m = parseInt(t[2], 10);
    return In(v, m) ? (i = Math.abs(v) * Rn + m * Oa, v > 0 ? -i : i) : NaN;
  }
  if (Va(e)) {
    n = new Date(n || Date.now());
    var T = a ? n : Ba(n), Y = mn(T, e), _ = a ? Y : Ya(n, Y, e);
    return -_;
  }
  return NaN;
}
function Ba(e) {
  return Dn(
    e.getFullYear(),
    e.getMonth(),
    e.getDate(),
    e.getHours(),
    e.getMinutes(),
    e.getSeconds(),
    e.getMilliseconds()
  );
}
function mn(e, n) {
  var a = _a(e, n), t = Dn(
    a[0],
    a[1] - 1,
    a[2],
    a[3] % 24,
    a[4],
    a[5],
    0
  ).getTime(), i = e.getTime(), v = i % 1e3;
  return i -= v >= 0 ? v : 1e3 + v, t - i;
}
function Ya(e, n, a) {
  var t = e.getTime(), i = t - n, v = mn(new Date(i), a);
  if (n === v)
    return n;
  i -= v - n;
  var m = mn(new Date(i), a);
  return v === m ? v : Math.max(v, m);
}
function In(e, n) {
  return -23 <= e && e <= 23 && (n == null || 0 <= n && n <= 59);
}
var On = {};
function Va(e) {
  if (On[e])
    return !0;
  try {
    return new Intl.DateTimeFormat(void 0, { timeZone: e }), On[e] = !0, !0;
  } catch {
    return !1;
  }
}
var Ea = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;
const aa = Ea;
var nn = 36e5, Bn = 6e4, La = 2, Le = {
  dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
  datePattern: /^([0-9W+-]+)(.*)/,
  plainTime: /:/,
  // year tokens
  YY: /^(\d{2})$/,
  YYY: [
    /^([+-]\d{2})$/,
    // 0 additional digits
    /^([+-]\d{3})$/,
    // 1 additional digit
    /^([+-]\d{4})$/
    // 2 additional digits
  ],
  YYYY: /^(\d{4})/,
  YYYYY: [
    /^([+-]\d{4})/,
    // 0 additional digits
    /^([+-]\d{5})/,
    // 1 additional digit
    /^([+-]\d{6})/
    // 2 additional digits
  ],
  // date tokens
  MM: /^-(\d{2})$/,
  DDD: /^-?(\d{3})$/,
  MMDD: /^-?(\d{2})-?(\d{2})$/,
  Www: /^-?W(\d{2})$/,
  WwwD: /^-?W(\d{2})-?(\d{1})$/,
  HH: /^(\d{2}([.,]\d*)?)$/,
  HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
  HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
  // time zone tokens (to identify the presence of a tz)
  timeZone: aa
};
function yn(e, n) {
  if (arguments.length < 1)
    throw new TypeError("1 argument required, but only " + arguments.length + " present");
  if (e === null)
    return /* @__PURE__ */ new Date(NaN);
  var a = n || {}, t = a.additionalDigits == null ? La : Sa(a.additionalDigits);
  if (t !== 2 && t !== 1 && t !== 0)
    throw new RangeError("additionalDigits must be 0, 1 or 2");
  if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
    return new Date(e.getTime());
  if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]")
    return new Date(e);
  if (!(typeof e == "string" || Object.prototype.toString.call(e) === "[object String]"))
    return /* @__PURE__ */ new Date(NaN);
  var i = Fa(e), v = Ua(i.date, t), m = v.year, T = v.restDateString, Y = Wa(T, m);
  if (isNaN(Y))
    return /* @__PURE__ */ new Date(NaN);
  if (Y) {
    var _ = Y.getTime(), W = 0, C;
    if (i.time && (W = Ha(i.time), isNaN(W)))
      return /* @__PURE__ */ new Date(NaN);
    if (i.timeZone || a.timeZone) {
      if (C = $n(i.timeZone || a.timeZone, new Date(_ + W)), isNaN(C))
        return /* @__PURE__ */ new Date(NaN);
    } else
      C = Nn(new Date(_ + W)), C = Nn(new Date(_ + W + C));
    return new Date(_ + W + C);
  } else
    return /* @__PURE__ */ new Date(NaN);
}
function Fa(e) {
  var n = {}, a = Le.dateTimePattern.exec(e), t;
  if (a ? (n.date = a[1], t = a[3]) : (a = Le.datePattern.exec(e), a ? (n.date = a[1], t = a[2]) : (n.date = null, t = e)), t) {
    var i = Le.timeZone.exec(t);
    i ? (n.time = t.replace(i[1], ""), n.timeZone = i[1].trim()) : n.time = t;
  }
  return n;
}
function Ua(e, n) {
  var a = Le.YYY[n], t = Le.YYYYY[n], i;
  if (i = Le.YYYY.exec(e) || t.exec(e), i) {
    var v = i[1];
    return {
      year: parseInt(v, 10),
      restDateString: e.slice(v.length)
    };
  }
  if (i = Le.YY.exec(e) || a.exec(e), i) {
    var m = i[1];
    return {
      year: parseInt(m, 10) * 100,
      restDateString: e.slice(m.length)
    };
  }
  return {
    year: null
  };
}
function Wa(e, n) {
  if (n === null)
    return null;
  var a, t, i, v;
  if (e.length === 0)
    return t = /* @__PURE__ */ new Date(0), t.setUTCFullYear(n), t;
  if (a = Le.MM.exec(e), a)
    return t = /* @__PURE__ */ new Date(0), i = parseInt(a[1], 10) - 1, Vn(n, i) ? (t.setUTCFullYear(n, i), t) : /* @__PURE__ */ new Date(NaN);
  if (a = Le.DDD.exec(e), a) {
    t = /* @__PURE__ */ new Date(0);
    var m = parseInt(a[1], 10);
    return Ka(n, m) ? (t.setUTCFullYear(n, 0, m), t) : /* @__PURE__ */ new Date(NaN);
  }
  if (a = Le.MMDD.exec(e), a) {
    t = /* @__PURE__ */ new Date(0), i = parseInt(a[1], 10) - 1;
    var T = parseInt(a[2], 10);
    return Vn(n, i, T) ? (t.setUTCFullYear(n, i, T), t) : /* @__PURE__ */ new Date(NaN);
  }
  if (a = Le.Www.exec(e), a)
    return v = parseInt(a[1], 10) - 1, En(n, v) ? Yn(n, v) : /* @__PURE__ */ new Date(NaN);
  if (a = Le.WwwD.exec(e), a) {
    v = parseInt(a[1], 10) - 1;
    var Y = parseInt(a[2], 10) - 1;
    return En(n, v, Y) ? Yn(n, v, Y) : /* @__PURE__ */ new Date(NaN);
  }
  return null;
}
function Ha(e) {
  var n, a, t;
  if (n = Le.HH.exec(e), n)
    return a = parseFloat(n[1].replace(",", ".")), an(a) ? a % 24 * nn : NaN;
  if (n = Le.HHMM.exec(e), n)
    return a = parseInt(n[1], 10), t = parseFloat(n[2].replace(",", ".")), an(a, t) ? a % 24 * nn + t * Bn : NaN;
  if (n = Le.HHMMSS.exec(e), n) {
    a = parseInt(n[1], 10), t = parseInt(n[2], 10);
    var i = parseFloat(n[3].replace(",", "."));
    return an(a, t, i) ? a % 24 * nn + t * Bn + i * 1e3 : NaN;
  }
  return null;
}
function Yn(e, n, a) {
  n = n || 0, a = a || 0;
  var t = /* @__PURE__ */ new Date(0);
  t.setUTCFullYear(e, 0, 4);
  var i = t.getUTCDay() || 7, v = n * 7 + a + 1 - i;
  return t.setUTCDate(t.getUTCDate() + v), t;
}
var xa = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], za = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function la(e) {
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
}
function Vn(e, n, a) {
  if (n < 0 || n > 11)
    return !1;
  if (a != null) {
    if (a < 1)
      return !1;
    var t = la(e);
    if (t && a > za[n] || !t && a > xa[n])
      return !1;
  }
  return !0;
}
function Ka(e, n) {
  if (n < 1)
    return !1;
  var a = la(e);
  return !(a && n > 366 || !a && n > 365);
}
function En(e, n, a) {
  return !(n < 0 || n > 52 || a != null && (a < 0 || a > 6));
}
function an(e, n, a) {
  return !(e != null && (e < 0 || e >= 25) || n != null && (n < 0 || n >= 60) || a != null && (a < 0 || a >= 60));
}
var gn = { exports: {} }, hn = { exports: {} };
(function(e, n) {
  Object.defineProperty(n, "__esModule", {
    value: !0
  }), n.default = a;
  function a(t, i) {
    if (t == null)
      throw new TypeError("assign requires that input parameter not be null or undefined");
    for (var v in i)
      Object.prototype.hasOwnProperty.call(i, v) && (t[v] = i[v]);
    return t;
  }
  e.exports = n.default;
})(hn, hn.exports);
var ja = hn.exports;
(function(e, n) {
  var a = Aa.default;
  Object.defineProperty(n, "__esModule", {
    value: !0
  }), n.default = i;
  var t = a(ja);
  function i(v) {
    return (0, t.default)({}, v);
  }
  e.exports = n.default;
})(gn, gn.exports);
var Ga = gn.exports;
const Za = /* @__PURE__ */ bn(Ga);
function qa(e, n, a) {
  var t = yn(e, a), i = $n(n, t, !0), v = new Date(t.getTime() - i), m = /* @__PURE__ */ new Date(0);
  return m.setFullYear(v.getUTCFullYear(), v.getUTCMonth(), v.getUTCDate()), m.setHours(v.getUTCHours(), v.getUTCMinutes(), v.getUTCSeconds(), v.getUTCMilliseconds()), m;
}
function Xa(e, n, a) {
  if (typeof e == "string" && !e.match(aa)) {
    var t = Za(a);
    return t.timeZone = n, yn(e, t);
  }
  var i = yn(e, a), v = Dn(
    i.getFullYear(),
    i.getMonth(),
    i.getDate(),
    i.getHours(),
    i.getMinutes(),
    i.getSeconds(),
    i.getMilliseconds()
  ).getTime(), m = $n(n, new Date(v));
  return new Date(v + m);
}
const Ja = (e, n = 3) => {
  const a = [];
  for (let t = 0; t < e.length; t += n)
    a.push([e[t], e[t + 1], e[t + 2]]);
  return a;
};
function Ln(e) {
  return (n) => new Intl.DateTimeFormat(e, { weekday: "short", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`2017-01-0${n}T00:00:00+00:00`)).slice(0, 2);
}
function Qa(e) {
  return (n) => pt(/* @__PURE__ */ new Date(`2017-01-0${n}T00:00:00+00:00`), "EEEEEE", { locale: e });
}
const el = (e, n, a) => {
  const t = [1, 2, 3, 4, 5, 6, 7];
  let i;
  if (e !== null)
    try {
      i = t.map(Qa(e));
    } catch {
      i = t.map(Ln(n));
    }
  else
    i = t.map(Ln(n));
  const v = i.slice(0, a), m = i.slice(a + 1, i.length);
  return [i[a]].concat(...m).concat(...v);
}, tl = (e, n) => {
  const a = [];
  for (let t = +e[0]; t <= +e[1]; t++)
    a.push({ value: +t, text: `${t}` });
  return n ? a.reverse() : a;
}, nl = (e, n, a) => {
  const t = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((v) => {
    const m = v < 10 ? `0${v}` : v;
    return /* @__PURE__ */ new Date(`2017-${m}-01T00:00:00+00:00`);
  });
  if (e !== null)
    try {
      const v = a === "long" ? "MMMM" : "MMM";
      return t.map((m, T) => {
        const Y = pt(m, v, { locale: e });
        return {
          text: Y.charAt(0).toUpperCase() + Y.substring(1),
          value: T
        };
      });
    } catch {
    }
  const i = new Intl.DateTimeFormat(n, { month: a, timeZone: "UTC" });
  return t.map((v, m) => {
    const T = i.format(v);
    return {
      text: T.charAt(0).toUpperCase() + T.substring(1),
      value: m
    };
  });
}, al = (e) => [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11][e], Ae = (e) => {
  const n = $(e);
  return n != null && n.$el ? n == null ? void 0 : n.$el : n;
}, ll = (e) => Object.assign({ type: "dot" }, e), ra = (e) => Array.isArray(e) ? !!e[0] && !!e[1] : !1, zt = {
  prop: (e) => `"${e}" prop must be enabled!`,
  dateArr: (e) => `You need to use array as "model-value" binding in order to support "${e}"`
}, _e = (e) => e, Fn = (e) => e === 0 ? e : !e || isNaN(+e) ? null : +e, rl = (e) => e === 0 ? !0 : !!e, Un = (e) => e === null, ol = (e) => {
  if (e)
    return [...e.querySelectorAll("input, button, select, textarea, a[href]")][0];
}, Wn = (e) => Object.assign(
  {
    menuAppear: "",
    open: "dp-slide-down",
    close: "dp-slide-up",
    next: "calendar-next",
    previous: "calendar-prev",
    vNext: "dp-slide-up",
    vPrevious: "dp-slide-down"
  },
  e
), sl = (e) => Object.assign(
  {
    toggleOverlay: "Toggle overlay",
    menu: "Datepicker menu",
    input: "Datepicker input",
    calendarWrap: "Calendar wrapper",
    calendarDays: "Calendar days",
    openTimePicker: "Open time picker",
    closeTimePicker: "Close time Picker",
    incrementValue: (n) => `Increment ${n}`,
    decrementValue: (n) => `Decrement ${n}`,
    openTpOverlay: (n) => `Open ${n} overlay`,
    amPmButton: "Switch AM/PM mode",
    openYearsOverlay: "Open years overlay",
    openMonthsOverlay: "Open months overlay",
    nextMonth: "Next month",
    prevMonth: "Previous month",
    day: () => ""
  },
  e
), il = (e) => e === null ? 0 : typeof e == "boolean" ? e ? 2 : 0 : +e >= 2 ? +e : 2, ul = (e, n, a) => e || (typeof a == "string" ? a : n), dl = (e) => typeof e == "boolean" ? e ? Wn({}) : !1 : Wn(e), cl = () => ({
  enterSubmit: !0,
  tabSubmit: !0,
  openMenu: !0,
  rangeSeparator: " - "
}), fl = (e) => Object.assign({ months: [], years: [], times: { hours: [], minutes: [], seconds: [] } }, e), vl = (e) => Object.assign({ showSelect: !0, showCancel: !0, showNow: !1, showPreview: !0 }, e), xe = (e) => {
  const n = () => {
    if (e.partialRange)
      return null;
    throw new Error(zt.prop("partial-range"));
  }, a = L(() => ({
    ariaLabels: sl(e.ariaLabels),
    textInputOptions: Object.assign(cl(), e.textInputOptions),
    multiCalendars: il(e.multiCalendars),
    previewFormat: ul(e.previewFormat, e.format, v()),
    filters: fl(e.filters),
    transitions: dl(e.transitions),
    startTime: g(),
    actionRow: vl(e.actionRow)
  })), t = (r) => {
    if (e.range)
      return r();
    throw new Error(zt.prop("range"));
  }, i = () => {
    const r = e.enableSeconds ? ":ss" : "";
    return e.is24 ? `HH:mm${r}` : `hh:mm${r} aa`;
  }, v = () => e.format ? e.format : e.monthPicker ? "MM/yyyy" : e.timePicker ? i() : e.weekPicker ? "MM/dd/yyyy" : e.yearPicker ? "yyyy" : e.enableTimePicker ? `MM/dd/yyyy, ${i()}` : "MM/dd/yyyy", m = (r, o) => {
    if (typeof e.format == "function")
      return e.format(r);
    const l = o || v(), M = e.formatLocale ? { locale: e.formatLocale } : void 0;
    return Array.isArray(r) ? `${pt(r[0], l, M)}${e.modelAuto && !r[1] ? "" : a.value.textInputOptions.rangeSeparator || "-"}${r[1] ? pt(r[1], l, M) : ""}` : pt(r, l, M);
  }, T = (r) => e.timezone ? qa(r, e.timezone) : r, Y = (r) => e.timezone ? Xa(r, e.timezone) : r, _ = L(() => (r) => {
    var o;
    return (o = e.hideNavigation) == null ? void 0 : o.includes(r);
  }), W = (r) => {
    var o, l, M, re;
    return Array.isArray(e.allowedDates) && !((o = e.allowedDates) != null && o.length) ? !0 : (l = e.arrMapValues) != null && l.allowedDates ? !F(r, e.arrMapValues.allowedDates) : (M = e.allowedDates) != null && M.length ? !((re = e.allowedDates) != null && re.some(
      (se) => ke(T(A(se)), T(r))
    )) : !1;
  }, C = (r) => {
    var Ie;
    const o = e.maxDate ? Fe(T(r), T(A(e.maxDate))) : !1, l = e.minDate ? Ve(T(r), T(A(e.minDate))) : !1, M = F(
      r,
      (Ie = e.arrMapValues) != null && Ie.disabledDates ? e.arrMapValues.disabledDates : e.disabledDates
    ), se = a.value.filters.months.map((Te) => +Te).includes(we(r)), Pe = e.disabledWeekDays.length ? e.disabledWeekDays.some((Te) => +Te === va(r)) : !1, Se = W(r), ee = De(r), Ue = ee < +e.yearRange[0] || ee > +e.yearRange[1];
    return !(o || l || M || se || Ue || Pe || Se);
  }, c = (r) => {
    const o = {
      hours: at(A()),
      minutes: lt(A()),
      seconds: e.enableSeconds ? $t(A()) : 0
    };
    return Object.assign(o, r);
  }, g = () => e.range ? e.startTime && Array.isArray(e.startTime) ? [c(e.startTime[0]), c(e.startTime[1])] : null : e.startTime && !Array.isArray(e.startTime) ? c(e.startTime) : null, Q = (r) => !C(r), U = (r) => Array.isArray(r) ? Ht(r[0]) && (r[1] ? Ht(r[1]) : !0) : r ? Ht(r) : !1, x = (r) => r instanceof Date ? r : ma(r), V = (r) => {
    const o = Tn(T(r), { weekStartsOn: +e.weekStart }), l = ya(T(r), { weekStartsOn: +e.weekStart });
    return [o, l];
  }, F = (r, o) => r ? o instanceof Map ? !!o.get(u(r)) : Array.isArray(o) ? o.some((l) => ke(T(A(l)), T(r))) : o(A(JSON.parse(JSON.stringify(r)))) : !0, ae = (r, o, l) => {
    let M = r ? A(r) : A();
    return (o || o === 0) && (M = Ct(M, o)), l && (M = rt(M, l)), M;
  }, oe = (r) => Re(A(), Lt(r)), B = (r) => Re(A(), {
    hours: +r.hours || 0,
    minutes: +r.minutes || 0,
    seconds: +r.seconds || 0
  }), G = (r, o, l, M) => {
    if (!r)
      return !0;
    if (M) {
      const re = l === "max" ? Ot(r, o) : Bt(r, o), se = { seconds: 0, milliseconds: 0 };
      return re || mt(Re(r, se), Re(o, se));
    }
    return l === "max" ? r.getTime() <= o.getTime() : r.getTime() >= o.getTime();
  }, J = () => !e.enableTimePicker || e.monthPicker || e.yearPicker || e.ignoreTimeValidation, ne = (r) => Array.isArray(r) ? [r[0] ? oe(r[0]) : null, r[1] ? oe(r[1]) : null] : oe(r), ce = (r) => {
    const o = e.maxTime ? B(e.maxTime) : A(e.maxDate);
    return Array.isArray(r) ? G(r[0], o, "max", !!e.maxDate) && G(r[1], o, "max", !!e.maxDate) : G(r, o, "max", !!e.maxDate);
  }, ye = (r, o) => {
    const l = e.minTime ? B(e.minTime) : A(e.minDate);
    return Array.isArray(r) ? G(r[0], l, "min", !!e.minDate) && G(r[1], l, "min", !!e.minDate) && o : G(r, l, "min", !!e.minDate) && o;
  }, O = (r) => {
    let o = !0;
    if (!r || J())
      return !0;
    const l = !e.minDate && !e.maxDate ? ne(r) : r;
    if ((e.maxTime || e.maxDate) && (o = ce(_e(l))), (e.minTime || e.minDate) && (o = ye(_e(l), o)), e.disabledTimes) {
      const M = Array.isArray(r) ? [Lt(r[0]), r[1] ? Lt(r[1]) : void 0] : Lt(r);
      o = !e.disabledTimes(M);
    }
    return o;
  }, w = (r, o) => {
    const l = A(JSON.parse(JSON.stringify(r))), M = [];
    for (let re = 0; re < 7; re++) {
      const se = yt(l, re), Pe = we(se) !== o;
      M.push({
        text: e.hideOffsetDates && Pe ? "" : se.getDate(),
        value: se,
        current: !Pe,
        classData: {}
      });
    }
    return M;
  }, f = (r, o) => {
    switch (e.sixWeeks === !0 ? "append" : e.sixWeeks) {
      case "prepend":
        return [!0, !1];
      case "center":
        return [r == 0, !0];
      case "fair":
        return [r == 0 || o > r, !0];
      case "append":
        return [!1, !1];
      default:
        return [!1, !1];
    }
  }, N = (r, o) => {
    const l = [], M = A(T(new Date(o, r))), re = A(T(new Date(o, r + 1, 0))), se = e.weekStart, Pe = Tn(M, { weekStartsOn: se }), Se = (ee) => {
      const Ue = w(ee, r);
      if (l.push({ days: Ue }), !l[l.length - 1].days.some(
        (Ie) => ke(je(Ie.value), je(re))
      )) {
        const Ie = yt(ee, 7);
        Se(Ie);
      }
    };
    if (Se(Pe), e.sixWeeks && l.length < 6) {
      const ee = 6 - l.length, Ue = (M.getDay() + 7 - se) % 7, Te = 6 - (re.getDay() + 7 - se) % 7, [Xe, ct] = f(Ue, Te);
      for (let et = 1; et <= ee; et++)
        if (ct ? !!(et % 2) == Xe : Xe) {
          const ze = l[0].days[0], j = w(yt(ze.value, -7), we(M));
          l.unshift({ days: j });
        } else {
          const ze = l[l.length - 1], j = ze.days[ze.days.length - 1], te = w(yt(j.value, 1), we(M));
          l.push({ days: te });
        }
    }
    return l;
  }, I = (r, o, l) => [Re(A(r), { date: 1 }), Re(A(), { month: o, year: l, date: 1 })], E = (r, o) => Ve(...I(e.minDate, r, o)) || ke(...I(e.minDate, r, o)), D = (r, o) => Fe(...I(e.maxDate, r, o)) || ke(...I(e.maxDate, r, o)), y = (r, o, l) => {
    let M = !1;
    return e.maxDate && l && D(r, o) && (M = !0), e.minDate && !l && E(r, o) && (M = !0), M;
  }, d = (r, o, l, M) => {
    let re = !1;
    return M ? e.minDate && e.maxDate ? re = y(r, o, l) : (e.minDate && E(r, o) || e.maxDate && D(r, o)) && (re = !0) : re = !0, re;
  }, u = (r) => {
    const o = je(T(A(r))).toISOString(), [l] = o.split("T");
    return l;
  }, S = (r) => new Map(r.map((o) => [u(o), !0])), b = (r) => Array.isArray(r) && r.length > 0;
  return {
    checkPartialRangeValue: n,
    checkRangeEnabled: t,
    getZonedDate: T,
    getZonedToUtc: Y,
    formatDate: m,
    getDefaultPattern: v,
    validateDate: C,
    getDefaultStartTime: g,
    isDisabled: Q,
    isValidDate: U,
    sanitizeDate: x,
    getWeekFromDate: V,
    matchDate: F,
    setDateMonthOrYear: ae,
    isValidTime: O,
    getCalendarDays: N,
    validateMonthYearInRange: d,
    validateMaxDate: D,
    validateMinDate: E,
    assignDefaultTime: c,
    mapDatesArrToMap: (r) => {
      b(e.allowedDates) && (r.allowedDates = S(e.allowedDates)), b(e.highlight) && (r.highlightedDates = S(e.highlight)), b(e.disabledDates) && (r.disabledDates = S(e.disabledDates));
    },
    defaults: a,
    hideNavigationButtons: _
  };
}, be = Mt({
  monthYear: [],
  calendar: [],
  time: [],
  actionRow: [],
  selectionGrid: [],
  timePicker: {
    0: [],
    1: []
  },
  monthPicker: []
}), ln = H(null), Ft = H(!1), rn = H(!1), on = H(!1), sn = H(!1), Ee = H(0), Oe = H(0), ut = () => {
  const e = L(() => Ft.value ? [...be.selectionGrid, be.actionRow].filter((V) => V.length) : rn.value ? [
    ...be.timePicker[0],
    ...be.timePicker[1],
    sn.value ? [] : [ln.value],
    be.actionRow
  ].filter((V) => V.length) : on.value ? [...be.monthPicker, be.actionRow] : [be.monthYear, ...be.calendar, be.time, be.actionRow].filter((V) => V.length)), n = (V) => {
    Ee.value = V ? Ee.value + 1 : Ee.value - 1;
    let F = null;
    e.value[Oe.value] && (F = e.value[Oe.value][Ee.value]), F || (Ee.value = V ? Ee.value - 1 : Ee.value + 1);
  }, a = (V) => {
    if (Oe.value === 0 && !V || Oe.value === e.value.length && V)
      return;
    Oe.value = V ? Oe.value + 1 : Oe.value - 1, e.value[Oe.value] ? e.value[Oe.value] && !e.value[Oe.value][Ee.value] && Ee.value !== 0 && (Ee.value = e.value[Oe.value].length - 1) : Oe.value = V ? Oe.value - 1 : Oe.value + 1;
  }, t = (V) => {
    let F = null;
    e.value[Oe.value] && (F = e.value[Oe.value][Ee.value]), F ? F.focus({ preventScroll: !Ft.value }) : Ee.value = V ? Ee.value - 1 : Ee.value + 1;
  }, i = () => {
    n(!0), t(!0);
  }, v = () => {
    n(!1), t(!1);
  }, m = () => {
    a(!1), t(!0);
  }, T = () => {
    a(!0), t(!0);
  }, Y = (V, F) => {
    be[F] = V;
  }, _ = (V, F) => {
    be[F] = V;
  }, W = () => {
    Ee.value = 0, Oe.value = 0;
  };
  return {
    buildMatrix: Y,
    buildMultiLevelMatrix: _,
    setTimePickerBackRef: (V) => {
      ln.value = V;
    },
    setSelectionGrid: (V) => {
      Ft.value = V, W(), V || (be.selectionGrid = []);
    },
    setTimePicker: (V, F = !1) => {
      rn.value = V, sn.value = F, W(), V || (be.timePicker[0] = [], be.timePicker[1] = []);
    },
    setTimePickerElements: (V, F = 0) => {
      be.timePicker[F] = V;
    },
    arrowRight: i,
    arrowLeft: v,
    arrowUp: m,
    arrowDown: T,
    clearArrowNav: () => {
      be.monthYear = [], be.calendar = [], be.time = [], be.actionRow = [], be.selectionGrid = [], be.timePicker[0] = [], be.timePicker[1] = [], Ft.value = !1, rn.value = !1, sn.value = !1, on.value = !1, W(), ln.value = null;
    },
    setMonthPicker: (V) => {
      on.value = V, W();
    },
    refSets: be
    // exposed for testing
  };
}, Hn = (e) => Array.isArray(e), vt = (e) => Array.isArray(e), xn = (e) => Array.isArray(e) && e.length === 2, ml = (e, n, a, t, i) => {
  const {
    getDefaultStartTime: v,
    isDisabled: m,
    sanitizeDate: T,
    getWeekFromDate: Y,
    setDateMonthOrYear: _,
    validateMonthYearInRange: W,
    defaults: C
  } = xe(e), c = L({
    get: () => e.internalModelValue,
    set: (s) => {
      !e.readonly && !e.disabled && n("update:internal-model-value", s);
    }
  }), g = H([]);
  ot(c, (s, k) => {
    e.range ? J() : mt(s, k) || J();
  });
  const Q = It(e, "multiCalendars");
  ot(Q, () => {
    j(0);
  });
  const U = H([{ month: we(A()), year: De(A()) }]);
  ot(
    U,
    () => {
      U.value.forEach((s, k) => {
        n("update-month-year", { instance: k, month: s.month, year: s.year });
      });
    },
    { deep: !0 }
  );
  const x = Mt({
    hours: e.range ? [at(A()), at(A())] : at(A()),
    minutes: e.range ? [lt(A()), lt(A())] : lt(A()),
    seconds: e.range ? [0, 0] : 0
  }), V = L(
    () => (s) => U.value[s] ? U.value[s].month : 0
  ), F = L(
    () => (s) => U.value[s] ? U.value[s].year : 0
  ), ae = L(() => {
    var s;
    return (s = e.flow) != null && s.length && !e.partialFlow ? i.value === e.flow.length : !0;
  }), oe = (s, k, X) => {
    var ie, $e;
    U.value[s] || (U.value[s] = { month: 0, year: 0 }), U.value[s].month = Un(k) ? (ie = U.value[s]) == null ? void 0 : ie.month : k, U.value[s].year = Un(X) ? ($e = U.value[s]) == null ? void 0 : $e.year : X;
  }, B = (s, k) => {
    x[s] = k;
  }, G = () => {
    e.startDate && (oe(0, we(A(e.startDate)), De(A(e.startDate))), C.value.multiCalendars && j(0));
  };
  Ge(() => {
    c.value || (G(), C.value.startTime && D()), J(!0), e.focusStartDate && e.startDate && G();
  });
  const J = (s = !1) => {
    if (c.value)
      return Array.isArray(c.value) ? (g.value = c.value, w(s)) : ce(c.value, s);
    if (e.timePicker)
      return f();
    if (e.monthPicker && !e.range)
      return N();
    if (e.yearPicker && !e.range)
      return I();
    if (C.value.multiCalendars && s && !e.startDate)
      return ne(A(), s);
  }, ne = (s, k = !1) => {
    if ((!C.value.multiCalendars || !e.multiStatic || k) && oe(0, we(s), De(s)), C.value.multiCalendars)
      for (let X = 1; X < C.value.multiCalendars; X++) {
        const ie = Re(A(), { month: V.value(X - 1), year: F.value(X - 1) }), $e = qn(ie, { months: 1 });
        U.value[X] = { month: we($e), year: De($e) };
      }
  }, ce = (s, k) => {
    ne(s), B("hours", at(s)), B("minutes", lt(s)), B("seconds", $t(s)), C.value.multiCalendars && k && d();
  }, ye = (s, k) => {
    s[1] && e.showLastInRange ? ne(s[1], k) : ne(s[0], k);
    const X = (ie, $e) => [
      ie(s[0]),
      s[1] ? ie(s[1]) : x[$e][1]
    ];
    B("hours", X(at, "hours")), B("minutes", X(lt, "minutes")), B("seconds", X($t, "seconds"));
  }, O = (s, k) => {
    if ((e.range || e.weekPicker) && !e.multiDates)
      return ye(s, k);
    if (e.multiDates) {
      const X = s[s.length - 1];
      return ce(X, k);
    }
  }, w = (s) => {
    const k = c.value;
    O(k, s), C.value.multiCalendars && e.multiCalendarsSolo && d();
  }, f = () => {
    if (D(), !e.range)
      c.value = Ke(A(), x.hours, x.minutes, E());
    else {
      const s = x.hours, k = x.minutes;
      c.value = [
        Ke(A(), s[0], k[0], E()),
        Ke(A(), s[1], k[1], E(!1))
      ];
    }
  }, N = () => {
    e.multiDates ? c.value = [_(A(), V.value(0), F.value(0))] : c.value = _(A(), V.value(0), F.value(0));
  }, I = () => {
    c.value = A();
  }, E = (s = !0) => e.enableSeconds ? Array.isArray(x.seconds) ? s ? x.seconds[0] : x.seconds[1] : x.seconds : 0, D = () => {
    const s = v();
    if (s) {
      const k = Array.isArray(s), X = k ? [+s[0].hours, +s[1].hours] : +s.hours, ie = k ? [+s[0].minutes, +s[1].minutes] : +s.minutes, $e = k ? [+s[0].seconds, +s[1].seconds] : +s.seconds;
      B("hours", X), B("minutes", ie), e.enableSeconds && B("seconds", $e);
    }
  }, y = () => Array.isArray(c.value) && c.value.length ? c.value[c.value.length - 1] : null, d = () => {
    if (Array.isArray(c.value) && c.value.length === 2) {
      const s = A(
        A(c.value[1] ? c.value[1] : gt(c.value[0], 1))
      ), [k, X] = [we(c.value[0]), De(c.value[0])], [ie, $e] = [we(c.value[1]), De(c.value[1])];
      (k !== ie || k === ie && X !== $e) && e.multiCalendarsSolo && oe(1, we(s), De(s));
    } else
      c.value && !Array.isArray(c.value) && oe(0, we(c.value), De(c.value));
  }, u = (s) => {
    const k = gt(s, 1);
    return { month: we(k), year: De(k) };
  }, S = (s) => {
    const k = we(A(s)), X = De(A(s));
    if (oe(0, k, X), C.value.multiCalendars > 0)
      for (let ie = 1; ie < C.value.multiCalendars; ie++) {
        const $e = u(
          Re(A(s), { year: V.value(ie - 1), month: F.value(ie - 1) })
        );
        oe(ie, $e.month, $e.year);
      }
  }, b = (s) => {
    if (c.value && Array.isArray(c.value))
      if (c.value.some((k) => ke(s, k))) {
        const k = c.value.filter((X) => !ke(X, s));
        c.value = k.length ? k : null;
      } else
        (e.multiDatesLimit && +e.multiDatesLimit > c.value.length || !e.multiDatesLimit) && c.value.push(s);
    else
      c.value = [s];
  }, Z = (s, k) => {
    const X = Fe(s, k) ? k : s, ie = Fe(k, s) ? k : s;
    return Sn({ start: X, end: ie });
  }, r = (s, k = 0) => {
    if (Array.isArray(c.value) && c.value[k]) {
      const X = pa(s, c.value[k]), ie = Z(c.value[k], s), $e = ie.length === 1 ? 0 : ie.filter((h) => m(h)).length, tt = Math.abs(X) - $e;
      if (e.minRange && e.maxRange)
        return tt >= +e.minRange && tt <= +e.maxRange;
      if (e.minRange)
        return tt >= +e.minRange;
      if (e.maxRange)
        return tt <= +e.maxRange;
    }
    return !0;
  }, o = (s) => Array.isArray(c.value) && c.value.length === 2 ? e.fixedStart && (Fe(s, c.value[0]) || ke(s, c.value[0])) ? [c.value[0], s] : e.fixedEnd && (Ve(s, c.value[1]) || ke(s, c.value[1])) ? [s, c.value[1]] : (n("invalid-fixed-range", s), c.value) : [], l = () => {
    e.autoApply && ae.value && n("auto-apply", e.partialFlow);
  }, M = () => {
    e.autoApply && n("select-date");
  }, re = (s) => !Sn({ start: s[0], end: s[1] }).some((X) => m(X)), se = (s) => (c.value = Y(A(s.value)), l()), Pe = (s) => {
    const k = Ke(A(s.value), x.hours, x.minutes, E());
    e.multiDates ? b(k) : c.value = k, a(), l();
  }, Se = () => {
    g.value = c.value ? c.value.slice() : [], g.value.length === 2 && !(e.fixedStart || e.fixedEnd) && (g.value = []);
  }, ee = (s, k) => {
    const X = [A(s.value), yt(A(s.value), +e.autoRange)];
    re(X) && (k && S(s.value), g.value = X);
  }, Ue = (s) => {
    Ie(s.value) || !r(s.value, e.fixedStart ? 0 : 1) || (g.value = o(A(s.value)));
  }, Ie = (s) => e.noDisabledRange ? Z(g.value[0], s).some((X) => m(X)) : !1, Te = (s, k) => {
    if (Se(), e.autoRange)
      return ee(s, k);
    if (e.fixedStart || e.fixedEnd)
      return Ue(s);
    g.value[0] ? r(A(s.value)) && !Ie(s.value) && (Ve(A(s.value), A(g.value[0])) ? (g.value.unshift(A(s.value)), n("range-end", g.value[0])) : (g.value[1] = A(s.value), n("range-end", g.value[1]))) : (g.value[0] = A(s.value), n("range-start", g.value[0]));
  }, Xe = (s) => {
    g.value[s] = Ke(
      g.value[s],
      x.hours[s],
      x.minutes[s],
      E(s !== 1)
    );
  }, ct = () => {
    var s, k;
    g.value[0] && g.value[1] && +((s = g.value) == null ? void 0 : s[0]) > +((k = g.value) == null ? void 0 : k[1]) && (g.value.reverse(), n("range-start", g.value[0]), n("range-end", g.value[1]));
  }, et = () => {
    g.value.length && (g.value[0] && !g.value[1] ? Xe(0) : (Xe(0), Xe(1), a()), ct(), c.value = g.value.slice(), g.value[0] && g.value[1] && e.autoApply && n("auto-apply"), g.value[0] && !g.value[1] && e.modelAuto && e.autoApply && n("auto-apply"));
  }, wt = (s, k = !1) => {
    if (!(m(s.value) || !s.current && e.hideOffsetDates)) {
      if (e.weekPicker)
        return se(s);
      if (!e.range)
        return Pe(s);
      vt(x.hours) && vt(x.minutes) && !e.multiDates && (Te(s, k), et());
    }
  }, ze = (s) => {
    const k = s[0];
    return e.weekNumbers === "local" ? ga(k.value, { weekStartsOn: +e.weekStart }) : e.weekNumbers === "iso" ? ha(k.value) : typeof e.weekNumbers == "function" ? e.weekNumbers(k.value) : "";
  }, j = (s) => {
    for (let k = s - 1; k >= 0; k--) {
      const X = Nt(Re(A(), { month: V.value(k + 1), year: F.value(k + 1) }), 1);
      oe(k, we(X), De(X));
    }
    for (let k = s + 1; k <= C.value.multiCalendars - 1; k++) {
      const X = gt(Re(A(), { month: V.value(k - 1), year: F.value(k - 1) }), 1);
      oe(k, we(X), De(X));
    }
  }, te = (s) => _(A(), V.value(s), F.value(s)), ue = (s) => Ke(s, x.hours, x.minutes, E()), Tt = (s) => {
    b(te(s));
  }, ft = (s, k) => {
    const X = e.monthPicker ? V.value(s) !== k.month || !k.fromNav : F.value(s) !== k.year || !k.fromNav;
    if (oe(s, k.month, k.year), C.value.multiCalendars && !e.multiCalendarsSolo && j(s), e.monthPicker || e.yearPicker)
      if (e.multiDates)
        X && Tt(s);
      else if (e.range) {
        if (X && r(te(s))) {
          let ie = c.value ? c.value.slice() : [];
          ie.length === 2 && ie[1] !== null && (ie = []), ie.length ? Ve(te(s), ie[0]) ? ie.unshift(te(s)) : ie[1] = te(s) : ie = [te(s)], c.value = ie;
        }
      } else
        (e.autoApplyMonth || X) && (c.value = te(s));
    t(e.multiCalendarsSolo ? s : void 0);
  }, Gt = async (s = !1) => {
    if (e.autoApply && (e.monthPicker || e.yearPicker)) {
      await st();
      const k = e.monthPicker ? s : !1;
      e.range ? n("auto-apply", k || !c.value || c.value.length === 1) : n("auto-apply", k);
    }
    a();
  }, Yt = (s, k) => {
    const X = Re(A(), { month: V.value(k), year: F.value(k) }), ie = s < 0 ? gt(X, 1) : Nt(X, 1);
    W(we(ie), De(ie), s < 0, e.preventMinMaxNavigation) && (oe(k, we(ie), De(ie)), C.value.multiCalendars && !e.multiCalendarsSolo && j(k), t());
  }, St = (s) => {
    Hn(s) && Hn(c.value) && vt(x.hours) && vt(x.minutes) ? (s[0] && c.value[0] && (c.value[0] = Ke(s[0], x.hours[0], x.minutes[0], E())), s[1] && c.value[1] && (c.value[1] = Ke(s[1], x.hours[1], x.minutes[1], E(!1)))) : e.multiDates && Array.isArray(c.value) ? c.value[c.value.length - 1] = ue(s) : !e.range && !xn(s) && (c.value = ue(s)), n("time-update");
  }, Zt = (s, k = !0, X = !1) => {
    const ie = k ? s : x.hours, $e = !k && !X ? s : x.minutes, tt = X ? s : x.seconds;
    if (e.range && xn(c.value) && vt(ie) && vt($e) && vt(tt) && !e.disableTimeRangeValidation) {
      const h = (pe) => Ke(c.value[pe], ie[pe], $e[pe], tt[pe]), z = (pe) => wn(c.value[pe], 0);
      if (ke(c.value[0], c.value[1]) && (Bt(h(0), z(1)) || Ot(h(1), z(0))))
        return;
    }
    if (B("hours", ie), B("minutes", $e), B("seconds", tt), c.value)
      if (e.multiDates) {
        const h = y();
        h && St(h);
      } else
        St(c.value);
    else
      e.timePicker && St(e.range ? [A(), A()] : A());
    a();
  }, qt = (s, k) => {
    e.monthChangeOnScroll && Yt(e.monthChangeOnScroll !== "inverse" ? -s.deltaY : s.deltaY, k);
  }, Xt = (s, k, X = !1) => {
    e.monthChangeOnArrows && e.vertical === X && Vt(s, k);
  }, Vt = (s, k) => {
    Yt(s === "right" ? -1 : 1, k);
  };
  return {
    time: x,
    month: V,
    year: F,
    modelValue: c,
    calendars: U,
    monthYearSelect: Gt,
    isDisabled: m,
    updateTime: Zt,
    getWeekNum: ze,
    selectDate: wt,
    updateMonthYear: ft,
    handleScroll: qt,
    getMarker: (s) => e.markers.find((k) => ke(T(s.value), T(k.date))),
    handleArrow: Xt,
    handleSwipe: Vt,
    selectCurrentDate: () => {
      e.range ? c.value && Array.isArray(c.value) && c.value[0] ? c.value = Ve(A(), c.value[0]) ? [A(), c.value[0]] : [c.value[0], A()] : c.value = [A()] : c.value = A(), M();
    },
    presetDateRange: (s, k) => {
      k || s.length && s.length <= 2 && e.range && (c.value = s.map((X) => A(X)), M(), e.multiCalendars && st().then(() => J(!0)));
    }
  };
}, yl = (e, n, a) => {
  const t = H(), {
    getZonedToUtc: i,
    getZonedDate: v,
    formatDate: m,
    getDefaultPattern: T,
    checkRangeEnabled: Y,
    checkPartialRangeValue: _,
    isValidDate: W,
    setDateMonthOrYear: C,
    defaults: c
  } = xe(n), g = H(""), Q = It(n, "format");
  ot(t, () => {
    e("internal-model-change", t.value);
  }), ot(Q, () => {
    y();
  });
  const U = (l) => {
    const M = l || A();
    return n.modelType ? u(M) : {
      hours: at(M),
      minutes: lt(M),
      seconds: n.enableSeconds ? $t(M) : 0
    };
  }, x = (l) => n.modelType ? u(l) : { month: we(l), year: De(l) }, V = (l) => Array.isArray(l) ? Y(() => [
    rt(A(), l[0]),
    l[1] ? rt(A(), l[1]) : _()
  ]) : rt(A(), +l), F = (l, M) => (typeof l == "string" || typeof l == "number") && n.modelType ? d(l) : M, ae = (l) => Array.isArray(l) ? [
    F(
      l[0],
      Ke(null, +l[0].hours, +l[0].minutes, l[0].seconds)
    ),
    F(
      l[1],
      Ke(null, +l[1].hours, +l[1].minutes, l[1].seconds)
    )
  ] : F(l, Ke(null, l.hours, l.minutes, l.seconds)), oe = (l) => Array.isArray(l) ? n.multiDates ? l.map((M) => F(M, C(null, +M.month, +M.year))) : Y(() => [
    F(l[0], C(null, +l[0].month, +l[0].year)),
    F(
      l[1],
      l[1] ? C(null, +l[1].month, +l[1].year) : _()
    )
  ]) : F(l, C(null, +l.month, +l.year)), B = (l) => {
    if (Array.isArray(l))
      return l.map((M) => d(M));
    throw new Error(zt.dateArr("multi-dates"));
  }, G = (l) => {
    if (Array.isArray(l))
      return [A(l[0]), A(l[1])];
    throw new Error(zt.dateArr("week-picker"));
  }, J = (l) => n.modelAuto ? Array.isArray(l) ? [d(l[0]), d(l[1])] : n.autoApply ? [d(l)] : [d(l), null] : Array.isArray(l) ? Y(() => [
    d(l[0]),
    l[1] ? d(l[1]) : _()
  ]) : d(l), ne = () => {
    Array.isArray(t.value) && n.range && t.value.length === 1 && t.value.push(_());
  }, ce = () => {
    const l = t.value;
    return [
      u(l[0]),
      l[1] ? u(l[1]) : _()
    ];
  }, ye = () => t.value[1] ? ce() : u(_e(t.value[0])), O = () => (t.value || []).map((l) => u(l)), w = () => (ne(), n.modelAuto ? ye() : n.multiDates ? O() : Array.isArray(t.value) ? Y(() => ce()) : u(_e(t.value))), f = (l) => l ? n.timePicker ? ae(_e(l)) : n.monthPicker ? oe(_e(l)) : n.yearPicker ? V(_e(l)) : n.multiDates ? B(_e(l)) : n.weekPicker ? G(_e(l)) : J(_e(l)) : null, N = (l) => {
    const M = f(l);
    W(_e(M)) ? (t.value = _e(M), y()) : (t.value = null, g.value = "");
  }, I = () => {
    var M;
    const l = (re) => {
      var se;
      return pt(re, (se = c.value.textInputOptions) == null ? void 0 : se.format);
    };
    return `${l(t.value[0])} ${(M = c.value.textInputOptions) == null ? void 0 : M.rangeSeparator} ${t.value[1] ? l(t.value[1]) : ""}`;
  }, E = () => {
    var l;
    return a.value && t.value ? Array.isArray(t.value) ? I() : pt(t.value, (l = c.value.textInputOptions) == null ? void 0 : l.format) : m(t.value);
  }, D = () => {
    var l;
    return t.value ? n.multiDates ? t.value.map((M) => m(M)).join("; ") : n.textInput && typeof ((l = c.value.textInputOptions) == null ? void 0 : l.format) == "string" ? E() : m(t.value) : "";
  }, y = () => {
    !n.format || typeof n.format == "string" || n.textInput && typeof n.textInputOptions.format == "string" ? g.value = D() : g.value = n.format(t.value);
  }, d = (l) => {
    if (n.utc) {
      const M = new Date(l);
      return n.utc === "preserve" ? new Date(M.getTime() + M.getTimezoneOffset() * 6e4) : M;
    }
    return n.modelType ? n.modelType === "date" || n.modelType === "timestamp" ? v(new Date(l)) : n.modelType === "format" && (typeof n.format == "string" || !n.format) ? cn(l, T(), /* @__PURE__ */ new Date()) : v(cn(l, n.modelType, /* @__PURE__ */ new Date())) : v(new Date(l));
  }, u = (l) => l ? n.utc ? Ma(l, n.utc === "preserve", n.enableSeconds) : n.modelType ? n.modelType === "timestamp" ? +i(l) : n.modelType === "format" && (typeof n.format == "string" || !n.format) ? m(i(l)) : m(i(l), n.modelType) : i(l) : "", S = (l) => {
    e("update:model-value", l);
  }, b = (l) => Array.isArray(t.value) ? n.multiDates ? t.value.map((M) => l(M)) : [
    l(t.value[0]),
    t.value[1] ? l(t.value[1]) : _()
  ] : l(_e(t.value)), Z = (l) => S(_e(b(l)));
  return {
    inputValue: g,
    internalModelValue: t,
    checkBeforeEmit: () => t.value ? n.range ? n.partialRange ? t.value.length >= 1 : t.value.length === 2 : !!t.value : !1,
    parseExternalModelValue: N,
    formatInputValue: y,
    emitModelValue: () => (y(), n.monthPicker ? Z(x) : n.timePicker ? Z(U) : n.yearPicker ? Z(De) : n.weekPicker ? S(t.value) : S(w()))
  };
}, gl = (e, n) => {
  const { validateMonthYearInRange: a, validateMaxDate: t, validateMinDate: i, defaults: v } = xe(e), m = (C, c) => {
    let g = C;
    return v.value.filters.months.includes(we(g)) ? (g = c ? gt(C, 1) : Nt(C, 1), m(g, c)) : g;
  }, T = (C, c) => {
    let g = C;
    return v.value.filters.years.includes(De(g)) ? (g = c ? ka(C, 1) : wa(C, 1), T(g, c)) : g;
  }, Y = (C) => {
    const c = Re(/* @__PURE__ */ new Date(), { month: e.month, year: e.year });
    let g = C ? gt(c, 1) : Nt(c, 1);
    e.disableYearSelect && (g = rt(g, e.year));
    let Q = we(g), U = De(g);
    v.value.filters.months.includes(Q) && (g = m(g, C), Q = we(g), U = De(g)), v.value.filters.years.includes(U) && (g = T(g, C), U = De(g)), a(Q, U, C, e.preventMinMaxNavigation) && _(Q, U);
  }, _ = (C, c) => {
    n("update-month-year", { month: C, year: c });
  }, W = L(() => (C) => {
    if (!e.preventMinMaxNavigation || C && !e.maxDate || !C && !e.minDate)
      return !1;
    const c = Re(/* @__PURE__ */ new Date(), { month: e.month, year: e.year }), g = C ? gt(c, 1) : Nt(c, 1), Q = [we(g), De(g)];
    return C ? !t(...Q) : !i(...Q);
  });
  return { handleMonthYearChange: Y, isDisabled: W, updateMonthYear: _ };
};
var xt = /* @__PURE__ */ ((e) => (e.center = "center", e.left = "left", e.right = "right", e))(xt || {});
const hl = (e, n, a, t) => {
  const i = H({
    top: "0",
    left: "0",
    transform: "none",
    opacity: "0"
  }), v = H(!1), m = It(t, "teleportCenter"), T = L(() => v.value ? "-100%" : "0"), Y = () => {
    _(), i.value.opacity = "0";
  };
  ot(m, () => {
    F();
  }), Ge(() => {
    _();
  });
  const _ = () => {
    const w = Ae(n);
    if (w) {
      const { top: f, left: N, width: I, height: E } = Q(w);
      i.value.top = `${f + E / 2}px`, g(N, I, 50);
    }
  }, W = (w) => {
    if (t.teleport) {
      const f = w.getBoundingClientRect();
      return {
        left: f.left + window.scrollX,
        top: f.top + window.scrollY
      };
    }
    return { top: 0, left: 0 };
  }, C = (w, f) => {
    i.value.left = `${w + f}px`, i.value.transform = `translate(-100%, ${T.value})`;
  }, c = (w) => {
    i.value.left = `${w}px`, i.value.transform = `translate(0, ${T.value})`;
  }, g = (w, f, N) => {
    t.position === xt.left && c(w), t.position === xt.right && C(w, f), t.position === xt.center && (i.value.left = `${w + f / 2}px`, i.value.transform = N ? `translate(-50%, -${N}%)` : `translate(-50%, ${T.value})`);
  }, Q = (w) => {
    const { width: f, height: N } = w.getBoundingClientRect(), { top: I, left: E } = t.altPosition ? t.altPosition(w) : W(w);
    return { top: +I, left: +E, width: f, height: N };
  }, U = () => {
    const w = Ae(n);
    if (w) {
      const { top: f, left: N, width: I, height: E } = Q(w), D = J();
      i.value.top = `${f + E / 2}px`, g(N, I, D === "top" ? 100 : 0);
    }
  }, x = () => {
    i.value.left = "50%", i.value.top = "50%", i.value.transform = "translate(-50%, -50%)", i.value.position = "fixed", delete i.value.opacity;
  }, V = () => {
    const w = Ae(n), { top: f, left: N, transform: I } = t.altPosition(w);
    i.value = { top: `${f}px`, left: `${N}px`, transform: I || "" };
  }, F = (w = !0) => {
    if (!t.inline)
      return m.value ? x() : t.altPosition !== null ? V() : (w && a("recalculate-position"), ce());
  }, ae = ({
    inputEl: w,
    menuEl: f,
    left: N,
    width: I
  }) => {
    window.screen.width > 768 && g(N, I), G(w, f);
  }, oe = (w, f) => {
    const { top: N, left: I, height: E, width: D } = Q(w);
    i.value.top = `${E + N + +t.offset}px`, v.value = !1, ae({ inputEl: w, menuEl: f, left: I, width: D });
  }, B = (w, f) => {
    const { top: N, left: I, width: E } = Q(w);
    i.value.top = `${N - +t.offset}px`, v.value = !0, ae({ inputEl: w, menuEl: f, left: I, width: E });
  }, G = (w, f) => {
    if (t.autoPosition) {
      const { left: N, width: I } = Q(w), { left: E, right: D } = f.getBoundingClientRect();
      return E <= 0 ? c(N) : D >= document.documentElement.clientWidth ? C(N, I) : g(N, I);
    }
  }, J = () => {
    const w = Ae(e), f = Ae(n);
    if (w && f) {
      const { height: N } = w.getBoundingClientRect(), { top: I, height: E } = f.getBoundingClientRect(), y = window.innerHeight - I - E, d = I;
      return N <= y ? "bottom" : N > y && N <= d ? "top" : y >= d ? "bottom" : "top";
    }
    return "bottom";
  }, ne = (w, f) => J() === "bottom" ? oe(w, f) : B(w, f), ce = () => {
    const w = Ae(n), f = Ae(e);
    if (w && f)
      return t.autoPosition ? ne(w, f) : oe(w, f);
  }, ye = function(w) {
    if (w) {
      const f = w.scrollHeight > w.clientHeight, I = window.getComputedStyle(w).overflowY.indexOf("hidden") !== -1;
      return f && !I;
    }
    return !0;
  }, O = function(w) {
    return !w || w === document.body || w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? window : ye(w) ? w : O(w.parentNode);
  };
  return { openOnTop: v, menuStyle: i, resetPosition: Y, setMenuPosition: F, setInitialPosition: U, getScrollableParent: O };
}, Dt = [
  { name: "clock-icon", use: ["time", "calendar"] },
  { name: "arrow-left", use: ["month-year", "calendar"] },
  { name: "arrow-right", use: ["month-year", "calendar"] },
  { name: "arrow-up", use: ["time", "calendar", "month-year"] },
  { name: "arrow-down", use: ["time", "calendar", "month-year"] },
  { name: "calendar-icon", use: ["month-year", "time", "calendar"] },
  { name: "day", use: ["calendar"] },
  { name: "month-overlay-value", use: ["calendar", "month-year"] },
  { name: "year-overlay-value", use: ["calendar", "month-year"] },
  { name: "year-overlay", use: ["month-year"] },
  { name: "month-overlay", use: ["month-year"] },
  { name: "month-overlay-header", use: ["month-year"] },
  { name: "year-overlay-header", use: ["month-year"] },
  { name: "hours-overlay-value", use: ["calendar", "time"] },
  { name: "minutes-overlay-value", use: ["calendar", "time"] },
  { name: "seconds-overlay-value", use: ["calendar", "time"] },
  { name: "hours", use: ["calendar", "time"] },
  { name: "minutes", use: ["calendar", "time"] },
  { name: "month", use: ["calendar", "month-year"] },
  { name: "year", use: ["calendar", "month-year"] },
  { name: "action-buttons", use: ["action"] },
  { name: "action-preview", use: ["action"] },
  { name: "calendar-header", use: ["calendar"] },
  { name: "marker-tooltip", use: ["calendar"] },
  { name: "action-extra", use: ["menu"] },
  { name: "time-picker-overlay", use: ["calendar", "time"] },
  { name: "am-pm-button", use: ["calendar", "time"] },
  { name: "left-sidebar", use: ["menu"] },
  { name: "right-sidebar", use: ["menu"] },
  { name: "month-year", use: ["month-year"] },
  { name: "time-picker", use: ["menu"] },
  { name: "action-row", use: ["action"] },
  { name: "marker", use: ["calendar"] }
], pl = [{ name: "trigger" }, { name: "input-icon" }, { name: "clear-icon" }, { name: "dp-input" }], kl = {
  all: () => Dt,
  monthYear: () => Dt.filter((e) => e.use.includes("month-year")),
  input: () => pl,
  timePicker: () => Dt.filter((e) => e.use.includes("time")),
  action: () => Dt.filter((e) => e.use.includes("action")),
  calendar: () => Dt.filter((e) => e.use.includes("calendar")),
  menu: () => Dt.filter((e) => e.use.includes("menu"))
}, ht = (e, n, a) => {
  const t = [];
  return kl[n]().forEach((i) => {
    e[i.name] && t.push(i.name);
  }), a && a.length && a.forEach((i) => {
    i.slot && t.push(i.slot);
  }), t;
}, jt = (e) => ({ transitionName: L(() => (a) => e && typeof e != "boolean" ? a ? e.open : e.close : ""), showTransition: !!e }), dt = {
  multiCalendars: { type: [Boolean, Number, String], default: null },
  modelValue: { type: [String, Date, Array, Object, Number], default: null },
  modelType: { type: String, default: null },
  position: { type: String, default: "center" },
  dark: { type: Boolean, default: !1 },
  format: {
    type: [String, Function],
    default: () => null
  },
  closeOnScroll: { type: Boolean, default: !1 },
  autoPosition: { type: Boolean, default: !0 },
  closeOnAutoApply: { type: Boolean, default: !0 },
  altPosition: { type: Function, default: null },
  transitions: { type: [Boolean, Object], default: !0 },
  formatLocale: { type: Object, default: null },
  utc: { type: [Boolean, String], default: !1 },
  ariaLabels: { type: Object, default: () => ({}) },
  offset: { type: [Number, String], default: 10 },
  hideNavigation: { type: Array, default: () => [] },
  timezone: { type: String, default: null },
  vertical: { type: Boolean, default: !1 },
  disableMonthYearSelect: { type: Boolean, default: !1 },
  disableYearSelect: { type: Boolean, default: !1 },
  menuClassName: { type: String, default: null },
  dayClass: { type: Function, default: null },
  yearRange: { type: Array, default: () => [1900, 2100] },
  multiCalendarsSolo: { type: Boolean, default: !1 },
  calendarCellClassName: { type: String, default: null },
  enableTimePicker: { type: Boolean, default: !0 },
  autoApply: { type: Boolean, default: !1 },
  disabledDates: { type: [Array, Function], default: () => [] },
  monthNameFormat: { type: String, default: "short" },
  startDate: { type: [Date, String], default: null },
  startTime: { type: [Object, Array], default: null },
  hideOffsetDates: { type: Boolean, default: !1 },
  autoRange: { type: [Number, String], default: null },
  noToday: { type: Boolean, default: !1 },
  disabledWeekDays: { type: Array, default: () => [] },
  allowedDates: { type: Array, default: null },
  showNowButton: { type: Boolean, default: !1 },
  nowButtonLabel: { type: String, default: "Now" },
  markers: { type: Array, default: () => [] },
  modeHeight: { type: [Number, String], default: 255 },
  escClose: { type: Boolean, default: !0 },
  spaceConfirm: { type: Boolean, default: !0 },
  monthChangeOnArrows: { type: Boolean, default: !0 },
  presetRanges: { type: Array, default: () => [] },
  flow: { type: Array, default: () => [] },
  partialFlow: { type: Boolean, default: !1 },
  preventMinMaxNavigation: { type: Boolean, default: !1 },
  minRange: { type: [Number, String], default: null },
  maxRange: { type: [Number, String], default: null },
  multiDatesLimit: { type: [Number, String], default: null },
  reverseYears: { type: Boolean, default: !1 },
  keepActionRow: { type: Boolean, default: !1 },
  weekPicker: { type: Boolean, default: !1 },
  filters: { type: Object, default: () => ({}) },
  arrowNavigation: { type: Boolean, default: !1 },
  multiStatic: { type: Boolean, default: !0 },
  disableTimeRangeValidation: { type: Boolean, default: !1 },
  highlight: {
    type: [Array, Function],
    default: null
  },
  highlightWeekDays: {
    type: Array,
    default: null
  },
  highlightDisabledDays: { type: Boolean, default: !1 },
  teleport: { type: [String, Boolean], default: null },
  teleportCenter: { type: Boolean, default: !1 },
  locale: { type: String, default: "en-Us" },
  weekNumName: { type: String, default: "W" },
  weekStart: { type: [Number, String], default: 1 },
  weekNumbers: {
    type: [String, Function],
    default: null
  },
  calendarClassName: { type: String, default: null },
  noSwipe: { type: Boolean, default: !1 },
  monthChangeOnScroll: { type: [Boolean, String], default: !0 },
  dayNames: {
    type: [Function, Array],
    default: null
  },
  monthPicker: { type: Boolean, default: !1 },
  customProps: { type: Object, default: null },
  yearPicker: { type: Boolean, default: !1 },
  modelAuto: { type: Boolean, default: !1 },
  selectText: { type: String, default: "Select" },
  cancelText: { type: String, default: "Cancel" },
  previewFormat: {
    type: [String, Function],
    default: () => ""
  },
  multiDates: { type: Boolean, default: !1 },
  partialRange: { type: Boolean, default: !0 },
  ignoreTimeValidation: { type: Boolean, default: !1 },
  minDate: { type: [Date, String], default: null },
  maxDate: { type: [Date, String], default: null },
  minTime: { type: Object, default: null },
  maxTime: { type: Object, default: null },
  name: { type: String, default: null },
  placeholder: { type: String, default: "" },
  hideInputIcon: { type: Boolean, default: !1 },
  clearable: { type: Boolean, default: !0 },
  state: { type: Boolean, default: null },
  required: { type: Boolean, default: !1 },
  autocomplete: { type: String, default: "off" },
  inputClassName: { type: String, default: null },
  inlineWithInput: { type: Boolean, default: !1 },
  textInputOptions: { type: Object, default: () => null },
  fixedStart: { type: Boolean, default: !1 },
  fixedEnd: { type: Boolean, default: !1 },
  timePicker: { type: Boolean, default: !1 },
  enableSeconds: { type: Boolean, default: !1 },
  is24: { type: Boolean, default: !0 },
  noHoursOverlay: { type: Boolean, default: !1 },
  noMinutesOverlay: { type: Boolean, default: !1 },
  noSecondsOverlay: { type: Boolean, default: !1 },
  hoursGridIncrement: { type: [String, Number], default: 1 },
  minutesGridIncrement: { type: [String, Number], default: 5 },
  secondsGridIncrement: { type: [String, Number], default: 5 },
  hoursIncrement: { type: [Number, String], default: 1 },
  minutesIncrement: { type: [Number, String], default: 1 },
  secondsIncrement: { type: [Number, String], default: 1 },
  range: { type: Boolean, default: !1 },
  uid: { type: String, default: null },
  disabled: { type: Boolean, default: !1 },
  readonly: { type: Boolean, default: !1 },
  inline: { type: Boolean, default: !1 },
  textInput: { type: Boolean, default: !1 },
  onClickOutside: { type: Function, default: null },
  noDisabledRange: { type: Boolean, default: !1 },
  sixWeeks: { type: [Boolean, String], default: !1 },
  actionRow: { type: Object, default: () => ({}) },
  allowPreventDefault: { type: Boolean, default: !1 },
  closeOnClearValue: { type: Boolean, default: !0 },
  focusStartDate: { type: Boolean, default: !1 },
  disabledTimes: { type: Function, default: void 0 },
  showLastInRange: { type: Boolean, default: !0 },
  timePickerInline: { type: Boolean, default: !1 },
  calendar: { type: Function, default: null },
  autoApplyMonth: { type: Boolean, default: !0 }
}, wl = {
  key: 1,
  class: "dp__input_wrap"
}, bl = ["id", "name", "inputmode", "placeholder", "disabled", "readonly", "required", "value", "autocomplete", "aria-label", "onKeydown"], Dl = {
  key: 2,
  class: "dp__clear_icon"
}, $l = /* @__PURE__ */ qe({
  __name: "DatepickerInput",
  props: {
    isMenuOpen: { type: Boolean, default: !1 },
    inputValue: { type: String, default: "" },
    ...dt
  },
  emits: [
    "clear",
    "open",
    "update:input-value",
    "set-input-date",
    "close",
    "select-date",
    "set-empty-date",
    "toggle",
    "focus-prev",
    "focus",
    "blur",
    "real-blur"
  ],
  setup(e, { expose: n, emit: a }) {
    const t = e, { getDefaultPattern: i, isValidDate: v, defaults: m, getDefaultStartTime: T, assignDefaultTime: Y } = xe(t), _ = H(), W = H(null), C = H(!1), c = H(!1), g = L(
      () => ({
        dp__pointer: !t.disabled && !t.readonly && !t.textInput,
        dp__disabled: t.disabled,
        dp__input_readonly: !t.textInput,
        dp__input: !0,
        dp__input_icon_pad: !t.hideInputIcon,
        dp__input_valid: t.state,
        dp__input_invalid: t.state === !1,
        dp__input_focus: C.value || t.isMenuOpen,
        dp__input_reg: !t.textInput,
        [t.inputClassName]: !!t.inputClassName
      })
    ), Q = () => {
      a("set-input-date", null), t.autoApply && (a("set-empty-date"), _.value = null);
    }, U = (f) => {
      var I;
      const N = T();
      return $a(
        f,
        ((I = m.value.textInputOptions) == null ? void 0 : I.format) || i(),
        N || Y({}),
        t.inputValue,
        c.value
      );
    }, x = (f) => {
      const { rangeSeparator: N } = m.value.textInputOptions, [I, E] = f.split(`${N}`);
      if (I) {
        const D = U(I.trim()), y = E ? U(E.trim()) : null, d = D && y ? [D, y] : [D];
        _.value = D ? d : null;
      }
    }, V = () => {
      c.value = !0;
    }, F = (f) => {
      if (t.range)
        x(f);
      else if (t.multiDates) {
        const N = f.split(";");
        _.value = N.map((I) => U(I.trim())).filter((I) => I);
      } else
        _.value = U(f);
    }, ae = (f) => {
      var I, E;
      const N = typeof f == "string" ? f : (I = f.target) == null ? void 0 : I.value;
      N !== "" ? ((E = m.value.textInputOptions) != null && E.openMenu && !t.isMenuOpen && a("open"), F(N), a("set-input-date", _.value)) : Q(), c.value = !1, a("update:input-value", N);
    }, oe = (f) => {
      var N, I;
      t.textInput ? (F(f.target.value), (N = m.value.textInputOptions) != null && N.enterSubmit && v(_.value) && t.inputValue !== "" ? (a("set-input-date", _.value, !0), _.value = null) : (I = m.value.textInputOptions) != null && I.enterSubmit && t.inputValue === "" && (_.value = null, a("clear"))) : J(f);
    }, B = (f) => {
      var N, I, E;
      t.textInput && ((N = m.value.textInputOptions) != null && N.tabSubmit) && F(f.target.value), (I = m.value.textInputOptions) != null && I.tabSubmit && v(_.value) && t.inputValue !== "" ? (a("set-input-date", _.value, !0), _.value = null) : (E = m.value.textInputOptions) != null && E.tabSubmit && t.inputValue === "" && (_.value = null, a("clear"));
    }, G = () => {
      C.value = !0, a("focus");
    }, J = (f) => {
      var N;
      f.preventDefault(), f.stopImmediatePropagation(), f.stopPropagation(), t.textInput && ((N = m.value.textInputOptions) != null && N.openMenu) && !t.inlineWithInput ? (a("toggle"), m.value.textInputOptions.enterSubmit && a("select-date")) : t.textInput || a("toggle");
    }, ne = () => {
      a("real-blur"), C.value = !1, (!t.isMenuOpen || t.inline && t.inlineWithInput) && a("blur"), t.autoApply && t.textInput && _.value && !t.isMenuOpen && (a("set-input-date", _.value), a("select-date"), _.value = null);
    }, ce = () => {
      a("clear");
    }, ye = (f) => {
      if (!t.textInput) {
        if (f.code === "Tab")
          return;
        f.preventDefault();
      }
    };
    return n({
      focusInput: () => {
        var f;
        (f = W.value) == null || f.focus({ preventScroll: !0 });
      },
      setParsedDate: (f) => {
        _.value = f;
      }
    }), (f, N) => {
      var I;
      return p(), R("div", { onClick: J }, [
        f.$slots.trigger && !f.$slots["dp-input"] && !f.inline ? K(f.$slots, "trigger", { key: 0 }) : P("", !0),
        !f.$slots.trigger && (!f.inline || f.inlineWithInput) ? (p(), R("div", wl, [
          f.$slots["dp-input"] && !f.$slots.trigger && !f.inline ? K(f.$slots, "dp-input", {
            key: 0,
            value: e.inputValue,
            isMenuOpen: e.isMenuOpen,
            onInput: ae,
            onEnter: oe,
            onTab: B,
            onClear: ce,
            onBlur: ne,
            onKeypress: ye,
            onPaste: V
          }) : P("", !0),
          f.$slots["dp-input"] ? P("", !0) : (p(), R("input", {
            key: 1,
            ref_key: "inputRef",
            ref: W,
            id: f.uid ? `dp-input-${f.uid}` : void 0,
            name: f.name,
            class: he(g.value),
            inputmode: f.textInput ? "text" : "none",
            placeholder: f.placeholder,
            disabled: f.disabled,
            readonly: f.readonly,
            required: f.required,
            value: e.inputValue,
            autocomplete: f.autocomplete,
            "aria-label": (I = $(m).ariaLabels) == null ? void 0 : I.input,
            onInput: ae,
            onKeydown: [
              de(oe, ["enter"]),
              de(B, ["tab"]),
              ye
            ],
            onBlur: ne,
            onFocus: G,
            onKeypress: ye,
            onPaste: V
          }, null, 42, bl)),
          le("div", {
            onClick: N[2] || (N[2] = (E) => a("toggle"))
          }, [
            f.$slots["input-icon"] && !f.hideInputIcon ? (p(), R("span", {
              key: 0,
              class: "dp__input_icon",
              onClick: N[0] || (N[0] = (E) => a("toggle"))
            }, [
              K(f.$slots, "input-icon")
            ])) : P("", !0),
            !f.$slots["input-icon"] && !f.hideInputIcon && !f.$slots["dp-input"] ? (p(), ge($(Kt), {
              key: 1,
              onClick: N[1] || (N[1] = (E) => a("toggle")),
              class: "dp__input_icon dp__input_icons"
            })) : P("", !0)
          ]),
          f.$slots["clear-icon"] && e.inputValue && f.clearable && !f.disabled && !f.readonly ? (p(), R("span", Dl, [
            K(f.$slots, "clear-icon", { clear: ce })
          ])) : P("", !0),
          f.clearable && !f.$slots["clear-icon"] && e.inputValue && !f.disabled && !f.readonly ? (p(), ge($(Da), {
            key: 3,
            class: "dp__clear_icon dp__input_icons",
            onClick: He(ce, ["stop", "prevent"])
          }, null, 8, ["onClick"])) : P("", !0)
        ])) : P("", !0)
      ]);
    };
  }
}), Ml = ["title"], Al = { class: "dp__action_buttons" }, Tl = ["onKeydown", "disabled"], Sl = /* @__PURE__ */ qe({
  __name: "ActionRow",
  props: {
    menuMount: { type: Boolean, default: !1 },
    internalModelValue: { type: [Date, Array], default: null },
    calendarWidth: { type: Number, default: 0 },
    ...dt
  },
  emits: ["close-picker", "select-date", "select-now", "invalid-select"],
  setup(e, { emit: n }) {
    const a = e, { formatDate: t, isValidTime: i, defaults: v } = xe(a), { buildMatrix: m } = ut(), T = H(null), Y = H(null);
    Ge(() => {
      a.arrowNavigation && m([Ae(T), Ae(Y)], "actionRow");
    });
    const _ = L(() => a.range && !a.partialRange && a.internalModelValue ? a.internalModelValue.length === 2 : !0), W = L(() => !C.value || !c.value || !_.value), C = L(() => !a.enableTimePicker || a.ignoreTimeValidation ? !0 : i(a.internalModelValue)), c = L(() => a.monthPicker ? a.range && Array.isArray(a.internalModelValue) ? !a.internalModelValue.filter((G) => !ae(G)).length : ae(a.internalModelValue) : !0), g = () => {
      const B = v.value.previewFormat;
      return a.timePicker || a.monthPicker, B(_e(a.internalModelValue));
    }, Q = () => {
      const B = a.internalModelValue;
      return v.value.multiCalendars > 0 ? `${U(B[0])} - ${U(B[1])}` : [U(B[0]), U(B[1])];
    }, U = (B) => t(B, v.value.previewFormat), x = L(() => !a.internalModelValue || !a.menuMount ? "" : typeof v.value.previewFormat == "string" ? Array.isArray(a.internalModelValue) ? a.internalModelValue.length === 2 && a.internalModelValue[1] ? Q() : a.multiDates ? a.internalModelValue.map((B) => `${U(B)}`) : a.modelAuto ? `${U(a.internalModelValue[0])}` : `${U(a.internalModelValue[0])} -` : U(a.internalModelValue) : g()), V = () => a.multiDates ? "; " : " - ", F = L(
      () => Array.isArray(x.value) ? x.value.join(V()) : x.value
    ), ae = (B) => {
      if (!a.monthPicker)
        return !0;
      let G = !0;
      const J = A(Pt(B));
      if (a.minDate && a.maxDate) {
        const ne = A(Pt(a.minDate)), ce = A(Pt(a.maxDate));
        return Fe(J, ne) && Ve(J, ce) || ke(J, ne) || ke(J, ce);
      }
      if (a.minDate) {
        const ne = A(Pt(a.minDate));
        G = Fe(J, ne) || ke(J, ne);
      }
      if (a.maxDate) {
        const ne = A(Pt(a.maxDate));
        G = Ve(J, ne) || ke(J, ne);
      }
      return G;
    }, oe = () => {
      C.value && c.value && _.value ? n("select-date") : n("invalid-select");
    };
    return (B, G) => (p(), R("div", {
      class: "dp__action_row",
      style: it(e.calendarWidth ? { width: `${e.calendarWidth}px` } : {})
    }, [
      B.$slots["action-row"] ? K(B.$slots, "action-row", Be(Ce({ key: 0 }, {
        internalModelValue: e.internalModelValue,
        disabled: W.value,
        selectDate: () => B.$emit("select-date"),
        closePicker: () => B.$emit("close-picker")
      }))) : (p(), R(ve, { key: 1 }, [
        $(v).actionRow.showPreview ? (p(), R("div", {
          key: 0,
          class: "dp__selection_preview",
          title: F.value
        }, [
          B.$slots["action-preview"] ? K(B.$slots, "action-preview", {
            key: 0,
            value: e.internalModelValue
          }) : P("", !0),
          B.$slots["action-preview"] ? P("", !0) : (p(), R(ve, { key: 1 }, [
            Qe(Ye(F.value), 1)
          ], 64))
        ], 8, Ml)) : P("", !0),
        le("div", Al, [
          B.$slots["action-buttons"] ? K(B.$slots, "action-buttons", {
            key: 0,
            value: e.internalModelValue
          }) : P("", !0),
          B.$slots["action-buttons"] ? P("", !0) : (p(), R(ve, { key: 1 }, [
            !B.inline && $(v).actionRow.showCancel ? (p(), R("button", {
              key: 0,
              type: "button",
              ref_key: "cancelButtonRef",
              ref: T,
              class: "dp__action_button dp__action_cancel",
              onClick: G[0] || (G[0] = (J) => B.$emit("close-picker")),
              onKeydown: [
                G[1] || (G[1] = de((J) => B.$emit("close-picker"), ["enter"])),
                G[2] || (G[2] = de((J) => B.$emit("close-picker"), ["space"]))
              ]
            }, Ye(B.cancelText), 545)) : P("", !0),
            B.showNowButton || $(v).actionRow.showNow ? (p(), R("button", {
              key: 1,
              type: "button",
              ref_key: "cancelButtonRef",
              ref: T,
              class: "dp__action_button dp__action_cancel",
              onClick: G[3] || (G[3] = (J) => B.$emit("select-now")),
              onKeydown: [
                G[4] || (G[4] = de((J) => B.$emit("select-now"), ["enter"])),
                G[5] || (G[5] = de((J) => B.$emit("select-now"), ["space"]))
              ]
            }, Ye(B.nowButtonLabel), 545)) : P("", !0),
            $(v).actionRow.showSelect ? (p(), R("button", {
              key: 2,
              type: "button",
              class: "dp__action_button dp__action_select",
              onKeydown: [
                de(oe, ["enter"]),
                de(oe, ["space"])
              ],
              onClick: oe,
              disabled: W.value,
              ref_key: "selectButtonRef",
              ref: Y
            }, Ye(B.selectText), 41, Tl)) : P("", !0)
          ], 64))
        ])
      ], 64))
    ], 4));
  }
}), Pl = ["aria-label"], _l = {
  class: "dp__calendar_header",
  role: "row"
}, Cl = {
  key: 0,
  class: "dp__calendar_header_item",
  role: "gridcell"
}, Nl = /* @__PURE__ */ le("div", { class: "dp__calendar_header_separator" }, null, -1), Rl = ["aria-label"], Il = {
  key: 0,
  role: "gridcell",
  class: "dp__calendar_item dp__week_num"
}, Ol = { class: "dp__cell_inner" }, Bl = ["aria-selected", "aria-disabled", "aria-label", "onClick", "onKeydown", "onMouseenter", "onMouseleave"], Yl = /* @__PURE__ */ qe({
  __name: "Calendar",
  props: {
    mappedDates: { type: Array, default: () => [] },
    getWeekNum: {
      type: Function,
      default: () => ""
    },
    specificMode: { type: Boolean, default: !1 },
    instance: { type: Number, default: 0 },
    month: { type: Number, default: 0 },
    year: { type: Number, default: 0 },
    ...dt
  },
  emits: [
    "select-date",
    "set-hover-date",
    "handle-scroll",
    "mount",
    "handle-swipe",
    "handle-space",
    "tooltip-open",
    "tooltip-close"
  ],
  setup(e, { expose: n, emit: a }) {
    const t = e, { buildMultiLevelMatrix: i } = ut(), { setDateMonthOrYear: v, defaults: m } = xe(t), T = H(null), Y = H({
      bottom: "",
      left: "",
      transform: ""
    }), _ = H([]), W = H(null), C = H(!0), c = H(""), g = H({ startX: 0, endX: 0, startY: 0, endY: 0 }), Q = H([]), U = H({ left: "50%" }), x = L(() => t.calendar ? t.calendar(t.mappedDates) : t.mappedDates), V = L(() => t.dayNames ? Array.isArray(t.dayNames) ? t.dayNames : t.dayNames(t.locale, +t.weekStart) : el(t.formatLocale, t.locale, +t.weekStart));
    Ge(() => {
      a("mount", { cmp: "calendar", refs: _ }), t.noSwipe || W.value && (W.value.addEventListener("touchstart", w, { passive: !1 }), W.value.addEventListener("touchend", f, { passive: !1 }), W.value.addEventListener("touchmove", N, { passive: !1 })), t.monthChangeOnScroll && W.value && W.value.addEventListener("wheel", D, { passive: !1 });
    });
    const F = (y) => y ? t.vertical ? "vNext" : "next" : t.vertical ? "vPrevious" : "previous", ae = (y, d) => {
      if (t.transitions) {
        const u = je(v(A(), t.month, t.year));
        c.value = Fe(je(v(A(), y, d)), u) ? m.value.transitions[F(!0)] : m.value.transitions[F(!1)], C.value = !1, st(() => {
          C.value = !0;
        });
      }
    }, oe = L(
      () => ({
        [t.calendarClassName]: !!t.calendarClassName
      })
    ), B = L(() => (y) => {
      const d = ll(y);
      return {
        dp__marker_dot: d.type === "dot",
        dp__marker_line: d.type === "line"
      };
    }), G = L(() => (y) => ke(y, T.value)), J = L(() => ({
      dp__calendar: !0,
      dp__calendar_next: m.value.multiCalendars > 0 && t.instance !== 0
    })), ne = L(() => (y) => t.hideOffsetDates ? y.current : !0), ce = L(() => t.specificMode ? { height: `${t.modeHeight}px` } : void 0), ye = async (y, d, u) => {
      var S, b;
      if (a("set-hover-date", y), (b = (S = y.marker) == null ? void 0 : S.tooltip) != null && b.length) {
        const Z = Ae(_.value[d][u]);
        if (Z) {
          const { width: r, height: o } = Z.getBoundingClientRect();
          T.value = y.value;
          let l = { left: `${r / 2}px` }, M = -50;
          if (await st(), Q.value[0]) {
            const { left: re, width: se } = Q.value[0].getBoundingClientRect();
            re < 0 && (l = { left: "0" }, M = 0, U.value.left = `${r / 2}px`), window.innerWidth < re + se && (l = { right: "0" }, M = 0, U.value.left = `${se - r / 2}px`);
          }
          Y.value = {
            bottom: `${o}px`,
            ...l,
            transform: `translateX(${M}%)`
          }, a("tooltip-open", y.marker);
        }
      }
    }, O = (y) => {
      T.value && (T.value = null, Y.value = JSON.parse(JSON.stringify({ bottom: "", left: "", transform: "" })), a("tooltip-close", y.marker));
    }, w = (y) => {
      g.value.startX = y.changedTouches[0].screenX, g.value.startY = y.changedTouches[0].screenY;
    }, f = (y) => {
      g.value.endX = y.changedTouches[0].screenX, g.value.endY = y.changedTouches[0].screenY, I();
    }, N = (y) => {
      t.vertical && !t.inline && y.preventDefault();
    }, I = () => {
      const y = t.vertical ? "Y" : "X";
      Math.abs(g.value[`start${y}`] - g.value[`end${y}`]) > 10 && a("handle-swipe", g.value[`start${y}`] > g.value[`end${y}`] ? "right" : "left");
    }, E = (y, d, u) => {
      y && (Array.isArray(_.value[d]) ? _.value[d][u] = y : _.value[d] = [y]), t.arrowNavigation && i(_.value, "calendar");
    }, D = (y) => {
      t.monthChangeOnScroll && (y.preventDefault(), a("handle-scroll", y));
    };
    return n({ triggerTransition: ae }), (y, d) => {
      var u;
      return p(), R("div", {
        class: he(J.value)
      }, [
        le("div", {
          style: it(ce.value),
          ref_key: "calendarWrapRef",
          ref: W,
          role: "grid",
          class: he(oe.value),
          "aria-label": (u = $(m).ariaLabels) == null ? void 0 : u.calendarWrap
        }, [
          e.specificMode ? P("", !0) : (p(), R(ve, { key: 0 }, [
            le("div", _l, [
              y.weekNumbers ? (p(), R("div", Cl, Ye(y.weekNumName), 1)) : P("", !0),
              (p(!0), R(ve, null, Ne(V.value, (S, b) => (p(), R("div", {
                class: "dp__calendar_header_item",
                role: "gridcell",
                key: b
              }, [
                y.$slots["calendar-header"] ? K(y.$slots, "calendar-header", {
                  key: 0,
                  day: S,
                  index: b
                }) : P("", !0),
                y.$slots["calendar-header"] ? P("", !0) : (p(), R(ve, { key: 1 }, [
                  Qe(Ye(S), 1)
                ], 64))
              ]))), 128))
            ]),
            Nl,
            kt(At, {
              name: c.value,
              css: !!y.transitions
            }, {
              default: fe(() => {
                var S;
                return [
                  C.value ? (p(), R("div", {
                    key: 0,
                    class: "dp__calendar",
                    role: "grid",
                    "aria-label": (S = $(m).ariaLabels) == null ? void 0 : S.calendarDays
                  }, [
                    (p(!0), R(ve, null, Ne(x.value, (b, Z) => (p(), R("div", {
                      class: "dp__calendar_row",
                      role: "row",
                      key: Z
                    }, [
                      y.weekNumbers ? (p(), R("div", Il, [
                        le("div", Ol, Ye(e.getWeekNum(b.days)), 1)
                      ])) : P("", !0),
                      (p(!0), R(ve, null, Ne(b.days, (r, o) => {
                        var l, M, re;
                        return p(), R("div", {
                          role: "gridcell",
                          class: "dp__calendar_item",
                          ref_for: !0,
                          ref: (se) => E(se, Z, o),
                          key: o + Z,
                          "aria-selected": r.classData.dp__active_date || r.classData.dp__range_start || r.classData.dp__range_start,
                          "aria-disabled": r.classData.dp__cell_disabled,
                          "aria-label": (M = (l = $(m).ariaLabels) == null ? void 0 : l.day) == null ? void 0 : M.call(l, r),
                          tabindex: "0",
                          onClick: He((se) => y.$emit("select-date", r), ["stop", "prevent"]),
                          onKeydown: [
                            de((se) => y.$emit("select-date", r), ["enter"]),
                            de((se) => y.$emit("handle-space", r), ["space"])
                          ],
                          onMouseenter: (se) => ye(r, Z, o),
                          onMouseleave: (se) => O(r)
                        }, [
                          le("div", {
                            class: he(["dp__cell_inner", r.classData])
                          }, [
                            y.$slots.day && ne.value(r) ? K(y.$slots, "day", {
                              key: 0,
                              day: +r.text,
                              date: r.value
                            }) : P("", !0),
                            y.$slots.day ? P("", !0) : (p(), R(ve, { key: 1 }, [
                              Qe(Ye(r.text), 1)
                            ], 64)),
                            r.marker && ne.value(r) ? (p(), R(ve, { key: 2 }, [
                              y.$slots.marker ? K(y.$slots, "marker", {
                                key: 0,
                                marker: r.marker,
                                day: +r.text,
                                date: r.value
                              }) : (p(), R("div", {
                                key: 1,
                                class: he(B.value(r.marker)),
                                style: it(r.marker.color ? { backgroundColor: r.marker.color } : {})
                              }, null, 6))
                            ], 64)) : P("", !0),
                            G.value(r.value) ? (p(), R("div", {
                              key: 3,
                              class: "dp__marker_tooltip",
                              ref_for: !0,
                              ref_key: "activeTooltip",
                              ref: Q,
                              style: it(Y.value)
                            }, [
                              (re = r.marker) != null && re.tooltip ? (p(), R("div", {
                                key: 0,
                                class: "dp__tooltip_content",
                                onClick: d[0] || (d[0] = He(() => {
                                }, ["stop"]))
                              }, [
                                (p(!0), R(ve, null, Ne(r.marker.tooltip, (se, Pe) => (p(), R("div", {
                                  key: Pe,
                                  class: "dp__tooltip_text"
                                }, [
                                  y.$slots["marker-tooltip"] ? K(y.$slots, "marker-tooltip", {
                                    key: 0,
                                    tooltip: se,
                                    day: r.value
                                  }) : P("", !0),
                                  y.$slots["marker-tooltip"] ? P("", !0) : (p(), R(ve, { key: 1 }, [
                                    le("div", {
                                      class: "dp__tooltip_mark",
                                      style: it(se.color ? { backgroundColor: se.color } : {})
                                    }, null, 4),
                                    le("div", null, Ye(se.text), 1)
                                  ], 64))
                                ]))), 128)),
                                le("div", {
                                  class: "dp__arrow_bottom_tp",
                                  style: it(U.value)
                                }, null, 4)
                              ])) : P("", !0)
                            ], 4)) : P("", !0)
                          ], 2)
                        ], 40, Bl);
                      }), 128))
                    ]))), 128))
                  ], 8, Rl)) : P("", !0)
                ];
              }),
              _: 3
            }, 8, ["name", "css"])
          ], 64))
        ], 14, Pl)
      ], 2);
    };
  }
}), Vl = ["aria-label", "aria-disabled"], un = /* @__PURE__ */ qe({
  __name: "ActionIcon",
  props: {
    ariaLabel: {},
    disabled: { type: Boolean }
  },
  emits: ["activate", "set-ref"],
  setup(e, { emit: n }) {
    const a = H(null);
    return Ge(() => n("set-ref", a)), (t, i) => (p(), R("button", {
      type: "button",
      class: "dp__btn dp__month_year_col_nav",
      onClick: i[0] || (i[0] = (v) => t.$emit("activate")),
      onKeydown: [
        i[1] || (i[1] = de(He((v) => t.$emit("activate"), ["prevent"]), ["enter"])),
        i[2] || (i[2] = de(He((v) => t.$emit("activate"), ["prevent"]), ["space"]))
      ],
      tabindex: "0",
      "aria-label": t.ariaLabel,
      "aria-disabled": t.disabled,
      ref_key: "elRef",
      ref: a
    }, [
      le("span", {
        class: he(["dp__inner_nav", { dp__inner_nav_disabled: t.disabled }])
      }, [
        K(t.$slots, "default")
      ], 2)
    ], 40, Vl));
  }
}), El = ["onKeydown"], Ll = { class: "dp__selection_grid_header" }, Fl = ["aria-selected", "aria-disabled", "onClick", "onKeydown", "onMouseover"], Ul = ["aria-label", "onKeydown"], Rt = /* @__PURE__ */ qe({
  __name: "SelectionGrid",
  props: {
    items: { type: Array, default: () => [] },
    modelValue: { type: [String, Number], default: null },
    multiModelValue: { type: Array, default: () => [] },
    disabledValues: { type: Array, default: () => [] },
    minValue: { type: [Number, String], default: null },
    maxValue: { type: [Number, String], default: null },
    year: { type: Number, default: 0 },
    skipActive: { type: Boolean, default: !1 },
    headerRefs: { type: Array, default: () => [] },
    skipButtonRef: { type: Boolean, default: !1 },
    monthPicker: { type: Boolean, default: !1 },
    yearPicker: { type: Boolean, default: !1 },
    escClose: { type: Boolean, default: !0 },
    type: { type: String, default: null },
    arrowNavigation: { type: Boolean, default: !1 },
    autoApply: { type: Boolean, default: !1 },
    textInput: { type: Boolean, default: !1 },
    ariaLabels: { type: Object, default: () => ({}) },
    hideNavigation: { type: Array, default: () => [] },
    internalModelValue: { type: [Date, Array], default: null },
    autoApplyMonth: { type: Boolean, default: !1 }
  },
  emits: ["update:model-value", "selected", "toggle", "reset-flow"],
  setup(e, { expose: n, emit: a }) {
    const t = e, { setSelectionGrid: i, buildMultiLevelMatrix: v, setMonthPicker: m } = ut(), { hideNavigationButtons: T } = xe(t), Y = H(!1), _ = H(null), W = H(null), C = H([]), c = H(), g = H(null), Q = H(0), U = H(null);
    ia(() => {
      _.value = null;
    }), Ge(() => {
      var D;
      st().then(() => ce()), V(), x(!0), (D = _.value) == null || D.focus({ preventScroll: !0 });
    }), pn(() => x(!1));
    const x = (D) => {
      var y;
      t.arrowNavigation && ((y = t.headerRefs) != null && y.length ? m(D) : i(D));
    }, V = () => {
      const D = Ae(W);
      D && (t.textInput || D.focus({ preventScroll: !0 }), Y.value = D.clientHeight < D.scrollHeight);
    }, F = L(
      () => ({
        dp__overlay: !0
      })
    ), ae = L(() => ({
      dp__overlay_col: !0
    })), oe = (D) => t.monthPicker && !t.autoApplyMonth ? ke(
      t.internalModelValue,
      rt(Ct(/* @__PURE__ */ new Date(), D.value), t.year)
    ) : t.skipActive ? !1 : D.value === t.modelValue, B = L(() => t.items.map((D) => D.filter((y) => y).map((y) => {
      var S, b, Z;
      const d = t.disabledValues.some((r) => r === y.value) || ne(y.value), u = (S = t.multiModelValue) != null && S.length ? (b = t.multiModelValue) == null ? void 0 : b.some(
        (r) => ke(
          r,
          rt(
            t.monthPicker ? Ct(/* @__PURE__ */ new Date(), y.value) : /* @__PURE__ */ new Date(),
            t.monthPicker ? t.year : y.value
          )
        )
      ) : oe(y);
      return {
        ...y,
        className: {
          dp__overlay_cell_active: u,
          dp__overlay_cell: !u,
          dp__overlay_cell_disabled: d,
          dp__overlay_cell_active_disabled: d && u,
          dp__overlay_cell_pad: !0,
          dp__cell_in_between: (Z = t.multiModelValue) != null && Z.length && t.skipActive ? O(y.value) : !1
        }
      };
    }))), G = L(
      () => ({
        dp__button: !0,
        dp__overlay_action: !0,
        dp__over_action_scroll: Y.value,
        dp__button_bottom: t.autoApply
      })
    ), J = L(() => {
      var D, y;
      return {
        dp__overlay_container: !0,
        dp__container_flex: ((D = t.items) == null ? void 0 : D.length) <= 6,
        dp__container_block: ((y = t.items) == null ? void 0 : y.length) > 6
      };
    }), ne = (D) => {
      const y = t.maxValue || t.maxValue === 0, d = t.minValue || t.minValue === 0;
      return !y && !d ? !1 : y && d ? +D > +t.maxValue || +D < +t.minValue : y ? +D > +t.maxValue : d ? +D < +t.minValue : !1;
    }, ce = () => {
      const D = Ae(_), y = Ae(W), d = Ae(g), u = Ae(U), S = d ? d.getBoundingClientRect().height : 0;
      y && (Q.value = y.getBoundingClientRect().height - S), D && u && (u.scrollTop = D.offsetTop - u.offsetTop - (Q.value / 2 - D.getBoundingClientRect().height) - S);
    }, ye = (D) => {
      !t.disabledValues.some((y) => y === D) && !ne(D) && (a("update:model-value", D), a("selected"));
    }, O = (D) => {
      const y = t.monthPicker ? t.year : D;
      return ea(
        t.multiModelValue,
        rt(
          t.monthPicker ? Ct(/* @__PURE__ */ new Date(), c.value || 0) : /* @__PURE__ */ new Date(),
          t.monthPicker ? y : c.value || y
        ),
        rt(t.monthPicker ? Ct(/* @__PURE__ */ new Date(), D) : /* @__PURE__ */ new Date(), y)
      );
    }, w = () => {
      a("toggle"), a("reset-flow");
    }, f = () => {
      t.escClose && w();
    }, N = (D, y, d, u) => {
      D && (y.value === +t.modelValue && !t.disabledValues.includes(y.value) && (_.value = D), t.arrowNavigation && (Array.isArray(C.value[d]) ? C.value[d][u] = D : C.value[d] = [D], I()));
    }, I = () => {
      var y, d;
      const D = (y = t.headerRefs) != null && y.length ? [t.headerRefs].concat(C.value) : C.value.concat([t.skipButtonRef ? [] : [g.value]]);
      v(_e(D), (d = t.headerRefs) != null && d.length ? "monthPicker" : "selectionGrid");
    }, E = (D) => {
      t.arrowNavigation || D.stopImmediatePropagation();
    };
    return n({ focusGrid: V }), (D, y) => {
      var d;
      return p(), R("div", {
        ref_key: "gridWrapRef",
        ref: W,
        class: he(F.value),
        role: "dialog",
        tabindex: "0",
        onKeydown: [
          de(f, ["esc"]),
          y[0] || (y[0] = de((u) => E(u), ["left"])),
          y[1] || (y[1] = de((u) => E(u), ["up"])),
          y[2] || (y[2] = de((u) => E(u), ["down"])),
          y[3] || (y[3] = de((u) => E(u), ["right"]))
        ]
      }, [
        le("div", {
          class: he(J.value),
          ref_key: "containerRef",
          ref: U,
          role: "grid",
          style: it({ height: `${Q.value}px` })
        }, [
          le("div", Ll, [
            K(D.$slots, "header")
          ]),
          D.$slots.overlay ? K(D.$slots, "overlay", { key: 0 }) : (p(!0), R(ve, { key: 1 }, Ne(B.value, (u, S) => (p(), R("div", {
            class: he(["dp__overlay_row", { dp__flex_row: B.value.length >= 3 }]),
            key: S,
            role: "row"
          }, [
            (p(!0), R(ve, null, Ne(u, (b, Z) => (p(), R("div", {
              role: "gridcell",
              class: he(ae.value),
              key: b.value,
              "aria-selected": b.value === e.modelValue && !e.disabledValues.includes(b.value),
              "aria-disabled": b.className.dp__overlay_cell_disabled,
              ref_for: !0,
              ref: (r) => N(r, b, S, Z),
              tabindex: "0",
              onClick: (r) => ye(b.value),
              onKeydown: [
                de((r) => ye(b.value), ["enter"]),
                de((r) => ye(b.value), ["space"])
              ],
              onMouseover: (r) => c.value = b.value
            }, [
              le("div", {
                class: he(b.className)
              }, [
                D.$slots.item ? K(D.$slots, "item", {
                  key: 0,
                  item: b
                }) : P("", !0),
                D.$slots.item ? P("", !0) : (p(), R(ve, { key: 1 }, [
                  Qe(Ye(b.text), 1)
                ], 64))
              ], 2)
            ], 42, Fl))), 128))
          ], 2))), 128))
        ], 6),
        D.$slots["button-icon"] ? Ut((p(), R("div", {
          key: 0,
          role: "button",
          "aria-label": (d = e.ariaLabels) == null ? void 0 : d.toggleOverlay,
          class: he(G.value),
          tabindex: "0",
          ref_key: "toggleButton",
          ref: g,
          onClick: w,
          onKeydown: [
            de(w, ["enter"]),
            de(w, ["tab"])
          ]
        }, [
          K(D.$slots, "button-icon")
        ], 42, Ul)), [
          [Wt, !$(T)(e.type)]
        ]) : P("", !0)
      ], 42, El);
    };
  }
}), Wl = ["aria-label"], zn = /* @__PURE__ */ qe({
  __name: "RegularPicker",
  props: {
    ariaLabel: { type: String, default: "" },
    showSelectionGrid: { type: Boolean, default: !1 },
    modelValue: { type: Number, default: null },
    items: { type: Array, default: () => [] },
    disabledValues: { type: Array, default: () => [] },
    minValue: { type: Number, default: null },
    maxValue: { type: Number, default: null },
    slotName: { type: String, default: "" },
    overlaySlot: { type: String, default: "" },
    headerRefs: { type: Array, default: () => [] },
    escClose: { type: Boolean, default: !0 },
    type: { type: String, default: null },
    transitions: { type: [Object, Boolean], default: !1 },
    arrowNavigation: { type: Boolean, default: !1 },
    autoApply: { type: Boolean, default: !1 },
    textInput: { type: Boolean, default: !1 },
    ariaLabels: { type: Object, default: () => ({}) },
    hideNavigation: { type: Array, default: () => [] }
  },
  emits: ["update:model-value", "toggle", "set-ref"],
  setup(e, { emit: n }) {
    const a = e, { transitionName: t, showTransition: i } = jt(a.transitions), v = H(null);
    return Ge(() => n("set-ref", v)), (m, T) => (p(), R(ve, null, [
      le("button", {
        type: "button",
        class: "dp__btn dp__month_year_select",
        onClick: T[0] || (T[0] = (Y) => m.$emit("toggle")),
        onKeydown: [
          T[1] || (T[1] = de(He((Y) => m.$emit("toggle"), ["prevent"]), ["enter"])),
          T[2] || (T[2] = de(He((Y) => m.$emit("toggle"), ["prevent"]), ["space"]))
        ],
        "aria-label": e.ariaLabel,
        tabindex: "0",
        ref_key: "elRef",
        ref: v
      }, [
        K(m.$slots, "default")
      ], 40, Wl),
      kt(At, {
        name: $(t)(e.showSelectionGrid),
        css: $(i)
      }, {
        default: fe(() => [
          e.showSelectionGrid ? (p(), ge(Rt, Ce({ key: 0 }, {
            modelValue: e.modelValue,
            items: e.items,
            disabledValues: e.disabledValues,
            minValue: e.minValue,
            maxValue: e.maxValue,
            escClose: e.escClose,
            type: e.type,
            arrowNavigation: e.arrowNavigation,
            textInput: e.textInput,
            autoApply: e.autoApply,
            ariaLabels: e.ariaLabels,
            hideNavigation: e.hideNavigation
          }, {
            "header-refs": [],
            "onUpdate:modelValue": T[3] || (T[3] = (Y) => m.$emit("update:model-value", Y)),
            onToggle: T[4] || (T[4] = (Y) => m.$emit("toggle"))
          }), We({
            "button-icon": fe(() => [
              m.$slots["calendar-icon"] ? K(m.$slots, "calendar-icon", { key: 0 }) : P("", !0),
              m.$slots["calendar-icon"] ? P("", !0) : (p(), ge($(Kt), { key: 1 }))
            ]),
            _: 2
          }, [
            m.$slots[e.slotName] ? {
              name: "item",
              fn: fe(({ item: Y }) => [
                K(m.$slots, e.slotName, { item: Y })
              ]),
              key: "0"
            } : void 0,
            m.$slots[e.overlaySlot] ? {
              name: "overlay",
              fn: fe(() => [
                K(m.$slots, e.overlaySlot)
              ]),
              key: "1"
            } : void 0,
            m.$slots[`${e.overlaySlot}-header`] ? {
              name: "header",
              fn: fe(() => [
                K(m.$slots, `${e.overlaySlot}-header`)
              ]),
              key: "2"
            } : void 0
          ]), 1040)) : P("", !0)
        ]),
        _: 3
      }, 8, ["name", "css"])
    ], 64));
  }
}), Hl = { class: "dp__month_year_row" }, xl = { class: "dp__month_picker_header" }, zl = ["aria-label"], Kl = ["aria-label"], jl = ["aria-label"], Gl = /* @__PURE__ */ qe({
  __name: "MonthYearPicker",
  props: {
    month: { type: Number, default: 0 },
    year: { type: Number, default: 0 },
    instance: { type: Number, default: 0 },
    years: { type: Array, default: () => [] },
    months: { type: Array, default: () => [] },
    internalModelValue: { type: [Date, Array], default: null },
    ...dt
  },
  emits: ["update-month-year", "month-year-select", "mount", "reset-flow", "overlay-closed"],
  setup(e, { expose: n, emit: a }) {
    const t = e, { defaults: i } = xe(t), { transitionName: v, showTransition: m } = jt(i.value.transitions), { buildMatrix: T } = ut(), { handleMonthYearChange: Y, isDisabled: _, updateMonthYear: W } = gl(t, a), C = H(!1), c = H(!1), g = H([null, null, null, null]), Q = H(null), U = H(null), x = H(null);
    Ge(() => {
      a("mount");
    });
    const V = (o) => ({
      get: () => t[o],
      set: (l) => {
        const M = o === "month" ? "year" : "month";
        a("update-month-year", { [o]: l, [M]: t[M] }), a("month-year-select", o === "year"), o === "month" ? u(!0) : S(!0);
      }
    }), F = L(V("month")), ae = L(V("year")), oe = (o) => {
      const l = De(A(o));
      return t.year === l;
    }, B = L(() => t.monthPicker ? Array.isArray(t.disabledDates) ? t.disabledDates.map((o) => A(o)).filter((o) => oe(o)).map((o) => we(o)) : [] : []), G = L(() => (o) => {
      const l = o === "month";
      return {
        showSelectionGrid: (l ? C : c).value,
        items: (l ? I : E).value,
        disabledValues: i.value.filters[l ? "months" : "years"].concat(B.value),
        minValue: (l ? ye : ne).value,
        maxValue: (l ? O : ce).value,
        headerRefs: l && t.monthPicker ? [Q.value, U.value, x.value] : [],
        escClose: t.escClose,
        transitions: i.value.transitions,
        ariaLabels: i.value.ariaLabels,
        textInput: t.textInput,
        autoApply: t.autoApply,
        arrowNavigation: t.arrowNavigation,
        hideNavigation: t.hideNavigation
      };
    }), J = L(() => (o) => ({
      month: t.month,
      year: t.year,
      items: o === "month" ? t.months : t.years,
      instance: t.instance,
      updateMonthYear: W,
      toggle: o === "month" ? u : S
    })), ne = L(() => t.minDate ? De(A(t.minDate)) : null), ce = L(() => t.maxDate ? De(A(t.maxDate)) : null), ye = L(() => {
      if (t.minDate && ne.value) {
        if (ne.value > t.year)
          return 12;
        if (ne.value === t.year)
          return we(A(t.minDate));
      }
      return null;
    }), O = L(() => t.maxDate && ce.value ? ce.value < t.year ? -1 : ce.value === t.year ? we(A(t.maxDate)) : null : null), w = L(() => (t.range || t.multiDates) && t.internalModelValue && (t.monthPicker || t.yearPicker) ? t.internalModelValue : []), f = (o) => {
      const l = [], M = (re) => re;
      for (let re = 0; re < o.length; re += 3) {
        const se = [o[re], o[re + 1], o[re + 2]];
        l.push(M(se));
      }
      return l;
    }, N = L(() => {
      const o = t.months.find((l) => l.value === t.month);
      return o || { text: "", value: 0 };
    }), I = L(() => f(t.months)), E = L(() => f(t.years)), D = L(() => i.value.multiCalendars ? t.multiCalendarsSolo ? !0 : t.instance === 0 : !0), y = L(() => i.value.multiCalendars ? t.multiCalendarsSolo ? !0 : t.instance === i.value.multiCalendars - 1 : !0), d = (o, l) => {
      l !== void 0 ? o.value = l : o.value = !o.value;
    }, u = (o = !1, l) => {
      b(o), d(C, l), C.value || a("overlay-closed");
    }, S = (o = !1, l) => {
      b(o), d(c, l), c.value || a("overlay-closed");
    }, b = (o) => {
      o || a("reset-flow");
    }, Z = (o = !1) => {
      _.value(o) || a("update-month-year", {
        year: o ? t.year + 1 : t.year - 1,
        month: t.month,
        fromNav: !0
      });
    }, r = (o, l) => {
      t.arrowNavigation && (g.value[l] = Ae(o), T(g.value, "monthYear"));
    };
    return n({
      toggleMonthPicker: u,
      toggleYearPicker: S,
      handleMonthYearChange: Y
    }), (o, l) => {
      var M, re, se, Pe, Se;
      return p(), R("div", Hl, [
        o.$slots["month-year"] ? K(o.$slots, "month-year", Be(Ce({ key: 0 }, { month: e.month, year: e.year, months: e.months, years: e.years, updateMonthYear: $(W), handleMonthYearChange: $(Y), instance: e.instance }))) : (p(), R(ve, { key: 1 }, [
          !o.monthPicker && !o.yearPicker ? (p(), R(ve, { key: 0 }, [
            D.value && !o.vertical ? (p(), ge(un, {
              key: 0,
              "aria-label": (M = $(i).ariaLabels) == null ? void 0 : M.prevMonth,
              disabled: $(_)(!1),
              onActivate: l[0] || (l[0] = (ee) => $(Y)(!1)),
              onSetRef: l[1] || (l[1] = (ee) => r(ee, 0))
            }, {
              default: fe(() => [
                o.$slots["arrow-left"] ? K(o.$slots, "arrow-left", { key: 0 }) : P("", !0),
                o.$slots["arrow-left"] ? P("", !0) : (p(), ge($(Pn), { key: 1 }))
              ]),
              _: 3
            }, 8, ["aria-label", "disabled"])) : P("", !0),
            le("div", {
              class: he(["dp__month_year_wrap", {
                dp__year_disable_select: t.disableYearSelect
              }])
            }, [
              kt(zn, Ce({
                type: "month",
                "slot-name": "month-overlay-val",
                "overlay-slot": "overlay-month",
                "aria-label": (re = $(i).ariaLabels) == null ? void 0 : re.openMonthsOverlay,
                modelValue: F.value,
                "onUpdate:modelValue": l[2] || (l[2] = (ee) => F.value = ee)
              }, G.value("month"), {
                onToggle: u,
                onSetRef: l[3] || (l[3] = (ee) => r(ee, 1))
              }), We({
                default: fe(() => [
                  o.$slots.month ? K(o.$slots, "month", Be(Ce({ key: 0 }, N.value))) : P("", !0),
                  o.$slots.month ? P("", !0) : (p(), R(ve, { key: 1 }, [
                    Qe(Ye(N.value.text), 1)
                  ], 64))
                ]),
                _: 2
              }, [
                o.$slots["calendar-icon"] ? {
                  name: "calendar-icon",
                  fn: fe(() => [
                    K(o.$slots, "calendar-icon")
                  ]),
                  key: "0"
                } : void 0,
                o.$slots["month-overlay-value"] ? {
                  name: "month-overlay-val",
                  fn: fe(({ item: ee }) => [
                    K(o.$slots, "month-overlay-value", {
                      text: ee.text,
                      value: ee.value
                    })
                  ]),
                  key: "1"
                } : void 0,
                o.$slots["month-overlay"] ? {
                  name: "overlay-month",
                  fn: fe(() => [
                    K(o.$slots, "month-overlay", Be(Ze(J.value("month"))))
                  ]),
                  key: "2"
                } : void 0,
                o.$slots["month-overlay-header"] ? {
                  name: "overlay-month-header",
                  fn: fe(() => [
                    K(o.$slots, "month-overlay-header", { toggle: u })
                  ]),
                  key: "3"
                } : void 0
              ]), 1040, ["aria-label", "modelValue"]),
              t.disableYearSelect ? P("", !0) : (p(), ge(zn, Ce({
                key: 0,
                type: "year",
                "slot-name": "year-overlay-val",
                "overlay-slot": "overlay-year",
                "aria-label": (se = $(i).ariaLabels) == null ? void 0 : se.openYearsOverlay,
                modelValue: ae.value,
                "onUpdate:modelValue": l[4] || (l[4] = (ee) => ae.value = ee)
              }, G.value("year"), {
                onToggle: S,
                onSetRef: l[5] || (l[5] = (ee) => r(ee, 2))
              }), We({
                default: fe(() => [
                  o.$slots.year ? K(o.$slots, "year", {
                    key: 0,
                    year: e.year
                  }) : P("", !0),
                  o.$slots.year ? P("", !0) : (p(), R(ve, { key: 1 }, [
                    Qe(Ye(e.year), 1)
                  ], 64))
                ]),
                _: 2
              }, [
                o.$slots["calendar-icon"] ? {
                  name: "calendar-icon",
                  fn: fe(() => [
                    K(o.$slots, "calendar-icon")
                  ]),
                  key: "0"
                } : void 0,
                o.$slots["year-overlay-value"] ? {
                  name: "year-overlay-val",
                  fn: fe(({ item: ee }) => [
                    K(o.$slots, "year-overlay-value", {
                      text: ee.text,
                      value: ee.value
                    })
                  ]),
                  key: "1"
                } : void 0,
                o.$slots["year-overlay"] ? {
                  name: "overlay-year",
                  fn: fe(() => [
                    K(o.$slots, "year-overlay", Be(Ze(J.value("year"))))
                  ]),
                  key: "2"
                } : void 0,
                o.$slots["year-overlay-header"] ? {
                  name: "overlay-year-header",
                  fn: fe(() => [
                    K(o.$slots, "year-overlay-header", { toggle: S })
                  ]),
                  key: "3"
                } : void 0
              ]), 1040, ["aria-label", "modelValue"]))
            ], 2),
            D.value && o.vertical ? (p(), ge(un, {
              key: 1,
              "aria-label": (Pe = $(i).ariaLabels) == null ? void 0 : Pe.prevMonth,
              disabled: $(_)(!1),
              onActivate: l[6] || (l[6] = (ee) => $(Y)(!1))
            }, {
              default: fe(() => [
                o.$slots["arrow-up"] ? K(o.$slots, "arrow-up", { key: 0 }) : P("", !0),
                o.$slots["arrow-up"] ? P("", !0) : (p(), ge($(Jn), { key: 1 }))
              ]),
              _: 3
            }, 8, ["aria-label", "disabled"])) : P("", !0),
            y.value ? (p(), ge(un, {
              key: 2,
              ref: "rightIcon",
              disabled: $(_)(!0),
              "aria-label": (Se = $(i).ariaLabels) == null ? void 0 : Se.nextMonth,
              onActivate: l[7] || (l[7] = (ee) => $(Y)(!0)),
              onSetRef: l[8] || (l[8] = (ee) => r(ee, 3))
            }, {
              default: fe(() => [
                o.$slots[o.vertical ? "arrow-down" : "arrow-right"] ? K(o.$slots, o.vertical ? "arrow-down" : "arrow-right", { key: 0 }) : P("", !0),
                o.$slots[o.vertical ? "arrow-down" : "arrow-right"] ? P("", !0) : (p(), ge(Kn(o.vertical ? $(Qn) : $(_n)), { key: 1 }))
              ]),
              _: 3
            }, 8, ["disabled", "aria-label"])) : P("", !0)
          ], 64)) : P("", !0),
          o.monthPicker ? (p(), ge(Rt, Ce({ key: 1 }, G.value("month"), {
            "skip-active": o.range,
            "internal-model-value": e.internalModelValue,
            year: e.year,
            "auto-apply-month": o.autoApplyMonth,
            "multi-model-value": w.value,
            "month-picker": "",
            modelValue: F.value,
            "onUpdate:modelValue": l[17] || (l[17] = (ee) => F.value = ee),
            onToggle: u,
            onSelected: l[18] || (l[18] = (ee) => o.$emit("overlay-closed"))
          }), We({
            header: fe(() => {
              var ee, Ue, Ie;
              return [
                le("div", xl, [
                  le("div", {
                    class: "dp__month_year_col_nav",
                    tabindex: "0",
                    ref_key: "mpPrevIconRef",
                    ref: Q,
                    onClick: l[9] || (l[9] = (Te) => Z(!1)),
                    onKeydown: l[10] || (l[10] = de((Te) => Z(!1), ["enter"]))
                  }, [
                    le("div", {
                      class: he(["dp__inner_nav", { dp__inner_nav_disabled: $(_)(!1) }]),
                      role: "button",
                      "aria-label": (ee = $(i).ariaLabels) == null ? void 0 : ee.prevMonth
                    }, [
                      o.$slots["arrow-left"] ? K(o.$slots, "arrow-left", { key: 0 }) : P("", !0),
                      o.$slots["arrow-left"] ? P("", !0) : (p(), ge($(Pn), { key: 1 }))
                    ], 10, zl)
                  ], 544),
                  le("div", {
                    class: "dp__pointer",
                    role: "button",
                    ref_key: "mpYearButtonRef",
                    ref: U,
                    "aria-label": (Ue = $(i).ariaLabels) == null ? void 0 : Ue.openYearsOverlay,
                    tabindex: "0",
                    onClick: l[11] || (l[11] = () => S(!1)),
                    onKeydown: l[12] || (l[12] = de(() => S(!1), ["enter"]))
                  }, [
                    o.$slots.year ? K(o.$slots, "year", {
                      key: 0,
                      year: e.year
                    }) : P("", !0),
                    o.$slots.year ? P("", !0) : (p(), R(ve, { key: 1 }, [
                      Qe(Ye(e.year), 1)
                    ], 64))
                  ], 40, Kl),
                  le("div", {
                    class: "dp__month_year_col_nav",
                    tabindex: "0",
                    ref_key: "mpNextIconRef",
                    ref: x,
                    onClick: l[13] || (l[13] = (Te) => Z(!0)),
                    onKeydown: l[14] || (l[14] = de((Te) => Z(!0), ["enter"]))
                  }, [
                    le("div", {
                      class: he(["dp__inner_nav", { dp__inner_nav_disabled: $(_)(!0) }]),
                      role: "button",
                      "aria-label": (Ie = $(i).ariaLabels) == null ? void 0 : Ie.nextMonth
                    }, [
                      o.$slots["arrow-right"] ? K(o.$slots, "arrow-right", { key: 0 }) : P("", !0),
                      o.$slots["arrow-right"] ? P("", !0) : (p(), ge($(_n), { key: 1 }))
                    ], 10, jl)
                  ], 544)
                ]),
                kt(At, {
                  name: $(v)(c.value),
                  css: $(m)
                }, {
                  default: fe(() => [
                    c.value ? (p(), ge(Rt, Ce({ key: 0 }, G.value("year"), {
                      modelValue: ae.value,
                      "onUpdate:modelValue": l[15] || (l[15] = (Te) => ae.value = Te),
                      onToggle: S,
                      onSelected: l[16] || (l[16] = (Te) => o.$emit("overlay-closed"))
                    }), We({
                      "button-icon": fe(() => [
                        o.$slots["calendar-icon"] ? K(o.$slots, "calendar-icon", { key: 0 }) : P("", !0),
                        o.$slots["calendar-icon"] ? P("", !0) : (p(), ge($(Kt), { key: 1 }))
                      ]),
                      _: 2
                    }, [
                      o.$slots["year-overlay-value"] ? {
                        name: "item",
                        fn: fe(({ item: Te }) => [
                          K(o.$slots, "year-overlay-value", {
                            text: Te.text,
                            value: Te.value
                          })
                        ]),
                        key: "0"
                      } : void 0
                    ]), 1040, ["modelValue"])) : P("", !0)
                  ]),
                  _: 3
                }, 8, ["name", "css"])
              ];
            }),
            _: 2
          }, [
            o.$slots["month-overlay-value"] ? {
              name: "item",
              fn: fe(({ item: ee }) => [
                K(o.$slots, "month-overlay-value", {
                  text: ee.text,
                  value: ee.value
                })
              ]),
              key: "0"
            } : void 0
          ]), 1040, ["skip-active", "internal-model-value", "year", "auto-apply-month", "multi-model-value", "modelValue"])) : P("", !0),
          o.yearPicker ? (p(), ge(Rt, Ce({ key: 2 }, G.value("year"), {
            modelValue: ae.value,
            "onUpdate:modelValue": l[19] || (l[19] = (ee) => ae.value = ee),
            "multi-model-value": w.value,
            "skip-active": o.range,
            "skip-button-ref": "",
            "year-picker": "",
            onToggle: S,
            onSelected: l[20] || (l[20] = (ee) => o.$emit("overlay-closed"))
          }), We({ _: 2 }, [
            o.$slots["year-overlay-value"] ? {
              name: "item",
              fn: fe(({ item: ee }) => [
                K(o.$slots, "year-overlay-value", {
                  text: ee.text,
                  value: ee.value
                })
              ]),
              key: "0"
            } : void 0
          ]), 1040, ["modelValue", "multi-model-value", "skip-active"])) : P("", !0)
        ], 64))
      ]);
    };
  }
}), Zl = {
  key: 0,
  class: "dp__time_input"
}, ql = ["aria-label", "onKeydown", "onClick"], Xl = /* @__PURE__ */ le("span", { class: "dp__tp_inline_btn_bar dp__tp_btn_in_l" }, null, -1), Jl = /* @__PURE__ */ le("span", { class: "dp__tp_inline_btn_bar dp__tp_btn_in_r" }, null, -1), Ql = ["aria-label", "onKeydown", "onClick"], er = ["aria-label", "onKeydown", "onClick"], tr = /* @__PURE__ */ le("span", { class: "dp__tp_inline_btn_bar dp__tp_btn_in_l" }, null, -1), nr = /* @__PURE__ */ le("span", { class: "dp__tp_inline_btn_bar dp__tp_btn_in_r" }, null, -1), ar = { key: 0 }, lr = ["aria-label", "onKeydown"], rr = /* @__PURE__ */ qe({
  __name: "TimeInput",
  props: {
    hours: { type: Number, default: 0 },
    minutes: { type: Number, default: 0 },
    seconds: { type: Number, default: 0 },
    closeTimePickerBtn: { type: Object, default: null },
    order: { type: Number, default: 0 },
    ...dt
  },
  emits: [
    "set-hours",
    "set-minutes",
    "update:hours",
    "update:minutes",
    "update:seconds",
    "reset-flow",
    "mounted",
    "overlay-closed",
    "am-pm-change"
  ],
  setup(e, { expose: n, emit: a }) {
    const t = e, { setTimePickerElements: i, setTimePickerBackRef: v } = ut(), { defaults: m } = xe(t), { transitionName: T, showTransition: Y } = jt(m.value.transitions), _ = Mt({
      hours: !1,
      minutes: !1,
      seconds: !1
    }), W = H("AM"), C = H(null), c = H([]);
    Ge(() => {
      a("mounted");
    });
    const g = (d) => Re(/* @__PURE__ */ new Date(), {
      hours: d.hours,
      minutes: d.minutes,
      seconds: t.enableSeconds ? d.seconds : 0,
      milliseconds: 0
    }), Q = L(() => ({ hours: t.hours, minutes: t.minutes, seconds: t.seconds })), U = L(() => (d) => !ne(+t[d] + +t[`${d}Increment`], d)), x = L(() => (d) => !ne(+t[d] - +t[`${d}Increment`], d)), V = (d, u) => qn(Re(A(), d), u), F = (d, u) => ba(Re(A(), d), u), ae = L(
      () => ({
        dp__time_col: !0,
        dp__time_col_block: !t.timePickerInline,
        dp__time_col_reg_block: !t.enableSeconds && t.is24 && !t.timePickerInline,
        dp__time_col_reg_inline: !t.enableSeconds && t.is24 && t.timePickerInline,
        dp__time_col_reg_with_button: !t.enableSeconds && !t.is24,
        dp__time_col_sec: t.enableSeconds && t.is24,
        dp__time_col_sec_with_button: t.enableSeconds && !t.is24
      })
    ), oe = L(() => {
      const d = [{ type: "hours" }, { type: "", separator: !0 }, { type: "minutes" }];
      return t.enableSeconds ? d.concat([{ type: "", separator: !0 }, { type: "seconds" }]) : d;
    }), B = L(() => oe.value.filter((d) => !d.separator)), G = L(() => (d) => {
      if (d === "hours") {
        const u = N(+t.hours);
        return { text: u < 10 ? `0${u}` : `${u}`, value: u };
      }
      return { text: t[d] < 10 ? `0${t[d]}` : `${t[d]}`, value: t[d] };
    }), J = (d) => {
      const u = t.is24 ? 24 : 12, S = d === "hours" ? u : 60, b = +t[`${d}GridIncrement`], Z = d === "hours" && !t.is24 ? b : 0, r = [];
      for (let o = Z; o < S; o += b)
        r.push({ value: o, text: o < 10 ? `0${o}` : `${o}` });
      return d === "hours" && !t.is24 && r.push({ value: 0, text: "12" }), Ja(r);
    }, ne = (d, u) => {
      const S = t.minTime ? g(Qt(t.minTime)) : null, b = t.maxTime ? g(Qt(t.maxTime)) : null, Z = g(Qt(Q.value, u, d));
      return S && b ? (Ot(Z, b) || mt(Z, b)) && (Bt(Z, S) || mt(Z, S)) : S ? Bt(Z, S) || mt(Z, S) : b ? Ot(Z, b) || mt(Z, b) : !0;
    }, ce = L(() => (d) => J(d).flat().filter((S) => rl(S.value)).map((S) => S.value).filter((S) => !ne(S, d))), ye = (d) => t[`no${d[0].toUpperCase() + d.slice(1)}Overlay`], O = (d) => {
      ye(d) || (_[d] = !_[d], _[d] || a("overlay-closed"));
    }, w = (d) => d === "hours" ? at : d === "minutes" ? lt : $t, f = (d, u = !0) => {
      const S = u ? V : F, b = u ? +t[`${d}Increment`] : -+t[`${d}Increment`];
      ne(+t[d] + b, d) && a(
        `update:${d}`,
        w(d)(S({ [d]: +t[d] }, { [d]: +t[`${d}Increment`] }))
      );
    }, N = (d) => t.is24 ? d : (d >= 12 ? W.value = "PM" : W.value = "AM", al(d)), I = () => {
      W.value === "PM" ? (W.value = "AM", a("update:hours", t.hours - 12)) : (W.value = "PM", a("update:hours", t.hours + 12)), a("am-pm-change", W.value);
    }, E = (d) => {
      _[d] = !0;
    }, D = (d, u, S) => {
      if (d && t.arrowNavigation) {
        Array.isArray(c.value[u]) ? c.value[u][S] = d : c.value[u] = [d];
        const b = c.value.reduce(
          (Z, r) => r.map((o, l) => [...Z[l] || [], r[l]]),
          []
        );
        v(t.closeTimePickerBtn), C.value && (b[1] = b[1].concat(C.value)), i(b, t.order);
      }
    }, y = (d, u) => d === "hours" && !t.is24 ? a(`update:${d}`, W.value === "PM" ? u + 12 : u) : a(`update:${d}`, u);
    return n({ openChildCmp: E }), (d, u) => {
      var S;
      return d.disabled ? P("", !0) : (p(), R("div", Zl, [
        (p(!0), R(ve, null, Ne(oe.value, (b, Z) => {
          var r, o, l;
          return p(), R("div", {
            key: Z,
            class: he(ae.value)
          }, [
            b.separator ? (p(), R(ve, { key: 0 }, [
              Qe(" : ")
            ], 64)) : (p(), R(ve, { key: 1 }, [
              le("button", {
                type: "button",
                class: he({
                  dp__btn: !0,
                  dp__inc_dec_button: !t.timePickerInline,
                  dp__inc_dec_button_inline: t.timePickerInline,
                  dp__tp_inline_btn_top: t.timePickerInline,
                  dp__inc_dec_button_disabled: U.value(b.type)
                }),
                "aria-label": (r = $(m).ariaLabels) == null ? void 0 : r.incrementValue(b.type),
                tabindex: "0",
                onKeydown: [
                  de((M) => f(b.type), ["enter"]),
                  de((M) => f(b.type), ["space"])
                ],
                onClick: (M) => f(b.type),
                ref_for: !0,
                ref: (M) => D(M, Z, 0)
              }, [
                t.timePickerInline ? (p(), R(ve, { key: 1 }, [
                  Xl,
                  Jl
                ], 64)) : (p(), R(ve, { key: 0 }, [
                  d.$slots["arrow-up"] ? K(d.$slots, "arrow-up", { key: 0 }) : P("", !0),
                  d.$slots["arrow-up"] ? P("", !0) : (p(), ge($(Jn), { key: 1 }))
                ], 64))
              ], 42, ql),
              le("button", {
                type: "button",
                "aria-label": (o = $(m).ariaLabels) == null ? void 0 : o.openTpOverlay(b.type),
                class: he([
                  "dp__btn",
                  ye(b.type) ? void 0 : {
                    dp__time_display: !0,
                    dp__time_display_block: !t.timePickerInline,
                    dp__time_display_inline: t.timePickerInline
                  }
                ]),
                tabindex: "0",
                onKeydown: [
                  de((M) => O(b.type), ["enter"]),
                  de((M) => O(b.type), ["space"])
                ],
                onClick: (M) => O(b.type),
                ref_for: !0,
                ref: (M) => D(M, Z, 1)
              }, [
                d.$slots[b.type] ? K(d.$slots, b.type, {
                  key: 0,
                  text: G.value(b.type).text,
                  value: G.value(b.type).value
                }) : P("", !0),
                d.$slots[b.type] ? P("", !0) : (p(), R(ve, { key: 1 }, [
                  Qe(Ye(G.value(b.type).text), 1)
                ], 64))
              ], 42, Ql),
              le("button", {
                type: "button",
                class: he({
                  dp__btn: !0,
                  dp__inc_dec_button: !t.timePickerInline,
                  dp__inc_dec_button_inline: t.timePickerInline,
                  dp__tp_inline_btn_bottom: t.timePickerInline,
                  dp__inc_dec_button_disabled: x.value(b.type)
                }),
                "aria-label": (l = $(m).ariaLabels) == null ? void 0 : l.decrementValue(b.type),
                tabindex: "0",
                onKeydown: [
                  de((M) => f(b.type, !1), ["enter"]),
                  de((M) => f(b.type, !1), ["space"])
                ],
                onClick: (M) => f(b.type, !1),
                ref_for: !0,
                ref: (M) => D(M, Z, 2)
              }, [
                t.timePickerInline ? (p(), R(ve, { key: 1 }, [
                  tr,
                  nr
                ], 64)) : (p(), R(ve, { key: 0 }, [
                  d.$slots["arrow-down"] ? K(d.$slots, "arrow-down", { key: 0 }) : P("", !0),
                  d.$slots["arrow-down"] ? P("", !0) : (p(), ge($(Qn), { key: 1 }))
                ], 64))
              ], 42, er)
            ], 64))
          ], 2);
        }), 128)),
        d.is24 ? P("", !0) : (p(), R("div", ar, [
          d.$slots["am-pm-button"] ? K(d.$slots, "am-pm-button", {
            key: 0,
            toggle: I,
            value: W.value
          }) : P("", !0),
          d.$slots["am-pm-button"] ? P("", !0) : (p(), R("button", {
            key: 1,
            ref_key: "amPmButton",
            ref: C,
            type: "button",
            class: "dp__pm_am_button",
            role: "button",
            "aria-label": (S = $(m).ariaLabels) == null ? void 0 : S.amPmButton,
            tabindex: "0",
            onClick: I,
            onKeydown: [
              de(He(I, ["prevent"]), ["enter"]),
              de(He(I, ["prevent"]), ["space"])
            ]
          }, Ye(W.value), 41, lr))
        ])),
        (p(!0), R(ve, null, Ne(B.value, (b, Z) => (p(), ge(At, {
          key: Z,
          name: $(T)(_[b.type]),
          css: $(Y)
        }, {
          default: fe(() => [
            _[b.type] ? (p(), ge(Rt, {
              key: 0,
              items: J(b.type),
              "disabled-values": $(m).filters.times[b.type].concat(ce.value(b.type)),
              "esc-close": d.escClose,
              "aria-labels": $(m).ariaLabels,
              "hide-navigation": d.hideNavigation,
              "onUpdate:modelValue": (r) => y(b.type, r),
              onSelected: (r) => O(b.type),
              onToggle: (r) => O(b.type),
              onResetFlow: u[0] || (u[0] = (r) => d.$emit("reset-flow")),
              type: b.type
            }, We({
              "button-icon": fe(() => [
                d.$slots["clock-icon"] ? K(d.$slots, "clock-icon", { key: 0 }) : P("", !0),
                d.$slots["clock-icon"] ? P("", !0) : (p(), ge($(Xn), { key: 1 }))
              ]),
              _: 2
            }, [
              d.$slots[`${b.type}-overlay-value`] ? {
                name: "item",
                fn: fe(({ item: r }) => [
                  K(d.$slots, `${b.type}-overlay-value`, {
                    text: r.text,
                    value: r.value
                  })
                ]),
                key: "0"
              } : void 0
            ]), 1032, ["items", "disabled-values", "esc-close", "aria-labels", "hide-navigation", "onUpdate:modelValue", "onSelected", "onToggle", "type"])) : P("", !0)
          ]),
          _: 2
        }, 1032, ["name", "css"]))), 128))
      ]));
    };
  }
}), or = ["aria-label"], sr = ["tabindex"], ir = ["aria-label"], ur = /* @__PURE__ */ qe({
  __name: "TimePicker",
  props: {
    hours: { type: [Number, Array], default: 0 },
    minutes: { type: [Number, Array], default: 0 },
    seconds: { type: [Number, Array], default: 0 },
    internalModelValue: { type: [Date, Array], default: null },
    ...dt
  },
  emits: [
    "update:hours",
    "update:minutes",
    "update:seconds",
    "mount",
    "reset-flow",
    "overlay-opened",
    "overlay-closed",
    "am-pm-change"
  ],
  setup(e, { expose: n, emit: a }) {
    const t = e, { buildMatrix: i, setTimePicker: v } = ut(), m = kn(), { hideNavigationButtons: T, defaults: Y } = xe(t), { transitionName: _, showTransition: W } = jt(Y.value.transitions), C = H(null), c = H(null), g = H([]), Q = H(null);
    Ge(() => {
      a("mount"), !t.timePicker && t.arrowNavigation ? i([Ae(C.value)], "time") : v(!0, t.timePicker);
    });
    const U = L(() => t.range && t.modelAuto ? ra(t.internalModelValue) : !0), x = H(!1), V = (O) => ({
      hours: Array.isArray(t.hours) ? t.hours[O] : t.hours,
      minutes: Array.isArray(t.minutes) ? t.minutes[O] : t.minutes,
      seconds: Array.isArray(t.seconds) ? t.seconds[O] : t.seconds
    }), F = L(() => {
      const O = [];
      if (t.range)
        for (let w = 0; w < 2; w++)
          O.push(V(w));
      else
        O.push(V(0));
      return O;
    }), ae = (O, w = !1, f = "") => {
      w || a("reset-flow"), x.value = O, a(O ? "overlay-opened" : "overlay-closed"), t.arrowNavigation && v(O), st(() => {
        f !== "" && g.value[0] && g.value[0].openChildCmp(f);
      });
    }, oe = L(() => ({
      dp__btn: !0,
      dp__button: !0,
      dp__button_bottom: t.autoApply && !t.keepActionRow
    })), B = ht(m, "timePicker"), G = (O, w, f) => t.range ? w === 0 ? [O, F.value[1][f]] : [F.value[0][f], O] : O, J = (O) => {
      a("update:hours", O);
    }, ne = (O) => {
      a("update:minutes", O);
    }, ce = (O) => {
      a("update:seconds", O);
    }, ye = () => {
      if (Q.value) {
        const O = ol(Q.value);
        O && O.focus({ preventScroll: !0 });
      }
    };
    return n({ toggleTimePicker: ae }), (O, w) => {
      var f;
      return p(), R("div", null, [
        !O.timePicker && !O.timePickerInline ? Ut((p(), R("button", {
          key: 0,
          type: "button",
          class: he(oe.value),
          "aria-label": (f = $(Y).ariaLabels) == null ? void 0 : f.openTimePicker,
          tabindex: "0",
          ref_key: "openTimePickerBtn",
          ref: C,
          onKeydown: [
            w[0] || (w[0] = de((N) => ae(!0), ["enter"])),
            w[1] || (w[1] = de((N) => ae(!0), ["space"]))
          ],
          onClick: w[2] || (w[2] = (N) => ae(!0))
        }, [
          O.$slots["clock-icon"] ? K(O.$slots, "clock-icon", { key: 0 }) : P("", !0),
          O.$slots["clock-icon"] ? P("", !0) : (p(), ge($(Xn), { key: 1 }))
        ], 42, or)), [
          [Wt, !$(T)("time")]
        ]) : P("", !0),
        kt(At, {
          name: $(_)(x.value),
          css: $(W) && !O.timePickerInline
        }, {
          default: fe(() => {
            var N;
            return [
              x.value || O.timePicker || O.timePickerInline ? (p(), R("div", {
                key: 0,
                class: he({ dp__overlay: !O.timePickerInline }),
                ref_key: "overlayRef",
                ref: Q,
                tabindex: O.timePickerInline ? void 0 : 0
              }, [
                le("div", {
                  class: he(
                    O.timePickerInline ? "dp__time_picker_inline_container" : "dp__overlay_container dp__container_flex dp__time_picker_overlay_container"
                  ),
                  style: { display: "flex" }
                }, [
                  O.$slots["time-picker-overlay"] ? K(O.$slots, "time-picker-overlay", {
                    key: 0,
                    hours: e.hours,
                    minutes: e.minutes,
                    seconds: e.seconds,
                    setHours: J,
                    setMinutes: ne,
                    setSeconds: ce
                  }) : P("", !0),
                  O.$slots["time-picker-overlay"] ? P("", !0) : (p(), R("div", {
                    key: 1,
                    class: he(O.timePickerInline ? "dp__flex" : "dp__overlay_row dp__flex_row")
                  }, [
                    (p(!0), R(ve, null, Ne(F.value, (I, E) => Ut((p(), ge(rr, Ce({ key: E }, {
                      ...O.$props,
                      order: E,
                      hours: I.hours,
                      minutes: I.minutes,
                      seconds: I.seconds,
                      closeTimePickerBtn: c.value,
                      disabled: E === 0 ? O.fixedStart : O.fixedEnd
                    }, {
                      ref_for: !0,
                      ref_key: "timeInputRefs",
                      ref: g,
                      "onUpdate:hours": (D) => J(G(D, E, "hours")),
                      "onUpdate:minutes": (D) => ne(G(D, E, "minutes")),
                      "onUpdate:seconds": (D) => ce(G(D, E, "seconds")),
                      onMounted: ye,
                      onOverlayClosed: ye,
                      onAmPmChange: w[3] || (w[3] = (D) => O.$emit("am-pm-change", D))
                    }), We({ _: 2 }, [
                      Ne($(B), (D, y) => ({
                        name: D,
                        fn: fe((d) => [
                          K(O.$slots, D, Be(Ze(d)))
                        ])
                      }))
                    ]), 1040, ["onUpdate:hours", "onUpdate:minutes", "onUpdate:seconds"])), [
                      [Wt, E === 0 ? !0 : U.value]
                    ])), 128))
                  ], 2)),
                  !O.timePicker && !O.timePickerInline ? Ut((p(), R("button", {
                    key: 2,
                    type: "button",
                    ref_key: "closeTimePickerBtn",
                    ref: c,
                    class: he(oe.value),
                    "aria-label": (N = $(Y).ariaLabels) == null ? void 0 : N.closeTimePicker,
                    tabindex: "0",
                    onKeydown: [
                      w[4] || (w[4] = de((I) => ae(!1), ["enter"])),
                      w[5] || (w[5] = de((I) => ae(!1), ["space"]))
                    ],
                    onClick: w[6] || (w[6] = (I) => ae(!1))
                  }, [
                    O.$slots["calendar-icon"] ? K(O.$slots, "calendar-icon", { key: 0 }) : P("", !0),
                    O.$slots["calendar-icon"] ? P("", !0) : (p(), ge($(Kt), { key: 1 }))
                  ], 42, ir)), [
                    [Wt, !$(T)("time")]
                  ]) : P("", !0)
                ], 2)
              ], 10, sr)) : P("", !0)
            ];
          }),
          _: 3
        }, 8, ["name", "css"])
      ]);
    };
  }
}), dr = (e, n) => {
  const { isDisabled: a, matchDate: t, getWeekFromDate: i, defaults: v } = xe(n), m = H(null), T = H(A()), Y = (u) => {
    !u.current && n.hideOffsetDates || (m.value = u.value);
  }, _ = () => {
    m.value = null;
  }, W = (u) => Array.isArray(e.value) && n.range && e.value[0] && m.value ? u ? Fe(m.value, e.value[0]) : Ve(m.value, e.value[0]) : !0, C = (u, S) => {
    const b = () => e.value ? S ? e.value[0] || null : e.value[1] : null, Z = e.value && Array.isArray(e.value) ? b() : null;
    return ke(A(u.value), Z);
  }, c = (u) => {
    const S = Array.isArray(e.value) ? e.value[0] : null;
    return u ? !Ve(m.value || null, S) : !0;
  }, g = (u, S = !0) => (n.range || n.weekPicker) && Array.isArray(e.value) && e.value.length === 2 ? n.hideOffsetDates && !u.current ? !1 : ke(A(u.value), e.value[S ? 0 : 1]) : n.range ? C(u, S) && c(S) || ke(u.value, Array.isArray(e.value) ? e.value[0] : null) && W(S) : !1, Q = (u, S, b) => Array.isArray(e.value) && e.value[0] && e.value.length === 1 ? u ? !1 : b ? Fe(e.value[0], S.value) : Ve(e.value[0], S.value) : !1, U = (u) => !e.value || n.hideOffsetDates && !u.current ? !1 : n.range ? n.modelAuto && Array.isArray(e.value) ? ke(u.value, e.value[0] ? e.value[0] : T.value) : !1 : n.multiDates && Array.isArray(e.value) ? e.value.some((S) => ke(S, u.value)) : ke(u.value, e.value ? e.value : T.value), x = (u) => {
    if (n.autoRange || n.weekPicker) {
      if (m.value) {
        if (n.hideOffsetDates && !u.current)
          return !1;
        const S = yt(m.value, +n.autoRange), b = i(A(m.value));
        return n.weekPicker ? ke(b[1], A(u.value)) : ke(S, A(u.value));
      }
      return !1;
    }
    return !1;
  }, V = (u) => {
    if (n.autoRange || n.weekPicker) {
      if (m.value) {
        const S = yt(m.value, +n.autoRange);
        if (n.hideOffsetDates && !u.current)
          return !1;
        const b = i(A(m.value));
        return n.weekPicker ? Fe(u.value, b[0]) && Ve(u.value, b[1]) : Fe(u.value, m.value) && Ve(u.value, S);
      }
      return !1;
    }
    return !1;
  }, F = (u) => {
    if (n.autoRange || n.weekPicker) {
      if (m.value) {
        if (n.hideOffsetDates && !u.current)
          return !1;
        const S = i(A(m.value));
        return n.weekPicker ? ke(S[0], u.value) : ke(m.value, u.value);
      }
      return !1;
    }
    return !1;
  }, ae = (u) => ea(e.value, m.value, u.value), oe = () => n.modelAuto && Array.isArray(n.internalModelValue) ? !!n.internalModelValue[0] : !1, B = () => n.modelAuto ? ra(n.internalModelValue) : !0, G = (u) => {
    if (Array.isArray(e.value) && e.value.length || n.weekPicker)
      return !1;
    const S = n.range ? !g(u) && !g(u, !1) : !0;
    return !a(u.value) && !U(u) && !(!u.current && n.hideOffsetDates) && S;
  }, J = (u) => n.range ? n.modelAuto ? oe() && U(u) : !1 : U(u), ne = (u) => {
    var S;
    return n.highlight ? t(
      u.value,
      (S = n.arrMapValues) != null && S.highlightedDates ? n.arrMapValues.highlightedDates : n.highlight
    ) : !1;
  }, ce = (u) => a(u.value) && n.highlightDisabledDays === !1, ye = (u) => n.highlightWeekDays && n.highlightWeekDays.includes(u.value.getDay()), O = (u) => (n.range || n.weekPicker) && (!(v.value.multiCalendars > 0) || u.current) && B() && !(!u.current && n.hideOffsetDates) && !U(u) ? ae(u) : !1, w = (u) => {
    const { isRangeStart: S, isRangeEnd: b } = I(u), Z = n.range ? S || b : !1;
    return {
      dp__cell_offset: !u.current,
      dp__pointer: !n.disabled && !(!u.current && n.hideOffsetDates) && !a(u.value),
      dp__cell_disabled: a(u.value),
      dp__cell_highlight: !ce(u) && (ne(u) || ye(u)) && !J(u) && !Z,
      dp__cell_highlight_active: !ce(u) && (ne(u) || ye(u)) && J(u),
      dp__today: !n.noToday && ke(u.value, T.value) && u.current
    };
  }, f = (u) => ({
    dp__active_date: J(u),
    dp__date_hover: G(u)
  }), N = (u) => ({
    ...E(u),
    ...D(u),
    dp__range_between_week: O(u) && n.weekPicker
  }), I = (u) => {
    const S = v.value.multiCalendars > 0 ? u.current && g(u) && B() : g(u) && B(), b = v.value.multiCalendars > 0 ? u.current && g(u, !1) && B() : g(u, !1) && B();
    return { isRangeStart: S, isRangeEnd: b };
  }, E = (u) => {
    const { isRangeStart: S, isRangeEnd: b } = I(u);
    return {
      dp__range_start: S,
      dp__range_end: b,
      dp__range_between: O(u) && !n.weekPicker,
      dp__date_hover_start: Q(G(u), u, !0),
      dp__date_hover_end: Q(G(u), u, !1)
    };
  }, D = (u) => ({
    ...E(u),
    dp__cell_auto_range: V(u),
    dp__cell_auto_range_start: F(u),
    dp__cell_auto_range_end: x(u)
  }), y = (u) => n.range ? n.autoRange ? D(u) : n.modelAuto ? { ...f(u), ...E(u) } : E(u) : n.weekPicker ? N(u) : f(u);
  return {
    setHoverDate: Y,
    clearHoverDate: _,
    getDayClassData: (u) => n.hideOffsetDates && !u.current ? {} : {
      ...w(u),
      ...y(u),
      [n.dayClass ? n.dayClass(u.value) : ""]: !0,
      [n.calendarCellClassName]: !!n.calendarCellClassName
    }
  };
}, cr = ["id", "onKeydown"], fr = {
  key: 0,
  class: "dp__sidebar_left"
}, vr = {
  key: 1,
  class: "dp__preset_ranges"
}, mr = ["onClick"], yr = {
  key: 2,
  class: "dp__sidebar_right"
}, gr = {
  key: 3,
  class: "dp__action_extra"
}, hr = /* @__PURE__ */ qe({
  __name: "DatepickerMenu",
  props: {
    openOnTop: { type: Boolean, default: !1 },
    internalModelValue: { type: [Date, Array], default: null },
    arrMapValues: { type: Object, default: () => ({}) },
    ...dt
  },
  emits: [
    "close-picker",
    "select-date",
    "auto-apply",
    "time-update",
    "flow-step",
    "update-month-year",
    "invalid-select",
    "update:internal-model-value",
    "recalculate-position",
    "invalid-fixed-range",
    "tooltip-open",
    "tooltip-close",
    "time-picker-open",
    "time-picker-close",
    "am-pm-change",
    "range-start",
    "range-end"
  ],
  setup(e, { expose: n, emit: a }) {
    const t = e, i = L(() => {
      const { openOnTop: h, internalModelValue: z, arrMapValues: pe, ...Me } = t;
      return Me;
    }), { setMenuFocused: v, setShiftKey: m, control: T } = ta(), { getCalendarDays: Y, defaults: _ } = xe(t), W = kn(), C = H(null), c = Mt({
      timePicker: !!(!t.enableTimePicker || t.timePicker || t.monthPicker),
      monthYearInput: !!t.timePicker,
      calendar: !1
    }), g = H([]), Q = H([]), U = H(null), x = H(null), V = H(0), F = H(!1), ae = H(0);
    Ge(() => {
      var z;
      F.value = !0, !((z = t.presetRanges) != null && z.length) && !W["left-sidebar"] && !W["right-sidebar"] && (ze(), window.addEventListener("resize", ze));
      const h = Ae(x);
      if (h && !t.textInput && !t.inline && (v(!0), ce()), h) {
        const pe = (Me) => {
          t.allowPreventDefault && Me.preventDefault(), Me.stopImmediatePropagation(), Me.stopPropagation();
        };
        h.addEventListener("pointerdown", pe), h.addEventListener("mousedown", pe);
      }
    }), pn(() => {
      window.removeEventListener("resize", ze);
    });
    const { arrowRight: oe, arrowLeft: B, arrowDown: G, arrowUp: J } = ut(), ne = (h) => {
      h || h === 0 ? Q.value[h].triggerTransition(
        N.value(h),
        I.value(h)
      ) : Q.value.forEach(
        (z, pe) => z.triggerTransition(N.value(pe), I.value(pe))
      );
    }, ce = () => {
      const h = Ae(x);
      h && h.focus({ preventScroll: !0 });
    }, ye = () => {
      var h;
      (h = t.flow) != null && h.length && ae.value !== -1 && (ae.value += 1, a("flow-step", ae.value), s());
    }, O = () => {
      ae.value = -1;
    }, {
      calendars: w,
      modelValue: f,
      month: N,
      year: I,
      time: E,
      updateTime: D,
      updateMonthYear: y,
      selectDate: d,
      getWeekNum: u,
      monthYearSelect: S,
      handleScroll: b,
      handleArrow: Z,
      handleSwipe: r,
      getMarker: o,
      selectCurrentDate: l,
      presetDateRange: M
    } = ml(t, a, ye, ne, ae), { setHoverDate: re, clearHoverDate: se, getDayClassData: Pe } = dr(f, t), ee = {
      modelValue: f,
      month: N,
      year: I,
      time: E,
      updateTime: D,
      updateMonthYear: y,
      selectDate: d,
      presetDateRange: M,
      handleMonthYearChange: (h) => {
        g.value[0] && g.value[0].handleMonthYearChange(h);
      }
    };
    ot(
      w,
      () => {
        t.openOnTop && setTimeout(() => {
          a("recalculate-position");
        }, 0);
      },
      { deep: !0 }
    );
    const Ue = ht(W, "calendar"), Ie = ht(W, "action"), Te = ht(W, "timePicker"), Xe = ht(W, "monthYear"), ct = L(() => t.openOnTop ? "dp__arrow_bottom" : "dp__arrow_top"), et = L(() => tl(t.yearRange, t.reverseYears)), wt = L(() => nl(t.formatLocale, t.locale, t.monthNameFormat)), ze = () => {
      const h = Ae(C);
      h && (V.value = h.getBoundingClientRect().width);
    }, j = L(() => (h) => Y(N.value(h), I.value(h))), te = L(
      () => _.value.multiCalendars > 0 ? [...Array(_.value.multiCalendars).keys()] : [0]
    ), ue = L(
      () => (h) => h === 1
    ), Tt = L(() => t.monthPicker || t.timePicker || t.yearPicker), ft = L(
      () => ({
        dp__menu_inner: !0,
        dp__flex_display: _.value.multiCalendars > 0
      })
    ), Gt = L(() => ({
      dp__instance_calendar: _.value.multiCalendars > 0
    })), Yt = L(() => ({
      dp__menu_disabled: t.disabled,
      dp__menu_readonly: t.readonly
    })), St = L(
      () => (h) => qt(j, h)
    ), Zt = L(
      () => ({
        dp__menu: !0,
        dp__menu_index: !t.inline,
        dp__relative: t.inline,
        [t.menuClassName]: !!t.menuClassName
      })
    ), qt = (h, z) => h.value(z).map((pe) => ({
      ...pe,
      days: pe.days.map((Me) => (Me.marker = o(Me), Me.classData = Pe(Me), Me))
    })), Xt = (h) => {
      h.stopPropagation(), h.stopImmediatePropagation();
    }, Vt = () => {
      t.escClose && a("close-picker");
    }, Mn = (h, z = !1) => {
      d(h, z), t.spaceConfirm && a("select-date");
    }, Et = (h) => {
      var z;
      (z = t.flow) != null && z.length && (c[h] = !0, Object.keys(c).filter((pe) => !c[pe]).length || s());
    }, bt = (h, z, pe, Me, ...Je) => {
      if (t.flow[ae.value] === h) {
        const q = Me ? z.value[0] : z.value;
        q && q[pe](...Je);
      }
    }, s = () => {
      bt("month", g, "toggleMonthPicker", !0, !0), bt("year", g, "toggleYearPicker", !0, !0), bt("calendar", U, "toggleTimePicker", !1, !1, !0), bt("time", U, "toggleTimePicker", !1, !0, !0);
      const h = t.flow[ae.value];
      (h === "hours" || h === "minutes" || h === "seconds") && bt(h, U, "toggleTimePicker", !1, !0, !0, h);
    }, k = (h) => {
      if (t.arrowNavigation) {
        if (h === "up")
          return J();
        if (h === "down")
          return G();
        if (h === "left")
          return B();
        if (h === "right")
          return oe();
      } else
        h === "left" || h === "up" ? Z("left", 0, h === "up") : Z("right", 0, h === "down");
    }, X = (h) => {
      m(h.shiftKey), !t.disableMonthYearSelect && h.code === "Tab" && h.target.classList.contains("dp__menu") && T.value.shiftKeyInMenu && (h.preventDefault(), h.stopImmediatePropagation(), a("close-picker"));
    }, ie = () => {
      ce(), a("time-picker-close");
    }, $e = (h) => {
      var z, pe, Me, Je, q;
      (z = U.value) == null || z.toggleTimePicker(!1, !1), (Me = (pe = g.value) == null ? void 0 : pe[h]) == null || Me.toggleMonthPicker(!1, !1), (q = (Je = g.value) == null ? void 0 : Je[h]) == null || q.toggleYearPicker(!1, !1);
    };
    return n({
      updateMonthYear: y,
      switchView: (h, z = 0) => {
        var pe, Me, Je, q, nt;
        return h === "month" ? (Me = (pe = g.value) == null ? void 0 : pe[z]) == null ? void 0 : Me.toggleMonthPicker(!1, !0) : h === "year" ? (q = (Je = g.value) == null ? void 0 : Je[z]) == null ? void 0 : q.toggleYearPicker(!1, !0) : h === "time" ? (nt = U.value) == null ? void 0 : nt.toggleTimePicker(!0, !1) : $e(z);
      }
    }), (h, z) => {
      var pe;
      return p(), ge(At, {
        appear: "",
        name: (pe = $(_).transitions) == null ? void 0 : pe.menuAppear,
        css: !!h.transitions
      }, {
        default: fe(() => {
          var Me, Je;
          return [
            le("div", {
              id: h.uid ? `dp-menu-${h.uid}` : void 0,
              tabindex: "0",
              ref_key: "dpMenuRef",
              ref: x,
              role: "dialog",
              class: he(Zt.value),
              onMouseleave: z[14] || (z[14] = //@ts-ignore
              (...q) => $(se) && $(se)(...q)),
              onClick: Xt,
              onKeydown: [
                de(Vt, ["esc"]),
                z[15] || (z[15] = de(He((q) => k("left"), ["prevent"]), ["left"])),
                z[16] || (z[16] = de(He((q) => k("up"), ["prevent"]), ["up"])),
                z[17] || (z[17] = de(He((q) => k("down"), ["prevent"]), ["down"])),
                z[18] || (z[18] = de(He((q) => k("right"), ["prevent"]), ["right"])),
                X
              ]
            }, [
              (h.disabled || h.readonly) && h.inline ? (p(), R("div", {
                key: 0,
                class: he(Yt.value)
              }, null, 2)) : P("", !0),
              !h.inline && !h.teleportCenter ? (p(), R("div", {
                key: 1,
                class: he(ct.value)
              }, null, 2)) : P("", !0),
              le("div", {
                class: he({
                  dp__menu_content_wrapper: ((Me = h.presetRanges) == null ? void 0 : Me.length) || !!h.$slots["left-sidebar"] || !!h.$slots["right-sidebar"]
                })
              }, [
                h.$slots["left-sidebar"] ? (p(), R("div", fr, [
                  K(h.$slots, "left-sidebar", Be(Ze(ee)))
                ])) : P("", !0),
                (Je = h.presetRanges) != null && Je.length ? (p(), R("div", vr, [
                  (p(!0), R(ve, null, Ne(h.presetRanges, (q, nt) => (p(), R("div", {
                    key: nt,
                    style: it(q.style || {}),
                    class: "dp__preset_range",
                    onClick: (me) => $(M)(q.range, !!q.slot)
                  }, [
                    q.slot ? K(h.$slots, q.slot, {
                      key: 0,
                      presetDateRange: $(M),
                      label: q.label,
                      range: q.range
                    }) : (p(), R(ve, { key: 1 }, [
                      Qe(Ye(q.label), 1)
                    ], 64))
                  ], 12, mr))), 128))
                ])) : P("", !0),
                le("div", {
                  class: "dp__instance_calendar",
                  ref_key: "calendarWrapperRef",
                  ref: C,
                  role: "document"
                }, [
                  le("div", {
                    class: he(ft.value)
                  }, [
                    (p(!0), R(ve, null, Ne(te.value, (q, nt) => (p(), R("div", {
                      key: q,
                      class: he(Gt.value)
                    }, [
                      !h.disableMonthYearSelect && !h.timePicker ? (p(), ge(Gl, Ce({
                        key: 0,
                        ref_for: !0,
                        ref: (me) => {
                          me && (g.value[nt] = me);
                        },
                        months: wt.value,
                        years: et.value,
                        month: $(N)(q),
                        year: $(I)(q),
                        instance: q,
                        "internal-model-value": e.internalModelValue
                      }, i.value, {
                        onMount: z[0] || (z[0] = (me) => Et("monthYearInput")),
                        onResetFlow: O,
                        onUpdateMonthYear: (me) => $(y)(q, me),
                        onMonthYearSelect: $(S),
                        onOverlayClosed: ce
                      }), We({ _: 2 }, [
                        Ne($(Xe), (me, sa) => ({
                          name: me,
                          fn: fe((Jt) => [
                            K(h.$slots, me, Be(Ze(Jt)))
                          ])
                        }))
                      ]), 1040, ["months", "years", "month", "year", "instance", "internal-model-value", "onUpdateMonthYear", "onMonthYearSelect"])) : P("", !0),
                      kt(Yl, Ce({
                        ref_for: !0,
                        ref: (me) => {
                          me && (Q.value[nt] = me);
                        },
                        "specific-mode": Tt.value,
                        "get-week-num": $(u),
                        instance: q,
                        "mapped-dates": St.value(q),
                        month: $(N)(q),
                        year: $(I)(q)
                      }, i.value, {
                        onSelectDate: (me) => $(d)(me, !ue.value(q)),
                        onHandleSpace: (me) => Mn(me, !ue.value(q)),
                        onSetHoverDate: z[1] || (z[1] = (me) => $(re)(me)),
                        onHandleScroll: (me) => $(b)(me, q),
                        onHandleSwipe: (me) => $(r)(me, q),
                        onMount: z[2] || (z[2] = (me) => Et("calendar")),
                        onResetFlow: O,
                        onTooltipOpen: z[3] || (z[3] = (me) => h.$emit("tooltip-open", me)),
                        onTooltipClose: z[4] || (z[4] = (me) => h.$emit("tooltip-close", me))
                      }), We({ _: 2 }, [
                        Ne($(Ue), (me, sa) => ({
                          name: me,
                          fn: fe((Jt) => [
                            K(h.$slots, me, Be(Ze({ ...Jt })))
                          ])
                        }))
                      ]), 1040, ["specific-mode", "get-week-num", "instance", "mapped-dates", "month", "year", "onSelectDate", "onHandleSpace", "onHandleScroll", "onHandleSwipe"])
                    ], 2))), 128))
                  ], 2),
                  le("div", null, [
                    h.$slots["time-picker"] ? K(h.$slots, "time-picker", Be(Ce({ key: 0 }, { time: $(E), updateTime: $(D) }))) : (p(), R(ve, { key: 1 }, [
                      h.enableTimePicker && !h.monthPicker && !h.weekPicker ? (p(), ge(ur, Ce({
                        key: 0,
                        ref_key: "timePickerRef",
                        ref: U,
                        hours: $(E).hours,
                        minutes: $(E).minutes,
                        seconds: $(E).seconds,
                        "internal-model-value": e.internalModelValue
                      }, i.value, {
                        onMount: z[5] || (z[5] = (q) => Et("timePicker")),
                        "onUpdate:hours": z[6] || (z[6] = (q) => $(D)(q)),
                        "onUpdate:minutes": z[7] || (z[7] = (q) => $(D)(q, !1)),
                        "onUpdate:seconds": z[8] || (z[8] = (q) => $(D)(q, !1, !0)),
                        onResetFlow: O,
                        onOverlayClosed: ie,
                        onOverlayOpened: z[9] || (z[9] = (q) => h.$emit("time-picker-open", q)),
                        onAmPmChange: z[10] || (z[10] = (q) => h.$emit("am-pm-change", q))
                      }), We({ _: 2 }, [
                        Ne($(Te), (q, nt) => ({
                          name: q,
                          fn: fe((me) => [
                            K(h.$slots, q, Be(Ze(me)))
                          ])
                        }))
                      ]), 1040, ["hours", "minutes", "seconds", "internal-model-value"])) : P("", !0)
                    ], 64))
                  ])
                ], 512),
                h.$slots["right-sidebar"] ? (p(), R("div", yr, [
                  K(h.$slots, "right-sidebar", Be(Ze(ee)))
                ])) : P("", !0),
                h.$slots["action-extra"] ? (p(), R("div", gr, [
                  h.$slots["action-extra"] ? K(h.$slots, "action-extra", {
                    key: 0,
                    selectCurrentDate: $(l)
                  }) : P("", !0)
                ])) : P("", !0)
              ], 2),
              !h.autoApply || h.keepActionRow ? (p(), ge(Sl, Ce({
                key: 2,
                "menu-mount": F.value,
                "calendar-width": V.value,
                "internal-model-value": e.internalModelValue
              }, i.value, {
                onClosePicker: z[11] || (z[11] = (q) => h.$emit("close-picker")),
                onSelectDate: z[12] || (z[12] = (q) => h.$emit("select-date")),
                onInvalidSelect: z[13] || (z[13] = (q) => h.$emit("invalid-select")),
                onSelectNow: $(l)
              }), We({ _: 2 }, [
                Ne($(Ie), (q, nt) => ({
                  name: q,
                  fn: fe((me) => [
                    K(h.$slots, q, Be(Ze({ ...me })))
                  ])
                }))
              ]), 1040, ["menu-mount", "calendar-width", "internal-model-value", "onSelectNow"])) : P("", !0)
            ], 42, cr)
          ];
        }),
        _: 3
      }, 8, ["name", "css"]);
    };
  }
}), pr = typeof window < "u" ? window : void 0, dn = () => {
}, kr = (e) => ua() ? (da(e), !0) : !1, wr = (e, n, a, t) => {
  if (!e)
    return dn;
  let i = dn;
  const v = ot(
    () => $(e),
    (T) => {
      i(), T && (T.addEventListener(n, a, t), i = () => {
        T.removeEventListener(n, a, t), i = dn;
      });
    },
    { immediate: !0, flush: "post" }
  ), m = () => {
    v(), i();
  };
  return kr(m), m;
}, br = (e, n, a, t = {}) => {
  const { window: i = pr, event: v = "pointerdown" } = t;
  return i ? wr(i, v, (T) => {
    const Y = Ae(e), _ = Ae(n);
    !Y || !_ || Y === T.target || T.composedPath().includes(Y) || T.composedPath().includes(_) || a(T);
  }, { passive: !0 }) : void 0;
}, Dr = /* @__PURE__ */ qe({
  __name: "VueDatePicker",
  props: {
    ...dt
  },
  emits: [
    "update:model-value",
    "text-submit",
    "closed",
    "cleared",
    "open",
    "focus",
    "blur",
    "internal-model-change",
    "recalculate-position",
    "flow-step",
    "update-month-year",
    "invalid-select",
    "invalid-fixed-range",
    "tooltip-open",
    "tooltip-close",
    "time-picker-open",
    "time-picker-close",
    "am-pm-change",
    "range-start",
    "range-end"
  ],
  setup(e, { expose: n, emit: a }) {
    const t = e, i = kn(), v = H(!1), m = It(t, "modelValue"), T = It(t, "timezone"), Y = H(null), _ = H(null), W = H(!1), C = H(null), c = Mt({
      disabledDates: null,
      allowedDates: null,
      highlightedDates: null
    }), { setMenuFocused: g, setShiftKey: Q } = ta(), { clearArrowNav: U } = ut(), { validateDate: x, isValidTime: V, defaults: F, mapDatesArrToMap: ae } = xe(t);
    Ge(() => {
      N(t.modelValue), t.inline || (O(C.value).addEventListener("scroll", S), window.addEventListener("resize", b)), t.inline && (v.value = !0), ae(c);
    }), pn(() => {
      if (!t.inline) {
        const j = O(C.value);
        j && j.removeEventListener("scroll", S), window.removeEventListener("resize", b);
      }
    });
    const oe = ht(i, "all", t.presetRanges), B = ht(i, "input");
    ot(
      [m, T],
      () => {
        N(m.value);
      },
      { deep: !0 }
    );
    const { openOnTop: G, menuStyle: J, resetPosition: ne, setMenuPosition: ce, setInitialPosition: ye, getScrollableParent: O } = hl(Y, _, a, t), {
      inputValue: w,
      internalModelValue: f,
      parseExternalModelValue: N,
      emitModelValue: I,
      formatInputValue: E,
      checkBeforeEmit: D
    } = yl(a, t, W), y = L(
      () => ({
        dp__main: !0,
        dp__theme_dark: t.dark,
        dp__theme_light: !t.dark,
        dp__flex_display: t.inline,
        dp__flex_display_with_input: t.inlineWithInput
      })
    ), d = L(() => t.dark ? "dp__theme_dark" : "dp__theme_light"), u = L(() => t.teleport ? {
      to: typeof t.teleport == "boolean" ? "body" : t.teleport,
      disabled: t.inline
    } : { class: "dp__outer_menu_wrap" }), S = () => {
      v.value && (t.closeOnScroll ? Se() : ce());
    }, b = () => {
      v.value && ce();
    }, Z = async () => {
      var j, te, ue;
      !t.disabled && !t.readonly && (ne(), await st(), v.value = !0, await st(), ye(), await st(), ce(), delete J.value.opacity, !((j = F.value.transitions) != null && j.menuAppear) && t.transitions && ((ue = (te = Y.value) == null ? void 0 : te.$el) == null || ue.classList.add("dp__menu_transitioned")), v.value && a("open"), v.value || Pe(), N(t.modelValue));
    }, r = () => {
      w.value = "", Pe(), a("update:model-value", null), a("cleared"), t.closeOnClearValue && Se();
    }, o = () => {
      const j = f.value;
      return !j || !Array.isArray(j) && x(j) ? !0 : Array.isArray(j) ? j.length === 2 && x(j[0]) && x(j[1]) ? !0 : x(j[0]) : !1;
    }, l = () => {
      D() && o() ? (I(), Se()) : a("invalid-select", f.value);
    }, M = (j) => {
      re(), I(), t.closeOnAutoApply && !j && Se();
    }, re = () => {
      _.value && t.textInput && _.value.setParsedDate(f.value);
    }, se = (j = !1) => {
      t.autoApply && V(f.value) && o() && (t.range && Array.isArray(f.value) ? (t.partialRange || f.value.length === 2) && M(j) : M(j));
    }, Pe = () => {
      t.textInput || (f.value = null);
    }, Se = () => {
      t.inline || (v.value && (v.value = !1, g(!1), Q(!1), U(), a("closed"), ye(), w.value && N(m.value)), Pe());
    }, ee = (j, te) => {
      if (!j) {
        f.value = null;
        return;
      }
      f.value = j, te && (l(), a("text-submit"));
    }, Ue = () => {
      t.autoApply && V(f.value) && I(), re();
    }, Ie = () => v.value ? Se() : Z(), Te = (j) => {
      f.value = j;
    }, Xe = () => {
      t.textInput && (W.value = !0, E()), a("focus");
    }, ct = () => {
      t.textInput && (W.value = !1, N(t.modelValue)), a("blur");
    }, et = (j) => {
      Y.value && Y.value.updateMonthYear(0, {
        month: Fn(j.month),
        year: Fn(j.year)
      });
    }, wt = (j) => {
      N(j || t.modelValue);
    }, ze = (j, te) => {
      var ue;
      (ue = Y.value) == null || ue.switchView(j, te);
    };
    return br(
      Y,
      _,
      t.onClickOutside ? () => t.onClickOutside(o) : Se
    ), n({
      closeMenu: Se,
      selectDate: l,
      clearValue: r,
      openMenu: Z,
      onScroll: S,
      formatInputValue: E,
      // exposed for testing purposes
      updateInternalModelValue: Te,
      // modify internal modelValue
      setMonthYear: et,
      parseModel: wt,
      switchView: ze
    }), (j, te) => (p(), R("div", {
      class: he(y.value),
      ref_key: "pickerWrapperRef",
      ref: C
    }, [
      kt($l, Ce({
        ref_key: "inputRef",
        ref: _,
        "is-menu-open": v.value,
        "input-value": $(w),
        "onUpdate:inputValue": te[0] || (te[0] = (ue) => An(w) ? w.value = ue : null)
      }, j.$props, {
        onClear: r,
        onOpen: Z,
        onSetInputDate: ee,
        onSetEmptyDate: $(I),
        onSelectDate: l,
        onToggle: Ie,
        onClose: Se,
        onFocus: Xe,
        onBlur: ct,
        onRealBlur: te[1] || (te[1] = (ue) => W.value = !1)
      }), We({ _: 2 }, [
        Ne($(B), (ue, Tt) => ({
          name: ue,
          fn: fe((ft) => [
            K(j.$slots, ue, Be(Ze(ft)))
          ])
        }))
      ]), 1040, ["is-menu-open", "input-value", "onSetEmptyDate"]),
      v.value ? (p(), ge(Kn(j.teleport ? ca : "div"), Be(Ce({ key: 0 }, u.value)), {
        default: fe(() => [
          v.value ? (p(), ge(hr, Ce({
            key: 0,
            ref_key: "dpMenuRef",
            ref: Y,
            class: d.value,
            style: j.inline ? void 0 : $(J),
            "open-on-top": $(G),
            "arr-map-values": c
          }, j.$props, {
            "internal-model-value": $(f),
            "onUpdate:internalModelValue": te[2] || (te[2] = (ue) => An(f) ? f.value = ue : null),
            onClosePicker: Se,
            onSelectDate: l,
            onAutoApply: se,
            onTimeUpdate: Ue,
            onFlowStep: te[3] || (te[3] = (ue) => j.$emit("flow-step", ue)),
            onUpdateMonthYear: te[4] || (te[4] = (ue) => j.$emit("update-month-year", ue)),
            onInvalidSelect: te[5] || (te[5] = (ue) => j.$emit("invalid-select", $(f))),
            onInvalidFixedRange: te[6] || (te[6] = (ue) => j.$emit("invalid-fixed-range", ue)),
            onRecalculatePosition: $(ce),
            onTooltipOpen: te[7] || (te[7] = (ue) => j.$emit("tooltip-open", ue)),
            onTooltipClose: te[8] || (te[8] = (ue) => j.$emit("tooltip-close", ue)),
            onTimePickerOpen: te[9] || (te[9] = (ue) => j.$emit("time-picker-open", ue)),
            onTimePickerClose: te[10] || (te[10] = (ue) => j.$emit("time-picker-close", ue)),
            onAmPmChange: te[11] || (te[11] = (ue) => j.$emit("am-pm-change", ue)),
            onRangeStart: te[12] || (te[12] = (ue) => j.$emit("range-start", ue)),
            onRangeEnd: te[13] || (te[13] = (ue) => j.$emit("range-end", ue))
          }), We({ _: 2 }, [
            Ne($(oe), (ue, Tt) => ({
              name: ue,
              fn: fe((ft) => [
                K(j.$slots, ue, Be(Ze({ ...ft })))
              ])
            }))
          ]), 1040, ["class", "style", "open-on-top", "arr-map-values", "internal-model-value", "onRecalculatePosition"])) : P("", !0)
        ]),
        _: 3
      }, 16)) : P("", !0)
    ], 2));
  }
}), oa = /* @__PURE__ */ (() => {
  const e = Dr;
  return e.install = (n) => {
    n.component("Vue3DatePicker", e);
  }, e;
})(), $r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: oa
}, Symbol.toStringTag, { value: "Module" }));
Object.entries($r).forEach(([e, n]) => {
  e !== "default" && (oa[e] = n);
});
export {
  oa as default
};
