@dsh-plugin/dsh-ui-components-vue 0.1.0-dev.44282081091 → 0.1.0-dev.45002688276

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import * as N from "@arco-design/web-vue";
2
- import Lt, { Progress as Ne, Table as Qe, Card as be, InputTag as Je, Alert as Xe, Result as et, Spin as Le, InputNumber as tt, Tag as at, Tree as nt, ConfigProvider as rt, Collapse as Bt, Button as Et, Drawer as Nt, Modal as Ft, Scrollbar as ut, Input as Ht } from "@arco-design/web-vue";
1
+ import * as z from "@arco-design/web-vue";
2
+ import Ft, { Textarea as zt, Progress as He, Table as re, Card as we, InputTag as et, Alert as tt, Result as at, Spin as Ee, InputNumber as nt, Tag as rt, Tree as ot, ConfigProvider as lt, Collapse as Ht, Pagination as Ne, Button as Rt, ButtonGroup as jt, Drawer as qt, Modal as Wt, Scrollbar as dt, Link as Ut, Input as Kt } from "@arco-design/web-vue";
3
3
  export * from "@arco-design/web-vue";
4
- import { CollapseItem as An, Breadcrumb as xn, CollapseItem as $n, Collapse as Cn, Empty as _n, Divider as Pn, TypographyText as Tn, Textarea as Vn } from "@arco-design/web-vue";
5
- import { defineComponent as F, inject as Se, h as m, shallowRef as j, onBeforeUnmount as ve, mergeProps as fe, useId as Me, onMounted as he, onUpdated as ke, ref as q, computed as J, shallowReactive as De, provide as ct, watch as le, Teleport as dt, TransitionGroup as Rt, nextTick as re, getCurrentInstance as qe, createTextVNode as qt, Fragment as Wt, cloneVNode as Fe, isVNode as ft, onBeforeUpdate as jt } from "vue";
6
- import { configProviderInjectionKey as We } from "@arco-design/web-vue/es/config-provider/context.js";
7
- import zt from "@arco-design/web-vue/es/icon/icon-info-circle-fill/index.js";
8
- function Ut(e, t) {
4
+ import { CollapseItem as Ln, Breadcrumb as En, CollapseItem as Nn, Collapse as Fn, Empty as zn, Divider as Hn, TypographyText as Rn } from "@arco-design/web-vue";
5
+ import { defineComponent as N, inject as me, h as m, shallowRef as W, onBeforeUnmount as pe, mergeProps as ce, useId as ke, onMounted as ve, onUpdated as Ae, ref as j, computed as Z, shallowReactive as Me, provide as We, onBeforeMount as Gt, watch as le, Teleport as ft, TransitionGroup as Zt, nextTick as se, getCurrentInstance as Ue, createTextVNode as Qt, Fragment as Jt, cloneVNode as Re, isVNode as ht, onBeforeUpdate as Xt } from "vue";
6
+ import { configProviderInjectionKey as xe } from "@arco-design/web-vue/es/config-provider/context.js";
7
+ import ea from "@arco-design/web-vue/es/icon/icon-info-circle-fill/index.js";
8
+ function ta(e, t) {
9
9
  for (var a = 0; a < t.length; a++) {
10
10
  const l = t[a];
11
11
  if (typeof l != "string" && !Array.isArray(l)) {
12
12
  for (const n in l)
13
13
  if (n !== "default" && !(n in e)) {
14
- const o = Object.getOwnPropertyDescriptor(l, n);
15
- o && Object.defineProperty(e, n, o.get ? o : {
14
+ const r = Object.getOwnPropertyDescriptor(l, n);
15
+ r && Object.defineProperty(e, n, r.get ? r : {
16
16
  enumerable: !0,
17
17
  get: () => l[n]
18
18
  });
@@ -21,130 +21,148 @@ function Ut(e, t) {
21
21
  }
22
22
  return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
23
23
  }
24
- const Kt = F({
24
+ const aa = N({
25
25
  name: "DshProgress",
26
26
  inheritAttrs: !1,
27
- props: Ne.props,
27
+ props: He.props,
28
28
  setup(e, { attrs: t, slots: a }) {
29
- const l = e, n = Se(We, void 0), o = () => l.type === "circle" && l.showText === !1 && !a.text && !l.steps && l.width === void 0 && ((l.size ?? (n == null ? void 0 : n.size)) === void 0 || (l.size ?? (n == null ? void 0 : n.size)) === "medium");
30
- return () => m(Ne, {
31
- ...t,
32
- ...e,
33
- class: [t.class, { "dsh-hero-progress-circle": o(), "dsh-hero-progress-circle-default-stroke": o() && l.strokeWidth === void 0 }],
34
- width: o() ? 36 : l.width,
35
- strokeWidth: l.strokeWidth ?? (l.type === "line" && !l.steps ? 8 : void 0)
36
- }, a);
29
+ const l = e, n = me(xe, void 0), r = () => l.type === "circle" && l.showText === !1 && !a.text && !l.steps && l.width === void 0 && ((l.size ?? (n == null ? void 0 : n.size)) === void 0 || (l.size ?? (n == null ? void 0 : n.size)) === "medium");
30
+ return () => {
31
+ const o = l.size ?? (n == null ? void 0 : n.size), i = o === "small" ? 4 : o === "large" ? 12 : 8, s = l.type === "line" && o !== "mini" && !l.steps, c = l.strokeWidth ?? (s ? i : void 0), v = Object.fromEntries(Object.entries(t).filter(([g]) => g === "role" || g.startsWith("aria-")));
32
+ return m("div", { style: { display: "contents" } }, [m("span", {
33
+ class: "dsh-progress-reader",
34
+ role: "progressbar",
35
+ "aria-valuemin": 0,
36
+ "aria-valuemax": 100,
37
+ "aria-valuenow": Number(((l.percent ?? 0) * 100).toFixed(10)),
38
+ ...v
39
+ }), m(He, {
40
+ ...t,
41
+ ...e,
42
+ "aria-hidden": "true",
43
+ class: [t.class, { "dsh-progress-line-four": s && c === 4, "dsh-hero-progress-circle": r(), "dsh-hero-progress-circle-default-stroke": r() && l.strokeWidth === void 0 }],
44
+ width: r() ? 36 : l.width,
45
+ strokeWidth: c
46
+ }, a)]);
47
+ };
37
48
  }
38
49
  });
39
- function ee(e, t) {
50
+ function X(e, t) {
40
51
  return Object.assign(e, {
41
52
  install(a, l) {
42
- function n(o, r) {
43
- return r === void 0 ? a.component(o) : a.component(o, r === t ? e : r);
53
+ function n(r, o) {
54
+ return o === void 0 ? a.component(r) : a.component(r, o === t ? e : o);
44
55
  }
45
56
  t.install({ ...a, component: n }, l);
46
57
  }
47
58
  });
48
59
  }
49
- const Gt = ee(Kt, Ne), Zt = ee(F({
60
+ const na = X(aa, He), tn = zt, ra = Object.assign(X(N({
50
61
  name: "DshTable",
51
62
  inheritAttrs: !1,
52
63
  props: { contentSized: Boolean, loadingStyle: String },
53
64
  setup(e, { attrs: t, slots: a, expose: l }) {
54
- const n = j(), o = j(!1);
55
- let r;
65
+ const n = W(), r = W(!1);
66
+ let o;
56
67
  return l(new Proxy({}, {
57
- get: (s, u) => {
58
- var h;
59
- return (h = n.value) == null ? void 0 : h[u];
68
+ get: (i, s) => {
69
+ var c;
70
+ return (c = n.value) == null ? void 0 : c[s];
60
71
  },
61
- has: (s, u) => n.value !== void 0 && u in n.value
62
- })), ve(() => clearTimeout(r)), () => {
63
- const s = e.loadingStyle === "blur", u = t.loading, h = typeof u == "object" && u !== null ? u : { loading: u === !0 || u === "" }, c = s && h.loading === !0, S = m(Qe, fe(t, {
72
+ has: (i, s) => n.value !== void 0 && s in n.value
73
+ })), pe(() => clearTimeout(o)), () => {
74
+ const i = e.loadingStyle === "blur", s = t.loading, c = typeof s == "object" && s !== null ? s : { loading: s === !0 || s === "" }, v = i && c.loading === !0, g = m(re, ce(t, {
64
75
  ...e.contentSized ? { scroll: { x: "max-content", minWidth: "100%", ...t.scroll } } : {},
65
- ...s ? { loading: !1, inert: c || void 0 } : {},
76
+ ...i ? { loading: !1, inert: v || void 0 } : {},
66
77
  ref: n,
67
78
  class: ["dsh-scroll-table", { "dsh-table--content-sized": e.contentSized }],
68
- "data-scrolling": o.value || void 0,
79
+ "data-scrolling": r.value || void 0,
69
80
  onScrollCapture() {
70
- o.value = !0, clearTimeout(r), r = setTimeout(() => {
71
- o.value = !1;
81
+ r.value = !0, clearTimeout(o), o = setTimeout(() => {
82
+ r.value = !1;
72
83
  }, 900);
73
84
  }
74
85
  }), a);
75
- return s ? m("div", { class: "dsh-table-loading", "aria-busy": c || void 0 }, [
76
- S,
77
- c && m("div", { class: "dsh-table-loading__indicator" }, m(Ae, { ...h, loading: !0 }, { element: a["loading-icon"] }))
78
- ]) : S;
86
+ return i ? m("div", { class: "dsh-table-loading", "aria-busy": v || void 0 }, [
87
+ g,
88
+ v && m("div", { class: "dsh-table-loading__indicator" }, m(Ce, { ...c, loading: !0 }, { element: a["loading-icon"] }))
89
+ ]) : g;
79
90
  };
80
91
  }
81
- }), Qe), Qt = Object.assign(ee(F({
92
+ }), re), {
93
+ Column: re.Column,
94
+ Thead: re.Thead,
95
+ Tbody: re.Tbody,
96
+ Tr: re.Tr,
97
+ Th: re.Th,
98
+ Td: re.Td
99
+ }), oa = Object.assign(X(N({
82
100
  name: "DshCard",
83
101
  inheritAttrs: !1,
84
- props: { variant: String, glassOpacity: Number },
102
+ props: { variant: String, glassOpacity: Number, tight: Boolean },
85
103
  setup(e, { attrs: t, slots: a }) {
86
- return () => m(be, fe(t, {
87
- class: { "dsh-card--glass": e.variant === "glass" },
104
+ return () => m(we, ce(t, {
105
+ class: { "dsh-card--glass": e.variant === "glass", "dsh-card--flat": e.variant === "flat", "dsh-card--tight": e.tight },
88
106
  style: e.variant === "glass" && Number.isFinite(e.glassOpacity) ? { "--dsh-glass-opacity": e.glassOpacity } : void 0
89
107
  }), a);
90
108
  }
91
- }), be), { Meta: be.Meta, Grid: be.Grid }), Jt = ee(F({
109
+ }), we), { Meta: we.Meta, Grid: we.Grid }), la = X(N({
92
110
  name: "DshInputTag",
93
111
  inheritAttrs: !1,
94
112
  setup(e, { attrs: t, slots: a, expose: l }) {
95
- const n = j();
113
+ const n = W();
96
114
  return l(new Proxy({}, {
97
- get: (o, r) => {
98
- var s;
99
- return (s = n.value) == null ? void 0 : s[r];
115
+ get: (r, o) => {
116
+ var i;
117
+ return (i = n.value) == null ? void 0 : i[o];
100
118
  },
101
- has: (o, r) => n.value !== void 0 && r in n.value
102
- })), () => m(Je, { ...t, ref: n, class: ["dsh-hero-input-tag", t.class] }, a);
119
+ has: (r, o) => n.value !== void 0 && o in n.value
120
+ })), () => m(et, { ...t, ref: n, class: ["dsh-hero-input-tag", t.class] }, a);
103
121
  }
104
- }), Je), de = {
122
+ }), et), he = {
105
123
  info: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",
106
124
  success: "M13.5 8a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858L6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",
107
125
  warning: "M7.134 2.994L2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0a1 1 0 0 1 2 0",
108
126
  error: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z"
109
- }, Xt = ee(F({
127
+ }, ia = X(N({
110
128
  name: "DshAlert",
111
129
  inheritAttrs: !1,
112
130
  setup(e, { attrs: t, slots: a, expose: l }) {
113
- const n = j();
131
+ const n = W();
114
132
  return l(new Proxy({}, {
115
- get: (o, r) => {
116
- var s;
117
- return (s = n.value) == null ? void 0 : s[r];
133
+ get: (r, o) => {
134
+ var i;
135
+ return (i = n.value) == null ? void 0 : i[o];
118
136
  },
119
- has: (o, r) => n.value !== void 0 && r in n.value
137
+ has: (r, o) => n.value !== void 0 && o in n.value
120
138
  })), () => {
121
- const o = t.type ?? "info", r = typeof o == "string" && o in de ? de[o] : void 0;
122
- return m(Xe, { ...t, ref: n }, {
139
+ const r = t.type ?? "info", o = typeof r == "string" && r in he ? he[r] : void 0;
140
+ return m(tt, { ...t, ref: n }, {
123
141
  ...a,
124
- ...r && !a.icon ? { icon: () => m("svg", { "aria-hidden": !0, fill: "none", height: 16, role: "presentation", viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg" }, [
125
- m("path", { "clip-rule": "evenodd", d: r, fill: "currentColor", "fill-rule": "evenodd" })
142
+ ...o && !a.icon ? { icon: () => m("svg", { "aria-hidden": !0, fill: "none", height: 16, role: "presentation", viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg" }, [
143
+ m("path", { "clip-rule": "evenodd", d: o, fill: "currentColor", "fill-rule": "evenodd" })
126
144
  ]) } : {}
127
145
  });
128
146
  };
129
147
  }
130
- }), Xe), ea = ee(F({
148
+ }), tt), sa = X(N({
131
149
  name: "DshResult",
132
150
  inheritAttrs: !1,
133
151
  setup(e, { attrs: t, slots: a }) {
134
152
  return () => {
135
- const l = t.status === void 0 ? "info" : t.status, n = typeof l == "string" && l in de ? de[l] : void 0;
136
- return m(et, t, {
153
+ const l = t.status === void 0 ? "info" : t.status, n = typeof l == "string" && l in he ? he[l] : void 0;
154
+ return m(at, t, {
137
155
  ...a,
138
156
  ...n && !a.icon ? { icon: () => m("svg", { class: "dsh-result-icon", "aria-hidden": !0, fill: "none", viewBox: "0 0 16 16" }, [m("path", { d: n, fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd" })]) } : {}
139
157
  });
140
158
  };
141
159
  }
142
- }), et), Ae = ee(F({
160
+ }), at), Ce = X(N({
143
161
  name: "DshSpin",
144
162
  inheritAttrs: !1,
145
- props: { ...Le.props, loadingStyle: String },
163
+ props: { ...Ee.props, loadingStyle: String },
146
164
  setup(e, { attrs: t, slots: a }) {
147
- const l = Me(), n = Se(We, void 0), o = e, r = () => m("svg", { class: "dsh-spinner-icon", viewBox: "0 0 24 24", "aria-hidden": !0, style: o.size ? { width: `${o.size}px`, height: `${o.size}px` } : void 0 }, [
165
+ const l = ke(), n = me(xe, void 0), r = e, o = () => m("svg", { class: "dsh-spinner-icon", viewBox: "0 0 24 24", "aria-hidden": !0, style: r.size ? { width: `${r.size}px`, height: `${r.size}px` } : void 0 }, [
148
166
  m("defs", {}, [
149
167
  m("linearGradient", { id: `${l}-1`, x1: "50%", x2: "50%", y1: "5.271%", y2: "91.793%" }, [m("stop", { offset: "0%", "stop-color": "currentColor" }), m("stop", { offset: "100%", "stop-color": "currentColor", "stop-opacity": 0.55 })]),
150
168
  m("linearGradient", { id: `${l}-2`, x1: "50%", x2: "50%", y1: "15.24%", y2: "87.15%" }, [m("stop", { offset: "0%", "stop-color": "currentColor", "stop-opacity": 0 }), m("stop", { offset: "100%", "stop-color": "currentColor", "stop-opacity": 0.55 })])
@@ -153,146 +171,150 @@ const Gt = ee(Kt, Ne), Zt = ee(F({
153
171
  m("path", { d: "M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118", fill: `url(#${l}-2)`, transform: "translate(1.5 1.625)" })
154
172
  ]);
155
173
  return () => {
156
- const { loadingStyle: s, ...u } = o, h = s === "blur" && a.default, c = o.dot || a.icon || a.element || n != null && n.slots.loading ? a : { ...a, element: r };
157
- return m(Le, fe(u, t, {
158
- class: { "dsh-spin--blur": h },
159
- "aria-busy": h && o.loading ? !0 : void 0
160
- }), h ? {
161
- ...c,
174
+ const { loadingStyle: i, ...s } = r, c = i === "blur" && a.default, v = r.dot || a.icon || a.element || n != null && n.slots.loading ? a : { ...a, element: o };
175
+ return m(Ee, ce(s, t, {
176
+ class: { "dsh-spin--blur": c },
177
+ "aria-busy": c && r.loading ? !0 : void 0
178
+ }), c ? {
179
+ ...v,
162
180
  default: () => {
163
- var S;
164
- return m("div", { class: "dsh-spin-content", inert: o.loading || void 0 }, (S = a.default) == null ? void 0 : S.call(a));
181
+ var g;
182
+ return m("div", { class: "dsh-spin-content", inert: r.loading || void 0 }, (g = a.default) == null ? void 0 : g.call(a));
165
183
  }
166
- } : c);
184
+ } : v);
167
185
  };
168
186
  }
169
- }), Le), ta = ee(F({
187
+ }), Ee), ua = X(N({
170
188
  name: "DshInputNumber",
171
189
  inheritAttrs: !1,
172
190
  setup(e, { attrs: t, slots: a, expose: l }) {
173
- const n = j();
191
+ const n = W();
174
192
  l(new Proxy({}, {
175
- get: (r, s) => {
176
- var u;
177
- return (u = n.value) == null ? void 0 : u[s];
193
+ get: (o, i) => {
194
+ var s;
195
+ return (s = n.value) == null ? void 0 : s[i];
178
196
  },
179
- has: (r, s) => n.value !== void 0 && s in n.value
197
+ has: (o, i) => n.value !== void 0 && i in n.value
180
198
  }));
181
- const o = () => {
182
- var s;
183
- const r = (s = n.value) == null ? void 0 : s.$el;
184
- if (!(!(r instanceof HTMLElement) || !r.classList.contains("arco-input-number-mode-button")))
185
- for (const u of r.querySelectorAll(".arco-input-number-step-button :is(.arco-icon-minus,.arco-icon-plus)")) {
186
- const h = u.querySelector("path");
187
- h && (u.setAttribute("viewBox", "0 0 16 16"), u.setAttribute("stroke", "none"), h.setAttribute("fill", "currentColor"), h.setAttribute("fill-rule", "evenodd"), h.setAttribute("clip-rule", "evenodd"), h.setAttribute("d", u.classList.contains("arco-icon-minus") ? "M1.75 8a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11A.75.75 0 0 1 1.75 8" : "M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75"));
199
+ const r = () => {
200
+ var i;
201
+ const o = (i = n.value) == null ? void 0 : i.$el;
202
+ if (!(!(o instanceof HTMLElement) || !o.classList.contains("arco-input-number-mode-button")))
203
+ for (const s of o.querySelectorAll(".arco-input-number-step-button :is(.arco-icon-minus,.arco-icon-plus)")) {
204
+ const c = s.querySelector("path");
205
+ c && (s.setAttribute("viewBox", "0 0 16 16"), s.setAttribute("stroke", "none"), c.setAttribute("fill", "currentColor"), c.setAttribute("fill-rule", "evenodd"), c.setAttribute("clip-rule", "evenodd"), c.setAttribute("d", s.classList.contains("arco-icon-minus") ? "M1.75 8a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11A.75.75 0 0 1 1.75 8" : "M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75"));
188
206
  }
189
207
  };
190
- return he(o), ke(o), () => m(tt, { ...t, ref: n }, a);
208
+ return ve(r), Ae(r), () => m(nt, { ...t, ref: n }, a);
191
209
  }
192
- }), tt), aa = ee(F({
210
+ }), nt), ca = X(N({
193
211
  name: "DshTag",
194
212
  inheritAttrs: !1,
195
213
  setup(e, { attrs: t, slots: a }) {
196
- const l = j(), n = () => {
197
- var s;
198
- const o = (s = l.value) == null ? void 0 : s.$el;
199
- if (!(o instanceof HTMLElement))
214
+ const l = W(), n = () => {
215
+ var i;
216
+ const r = (i = l.value) == null ? void 0 : i.$el;
217
+ if (!(r instanceof HTMLElement))
200
218
  return;
201
- const r = o.querySelector(".arco-tag-close-btn");
202
- r && !r.hasAttribute("tabindex") && (r.tabIndex = 0);
219
+ const o = r.querySelector(".arco-tag-close-btn");
220
+ o && !o.hasAttribute("tabindex") && (o.tabIndex = 0);
203
221
  };
204
- return he(n), ke(n), () => m(at, fe(t, { ref: l, onKeydown: (o) => {
205
- o.defaultPrevented || !["Enter", " "].includes(o.key) || !(o.target instanceof HTMLElement) || !o.target.classList.contains("arco-tag-close-btn") || (o.preventDefault(), o.target.click());
222
+ return ve(n), Ae(n), () => m(rt, ce(t, { ref: l, onKeydown: (r) => {
223
+ r.defaultPrevented || !["Enter", " "].includes(r.key) || !(r.target instanceof HTMLElement) || !r.target.classList.contains("arco-tag-close-btn") || (r.preventDefault(), r.target.click());
206
224
  } }), {
207
225
  ...a,
226
+ default: a.default ? () => {
227
+ var r;
228
+ return m("span", { class: "dsh-tag-label" }, (r = a.default) == null ? void 0 : r.call(a));
229
+ } : void 0,
208
230
  "close-icon": a["close-icon"] ?? (() => m("svg", { class: "dsh-tag-close-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0 }, [m("path", { d: "M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z", fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd" })]))
209
231
  });
210
232
  }
211
- }), at), na = ee(F({
233
+ }), rt), da = X(N({
212
234
  name: "DshTree",
213
235
  inheritAttrs: !1,
214
236
  setup(e, { attrs: t, slots: a, expose: l }) {
215
- const n = j();
237
+ const n = W();
216
238
  return l(new Proxy({}, {
217
- get: (o, r) => {
218
- var s;
219
- return (s = n.value) == null ? void 0 : s[r];
239
+ get: (r, o) => {
240
+ var i;
241
+ return (i = n.value) == null ? void 0 : i[o];
220
242
  },
221
- has: (o, r) => n.value !== void 0 && r in n.value
222
- })), () => m(nt, { ...t, ref: n }, { ...a, extra: (o) => {
223
- var r;
243
+ has: (r, o) => n.value !== void 0 && o in n.value
244
+ })), () => m(ot, { ...t, ref: n }, { ...a, extra: (r) => {
245
+ var o;
224
246
  return [
225
- ...((r = a.extra) == null ? void 0 : r.call(a, o)) ?? [],
247
+ ...((o = a.extra) == null ? void 0 : o.call(a, r)) ?? [],
226
248
  m("svg", { class: "dsh-tree-half-indicator", style: { display: "none" }, "aria-hidden": !0, viewBox: "0 0 24 24", width: 12, height: 12, fill: "none", stroke: "currentColor", "stroke-width": 3, "stroke-linecap": "round" }, [m("line", { x1: 21, x2: 3, y1: 12, y2: 12 })])
227
249
  ];
228
250
  } });
229
251
  }
230
- }), nt), Be = /* @__PURE__ */ new WeakMap();
231
- function ra(e) {
232
- let t = Be.get(e);
233
- t || (t = { users: 0, stop: oa(e) }, Be.set(e, t));
252
+ }), ot), Fe = /* @__PURE__ */ new WeakMap();
253
+ function fa(e) {
254
+ let t = Fe.get(e);
255
+ t || (t = { users: 0, stop: ha(e) }, Fe.set(e, t));
234
256
  const a = t;
235
257
  return a.users++, () => {
236
- a.users--, a.users === 0 && (a.stop(), Be.delete(e));
258
+ a.users--, a.users === 0 && (a.stop(), Fe.delete(e));
237
259
  };
238
260
  }
239
- function oa(e) {
261
+ function ha(e) {
240
262
  const t = ".dsh-toast-region,.arco-message-wrapper,.arco-notification-wrapper", a = ".dsh-toast,.arco-message,.arco-notification", l = /* @__PURE__ */ new Set();
241
263
  let n = 0;
242
- const o = () => {
243
- n || (n = requestAnimationFrame(u));
244
- }, r = new ResizeObserver(o), s = (i, x, w) => {
245
- i.style.getPropertyValue(x) !== w && i.style.setProperty(x, w);
246
- }, u = () => {
247
- var x;
264
+ const r = () => {
265
+ n || (n = requestAnimationFrame(s));
266
+ }, o = new ResizeObserver(r), i = (f, h, A) => {
267
+ f.style.getPropertyValue(h) !== A && f.style.setProperty(h, A);
268
+ }, s = () => {
269
+ var h;
248
270
  n = 0;
249
- const i = /* @__PURE__ */ new Set();
250
- for (const w of e.querySelectorAll(t)) {
251
- const _ = Array.from(w.querySelectorAll(a)).reverse(), d = _.filter((Y) => {
252
- var I;
253
- return Y.style.opacity !== "0" && !Y.classList.contains("dsh-toast-slide-leave-active") && !((I = Y.parentElement) != null && I.className.includes("-exit"));
254
- }), v = d.length > 1 && (w.matches(":hover") || w.contains(document.activeElement));
255
- w.dataset.dshToastStack = String(d.length), w.dataset.dshToastDirection = w.className.includes("bottom") || (x = w.dataset.position) != null && x.startsWith("bottom") ? "bottom" : "top";
256
- let O = 0, A = 0;
257
- for (const [Y, I] of d.entries()) {
258
- const T = getComputedStyle(I), f = Array.from(I.children).filter((P) => !P.className.toString().includes("close")), M = I.style.height ? parseFloat(T.height) : Math.max(0, ...f.map((P) => P.offsetHeight)) + parseFloat(T.paddingTop) + parseFloat(T.paddingBottom) + parseFloat(T.borderTopWidth) + parseFloat(T.borderBottomWidth);
259
- Y === 0 && (A = M), s(I, "--dsh-toast-index", String(Y)), s(I, "--dsh-toast-offset", `${O}px`), s(I, "--dsh-toast-height", `${M}px`), s(I, "--dsh-toast-front-height", `${A}px`), s(I, "--dsh-toast-layer", String(d.length - Y)), I.dataset.dshToastIndex = String(Y), I.toggleAttribute("inert", Y >= 3), I.setAttribute("aria-hidden", String(Y >= 3));
260
- const p = I.querySelector(":scope > .arco-message-close-btn,:scope > .arco-notification-close-btn");
261
- p && (p.setAttribute("role", "button"), p.setAttribute("aria-label", "关闭通知"), p.tabIndex = Y < 3 && (Y === 0 || v) ? 0 : -1);
262
- const C = I.matches(".dsh-toast") ? I : I.parentElement;
263
- C && (C.dataset.dshToastItem = "");
264
- for (const P of f)
265
- i.add(P), l.has(P) || r.observe(P);
266
- O += M + 12;
271
+ const f = /* @__PURE__ */ new Set();
272
+ for (const A of e.querySelectorAll(t)) {
273
+ const T = Array.from(A.querySelectorAll(a)).reverse(), d = T.filter((P) => {
274
+ var Y;
275
+ return P.style.opacity !== "0" && !P.classList.contains("dsh-toast-slide-leave-active") && !((Y = P.parentElement) != null && Y.className.includes("-exit"));
276
+ }), w = d.length > 1 && (A.matches(":hover") || A.contains(document.activeElement));
277
+ A.dataset.dshToastStack = String(d.length), A.dataset.dshToastDirection = A.className.includes("bottom") || (h = A.dataset.position) != null && h.startsWith("bottom") ? "bottom" : "top";
278
+ let C = 0, b = 0;
279
+ for (const [P, Y] of d.entries()) {
280
+ const L = getComputedStyle(Y), x = Array.from(Y.children).filter((D) => !D.className.toString().includes("close")), M = Y.style.height ? parseFloat(L.height) : Math.max(0, ...x.map((D) => D.offsetHeight)) + parseFloat(L.paddingTop) + parseFloat(L.paddingBottom) + parseFloat(L.borderTopWidth) + parseFloat(L.borderBottomWidth);
281
+ P === 0 && (b = M), i(Y, "--dsh-toast-index", String(P)), i(Y, "--dsh-toast-offset", `${C}px`), i(Y, "--dsh-toast-height", `${M}px`), i(Y, "--dsh-toast-front-height", `${b}px`), i(Y, "--dsh-toast-layer", String(d.length - P)), Y.dataset.dshToastIndex = String(P), Y.toggleAttribute("inert", P >= 3), Y.setAttribute("aria-hidden", String(P >= 3));
282
+ const $ = Y.querySelector(":scope > .arco-message-close-btn,:scope > .arco-notification-close-btn");
283
+ $ && ($.setAttribute("role", "button"), $.setAttribute("aria-label", "关闭通知"), $.tabIndex = P < 3 && (P === 0 || w) ? 0 : -1);
284
+ const u = Y.matches(".dsh-toast") ? Y : Y.parentElement;
285
+ u && (u.dataset.dshToastItem = "");
286
+ for (const D of x)
287
+ f.add(D), l.has(D) || o.observe(D);
288
+ C += M + 12;
267
289
  }
268
- for (const Y of _.filter((I) => !d.includes(I)))
269
- Y.dataset.dshToastIndex = "exiting";
270
- s(w, "--dsh-toast-front-height", `${A}px`);
290
+ for (const P of T.filter((Y) => !d.includes(Y)))
291
+ P.dataset.dshToastIndex = "exiting";
292
+ i(A, "--dsh-toast-front-height", `${b}px`);
271
293
  }
272
- for (const w of l)
273
- i.has(w) || r.unobserve(w);
274
- l.clear(), i.forEach((w) => l.add(w));
275
- }, h = new MutationObserver(o);
276
- h.observe(e, { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] });
277
- const c = (i) => {
278
- const x = i.target;
279
- !i.defaultPrevented && x instanceof HTMLElement && x.matches(".arco-message-close-btn,.arco-notification-close-btn") && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), x.click());
280
- }, S = ["pointerover", "pointerout", "focusin", "focusout"];
281
- return S.forEach((i) => e.addEventListener(i, o)), e.addEventListener("keydown", c), u(), () => {
282
- h.disconnect(), r.disconnect(), cancelAnimationFrame(n), S.forEach((i) => e.removeEventListener(i, o)), e.removeEventListener("keydown", c);
294
+ for (const A of l)
295
+ f.has(A) || o.unobserve(A);
296
+ l.clear(), f.forEach((A) => l.add(A));
297
+ }, c = new MutationObserver(r);
298
+ c.observe(e, { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] });
299
+ const v = (f) => {
300
+ const h = f.target;
301
+ !f.defaultPrevented && h instanceof HTMLElement && h.matches(".arco-message-close-btn,.arco-notification-close-btn") && (f.key === "Enter" || f.key === " ") && (f.preventDefault(), h.click());
302
+ }, g = ["pointerover", "pointerout", "focusin", "focusout"];
303
+ return g.forEach((f) => e.addEventListener(f, r)), e.addEventListener("keydown", v), s(), () => {
304
+ c.disconnect(), o.disconnect(), cancelAnimationFrame(n), g.forEach((f) => e.removeEventListener(f, r)), e.removeEventListener("keydown", v);
283
305
  };
284
306
  }
285
- const je = Symbol("dsh-theme");
286
- function se() {
287
- const e = Se(je);
307
+ const Ke = Symbol("dsh-theme");
308
+ function ue() {
309
+ const e = me(Ke);
288
310
  if (!e)
289
311
  throw new Error("DSH 浮层组件必须在 DshProvider 内使用");
290
312
  return e;
291
313
  }
292
- function la(e) {
293
- ct(je, { ...se(), container: e });
314
+ function ma(e) {
315
+ We(Ke, { ...ue(), container: e });
294
316
  }
295
- const Ua = F({
317
+ const an = N({
296
318
  name: "DshProvider",
297
319
  inheritAttrs: !1,
298
320
  props: {
@@ -301,157 +323,161 @@ const Ua = F({
301
323
  overlayRadius: [Number, String],
302
324
  radius: { type: String, default: "md" },
303
325
  reducedMotion: { type: Boolean, default: void 0 },
304
- locale: rt.props.locale,
326
+ locale: lt.props.locale,
305
327
  rtl: Boolean
306
328
  },
307
329
  setup(e, { attrs: t, slots: a }) {
308
- const l = j(), n = j(), o = q("light"), r = q(!1), s = q(!1), u = J(() => e.theme === "auto" ? o.value : e.theme), h = J(() => e.reducedMotion ?? s.value ? "reduced" : "full"), c = De([]), S = De([]), i = /* @__PURE__ */ new Map();
309
- let x = 0, w = !1, _;
310
- const d = (f) => {
311
- var p;
312
- clearTimeout(i.get(f)), i.delete(f);
313
- const M = c.findIndex((C) => C.internalId === f);
314
- if (M >= 0) {
315
- const C = c.splice(M, 1)[0];
316
- (p = C == null ? void 0 : C.onClose) == null || p.call(C, C.id ?? f);
330
+ const l = W(), n = W(), r = j(!1), o = j("light"), i = j(!1), s = j(!1), c = Z(() => e.theme === "auto" ? o.value : e.theme), v = Z(() => e.reducedMotion ?? s.value ? "reduced" : "full"), g = Me([]), f = Me([]), h = /* @__PURE__ */ new Map();
331
+ let A = 0, T = !1, d;
332
+ const w = (M) => {
333
+ var u;
334
+ clearTimeout(h.get(M)), h.delete(M);
335
+ const $ = g.findIndex((D) => D.internalId === M);
336
+ if ($ >= 0) {
337
+ const D = g.splice($, 1)[0];
338
+ (u = D == null ? void 0 : D.onClose) == null || u.call(D, D.id ?? M);
317
339
  }
318
- }, v = (f) => {
319
- if (clearTimeout(i.get(f.internalId)), !n.value)
340
+ }, C = (M) => {
341
+ if (clearTimeout(h.get(M.internalId)), !n.value)
320
342
  return;
321
- const M = f.duration ?? 4e3;
322
- M > 0 && i.set(f.internalId, setTimeout(() => d(f.internalId), M));
323
- }, O = (f) => {
324
- if (w)
343
+ const $ = M.duration ?? 3e3;
344
+ $ > 0 && h.set(M.internalId, setTimeout(() => w(M.internalId), $));
345
+ }, b = (M) => {
346
+ if (T)
325
347
  throw new Error("DshProvider 已卸载,无法显示消息");
326
- const M = typeof f == "string" ? { content: f } : f, p = M.id === void 0 ? void 0 : c.find((P) => P.id === M.id && P.kind === M.kind);
327
- if (p) {
328
- const P = { ...p, ...M };
329
- return c[c.indexOf(p)] = P, v(P), { close: () => d(p.internalId) };
348
+ const $ = typeof M == "string" ? { content: M } : M, u = $.id === void 0 ? void 0 : g.find((I) => I.id === $.id && I.kind === $.kind);
349
+ if (u) {
350
+ const I = { ...u, ...$ };
351
+ return g[g.indexOf(u)] = I, C(I), { close: () => w(u.internalId) };
330
352
  }
331
- const C = { ...M, internalId: ++x };
332
- return c.push(C), v(C), { close: () => d(C.internalId) };
333
- }, A = (f) => (M) => O({ ...typeof M == "string" ? { content: M } : M, type: f }), Y = {
334
- show: O,
335
- info: A("info"),
336
- success: A("success"),
337
- warning: A("warning"),
338
- error: A("error"),
339
- clear: (f, M) => [...c].filter(
340
- (p) => (f === void 0 || (p.position ?? "top") === f) && (M === void 0 || p.kind === M)
341
- ).forEach((p) => d(p.internalId)),
342
- remove: (f, M) => [...c].filter((p) => p.id === f && (M === void 0 || p.kind === M)).forEach((p) => d(p.internalId))
353
+ const D = { ...$, internalId: ++A };
354
+ return g.push(D), C(D), { close: () => w(D.internalId) };
355
+ }, P = (M) => ($) => b({ ...typeof $ == "string" ? { content: $ } : $, type: M }), Y = {
356
+ show: b,
357
+ info: P("info"),
358
+ success: P("success"),
359
+ warning: P("warning"),
360
+ error: P("error"),
361
+ clear: (M, $) => [...g].filter(
362
+ (u) => (M === void 0 || (u.position ?? "top") === M) && ($ === void 0 || u.kind === $)
363
+ ).forEach((u) => w(u.internalId)),
364
+ remove: (M, $) => [...g].filter((u) => u.id === M && ($ === void 0 || u.kind === $)).forEach((u) => w(u.internalId))
343
365
  };
344
- ct(je, { container: n, toast: Y, mountOverlay: (f) => {
345
- if (w)
366
+ We(Ke, { container: n, toast: Y, mountOverlay: (M) => {
367
+ if (T)
346
368
  throw new Error("DshProvider 已卸载,无法打开浮层");
347
- const M = { id: ++x, content: f };
348
- return S.push(M), () => {
349
- const p = S.indexOf(M);
350
- p >= 0 && S.splice(p, 1);
369
+ const $ = { id: ++A, content: M };
370
+ return f.push($), () => {
371
+ const u = f.indexOf($);
372
+ u >= 0 && f.splice(u, 1);
351
373
  };
352
- }, locale: J(() => {
353
- var f;
354
- return ((f = e.locale) == null ? void 0 : f.locale) ?? "zh-CN";
355
- }) });
356
- const T = () => {
357
- const f = n.value;
358
- if (!f || !l.value)
374
+ }, locale: Z(() => {
375
+ var M;
376
+ return ((M = e.locale) == null ? void 0 : M.locale) ?? "zh-CN";
377
+ }), rtl: Z(() => e.rtl) });
378
+ const x = () => {
379
+ const M = n.value;
380
+ if (!M || !l.value)
359
381
  return;
360
- f.className = "dsh-ui dsh-ui-portal", f.dataset.theme = u.value, f.dataset.radius = e.radius, f.dataset.motion = h.value, f.dataset.hostTheme = String(e.theme === "auto" && r.value), e.overlayInset !== void 0 || e.overlayRadius !== void 0 ? f.dataset.overlayFrame = "" : delete f.dataset.overlayFrame, f.dir = e.rtl ? "rtl" : "ltr", f.removeAttribute("style");
361
- const p = getComputedStyle(l.value);
362
- for (let C = 0; C < p.length; C++) {
363
- const P = p.item(C);
364
- P.startsWith("--") && f.style.setProperty(P, p.getPropertyValue(P));
382
+ M.className = "dsh-ui dsh-ui-portal", M.dataset.theme = c.value, M.dataset.radius = e.radius, M.dataset.motion = v.value, M.dataset.hostTheme = String(e.theme === "auto" && i.value), e.overlayInset !== void 0 || e.overlayRadius !== void 0 ? M.dataset.overlayFrame = "" : delete M.dataset.overlayFrame, M.dir = e.rtl ? "rtl" : "ltr", M.removeAttribute("style");
383
+ const u = getComputedStyle(l.value);
384
+ for (let D = 0; D < u.length; D++) {
385
+ const I = u.item(D);
386
+ I.startsWith("--") && M.style.setProperty(I, u.getPropertyValue(I));
365
387
  }
366
- for (const [C, P] of [["inset", e.overlayInset], ["radius", e.overlayRadius]])
367
- P !== void 0 && f.style.setProperty("--dsh-overlay-" + C, typeof P == "number" ? P + "px" : P);
388
+ for (const [D, I] of [["inset", e.overlayInset], ["radius", e.overlayRadius]])
389
+ I !== void 0 && M.style.setProperty("--dsh-overlay-" + D, typeof I == "number" ? I + "px" : I);
368
390
  };
369
- return he(() => {
370
- const f = document.createElement("div");
371
- f.className = "dsh-ui dsh-ui-portal", document.body.appendChild(f), n.value = f;
372
- const M = ra(f);
373
- c.forEach(v);
374
- const p = window.matchMedia("(prefers-color-scheme: dark)"), C = window.matchMedia("(prefers-reduced-motion: reduce)"), P = () => {
375
- const V = document.body.getAttribute("data-ds-dark-theme"), b = document.body.getAttribute("arco-theme");
376
- r.value = V !== null, o.value = V !== null ? V === "false" || V === "0" ? "light" : "dark" : b !== null ? b === "dark" ? "dark" : "light" : p.matches ? "dark" : "light", s.value = C.matches, re(T);
377
- }, $ = new MutationObserver(P);
378
- $.observe(document.body, { attributes: !0, attributeFilter: ["data-ds-dark-theme", "arco-theme", "style", "class"] }), p.addEventListener("change", P), C.addEventListener("change", P), _ = () => {
379
- M(), $.disconnect(), p.removeEventListener("change", P), C.removeEventListener("change", P);
380
- }, P();
381
- }), le([u, h, () => e.radius, () => e.rtl, () => e.overlayInset, () => e.overlayRadius], T, { flush: "post" }), ke(T), ve(() => {
382
- var f;
383
- w = !0, _ == null || _();
384
- for (const M of i.values())
385
- clearTimeout(M);
386
- i.clear(), (f = n.value) == null || f.remove(), n.value = void 0;
387
- }), () => m(rt, { locale: e.locale, rtl: e.rtl, updateAtScroll: !0, global: !1 }, {
391
+ return Gt(() => {
392
+ const M = document.createElement("div");
393
+ M.className = "dsh-ui dsh-ui-portal", document.body.appendChild(M), n.value = M;
394
+ }), ve(() => {
395
+ r.value = !0;
396
+ const M = fa(n.value);
397
+ g.forEach(C);
398
+ const $ = window.matchMedia("(prefers-color-scheme: dark)"), u = window.matchMedia("(prefers-reduced-motion: reduce)"), D = () => {
399
+ const B = document.body.getAttribute("data-ds-dark-theme"), p = document.body.getAttribute("arco-theme");
400
+ i.value = B !== null, o.value = B !== null ? B === "false" || B === "0" ? "light" : "dark" : p !== null ? p === "dark" ? "dark" : "light" : $.matches ? "dark" : "light", s.value = u.matches, se(x);
401
+ }, I = new MutationObserver(D);
402
+ for (let B = l.value ?? null; B; B = B.parentElement)
403
+ I.observe(B, { attributes: !0 });
404
+ $.addEventListener("change", D), u.addEventListener("change", D), d = () => {
405
+ M(), I.disconnect(), $.removeEventListener("change", D), u.removeEventListener("change", D);
406
+ }, D();
407
+ }), le([c, v, () => e.radius, () => e.rtl, () => e.overlayInset, () => e.overlayRadius], x, { flush: "post" }), Ae(x), pe(() => {
408
+ var M;
409
+ T = !0, d == null || d();
410
+ for (const $ of h.values())
411
+ clearTimeout($);
412
+ h.clear(), (M = n.value) == null || M.remove(), n.value = void 0;
413
+ }), () => m(lt, { locale: e.locale, rtl: e.rtl, updateAtScroll: !0, global: !1 }, {
388
414
  default: () => {
389
- var f;
415
+ var M;
390
416
  return [
391
417
  m("div", {
392
418
  ...t,
393
419
  ref: l,
394
420
  class: ["dsh-ui", t.class],
395
- "data-theme": u.value,
421
+ "data-theme": c.value,
396
422
  "data-radius": e.radius,
397
- "data-motion": h.value,
398
- "data-host-theme": String(e.theme === "auto" && r.value),
423
+ "data-motion": v.value,
424
+ "data-host-theme": String(e.theme === "auto" && i.value),
399
425
  dir: e.rtl ? "rtl" : "ltr"
400
- }, (f = a.default) == null ? void 0 : f.call(a)),
401
- ...S.map((M) => m("div", { key: M.id, style: { display: "contents" } }, [M.content()])),
402
- n.value ? m(
403
- dt,
426
+ }, (M = a.default) == null ? void 0 : M.call(a)),
427
+ ...f.map(($) => m("div", { key: $.id, style: { display: "contents" } }, [$.content()])),
428
+ r.value && n.value ? m(
429
+ ft,
404
430
  { to: n.value },
405
- ["top", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight"].map((M) => m(Rt, {
431
+ ["top", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight"].map(($) => m(Zt, {
406
432
  tag: "div",
407
433
  name: "dsh-toast-slide",
408
434
  class: "dsh-toast-region",
409
- "data-position": M,
435
+ "data-position": $,
410
436
  "aria-label": "通知",
411
437
  style: {
412
- top: M.startsWith("top") ? "calc(16px + var(--dsh-overlay-inset, 0px))" : "auto",
413
- bottom: M.startsWith("bottom") ? "calc(16px + var(--dsh-overlay-inset, 0px))" : "auto",
414
- left: M.endsWith("Left") ? "calc(16px + var(--dsh-overlay-inset, 0px))" : M.endsWith("Right") ? "auto" : "50%",
415
- right: M.endsWith("Right") ? "calc(16px + var(--dsh-overlay-inset, 0px))" : "auto",
416
- transform: M.endsWith("Left") || M.endsWith("Right") ? "none" : "translateX(-50%)"
438
+ top: $.startsWith("top") ? "calc(16px + var(--dsh-overlay-inset, 0px))" : "auto",
439
+ bottom: $.startsWith("bottom") ? "calc(16px + var(--dsh-overlay-inset, 0px))" : "auto",
440
+ left: $.endsWith("Left") ? "calc(16px + var(--dsh-overlay-inset, 0px))" : $.endsWith("Right") ? "auto" : "50%",
441
+ right: $.endsWith("Right") ? "calc(16px + var(--dsh-overlay-inset, 0px))" : "auto",
442
+ transform: $.endsWith("Left") || $.endsWith("Right") ? "none" : "translateX(-50%)"
417
443
  }
418
- }, { default: () => c.filter((p) => (p.position ?? "top") === M).map(
419
- (p) => {
420
- var C;
444
+ }, { default: () => g.filter((u) => (u.position ?? "top") === $).map(
445
+ (u) => {
446
+ var D;
421
447
  return m("div", {
422
- key: p.internalId,
423
- class: ["dsh-toast", p.class],
424
- "data-type": p.type ?? "info",
425
- style: p.style,
426
- role: p.type === "error" ? "alert" : "status",
448
+ key: u.internalId,
449
+ class: ["dsh-toast", u.class],
450
+ "data-type": u.type ?? "info",
451
+ style: u.style,
452
+ role: u.type === "error" ? "alert" : "status",
427
453
  onMouseenter: () => {
428
- p.resetOnHover !== !1 && clearTimeout(i.get(p.internalId));
454
+ u.resetOnHover !== !1 && clearTimeout(h.get(u.internalId));
429
455
  },
430
456
  onMouseleave: () => {
431
- p.resetOnHover !== !1 && v(p);
457
+ u.resetOnHover !== !1 && C(u);
432
458
  },
433
- onFocusin: () => clearTimeout(i.get(p.internalId)),
434
- onFocusout: () => v(p)
459
+ onFocusin: () => clearTimeout(h.get(u.internalId)),
460
+ onFocusout: () => C(u)
435
461
  }, [
436
- p.showIcon ?? p.type !== "normal" ? m("div", { class: "dsh-toast-indicator", "aria-hidden": !0 }, [
437
- p.icon ? p.icon() : p.type === "loading" ? m(Ae, { size: 16 }) : m("svg", { class: "dsh-toast-default-icon", viewBox: "0 0 16 16", fill: "none" }, m("path", {
438
- d: de[p.type && p.type in de ? p.type : "info"],
462
+ u.showIcon ?? u.type !== "normal" ? m("div", { class: "dsh-toast-indicator", "aria-hidden": !0 }, [
463
+ u.icon ? u.icon() : u.type === "loading" ? m(Ce, { size: 16 }) : m("svg", { class: "dsh-toast-default-icon", viewBox: "0 0 16 16", fill: "none" }, m("path", {
464
+ d: he[u.type && u.type in he ? u.type : "info"],
439
465
  fill: "currentColor",
440
466
  "fill-rule": "evenodd",
441
467
  "clip-rule": "evenodd"
442
468
  }))
443
469
  ]) : null,
444
470
  m("div", { class: "dsh-toast-content" }, [
445
- p.title ? m("div", { class: "dsh-toast-title" }, [typeof p.title == "function" ? p.title() : p.title]) : null,
446
- m("div", { class: p.title ? "dsh-toast-description" : "dsh-toast-title" }, [typeof p.content == "function" ? p.content() : p.content]),
447
- (C = p.footer) == null ? void 0 : C.call(p)
471
+ u.title ? m("div", { class: "dsh-toast-title" }, [typeof u.title == "function" ? u.title() : u.title]) : null,
472
+ m("div", { class: u.title ? "dsh-toast-description" : "dsh-toast-title" }, [typeof u.content == "function" ? u.content() : u.content]),
473
+ (D = u.footer) == null ? void 0 : D.call(u)
448
474
  ]),
449
- p.closable !== !1 ? m("button", {
475
+ u.closable !== !1 ? m("button", {
450
476
  type: "button",
451
477
  class: "dsh-toast-close",
452
478
  "aria-label": "关闭通知",
453
- onClick: () => d(p.internalId)
454
- }, [p.closeIconElement ?? p.closeIcon ? (p.closeIconElement ?? p.closeIcon)() : m("svg", { class: "dsh-toast-default-close-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0 }, m("path", {
479
+ onClick: () => w(u.internalId)
480
+ }, [u.closeIconElement ?? u.closeIcon ? (u.closeIconElement ?? u.closeIcon)() : m("svg", { class: "dsh-toast-default-close-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0 }, m("path", {
455
481
  d: "M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z",
456
482
  fill: "currentColor",
457
483
  "fill-rule": "evenodd",
@@ -465,73 +491,78 @@ const Ua = F({
465
491
  }
466
492
  });
467
493
  }
468
- }), He = /* @__PURE__ */ new Map();
494
+ }), je = /* @__PURE__ */ new Map();
469
495
  function U(e, t, a) {
470
- const l = F({
496
+ const l = N({
471
497
  name: `Dsh${t}`,
472
498
  inheritAttrs: !1,
473
- setup(o, { attrs: r, slots: s, expose: u }) {
474
- const { container: h, locale: c } = se(), S = j(r.defaultValue ?? r["default-value"]), i = q(""), x = j(), w = j(), _ = q(!!(r.defaultPopupVisible ?? r["default-popup-visible"])), d = j();
475
- return u(new Proxy({}, {
476
- get: (v, O) => {
477
- var A;
478
- return (A = x.value) == null ? void 0 : A[O];
499
+ setup(r, { attrs: o, slots: i, expose: s }) {
500
+ const { container: c, locale: v } = ue(), g = W(o.defaultValue ?? o["default-value"]), f = j(""), h = W();
501
+ let A;
502
+ function T(b) {
503
+ var Y;
504
+ const P = b.el instanceof HTMLElement ? b.el : (Y = b.el) == null ? void 0 : Y.nextElementSibling;
505
+ P instanceof HTMLElement && (A == null || A.removeAttribute("id"), A = void 0, !(typeof o.id != "string" || !o.id) && (A = P.querySelector('input:not([type="hidden"])') ?? P, A.id = o.id));
506
+ }
507
+ const d = W(), w = j(!!(o.defaultPopupVisible ?? o["default-popup-visible"])), C = W();
508
+ return s(new Proxy({}, {
509
+ get: (b, P) => {
510
+ var Y;
511
+ return (Y = h.value) == null ? void 0 : Y[P];
479
512
  },
480
- has: (v, O) => x.value !== void 0 && O in x.value
513
+ has: (b, P) => h.value !== void 0 && P in h.value
481
514
  })), () => {
482
- var P;
483
- if (!h.value)
484
- return null;
485
- const v = { ...r };
486
- if (t === "Menu") {
487
- const $ = r.itemWidth ?? r["item-width"];
488
- v.class = [r.class, { "dsh-menu--centered": r.centered === !0 || r.centered === "" }], v.style = [r.style, typeof $ == "string" || typeof $ == "number" ? { "--dsh-menu-item-width": typeof $ == "number" ? $ + "px" : $ } : void 0], delete v.centered, delete v.itemWidth, delete v["item-width"];
515
+ var B;
516
+ const b = { ...o };
517
+ if (t === "Mention" && (o.type ?? "textarea") === "textarea" && (b.type = "textarea", b.class = ["dsh-mention", o.class], b.textareaAttrs = { rows: o.rows ?? 1, ...o.textareaAttrs ?? o["textarea-attrs"] }, delete b["textarea-attrs"]), t === "Tooltip" && (b.position = o.position ?? "bottom"), t === "Menu") {
518
+ const p = o.itemWidth ?? o["item-width"];
519
+ b.class = [o.class, { "dsh-menu--centered": o.centered === !0 || o.centered === "" }], b.style = [o.style, typeof p == "string" || typeof p == "number" ? { "--dsh-menu-item-width": typeof p == "number" ? p + "px" : p } : void 0], delete b.centered, delete b.itemWidth, delete b["item-width"];
489
520
  }
490
521
  if (t === "Popconfirm")
491
- for (const [$, V] of [["cancelButtonProps", "cancel-button-props"], ["okButtonProps", "ok-button-props"]])
492
- v[$] = { size: "small", ...r[$] ?? r[V] ?? {} }, delete v[V];
493
- if (["Select", "AutoComplete", "Cascader", "TreeSelect", "DatePicker", "RangePicker", "TimePicker", "ColorPicker"].includes(t) && (v.triggerProps = { popupOffset: 8, ...r.triggerProps ?? r["trigger-props"] ?? {} }, delete v["trigger-props"]), ["Tooltip", "Popover", "Dropdown", "Popconfirm"].includes(t)) {
494
- const $ = r.showArrow ?? r["show-arrow"], V = $ !== void 0 && $ !== !1;
495
- v.popupOffset = r.popupOffset ?? r["popup-offset"] ?? (t === "Tooltip" ? V ? 7 : 3 : 8), (t === "Tooltip" || t === "Popover" || t === "Popconfirm") && (v.showArrow = V, delete v["show-arrow"]);
522
+ for (const [p, y] of [["cancelButtonProps", "cancel-button-props"], ["okButtonProps", "ok-button-props"]])
523
+ b[p] = { size: "small", ...o[p] ?? o[y] ?? {} }, delete b[y];
524
+ if (["Select", "AutoComplete", "Cascader", "TreeSelect", "DatePicker", "RangePicker", "TimePicker", "ColorPicker"].includes(t) && (b.triggerProps = { popupOffset: 8, ...o.triggerProps ?? o["trigger-props"] ?? {} }, delete b["trigger-props"]), ["Tooltip", "Popover", "Dropdown", "Popconfirm"].includes(t)) {
525
+ const p = o.showArrow ?? o["show-arrow"], y = p !== void 0 && p !== !1;
526
+ b.popupOffset = o.popupOffset ?? o["popup-offset"] ?? (t === "Tooltip" ? y ? 7 : 3 : 8), (t === "Tooltip" || t === "Popover" || t === "Popconfirm") && (b.showArrow = y, delete b["show-arrow"]);
496
527
  }
497
- t === "Dsubmenu" && (v.popupOffset = r.popupOffset ?? r["popup-offset"] ?? 7);
498
- const O = a === "triggerProps" ? "trigger-props" : "preview-props", A = a ? v[a] ?? r[O] : void 0, Y = typeof A == "object" && A !== null ? { ...A } : {}, I = a ? Y.popupContainer ?? Y["popup-container"] : r.popupContainer ?? r["popup-container"];
499
- delete Y["popup-container"], delete v["popup-container"], a && delete v[O];
500
- const T = a ? { [a]: { ...Y, popupContainer: I ?? h.value } } : { popupContainer: I ?? h.value }, f = ["Tooltip", "Popover", "Popconfirm", "Dropdown", "Dsubmenu"].includes(t), M = r.alignPoint ?? r["align-point"];
501
- f && (M === void 0 || M === !1) && v.popupTranslate === void 0 && v["popup-translate"] === void 0 && I === void 0 && (v.popupTranslate = Object.defineProperties({}, Object.fromEntries(
502
- ["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"].map(($) => [$, { enumerable: !0, get() {
503
- var D, g, y;
504
- const V = t === "Dsubmenu" ? ((D = w.value) == null ? void 0 : D.closest(".arco-dropdown-option")) ?? (((g = x.value) == null ? void 0 : g.$el) instanceof Element ? x.value.$el : void 0) : w.value ?? (((y = x.value) == null ? void 0 : y.$el) instanceof Element ? x.value.$el : void 0), b = V == null ? void 0 : V.getBoundingClientRect();
505
- return b ? ["top", "tl", "tr"].includes($) ? [0, Math.ceil(b.top) - b.top] : ["bottom", "bl", "br"].includes($) ? [0, Math.floor(b.bottom) - b.bottom] : ["left", "lt", "lb"].includes($) ? [Math.ceil(b.left) - b.left, 0] : [Math.ceil(b.right) - b.right, 0] : [0, 0];
528
+ t === "Dsubmenu" && (b.popupOffset = o.popupOffset ?? o["popup-offset"] ?? 7);
529
+ const P = a === "triggerProps" ? "trigger-props" : "preview-props", Y = a ? b[a] ?? o[P] : void 0, L = typeof Y == "object" && Y !== null ? { ...Y } : {}, x = a ? L.popupContainer ?? L["popup-container"] : o.popupContainer ?? o["popup-container"];
530
+ delete L["popup-container"], delete b["popup-container"], a && delete b[P];
531
+ const M = a ? { [a]: { ...L, popupContainer: x ?? c.value } } : { popupContainer: x ?? c.value }, $ = ["Tooltip", "Popover", "Popconfirm", "Dropdown", "Dsubmenu"].includes(t), u = o.alignPoint ?? o["align-point"];
532
+ $ && (u === void 0 || u === !1) && b.popupTranslate === void 0 && b["popup-translate"] === void 0 && x === void 0 && (b.popupTranslate = Object.defineProperties({}, Object.fromEntries(
533
+ ["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"].map((p) => [p, { enumerable: !0, get() {
534
+ var V, k, O;
535
+ const y = t === "Dsubmenu" ? ((V = d.value) == null ? void 0 : V.closest(".arco-dropdown-option")) ?? (((k = h.value) == null ? void 0 : k.$el) instanceof Element ? h.value.$el : void 0) : d.value ?? (((O = h.value) == null ? void 0 : O.$el) instanceof Element ? h.value.$el : void 0), S = y == null ? void 0 : y.getBoundingClientRect();
536
+ return S ? ["top", "tl", "tr"].includes(p) ? [0, Math.ceil(S.top) - S.top] : ["bottom", "bl", "br"].includes(p) ? [0, Math.floor(S.bottom) - S.bottom] : ["left", "lt", "lb"].includes(p) ? [Math.ceil(S.left) - S.left, 0] : [Math.ceil(S.right) - S.right, 0] : [0, 0];
506
537
  } }])
507
538
  )));
508
- let p = f ? {
509
- ...s,
510
- default: (...$) => {
511
- var V;
512
- return (V = s.default) == null ? void 0 : V.call(s, ...$).map(function b(D) {
513
- if (D.type === Wt && Array.isArray(D.children)) {
514
- const g = Fe(D);
515
- return g.children = D.children.map((y) => ft(y) ? b(y) : y), g;
539
+ let D = $ ? {
540
+ ...i,
541
+ default: (...p) => {
542
+ var y;
543
+ return (y = i.default) == null ? void 0 : y.call(i, ...p).map(function S(V) {
544
+ if (V.type === Jt && Array.isArray(V.children)) {
545
+ const k = Re(V);
546
+ return k.children = V.children.map((O) => ht(O) ? S(O) : O), k;
516
547
  }
517
- return Fe(D, {
518
- ref: (g) => {
519
- var k;
520
- const y = g instanceof Element ? g : (g == null ? void 0 : g.$el) instanceof Element ? g.$el : void 0;
521
- y && (!((k = w.value) != null && k.isConnected) || y.compareDocumentPosition(w.value) & Node.DOCUMENT_POSITION_FOLLOWING) && (w.value = y);
548
+ return Re(V, {
549
+ ref: (k) => {
550
+ var _;
551
+ const O = k instanceof Element ? k : (k == null ? void 0 : k.$el) instanceof Element ? k.$el : void 0;
552
+ O && (!((_ = d.value) != null && _.isConnected) || O.compareDocumentPosition(d.value) & Node.DOCUMENT_POSITION_FOLLOWING) && (d.value = O);
522
553
  },
523
- ...["Popover", "Popconfirm"].includes(t) ? { class: { "dsh-popover-trigger-open": r.popupVisible ?? r["popup-visible"] ?? _.value } } : {}
554
+ ...["Popover", "Popconfirm"].includes(t) ? { class: { "dsh-popover-trigger-open": o.popupVisible ?? o["popup-visible"] ?? w.value } } : {}
524
555
  }, !0);
525
556
  });
526
557
  }
527
- } : s;
528
- if (t === "Popconfirm" && !s.icon && (r.type === void 0 || r.type === "info") && (p = { ...p, icon: () => [m("svg", { viewBox: "0 0 16 16", width: 16, height: 16, fill: "none", style: { color: "var(--accent)" }, "aria-hidden": !0 }, [m("path", { d: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z", fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd" })])] }), t === "Tooltip" && v.showArrow && !(r.arrowClass ?? r["arrow-class"])) {
529
- const $ = r.arrowStyle ?? r["arrow-style"], V = ($ == null ? void 0 : $.backgroundColor) ?? ($ == null ? void 0 : $.background) ?? r.backgroundColor ?? r["background-color"];
530
- p = { ...p, content: () => {
531
- var b;
558
+ } : i;
559
+ if (t === "Popconfirm" && !i.icon && (o.type === void 0 || o.type === "info") && (D = { ...D, icon: () => [m("svg", { viewBox: "0 0 16 16", width: 16, height: 16, fill: "none", style: { color: "var(--accent)" }, "aria-hidden": !0 }, [m("path", { d: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z", fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd" })])] }), t === "Tooltip" && b.showArrow && !(o.arrowClass ?? o["arrow-class"])) {
560
+ const p = o.arrowStyle ?? o["arrow-style"], y = (p == null ? void 0 : p.backgroundColor) ?? (p == null ? void 0 : p.background) ?? o.backgroundColor ?? o["background-color"];
561
+ D = { ...D, content: () => {
562
+ var S;
532
563
  return [
533
- ...((b = s.content) == null ? void 0 : b.call(s)) ?? [qt(String(r.content ?? ""))],
534
- m(dt, { to: d.value ?? h.value, disabled: !d.value }, [
564
+ ...((S = i.content) == null ? void 0 : S.call(i)) ?? [Qt(String(o.content ?? ""))],
565
+ m(ft, { to: C.value ?? c.value, disabled: !C.value }, [
535
566
  m("svg", {
536
567
  class: "dsh-tooltip-arrow",
537
568
  "aria-hidden": !0,
@@ -539,122 +570,122 @@ function U(e, t, a) {
539
570
  height: 12,
540
571
  viewBox: "0 0 12 12",
541
572
  fill: "none",
542
- style: { fill: V },
543
- onVnodeMounted: (D) => {
544
- re(() => {
545
- var y;
546
- const g = D.el;
547
- g.isConnected && (d.value = ((y = g.closest(".arco-trigger-popup-wrapper")) == null ? void 0 : y.querySelector(":scope > .arco-trigger-arrow")) ?? void 0);
573
+ style: { fill: y },
574
+ onVnodeMounted: (V) => {
575
+ se(() => {
576
+ var O;
577
+ const k = V.el;
578
+ k.isConnected && (C.value = ((O = k.closest(".arco-trigger-popup-wrapper")) == null ? void 0 : O.querySelector(":scope > .arco-trigger-arrow")) ?? void 0);
548
579
  });
549
580
  },
550
581
  onVnodeBeforeUnmount: () => {
551
- d.value = void 0;
582
+ C.value = void 0;
552
583
  }
553
584
  }, [m("path", { d: "M0 0C5.48483 8 6.5 8 12 0Z" })])
554
585
  ])
555
586
  ];
556
587
  } };
557
588
  }
558
- if (t === "Select" && (r.allowSearch ?? r["allow-search"]) !== void 0 && (r.allowSearch ?? r["allow-search"]) !== !1 && Array.isArray(r.options) && !s.header) {
559
- const $ = String(r.inputValue ?? r["input-value"] ?? i.value), V = r.filterOption ?? r["filter-option"];
560
- v.showHeaderOnEmpty = !0, v.fallbackOption = !1, v.placeholder = r.placeholder ?? "Select an item", v.allowSearch = !1, delete v["allow-search"], v.inputValue = void 0, delete v["input-value"], v.options = V === !1 ? r.options : r.options.filter((b) => typeof V == "function" ? V($, b) : String(b.label ?? b.value ?? b).toLocaleLowerCase().includes($.toLocaleLowerCase())), p = { ...p, header: () => [m("div", { class: "dsh-select-search" }, m("div", { class: "dsh-select-search__group" }, m("input", {
589
+ if (t === "Select" && (o.allowSearch ?? o["allow-search"]) !== void 0 && (o.allowSearch ?? o["allow-search"]) !== !1 && Array.isArray(o.options) && !i.header) {
590
+ const p = String(o.inputValue ?? o["input-value"] ?? f.value);
591
+ b.showHeaderOnEmpty = !0, b.placeholder = o.placeholder ?? "Select an item", b.allowSearch = !1, delete b["allow-search"], b.inputValue = p, delete b["input-value"], D = { ...D, header: () => [m("div", { class: "dsh-select-search" }, m("div", { class: "dsh-select-search__group" }, m("input", {
561
592
  type: "search",
562
593
  "aria-label": "搜索",
563
- value: $,
564
- autofocus: v.options.length > 0,
565
- onInput(b) {
566
- const D = b.target.value;
567
- i.value = D;
568
- for (const g of ["onUpdate:inputValue", "onInputValueChange", "onSearch"]) {
569
- const y = r[g];
570
- for (const k of Array.isArray(y) ? y : [y])
571
- typeof k == "function" && k(D);
594
+ value: p,
595
+ autofocus: !0,
596
+ onInput(y) {
597
+ const S = y.target.value;
598
+ f.value = S;
599
+ for (const V of ["onUpdate:inputValue", "onInputValueChange", "onSearch"]) {
600
+ const k = o[V];
601
+ for (const O of Array.isArray(k) ? k : [k])
602
+ typeof O == "function" && O(S);
572
603
  }
573
604
  },
574
- onKeydown(b) {
575
- var D, g;
576
- ["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(b.key) && (b.preventDefault(), (g = (D = x.value) == null ? void 0 : D.$el) == null || g.dispatchEvent(new KeyboardEvent("keydown", { key: b.key, bubbles: !0 })));
605
+ onKeydown(y) {
606
+ var S, V;
607
+ ["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(y.key) && (y.preventDefault(), (V = (S = h.value) == null ? void 0 : S.$el) == null || V.dispatchEvent(new KeyboardEvent("keydown", { key: y.key, bubbles: !0 })));
577
608
  }
578
609
  })))] };
579
610
  }
580
- if (t === "Select" && r.multiple && !s.label && !r.formatLabel && !r["format-label"]) {
581
- const $ = r.modelValue ?? r["model-value"] ?? S.value ?? [], b = new Intl.ListFormat(c.value).formatToParts($.map((g, y) => String(y))).filter((g) => g.type === "literal").map((g) => g.value);
582
- p = { ...p, label: ({ data: g }) => {
583
- const y = $.findIndex((k) => (typeof k == "object" && k ? k.value : k) === g.value);
584
- return [m("span", { class: "dsh-select-summary" }, [g.label ?? String(g.value), b[y] ?? ""])];
611
+ if (t === "Select" && (o.multiple === "" || o.multiple === !0) && !i.label && !o.formatLabel && !o["format-label"]) {
612
+ const p = o.modelValue ?? o["model-value"] ?? g.value ?? [], S = new Intl.ListFormat(v.value).formatToParts(p.map((k, O) => String(O))).filter((k) => k.type === "literal").map((k) => k.value);
613
+ D = { ...D, label: ({ data: k }) => {
614
+ const O = p.findIndex((_) => (typeof _ == "object" && _ ? _.value : _) === k.value);
615
+ return [m("span", { class: "dsh-select-summary" }, [k.label ?? String(k.value), S[O] ?? ""])];
585
616
  } };
586
- const D = r.onChange;
587
- v.onChange = (g, ...y) => {
588
- S.value = g;
589
- for (const k of Array.isArray(D) ? D : [D])
590
- typeof k == "function" && k(g, ...y);
617
+ const V = o.onChange;
618
+ b.onChange = (k, ...O) => {
619
+ g.value = k;
620
+ for (const _ of Array.isArray(V) ? V : [V])
621
+ typeof _ == "function" && _(k, ...O);
591
622
  };
592
623
  }
593
624
  if (t === "AutoComplete") {
594
- const $ = ((P = v.triggerProps) == null ? void 0 : P.popupVisible) ?? _.value;
595
- p = {
596
- ...p,
597
- ...s.suffix ? {} : { suffix: () => [m("span", { class: ["dsh-combobox-indicator", { "dsh-combobox-indicator--open": $ }], "aria-hidden": !0 })] },
598
- ...Array.isArray(r.data) && !r.data.length && !s.footer ? { footer: () => {
599
- var V;
600
- return [m("div", { class: "dsh-autocomplete-empty" }, m("span", { class: "dsh-autocomplete-empty__text" }, ((V = s.empty) == null ? void 0 : V.call(s)) ?? (c.value.startsWith("zh") ? "无结果" : "No results found")))];
625
+ const p = ((B = b.triggerProps) == null ? void 0 : B.popupVisible) ?? w.value;
626
+ D = {
627
+ ...D,
628
+ ...i.suffix ? {} : { suffix: () => [m("span", { class: ["dsh-combobox-indicator", { "dsh-combobox-indicator--open": p }], "aria-hidden": !0 })] },
629
+ ...Array.isArray(o.data) && !o.data.length && !i.footer ? { footer: () => {
630
+ var y;
631
+ return [m("div", { class: "dsh-autocomplete-empty" }, m("span", { class: "dsh-autocomplete-empty__text" }, ((y = i.empty) == null ? void 0 : y.call(i)) ?? (v.value.startsWith("zh") ? "无结果" : "No results found")))];
601
632
  } } : {}
602
633
  };
603
634
  }
604
- const C = ["Popover", "Popconfirm", "AutoComplete"].includes(t) ? {
605
- onPopupVisibleChange($) {
606
- _.value = $;
607
- const V = r.onPopupVisibleChange;
608
- Array.isArray(V) ? V.forEach((b) => {
609
- typeof b == "function" && b($);
610
- }) : typeof V == "function" && V($);
635
+ const I = ["Popover", "Popconfirm", "AutoComplete"].includes(t) ? {
636
+ onPopupVisibleChange(p) {
637
+ w.value = p;
638
+ const y = o.onPopupVisibleChange;
639
+ Array.isArray(y) ? y.forEach((S) => {
640
+ typeof S == "function" && S(p);
641
+ }) : typeof y == "function" && y(p);
611
642
  }
612
643
  } : {};
613
- return m(e, { ...v, ...T, ...C, ref: x }, p);
644
+ return t === "Select" ? (delete b.id, m(e, ce(b, M, { ref: h, onVnodeMounted: T, onVnodeUpdated: T }), D)) : m(e, { ...b, ...M, ...I, ref: h }, D);
614
645
  };
615
646
  }
616
647
  });
617
- He.set(e, l);
648
+ je.set(e, l);
618
649
  const n = e.install;
619
650
  return n && Object.assign(l, {
620
- install(o, r) {
621
- function s(u, h) {
622
- return h === void 0 ? o.component(u) : o.component(u, He.get(h) ?? h);
651
+ install(r, o) {
652
+ function i(s, c) {
653
+ return c === void 0 ? r.component(s) : r.component(s, je.get(c) ?? c);
623
654
  }
624
- n({ ...o, component: s }, r);
655
+ n({ ...r, component: i }, o);
625
656
  }
626
657
  }), l;
627
658
  }
628
- const ht = U(N.AutoComplete, "AutoComplete", "triggerProps"), Ka = ht, mt = U(N.Cascader, "Cascader"), ia = U(N.ColorPicker, "ColorPicker"), vt = U(N.DatePicker, "DatePicker"), xe = U(N.MonthPicker, "MonthPicker"), $e = U(N.QuarterPicker, "QuarterPicker"), Ce = U(N.WeekPicker, "WeekPicker"), _e = U(N.YearPicker, "YearPicker"), pt = U(N.RangePicker, "RangePicker"), gt = U(N.Dropdown, "Dropdown"), bt = U(N.Dsubmenu, "Dsubmenu"), yt = U(N.DropdownButton, "DropdownButton"), wt = U(N.Select, "Select"), sa = U(N.TreeSelect, "TreeSelect"), ua = U(N.TimePicker, "TimePicker"), Dt = U(N.Tooltip, "Tooltip"), ca = U(N.Popover, "Popover"), da = U(N.Popconfirm, "Popconfirm"), fa = U(N.Trigger, "Trigger"), ha = U(N.Mention, "Mention"), ze = F({
659
+ const mt = U(z.AutoComplete, "AutoComplete", "triggerProps"), nn = mt, vt = U(z.Cascader, "Cascader"), va = U(z.ColorPicker, "ColorPicker"), gt = U(z.DatePicker, "DatePicker"), $e = U(z.MonthPicker, "MonthPicker"), Pe = U(z.QuarterPicker, "QuarterPicker"), _e = U(z.WeekPicker, "WeekPicker"), Te = U(z.YearPicker, "YearPicker"), pt = U(z.RangePicker, "RangePicker"), bt = U(z.Dropdown, "Dropdown"), yt = U(z.Dsubmenu, "Dsubmenu"), wt = U(z.DropdownButton, "DropdownButton"), Dt = U(z.Select, "Select"), ga = U(z.TreeSelect, "TreeSelect"), pa = U(z.TimePicker, "TimePicker"), St = U(z.Tooltip, "Tooltip"), ba = U(z.Popover, "Popover"), ya = U(z.Popconfirm, "Popconfirm"), wa = U(z.Trigger, "Trigger"), Da = U(z.Mention, "Mention"), Ge = N({
629
660
  name: "DshMenuItem",
630
661
  inheritAttrs: !1,
631
- props: N.MenuItem.props,
662
+ props: z.MenuItem.props,
632
663
  setup(e, { attrs: t, slots: a }) {
633
- const l = qe();
634
- return () => m(N.MenuItem, { ...t, ...e, key: l == null ? void 0 : l.vnode.key }, a.action ? {
664
+ const l = Ue();
665
+ return () => m(z.MenuItem, { ...t, ...e, key: l == null ? void 0 : l.vnode.key }, a.action ? {
635
666
  ...a,
636
667
  default: () => {
637
- var n, o;
668
+ var n, r;
638
669
  return m("div", { class: "dsh-menu-item-content" }, [
639
670
  m("span", null, (n = a.default) == null ? void 0 : n.call(a)),
640
671
  m("span", {
641
672
  class: "dsh-menu-item-action",
642
673
  inert: e.disabled || void 0,
643
- onClick: (r) => r.stopPropagation(),
644
- onKeydown: (r) => r.stopPropagation()
645
- }, (o = a.action) == null ? void 0 : o.call(a))
674
+ onClick: (o) => o.stopPropagation(),
675
+ onKeydown: (o) => o.stopPropagation()
676
+ }, (r = a.action) == null ? void 0 : r.call(a))
646
677
  ]);
647
678
  }
648
679
  } : a);
649
680
  }
650
681
  });
651
- He.set(N.MenuItem, ze);
652
- const St = U(N.Menu, "Menu", "triggerProps"), ma = F({
682
+ je.set(z.MenuItem, Ge);
683
+ const Mt = U(z.Menu, "Menu", "triggerProps"), Sa = N({
653
684
  name: "DshHintIcon",
654
685
  inheritAttrs: !1,
655
686
  props: { content: String, label: String },
656
687
  setup(e, { attrs: t, slots: a }) {
657
- return () => m(Dt, { content: e.content, trigger: ["hover", "focus"] }, {
688
+ return () => m(St, { content: e.content, trigger: ["hover", "focus"] }, {
658
689
  ...a.content ? { content: a.content } : {},
659
690
  default: () => m("button", {
660
691
  ...t,
@@ -662,632 +693,525 @@ const St = U(N.Menu, "Menu", "triggerProps"), ma = F({
662
693
  class: ["dsh-hint-icon", t.class],
663
694
  "aria-label": e.label ?? e.content ?? "Info",
664
695
  onClick: (l) => l.stopPropagation()
665
- }, [m(zt, { "aria-hidden": !0 })])
696
+ }, [m(ea, { "aria-hidden": !0 })])
666
697
  });
667
698
  }
668
- }), Mt = U(N.Image, "Image", "previewProps"), kt = U(N.ImagePreview, "ImagePreview"), At = U(N.ImagePreviewGroup, "ImagePreviewGroup");
669
- Object.assign(mt, { CascaderPanel: N.CascaderPanel });
670
- Object.assign(vt, { MonthPicker: xe, QuarterPicker: $e, WeekPicker: Ce, YearPicker: _e, RangePicker: pt });
671
- Object.assign(gt, { Option: N.Doption, Group: N.Dgroup, Submenu: bt, Button: yt });
672
- Object.assign(wt, { Option: N.Option, OptGroup: N.Optgroup });
673
- Object.assign(St, { Item: ze, ItemGroup: N.MenuItemGroup, SubMenu: N.SubMenu });
674
- Object.assign(Mt, { Preview: kt, PreviewGroup: At });
675
- function va(e, t = !1) {
699
+ }), kt = U(z.Image, "Image", "previewProps"), At = U(z.ImagePreview, "ImagePreview"), xt = U(z.ImagePreviewGroup, "ImagePreviewGroup");
700
+ Object.assign(vt, { CascaderPanel: z.CascaderPanel });
701
+ Object.assign(gt, { MonthPicker: $e, QuarterPicker: Pe, WeekPicker: _e, YearPicker: Te, RangePicker: pt });
702
+ Object.assign(bt, { Option: z.Doption, Group: z.Dgroup, Submenu: yt, Button: wt });
703
+ Object.assign(Dt, { Option: z.Option, OptGroup: z.Optgroup });
704
+ Object.assign(Mt, { Item: Ge, ItemGroup: z.MenuItemGroup, SubMenu: z.SubMenu });
705
+ Object.assign(kt, { Preview: At, PreviewGroup: xt });
706
+ function Ma(e, t = !1) {
676
707
  if (typeof e != "string")
677
708
  return {};
678
709
  let a;
679
710
  const l = e.trim().replace(/^#/, "");
680
711
  if (/^(?:[a-f\d]{3}|[a-f\d]{4}|[a-f\d]{6}|[a-f\d]{8})$/i.test(l)) {
681
- const _ = l.length < 5 ? [...l].map((d) => d.repeat(2)).join("") : l;
682
- a = [0, 2, 4, 6].map((d) => d === 6 ? _.length === 8 ? parseInt(_.slice(d, d + 2), 16) / 255 : 1 : parseInt(_.slice(d, d + 2), 16));
712
+ const T = l.length < 5 ? [...l].map((d) => d.repeat(2)).join("") : l;
713
+ a = [0, 2, 4, 6].map((d) => d === 6 ? T.length === 8 ? parseInt(T.slice(d, d + 2), 16) / 255 : 1 : parseInt(T.slice(d, d + 2), 16));
683
714
  } else {
684
- const _ = e.match(/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+))?\s*\)$/i);
685
- if (!_)
715
+ const T = e.match(/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+))?\s*\)$/i);
716
+ if (!T)
686
717
  return {};
687
- a = [Number(_[1]), Number(_[2]), Number(_[3]), _[4] === void 0 ? 1 : Number(_[4])];
718
+ a = [Number(T[1]), Number(T[2]), Number(T[3]), T[4] === void 0 ? 1 : Number(T[4])];
688
719
  }
689
- const [n, o, r] = a, s = t ? 1 : a[3], u = Math.max(n, o, r), h = Math.min(n, o, r), c = u - h;
690
- let S = c === 0 ? 0 : u === n ? ((o - r) / c + 6) % 6 : u === o ? (r - n) / c + 2 : (n - o) / c + 4;
691
- S *= 60;
692
- const i = u ? c / u * 100 : 0, x = u / 255 * 100;
720
+ const [n, r, o] = a, i = t ? 1 : a[3], s = Math.max(n, r, o), c = Math.min(n, r, o), v = s - c;
721
+ let g = v === 0 ? 0 : s === n ? ((r - o) / v + 6) % 6 : s === r ? (o - n) / v + 2 : (n - r) / v + 4;
722
+ g *= 60;
723
+ const f = s ? v / s * 100 : 0, h = s / 255 * 100;
693
724
  return {
694
- "--dsh-color": `rgb(${n}, ${o}, ${r})`,
695
- "--dsh-color-current": `rgb(${n} ${o} ${r} / ${s})`,
696
- "--dsh-color-transparent": `rgb(${n} ${o} ${r} / 0)`,
697
- "--dsh-color-hue": `hsl(${S} 100% 50%)`,
698
- "--dsh-color-x": `${Number(i.toFixed(2))}%`,
699
- "--dsh-color-y": `${Number((100 - x).toFixed(2))}%`,
700
- "--dsh-color-hue-x": `${Math.round(S) / 360 * 100}%`,
701
- "--dsh-color-alpha-x": `${s * 100}%`
725
+ "--dsh-color": `rgb(${n}, ${r}, ${o})`,
726
+ "--dsh-color-current": `rgb(${n} ${r} ${o} / ${i})`,
727
+ "--dsh-color-transparent": `rgb(${n} ${r} ${o} / 0)`,
728
+ "--dsh-color-hue": `hsl(${g} 100% 50%)`,
729
+ "--dsh-color-x": `${Number(f.toFixed(2))}%`,
730
+ "--dsh-color-y": `${Number((100 - h).toFixed(2))}%`,
731
+ "--dsh-color-hue-x": `${Math.round(g) / 360 * 100}%`,
732
+ "--dsh-color-alpha-x": `${i * 100}%`
702
733
  };
703
734
  }
704
- const Re = F({
735
+ const qe = N({
705
736
  name: "DshColorPicker",
706
737
  inheritAttrs: !1,
707
738
  props: { showFormatControls: Boolean },
708
739
  setup(e, { attrs: t, slots: a, expose: l }) {
709
- const n = j(t.defaultValue ?? t["default-value"]), o = j();
710
- return l(new Proxy({}, { get: (r, s) => {
711
- var u;
712
- return (u = o.value) == null ? void 0 : u[s];
713
- }, has: (r, s) => o.value !== void 0 && s in o.value })), () => {
714
- const { class: r, style: s, ...u } = t, h = t.modelValue ?? t["model-value"] ?? n.value, c = t.disabledAlpha ?? t["disabled-alpha"], S = va(h, c !== void 0 && c !== !1), i = t.triggerProps ?? t["trigger-props"] ?? {}, x = e.showFormatControls || t.format === "rgb", w = t.hideTrigger ?? t["hide-trigger"], _ = w !== void 0 && w !== !1;
740
+ const n = W(t.defaultValue ?? t["default-value"]), r = W();
741
+ return l(new Proxy({}, { get: (o, i) => {
742
+ var s;
743
+ return (s = r.value) == null ? void 0 : s[i];
744
+ }, has: (o, i) => r.value !== void 0 && i in r.value })), () => {
745
+ const { class: o, style: i, ...s } = t, c = t.modelValue ?? t["model-value"] ?? n.value, v = t.disabledAlpha ?? t["disabled-alpha"], g = Ma(c, v !== void 0 && v !== !1), f = t.triggerProps ?? t["trigger-props"] ?? {}, h = e.showFormatControls || t.format === "rgb", A = t.hideTrigger ?? t["hide-trigger"], T = A !== void 0 && A !== !1;
715
746
  return m("span", {
716
- class: ["dsh-color-trigger", _ && "dsh-color-panel", _ && x && "dsh-color-panel--advanced", !_ && r],
717
- style: _ ? S : [S, s]
718
- }, [m(ia, {
719
- ...u,
720
- ref: o,
721
- ..._ ? { class: r, style: s } : {},
722
- triggerProps: { ...i, contentClass: [i.contentClass, "dsh-color-panel", { "dsh-color-panel--advanced": x }], contentStyle: { ...S, ...i.contentStyle } },
747
+ class: ["dsh-color-trigger", T && "dsh-color-panel", T && h && "dsh-color-panel--advanced", !T && o],
748
+ style: T ? g : [g, i]
749
+ }, [m(va, {
750
+ ...s,
751
+ ref: r,
752
+ ...T ? { class: o, style: i } : {},
753
+ triggerProps: { ...f, contentClass: [f.contentClass, "dsh-color-panel", { "dsh-color-panel--advanced": h }], contentStyle: { ...g, ...f.contentStyle } },
723
754
  "onUpdate:modelValue": (d) => {
724
755
  n.value = d;
725
- const v = t["onUpdate:modelValue"];
726
- typeof v == "function" && v(d);
756
+ const w = t["onUpdate:modelValue"];
757
+ typeof w == "function" && w(d);
727
758
  }
728
759
  }, a)]);
729
760
  };
730
761
  }
731
762
  });
732
- Object.assign(Re, { install(e, t) {
733
- e.component(`${(t == null ? void 0 : t.componentPrefix) ?? "A"}ColorPicker`, Re);
763
+ Object.assign(qe, { install(e, t) {
764
+ e.component(`${(t == null ? void 0 : t.componentPrefix) ?? "A"}ColorPicker`, qe);
734
765
  } });
735
- function xt(e) {
766
+ function Ct(e) {
736
767
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
737
768
  }
738
- var ye = { exports: {} }, pa = ye.exports, ot;
739
- function ga() {
740
- return ot || (ot = 1, (function(e, t) {
769
+ var De = { exports: {} }, ka = De.exports, it;
770
+ function Aa() {
771
+ return it || (it = 1, (function(e, t) {
741
772
  (function(a, l) {
742
773
  e.exports = l();
743
- })(pa, (function() {
744
- var a = 1e3, l = 6e4, n = 36e5, o = "millisecond", r = "second", s = "minute", u = "hour", h = "day", c = "week", S = "month", i = "quarter", x = "year", w = "date", _ = "Invalid Date", d = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, v = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, O = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(b) {
745
- var D = ["th", "st", "nd", "rd"], g = b % 100;
746
- return "[" + b + (D[(g - 20) % 10] || D[g] || D[0]) + "]";
747
- } }, A = function(b, D, g) {
748
- var y = String(b);
749
- return !y || y.length >= D ? b : "" + Array(D + 1 - y.length).join(g) + b;
750
- }, Y = { s: A, z: function(b) {
751
- var D = -b.utcOffset(), g = Math.abs(D), y = Math.floor(g / 60), k = g % 60;
752
- return (D <= 0 ? "+" : "-") + A(y, 2, "0") + ":" + A(k, 2, "0");
753
- }, m: function b(D, g) {
754
- if (D.date() < g.date()) return -b(g, D);
755
- var y = 12 * (g.year() - D.year()) + (g.month() - D.month()), k = D.clone().add(y, S), L = g - k < 0, E = D.clone().add(y + (L ? -1 : 1), S);
756
- return +(-(y + (g - k) / (L ? k - E : E - k)) || 0);
757
- }, a: function(b) {
758
- return b < 0 ? Math.ceil(b) || 0 : Math.floor(b);
759
- }, p: function(b) {
760
- return { M: S, y: x, w: c, d: h, D: w, h: u, m: s, s: r, ms: o, Q: i }[b] || String(b || "").toLowerCase().replace(/s$/, "");
761
- }, u: function(b) {
762
- return b === void 0;
763
- } }, I = "en", T = {};
764
- T[I] = O;
765
- var f = "$isDayjsObject", M = function(b) {
766
- return b instanceof $ || !(!b || !b[f]);
767
- }, p = function b(D, g, y) {
774
+ })(ka, (function() {
775
+ var a = 1e3, l = 6e4, n = 36e5, r = "millisecond", o = "second", i = "minute", s = "hour", c = "day", v = "week", g = "month", f = "quarter", h = "year", A = "date", T = "Invalid Date", d = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, w = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, C = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(p) {
776
+ var y = ["th", "st", "nd", "rd"], S = p % 100;
777
+ return "[" + p + (y[(S - 20) % 10] || y[S] || y[0]) + "]";
778
+ } }, b = function(p, y, S) {
779
+ var V = String(p);
780
+ return !V || V.length >= y ? p : "" + Array(y + 1 - V.length).join(S) + p;
781
+ }, P = { s: b, z: function(p) {
782
+ var y = -p.utcOffset(), S = Math.abs(y), V = Math.floor(S / 60), k = S % 60;
783
+ return (y <= 0 ? "+" : "-") + b(V, 2, "0") + ":" + b(k, 2, "0");
784
+ }, m: function p(y, S) {
785
+ if (y.date() < S.date()) return -p(S, y);
786
+ var V = 12 * (S.year() - y.year()) + (S.month() - y.month()), k = y.clone().add(V, g), O = S - k < 0, _ = y.clone().add(V + (O ? -1 : 1), g);
787
+ return +(-(V + (S - k) / (O ? k - _ : _ - k)) || 0);
788
+ }, a: function(p) {
789
+ return p < 0 ? Math.ceil(p) || 0 : Math.floor(p);
790
+ }, p: function(p) {
791
+ return { M: g, y: h, w: v, d: c, D: A, h: s, m: i, s: o, ms: r, Q: f }[p] || String(p || "").toLowerCase().replace(/s$/, "");
792
+ }, u: function(p) {
793
+ return p === void 0;
794
+ } }, Y = "en", L = {};
795
+ L[Y] = C;
796
+ var x = "$isDayjsObject", M = function(p) {
797
+ return p instanceof I || !(!p || !p[x]);
798
+ }, $ = function p(y, S, V) {
768
799
  var k;
769
- if (!D) return I;
770
- if (typeof D == "string") {
771
- var L = D.toLowerCase();
772
- T[L] && (k = L), g && (T[L] = g, k = L);
773
- var E = D.split("-");
774
- if (!k && E.length > 1) return b(E[0]);
800
+ if (!y) return Y;
801
+ if (typeof y == "string") {
802
+ var O = y.toLowerCase();
803
+ L[O] && (k = O), S && (L[O] = S, k = O);
804
+ var _ = y.split("-");
805
+ if (!k && _.length > 1) return p(_[0]);
775
806
  } else {
776
- var B = D.name;
777
- T[B] = D, k = B;
807
+ var E = y.name;
808
+ L[E] = y, k = E;
778
809
  }
779
- return !y && k && (I = k), k || !y && I;
780
- }, C = function(b, D) {
781
- if (M(b)) return b.clone();
782
- var g = typeof D == "object" ? D : {};
783
- return g.date = b, g.args = arguments, new $(g);
784
- }, P = Y;
785
- P.l = p, P.i = M, P.w = function(b, D) {
786
- return C(b, { locale: D.$L, utc: D.$u, x: D.$x, $offset: D.$offset });
810
+ return !V && k && (Y = k), k || !V && Y;
811
+ }, u = function(p, y) {
812
+ if (M(p)) return p.clone();
813
+ var S = typeof y == "object" ? y : {};
814
+ return S.date = p, S.args = arguments, new I(S);
815
+ }, D = P;
816
+ D.l = $, D.i = M, D.w = function(p, y) {
817
+ return u(p, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
787
818
  };
788
- var $ = (function() {
789
- function b(g) {
790
- this.$L = p(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[f] = !0;
819
+ var I = (function() {
820
+ function p(S) {
821
+ this.$L = $(S.locale, null, !0), this.parse(S), this.$x = this.$x || S.x || {}, this[x] = !0;
791
822
  }
792
- var D = b.prototype;
793
- return D.parse = function(g) {
794
- this.$d = (function(y) {
795
- var k = y.date, L = y.utc;
823
+ var y = p.prototype;
824
+ return y.parse = function(S) {
825
+ this.$d = (function(V) {
826
+ var k = V.date, O = V.utc;
796
827
  if (k === null) return /* @__PURE__ */ new Date(NaN);
797
- if (P.u(k)) return /* @__PURE__ */ new Date();
828
+ if (D.u(k)) return /* @__PURE__ */ new Date();
798
829
  if (k instanceof Date) return new Date(k);
799
830
  if (typeof k == "string" && !/Z$/i.test(k)) {
800
- var E = k.match(d);
801
- if (E) {
802
- var B = E[2] - 1 || 0, H = (E[7] || "0").substring(0, 3);
803
- return L ? new Date(Date.UTC(E[1], B, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, H)) : new Date(E[1], B, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, H);
831
+ var _ = k.match(d);
832
+ if (_) {
833
+ var E = _[2] - 1 || 0, H = (_[7] || "0").substring(0, 3);
834
+ return O ? new Date(Date.UTC(_[1], E, _[3] || 1, _[4] || 0, _[5] || 0, _[6] || 0, H)) : new Date(_[1], E, _[3] || 1, _[4] || 0, _[5] || 0, _[6] || 0, H);
804
835
  }
805
836
  }
806
837
  return new Date(k);
807
- })(g), this.init();
808
- }, D.init = function() {
809
- var g = this.$d;
810
- this.$y = g.getFullYear(), this.$M = g.getMonth(), this.$D = g.getDate(), this.$W = g.getDay(), this.$H = g.getHours(), this.$m = g.getMinutes(), this.$s = g.getSeconds(), this.$ms = g.getMilliseconds();
811
- }, D.$utils = function() {
812
- return P;
813
- }, D.isValid = function() {
814
- return this.$d.toString() !== _;
815
- }, D.isSame = function(g, y) {
816
- var k = C(g);
817
- return this.startOf(y) <= k && k <= this.endOf(y);
818
- }, D.isAfter = function(g, y) {
819
- return C(g) < this.startOf(y);
820
- }, D.isBefore = function(g, y) {
821
- return this.endOf(y) < C(g);
822
- }, D.$g = function(g, y, k) {
823
- return P.u(g) ? this[y] : this.set(k, g);
824
- }, D.unix = function() {
838
+ })(S), this.init();
839
+ }, y.init = function() {
840
+ var S = this.$d;
841
+ this.$y = S.getFullYear(), this.$M = S.getMonth(), this.$D = S.getDate(), this.$W = S.getDay(), this.$H = S.getHours(), this.$m = S.getMinutes(), this.$s = S.getSeconds(), this.$ms = S.getMilliseconds();
842
+ }, y.$utils = function() {
843
+ return D;
844
+ }, y.isValid = function() {
845
+ return this.$d.toString() !== T;
846
+ }, y.isSame = function(S, V) {
847
+ var k = u(S);
848
+ return this.startOf(V) <= k && k <= this.endOf(V);
849
+ }, y.isAfter = function(S, V) {
850
+ return u(S) < this.startOf(V);
851
+ }, y.isBefore = function(S, V) {
852
+ return this.endOf(V) < u(S);
853
+ }, y.$g = function(S, V, k) {
854
+ return D.u(S) ? this[V] : this.set(k, S);
855
+ }, y.unix = function() {
825
856
  return Math.floor(this.valueOf() / 1e3);
826
- }, D.valueOf = function() {
857
+ }, y.valueOf = function() {
827
858
  return this.$d.getTime();
828
- }, D.startOf = function(g, y) {
829
- var k = this, L = !!P.u(y) || y, E = P.p(g), B = function(X, K) {
830
- var Q = P.w(k.$u ? Date.UTC(k.$y, K, X) : new Date(k.$y, K, X), k);
831
- return L ? Q : Q.endOf(h);
832
- }, H = function(X, K) {
833
- return P.w(k.toDate()[X].apply(k.toDate("s"), (L ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(K)), k);
834
- }, R = this.$W, W = this.$M, z = this.$D, G = "set" + (this.$u ? "UTC" : "");
835
- switch (E) {
836
- case x:
837
- return L ? B(1, 0) : B(31, 11);
838
- case S:
839
- return L ? B(1, W) : B(0, W + 1);
840
- case c:
841
- var Z = this.$locale().weekStart || 0, oe = (R < Z ? R + 7 : R) - Z;
842
- return B(L ? z - oe : z + (6 - oe), W);
859
+ }, y.startOf = function(S, V) {
860
+ var k = this, O = !!D.u(V) || V, _ = D.p(S), E = function(te, G) {
861
+ var J = D.w(k.$u ? Date.UTC(k.$y, G, te) : new Date(k.$y, G, te), k);
862
+ return O ? J : J.endOf(c);
863
+ }, H = function(te, G) {
864
+ return D.w(k.toDate()[te].apply(k.toDate("s"), (O ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(G)), k);
865
+ }, R = this.$W, F = this.$M, q = this.$D, K = "set" + (this.$u ? "UTC" : "");
866
+ switch (_) {
843
867
  case h:
844
- case w:
845
- return H(G + "Hours", 0);
846
- case u:
847
- return H(G + "Minutes", 1);
868
+ return O ? E(1, 0) : E(31, 11);
869
+ case g:
870
+ return O ? E(1, F) : E(0, F + 1);
871
+ case v:
872
+ var Q = this.$locale().weekStart || 0, ee = (R < Q ? R + 7 : R) - Q;
873
+ return E(O ? q - ee : q + (6 - ee), F);
874
+ case c:
875
+ case A:
876
+ return H(K + "Hours", 0);
848
877
  case s:
849
- return H(G + "Seconds", 2);
850
- case r:
851
- return H(G + "Milliseconds", 3);
878
+ return H(K + "Minutes", 1);
879
+ case i:
880
+ return H(K + "Seconds", 2);
881
+ case o:
882
+ return H(K + "Milliseconds", 3);
852
883
  default:
853
884
  return this.clone();
854
885
  }
855
- }, D.endOf = function(g) {
856
- return this.startOf(g, !1);
857
- }, D.$set = function(g, y) {
858
- var k, L = P.p(g), E = "set" + (this.$u ? "UTC" : ""), B = (k = {}, k[h] = E + "Date", k[w] = E + "Date", k[S] = E + "Month", k[x] = E + "FullYear", k[u] = E + "Hours", k[s] = E + "Minutes", k[r] = E + "Seconds", k[o] = E + "Milliseconds", k)[L], H = L === h ? this.$D + (y - this.$W) : y;
859
- if (L === S || L === x) {
860
- var R = this.clone().set(w, 1);
861
- R.$d[B](H), R.init(), this.$d = R.set(w, Math.min(this.$D, R.daysInMonth())).$d;
862
- } else B && this.$d[B](H);
886
+ }, y.endOf = function(S) {
887
+ return this.startOf(S, !1);
888
+ }, y.$set = function(S, V) {
889
+ var k, O = D.p(S), _ = "set" + (this.$u ? "UTC" : ""), E = (k = {}, k[c] = _ + "Date", k[A] = _ + "Date", k[g] = _ + "Month", k[h] = _ + "FullYear", k[s] = _ + "Hours", k[i] = _ + "Minutes", k[o] = _ + "Seconds", k[r] = _ + "Milliseconds", k)[O], H = O === c ? this.$D + (V - this.$W) : V;
890
+ if (O === g || O === h) {
891
+ var R = this.clone().set(A, 1);
892
+ R.$d[E](H), R.init(), this.$d = R.set(A, Math.min(this.$D, R.daysInMonth())).$d;
893
+ } else E && this.$d[E](H);
863
894
  return this.init(), this;
864
- }, D.set = function(g, y) {
865
- return this.clone().$set(g, y);
866
- }, D.get = function(g) {
867
- return this[P.p(g)]();
868
- }, D.add = function(g, y) {
869
- var k, L = this;
870
- g = Number(g);
871
- var E = P.p(y), B = function(W) {
872
- var z = C(L);
873
- return P.w(z.date(z.date() + Math.round(W * g)), L);
895
+ }, y.set = function(S, V) {
896
+ return this.clone().$set(S, V);
897
+ }, y.get = function(S) {
898
+ return this[D.p(S)]();
899
+ }, y.add = function(S, V) {
900
+ var k, O = this;
901
+ S = Number(S);
902
+ var _ = D.p(V), E = function(F) {
903
+ var q = u(O);
904
+ return D.w(q.date(q.date() + Math.round(F * S)), O);
874
905
  };
875
- if (E === S) return this.set(S, this.$M + g);
876
- if (E === x) return this.set(x, this.$y + g);
877
- if (E === h) return B(1);
878
- if (E === c) return B(7);
879
- var H = (k = {}, k[s] = l, k[u] = n, k[r] = a, k)[E] || 1, R = this.$d.getTime() + g * H;
880
- return P.w(R, this);
881
- }, D.subtract = function(g, y) {
882
- return this.add(-1 * g, y);
883
- }, D.format = function(g) {
884
- var y = this, k = this.$locale();
885
- if (!this.isValid()) return k.invalidDate || _;
886
- var L = g || "YYYY-MM-DDTHH:mm:ssZ", E = P.z(this), B = this.$H, H = this.$m, R = this.$M, W = k.weekdays, z = k.months, G = k.meridiem, Z = function(K, Q, te, ae) {
887
- return K && (K[Q] || K(y, L)) || te[Q].slice(0, ae);
888
- }, oe = function(K) {
889
- return P.s(B % 12 || 12, K, "0");
890
- }, X = G || function(K, Q, te) {
891
- var ae = K < 12 ? "AM" : "PM";
892
- return te ? ae.toLowerCase() : ae;
906
+ if (_ === g) return this.set(g, this.$M + S);
907
+ if (_ === h) return this.set(h, this.$y + S);
908
+ if (_ === c) return E(1);
909
+ if (_ === v) return E(7);
910
+ var H = (k = {}, k[i] = l, k[s] = n, k[o] = a, k)[_] || 1, R = this.$d.getTime() + S * H;
911
+ return D.w(R, this);
912
+ }, y.subtract = function(S, V) {
913
+ return this.add(-1 * S, V);
914
+ }, y.format = function(S) {
915
+ var V = this, k = this.$locale();
916
+ if (!this.isValid()) return k.invalidDate || T;
917
+ var O = S || "YYYY-MM-DDTHH:mm:ssZ", _ = D.z(this), E = this.$H, H = this.$m, R = this.$M, F = k.weekdays, q = k.months, K = k.meridiem, Q = function(G, J, ae, ne) {
918
+ return G && (G[J] || G(V, O)) || ae[J].slice(0, ne);
919
+ }, ee = function(G) {
920
+ return D.s(E % 12 || 12, G, "0");
921
+ }, te = K || function(G, J, ae) {
922
+ var ne = G < 12 ? "AM" : "PM";
923
+ return ae ? ne.toLowerCase() : ne;
893
924
  };
894
- return L.replace(v, (function(K, Q) {
895
- return Q || (function(te) {
896
- switch (te) {
925
+ return O.replace(w, (function(G, J) {
926
+ return J || (function(ae) {
927
+ switch (ae) {
897
928
  case "YY":
898
- return String(y.$y).slice(-2);
929
+ return String(V.$y).slice(-2);
899
930
  case "YYYY":
900
- return P.s(y.$y, 4, "0");
931
+ return D.s(V.$y, 4, "0");
901
932
  case "M":
902
933
  return R + 1;
903
934
  case "MM":
904
- return P.s(R + 1, 2, "0");
935
+ return D.s(R + 1, 2, "0");
905
936
  case "MMM":
906
- return Z(k.monthsShort, R, z, 3);
937
+ return Q(k.monthsShort, R, q, 3);
907
938
  case "MMMM":
908
- return Z(z, R);
939
+ return Q(q, R);
909
940
  case "D":
910
- return y.$D;
941
+ return V.$D;
911
942
  case "DD":
912
- return P.s(y.$D, 2, "0");
943
+ return D.s(V.$D, 2, "0");
913
944
  case "d":
914
- return String(y.$W);
945
+ return String(V.$W);
915
946
  case "dd":
916
- return Z(k.weekdaysMin, y.$W, W, 2);
947
+ return Q(k.weekdaysMin, V.$W, F, 2);
917
948
  case "ddd":
918
- return Z(k.weekdaysShort, y.$W, W, 3);
949
+ return Q(k.weekdaysShort, V.$W, F, 3);
919
950
  case "dddd":
920
- return W[y.$W];
951
+ return F[V.$W];
921
952
  case "H":
922
- return String(B);
953
+ return String(E);
923
954
  case "HH":
924
- return P.s(B, 2, "0");
955
+ return D.s(E, 2, "0");
925
956
  case "h":
926
- return oe(1);
957
+ return ee(1);
927
958
  case "hh":
928
- return oe(2);
959
+ return ee(2);
929
960
  case "a":
930
- return X(B, H, !0);
961
+ return te(E, H, !0);
931
962
  case "A":
932
- return X(B, H, !1);
963
+ return te(E, H, !1);
933
964
  case "m":
934
965
  return String(H);
935
966
  case "mm":
936
- return P.s(H, 2, "0");
967
+ return D.s(H, 2, "0");
937
968
  case "s":
938
- return String(y.$s);
969
+ return String(V.$s);
939
970
  case "ss":
940
- return P.s(y.$s, 2, "0");
971
+ return D.s(V.$s, 2, "0");
941
972
  case "SSS":
942
- return P.s(y.$ms, 3, "0");
973
+ return D.s(V.$ms, 3, "0");
943
974
  case "Z":
944
- return E;
975
+ return _;
945
976
  }
946
977
  return null;
947
- })(K) || E.replace(":", "");
978
+ })(G) || _.replace(":", "");
948
979
  }));
949
- }, D.utcOffset = function() {
980
+ }, y.utcOffset = function() {
950
981
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
951
- }, D.diff = function(g, y, k) {
952
- var L, E = this, B = P.p(y), H = C(g), R = (H.utcOffset() - this.utcOffset()) * l, W = this - H, z = function() {
953
- return P.m(E, H);
982
+ }, y.diff = function(S, V, k) {
983
+ var O, _ = this, E = D.p(V), H = u(S), R = (H.utcOffset() - this.utcOffset()) * l, F = this - H, q = function() {
984
+ return D.m(_, H);
954
985
  };
955
- switch (B) {
956
- case x:
957
- L = z() / 12;
958
- break;
959
- case S:
960
- L = z();
986
+ switch (E) {
987
+ case h:
988
+ O = q() / 12;
961
989
  break;
962
- case i:
963
- L = z() / 3;
990
+ case g:
991
+ O = q();
964
992
  break;
965
- case c:
966
- L = (W - R) / 6048e5;
993
+ case f:
994
+ O = q() / 3;
967
995
  break;
968
- case h:
969
- L = (W - R) / 864e5;
996
+ case v:
997
+ O = (F - R) / 6048e5;
970
998
  break;
971
- case u:
972
- L = W / n;
999
+ case c:
1000
+ O = (F - R) / 864e5;
973
1001
  break;
974
1002
  case s:
975
- L = W / l;
1003
+ O = F / n;
1004
+ break;
1005
+ case i:
1006
+ O = F / l;
976
1007
  break;
977
- case r:
978
- L = W / a;
1008
+ case o:
1009
+ O = F / a;
979
1010
  break;
980
1011
  default:
981
- L = W;
1012
+ O = F;
982
1013
  }
983
- return k ? L : P.a(L);
984
- }, D.daysInMonth = function() {
985
- return this.endOf(S).$D;
986
- }, D.$locale = function() {
987
- return T[this.$L];
988
- }, D.locale = function(g, y) {
989
- if (!g) return this.$L;
990
- var k = this.clone(), L = p(g, y, !0);
991
- return L && (k.$L = L), k;
992
- }, D.clone = function() {
993
- return P.w(this.$d, this);
994
- }, D.toDate = function() {
1014
+ return k ? O : D.a(O);
1015
+ }, y.daysInMonth = function() {
1016
+ return this.endOf(g).$D;
1017
+ }, y.$locale = function() {
1018
+ return L[this.$L];
1019
+ }, y.locale = function(S, V) {
1020
+ if (!S) return this.$L;
1021
+ var k = this.clone(), O = $(S, V, !0);
1022
+ return O && (k.$L = O), k;
1023
+ }, y.clone = function() {
1024
+ return D.w(this.$d, this);
1025
+ }, y.toDate = function() {
995
1026
  return new Date(this.valueOf());
996
- }, D.toJSON = function() {
1027
+ }, y.toJSON = function() {
997
1028
  return this.isValid() ? this.toISOString() : null;
998
- }, D.toISOString = function() {
1029
+ }, y.toISOString = function() {
999
1030
  return this.$d.toISOString();
1000
- }, D.toString = function() {
1031
+ }, y.toString = function() {
1001
1032
  return this.$d.toUTCString();
1002
- }, b;
1003
- })(), V = $.prototype;
1004
- return C.prototype = V, [["$ms", o], ["$s", r], ["$m", s], ["$H", u], ["$W", h], ["$M", S], ["$y", x], ["$D", w]].forEach((function(b) {
1005
- V[b[1]] = function(D) {
1006
- return this.$g(D, b[0], b[1]);
1033
+ }, p;
1034
+ })(), B = I.prototype;
1035
+ return u.prototype = B, [["$ms", r], ["$s", o], ["$m", i], ["$H", s], ["$W", c], ["$M", g], ["$y", h], ["$D", A]].forEach((function(p) {
1036
+ B[p[1]] = function(y) {
1037
+ return this.$g(y, p[0], p[1]);
1007
1038
  };
1008
- })), C.extend = function(b, D) {
1009
- return b.$i || (b(D, $, C), b.$i = !0), C;
1010
- }, C.locale = p, C.isDayjs = M, C.unix = function(b) {
1011
- return C(1e3 * b);
1012
- }, C.en = T[I], C.Ls = T, C.p = {}, C;
1039
+ })), u.extend = function(p, y) {
1040
+ return p.$i || (p(y, I, u), p.$i = !0), u;
1041
+ }, u.locale = $, u.isDayjs = M, u.unix = function(p) {
1042
+ return u(1e3 * p);
1043
+ }, u.en = L[Y], u.Ls = L, u.p = {}, u;
1013
1044
  }));
1014
- })(ye)), ye.exports;
1015
- }
1016
- var ba = ga();
1017
- const ie = /* @__PURE__ */ xt(ba);
1018
- function ya(e) {
1019
- return (e.match(/YYYY|MM?|DD?|\[[^\]]*\]|./g) ?? []).map((t) => ({
1020
- unit: t === "YYYY" ? "year" : /^M+$/.test(t) ? "month" : /^D+$/.test(t) ? "day" : void 0,
1021
- text: t.startsWith("[") ? t.slice(1, -1) : t
1022
- }));
1023
- }
1024
- function Ee(e) {
1025
- if (e.year === void 0 || e.month === void 0 || e.day === void 0)
1026
- return;
1027
- const t = ie().date(1).year(Math.max(1, Math.min(9999, e.year))).month(Math.max(1, Math.min(12, e.month)) - 1);
1028
- return t.date(Math.max(1, Math.min(e.day, t.daysInMonth()))).startOf("day");
1045
+ })(De)), De.exports;
1029
1046
  }
1030
- function wa(e, t) {
1031
- const { dates: a, range: l, draft: n, disabled: o, readonly: r } = t, s = a.map((i) => (i == null ? void 0 : i.format("YYYY-MM-DD")) ?? "").join("/");
1032
- s !== n.source && (n.source = s, n.parts = a.map((i) => i ? { year: i.year(), month: i.month() + 1, day: i.date() } : {}));
1033
- const u = (i, x, w) => {
1034
- var v;
1035
- const _ = (v = n.parts)[i] ?? (v[i] = {});
1036
- _[x] = w;
1037
- const d = Ee(_);
1038
- if (d && !t.disabledDate(d)) {
1039
- const O = Array.from({ length: l ? 2 : 1 }, (A, Y) => Ee(n.parts[Y] ?? {}));
1040
- O[i] = d, O.every((A) => !A || !t.disabledDate(A)) && t.change(O);
1041
- }
1042
- w === void 0 && a[i] && t.change([]), t.invalidate();
1043
- }, h = (i, x) => {
1044
- var d;
1045
- const w = i.closest(".dsh-date-input"), _ = Array.from((w == null ? void 0 : w.querySelectorAll("[role=spinbutton]")) ?? []);
1046
- (d = _[_.indexOf(i) + x]) == null || d.focus();
1047
- }, c = Array.from({ length: l ? 2 : 1 }, (i, x) => e("div", { className: "dsh-date-input__field", key: x }, ...ya(t.format).map(({ unit: w, text: _ }, d) => {
1048
- var T;
1049
- if (!w)
1050
- return e("span", { key: d, className: "dsh-date-input__literal", "aria-hidden": !0 }, _);
1051
- const v = (T = n.parts)[x] ?? (T[x] = {}), O = v[w], A = w === "year" ? 9999 : w === "month" ? 12 : Ee({ year: v.year ?? 2e3, month: v.month ?? 1, day: 1 }).daysInMonth(), Y = `${x}-${w}`, I = (f, M) => {
1052
- if (o || r || !/^\d+$/.test(f))
1053
- return;
1054
- const p = (n.target === Y ? n.buffer : "") + f, C = Number(p) > A ? f : p;
1055
- n.target = Y, n.buffer = C, Number(C) > 0 && u(x, w, Math.min(A, Number(C))), (C.length >= (w === "year" ? 4 : 2) || +(C + "0") > A) && (n.buffer = "", h(M, 1));
1056
- };
1057
- return e("span", {
1058
- key: d,
1059
- className: "dsh-date-input__segment",
1060
- role: "spinbutton",
1061
- tabIndex: o ? -1 : 0,
1062
- contentEditable: !o && !r,
1063
- suppressContentEditableWarning: !0,
1064
- spellCheck: !1,
1065
- inputMode: "numeric",
1066
- "aria-label": `${w}, ${t.label}${l ? x === 0 ? ", start" : ", end" : ""}`,
1067
- "aria-valuenow": O,
1068
- "aria-valuemin": 1,
1069
- "aria-valuemax": A,
1070
- "aria-disabled": o || void 0,
1071
- "aria-readonly": r || void 0,
1072
- "data-placeholder": O === void 0 || void 0,
1073
- onFocus: () => {
1074
- n.target = Y, n.buffer = "";
1075
- },
1076
- onClick: (f) => f.stopPropagation(),
1077
- onBeforeInput: (f) => {
1078
- var M;
1079
- f.preventDefault(), I(f.data ?? ((M = f.nativeEvent) == null ? void 0 : M.data) ?? "", f.target);
1080
- },
1081
- onPaste: (f) => {
1082
- var M;
1083
- f.preventDefault(), I(((M = f.clipboardData) == null ? void 0 : M.getData("text")) ?? "", f.target);
1084
- },
1085
- onKeyDown: (f) => {
1086
- if (f.altKey && f.key === "ArrowDown") {
1087
- f.preventDefault(), t.toggle();
1088
- return;
1089
- }
1090
- if (f.key === "ArrowLeft" || f.key === "ArrowRight") {
1091
- f.preventDefault(), h(f.target, f.key === "ArrowLeft" ? -1 : 1);
1092
- return;
1093
- }
1094
- if (!(o || r)) {
1095
- if (/^\d$/.test(f.key)) {
1096
- f.preventDefault(), I(f.key, f.target);
1097
- return;
1098
- }
1099
- if (f.key === "Backspace" || f.key === "Delete") {
1100
- f.preventDefault(), n.buffer = "", u(x, w, void 0);
1101
- return;
1102
- }
1103
- if (["ArrowUp", "ArrowDown", "Home", "End"].includes(f.key)) {
1104
- f.preventDefault(), n.buffer = "";
1105
- const M = f.key === "Home" ? 1 : f.key === "End" ? A : (O ?? 0) + (f.key === "ArrowUp" ? 1 : -1);
1106
- u(x, w, M < 1 ? A : M > A ? 1 : M);
1107
- }
1108
- }
1109
- }
1110
- }, O === void 0 ? w === "year" ? "yyyy" : w === "month" ? "mm" : "dd" : String(O));
1111
- }))), S = [c[0]];
1112
- return l && S.push(e("span", { className: "dsh-date-input__separator", "aria-hidden": !0 }, "-"), c[1]), S.push(e("button", {
1113
- type: "button",
1114
- className: "dsh-date-input__trigger",
1115
- disabled: o,
1116
- "aria-label": "Calendar",
1117
- "aria-haspopup": "dialog",
1118
- "aria-expanded": t.open,
1119
- onClick: (i) => {
1120
- i.stopPropagation(), t.toggle();
1121
- }
1122
- }, e("span", { className: "dsh-date-input__indicator" }, e("svg", { viewBox: "0 0 13 14", width: 14, height: 14, fill: "none", "aria-hidden": !0 }, e("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M3.75 4.5A.75.75 0 0 1 3 3.75v-.748a1.5 1.5 0 0 0-1.5 1.5v1h10v-1a1.5 1.5 0 0 0-1.5-1.5v.75a.75.75 0 1 1-1.5 0v-.75h-4v.747a.75.75 0 0 1-.75.75ZM8.5 1.501h-4V.75a.75.75 0 0 0-1.5 0v.752a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-6a3 3 0 0 0-3-3v-.75a.75.75 0 0 0-1.5 0v.75Zm-7 5.5v3.5a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-3.5h-10Z" }))))), t.allowClear && a.some(Boolean) && !r && !o && S.push(e("button", { type: "button", className: "dsh-date-input__clear", "aria-label": "Clear", onClick: (i) => {
1123
- i.stopPropagation(), t.change([]);
1124
- } }, "×")), e("div", {
1125
- className: "dsh-date-input",
1126
- role: "group",
1127
- "aria-label": t.label,
1128
- "data-disabled": o || void 0,
1129
- onBlur: (i) => {
1130
- (!(i.relatedTarget instanceof Node) || !i.currentTarget.contains(i.relatedTarget)) && (n.source = "\0", n.buffer = "", t.invalidate());
1131
- },
1132
- onClick: () => {
1133
- !o && !r && t.toggle();
1134
- }
1135
- }, ...S);
1136
- }
1137
- var we = { exports: {} }, Da = we.exports, lt;
1138
- function Sa() {
1139
- return lt || (lt = 1, (function(e, t) {
1047
+ var xa = Aa();
1048
+ const ie = /* @__PURE__ */ Ct(xa);
1049
+ var Se = { exports: {} }, Ca = Se.exports, st;
1050
+ function $a() {
1051
+ return st || (st = 1, (function(e, t) {
1140
1052
  (function(a, l) {
1141
1053
  e.exports = l();
1142
- })(Da, (function() {
1143
- var a = { 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" }, l = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, o = /\d\d/, r = /\d\d?/, s = /\d*[^-_:/,()\s\d]+/, u = {}, h = function(d) {
1054
+ })(Ca, (function() {
1055
+ var a = { 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" }, l = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, o = /\d\d?/, i = /\d*[^-_:/,()\s\d]+/, s = {}, c = function(d) {
1144
1056
  return (d = +d) + (d > 68 ? 1900 : 2e3);
1145
- }, c = function(d) {
1146
- return function(v) {
1147
- this[d] = +v;
1057
+ }, v = function(d) {
1058
+ return function(w) {
1059
+ this[d] = +w;
1148
1060
  };
1149
- }, S = [/[+-]\d\d:?(\d\d)?|Z/, function(d) {
1150
- (this.zone || (this.zone = {})).offset = (function(v) {
1151
- if (!v || v === "Z") return 0;
1152
- var O = v.match(/([+-]|\d\d)/g), A = 60 * O[1] + (+O[2] || 0);
1153
- return A === 0 ? 0 : O[0] === "+" ? -A : A;
1061
+ }, g = [/[+-]\d\d:?(\d\d)?|Z/, function(d) {
1062
+ (this.zone || (this.zone = {})).offset = (function(w) {
1063
+ if (!w || w === "Z") return 0;
1064
+ var C = w.match(/([+-]|\d\d)/g), b = 60 * C[1] + (+C[2] || 0);
1065
+ return b === 0 ? 0 : C[0] === "+" ? -b : b;
1154
1066
  })(d);
1155
- }], i = function(d) {
1156
- var v = u[d];
1157
- return v && (v.indexOf ? v : v.s.concat(v.f));
1158
- }, x = function(d, v) {
1159
- var O, A = u.meridiem;
1160
- if (A) {
1161
- for (var Y = 1; Y <= 24; Y += 1) if (d.indexOf(A(Y, 0, v)) > -1) {
1162
- O = Y > 12;
1067
+ }], f = function(d) {
1068
+ var w = s[d];
1069
+ return w && (w.indexOf ? w : w.s.concat(w.f));
1070
+ }, h = function(d, w) {
1071
+ var C, b = s.meridiem;
1072
+ if (b) {
1073
+ for (var P = 1; P <= 24; P += 1) if (d.indexOf(b(P, 0, w)) > -1) {
1074
+ C = P > 12;
1163
1075
  break;
1164
1076
  }
1165
- } else O = d === (v ? "pm" : "PM");
1166
- return O;
1167
- }, w = { A: [s, function(d) {
1168
- this.afternoon = x(d, !1);
1169
- }], a: [s, function(d) {
1170
- this.afternoon = x(d, !0);
1077
+ } else C = d === (w ? "pm" : "PM");
1078
+ return C;
1079
+ }, A = { A: [i, function(d) {
1080
+ this.afternoon = h(d, !1);
1081
+ }], a: [i, function(d) {
1082
+ this.afternoon = h(d, !0);
1171
1083
  }], Q: [n, function(d) {
1172
1084
  this.month = 3 * (d - 1) + 1;
1173
1085
  }], S: [n, function(d) {
1174
1086
  this.milliseconds = 100 * +d;
1175
- }], SS: [o, function(d) {
1087
+ }], SS: [r, function(d) {
1176
1088
  this.milliseconds = 10 * +d;
1177
1089
  }], SSS: [/\d{3}/, function(d) {
1178
1090
  this.milliseconds = +d;
1179
- }], s: [r, c("seconds")], ss: [r, c("seconds")], m: [r, c("minutes")], mm: [r, c("minutes")], H: [r, c("hours")], h: [r, c("hours")], HH: [r, c("hours")], hh: [r, c("hours")], D: [r, c("day")], DD: [o, c("day")], Do: [s, function(d) {
1180
- var v = u.ordinal, O = d.match(/\d+/);
1181
- if (this.day = O[0], v) for (var A = 1; A <= 31; A += 1) v(A).replace(/\[|\]/g, "") === d && (this.day = A);
1182
- }], w: [r, c("week")], ww: [o, c("week")], M: [r, c("month")], MM: [o, c("month")], MMM: [s, function(d) {
1183
- var v = i("months"), O = (i("monthsShort") || v.map((function(A) {
1184
- return A.slice(0, 3);
1091
+ }], s: [o, v("seconds")], ss: [o, v("seconds")], m: [o, v("minutes")], mm: [o, v("minutes")], H: [o, v("hours")], h: [o, v("hours")], HH: [o, v("hours")], hh: [o, v("hours")], D: [o, v("day")], DD: [r, v("day")], Do: [i, function(d) {
1092
+ var w = s.ordinal, C = d.match(/\d+/);
1093
+ if (this.day = C[0], w) for (var b = 1; b <= 31; b += 1) w(b).replace(/\[|\]/g, "") === d && (this.day = b);
1094
+ }], w: [o, v("week")], ww: [r, v("week")], M: [o, v("month")], MM: [r, v("month")], MMM: [i, function(d) {
1095
+ var w = f("months"), C = (f("monthsShort") || w.map((function(b) {
1096
+ return b.slice(0, 3);
1185
1097
  }))).indexOf(d) + 1;
1186
- if (O < 1) throw new Error();
1187
- this.month = O % 12 || O;
1188
- }], MMMM: [s, function(d) {
1189
- var v = i("months").indexOf(d) + 1;
1190
- if (v < 1) throw new Error();
1191
- this.month = v % 12 || v;
1192
- }], Y: [/[+-]?\d+/, c("year")], YY: [o, function(d) {
1193
- this.year = h(d);
1194
- }], YYYY: [/\d{4}/, c("year")], Z: S, ZZ: S };
1195
- function _(d) {
1196
- var v, O;
1197
- v = d, O = u && u.formats;
1198
- for (var A = (d = v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(C, P, $) {
1199
- var V = $ && $.toUpperCase();
1200
- return P || O[$] || a[$] || O[V].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(b, D, g) {
1201
- return D || g.slice(1);
1098
+ if (C < 1) throw new Error();
1099
+ this.month = C % 12 || C;
1100
+ }], MMMM: [i, function(d) {
1101
+ var w = f("months").indexOf(d) + 1;
1102
+ if (w < 1) throw new Error();
1103
+ this.month = w % 12 || w;
1104
+ }], Y: [/[+-]?\d+/, v("year")], YY: [r, function(d) {
1105
+ this.year = c(d);
1106
+ }], YYYY: [/\d{4}/, v("year")], Z: g, ZZ: g };
1107
+ function T(d) {
1108
+ var w, C;
1109
+ w = d, C = s && s.formats;
1110
+ for (var b = (d = w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(u, D, I) {
1111
+ var B = I && I.toUpperCase();
1112
+ return D || C[I] || a[I] || C[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(p, y, S) {
1113
+ return y || S.slice(1);
1202
1114
  }));
1203
- }))).match(l), Y = A.length, I = 0; I < Y; I += 1) {
1204
- var T = A[I], f = w[T], M = f && f[0], p = f && f[1];
1205
- A[I] = p ? { regex: M, parser: p } : T.replace(/^\[|\]$/g, "");
1115
+ }))).match(l), P = b.length, Y = 0; Y < P; Y += 1) {
1116
+ var L = b[Y], x = A[L], M = x && x[0], $ = x && x[1];
1117
+ b[Y] = $ ? { regex: M, parser: $ } : L.replace(/^\[|\]$/g, "");
1206
1118
  }
1207
- return function(C) {
1208
- for (var P = {}, $ = 0, V = 0; $ < Y; $ += 1) {
1209
- var b = A[$];
1210
- if (typeof b == "string") V += b.length;
1119
+ return function(u) {
1120
+ for (var D = {}, I = 0, B = 0; I < P; I += 1) {
1121
+ var p = b[I];
1122
+ if (typeof p == "string") B += p.length;
1211
1123
  else {
1212
- var D = b.regex, g = b.parser, y = C.slice(V), k = D.exec(y)[0];
1213
- g.call(P, k), C = C.replace(k, "");
1124
+ var y = p.regex, S = p.parser, V = u.slice(B), k = y.exec(V)[0];
1125
+ S.call(D, k), u = u.replace(k, "");
1214
1126
  }
1215
1127
  }
1216
- return (function(L) {
1217
- var E = L.afternoon;
1218
- if (E !== void 0) {
1219
- var B = L.hours;
1220
- E ? B < 12 && (L.hours += 12) : B === 12 && (L.hours = 0), delete L.afternoon;
1128
+ return (function(O) {
1129
+ var _ = O.afternoon;
1130
+ if (_ !== void 0) {
1131
+ var E = O.hours;
1132
+ _ ? E < 12 && (O.hours += 12) : E === 12 && (O.hours = 0), delete O.afternoon;
1221
1133
  }
1222
- })(P), P;
1134
+ })(D), D;
1223
1135
  };
1224
1136
  }
1225
- return function(d, v, O) {
1226
- O.p.customParseFormat = !0, d && d.parseTwoDigitYear && (h = d.parseTwoDigitYear);
1227
- var A = v.prototype, Y = A.parse;
1228
- A.parse = function(I) {
1229
- var T = I.date, f = I.utc, M = I.args;
1230
- this.$u = f;
1231
- var p = M[1];
1232
- if (typeof p == "string") {
1233
- var C = M[2] === !0, P = M[3] === !0, $ = C || P, V = M[2];
1234
- P && (V = M[2]), u = this.$locale(), !C && V && (u = O.Ls[V]), this.$d = (function(y, k, L, E) {
1137
+ return function(d, w, C) {
1138
+ C.p.customParseFormat = !0, d && d.parseTwoDigitYear && (c = d.parseTwoDigitYear);
1139
+ var b = w.prototype, P = b.parse;
1140
+ b.parse = function(Y) {
1141
+ var L = Y.date, x = Y.utc, M = Y.args;
1142
+ this.$u = x;
1143
+ var $ = M[1];
1144
+ if (typeof $ == "string") {
1145
+ var u = M[2] === !0, D = M[3] === !0, I = u || D, B = M[2];
1146
+ D && (B = M[2]), s = this.$locale(), !u && B && (s = C.Ls[B]), this.$d = (function(V, k, O, _) {
1235
1147
  try {
1236
- if (["x", "X"].indexOf(k) > -1) return new Date((k === "X" ? 1e3 : 1) * y);
1237
- var B = _(k)(y), H = B.year, R = B.month, W = B.day, z = B.hours, G = B.minutes, Z = B.seconds, oe = B.milliseconds, X = B.zone, K = B.week, Q = /* @__PURE__ */ new Date(), te = W || (H || R ? 1 : Q.getDate()), ae = H || Q.getFullYear(), pe = 0;
1238
- H && !R || (pe = R > 0 ? R - 1 : Q.getMonth());
1239
- var ge, Ve = z || 0, Oe = G || 0, Ye = Z || 0, Ie = oe || 0;
1240
- return X ? new Date(Date.UTC(ae, pe, te, Ve, Oe, Ye, Ie + 60 * X.offset * 1e3)) : L ? new Date(Date.UTC(ae, pe, te, Ve, Oe, Ye, Ie)) : (ge = new Date(ae, pe, te, Ve, Oe, Ye, Ie), K && (ge = E(ge).week(K).toDate()), ge);
1148
+ if (["x", "X"].indexOf(k) > -1) return new Date((k === "X" ? 1e3 : 1) * V);
1149
+ var E = T(k)(V), H = E.year, R = E.month, F = E.day, q = E.hours, K = E.minutes, Q = E.seconds, ee = E.milliseconds, te = E.zone, G = E.week, J = /* @__PURE__ */ new Date(), ae = F || (H || R ? 1 : J.getDate()), ne = H || J.getFullYear(), be = 0;
1150
+ H && !R || (be = R > 0 ? R - 1 : J.getMonth());
1151
+ var ye, Ye = q || 0, Ie = K || 0, Be = Q || 0, Le = ee || 0;
1152
+ return te ? new Date(Date.UTC(ne, be, ae, Ye, Ie, Be, Le + 60 * te.offset * 1e3)) : O ? new Date(Date.UTC(ne, be, ae, Ye, Ie, Be, Le)) : (ye = new Date(ne, be, ae, Ye, Ie, Be, Le), G && (ye = _(ye).week(G).toDate()), ye);
1241
1153
  } catch {
1242
1154
  return /* @__PURE__ */ new Date("");
1243
1155
  }
1244
- })(T, p, f, O), this.init(), V && V !== !0 && (this.$L = this.locale(V).$L), $ && T != this.format(p) && (this.$d = /* @__PURE__ */ new Date("")), u = {};
1245
- } else if (p instanceof Array) for (var b = p.length, D = 1; D <= b; D += 1) {
1246
- M[1] = p[D - 1];
1247
- var g = O.apply(this, M);
1248
- if (g.isValid()) {
1249
- this.$d = g.$d, this.$L = g.$L, this.init();
1156
+ })(L, $, x, C), this.init(), B && B !== !0 && (this.$L = this.locale(B).$L), I && L != this.format($) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
1157
+ } else if ($ instanceof Array) for (var p = $.length, y = 1; y <= p; y += 1) {
1158
+ M[1] = $[y - 1];
1159
+ var S = C.apply(this, M);
1160
+ if (S.isValid()) {
1161
+ this.$d = S.$d, this.$L = S.$L, this.init();
1250
1162
  break;
1251
1163
  }
1252
- D === b && (this.$d = /* @__PURE__ */ new Date(""));
1164
+ y === p && (this.$d = /* @__PURE__ */ new Date(""));
1253
1165
  }
1254
- else Y.call(this, I);
1166
+ else P.call(this, Y);
1255
1167
  };
1256
1168
  };
1257
1169
  }));
1258
- })(we)), we.exports;
1170
+ })(Se)), Se.exports;
1259
1171
  }
1260
- var Ma = Sa();
1261
- const ka = /* @__PURE__ */ xt(Ma);
1262
- ie.extend(ka);
1263
- function ue(e, t) {
1172
+ var Pa = $a();
1173
+ const _a = /* @__PURE__ */ Ct(Pa);
1174
+ ie.extend(_a);
1175
+ function de(e, t) {
1264
1176
  if (e == null || e === "")
1265
1177
  return;
1266
1178
  const a = typeof e == "string" && t ? ie(e, t, !0) : void 0, l = a != null && a.isValid() ? a : ie(e);
1267
1179
  return l.isValid() ? l.startOf("day") : void 0;
1268
1180
  }
1269
- function it(e, t) {
1270
- const a = e.startOf("month"), l = (a.day() - t + 7) % 7, n = a.subtract(l, "day"), o = Math.ceil((l + a.daysInMonth()) / 7) * 7;
1271
- return Array.from({ length: o }, (r, s) => n.add(s, "day"));
1181
+ function ut(e, t) {
1182
+ const a = e.startOf("month"), l = (a.day() - t + 7) % 7, n = a.subtract(l, "day"), r = Math.ceil((l + a.daysInMonth()) / 7) * 7;
1183
+ return Array.from({ length: r }, (o, i) => n.add(i, "day"));
1272
1184
  }
1273
- function Aa(e, t, a, l) {
1274
- const n = e.startOf("month"), o = n.add(a ? 2 : 1, "month").subtract(1, "day"), r = t.isBefore(n, "day") ? n : t.isAfter(o, "day") ? o : t, s = o.diff(n, "day");
1275
- for (let u = 0; u <= s; u++) {
1276
- const h = r.add(u, "day");
1277
- if (!h.isAfter(o, "day") && !l(h))
1278
- return h;
1279
- const c = r.subtract(u, "day");
1280
- if (u && !c.isBefore(n, "day") && !l(c))
1185
+ function Ta(e, t, a, l) {
1186
+ const n = e.startOf("month"), r = n.add(a ? 2 : 1, "month").subtract(1, "day"), o = t.isBefore(n, "day") ? n : t.isAfter(r, "day") ? r : t, i = r.diff(n, "day");
1187
+ for (let s = 0; s <= i; s++) {
1188
+ const c = o.add(s, "day");
1189
+ if (!c.isAfter(r, "day") && !l(c))
1281
1190
  return c;
1191
+ const v = o.subtract(s, "day");
1192
+ if (s && !v.isBefore(n, "day") && !l(v))
1193
+ return v;
1282
1194
  }
1283
1195
  }
1284
1196
  function $t(e, t) {
1285
1197
  return e.isAfter(t, "day") ? [t, e] : [e, t];
1286
1198
  }
1287
- function xa(e) {
1199
+ function Pt(e, t, a) {
1200
+ if (t.isBefore(e, "day"))
1201
+ return !1;
1202
+ if (!a)
1203
+ return !0;
1204
+ if (a(e, "start") || a(t, "end"))
1205
+ return !1;
1206
+ for (let l = e.add(1, "day"); l.isBefore(t, "day"); l = l.add(1, "day"))
1207
+ if (a(l, "start") && a(l, "end"))
1208
+ return !1;
1209
+ return !0;
1210
+ }
1211
+ function Va(e) {
1288
1212
  return /^(en-US|en-CA|ja|ko|zh-TW|zh-HK)/i.test(e) ? 0 : 1;
1289
1213
  }
1290
- function $a(e, t, a, l = !1) {
1214
+ function Oa(e, t, a, l = !1) {
1291
1215
  switch (t) {
1292
1216
  case "ArrowLeft":
1293
1217
  return e.subtract(1, "day");
@@ -1309,88 +1233,216 @@ function $a(e, t, a, l = !1) {
1309
1233
  return;
1310
1234
  }
1311
1235
  }
1312
- const Ca = {
1236
+ const Ya = {
1313
1237
  previous: "M10.53 2.97a.75.75 0 0 1 0 1.06L6.56 8l3.97 3.97a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 0",
1314
1238
  next: "M5.47 2.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 0-1.06Z"
1315
1239
  };
1316
- function _a(e, t, a) {
1317
- const { month: l, range: n, locale: o, firstDay: r, yearOpen: s } = t, u = l.add(1, "month"), h = new Intl.DateTimeFormat(o, { month: "long", year: "numeric" }), c = h.format(l.toDate()), S = new Intl.DateTimeFormat(o, { weekday: "short" }), i = new Intl.DateTimeFormat(o, { dateStyle: "full" }), x = (f) => e("svg", { viewBox: "0 0 16 16", width: 16, height: 16, fill: "none", "aria-hidden": "true" }, e("path", { d: Ca[f], fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" })), w = (f) => e("button", { type: "button", className: "dsh-calendar__nav", "aria-label": f < 0 ? "Previous" : "Next", onClick: () => a.month(l.add(f * (n ? 2 : 1), "month")) }, x(f < 0 ? "previous" : "next")), _ = t.anchor && t.hover ? $t(t.anchor, t.hover) : t.selected, d = Aa(l, t.focused, n, t.disabled), v = Array.from({ length: n ? 2 : 1 }, (f, M) => {
1318
- const p = l.add(M, "month"), C = it(p, r), P = Array.from({ length: C.length / 7 }, ($, V) => e("tr", { key: V }, ...C.slice(V * 7, V * 7 + 7).map((b) => {
1319
- var B, H, R;
1320
- const D = b.month() !== p.month(), g = t.disabled(b), y = !D && n && !!((B = _[0]) != null && B.isSame(b, "day")), k = !D && n && !!((H = _[1]) != null && H.isSame(b, "day")), L = !D && (n ? !!(_[0] && _[1] && !b.isBefore(_[0], "day") && !b.isAfter(_[1], "day")) : !!((R = t.selected[0]) != null && R.isSame(b, "day"))), E = !D && !g && !!(d != null && d.isSame(b, "day"));
1321
- return e("td", { key: b.format("YYYY-MM-DD"), role: "gridcell", "aria-selected": L, "aria-disabled": g || void 0 }, e("button", {
1240
+ function Ia(e, t, a) {
1241
+ const { month: l, range: n, locale: r, firstDay: o, yearOpen: i } = t, s = l.add(1, "month"), c = new Intl.DateTimeFormat(r, { month: "long", year: "numeric" }), v = c.format(l.toDate()), g = new Intl.DateTimeFormat(r, { weekday: "short" }), f = new Intl.DateTimeFormat(r, { dateStyle: "full" }), h = (x) => e("svg", { viewBox: "0 0 16 16", width: 16, height: 16, fill: "none", "aria-hidden": "true" }, e("path", { d: Ya[x], fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" })), A = (x) => e("button", { type: "button", className: "dsh-calendar__nav", "aria-label": x < 0 ? "Previous" : "Next", onClick: () => a.month(l.add(x * (n ? 2 : 1), "month")) }, h(x < 0 ? "previous" : "next")), T = t.anchor && t.hover ? $t(t.anchor, t.hover) : t.selected, d = Ta(l, t.focused, n, t.disabled), w = Array.from({ length: n ? 2 : 1 }, (x, M) => {
1242
+ const $ = l.add(M, "month"), u = ut($, o), D = Array.from({ length: u.length / 7 }, (I, B) => e("tr", { key: B }, ...u.slice(B * 7, B * 7 + 7).map((p) => {
1243
+ var E, H, R;
1244
+ const y = p.month() !== $.month(), S = t.disabled(p), V = !y && n && !!((E = T[0]) != null && E.isSame(p, "day")), k = !y && n && !!((H = T[1]) != null && H.isSame(p, "day")), O = !y && (n ? !!(T[0] && T[1] && !p.isBefore(T[0], "day") && !p.isAfter(T[1], "day")) : !!((R = t.selected[0]) != null && R.isSame(p, "day"))), _ = !y && !S && !!(d != null && d.isSame(p, "day"));
1245
+ return e("td", { key: p.format("YYYY-MM-DD"), role: "gridcell", "aria-selected": O, "aria-disabled": S || void 0 }, e("button", {
1322
1246
  type: "button",
1323
1247
  className: "dsh-calendar__cell arco-picker-cell",
1324
- "data-date": b.format("YYYY-MM-DD"),
1325
- "data-outside-month": D || void 0,
1326
- "data-selected": L || void 0,
1327
- "data-selection-start": y || void 0,
1248
+ "data-date": p.format("YYYY-MM-DD"),
1249
+ "data-outside-month": y || void 0,
1250
+ "data-selected": O || void 0,
1251
+ "data-selection-start": V || void 0,
1328
1252
  "data-selection-end": k || void 0,
1329
- "data-today": !D && b.isSame(ie(), "day") || void 0,
1330
- "data-disabled": g || void 0,
1331
- "aria-label": i.format(b.toDate()),
1332
- tabIndex: E && !s ? 0 : -1,
1333
- disabled: g,
1334
- onClick: () => a.select(b),
1335
- onMouseEnter: (W) => {
1336
- a.hover(b), t.anchor && !g && (a.focus(b), W.currentTarget.focus({ preventScroll: !0 }));
1253
+ "data-today": !y && p.isSame(ie(), "day") || void 0,
1254
+ "data-disabled": S || void 0,
1255
+ "aria-label": f.format(p.toDate()),
1256
+ tabIndex: _ && !i ? 0 : -1,
1257
+ disabled: S,
1258
+ onClick: () => a.select(p),
1259
+ onMouseEnter: (F) => {
1260
+ a.hover(p), t.anchor && !S && (a.focus(p), F.currentTarget.focus({ preventScroll: !0 }));
1337
1261
  },
1338
- onFocus: () => a.focus(b),
1339
- onKeyDown: (W) => {
1340
- const z = $a(b, W.key, r, W.shiftKey);
1341
- z && (W.preventDefault(), !t.disabled(z) && (a.focus(z), !z.isSame(l, "month") && !(n && z.isSame(u, "month")) && a.month(z.startOf("month")), requestAnimationFrame(() => {
1342
- var Z;
1343
- const G = W.target.closest(".dsh-calendar");
1344
- (Z = G == null ? void 0 : G.querySelector(`[data-date="${z.format("YYYY-MM-DD")}"]:not([data-outside-month])`)) == null || Z.focus();
1262
+ onFocus: () => a.focus(p),
1263
+ onKeyDown: (F) => {
1264
+ const q = Oa(p, F.key, o, F.shiftKey);
1265
+ q && (F.preventDefault(), !t.disabled(q) && (a.focus(q), !q.isSame(l, "month") && !(n && q.isSame(s, "month")) && a.month(q.startOf("month")), requestAnimationFrame(() => {
1266
+ var Q;
1267
+ const K = F.target.closest(".dsh-calendar");
1268
+ (Q = K == null ? void 0 : K.querySelector(`[data-date="${q.format("YYYY-MM-DD")}"]:not([data-outside-month])`)) == null || Q.focus();
1345
1269
  })));
1346
1270
  }
1347
- }, n ? e("span", { className: "dsh-calendar__cell-button" }, b.date()) : String(b.date())));
1271
+ }, n ? e("span", { className: "dsh-calendar__cell-button" }, p.date()) : String(p.date())));
1348
1272
  })));
1349
1273
  return e(
1350
1274
  "table",
1351
- { className: "dsh-calendar__grid", key: M, role: "grid", "aria-label": h.format(p.toDate()) },
1352
- e("thead", {}, e("tr", {}, ...C.slice(0, 7).map(($) => e("th", { className: "dsh-calendar__weekday", key: $.day(), scope: "col" }, S.format($.toDate()))))),
1353
- e("tbody", {}, ...P)
1275
+ { className: "dsh-calendar__grid", key: M, role: "grid", "aria-label": c.format($.toDate()) },
1276
+ e("thead", {}, e("tr", {}, ...u.slice(0, 7).map((I) => e("th", { className: "dsh-calendar__weekday", key: I.day(), scope: "col" }, g.format(I.toDate()))))),
1277
+ e("tbody", {}, ...D)
1354
1278
  );
1355
- }), O = n ? e("button", { type: "button", className: "dsh-calendar__heading", "aria-expanded": s, onClick: () => a.year(!s) }, c) : e("button", { type: "button", className: "dsh-calendar__year-trigger arco-picker-header-label", "aria-expanded": s, "data-open": s || void 0, onClick: () => a.year(!s) }, e("span", {}, c), x("next")), A = n ? e("span", { className: "dsh-calendar__heading dsh-calendar__heading--next" }, h.format(u.toDate())) : null, Y = Math.min(1900, Math.floor(l.year() / 100) * 100), I = Math.max(2099, Math.floor(l.year() / 100) * 100 + 99), T = s ? e("div", { className: "dsh-calendar__years", role: "listbox", "aria-label": "Year", tabIndex: -1, style: { top: "40px", height: `${28 + it(l, r).length / 7 * 36}px` } }, ...Array.from({ length: I - Y + 1 }, (f, M) => {
1356
- const p = Y + M;
1279
+ }), C = n ? e("button", { type: "button", className: "dsh-calendar__heading", "aria-expanded": i, onClick: () => a.year(!i) }, v) : e("button", { type: "button", className: "dsh-calendar__year-trigger arco-picker-header-label", "aria-expanded": i, "data-open": i || void 0, onClick: () => a.year(!i) }, e("span", {}, v), h("next")), b = n ? e("span", { className: "dsh-calendar__heading dsh-calendar__heading--next" }, c.format(s.toDate())) : null, P = Math.min(1900, Math.floor(l.year() / 100) * 100), Y = Math.max(2099, Math.floor(l.year() / 100) * 100 + 99), L = i ? e("div", { className: "dsh-calendar__years", role: "listbox", "aria-label": "Year", tabIndex: -1, style: { top: "40px", height: `${28 + ut(l, o).length / 7 * 36}px` } }, ...Array.from({ length: Y - P + 1 }, (x, M) => {
1280
+ const $ = P + M;
1357
1281
  return e("button", {
1358
- key: p,
1282
+ key: $,
1359
1283
  type: "button",
1360
1284
  className: "dsh-calendar__year",
1361
1285
  role: "option",
1362
- "data-year": p,
1363
- "aria-selected": p === l.year(),
1364
- "data-selected": p === l.year() || void 0,
1365
- tabIndex: p === l.year() ? 0 : -1,
1366
- onClick: () => a.yearSelect(p),
1367
- onKeyDown: (C) => {
1368
- var V, b;
1369
- if (C.key === "Escape") {
1370
- C.preventDefault(), a.year(!1);
1286
+ "data-year": $,
1287
+ "aria-selected": $ === l.year(),
1288
+ "data-selected": $ === l.year() || void 0,
1289
+ tabIndex: $ === l.year() ? 0 : -1,
1290
+ onClick: () => a.yearSelect($),
1291
+ onKeyDown: (u) => {
1292
+ var B, p;
1293
+ if (u.key === "Escape") {
1294
+ u.preventDefault(), a.year(!1);
1371
1295
  return;
1372
1296
  }
1373
- const P = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -3, ArrowDown: 3 }[C.key];
1374
- if (P === void 0 && C.key !== "Home" && C.key !== "End")
1297
+ const D = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -3, ArrowDown: 3 }[u.key];
1298
+ if (D === void 0 && u.key !== "Home" && u.key !== "End")
1375
1299
  return;
1376
- C.preventDefault();
1377
- const $ = C.key === "Home" ? Y : C.key === "End" ? I : Math.max(Y, Math.min(I, p + (P ?? 0)));
1378
- (b = (V = C.target.closest(".dsh-calendar__years")) == null ? void 0 : V.querySelector(`[data-year="${$}"]`)) == null || b.focus();
1300
+ u.preventDefault();
1301
+ const I = u.key === "Home" ? P : u.key === "End" ? Y : Math.max(P, Math.min(Y, $ + (D ?? 0)));
1302
+ (p = (B = u.target.closest(".dsh-calendar__years")) == null ? void 0 : B.querySelector(`[data-year="${I}"]`)) == null || p.focus();
1379
1303
  }
1380
- }, p);
1304
+ }, $);
1381
1305
  })) : null;
1382
1306
  return e(
1383
1307
  "div",
1384
- { className: `dsh-calendar${n ? " dsh-calendar--range" : ""}`, "data-year-open": s || void 0 },
1385
- e("div", { className: "dsh-calendar__header" }, w(-1), O, A, w(1)),
1386
- e("div", { className: "dsh-calendar__grids" }, ...v),
1387
- T
1308
+ { className: `dsh-calendar${n ? " dsh-calendar--range" : ""}`, "data-year-open": i || void 0 },
1309
+ e("div", { className: "dsh-calendar__header" }, A(-1), C, b, A(1)),
1310
+ e("div", { className: "dsh-calendar__grids" }, ...w),
1311
+ L
1388
1312
  );
1389
1313
  }
1390
- const Ct = (e, t, ...a) => {
1391
- const { className: l, fillRule: n, clipRule: o, suppressContentEditableWarning: r, onKeyDown: s, onBeforeInput: u, onMouseEnter: h, onBlur: c, ...S } = t;
1392
- return m(e, { ...S, class: l, "fill-rule": n, "clip-rule": o, onKeydown: s, onBeforeinput: u, onMouseenter: h, onFocusout: c }, a);
1393
- }, _t = F({
1314
+ function Ba(e) {
1315
+ return (e.match(/YYYY|MM?|DD?|\[[^\]]*\]|./g) ?? []).map((t) => ({
1316
+ unit: t === "YYYY" ? "year" : /^M+$/.test(t) ? "month" : /^D+$/.test(t) ? "day" : void 0,
1317
+ text: t.startsWith("[") ? t.slice(1, -1) : t
1318
+ }));
1319
+ }
1320
+ function ze(e) {
1321
+ if (e.year === void 0 || e.month === void 0 || e.day === void 0)
1322
+ return;
1323
+ const t = ie().date(1).year(Math.max(1, Math.min(9999, e.year))).month(Math.max(1, Math.min(12, e.month)) - 1);
1324
+ return t.date(Math.max(1, Math.min(e.day, t.daysInMonth()))).startOf("day");
1325
+ }
1326
+ function La(e, t) {
1327
+ const { dates: a, range: l, draft: n, disabled: r, readonly: o } = t, i = a.map((f) => (f == null ? void 0 : f.format("YYYY-MM-DD")) ?? "").join("/");
1328
+ i !== n.source && (n.source = i, n.parts = a.map((f) => f ? { year: f.year(), month: f.month() + 1, day: f.date() } : {}));
1329
+ const s = (f, h, A) => {
1330
+ var w, C;
1331
+ const T = (w = n.parts)[f] ?? (w[f] = {});
1332
+ T[h] = A;
1333
+ const d = ze(T);
1334
+ if (d && !((C = t.disabledDate) != null && C.call(t, d, f === 0 ? "start" : "end"))) {
1335
+ const b = Array.from({ length: l ? 2 : 1 }, (L, x) => ze(n.parts[x] ?? {}));
1336
+ b[f] = d;
1337
+ const [P, Y] = b;
1338
+ (!l || P && Y && Pt(P, Y, t.disabledDate)) && t.change(b);
1339
+ }
1340
+ A === void 0 && a[f] && t.change([]), t.invalidate();
1341
+ }, c = (f, h) => {
1342
+ var d;
1343
+ const A = f.closest(".dsh-date-input"), T = Array.from((A == null ? void 0 : A.querySelectorAll("[role=spinbutton]")) ?? []);
1344
+ (d = T[T.indexOf(f) + h]) == null || d.focus();
1345
+ }, v = Array.from({ length: l ? 2 : 1 }, (f, h) => {
1346
+ var d;
1347
+ const A = typeof t.placeholder == "string" ? t.placeholder : (d = t.placeholder) == null ? void 0 : d[h], T = Object.values(n.parts[h] ?? {}).every((w) => w === void 0);
1348
+ return e("div", { className: "dsh-date-input__field", key: h, "data-placeholder": T && A || void 0 }, ...Ba(t.format).map(({ unit: w, text: C }, b) => {
1349
+ var $;
1350
+ if (!w)
1351
+ return e("span", { key: b, className: "dsh-date-input__literal", "aria-hidden": !0 }, C);
1352
+ const P = ($ = n.parts)[h] ?? ($[h] = {}), Y = P[w], L = w === "year" ? 9999 : w === "month" ? 12 : ze({ year: P.year ?? 2e3, month: P.month ?? 1, day: 1 }).daysInMonth(), x = `${h}-${w}`, M = (u, D) => {
1353
+ if (r || o || !/^\d+$/.test(u))
1354
+ return;
1355
+ const I = (n.target === x ? n.buffer : "") + u, B = Number(I) > L ? u : I;
1356
+ n.target = x, n.buffer = B, Number(B) > 0 && s(h, w, Math.min(L, Number(B))), (B.length >= (w === "year" ? 4 : 2) || +(B + "0") > L) && (n.buffer = "", c(D, 1));
1357
+ };
1358
+ return e("span", {
1359
+ key: b,
1360
+ className: "dsh-date-input__segment",
1361
+ role: "spinbutton",
1362
+ tabIndex: r ? -1 : 0,
1363
+ contentEditable: !r && !o,
1364
+ suppressContentEditableWarning: !0,
1365
+ spellCheck: !1,
1366
+ inputMode: "numeric",
1367
+ "aria-label": `${w}, ${t.label}${l ? h === 0 ? ", start" : ", end" : ""}`,
1368
+ "aria-valuenow": Y,
1369
+ "aria-valuemin": 1,
1370
+ "aria-valuemax": L,
1371
+ "aria-disabled": r || void 0,
1372
+ "aria-readonly": o || void 0,
1373
+ "data-placeholder": Y === void 0 || void 0,
1374
+ onFocus: () => {
1375
+ n.target = x, n.buffer = "";
1376
+ },
1377
+ onClick: (u) => u.stopPropagation(),
1378
+ onBeforeInput: (u) => {
1379
+ var D;
1380
+ u.preventDefault(), M(u.data ?? ((D = u.nativeEvent) == null ? void 0 : D.data) ?? "", u.target);
1381
+ },
1382
+ onPaste: (u) => {
1383
+ var D;
1384
+ u.preventDefault(), M(((D = u.clipboardData) == null ? void 0 : D.getData("text")) ?? "", u.target);
1385
+ },
1386
+ onKeyDown: (u) => {
1387
+ if (u.altKey && u.key === "ArrowDown") {
1388
+ u.preventDefault(), t.toggle();
1389
+ return;
1390
+ }
1391
+ if (u.key === "ArrowLeft" || u.key === "ArrowRight") {
1392
+ u.preventDefault(), c(u.target, u.key === "ArrowLeft" ? -1 : 1);
1393
+ return;
1394
+ }
1395
+ if (!(r || o)) {
1396
+ if (/^\d$/.test(u.key)) {
1397
+ u.preventDefault(), M(u.key, u.target);
1398
+ return;
1399
+ }
1400
+ if (u.key === "Backspace" || u.key === "Delete") {
1401
+ u.preventDefault(), n.buffer = "", s(h, w, void 0);
1402
+ return;
1403
+ }
1404
+ if (["ArrowUp", "ArrowDown", "Home", "End"].includes(u.key)) {
1405
+ u.preventDefault(), n.buffer = "";
1406
+ const D = u.key === "Home" ? 1 : u.key === "End" ? L : (Y ?? 0) + (u.key === "ArrowUp" ? 1 : -1);
1407
+ s(h, w, D < 1 ? L : D > L ? 1 : D);
1408
+ }
1409
+ }
1410
+ }
1411
+ }, Y === void 0 ? w === "year" ? "yyyy" : w === "month" ? "mm" : "dd" : String(Y).padStart(C.length, "0"));
1412
+ }));
1413
+ }), g = [v[0]];
1414
+ return l && g.push(e("span", { className: "dsh-date-input__separator", "aria-hidden": !0 }, "-"), v[1]), g.push(e("button", {
1415
+ type: "button",
1416
+ className: "dsh-date-input__trigger",
1417
+ id: t.id,
1418
+ disabled: r,
1419
+ "aria-label": "Calendar",
1420
+ "aria-haspopup": "dialog",
1421
+ "aria-expanded": t.open,
1422
+ onClick: (f) => {
1423
+ f.stopPropagation(), t.toggle();
1424
+ }
1425
+ }, e("span", { className: "dsh-date-input__indicator" }, e("svg", { viewBox: "0 0 13 14", width: 14, height: 14, fill: "none", "aria-hidden": !0 }, e("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M3.75 4.5A.75.75 0 0 1 3 3.75v-.748a1.5 1.5 0 0 0-1.5 1.5v1h10v-1a1.5 1.5 0 0 0-1.5-1.5v.75a.75.75 0 1 1-1.5 0v-.75h-4v.747a.75.75 0 0 1-.75.75ZM8.5 1.501h-4V.75a.75.75 0 0 0-1.5 0v.752a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-6a3 3 0 0 0-3-3v-.75a.75.75 0 0 0-1.5 0v.75Zm-7 5.5v3.5a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-3.5h-10Z" }))))), t.allowClear && a.some(Boolean) && !o && !r && g.push(e("button", { type: "button", className: "dsh-date-input__clear", "aria-label": "Clear", onClick: (f) => {
1426
+ var h;
1427
+ f.stopPropagation(), t.change([]), (h = t.onClear) == null || h.call(t);
1428
+ } }, "×")), e("div", {
1429
+ className: "dsh-date-input",
1430
+ role: "group",
1431
+ "aria-label": t.label,
1432
+ "data-size": t.size,
1433
+ "data-disabled": r || void 0,
1434
+ onBlur: (f) => {
1435
+ (!(f.relatedTarget instanceof Node) || !f.currentTarget.contains(f.relatedTarget)) && (n.source = "\0", n.buffer = "", t.invalidate());
1436
+ },
1437
+ onClick: () => {
1438
+ !r && !o && t.toggle();
1439
+ }
1440
+ }, ...g);
1441
+ }
1442
+ const _t = (e, t, ...a) => {
1443
+ const { className: l, fillRule: n, clipRule: r, suppressContentEditableWarning: o, onKeyDown: i, onBeforeInput: s, onMouseEnter: c, onBlur: v, ...g } = t;
1444
+ return m(e, { ...g, class: l, "fill-rule": n, "clip-rule": r, onKeydown: i, onBeforeinput: s, onMouseenter: c, onFocusout: v }, a);
1445
+ }, Tt = N({
1394
1446
  name: "DshCalendarPanel",
1395
1447
  props: {
1396
1448
  standalone: Boolean,
@@ -1399,189 +1451,194 @@ const Ct = (e, t, ...a) => {
1399
1451
  view: { type: Object, required: !0 },
1400
1452
  locale: { type: String, required: !0 },
1401
1453
  weekStart: Number,
1402
- disabled: { type: Function, required: !0 },
1454
+ disabled: Function,
1403
1455
  onSelect: { type: Function, required: !0 },
1404
1456
  onView: { type: Function, required: !0 }
1405
1457
  },
1406
1458
  setup(e) {
1407
- const t = j(e.view.startOf("month")), a = j(e.value.at(-1) ?? e.view), l = q(!1), n = j(), o = j(), r = j();
1459
+ const t = W(e.view.startOf("month")), a = W(e.value.at(-1) ?? e.view), l = j(!1), n = W(), r = W(), o = W();
1408
1460
  le(() => e.view.valueOf(), () => {
1409
1461
  t.value = e.view.startOf("month"), !a.value.isSame(t.value, "month") && !(e.range && a.value.isSame(t.value.add(1, "month"), "month")) && (a.value = e.view);
1410
1462
  });
1411
- async function s(c) {
1412
- var x, w;
1413
- if (await re(), c) {
1414
- const _ = document.activeElement;
1415
- if (_ !== c && !(_ === document.body && (!c.isConnected || c.disabled)))
1463
+ async function i(g) {
1464
+ var A, T;
1465
+ if (await se(), g) {
1466
+ const d = document.activeElement;
1467
+ if (d !== g && !(d === document.body && (!g.isConnected || g.disabled)))
1416
1468
  return;
1417
1469
  }
1418
- const S = l.value ? ".dsh-calendar__year[data-selected]" : '.dsh-calendar__cell[tabindex="0"]', i = ((x = r.value) == null ? void 0 : x.querySelector(S)) ?? ((w = r.value) == null ? void 0 : w.querySelector(".dsh-calendar__year-trigger, .dsh-calendar__heading"));
1419
- i == null || i.focus({ preventScroll: !0 }), l.value && (i != null && i.parentElement) && (i.parentElement.scrollTop = Math.max(0, i.offsetTop - (i.parentElement.clientHeight - i.offsetHeight) / 2));
1470
+ const f = l.value ? ".dsh-calendar__year[data-selected]" : '.dsh-calendar__cell[tabindex="0"]', h = ((A = o.value) == null ? void 0 : A.querySelector(f)) ?? ((T = o.value) == null ? void 0 : T.querySelector(".dsh-calendar__year-trigger, .dsh-calendar__heading"));
1471
+ h == null || h.focus({ preventScroll: !0 }), l.value && (h != null && h.parentElement) && (h.parentElement.scrollTop = Math.max(0, h.offsetTop - (h.parentElement.clientHeight - h.offsetHeight) / 2));
1420
1472
  }
1421
- let u;
1422
- jt(() => {
1423
- var c;
1424
- u = ((c = r.value) == null ? void 0 : c.querySelector(".dsh-calendar__cell:focus")) ?? void 0;
1425
- }), ke(() => {
1426
- u && s(u);
1427
- }), he(() => {
1428
- e.standalone || s();
1473
+ let s;
1474
+ Xt(() => {
1475
+ var g;
1476
+ s = ((g = o.value) == null ? void 0 : g.querySelector(".dsh-calendar__cell:focus")) ?? void 0;
1477
+ }), Ae(() => {
1478
+ s && i(s);
1479
+ }), ve(() => {
1480
+ e.standalone || i();
1429
1481
  }), le(l, () => {
1430
- s();
1482
+ i();
1431
1483
  });
1432
- const h = (c) => {
1433
- e.onView(c);
1484
+ const c = (g) => {
1485
+ var f;
1486
+ return !!((f = e.disabled) != null && f.call(e, g, n.value ? "end" : "start"));
1487
+ }, v = (g) => {
1488
+ e.onView(g);
1434
1489
  };
1435
- return () => m("div", { ref: r, class: ["dsh-picker-popover", { "dsh-picker-popover--range": e.range, "dsh-calendar-standalone": e.standalone }] }, [_a(Ct, {
1490
+ return () => m("div", { ref: o, class: ["dsh-picker-popover", { "dsh-picker-popover--range": e.range, "dsh-calendar-standalone": e.standalone }] }, [Ia(_t, {
1436
1491
  month: t.value,
1437
1492
  focused: a.value,
1438
1493
  selected: e.value,
1439
1494
  anchor: n.value,
1440
- hover: o.value,
1495
+ hover: r.value,
1441
1496
  range: e.range,
1442
1497
  yearOpen: l.value,
1443
1498
  locale: e.locale,
1444
- firstDay: e.weekStart ?? xa(e.locale),
1445
- disabled: e.disabled
1499
+ firstDay: e.weekStart ?? Va(e.locale),
1500
+ disabled: c
1446
1501
  }, {
1447
- month: h,
1448
- focus: (c) => {
1449
- a.value = c;
1502
+ month: v,
1503
+ focus: (g) => {
1504
+ a.value = g;
1450
1505
  },
1451
- year: (c) => {
1452
- l.value = c;
1506
+ year: (g) => {
1507
+ l.value = g;
1453
1508
  },
1454
- hover: (c) => {
1455
- n.value && (o.value = c);
1509
+ hover: (g) => {
1510
+ n.value && (r.value = g);
1456
1511
  },
1457
- yearSelect: (c) => {
1458
- const S = t.value.year(c).date(Math.min(a.value.date(), t.value.year(c).daysInMonth()));
1459
- a.value = S, h(S), l.value = !1;
1512
+ yearSelect: (g) => {
1513
+ const f = t.value.year(g).date(Math.min(a.value.date(), t.value.year(g).daysInMonth()));
1514
+ a.value = f, v(f), l.value = !1;
1460
1515
  },
1461
- select: (c) => {
1462
- if (e.disabled(c))
1516
+ select: (g) => {
1517
+ if (c(g))
1463
1518
  return;
1464
- if (a.value = c, !e.range) {
1465
- e.onSelect([c], !0);
1519
+ if (a.value = g, !e.range) {
1520
+ e.onSelect([g], !0);
1466
1521
  return;
1467
1522
  }
1468
1523
  if (!n.value) {
1469
- n.value = c, o.value = c, e.onSelect([c], !1);
1524
+ n.value = g, r.value = g, e.onSelect([g], !1);
1470
1525
  return;
1471
1526
  }
1472
- const S = $t(n.value, c);
1473
- let i = S[0];
1474
- for (; !i.isAfter(S[1], "day"); ) {
1475
- if (e.disabled(i))
1476
- return;
1477
- i = i.add(1, "day");
1478
- }
1479
- n.value = void 0, o.value = void 0, e.onSelect(S, !0);
1527
+ const f = $t(n.value, g);
1528
+ Pt(f[0], f[1], e.disabled) && (n.value = void 0, r.value = void 0, e.onSelect(f, !0));
1480
1529
  }
1481
1530
  })]);
1482
1531
  }
1483
- });
1484
- function Pt(e) {
1485
- const t = e ? pt : vt, a = F({
1532
+ }), Ea = /* @__PURE__ */ new Set(["disabled", "readonly", "disabledInput", "showTime", "showNowBtn", "showConfirmBtn", "popupVisible", "defaultPopupVisible", "allowClear"]);
1533
+ function Vt(e) {
1534
+ const t = e ? pt : gt, a = N({
1486
1535
  name: e ? "DshRangePicker" : "DshDatePicker",
1487
1536
  inheritAttrs: !1,
1488
- setup(l, { attrs: n, slots: o, expose: r }) {
1489
- const s = se(), u = j(), h = j(), c = q(0), S = { parts: [], source: "", buffer: "" }, i = (T) => n[T] ?? n[T.replace(/[A-Z]/g, (f) => `-${f.toLowerCase()}`)], x = (T) => ue(T, String(i("valueFormat") ?? (typeof i("format") == "string" ? i("format") : "YYYY-MM-DD"))), w = j(i("defaultValue")), _ = q(!!i("defaultPopupVisible")), d = (T) => e && Array.isArray(T) ? T[0] : T, v = j(x(d(i("pickerValue") ?? i("defaultPickerValue") ?? i("modelValue") ?? i("defaultValue"))) ?? ie()), O = J(() => i("modelValue") === void 0 ? w.value : i("modelValue")), A = (T, ...f) => {
1490
- const M = n[T];
1491
- Array.isArray(M) ? M.forEach((p) => {
1492
- typeof p == "function" && p(...f);
1493
- }) : typeof M == "function" && M(...f);
1537
+ setup(l, { attrs: n, slots: r, expose: o }) {
1538
+ const i = ue(), s = me(xe, void 0), c = W(), v = W(), g = j(0), f = { parts: [], source: "", buffer: "" }, h = (x) => {
1539
+ const M = n[x] ?? n[x.replace(/[A-Z]/g, ($) => `-${$.toLowerCase()}`)];
1540
+ return M === "" && Ea.has(x) ? !0 : M;
1541
+ }, A = (x) => de(x, String(h("valueFormat") ?? (typeof h("format") == "string" ? h("format") : "YYYY-MM-DD"))), T = W(h("defaultValue")), d = j(!!h("defaultPopupVisible")), w = (x) => e && Array.isArray(x) ? x[0] : x, C = W(A(w(h("pickerValue") ?? h("defaultPickerValue") ?? h("modelValue") ?? h("defaultValue"))) ?? ie()), b = Z(() => "modelValue" in n || "model-value" in n ? h("modelValue") : T.value);
1542
+ le(() => {
1543
+ var x;
1544
+ return (x = A(w(b.value))) == null ? void 0 : x.valueOf();
1545
+ }, (x) => {
1546
+ x !== void 0 && (C.value = ie(x));
1547
+ });
1548
+ const P = (x, ...M) => {
1549
+ const $ = n[x];
1550
+ Array.isArray($) ? $.forEach((u) => {
1551
+ typeof u == "function" && u(...M);
1552
+ }) : typeof $ == "function" && $(...M);
1494
1553
  };
1495
- r(new Proxy({}, { get: (T, f) => {
1496
- var M;
1497
- return f === "focus" ? (p = 0) => {
1498
- var C, P, $, V;
1499
- h.value ? (P = (C = h.value.querySelectorAll(".dsh-date-input__field")[p]) == null ? void 0 : C.querySelector("[role=spinbutton]")) == null || P.focus() : (V = ($ = u.value) == null ? void 0 : $.focus) == null || V.call($, p);
1500
- } : f === "blur" ? () => {
1501
- var p, C, P;
1502
- h.value ? (p = h.value.querySelector(":focus")) == null || p.blur() : (P = (C = u.value) == null ? void 0 : C.blur) == null || P.call(C);
1503
- } : (M = u.value) == null ? void 0 : M[f];
1504
- }, has: (T, f) => u.value !== void 0 && (f === "focus" || f === "blur" || f in u.value) }));
1505
- const Y = (T) => {
1506
- _.value = T, A("onUpdate:popupVisible", T), A("onPopupVisibleChange", T);
1507
- }, I = (T) => {
1508
- const f = i("valueFormat") ?? (typeof i("format") == "string" ? i("format") : "YYYY-MM-DD");
1509
- return f === "Date" ? T.toDate() : f === "timestamp" ? T.valueOf() : T.format(String(f));
1554
+ o(new Proxy({}, { get: (x, M) => {
1555
+ var $;
1556
+ return M === "focus" ? (u = 0) => {
1557
+ var D, I, B, p;
1558
+ v.value ? (I = (D = v.value.querySelectorAll(".dsh-date-input__field")[u]) == null ? void 0 : D.querySelector("[role=spinbutton]")) == null || I.focus() : (p = (B = c.value) == null ? void 0 : B.focus) == null || p.call(B, u);
1559
+ } : M === "blur" ? () => {
1560
+ var u, D, I;
1561
+ v.value ? (u = v.value.querySelector(":focus")) == null || u.blur() : (I = (D = c.value) == null ? void 0 : D.blur) == null || I.call(D);
1562
+ } : ($ = c.value) == null ? void 0 : $[M];
1563
+ }, has: (x, M) => c.value !== void 0 && (M === "focus" || M === "blur" || M in c.value) }));
1564
+ const Y = (x) => {
1565
+ d.value = x, P("onUpdate:popupVisible", x), P("onPopupVisibleChange", x);
1566
+ }, L = (x) => {
1567
+ const M = h("valueFormat") ?? (typeof h("format") == "string" ? h("format") : "YYYY-MM-DD");
1568
+ return M === "Date" ? x.toDate() : M === "timestamp" ? x.valueOf() : x.format(String(M));
1510
1569
  };
1511
1570
  return () => {
1512
- var g;
1513
- c.value;
1514
- const T = O.value, f = (e ? Array.isArray(T) ? T : [] : [T]).map(x).filter((y) => !!y), M = i("mode"), p = !!(i("panelRender") || i("showTime") || i("showNowBtn") === !0 || i("showConfirmBtn") || (g = i("shortcuts")) != null && g.length || o.extra || o.cell || i("utcOffset") !== void 0 || i("timezone") || M && M !== "date" || Array.isArray(i("disabled"))), C = i("triggerProps") ?? {}, P = () => m(_t, {
1571
+ var O;
1572
+ g.value;
1573
+ const x = b.value, M = (e ? Array.isArray(x) ? x : [] : [x]).map(A).filter((_) => !!_), $ = h("mode"), u = !!(h("panelRender") || h("showTime") || h("showNowBtn") === !0 || h("showConfirmBtn") || (O = h("shortcuts")) != null && O.length || r.extra || r.cell || h("utcOffset") !== void 0 || h("timezone") || $ && $ !== "date" || Array.isArray(h("disabled"))), D = h("triggerProps") ?? {}, I = h("disabledDate"), B = I ? (_, E) => I(_.toDate(), e ? E : void 0) : void 0, p = () => m(Tt, {
1515
1574
  range: e,
1516
- value: f,
1517
- view: x(d(i("pickerValue"))) ?? v.value,
1518
- locale: s.locale.value,
1519
- weekStart: i("dayStartOfWeek"),
1520
- disabled: (y) => {
1521
- const k = i("disabledDate");
1522
- return !!(k != null && k(y.toDate(), e ? f.length ? "end" : "start" : void 0));
1523
- },
1524
- onView: (y) => {
1525
- i("pickerValue") === void 0 && (v.value = y);
1526
- const k = e ? [y, y.add(1, "month")] : [y], L = k.map(I), E = k.map((H) => H.toDate()), B = k.map((H) => H.format("YYYY-MM-DD"));
1527
- A("onPickerValueChange", e ? L : L[0], e ? E : E[0], e ? B : B[0]);
1575
+ value: M,
1576
+ view: A(w(h("pickerValue"))) ?? C.value,
1577
+ locale: i.locale.value,
1578
+ weekStart: h("dayStartOfWeek"),
1579
+ disabled: B,
1580
+ onView: (_) => {
1581
+ h("pickerValue") === void 0 && (C.value = _);
1582
+ const E = e ? [_, _.add(1, "month")] : [_], H = E.map(L), R = E.map((q) => q.toDate()), F = E.map((q) => q.format("YYYY-MM-DD"));
1583
+ P("onPickerValueChange", e ? H : H[0], e ? R : R[0], e ? F : F[0]);
1528
1584
  },
1529
- onSelect: (y, k) => {
1530
- const L = y.map(I), E = y.map((R) => R.toDate()), B = y.map((R) => R.format(typeof i("format") == "string" ? String(i("format")) : "YYYY-MM-DD"));
1531
- if (e && A("onSelect", L, E, B), !k)
1585
+ onSelect: (_, E) => {
1586
+ const H = _.map(L), R = _.map((K) => K.toDate()), F = _.map((K) => K.format(typeof h("format") == "string" ? String(h("format")) : "YYYY-MM-DD"));
1587
+ if (e && P("onSelect", H, R, F), !E)
1532
1588
  return;
1533
- const H = e ? L : L[0];
1534
- y.every((R, W) => {
1535
- var z;
1536
- return (z = f[W]) == null ? void 0 : z.isSame(R, "day");
1537
- }) || (w.value = H, A("onUpdate:modelValue", H), A("onChange", H, e ? E : E[0], e ? B : B[0])), Y(!1);
1589
+ const q = e ? H : H[0];
1590
+ _.every((K, Q) => {
1591
+ var ee;
1592
+ return (ee = M[Q]) == null ? void 0 : ee.isSame(K, "day");
1593
+ }) || (T.value = q, P("onUpdate:modelValue", q), P("onChange", q, e ? R : R[0], e ? F : F[0])), Y(!1);
1538
1594
  }
1539
- }), $ = typeof i("format") == "string" ? String(i("format")) : s.locale.value.startsWith("en-US") ? "M/D/YYYY" : "YYYY-MM-DD", V = !p && !o.default && !o.prefix && !o["suffix-icon"] && !i("inputProps") && /^(?:YYYY|MM?|DD?|[\/\-.\s])+$/.test($), b = (y) => {
1540
- var L, E;
1541
- if (y.length && y.some((B) => !B))
1595
+ }), y = typeof h("format") == "string" ? String(h("format")) : i.locale.value.startsWith("en-US") ? "M/D/YYYY" : "YYYY-MM-DD", S = !u && !r.default && !r.prefix && !r["suffix-icon"] && !h("inputProps") && /^(?:YYYY|MM?|DD?|[\/\-.\s])+$/.test(y), V = (_) => {
1596
+ var H, R;
1597
+ if (_.length && _.some((F) => !F))
1542
1598
  return;
1543
- const k = e ? y.map((B) => B ? I(B) : void 0) : y[0] ? I(y[0]) : void 0;
1544
- w.value = k, A("onUpdate:modelValue", k), A("onChange", k, e ? y.map((B) => B == null ? void 0 : B.toDate()) : (L = y[0]) == null ? void 0 : L.toDate(), e ? y.map((B) => B == null ? void 0 : B.format($)) : (E = y[0]) == null ? void 0 : E.format($));
1545
- }, D = V ? { ...o, default: () => {
1546
- const y = wa(Ct, {
1547
- dates: e ? [x(Array.isArray(T) ? T[0] : void 0), x(Array.isArray(T) ? T[1] : void 0)] : [x(T)],
1599
+ const E = e ? _.map((F) => F ? L(F) : void 0) : _[0] ? L(_[0]) : void 0;
1600
+ T.value = E, P("onUpdate:modelValue", E), P("onChange", E, e ? _.map((F) => F == null ? void 0 : F.toDate()) : (H = _[0]) == null ? void 0 : H.toDate(), e ? _.map((F) => F == null ? void 0 : F.format(y)) : (R = _[0]) == null ? void 0 : R.format(y));
1601
+ }, k = S ? { ...r, default: () => {
1602
+ const _ = La(_t, {
1603
+ dates: e ? [A(Array.isArray(x) ? x[0] : void 0), A(Array.isArray(x) ? x[1] : void 0)] : [A(x)],
1548
1604
  range: e,
1549
- format: $,
1550
- label: String(i("aria-label") ?? "日期"),
1551
- disabled: !!i("disabled"),
1552
- readonly: !!(i("readonly") || i("disabledInput")),
1553
- open: !!(i("popupVisible") ?? _.value),
1554
- allowClear: i("allowClear") !== !1,
1555
- draft: S,
1605
+ format: y,
1606
+ id: n.id,
1607
+ size: h("size") ?? (s == null ? void 0 : s.size),
1608
+ placeholder: h("placeholder"),
1609
+ onClear: () => P("onClear"),
1610
+ label: String(h("aria-label") ?? "日期"),
1611
+ disabled: !!h("disabled"),
1612
+ readonly: !!(h("readonly") || h("disabledInput")),
1613
+ open: !!(h("popupVisible") ?? d.value),
1614
+ allowClear: h("allowClear") !== !1,
1615
+ draft: f,
1556
1616
  invalidate: () => {
1557
- c.value++;
1617
+ g.value++;
1558
1618
  },
1559
- change: b,
1560
- toggle: () => Y(!(i("popupVisible") ?? _.value)),
1561
- disabledDate: (k) => {
1562
- var L;
1563
- return !!((L = i("disabledDate")) != null && L(k.toDate()));
1564
- }
1619
+ change: V,
1620
+ toggle: () => Y(!(h("popupVisible") ?? d.value)),
1621
+ disabledDate: B
1565
1622
  });
1566
- return m("div", { ref: h, class: n.class, style: n.style }, [y]);
1567
- } } : o;
1623
+ return m("div", { ref: v, class: n.class, style: n.style }, [_]);
1624
+ } } : r;
1568
1625
  return m(t, {
1569
1626
  ...n,
1570
- ref: u,
1571
- modelValue: O.value,
1572
- popupVisible: i("popupVisible") ?? _.value,
1573
- triggerProps: { popupOffset: 8, ...C },
1574
- panelRender: p ? i("panelRender") : P,
1575
- "onUpdate:modelValue": (y) => {
1576
- w.value = y, A("onUpdate:modelValue", y);
1627
+ ref: c,
1628
+ modelValue: b.value,
1629
+ popupVisible: h("popupVisible") ?? d.value,
1630
+ triggerProps: { popupOffset: 8, ...D },
1631
+ panelRender: u ? h("panelRender") : p,
1632
+ "onUpdate:modelValue": (_) => {
1633
+ T.value = _, P("onUpdate:modelValue", _);
1577
1634
  },
1578
- "onUpdate:popupVisible": (y) => {
1579
- _.value = y, A("onUpdate:popupVisible", y);
1635
+ "onUpdate:popupVisible": (_) => {
1636
+ d.value = _, P("onUpdate:popupVisible", _);
1580
1637
  },
1581
- onPopupVisibleChange: (y) => {
1582
- _.value = y, A("onPopupVisibleChange", y);
1638
+ onPopupVisibleChange: (_) => {
1639
+ d.value = _, P("onPopupVisibleChange", _);
1583
1640
  }
1584
- }, D);
1641
+ }, k);
1585
1642
  };
1586
1643
  }
1587
1644
  });
@@ -1590,108 +1647,110 @@ function Pt(e) {
1590
1647
  l.component(`${(n == null ? void 0 : n.componentPrefix) ?? "A"}RangePicker`, a);
1591
1648
  return;
1592
1649
  }
1593
- const o = /* @__PURE__ */ new Map([[N.DatePicker, a], [N.RangePicker, Pe], [N.MonthPicker, xe], [N.YearPicker, _e], [N.QuarterPicker, $e], [N.WeekPicker, Ce]]);
1594
- function r(s, u) {
1595
- return u === void 0 ? l.component(s) : l.component(s, o.get(u) ?? u);
1650
+ const r = /* @__PURE__ */ new Map([[z.DatePicker, a], [z.RangePicker, Ve], [z.MonthPicker, $e], [z.YearPicker, Te], [z.QuarterPicker, Pe], [z.WeekPicker, _e]]);
1651
+ function o(i, s) {
1652
+ return s === void 0 ? l.component(i) : l.component(i, r.get(s) ?? s);
1596
1653
  }
1597
- N.DatePicker.install({ ...l, component: r }, n);
1654
+ z.DatePicker.install({ ...l, component: o }, n);
1598
1655
  } }), a;
1599
1656
  }
1600
- const Pe = Pt(!0), Ga = Pe, Pa = Object.assign(Pt(!1), { RangePicker: Pe, MonthPicker: xe, YearPicker: _e, QuarterPicker: $e, WeekPicker: Ce }), Tt = Object.assign(F({
1657
+ const Ve = Vt(!0), rn = Ve, Na = Object.assign(Vt(!1), { RangePicker: Ve, MonthPicker: $e, YearPicker: Te, QuarterPicker: Pe, WeekPicker: _e }), Ot = Object.assign(N({
1601
1658
  name: "DshCalendar",
1602
1659
  inheritAttrs: !1,
1603
1660
  setup(e, { attrs: t, slots: a }) {
1604
- const { locale: l } = se(), n = Se(We, void 0), o = (h) => t[h] ?? t[h.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)], r = j(ue(o("defaultValue")) ?? ie().startOf("day")), s = j(ue(o("defaultPageShowDate")) ?? ue(o("modelValue")) ?? r.value), u = (h, c) => {
1605
- const S = t[h];
1606
- for (const i of Array.isArray(S) ? S : [S])
1607
- typeof i == "function" && i(c);
1661
+ const { locale: l } = ue(), n = me(xe, void 0), r = (c) => t[c] ?? t[c.replace(/[A-Z]/g, (v) => `-${v.toLowerCase()}`)], o = W(de(r("defaultValue")) ?? ie().startOf("day")), i = W(de(r("defaultPageShowDate")) ?? de(r("modelValue")) ?? o.value), s = (c, v) => {
1662
+ const g = t[c];
1663
+ for (const f of Array.isArray(g) ? g : [g])
1664
+ typeof f == "function" && f(v);
1608
1665
  };
1609
1666
  return () => {
1610
- var d, v, O;
1611
- const h = ((d = n == null ? void 0 : n.locale) == null ? void 0 : d.locale) ?? l.value, c = (v = n == null ? void 0 : n.locale) == null ? void 0 : v.calendar, S = h === "en-US" ? { month: "MMM YYYY", year: "YYYY", days: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] } : h === "zh-CN" ? { month: "YYYY 年 MM 月", year: "YYYY 年", days: ["日", "一", "二", "三", "四", "五", "六"] } : void 0, i = c && (!S || c.formatMonth !== S.month || c.formatYear !== S.year || ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"].some((A, Y) => {
1612
- var I, T;
1613
- return ((T = (I = c.week) == null ? void 0 : I.short) == null ? void 0 : T[A]) !== S.days[Y];
1614
- }) || Array.from({ length: 12 }, (A, Y) => new Date(2020, Y, 1)).some((A) => {
1615
- var Y, I;
1616
- return ((I = (Y = c.month) == null ? void 0 : Y.long) == null ? void 0 : I[new Intl.DateTimeFormat("en-US", { month: "long" }).format(A)]) !== new Intl.DateTimeFormat(h, { month: "long" }).format(A);
1667
+ var d, w, C;
1668
+ const c = ((d = n == null ? void 0 : n.locale) == null ? void 0 : d.locale) ?? l.value, v = (w = n == null ? void 0 : n.locale) == null ? void 0 : w.calendar, g = c === "en-US" ? { month: "MMM YYYY", year: "YYYY", days: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] } : c === "zh-CN" ? { month: "YYYY 年 MM 月", year: "YYYY 年", days: ["日", "一", "二", "三", "四", "五", "六"] } : void 0, f = v && (!g || v.formatMonth !== g.month || v.formatYear !== g.year || ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"].some((b, P) => {
1669
+ var Y, L;
1670
+ return ((L = (Y = v.week) == null ? void 0 : Y.short) == null ? void 0 : L[b]) !== g.days[P];
1671
+ }) || Array.from({ length: 12 }, (b, P) => new Date(2020, P, 1)).some((b) => {
1672
+ var P, Y;
1673
+ return ((Y = (P = v.month) == null ? void 0 : P.long) == null ? void 0 : Y[new Intl.DateTimeFormat("en-US", { month: "long" }).format(b)]) !== new Intl.DateTimeFormat(c, { month: "long" }).format(b);
1617
1674
  }));
1618
- if (o("panel") === void 0 || o("panel") === !1 || (o("mode") ?? o("defaultMode") ?? "month") !== "month" || ["headerRender", "dateRender", "dateInnerContent", "monthRender", "panelOperations", "panelWidth"].some((A) => o(A) !== void 0) || !!o("panelTodayBtn") || !!o("isWeek") || i || (n == null ? void 0 : n.rtl) || (n == null ? void 0 : n.prefixCls) && n.prefixCls !== "arco" || Object.keys(a).length > 0)
1619
- return m(N.Calendar, t, a);
1620
- const w = ue(o("modelValue")) ?? r.value, _ = Object.fromEntries(Object.entries(t).filter(([A]) => ["id", "title", "role", "tabindex"].includes(A) || /^(aria-|data-)/.test(A) || /^on[A-Z]/.test(A) && !["onChange", "onPanelChange", "onUpdate:modelValue"].includes(A)));
1621
- return m("div", { ..._, class: ["arco-calendar dsh-hero-calendar", t.class], style: t.style }, [m(_t, {
1675
+ if (r("panel") === void 0 || r("panel") === !1 || (r("mode") ?? r("defaultMode") ?? "month") !== "month" || ["headerRender", "dateRender", "dateInnerContent", "monthRender", "panelOperations", "panelWidth"].some((b) => r(b) !== void 0) || !!r("panelTodayBtn") || !!r("isWeek") || f || (n == null ? void 0 : n.rtl) || (n == null ? void 0 : n.prefixCls) && n.prefixCls !== "arco" || Object.keys(a).length > 0)
1676
+ return m(z.Calendar, t, a);
1677
+ const A = de(r("modelValue")) ?? o.value, T = Object.fromEntries(Object.entries(t).filter(([b]) => ["id", "title", "role", "tabindex"].includes(b) || /^(aria-|data-)/.test(b) || /^on[A-Z]/.test(b) && !["onChange", "onPanelChange", "onUpdate:modelValue"].includes(b)));
1678
+ return m("div", { ...T, class: ["arco-calendar dsh-hero-calendar", t.class], style: t.style }, [m(Tt, {
1622
1679
  standalone: !0,
1623
1680
  range: !1,
1624
- value: [w],
1625
- view: ue(o("pageShowDate")) ?? s.value,
1626
- locale: ((O = n == null ? void 0 : n.locale) == null ? void 0 : O.locale) ?? l.value,
1627
- weekStart: o("dayStartOfWeek") ?? 0,
1628
- disabled: (A) => {
1629
- var Y;
1630
- return !!((Y = o("disabledDate")) != null && Y(A));
1681
+ value: [A],
1682
+ view: de(r("pageShowDate")) ?? i.value,
1683
+ locale: ((C = n == null ? void 0 : n.locale) == null ? void 0 : C.locale) ?? l.value,
1684
+ weekStart: r("dayStartOfWeek") ?? 0,
1685
+ disabled: (b) => {
1686
+ var P;
1687
+ return !!((P = r("disabledDate")) != null && P(b));
1631
1688
  },
1632
- onView: (A) => {
1633
- o("pageShowDate") === void 0 && (s.value = A), u("onPanelChange", A.toDate());
1689
+ onView: (b) => {
1690
+ r("pageShowDate") === void 0 && (i.value = b), s("onPanelChange", b.toDate());
1634
1691
  },
1635
- onSelect: (A) => {
1636
- if (o("allowSelect") === !1)
1692
+ onSelect: (b) => {
1693
+ if (r("allowSelect") === !1)
1637
1694
  return;
1638
- const Y = A[0];
1639
- r.value = Y, o("pageShowDate") === void 0 && (s.value = Y), u("onUpdate:modelValue", Y.toDate()), u("onChange", Y.toDate()), u("onPanelChange", Y.toDate());
1695
+ const P = b[0];
1696
+ o.value = P, r("pageShowDate") === void 0 && (i.value = P), s("onUpdate:modelValue", P.toDate()), s("onChange", P.toDate()), s("onPanelChange", P.toDate());
1640
1697
  }
1641
1698
  })]);
1642
1699
  };
1643
1700
  }
1644
1701
  }), { install(e, t) {
1645
1702
  function a(l, n) {
1646
- return n === void 0 ? e.component(l) : e.component(l, n === N.Calendar ? Tt : n);
1703
+ return n === void 0 ? e.component(l) : e.component(l, n === z.Calendar ? Ot : n);
1647
1704
  }
1648
- N.Calendar.install({ ...e, component: a }, t);
1649
- } }), Za = /* @__PURE__ */ Ut({
1705
+ z.Calendar.install({ ...e, component: a }, t);
1706
+ } }), on = /* @__PURE__ */ ta({
1650
1707
  __proto__: null,
1651
- Alert: Xt,
1652
- AutoComplete: ht,
1653
- Calendar: Tt,
1654
- Card: Qt,
1655
- Cascader: mt,
1656
- ColorPicker: Re,
1657
- DatePicker: Pa,
1658
- Dropdown: gt,
1659
- DropdownButton: yt,
1660
- Dsubmenu: bt,
1661
- HintIcon: ma,
1662
- Image: Mt,
1663
- ImagePreview: kt,
1664
- ImagePreviewGroup: At,
1665
- InputNumber: ta,
1666
- InputTag: Jt,
1667
- Mention: ha,
1668
- Menu: St,
1669
- MenuItem: ze,
1670
- MonthPicker: xe,
1671
- Popconfirm: da,
1672
- Popover: ca,
1673
- Progress: Gt,
1674
- QuarterPicker: $e,
1675
- RangePicker: Pe,
1676
- Result: ea,
1677
- Select: wt,
1678
- Spin: Ae,
1679
- Table: Zt,
1680
- Tag: aa,
1681
- TimePicker: ua,
1682
- Tooltip: Dt,
1683
- Tree: na,
1684
- TreeSelect: sa,
1685
- Trigger: fa,
1686
- WeekPicker: Ce,
1687
- YearPicker: _e,
1688
- default: Lt
1689
- }, [N]), Qa = F({
1708
+ Alert: ia,
1709
+ AutoComplete: mt,
1710
+ Calendar: Ot,
1711
+ Card: oa,
1712
+ Cascader: vt,
1713
+ ColorPicker: qe,
1714
+ DatePicker: Na,
1715
+ Dropdown: bt,
1716
+ DropdownButton: wt,
1717
+ Dsubmenu: yt,
1718
+ HintIcon: Sa,
1719
+ Image: kt,
1720
+ ImagePreview: At,
1721
+ ImagePreviewGroup: xt,
1722
+ InputNumber: ua,
1723
+ InputTag: la,
1724
+ Mention: Da,
1725
+ Menu: Mt,
1726
+ MenuItem: Ge,
1727
+ MonthPicker: $e,
1728
+ Popconfirm: ya,
1729
+ Popover: ba,
1730
+ Progress: na,
1731
+ QuarterPicker: Pe,
1732
+ RangePicker: Ve,
1733
+ Result: sa,
1734
+ Select: Dt,
1735
+ Spin: Ce,
1736
+ Table: ra,
1737
+ Tag: ca,
1738
+ TimePicker: pa,
1739
+ Tooltip: St,
1740
+ Tree: da,
1741
+ TreeSelect: ga,
1742
+ Trigger: wa,
1743
+ WeekPicker: _e,
1744
+ YearPicker: Te,
1745
+ default: Ft
1746
+ }, [z]), ln = X(Object.assign({}, Ne, {
1747
+ props: { ...Ne.props, baseSize: { type: Number, default: 5 } }
1748
+ }), Ne), sn = N({
1690
1749
  name: "DshAccordion",
1691
1750
  setup(e, { attrs: t, slots: a }) {
1692
- return () => m(Bt, { accordion: !0, ...t }, a);
1751
+ return () => m(Ht, { accordion: !0, ...t }, a);
1693
1752
  }
1694
- }), Ja = F({
1753
+ }), un = N({
1695
1754
  name: "DshSwitchGroup",
1696
1755
  props: { label: String, disabled: Boolean, orientation: { type: String, default: "vertical" } },
1697
1756
  setup(e, { slots: t }) {
@@ -1703,13 +1762,30 @@ const Pe = Pt(!0), Ga = Pe, Pa = Object.assign(Pt(!1), { RangePicker: Pe, MonthP
1703
1762
  ]);
1704
1763
  };
1705
1764
  }
1706
- }), Xa = F({
1765
+ }), cn = N({
1707
1766
  name: "DshSpinner",
1708
1767
  props: { label: { type: String, default: "正在加载" } },
1709
1768
  setup(e, { attrs: t, slots: a }) {
1710
- return () => m(Ae, { ...t, loading: !0, role: "status", "aria-label": e.label }, a);
1769
+ return () => m(Ce, { ...t, loading: !0, role: "status", "aria-label": e.label }, a);
1711
1770
  }
1712
- }), Ta = F({
1771
+ }), Yt = { sm: "small", md: "medium", lg: "large" }, It = Symbol("dsh-button-group-size"), dn = N({
1772
+ name: "DshButtonGroup",
1773
+ inheritAttrs: !1,
1774
+ props: {
1775
+ size: String,
1776
+ type: String,
1777
+ status: String,
1778
+ shape: String,
1779
+ disabled: Boolean
1780
+ },
1781
+ setup(e, { attrs: t, slots: a }) {
1782
+ const l = Z(() => {
1783
+ const n = e.size;
1784
+ return n === "sm" || n === "md" || n === "lg" ? Yt[n] : n;
1785
+ });
1786
+ return We(It, l), () => m(jt, { ...t, ...e, size: l.value }, a);
1787
+ }
1788
+ }), Fa = N({
1713
1789
  name: "DshButton",
1714
1790
  inheritAttrs: !1,
1715
1791
  props: {
@@ -1722,7 +1798,7 @@ const Pe = Pt(!0), Ga = Pe, Pa = Object.assign(Pt(!1), { RangePicker: Pe, MonthP
1722
1798
  long: Boolean,
1723
1799
  loadingFixedWidth: Boolean,
1724
1800
  variant: { type: String, default: "primary" },
1725
- size: { type: String, default: "md" },
1801
+ size: String,
1726
1802
  radius: String,
1727
1803
  disabled: Boolean,
1728
1804
  loading: Boolean,
@@ -1730,46 +1806,46 @@ const Pe = Pt(!0), Ga = Pe, Pa = Object.assign(Pt(!1), { RangePicker: Pe, MonthP
1730
1806
  block: Boolean
1731
1807
  },
1732
1808
  setup(e, { attrs: t, slots: a, expose: l }) {
1733
- const n = q();
1809
+ const n = me(It, void 0), r = Z(() => e.size ? Yt[e.size] : n == null ? void 0 : n.value), o = Z(() => ({ mini: "sm", small: "sm", medium: "md", large: "lg" })[r.value ?? "medium"]), i = j();
1734
1810
  return l({ focus: () => {
1735
- var o, r;
1736
- return (r = (o = n.value) == null ? void 0 : o.$el) == null ? void 0 : r.focus();
1811
+ var s, c;
1812
+ return (c = (s = i.value) == null ? void 0 : s.$el) == null ? void 0 : c.focus();
1737
1813
  }, blur: () => {
1738
- var o, r;
1739
- return (r = (o = n.value) == null ? void 0 : o.$el) == null ? void 0 : r.blur();
1740
- } }), () => m(Et, {
1814
+ var s, c;
1815
+ return (c = (s = i.value) == null ? void 0 : s.$el) == null ? void 0 : c.blur();
1816
+ } }), () => m(Rt, {
1741
1817
  ...e,
1742
1818
  ...t,
1743
- ref: n,
1819
+ ref: i,
1744
1820
  class: ["dsh-button", t.class],
1745
1821
  "data-variant": e.variant,
1746
- "data-size": e.size,
1822
+ "data-size": o.value,
1747
1823
  "data-radius": e.radius,
1748
1824
  "data-icon-only": e.iconOnly || void 0,
1749
1825
  type: e.type ?? (e.variant === "primary" || e.variant === "danger" ? "primary" : "secondary"),
1750
- size: { sm: "small", md: "medium", lg: "large" }[e.size],
1826
+ size: r.value,
1751
1827
  disabled: e.disabled,
1752
1828
  loading: e.loading,
1753
1829
  long: e.block || e.long,
1754
1830
  "aria-busy": e.loading || void 0
1755
1831
  }, { ...a, default: () => {
1756
- var o, r, s;
1757
- return [(o = a.startContent) == null ? void 0 : o.call(a), (r = a.default) == null ? void 0 : r.call(a), (s = a.endContent) == null ? void 0 : s.call(a)];
1832
+ var s, c, v;
1833
+ return [(s = a.startContent) == null ? void 0 : s.call(a), (c = a.default) == null ? void 0 : c.call(a), (v = a.endContent) == null ? void 0 : v.call(a)];
1758
1834
  } });
1759
1835
  }
1760
- }), en = F({
1836
+ }), fn = N({
1761
1837
  name: "DshCloseButton",
1762
1838
  setup(e, { attrs: t }) {
1763
- return () => m(Ta, { variant: "ghost", iconOnly: !0, "aria-label": "关闭", ...t }, () => "×");
1839
+ return () => m(Fa, { variant: "ghost", iconOnly: !0, "aria-label": "关闭", ...t }, () => "×");
1764
1840
  }
1765
- }), Ue = {
1841
+ }), Ze = {
1766
1842
  value: Number,
1767
1843
  min: { type: Number, default: 0 },
1768
1844
  max: { type: Number, default: 100 },
1769
1845
  label: String,
1770
1846
  showValue: Boolean
1771
1847
  };
1772
- function Ke(e, t, a) {
1848
+ function Qe(e, t, a) {
1773
1849
  if (!Number.isFinite(t) || !Number.isFinite(a) || a <= t)
1774
1850
  throw new RangeError("进度最大值必须大于最小值且均为有限数值");
1775
1851
  if (e === void 0)
@@ -1778,12 +1854,12 @@ function Ke(e, t, a) {
1778
1854
  throw new RangeError("进度值必须是有限数值");
1779
1855
  return Math.min(1, Math.max(0, (e - t) / (a - t)));
1780
1856
  }
1781
- const tn = F({
1857
+ const hn = N({
1782
1858
  name: "DshProgressBar",
1783
- props: Ue,
1859
+ props: Ze,
1784
1860
  setup(e, { attrs: t }) {
1785
1861
  return () => {
1786
- const a = Ke(e.value, e.min, e.max);
1862
+ const a = Qe(e.value, e.min, e.max);
1787
1863
  return m("div", {
1788
1864
  ...t,
1789
1865
  class: ["dsh-progress", t.class],
@@ -1798,12 +1874,12 @@ const tn = F({
1798
1874
  ]), e.showValue && e.value !== void 0 ? m("span", `${Math.round(a * 100)}%`) : null]);
1799
1875
  };
1800
1876
  }
1801
- }), an = F({
1877
+ }), mn = N({
1802
1878
  name: "DshProgressCircle",
1803
- props: Ue,
1879
+ props: Ze,
1804
1880
  setup(e, { attrs: t }) {
1805
1881
  return () => {
1806
- const a = Ke(e.value, e.min, e.max);
1882
+ const a = Qe(e.value, e.min, e.max);
1807
1883
  return m("div", {
1808
1884
  ...t,
1809
1885
  class: ["dsh-progress-circle", t.class],
@@ -1826,12 +1902,12 @@ const tn = F({
1826
1902
  ]), e.showValue && e.value !== void 0 ? m("span", `${Math.round(a * 100)}%`) : null]);
1827
1903
  };
1828
1904
  }
1829
- }), nn = F({
1905
+ }), vn = N({
1830
1906
  name: "DshMeter",
1831
- props: { ...Ue, value: { type: Number, required: !0 } },
1907
+ props: { ...Ze, value: { type: Number, required: !0 } },
1832
1908
  setup(e, { attrs: t }) {
1833
1909
  return () => {
1834
- const a = Ke(e.value, e.min, e.max);
1910
+ const a = Qe(e.value, e.min, e.max);
1835
1911
  return m("div", {
1836
1912
  ...t,
1837
1913
  role: "meter",
@@ -1845,9 +1921,9 @@ const tn = F({
1845
1921
  ]), e.showValue ? m("span", String(e.value)) : null]);
1846
1922
  };
1847
1923
  }
1848
- }), Va = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', ne = [];
1849
- function Ge(e, t, a) {
1850
- return F({
1924
+ }), za = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', oe = [];
1925
+ function Je(e, t, a) {
1926
+ return N({
1851
1927
  name: e,
1852
1928
  inheritAttrs: !1,
1853
1929
  props: {
@@ -1861,291 +1937,302 @@ function Ge(e, t, a) {
1861
1937
  popupContainer: { type: [String, Object] }
1862
1938
  },
1863
1939
  emits: ["update:visible", "ok", "cancel", "open", "close", "beforeOpen", "beforeClose"],
1864
- setup(l, { attrs: n, slots: o, emit: r, expose: s }) {
1865
- const u = se(), h = j();
1866
- la(h);
1867
- const c = q(l.defaultVisible), S = J(() => l.visible ?? c.value), i = `dsh-dialog-${Me().replace(/[^a-zA-Z0-9_-]/g, "")}`, x = `${i}-title`;
1868
- let w, _, d;
1869
- le(u.container, (T) => {
1870
- var f;
1871
- if ((f = h.value) == null || f.remove(), T) {
1940
+ setup(l, { attrs: n, slots: r, emit: o, expose: i }) {
1941
+ const s = ue(), c = W();
1942
+ ma(c);
1943
+ const v = j(l.defaultVisible), g = Z(() => l.visible ?? v.value), f = `dsh-dialog-${ke().replace(/[^a-zA-Z0-9_-]/g, "")}`, h = `${f}-title`;
1944
+ let A, T, d;
1945
+ le(s.container, (L) => {
1946
+ var x;
1947
+ if ((x = c.value) == null || x.remove(), L) {
1872
1948
  const M = document.createElement("div");
1873
- M.dataset.dshDialogOwner = i, T.appendChild(M), h.value = M;
1949
+ M.dataset.dshDialogOwner = f, L.appendChild(M), c.value = M;
1874
1950
  } else
1875
- h.value = void 0;
1951
+ c.value = void 0;
1876
1952
  }, { immediate: !0, flush: "post" });
1877
- const v = (T) => {
1878
- c.value = T, r("update:visible", T);
1879
- }, O = () => v(!1), A = () => v(!0);
1880
- s({ open: A, close: O });
1881
- const Y = (T) => {
1882
- if (d == null || d(), d = void 0, w) {
1883
- const f = ne.indexOf(w);
1884
- f >= 0 && ne.splice(f, 1);
1953
+ const w = (L) => {
1954
+ v.value = L, o("update:visible", L);
1955
+ }, C = () => w(!1), b = () => w(!0);
1956
+ i({ open: b, close: C });
1957
+ const P = (L) => {
1958
+ if (d == null || d(), d = void 0, A) {
1959
+ const x = oe.indexOf(A);
1960
+ x >= 0 && oe.splice(x, 1);
1885
1961
  }
1886
- w = void 0, _ != null && _.isConnected && _.focus(), _ = void 0;
1887
- }, I = () => {
1888
- const T = typeof l.popupContainer == "string" ? document.querySelector(l.popupContainer) : l.popupContainer ?? u.container.value;
1889
- if (w = (T == null ? void 0 : T.querySelector(t ? `.${i} .arco-drawer` : `.${i}`)) ?? void 0, !w || ne.includes(w))
1962
+ A = void 0, T != null && T.isConnected && T.focus({ preventScroll: !0 }), T = void 0;
1963
+ }, Y = () => {
1964
+ const L = typeof l.popupContainer == "string" ? document.querySelector(l.popupContainer) : l.popupContainer ?? s.container.value;
1965
+ if (A = (L == null ? void 0 : L.querySelector(t ? `.${f} .arco-drawer` : `.${f}`)) ?? void 0, !A || oe.includes(A))
1890
1966
  return;
1891
- const f = w;
1892
- f.id = i, ne.push(f), f.setAttribute("role", a ? "alertdialog" : "dialog"), f.setAttribute("aria-modal", "true"), f.tabIndex = -1, l.label ? f.setAttribute("aria-label", l.label) : (l.title || o.header || o.title) && f.setAttribute("aria-labelledby", x);
1893
- const M = f.querySelector(".arco-modal-close-btn, .arco-drawer-close-btn");
1967
+ const x = A;
1968
+ x.id = f, oe.push(x), x.setAttribute("role", a ? "alertdialog" : "dialog"), x.setAttribute("aria-modal", "true"), x.tabIndex = -1, l.label ? x.setAttribute("aria-label", l.label) : (l.title || r.header || r.title) && x.setAttribute("aria-labelledby", h);
1969
+ const M = x.querySelector(".arco-modal-close-btn, .arco-drawer-close-btn");
1894
1970
  M && (M.tabIndex = 0, M.setAttribute("aria-label", "关闭"));
1895
- const p = () => Array.from(f.querySelectorAll(Va)).filter((V) => V.getClientRects().length > 0 && V.getAttribute("aria-hidden") !== "true" && !V.closest("[inert]")), C = (V) => {
1896
- if (ne[ne.length - 1] !== f || (M && V.target === M && (V.key === "Enter" || V.key === " ") && (V.preventDefault(), M.click()), V.key !== "Tab"))
1971
+ const $ = () => Array.from(x.querySelectorAll(za)).filter((B) => B.getClientRects().length > 0 && B.getAttribute("aria-hidden") !== "true" && !B.closest("[inert]")), u = (B) => {
1972
+ if (oe[oe.length - 1] !== x || (M && B.target === M && (B.key === "Enter" || B.key === " ") && (B.preventDefault(), M.click()), B.key !== "Tab"))
1897
1973
  return;
1898
- const b = p(), D = b[0], g = b[b.length - 1];
1899
- !D || !g ? (V.preventDefault(), f.focus()) : V.shiftKey && (document.activeElement === D || document.activeElement === f) ? (V.preventDefault(), g.focus()) : !V.shiftKey && (document.activeElement === g || document.activeElement === f) && (V.preventDefault(), D.focus());
1900
- }, P = (V) => {
1901
- var D;
1902
- const b = V.target instanceof Element ? V.target.closest(".arco-trigger-popup") : null;
1903
- b && ((D = h.value) != null && D.contains(b)) || ne[ne.length - 1] === f && V.target instanceof Node && !f.contains(V.target) && (p()[0] ?? f).focus();
1974
+ const p = $(), y = p[0], S = p[p.length - 1];
1975
+ !y || !S ? (B.preventDefault(), x.focus()) : B.shiftKey && (document.activeElement === y || document.activeElement === x) ? (B.preventDefault(), S.focus()) : !B.shiftKey && (document.activeElement === S || document.activeElement === x) && (B.preventDefault(), y.focus());
1976
+ }, D = (B) => {
1977
+ var y;
1978
+ const p = B.target instanceof Element ? B.target.closest(".arco-trigger-popup") : null;
1979
+ p && ((y = c.value) != null && y.contains(p)) || oe[oe.length - 1] === x && B.target instanceof Node && !x.contains(B.target) && ($()[0] ?? x).focus();
1904
1980
  };
1905
- f.addEventListener("keydown", C), document.addEventListener("focusin", P), d = () => {
1906
- f.removeEventListener("keydown", C), document.removeEventListener("focusin", P);
1907
- }, (f.querySelector("[autofocus]") ?? f).focus();
1981
+ x.addEventListener("keydown", u), document.addEventListener("focusin", D), d = () => {
1982
+ x.removeEventListener("keydown", u), document.removeEventListener("focusin", D);
1983
+ }, (x.querySelector("[autofocus]") ?? x).focus({ preventScroll: !0 });
1908
1984
  };
1909
- return le(S, async (T) => {
1910
- T && typeof document < "u" ? (_ = document.activeElement instanceof HTMLElement ? document.activeElement : void 0, await re(), I()) : T || Y();
1911
- }, { immediate: !0, flush: "post" }), ve(() => {
1912
- var T;
1913
- Y(), (T = h.value) == null || T.remove();
1985
+ return le(g, async (L) => {
1986
+ L && typeof document < "u" ? (T = document.activeElement instanceof HTMLElement ? document.activeElement : void 0, await se(), Y()) : L || P();
1987
+ }, { immediate: !0, flush: "post" }), pe(() => {
1988
+ var L;
1989
+ P(), (L = c.value) == null || L.remove();
1914
1990
  }), () => {
1915
- var C, P;
1916
- const T = { open: A, close: O, visible: S.value }, f = {
1991
+ var u, D;
1992
+ const L = { open: b, close: C, visible: g.value }, x = {
1917
1993
  ...n,
1918
- visible: S.value,
1994
+ visible: g.value,
1919
1995
  title: l.title,
1920
- popupContainer: l.popupContainer ?? u.container.value,
1996
+ popupContainer: l.popupContainer ?? s.container.value,
1921
1997
  escToClose: l.escToClose,
1922
1998
  maskClosable: l.maskClosable ?? !a,
1923
- "onUpdate:visible": v,
1924
- onOk: ($) => r("ok", $),
1925
- onCancel: ($) => r("cancel", $),
1999
+ "onUpdate:visible": w,
2000
+ onOk: (I) => o("ok", I),
2001
+ onCancel: (I) => o("cancel", I),
1926
2002
  onOpen: () => {
1927
- I(), r("open");
2003
+ Y(), o("open");
1928
2004
  },
1929
2005
  onClose: () => {
1930
- Y(), r("close");
2006
+ P(), o("close");
1931
2007
  },
1932
- onBeforeOpen: () => r("beforeOpen"),
1933
- onBeforeClose: () => r("beforeClose")
2008
+ onBeforeOpen: () => o("beforeOpen"),
2009
+ onBeforeClose: () => o("beforeClose")
1934
2010
  }, M = {
1935
- ...o,
2011
+ ...r,
1936
2012
  trigger: void 0,
1937
- title: l.title || o.header || o.title ? () => {
1938
- var $, V;
1939
- return m("span", { id: x }, (($ = o.header) == null ? void 0 : $.call(o, T)) ?? ((V = o.title) == null ? void 0 : V.call(o, T)) ?? l.title);
2013
+ title: l.title || r.header || r.title ? () => {
2014
+ var I, B;
2015
+ return m("span", { id: h }, ((I = r.header) == null ? void 0 : I.call(r, L)) ?? ((B = r.title) == null ? void 0 : B.call(r, L)) ?? l.title);
1940
2016
  } : void 0,
1941
- header: t && o.header ? () => {
1942
- var $;
1943
- return m("div", { id: x }, ($ = o.header) == null ? void 0 : $.call(o, T));
2017
+ header: t && r.header ? () => {
2018
+ var I;
2019
+ return m("div", { id: h }, (I = r.header) == null ? void 0 : I.call(r, L));
1944
2020
  } : void 0,
1945
- default: () => m(ut, { outerClass: l.scrollGutter ? "dsh-overlay-scroll dsh-overlay-scroll--gutter" : "dsh-overlay-scroll", style: { maxHeight: "inherit", overflow: "auto" } }, {
2021
+ default: () => m(dt, { outerClass: l.scrollGutter ? "dsh-overlay-scroll dsh-overlay-scroll--gutter" : "dsh-overlay-scroll", style: { maxHeight: "inherit", overflow: "auto" } }, {
1946
2022
  default: () => {
1947
- var $;
1948
- return ($ = o.default) == null ? void 0 : $.call(o, T);
2023
+ var I;
2024
+ return (I = r.default) == null ? void 0 : I.call(r, L);
1949
2025
  }
1950
2026
  }),
1951
- footer: o.footer ? () => {
1952
- var $;
1953
- return ($ = o.footer) == null ? void 0 : $.call(o, T);
2027
+ footer: r.footer ? () => {
2028
+ var I;
2029
+ return (I = r.footer) == null ? void 0 : I.call(r, L);
1954
2030
  } : void 0
1955
2031
  };
1956
- return [(P = (C = o.trigger) == null ? void 0 : C.call(o, T)) == null ? void 0 : P.map(($) => ft($) ? Fe($, {
2032
+ return [(D = (u = r.trigger) == null ? void 0 : u.call(r, L)) == null ? void 0 : D.map((I) => ht(I) ? Re(I, {
1957
2033
  "aria-haspopup": "dialog",
1958
- "aria-expanded": S.value,
1959
- "aria-controls": i,
1960
- class: { "dsh-overlay-trigger-open": S.value },
1961
- onClick: (V) => {
1962
- V.defaultPrevented || A();
2034
+ "aria-expanded": g.value,
2035
+ "aria-controls": f,
2036
+ class: { "dsh-overlay-trigger-open": g.value },
2037
+ onClick: (B) => {
2038
+ B.defaultPrevented || b();
1963
2039
  }
1964
- }) : $), u.container.value ? t ? m(Nt, {
1965
- ...f,
2040
+ }) : I), s.container.value ? t ? m(qt, {
2041
+ ...x,
1966
2042
  width: typeof n.width == "string" || typeof n.width == "number" ? n.width : "var(--dsh-drawer-width)",
1967
2043
  height: typeof n.height == "string" || typeof n.height == "number" ? n.height : "auto",
1968
- class: ["dsh-drawer", `dsh-drawer-${n.placement === "top" || n.placement === "bottom" ? n.placement : "side"}`, i, n.class]
1969
- }, M) : m(Ft, { ...f, alignCenter: !0, modalClass: ["dsh-modal", i, n.modalClass] }, M) : null];
2044
+ class: ["dsh-drawer", `dsh-drawer-${n.placement === "top" || n.placement === "bottom" ? n.placement : "side"}`, f, n.class]
2045
+ }, M) : m(Wt, { alignCenter: !0, ...x, modalClass: ["dsh-modal", f, n.modalClass] }, M) : null];
1970
2046
  };
1971
2047
  }
1972
2048
  });
1973
2049
  }
1974
- const Oa = Ge("DshModal", !1, !1), Ya = Ge("DshDrawer", !0, !1), rn = Ge("DshAlertDialog", !1, !0);
1975
- function Ia() {
1976
- return se().toast;
2050
+ const Ha = Je("DshModal", !1, !1), Ra = Je("DshDrawer", !0, !1), gn = Je("DshAlertDialog", !1, !0);
2051
+ function pn() {
2052
+ return ue().toast;
1977
2053
  }
1978
- function on() {
1979
- const e = Ia(), t = (l) => (n) => e.show({
1980
- ...typeof n == "string" ? { content: n } : n,
2054
+ function bn() {
2055
+ const { toast: e, rtl: t } = ue(), a = (n) => (r) => e.show({
2056
+ ...typeof r == "string" ? { content: r } : r,
1981
2057
  kind: "message",
1982
- type: l
1983
- }), a = (l) => (n) => e.show({
1984
- position: "topRight",
1985
- ...typeof n == "string" ? { content: n } : n,
2058
+ type: n
2059
+ }), l = (n) => (r) => e.show({
2060
+ position: t.value ? "topLeft" : "topRight",
2061
+ ...typeof r == "string" ? { content: r } : r,
1986
2062
  kind: "notification",
1987
- type: l
2063
+ type: n
1988
2064
  });
1989
2065
  return {
1990
2066
  message: {
1991
- info: t("info"),
1992
- success: t("success"),
1993
- warning: t("warning"),
1994
- error: t("error"),
1995
- loading: t("loading"),
1996
- normal: t("normal"),
1997
- clear: (l) => e.clear(l, "message")
1998
- },
1999
- notification: {
2000
2067
  info: a("info"),
2001
2068
  success: a("success"),
2002
2069
  warning: a("warning"),
2003
2070
  error: a("error"),
2004
- remove: (l) => e.remove(l, "notification"),
2005
- clear: (l) => e.clear(l, "notification")
2071
+ loading: a("loading"),
2072
+ normal: a("normal"),
2073
+ clear: (n) => e.clear(n, "message")
2074
+ },
2075
+ notification: {
2076
+ info: l("info"),
2077
+ success: l("success"),
2078
+ warning: l("warning"),
2079
+ error: l("error"),
2080
+ remove: (n) => e.remove(n, "notification"),
2081
+ clear: (n) => e.clear(n, "notification")
2006
2082
  }
2007
2083
  };
2008
2084
  }
2009
- const st = /* @__PURE__ */ new WeakMap();
2010
- function ln() {
2011
- const e = se(), t = st.get(e.mountOverlay);
2085
+ const ct = /* @__PURE__ */ new WeakMap();
2086
+ function yn() {
2087
+ const e = ue(), t = ct.get(e.mountOverlay);
2012
2088
  if (t)
2013
2089
  return t;
2014
- const a = {}, l = /* @__PURE__ */ new Set(), n = (s) => {
2015
- const u = De({ ...a, ...s, visible: !0 });
2016
- let h = !1;
2017
- const c = () => {
2018
- var i;
2019
- h || (h = !0, l.delete(c), S(), (i = u.onClose) == null || i.call(u));
2020
- }, S = e.mountOverlay(() => {
2021
- const { title: i, content: x, footer: w, ..._ } = u;
2022
- return m(Oa, {
2023
- ..._,
2024
- footer: typeof w == "boolean" ? w : !0,
2090
+ const a = {}, l = /* @__PURE__ */ new Set(), n = (i) => {
2091
+ const s = Me({ ...a, ...i, visible: !0 });
2092
+ let c = !1;
2093
+ const v = () => {
2094
+ var f;
2095
+ c || (c = !0, l.delete(v), g(), (f = s.onClose) == null || f.call(s));
2096
+ }, g = e.mountOverlay(() => {
2097
+ const { title: f, content: h, footer: A, ...T } = s;
2098
+ return m(Ha, {
2099
+ ...T,
2100
+ footer: typeof A == "boolean" ? A : !0,
2025
2101
  "onUpdate:visible": (d) => {
2026
- u.visible = d;
2102
+ s.visible = d;
2027
2103
  },
2028
- onClose: c
2104
+ onClose: v
2029
2105
  }, {
2030
- title: i === void 0 ? void 0 : () => typeof i == "function" ? i() : i,
2031
- default: () => typeof x == "function" ? x() : x,
2032
- footer: w !== void 0 && typeof w != "boolean" ? () => typeof w == "function" ? w() : w : void 0
2106
+ title: f === void 0 ? void 0 : () => typeof f == "function" ? f() : f,
2107
+ default: () => typeof h == "function" ? h() : h,
2108
+ footer: A !== void 0 && typeof A != "boolean" ? () => typeof A == "function" ? A() : A : void 0
2033
2109
  });
2034
2110
  });
2035
- return l.add(c), { close: c, update: (i) => Object.assign(u, i) };
2036
- }, r = {
2111
+ return l.add(v), { close: v, update: (f) => Object.assign(s, f) };
2112
+ }, o = {
2037
2113
  modal: {
2038
2114
  open: n,
2039
- confirm: (s) => n({ maskClosable: !1, ...s }),
2040
- info: (s) => n({ hideCancel: !0, ...s, messageType: "info" }),
2041
- success: (s) => n({ hideCancel: !0, ...s, messageType: "success" }),
2042
- warning: (s) => n({ hideCancel: !0, ...s, messageType: "warning" }),
2043
- error: (s) => n({ hideCancel: !0, ...s, messageType: "error" }),
2044
- config: (s) => {
2045
- Object.assign(a, s);
2115
+ confirm: (i) => n({ maskClosable: !1, ...i }),
2116
+ info: (i) => n({ hideCancel: !0, ...i, messageType: "info" }),
2117
+ success: (i) => n({ hideCancel: !0, ...i, messageType: "success" }),
2118
+ warning: (i) => n({ hideCancel: !0, ...i, messageType: "warning" }),
2119
+ error: (i) => n({ hideCancel: !0, ...i, messageType: "error" }),
2120
+ config: (i) => {
2121
+ Object.assign(a, i);
2046
2122
  },
2047
- destroyAll: () => [...l].forEach((s) => s())
2123
+ destroyAll: () => [...l].forEach((i) => i())
2048
2124
  },
2049
- drawer: { open: (s) => {
2050
- const u = De({ ...s, visible: !0 });
2051
- let h = !1;
2052
- const c = () => {
2053
- var i;
2054
- h || (h = !0, S(), (i = u.onClose) == null || i.call(u));
2055
- }, S = e.mountOverlay(() => {
2056
- const { title: i, content: x, footer: w, header: _, ...d } = u;
2057
- return m(Ya, {
2125
+ drawer: { open: (i) => {
2126
+ const s = Me({ ...i, visible: !0 });
2127
+ let c = !1;
2128
+ const v = () => {
2129
+ var f;
2130
+ c || (c = !0, g(), (f = s.onClose) == null || f.call(s));
2131
+ }, g = e.mountOverlay(() => {
2132
+ const { title: f, content: h, footer: A, header: T, ...d } = s;
2133
+ return m(Ra, {
2058
2134
  ...d,
2059
- header: typeof _ == "boolean" ? _ : !0,
2060
- footer: typeof w == "boolean" ? w : !0,
2061
- "onUpdate:visible": (v) => {
2062
- u.visible = v;
2135
+ header: typeof T == "boolean" ? T : !0,
2136
+ footer: typeof A == "boolean" ? A : !0,
2137
+ "onUpdate:visible": (w) => {
2138
+ s.visible = w;
2063
2139
  },
2064
- onClose: c
2140
+ onClose: v
2065
2141
  }, {
2066
- title: i === void 0 ? void 0 : () => typeof i == "function" ? i() : i,
2067
- default: () => typeof x == "function" ? x() : x,
2068
- header: _ !== void 0 && typeof _ != "boolean" ? () => typeof _ == "function" ? _() : _ : void 0,
2069
- footer: w !== void 0 && typeof w != "boolean" ? () => typeof w == "function" ? w() : w : void 0
2142
+ title: f === void 0 ? void 0 : () => typeof f == "function" ? f() : f,
2143
+ default: () => typeof h == "function" ? h() : h,
2144
+ header: T !== void 0 && typeof T != "boolean" ? () => typeof T == "function" ? T() : T : void 0,
2145
+ footer: A !== void 0 && typeof A != "boolean" ? () => typeof A == "function" ? A() : A : void 0
2070
2146
  });
2071
2147
  });
2072
- return { close: c, update: (i) => Object.assign(u, i) };
2148
+ return { close: v, update: (f) => Object.assign(s, f) };
2073
2149
  } }
2074
2150
  };
2075
- return st.set(e.mountOverlay, r), r;
2151
+ return ct.set(e.mountOverlay, o), o;
2076
2152
  }
2077
- function me(e, t, a, l = !0) {
2078
- const n = e.flatMap((u, h) => u.disabled ? [] : [h]);
2153
+ function ge(e, t, a, l = !0) {
2154
+ const n = e.flatMap((s, c) => s.disabled ? [] : [c]);
2079
2155
  if (n.length === 0)
2080
2156
  return -1;
2081
2157
  if (a === "Home")
2082
2158
  return n[0];
2083
2159
  if (a === "End")
2084
2160
  return n[n.length - 1];
2085
- const o = a === "ArrowDown" || a === "ArrowRight" ? 1 : a === "ArrowUp" || a === "ArrowLeft" ? -1 : 0;
2086
- if (o === 0)
2161
+ const r = a === "ArrowDown" || a === "ArrowRight" ? 1 : a === "ArrowUp" || a === "ArrowLeft" ? -1 : 0;
2162
+ if (r === 0)
2087
2163
  return t;
2088
- const r = n.indexOf(t);
2089
- if (r === -1)
2090
- return o > 0 ? n[0] : n[n.length - 1];
2091
- const s = r + o;
2092
- return n[l ? (s + n.length) % n.length : Math.max(0, Math.min(n.length - 1, s))];
2164
+ const o = n.indexOf(t);
2165
+ if (o === -1)
2166
+ return r > 0 ? n[0] : n[n.length - 1];
2167
+ const i = o + r;
2168
+ return n[l ? (i + n.length) % n.length : Math.max(0, Math.min(n.length - 1, i))];
2093
2169
  }
2094
- function La(e, t, a) {
2170
+ function ja(e, t, a) {
2095
2171
  const l = a.trim().toLocaleLowerCase();
2096
2172
  if (l.length === 0)
2097
2173
  return -1;
2098
2174
  for (let n = 1; n <= e.length; n += 1) {
2099
- const o = (t + n + e.length) % e.length, r = e[o];
2100
- if (!r.disabled && r.label.toLocaleLowerCase().startsWith(l))
2101
- return o;
2175
+ const r = (t + n + e.length) % e.length, o = e[r];
2176
+ if (!o.disabled && o.label.toLocaleLowerCase().startsWith(l))
2177
+ return r;
2102
2178
  }
2103
2179
  return -1;
2104
2180
  }
2105
- function Vt(e, t, a, l) {
2106
- const n = Array.isArray(e) ? e : e === void 0 ? [] : [e], o = n.includes(t);
2107
- return a ? o ? !l && n.length === 1 ? [...n] : n.filter((r) => r !== t) : [...n, t] : o && l ? void 0 : t;
2181
+ function Bt(e, t, a, l) {
2182
+ const n = Array.isArray(e) ? e : e === void 0 ? [] : [e], r = n.includes(t);
2183
+ return a ? r ? !l && n.length === 1 ? e : n.filter((o) => o !== t) : [...n, t] : r && l ? void 0 : t;
2108
2184
  }
2109
- function ce(e, t, a) {
2185
+ function fe(e, t, a) {
2110
2186
  return (a ? e.replace(/[^0-9]/g, "") : e).slice(0, t);
2111
2187
  }
2112
- function Ba(e, t, a, l, n, o) {
2113
- const r = ce(t, n, o), s = ce(e.slice(0, a) + r + e.slice(l), n, o);
2114
- return { value: s, cursor: Math.min(a + r.length, s.length) };
2188
+ function qa(e, t, a, l, n, r) {
2189
+ const o = fe(t, n, r), i = fe(e.slice(0, a) + o + e.slice(l), n, r);
2190
+ return { value: i, cursor: Math.min(a + o.length, i.length) };
2115
2191
  }
2116
- function Ze() {
2192
+ function Xe() {
2117
2193
  var t;
2118
- const e = ((t = qe()) == null ? void 0 : t.vnode.props) ?? {};
2194
+ const e = ((t = Ue()) == null ? void 0 : t.vnode.props) ?? {};
2119
2195
  return "modelValue" in e || "model-value" in e;
2120
2196
  }
2121
- const sn = F({
2197
+ const wn = N({
2122
2198
  name: "DshLink",
2123
2199
  inheritAttrs: !1,
2124
- props: { href: String, disabled: Boolean, external: Boolean },
2200
+ props: {
2201
+ href: String,
2202
+ disabled: Boolean,
2203
+ external: Boolean,
2204
+ loading: Boolean,
2205
+ icon: Boolean,
2206
+ hoverable: { type: Boolean, default: !0 },
2207
+ status: String
2208
+ },
2125
2209
  emits: ["click"],
2126
2210
  setup(e, { attrs: t, slots: a, emit: l }) {
2127
2211
  return () => {
2128
- var n;
2129
- return m("a", {
2212
+ const n = e.disabled || e.loading;
2213
+ return m(Ut, {
2130
2214
  ...t,
2215
+ disabled: e.disabled,
2216
+ loading: e.loading,
2217
+ icon: e.icon,
2218
+ hoverable: e.hoverable,
2219
+ status: e.status,
2131
2220
  class: ["dsh-link", t.class],
2132
2221
  role: "link",
2133
- href: e.disabled ? void 0 : e.href,
2134
- target: e.disabled ? void 0 : e.external ? "_blank" : t.target,
2222
+ href: n ? void 0 : e.href,
2223
+ target: n ? void 0 : e.external ? "_blank" : t.target,
2135
2224
  rel: e.external || t.target === "_blank" ? `${t.rel ?? ""} noopener noreferrer`.trim() : t.rel,
2136
- tabindex: e.disabled ? -1 : t.tabindex,
2137
- "aria-disabled": e.disabled || void 0,
2138
- onClick(o) {
2139
- if (e.disabled) {
2140
- o.preventDefault(), o.stopImmediatePropagation();
2141
- return;
2142
- }
2143
- l("click", o);
2144
- }
2145
- }, (n = a.default) == null ? void 0 : n.call(a));
2225
+ tabindex: n ? -1 : t.tabindex,
2226
+ "aria-disabled": n || void 0,
2227
+ "aria-busy": e.loading || void 0,
2228
+ onClickCapture: n ? (r) => {
2229
+ r.preventDefault(), r.stopImmediatePropagation();
2230
+ } : t.onClickCapture,
2231
+ onClick: (r) => l("click", r)
2232
+ }, a);
2146
2233
  };
2147
2234
  }
2148
- }), un = F({
2235
+ }), Dn = N({
2149
2236
  name: "DshKbd",
2150
2237
  props: { keys: { type: Array, default: () => [] } },
2151
2238
  setup(e, { slots: t }) {
@@ -2157,7 +2244,7 @@ const sn = F({
2157
2244
  ]);
2158
2245
  };
2159
2246
  }
2160
- }), cn = F({
2247
+ }), Sn = N({
2161
2248
  name: "DshSurface",
2162
2249
  props: {
2163
2250
  as: { type: String, default: "div" },
@@ -2169,7 +2256,7 @@ const sn = F({
2169
2256
  return m(e.as, { class: "dsh-surface", "data-variant": e.variant }, (a = t.default) == null ? void 0 : a.call(t));
2170
2257
  };
2171
2258
  }
2172
- }), dn = F({
2259
+ }), Mn = N({
2173
2260
  name: "DshHeader",
2174
2261
  setup(e, { slots: t }) {
2175
2262
  return () => {
@@ -2177,7 +2264,7 @@ const sn = F({
2177
2264
  return m("header", { class: "dsh-header" }, (a = t.default) == null ? void 0 : a.call(t));
2178
2265
  };
2179
2266
  }
2180
- }), Ea = F({
2267
+ }), Wa = N({
2181
2268
  name: "DshLabel",
2182
2269
  props: { required: Boolean },
2183
2270
  setup(e, { slots: t }) {
@@ -2186,7 +2273,7 @@ const sn = F({
2186
2273
  return m("label", { class: "dsh-label" }, [(a = t.default) == null ? void 0 : a.call(t), e.required ? m("span", { "aria-hidden": "true", class: "dsh-label__required" }, " *") : null]);
2187
2274
  };
2188
2275
  }
2189
- }), Na = F({
2276
+ }), Ua = N({
2190
2277
  name: "DshDescription",
2191
2278
  setup(e, { slots: t }) {
2192
2279
  return () => {
@@ -2194,7 +2281,7 @@ const sn = F({
2194
2281
  return m("div", { class: "dsh-description" }, (a = t.default) == null ? void 0 : a.call(t));
2195
2282
  };
2196
2283
  }
2197
- }), Ot = F({
2284
+ }), Lt = N({
2198
2285
  name: "DshFieldError",
2199
2286
  setup(e, { slots: t }) {
2200
2287
  return () => {
@@ -2202,7 +2289,7 @@ const sn = F({
2202
2289
  return m("div", { class: "dsh-field-error", "aria-live": "polite" }, (a = t.default) == null ? void 0 : a.call(t));
2203
2290
  };
2204
2291
  }
2205
- }), fn = Ot, hn = F({
2292
+ }), kn = Lt, An = N({
2206
2293
  name: "DshFieldset",
2207
2294
  props: { legend: String, disabled: Boolean },
2208
2295
  setup(e, { slots: t }) {
@@ -2214,7 +2301,7 @@ const sn = F({
2214
2301
  ]);
2215
2302
  };
2216
2303
  }
2217
- }), mn = F({
2304
+ }), xn = N({
2218
2305
  name: "DshInputGroup",
2219
2306
  setup(e, { slots: t }) {
2220
2307
  return () => {
@@ -2226,7 +2313,7 @@ const sn = F({
2226
2313
  ]);
2227
2314
  };
2228
2315
  }
2229
- }), Yt = {
2316
+ }), Et = {
2230
2317
  modelValue: String,
2231
2318
  defaultValue: { type: String, default: "" },
2232
2319
  id: String,
@@ -2240,86 +2327,88 @@ const sn = F({
2240
2327
  name: String,
2241
2328
  placeholder: String,
2242
2329
  type: { type: String, default: "text" }
2243
- }, Fa = F({
2330
+ }, Ka = N({
2244
2331
  name: "DshTextField",
2245
2332
  inheritAttrs: !1,
2246
- props: Yt,
2333
+ props: Et,
2247
2334
  emits: ["update:modelValue", "change", "input", "focus", "blur"],
2248
2335
  setup(e, { attrs: t, slots: a, emit: l, expose: n }) {
2249
- const o = Ze(), r = Me(), s = q(null), u = q(e.defaultValue);
2336
+ const r = Xe(), o = ke(), i = j(null), s = j(e.defaultValue);
2250
2337
  return n({ focus: () => {
2251
- var h;
2252
- return (h = s.value) == null ? void 0 : h.focus();
2338
+ var c;
2339
+ return (c = i.value) == null ? void 0 : c.focus();
2253
2340
  }, blur: () => {
2254
- var h;
2255
- return (h = s.value) == null ? void 0 : h.blur();
2341
+ var c;
2342
+ return (c = i.value) == null ? void 0 : c.blur();
2256
2343
  } }), () => {
2257
- const h = e.id ?? `dsh-field-${r}`, c = !!(e.description || a.description), S = !!(e.errorMessage || a.error), i = [t["aria-describedby"], c ? `${h}-description` : "", S ? `${h}-error` : ""].filter(Boolean).join(" ") || void 0, { class: x, style: w, ..._ } = t;
2258
- return m("div", { class: ["dsh-field", x], style: w, "data-invalid": e.invalid || S || void 0 }, [
2259
- e.label || a.label ? m(Ea, { for: h, required: e.required }, { default: () => {
2260
- var d;
2261
- return ((d = a.label) == null ? void 0 : d.call(a)) ?? e.label;
2344
+ var w;
2345
+ const c = e.id ?? `dsh-field-${o}`, v = !!(e.description || a.description), g = !!(e.errorMessage || a.error), f = [t["aria-describedby"], v ? `${c}-description` : "", g ? `${c}-error` : ""].filter(Boolean).join(" ") || void 0, { class: h, style: A, "aria-labelledby": T, ...d } = t;
2346
+ return m("div", { class: ["dsh-field", h], style: A, "data-invalid": e.invalid || g || void 0 }, [
2347
+ e.label || a.label ? m(Wa, { for: c, required: e.required }, { default: () => {
2348
+ var C;
2349
+ return ((C = a.label) == null ? void 0 : C.call(a)) ?? e.label;
2262
2350
  } }) : null,
2263
- m(Ht, {
2264
- ..._,
2265
- ref: s,
2351
+ m(Kt, {
2352
+ ...d,
2353
+ ref: i,
2266
2354
  type: e.type === "password" ? "password" : "text",
2267
2355
  inputAttrs: {
2268
2356
  ...typeof t.inputAttrs == "object" ? t.inputAttrs : {},
2269
- id: h,
2357
+ id: c,
2270
2358
  name: e.name,
2271
2359
  type: e.type,
2272
2360
  required: e.required,
2273
2361
  "aria-label": t["aria-label"],
2274
- "aria-invalid": e.invalid || S || void 0,
2275
- "aria-describedby": i,
2362
+ "aria-labelledby": T ?? ((w = t.inputAttrs) == null ? void 0 : w["aria-labelledby"]),
2363
+ "aria-invalid": e.invalid || g || void 0,
2364
+ "aria-describedby": f,
2276
2365
  "aria-required": e.required || void 0
2277
2366
  },
2278
2367
  placeholder: e.placeholder,
2279
- modelValue: o ? e.modelValue ?? "" : u.value,
2368
+ modelValue: r ? e.modelValue ?? "" : s.value,
2280
2369
  disabled: e.disabled,
2281
2370
  readonly: e.readonly,
2282
- error: e.invalid || S,
2283
- "onUpdate:modelValue": (d) => {
2284
- u.value = d, l("update:modelValue", d);
2371
+ error: e.invalid || g,
2372
+ "onUpdate:modelValue": (C) => {
2373
+ s.value = C, l("update:modelValue", C);
2285
2374
  },
2286
- onChange: (d, v) => l("change", d, v),
2287
- onInput: (d, v) => l("input", d, v),
2288
- onFocus: (d) => l("focus", d),
2289
- onBlur: (d) => l("blur", d)
2375
+ onChange: (C, b) => l("change", C, b),
2376
+ onInput: (C, b) => l("input", C, b),
2377
+ onFocus: (C) => l("focus", C),
2378
+ onBlur: (C) => l("blur", C)
2290
2379
  }, { prefix: a.prefix, suffix: a.suffix, prepend: a.prepend, append: a.append }),
2291
- c ? m(Na, { id: `${h}-description` }, { default: () => {
2292
- var d;
2293
- return ((d = a.description) == null ? void 0 : d.call(a)) ?? e.description;
2380
+ v ? m(Ua, { id: `${c}-description` }, { default: () => {
2381
+ var C;
2382
+ return ((C = a.description) == null ? void 0 : C.call(a)) ?? e.description;
2294
2383
  } }) : null,
2295
- S ? m(Ot, { id: `${h}-error` }, { default: () => {
2296
- var d;
2297
- return ((d = a.error) == null ? void 0 : d.call(a)) ?? e.errorMessage;
2384
+ g ? m(Lt, { id: `${c}-error` }, { default: () => {
2385
+ var C;
2386
+ return ((C = a.error) == null ? void 0 : C.call(a)) ?? e.errorMessage;
2298
2387
  } }) : null
2299
2388
  ]);
2300
2389
  };
2301
2390
  }
2302
- }), vn = F({
2391
+ }), Cn = N({
2303
2392
  name: "DshSearchField",
2304
2393
  inheritAttrs: !1,
2305
- props: Yt,
2394
+ props: Et,
2306
2395
  emits: ["update:modelValue", "search"],
2307
2396
  setup(e, { attrs: t, slots: a, emit: l }) {
2308
- const n = Ze(), o = q(e.defaultValue);
2309
- return () => m(Fa, fe(t, {
2397
+ const n = Xe(), r = j(e.defaultValue);
2398
+ return () => m(Ka, ce(t, {
2310
2399
  ...e,
2311
2400
  type: "search",
2312
2401
  allowClear: !0,
2313
- modelValue: n ? e.modelValue ?? "" : o.value,
2314
- "onUpdate:modelValue": (r) => {
2315
- o.value = r, l("update:modelValue", r);
2402
+ modelValue: n ? e.modelValue ?? "" : r.value,
2403
+ "onUpdate:modelValue": (o) => {
2404
+ r.value = o, l("update:modelValue", o);
2316
2405
  },
2317
- onKeydown: (r) => {
2318
- r.key === "Enter" && !r.isComposing && !e.disabled && l("search", n ? e.modelValue ?? "" : o.value);
2406
+ onKeydown: (o) => {
2407
+ o.key === "Enter" && !o.isComposing && !e.disabled && l("search", n ? e.modelValue ?? "" : r.value);
2319
2408
  }
2320
2409
  }), a);
2321
2410
  }
2322
- }), pn = F({
2411
+ }), $n = N({
2323
2412
  name: "DshInputOTP",
2324
2413
  inheritAttrs: !1,
2325
2414
  props: {
@@ -2334,46 +2423,46 @@ const sn = F({
2334
2423
  },
2335
2424
  emits: ["update:modelValue", "complete", "change"],
2336
2425
  setup(e, { attrs: t, emit: a, expose: l }) {
2337
- const n = Ze(), o = q(null), r = q(ce(e.defaultValue, e.length, e.type === "numeric")), s = J(() => ce(n ? e.modelValue ?? "" : r.value, e.length, e.type === "numeric")), u = q(!1), h = q(0), c = () => {
2338
- var i;
2339
- h.value = ((i = o.value) == null ? void 0 : i.selectionStart) ?? 0;
2340
- }, S = (i, x) => {
2341
- const w = s.value;
2342
- r.value = i, a("update:modelValue", i), w !== i && (a("change", i), i.length === e.length && a("complete", i)), re(() => {
2343
- o.value && (o.value.value = s.value, o.value.setSelectionRange(x, x), c());
2426
+ const n = Xe(), r = j(null), o = j(fe(e.defaultValue, e.length, e.type === "numeric")), i = Z(() => fe(n ? e.modelValue ?? "" : o.value, e.length, e.type === "numeric")), s = j(!1), c = j(0), v = () => {
2427
+ var f;
2428
+ c.value = ((f = r.value) == null ? void 0 : f.selectionStart) ?? 0;
2429
+ }, g = (f, h) => {
2430
+ const A = i.value;
2431
+ o.value = f, a("update:modelValue", f), A !== f && (a("change", f), f.length === e.length && a("complete", f)), se(() => {
2432
+ r.value && (r.value.value = i.value, r.value.setSelectionRange(h, h), v());
2344
2433
  });
2345
2434
  };
2346
2435
  return l({ focus: () => {
2347
- var i;
2348
- return (i = o.value) == null ? void 0 : i.focus();
2436
+ var f;
2437
+ return (f = r.value) == null ? void 0 : f.focus();
2349
2438
  }, blur: () => {
2350
- var i;
2351
- return (i = o.value) == null ? void 0 : i.blur();
2439
+ var f;
2440
+ return (f = r.value) == null ? void 0 : f.blur();
2352
2441
  } }), () => {
2353
- const { class: i, style: x, ...w } = t;
2442
+ const { class: f, style: h, ...A } = t;
2354
2443
  return m("div", {
2355
- class: ["dsh-otp", i],
2356
- style: x,
2444
+ class: ["dsh-otp", f],
2445
+ style: h,
2357
2446
  "data-invalid": e.invalid || void 0,
2358
2447
  "data-disabled": e.disabled || void 0,
2359
- onMousedown(_) {
2448
+ onMousedown(T) {
2360
2449
  var d;
2361
- !e.disabled && !_.defaultPrevented && (_.preventDefault(), (d = o.value) == null || d.focus());
2450
+ !e.disabled && !T.defaultPrevented && (T.preventDefault(), (d = r.value) == null || d.focus());
2362
2451
  }
2363
2452
  }, [
2364
- m("div", { class: "dsh-otp__cells", "aria-hidden": "true" }, Array.from({ length: e.length }, (_, d) => m("span", {
2453
+ m("div", { class: "dsh-otp__cells", "aria-hidden": "true" }, Array.from({ length: e.length }, (T, d) => m("span", {
2365
2454
  class: "dsh-otp__cell",
2366
- "data-active": u.value && Math.min(h.value, e.length - 1) === d || void 0,
2367
- "data-filled": !!s.value[d] || void 0,
2368
- onMousedown(v) {
2369
- var O, A;
2370
- e.disabled || (v.preventDefault(), (O = o.value) == null || O.focus(), (A = o.value) == null || A.setSelectionRange(Math.min(d, s.value.length), Math.min(d, s.value.length)), c());
2455
+ "data-active": s.value && Math.min(c.value, e.length - 1) === d || void 0,
2456
+ "data-filled": !!i.value[d] || void 0,
2457
+ onMousedown(w) {
2458
+ var C, b;
2459
+ e.disabled || (w.preventDefault(), (C = r.value) == null || C.focus(), (b = r.value) == null || b.setSelectionRange(Math.min(d, i.value.length), Math.min(d, i.value.length)), v());
2371
2460
  }
2372
- }, s.value[d] ?? ""))),
2373
- m("input", fe(w, {
2374
- ref: o,
2461
+ }, i.value[d] ?? ""))),
2462
+ m("input", ce(A, {
2463
+ ref: r,
2375
2464
  class: "dsh-otp__input",
2376
- value: s.value,
2465
+ value: i.value,
2377
2466
  type: "text",
2378
2467
  inputmode: e.type === "numeric" ? "numeric" : "text",
2379
2468
  autocomplete: "one-time-code",
@@ -2383,85 +2472,85 @@ const sn = F({
2383
2472
  "aria-label": t["aria-label"] ?? e.label,
2384
2473
  "aria-invalid": e.invalid || void 0,
2385
2474
  onFocus: () => {
2386
- u.value = !0, c();
2475
+ s.value = !0, v();
2387
2476
  },
2388
2477
  onBlur: () => {
2389
- u.value = !1;
2478
+ s.value = !1;
2390
2479
  },
2391
- onSelect: c,
2392
- onKeyup: c,
2393
- onInput(_) {
2394
- const d = _.target, v = ce(d.value.slice(0, d.selectionStart ?? 0), e.length, e.type === "numeric").length;
2395
- S(ce(d.value, e.length, e.type === "numeric"), v);
2480
+ onSelect: v,
2481
+ onKeyup: v,
2482
+ onInput(T) {
2483
+ const d = T.target, w = fe(d.value.slice(0, d.selectionStart ?? 0), e.length, e.type === "numeric").length;
2484
+ g(fe(d.value, e.length, e.type === "numeric"), w);
2396
2485
  },
2397
- onPaste(_) {
2398
- var v, O;
2399
- if (e.disabled || e.readonly || !_.clipboardData)
2486
+ onPaste(T) {
2487
+ var w, C;
2488
+ if (e.disabled || e.readonly || !T.clipboardData)
2400
2489
  return;
2401
- _.preventDefault();
2402
- const d = Ba(s.value, _.clipboardData.getData("text"), ((v = o.value) == null ? void 0 : v.selectionStart) ?? 0, ((O = o.value) == null ? void 0 : O.selectionEnd) ?? 0, e.length, e.type === "numeric");
2403
- S(d.value, d.cursor);
2490
+ T.preventDefault();
2491
+ const d = qa(i.value, T.clipboardData.getData("text"), ((w = r.value) == null ? void 0 : w.selectionStart) ?? 0, ((C = r.value) == null ? void 0 : C.selectionEnd) ?? 0, e.length, e.type === "numeric");
2492
+ g(d.value, d.cursor);
2404
2493
  }
2405
2494
  }))
2406
2495
  ]);
2407
2496
  };
2408
2497
  }
2409
- }), gn = F({
2498
+ }), Pn = N({
2410
2499
  name: "DshScrollShadow",
2411
2500
  props: { maxHeight: { type: [Number, String], default: 240 }, variant: String },
2412
2501
  setup(e, { slots: t }) {
2413
- const a = q(null), l = q(!1);
2502
+ const a = j(null), l = j(!1);
2414
2503
  let n;
2415
- const o = q({ top: !1, bottom: !1, left: !1, right: !1 });
2416
- let r, s;
2417
- const u = () => {
2418
- var c;
2419
- const h = (c = a.value) == null ? void 0 : c.querySelector(".arco-scrollbar-container");
2420
- h && (o.value = {
2421
- top: h.scrollTop > 1,
2422
- bottom: h.scrollTop + h.clientHeight < h.scrollHeight - 1,
2423
- left: h.scrollLeft > 1,
2424
- right: h.scrollLeft + h.clientWidth < h.scrollWidth - 1
2504
+ const r = j({ top: !1, bottom: !1, left: !1, right: !1 });
2505
+ let o, i;
2506
+ const s = () => {
2507
+ var v;
2508
+ const c = (v = a.value) == null ? void 0 : v.querySelector(".arco-scrollbar-container");
2509
+ c && (r.value = {
2510
+ top: c.scrollTop > 1,
2511
+ bottom: c.scrollTop + c.clientHeight < c.scrollHeight - 1,
2512
+ left: c.scrollLeft > 1,
2513
+ right: c.scrollLeft + c.clientWidth < c.scrollWidth - 1
2425
2514
  });
2426
2515
  };
2427
- return he(() => {
2428
- if (u(), typeof ResizeObserver < "u" && a.value) {
2429
- r = new ResizeObserver(u), r.observe(a.value);
2430
- const h = a.value.querySelector(".dsh-scroll-shadow__content");
2431
- h && r.observe(h);
2516
+ return ve(() => {
2517
+ if (s(), typeof ResizeObserver < "u" && a.value) {
2518
+ o = new ResizeObserver(s), o.observe(a.value);
2519
+ const c = a.value.querySelector(".dsh-scroll-shadow__content");
2520
+ c && o.observe(c);
2432
2521
  }
2433
2522
  if (a.value) {
2434
- s = new MutationObserver(u);
2435
- const h = a.value.querySelector(".dsh-scroll-shadow__content");
2436
- h && s.observe(h, { childList: !0, subtree: !0, characterData: !0 });
2523
+ i = new MutationObserver(s);
2524
+ const c = a.value.querySelector(".dsh-scroll-shadow__content");
2525
+ c && i.observe(c, { childList: !0, subtree: !0, characterData: !0 });
2437
2526
  }
2438
- }), ve(() => {
2439
- r == null || r.disconnect(), s == null || s.disconnect(), clearTimeout(n);
2527
+ }), pe(() => {
2528
+ o == null || o.disconnect(), i == null || i.disconnect(), clearTimeout(n);
2440
2529
  }), () => m("div", {
2441
2530
  ref: a,
2442
2531
  class: ["dsh-scroll-shadow", { "dsh-scroll-shadow--page": e.variant === "page" }],
2443
2532
  "data-scrolling": l.value || void 0,
2444
2533
  onScrollCapture() {
2445
- u(), e.variant === "page" && (l.value = !0, clearTimeout(n), n = setTimeout(() => {
2534
+ s(), e.variant === "page" && (l.value = !0, clearTimeout(n), n = setTimeout(() => {
2446
2535
  l.value = !1;
2447
2536
  }, 900));
2448
2537
  },
2449
- "data-top": o.value.top || void 0,
2450
- "data-bottom": o.value.bottom || void 0,
2451
- "data-left": o.value.left || void 0,
2452
- "data-right": o.value.right || void 0
2453
- }, m(ut, { style: { height: "100%", overflow: "auto", maxHeight: typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight }, outerStyle: { height: "100%", maxHeight: typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight } }, { default: () => {
2454
- var h;
2455
- return m("div", { class: "dsh-scroll-shadow__content" }, (h = t.default) == null ? void 0 : h.call(t));
2538
+ "data-top": r.value.top || void 0,
2539
+ "data-bottom": r.value.bottom || void 0,
2540
+ "data-left": r.value.left || void 0,
2541
+ "data-right": r.value.right || void 0
2542
+ }, m(dt, { style: { height: "100%", overflow: "auto", maxHeight: typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight }, outerStyle: { height: "100%", maxHeight: typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight } }, { default: () => {
2543
+ var c;
2544
+ return m("div", { class: "dsh-scroll-shadow__content" }, (c = t.default) == null ? void 0 : c.call(t));
2456
2545
  } }));
2457
2546
  }
2458
2547
  });
2459
- function Te() {
2548
+ function Oe() {
2460
2549
  var t;
2461
- const e = ((t = qe()) == null ? void 0 : t.vnode.props) ?? {};
2550
+ const e = ((t = Ue()) == null ? void 0 : t.vnode.props) ?? {};
2462
2551
  return "modelValue" in e || "model-value" in e;
2463
2552
  }
2464
- const It = {
2553
+ const Nt = {
2465
2554
  options: { type: Array, default: () => [] },
2466
2555
  modelValue: [String, Number, Array],
2467
2556
  defaultValue: [String, Number, Array],
@@ -2469,90 +2558,92 @@ const It = {
2469
2558
  disabled: Boolean,
2470
2559
  allowEmpty: { type: Boolean, default: !0 },
2471
2560
  label: String
2472
- }, bn = F({
2561
+ }, _n = N({
2473
2562
  name: "DshListBox",
2474
- props: It,
2563
+ props: Nt,
2475
2564
  emits: ["update:modelValue", "change"],
2476
2565
  setup(e, { slots: t, emit: a }) {
2477
- const l = Te(), n = Me(), o = q(null), r = q(e.defaultValue), s = J(() => l ? e.modelValue : r.value), u = J(() => Array.isArray(s.value) ? s.value : s.value === void 0 ? [] : [s.value]), h = q(-1);
2478
- let c = "", S = 0;
2479
- const i = () => {
2480
- const d = e.options.findIndex((v) => !v.disabled && u.value.includes(v.value));
2481
- h.value = d < 0 ? me(e.options, -1, "Home") : d;
2566
+ const l = Oe(), n = ke(), r = j(null), o = j(e.defaultValue), i = Z(() => l ? e.modelValue : o.value), s = Z(() => Array.isArray(i.value) ? i.value : i.value === void 0 ? [] : [i.value]), c = j(-1);
2567
+ let v = "", g = 0;
2568
+ const f = () => {
2569
+ const d = e.options.findIndex((w) => !w.disabled && s.value.includes(w.value));
2570
+ c.value = d < 0 ? ge(e.options, -1, "Home") : d;
2482
2571
  };
2483
- le(() => e.options, i, { immediate: !0, deep: !0 });
2484
- const x = (d) => {
2485
- const v = e.options[d];
2486
- if (e.disabled || !v || v.disabled)
2572
+ le(() => e.options, f, { immediate: !0, deep: !0 });
2573
+ const h = (d) => {
2574
+ const w = e.options[d];
2575
+ if (e.disabled || !w || w.disabled)
2487
2576
  return;
2488
- h.value = d;
2489
- const O = Vt(s.value, v.value, e.multiple, e.allowEmpty);
2490
- r.value = O, a("update:modelValue", O), a("change", O);
2491
- }, w = () => {
2492
- re(() => {
2493
- var d, v;
2494
- return (v = (d = o.value) == null ? void 0 : d.querySelector(`[data-index="${h.value}"]`)) == null ? void 0 : v.scrollIntoView({ block: "nearest" });
2577
+ c.value = d;
2578
+ const C = Bt(i.value, w.value, e.multiple, e.allowEmpty);
2579
+ C !== i.value && (o.value = C, a("update:modelValue", C), a("change", C));
2580
+ }, A = () => {
2581
+ se(() => {
2582
+ var d, w;
2583
+ return (w = (d = r.value) == null ? void 0 : d.querySelector(`[data-index="${c.value}"]`)) == null ? void 0 : w.scrollIntoView({ block: "nearest" });
2495
2584
  });
2496
- }, _ = (d) => {
2585
+ }, T = (d) => {
2497
2586
  if (!(e.disabled || d.isComposing)) {
2498
2587
  if (["ArrowUp", "ArrowDown", "Home", "End"].includes(d.key))
2499
- d.preventDefault(), h.value = me(e.options, h.value, d.key), w();
2588
+ d.preventDefault(), c.value = ge(e.options, c.value, d.key), A();
2500
2589
  else if (d.key === "Enter" || d.key === " ")
2501
- d.preventDefault(), x(h.value);
2590
+ d.preventDefault(), h(c.value);
2502
2591
  else if (e.multiple && (d.ctrlKey || d.metaKey) && d.key.toLowerCase() === "a") {
2503
2592
  d.preventDefault();
2504
- const v = e.options.filter((O) => !O.disabled || u.value.includes(O.value)).map((O) => O.value);
2505
- r.value = v, a("update:modelValue", v), a("change", v);
2593
+ const w = e.options.filter((C) => !C.disabled || s.value.includes(C.value)).map((C) => C.value);
2594
+ if (w.length === s.value.length && w.every((C) => s.value.includes(C)))
2595
+ return;
2596
+ o.value = w, a("update:modelValue", w), a("change", w);
2506
2597
  } else if (d.key.length === 1 && !d.ctrlKey && !d.metaKey && !d.altKey) {
2507
- const v = Date.now();
2508
- c = v - S > 700 ? d.key : c + d.key, S = v;
2509
- const A = [...c].every((I) => I.toLocaleLowerCase() === d.key.toLocaleLowerCase()) ? d.key : c, Y = La(e.options, A.length > 1 ? h.value - 1 : h.value, A);
2510
- Y >= 0 && (h.value = Y, w()), d.preventDefault();
2598
+ const w = Date.now();
2599
+ v = w - g > 700 ? d.key : v + d.key, g = w;
2600
+ const b = [...v].every((Y) => Y.toLocaleLowerCase() === d.key.toLocaleLowerCase()) ? d.key : v, P = ja(e.options, b.length > 1 ? c.value - 1 : c.value, b);
2601
+ P >= 0 && (c.value = P, A()), d.preventDefault();
2511
2602
  }
2512
2603
  }
2513
2604
  };
2514
2605
  return () => {
2515
2606
  var d;
2516
2607
  return m("div", {
2517
- ref: o,
2608
+ ref: r,
2518
2609
  class: "dsh-listbox",
2519
2610
  role: "listbox",
2520
2611
  tabindex: e.disabled ? -1 : 0,
2521
2612
  "aria-label": e.label,
2522
2613
  "aria-multiselectable": e.multiple || void 0,
2523
2614
  "aria-disabled": e.disabled || void 0,
2524
- "aria-activedescendant": h.value < 0 ? void 0 : `dsh-listbox-${n}-${h.value}`,
2525
- onKeydown: _,
2526
- onFocus: i
2527
- }, e.options.length === 0 ? (d = t.empty) == null ? void 0 : d.call(t) : e.options.map((v, O) => {
2528
- var A;
2615
+ "aria-activedescendant": c.value < 0 ? void 0 : `dsh-listbox-${n}-${c.value}`,
2616
+ onKeydown: T,
2617
+ onFocus: f
2618
+ }, e.options.length === 0 ? (d = t.empty) == null ? void 0 : d.call(t) : e.options.map((w, C) => {
2619
+ var b;
2529
2620
  return m("div", {
2530
- key: v.value,
2531
- id: `dsh-listbox-${n}-${O}`,
2621
+ key: w.value,
2622
+ id: `dsh-listbox-${n}-${C}`,
2532
2623
  role: "option",
2533
- "aria-selected": u.value.includes(v.value),
2534
- "aria-disabled": e.disabled || v.disabled || void 0,
2535
- "data-selected": u.value.includes(v.value) || void 0,
2536
- "data-disabled": e.disabled || v.disabled || void 0,
2537
- "data-active": h.value === O || void 0,
2538
- "data-index": O,
2624
+ "aria-selected": s.value.includes(w.value),
2625
+ "aria-disabled": e.disabled || w.disabled || void 0,
2626
+ "data-selected": s.value.includes(w.value) || void 0,
2627
+ "data-disabled": e.disabled || w.disabled || void 0,
2628
+ "data-active": c.value === C || void 0,
2629
+ "data-index": C,
2539
2630
  class: "dsh-listbox__option",
2540
- onMousedown(Y) {
2541
- Y.preventDefault();
2631
+ onMousedown(P) {
2632
+ P.preventDefault();
2542
2633
  },
2543
2634
  onClick() {
2544
- var Y;
2545
- (Y = o.value) == null || Y.focus(), x(O);
2635
+ var P;
2636
+ (P = r.value) == null || P.focus(), h(C);
2546
2637
  }
2547
- }, ((A = t.option) == null ? void 0 : A.call(t, { option: v, selected: u.value.includes(v.value), active: h.value === O })) ?? [
2548
- m("span", { class: "dsh-listbox__label" }, v.label),
2549
- v.description ? m("span", { class: "dsh-description" }, v.description) : null,
2550
- m("span", { class: "dsh-listbox__indicator", "aria-hidden": "true" }, u.value.includes(v.value) ? "✓" : "")
2638
+ }, ((b = t.option) == null ? void 0 : b.call(t, { option: w, selected: s.value.includes(w.value), active: c.value === C })) ?? [
2639
+ m("span", { class: "dsh-listbox__label" }, w.label),
2640
+ w.description ? m("span", { class: "dsh-description" }, w.description) : null,
2641
+ m("span", { class: "dsh-listbox__indicator", "aria-hidden": "true" }, s.value.includes(w.value) ? "✓" : "")
2551
2642
  ]);
2552
2643
  }));
2553
2644
  };
2554
2645
  }
2555
- }), Ha = F({
2646
+ }), Ga = N({
2556
2647
  name: "DshToggleButton",
2557
2648
  inheritAttrs: !1,
2558
2649
  props: {
@@ -2562,40 +2653,40 @@ const It = {
2562
2653
  },
2563
2654
  emits: ["update:modelValue", "change", "click"],
2564
2655
  setup(e, { attrs: t, slots: a, emit: l }) {
2565
- const n = Te(), o = q(e.defaultValue), r = J(() => n ? e.modelValue ?? !1 : o.value);
2656
+ const n = Oe(), r = j(e.defaultValue), o = Z(() => n ? e.modelValue ?? !1 : r.value);
2566
2657
  return () => {
2567
- var s;
2658
+ var i;
2568
2659
  return m("button", {
2569
2660
  ...t,
2570
2661
  class: ["dsh-toggle-button", t.class],
2571
2662
  type: "button",
2572
2663
  disabled: e.disabled,
2573
- "aria-pressed": r.value,
2574
- "data-selected": r.value || void 0,
2575
- onClick(u) {
2576
- e.disabled || (o.value = !r.value, l("update:modelValue", o.value), l("change", o.value), l("click", u));
2664
+ "aria-pressed": o.value,
2665
+ "data-selected": o.value || void 0,
2666
+ onClick(s) {
2667
+ e.disabled || (r.value = !o.value, l("update:modelValue", r.value), l("change", r.value), l("click", s));
2577
2668
  }
2578
- }, (s = a.default) == null ? void 0 : s.call(a));
2669
+ }, (i = a.default) == null ? void 0 : i.call(a));
2579
2670
  };
2580
2671
  }
2581
- }), yn = F({
2672
+ }), Tn = N({
2582
2673
  name: "DshToggleButtonGroup",
2583
- props: { ...It, orientation: { type: String, default: "horizontal" } },
2674
+ props: { ...Nt, orientation: { type: String, default: "horizontal" } },
2584
2675
  emits: ["update:modelValue", "change"],
2585
2676
  setup(e, { slots: t, emit: a }) {
2586
- const l = Te(), n = q(null), o = q(e.defaultValue), r = J(() => l ? e.modelValue : o.value), s = J(() => Array.isArray(r.value) ? r.value : r.value === void 0 ? [] : [r.value]), u = q(-1);
2677
+ const l = Oe(), n = j(null), r = j(e.defaultValue), o = Z(() => l ? e.modelValue : r.value), i = Z(() => Array.isArray(o.value) ? o.value : o.value === void 0 ? [] : [o.value]), s = j(-1);
2587
2678
  le(() => e.options, () => {
2588
- var c;
2589
- if (!e.options[u.value] || (c = e.options[u.value]) != null && c.disabled) {
2590
- const S = e.options.findIndex((i) => !i.disabled && s.value.includes(i.value));
2591
- u.value = S < 0 ? me(e.options, -1, "Home") : S;
2679
+ var v;
2680
+ if (!e.options[s.value] || (v = e.options[s.value]) != null && v.disabled) {
2681
+ const g = e.options.findIndex((f) => !f.disabled && i.value.includes(f.value));
2682
+ s.value = g < 0 ? ge(e.options, -1, "Home") : g;
2592
2683
  }
2593
2684
  }, { immediate: !0, deep: !0 });
2594
- const h = (c) => {
2595
- if (e.disabled || c.disabled)
2685
+ const c = (v) => {
2686
+ if (e.disabled || v.disabled)
2596
2687
  return;
2597
- const S = Vt(r.value, c.value, e.multiple, e.allowEmpty);
2598
- o.value = S, a("update:modelValue", S), a("change", S);
2688
+ const g = Bt(o.value, v.value, e.multiple, e.allowEmpty);
2689
+ g !== o.value && (r.value = g, a("update:modelValue", g), a("change", g));
2599
2690
  };
2600
2691
  return () => m("div", {
2601
2692
  ref: n,
@@ -2604,77 +2695,84 @@ const It = {
2604
2695
  "aria-label": e.label,
2605
2696
  "aria-disabled": e.disabled || void 0,
2606
2697
  "data-orientation": e.orientation,
2607
- onKeydown(c) {
2608
- if (e.disabled || !(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(c.key))
2698
+ onKeydown(v) {
2699
+ if (e.disabled || !(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(v.key))
2609
2700
  return;
2610
- c.preventDefault();
2611
- let i = c.key;
2612
- e.orientation === "horizontal" && n.value && getComputedStyle(n.value).direction === "rtl" && (i === "ArrowLeft" ? i = "ArrowRight" : i === "ArrowRight" && (i = "ArrowLeft")), u.value = me(e.options, u.value, i), re(() => {
2613
- var x, w;
2614
- return (w = (x = n.value) == null ? void 0 : x.querySelector(`[data-index="${u.value}"]`)) == null ? void 0 : w.focus();
2701
+ v.preventDefault();
2702
+ let f = v.key;
2703
+ e.orientation === "horizontal" && n.value && getComputedStyle(n.value).direction === "rtl" && (f === "ArrowLeft" ? f = "ArrowRight" : f === "ArrowRight" && (f = "ArrowLeft")), s.value = ge(e.options, s.value, f), se(() => {
2704
+ var h, A;
2705
+ return (A = (h = n.value) == null ? void 0 : h.querySelector(`[data-index="${s.value}"]`)) == null ? void 0 : A.focus();
2615
2706
  });
2616
2707
  }
2617
- }, e.options.map((c, S) => m(Ha, {
2618
- key: c.value,
2619
- modelValue: s.value.includes(c.value),
2620
- disabled: e.disabled || c.disabled,
2621
- tabindex: u.value === S ? 0 : -1,
2622
- "data-index": S,
2708
+ }, e.options.map((v, g) => m(Ga, {
2709
+ key: v.value,
2710
+ modelValue: i.value.includes(v.value),
2711
+ disabled: e.disabled || v.disabled,
2712
+ tabindex: s.value === g ? 0 : -1,
2713
+ "data-index": g,
2623
2714
  onFocus: () => {
2624
- u.value = S;
2715
+ s.value = g;
2625
2716
  },
2626
- "onUpdate:modelValue": () => h(c)
2717
+ "onUpdate:modelValue": () => c(v)
2627
2718
  }, { default: () => {
2628
- var i;
2629
- return ((i = t.option) == null ? void 0 : i.call(t, { option: c, selected: s.value.includes(c.value) })) ?? c.label;
2719
+ var f;
2720
+ return ((f = t.option) == null ? void 0 : f.call(t, { option: v, selected: i.value.includes(v.value) })) ?? v.label;
2630
2721
  } })));
2631
2722
  }
2632
- }), wn = F({
2723
+ }), Vn = N({
2633
2724
  name: "DshToolbar",
2634
2725
  props: { label: String, orientation: { type: String, default: "horizontal" } },
2635
2726
  setup(e, { slots: t }) {
2636
- const a = q(null);
2727
+ const a = j(null);
2637
2728
  let l;
2638
- const n = /* @__PURE__ */ new Map(), o = () => {
2639
- var s;
2640
- return Array.from(((s = a.value) == null ? void 0 : s.querySelectorAll("button, a[href], input, select, textarea, [tabindex]")) ?? []).filter((u) => !u.matches(':disabled, [aria-disabled="true"], [hidden]') && !u.closest("[hidden], [inert]"));
2641
- }, r = (s) => {
2642
- const u = o(), h = s && u.includes(s) ? s : u.find((c) => c === document.activeElement) ?? u.find((c) => c.tabIndex === 0) ?? u[0];
2643
- for (const c of u)
2644
- n.has(c) || n.set(c, c.getAttribute("tabindex")), c.tabIndex = c === h ? 0 : -1;
2729
+ const n = /* @__PURE__ */ new Map(), r = () => {
2730
+ var i;
2731
+ return Array.from(((i = a.value) == null ? void 0 : i.querySelectorAll("button, a[href], input, select, textarea, [tabindex]")) ?? []).filter((s) => !s.matches(':disabled, [aria-disabled="true"], [hidden]') && !s.closest("[hidden], [inert]"));
2732
+ }, o = (i) => {
2733
+ const s = r(), c = i && s.includes(i) ? i : s.find((v) => v === document.activeElement) ?? s.find((v) => v.tabIndex === 0) ?? s[0];
2734
+ for (const v of s)
2735
+ n.has(v) || n.set(v, v.getAttribute("tabindex")), v.tabIndex = v === c ? 0 : -1;
2645
2736
  };
2646
- return he(() => {
2647
- r(), a.value && (l = new MutationObserver(() => r()), l.observe(a.value, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["disabled", "aria-disabled", "hidden"] }));
2648
- }), ve(() => {
2737
+ return ve(() => {
2738
+ o(), a.value && (l = new MutationObserver(() => o()), l.observe(a.value, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["disabled", "aria-disabled", "hidden"] }));
2739
+ }), pe(() => {
2649
2740
  l == null || l.disconnect();
2650
- for (const [s, u] of n)
2651
- u === null ? s.removeAttribute("tabindex") : s.setAttribute("tabindex", u);
2741
+ for (const [i, s] of n)
2742
+ s === null ? i.removeAttribute("tabindex") : i.setAttribute("tabindex", s);
2652
2743
  }), () => {
2653
- var s;
2744
+ var i;
2654
2745
  return m("div", {
2655
2746
  ref: a,
2656
2747
  class: "dsh-toolbar",
2657
2748
  role: "toolbar",
2658
2749
  "aria-label": e.label,
2659
2750
  "aria-orientation": e.orientation,
2660
- onFocusin(u) {
2661
- r(u.target);
2751
+ onFocusin(s) {
2752
+ o(s.target);
2662
2753
  },
2663
- onKeydown(u) {
2664
- var w;
2665
- const h = u.target;
2666
- if (h.matches('input, textarea, select, [contenteditable="true"]') || !(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(u.key))
2754
+ onKeydown(s) {
2755
+ var A;
2756
+ const c = s.target;
2757
+ if (c.matches('input, textarea, select, [contenteditable="true"]')) {
2758
+ if (s.key !== "Tab")
2759
+ return;
2760
+ const T = r(), d = T[T.indexOf(c) + (s.shiftKey ? -1 : 1)];
2761
+ d && (s.preventDefault(), d.focus());
2762
+ return;
2763
+ }
2764
+ if (!(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(s.key))
2667
2765
  return;
2668
- const S = o();
2669
- let i = u.key;
2670
- e.orientation === "horizontal" && a.value && getComputedStyle(a.value).direction === "rtl" && (i === "ArrowLeft" ? i = "ArrowRight" : i === "ArrowRight" && (i = "ArrowLeft"));
2671
- const x = me(S.map((_, d) => ({ value: d, label: "" })), S.indexOf(h), i);
2672
- x >= 0 && (u.preventDefault(), (w = S[x]) == null || w.focus());
2766
+ const g = r();
2767
+ let f = s.key;
2768
+ e.orientation === "horizontal" && a.value && getComputedStyle(a.value).direction === "rtl" && (f === "ArrowLeft" ? f = "ArrowRight" : f === "ArrowRight" && (f = "ArrowLeft"));
2769
+ const h = ge(g.map((T, d) => ({ value: d, label: "" })), g.indexOf(c), f);
2770
+ h >= 0 && (s.preventDefault(), (A = g[h]) == null || A.focus());
2673
2771
  }
2674
- }, (s = t.default) == null ? void 0 : s.call(t));
2772
+ }, (i = t.default) == null ? void 0 : i.call(t));
2675
2773
  };
2676
2774
  }
2677
- }), Dn = F({
2775
+ }), On = N({
2678
2776
  name: "DshTagGroup",
2679
2777
  props: {
2680
2778
  modelValue: Array,
@@ -2686,118 +2784,121 @@ const It = {
2686
2784
  },
2687
2785
  emits: ["update:modelValue", "remove"],
2688
2786
  setup(e, { slots: t, emit: a }) {
2689
- const l = Te(), n = q(null), o = q(e.defaultValue), r = J(() => l ? e.modelValue ?? [] : o.value), s = (u, h) => {
2690
- e.disabled || u.disabled || (o.value = r.value.filter((c) => c.value !== u.value), a("update:modelValue", o.value), a("remove", u.value), re(() => {
2691
- var S, i, x;
2692
- const c = (S = n.value) == null ? void 0 : S.querySelectorAll("button:not(:disabled)");
2693
- c != null && c.length ? (i = c[Math.min(h, c.length - 1)]) == null || i.focus() : (x = n.value) == null || x.focus();
2787
+ const l = Oe(), n = j(null), r = j(e.defaultValue), o = Z(() => l ? e.modelValue ?? [] : r.value), i = (s, c) => {
2788
+ e.disabled || s.disabled || (r.value = o.value.filter((v) => v.value !== s.value), a("update:modelValue", r.value), a("remove", s.value), se(() => {
2789
+ var h;
2790
+ const v = Array.from(((h = n.value) == null ? void 0 : h.querySelectorAll(".dsh-tag-group__remove")) ?? []), f = v.slice(c).find((A) => !A.disabled) ?? v.slice(0, c).reverse().find((A) => !A.disabled) ?? n.value;
2791
+ f == null || f.focus();
2694
2792
  }));
2695
2793
  };
2696
- return () => m("div", { ref: n, class: "dsh-tag-group", role: "group", "aria-label": e.label, tabindex: -1 }, r.value.map((u, h) => {
2697
- var c;
2794
+ return () => m("div", { ref: n, class: "dsh-tag-group", role: "group", "aria-label": e.label, tabindex: -1 }, o.value.map((s, c) => {
2795
+ var v;
2698
2796
  return m("span", {
2699
2797
  class: ["arco-tag", "dsh-tag-group__tag"],
2700
- key: u.value,
2701
- "data-disabled": e.disabled || u.disabled || void 0
2798
+ key: s.value,
2799
+ "data-disabled": e.disabled || s.disabled || void 0
2702
2800
  }, [
2703
- ((c = t.item) == null ? void 0 : c.call(t, { item: u })) ?? m("span", {}, u.label),
2801
+ ((v = t.item) == null ? void 0 : v.call(t, { item: s })) ?? m("span", {}, s.label),
2704
2802
  e.removable ? m("button", {
2705
2803
  class: "dsh-tag-group__remove",
2706
2804
  type: "button",
2707
- disabled: e.disabled || u.disabled,
2708
- "aria-label": e.removeLabel(u),
2709
- onClick: () => s(u, h)
2805
+ disabled: e.disabled || s.disabled,
2806
+ "aria-label": e.removeLabel(s),
2807
+ onClick: () => i(s, c)
2710
2808
  }, "×") : null
2711
2809
  ]);
2712
2810
  }));
2713
2811
  }
2714
2812
  });
2715
2813
  export {
2716
- Qa as Accordion,
2717
- An as AccordionItem,
2718
- Xt as Alert,
2719
- rn as AlertDialog,
2720
- Za as Arco,
2721
- ht as AutoComplete,
2722
- Ka as Autocomplete,
2723
- xn as Breadcrumbs,
2724
- Ta as Button,
2725
- Tt as Calendar,
2726
- Qt as Card,
2727
- mt as Cascader,
2728
- aa as Chip,
2729
- en as CloseButton,
2730
- Re as ColorPicker,
2731
- Pa as DatePicker,
2732
- Ga as DateRangePicker,
2733
- Na as Description,
2734
- $n as Disclosure,
2735
- Cn as DisclosureGroup,
2736
- Ya as Drawer,
2737
- gt as Dropdown,
2738
- yt as DropdownButton,
2739
- Ua as DshProvider,
2740
- bt as Dsubmenu,
2741
- _n as EmptyState,
2742
- fn as ErrorMessage,
2743
- Ot as FieldError,
2744
- hn as Fieldset,
2745
- dn as Header,
2746
- ma as HintIcon,
2747
- Mt as Image,
2748
- kt as ImagePreview,
2749
- At as ImagePreviewGroup,
2750
- mn as InputGroup,
2751
- ta as InputNumber,
2752
- pn as InputOTP,
2753
- Jt as InputTag,
2754
- un as Kbd,
2755
- Ea as Label,
2756
- sn as Link,
2757
- bn as ListBox,
2758
- ha as Mention,
2759
- St as Menu,
2760
- ze as MenuItem,
2761
- nn as Meter,
2762
- Oa as Modal,
2763
- xe as MonthPicker,
2764
- ta as NumberField,
2765
- da as Popconfirm,
2766
- ca as Popover,
2767
- Gt as Progress,
2768
- tn as ProgressBar,
2769
- an as ProgressCircle,
2770
- $e as QuarterPicker,
2771
- Pe as RangePicker,
2772
- ea as Result,
2773
- gn as ScrollShadow,
2774
- vn as SearchField,
2775
- wt as Select,
2776
- Pn as Separator,
2777
- Ae as Spin,
2778
- Xa as Spinner,
2779
- cn as Surface,
2780
- Ja as SwitchGroup,
2781
- Zt as Table,
2782
- aa as Tag,
2783
- Dn as TagGroup,
2784
- Tn as Text,
2785
- Vn as TextArea,
2786
- Fa as TextField,
2787
- ua as TimePicker,
2788
- Ha as ToggleButton,
2789
- yn as ToggleButtonGroup,
2790
- wn as Toolbar,
2791
- Dt as Tooltip,
2792
- na as Tree,
2793
- sa as TreeSelect,
2794
- fa as Trigger,
2795
- Ce as WeekPicker,
2796
- _e as YearPicker,
2797
- Ke as progressRatio,
2798
- la as provideDshPopupScope,
2799
- ln as useDialog,
2800
- se as useDshTheme,
2801
- on as useFeedback,
2802
- Ia as useToast
2814
+ sn as Accordion,
2815
+ Ln as AccordionItem,
2816
+ ia as Alert,
2817
+ gn as AlertDialog,
2818
+ on as Arco,
2819
+ mt as AutoComplete,
2820
+ nn as Autocomplete,
2821
+ En as Breadcrumbs,
2822
+ Fa as Button,
2823
+ dn as ButtonGroup,
2824
+ Ot as Calendar,
2825
+ oa as Card,
2826
+ vt as Cascader,
2827
+ ca as Chip,
2828
+ fn as CloseButton,
2829
+ qe as ColorPicker,
2830
+ Na as DatePicker,
2831
+ rn as DateRangePicker,
2832
+ Ua as Description,
2833
+ Nn as Disclosure,
2834
+ Fn as DisclosureGroup,
2835
+ Ra as Drawer,
2836
+ bt as Dropdown,
2837
+ wt as DropdownButton,
2838
+ an as DshProvider,
2839
+ yt as Dsubmenu,
2840
+ zn as EmptyState,
2841
+ kn as ErrorMessage,
2842
+ Lt as FieldError,
2843
+ An as Fieldset,
2844
+ Mn as Header,
2845
+ Sa as HintIcon,
2846
+ kt as Image,
2847
+ At as ImagePreview,
2848
+ xt as ImagePreviewGroup,
2849
+ xn as InputGroup,
2850
+ ua as InputNumber,
2851
+ $n as InputOTP,
2852
+ la as InputTag,
2853
+ Dn as Kbd,
2854
+ Wa as Label,
2855
+ wn as Link,
2856
+ _n as ListBox,
2857
+ Da as Mention,
2858
+ Mt as Menu,
2859
+ Ge as MenuItem,
2860
+ vn as Meter,
2861
+ Ha as Modal,
2862
+ $e as MonthPicker,
2863
+ ua as NumberField,
2864
+ ln as Pagination,
2865
+ ya as Popconfirm,
2866
+ ba as Popover,
2867
+ na as Progress,
2868
+ hn as ProgressBar,
2869
+ mn as ProgressCircle,
2870
+ Pe as QuarterPicker,
2871
+ Ve as RangePicker,
2872
+ sa as Result,
2873
+ Pn as ScrollShadow,
2874
+ Cn as SearchField,
2875
+ Dt as Select,
2876
+ Hn as Separator,
2877
+ Ce as Spin,
2878
+ cn as Spinner,
2879
+ Sn as Surface,
2880
+ un as SwitchGroup,
2881
+ ra as Table,
2882
+ ca as Tag,
2883
+ On as TagGroup,
2884
+ Rn as Text,
2885
+ tn as TextArea,
2886
+ Ka as TextField,
2887
+ tn as Textarea,
2888
+ pa as TimePicker,
2889
+ Ga as ToggleButton,
2890
+ Tn as ToggleButtonGroup,
2891
+ Vn as Toolbar,
2892
+ St as Tooltip,
2893
+ da as Tree,
2894
+ ga as TreeSelect,
2895
+ wa as Trigger,
2896
+ _e as WeekPicker,
2897
+ Te as YearPicker,
2898
+ Qe as progressRatio,
2899
+ ma as provideDshPopupScope,
2900
+ yn as useDialog,
2901
+ ue as useDshTheme,
2902
+ bn as useFeedback,
2903
+ pn as useToast
2803
2904
  };