@ithinkdt/ui 4.0.15 → 4.0.17

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.
@@ -0,0 +1,2167 @@
1
+ import { n as e } from "./use-i18n-BUP_StIp.js";
2
+ import t, { cB as n, cE as r, useClsPrefix as i } from "./use-style.js";
3
+ import { i as a } from "./directives-Chz4DK1u.js";
4
+ import { Fragment as o, computed as s, createTextVNode as c, createVNode as l, defineAsyncComponent as u, defineComponent as d, h as f, inject as p, isVNode as m, markRaw as h, mergeProps as g, nextTick as _, onBeforeUnmount as v, reactive as y, ref as b, renderSlot as x, shallowRef as S, toRaw as C, toRef as w, toValue as T, unref as E, useTemplateRef as D, watch as O, withDirectives as k } from "vue";
5
+ import { onClickOutside as A, until as j, useElementHover as M, useFullscreen as N } from "@vueuse/core";
6
+ import { NAnchor as P, NAnchorLink as F, NAvatar as I, NAvatarGroup as ee, NBadge as te, NButton as L, NCard as ne, NCheckbox as R, NCheckboxGroup as re, NDropdown as ie, NEllipsis as ae, NEmpty as oe, NFlex as z, NForm as se, NFormItem as ce, NGi as le, NGrid as ue, NIcon as B, NInput as V, NList as de, NListItem as fe, NPagination as pe, NPopover as H, NRadio as me, NRadioButton as he, NRadioGroup as ge, NScrollbar as _e, NSelect as ve, NSpin as ye, NTag as be, NText as xe, NTooltip as Se, NTransfer as Ce, NTree as we, NTreeSelect as Te, formProps as U, useDialog as Ee } from "ithinkdt-ui";
7
+ import { nanoid as De } from "nanoid";
8
+ import { isNullish as Oe, pickProps as W } from "@ithinkdt/common/object";
9
+ import { VOverflow as ke, VResizeObserver as Ae } from "vueuc";
10
+ import { Sortable as je } from "sortablejs/modular/sortable.core.esm.js";
11
+ import { useFormItem as Me } from "ithinkdt-ui/es/_mixins";
12
+ import { measureText as G } from "@ithinkdt/common/string";
13
+ import { useFormModal as Ne } from "@ithinkdt/page";
14
+ import Pe from "ithinkdt-ui/es/_mixins/use-locale.mjs";
15
+ import { flattenTree as Fe, walkTree as Ie } from "@ithinkdt/common";
16
+ //#region src/components/Checkboxes.jsx
17
+ var Le = /* @__PURE__ */ d({
18
+ name: "Checkboxes",
19
+ inheritAttrs: !1,
20
+ props: {
21
+ options: {
22
+ type: Array,
23
+ default: () => []
24
+ },
25
+ vertical: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ default: {
30
+ type: [
31
+ Boolean,
32
+ String,
33
+ Object
34
+ ],
35
+ default: !1
36
+ },
37
+ gap: {
38
+ type: [
39
+ Number,
40
+ String,
41
+ Array
42
+ ],
43
+ default: void 0
44
+ },
45
+ modelValue: {
46
+ type: Array,
47
+ default: void 0
48
+ },
49
+ labelPadding: {
50
+ type: String,
51
+ default: void 0
52
+ },
53
+ labelField: {
54
+ type: String,
55
+ default: "label"
56
+ },
57
+ valueField: {
58
+ type: String,
59
+ default: "value"
60
+ },
61
+ disabledField: {
62
+ type: String,
63
+ default: "disabled"
64
+ }
65
+ },
66
+ emits: {
67
+ "update:modelValue": () => !0,
68
+ updateModelValue: () => !0
69
+ },
70
+ setup(t, { emit: n, attrs: r }) {
71
+ let { t: i } = e(), a = s(() => t.default ? t.default === !0 ? i("common.all") : typeof t.default == "string" ? t.default : t.default?.[t.labelField] ?? i("common.all") : ""), o = b([]);
72
+ O(() => t.modelValue, (e) => o.value = e, { immediate: !0 });
73
+ let c = (e) => {
74
+ n("update:modelValue", e), n("updateModelValue", e);
75
+ }, u = () => {
76
+ c(o.value?.length === t.options.length ? [] : t.options.map((e) => e[t.valueField]));
77
+ }, d = s(() => t.options.length > o.value?.length && o.value?.length > 0), f = s(() => ({ "--n-label-padding": t.labelPadding }));
78
+ return () => {
79
+ let e = l(re, g(r, {
80
+ value: o.value,
81
+ onUpdateValue: c
82
+ }), { default: () => [l(z, {
83
+ size: t.gap ?? (t.vertical ? void 0 : "small"),
84
+ vertical: t.vertical,
85
+ style: !t.default && t.vertical ? { padding: "6px 0 0" } : {}
86
+ }, { default: () => [t.options?.map((e) => l(R, {
87
+ value: e[t.valueField],
88
+ disabled: e[t.disabledField],
89
+ style: f.value
90
+ }, { default: () => [e[t.labelField]] }))] })] });
91
+ return t.default ? l(z, {
92
+ size: t.gap ?? (t.vertical ? void 0 : "small"),
93
+ vertical: t.vertical,
94
+ style: t.vertical ? { padding: "6px 0 0" } : {}
95
+ }, { default: () => [l("span", null, [l(R, {
96
+ indeterminate: d.value,
97
+ checked: o.value?.length > 0,
98
+ onUpdateChecked: u,
99
+ style: f.value
100
+ }, { default: () => [a.value] })]), e] }) : e;
101
+ };
102
+ }
103
+ }), Re = (e) => l("svg", g({
104
+ xmlns: "http://www.w3.org/2000/svg",
105
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
106
+ role: "img",
107
+ width: "1em",
108
+ height: "1em",
109
+ viewBox: "0 0 24 24"
110
+ }, e), [l("path", {
111
+ fill: "currentColor",
112
+ d: "M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2a2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"
113
+ }, null)]), ze = (e) => l("svg", g({
114
+ xmlns: "http://www.w3.org/2000/svg",
115
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
116
+ role: "img",
117
+ width: "1em",
118
+ height: "1em",
119
+ viewBox: "0 0 1024 1024"
120
+ }, e), [l("path", {
121
+ fill: "currentColor",
122
+ d: "m924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 0 0 9.3-35.2l-.9-2.6a443.74 443.74 0 0 0-79.7-137.9l-1.8-2.1a32.12 32.12 0 0 0-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 0 0-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 0 0-25.8 25.7l-15.8 85.4a351.86 351.86 0 0 0-99 57.4l-81.9-29.1a32 32 0 0 0-35.1 9.5l-1.8 2.1a446.02 446.02 0 0 0-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1c0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 0 0-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0 0 35.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0 0 25.8 25.7l2.7.5a449.4 449.4 0 0 0 159 0l2.7-.5a32.05 32.05 0 0 0 25.8-25.7l15.7-85a350 350 0 0 0 99.7-57.6l81.3 28.9a32 32 0 0 0 35.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1l74.7 63.9a370.03 370.03 0 0 1-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3l-17.9 97a377.5 377.5 0 0 1-85 0l-17.9-97.2l-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9l-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5l-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5c0-15.3 1.2-30.6 3.7-45.5l6.5-40l-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2l31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3l17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97l38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8l92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 0 1 512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 0 1 400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 0 1 624 502c0 29.9-11.7 58-32.8 79.2z"
123
+ }, null)]), Be = (e) => l("svg", g({
124
+ xmlns: "http://www.w3.org/2000/svg",
125
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
126
+ role: "img",
127
+ width: "1em",
128
+ height: "1em",
129
+ viewBox: "0 0 24 24"
130
+ }, e), [l("path", {
131
+ fill: "currentColor",
132
+ "fill-rule": "evenodd",
133
+ d: "M8.27.776L7.275 6.25H3v2.5h3.82l-1.181 6.5H1v2.5h4.184l-.914 5.026l2.46.448l.995-5.474h6.46l-.915 5.026l2.46.448l.995-5.474H21v-2.5h-3.82l1.181-6.5H23v-2.5h-4.184l.914-5.026l-2.46-.448l-.995 5.474H9.816l.914-5.026zm6.37 14.474l1.181-6.5h-6.46l-1.181 6.5z",
134
+ "clip-rule": "evenodd"
135
+ }, null)]), Ve = (e) => l("svg", g({
136
+ xmlns: "http://www.w3.org/2000/svg",
137
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
138
+ role: "img",
139
+ width: "1em",
140
+ height: "1em",
141
+ viewBox: "0 0 24 24"
142
+ }, e), [l("path", {
143
+ fill: "none",
144
+ stroke: "currentColor",
145
+ "stroke-linecap": "round",
146
+ "stroke-linejoin": "round",
147
+ "stroke-width": "1.5",
148
+ d: "m15.238 10.81l-.569 1.694a4.33 4.33 0 0 1-2.757 2.76l-1.713.569a.288.288 0 0 0 0 .548l1.713.569a4.32 4.32 0 0 1 2.736 2.738l.568 1.715a.287.287 0 0 0 .548 0l.59-1.694a4.32 4.32 0 0 1 2.735-2.738l1.714-.569a.288.288 0 0 0 0-.548l-1.692-.59a4.32 4.32 0 0 1-2.757-2.76l-.569-1.715a.29.29 0 0 0-.448-.126a.3.3 0 0 0-.099.148m-8.43-4.914l-.413 1.231a3.15 3.15 0 0 1-2.006 2.007l-1.246.414a.21.21 0 0 0 0 .398l1.246.415a3.14 3.14 0 0 1 1.99 1.99l.413 1.248a.21.21 0 0 0 .398 0l.43-1.232a3.15 3.15 0 0 1 1.99-1.99l1.245-.415a.21.21 0 0 0 0-.398l-1.23-.43A3.14 3.14 0 0 1 7.62 7.128l-.414-1.247a.21.21 0 0 0-.398.016m7.849-3.422l-.207.616a1.57 1.57 0 0 1-1.002 1.004l-.623.207a.104.104 0 0 0-.052.16a.1.1 0 0 0 .052.039l.623.207a1.57 1.57 0 0 1 .995.995l.206.624a.105.105 0 0 0 .2 0l.214-.616a1.57 1.57 0 0 1 .995-.995l.623-.207a.105.105 0 0 0 0-.2l-.615-.214a1.57 1.57 0 0 1-1.003-1.004l-.207-.624a.105.105 0 0 0-.199.008"
149
+ }, null)]), He = (e) => l("svg", g({
150
+ xmlns: "http://www.w3.org/2000/svg",
151
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
152
+ role: "img",
153
+ width: "1em",
154
+ height: "1em",
155
+ viewBox: "0 0 1024 1024"
156
+ }, e), [l("path", {
157
+ fill: "currentColor",
158
+ d: "M300 276.497a56 56 0 1 0 56-96.994a56 56 0 0 0-56 96.994Zm0 284a56 56 0 1 0 56-96.994a56 56 0 0 0-56 96.994ZM640 228a56 56 0 1 0 112 0a56 56 0 0 0-112 0Zm0 284a56 56 0 1 0 112 0a56 56 0 0 0-112 0ZM300 844.497a56 56 0 1 0 56-96.994a56 56 0 0 0-56 96.994ZM640 796a56 56 0 1 0 112 0a56 56 0 0 0-112 0Z"
159
+ }, null)]), Ue = (e) => l("svg", g({
160
+ xmlns: "http://www.w3.org/2000/svg",
161
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
162
+ role: "img",
163
+ width: "1em",
164
+ height: "1em",
165
+ viewBox: "0 0 1024 1024"
166
+ }, e), [l("path", {
167
+ fill: "currentColor",
168
+ d: "M326 164h-64c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V172c0-4.4-3.6-8-8-8zm444 72.4V164c0-6.8-7.9-10.5-13.1-6.1L335 512l421.9 354.1c5.2 4.4 13.1.7 13.1-6.1v-72.4c0-9.4-4.2-18.4-11.4-24.5L459.4 512l299.2-251.1c7.2-6.1 11.4-15.1 11.4-24.5z"
169
+ }, null)]), We = (e) => l("svg", g({
170
+ xmlns: "http://www.w3.org/2000/svg",
171
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
172
+ role: "img",
173
+ width: "1em",
174
+ height: "1em",
175
+ viewBox: "0 0 1024 1024"
176
+ }, e), [l("path", {
177
+ fill: "currentColor",
178
+ d: "M762 164h-64c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V172c0-4.4-3.6-8-8-8zm-508 0v72.4c0 9.5 4.2 18.4 11.4 24.5L564.6 512L265.4 763.1c-7.2 6.1-11.4 15-11.4 24.5V860c0 6.8 7.9 10.5 13.1 6.1L689 512L267.1 157.9A7.95 7.95 0 0 0 254 164z"
179
+ }, null)]), Ge = (e) => l("svg", g({
180
+ xmlns: "http://www.w3.org/2000/svg",
181
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
182
+ role: "img",
183
+ width: "1em",
184
+ height: "1em",
185
+ viewBox: "0 0 24 24"
186
+ }, e), [l("path", {
187
+ fill: "currentColor",
188
+ d: "M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"
189
+ }, null)]), Ke = (e) => l("svg", g({
190
+ xmlns: "http://www.w3.org/2000/svg",
191
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
192
+ role: "img",
193
+ width: "1em",
194
+ height: "1em",
195
+ viewBox: "0 0 24 24"
196
+ }, e), [l("path", {
197
+ fill: "currentColor",
198
+ d: "M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"
199
+ }, null)]), qe = (e) => l("svg", g({
200
+ xmlns: "http://www.w3.org/2000/svg",
201
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
202
+ role: "img",
203
+ width: "1em",
204
+ height: "1em",
205
+ viewBox: "0 0 32 32"
206
+ }, e), [l("path", {
207
+ fill: "currentColor",
208
+ d: "M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z"
209
+ }, null)]), Je = (e) => l("svg", g({
210
+ xmlns: "http://www.w3.org/2000/svg",
211
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
212
+ role: "img",
213
+ width: "1em",
214
+ height: "1em",
215
+ viewBox: "0 0 32 32"
216
+ }, e), [l("path", {
217
+ fill: "currentColor",
218
+ d: "m16 10l10 10l-1.4 1.4l-8.6-8.6l-8.6 8.6L6 20z"
219
+ }, null)]), Ye = (e) => l("svg", g({
220
+ xmlns: "http://www.w3.org/2000/svg",
221
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
222
+ role: "img",
223
+ width: "1em",
224
+ height: "1em",
225
+ viewBox: "0 0 24 24"
226
+ }, e), [l("path", {
227
+ fill: "currentColor",
228
+ d: "m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"
229
+ }, null)]), Xe = (e) => l("svg", g({
230
+ xmlns: "http://www.w3.org/2000/svg",
231
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
232
+ role: "img",
233
+ width: "1em",
234
+ height: "1em",
235
+ viewBox: "0 0 24 24"
236
+ }, e), [l("path", {
237
+ fill: "currentColor",
238
+ d: "M12 22q-2.05 0-3.875-.788t-3.187-2.15t-2.15-3.187T2 12q0-2.075.788-3.887t2.15-3.175t3.187-2.15T12 2q2.075 0 3.888.788t3.174 2.15t2.15 3.175T22 12q0 2.05-.788 3.875t-2.15 3.188t-3.175 2.15T12 22m0-2.05q.65-.9 1.125-1.875T13.9 16h-3.8q.3 1.1.775 2.075T12 19.95m-2.6-.4q-.45-.825-.787-1.713T8.05 16H5.1q.725 1.25 1.813 2.175T9.4 19.55m5.2 0q1.4-.45 2.488-1.375T18.9 16h-2.95q-.225.95-.562 1.838T14.6 19.55M4.25 14h3.4q-.075-.5-.112-.987T7.5 12t.038-1.012T7.65 10h-3.4q-.125.5-.187.988T4 12t.063 1.013t.187.987m5.4 0h4.7q.075-.5.113-.987T14.5 12t-.038-1.012T14.35 10h-4.7q-.075.5-.112.988T9.5 12t.038 1.013t.112.987m6.7 0h3.4q.125-.5.188-.987T20 12t-.062-1.012T19.75 10h-3.4q.075.5.113.988T16.5 12t-.038 1.013t-.112.987m-.4-6h2.95q-.725-1.25-1.812-2.175T14.6 4.45q.45.825.788 1.713T15.95 8M10.1 8h3.8q-.3-1.1-.775-2.075T12 4.05q-.65.9-1.125 1.875T10.1 8m-5 0h2.95q.225-.95.563-1.838T9.4 4.45Q8 4.9 6.912 5.825T5.1 8"
239
+ }, null)]), Ze = (e) => l("svg", g({
240
+ xmlns: "http://www.w3.org/2000/svg",
241
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
242
+ role: "img",
243
+ width: "1em",
244
+ height: "1em",
245
+ viewBox: "0 0 24 24"
246
+ }, e), [l("path", {
247
+ fill: "currentColor",
248
+ d: "m12 19.24l-4.95-4.95l-1.41 1.42L12 22.07l6.36-6.36l-1.41-1.42zM5.64 8.29l1.41 1.42L12 4.76l4.95 4.95l1.41-1.42L12 1.93z"
249
+ }, null)]), Qe = (e) => l("svg", g({
250
+ xmlns: "http://www.w3.org/2000/svg",
251
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
252
+ role: "img",
253
+ width: "1em",
254
+ height: "1em",
255
+ viewBox: "0 0 24 24"
256
+ }, e), [l("path", {
257
+ fill: "currentColor",
258
+ d: "M12 7.59L7.05 2.64L5.64 4.05L12 10.41l6.36-6.36l-1.41-1.41zM5.64 19.95l1.41 1.41L12 16.41l4.95 4.95l1.41-1.41L12 13.59z"
259
+ }, null)]), $e = (e) => l("svg", g({
260
+ xmlns: "http://www.w3.org/2000/svg",
261
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
262
+ role: "img",
263
+ width: "1em",
264
+ height: "1em",
265
+ viewBox: "0 0 20 20"
266
+ }, e), [l("path", {
267
+ fill: "currentColor",
268
+ fillRule: "evenodd",
269
+ d: "M2.5 7.5a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5m15 0a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5m-7.274 0a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5"
270
+ }, null)]), et = (e) => l("svg", g({
271
+ xmlns: "http://www.w3.org/2000/svg",
272
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
273
+ width: "1em",
274
+ height: "1em",
275
+ viewBox: "0 0 12 12"
276
+ }, e), [l("path", {
277
+ fill: "currentColor",
278
+ d: "M5.5 4.937a2 2 0 1 1 1 0V6h2a1 1 0 0 1 1 1v1.063a2 2 0 1 1-1 0V7h-5v1.063a2 2 0 1 1-1 0V7a1 1 0 0 1 1-1h2zM6 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2m-3 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m5-1a1 1 0 1 0 2 0a1 1 0 0 0-2 0"
279
+ }, null)]), tt = (e) => l("svg", g({
280
+ xmlns: "http://www.w3.org/2000/svg",
281
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
282
+ width: "1em",
283
+ height: "1em",
284
+ viewBox: "0 0 24 24"
285
+ }, e), [l("g", {
286
+ fill: "none",
287
+ fillRule: "evenodd"
288
+ }, [l("path", { d: "M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" }, null), l("path", {
289
+ fill: "currentColor",
290
+ d: "M13 13a4 4 0 0 1 4 4v2a1 1 0 1 1-2 0v-2a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v2a1 1 0 1 1-2 0v-2a4 4 0 0 1 4-4zm6 0a3 3 0 0 1 3 3v2a1 1 0 1 1-2 0v-2a1 1 0 0 0-1-1h-1.416a5.02 5.02 0 0 0-1.583-2zM9.5 3a4.5 4.5 0 1 1 0 9a4.5 4.5 0 0 1 0-9M18 6a3 3 0 1 1 0 6a3 3 0 0 1 0-6M9.5 5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5M18 8a1 1 0 1 0 0 2a1 1 0 0 0 0-2"
291
+ }, null)])]), nt = (e) => l("svg", g({
292
+ xmlns: "http://www.w3.org/2000/svg",
293
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
294
+ role: "img",
295
+ width: "1em",
296
+ height: "1em",
297
+ viewBox: "0 0 256 256"
298
+ }, e), [l("path", {
299
+ fill: "currentColor",
300
+ d: "M235.4 210a124.2 124.2 0 0 0-61.8-53.2a76 76 0 1 0-91.2 0A124.2 124.2 0 0 0 20.6 210a12 12 0 0 0 20.8 12a100 100 0 0 1 173.2 0a12.1 12.1 0 0 0 10.4 6a11.7 11.7 0 0 0 6-1.6a12 12 0 0 0 4.4-16.4ZM76 96a52 52 0 1 1 52 52a52 52 0 0 1-52-52Z"
301
+ }, null)]), rt = (e) => l("svg", g({
302
+ xmlns: "http://www.w3.org/2000/svg",
303
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
304
+ role: "img",
305
+ width: "1em",
306
+ height: "1em",
307
+ viewBox: "0 0 24 24"
308
+ }, e), [l("path", {
309
+ fill: "currentColor",
310
+ d: "m6.4 18.308l-.708-.708l5.6-5.6l-5.6-5.6l.708-.708l5.6 5.6l5.6-5.6l.708.708l-5.6 5.6l5.6 5.6l-.708.708l-5.6-5.6z"
311
+ }, null)]), it = (e) => l("svg", g({
312
+ xmlns: "http://www.w3.org/2000/svg",
313
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
314
+ role: "img",
315
+ width: "1em",
316
+ height: "1em",
317
+ viewBox: "0 0 24 24"
318
+ }, e), [l("path", {
319
+ fill: "currentColor",
320
+ d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z"
321
+ }, null)]), at = (e) => l("svg", g({
322
+ xmlns: "http://www.w3.org/2000/svg",
323
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
324
+ role: "img",
325
+ width: "1em",
326
+ height: "1em",
327
+ viewBox: "0 0 24 24"
328
+ }, e), [l("path", {
329
+ fill: "currentColor",
330
+ d: "M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12z"
331
+ }, null)]), ot = /* @__PURE__ */ d({
332
+ name: "DataActions",
333
+ props: { options: {
334
+ type: Array,
335
+ default: () => []
336
+ } },
337
+ setup(e) {
338
+ let t = b(), n = !0, r = () => {
339
+ n ? n = !1 : t.value?.sync({ showAllItemsBeforeCalculate: !0 });
340
+ }, i = b(), a = () => i.value, o = b(-1), c = (t) => {
341
+ o.value = e.options.length - t;
342
+ }, u = (e) => {
343
+ e || (o.value = -1);
344
+ }, d = () => {}, f = s(() => o.value === -1 ? [] : e.options.slice(o.value).map((e) => ({
345
+ ...e,
346
+ key: e.text
347
+ }))), p = (e) => l(L, {
348
+ type: e.color === "danger" ? "error" : [
349
+ "default",
350
+ "tertiary",
351
+ "primary",
352
+ "info",
353
+ "success",
354
+ "warning",
355
+ "error"
356
+ ].includes(e.color) ? e.color : "primary",
357
+ text: !0
358
+ }, { default: () => [e.text] }), m = (e, t) => {
359
+ t.onClick?.();
360
+ };
361
+ return () => l(Ae, { onResize: r }, { default: () => [l(ke, {
362
+ ref: t,
363
+ getCounter: a,
364
+ onUpdateCount: c,
365
+ onUpdateOverflow: u,
366
+ updateCounter: d,
367
+ style: "margin-top: 2px"
368
+ }, {
369
+ default: () => e.options.map((e) => l(L, {
370
+ quaternary: !0,
371
+ type: e.color === "danger" ? "error" : [
372
+ "default",
373
+ "tertiary",
374
+ "primary",
375
+ "info",
376
+ "success",
377
+ "warning",
378
+ "error"
379
+ ].includes(e.color) ? e.color : "primary",
380
+ size: "small",
381
+ onClick: e.onClick
382
+ }, { default: () => [e.text] })),
383
+ counter: () => l("span", {
384
+ ref: i,
385
+ style: "position: absolute"
386
+ }, [l(ie, {
387
+ options: f.value,
388
+ renderLabel: p,
389
+ showArrow: !0,
390
+ onSelect: m
391
+ }, { default: () => [l(L, {
392
+ quaternary: !0,
393
+ size: "small"
394
+ }, { default: () => [l($e, { style: "font-size: 14px; color: #888" }, null)] })] })])
395
+ })] });
396
+ }
397
+ });
398
+ //#endregion
399
+ //#region src/components/DataCustom.jsx
400
+ function K(e) {
401
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
402
+ }
403
+ var st = /* @__PURE__ */ d({
404
+ name: "DataCustomRow",
405
+ props: {
406
+ label: [String, Function],
407
+ disabled: Boolean,
408
+ hidden: Boolean,
409
+ showFixed: Boolean,
410
+ fixed: [Boolean, String]
411
+ },
412
+ emits: ["update-hidden", "update-fixed"],
413
+ setup(e, { emit: t }) {
414
+ let n = b(null), r = M(n);
415
+ return () => {
416
+ let i;
417
+ return l(z, {
418
+ ref: n,
419
+ align: "center",
420
+ wrap: !1,
421
+ size: "small",
422
+ style: `padding: 4px 12px; ${r.value ? "background-color: #f5f5f5" : ""}`
423
+ }, { default: () => [
424
+ l(L, {
425
+ type: "primary",
426
+ text: !0,
427
+ class: "icon-drag",
428
+ style: "cursor: move"
429
+ }, { default: () => [l(B, { size: "18" }, { default: () => [l(He, null, null)] })] }),
430
+ l(R, {
431
+ checked: !e.hidden,
432
+ disabled: e.disabled,
433
+ onUpdateChecked: (e) => t("update-hidden", !e)
434
+ }, null),
435
+ l(ae, { style: "flex: 1 1 auto" }, K(i = T(e.label)) ? i : { default: () => [i] }),
436
+ e.showFixed ? [l(L, {
437
+ text: !0,
438
+ type: e.fixed === "left" ? "primary" : void 0,
439
+ onClick: () => t("update-fixed", e.fixed === "left" ? !1 : "left")
440
+ }, { default: () => [l(B, null, { default: () => [l(Ue, null, null)] })] }), l(L, {
441
+ text: !0,
442
+ type: e.fixed === "right" ? "primary" : void 0,
443
+ onClick: () => t("update-fixed", e.fixed === "right" ? !1 : "right")
444
+ }, { default: () => [l(B, null, { default: () => [l(We, null, null)] })] })] : void 0
445
+ ] });
446
+ };
447
+ }
448
+ }), ct = /* @__PURE__ */ d({
449
+ name: "DataCustom",
450
+ props: {
451
+ data: {
452
+ type: Array,
453
+ required: !0
454
+ },
455
+ keyField: {
456
+ type: String,
457
+ default: "key"
458
+ },
459
+ labelField: {
460
+ type: String,
461
+ default: "label"
462
+ },
463
+ fixedField: {
464
+ type: String,
465
+ default: "fixed"
466
+ },
467
+ hiddenField: {
468
+ type: String,
469
+ default: "hidden"
470
+ },
471
+ showFixed: {
472
+ type: Boolean,
473
+ default: !0
474
+ },
475
+ disabledField: {
476
+ type: String,
477
+ default: "disabled"
478
+ },
479
+ visibleField: {
480
+ type: String,
481
+ default: "visible"
482
+ },
483
+ tooltip: [String, Object],
484
+ buttonRender: Function,
485
+ tooltipPlacement: {
486
+ type: String,
487
+ default: "left"
488
+ },
489
+ size: {
490
+ type: Number,
491
+ default: 18
492
+ },
493
+ type: { type: String }
494
+ },
495
+ emits: { custom: () => !0 },
496
+ setup(t, { emit: n }) {
497
+ let { t: r } = e();
498
+ function i(e, r, i) {
499
+ n("custom", {
500
+ key: e[t.keyField],
501
+ [r]: i
502
+ });
503
+ }
504
+ let o = b(), s;
505
+ return O(o, (e) => {
506
+ s?.destroy(), s = void 0, e.$el && (s = je.create(e.$el, {
507
+ animation: 150,
508
+ ghostClass: "ghost",
509
+ handle: ".icon-drag",
510
+ filter: ".disabled",
511
+ onEnd(e) {
512
+ let r = t.data.map((e) => e[t.keyField]), [i] = r.splice(e.oldIndex, 1);
513
+ r.splice(e.newIndex, 0, i), n("custom", r);
514
+ }
515
+ }));
516
+ }), v(() => {
517
+ s?.destroy(), s = void 0;
518
+ }), () => l(H, {
519
+ trigger: "click",
520
+ scrollable: !0,
521
+ placement: "left-start",
522
+ displayDirective: "show",
523
+ "content-style": "padding: 0",
524
+ style: "max-height: 400px; width: 240px"
525
+ }, {
526
+ trigger: () => k(t.buttonRender?.() ?? l(L, {
527
+ text: !0,
528
+ type: t.type
529
+ }, { default: () => [l(B, { size: t.size }, { default: () => [l(ze, null, null)] })] }), [[
530
+ a,
531
+ t.tooltip ?? r("common.page.custom.tooltip"),
532
+ void 0,
533
+ { [t.tooltipPlacement]: !0 }
534
+ ]]),
535
+ default: () => {
536
+ let e, a;
537
+ return l("div", null, [l(z, {
538
+ justify: "space-between",
539
+ style: "padding: 8px 12px; position: sticky; z-index: 1; top: 0; backdrop-filter: blur(4px)"
540
+ }, { default: () => [l("div", { style: "font-weight: bold" }, [t.tooltip ?? r("common.page.custom.tooltip")]), l(L, {
541
+ text: !0,
542
+ type: "primary",
543
+ size: "small",
544
+ onClick: () => n("custom", !0)
545
+ }, K(e = r("common.page.custom.reset")) ? e : { default: () => [e] })] }), l(z, {
546
+ ref: o,
547
+ vertical: !0,
548
+ size: 0,
549
+ style: "margin-bottom: 8px"
550
+ }, K(a = t.data.map((e) => l(st, {
551
+ key: e[t.keyField],
552
+ label: e[t.labelField],
553
+ hidden: e[t.hiddenField],
554
+ fixed: e[t.fixedField],
555
+ showFixed: t.showFixed,
556
+ style: e[t.visibleField] === !1 ? "display: none" : void 0,
557
+ onUpdateHidden: (t) => i(e, "hidden", t),
558
+ onUpdateFixed: (t) => i(e, "fixed", t)
559
+ }, null))) ? a : { default: () => [a] })]);
560
+ }
561
+ });
562
+ }
563
+ });
564
+ //#endregion
565
+ //#region src/components/DataDescriptions.jsx
566
+ function lt(e) {
567
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
568
+ }
569
+ function q(e, t) {
570
+ return typeof e == "function" ? e(t) : e;
571
+ }
572
+ function ut(e, t) {
573
+ let n = e.children?.filter((e) => e.isGroup);
574
+ return l(F, { href: `#${e.prop}` }, {
575
+ title: () => q(e.label, t),
576
+ default: n?.length ? () => n.map((e) => ut(e, t)) : void 0
577
+ });
578
+ }
579
+ function dt(e, t, n) {
580
+ return typeof e == "function" ? e(t, n) : e;
581
+ }
582
+ function ft(e, t, n, r) {
583
+ return e.isGroup ? l("div", {
584
+ key: e.prop,
585
+ class: `${r}__group`,
586
+ id: e.prop
587
+ }, [l("div", { class: `${r}__title` }, [q(e.label, n)]), l("div", { class: `${r}__wrapper` }, [e.children?.map((e) => ft(e, t, n, r))])]) : l("div", {
588
+ key: e.prop,
589
+ class: `${r}__item`,
590
+ style: {
591
+ "--descriptions-col-span": dt(e.colSpan, t, n) ?? 1,
592
+ "--descriptions-row-span": dt(e.rowSpan, t, n) ?? 1
593
+ }
594
+ }, [e.label ? l("div", { class: `${r}__label` }, [q(e.label, n)]) : void 0, l("div", { class: `${r}__content` }, [(n ? e.render ? e.render(n) : n[e.prop] : void 0) ?? l("span", { class: `${r}__nothing` }, [c("--")])])]);
595
+ }
596
+ var pt = /* @__PURE__ */ d({
597
+ name: "DataDescriptions",
598
+ props: {
599
+ cols: {
600
+ type: Number,
601
+ default: 3
602
+ },
603
+ data: { type: Object },
604
+ items: {
605
+ type: Array,
606
+ default: () => []
607
+ },
608
+ title: { type: [String, Function] },
609
+ anchor: {
610
+ type: [Boolean, Object],
611
+ default: void 0
612
+ }
613
+ },
614
+ setup(e) {
615
+ let n = i(), r = `${n.value}-data-descriptions`;
616
+ t("-data-descriptions", mt, n);
617
+ let a = b();
618
+ O(() => e.items, () => {
619
+ location.hash && j(a).toBeTruthy().then((e) => {
620
+ e.scrollTo(location.hash);
621
+ });
622
+ }, { immediate: !0 });
623
+ let o = s(() => ({ "--descriptions-cols": e.cols })), c = s(() => g({
624
+ ref: a,
625
+ class: `${r}__anchor`,
626
+ showBackground: !1,
627
+ affix: !0
628
+ }, e.anchor && typeof e.anchor == "object" ? e.anchor : {}));
629
+ return () => {
630
+ let { cols: t, title: n, data: i, items: a, anchor: s } = e, u = Oe(n) ? void 0 : l("div", { class: `${r}__header` }, [typeof n == "string" ? l("span", null, [n]) : n(i ?? void 0)]), d = a.filter((e) => !e.hidden).map((e) => ft(e, t, i, r)), p;
631
+ if (s !== !1) {
632
+ let e;
633
+ p = l(P, c.value, lt(e = a.filter((e) => e.isGroup).map((e) => f(ut(e, i), { key: e.prop }))) ? e : { default: () => [e] });
634
+ }
635
+ return l("div", {
636
+ class: r,
637
+ style: o.value
638
+ }, [
639
+ u,
640
+ l("div", { class: `${r}__wrapper` }, [d]),
641
+ p
642
+ ]);
643
+ };
644
+ }
645
+ }), mt = /* @__PURE__ */ n("data-descriptions", [
646
+ r("header", {
647
+ fontWeight: "bold",
648
+ fontSize: "1.125rem",
649
+ marginBottom: "24px"
650
+ }),
651
+ r("wrapper", {
652
+ gridTemplateColumns: "repeat(var(--descriptions-cols, 3), 1fr)",
653
+ display: "grid",
654
+ gap: "20px"
655
+ }, []),
656
+ r("group", { gridColumn: "span var(--descriptions-cols, 3)" }),
657
+ r("item", {
658
+ gridColumn: "span var(--descriptions-col-span, 3)",
659
+ gridRow: "span var(--descriptions-row-span, 3)"
660
+ }),
661
+ r("title", {
662
+ fontWeight: "bold",
663
+ fontSize: "1.125rem",
664
+ marginBottom: "20px",
665
+ marginTop: "24px"
666
+ }),
667
+ r("label", {
668
+ color: "#888",
669
+ paddingBottom: "6px"
670
+ }),
671
+ r("content", {
672
+ fontSize: "15px",
673
+ color: "var(--color-text)"
674
+ }),
675
+ r("anchor", {
676
+ position: "absolute",
677
+ zIndex: 2,
678
+ top: "40px",
679
+ right: "40px"
680
+ })
681
+ ]), J = {
682
+ size: {
683
+ type: String,
684
+ default: void 0
685
+ },
686
+ gap: {
687
+ type: Number,
688
+ default: void 0
689
+ },
690
+ submitText: {
691
+ type: [
692
+ String,
693
+ Number,
694
+ Object
695
+ ],
696
+ default: void 0
697
+ },
698
+ resetText: {
699
+ type: [
700
+ String,
701
+ Number,
702
+ Object
703
+ ],
704
+ default: void 0
705
+ },
706
+ cancelText: {
707
+ type: [
708
+ String,
709
+ Number,
710
+ Object
711
+ ],
712
+ default: void 0
713
+ },
714
+ showSubmitBtn: {
715
+ type: Boolean,
716
+ required: !1,
717
+ default: !0
718
+ },
719
+ showResetBtn: {
720
+ type: Boolean,
721
+ required: !1,
722
+ default: !0
723
+ },
724
+ showCancelBtn: {
725
+ type: Boolean,
726
+ required: !1,
727
+ default: !1
728
+ },
729
+ submitDisabled: Boolean,
730
+ submitLoading: Boolean,
731
+ succeeded: {
732
+ type: Boolean,
733
+ default: void 0
734
+ },
735
+ successText: {
736
+ type: [
737
+ String,
738
+ Number,
739
+ Object
740
+ ],
741
+ default: void 0
742
+ },
743
+ failureText: {
744
+ type: [
745
+ String,
746
+ Number,
747
+ Object
748
+ ],
749
+ default: void 0
750
+ },
751
+ nativeButtonType: Boolean
752
+ }, Y = /* @__PURE__ */ d({
753
+ name: "DataFormActions",
754
+ props: J,
755
+ emits: [
756
+ "submit",
757
+ "reset",
758
+ "cancel"
759
+ ],
760
+ setup(t, { emit: n, slots: r }) {
761
+ let { t: i } = e(), a = () => {
762
+ n("submit");
763
+ }, o = () => {
764
+ n("reset");
765
+ }, s = () => {
766
+ n("cancel");
767
+ }, { mergedDisabledRef: c, mergedSizeRef: u } = Me(t);
768
+ return () => {
769
+ let e = u.value, n = c.value, { gap: d = e === "small" ? 8 : e === "medium" ? 12 : 16, submitText: f, resetText: p, cancelText: m, submitDisabled: h, submitLoading: g, showSubmitBtn: _, showResetBtn: v, showCancelBtn: y, succeeded: b, successText: S = f, failureText: C = f, nativeButtonType: w } = t;
770
+ return l(z, { size: d === void 0 ? e : d }, { default: () => [
771
+ x(r, "prefix"),
772
+ _ === !1 ? void 0 : l(L, {
773
+ attrType: w ? "submit" : "button",
774
+ size: e,
775
+ type: b ? "success" : b === !1 ? "error" : "primary",
776
+ disabled: b !== void 0 || n || h || g,
777
+ loading: g,
778
+ onClick: w ? void 0 : a
779
+ }, {
780
+ default: () => (b ? S : b === !1 ? C : f) || i("common.page.form.submitText"),
781
+ icon: () => b ? l(B, null, { default: () => [l(Ye, null, null)] }) : b === !1 ? l(B, null, { default: () => [l(rt, null, null)] }) : void 0
782
+ }),
783
+ v === !1 ? void 0 : l(L, {
784
+ size: u.value,
785
+ attrType: w ? "reset" : "button",
786
+ disabled: n || g || b,
787
+ type: y ? "primary" : "default",
788
+ secondary: y,
789
+ onClick: w ? void 0 : o
790
+ }, { default: () => [p || i("common.page.form.resetText")] }),
791
+ y === !1 || b ? void 0 : l(L, {
792
+ attrType: "button",
793
+ disabled: n || g,
794
+ onClick: s
795
+ }, { default: () => [m || i("common.page.form.cancelText")] }),
796
+ x(r, "suffix")
797
+ ] });
798
+ };
799
+ }
800
+ });
801
+ //#endregion
802
+ //#region src/components/DataForm.jsx
803
+ function ht(e) {
804
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
805
+ }
806
+ var gt = /* @__PURE__ */ d({
807
+ name: "DataForm",
808
+ props: {
809
+ grid: {
810
+ type: Object,
811
+ default: () => ({})
812
+ },
813
+ ...W(U, "disabled", "model", "labelWidth", "labelAlign", "showFeedback", "size"),
814
+ ...W(J, "submitText", "resetText", "cancelText", "showSubmitBtn", "showResetBtn", "showCancelBtn", "submitDisabled", "succeeded", "successText", "failureText"),
815
+ readonly: {
816
+ type: Boolean,
817
+ required: !1,
818
+ default: void 0
819
+ },
820
+ items: {
821
+ type: Array,
822
+ required: !0
823
+ },
824
+ validation: {
825
+ type: Object,
826
+ default: () => ({})
827
+ },
828
+ loading: Boolean,
829
+ showColon: Boolean,
830
+ tooltipPlacement: {
831
+ type: String,
832
+ default: "bottom"
833
+ },
834
+ requireMarkPlacement: {
835
+ type: String,
836
+ default: "left"
837
+ },
838
+ labelPlacement: {
839
+ type: String,
840
+ default: "left"
841
+ },
842
+ showAction: {
843
+ type: [Boolean, Object],
844
+ default: void 0
845
+ },
846
+ actionAlign: {
847
+ type: String,
848
+ default: "center"
849
+ },
850
+ actionJustify: {
851
+ type: String,
852
+ default: "start"
853
+ },
854
+ actionGap: {
855
+ type: String,
856
+ default: void 0
857
+ }
858
+ },
859
+ emits: [
860
+ "submit",
861
+ "reset",
862
+ "cancel"
863
+ ],
864
+ setup(e, { emit: t, slots: n }) {
865
+ let r = (n) => {
866
+ n?.preventDefault?.(), t("submit", { ...C(e.model) }, n);
867
+ }, i = (e) => {
868
+ e?.preventDefault?.(), t("reset");
869
+ }, a = (e) => {
870
+ e?.preventDefault?.(), t("cancel");
871
+ }, s = b(), u = () => x(n, "actionPrefix"), d = () => x(n, "actionSuffix"), f = () => {
872
+ let { loading: t, showSubmitBtn: n, showResetBtn: r, showCancelBtn: i, actionAlign: o, actionJustify: s, actionGap: c, submitDisabled: f, submitText: p, resetText: m, cancelText: h, succeeded: g, successText: _, failureText: v } = e;
873
+ return [l(ce, {
874
+ label: s === "start" ? " " : void 0,
875
+ showLabel: e.labelPlacement !== "top",
876
+ style: "padding-top: 16px"
877
+ }, { default: () => [l(Y, {
878
+ align: o,
879
+ justify: s,
880
+ gap: c,
881
+ showSubmitBtn: n,
882
+ showResetBtn: r,
883
+ showCancelBtn: i,
884
+ submitText: p,
885
+ resetText: m,
886
+ cancelText: h,
887
+ submitDisabled: f,
888
+ submitLoading: t,
889
+ succeeded: g,
890
+ successText: _,
891
+ failureText: v,
892
+ nativeButtonType: !0,
893
+ onCancel: a
894
+ }, {
895
+ prefix: u,
896
+ suffix: d
897
+ })] })];
898
+ }, p = ({ overflow: e }) => x(n, "action", {
899
+ overflow: e,
900
+ grid: s.value
901
+ }, f), m = (t) => e.validation[t]?.errors?.[0] ?? e.validation[t]?.warnings?.[0], h = ({ label: t, showColon: n, tooltip: r, tooltipPlacement: i = e.tooltipPlacement }) => l(xe, {
902
+ depth: e.readonly ? 3 : 2,
903
+ style: "display: inline-flex; align-items: flex-start; gap: 1px"
904
+ }, { default: () => [
905
+ l("span", null, [T(t)]),
906
+ i === "icon" ? l(Se, null, {
907
+ default: () => T(r),
908
+ trigger: () => l(L, {
909
+ text: !0,
910
+ style: "font-size: 1.25em; opacity: 0.8"
911
+ }, { default: () => [l(B, null, { default: () => [l(Re, null, null)] })] })
912
+ }) : void 0,
913
+ e.showColon && n !== !1 ? l("span", { style: "place-self: center" }, [c(":")]) : void 0
914
+ ] }), _ = ({ render: t, tooltip: n, tooltipPlacement: r = e.tooltipPlacement, showTooltipWhenReadonly: i = !1 }) => {
915
+ let a, o = l("div", { style: "width: 100%; font-size: calc(1rem - 2px); min-height: 32px; display: flex; align-items: center" }, [t({
916
+ disabled: e.disabled,
917
+ size: e.size,
918
+ readonly: e.readonly
919
+ })]);
920
+ return n && r === "bottom" && (!e.readonly || i) ? l("div", { style: "width: 100%; display: flex; flex-direction: column" }, [o, l(xe, {
921
+ depth: 3,
922
+ style: "font-size: calc(1rem - 3px); margin-top: 6px"
923
+ }, ht(a = T(n)) ? a : { default: () => [a] })]) : o;
924
+ }, v = (t) => {
925
+ if (t.hidden) return;
926
+ let { hidden: n, name: r, render: i, label: a, showColon: o, span: s = 6, rowSpan: c, offset: u = 0, tooltip: d, tooltipPlacement: f, readonly: p = e.readonly, showRequireMark: v = !p, showTooltipWhenReadonly: y, validationStatus: b = e.validation[r]?.errors?.length ? "error" : e.validation[r]?.warnings?.length ? "warning" : e.validation[r] ? "success" : void 0, ...x } = t, S;
927
+ return S = r[0] === "$" ? i({}) : l(ce, g({
928
+ path: r,
929
+ validationStatus: b,
930
+ showRequireMark: x.required && v
931
+ }, x), {
932
+ label: () => h(t),
933
+ default: () => _(t),
934
+ feedback: () => m(r)
935
+ }), e.grid === !1 ? S : l(le, {
936
+ key: r,
937
+ offset: u,
938
+ span: s,
939
+ style: c ? { gridRowEnd: `span ${c}` } : void 0
940
+ }, ht(S) ? S : { default: () => [S] });
941
+ }, y = () => {
942
+ let { items: t, showAction: r } = e;
943
+ return l(o, null, [t.map(v), r === !1 || e.readonly === !0 && !n.action ? void 0 : l(le, g({
944
+ key: "action",
945
+ span: 2 ** 53 - 1
946
+ }, typeof e.showAction == "object" ? e.showAction : {}), { default: p })]);
947
+ };
948
+ return () => {
949
+ let { items: t, loading: n, validation: a, showColon: o, tooltipPlacement: c, showFeedback: u, labelWidth: d = "7.2em", labelAlign: f = e.labelPlacement === "top" ? "left" : "right", grid: p, showAction: m, showSubmitBtn: h, showResetBtn: _, showCancelBtn: v, actionAlign: b, actionJustify: x, actionGap: S, submitDisabled: C, submitText: w, resetText: T, cancelText: E, succeeded: D, successText: O, failureText: k, ...A } = e, j = !e.readonly && u !== !1;
950
+ return l(se, g({
951
+ labelWidth: d,
952
+ labelAlign: f,
953
+ onReset: i,
954
+ onSubmit: r,
955
+ showFeedback: j
956
+ }, A), { default: () => [l(ue, g({
957
+ ref: s,
958
+ itemResponsive: !0
959
+ }, p, { yGap: j ? 0 : p?.yGap ?? 24 }), { default: y })] });
960
+ };
961
+ }
962
+ }), _t = /* @__PURE__ */ d({
963
+ name: "DataFilter",
964
+ props: {
965
+ grid: {
966
+ type: Object,
967
+ default: () => ({})
968
+ },
969
+ ...W(U, "disabled", "model", "validation"),
970
+ labelWidth: {
971
+ type: [String, Number],
972
+ default: "5em"
973
+ },
974
+ labelPlacement: {
975
+ type: String,
976
+ default: "left"
977
+ },
978
+ items: {
979
+ type: Array,
980
+ required: !0
981
+ },
982
+ loading: {
983
+ type: Boolean,
984
+ required: !1,
985
+ default: !1
986
+ },
987
+ filterOnReset: {
988
+ type: Boolean,
989
+ required: !1,
990
+ default: !0
991
+ },
992
+ filterText: {
993
+ type: String,
994
+ default: void 0
995
+ },
996
+ resetText: {
997
+ type: String,
998
+ default: void 0
999
+ },
1000
+ customizable: {
1001
+ type: Boolean,
1002
+ required: !1,
1003
+ default: !0
1004
+ },
1005
+ collapsible: {
1006
+ type: Boolean,
1007
+ required: !1,
1008
+ default: !0
1009
+ },
1010
+ defaultCollapsed: {
1011
+ type: Boolean,
1012
+ required: !1,
1013
+ default: !0
1014
+ },
1015
+ collapsedRows: Number
1016
+ },
1017
+ emits: [
1018
+ "filter",
1019
+ "reset",
1020
+ "custom",
1021
+ "collapse"
1022
+ ],
1023
+ setup(t, { expose: n, emit: r }) {
1024
+ let { t: i } = e(), a = (e) => {
1025
+ r("filter", t.model, e);
1026
+ }, o = (e) => {
1027
+ r("reset", e), t.filterOnReset && r("filter", t.model, e);
1028
+ }, s = b(t.defaultCollapsed), u = (e) => {
1029
+ s.value = e;
1030
+ };
1031
+ n({ collapse: u });
1032
+ let d = y({
1033
+ span: 6,
1034
+ suffix: !0
1035
+ });
1036
+ return () => {
1037
+ let { filterOnReset: e, filterText: n, resetText: f, customizable: p, defaultCollapsed: m, collapsible: h, grid: v, collapsedRows: y, ...b } = t;
1038
+ return l(gt, g({ grid: {
1039
+ cols: "12 768:18 1280:24 1536:30",
1040
+ yGap: 20,
1041
+ xGap: 8,
1042
+ ...v,
1043
+ collapsed: s.value,
1044
+ collapsedRows: y
1045
+ } }, b, {
1046
+ showFeedback: !1,
1047
+ showAction: d,
1048
+ onSubmit: a,
1049
+ onReset: o,
1050
+ style: "position: relative"
1051
+ }), { action: ({ grid: e }) => (_(() => {
1052
+ d.suffix = e?.collapsedOverflow || e?.contentEl.children.item(e?.contentEl.children.length - 1).offsetTop > 0;
1053
+ }), l("div", { style: "display: flex; gap: 12px; align-items: center; justify-content: " + (d.suffix ? "flex-end" : "flex-start") }, [
1054
+ d.suffix ? void 0 : l("span", null, [c("\xA0\xA0\xA0\xA0")]),
1055
+ l(L, {
1056
+ attrType: "submit",
1057
+ type: "primary",
1058
+ disabled: t.disabled,
1059
+ loading: t.loading
1060
+ }, { default: () => [n || i("common.page.filter.submitText")] }),
1061
+ l(L, {
1062
+ attrType: "reset",
1063
+ disabled: t.disabled || t.loading
1064
+ }, { default: () => [f || i("common.page.form.resetText")] }),
1065
+ p ? l(ct, {
1066
+ keyField: "name",
1067
+ showFixed: !1,
1068
+ data: b.items,
1069
+ onCustom: (e) => r("custom", e)
1070
+ }, null) : void 0,
1071
+ h && e?.collapsedOverflow ? l(L, {
1072
+ text: !0,
1073
+ type: "primary",
1074
+ iconPlacement: "right",
1075
+ renderIcon: s.value ? qe : Je,
1076
+ onClick: () => u(!s.value)
1077
+ }, { default: () => [s.value ? i("common.page.filter.expand") : i("common.page.filter.collapse")] }) : void 0
1078
+ ])) });
1079
+ };
1080
+ }
1081
+ });
1082
+ //#endregion
1083
+ //#region src/components/DataLocaleInput.jsx
1084
+ function vt(e) {
1085
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
1086
+ }
1087
+ function yt(t, n, r = 1) {
1088
+ let { t: i } = e(), a = b(!1), o = [], { open: s, reinit: c } = Ne({
1089
+ title: t,
1090
+ showColon: !0,
1091
+ submitText: i("common.confirm.defaultOk"),
1092
+ items: ({ it: e }) => o.map((t) => e(t.value, t.label, "input", {
1093
+ span: 24,
1094
+ required: t.required,
1095
+ inputProps: {
1096
+ readonly: a,
1097
+ clearable: !0,
1098
+ type: "textarea",
1099
+ showCount: !0,
1100
+ autosize: {
1101
+ minRows: E(r),
1102
+ maxRows: Math.max(E(r), 5)
1103
+ }
1104
+ }
1105
+ })),
1106
+ onSubmit: n
1107
+ });
1108
+ return {
1109
+ open: (e, t = !1) => (a.value = t, s(e)),
1110
+ setSupports: (e) => {
1111
+ o = e, c();
1112
+ }
1113
+ };
1114
+ }
1115
+ var bt = /* @__PURE__ */ d({
1116
+ name: "DataLocaleInput",
1117
+ props: {
1118
+ label: { type: [
1119
+ String,
1120
+ Function,
1121
+ Number,
1122
+ Boolean,
1123
+ Object
1124
+ ] },
1125
+ mode: {
1126
+ type: String,
1127
+ default: "dialog"
1128
+ },
1129
+ defaultExpanded: {
1130
+ type: Boolean,
1131
+ default: !1
1132
+ },
1133
+ modelValue: Object,
1134
+ supports: {
1135
+ type: Array,
1136
+ default: () => []
1137
+ },
1138
+ disabled: {
1139
+ type: Boolean,
1140
+ default: void 0
1141
+ },
1142
+ defaultLang: {
1143
+ type: String,
1144
+ default: "zh-CN"
1145
+ },
1146
+ showLang: {
1147
+ type: String,
1148
+ default: void 0
1149
+ },
1150
+ defaultRows: {
1151
+ type: Number,
1152
+ default: 1
1153
+ }
1154
+ },
1155
+ emits: ["update:modelValue", "updateModelValue"],
1156
+ setup(e, { emit: t }) {
1157
+ let n = (n, r = e.showLang ?? e.defaultLang) => {
1158
+ n = {
1159
+ ...e.modelValue,
1160
+ [r]: n
1161
+ }, t("update:modelValue", n), t("updateModelValue", n);
1162
+ }, { open: r, setSupports: i } = yt(s(() => T(e.label)), (e) => {
1163
+ t("update:modelValue", e), t("updateModelValue", e);
1164
+ }, w(e, "defaultRows")), o = b(e.defaultExpanded);
1165
+ O(() => e.defaultExpanded, (e) => {
1166
+ o.value = e;
1167
+ });
1168
+ let c = () => l(L, {
1169
+ quaternary: !0,
1170
+ onClick: () => {
1171
+ o.value = !o.value;
1172
+ },
1173
+ style: "--n-padding: 0 8px"
1174
+ }, { default: () => [l(B, {
1175
+ size: "20",
1176
+ depth: "3"
1177
+ }, { default: () => [o.value ? l(Qe, null, null) : l(Ze, null, null)] })] }), u = (t) => {
1178
+ let n = t.split("-")[0];
1179
+ return e.supports.some((e) => e.value !== t && e.value.startsWith(n)) ? t : n;
1180
+ }, d = `__slots${De(6)}`;
1181
+ O(() => e.supports, (e) => {
1182
+ i(e);
1183
+ let t = 0;
1184
+ for (let [n, r] of e.entries()) {
1185
+ let e = u(r.value);
1186
+ t = Math.max(t, G(e, "monospace")), r[d] = h({
1187
+ prefix: () => l("div", { style: {
1188
+ width: `${t + 4}px`,
1189
+ height: "100%",
1190
+ opacity: .5,
1191
+ fontSize: "12px",
1192
+ fontFamily: "monospace",
1193
+ color: r.required ? "var(--color-danger)" : void 0
1194
+ } }, [e]),
1195
+ suffix: n === 0 ? c : void 0
1196
+ });
1197
+ }
1198
+ }, { immediate: !0 });
1199
+ let f = s(() => {
1200
+ let t = u(e.showLang ?? e.defaultLang);
1201
+ return [t, G(t, "monospace")];
1202
+ }), p = {
1203
+ prefix: () => l("div", { style: {
1204
+ width: `${f.value[1] + 4}px`,
1205
+ height: "100%",
1206
+ opacity: .5,
1207
+ fontSize: "12px",
1208
+ fontFamily: "monospace"
1209
+ } }, [f.value[0]]),
1210
+ suffix: () => l(L, {
1211
+ quaternary: !0,
1212
+ onClick: () => r(e.modelValue, e.disabled),
1213
+ style: "--n-padding: 0 8px"
1214
+ }, { default: () => [l(B, {
1215
+ size: "20",
1216
+ depth: "3"
1217
+ }, { default: () => [l(Xe, null, null)] })] })
1218
+ }, m = { "--n-padding-right": "0" };
1219
+ return () => {
1220
+ let t;
1221
+ return e.mode === "dialog" ? l(V, {
1222
+ value: e.modelValue?.[e.showLang ?? e.defaultLang] ?? e.modelValue?.[e.defaultLang],
1223
+ onUpdateValue: n,
1224
+ disabled: e.disabled,
1225
+ clearable: !0,
1226
+ style: m,
1227
+ type: e.defaultRows > 1 ? "textarea" : "text",
1228
+ rows: e.defaultRows
1229
+ }, vt(p) ? p : { default: () => [p] }) : l(z, {
1230
+ vertical: !0,
1231
+ wrap: !1,
1232
+ style: "width: 100%"
1233
+ }, vt(t = e.supports.map((t, r) => {
1234
+ if (!o.value && r !== 0) return;
1235
+ let i = r == 0;
1236
+ return k(l(V, {
1237
+ key: t.value,
1238
+ value: e.modelValue?.[t.value],
1239
+ onUpdateValue: (e) => n(e, t.value),
1240
+ disabled: e.disabled,
1241
+ clearable: !0,
1242
+ style: i ? m : void 0,
1243
+ type: e.defaultRows > 1 ? "textarea" : "text",
1244
+ rows: e.defaultRows
1245
+ }, t[d]), [[
1246
+ a,
1247
+ t.label,
1248
+ void 0,
1249
+ { left: !0 }
1250
+ ]]);
1251
+ })) ? t : { default: () => [t] });
1252
+ };
1253
+ }
1254
+ }), X = /* @__PURE__ */ d({
1255
+ name: "DataPagination",
1256
+ props: {
1257
+ total: {
1258
+ type: Number,
1259
+ default: 0
1260
+ },
1261
+ currentPage: { type: Number },
1262
+ pageSize: { type: Number },
1263
+ page: { type: Object },
1264
+ resetPageOnSizeChange: {
1265
+ type: Boolean,
1266
+ default: !0
1267
+ },
1268
+ pageSizes: { type: Array },
1269
+ simple: Boolean
1270
+ },
1271
+ emits: { change: () => !0 },
1272
+ setup(t, { emit: n }) {
1273
+ let { t: r } = e(), i = (e) => n("change", {
1274
+ pageSize: t.pageSize ?? t.page?.pageSize ?? 0,
1275
+ currentPage: e
1276
+ }), a = (e) => n("change", {
1277
+ pageSize: e,
1278
+ currentPage: t.resetPageOnSizeChange ? 1 : t.currentPage ?? t.page?.currentPage ?? 1
1279
+ }), o = p(X.DEFAULT_PAGE_SIZES_INJECTION_KEY, () => [
1280
+ 10,
1281
+ 20,
1282
+ 30,
1283
+ 50
1284
+ ], !0), s = {
1285
+ prefix: () => r("common.page.pagination.prefix", { total: t.total }),
1286
+ suffix: () => r("common.page.pagination.suffix")
1287
+ };
1288
+ return () => l(pe, {
1289
+ page: t.currentPage ?? t.page?.currentPage,
1290
+ itemCount: t.total,
1291
+ pageSize: t.pageSize ?? t.page?.pageSize,
1292
+ onUpdatePage: i,
1293
+ onUpdatePageSize: a,
1294
+ pageSizes: t.pageSizes || o,
1295
+ showQuickJumper: !0,
1296
+ showSizePicker: !0,
1297
+ simple: t.simple,
1298
+ style: "justify-content: flex-end"
1299
+ }, t.simple ? void 0 : s);
1300
+ }
1301
+ });
1302
+ X.DEFAULT_PAGE_SIZES_INJECTION_KEY = Symbol();
1303
+ //#endregion
1304
+ //#region src/components/ViewProfile.jsx
1305
+ function xt(e) {
1306
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
1307
+ }
1308
+ var St = /* @__PURE__ */ d({
1309
+ name: "ViewProfileRow",
1310
+ props: {
1311
+ value: String,
1312
+ label: String,
1313
+ locked: Boolean,
1314
+ preference: Boolean,
1315
+ current: Boolean
1316
+ },
1317
+ emits: [
1318
+ "updatePreference",
1319
+ "updateCurrent",
1320
+ "updateLabel",
1321
+ "remove",
1322
+ "copy"
1323
+ ],
1324
+ setup(e, { emit: t }) {
1325
+ let n = b(null), r = M(n), i = b(!1), a = b();
1326
+ A(n, () => i.value = !1);
1327
+ let s = () => {
1328
+ e.locked || (i.value = !0, a.value = e.label);
1329
+ }, u = () => {
1330
+ t("updatePreference", e.value, !e.preference);
1331
+ }, d = () => {
1332
+ t("updateCurrent", e.value);
1333
+ }, f = (n) => {
1334
+ e.label === a.value || n.type === "keyup" && n.key !== "Enter" || (i.value = !1, t("updateLabel", e.value, a.value || e.label));
1335
+ }, p = () => {
1336
+ t("remove", e.value);
1337
+ }, m = () => {
1338
+ t("copy", e.value);
1339
+ };
1340
+ return () => {
1341
+ let t;
1342
+ return l(z, {
1343
+ ref: n,
1344
+ align: "center",
1345
+ wrap: !1,
1346
+ size: "small",
1347
+ style: `padding: 4px 12px; ${e.current ? "color: var(--color-primary);" : ""} ${r.value ? "background-color: #f5f5f5" : ""}`
1348
+ }, { default: () => [
1349
+ l("span", { style: {
1350
+ fontSize: "18px",
1351
+ opacity: +!!e.current
1352
+ } }, [c("*")]),
1353
+ i.value ? l(V, {
1354
+ style: "flex: 1 1 auto",
1355
+ size: "small",
1356
+ value: a.value,
1357
+ "onUpdate:value": (e) => a.value = e,
1358
+ clearable: !0,
1359
+ autofocus: !0,
1360
+ onBlur: f,
1361
+ onKeyup: f
1362
+ }, null) : l(o, null, [
1363
+ l("div", {
1364
+ style: "flex: 1 1 auto; line-height: 28px;",
1365
+ onClick: d,
1366
+ onDblclick: s
1367
+ }, [l(ae, null, xt(t = T(e.label)) ? t : { default: () => [t] })]),
1368
+ l(L, {
1369
+ text: !0,
1370
+ type: "primary",
1371
+ style: { display: r.value ? "block" : "none" },
1372
+ onClick: m
1373
+ }, { default: () => [l(B, { size: 15 }, { default: () => [l(at, null, null)] })] }),
1374
+ l(L, {
1375
+ text: !0,
1376
+ type: "error",
1377
+ disabled: e.locked,
1378
+ style: { display: r.value ? "block" : "none" },
1379
+ onClick: p
1380
+ }, { default: () => [l(B, { size: 18 }, { default: () => [l(it, null, null)] })] })
1381
+ ]),
1382
+ l(L, {
1383
+ text: !0,
1384
+ type: e.preference ? "success" : "default",
1385
+ style: { display: !e.preference && !r.value ? "none" : "block" },
1386
+ onClick: u
1387
+ }, { default: () => [l(B, { size: 18 }, { default: () => [l(Ve, null, null)] })] })
1388
+ ] });
1389
+ };
1390
+ }
1391
+ }), Ct = /* @__PURE__ */ d({
1392
+ name: "ViewProfile",
1393
+ props: {
1394
+ profiles: {
1395
+ type: Array,
1396
+ required: !0
1397
+ },
1398
+ keyField: {
1399
+ type: String,
1400
+ default: "key"
1401
+ },
1402
+ nameField: {
1403
+ type: String,
1404
+ default: "name"
1405
+ },
1406
+ lockedField: {
1407
+ type: String,
1408
+ default: "locked"
1409
+ },
1410
+ changing: Boolean,
1411
+ buttonRender: Function,
1412
+ size: {
1413
+ type: Number,
1414
+ default: 12
1415
+ },
1416
+ type: String,
1417
+ profile: [String, Object],
1418
+ preference: [String, Object]
1419
+ },
1420
+ emits: {
1421
+ updateProfile: () => !0,
1422
+ "update:profile": () => !0,
1423
+ updatePreference: () => !0,
1424
+ "update:preference": () => !0,
1425
+ copy: () => !0,
1426
+ save: () => !0,
1427
+ remove: () => !0
1428
+ },
1429
+ setup(e, { emit: t, slots: n }) {
1430
+ let r = s(() => e.profiles.find((t) => t[e.keyField] === e.profile)), i = () => [l("div", { style: "display: flex; align-items: center; gap: 2px; color: #999; font-style: italic; font-weight: normal; cursor: pointer;" }, [l(te, {
1431
+ dot: !0,
1432
+ processing: !0,
1433
+ type: "success",
1434
+ show: e.changing
1435
+ }, { default: () => [e.buttonRender?.() ?? l(L, {
1436
+ text: !0,
1437
+ type: e.type
1438
+ }, { default: () => [l(B, {
1439
+ size: e.size,
1440
+ color: "#999"
1441
+ }, { default: () => [l(Be, null, null)] })] })] }), l("span", { style: { fontSize: e.size + "px" } }, [r.value?.[e.nameField] ?? e.profile])])], a = (e) => {
1442
+ t("update:profile", e), t("updateProfile", e);
1443
+ }, o = (e, n) => {
1444
+ n = n ? e : void 0, t("updatePreference", n), t("update:preference", n);
1445
+ }, c = (e, n) => {
1446
+ t("save", {
1447
+ key: e,
1448
+ name: n
1449
+ });
1450
+ }, u = (e) => {
1451
+ t("remove", e);
1452
+ }, d = (e) => {
1453
+ t("copy", e);
1454
+ };
1455
+ return () => l(H, {
1456
+ scrollable: !0,
1457
+ trigger: "click",
1458
+ placement: "bottom-start",
1459
+ "content-style": "padding: 0",
1460
+ style: "max-height: 400px; width: 240px"
1461
+ }, {
1462
+ trigger: () => x(n, "default", {}, i),
1463
+ default: () => {
1464
+ let t;
1465
+ return l(z, {
1466
+ vertical: !0,
1467
+ size: 0,
1468
+ style: "margin-block: 8px"
1469
+ }, xt(t = e.profiles.map((t) => l(St, {
1470
+ value: t[e.keyField],
1471
+ label: t[e.nameField] || t[e.keyField],
1472
+ locked: t[e.lockedField],
1473
+ preference: t[e.keyField] === e.preference,
1474
+ current: t[e.keyField] === e.profile,
1475
+ onUpdateCurrent: a,
1476
+ onUpdatePreference: o,
1477
+ onUpdateLabel: c,
1478
+ onRemove: u,
1479
+ onCopy: d
1480
+ }, null))) ? t : { default: () => [t] });
1481
+ }
1482
+ });
1483
+ }
1484
+ });
1485
+ //#endregion
1486
+ //#region src/components/DataSelection.jsx
1487
+ function wt(e) {
1488
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
1489
+ }
1490
+ var Tt = /* @__PURE__ */ d({
1491
+ name: "DataSelection",
1492
+ props: {
1493
+ modelValue: {
1494
+ type: String,
1495
+ required: !0
1496
+ },
1497
+ count: {
1498
+ type: Number,
1499
+ default: 0
1500
+ }
1501
+ },
1502
+ emits: {
1503
+ "update:modelValue": () => !0,
1504
+ clear: () => !0
1505
+ },
1506
+ setup(t, { emit: n }) {
1507
+ let { t: r } = e();
1508
+ return () => {
1509
+ let e;
1510
+ return t.modelValue !== "selection" && t.count === 0 ? l("div", null, null) : l("div", null, [l(z, {
1511
+ align: "center",
1512
+ "wrap-item": !1
1513
+ }, { default: () => [
1514
+ l("span", null, [r("common.page.selection.countText", { count: t.count })]),
1515
+ l(L, {
1516
+ text: !0,
1517
+ type: "primary",
1518
+ onClick: () => {
1519
+ n("update:modelValue", t.modelValue === "all" ? "selection" : "all");
1520
+ }
1521
+ }, { default: () => [t.modelValue === "all" ? r("common.page.selection.view") : r("common.page.selection.back")] }),
1522
+ l(L, {
1523
+ text: !0,
1524
+ onClick: () => {
1525
+ n("clear"), n("update:modelValue", "all");
1526
+ }
1527
+ }, wt(e = r("common.page.selection.clear")) ? e : { default: () => [e] })
1528
+ ] })]);
1529
+ };
1530
+ }
1531
+ }), Et = /* @__PURE__ */ d({
1532
+ name: "FullscreenButton",
1533
+ props: {
1534
+ target: {
1535
+ type: [String, HTMLElement],
1536
+ default: document.documentElement
1537
+ },
1538
+ iconSize: {
1539
+ type: Number,
1540
+ default: 18
1541
+ },
1542
+ abstract: {
1543
+ type: Boolean,
1544
+ default: !1
1545
+ },
1546
+ isFullscreen: {
1547
+ type: Boolean,
1548
+ default: !1
1549
+ },
1550
+ tooltipPlacement: {
1551
+ type: String,
1552
+ default: "left"
1553
+ }
1554
+ },
1555
+ emit: ["change"],
1556
+ setup(t, { emit: n, attrs: r }) {
1557
+ let { t: i } = e(), o, c;
1558
+ if (t.abstract) o = w(t, "isFullscreen"), c = () => {
1559
+ n("change", !o.value);
1560
+ };
1561
+ else {
1562
+ let e = N(s(() => typeof t.target == "string" ? document.querySelector(t.target) : t.target));
1563
+ o = e.isFullscreen, c = () => {
1564
+ e.toggle(), n("change", o.value);
1565
+ };
1566
+ }
1567
+ return () => k(l(L, {
1568
+ style: r.quaternary ? "--n-padding: 0 12px" : void 0,
1569
+ onClick: c
1570
+ }, { default: () => [l(B, { size: t.iconSize }, { default: () => [o.value ? l("svg", {
1571
+ xmlns: "http://www.w3.org/2000/svg",
1572
+ width: "1em",
1573
+ height: "1em",
1574
+ viewBox: "0 0 24 24"
1575
+ }, [l("path", {
1576
+ fill: "none",
1577
+ stroke: "currentColor",
1578
+ "stroke-linecap": "round",
1579
+ "stroke-linejoin": "round",
1580
+ "stroke-width": "1.5",
1581
+ d: "M8.345 3.75v2.095a2.5 2.5 0 0 1-2.5 2.5H3.75M8.345 20.25v-2.095a2.5 2.5 0 0 0-2.5-2.5H3.75M15.655 3.75v2.095a2.5 2.5 0 0 0 2.5 2.5h2.095M15.655 20.25v-2.095a2.5 2.5 0 0 1 2.5-2.5h2.095"
1582
+ }, null)]) : l("svg", {
1583
+ xmlns: "http://www.w3.org/2000/svg",
1584
+ width: "1em",
1585
+ height: "1em",
1586
+ viewBox: "0 0 24 24"
1587
+ }, [l("path", {
1588
+ fill: "none",
1589
+ stroke: "currentColor",
1590
+ "stroke-linecap": "round",
1591
+ "stroke-linejoin": "round",
1592
+ "stroke-width": "1.5",
1593
+ d: "M3.75 8.345V6.25a2.5 2.5 0 0 1 2.5-2.5h2.095M3.75 15.655v2.095a2.5 2.5 0 0 0 2.5 2.5h2.095M20.25 8.345V6.25a2.5 2.5 0 0 0-2.5-2.5h-2.095m4.595 11.905v2.095a2.5 2.5 0 0 1-2.5 2.5h-2.095"
1594
+ }, null)])] })] }), [[
1595
+ a,
1596
+ o.value ? i("common.layout.screen.exitfull") : i("common.layout.screen.full"),
1597
+ void 0,
1598
+ { [t.tooltipPlacement]: !0 }
1599
+ ]]);
1600
+ }
1601
+ });
1602
+ //#endregion
1603
+ //#region src/components/FullscreenWrapper.jsx
1604
+ function Dt(e) {
1605
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
1606
+ }
1607
+ var Ot = /* @__PURE__ */ d({
1608
+ name: "FullscreenWrapper",
1609
+ props: {
1610
+ tag: {
1611
+ type: String,
1612
+ default: "div"
1613
+ },
1614
+ scrollable: {
1615
+ type: Boolean,
1616
+ default: !1
1617
+ },
1618
+ scrollbarProps: {
1619
+ type: Object,
1620
+ default: () => ({})
1621
+ }
1622
+ },
1623
+ emit: ["change"],
1624
+ setup(e, { emit: t, slots: n }) {
1625
+ let r = D("target"), { isFullscreen: i, toggle: a, enter: o, exit: s } = N(r);
1626
+ return O(i, (e) => t("change", e)), () => {
1627
+ let t = x(n, "default", {
1628
+ target: r.value,
1629
+ toggle: a,
1630
+ isFullscreen: i.value,
1631
+ enter: o,
1632
+ exit: s
1633
+ });
1634
+ return f(e.tag, { ref: "target" }, e.scrollable && i.value ? l(_e, e.scrollbarProps, Dt(t) ? t : { default: () => [t] }) : t);
1635
+ };
1636
+ }
1637
+ });
1638
+ //#endregion
1639
+ //#region src/components/Radios.jsx
1640
+ function kt(e) {
1641
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
1642
+ }
1643
+ var At = /* @__PURE__ */ d({
1644
+ name: "Radios",
1645
+ props: {
1646
+ options: {
1647
+ type: Array,
1648
+ default: () => []
1649
+ },
1650
+ vertical: {
1651
+ type: Boolean,
1652
+ default: !1
1653
+ },
1654
+ type: {
1655
+ type: String,
1656
+ default: "radio"
1657
+ },
1658
+ default: {
1659
+ type: [
1660
+ Boolean,
1661
+ String,
1662
+ Object
1663
+ ],
1664
+ default: !1
1665
+ },
1666
+ padding: {
1667
+ type: String,
1668
+ default: void 0
1669
+ },
1670
+ labelField: {
1671
+ type: String,
1672
+ default: "label"
1673
+ },
1674
+ valueField: {
1675
+ type: String,
1676
+ default: "value"
1677
+ },
1678
+ disabledField: {
1679
+ type: String,
1680
+ default: "disabled"
1681
+ },
1682
+ modelValue: {
1683
+ type: [
1684
+ String,
1685
+ Number,
1686
+ Boolean
1687
+ ],
1688
+ default: void 0
1689
+ }
1690
+ },
1691
+ emits: {
1692
+ "update:modelValue": () => !0,
1693
+ updateModelValue: () => !0
1694
+ },
1695
+ setup(t, { emit: n }) {
1696
+ let { t: r } = e(), a = i(), c = s(() => t.default === !1 ? "" : t.default === !0 ? r("common.all") : typeof t.default == "string" ? t.default : t.default?.[t.labelField] ?? r("common.all")), u = s(() => t.type === "button-primary" ? {
1697
+ "--n-button-color-active": "var(--color-primary)",
1698
+ "--n-button-text-color-active": "var(--color-base)"
1699
+ } : {}), d = (e) => {
1700
+ n("update:modelValue", e), n("updateModelValue", e);
1701
+ };
1702
+ return () => {
1703
+ let e = t.type === "button" ? he : me, n = l(o, null, [t.default ? l(e, {
1704
+ value: typeof t.default == "object" ? t.default?.[t.valueField] : null,
1705
+ class: `${a.value}-radio__default`
1706
+ }, { default: () => [c.value] }) : void 0, t.options?.map((n) => {
1707
+ let r = typeof n[t.labelField] == "string" ? n[t.labelField] : n[t.labelField]?.();
1708
+ return l(e, {
1709
+ value: n[t.valueField],
1710
+ disabled: n[t.disabledField],
1711
+ style: t.padding ? {
1712
+ paddingLeft: t.padding,
1713
+ paddingRight: t.padding
1714
+ } : {}
1715
+ }, { default: () => [n.tip ? l(Se, null, {
1716
+ default: () => n.tip,
1717
+ trigger: () => r
1718
+ }) : r] });
1719
+ })]);
1720
+ return l(ge, {
1721
+ style: t.vertical ? {
1722
+ ...u.value,
1723
+ padding: "6px 0 0"
1724
+ } : u.value,
1725
+ class: `${a.value}-radios`,
1726
+ value: t.modelValue,
1727
+ onUpdateValue: d
1728
+ }, { default: () => [t.type === "radio" ? l(z, {
1729
+ size: t.vertical ? void 0 : "small",
1730
+ vertical: t.vertical
1731
+ }, kt(n) ? n : { default: () => [n] }) : n] });
1732
+ };
1733
+ }
1734
+ });
1735
+ //#endregion
1736
+ //#region src/components/UserDept.jsx
1737
+ function Z(e) {
1738
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
1739
+ }
1740
+ var jt = /* @__PURE__ */ d({
1741
+ name: "UserDept",
1742
+ inheritAttrs: !1,
1743
+ props: {
1744
+ users: {
1745
+ type: Array,
1746
+ default: () => []
1747
+ },
1748
+ groups: {
1749
+ type: Array,
1750
+ default: () => []
1751
+ },
1752
+ depts: {
1753
+ type: Array,
1754
+ default: () => []
1755
+ },
1756
+ modelValue: {
1757
+ type: [Array, String],
1758
+ default: void 0
1759
+ },
1760
+ placeholder: {
1761
+ type: String,
1762
+ default: void 0
1763
+ },
1764
+ size: {
1765
+ type: String,
1766
+ default: void 0
1767
+ },
1768
+ type: {
1769
+ type: String,
1770
+ default: "user"
1771
+ },
1772
+ selectType: {
1773
+ type: String,
1774
+ default: "dropdown"
1775
+ },
1776
+ max: {
1777
+ type: Number,
1778
+ default: void 0
1779
+ },
1780
+ multiple: {
1781
+ type: Boolean,
1782
+ default: !1
1783
+ },
1784
+ defaultExpandAll: {
1785
+ type: Boolean,
1786
+ default: !1
1787
+ },
1788
+ filterable: {
1789
+ type: Boolean,
1790
+ default: !1
1791
+ },
1792
+ disabled: {
1793
+ type: Boolean,
1794
+ default: void 0
1795
+ },
1796
+ getUsersByGroup: {
1797
+ type: Function,
1798
+ default: () => []
1799
+ },
1800
+ getUsersByDept: {
1801
+ type: Function,
1802
+ default: () => []
1803
+ },
1804
+ valueField: { type: String },
1805
+ renderUserInfo: Function
1806
+ },
1807
+ emits: ["update:modelValue", "updateModelValue"],
1808
+ setup(t, { emit: n, attrs: r }) {
1809
+ let { t: i } = e(), { localeRef: a } = Pe("Popconfirm"), c = s(() => t.valueField || (t.type === "user" ? "username" : "code")), u = s(() => {
1810
+ if (t.multiple) return t.modelValue || [];
1811
+ let e = t.modelValue?.trim();
1812
+ return e ? [e] : [];
1813
+ }), d = /* @__PURE__ */ new Map(), f = s(() => (d.clear(), t.users.map((e) => (e = y(e), e.label = e.nickname + e.username, e.value = e[c.value], e.type = "user", d.set(e[c.value], e), e)))), p = S([]);
1814
+ O(() => t.depts, (e) => {
1815
+ Ie(e, (e) => {
1816
+ e.label = e.name, e.value = e[c.value], e.type = "dept", e.children?.length || delete e.children;
1817
+ }), p.value = Fe(e);
1818
+ }, { immediate: !0 });
1819
+ let m = s(() => [
1820
+ ...t.depts,
1821
+ ...t.groups.map((e) => ({
1822
+ label: e.name,
1823
+ value: e.code,
1824
+ type: "group"
1825
+ })),
1826
+ ...f.value
1827
+ ]), h = b([]), v = b(), x = async (e) => {
1828
+ let n = await (e.type === "group" ? t.getUsersByGroup(e.value) : t.getUsersByDept(e.value));
1829
+ for (let e of f.value) e.disabled = !0;
1830
+ v.value = [...e.type === "dept" ? e.children ?? [] : [], ...n.map((e) => {
1831
+ let t = d.get(e[c.value]);
1832
+ return t && (t.disabled = !1), {
1833
+ ...e,
1834
+ label: e.nickname + e.username,
1835
+ value: e[c.value],
1836
+ type: "user"
1837
+ };
1838
+ })];
1839
+ }, C = /* @__PURE__ */ new WeakMap(), w = (e, n, r) => {
1840
+ let a;
1841
+ if (t.type === "dept") return l(we, {
1842
+ data: t.depts,
1843
+ keyField: "value",
1844
+ labelField: "name",
1845
+ defaultExpandAll: t.defaultExpandAll,
1846
+ checkable: t.multiple,
1847
+ selectable: !t.multiple,
1848
+ multiple: !1,
1849
+ blockLine: !0,
1850
+ checkOnClick: !0,
1851
+ pattern: r,
1852
+ filter: (e, t) => t.label.includes(e) || t.value.includes(e),
1853
+ checkedKeys: t.multiple ? e : void 0,
1854
+ selectedKeys: t.multiple ? void 0 : e,
1855
+ onUpdateCheckedKeys: (e) => {
1856
+ t.max && e?.length > t.max || n(e);
1857
+ },
1858
+ onUpdateSelectedKeys: (e) => {
1859
+ n(e);
1860
+ }
1861
+ }, null);
1862
+ let s = e ? C.get(e) : /* @__PURE__ */ new Set();
1863
+ if (e && !s && (s = new Set(e), C.set(e, s)), v.value === !1) return l(ye, { show: !0 }, null);
1864
+ let c = v.value || m.value;
1865
+ r = r?.trim(), r && (c = c?.filter((e) => e.label.includes(r) || e.value.includes(r)));
1866
+ let u = h.value;
1867
+ return l(o, null, [l("div", { style: "margin: 12px 16px; display: flex; justify-content: space-between; align-items: center" }, [u.length > 0 ? l(o, null, [l("span", { style: "display: flex; align-items: center" }, [
1868
+ u.length >= 2 ? u.at(-2).label : i("common.all"),
1869
+ l("span", { style: "padding: 0 4px" }, [l(Ke, null, null)]),
1870
+ u.at(-1).label
1871
+ ]), l(L, {
1872
+ text: !0,
1873
+ type: "warning",
1874
+ onClick: () => {
1875
+ if (u.pop(), v.value = u.length > 0 ? !1 : void 0, u.length > 0) x(u.at(-1));
1876
+ else for (let e of f.value) e.disabled = !1;
1877
+ }
1878
+ }, { default: () => [l(B, null, { default: () => [l(Ge, null, null)] }), i("common.back")] })]) : l("span", null, [i("common.all")])]), c?.length ? l(de, {
1879
+ showDivider: !1,
1880
+ style: "padding: 0 16px"
1881
+ }, Z(a = c.map((r) => {
1882
+ let i, a;
1883
+ return l(fe, {
1884
+ key: r.type + "_" + r.value,
1885
+ style: "padding: 6px 0"
1886
+ }, { default: () => [r.type === "user" ? t.multiple ? l(R, {
1887
+ checked: s.has(r.value) || !1,
1888
+ onUpdateChecked: (i) => {
1889
+ if (i && t.max && e.length >= t.max) return;
1890
+ let a = [...e || []];
1891
+ if (i) a.push(r.value);
1892
+ else {
1893
+ let e = a.indexOf(r.value);
1894
+ a.splice(e, 1);
1895
+ }
1896
+ n(a);
1897
+ },
1898
+ style: "margin-left: 3px"
1899
+ }, Z(i = $([r], {
1900
+ max: 1,
1901
+ size: 24,
1902
+ placement: "right",
1903
+ tooltip: !1,
1904
+ username: !0,
1905
+ renderInfo: t.renderUserInfo
1906
+ })) ? i : { default: () => [i] }) : l(me, {
1907
+ checked: s.has(r.value) || !1,
1908
+ onUpdateChecked: (e) => {
1909
+ n(e ? [r.value] : []);
1910
+ },
1911
+ style: "margin-left: 3px;"
1912
+ }, Z(a = $([r], {
1913
+ max: 1,
1914
+ size: 24,
1915
+ placement: "right",
1916
+ tooltip: !1,
1917
+ username: !0,
1918
+ renderInfo: t.renderUserInfo
1919
+ })) ? a : { default: () => [a] }) : l("div", {
1920
+ onClick: () => {
1921
+ v.value = !1, h.value.push(r), x(r);
1922
+ },
1923
+ style: "cursor: pointer; display: flex; align-items: center; gap: 8px"
1924
+ }, [
1925
+ r.type === "dept" ? l(I, {
1926
+ size: 24,
1927
+ style: "background-color: red"
1928
+ }, { default: () => [l(B, null, { default: () => [l(et, null, null)] })] }) : l(I, {
1929
+ size: 24,
1930
+ style: "background-color: green"
1931
+ }, { default: () => [l(B, null, { default: () => [l(tt, null, null)] })] }),
1932
+ l("span", { style: "flex: 1 1 auto" }, [r.label]),
1933
+ l(B, null, { default: () => [l(Ke, null, null)] })
1934
+ ])] });
1935
+ })) ? a : { default: () => [a] }) : l(oe, null, null)]);
1936
+ }, T = () => l(oe, { description: t.placeholder }, null), E = ({ option: e }) => e.type === "user" ? l("span", null, [e.nickname, l("span", { style: {
1937
+ opacity: .4,
1938
+ marginLeft: "8px"
1939
+ } }, [e.username])]) : l("span", null, [e.label]), D = (e, n, r, i, a) => l(Ce, g(e, {
1940
+ key: t.type,
1941
+ options: n,
1942
+ renderSourceList: ({ onCheck: e, pattern: t }) => w(r, e, t),
1943
+ renderTargetList: t.placeholder?.trim() && !t.modelValue?.length ? T : void 0,
1944
+ renderTargetLabel: E,
1945
+ sourceFilterable: t.filterable,
1946
+ size: t.size,
1947
+ disabled: t.disabled || void 0,
1948
+ value: r,
1949
+ filter: (e, t) => t.label.includes(e) || t.value.includes(e),
1950
+ "onUpdate:value": (e) => {
1951
+ i?.(e);
1952
+ },
1953
+ onUpdateValue: (e) => {
1954
+ a?.(e);
1955
+ }
1956
+ }), null), k = ({ option: e, handleClose: n }) => l(be, {
1957
+ type: t.type === "user" ? "primary" : "info",
1958
+ closable: !0,
1959
+ onMousedown: (e) => e.preventDefault(),
1960
+ onClose: (e) => {
1961
+ e.stopPropagation(), n();
1962
+ }
1963
+ }, { default: () => [e.label] }), A = (e, r = "updateModelValue") => {
1964
+ t.multiple ? n(r, e) : n(r, e?.[0]);
1965
+ }, j = b(), M = !1, N = Ee(), P = () => {
1966
+ if (M) return;
1967
+ M = !0;
1968
+ let e = S([...u.value || []]);
1969
+ N.create({
1970
+ showIcon: !1,
1971
+ title: t.placeholder,
1972
+ style: { width: "700px" },
1973
+ content: () => l("div", { style: { height: "550px" } }, [D({ style: { height: "100%" } }, t.type === "user" ? f.value : p.value, e.value, (t) => e.value = t)]),
1974
+ positiveText: a.value.positiveText,
1975
+ negativeText: a.value.negativeText,
1976
+ onPositiveClick() {
1977
+ A(e.value, "update:modelValue"), A(e.value, "updateModelValue");
1978
+ },
1979
+ onAfterLeave() {
1980
+ _(() => {
1981
+ j.value?.blur(), M = !1;
1982
+ });
1983
+ }
1984
+ });
1985
+ }, F = { arrow: () => l(B, null, { default: () => [t.type === "user" ? l(tt, null, null) : l(et, null, null)] }) };
1986
+ return () => {
1987
+ let e = t.type === "user" ? f.value : p.value;
1988
+ if (t.selectType === "dropdown" && t.type === "dept") return l(Te, {
1989
+ options: e,
1990
+ keyField: "value",
1991
+ defaultExpandAll: t.defaultExpandAll,
1992
+ checkable: t.multiple,
1993
+ multiple: t.multiple,
1994
+ filter: (e, t) => t.label.includes(e) || t.value.includes(e),
1995
+ value: t.modelValue,
1996
+ onUpdateValue: (e) => {
1997
+ t.multiple && t.max && e?.length > t.max || n("updateModelValue", e);
1998
+ },
1999
+ "onUpdate:value": (e) => {
2000
+ t.multiple && t.max && e?.length > t.max || n("update:modelValue", e);
2001
+ }
2002
+ }, Z(F) ? F : { default: () => [F] });
2003
+ if (t.selectType === "transfer") return D(r, e, u.value, (e) => A(e, "update:modelValue"), (e) => A(e, "updateModelValue"));
2004
+ let i = t.selectType === "dropdown";
2005
+ return l(ve, g(r, {
2006
+ key: t.type,
2007
+ ref: j,
2008
+ show: i ? void 0 : !1,
2009
+ filterable: i ? t.filterable : !1,
2010
+ options: e,
2011
+ multiple: t.multiple,
2012
+ size: t.size,
2013
+ placeholder: t.placeholder,
2014
+ disabled: t.disabled || void 0,
2015
+ value: t.modelValue,
2016
+ renderTag: t.multiple ? k : void 0,
2017
+ onFocus: i ? void 0 : P,
2018
+ onUpdateValue: (e) => {
2019
+ n("updateModelValue", e);
2020
+ },
2021
+ "onUpdate:value": (e) => {
2022
+ n("update:modelValue", e);
2023
+ }
2024
+ }), Z(F) ? F : { default: () => [F] });
2025
+ };
2026
+ }
2027
+ });
2028
+ function Q(e, t, { placement: n = "left", size: r = 24, tooltip: i = !0, username: a = !1, renderInfo: o }) {
2029
+ let s = e.nickname.split(" ").at(-1), c = s;
2030
+ if (/^[\u4E00-\u9FA5]+$/.test(s)) {
2031
+ let e = s.length;
2032
+ c = e === 3 || e === 4 ? s.slice(-2) : e > 4 ? s.slice(0, 1) : s;
2033
+ } else s.length > 4 && (c = l(B, null, { default: () => [l(nt, null, null)] }));
2034
+ let u = (e) => l(I, {
2035
+ color: "var(--color-primary)",
2036
+ round: !0,
2037
+ size: e
2038
+ }, Z(c) ? c : { default: () => [c] });
2039
+ return l(H, {
2040
+ key: e.username,
2041
+ raw: !0,
2042
+ placement: n,
2043
+ disabled: i === !1
2044
+ }, {
2045
+ default: () => l(ne, {
2046
+ style: "min-width: 200px",
2047
+ size: "small"
2048
+ }, { default: () => [l("div", { style: "display: flex; align-items: center; gap: 12px" }, [u(48), l("div", null, [l("div", { style: "font-size: 16px; font-weight: 500;" }, [e.nickname]), l("div", { style: "font-size: 14px; color: #999" }, [e.username])])]), o?.(e)] }),
2049
+ trigger: () => {
2050
+ let n = u(r);
2051
+ return t ? l("div", { style: "max-width: 100%; overflow: hidden; display: inline-flex; align-items: center; gap: 6px" }, [n, l("div", { style: "overflow: hidden; white-space: nowrap; text-overflow: ellipsis" }, [l("span", null, [e.nickname]), a ? l("span", { style: "margin-left: 8px; opacity: 0.4" }, [e.username]) : void 0])]) : n;
2052
+ }
2053
+ });
2054
+ }
2055
+ function $(e, t = {}) {
2056
+ let { max: n = 4, size: r = 24 } = t;
2057
+ return e.length <= 1 ? e[0] ? Q(e[0], !0, t) : null : l("span", { style: {
2058
+ display: "inline-block",
2059
+ height: r + "px"
2060
+ } }, [l(ee, {
2061
+ options: e,
2062
+ size: r,
2063
+ max: n || 4,
2064
+ style: "top: -2px"
2065
+ }, {
2066
+ avatar: ({ option: e }) => Q(e, !1, t),
2067
+ rest: ({ options: e, rest: t }) => l(ie, {
2068
+ options: e,
2069
+ keyField: "username",
2070
+ labelField: "nickname",
2071
+ renderOption: ({ option: t }) => Q(t, !1, e)
2072
+ }, { default: () => [l(I, null, { default: () => [c("+"), t] })] })
2073
+ })]);
2074
+ }
2075
+ var Mt = /* @__PURE__ */ d({
2076
+ name: "DeptRender",
2077
+ props: {
2078
+ value: [String, Array],
2079
+ multiple: Boolean,
2080
+ getDeptsByCode: Function
2081
+ },
2082
+ setup(e) {
2083
+ let t = b([]), n = {};
2084
+ return O([() => e.modelValue, () => e.multiple], ([r, i]) => {
2085
+ t.value = [];
2086
+ let a = r ? i ? Array.isArray(r) ? r : r.trim() ? r.trim().split(",") : [] : [r] : [], o = [];
2087
+ for (let [e, r] of a.entries()) n[r] || (n[r] = y({
2088
+ code: r,
2089
+ name: r
2090
+ }), o.push(r)), t.value[e] = n[r];
2091
+ o.length > 0 && e.getDeptsByCode(o).then((e) => {
2092
+ for (let t of e) Object.assign(n[t.code], t);
2093
+ });
2094
+ }, { immediate: !0 }), () => t.value.map((e) => l(be, { key: e.code }, { default: () => [e.name] }));
2095
+ }
2096
+ }), Nt = /* @__PURE__ */ d({
2097
+ name: "UserRender",
2098
+ props: {
2099
+ value: [String, Array],
2100
+ multiple: Boolean,
2101
+ max: Number,
2102
+ size: Number,
2103
+ placement: String,
2104
+ getUsersByUsername: Function,
2105
+ renderInfo: Function
2106
+ },
2107
+ setup(e) {
2108
+ let t = b([]), n = {};
2109
+ return O([() => e.value, () => e.multiple], ([r, i]) => {
2110
+ t.value = [];
2111
+ let a = r ? i ? Array.isArray(r) ? r : r.trim() ? r.trim().split(",") : [] : [r] : [], o = [];
2112
+ for (let [e, r] of a.entries()) n[r] || (n[r] = y({
2113
+ username: r,
2114
+ nickname: r
2115
+ }), o.push(r)), t.value[e] = n[r];
2116
+ o.length > 0 && e.getUsersByUsername(o).then((e) => {
2117
+ for (let t of e) Object.assign(n[t.username], t);
2118
+ });
2119
+ }, { immediate: !0 }), () => $(t.value, e);
2120
+ }
2121
+ }), Pt = {
2122
+ disabled: {
2123
+ type: Boolean,
2124
+ default: void 0
2125
+ },
2126
+ type: {
2127
+ type: String,
2128
+ default: void 0
2129
+ },
2130
+ succeeded: {
2131
+ type: [Boolean, Object],
2132
+ default: void 0
2133
+ },
2134
+ successText: {
2135
+ type: [
2136
+ String,
2137
+ Number,
2138
+ Object
2139
+ ],
2140
+ default: void 0
2141
+ },
2142
+ failureText: {
2143
+ type: [
2144
+ String,
2145
+ Number,
2146
+ Object
2147
+ ],
2148
+ default: void 0
2149
+ }
2150
+ }, Ft = /* @__PURE__ */ d({
2151
+ name: "StateButton",
2152
+ props: Pt,
2153
+ setup(e, { slots: t }) {
2154
+ return () => {
2155
+ let { type: n, disabled: r, succeeded: i, successText: a, failureText: o } = e;
2156
+ return l(L, {
2157
+ type: i ? "success" : i === !1 ? "error" : n,
2158
+ disabled: typeof i == "boolean" ? !0 : r
2159
+ }, {
2160
+ default: () => (i ? x(t, "success", void 0, () => [a]) : i === !1 ? x(t, "failure", void 0, () => [o]) : x(t, "default")) ?? x(t, "default"),
2161
+ icon: () => i ? x(t, "successIcon", void 0, () => [l(B, null, { default: () => [l(Ye, null, null)] })]) : i === !1 ? x(t, "failureIcon", void 0, () => [l(B, null, { default: () => [l(rt, null, null)] })]) : x(t, "icon")
2162
+ });
2163
+ };
2164
+ }
2165
+ }), It = u(() => import("./DataTable-BvLINmq3.js").then((e) => e.DataTable));
2166
+ //#endregion
2167
+ export { Re as C, ot as S, gt as _, jt as a, pt as b, At as c, Tt as d, Ct as f, _t as g, yt as h, Mt as i, Ot as l, bt as m, Ft as n, Nt as o, X as p, Pt as r, $ as s, It as t, Et as u, Y as v, Le as w, ct as x, J as y };