var ca = (e, t, n) => new Promise((a, o) => {
  var r = (u) => {
    try {
      i(n.next(u));
    } catch (s) {
      o(s);
    }
  }, l = (u) => {
    try {
      i(n.throw(u));
    } catch (s) {
      o(s);
    }
  }, i = (u) => u.done ? a(u.value) : Promise.resolve(u.value).then(r, l);
  i((n = n.apply(e, t)).next());
});
import { aH as ft, aI as vt, bI as ge, bJ as Bo, d as M, _ as x, c as oe, K as le, w as Xe, bq as Fo, q as Wo, n as Ye, z as _e, bK as Lo, bL as zo, bM as jo, bx as Uo, x as da, g as Pa, m as zt, b7 as Ko, D as qo, bN as Cn, r as wn, bO as Go, ba as Qo, bP as Xo, bQ as Zo, bR as Jo, bS as er, bT as tr, t as nr, bU as fa, bV as va, ai as jt, U as ar, bW as or, bX as rr, u as qt, bY as lr, bZ as ir, b_ as sr, b$ as ur, P as ga, c0 as cr, at as dr, f as yn, a3 as qe, a1 as dt, a4 as X, a2 as mt, j as at, E as Da, F as Ma, h as Ct, H as Ta, ak as Na, c1 as Ia, c2 as Ra, c3 as Ea, Q as Ya, G as Va, az as Oa, o as fr, c4 as vr, l as gr, c5 as pr, c6 as bt, bv as hr, aC as mr, aD as br, c7 as Cr } from "./index2.js";
import { useAttrs as wr, provide as Ha, inject as Aa, createVNode as h, createTextVNode as In, defineComponent as He, shallowRef as Ve, ref as O, watch as pe, onBeforeUnmount as Rn, nextTick as _a, computed as Y, onBeforeUpdate as yr, watchEffect as It, toRef as se, onMounted as Ba, getCurrentScope as $r, onScopeDispose as kr, unref as xr, getCurrentInstance as Sr, Fragment as yt, resolveComponent as pa, openBlock as Ke, createElementBlock as ha, createBlock as st, createCommentVNode as ut, mergeProps as Pr, withCtx as ma, renderList as Dr, toDisplayString as Mr } from "vue";
var Fa = { exports: {} };
(function(e, t) {
  (function(n, a) {
    e.exports = a();
  })(ft, function() {
    return function(n, a) {
      a.prototype.weekday = function(o) {
        var r = this.$locale().weekStart || 0, l = this.$W, i = (l < r ? l + 7 : l) - r;
        return this.$utils().u(o) ? i : this.subtract(i, "day").add(o, "day");
      };
    };
  });
})(Fa);
var Tr = Fa.exports;
const Nr = /* @__PURE__ */ vt(Tr);
var Wa = { exports: {} };
(function(e, t) {
  (function(n, a) {
    e.exports = a();
  })(ft, function() {
    return function(n, a, o) {
      var r = a.prototype, l = function(c) {
        return c && (c.indexOf ? c : c.s);
      }, i = function(c, v, g, C, b) {
        var f = c.name ? c : c.$locale(), m = l(f[v]), p = l(f[g]), y = m || p.map(function(S) {
          return S.slice(0, C);
        });
        if (!b) return y;
        var k = f.weekStart;
        return y.map(function(S, I) {
          return y[(I + (k || 0)) % 7];
        });
      }, u = function() {
        return o.Ls[o.locale()];
      }, s = function(c, v) {
        return c.formats[v] || function(g) {
          return g.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(C, b, f) {
            return b || f.slice(1);
          });
        }(c.formats[v.toUpperCase()]);
      }, d = function() {
        var c = this;
        return { months: function(v) {
          return v ? v.format("MMMM") : i(c, "months");
        }, monthsShort: function(v) {
          return v ? v.format("MMM") : i(c, "monthsShort", "months", 3);
        }, firstDayOfWeek: function() {
          return c.$locale().weekStart || 0;
        }, weekdays: function(v) {
          return v ? v.format("dddd") : i(c, "weekdays");
        }, weekdaysMin: function(v) {
          return v ? v.format("dd") : i(c, "weekdaysMin", "weekdays", 2);
        }, weekdaysShort: function(v) {
          return v ? v.format("ddd") : i(c, "weekdaysShort", "weekdays", 3);
        }, longDateFormat: function(v) {
          return s(c.$locale(), v);
        }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
      };
      r.localeData = function() {
        return d.bind(this)();
      }, o.localeData = function() {
        var c = u();
        return { firstDayOfWeek: function() {
          return c.weekStart || 0;
        }, weekdays: function() {
          return o.weekdays();
        }, weekdaysShort: function() {
          return o.weekdaysShort();
        }, weekdaysMin: function() {
          return o.weekdaysMin();
        }, months: function() {
          return o.months();
        }, monthsShort: function() {
          return o.monthsShort();
        }, longDateFormat: function(v) {
          return s(c, v);
        }, meridiem: c.meridiem, ordinal: c.ordinal };
      }, o.months = function() {
        return i(u(), "months");
      }, o.monthsShort = function() {
        return i(u(), "monthsShort", "months", 3);
      }, o.weekdays = function(c) {
        return i(u(), "weekdays", null, null, c);
      }, o.weekdaysShort = function(c) {
        return i(u(), "weekdaysShort", "weekdays", 3, c);
      }, o.weekdaysMin = function(c) {
        return i(u(), "weekdaysMin", "weekdays", 2, c);
      };
    };
  });
})(Wa);
var Ir = Wa.exports;
const Rr = /* @__PURE__ */ vt(Ir);
var La = { exports: {} };
(function(e, t) {
  (function(n, a) {
    e.exports = a();
  })(ft, function() {
    var n = "week", a = "year";
    return function(o, r, l) {
      var i = r.prototype;
      i.week = function(u) {
        if (u === void 0 && (u = null), u !== null) return this.add(7 * (u - this.week()), "day");
        var s = this.$locale().yearStart || 1;
        if (this.month() === 11 && this.date() > 25) {
          var d = l(this).startOf(a).add(1, a).date(s), c = l(this).endOf(n);
          if (d.isBefore(c)) return 1;
        }
        var v = l(this).startOf(a).date(s).startOf(n).subtract(1, "millisecond"), g = this.diff(v, n, !0);
        return g < 0 ? l(this).startOf("week").week() : Math.ceil(g);
      }, i.weeks = function(u) {
        return u === void 0 && (u = null), this.week(u);
      };
    };
  });
})(La);
var Er = La.exports;
const Yr = /* @__PURE__ */ vt(Er);
var za = { exports: {} };
(function(e, t) {
  (function(n, a) {
    e.exports = a();
  })(ft, function() {
    return function(n, a) {
      a.prototype.weekYear = function() {
        var o = this.month(), r = this.week(), l = this.year();
        return r === 1 && o === 11 ? l + 1 : o === 0 && r >= 52 ? l - 1 : l;
      };
    };
  });
})(za);
var Vr = za.exports;
const Or = /* @__PURE__ */ vt(Vr);
var ja = { exports: {} };
(function(e, t) {
  (function(n, a) {
    e.exports = a();
  })(ft, function() {
    var n = "month", a = "quarter";
    return function(o, r) {
      var l = r.prototype;
      l.quarter = function(s) {
        return this.$utils().u(s) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (s - 1));
      };
      var i = l.add;
      l.add = function(s, d) {
        return s = Number(s), this.$utils().p(d) === a ? this.add(3 * s, n) : i.bind(this)(s, d);
      };
      var u = l.startOf;
      l.startOf = function(s, d) {
        var c = this.$utils(), v = !!c.u(d) || d;
        if (c.p(s) === a) {
          var g = this.quarter() - 1;
          return v ? this.month(3 * g).startOf(n).startOf("day") : this.month(3 * g + 2).endOf(n).endOf("day");
        }
        return u.bind(this)(s, d);
      };
    };
  });
})(ja);
var Hr = ja.exports;
const Ar = /* @__PURE__ */ vt(Hr);
var Ua = { exports: {} };
(function(e, t) {
  (function(n, a) {
    e.exports = a();
  })(ft, function() {
    return function(n, a) {
      var o = a.prototype, r = o.format;
      o.format = function(l) {
        var i = this, u = this.$locale();
        if (!this.isValid()) return r.bind(this)(l);
        var s = this.$utils(), d = (l || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(c) {
          switch (c) {
            case "Q":
              return Math.ceil((i.$M + 1) / 3);
            case "Do":
              return u.ordinal(i.$D);
            case "gggg":
              return i.weekYear();
            case "GGGG":
              return i.isoWeekYear();
            case "wo":
              return u.ordinal(i.week(), "W");
            case "w":
            case "ww":
              return s.s(i.week(), c === "w" ? 1 : 2, "0");
            case "W":
            case "WW":
              return s.s(i.isoWeek(), c === "W" ? 1 : 2, "0");
            case "k":
            case "kk":
              return s.s(String(i.$H === 0 ? 24 : i.$H), c === "k" ? 1 : 2, "0");
            case "X":
              return Math.floor(i.$d.getTime() / 1e3);
            case "x":
              return i.$d.getTime();
            case "z":
              return "[" + i.offsetName() + "]";
            case "zzz":
              return "[" + i.offsetName("long") + "]";
            default:
              return c;
          }
        });
        return r.bind(this)(d);
      };
    };
  });
})(Ua);
var _r = Ua.exports;
const Br = /* @__PURE__ */ vt(_r);
var Ka = { exports: {} };
(function(e, t) {
  (function(n, a) {
    e.exports = a();
  })(ft, function() {
    var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, a = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, o = /\d/, r = /\d\d/, l = /\d\d?/, i = /\d*[^-_:/,()\s\d]+/, u = {}, s = function(f) {
      return (f = +f) + (f > 68 ? 1900 : 2e3);
    }, d = function(f) {
      return function(m) {
        this[f] = +m;
      };
    }, c = [/[+-]\d\d:?(\d\d)?|Z/, function(f) {
      (this.zone || (this.zone = {})).offset = function(m) {
        if (!m || m === "Z") return 0;
        var p = m.match(/([+-]|\d\d)/g), y = 60 * p[1] + (+p[2] || 0);
        return y === 0 ? 0 : p[0] === "+" ? -y : y;
      }(f);
    }], v = function(f) {
      var m = u[f];
      return m && (m.indexOf ? m : m.s.concat(m.f));
    }, g = function(f, m) {
      var p, y = u.meridiem;
      if (y) {
        for (var k = 1; k <= 24; k += 1) if (f.indexOf(y(k, 0, m)) > -1) {
          p = k > 12;
          break;
        }
      } else p = f === (m ? "pm" : "PM");
      return p;
    }, C = { A: [i, function(f) {
      this.afternoon = g(f, !1);
    }], a: [i, function(f) {
      this.afternoon = g(f, !0);
    }], Q: [o, function(f) {
      this.month = 3 * (f - 1) + 1;
    }], S: [o, function(f) {
      this.milliseconds = 100 * +f;
    }], SS: [r, function(f) {
      this.milliseconds = 10 * +f;
    }], SSS: [/\d{3}/, function(f) {
      this.milliseconds = +f;
    }], s: [l, d("seconds")], ss: [l, d("seconds")], m: [l, d("minutes")], mm: [l, d("minutes")], H: [l, d("hours")], h: [l, d("hours")], HH: [l, d("hours")], hh: [l, d("hours")], D: [l, d("day")], DD: [r, d("day")], Do: [i, function(f) {
      var m = u.ordinal, p = f.match(/\d+/);
      if (this.day = p[0], m) for (var y = 1; y <= 31; y += 1) m(y).replace(/\[|\]/g, "") === f && (this.day = y);
    }], w: [l, d("week")], ww: [r, d("week")], M: [l, d("month")], MM: [r, d("month")], MMM: [i, function(f) {
      var m = v("months"), p = (v("monthsShort") || m.map(function(y) {
        return y.slice(0, 3);
      })).indexOf(f) + 1;
      if (p < 1) throw new Error();
      this.month = p % 12 || p;
    }], MMMM: [i, function(f) {
      var m = v("months").indexOf(f) + 1;
      if (m < 1) throw new Error();
      this.month = m % 12 || m;
    }], Y: [/[+-]?\d+/, d("year")], YY: [r, function(f) {
      this.year = s(f);
    }], YYYY: [/\d{4}/, d("year")], Z: c, ZZ: c };
    function b(f) {
      var m, p;
      m = f, p = u && u.formats;
      for (var y = (f = m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(z, R, V) {
        var U = V && V.toUpperCase();
        return R || p[V] || n[V] || p[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(K, G, Z) {
          return G || Z.slice(1);
        });
      })).match(a), k = y.length, S = 0; S < k; S += 1) {
        var I = y[S], H = C[I], A = H && H[0], _ = H && H[1];
        y[S] = _ ? { regex: A, parser: _ } : I.replace(/^\[|\]$/g, "");
      }
      return function(z) {
        for (var R = {}, V = 0, U = 0; V < k; V += 1) {
          var K = y[V];
          if (typeof K == "string") U += K.length;
          else {
            var G = K.regex, Z = K.parser, P = z.slice(U), T = G.exec(P)[0];
            Z.call(R, T), z = z.replace(T, "");
          }
        }
        return function(F) {
          var w = F.afternoon;
          if (w !== void 0) {
            var D = F.hours;
            w ? D < 12 && (F.hours += 12) : D === 12 && (F.hours = 0), delete F.afternoon;
          }
        }(R), R;
      };
    }
    return function(f, m, p) {
      p.p.customParseFormat = !0, f && f.parseTwoDigitYear && (s = f.parseTwoDigitYear);
      var y = m.prototype, k = y.parse;
      y.parse = function(S) {
        var I = S.date, H = S.utc, A = S.args;
        this.$u = H;
        var _ = A[1];
        if (typeof _ == "string") {
          var z = A[2] === !0, R = A[3] === !0, V = z || R, U = A[2];
          R && (U = A[2]), u = this.$locale(), !z && U && (u = p.Ls[U]), this.$d = function(P, T, F, w) {
            try {
              if (["x", "X"].indexOf(T) > -1) return new Date((T === "X" ? 1e3 : 1) * P);
              var D = b(T)(P), L = D.year, q = D.month, ne = D.day, ie = D.hours, ce = D.minutes, de = D.seconds, W = D.milliseconds, re = D.zone, ee = D.week, J = /* @__PURE__ */ new Date(), ve = ne || (L || q ? 1 : J.getDate()), ae = L || J.getFullYear(), he = 0;
              L && !q || (he = q > 0 ? q - 1 : J.getMonth());
              var B, Q = ie || 0, we = ce || 0, $e = de || 0, Me = W || 0;
              return re ? new Date(Date.UTC(ae, he, ve, Q, we, $e, Me + 60 * re.offset * 1e3)) : F ? new Date(Date.UTC(ae, he, ve, Q, we, $e, Me)) : (B = new Date(ae, he, ve, Q, we, $e, Me), ee && (B = w(B).week(ee).toDate()), B);
            } catch (Fe) {
              return /* @__PURE__ */ new Date("");
            }
          }(I, _, H, p), this.init(), U && U !== !0 && (this.$L = this.locale(U).$L), V && I != this.format(_) && (this.$d = /* @__PURE__ */ new Date("")), u = {};
        } else if (_ instanceof Array) for (var K = _.length, G = 1; G <= K; G += 1) {
          A[1] = _[G - 1];
          var Z = p.apply(this, A);
          if (Z.isValid()) {
            this.$d = Z.$d, this.$L = Z.$L, this.init();
            break;
          }
          G === K && (this.$d = /* @__PURE__ */ new Date(""));
        }
        else k.call(this, S);
      };
    };
  });
})(Ka);
var Fr = Ka.exports;
const Wr = /* @__PURE__ */ vt(Fr);
ge.extend(Wr);
ge.extend(Br);
ge.extend(Nr);
ge.extend(Rr);
ge.extend(Yr);
ge.extend(Or);
ge.extend(Ar);
ge.extend((e, t) => {
  const n = t.prototype, a = n.format;
  n.format = function(r) {
    const l = (r || "").replace("Wo", "wo");
    return a.bind(this)(l);
  };
});
const Lr = {
  // ar_EG:
  // az_AZ:
  // bg_BG:
  bn_BD: "bn-bd",
  by_BY: "be",
  // ca_ES:
  // cs_CZ:
  // da_DK:
  // de_DE:
  // el_GR:
  en_GB: "en-gb",
  en_US: "en",
  // es_ES:
  // et_EE:
  // fa_IR:
  // fi_FI:
  fr_BE: "fr",
  fr_CA: "fr-ca",
  // fr_FR:
  // ga_IE:
  // gl_ES:
  // he_IL:
  // hi_IN:
  // hr_HR:
  // hu_HU:
  hy_AM: "hy-am",
  // id_ID:
  // is_IS:
  // it_IT:
  // ja_JP:
  // ka_GE:
  // kk_KZ:
  // km_KH:
  kmr_IQ: "ku",
  // kn_IN:
  // ko_KR:
  // ku_IQ: // previous ku in antd
  // lt_LT:
  // lv_LV:
  // mk_MK:
  // ml_IN:
  // mn_MN:
  // ms_MY:
  // nb_NO:
  // ne_NP:
  nl_BE: "nl-be",
  // nl_NL:
  // pl_PL:
  pt_BR: "pt-br",
  // pt_PT:
  // ro_RO:
  // ru_RU:
  // sk_SK:
  // sl_SI:
  // sr_RS:
  // sv_SE:
  // ta_IN:
  // th_TH:
  // tr_TR:
  // uk_UA:
  // ur_PK:
  // vi_VN:
  zh_CN: "zh-cn",
  zh_HK: "zh-hk",
  zh_TW: "zh-tw"
}, ct = (e) => Lr[e] || e.split("_")[0], ba = () => {
  Bo(!1, "Not match any format. Please help to fire a issue about this.");
}, zr = /\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;
function Ca(e, t, n) {
  const a = [...new Set(e.split(n))];
  let o = 0;
  for (let r = 0; r < a.length; r++) {
    const l = a[r];
    if (o += l.length, o > t)
      return l;
    o += n.length;
  }
}
const wa = (e, t) => {
  if (!e) return null;
  if (ge.isDayjs(e))
    return e;
  const n = t.matchAll(zr);
  let a = ge(e, t);
  if (n === null)
    return a;
  for (const o of n) {
    const r = o[0], l = o.index;
    if (r === "Q") {
      const i = e.slice(l - 1, l), u = Ca(e, l, i).match(/\d+/)[0];
      a = a.quarter(parseInt(u));
    }
    if (r.toLowerCase() === "wo") {
      const i = e.slice(l - 1, l), u = Ca(e, l, i).match(/\d+/)[0];
      a = a.week(parseInt(u));
    }
    r.toLowerCase() === "ww" && (a = a.week(parseInt(e.slice(l, l + r.length)))), r.toLowerCase() === "w" && (a = a.week(parseInt(e.slice(l, l + r.length + 1))));
  }
  return a;
}, jr = {
  // get
  getNow: () => ge(),
  getFixedDate: (e) => ge(e, ["YYYY-M-DD", "YYYY-MM-DD"]),
  getEndDate: (e) => e.endOf("month"),
  getWeekDay: (e) => {
    const t = e.locale("en");
    return t.weekday() + t.localeData().firstDayOfWeek();
  },
  getYear: (e) => e.year(),
  getMonth: (e) => e.month(),
  getDate: (e) => e.date(),
  getHour: (e) => e.hour(),
  getMinute: (e) => e.minute(),
  getSecond: (e) => e.second(),
  // set
  addYear: (e, t) => e.add(t, "year"),
  addMonth: (e, t) => e.add(t, "month"),
  addDate: (e, t) => e.add(t, "day"),
  setYear: (e, t) => e.year(t),
  setMonth: (e, t) => e.month(t),
  setDate: (e, t) => e.date(t),
  setHour: (e, t) => e.hour(t),
  setMinute: (e, t) => e.minute(t),
  setSecond: (e, t) => e.second(t),
  // Compare
  isAfter: (e, t) => e.isAfter(t),
  isValidate: (e) => e.isValid(),
  locale: {
    getWeekFirstDay: (e) => ge().locale(ct(e)).localeData().firstDayOfWeek(),
    getWeekFirstDate: (e, t) => t.locale(ct(e)).weekday(0),
    getWeek: (e, t) => t.locale(ct(e)).week(),
    getShortWeekDays: (e) => ge().locale(ct(e)).localeData().weekdaysMin(),
    getShortMonths: (e) => ge().locale(ct(e)).localeData().monthsShort(),
    format: (e, t, n) => t.locale(ct(e)).format(n),
    parse: (e, t, n) => {
      const a = ct(e);
      for (let o = 0; o < n.length; o += 1) {
        const r = n[o], l = t;
        if (r.includes("wo") || r.includes("Wo")) {
          const u = l.split("-")[0], s = l.split("-")[1], d = ge(u, "YYYY").startOf("year").locale(a);
          for (let c = 0; c <= 52; c += 1) {
            const v = d.add(c, "week");
            if (v.format("Wo") === s)
              return v;
          }
          return ba(), null;
        }
        const i = ge(l, r, !0).locale(a);
        if (i.isValid())
          return i;
      }
      return t || ba(), null;
    }
  },
  toDate: (e, t) => Array.isArray(e) ? e.map((n) => wa(n, t)) : wa(e, t),
  toString: (e, t) => Array.isArray(e) ? e.map((n) => ge.isDayjs(n) ? n.format(t) : n) : ge.isDayjs(e) ? e.format(t) : e
};
function ue(e) {
  const t = wr();
  return M(M({}, e), t);
}
const qa = Symbol("PanelContextProps"), En = (e) => {
  Ha(qa, e);
}, Be = () => Aa(qa, {}), Ot = {
  visibility: "hidden"
};
function rt(e, t) {
  let {
    slots: n
  } = t;
  var a;
  const o = ue(e), {
    prefixCls: r,
    prevIcon: l = "‹",
    nextIcon: i = "›",
    superPrevIcon: u = "«",
    superNextIcon: s = "»",
    onSuperPrev: d,
    onSuperNext: c,
    onPrev: v,
    onNext: g
  } = o, {
    hideNextBtn: C,
    hidePrevBtn: b
  } = Be();
  return h("div", {
    class: r
  }, [d && h("button", {
    type: "button",
    onClick: d,
    tabindex: -1,
    class: `${r}-super-prev-btn`,
    style: b.value ? Ot : {}
  }, [u]), v && h("button", {
    type: "button",
    onClick: v,
    tabindex: -1,
    class: `${r}-prev-btn`,
    style: b.value ? Ot : {}
  }, [l]), h("div", {
    class: `${r}-view`
  }, [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]), g && h("button", {
    type: "button",
    onClick: g,
    tabindex: -1,
    class: `${r}-next-btn`,
    style: C.value ? Ot : {}
  }, [i]), c && h("button", {
    type: "button",
    onClick: c,
    tabindex: -1,
    class: `${r}-super-next-btn`,
    style: C.value ? Ot : {}
  }, [s])]);
}
rt.displayName = "Header";
rt.inheritAttrs = !1;
function Yn(e) {
  const t = ue(e), {
    prefixCls: n,
    generateConfig: a,
    viewDate: o,
    onPrevDecades: r,
    onNextDecades: l
  } = t, {
    hideHeader: i
  } = Be();
  if (i)
    return null;
  const u = `${n}-header`, s = a.getYear(o), d = Math.floor(s / Ge) * Ge, c = d + Ge - 1;
  return h(rt, x(x({}, t), {}, {
    prefixCls: u,
    onSuperPrev: r,
    onSuperNext: l
  }), {
    default: () => [d, In("-"), c]
  });
}
Yn.displayName = "DecadeHeader";
Yn.inheritAttrs = !1;
function Ga(e, t, n, a, o) {
  let r = e.setHour(t, n);
  return r = e.setMinute(r, a), r = e.setSecond(r, o), r;
}
function Wt(e, t, n) {
  if (!n)
    return t;
  let a = t;
  return a = e.setHour(a, e.getHour(n)), a = e.setMinute(a, e.getMinute(n)), a = e.setSecond(a, e.getSecond(n)), a;
}
function Ur(e, t, n, a, o, r) {
  const l = Math.floor(e / a) * a;
  if (l < e)
    return [l, 60 - o, 60 - r];
  const i = Math.floor(t / o) * o;
  if (i < t)
    return [l, i, 60 - r];
  const u = Math.floor(n / r) * r;
  return [l, i, u];
}
function Kr(e, t) {
  const n = e.getYear(t), a = e.getMonth(t) + 1, o = e.getEndDate(e.getFixedDate(`${n}-${a}-01`)), r = e.getDate(o), l = a < 10 ? `0${a}` : `${a}`;
  return `${n}-${l}-${r}`;
}
function gt(e) {
  const {
    prefixCls: t,
    disabledDate: n,
    onSelect: a,
    picker: o,
    rowNum: r,
    colNum: l,
    prefixColumn: i,
    rowClassName: u,
    baseDate: s,
    getCellClassName: d,
    getCellText: c,
    getCellNode: v,
    getCellDate: g,
    generateConfig: C,
    titleCell: b,
    headerCells: f
  } = ue(e), {
    onDateMouseenter: m,
    onDateMouseleave: p,
    mode: y
  } = Be(), k = `${t}-cell`, S = [];
  for (let I = 0; I < r; I += 1) {
    const H = [];
    let A;
    for (let _ = 0; _ < l; _ += 1) {
      const z = I * l + _, R = g(s, z), V = Sn({
        cellDate: R,
        mode: y.value,
        disabledDate: n,
        generateConfig: C
      });
      _ === 0 && (A = R, i && H.push(i(A)));
      const U = b && b(R);
      H.push(h("td", {
        key: _,
        title: U,
        class: oe(k, M({
          [`${k}-disabled`]: V,
          [`${k}-start`]: c(R) === 1 || o === "year" && Number(U) % 10 === 0,
          [`${k}-end`]: U === Kr(C, R) || o === "year" && Number(U) % 10 === 9
        }, d(R))),
        onClick: (K) => {
          K.stopPropagation(), V || a(R);
        },
        onMouseenter: () => {
          !V && m && m(R);
        },
        onMouseleave: () => {
          !V && p && p(R);
        }
      }, [v ? v(R) : h("div", {
        class: `${k}-inner`
      }, [c(R)])]));
    }
    S.push(h("tr", {
      key: I,
      class: u && u(A)
    }, [H]));
  }
  return h("div", {
    class: `${t}-body`
  }, [h("table", {
    class: `${t}-content`
  }, [f && h("thead", null, [h("tr", null, [f])]), h("tbody", null, [S])])]);
}
gt.displayName = "PanelBody";
gt.inheritAttrs = !1;
const $n = 3, ya = 4;
function Vn(e) {
  const t = ue(e), n = Oe - 1, {
    prefixCls: a,
    viewDate: o,
    generateConfig: r
  } = t, l = `${a}-cell`, i = r.getYear(o), u = Math.floor(i / Oe) * Oe, s = Math.floor(i / Ge) * Ge, d = s + Ge - 1, c = r.setYear(o, s - Math.ceil(($n * ya * Oe - Ge) / 2)), v = (g) => {
    const C = r.getYear(g), b = C + n;
    return {
      [`${l}-in-view`]: s <= C && b <= d,
      [`${l}-selected`]: C === u
    };
  };
  return h(gt, x(x({}, t), {}, {
    rowNum: ya,
    colNum: $n,
    baseDate: c,
    getCellText: (g) => {
      const C = r.getYear(g);
      return `${C}-${C + n}`;
    },
    getCellClassName: v,
    getCellDate: (g, C) => r.addYear(g, C * Oe)
  }), null);
}
Vn.displayName = "DecadeBody";
Vn.inheritAttrs = !1;
const Ht = /* @__PURE__ */ new Map();
function qr(e, t) {
  let n;
  function a() {
    Fo(e) ? t() : n = Xe(() => {
      a();
    });
  }
  return a(), () => {
    Xe.cancel(n);
  };
}
function kn(e, t, n) {
  if (Ht.get(e) && Xe.cancel(Ht.get(e)), n <= 0) {
    Ht.set(e, Xe(() => {
      e.scrollTop = t;
    }));
    return;
  }
  const o = (t - e.scrollTop) / n * 10;
  Ht.set(e, Xe(() => {
    e.scrollTop += o, e.scrollTop !== t && kn(e, t, n - 10);
  }));
}
function $t(e, t) {
  let {
    onLeftRight: n,
    onCtrlLeftRight: a,
    onUpDown: o,
    onPageUpDown: r,
    onEnter: l
  } = t;
  const {
    which: i,
    ctrlKey: u,
    metaKey: s
  } = e;
  switch (i) {
    case le.LEFT:
      if (u || s) {
        if (a)
          return a(-1), !0;
      } else if (n)
        return n(-1), !0;
      break;
    case le.RIGHT:
      if (u || s) {
        if (a)
          return a(1), !0;
      } else if (n)
        return n(1), !0;
      break;
    case le.UP:
      if (o)
        return o(-1), !0;
      break;
    case le.DOWN:
      if (o)
        return o(1), !0;
      break;
    case le.PAGE_UP:
      if (r)
        return r(-1), !0;
      break;
    case le.PAGE_DOWN:
      if (r)
        return r(1), !0;
      break;
    case le.ENTER:
      if (l)
        return l(), !0;
      break;
  }
  return !1;
}
function Qa(e, t, n, a) {
  let o = e;
  if (!o)
    switch (t) {
      case "time":
        o = a ? "hh:mm:ss a" : "HH:mm:ss";
        break;
      case "week":
        o = "gggg-wo";
        break;
      case "month":
        o = "YYYY-MM";
        break;
      case "quarter":
        o = "YYYY-[Q]Q";
        break;
      case "year":
        o = "YYYY";
        break;
      default:
        o = n ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
    }
  return o;
}
function Xa(e, t, n) {
  const a = e === "time" ? 8 : 10, o = typeof t == "function" ? t(n.getNow()).length : t.length;
  return Math.max(a, o) + 2;
}
let Dt = null;
const At = /* @__PURE__ */ new Set();
function Gr(e) {
  return !Dt && typeof window != "undefined" && window.addEventListener && (Dt = (t) => {
    [...At].forEach((n) => {
      n(t);
    });
  }, window.addEventListener("mousedown", Dt)), At.add(e), () => {
    At.delete(e), At.size === 0 && (window.removeEventListener("mousedown", Dt), Dt = null);
  };
}
function Qr(e) {
  var t;
  const n = e.target;
  return e.composed && n.shadowRoot && ((t = e.composedPath) === null || t === void 0 ? void 0 : t.call(e)[0]) || n;
}
const Xr = (e) => e === "month" || e === "date" ? "year" : e, Zr = (e) => e === "date" ? "month" : e, Jr = (e) => e === "month" || e === "date" ? "quarter" : e, el = (e) => e === "date" ? "week" : e, tl = {
  year: Xr,
  month: Zr,
  quarter: Jr,
  week: el,
  time: null,
  date: null
};
function Za(e, t) {
  return process.env.NODE_ENV === "test" ? !1 : e.some((n) => n && n.contains(t));
}
const Oe = 10, Ge = Oe * 10;
function On(e) {
  const t = ue(e), {
    prefixCls: n,
    onViewDateChange: a,
    generateConfig: o,
    viewDate: r,
    operationRef: l,
    onSelect: i,
    onPanelChange: u
  } = t, s = `${n}-decade-panel`;
  l.value = {
    onKeydown: (v) => $t(v, {
      onLeftRight: (g) => {
        i(o.addYear(r, g * Oe), "key");
      },
      onCtrlLeftRight: (g) => {
        i(o.addYear(r, g * Ge), "key");
      },
      onUpDown: (g) => {
        i(o.addYear(r, g * Oe * $n), "key");
      },
      onEnter: () => {
        u("year", r);
      }
    })
  };
  const d = (v) => {
    const g = o.addYear(r, v * Ge);
    a(g), u(null, g);
  }, c = (v) => {
    i(v, "mouse"), u("year", v);
  };
  return h("div", {
    class: s
  }, [h(Yn, x(x({}, t), {}, {
    prefixCls: n,
    onPrevDecades: () => {
      d(-1);
    },
    onNextDecades: () => {
      d(1);
    }
  }), null), h(Vn, x(x({}, t), {}, {
    prefixCls: n,
    onSelect: c
  }), null)]);
}
On.displayName = "DecadePanel";
On.inheritAttrs = !1;
const Lt = 7;
function pt(e, t) {
  if (!e && !t)
    return !0;
  if (!e || !t)
    return !1;
}
function nl(e, t, n) {
  const a = pt(t, n);
  if (typeof a == "boolean")
    return a;
  const o = Math.floor(e.getYear(t) / 10), r = Math.floor(e.getYear(n) / 10);
  return o === r;
}
function Gt(e, t, n) {
  const a = pt(t, n);
  return typeof a == "boolean" ? a : e.getYear(t) === e.getYear(n);
}
function xn(e, t) {
  return Math.floor(e.getMonth(t) / 3) + 1;
}
function Ja(e, t, n) {
  const a = pt(t, n);
  return typeof a == "boolean" ? a : Gt(e, t, n) && xn(e, t) === xn(e, n);
}
function Hn(e, t, n) {
  const a = pt(t, n);
  return typeof a == "boolean" ? a : Gt(e, t, n) && e.getMonth(t) === e.getMonth(n);
}
function Qe(e, t, n) {
  const a = pt(t, n);
  return typeof a == "boolean" ? a : e.getYear(t) === e.getYear(n) && e.getMonth(t) === e.getMonth(n) && e.getDate(t) === e.getDate(n);
}
function al(e, t, n) {
  const a = pt(t, n);
  return typeof a == "boolean" ? a : e.getHour(t) === e.getHour(n) && e.getMinute(t) === e.getMinute(n) && e.getSecond(t) === e.getSecond(n);
}
function eo(e, t, n, a) {
  const o = pt(n, a);
  return typeof o == "boolean" ? o : e.locale.getWeek(t, n) === e.locale.getWeek(t, a);
}
function wt(e, t, n) {
  return Qe(e, t, n) && al(e, t, n);
}
function _t(e, t, n, a) {
  return !t || !n || !a ? !1 : !Qe(e, t, a) && !Qe(e, n, a) && e.isAfter(a, t) && e.isAfter(n, a);
}
function ol(e, t, n) {
  const a = t.locale.getWeekFirstDay(e), o = t.setDate(n, 1), r = t.getWeekDay(o);
  let l = t.addDate(o, a - r);
  return t.getMonth(l) === t.getMonth(n) && t.getDate(l) > 1 && (l = t.addDate(l, -7)), l;
}
function Tt(e, t, n) {
  let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
  switch (t) {
    case "year":
      return n.addYear(e, a * 10);
    case "quarter":
    case "month":
      return n.addYear(e, a);
    default:
      return n.addMonth(e, a);
  }
}
function Ce(e, t) {
  let {
    generateConfig: n,
    locale: a,
    format: o
  } = t;
  return typeof o == "function" ? o(e) : n.locale.format(a.locale, e, o);
}
function to(e, t) {
  let {
    generateConfig: n,
    locale: a,
    formatList: o
  } = t;
  return !e || typeof o[0] == "function" ? null : n.locale.parse(a.locale, e, o);
}
function Sn(e) {
  let {
    cellDate: t,
    mode: n,
    disabledDate: a,
    generateConfig: o
  } = e;
  if (!a) return !1;
  const r = (l, i, u) => {
    let s = i;
    for (; s <= u; ) {
      let d;
      switch (l) {
        case "date": {
          if (d = o.setDate(t, s), !a(d))
            return !1;
          break;
        }
        case "month": {
          if (d = o.setMonth(t, s), !Sn({
            cellDate: d,
            mode: "month",
            generateConfig: o,
            disabledDate: a
          }))
            return !1;
          break;
        }
        case "year": {
          if (d = o.setYear(t, s), !Sn({
            cellDate: d,
            mode: "year",
            generateConfig: o,
            disabledDate: a
          }))
            return !1;
          break;
        }
      }
      s += 1;
    }
    return !0;
  };
  switch (n) {
    case "date":
    case "week":
      return a(t);
    case "month": {
      const i = o.getDate(o.getEndDate(t));
      return r("date", 1, i);
    }
    case "quarter": {
      const l = Math.floor(o.getMonth(t) / 3) * 3, i = l + 2;
      return r("month", l, i);
    }
    case "year":
      return r("month", 0, 11);
    case "decade": {
      const l = o.getYear(t), i = Math.floor(l / Oe) * Oe, u = i + Oe - 1;
      return r("year", i, u);
    }
  }
}
function An(e) {
  const t = ue(e), {
    hideHeader: n
  } = Be();
  if (n.value)
    return null;
  const {
    prefixCls: a,
    generateConfig: o,
    locale: r,
    value: l,
    format: i
  } = t, u = `${a}-header`;
  return h(rt, {
    prefixCls: u
  }, {
    default: () => [l ? Ce(l, {
      locale: r,
      format: i,
      generateConfig: o
    }) : " "]
  });
}
An.displayName = "TimeHeader";
An.inheritAttrs = !1;
const Bt = He({
  name: "TimeUnitColumn",
  props: ["prefixCls", "units", "onSelect", "value", "active", "hideDisabledOptions"],
  setup(e) {
    const {
      open: t
    } = Be(), n = Ve(null), a = O(/* @__PURE__ */ new Map()), o = O();
    return pe(() => e.value, () => {
      const r = a.value.get(e.value);
      r && t.value !== !1 && kn(n.value, r.offsetTop, 120);
    }), Rn(() => {
      var r;
      (r = o.value) === null || r === void 0 || r.call(o);
    }), pe(t, () => {
      var r;
      (r = o.value) === null || r === void 0 || r.call(o), _a(() => {
        if (t.value) {
          const l = a.value.get(e.value);
          l && (o.value = qr(l, () => {
            kn(n.value, l.offsetTop, 0);
          }));
        }
      });
    }, {
      immediate: !0,
      flush: "post"
    }), () => {
      const {
        prefixCls: r,
        units: l,
        onSelect: i,
        value: u,
        active: s,
        hideDisabledOptions: d
      } = e, c = `${r}-cell`;
      return h("ul", {
        class: oe(`${r}-column`, {
          [`${r}-column-active`]: s
        }),
        ref: n,
        style: {
          position: "relative"
        }
      }, [l.map((v) => d && v.disabled ? null : h("li", {
        key: v.value,
        ref: (g) => {
          a.value.set(v.value, g);
        },
        class: oe(c, {
          [`${c}-disabled`]: v.disabled,
          [`${c}-selected`]: u === v.value
        }),
        onClick: () => {
          v.disabled || i(v.value);
        }
      }, [h("div", {
        class: `${c}-inner`
      }, [v.label])]))]);
    };
  }
});
function no(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "0", a = String(e);
  for (; a.length < t; )
    a = `${n}${e}`;
  return a;
}
const rl = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
};
function ao(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function oo(e) {
  const t = {};
  return Object.keys(e).forEach((n) => {
    (n.startsWith("data-") || n.startsWith("aria-") || n === "role" || n === "name") && !n.startsWith("data-__") && (t[n] = e[n]);
  }), t;
}
function j(e, t) {
  return e ? e[t] : null;
}
function Ie(e, t, n) {
  const a = [j(e, 0), j(e, 1)];
  return a[n] = typeof t == "function" ? t(a[n]) : t, !a[0] && !a[1] ? null : a;
}
function dn(e, t, n, a) {
  const o = [];
  for (let r = e; r <= t; r += n)
    o.push({
      label: no(r, 2),
      value: r,
      disabled: (a || []).includes(r)
    });
  return o;
}
const ll = He({
  compatConfig: {
    MODE: 3
  },
  name: "TimeBody",
  inheritAttrs: !1,
  props: ["generateConfig", "prefixCls", "operationRef", "activeColumnIndex", "value", "showHour", "showMinute", "showSecond", "use12Hours", "hourStep", "minuteStep", "secondStep", "disabledHours", "disabledMinutes", "disabledSeconds", "disabledTime", "hideDisabledOptions", "onSelect"],
  setup(e) {
    const t = Y(() => e.value ? e.generateConfig.getHour(e.value) : -1), n = Y(() => e.use12Hours ? t.value >= 12 : !1), a = Y(() => e.use12Hours ? t.value % 12 : t.value), o = Y(() => e.value ? e.generateConfig.getMinute(e.value) : -1), r = Y(() => e.value ? e.generateConfig.getSecond(e.value) : -1), l = O(e.generateConfig.getNow()), i = O(), u = O(), s = O();
    yr(() => {
      l.value = e.generateConfig.getNow();
    }), It(() => {
      if (e.disabledTime) {
        const f = e.disabledTime(l);
        [i.value, u.value, s.value] = [f.disabledHours, f.disabledMinutes, f.disabledSeconds];
      } else
        [i.value, u.value, s.value] = [e.disabledHours, e.disabledMinutes, e.disabledSeconds];
    });
    const d = (f, m, p, y) => {
      let k = e.value || e.generateConfig.getNow();
      const S = Math.max(0, m), I = Math.max(0, p), H = Math.max(0, y);
      return k = Ga(e.generateConfig, k, !e.use12Hours || !f ? S : S + 12, I, H), k;
    }, c = Y(() => {
      var f;
      return dn(0, 23, (f = e.hourStep) !== null && f !== void 0 ? f : 1, i.value && i.value());
    }), v = Y(() => {
      if (!e.use12Hours)
        return [!1, !1];
      const f = [!0, !0];
      return c.value.forEach((m) => {
        let {
          disabled: p,
          value: y
        } = m;
        p || (y >= 12 ? f[1] = !1 : f[0] = !1);
      }), f;
    }), g = Y(() => e.use12Hours ? c.value.filter(n.value ? (f) => f.value >= 12 : (f) => f.value < 12).map((f) => {
      const m = f.value % 12, p = m === 0 ? "12" : no(m, 2);
      return M(M({}, f), {
        label: p,
        value: m
      });
    }) : c.value), C = Y(() => {
      var f;
      return dn(0, 59, (f = e.minuteStep) !== null && f !== void 0 ? f : 1, u.value && u.value(t.value));
    }), b = Y(() => {
      var f;
      return dn(0, 59, (f = e.secondStep) !== null && f !== void 0 ? f : 1, s.value && s.value(t.value, o.value));
    });
    return () => {
      const {
        prefixCls: f,
        operationRef: m,
        activeColumnIndex: p,
        showHour: y,
        showMinute: k,
        showSecond: S,
        use12Hours: I,
        hideDisabledOptions: H,
        onSelect: A
      } = e, _ = [], z = `${f}-content`, R = `${f}-time-panel`;
      m.value = {
        onUpDown: (K) => {
          const G = _[p];
          if (G) {
            const Z = G.units.findIndex((T) => T.value === G.value), P = G.units.length;
            for (let T = 1; T < P; T += 1) {
              const F = G.units[(Z + K * T + P) % P];
              if (F.disabled !== !0) {
                G.onSelect(F.value);
                break;
              }
            }
          }
        }
      };
      function V(K, G, Z, P, T) {
        K !== !1 && _.push({
          node: Wo(G, {
            prefixCls: R,
            value: Z,
            active: p === _.length,
            onSelect: T,
            units: P,
            hideDisabledOptions: H
          }),
          onSelect: T,
          value: Z,
          units: P
        });
      }
      V(y, h(Bt, {
        key: "hour"
      }, null), a.value, g.value, (K) => {
        A(d(n.value, K, o.value, r.value), "mouse");
      }), V(k, h(Bt, {
        key: "minute"
      }, null), o.value, C.value, (K) => {
        A(d(n.value, a.value, K, r.value), "mouse");
      }), V(S, h(Bt, {
        key: "second"
      }, null), r.value, b.value, (K) => {
        A(d(n.value, a.value, o.value, K), "mouse");
      });
      let U = -1;
      return typeof n.value == "boolean" && (U = n.value ? 1 : 0), V(I === !0, h(Bt, {
        key: "12hours"
      }, null), U, [{
        label: "AM",
        value: 0,
        disabled: v.value[0]
      }, {
        label: "PM",
        value: 1,
        disabled: v.value[1]
      }], (K) => {
        A(d(!!K, a.value, o.value, r.value), "mouse");
      }), h("div", {
        class: z
      }, [_.map((K) => {
        let {
          node: G
        } = K;
        return G;
      })]);
    };
  }
}), il = (e) => e.filter((t) => t !== !1).length;
function Qt(e) {
  const t = ue(e), {
    generateConfig: n,
    format: a = "HH:mm:ss",
    prefixCls: o,
    active: r,
    operationRef: l,
    showHour: i,
    showMinute: u,
    showSecond: s,
    use12Hours: d = !1,
    onSelect: c,
    value: v
  } = t, g = `${o}-time-panel`, C = O(), b = O(-1), f = il([i, u, s, d]);
  return l.value = {
    onKeydown: (m) => $t(m, {
      onLeftRight: (p) => {
        b.value = (b.value + p + f) % f;
      },
      onUpDown: (p) => {
        b.value === -1 ? b.value = 0 : C.value && C.value.onUpDown(p);
      },
      onEnter: () => {
        c(v || n.getNow(), "key"), b.value = -1;
      }
    }),
    onBlur: () => {
      b.value = -1;
    }
  }, h("div", {
    class: oe(g, {
      [`${g}-active`]: r
    })
  }, [h(An, x(x({}, t), {}, {
    format: a,
    prefixCls: o
  }), null), h(ll, x(x({}, t), {}, {
    prefixCls: o,
    activeColumnIndex: b.value,
    operationRef: C
  }), null)]);
}
Qt.displayName = "TimePanel";
Qt.inheritAttrs = !1;
function Xt(e) {
  let {
    cellPrefixCls: t,
    generateConfig: n,
    rangedValue: a,
    hoverRangedValue: o,
    isInView: r,
    isSameCell: l,
    offsetCell: i,
    today: u,
    value: s
  } = e;
  function d(c) {
    const v = i(c, -1), g = i(c, 1), C = j(a, 0), b = j(a, 1), f = j(o, 0), m = j(o, 1), p = _t(n, f, m, c);
    function y(_) {
      return l(C, _);
    }
    function k(_) {
      return l(b, _);
    }
    const S = l(f, c), I = l(m, c), H = (p || I) && (!r(v) || k(v)), A = (p || S) && (!r(g) || y(g));
    return {
      // In view
      [`${t}-in-view`]: r(c),
      // Range
      [`${t}-in-range`]: _t(n, C, b, c),
      [`${t}-range-start`]: y(c),
      [`${t}-range-end`]: k(c),
      [`${t}-range-start-single`]: y(c) && !b,
      [`${t}-range-end-single`]: k(c) && !C,
      [`${t}-range-start-near-hover`]: y(c) && (l(v, f) || _t(n, f, m, v)),
      [`${t}-range-end-near-hover`]: k(c) && (l(g, m) || _t(n, f, m, g)),
      // Range Hover
      [`${t}-range-hover`]: p,
      [`${t}-range-hover-start`]: S,
      [`${t}-range-hover-end`]: I,
      // Range Edge
      [`${t}-range-hover-edge-start`]: H,
      [`${t}-range-hover-edge-end`]: A,
      [`${t}-range-hover-edge-start-near-range`]: H && l(v, b),
      [`${t}-range-hover-edge-end-near-range`]: A && l(g, C),
      // Others
      [`${t}-today`]: l(u, c),
      [`${t}-selected`]: l(s, c)
    };
  }
  return d;
}
const ro = Symbol("RangeContextProps"), sl = (e) => {
  Ha(ro, e);
}, Rt = () => Aa(ro, {
  rangedValue: O(),
  hoverRangedValue: O(),
  inRange: O(),
  panelPosition: O()
}), ul = He({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object,
      default: () => ({})
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const a = {
      rangedValue: O(e.value.rangedValue),
      hoverRangedValue: O(e.value.hoverRangedValue),
      inRange: O(e.value.inRange),
      panelPosition: O(e.value.panelPosition)
    };
    return sl(a), pe(() => e.value, () => {
      Object.keys(e.value).forEach((o) => {
        a[o] && (a[o].value = e.value[o]);
      });
    }), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function Zt(e) {
  const t = ue(e), {
    prefixCls: n,
    generateConfig: a,
    prefixColumn: o,
    locale: r,
    rowCount: l,
    viewDate: i,
    value: u,
    dateRender: s
  } = t, {
    rangedValue: d,
    hoverRangedValue: c
  } = Rt(), v = ol(r.locale, a, i), g = `${n}-cell`, C = a.locale.getWeekFirstDay(r.locale), b = a.getNow(), f = [], m = r.shortWeekDays || (a.locale.getShortWeekDays ? a.locale.getShortWeekDays(r.locale) : []);
  o && f.push(h("th", {
    key: "empty",
    "aria-label": "empty cell"
  }, null));
  for (let k = 0; k < Lt; k += 1)
    f.push(h("th", {
      key: k
    }, [m[(k + C) % Lt]]));
  const p = Xt({
    cellPrefixCls: g,
    today: b,
    value: u,
    generateConfig: a,
    rangedValue: o ? null : d.value,
    hoverRangedValue: o ? null : c.value,
    isSameCell: (k, S) => Qe(a, k, S),
    isInView: (k) => Hn(a, k, i),
    offsetCell: (k, S) => a.addDate(k, S)
  }), y = s ? (k) => s({
    current: k,
    today: b
  }) : void 0;
  return h(gt, x(x({}, t), {}, {
    rowNum: l,
    colNum: Lt,
    baseDate: v,
    getCellNode: y,
    getCellText: a.getDate,
    getCellClassName: p,
    getCellDate: a.addDate,
    titleCell: (k) => Ce(k, {
      locale: r,
      format: "YYYY-MM-DD",
      generateConfig: a
    }),
    headerCells: f
  }), null);
}
Zt.displayName = "DateBody";
Zt.inheritAttrs = !1;
Zt.props = [
  "prefixCls",
  "generateConfig",
  "value?",
  "viewDate",
  "locale",
  "rowCount",
  "onSelect",
  "dateRender?",
  "disabledDate?",
  // Used for week panel
  "prefixColumn?",
  "rowClassName?"
];
function _n(e) {
  const t = ue(e), {
    prefixCls: n,
    generateConfig: a,
    locale: o,
    viewDate: r,
    onNextMonth: l,
    onPrevMonth: i,
    onNextYear: u,
    onPrevYear: s,
    onYearClick: d,
    onMonthClick: c
  } = t, {
    hideHeader: v
  } = Be();
  if (v.value)
    return null;
  const g = `${n}-header`, C = o.shortMonths || (a.locale.getShortMonths ? a.locale.getShortMonths(o.locale) : []), b = a.getMonth(r), f = h("button", {
    type: "button",
    key: "year",
    onClick: d,
    tabindex: -1,
    class: `${n}-year-btn`
  }, [Ce(r, {
    locale: o,
    format: o.yearFormat,
    generateConfig: a
  })]), m = h("button", {
    type: "button",
    key: "month",
    onClick: c,
    tabindex: -1,
    class: `${n}-month-btn`
  }, [o.monthFormat ? Ce(r, {
    locale: o,
    format: o.monthFormat,
    generateConfig: a
  }) : C[b]]), p = o.monthBeforeYear ? [m, f] : [f, m];
  return h(rt, x(x({}, t), {}, {
    prefixCls: g,
    onSuperPrev: s,
    onPrev: i,
    onNext: l,
    onSuperNext: u
  }), {
    default: () => [p]
  });
}
_n.displayName = "DateHeader";
_n.inheritAttrs = !1;
const cl = 6;
function Et(e) {
  const t = ue(e), {
    prefixCls: n,
    panelName: a = "date",
    keyboardConfig: o,
    active: r,
    operationRef: l,
    generateConfig: i,
    value: u,
    viewDate: s,
    onViewDateChange: d,
    onPanelChange: c,
    onSelect: v
  } = t, g = `${n}-${a}-panel`;
  l.value = {
    onKeydown: (f) => $t(f, M({
      onLeftRight: (m) => {
        v(i.addDate(u || s, m), "key");
      },
      onCtrlLeftRight: (m) => {
        v(i.addYear(u || s, m), "key");
      },
      onUpDown: (m) => {
        v(i.addDate(u || s, m * Lt), "key");
      },
      onPageUpDown: (m) => {
        v(i.addMonth(u || s, m), "key");
      }
    }, o))
  };
  const C = (f) => {
    const m = i.addYear(s, f);
    d(m), c(null, m);
  }, b = (f) => {
    const m = i.addMonth(s, f);
    d(m), c(null, m);
  };
  return h("div", {
    class: oe(g, {
      [`${g}-active`]: r
    })
  }, [h(_n, x(x({}, t), {}, {
    prefixCls: n,
    value: u,
    viewDate: s,
    onPrevYear: () => {
      C(-1);
    },
    onNextYear: () => {
      C(1);
    },
    onPrevMonth: () => {
      b(-1);
    },
    onNextMonth: () => {
      b(1);
    },
    onMonthClick: () => {
      c("month", s);
    },
    onYearClick: () => {
      c("year", s);
    }
  }), null), h(Zt, x(x({}, t), {}, {
    onSelect: (f) => v(f, "mouse"),
    prefixCls: n,
    value: u,
    viewDate: s,
    rowCount: cl
  }), null)]);
}
Et.displayName = "DatePanel";
Et.inheritAttrs = !1;
const $a = rl("date", "time");
function Bn(e) {
  const t = ue(e), {
    prefixCls: n,
    operationRef: a,
    generateConfig: o,
    value: r,
    defaultValue: l,
    disabledTime: i,
    showTime: u,
    onSelect: s
  } = t, d = `${n}-datetime-panel`, c = O(null), v = O({}), g = O({}), C = typeof u == "object" ? M({}, u) : {};
  function b(y) {
    const k = $a.indexOf(c.value) + y;
    return $a[k] || null;
  }
  const f = (y) => {
    g.value.onBlur && g.value.onBlur(y), c.value = null;
  };
  a.value = {
    onKeydown: (y) => {
      if (y.which === le.TAB) {
        const k = b(y.shiftKey ? -1 : 1);
        return c.value = k, k && y.preventDefault(), !0;
      }
      if (c.value) {
        const k = c.value === "date" ? v : g;
        return k.value && k.value.onKeydown && k.value.onKeydown(y), !0;
      }
      return [le.LEFT, le.RIGHT, le.UP, le.DOWN].includes(y.which) ? (c.value = "date", !0) : !1;
    },
    onBlur: f,
    onClose: f
  };
  const m = (y, k) => {
    let S = y;
    k === "date" && !r && C.defaultValue ? (S = o.setHour(S, o.getHour(C.defaultValue)), S = o.setMinute(S, o.getMinute(C.defaultValue)), S = o.setSecond(S, o.getSecond(C.defaultValue))) : k === "time" && !r && l && (S = o.setYear(S, o.getYear(l)), S = o.setMonth(S, o.getMonth(l)), S = o.setDate(S, o.getDate(l))), s && s(S, "mouse");
  }, p = i ? i(r || null) : {};
  return h("div", {
    class: oe(d, {
      [`${d}-active`]: c.value
    })
  }, [h(Et, x(x({}, t), {}, {
    operationRef: v,
    active: c.value === "date",
    onSelect: (y) => {
      m(Wt(o, y, !r && typeof u == "object" ? u.defaultValue : null), "date");
    }
  }), null), h(Qt, x(x(x(x({}, t), {}, {
    format: void 0
  }, C), p), {}, {
    disabledTime: null,
    defaultValue: void 0,
    operationRef: g,
    active: c.value === "time",
    onSelect: (y) => {
      m(y, "time");
    }
  }), null)]);
}
Bn.displayName = "DatetimePanel";
Bn.inheritAttrs = !1;
function Fn(e) {
  const t = ue(e), {
    prefixCls: n,
    generateConfig: a,
    locale: o,
    value: r
  } = t, l = `${n}-cell`, i = (d) => h("td", {
    key: "week",
    class: oe(l, `${l}-week`)
  }, [a.locale.getWeek(o.locale, d)]), u = `${n}-week-panel-row`, s = (d) => oe(u, {
    [`${u}-selected`]: eo(a, o.locale, r, d)
  });
  return h(Et, x(x({}, t), {}, {
    panelName: "week",
    prefixColumn: i,
    rowClassName: s,
    keyboardConfig: {
      onLeftRight: null
    }
  }), null);
}
Fn.displayName = "WeekPanel";
Fn.inheritAttrs = !1;
function Wn(e) {
  const t = ue(e), {
    prefixCls: n,
    generateConfig: a,
    locale: o,
    viewDate: r,
    onNextYear: l,
    onPrevYear: i,
    onYearClick: u
  } = t, {
    hideHeader: s
  } = Be();
  if (s.value)
    return null;
  const d = `${n}-header`;
  return h(rt, x(x({}, t), {}, {
    prefixCls: d,
    onSuperPrev: i,
    onSuperNext: l
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: u,
      class: `${n}-year-btn`
    }, [Ce(r, {
      locale: o,
      format: o.yearFormat,
      generateConfig: a
    })])]
  });
}
Wn.displayName = "MonthHeader";
Wn.inheritAttrs = !1;
const lo = 3, dl = 4;
function Ln(e) {
  const t = ue(e), {
    prefixCls: n,
    locale: a,
    value: o,
    viewDate: r,
    generateConfig: l,
    monthCellRender: i
  } = t, {
    rangedValue: u,
    hoverRangedValue: s
  } = Rt(), d = `${n}-cell`, c = Xt({
    cellPrefixCls: d,
    value: o,
    generateConfig: l,
    rangedValue: u.value,
    hoverRangedValue: s.value,
    isSameCell: (b, f) => Hn(l, b, f),
    isInView: () => !0,
    offsetCell: (b, f) => l.addMonth(b, f)
  }), v = a.shortMonths || (l.locale.getShortMonths ? l.locale.getShortMonths(a.locale) : []), g = l.setMonth(r, 0), C = i ? (b) => i({
    current: b,
    locale: a
  }) : void 0;
  return h(gt, x(x({}, t), {}, {
    rowNum: dl,
    colNum: lo,
    baseDate: g,
    getCellNode: C,
    getCellText: (b) => a.monthFormat ? Ce(b, {
      locale: a,
      format: a.monthFormat,
      generateConfig: l
    }) : v[l.getMonth(b)],
    getCellClassName: c,
    getCellDate: l.addMonth,
    titleCell: (b) => Ce(b, {
      locale: a,
      format: "YYYY-MM",
      generateConfig: l
    })
  }), null);
}
Ln.displayName = "MonthBody";
Ln.inheritAttrs = !1;
function zn(e) {
  const t = ue(e), {
    prefixCls: n,
    operationRef: a,
    onViewDateChange: o,
    generateConfig: r,
    value: l,
    viewDate: i,
    onPanelChange: u,
    onSelect: s
  } = t, d = `${n}-month-panel`;
  a.value = {
    onKeydown: (v) => $t(v, {
      onLeftRight: (g) => {
        s(r.addMonth(l || i, g), "key");
      },
      onCtrlLeftRight: (g) => {
        s(r.addYear(l || i, g), "key");
      },
      onUpDown: (g) => {
        s(r.addMonth(l || i, g * lo), "key");
      },
      onEnter: () => {
        u("date", l || i);
      }
    })
  };
  const c = (v) => {
    const g = r.addYear(i, v);
    o(g), u(null, g);
  };
  return h("div", {
    class: d
  }, [h(Wn, x(x({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      c(-1);
    },
    onNextYear: () => {
      c(1);
    },
    onYearClick: () => {
      u("year", i);
    }
  }), null), h(Ln, x(x({}, t), {}, {
    prefixCls: n,
    onSelect: (v) => {
      s(v, "mouse"), u("date", v);
    }
  }), null)]);
}
zn.displayName = "MonthPanel";
zn.inheritAttrs = !1;
function jn(e) {
  const t = ue(e), {
    prefixCls: n,
    generateConfig: a,
    locale: o,
    viewDate: r,
    onNextYear: l,
    onPrevYear: i,
    onYearClick: u
  } = t, {
    hideHeader: s
  } = Be();
  if (s.value)
    return null;
  const d = `${n}-header`;
  return h(rt, x(x({}, t), {}, {
    prefixCls: d,
    onSuperPrev: i,
    onSuperNext: l
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: u,
      class: `${n}-year-btn`
    }, [Ce(r, {
      locale: o,
      format: o.yearFormat,
      generateConfig: a
    })])]
  });
}
jn.displayName = "QuarterHeader";
jn.inheritAttrs = !1;
const fl = 4, vl = 1;
function Un(e) {
  const t = ue(e), {
    prefixCls: n,
    locale: a,
    value: o,
    viewDate: r,
    generateConfig: l
  } = t, {
    rangedValue: i,
    hoverRangedValue: u
  } = Rt(), s = `${n}-cell`, d = Xt({
    cellPrefixCls: s,
    value: o,
    generateConfig: l,
    rangedValue: i.value,
    hoverRangedValue: u.value,
    isSameCell: (v, g) => Ja(l, v, g),
    isInView: () => !0,
    offsetCell: (v, g) => l.addMonth(v, g * 3)
  }), c = l.setDate(l.setMonth(r, 0), 1);
  return h(gt, x(x({}, t), {}, {
    rowNum: vl,
    colNum: fl,
    baseDate: c,
    getCellText: (v) => Ce(v, {
      locale: a,
      format: a.quarterFormat || "[Q]Q",
      generateConfig: l
    }),
    getCellClassName: d,
    getCellDate: (v, g) => l.addMonth(v, g * 3),
    titleCell: (v) => Ce(v, {
      locale: a,
      format: "YYYY-[Q]Q",
      generateConfig: l
    })
  }), null);
}
Un.displayName = "QuarterBody";
Un.inheritAttrs = !1;
function Kn(e) {
  const t = ue(e), {
    prefixCls: n,
    operationRef: a,
    onViewDateChange: o,
    generateConfig: r,
    value: l,
    viewDate: i,
    onPanelChange: u,
    onSelect: s
  } = t, d = `${n}-quarter-panel`;
  a.value = {
    onKeydown: (v) => $t(v, {
      onLeftRight: (g) => {
        s(r.addMonth(l || i, g * 3), "key");
      },
      onCtrlLeftRight: (g) => {
        s(r.addYear(l || i, g), "key");
      },
      onUpDown: (g) => {
        s(r.addYear(l || i, g), "key");
      }
    })
  };
  const c = (v) => {
    const g = r.addYear(i, v);
    o(g), u(null, g);
  };
  return h("div", {
    class: d
  }, [h(jn, x(x({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      c(-1);
    },
    onNextYear: () => {
      c(1);
    },
    onYearClick: () => {
      u("year", i);
    }
  }), null), h(Un, x(x({}, t), {}, {
    prefixCls: n,
    onSelect: (v) => {
      s(v, "mouse");
    }
  }), null)]);
}
Kn.displayName = "QuarterPanel";
Kn.inheritAttrs = !1;
function qn(e) {
  const t = ue(e), {
    prefixCls: n,
    generateConfig: a,
    viewDate: o,
    onPrevDecade: r,
    onNextDecade: l,
    onDecadeClick: i
  } = t, {
    hideHeader: u
  } = Be();
  if (u.value)
    return null;
  const s = `${n}-header`, d = a.getYear(o), c = Math.floor(d / ot) * ot, v = c + ot - 1;
  return h(rt, x(x({}, t), {}, {
    prefixCls: s,
    onSuperPrev: r,
    onSuperNext: l
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: i,
      class: `${n}-decade-btn`
    }, [c, In("-"), v])]
  });
}
qn.displayName = "YearHeader";
qn.inheritAttrs = !1;
const Pn = 3, ka = 4;
function Gn(e) {
  const t = ue(e), {
    prefixCls: n,
    value: a,
    viewDate: o,
    locale: r,
    generateConfig: l
  } = t, {
    rangedValue: i,
    hoverRangedValue: u
  } = Rt(), s = `${n}-cell`, d = l.getYear(o), c = Math.floor(d / ot) * ot, v = c + ot - 1, g = l.setYear(o, c - Math.ceil((Pn * ka - ot) / 2)), C = (f) => {
    const m = l.getYear(f);
    return c <= m && m <= v;
  }, b = Xt({
    cellPrefixCls: s,
    value: a,
    generateConfig: l,
    rangedValue: i.value,
    hoverRangedValue: u.value,
    isSameCell: (f, m) => Gt(l, f, m),
    isInView: C,
    offsetCell: (f, m) => l.addYear(f, m)
  });
  return h(gt, x(x({}, t), {}, {
    rowNum: ka,
    colNum: Pn,
    baseDate: g,
    getCellText: l.getYear,
    getCellClassName: b,
    getCellDate: l.addYear,
    titleCell: (f) => Ce(f, {
      locale: r,
      format: "YYYY",
      generateConfig: l
    })
  }), null);
}
Gn.displayName = "YearBody";
Gn.inheritAttrs = !1;
const ot = 10;
function Qn(e) {
  const t = ue(e), {
    prefixCls: n,
    operationRef: a,
    onViewDateChange: o,
    generateConfig: r,
    value: l,
    viewDate: i,
    sourceMode: u,
    onSelect: s,
    onPanelChange: d
  } = t, c = `${n}-year-panel`;
  a.value = {
    onKeydown: (g) => $t(g, {
      onLeftRight: (C) => {
        s(r.addYear(l || i, C), "key");
      },
      onCtrlLeftRight: (C) => {
        s(r.addYear(l || i, C * ot), "key");
      },
      onUpDown: (C) => {
        s(r.addYear(l || i, C * Pn), "key");
      },
      onEnter: () => {
        d(u === "date" ? "date" : "month", l || i);
      }
    })
  };
  const v = (g) => {
    const C = r.addYear(i, g * 10);
    o(C), d(null, C);
  };
  return h("div", {
    class: c
  }, [h(qn, x(x({}, t), {}, {
    prefixCls: n,
    onPrevDecade: () => {
      v(-1);
    },
    onNextDecade: () => {
      v(1);
    },
    onDecadeClick: () => {
      d("decade", i);
    }
  }), null), h(Gn, x(x({}, t), {}, {
    prefixCls: n,
    onSelect: (g) => {
      d(u === "date" ? "date" : "month", g), s(g, "mouse");
    }
  }), null)]);
}
Qn.displayName = "YearPanel";
Qn.inheritAttrs = !1;
function io(e, t, n) {
  return n ? h("div", {
    class: `${e}-footer-extra`
  }, [n(t)]) : null;
}
function so(e) {
  let {
    prefixCls: t,
    components: n = {},
    needConfirmButton: a,
    onNow: o,
    onOk: r,
    okDisabled: l,
    showNow: i,
    locale: u
  } = e, s, d;
  if (a) {
    const c = n.button || "button";
    o && i !== !1 && (s = h("li", {
      class: `${t}-now`
    }, [h("a", {
      class: `${t}-now-btn`,
      onClick: o
    }, [u.now])])), d = a && h("li", {
      class: `${t}-ok`
    }, [h(c, {
      disabled: l,
      onClick: (v) => {
        v.stopPropagation(), r && r();
      }
    }, {
      default: () => [u.ok]
    })]);
  }
  return !s && !d ? null : h("ul", {
    class: `${t}-ranges`
  }, [s, d]);
}
function gl() {
  return He({
    name: "PickerPanel",
    inheritAttrs: !1,
    props: {
      prefixCls: String,
      locale: Object,
      generateConfig: Object,
      value: Object,
      defaultValue: Object,
      pickerValue: Object,
      defaultPickerValue: Object,
      disabledDate: Function,
      mode: String,
      picker: {
        type: String,
        default: "date"
      },
      tabindex: {
        type: [Number, String],
        default: 0
      },
      showNow: {
        type: Boolean,
        default: void 0
      },
      showTime: [Boolean, Object],
      showToday: Boolean,
      renderExtraFooter: Function,
      dateRender: Function,
      hideHeader: {
        type: Boolean,
        default: void 0
      },
      onSelect: Function,
      onChange: Function,
      onPanelChange: Function,
      onMousedown: Function,
      onPickerValueChange: Function,
      onOk: Function,
      components: Object,
      direction: String,
      hourStep: {
        type: Number,
        default: 1
      },
      minuteStep: {
        type: Number,
        default: 1
      },
      secondStep: {
        type: Number,
        default: 1
      }
    },
    setup(e, t) {
      let {
        attrs: n
      } = t;
      const a = Y(() => e.picker === "date" && !!e.showTime || e.picker === "time"), o = Y(() => 24 % e.hourStep === 0), r = Y(() => 60 % e.minuteStep === 0), l = Y(() => 60 % e.secondStep === 0);
      process.env.NODE_ENV !== "production" && It(() => {
        const {
          generateConfig: P,
          value: T,
          hourStep: F = 1,
          minuteStep: w = 1,
          secondStep: D = 1
        } = e;
        Ye(!T || P.isValidate(T), "Invalidate date pass to `value`."), Ye(!T || P.isValidate(T), "Invalidate date pass to `defaultValue`."), Ye(o.value, `\`hourStep\` ${F} is invalid. It should be a factor of 24.`), Ye(r.value, `\`minuteStep\` ${w} is invalid. It should be a factor of 60.`), Ye(l.value, `\`secondStep\` ${D} is invalid. It should be a factor of 60.`);
      });
      const i = Be(), {
        operationRef: u,
        onSelect: s,
        hideRanges: d,
        defaultOpenValue: c
      } = i, {
        inRange: v,
        panelPosition: g,
        rangedValue: C,
        hoverRangedValue: b
      } = Rt(), f = O({}), [m, p] = _e(null, {
        value: se(e, "value"),
        defaultValue: e.defaultValue,
        postState: (P) => !P && (c != null && c.value) && e.picker === "time" ? c.value : P
      }), [y, k] = _e(null, {
        value: se(e, "pickerValue"),
        defaultValue: e.defaultPickerValue || m.value,
        postState: (P) => {
          const {
            generateConfig: T,
            showTime: F,
            defaultValue: w
          } = e, D = T.getNow();
          return P ? !m.value && e.showTime ? typeof F == "object" ? Wt(T, Array.isArray(P) ? P[0] : P, F.defaultValue || D) : w ? Wt(T, Array.isArray(P) ? P[0] : P, w) : Wt(T, Array.isArray(P) ? P[0] : P, D) : P : D;
        }
      }), S = (P) => {
        k(P), e.onPickerValueChange && e.onPickerValueChange(P);
      }, I = (P) => {
        const T = tl[e.picker];
        return T ? T(P) : P;
      }, [H, A] = _e(() => e.picker === "time" ? "time" : I("date"), {
        value: se(e, "mode")
      });
      pe(() => e.picker, () => {
        A(e.picker);
      });
      const _ = O(H.value), z = (P) => {
        _.value = P;
      }, R = (P, T) => {
        const {
          onPanelChange: F,
          generateConfig: w
        } = e, D = I(P || H.value);
        z(H.value), A(D), F && (H.value !== D || wt(w, y.value, y.value)) && F(T, D);
      }, V = function(P, T) {
        let F = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
        const {
          picker: w,
          generateConfig: D,
          onSelect: L,
          onChange: q,
          disabledDate: ne
        } = e;
        (H.value === w || F) && (p(P), L && L(P), s && s(P, T), q && !wt(D, P, m.value) && !(ne != null && ne(P)) && q(P));
      }, U = (P) => f.value && f.value.onKeydown ? ([le.LEFT, le.RIGHT, le.UP, le.DOWN, le.PAGE_UP, le.PAGE_DOWN, le.ENTER].includes(P.which) && P.preventDefault(), f.value.onKeydown(P)) : (Ye(!1, "Panel not correct handle keyDown event. Please help to fire issue about this."), !1), K = (P) => {
        f.value && f.value.onBlur && f.value.onBlur(P);
      }, G = () => {
        const {
          generateConfig: P,
          hourStep: T,
          minuteStep: F,
          secondStep: w
        } = e, D = P.getNow(), L = Ur(P.getHour(D), P.getMinute(D), P.getSecond(D), o.value ? T : 1, r.value ? F : 1, l.value ? w : 1), q = Ga(
          P,
          D,
          L[0],
          // hour
          L[1],
          // minute
          L[2]
        );
        V(q, "submit");
      }, Z = Y(() => {
        const {
          prefixCls: P,
          direction: T
        } = e;
        return oe(`${P}-panel`, {
          [`${P}-panel-has-range`]: C && C.value && C.value[0] && C.value[1],
          [`${P}-panel-has-range-hover`]: b && b.value && b.value[0] && b.value[1],
          [`${P}-panel-rtl`]: T === "rtl"
        });
      });
      return En(M(M({}, i), {
        mode: H,
        hideHeader: Y(() => {
          var P;
          return e.hideHeader !== void 0 ? e.hideHeader : (P = i.hideHeader) === null || P === void 0 ? void 0 : P.value;
        }),
        hidePrevBtn: Y(() => v.value && g.value === "right"),
        hideNextBtn: Y(() => v.value && g.value === "left")
      })), pe(() => e.value, () => {
        e.value && k(e.value);
      }), () => {
        const {
          prefixCls: P = "ant-picker",
          locale: T,
          generateConfig: F,
          disabledDate: w,
          picker: D = "date",
          tabindex: L = 0,
          showNow: q,
          showTime: ne,
          showToday: ie,
          renderExtraFooter: ce,
          onMousedown: de,
          onOk: W,
          components: re
        } = e;
        u && g.value !== "right" && (u.value = {
          onKeydown: U,
          onClose: () => {
            f.value && f.value.onClose && f.value.onClose();
          }
        });
        let ee;
        const J = M(M(M({}, n), e), {
          operationRef: f,
          prefixCls: P,
          viewDate: y.value,
          value: m.value,
          onViewDateChange: S,
          sourceMode: _.value,
          onPanelChange: R,
          disabledDate: w
        });
        switch (delete J.onChange, delete J.onSelect, H.value) {
          case "decade":
            ee = h(On, x(x({}, J), {}, {
              onSelect: (B, Q) => {
                S(B), V(B, Q);
              }
            }), null);
            break;
          case "year":
            ee = h(Qn, x(x({}, J), {}, {
              onSelect: (B, Q) => {
                S(B), V(B, Q);
              }
            }), null);
            break;
          case "month":
            ee = h(zn, x(x({}, J), {}, {
              onSelect: (B, Q) => {
                S(B), V(B, Q);
              }
            }), null);
            break;
          case "quarter":
            ee = h(Kn, x(x({}, J), {}, {
              onSelect: (B, Q) => {
                S(B), V(B, Q);
              }
            }), null);
            break;
          case "week":
            ee = h(Fn, x(x({}, J), {}, {
              onSelect: (B, Q) => {
                S(B), V(B, Q);
              }
            }), null);
            break;
          case "time":
            delete J.showTime, ee = h(Qt, x(x(x({}, J), typeof ne == "object" ? ne : null), {}, {
              onSelect: (B, Q) => {
                S(B), V(B, Q);
              }
            }), null);
            break;
          default:
            ne ? ee = h(Bn, x(x({}, J), {}, {
              onSelect: (B, Q) => {
                S(B), V(B, Q);
              }
            }), null) : ee = h(Et, x(x({}, J), {}, {
              onSelect: (B, Q) => {
                S(B), V(B, Q);
              }
            }), null);
        }
        let ve, ae;
        d != null && d.value || (ve = io(P, H.value, ce), ae = so({
          prefixCls: P,
          components: re,
          needConfirmButton: a.value,
          okDisabled: !m.value || w && w(m.value),
          locale: T,
          showNow: q,
          onNow: a.value && G,
          onOk: () => {
            m.value && (V(m.value, "submit", !0), W && W(m.value));
          }
        }));
        let he;
        if (ie && H.value === "date" && D === "date" && !ne) {
          const B = F.getNow(), Q = `${P}-today-btn`, we = w && w(B);
          he = h("a", {
            class: oe(Q, we && `${Q}-disabled`),
            "aria-disabled": we,
            onClick: () => {
              we || V(B, "mouse", !0);
            }
          }, [T.today]);
        }
        return h("div", {
          tabindex: L,
          class: oe(Z.value, n.class),
          style: n.style,
          onKeydown: U,
          onBlur: K,
          onMousedown: de
        }, [ee, ve || ae || he ? h("div", {
          class: `${P}-footer`
        }, [ve, ae, he]) : null]);
      };
    }
  });
}
const pl = gl(), uo = (e) => h(pl, e), hl = {
  bottomLeft: {
    points: ["tl", "bl"],
    offset: [0, 4],
    overflow: {
      adjustX: 1,
      adjustY: 1
    }
  },
  bottomRight: {
    points: ["tr", "br"],
    offset: [0, 4],
    overflow: {
      adjustX: 1,
      adjustY: 1
    }
  },
  topLeft: {
    points: ["bl", "tl"],
    offset: [0, -4],
    overflow: {
      adjustX: 0,
      adjustY: 1
    }
  },
  topRight: {
    points: ["br", "tr"],
    offset: [0, -4],
    overflow: {
      adjustX: 0,
      adjustY: 1
    }
  }
};
function co(e, t) {
  let {
    slots: n
  } = t;
  const {
    prefixCls: a,
    popupStyle: o,
    visible: r,
    dropdownClassName: l,
    dropdownAlign: i,
    transitionName: u,
    getPopupContainer: s,
    range: d,
    popupPlacement: c,
    direction: v
  } = ue(e), g = `${a}-dropdown`;
  return h(Lo, {
    showAction: [],
    hideAction: [],
    popupPlacement: c !== void 0 ? c : v === "rtl" ? "bottomRight" : "bottomLeft",
    builtinPlacements: hl,
    prefixCls: g,
    popupTransitionName: u,
    popupAlign: i,
    popupVisible: r,
    popupClassName: oe(l, {
      [`${g}-range`]: d,
      [`${g}-rtl`]: v === "rtl"
    }),
    popupStyle: o,
    getPopupContainer: s
  }, {
    default: n.default,
    popup: n.popupElement
  });
}
const fo = He({
  name: "PresetPanel",
  props: {
    prefixCls: String,
    presets: {
      type: Array,
      default: () => []
    },
    onClick: Function,
    onHover: Function
  },
  setup(e) {
    return () => e.presets.length ? h("div", {
      class: `${e.prefixCls}-presets`
    }, [h("ul", null, [e.presets.map((t, n) => {
      let {
        label: a,
        value: o
      } = t;
      return h("li", {
        key: n,
        onClick: (r) => {
          r.stopPropagation(), e.onClick(o);
        },
        onMouseenter: () => {
          var r;
          (r = e.onHover) === null || r === void 0 || r.call(e, o);
        },
        onMouseleave: () => {
          var r;
          (r = e.onHover) === null || r === void 0 || r.call(e, null);
        }
      }, [a]);
    })])]) : null;
  }
});
function Dn(e) {
  let {
    open: t,
    value: n,
    isClickOutside: a,
    triggerOpen: o,
    forwardKeydown: r,
    onKeydown: l,
    blurToCancel: i,
    onSubmit: u,
    onCancel: s,
    onFocus: d,
    onBlur: c
  } = e;
  const v = Ve(!1), g = Ve(!1), C = Ve(!1), b = Ve(!1), f = Ve(!1), m = Y(() => ({
    onMousedown: () => {
      v.value = !0, o(!0);
    },
    onKeydown: (y) => {
      if (l(y, () => {
        f.value = !0;
      }), !f.value) {
        switch (y.which) {
          case le.ENTER: {
            t.value ? u() !== !1 && (v.value = !0) : o(!0), y.preventDefault();
            return;
          }
          case le.TAB: {
            v.value && t.value && !y.shiftKey ? (v.value = !1, y.preventDefault()) : !v.value && t.value && !r(y) && y.shiftKey && (v.value = !0, y.preventDefault());
            return;
          }
          case le.ESC: {
            v.value = !0, s();
            return;
          }
        }
        !t.value && ![le.SHIFT].includes(y.which) ? o(!0) : v.value || r(y);
      }
    },
    onFocus: (y) => {
      v.value = !0, g.value = !0, d && d(y);
    },
    onBlur: (y) => {
      if (C.value || !a(document.activeElement)) {
        C.value = !1;
        return;
      }
      i.value ? setTimeout(() => {
        let {
          activeElement: k
        } = document;
        for (; k && k.shadowRoot; )
          k = k.shadowRoot.activeElement;
        a(k) && s();
      }, 0) : t.value && (o(!1), b.value && u()), g.value = !1, c && c(y);
    }
  }));
  pe(t, () => {
    b.value = !1;
  }), pe(n, () => {
    b.value = !0;
  });
  const p = Ve();
  return Ba(() => {
    p.value = Gr((y) => {
      const k = Qr(y);
      if (t.value) {
        const S = a(k);
        S ? (!g.value || S) && o(!1) : (C.value = !0, Xe(() => {
          C.value = !1;
        }));
      }
    });
  }), Rn(() => {
    p.value && p.value();
  }), [m, {
    focused: g,
    typing: v
  }];
}
function Mn(e) {
  let {
    valueTexts: t,
    onTextChange: n
  } = e;
  const a = O("");
  function o(l) {
    a.value = l, n(l);
  }
  function r() {
    a.value = t.value[0];
  }
  return pe(() => [...t.value], function(l) {
    let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    l.join("||") !== i.join("||") && t.value.every((u) => u !== a.value) && r();
  }, {
    immediate: !0
  }), [a, o, r];
}
function Ut(e, t) {
  let {
    formatList: n,
    generateConfig: a,
    locale: o
  } = t;
  const r = zo(() => {
    if (!e.value)
      return [[""], ""];
    let u = "";
    const s = [];
    for (let d = 0; d < n.value.length; d += 1) {
      const c = n.value[d], v = Ce(e.value, {
        generateConfig: a.value,
        locale: o.value,
        format: c
      });
      s.push(v), d === 0 && (u = v);
    }
    return [s, u];
  }, [e, n], (u, s) => s[0] !== u[0] || !jo(s[1], u[1])), l = Y(() => r.value[0]), i = Y(() => r.value[1]);
  return [l, i];
}
function Tn(e, t) {
  let {
    formatList: n,
    generateConfig: a,
    locale: o
  } = t;
  const r = O(null);
  let l;
  function i(c) {
    let v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    if (Xe.cancel(l), v) {
      r.value = c;
      return;
    }
    l = Xe(() => {
      r.value = c;
    });
  }
  const [, u] = Ut(r, {
    formatList: n,
    generateConfig: a,
    locale: o
  });
  function s(c) {
    i(c);
  }
  function d() {
    let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
    i(null, c);
  }
  return pe(e, () => {
    d(!0);
  }), Rn(() => {
    Xe.cancel(l);
  }), [u, s, d];
}
function vo(e, t) {
  return Y(() => e != null && e.value ? e.value : t != null && t.value ? (Uo(!1, "`ranges` is deprecated. Please use `presets` instead."), Object.keys(t.value).map((a) => {
    const o = t.value[a], r = typeof o == "function" ? o() : o;
    return {
      label: a,
      value: r
    };
  })) : []);
}
function go(e) {
  const {
    picker: t,
    disabledHours: n,
    disabledMinutes: a,
    disabledSeconds: o
  } = e;
  t === "time" && (n || a || o) && Ye(!1, "'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");
}
function ml() {
  return He({
    name: "Picker",
    inheritAttrs: !1,
    props: ["prefixCls", "id", "tabindex", "dropdownClassName", "dropdownAlign", "popupStyle", "transitionName", "generateConfig", "locale", "inputReadOnly", "allowClear", "autofocus", "showTime", "showNow", "showHour", "showMinute", "showSecond", "picker", "format", "use12Hours", "value", "defaultValue", "open", "defaultOpen", "defaultOpenValue", "suffixIcon", "presets", "clearIcon", "disabled", "disabledDate", "placeholder", "getPopupContainer", "panelRender", "inputRender", "onChange", "onOpenChange", "onPanelChange", "onFocus", "onBlur", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onContextmenu", "onClick", "onKeydown", "onSelect", "direction", "autocomplete", "showToday", "renderExtraFooter", "dateRender", "minuteStep", "hourStep", "secondStep", "hideDisabledOptions"],
    setup(e, t) {
      let {
        attrs: n,
        expose: a
      } = t;
      const o = O(null), r = Y(() => e.presets), l = vo(r), i = Y(() => {
        var w;
        return (w = e.picker) !== null && w !== void 0 ? w : "date";
      }), u = Y(() => i.value === "date" && !!e.showTime || i.value === "time");
      process.env.NODE_ENV !== "production" && go(e);
      const s = Y(() => ao(Qa(e.format, i.value, e.showTime, e.use12Hours))), d = O(null), c = O(null), v = O(null), [g, C] = _e(null, {
        value: se(e, "value"),
        defaultValue: e.defaultValue
      }), b = O(g.value), f = (w) => {
        b.value = w;
      }, m = O(null), [p, y] = _e(!1, {
        value: se(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (w) => e.disabled ? !1 : w,
        onChange: (w) => {
          e.onOpenChange && e.onOpenChange(w), !w && m.value && m.value.onClose && m.value.onClose();
        }
      }), [k, S] = Ut(b, {
        formatList: s,
        generateConfig: se(e, "generateConfig"),
        locale: se(e, "locale")
      }), [I, H, A] = Mn({
        valueTexts: k,
        onTextChange: (w) => {
          const D = to(w, {
            locale: e.locale,
            formatList: s.value,
            generateConfig: e.generateConfig
          });
          D && (!e.disabledDate || !e.disabledDate(D)) && f(D);
        }
      }), _ = (w) => {
        const {
          onChange: D,
          generateConfig: L,
          locale: q
        } = e;
        f(w), C(w), D && !wt(L, g.value, w) && D(w, w ? Ce(w, {
          generateConfig: L,
          locale: q,
          format: s.value[0]
        }) : "");
      }, z = (w) => {
        e.disabled && w || y(w);
      }, R = (w) => p.value && m.value && m.value.onKeydown ? m.value.onKeydown(w) : (Ye(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), V = function() {
        e.onMouseup && e.onMouseup(...arguments), o.value && (o.value.focus(), z(!0));
      }, [U, {
        focused: K,
        typing: G
      }] = Dn({
        blurToCancel: u,
        open: p,
        value: I,
        triggerOpen: z,
        forwardKeydown: R,
        isClickOutside: (w) => !Za([d.value, c.value, v.value], w),
        onSubmit: () => (
          // When user typing disabledDate with keyboard and enter, this value will be empty
          !b.value || // Normal disabled check
          e.disabledDate && e.disabledDate(b.value) ? !1 : (_(b.value), z(!1), A(), !0)
        ),
        onCancel: () => {
          z(!1), f(g.value), A();
        },
        onKeydown: (w, D) => {
          var L;
          (L = e.onKeydown) === null || L === void 0 || L.call(e, w, D);
        },
        onFocus: (w) => {
          var D;
          (D = e.onFocus) === null || D === void 0 || D.call(e, w);
        },
        onBlur: (w) => {
          var D;
          (D = e.onBlur) === null || D === void 0 || D.call(e, w);
        }
      });
      pe([p, k], () => {
        p.value || (f(g.value), !k.value.length || k.value[0] === "" ? H("") : S.value !== I.value && A());
      }), pe(i, () => {
        p.value || A();
      }), pe(g, () => {
        f(g.value);
      });
      const [Z, P, T] = Tn(I, {
        formatList: s,
        generateConfig: se(e, "generateConfig"),
        locale: se(e, "locale")
      }), F = (w, D) => {
        (D === "submit" || D !== "key" && !u.value) && (_(w), z(!1));
      };
      return En({
        operationRef: m,
        hideHeader: Y(() => i.value === "time"),
        onSelect: F,
        open: p,
        defaultOpenValue: se(e, "defaultOpenValue"),
        onDateMouseenter: P,
        onDateMouseleave: T
      }), a({
        focus: () => {
          o.value && o.value.focus();
        },
        blur: () => {
          o.value && o.value.blur();
        }
      }), () => {
        const {
          prefixCls: w = "rc-picker",
          id: D,
          tabindex: L,
          dropdownClassName: q,
          dropdownAlign: ne,
          popupStyle: ie,
          transitionName: ce,
          generateConfig: de,
          locale: W,
          inputReadOnly: re,
          allowClear: ee,
          autofocus: J,
          picker: ve = "date",
          defaultOpenValue: ae,
          suffixIcon: he,
          clearIcon: B,
          disabled: Q,
          placeholder: we,
          getPopupContainer: $e,
          panelRender: Me,
          onMousedown: Fe,
          onMouseenter: Se,
          onMouseleave: We,
          onContextmenu: Le,
          onClick: Te,
          onSelect: me,
          direction: Re,
          autocomplete: ht = "off"
        } = e, lt = M(M(M({}, e), n), {
          class: oe({
            [`${w}-panel-focused`]: !G.value
          }),
          style: void 0,
          pickerValue: void 0,
          onPickerValueChange: void 0,
          onChange: null
        });
        let Pe = h("div", {
          class: `${w}-panel-layout`
        }, [h(fo, {
          prefixCls: w,
          presets: l.value,
          onClick: (fe) => {
            _(fe), z(!1);
          }
        }, null), h(uo, x(x({}, lt), {}, {
          generateConfig: de,
          value: b.value,
          locale: W,
          tabindex: -1,
          onSelect: (fe) => {
            me == null || me(fe), f(fe);
          },
          direction: Re,
          onPanelChange: (fe, en) => {
            const {
              onPanelChange: kt
            } = e;
            T(!0), kt == null || kt(fe, en);
          }
        }), null)]);
        Me && (Pe = Me(Pe));
        const ze = h("div", {
          class: `${w}-panel-container`,
          ref: d,
          onMousedown: (fe) => {
            fe.preventDefault();
          }
        }, [Pe]);
        let Ee;
        he && (Ee = h("span", {
          class: `${w}-suffix`
        }, [he]));
        let De;
        ee && g.value && !Q && (De = h("span", {
          onMousedown: (fe) => {
            fe.preventDefault(), fe.stopPropagation();
          },
          onMouseup: (fe) => {
            fe.preventDefault(), fe.stopPropagation(), _(null), z(!1);
          },
          class: `${w}-clear`,
          role: "button"
        }, [B || h("span", {
          class: `${w}-clear-btn`
        }, null)]));
        const Ze = M(M(M(M({
          id: D,
          tabindex: L,
          disabled: Q,
          readonly: re || typeof s.value[0] == "function" || !G.value,
          value: Z.value || I.value,
          onInput: (fe) => {
            H(fe.target.value);
          },
          autofocus: J,
          placeholder: we,
          ref: o,
          title: I.value
        }, U.value), {
          size: Xa(ve, s.value[0], de)
        }), oo(e)), {
          autocomplete: ht
        }), Yt = e.inputRender ? e.inputRender(Ze) : h("input", Ze, null);
        process.env.NODE_ENV !== "production" && Ye(!ae, "`defaultOpenValue` may confuse user for the current value status. Please use `defaultValue` instead.");
        const Jt = Re === "rtl" ? "bottomRight" : "bottomLeft";
        return h("div", {
          ref: v,
          class: oe(w, n.class, {
            [`${w}-disabled`]: Q,
            [`${w}-focused`]: K.value,
            [`${w}-rtl`]: Re === "rtl"
          }),
          style: n.style,
          onMousedown: Fe,
          onMouseup: V,
          onMouseenter: Se,
          onMouseleave: We,
          onContextmenu: Le,
          onClick: Te
        }, [h("div", {
          class: oe(`${w}-input`, {
            [`${w}-input-placeholder`]: !!Z.value
          }),
          ref: c
        }, [Yt, Ee, De]), h(co, {
          visible: p.value,
          popupStyle: ie,
          prefixCls: w,
          dropdownClassName: q,
          dropdownAlign: ne,
          getPopupContainer: $e,
          transitionName: ce,
          popupPlacement: Jt,
          direction: Re
        }, {
          default: () => [h("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => ze
        })]);
      };
    }
  });
}
const bl = ml();
function Cl(e, t) {
  let {
    picker: n,
    locale: a,
    selectedValue: o,
    disabledDate: r,
    disabled: l,
    generateConfig: i
  } = e;
  const u = Y(() => j(o.value, 0)), s = Y(() => j(o.value, 1));
  function d(b) {
    return i.value.locale.getWeekFirstDate(a.value.locale, b);
  }
  function c(b) {
    const f = i.value.getYear(b), m = i.value.getMonth(b);
    return f * 100 + m;
  }
  function v(b) {
    const f = i.value.getYear(b), m = xn(i.value, b);
    return f * 10 + m;
  }
  return [(b) => {
    var f;
    if (r && (!((f = r == null ? void 0 : r.value) === null || f === void 0) && f.call(r, b)))
      return !0;
    if (l[1] && s)
      return !Qe(i.value, b, s.value) && i.value.isAfter(b, s.value);
    if (t.value[1] && s.value)
      switch (n.value) {
        case "quarter":
          return v(b) > v(s.value);
        case "month":
          return c(b) > c(s.value);
        case "week":
          return d(b) > d(s.value);
        default:
          return !Qe(i.value, b, s.value) && i.value.isAfter(b, s.value);
      }
    return !1;
  }, (b) => {
    var f;
    if (!((f = r.value) === null || f === void 0) && f.call(r, b))
      return !0;
    if (l[0] && u)
      return !Qe(i.value, b, s.value) && i.value.isAfter(u.value, b);
    if (t.value[0] && u.value)
      switch (n.value) {
        case "quarter":
          return v(b) < v(u.value);
        case "month":
          return c(b) < c(u.value);
        case "week":
          return d(b) < d(u.value);
        default:
          return !Qe(i.value, b, u.value) && i.value.isAfter(u.value, b);
      }
    return !1;
  }];
}
function wl(e, t, n, a) {
  const o = Tt(e, n, a, 1);
  function r(l) {
    return l(e, t) ? "same" : l(o, t) ? "closing" : "far";
  }
  switch (n) {
    case "year":
      return r((l, i) => nl(a, l, i));
    case "quarter":
    case "month":
      return r((l, i) => Gt(a, l, i));
    default:
      return r((l, i) => Hn(a, l, i));
  }
}
function yl(e, t, n, a) {
  const o = j(e, 0), r = j(e, 1);
  if (t === 0)
    return o;
  if (o && r)
    switch (wl(o, r, n, a)) {
      case "same":
        return o;
      case "closing":
        return o;
      default:
        return Tt(r, n, a, -1);
    }
  return o;
}
function $l(e) {
  let {
    values: t,
    picker: n,
    defaultDates: a,
    generateConfig: o
  } = e;
  const r = O([j(a, 0), j(a, 1)]), l = O(null), i = Y(() => j(t.value, 0)), u = Y(() => j(t.value, 1)), s = (g) => r.value[g] ? r.value[g] : j(l.value, g) || yl(t.value, g, n.value, o.value) || i.value || u.value || o.value.getNow(), d = O(null), c = O(null);
  It(() => {
    d.value = s(0), c.value = s(1);
  });
  function v(g, C) {
    if (g) {
      let b = Ie(l.value, g, C);
      r.value = Ie(r.value, null, C) || [null, null];
      const f = (C + 1) % 2;
      j(t.value, f) || (b = Ie(b, g, f)), l.value = b;
    } else (i.value || u.value) && (l.value = null);
  }
  return [d, c, v];
}
function kl(e) {
  return $r() ? (kr(e), !0) : !1;
}
function xl(e) {
  return typeof e == "function" ? e() : xr(e);
}
function po(e) {
  var t;
  const n = xl(e);
  return (t = n == null ? void 0 : n.$el) !== null && t !== void 0 ? t : n;
}
function Sl(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  Sr() ? Ba(e) : t ? e() : _a(e);
}
function Pl(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = Ve(), a = () => n.value = !!e();
  return a(), Sl(a, t), n;
}
var fn;
const ho = typeof window != "undefined";
ho && (!((fn = window == null ? void 0 : window.navigator) === null || fn === void 0) && fn.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
const Dl = ho ? window : void 0;
var Ml = function(e, t) {
  var n = {};
  for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, a = Object.getOwnPropertySymbols(e); o < a.length; o++)
    t.indexOf(a[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[o]) && (n[a[o]] = e[a[o]]);
  return n;
};
function Tl(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    window: a = Dl
  } = n, o = Ml(n, ["window"]);
  let r;
  const l = Pl(() => a && "ResizeObserver" in a), i = () => {
    r && (r.disconnect(), r = void 0);
  }, u = pe(() => po(e), (d) => {
    i(), l.value && a && d && (r = new ResizeObserver(t), r.observe(d, o));
  }, {
    immediate: !0,
    flush: "post"
  }), s = () => {
    i(), u();
  };
  return kl(s), {
    isSupported: l,
    stop: s
  };
}
function Mt(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    width: 0,
    height: 0
  }, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    box: a = "content-box"
  } = n, o = Ve(t.width), r = Ve(t.height);
  return Tl(e, (l) => {
    let [i] = l;
    const u = a === "border-box" ? i.borderBoxSize : a === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
    u ? (o.value = u.reduce((s, d) => {
      let {
        inlineSize: c
      } = d;
      return s + c;
    }, 0), r.value = u.reduce((s, d) => {
      let {
        blockSize: c
      } = d;
      return s + c;
    }, 0)) : (o.value = i.contentRect.width, r.value = i.contentRect.height);
  }, n), pe(() => po(e), (l) => {
    o.value = l ? t.width : 0, r.value = l ? t.height : 0;
  }), {
    width: o,
    height: r
  };
}
function xa(e, t) {
  return e && e[0] && e[1] && t.isAfter(e[0], e[1]) ? [e[1], e[0]] : e;
}
function Sa(e, t, n, a) {
  return !!(e || a && a[t] || n[(t + 1) % 2]);
}
function Nl() {
  return He({
    name: "RangerPicker",
    inheritAttrs: !1,
    props: ["prefixCls", "id", "popupStyle", "dropdownClassName", "transitionName", "dropdownAlign", "getPopupContainer", "generateConfig", "locale", "placeholder", "autofocus", "disabled", "format", "picker", "showTime", "showNow", "showHour", "showMinute", "showSecond", "use12Hours", "separator", "value", "defaultValue", "defaultPickerValue", "open", "defaultOpen", "disabledDate", "disabledTime", "dateRender", "panelRender", "ranges", "allowEmpty", "allowClear", "suffixIcon", "clearIcon", "pickerRef", "inputReadOnly", "mode", "renderExtraFooter", "onChange", "onOpenChange", "onPanelChange", "onCalendarChange", "onFocus", "onBlur", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onClick", "onOk", "onKeydown", "components", "order", "direction", "activePickerIndex", "autocomplete", "minuteStep", "hourStep", "secondStep", "hideDisabledOptions", "disabledMinutes", "presets", "prevIcon", "nextIcon", "superPrevIcon", "superNextIcon"],
    setup(e, t) {
      let {
        attrs: n,
        expose: a
      } = t;
      const o = Y(() => e.picker === "date" && !!e.showTime || e.picker === "time"), r = Y(() => e.presets), l = Y(() => e.ranges), i = vo(r, l), u = O({}), s = O(null), d = O(null), c = O(null), v = O(null), g = O(null), C = O(null), b = O(null), f = O(null);
      process.env.NODE_ENV !== "production" && go(e);
      const m = Y(() => ao(Qa(e.format, e.picker, e.showTime, e.use12Hours))), [p, y] = _e(0, {
        value: se(e, "activePickerIndex")
      }), k = O(null), S = Y(() => {
        const {
          disabled: $
        } = e;
        return Array.isArray($) ? $ : [$ || !1, $ || !1];
      }), [I, H] = _e(null, {
        value: se(e, "value"),
        defaultValue: e.defaultValue,
        postState: ($) => e.picker === "time" && !e.order ? $ : xa($, e.generateConfig)
      }), [A, _, z] = $l({
        values: I,
        picker: se(e, "picker"),
        defaultDates: e.defaultPickerValue,
        generateConfig: se(e, "generateConfig")
      }), [R, V] = _e(I.value, {
        postState: ($) => {
          let E = $;
          if (S.value[0] && S.value[1])
            return E;
          for (let N = 0; N < 2; N += 1)
            S.value[N] && !j(E, N) && !j(e.allowEmpty, N) && (E = Ie(E, e.generateConfig.getNow(), N));
          return E;
        }
      }), [U, K] = _e([e.picker, e.picker], {
        value: se(e, "mode")
      });
      pe(() => e.picker, () => {
        K([e.picker, e.picker]);
      });
      const G = ($, E) => {
        var N;
        K($), (N = e.onPanelChange) === null || N === void 0 || N.call(e, E, $);
      }, [Z, P] = Cl({
        picker: se(e, "picker"),
        selectedValue: R,
        locale: se(e, "locale"),
        disabled: S,
        disabledDate: se(e, "disabledDate"),
        generateConfig: se(e, "generateConfig")
      }, u), [T, F] = _e(!1, {
        value: se(e, "open"),
        defaultValue: e.defaultOpen,
        postState: ($) => S.value[p.value] ? !1 : $,
        onChange: ($) => {
          var E;
          (E = e.onOpenChange) === null || E === void 0 || E.call(e, $), !$ && k.value && k.value.onClose && k.value.onClose();
        }
      }), w = Y(() => T.value && p.value === 0), D = Y(() => T.value && p.value === 1), L = O(0), q = O(0), ne = O(0), {
        width: ie
      } = Mt(s);
      pe([T, ie], () => {
        !T.value && s.value && (ne.value = ie.value);
      });
      const {
        width: ce
      } = Mt(d), {
        width: de
      } = Mt(f), {
        width: W
      } = Mt(c), {
        width: re
      } = Mt(g);
      pe([p, T, ce, de, W, re, () => e.direction], () => {
        q.value = 0, p.value ? c.value && g.value && (q.value = W.value + re.value, ce.value && de.value && q.value > ce.value - de.value - (e.direction === "rtl" || f.value.offsetLeft > q.value ? 0 : f.value.offsetLeft) && (L.value = q.value)) : p.value === 0 && (L.value = 0);
      }, {
        immediate: !0
      });
      const ee = O();
      function J($, E) {
        if ($)
          clearTimeout(ee.value), u.value[E] = !0, y(E), F($), T.value || z(null, E);
        else if (p.value === E) {
          F($);
          const N = u.value;
          ee.value = setTimeout(() => {
            N === u.value && (u.value = {});
          });
        }
      }
      function ve($) {
        J(!0, $), setTimeout(() => {
          const E = [C, b][$];
          E.value && E.value.focus();
        }, 0);
      }
      function ae($, E) {
        let N = $, te = j(N, 0), ye = j(N, 1);
        const {
          generateConfig: ke,
          locale: Je,
          picker: Ne,
          order: xt,
          onCalendarChange: et,
          allowEmpty: it,
          onChange: be,
          showTime: je
        } = e;
        te && ye && ke.isAfter(te, ye) && (// WeekPicker only compare week
        Ne === "week" && !eo(ke, Je.locale, te, ye) || // QuotaPicker only compare week
        Ne === "quarter" && !Ja(ke, te, ye) || // Other non-TimePicker compare date
        Ne !== "week" && Ne !== "quarter" && Ne !== "time" && !(je ? wt(ke, te, ye) : Qe(ke, te, ye)) ? (E === 0 ? (N = [te, null], ye = null) : (te = null, N = [null, ye]), u.value = {
          [E]: !0
        }) : (Ne !== "time" || xt !== !1) && (N = xa(N, ke))), V(N);
        const Ae = N && N[0] ? Ce(N[0], {
          generateConfig: ke,
          locale: Je,
          format: m.value[0]
        }) : "", St = N && N[1] ? Ce(N[1], {
          generateConfig: ke,
          locale: Je,
          format: m.value[0]
        }) : "";
        et && et(N, [Ae, St], {
          range: E === 0 ? "start" : "end"
        });
        const Vt = Sa(te, 0, S.value, it), nn = Sa(ye, 1, S.value, it);
        (N === null || Vt && nn) && (H(N), be && (!wt(ke, j(I.value, 0), te) || !wt(ke, j(I.value, 1), ye)) && be(N, [Ae, St]));
        let Ue = null;
        E === 0 && !S.value[1] ? Ue = 1 : E === 1 && !S.value[0] && (Ue = 0), Ue !== null && Ue !== p.value && (!u.value[Ue] || !j(N, Ue)) && j(N, E) ? ve(Ue) : J(!1, E);
      }
      const he = ($) => T && k.value && k.value.onKeydown ? k.value.onKeydown($) : (Ye(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), B = {
        formatList: m,
        generateConfig: se(e, "generateConfig"),
        locale: se(e, "locale")
      }, [Q, we] = Ut(Y(() => j(R.value, 0)), B), [$e, Me] = Ut(Y(() => j(R.value, 1)), B), Fe = ($, E) => {
        const N = to($, {
          locale: e.locale,
          formatList: m.value,
          generateConfig: e.generateConfig
        });
        N && !(E === 0 ? Z : P)(N) && (V(Ie(R.value, N, E)), z(N, E));
      }, [Se, We, Le] = Mn({
        valueTexts: Q,
        onTextChange: ($) => Fe($, 0)
      }), [Te, me, Re] = Mn({
        valueTexts: $e,
        onTextChange: ($) => Fe($, 1)
      }), [ht, lt] = da(null), [Pe, ze] = da(null), [Ee, De, Ze] = Tn(Se, B), [Yt, Jt, fe] = Tn(Te, B), en = ($) => {
        ze(Ie(R.value, $, p.value)), p.value === 0 ? De($) : Jt($);
      }, kt = () => {
        ze(Ie(R.value, null, p.value)), p.value === 0 ? Ze() : fe();
      }, Xn = ($, E) => ({
        forwardKeydown: he,
        onBlur: (N) => {
          var te;
          (te = e.onBlur) === null || te === void 0 || te.call(e, N);
        },
        isClickOutside: (N) => !Za([d.value, c.value, v.value, s.value], N),
        onFocus: (N) => {
          var te;
          y($), (te = e.onFocus) === null || te === void 0 || te.call(e, N);
        },
        triggerOpen: (N) => {
          J(N, $);
        },
        onSubmit: () => {
          if (
            // When user typing disabledDate with keyboard and enter, this value will be empty
            !R.value || // Normal disabled check
            e.disabledDate && e.disabledDate(R.value[$])
          )
            return !1;
          ae(R.value, $), E();
        },
        onCancel: () => {
          J(!1, $), V(I.value), E();
        }
      }), [$o, {
        focused: Zn,
        typing: Jn
      }] = Dn(M(M({}, Xn(0, Le)), {
        blurToCancel: o,
        open: w,
        value: Se,
        onKeydown: ($, E) => {
          var N;
          (N = e.onKeydown) === null || N === void 0 || N.call(e, $, E);
        }
      })), [ko, {
        focused: ea,
        typing: ta
      }] = Dn(M(M({}, Xn(1, Re)), {
        blurToCancel: o,
        open: D,
        value: Te,
        onKeydown: ($, E) => {
          var N;
          (N = e.onKeydown) === null || N === void 0 || N.call(e, $, E);
        }
      })), xo = ($) => {
        var E;
        (E = e.onClick) === null || E === void 0 || E.call(e, $), !T.value && !C.value.contains($.target) && !b.value.contains($.target) && (S.value[0] ? S.value[1] || ve(1) : ve(0));
      }, So = ($) => {
        var E;
        (E = e.onMousedown) === null || E === void 0 || E.call(e, $), T.value && (Zn.value || ea.value) && !C.value.contains($.target) && !b.value.contains($.target) && $.preventDefault();
      }, Po = Y(() => {
        var $;
        return !(($ = I.value) === null || $ === void 0) && $[0] ? Ce(I.value[0], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      }), Do = Y(() => {
        var $;
        return !(($ = I.value) === null || $ === void 0) && $[1] ? Ce(I.value[1], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      });
      pe([T, Q, $e], () => {
        T.value || (V(I.value), !Q.value.length || Q.value[0] === "" ? We("") : we.value !== Se.value && Le(), !$e.value.length || $e.value[0] === "" ? me("") : Me.value !== Te.value && Re());
      }), pe([Po, Do], () => {
        V(I.value);
      }), process.env.NODE_ENV !== "production" && It(() => {
        const {
          value: $,
          disabled: E
        } = e;
        $ && Array.isArray(E) && (j(E, 0) && !j($, 0) || j(E, 1) && !j($, 1)) && Ye(!1, "`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.");
      }), a({
        focus: () => {
          C.value && C.value.focus();
        },
        blur: () => {
          C.value && C.value.blur(), b.value && b.value.blur();
        }
      });
      const Mo = Y(() => T.value && Pe.value && Pe.value[0] && Pe.value[1] && e.generateConfig.isAfter(Pe.value[1], Pe.value[0]) ? Pe.value : null);
      function tn() {
        let $ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        const {
          generateConfig: N,
          showTime: te,
          dateRender: ye,
          direction: ke,
          disabledTime: Je,
          prefixCls: Ne,
          locale: xt
        } = e;
        let et = te;
        if (te && typeof te == "object" && te.defaultValue) {
          const be = te.defaultValue;
          et = M(M({}, te), {
            defaultValue: j(be, p.value) || void 0
          });
        }
        let it = null;
        return ye && (it = (be) => {
          let {
            current: je,
            today: Ae
          } = be;
          return ye({
            current: je,
            today: Ae,
            info: {
              range: p.value ? "end" : "start"
            }
          });
        }), h(ul, {
          value: {
            inRange: !0,
            panelPosition: $,
            rangedValue: ht.value || R.value,
            hoverRangedValue: Mo.value
          }
        }, {
          default: () => [h(uo, x(x(x({}, e), E), {}, {
            dateRender: it,
            showTime: et,
            mode: U.value[p.value],
            generateConfig: N,
            style: void 0,
            direction: ke,
            disabledDate: p.value === 0 ? Z : P,
            disabledTime: (be) => Je ? Je(be, p.value === 0 ? "start" : "end") : !1,
            class: oe({
              [`${Ne}-panel-focused`]: p.value === 0 ? !Jn.value : !ta.value
            }),
            value: j(R.value, p.value),
            locale: xt,
            tabIndex: -1,
            onPanelChange: (be, je) => {
              p.value === 0 && Ze(!0), p.value === 1 && fe(!0), G(Ie(U.value, je, p.value), Ie(R.value, be, p.value));
              let Ae = be;
              $ === "right" && U.value[p.value] === je && (Ae = Tt(Ae, je, N, -1)), z(Ae, p.value);
            },
            onOk: null,
            onSelect: void 0,
            onChange: void 0,
            defaultValue: p.value === 0 ? j(R.value, 1) : j(R.value, 0)
          }), null)]
        });
      }
      const To = ($, E) => {
        const N = Ie(R.value, $, p.value);
        E === "submit" || E !== "key" && !o.value ? (ae(N, p.value), p.value === 0 ? Ze() : fe()) : V(N);
      };
      return En({
        operationRef: k,
        hideHeader: Y(() => e.picker === "time"),
        onDateMouseenter: en,
        onDateMouseleave: kt,
        hideRanges: Y(() => !0),
        onSelect: To,
        open: T
      }), () => {
        const {
          prefixCls: $ = "rc-picker",
          id: E,
          popupStyle: N,
          dropdownClassName: te,
          transitionName: ye,
          dropdownAlign: ke,
          getPopupContainer: Je,
          generateConfig: Ne,
          locale: xt,
          placeholder: et,
          autofocus: it,
          picker: be = "date",
          showTime: je,
          separator: Ae = "~",
          disabledDate: St,
          panelRender: Vt,
          allowClear: nn,
          suffixIcon: an,
          clearIcon: Ue,
          inputReadOnly: on,
          renderExtraFooter: No,
          onMouseenter: Io,
          onMouseleave: Ro,
          onMouseup: Eo,
          onOk: na,
          components: Yo,
          direction: Pt,
          autocomplete: aa = "off"
        } = e, Vo = Pt === "rtl" ? {
          right: `${q.value}px`
        } : {
          left: `${q.value}px`
        };
        function Oo() {
          let xe;
          const tt = io($, U.value[p.value], No), ia = so({
            prefixCls: $,
            components: Yo,
            needConfirmButton: o.value,
            okDisabled: !j(R.value, p.value) || St && St(R.value[p.value]),
            locale: xt,
            onOk: () => {
              j(R.value, p.value) && (ae(R.value, p.value), na && na(R.value));
            }
          });
          if (be !== "time" && !je) {
            const nt = p.value === 0 ? A.value : _.value, _o = Tt(nt, be, Ne), un = U.value[p.value] === be, sa = tn(un ? "left" : !1, {
              pickerValue: nt,
              onPickerValueChange: (cn) => {
                z(cn, p.value);
              }
            }), ua = tn("right", {
              pickerValue: _o,
              onPickerValueChange: (cn) => {
                z(Tt(cn, be, Ne, -1), p.value);
              }
            });
            Pt === "rtl" ? xe = h(yt, null, [ua, un && sa]) : xe = h(yt, null, [sa, un && ua]);
          } else
            xe = tn();
          let sn = h("div", {
            class: `${$}-panel-layout`
          }, [h(fo, {
            prefixCls: $,
            presets: i.value,
            onClick: (nt) => {
              ae(nt, null), J(!1, p.value);
            },
            onHover: (nt) => {
              lt(nt);
            }
          }, null), h("div", null, [h("div", {
            class: `${$}-panels`
          }, [xe]), (tt || ia) && h("div", {
            class: `${$}-footer`
          }, [tt, ia])])]);
          return Vt && (sn = Vt(sn)), h("div", {
            class: `${$}-panel-container`,
            style: {
              marginLeft: `${L.value}px`
            },
            ref: d,
            onMousedown: (nt) => {
              nt.preventDefault();
            }
          }, [sn]);
        }
        const Ho = h("div", {
          class: oe(`${$}-range-wrapper`, `${$}-${be}-range-wrapper`),
          style: {
            minWidth: `${ne.value}px`
          }
        }, [h("div", {
          ref: f,
          class: `${$}-range-arrow`,
          style: Vo
        }, null), Oo()]);
        let oa;
        an && (oa = h("span", {
          class: `${$}-suffix`
        }, [an]));
        let ra;
        nn && (j(I.value, 0) && !S.value[0] || j(I.value, 1) && !S.value[1]) && (ra = h("span", {
          onMousedown: (xe) => {
            xe.preventDefault(), xe.stopPropagation();
          },
          onMouseup: (xe) => {
            xe.preventDefault(), xe.stopPropagation();
            let tt = I.value;
            S.value[0] || (tt = Ie(tt, null, 0)), S.value[1] || (tt = Ie(tt, null, 1)), ae(tt, null), J(!1, p.value);
          },
          class: `${$}-clear`
        }, [Ue || h("span", {
          class: `${$}-clear-btn`
        }, null)]));
        const la = {
          size: Xa(be, m.value[0], Ne)
        };
        let rn = 0, ln = 0;
        c.value && v.value && g.value && (p.value === 0 ? ln = c.value.offsetWidth : (rn = q.value, ln = v.value.offsetWidth));
        const Ao = Pt === "rtl" ? {
          right: `${rn}px`
        } : {
          left: `${rn}px`
        };
        return h("div", x({
          ref: s,
          class: oe($, `${$}-range`, n.class, {
            [`${$}-disabled`]: S.value[0] && S.value[1],
            [`${$}-focused`]: p.value === 0 ? Zn.value : ea.value,
            [`${$}-rtl`]: Pt === "rtl"
          }),
          style: n.style,
          onClick: xo,
          onMouseenter: Io,
          onMouseleave: Ro,
          onMousedown: So,
          onMouseup: Eo
        }, oo(e)), [h("div", {
          class: oe(`${$}-input`, {
            [`${$}-input-active`]: p.value === 0,
            [`${$}-input-placeholder`]: !!Ee.value
          }),
          ref: c
        }, [h("input", x(x(x({
          id: E,
          disabled: S.value[0],
          readonly: on || typeof m.value[0] == "function" || !Jn.value,
          value: Ee.value || Se.value,
          onInput: (xe) => {
            We(xe.target.value);
          },
          autofocus: it,
          placeholder: j(et, 0) || "",
          ref: C
        }, $o.value), la), {}, {
          autocomplete: aa
        }), null)]), h("div", {
          class: `${$}-range-separator`,
          ref: g
        }, [Ae]), h("div", {
          class: oe(`${$}-input`, {
            [`${$}-input-active`]: p.value === 1,
            [`${$}-input-placeholder`]: !!Yt.value
          }),
          ref: v
        }, [h("input", x(x(x({
          disabled: S.value[1],
          readonly: on || typeof m.value[0] == "function" || !ta.value,
          value: Yt.value || Te.value,
          onInput: (xe) => {
            me(xe.target.value);
          },
          placeholder: j(et, 1) || "",
          ref: b
        }, ko.value), la), {}, {
          autocomplete: aa
        }), null)]), h("div", {
          class: `${$}-active-bar`,
          style: M(M({}, Ao), {
            width: `${ln}px`,
            position: "absolute"
          })
        }, null), oa, ra, h(co, {
          visible: T.value,
          popupStyle: N,
          prefixCls: $,
          dropdownClassName: te,
          dropdownAlign: ke,
          getPopupContainer: Je,
          transitionName: ye,
          range: !0,
          direction: Pt
        }, {
          default: () => [h("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => Ho
        })]);
      };
    }
  });
}
const Il = Nl(), vn = (e, t, n, a) => {
  const {
    lineHeight: o
  } = e, r = Math.floor(n * o) + 2, l = Math.max((t - r) / 2, 0), i = Math.max(t - r - l, 0);
  return {
    padding: `${l}px ${a}px ${i}px`
  };
}, Rl = (e) => {
  const {
    componentCls: t,
    pickerCellCls: n,
    pickerCellInnerCls: a,
    pickerPanelCellHeight: o,
    motionDurationSlow: r,
    borderRadiusSM: l,
    motionDurationMid: i,
    controlItemBgHover: u,
    lineWidth: s,
    lineType: d,
    colorPrimary: c,
    controlItemBgActive: v,
    colorTextLightSolid: g,
    controlHeightSM: C,
    pickerDateHoverRangeBorderColor: b,
    pickerCellBorderGap: f,
    pickerBasicCellHoverWithRangeColor: m,
    pickerPanelCellWidth: p,
    colorTextDisabled: y,
    colorBgContainerDisabled: k
  } = e;
  return {
    "&::before": {
      position: "absolute",
      top: "50%",
      insetInlineStart: 0,
      insetInlineEnd: 0,
      zIndex: 1,
      height: o,
      transform: "translateY(-50%)",
      transition: `all ${r}`,
      content: '""'
    },
    // >>> Default
    [a]: {
      position: "relative",
      zIndex: 2,
      display: "inline-block",
      minWidth: o,
      height: o,
      lineHeight: `${o}px`,
      borderRadius: l,
      transition: `background ${i}, border ${i}`
    },
    // >>> Hover
    [`&:hover:not(${n}-in-view),
    &:hover:not(${n}-selected):not(${n}-range-start):not(${n}-range-end):not(${n}-range-hover-start):not(${n}-range-hover-end)`]: {
      [a]: {
        background: u
      }
    },
    // >>> Today
    [`&-in-view${n}-today ${a}`]: {
      "&::before": {
        position: "absolute",
        top: 0,
        insetInlineEnd: 0,
        bottom: 0,
        insetInlineStart: 0,
        zIndex: 1,
        border: `${s}px ${d} ${c}`,
        borderRadius: l,
        content: '""'
      }
    },
    // >>> In Range
    [`&-in-view${n}-in-range`]: {
      position: "relative",
      "&::before": {
        background: v
      }
    },
    // >>> Selected
    [`&-in-view${n}-selected ${a},
      &-in-view${n}-range-start ${a},
      &-in-view${n}-range-end ${a}`]: {
      color: g,
      background: c
    },
    [`&-in-view${n}-range-start:not(${n}-range-start-single),
      &-in-view${n}-range-end:not(${n}-range-end-single)`]: {
      "&::before": {
        background: v
      }
    },
    [`&-in-view${n}-range-start::before`]: {
      insetInlineStart: "50%"
    },
    [`&-in-view${n}-range-end::before`]: {
      insetInlineEnd: "50%"
    },
    // >>> Range Hover
    [`&-in-view${n}-range-hover-start:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
      &-in-view${n}-range-hover-end:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
      &-in-view${n}-range-hover-start${n}-range-start-single,
      &-in-view${n}-range-hover-start${n}-range-start${n}-range-end${n}-range-end-near-hover,
      &-in-view${n}-range-hover-end${n}-range-start${n}-range-end${n}-range-start-near-hover,
      &-in-view${n}-range-hover-end${n}-range-end-single,
      &-in-view${n}-range-hover:not(${n}-in-range)`]: {
      "&::after": {
        position: "absolute",
        top: "50%",
        zIndex: 0,
        height: C,
        borderTop: `${s}px dashed ${b}`,
        borderBottom: `${s}px dashed ${b}`,
        transform: "translateY(-50%)",
        transition: `all ${r}`,
        content: '""'
      }
    },
    // Add space for stash
    "&-range-hover-start::after,\n      &-range-hover-end::after,\n      &-range-hover::after": {
      insetInlineEnd: 0,
      insetInlineStart: f
    },
    // Hover with in range
    [`&-in-view${n}-in-range${n}-range-hover::before,
      &-in-view${n}-range-start${n}-range-hover::before,
      &-in-view${n}-range-end${n}-range-hover::before,
      &-in-view${n}-range-start:not(${n}-range-start-single)${n}-range-hover-start::before,
      &-in-view${n}-range-end:not(${n}-range-end-single)${n}-range-hover-end::before,
      ${t}-panel
      > :not(${t}-date-panel)
      &-in-view${n}-in-range${n}-range-hover-start::before,
      ${t}-panel
      > :not(${t}-date-panel)
      &-in-view${n}-in-range${n}-range-hover-end::before`]: {
      background: m
    },
    // range start border-radius
    [`&-in-view${n}-range-start:not(${n}-range-start-single):not(${n}-range-end) ${a}`]: {
      borderStartStartRadius: l,
      borderEndStartRadius: l,
      borderStartEndRadius: 0,
      borderEndEndRadius: 0
    },
    // range end border-radius
    [`&-in-view${n}-range-end:not(${n}-range-end-single):not(${n}-range-start) ${a}`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      borderStartEndRadius: l,
      borderEndEndRadius: l
    },
    [`&-range-hover${n}-range-end::after`]: {
      insetInlineStart: "50%"
    },
    // Edge start
    [`tr > &-in-view${n}-range-hover:first-child::after,
      tr > &-in-view${n}-range-hover-end:first-child::after,
      &-in-view${n}-start${n}-range-hover-edge-start${n}-range-hover-edge-start-near-range::after,
      &-in-view${n}-range-hover-edge-start:not(${n}-range-hover-edge-start-near-range)::after,
      &-in-view${n}-range-hover-start::after`]: {
      insetInlineStart: (p - o) / 2,
      borderInlineStart: `${s}px dashed ${b}`,
      borderStartStartRadius: s,
      borderEndStartRadius: s
    },
    // Edge end
    [`tr > &-in-view${n}-range-hover:last-child::after,
      tr > &-in-view${n}-range-hover-start:last-child::after,
      &-in-view${n}-end${n}-range-hover-edge-end${n}-range-hover-edge-end-near-range::after,
      &-in-view${n}-range-hover-edge-end:not(${n}-range-hover-edge-end-near-range)::after,
      &-in-view${n}-range-hover-end::after`]: {
      insetInlineEnd: (p - o) / 2,
      borderInlineEnd: `${s}px dashed ${b}`,
      borderStartEndRadius: s,
      borderEndEndRadius: s
    },
    // >>> Disabled
    "&-disabled": {
      color: y,
      pointerEvents: "none",
      [a]: {
        background: "transparent"
      },
      "&::before": {
        background: k
      }
    },
    [`&-disabled${n}-today ${a}::before`]: {
      borderColor: y
    }
  };
}, El = (e) => {
  const {
    componentCls: t,
    pickerCellInnerCls: n,
    pickerYearMonthCellWidth: a,
    pickerControlIconSize: o,
    pickerPanelCellWidth: r,
    paddingSM: l,
    paddingXS: i,
    paddingXXS: u,
    colorBgContainer: s,
    lineWidth: d,
    lineType: c,
    borderRadiusLG: v,
    colorPrimary: g,
    colorTextHeading: C,
    colorSplit: b,
    pickerControlIconBorderWidth: f,
    colorIcon: m,
    pickerTextHeight: p,
    motionDurationMid: y,
    colorIconHover: k,
    fontWeightStrong: S,
    pickerPanelCellHeight: I,
    pickerCellPaddingVertical: H,
    colorTextDisabled: A,
    colorText: _,
    fontSize: z,
    pickerBasicCellHoverWithRangeColor: R,
    motionDurationSlow: V,
    pickerPanelWithoutTimeCellHeight: U,
    pickerQuarterPanelContentHeight: K,
    colorLink: G,
    colorLinkActive: Z,
    colorLinkHover: P,
    pickerDateHoverRangeBorderColor: T,
    borderRadiusSM: F,
    colorTextLightSolid: w,
    borderRadius: D,
    controlItemBgHover: L,
    pickerTimePanelColumnHeight: q,
    pickerTimePanelColumnWidth: ne,
    pickerTimePanelCellHeight: ie,
    controlItemBgActive: ce,
    marginXXS: de
  } = e, W = r * 7 + l * 2 + 4, re = (W - i * 2) / 3 - a - l;
  return {
    [t]: {
      "&-panel": {
        display: "inline-flex",
        flexDirection: "column",
        textAlign: "center",
        background: s,
        border: `${d}px ${c} ${b}`,
        borderRadius: v,
        outline: "none",
        "&-focused": {
          borderColor: g
        },
        "&-rtl": {
          direction: "rtl",
          [`${t}-prev-icon,
              ${t}-super-prev-icon`]: {
            transform: "rotate(45deg)"
          },
          [`${t}-next-icon,
              ${t}-super-next-icon`]: {
            transform: "rotate(-135deg)"
          }
        }
      },
      // ========================================================
      // =                     Shared Panel                     =
      // ========================================================
      "&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel,\n        &-week-panel,\n        &-date-panel,\n        &-time-panel": {
        display: "flex",
        flexDirection: "column",
        width: W
      },
      // ======================= Header =======================
      "&-header": {
        display: "flex",
        padding: `0 ${i}px`,
        color: C,
        borderBottom: `${d}px ${c} ${b}`,
        "> *": {
          flex: "none"
        },
        button: {
          padding: 0,
          color: m,
          lineHeight: `${p}px`,
          background: "transparent",
          border: 0,
          cursor: "pointer",
          transition: `color ${y}`
        },
        "> button": {
          minWidth: "1.6em",
          fontSize: z,
          "&:hover": {
            color: k
          }
        },
        "&-view": {
          flex: "auto",
          fontWeight: S,
          lineHeight: `${p}px`,
          button: {
            color: "inherit",
            fontWeight: "inherit",
            verticalAlign: "top",
            "&:not(:first-child)": {
              marginInlineStart: i
            },
            "&:hover": {
              color: g
            }
          }
        }
      },
      // Arrow button
      "&-prev-icon,\n        &-next-icon,\n        &-super-prev-icon,\n        &-super-next-icon": {
        position: "relative",
        display: "inline-block",
        width: o,
        height: o,
        "&::before": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          display: "inline-block",
          width: o,
          height: o,
          border: "0 solid currentcolor",
          borderBlockStartWidth: f,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: f,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-super-prev-icon,\n        &-super-next-icon": {
        "&::after": {
          position: "absolute",
          top: Math.ceil(o / 2),
          insetInlineStart: Math.ceil(o / 2),
          display: "inline-block",
          width: o,
          height: o,
          border: "0 solid currentcolor",
          borderBlockStartWidth: f,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: f,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-prev-icon,\n        &-super-prev-icon": {
        transform: "rotate(-45deg)"
      },
      "&-next-icon,\n        &-super-next-icon": {
        transform: "rotate(135deg)"
      },
      // ======================== Body ========================
      "&-content": {
        width: "100%",
        tableLayout: "fixed",
        borderCollapse: "collapse",
        "th, td": {
          position: "relative",
          minWidth: I,
          fontWeight: "normal"
        },
        th: {
          height: I + H * 2,
          color: _,
          verticalAlign: "middle"
        }
      },
      "&-cell": M({
        padding: `${H}px 0`,
        color: A,
        cursor: "pointer",
        // In view
        "&-in-view": {
          color: _
        }
      }, Rl(e)),
      // DatePanel only
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start ${n},
        &-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}`]: {
        "&::after": {
          position: "absolute",
          top: 0,
          bottom: 0,
          zIndex: -1,
          background: R,
          transition: `all ${V}`,
          content: '""'
        }
      },
      [`&-date-panel
        ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start
        ${n}::after`]: {
        insetInlineEnd: -(r - I) / 2,
        insetInlineStart: 0
      },
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]: {
        insetInlineEnd: 0,
        insetInlineStart: -(r - I) / 2
      },
      // Hover with range start & end
      [`&-range-hover${t}-range-start::after`]: {
        insetInlineEnd: "50%"
      },
      "&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel": {
        [`${t}-content`]: {
          height: U * 4
        },
        [n]: {
          padding: `0 ${i}px`
        }
      },
      "&-quarter-panel": {
        [`${t}-content`]: {
          height: K
        }
      },
      // ======================== Footer ========================
      [`&-panel ${t}-footer`]: {
        borderTop: `${d}px ${c} ${b}`
      },
      "&-footer": {
        width: "min-content",
        minWidth: "100%",
        lineHeight: `${p - 2 * d}px`,
        textAlign: "center",
        "&-extra": {
          padding: `0 ${l}`,
          lineHeight: `${p - 2 * d}px`,
          textAlign: "start",
          "&:not(:last-child)": {
            borderBottom: `${d}px ${c} ${b}`
          }
        }
      },
      "&-now": {
        textAlign: "start"
      },
      "&-today-btn": {
        color: G,
        "&:hover": {
          color: P
        },
        "&:active": {
          color: Z
        },
        [`&${t}-today-btn-disabled`]: {
          color: A,
          cursor: "not-allowed"
        }
      },
      // ========================================================
      // =                       Special                        =
      // ========================================================
      // ===================== Decade Panel =====================
      "&-decade-panel": {
        [n]: {
          padding: `0 ${i / 2}px`
        },
        [`${t}-cell::before`]: {
          display: "none"
        }
      },
      // ============= Year & Quarter & Month Panel =============
      "&-year-panel,\n        &-quarter-panel,\n        &-month-panel": {
        [`${t}-body`]: {
          padding: `0 ${i}px`
        },
        [n]: {
          width: a
        },
        [`${t}-cell-range-hover-start::after`]: {
          insetInlineStart: re,
          borderInlineStart: `${d}px dashed ${T}`,
          borderStartStartRadius: F,
          borderBottomStartRadius: F,
          borderStartEndRadius: 0,
          borderBottomEndRadius: 0,
          [`${t}-panel-rtl &`]: {
            insetInlineEnd: re,
            borderInlineEnd: `${d}px dashed ${T}`,
            borderStartStartRadius: 0,
            borderBottomStartRadius: 0,
            borderStartEndRadius: F,
            borderBottomEndRadius: F
          }
        },
        [`${t}-cell-range-hover-end::after`]: {
          insetInlineEnd: re,
          borderInlineEnd: `${d}px dashed ${T}`,
          borderStartStartRadius: 0,
          borderEndStartRadius: 0,
          borderStartEndRadius: D,
          borderEndEndRadius: D,
          [`${t}-panel-rtl &`]: {
            insetInlineStart: re,
            borderInlineStart: `${d}px dashed ${T}`,
            borderStartStartRadius: D,
            borderEndStartRadius: D,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0
          }
        }
      },
      // ====================== Week Panel ======================
      "&-week-panel": {
        [`${t}-body`]: {
          padding: `${i}px ${l}px`
        },
        // Clear cell style
        [`${t}-cell`]: {
          [`&:hover ${n},
            &-selected ${n},
            ${n}`]: {
            background: "transparent !important"
          }
        },
        "&-row": {
          td: {
            transition: `background ${y}`,
            "&:first-child": {
              borderStartStartRadius: F,
              borderEndStartRadius: F
            },
            "&:last-child": {
              borderStartEndRadius: F,
              borderEndEndRadius: F
            }
          },
          "&:hover td": {
            background: L
          },
          "&-selected td,\n            &-selected:hover td": {
            background: g,
            [`&${t}-cell-week`]: {
              color: new jt(w).setAlpha(0.5).toHexString()
            },
            [`&${t}-cell-today ${n}::before`]: {
              borderColor: w
            },
            [n]: {
              color: w
            }
          }
        }
      },
      // ====================== Date Panel ======================
      "&-date-panel": {
        [`${t}-body`]: {
          padding: `${i}px ${l}px`
        },
        [`${t}-content`]: {
          width: r * 7,
          th: {
            width: r
          }
        }
      },
      // ==================== Datetime Panel ====================
      "&-datetime-panel": {
        display: "flex",
        [`${t}-time-panel`]: {
          borderInlineStart: `${d}px ${c} ${b}`
        },
        [`${t}-date-panel,
          ${t}-time-panel`]: {
          transition: `opacity ${V}`
        },
        // Keyboard
        "&-active": {
          [`${t}-date-panel,
            ${t}-time-panel`]: {
            opacity: 0.3,
            "&-active": {
              opacity: 1
            }
          }
        }
      },
      // ====================== Time Panel ======================
      "&-time-panel": {
        width: "auto",
        minWidth: "auto",
        direction: "ltr",
        [`${t}-content`]: {
          display: "flex",
          flex: "auto",
          height: q
        },
        "&-column": {
          flex: "1 0 auto",
          width: ne,
          margin: `${u}px 0`,
          padding: 0,
          overflowY: "hidden",
          textAlign: "start",
          listStyle: "none",
          transition: `background ${y}`,
          overflowX: "hidden",
          "&::after": {
            display: "block",
            height: q - ie,
            content: '""'
          },
          "&:not(:first-child)": {
            borderInlineStart: `${d}px ${c} ${b}`
          },
          "&-active": {
            background: new jt(ce).setAlpha(0.2).toHexString()
          },
          "&:hover": {
            overflowY: "auto"
          },
          "> li": {
            margin: 0,
            padding: 0,
            [`&${t}-time-panel-cell`]: {
              marginInline: de,
              [`${t}-time-panel-cell-inner`]: {
                display: "block",
                width: ne - 2 * de,
                height: ie,
                margin: 0,
                paddingBlock: 0,
                paddingInlineEnd: 0,
                paddingInlineStart: (ne - ie) / 2,
                color: _,
                lineHeight: `${ie}px`,
                borderRadius: F,
                cursor: "pointer",
                transition: `background ${y}`,
                "&:hover": {
                  background: L
                }
              },
              "&-selected": {
                [`${t}-time-panel-cell-inner`]: {
                  background: ce
                }
              },
              "&-disabled": {
                [`${t}-time-panel-cell-inner`]: {
                  color: A,
                  background: "transparent",
                  cursor: "not-allowed"
                }
              }
            }
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/39227
      [`&-datetime-panel ${t}-time-panel-column:after`]: {
        height: q - ie + u * 2
      }
    }
  };
}, Yl = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorError: a,
    colorErrorOutline: o,
    colorWarning: r,
    colorWarningOutline: l
  } = e;
  return {
    [t]: {
      [`&-status-error${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: a
        },
        "&-focused, &:focus": M({}, Cn(zt(e, {
          inputBorderActiveColor: a,
          inputBorderHoverColor: a,
          controlOutline: o
        }))),
        [`${t}-active-bar`]: {
          background: a
        }
      },
      [`&-status-warning${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: r
        },
        "&-focused, &:focus": M({}, Cn(zt(e, {
          inputBorderActiveColor: r,
          inputBorderHoverColor: r,
          controlOutline: l
        }))),
        [`${t}-active-bar`]: {
          background: r
        }
      }
    }
  };
}, Vl = (e) => {
  const {
    componentCls: t,
    antCls: n,
    boxShadowPopoverArrow: a,
    controlHeight: o,
    fontSize: r,
    inputPaddingHorizontal: l,
    colorBgContainer: i,
    lineWidth: u,
    lineType: s,
    colorBorder: d,
    borderRadius: c,
    motionDurationMid: v,
    colorBgContainerDisabled: g,
    colorTextDisabled: C,
    colorTextPlaceholder: b,
    controlHeightLG: f,
    fontSizeLG: m,
    controlHeightSM: p,
    inputPaddingHorizontalSM: y,
    paddingXS: k,
    marginXS: S,
    colorTextDescription: I,
    lineWidthBold: H,
    lineHeight: A,
    colorPrimary: _,
    motionDurationSlow: z,
    zIndexPopup: R,
    paddingXXS: V,
    paddingSM: U,
    pickerTextHeight: K,
    controlItemBgActive: G,
    colorPrimaryBorder: Z,
    sizePopupArrow: P,
    borderRadiusXS: T,
    borderRadiusOuter: F,
    colorBgElevated: w,
    borderRadiusLG: D,
    boxShadowSecondary: L,
    borderRadiusSM: q,
    colorSplit: ne,
    controlItemBgHover: ie,
    presetsWidth: ce,
    presetsMaxWidth: de
  } = e;
  return [
    {
      [t]: M(M(M({}, wn(e)), vn(e, o, r, l)), {
        position: "relative",
        display: "inline-flex",
        alignItems: "center",
        background: i,
        lineHeight: 1,
        border: `${u}px ${s} ${d}`,
        borderRadius: c,
        transition: `border ${v}, box-shadow ${v}`,
        "&:hover, &-focused": M({}, Go(e)),
        "&-focused": M({}, Cn(e)),
        [`&${t}-disabled`]: {
          background: g,
          borderColor: d,
          cursor: "not-allowed",
          [`${t}-suffix`]: {
            color: C
          }
        },
        [`&${t}-borderless`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ======================== Input =========================
        [`${t}-input`]: {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          width: "100%",
          "> input": M(M({}, Qo(e)), {
            flex: "auto",
            // Fix Firefox flex not correct:
            // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
            minWidth: 1,
            height: "auto",
            padding: 0,
            background: "transparent",
            border: 0,
            "&:focus": {
              boxShadow: "none"
            },
            "&[disabled]": {
              background: "transparent"
            }
          }),
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          "&-placeholder": {
            "> input": {
              color: b
            }
          }
        },
        // Size
        "&-large": M(M({}, vn(e, f, m, l)), {
          [`${t}-input > input`]: {
            fontSize: m
          }
        }),
        "&-small": M({}, vn(e, p, r, y)),
        [`${t}-suffix`]: {
          display: "flex",
          flex: "none",
          alignSelf: "center",
          marginInlineStart: k / 2,
          color: C,
          lineHeight: 1,
          pointerEvents: "none",
          "> *": {
            verticalAlign: "top",
            "&:not(:last-child)": {
              marginInlineEnd: S
            }
          }
        },
        [`${t}-clear`]: {
          position: "absolute",
          top: "50%",
          insetInlineEnd: 0,
          color: C,
          lineHeight: 1,
          background: i,
          transform: "translateY(-50%)",
          cursor: "pointer",
          opacity: 0,
          transition: `opacity ${v}, color ${v}`,
          "> *": {
            verticalAlign: "top"
          },
          "&:hover": {
            color: I
          }
        },
        [`${t}-separator`]: {
          position: "relative",
          display: "inline-block",
          width: "1em",
          height: m,
          color: C,
          fontSize: m,
          verticalAlign: "top",
          cursor: "default",
          [`${t}-focused &`]: {
            color: I
          },
          [`${t}-range-separator &`]: {
            [`${t}-disabled &`]: {
              cursor: "not-allowed"
            }
          }
        },
        // ======================== Range =========================
        "&-range": {
          position: "relative",
          display: "inline-flex",
          // Clear
          [`${t}-clear`]: {
            insetInlineEnd: l
          },
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          // Active bar
          [`${t}-active-bar`]: {
            bottom: -u,
            height: H,
            marginInlineStart: l,
            background: _,
            opacity: 0,
            transition: `all ${z} ease-out`,
            pointerEvents: "none"
          },
          [`&${t}-focused`]: {
            [`${t}-active-bar`]: {
              opacity: 1
            }
          },
          [`${t}-range-separator`]: {
            alignItems: "center",
            padding: `0 ${k}px`,
            lineHeight: 1
          },
          [`&${t}-small`]: {
            [`${t}-clear`]: {
              insetInlineEnd: y
            },
            [`${t}-active-bar`]: {
              marginInlineStart: y
            }
          }
        },
        // ======================= Dropdown =======================
        "&-dropdown": M(M(M({}, wn(e)), El(e)), {
          position: "absolute",
          // Fix incorrect position of picker popup
          // https://github.com/ant-design/ant-design/issues/35590
          top: -9999,
          left: {
            _skip_check_: !0,
            value: -9999
          },
          zIndex: R,
          [`&${t}-dropdown-hidden`]: {
            display: "none"
          },
          [`&${t}-dropdown-placement-bottomLeft`]: {
            [`${t}-range-arrow`]: {
              top: 0,
              display: "block",
              transform: "translateY(-100%)"
            }
          },
          [`&${t}-dropdown-placement-topLeft`]: {
            [`${t}-range-arrow`]: {
              bottom: 0,
              display: "block",
              transform: "translateY(100%) rotate(180deg)"
            }
          },
          [`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]: {
            animationName: Xo
          },
          [`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]: {
            animationName: Zo
          },
          [`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]: {
            animationName: Jo
          },
          [`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]: {
            animationName: er
          },
          // Time picker with additional style
          [`${t}-panel > ${t}-time-panel`]: {
            paddingTop: V
          },
          // ======================== Ranges ========================
          [`${t}-ranges`]: {
            marginBottom: 0,
            padding: `${V}px ${U}px`,
            overflow: "hidden",
            lineHeight: `${K - 2 * u - k / 2}px`,
            textAlign: "start",
            listStyle: "none",
            display: "flex",
            justifyContent: "space-between",
            "> li": {
              display: "inline-block"
            },
            // https://github.com/ant-design/ant-design/issues/23687
            [`${t}-preset > ${n}-tag-blue`]: {
              color: _,
              background: G,
              borderColor: Z,
              cursor: "pointer"
            },
            [`${t}-ok`]: {
              marginInlineStart: "auto"
            }
          },
          [`${t}-range-wrapper`]: {
            display: "flex",
            position: "relative"
          },
          [`${t}-range-arrow`]: M({
            position: "absolute",
            zIndex: 1,
            display: "none",
            marginInlineStart: l * 1.5,
            transition: `left ${z} ease-out`
          }, tr(P, T, F, w, a)),
          [`${t}-panel-container`]: {
            overflow: "hidden",
            verticalAlign: "top",
            background: w,
            borderRadius: D,
            boxShadow: L,
            transition: `margin ${z}`,
            // ======================== Layout ========================
            [`${t}-panel-layout`]: {
              display: "flex",
              flexWrap: "nowrap",
              alignItems: "stretch"
            },
            // ======================== Preset ========================
            [`${t}-presets`]: {
              display: "flex",
              flexDirection: "column",
              minWidth: ce,
              maxWidth: de,
              ul: {
                height: 0,
                flex: "auto",
                listStyle: "none",
                overflow: "auto",
                margin: 0,
                padding: k,
                borderInlineEnd: `${u}px ${s} ${ne}`,
                li: M(M({}, nr), {
                  borderRadius: q,
                  paddingInline: k,
                  paddingBlock: (p - Math.round(r * A)) / 2,
                  cursor: "pointer",
                  transition: `all ${z}`,
                  "+ li": {
                    marginTop: S
                  },
                  "&:hover": {
                    background: ie
                  }
                })
              }
            },
            // ======================== Panels ========================
            [`${t}-panels`]: {
              display: "inline-flex",
              flexWrap: "nowrap",
              direction: "ltr",
              [`${t}-panel`]: {
                borderWidth: `0 0 ${u}px`
              },
              "&:last-child": {
                [`${t}-panel`]: {
                  borderWidth: 0
                }
              }
            },
            [`${t}-panel`]: {
              verticalAlign: "top",
              background: "transparent",
              borderRadius: 0,
              borderWidth: 0,
              [`${t}-content,
            table`]: {
                textAlign: "center"
              },
              "&-focused": {
                borderColor: d
              }
            }
          }
        }),
        "&-dropdown-range": {
          padding: `${P * 2 / 3}px 0`,
          "&-hidden": {
            display: "none"
          }
        },
        "&-rtl": {
          direction: "rtl",
          [`${t}-separator`]: {
            transform: "rotate(180deg)"
          },
          [`${t}-footer`]: {
            "&-extra": {
              direction: "rtl"
            }
          }
        }
      })
    },
    // Follow code may reuse in other components
    fa(e, "slide-up"),
    fa(e, "slide-down"),
    va(e, "move-up"),
    va(e, "move-down")
  ];
}, Ol = (e) => {
  const {
    componentCls: n,
    controlHeightLG: a,
    controlHeightSM: o,
    colorPrimary: r,
    paddingXXS: l
  } = e;
  return {
    pickerCellCls: `${n}-cell`,
    pickerCellInnerCls: `${n}-cell-inner`,
    pickerTextHeight: a,
    pickerPanelCellWidth: o * 1.5,
    pickerPanelCellHeight: o,
    pickerDateHoverRangeBorderColor: new jt(r).lighten(20).toHexString(),
    pickerBasicCellHoverWithRangeColor: new jt(r).lighten(35).toHexString(),
    pickerPanelWithoutTimeCellHeight: a * 1.65,
    pickerYearMonthCellWidth: a * 1.5,
    pickerTimePanelColumnHeight: 28 * 8,
    pickerTimePanelColumnWidth: a * 1.4,
    pickerTimePanelCellHeight: 28,
    pickerQuarterPanelContentHeight: a * 1.4,
    pickerCellPaddingVertical: l,
    pickerCellBorderGap: 2,
    pickerControlIconSize: 7,
    pickerControlIconBorderWidth: 1.5
  };
}, mo = Pa("DatePicker", (e) => {
  const t = zt(Ko(e), Ol(e));
  return [
    Vl(t),
    Yl(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    qo(e, {
      focusElCls: `${e.componentCls}-focused`
    })
  ];
}, (e) => ({
  presetsWidth: 120,
  presetsMaxWidth: 200,
  zIndexPopup: e.zIndexPopupBase + 50
})), Hl = (e, t) => {
  let {
    attrs: n,
    slots: a
  } = t;
  return h(ar, x(x({
    size: "small",
    type: "primary"
  }, e), n), a);
}, Ft = (e, t, n) => {
  const a = or(n);
  return {
    [`${e.componentCls}-${t}`]: {
      color: e[`color${n}`],
      background: e[`color${a}Bg`],
      borderColor: e[`color${a}Border`],
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}, Al = (e) => rr(e, (t, n) => {
  let {
    textColor: a,
    lightBorderColor: o,
    lightColor: r,
    darkColor: l
  } = n;
  return {
    [`${e.componentCls}-${t}`]: {
      color: a,
      background: r,
      borderColor: o,
      // Inverse color
      "&-inverse": {
        color: e.colorTextLightSolid,
        background: l,
        borderColor: l
      },
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}), _l = (e) => {
  const {
    paddingXXS: t,
    lineWidth: n,
    tagPaddingHorizontal: a,
    componentCls: o
  } = e, r = a - n, l = t - n;
  return {
    // Result
    [o]: M(M({}, wn(e)), {
      display: "inline-block",
      height: "auto",
      marginInlineEnd: e.marginXS,
      paddingInline: r,
      fontSize: e.tagFontSize,
      lineHeight: `${e.tagLineHeight}px`,
      whiteSpace: "nowrap",
      background: e.tagDefaultBg,
      border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
      borderRadius: e.borderRadiusSM,
      opacity: 1,
      transition: `all ${e.motionDurationMid}`,
      textAlign: "start",
      // RTL
      [`&${o}-rtl`]: {
        direction: "rtl"
      },
      "&, a, a:hover": {
        color: e.tagDefaultColor
      },
      [`${o}-close-icon`]: {
        marginInlineStart: l,
        color: e.colorTextDescription,
        fontSize: e.tagIconSize,
        cursor: "pointer",
        transition: `all ${e.motionDurationMid}`,
        "&:hover": {
          color: e.colorTextHeading
        }
      },
      [`&${o}-has-color`]: {
        borderColor: "transparent",
        [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
          color: e.colorTextLightSolid
        }
      },
      "&-checkable": {
        backgroundColor: "transparent",
        borderColor: "transparent",
        cursor: "pointer",
        [`&:not(${o}-checkable-checked):hover`]: {
          color: e.colorPrimary,
          backgroundColor: e.colorFillSecondary
        },
        "&:active, &-checked": {
          color: e.colorTextLightSolid
        },
        "&-checked": {
          backgroundColor: e.colorPrimary,
          "&:hover": {
            backgroundColor: e.colorPrimaryHover
          }
        },
        "&:active": {
          backgroundColor: e.colorPrimaryActive
        }
      },
      "&-hidden": {
        display: "none"
      },
      // To ensure that a space will be placed between character and `Icon`.
      [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
        marginInlineStart: r
      }
    }),
    [`${o}-borderless`]: {
      borderColor: "transparent",
      background: e.tagBorderlessBg
    }
  };
}, bo = Pa("Tag", (e) => {
  const {
    fontSize: t,
    lineHeight: n,
    lineWidth: a,
    fontSizeIcon: o
  } = e, r = Math.round(t * n), l = e.fontSizeSM, i = r - a * 2, u = e.colorFillAlter, s = e.colorText, d = zt(e, {
    tagFontSize: l,
    tagLineHeight: i,
    tagDefaultBg: u,
    tagDefaultColor: s,
    tagIconSize: o - 2 * a,
    tagPaddingHorizontal: 8,
    tagBorderlessBg: e.colorFillTertiary
  });
  return [_l(d), Al(d), Ft(d, "success", "Success"), Ft(d, "processing", "Info"), Ft(d, "error", "Error"), Ft(d, "warning", "Warning")];
}), Bl = () => ({
  prefixCls: String,
  checked: {
    type: Boolean,
    default: void 0
  },
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  "onUpdate:checked": Function
}), Nn = He({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckableTag",
  inheritAttrs: !1,
  props: Bl(),
  // emits: ['update:checked', 'change', 'click'],
  setup(e, t) {
    let {
      slots: n,
      emit: a,
      attrs: o
    } = t;
    const {
      prefixCls: r
    } = qt("tag", e), [l, i] = bo(r), u = (d) => {
      const {
        checked: c
      } = e;
      a("update:checked", !c), a("change", !c), a("click", d);
    }, s = Y(() => oe(r.value, i.value, {
      [`${r.value}-checkable`]: !0,
      [`${r.value}-checkable-checked`]: e.checked
    }));
    return () => {
      var d;
      return l(h("span", x(x({}, o), {}, {
        class: [s.value, o.class],
        onClick: u
      }), [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]));
    };
  }
}), Fl = () => ({
  prefixCls: String,
  color: {
    type: String
  },
  closable: {
    type: Boolean,
    default: !1
  },
  closeIcon: ga.any,
  /** @deprecated `visible` will be removed in next major version. */
  visible: {
    type: Boolean,
    default: void 0
  },
  onClose: {
    type: Function
  },
  onClick: cr(),
  "onUpdate:visible": Function,
  icon: ga.any,
  bordered: {
    type: Boolean,
    default: !0
  }
}), Nt = He({
  compatConfig: {
    MODE: 3
  },
  name: "ATag",
  inheritAttrs: !1,
  props: Fl(),
  // emits: ['update:visible', 'close'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: a,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: l
    } = qt("tag", e), [i, u] = bo(r), s = Ve(!0);
    process.env.NODE_ENV !== "production" && lr(e.visible === void 0, "Tag", '`visible` is deprecated, please use `<Tag v-show="visible" />` instead.'), It(() => {
      e.visible !== void 0 && (s.value = e.visible);
    });
    const d = (C) => {
      C.stopPropagation(), a("update:visible", !1), a("close", C), !C.defaultPrevented && e.visible === void 0 && (s.value = !1);
    }, c = Y(() => ir(e.color) || sr(e.color)), v = Y(() => oe(r.value, u.value, {
      [`${r.value}-${e.color}`]: c.value,
      [`${r.value}-has-color`]: e.color && !c.value,
      [`${r.value}-hidden`]: !s.value,
      [`${r.value}-rtl`]: l.value === "rtl",
      [`${r.value}-borderless`]: !e.bordered
    })), g = (C) => {
      a("click", C);
    };
    return () => {
      var C, b, f;
      const {
        icon: m = (C = n.icon) === null || C === void 0 ? void 0 : C.call(n),
        color: p,
        closeIcon: y = (b = n.closeIcon) === null || b === void 0 ? void 0 : b.call(n),
        closable: k = !1
      } = e, S = () => k ? y ? h("span", {
        class: `${r.value}-close-icon`,
        onClick: d
      }, [y]) : h(dr, {
        class: `${r.value}-close-icon`,
        onClick: d
      }, null) : null, I = {
        backgroundColor: p && !c.value ? p : void 0
      }, H = m || null, A = (f = n.default) === null || f === void 0 ? void 0 : f.call(n), _ = H ? h(yt, null, [H, h("span", null, [A])]) : A, z = e.onClick !== void 0, R = h("span", x(x({}, o), {}, {
        onClick: g,
        class: [v.value, o.class],
        style: [I, o.style]
      }), [_, S()]);
      return i(z ? h(ur, null, {
        default: () => [R]
      }) : R);
    };
  }
});
Nt.CheckableTag = Nn;
Nt.install = function(e) {
  return e.component(Nt.name, Nt), e.component(Nn.name, Nn), e;
};
function Wl(e, t) {
  let {
    slots: n,
    attrs: a
  } = t;
  return h(Nt, x(x({
    color: "blue"
  }, e), a), n);
}
function Ll(e, t, n) {
  return n !== void 0 ? n : t === "year" && e.lang.yearPlaceholder ? e.lang.yearPlaceholder : t === "quarter" && e.lang.quarterPlaceholder ? e.lang.quarterPlaceholder : t === "month" && e.lang.monthPlaceholder ? e.lang.monthPlaceholder : t === "week" && e.lang.weekPlaceholder ? e.lang.weekPlaceholder : t === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.placeholder : e.lang.placeholder;
}
function zl(e, t, n) {
  return n !== void 0 ? n : t === "year" && e.lang.yearPlaceholder ? e.lang.rangeYearPlaceholder : t === "month" && e.lang.monthPlaceholder ? e.lang.rangeMonthPlaceholder : t === "week" && e.lang.weekPlaceholder ? e.lang.rangeWeekPlaceholder : t === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.rangePlaceholder : e.lang.rangePlaceholder;
}
function Co(e, t) {
  const n = {
    adjustX: 1,
    adjustY: 1
  };
  switch (t) {
    case "bottomLeft":
      return {
        points: ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
    case "bottomRight":
      return {
        points: ["tr", "br"],
        offset: [0, 4],
        overflow: n
      };
    case "topLeft":
      return {
        points: ["bl", "tl"],
        offset: [0, -4],
        overflow: n
      };
    case "topRight":
      return {
        points: ["br", "tr"],
        offset: [0, -4],
        overflow: n
      };
    default:
      return {
        points: e === "rtl" ? ["tr", "br"] : ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
  }
}
function wo() {
  return {
    id: String,
    /**
     * @deprecated `dropdownClassName` is deprecated which will be removed in next major
     *   version.Please use `popupClassName` instead.
     */
    dropdownClassName: String,
    popupClassName: String,
    popupStyle: yn(),
    transitionName: String,
    placeholder: String,
    allowClear: qe(),
    autofocus: qe(),
    disabled: qe(),
    tabindex: Number,
    open: qe(),
    defaultOpen: qe(),
    /** Make input readOnly to avoid popup keyboard in mobile */
    inputReadOnly: qe(),
    format: dt([String, Function, Array]),
    // Value
    // format:  string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
    // Render
    // suffixIcon?: VueNode;
    // clearIcon?: VueNode;
    // prevIcon?: VueNode;
    // nextIcon?: VueNode;
    // superPrevIcon?: VueNode;
    // superNextIcon?: VueNode;
    getPopupContainer: X(),
    panelRender: X(),
    // // Events
    onChange: X(),
    "onUpdate:value": X(),
    onOk: X(),
    onOpenChange: X(),
    "onUpdate:open": X(),
    onFocus: X(),
    onBlur: X(),
    onMousedown: X(),
    onMouseup: X(),
    onMouseenter: X(),
    onMouseleave: X(),
    onClick: X(),
    onContextmenu: X(),
    onKeydown: X(),
    // WAI-ARIA
    role: String,
    name: String,
    autocomplete: String,
    direction: mt(),
    showToday: qe(),
    showTime: dt([Boolean, Object]),
    locale: yn(),
    size: mt(),
    bordered: qe(),
    dateRender: X(),
    disabledDate: X(),
    mode: mt(),
    picker: mt(),
    valueFormat: String,
    placement: mt(),
    status: mt(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledHours: X(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledMinutes: X(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledSeconds: X()
  };
}
function jl() {
  return {
    defaultPickerValue: dt([Object, String]),
    defaultValue: dt([Object, String]),
    value: dt([Object, String]),
    presets: at(),
    disabledTime: X(),
    renderExtraFooter: X(),
    showNow: qe(),
    monthCellRender: X(),
    // deprecated  Please use `monthCellRender"` instead.',
    monthCellContentRender: X()
  };
}
function Ul() {
  return {
    allowEmpty: at(),
    dateRender: X(),
    defaultPickerValue: at(),
    defaultValue: at(),
    value: at(),
    presets: at(),
    disabledTime: X(),
    disabled: dt([Boolean, Array]),
    renderExtraFooter: X(),
    separator: {
      type: String
    },
    showTime: dt([Boolean, Object]),
    ranges: yn(),
    placeholder: at(),
    mode: at(),
    onChange: X(),
    "onUpdate:value": X(),
    onCalendarChange: X(),
    onPanelChange: X(),
    onOk: X()
  };
}
var Kl = function(e, t) {
  var n = {};
  for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, a = Object.getOwnPropertySymbols(e); o < a.length; o++)
    t.indexOf(a[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[o]) && (n[a[o]] = e[a[o]]);
  return n;
};
function ql(e, t) {
  function n(s, d) {
    const c = M(M(M({}, wo()), jl()), t);
    return He({
      compatConfig: {
        MODE: 3
      },
      name: d,
      inheritAttrs: !1,
      props: c,
      slots: Object,
      setup(v, g) {
        let {
          slots: C,
          expose: b,
          attrs: f,
          emit: m
        } = g;
        const p = v, y = Da(), k = Ma.useInject();
        process.env.NODE_ENV !== "production" && (Ct(s !== "quarter", d || "DatePicker", `DatePicker.${d} is legacy usage. Please use DatePicker[picker='${s}'] directly.`), Ct(!p.dropdownClassName, d || "DatePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), Ct(!(p.monthCellContentRender || C.monthCellContentRender), d || "DatePicker", '`monthCellContentRender` is deprecated. Please use `monthCellRender"` instead.'), Ct(!f.getCalendarContainer, d || "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
        const {
          prefixCls: S,
          direction: I,
          getPopupContainer: H,
          size: A,
          rootPrefixCls: _,
          disabled: z
        } = qt("picker", p), {
          compactSize: R,
          compactItemClassnames: V
        } = Ta(S, I), U = Y(() => R.value || A.value), [K, G] = mo(S), Z = O();
        b({
          focus: () => {
            var W;
            (W = Z.value) === null || W === void 0 || W.focus();
          },
          blur: () => {
            var W;
            (W = Z.value) === null || W === void 0 || W.blur();
          }
        });
        const P = (W) => p.valueFormat ? e.toString(W, p.valueFormat) : W, T = (W, re) => {
          const ee = P(W);
          m("update:value", ee), m("change", ee, re), y.onFieldChange();
        }, F = (W) => {
          m("update:open", W), m("openChange", W);
        }, w = (W) => {
          m("focus", W);
        }, D = (W) => {
          m("blur", W), y.onFieldBlur();
        }, L = (W, re) => {
          const ee = P(W);
          m("panelChange", ee, re);
        }, q = (W) => {
          const re = P(W);
          m("ok", re);
        }, [ne] = Na("DatePicker", Ia), ie = Y(() => p.value ? p.valueFormat ? e.toDate(p.value, p.valueFormat) : p.value : p.value === "" ? void 0 : p.value), ce = Y(() => p.defaultValue ? p.valueFormat ? e.toDate(p.defaultValue, p.valueFormat) : p.defaultValue : p.defaultValue === "" ? void 0 : p.defaultValue), de = Y(() => p.defaultPickerValue ? p.valueFormat ? e.toDate(p.defaultPickerValue, p.valueFormat) : p.defaultPickerValue : p.defaultPickerValue === "" ? void 0 : p.defaultPickerValue);
        return () => {
          var W, re, ee, J, ve, ae;
          const he = M(M({}, ne.value), p.locale), B = M(M({}, p), f), {
            bordered: Q = !0,
            placeholder: we,
            suffixIcon: $e = (W = C.suffixIcon) === null || W === void 0 ? void 0 : W.call(C),
            showToday: Me = !0,
            transitionName: Fe,
            allowClear: Se = !0,
            dateRender: We = C.dateRender,
            renderExtraFooter: Le = C.renderExtraFooter,
            monthCellRender: Te = C.monthCellRender || p.monthCellContentRender || C.monthCellContentRender,
            clearIcon: me = (re = C.clearIcon) === null || re === void 0 ? void 0 : re.call(C),
            id: Re = y.id.value
          } = B, ht = Kl(B, ["bordered", "placeholder", "suffixIcon", "showToday", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "monthCellRender", "clearIcon", "id"]), lt = B.showTime === "" ? !0 : B.showTime, {
            format: Pe
          } = B;
          let ze = {};
          s && (ze.picker = s);
          const Ee = s || B.picker || "date";
          ze = M(M(M({}, ze), lt ? Kt(M({
            format: Pe,
            picker: Ee
          }, typeof lt == "object" ? lt : {})) : {}), Ee === "time" ? Kt(M(M({
            format: Pe
          }, ht), {
            picker: Ee
          })) : {});
          const De = S.value, Ze = h(yt, null, [$e || (s === "time" ? h(Ra, null, null) : h(Ea, null, null)), k.hasFeedback && k.feedbackIcon]);
          return K(h(bl, x(x(x({
            monthCellRender: Te,
            dateRender: We,
            renderExtraFooter: Le,
            ref: Z,
            placeholder: Ll(he, Ee, we),
            suffixIcon: Ze,
            dropdownAlign: Co(I.value, p.placement),
            clearIcon: me || h(Oa, null, null),
            allowClear: Se,
            transitionName: Fe || `${_.value}-slide-up`
          }, ht), ze), {}, {
            id: Re,
            picker: Ee,
            value: ie.value,
            defaultValue: ce.value,
            defaultPickerValue: de.value,
            showToday: Me,
            locale: he.lang,
            class: oe({
              [`${De}-${U.value}`]: U.value,
              [`${De}-borderless`]: !Q
            }, Ya(De, Va(k.status, p.status), k.hasFeedback), f.class, G.value, V.value),
            disabled: z.value,
            prefixCls: De,
            getPopupContainer: f.getCalendarContainer || H.value,
            generateConfig: e,
            prevIcon: ((ee = C.prevIcon) === null || ee === void 0 ? void 0 : ee.call(C)) || h("span", {
              class: `${De}-prev-icon`
            }, null),
            nextIcon: ((J = C.nextIcon) === null || J === void 0 ? void 0 : J.call(C)) || h("span", {
              class: `${De}-next-icon`
            }, null),
            superPrevIcon: ((ve = C.superPrevIcon) === null || ve === void 0 ? void 0 : ve.call(C)) || h("span", {
              class: `${De}-super-prev-icon`
            }, null),
            superNextIcon: ((ae = C.superNextIcon) === null || ae === void 0 ? void 0 : ae.call(C)) || h("span", {
              class: `${De}-super-next-icon`
            }, null),
            components: yo,
            direction: I.value,
            dropdownClassName: oe(G.value, p.popupClassName, p.dropdownClassName),
            onChange: T,
            onOpenChange: F,
            onFocus: w,
            onBlur: D,
            onPanelChange: L,
            onOk: q
          }), null));
        };
      }
    });
  }
  const a = n(void 0, "ADatePicker"), o = n("week", "AWeekPicker"), r = n("month", "AMonthPicker"), l = n("year", "AYearPicker"), i = n("time", "TimePicker"), u = n("quarter", "AQuarterPicker");
  return {
    DatePicker: a,
    WeekPicker: o,
    MonthPicker: r,
    YearPicker: l,
    TimePicker: i,
    QuarterPicker: u
  };
}
var Gl = function(e, t) {
  var n = {};
  for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, a = Object.getOwnPropertySymbols(e); o < a.length; o++)
    t.indexOf(a[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[o]) && (n[a[o]] = e[a[o]]);
  return n;
};
function Ql(e, t) {
  return He({
    compatConfig: {
      MODE: 3
    },
    name: "ARangePicker",
    inheritAttrs: !1,
    props: M(M(M({}, wo()), Ul()), t),
    slots: Object,
    setup(a, o) {
      let {
        expose: r,
        slots: l,
        attrs: i,
        emit: u
      } = o;
      const s = a, d = Da(), c = Ma.useInject();
      process.env.NODE_ENV !== "production" && (Ct(!s.dropdownClassName, "RangePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), Ct(!i.getCalendarContainer, "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
      const {
        prefixCls: v,
        direction: g,
        getPopupContainer: C,
        size: b,
        rootPrefixCls: f,
        disabled: m
      } = qt("picker", s), {
        compactSize: p,
        compactItemClassnames: y
      } = Ta(v, g), k = Y(() => p.value || b.value), [S, I] = mo(v), H = O();
      r({
        focus: () => {
          var w;
          (w = H.value) === null || w === void 0 || w.focus();
        },
        blur: () => {
          var w;
          (w = H.value) === null || w === void 0 || w.blur();
        }
      });
      const A = (w) => s.valueFormat ? e.toString(w, s.valueFormat) : w, _ = (w, D) => {
        const L = A(w);
        u("update:value", L), u("change", L, D), d.onFieldChange();
      }, z = (w) => {
        u("update:open", w), u("openChange", w);
      }, R = (w) => {
        u("focus", w);
      }, V = (w) => {
        u("blur", w), d.onFieldBlur();
      }, U = (w, D) => {
        const L = A(w);
        u("panelChange", L, D);
      }, K = (w) => {
        const D = A(w);
        u("ok", D);
      }, G = (w, D, L) => {
        const q = A(w);
        u("calendarChange", q, D, L);
      }, [Z] = Na("DatePicker", Ia), P = Y(() => s.value && s.valueFormat ? e.toDate(s.value, s.valueFormat) : s.value), T = Y(() => s.defaultValue && s.valueFormat ? e.toDate(s.defaultValue, s.valueFormat) : s.defaultValue), F = Y(() => s.defaultPickerValue && s.valueFormat ? e.toDate(s.defaultPickerValue, s.valueFormat) : s.defaultPickerValue);
      return () => {
        var w, D, L, q, ne, ie, ce;
        const de = M(M({}, Z.value), s.locale), W = M(M({}, s), i), {
          prefixCls: re,
          bordered: ee = !0,
          placeholder: J,
          suffixIcon: ve = (w = l.suffixIcon) === null || w === void 0 ? void 0 : w.call(l),
          picker: ae = "date",
          transitionName: he,
          allowClear: B = !0,
          dateRender: Q = l.dateRender,
          renderExtraFooter: we = l.renderExtraFooter,
          separator: $e = (D = l.separator) === null || D === void 0 ? void 0 : D.call(l),
          clearIcon: Me = (L = l.clearIcon) === null || L === void 0 ? void 0 : L.call(l),
          id: Fe = d.id.value
        } = W, Se = Gl(W, ["prefixCls", "bordered", "placeholder", "suffixIcon", "picker", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "separator", "clearIcon", "id"]);
        delete Se["onUpdate:value"], delete Se["onUpdate:open"];
        const {
          format: We,
          showTime: Le
        } = W;
        let Te = {};
        Te = M(M(M({}, Te), Le ? Kt(M({
          format: We,
          picker: ae
        }, Le)) : {}), ae === "time" ? Kt(M(M({
          format: We
        }, fr(Se, ["disabledTime"])), {
          picker: ae
        })) : {});
        const me = v.value, Re = h(yt, null, [ve || (ae === "time" ? h(Ra, null, null) : h(Ea, null, null)), c.hasFeedback && c.feedbackIcon]);
        return S(h(Il, x(x(x({
          dateRender: Q,
          renderExtraFooter: we,
          separator: $e || h("span", {
            "aria-label": "to",
            class: `${me}-separator`
          }, [h(vr, null, null)]),
          ref: H,
          dropdownAlign: Co(g.value, s.placement),
          placeholder: zl(de, ae, J),
          suffixIcon: Re,
          clearIcon: Me || h(Oa, null, null),
          allowClear: B,
          transitionName: he || `${f.value}-slide-up`
        }, Se), Te), {}, {
          disabled: m.value,
          id: Fe,
          value: P.value,
          defaultValue: T.value,
          defaultPickerValue: F.value,
          picker: ae,
          class: oe({
            [`${me}-${k.value}`]: k.value,
            [`${me}-borderless`]: !ee
          }, Ya(me, Va(c.status, s.status), c.hasFeedback), i.class, I.value, y.value),
          locale: de.lang,
          prefixCls: me,
          getPopupContainer: i.getCalendarContainer || C.value,
          generateConfig: e,
          prevIcon: ((q = l.prevIcon) === null || q === void 0 ? void 0 : q.call(l)) || h("span", {
            class: `${me}-prev-icon`
          }, null),
          nextIcon: ((ne = l.nextIcon) === null || ne === void 0 ? void 0 : ne.call(l)) || h("span", {
            class: `${me}-next-icon`
          }, null),
          superPrevIcon: ((ie = l.superPrevIcon) === null || ie === void 0 ? void 0 : ie.call(l)) || h("span", {
            class: `${me}-super-prev-icon`
          }, null),
          superNextIcon: ((ce = l.superNextIcon) === null || ce === void 0 ? void 0 : ce.call(l)) || h("span", {
            class: `${me}-super-next-icon`
          }, null),
          components: yo,
          direction: g.value,
          dropdownClassName: oe(I.value, s.popupClassName, s.dropdownClassName),
          onChange: _,
          onOpenChange: z,
          onFocus: R,
          onBlur: V,
          onPanelChange: U,
          onOk: K,
          onCalendarChange: G
        }), null));
      };
    }
  });
}
const yo = {
  button: Hl,
  rangeItem: Wl
};
function Xl(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
function Kt(e) {
  const {
    format: t,
    picker: n,
    showHour: a,
    showMinute: o,
    showSecond: r,
    use12Hours: l
  } = e, i = Xl(t)[0], u = M({}, e);
  return i && typeof i == "string" && (!i.includes("s") && r === void 0 && (u.showSecond = !1), !i.includes("m") && o === void 0 && (u.showMinute = !1), !i.includes("H") && !i.includes("h") && a === void 0 && (u.showHour = !1), (i.includes("a") || i.includes("A")) && l === void 0 && (u.use12Hours = !0)), n === "time" ? u : (typeof i == "function" && delete u.format, {
    showTime: u
  });
}
function Zl(e, t) {
  const {
    DatePicker: n,
    WeekPicker: a,
    MonthPicker: o,
    YearPicker: r,
    TimePicker: l,
    QuarterPicker: i
  } = ql(e, t), u = Ql(e, t);
  return {
    DatePicker: n,
    WeekPicker: a,
    MonthPicker: o,
    YearPicker: r,
    TimePicker: l,
    QuarterPicker: i,
    RangePicker: u
  };
}
const {
  DatePicker: gn,
  WeekPicker: pn,
  MonthPicker: hn,
  YearPicker: Jl,
  TimePicker: ei,
  QuarterPicker: mn,
  RangePicker: bn
} = Zl(jr), ti = M(gn, {
  WeekPicker: pn,
  MonthPicker: hn,
  YearPicker: Jl,
  RangePicker: bn,
  TimePicker: ei,
  QuarterPicker: mn,
  install: (e) => (e.component(gn.name, gn), e.component(bn.name, bn), e.component(hn.name, hn), e.component(pn.name, pn), e.component(mn.name, mn), e)
}), ni = {
  name: "CustomInput",
  // components: { DataRangeTreeSelect, ChooseSelectUser },
  props: {
    value: {
      type: [String, Object, Array, Number],
      default: ""
    },
    data: {
      type: Object,
      default: () => {
      }
    },
    disabled: {
      type: Boolean,
      default: !1
    }
  },
  data() {
    return {
      precision: 0,
      step: 1,
      config: {
        filterConfig: {}
      },
      valueRange: {}
    };
  },
  computed: {
    dateFormat() {
      var e, t;
      return ((t = (e = this.config) == null ? void 0 : e.filterConfig) == null ? void 0 : t.filterType) === "DATETIME" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
    },
    isSelectVisible() {
      var n, a;
      const e = ["SINGLE_SELECT", "MULTIPLE_SELECT", "GANDER", "IS"], t = (a = (n = this.config) == null ? void 0 : n.filterConfig) == null ? void 0 : a.filterType;
      return e.includes(t);
    },
    isNumberVisible() {
      var n, a;
      const e = ["INT", "FLOAT"], t = (a = (n = this.config) == null ? void 0 : n.filterConfig) == null ? void 0 : a.filterType;
      return e.includes(t);
    },
    isPickerVisible() {
      var n, a;
      const e = ["DATE", "DATETIME"], t = (a = (n = this.config) == null ? void 0 : n.filterConfig) == null ? void 0 : a.filterType;
      return e.includes(t);
    }
  },
  watch: {
    data: {
      handler(e) {
        return ca(this, null, function* () {
          var a, o, r, l, i, u;
          this.config = e || {};
          const n = ["SINGLE_SELECT", "MULTIPLE_SELECT", "GANDER", "IS"].includes((o = (a = this.config) == null ? void 0 : a.filterConfig) == null ? void 0 : o.filterType) && !e.filterConfig.filterData && e.filterConfig.filterApi;
          if (this.step = ((l = (r = this.config) == null ? void 0 : r.filterConfig) == null ? void 0 : l.step) || 1, this.precision = ((u = (i = this.config) == null ? void 0 : i.filterConfig) == null ? void 0 : u.precision) || 1, n) {
            const s = yield e.filterConfig.filterApi(
              { type: "portal_config_type" },
              { pageSize: 10, pageNo: 1 }
            );
            this.config.filterConfig.filterData = (s.list || []).map((d) => {
              var c, v, g, C, b, f;
              return {
                value: d[(g = (v = (c = this.config) == null ? void 0 : c.filterConfig) == null ? void 0 : v.props) == null ? void 0 : g.value],
                name: d[(f = (b = (C = this.config) == null ? void 0 : C.filterConfig) == null ? void 0 : b.props) == null ? void 0 : f.key]
              };
            });
          }
        });
      },
      immediate: !0,
      deep: !0
    }
  },
  methods: {
    recursionChildren(e, t) {
      return pr(e, t);
    },
    disabledDate(e = bt()) {
      var o, r, l, i;
      const t = (r = (o = this.config) == null ? void 0 : o.filterConfig) == null ? void 0 : r.startDate, n = (i = (l = this.config) == null ? void 0 : l.filterConfig) == null ? void 0 : i.endDate;
      if (!t && !n) return !1;
      const a = bt(e).unix();
      if (t && n) {
        const u = bt(u).unix(), s = bt(s).unix();
        return a < u || a > s;
      }
      if (t)
        return a <= bt(t).unix();
      if (n)
        return a >= bt(n).unix();
    },
    handUserChange(e = "", t = "", n = []) {
      this.config.value = t;
    },
    handDateChange(e, t) {
      this.config.value = t;
    }
  }
}, ai = {
  key: 0,
  class: "custom-input"
};
function oi(e, t, n, a, o, r) {
  const l = hr, i = mr, u = br, s = Cr, d = ti, c = pa("s-office-select"), v = pa("s-tree-select");
  return o.config.filterConfig ? (Ke(), ha("div", ai, [
    !o.config.filterConfig.filterType || o.config.filterConfig.filterType === "INPUT" ? (Ke(), st(l, {
      key: 0,
      style: { width: "100%" },
      disabled: n.disabled,
      modelValue: o.config.value,
      "onUpdate:modelValue": t[0] || (t[0] = (g) => o.config.value = g),
      placeholder: "请输入",
      maxLength: o.config.filterConfig.length || 200,
      onBlur: t[1] || (t[1] = (g) => o.config.value = g.target.value)
    }, null, 8, ["disabled", "modelValue", "maxLength"])) : ut("", !0),
    r.isSelectVisible ? (Ke(), st(u, Pr({
      key: 1,
      style: { width: "100%" },
      disabled: n.disabled,
      modelValue: o.config.value,
      "onUpdate:modelValue": t[2] || (t[2] = (g) => o.config.value = g)
    }, o.config.filterConfig.filterType === "MULTIPLE_SELECT" ? { mode: "multiple" } : {}, {
      allowClear: !0,
      placeholder: "请选择",
      onChange: t[3] || (t[3] = (g) => o.config.value = g)
    }), {
      default: ma(() => [
        (Ke(!0), ha(yt, null, Dr(o.config.filterConfig.filterData, (g, C) => (Ke(), st(i, {
          value: g.value,
          key: C
        }, {
          default: ma(() => [
            In(Mr(g.name), 1)
          ]),
          _: 2
        }, 1032, ["value"]))), 128))
      ]),
      _: 1
    }, 16, ["disabled", "modelValue"])) : ut("", !0),
    r.isNumberVisible ? (Ke(), st(s, {
      key: 2,
      disabled: n.disabled,
      precision: o.precision,
      step: o.step,
      style: { width: "100%" },
      modelValue: o.config.value,
      "onUpdate:modelValue": t[4] || (t[4] = (g) => o.config.value = g),
      placeholder: "请输入",
      min: o.config.filterConfig.minValue,
      max: o.config.filterConfig.maxValue,
      onBlur: t[5] || (t[5] = (g) => o.config.value = g.target.value)
    }, null, 8, ["disabled", "precision", "step", "modelValue", "min", "max"])) : ut("", !0),
    r.isPickerVisible ? (Ke(), st(d, {
      key: 3,
      style: { width: "100%" },
      disabled: n.disabled,
      modelValue: o.config.value,
      "onUpdate:modelValue": t[6] || (t[6] = (g) => o.config.value = g),
      "show-time": r.dateFormat && r.dateFormat.split(" ").length > 1 ? { format: "HH:mm:ss" } : !1,
      placeholder: "请选择",
      "disabled-date": r.disabledDate,
      onChange: r.handDateChange
    }, null, 8, ["disabled", "modelValue", "show-time", "disabled-date", "onChange"])) : ut("", !0),
    o.config.filterConfig.filterType === "USER" ? (Ke(), st(c, {
      key: 4,
      value: o.config.value,
      "onUpdate:value": t[7] || (t[7] = (g) => o.config.value = g),
      onChange: r.handUserChange
    }, null, 8, ["value", "onChange"])) : ut("", !0),
    o.config.filterConfig.filterType === "OFFICE" ? (Ke(), st(v, {
      key: 5,
      modelValue: o.config.value,
      "onUpdate:modelValue": t[8] || (t[8] = (g) => o.config.value = g),
      onChange: t[9] || (t[9] = (g) => o.config.value = g),
      recursionChildren: r.recursionChildren
    }, null, 8, ["modelValue", "recursionChildren"])) : ut("", !0)
  ])) : ut("", !0);
}
const ui = /* @__PURE__ */ gr(ni, [["render", oi]]);
export {
  ui as default
};
