@skyfox2000/webui 0.1.0

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.
Files changed (213) hide show
  1. package/.eslintrc.js +23 -0
  2. package/.prettierrc +11 -0
  3. package/.vscode/settings.json +25 -0
  4. package/README.md +104 -0
  5. package/env.d.ts +11 -0
  6. package/index.html +19 -0
  7. package/lib/AceEditor.d.ts +4 -0
  8. package/lib/BasicLayout.d.ts +4 -0
  9. package/lib/Error403.d.ts +4 -0
  10. package/lib/Error404.d.ts +4 -0
  11. package/lib/ExcelForm.d.ts +4 -0
  12. package/lib/UploadForm.d.ts +4 -0
  13. package/lib/assets/modules/basicLayout-YP_-EySb.js +726 -0
  14. package/lib/assets/modules/error403-Bi0E2twj.js +33 -0
  15. package/lib/assets/modules/error404-BF7vasR_.js +33 -0
  16. package/lib/assets/modules/excelForm-Dzndz-SG.js +109 -0
  17. package/lib/assets/modules/excelForm-WJVQmaDT.js +317 -0
  18. package/lib/assets/modules/index-FzWSvscZ.js +107 -0
  19. package/lib/assets/modules/index-ekkaExvB.js +49 -0
  20. package/lib/assets/modules/uploadForm-BahGnrAq.js +415 -0
  21. package/lib/assets/modules/uploadForm-DEnOjhwc.js +308 -0
  22. package/lib/components/common/button/index.vue.d.ts +42 -0
  23. package/lib/components/common/button/index.vue.d.ts.map +1 -0
  24. package/lib/components/common/icon/appicon.vue.d.ts +12 -0
  25. package/lib/components/common/icon/appicon.vue.d.ts.map +1 -0
  26. package/lib/components/common/icon/fullscreen.vue.d.ts +4 -0
  27. package/lib/components/common/icon/fullscreen.vue.d.ts.map +1 -0
  28. package/lib/components/common/icon/helper.vue.d.ts +23 -0
  29. package/lib/components/common/icon/helper.vue.d.ts.map +1 -0
  30. package/lib/components/common/icon/index.vue.d.ts +244 -0
  31. package/lib/components/common/icon/index.vue.d.ts.map +1 -0
  32. package/lib/components/common/icon/layoutIcon.vue.d.ts +44 -0
  33. package/lib/components/common/icon/layoutIcon.vue.d.ts.map +1 -0
  34. package/lib/components/common/icon/projectIcon.vue.d.ts +60 -0
  35. package/lib/components/common/icon/projectIcon.vue.d.ts.map +1 -0
  36. package/lib/components/common/icon/toolIcon.vue.d.ts +44 -0
  37. package/lib/components/common/icon/toolIcon.vue.d.ts.map +1 -0
  38. package/lib/components/common/index.d.ts +19 -0
  39. package/lib/components/common/index.d.ts.map +1 -0
  40. package/lib/components/common/tooltip/index.vue.d.ts +22 -0
  41. package/lib/components/common/tooltip/index.vue.d.ts.map +1 -0
  42. package/lib/components/content/dialog/excelForm.vue.d.ts +31 -0
  43. package/lib/components/content/dialog/excelForm.vue.d.ts.map +1 -0
  44. package/lib/components/content/dialog/index.vue.d.ts +35 -0
  45. package/lib/components/content/dialog/index.vue.d.ts.map +1 -0
  46. package/lib/components/content/dialog/uploadForm.vue.d.ts +25 -0
  47. package/lib/components/content/dialog/uploadForm.vue.d.ts.map +1 -0
  48. package/lib/components/content/drawer/index.vue.d.ts +27 -0
  49. package/lib/components/content/drawer/index.vue.d.ts.map +1 -0
  50. package/lib/components/content/form/formItem.vue.d.ts +26 -0
  51. package/lib/components/content/form/formItem.vue.d.ts.map +1 -0
  52. package/lib/components/content/form/index.vue.d.ts +26 -0
  53. package/lib/components/content/form/index.vue.d.ts.map +1 -0
  54. package/lib/components/content/index.d.ts +27 -0
  55. package/lib/components/content/index.d.ts.map +1 -0
  56. package/lib/components/content/search/index.vue.d.ts +30 -0
  57. package/lib/components/content/search/index.vue.d.ts.map +1 -0
  58. package/lib/components/content/search/searchItem.vue.d.ts +24 -0
  59. package/lib/components/content/search/searchItem.vue.d.ts.map +1 -0
  60. package/lib/components/content/table/index.vue.d.ts +37 -0
  61. package/lib/components/content/table/index.vue.d.ts.map +1 -0
  62. package/lib/components/content/table/tableOperate.vue.d.ts +19 -0
  63. package/lib/components/content/table/tableOperate.vue.d.ts.map +1 -0
  64. package/lib/components/content/toolbar/icontool.vue.d.ts +8 -0
  65. package/lib/components/content/toolbar/icontool.vue.d.ts.map +1 -0
  66. package/lib/components/content/toolbar/index.vue.d.ts +19 -0
  67. package/lib/components/content/toolbar/index.vue.d.ts.map +1 -0
  68. package/lib/components/content/tree/index.vue.d.ts +47 -0
  69. package/lib/components/content/tree/index.vue.d.ts.map +1 -0
  70. package/lib/components/error/error403.vue.d.ts +4 -0
  71. package/lib/components/error/error403.vue.d.ts.map +1 -0
  72. package/lib/components/error/error404.vue.d.ts +4 -0
  73. package/lib/components/error/error404.vue.d.ts.map +1 -0
  74. package/lib/components/form/aceEditor/aceConfig.d.ts +9 -0
  75. package/lib/components/form/aceEditor/aceConfig.d.ts.map +1 -0
  76. package/lib/components/form/aceEditor/index.vue.d.ts +13 -0
  77. package/lib/components/form/aceEditor/index.vue.d.ts.map +1 -0
  78. package/lib/components/form/autoComplete/index.vue.d.ts +140 -0
  79. package/lib/components/form/autoComplete/index.vue.d.ts.map +1 -0
  80. package/lib/components/form/cascader/index.vue.d.ts +110 -0
  81. package/lib/components/form/cascader/index.vue.d.ts.map +1 -0
  82. package/lib/components/form/checkbox/index.vue.d.ts +129 -0
  83. package/lib/components/form/checkbox/index.vue.d.ts.map +1 -0
  84. package/lib/components/form/datePicker/index.vue.d.ts +7 -0
  85. package/lib/components/form/datePicker/index.vue.d.ts.map +1 -0
  86. package/lib/components/form/index.d.ts +41 -0
  87. package/lib/components/form/index.d.ts.map +1 -0
  88. package/lib/components/form/input/index.vue.d.ts +27 -0
  89. package/lib/components/form/input/index.vue.d.ts.map +1 -0
  90. package/lib/components/form/input/inputIcon.vue.d.ts +11 -0
  91. package/lib/components/form/input/inputIcon.vue.d.ts.map +1 -0
  92. package/lib/components/form/input/inputNumber.vue.d.ts +4 -0
  93. package/lib/components/form/input/inputNumber.vue.d.ts.map +1 -0
  94. package/lib/components/form/input/inputPassword.vue.d.ts +4 -0
  95. package/lib/components/form/input/inputPassword.vue.d.ts.map +1 -0
  96. package/lib/components/form/propEditor/index.vue.d.ts +13 -0
  97. package/lib/components/form/propEditor/index.vue.d.ts.map +1 -0
  98. package/lib/components/form/radio/index.vue.d.ts +134 -0
  99. package/lib/components/form/radio/index.vue.d.ts.map +1 -0
  100. package/lib/components/form/radio/radioStatus.vue.d.ts +32 -0
  101. package/lib/components/form/radio/radioStatus.vue.d.ts.map +1 -0
  102. package/lib/components/form/rangePicker/index.vue.d.ts +17 -0
  103. package/lib/components/form/rangePicker/index.vue.d.ts.map +1 -0
  104. package/lib/components/form/select/index.vue.d.ts +143 -0
  105. package/lib/components/form/select/index.vue.d.ts.map +1 -0
  106. package/lib/components/form/switch/index.vue.d.ts +44 -0
  107. package/lib/components/form/switch/index.vue.d.ts.map +1 -0
  108. package/lib/components/form/textarea/index.vue.d.ts +4 -0
  109. package/lib/components/form/textarea/index.vue.d.ts.map +1 -0
  110. package/lib/components/form/transfer/index.vue.d.ts +39 -0
  111. package/lib/components/form/transfer/index.vue.d.ts.map +1 -0
  112. package/lib/components/form/transfer/transferTable.vue.d.ts +39 -0
  113. package/lib/components/form/transfer/transferTable.vue.d.ts.map +1 -0
  114. package/lib/components/form/treeSelect/index.vue.d.ts +39 -0
  115. package/lib/components/form/treeSelect/index.vue.d.ts.map +1 -0
  116. package/lib/components/form/upload/uploadList.vue.d.ts +477 -0
  117. package/lib/components/form/upload/uploadList.vue.d.ts.map +1 -0
  118. package/lib/components/index.d.ts +9 -0
  119. package/lib/components/index.d.ts.map +1 -0
  120. package/lib/components/layout/breadcrumb/index.vue.d.ts +4 -0
  121. package/lib/components/layout/breadcrumb/index.vue.d.ts.map +1 -0
  122. package/lib/components/layout/content/index.vue.d.ts +23 -0
  123. package/lib/components/layout/content/index.vue.d.ts.map +1 -0
  124. package/lib/components/layout/datetime/index.vue.d.ts +4 -0
  125. package/lib/components/layout/datetime/index.vue.d.ts.map +1 -0
  126. package/lib/components/layout/header/headerExits.vue.d.ts +4 -0
  127. package/lib/components/layout/header/headerExits.vue.d.ts.map +1 -0
  128. package/lib/components/layout/header/index.vue.d.ts +4 -0
  129. package/lib/components/layout/header/index.vue.d.ts.map +1 -0
  130. package/lib/components/layout/index.d.ts +17 -0
  131. package/lib/components/layout/index.d.ts.map +1 -0
  132. package/lib/components/layout/menu/index.vue.d.ts +7 -0
  133. package/lib/components/layout/menu/index.vue.d.ts.map +1 -0
  134. package/lib/components/layout/menu/menuTabs.vue.d.ts +4 -0
  135. package/lib/components/layout/menu/menuTabs.vue.d.ts.map +1 -0
  136. package/lib/components/layout/page/basicLayout.vue.d.ts +7 -0
  137. package/lib/components/layout/page/basicLayout.vue.d.ts.map +1 -0
  138. package/lib/es/AceEditor/index.js +168 -0
  139. package/lib/es/BasicLayout/index.js +4 -0
  140. package/lib/es/Error403/index.js +4 -0
  141. package/lib/es/Error404/index.js +4 -0
  142. package/lib/es/ExcelForm/index.js +5 -0
  143. package/lib/es/UploadForm/index.js +5 -0
  144. package/lib/index.d.ts +2 -0
  145. package/lib/webui.css +1 -0
  146. package/lib/webui.es.js +3349 -0
  147. package/package.json +66 -0
  148. package/plugins/vite-plugin-auto-generate-vue.ts +105 -0
  149. package/postcss.config.ts +6 -0
  150. package/src/assets/global.css +9 -0
  151. package/src/components/common/button/index.vue +126 -0
  152. package/src/components/common/icon/appicon.vue +28 -0
  153. package/src/components/common/icon/fullscreen.vue +13 -0
  154. package/src/components/common/icon/helper.vue +30 -0
  155. package/src/components/common/icon/index.vue +426 -0
  156. package/src/components/common/icon/layoutIcon.vue +33 -0
  157. package/src/components/common/icon/projectIcon.vue +41 -0
  158. package/src/components/common/icon/toolIcon.vue +33 -0
  159. package/src/components/common/index.ts +19 -0
  160. package/src/components/common/tooltip/index.vue +25 -0
  161. package/src/components/content/dialog/excelForm.vue +479 -0
  162. package/src/components/content/dialog/index.vue +149 -0
  163. package/src/components/content/dialog/uploadForm.vue +228 -0
  164. package/src/components/content/drawer/index.vue +93 -0
  165. package/src/components/content/form/formItem.vue +76 -0
  166. package/src/components/content/form/index.vue +48 -0
  167. package/src/components/content/index.ts +32 -0
  168. package/src/components/content/search/index.vue +135 -0
  169. package/src/components/content/search/searchItem.vue +52 -0
  170. package/src/components/content/table/index.vue +215 -0
  171. package/src/components/content/table/tableOperate.vue +131 -0
  172. package/src/components/content/toolbar/icontool.vue +151 -0
  173. package/src/components/content/toolbar/index.vue +107 -0
  174. package/src/components/content/tree/index.vue +140 -0
  175. package/src/components/error/error403.vue +14 -0
  176. package/src/components/error/error404.vue +14 -0
  177. package/src/components/form/aceEditor/aceConfig.ts +90 -0
  178. package/src/components/form/aceEditor/index.vue +175 -0
  179. package/src/components/form/autoComplete/index.vue +171 -0
  180. package/src/components/form/cascader/index.vue +110 -0
  181. package/src/components/form/checkbox/index.vue +108 -0
  182. package/src/components/form/datePicker/index.vue +29 -0
  183. package/src/components/form/index.ts +54 -0
  184. package/src/components/form/input/index.vue +70 -0
  185. package/src/components/form/input/inputIcon.vue +39 -0
  186. package/src/components/form/input/inputNumber.vue +23 -0
  187. package/src/components/form/input/inputPassword.vue +22 -0
  188. package/src/components/form/propEditor/index.vue +81 -0
  189. package/src/components/form/radio/index.vue +132 -0
  190. package/src/components/form/radio/radioStatus.vue +42 -0
  191. package/src/components/form/rangePicker/index.vue +64 -0
  192. package/src/components/form/select/index.vue +186 -0
  193. package/src/components/form/switch/index.vue +58 -0
  194. package/src/components/form/textarea/index.vue +23 -0
  195. package/src/components/form/transfer/index.vue +95 -0
  196. package/src/components/form/transfer/transferTable.vue +124 -0
  197. package/src/components/form/treeSelect/index.vue +108 -0
  198. package/src/components/form/upload/uploadList.vue +235 -0
  199. package/src/components/index.ts +97 -0
  200. package/src/components/layout/breadcrumb/index.vue +38 -0
  201. package/src/components/layout/content/index.vue +28 -0
  202. package/src/components/layout/datetime/index.vue +16 -0
  203. package/src/components/layout/header/headerExits.vue +28 -0
  204. package/src/components/layout/header/index.vue +43 -0
  205. package/src/components/layout/index.ts +16 -0
  206. package/src/components/layout/menu/index.vue +64 -0
  207. package/src/components/layout/menu/menuTabs.vue +56 -0
  208. package/src/components/layout/page/basicLayout.vue +67 -0
  209. package/src/vite-env.d.ts +8 -0
  210. package/tailwind.config.ts +11 -0
  211. package/tsconfig.json +53 -0
  212. package/vite.config.ts +117 -0
  213. package//344/273/243/347/240/201/350/247/204/350/214/203/345/217/212/351/243/216/346/240/274/346/214/207/345/215/227.md +116 -0
@@ -0,0 +1,3349 @@
1
+ import { _ as Zn, a as er, b as tr, c as nr } from "./assets/modules/uploadForm-BahGnrAq.js";
2
+ import { _ as ie } from "./assets/modules/excelForm-Dzndz-SG.js";
3
+ import { _ as we } from "./assets/modules/index-ekkaExvB.js";
4
+ import { a as Va } from "./assets/modules/index-ekkaExvB.js";
5
+ import { _ as Ne } from "./assets/modules/basicLayout-YP_-EySb.js";
6
+ import { a as Ka, h as Ga, c as qa, d as Qa, e as Ja, I as Za, f as el, g as tl, b as nl } from "./assets/modules/basicLayout-YP_-EySb.js";
7
+ import { defineComponent as I, createBlock as C, openBlock as g, withModifiers as nt, unref as u, useAttrs as je, withCtx as b, createElementVNode as R, createVNode as k, mergeProps as V, renderSlot as H, normalizeStyle as Wt, toDisplayString as X, createCommentVNode as O, ref as D, watch as M, onMounted as de, onUnmounted as yn, createElementBlock as P, normalizeClass as le, createSlots as wn, Fragment as ne, renderList as xe, createTextVNode as G, computed as nn, withKeys as rn, provide as xn, inject as Kt, resolveDirective as Pe, withDirectives as Ae, useSlots as rr, resolveComponent as or, h as on, resolveDynamicComponent as ar, onActivated as lr } from "vue";
8
+ import { useSettingInfo as Cn, onFullscreenClick as ir, createFromIconfont as sr, OptionCommProps as ur, useInputFactory as ce, loadOption as En, unloadOption as Dn, circleLoading as dr, formValidate as Ee, OPTIONS as Sn, doQuery as Tn, queryTree as kn, ProviderKeys as ot, onFormClose as St, onFormSaveAs as cr, onFormSave as In, useFormItemFactory as On, getToolGroup as $n, onGridRowEdit as fr, onGridRowDelete as pr, getToolVisible as Ye, onToolClicked as Ce, getToolStatus as $e, useToolFactory as hr, getToolByKey as st, filterColumns as Pn, onColumnVisibleChanged as mr, AppRouter as gr, openNewForm as vr, gridQueryFind as an, gridQueryList as br, gridStatusUpdate as _r } from "@skyfox2000/webbase";
9
+ import { Popover as yr, Cascader as wr, DatePicker as xr, Input as Yt, InputPassword as Cr, InputNumber as Er, Button as An, RangePicker as Dr, Switch as Sr, Textarea as Tr, Transfer as kr, Table as Nn, TreeSelect as Ir, theme as Mn, Drawer as Or, Space as rt, Form as Fn, FormItem as Bn, ConfigProvider as ln, Popconfirm as $r, DropdownButton as Pr, Menu as Gt, MenuItem as qt, Dropdown as Rt, Checkbox as Ar, Tree as Nr, LayoutContent as Mr } from "ant-design-vue";
10
+ import { SERVER_HOST as Fr, fieldMapping as bt } from "@skyfox2000/fapi";
11
+ import { _ as ol } from "./assets/modules/index-FzWSvscZ.js";
12
+ import { _ as ll, a as il } from "./assets/modules/uploadForm-DEnOjhwc.js";
13
+ import { _ as ul } from "./assets/modules/excelForm-WJVQmaDT.js";
14
+ import Br from "vue-m-message";
15
+ import { _ as cl } from "./assets/modules/error403-Bi0E2twj.js";
16
+ import { _ as pl } from "./assets/modules/error404-BF7vasR_.js";
17
+ import sn from "dayjs";
18
+ const ya = /* @__PURE__ */ I({
19
+ __name: "fullscreen",
20
+ setup(r) {
21
+ const e = Cn();
22
+ return (t, n) => (g(), C(we, {
23
+ onClick: nt(u(ir), ["stop"]),
24
+ icon: u(e).fullscreen ? "icon-exitscreen" : "icon-fullscreen",
25
+ class: "w-[17px] h-[17px]"
26
+ }, null, 8, ["onClick", "icon"]));
27
+ }
28
+ }), Lr = { class: "ml-2" }, Yr = /* @__PURE__ */ I({
29
+ inheritAttrs: !1,
30
+ __name: "helper",
31
+ props: {
32
+ text: {},
33
+ maxWidth: {}
34
+ },
35
+ setup(r) {
36
+ const e = je();
37
+ return (t, n) => (g(), C(u(yr), { placement: "topRight" }, {
38
+ content: b(() => [
39
+ H(t.$slots, "default", {}, () => [
40
+ R("div", {
41
+ class: "text-[14px]",
42
+ style: Wt({ maxWidth: t.maxWidth })
43
+ }, X(t.text), 5)
44
+ ])
45
+ ]),
46
+ default: b(() => [
47
+ R("span", Lr, [
48
+ k(we, V({
49
+ icon: "icon-question-circle",
50
+ class: "text-[#888] w-4 h-4"
51
+ }, u(e)), null, 16)
52
+ ])
53
+ ]),
54
+ _: 3
55
+ }));
56
+ }
57
+ }), wa = /* @__PURE__ */ I({
58
+ __name: "layoutIcon",
59
+ props: {
60
+ icon: {
61
+ type: String
62
+ },
63
+ icons: {
64
+ type: Array
65
+ }
66
+ },
67
+ setup(r) {
68
+ const e = r, n = sr({
69
+ iconUrl: `${Fr.MICROLAYOUT_ICONS}`,
70
+ monoColor: !0,
71
+ icon: e.icon,
72
+ icons: e.icons
73
+ });
74
+ return (o, a) => r.icon || r.icons ? (g(), C(u(n), V({
75
+ key: 0,
76
+ icon: r.icon,
77
+ icons: r.icons
78
+ }, o.$attrs), null, 16, ["icon", "icons"])) : O("", !0);
79
+ }
80
+ }), xa = /* @__PURE__ */ Ne(Zn, [["__scopeId", "data-v-1e39ad49"]]), Rr = {
81
+ key: 0,
82
+ class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
83
+ }, zr = /* @__PURE__ */ I({
84
+ inheritAttrs: !1,
85
+ __name: "index",
86
+ props: ur,
87
+ emits: ["change", "update:labels", "update:value"],
88
+ setup(r, { emit: e }) {
89
+ var h, v, w;
90
+ const t = r, n = je(), o = D({
91
+ ...t.url,
92
+ url: ((h = t.url) == null ? void 0 : h.url) || "",
93
+ fieldMap: t.fieldMap || ((v = t.url) == null ? void 0 : v.fieldMap),
94
+ params: t.params || ((w = t.url) == null ? void 0 : w.params),
95
+ loadingText: !1
96
+ }), a = ce(), { editorCtrl: l, errInfo: s, labelText: c } = a, d = D(n.placeholder);
97
+ M(
98
+ () => o.value.loading,
99
+ ($) => {
100
+ $ ? d.value = "" : d.value || (d.value = "请选择" + c.value);
101
+ },
102
+ { immediate: !0 }
103
+ );
104
+ const f = e;
105
+ a.inputEmit = f;
106
+ const i = D([]), p = ($, x) => {
107
+ if (!x || x.length === 0) {
108
+ f("update:labels", []), f("update:value", []);
109
+ return;
110
+ }
111
+ const A = x.map((L) => L.label);
112
+ f("update:labels", A), f(
113
+ "update:value",
114
+ x.map((L) => L.value)
115
+ ), s != null && s.value.errClass && l && Ee(l);
116
+ };
117
+ return de(() => {
118
+ o.value && !o.value.fieldMap && (o.value.fieldMap = {
119
+ title: "Name",
120
+ label: "Name",
121
+ value: "Id",
122
+ key: "Id"
123
+ }), En(t.autoload, t, i, a, o.value, o.value.params);
124
+ }), yn(() => {
125
+ Dn(t, a);
126
+ }), ($, x) => {
127
+ var A;
128
+ return g(), P("div", null, [
129
+ i.value.length ? O("", !0) : (g(), P("div", Rr, [
130
+ k(u(dr), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
131
+ x[0] || (x[0] = R("span", null, "数据加载中...", -1))
132
+ ])),
133
+ k(u(wr), V({
134
+ options: i.value,
135
+ class: [(A = u(s)) == null ? void 0 : A.errClass],
136
+ "allow-clear": !0,
137
+ placeholder: i.value.length > 0 ? "请选择" + u(c) : "",
138
+ onChange: p
139
+ }, u(n)), null, 16, ["options", "class", "placeholder"])
140
+ ]);
141
+ };
142
+ }
143
+ }), Ca = /* @__PURE__ */ Ne(zr, [["__scopeId", "data-v-05e57a52"]]), Ea = /* @__PURE__ */ Ne(er, [["__scopeId", "data-v-dc59fe7f"]]);
144
+ function _t() {
145
+ return _t = Object.assign ? Object.assign.bind() : function(r) {
146
+ for (var e = 1; e < arguments.length; e++) {
147
+ var t = arguments[e];
148
+ for (var n in t) ({}).hasOwnProperty.call(t, n) && (r[n] = t[n]);
149
+ }
150
+ return r;
151
+ }, _t.apply(null, arguments);
152
+ }
153
+ const jr = {
154
+ locale: "zh_CN",
155
+ today: "今天",
156
+ now: "此刻",
157
+ backToToday: "返回今天",
158
+ ok: "确定",
159
+ timeSelect: "选择时间",
160
+ dateSelect: "选择日期",
161
+ weekSelect: "选择周",
162
+ clear: "清除",
163
+ month: "月",
164
+ year: "年",
165
+ previousMonth: "上个月 (翻页上键)",
166
+ nextMonth: "下个月 (翻页下键)",
167
+ monthSelect: "选择月份",
168
+ yearSelect: "选择年份",
169
+ decadeSelect: "选择年代",
170
+ yearFormat: "YYYY年",
171
+ dayFormat: "D日",
172
+ dateFormat: "YYYY年M月D日",
173
+ dateTimeFormat: "YYYY年M月D日 HH时mm分ss秒",
174
+ previousYear: "上一年 (Control键加左方向键)",
175
+ nextYear: "下一年 (Control键加右方向键)",
176
+ previousDecade: "上一年代",
177
+ nextDecade: "下一年代",
178
+ previousCentury: "上一世纪",
179
+ nextCentury: "下一世纪"
180
+ }, Ur = {
181
+ placeholder: "请选择时间",
182
+ rangePlaceholder: ["开始时间", "结束时间"]
183
+ }, Qt = {
184
+ lang: _t({
185
+ placeholder: "请选择日期",
186
+ yearPlaceholder: "请选择年份",
187
+ quarterPlaceholder: "请选择季度",
188
+ monthPlaceholder: "请选择月份",
189
+ weekPlaceholder: "请选择周",
190
+ rangePlaceholder: ["开始日期", "结束日期"],
191
+ rangeYearPlaceholder: ["开始年份", "结束年份"],
192
+ rangeMonthPlaceholder: ["开始月份", "结束月份"],
193
+ rangeQuarterPlaceholder: ["开始季度", "结束季度"],
194
+ rangeWeekPlaceholder: ["开始周", "结束周"]
195
+ }, jr),
196
+ timePickerLocale: _t({}, Ur)
197
+ };
198
+ Qt.lang.ok = "确定";
199
+ const Da = /* @__PURE__ */ I({
200
+ __name: "index",
201
+ props: {
202
+ valueFormat: {}
203
+ },
204
+ setup(r) {
205
+ const e = r, { editorCtrl: t, labelText: n, errInfo: o } = ce(), a = () => {
206
+ o != null && o.value.errClass && t && Ee(t);
207
+ }, l = D(e.valueFormat ?? "YYYY-MM-DD");
208
+ return (s, c) => {
209
+ var d;
210
+ return g(), C(u(xr), {
211
+ class: le([[((d = u(o)) == null ? void 0 : d.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-full"]),
212
+ placeholder: "请选择" + u(n),
213
+ locale: u(Qt),
214
+ valueFormat: l.value,
215
+ onBlur: a
216
+ }, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
217
+ };
218
+ }
219
+ }), Xr = /* @__PURE__ */ I({
220
+ __name: "index",
221
+ props: {
222
+ value: {}
223
+ },
224
+ emits: ["update:value"],
225
+ setup(r, { emit: e }) {
226
+ const { editorCtrl: t, labelText: n, errInfo: o } = ce(), a = () => {
227
+ o != null && o.value.errClass && t && Ee(t);
228
+ }, l = r, s = e, c = D(l.value);
229
+ M(
230
+ () => l.value,
231
+ (f) => {
232
+ c.value = f;
233
+ },
234
+ { immediate: !0 }
235
+ // 立即同步初始值
236
+ ), M(
237
+ () => c.value,
238
+ (f) => {
239
+ if (c.value === "") {
240
+ s("update:value", void 0);
241
+ return;
242
+ }
243
+ s("update:value", f);
244
+ }
245
+ );
246
+ const d = () => {
247
+ c.value === "" && (c.value = void 0);
248
+ };
249
+ return (f, i) => {
250
+ var p, h;
251
+ return g(), C(u(Yt), V({
252
+ class: [
253
+ (p = u(o)) == null ? void 0 : p.errClass,
254
+ ((h = u(o)) == null ? void 0 : h.errClass) === "error" && !f.$slots.addonBefore && !f.$slots.addonAfter ? "!border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""
255
+ ],
256
+ value: c.value,
257
+ "onUpdate:value": i[0] || (i[0] = (v) => c.value = v),
258
+ autocomplete: "new-password",
259
+ "allow-clear": !0,
260
+ placeholder: "请输入" + u(n),
261
+ onBlur: a,
262
+ onChange: d
263
+ }, f.$attrs), wn({ _: 2 }, [
264
+ f.$slots.addonBefore ? {
265
+ name: "addonBefore",
266
+ fn: b(() => [
267
+ H(f.$slots, "addonBefore")
268
+ ]),
269
+ key: "0"
270
+ } : void 0,
271
+ f.$slots.addonAfter ? {
272
+ name: "addonAfter",
273
+ fn: b(() => [
274
+ H(f.$slots, "addonAfter")
275
+ ]),
276
+ key: "1"
277
+ } : void 0
278
+ ]), 1040, ["class", "value", "placeholder"]);
279
+ };
280
+ }
281
+ }), Hr = /* @__PURE__ */ I({
282
+ __name: "inputIcon",
283
+ props: {
284
+ value: {}
285
+ },
286
+ emits: ["update:value"],
287
+ setup(r, { emit: e }) {
288
+ const t = r, n = e, o = D(void 0);
289
+ return M(
290
+ () => t.value,
291
+ (a) => {
292
+ o.value = a ?? void 0;
293
+ },
294
+ { immediate: !0 }
295
+ ), M(
296
+ () => o.value,
297
+ (a) => {
298
+ n("update:value", a);
299
+ }
300
+ ), (a, l) => (g(), C(Xr, V({
301
+ class: ["w-[80%]"],
302
+ value: o.value,
303
+ "onUpdate:value": l[0] || (l[0] = (s) => o.value = s)
304
+ }, a.$attrs), {
305
+ addonBefore: b(() => [
306
+ k(u(we), {
307
+ class: "!w-4 !h-4",
308
+ icon: o.value
309
+ }, null, 8, ["icon"])
310
+ ]),
311
+ _: 1
312
+ }, 16, ["value"]));
313
+ }
314
+ }), Sa = /* @__PURE__ */ Ne(Hr, [["__scopeId", "data-v-f7b3ed74"]]), Ta = /* @__PURE__ */ I({
315
+ __name: "inputPassword",
316
+ setup(r) {
317
+ const { editorCtrl: e, labelText: t, errInfo: n } = ce(), o = () => {
318
+ n != null && n.value.errClass && e && Ee(e);
319
+ };
320
+ return (a, l) => {
321
+ var s;
322
+ return g(), C(u(Cr), V({
323
+ class: ((s = u(n)) == null ? void 0 : s.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
324
+ "allow-clear": !0,
325
+ autocomplete: "new-password",
326
+ placeholder: "请输入" + u(t),
327
+ onBlur: o
328
+ }, a.$attrs), null, 16, ["class", "placeholder"]);
329
+ };
330
+ }
331
+ }), ka = /* @__PURE__ */ I({
332
+ __name: "inputNumber",
333
+ setup(r) {
334
+ const { editorCtrl: e, labelText: t, errInfo: n } = ce(), o = () => {
335
+ n != null && n.value.errClass && e && Ee(e);
336
+ };
337
+ return (a, l) => {
338
+ var s;
339
+ return g(), C(u(Er), V({
340
+ class: [[((s = u(n)) == null ? void 0 : s.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-[50%]"],
341
+ onBlur: o,
342
+ "allow-clear": !1,
343
+ placeholder: "请输入" + u(t)
344
+ }, a.$attrs), null, 16, ["class", "placeholder"]);
345
+ };
346
+ }
347
+ }), Vr = { class: "flex flex-col gap-2" }, Wr = { class: "w-[33%]" }, Kr = { class: "w-[64%]" }, Ia = /* @__PURE__ */ I({
348
+ __name: "index",
349
+ props: {
350
+ value: {},
351
+ labelHolder: {},
352
+ valueHolder: {}
353
+ },
354
+ emits: ["update:value"],
355
+ setup(r, { emit: e }) {
356
+ const t = r, n = e, o = D([]);
357
+ let a = !1;
358
+ const l = () => {
359
+ o.value = Object.entries(t.value).map(([f, i]) => ({
360
+ id: Date.now() + Math.random(),
361
+ field: f,
362
+ value: i
363
+ }));
364
+ };
365
+ M(() => t.value, () => {
366
+ a || l(), a = !1;
367
+ }, { immediate: !0 });
368
+ const s = () => {
369
+ const f = o.value.reduce((i, p) => (p.field && (i[p.field] = p.value), i), {});
370
+ a = !0, n("update:value", f);
371
+ }, c = () => {
372
+ o.value.push({
373
+ id: Date.now() + Math.random(),
374
+ field: "",
375
+ value: ""
376
+ });
377
+ }, d = () => {
378
+ s();
379
+ };
380
+ return (f, i) => (g(), P("div", Vr, [
381
+ (g(!0), P(ne, null, xe(o.value, (p) => (g(), P("div", {
382
+ key: p.id,
383
+ class: "flex items-center gap-2"
384
+ }, [
385
+ R("div", Wr, [
386
+ k(u(Yt), {
387
+ value: p.field,
388
+ "onUpdate:value": (h) => p.field = h,
389
+ title: p.field,
390
+ class: "w-full",
391
+ placeholder: f.labelHolder || "配置名",
392
+ onInput: d
393
+ }, null, 8, ["value", "onUpdate:value", "title", "placeholder"])
394
+ ]),
395
+ i[0] || (i[0] = R("div", { class: "w-[3%]" }, " = ", -1)),
396
+ R("div", Kr, [
397
+ k(u(Yt), {
398
+ value: p.value,
399
+ "onUpdate:value": (h) => p.value = h,
400
+ placeholder: f.valueHolder,
401
+ onInput: d,
402
+ title: p.value
403
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "title"])
404
+ ])
405
+ ]))), 128)),
406
+ k(u(An), {
407
+ onClick: c,
408
+ class: "mt-1 w-[80px] !text-[12px] text-[#666] bg-[#e6f7ff] border-[#b3e0ff] hover:bg-[#b3e0ff] hover:border-[#8abeff]",
409
+ size: "small"
410
+ }, {
411
+ default: b(() => i[1] || (i[1] = [
412
+ G(" 新增配置行 ")
413
+ ])),
414
+ _: 1,
415
+ __: [1]
416
+ })
417
+ ]));
418
+ }
419
+ }), Gr = /* @__PURE__ */ Ne(tr, [["__scopeId", "data-v-f9b2ac3d"]]), Oa = /* @__PURE__ */ I({
420
+ __name: "radioStatus",
421
+ props: {
422
+ /**
423
+ * 数据源OPTIONS的key
424
+ */
425
+ dataKey: {
426
+ type: String,
427
+ default: "EnableDisable"
428
+ },
429
+ /**
430
+ * 是否显示全部选项
431
+ */
432
+ all: {
433
+ type: Boolean,
434
+ required: !1
435
+ },
436
+ /**
437
+ * 自定义全部选项的值
438
+ * 如果all为true,则显示全部选项
439
+ * 未设置allValue,则默认[0, 1]
440
+ */
441
+ allValue: {
442
+ type: [String, Number, Array],
443
+ required: !1
444
+ }
445
+ },
446
+ setup(r) {
447
+ const e = r, t = D(JSON.parse(JSON.stringify(Sn.getOptions(e.dataKey))));
448
+ return e.all === !0 && t.value.unshift({
449
+ label: "全部",
450
+ value: e.allValue || [0, 1]
451
+ }), (n, o) => (g(), C(Gr, { data: t.value }, null, 8, ["data"]));
452
+ }
453
+ }), $a = /* @__PURE__ */ I({
454
+ __name: "index",
455
+ props: {
456
+ startDate: {},
457
+ endDate: {},
458
+ valueFormat: { default: "YYYY-MM-DD" }
459
+ },
460
+ emits: ["update:startDate", "update:endDate"],
461
+ setup(r, { emit: e }) {
462
+ const t = r, n = e, o = ce(), { errInfo: a } = o, l = nn(() => t.valueFormat), s = nn(() => {
463
+ const d = t.startDate, f = t.endDate;
464
+ if (!(!d || !f))
465
+ try {
466
+ const i = sn(d), p = sn(f);
467
+ return !i.isValid() || !p.isValid() ? void 0 : [i, p];
468
+ } catch {
469
+ return;
470
+ }
471
+ }), c = (d, f) => {
472
+ if (!d || !f || f.length !== 2) {
473
+ n("update:startDate", null), n("update:endDate", null);
474
+ return;
475
+ }
476
+ n("update:startDate", f[0] || null), n("update:endDate", f[1] || null);
477
+ };
478
+ return (d, f) => {
479
+ var i;
480
+ return g(), C(u(Dr), {
481
+ class: le([((i = u(a)) == null ? void 0 : i.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "", "w-full"]),
482
+ locale: u(Qt),
483
+ "value-format": l.value,
484
+ value: s.value,
485
+ onChange: c
486
+ }, null, 8, ["class", "locale", "value-format", "value"]);
487
+ };
488
+ }
489
+ }), Pa = /* @__PURE__ */ Ne(nr, [["__scopeId", "data-v-bf782acb"]]), qr = /* @__PURE__ */ I({
490
+ __name: "index",
491
+ props: {
492
+ /**
493
+ * 选择项数据
494
+ */
495
+ data: {
496
+ type: Array,
497
+ required: !0
498
+ }
499
+ },
500
+ emits: ["change"],
501
+ setup(r, { emit: e }) {
502
+ const t = r, n = D([]), o = e, { editorCtrl: a, errInfo: l } = ce(), s = (c) => {
503
+ l != null && l.value.errClass && a && Ee(a), o("change", c);
504
+ };
505
+ return de(() => {
506
+ if (!t.data || t.data.length != 2) {
507
+ console.error("Switch组件: ", t.data), Br.error("Switch组件必须有且只有两个选项");
508
+ return;
509
+ }
510
+ En(!1, t, n);
511
+ }), yn(() => {
512
+ Dn(t);
513
+ }), (c, d) => {
514
+ var f;
515
+ return n.value.length === 2 ? (g(), C(u(Sr), V({
516
+ key: 0,
517
+ class: [((f = u(l)) == null ? void 0 : f.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "", "bg-blue-300", "w-[58px]"],
518
+ checkedChildren: n.value[0].label,
519
+ checkedValue: n.value[0].value,
520
+ unCheckedChildren: n.value[1].label,
521
+ unCheckedValue: n.value[1].value,
522
+ onChange: s
523
+ }, c.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : O("", !0);
524
+ };
525
+ }
526
+ }), Aa = /* @__PURE__ */ I({
527
+ __name: "index",
528
+ setup(r) {
529
+ const { editorCtrl: e, labelText: t, errInfo: n } = ce(), o = () => {
530
+ n != null && n.value.errClass && e && Ee(e);
531
+ };
532
+ return (a, l) => {
533
+ var s;
534
+ return g(), C(u(Tr), V({
535
+ class: ((s = u(n)) == null ? void 0 : s.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
536
+ "allow-clear": !0,
537
+ placeholder: "请输入" + u(t),
538
+ onBlur: o,
539
+ onKeyup: l[0] || (l[0] = rn(nt(() => {
540
+ }, ["stop"]), ["enter", "native"])),
541
+ onKeydown: l[1] || (l[1] = rn(nt(() => {
542
+ }, ["stop"]), ["enter", "native"]))
543
+ }, a.$attrs), null, 16, ["class", "placeholder"]);
544
+ };
545
+ }
546
+ }), Qr = /* @__PURE__ */ I({
547
+ __name: "index",
548
+ props: {
549
+ autoload: { type: Boolean },
550
+ url: {},
551
+ params: {},
552
+ value: {}
553
+ },
554
+ emits: ["change", "update:value"],
555
+ setup(r, { emit: e }) {
556
+ const t = r, n = D({ ...t.url }), { editorCtrl: o, labelText: a, errInfo: l } = ce(), s = e, c = D([]), d = D([]);
557
+ t.value && t.value.every((i) => {
558
+ d.value.push(i.toString());
559
+ }), M(
560
+ () => t.value,
561
+ (i) => {
562
+ i && (d.value = i);
563
+ }
564
+ );
565
+ const f = (i) => {
566
+ s("update:value", i), s("change", i), d.value = i, l != null && l.value.errClass && o && Ee(o);
567
+ };
568
+ return de(async () => {
569
+ if (n.value) {
570
+ const i = o == null ? void 0 : o.page;
571
+ if (n.value.api || (n.value.api = i == null ? void 0 : i.api), n.value.authorize === void 0 && (n.value.authorize = i == null ? void 0 : i.authorize), t.autoload) {
572
+ const p = await Tn(o, {
573
+ urlKey: "list",
574
+ url: { ...n.value, url: n.value.url },
575
+ loadingText: !1,
576
+ params: t.params
577
+ });
578
+ c.value = (p == null ? void 0 : p.data) ?? [];
579
+ }
580
+ }
581
+ }), (i, p) => {
582
+ var h;
583
+ return g(), C(u(kr), V({
584
+ class: ((h = u(l)) == null ? void 0 : h.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
585
+ placeholder: "请输入" + u(a),
586
+ targetKeys: d.value,
587
+ onChange: f
588
+ }, i.$attrs), {
589
+ children: b(({ direction: v, disabled: w, filteredItems: $, onItemSelectAll: x, onItemSelect: A, selectedKeys: L }) => [
590
+ H(i.$slots, "children", {
591
+ direction: v,
592
+ disabled: w,
593
+ filteredItems: $,
594
+ onItemSelectAll: x,
595
+ onItemSelect: A,
596
+ selectedKeys: L
597
+ })
598
+ ]),
599
+ _: 3
600
+ }, 16, ["class", "placeholder", "targetKeys"]);
601
+ };
602
+ }
603
+ }), Na = /* @__PURE__ */ I({
604
+ __name: "transferTable",
605
+ props: {
606
+ /**
607
+ * 是否自动加载
608
+ */
609
+ autoload: {
610
+ type: Boolean,
611
+ default: !0
612
+ },
613
+ /**
614
+ * 表格控制器
615
+ */
616
+ gridCtrl: {
617
+ type: Object,
618
+ required: !0
619
+ },
620
+ /**
621
+ * 选择结果
622
+ */
623
+ value: {
624
+ type: Array,
625
+ default: () => []
626
+ }
627
+ },
628
+ emits: ["update:value"],
629
+ setup(r, { emit: e }) {
630
+ const t = r, n = e, o = D(t.autoload), a = D(t.value), l = D(t.gridCtrl.primaryKey);
631
+ M(
632
+ () => a.value,
633
+ (d) => {
634
+ n("update:value", d);
635
+ }
636
+ ), M(
637
+ () => t.value,
638
+ (d) => {
639
+ d && (a.value = d);
640
+ }
641
+ ), t.gridCtrl.autoload = !1, t.gridCtrl.remotePage = !1, t.gridCtrl.selectable = D(!0), t.gridCtrl.buttons = D([]), t.gridCtrl.tools = [];
642
+ const s = ({ disabled: d, selectedKeys: f, onItemSelectAll: i, onItemSelect: p }) => ({
643
+ getCheckboxProps: (h) => ({
644
+ // 控制是否禁止
645
+ disabled: d || h.disabled
646
+ }),
647
+ onSelectAll(h, v) {
648
+ const w = v.filter(($) => !$.disabled).map(({ [l.value]: $ }) => $);
649
+ i(w, h);
650
+ },
651
+ onSelect({ [l.value]: h }, v) {
652
+ p(h, v);
653
+ },
654
+ selectedRowKeys: f
655
+ }), c = D([]);
656
+ return de(async () => {
657
+ if (o.value) {
658
+ const d = await Tn(t.gridCtrl, {
659
+ urlKey: "list",
660
+ url: { ...t.gridCtrl.gridUrl, url: t.gridCtrl.gridUrl.url },
661
+ params: t.gridCtrl.gridQuery,
662
+ loadingText: !1
663
+ });
664
+ c.value = (d == null ? void 0 : d.data) ?? [];
665
+ }
666
+ }), (d, f) => (g(), C(Qr, V({
667
+ "data-source": c.value,
668
+ "row-key": (i) => i[l.value],
669
+ value: a.value,
670
+ "onUpdate:value": f[0] || (f[0] = (i) => a.value = i),
671
+ "list-style": {
672
+ width: "300px",
673
+ height: "500px"
674
+ },
675
+ "show-select-all": !1,
676
+ "show-search": !0,
677
+ "filter-option": (i, p) => {
678
+ for (const h of t.gridCtrl.columns.value)
679
+ if (p[h.dataIndex].toString().indexOf(i) !== -1)
680
+ return !0;
681
+ return !1;
682
+ }
683
+ }, d.$attrs), {
684
+ children: b(({ filteredItems: i, onItemSelectAll: p, onItemSelect: h, selectedKeys: v }) => [
685
+ k(u(Nn), {
686
+ columns: r.gridCtrl.columns.value,
687
+ "row-key": l.value,
688
+ "row-selection": s({
689
+ disabled: !1,
690
+ selectedKeys: v,
691
+ onItemSelectAll: p,
692
+ onItemSelect: h
693
+ }),
694
+ bordered: !1,
695
+ size: "small",
696
+ "data-source": i,
697
+ scroll: { x: 300 },
698
+ "custom-row": (w) => ({
699
+ onClick: () => {
700
+ const $ = w[l.value];
701
+ h($, !v.includes($));
702
+ }
703
+ })
704
+ }, null, 8, ["columns", "row-key", "row-selection", "data-source", "custom-row"])
705
+ ]),
706
+ _: 1
707
+ }, 16, ["data-source", "row-key", "value", "filter-option"]));
708
+ }
709
+ }), Jr = /* @__PURE__ */ I({
710
+ __name: "index",
711
+ props: {
712
+ multiple: {
713
+ type: Boolean,
714
+ default: !1
715
+ },
716
+ treeCtrl: {
717
+ type: Object,
718
+ required: !0
719
+ },
720
+ value: {
721
+ type: [String, Number, Array],
722
+ required: !0
723
+ }
724
+ },
725
+ emits: ["change", "update:value"],
726
+ setup(r, { emit: e }) {
727
+ const t = r, n = t.treeCtrl, o = ce(), { errInfo: a, labelText: l } = o, s = e;
728
+ o.inputEmit = s;
729
+ const c = D([]), d = D();
730
+ M(
731
+ () => t.value,
732
+ (i) => {
733
+ d.value = i ?? null;
734
+ },
735
+ { immediate: !0 }
736
+ ), M(
737
+ () => n.data.value,
738
+ (i) => {
739
+ i && (c.value = n.fieldMap ? bt(n.fieldMap, i) : i);
740
+ },
741
+ { immediate: !0 }
742
+ );
743
+ const f = (i) => {
744
+ t.multiple ? d.value = i ?? [] : d.value = i ?? "", s("change", d.value), s("update:value", d.value);
745
+ };
746
+ return de(() => {
747
+ n.fieldMap || (n.fieldMap = {
748
+ label: "Name",
749
+ key: "Id",
750
+ value: "Id"
751
+ }), n.data.value ? c.value = n.fieldMap ? bt(n.fieldMap, n.data.value) : n.data.value : t.treeCtrl.autoload && kn(t.treeCtrl);
752
+ }), (i, p) => {
753
+ var h;
754
+ return g(), C(u(Ir), V({
755
+ class: [[(h = u(a)) == null ? void 0 : h.errClass], "w-full"],
756
+ "tree-line": "",
757
+ multiple: r.multiple,
758
+ "tree-default-expanded-keys": ["-"],
759
+ value: d.value,
760
+ "onUpdate:value": p[0] || (p[0] = (v) => d.value = v),
761
+ "tree-data": c.value,
762
+ placeholder: "请选择" + u(l),
763
+ "allow-clear": !0,
764
+ onChange: f
765
+ }, i.$attrs), null, 16, ["class", "multiple", "value", "tree-data", "placeholder"]);
766
+ };
767
+ }
768
+ }), Ma = /* @__PURE__ */ Ne(Jr, [["__scopeId", "data-v-64be74cc"]]), Zr = { class: "hover:bg-gray-200 w-[24px] h-[24px] rounded-md" }, Fa = /* @__PURE__ */ I({
769
+ __name: "index",
770
+ props: {
771
+ saveText: {},
772
+ saveAsText: {},
773
+ cancelText: {},
774
+ editorCtrl: {}
775
+ },
776
+ setup(r) {
777
+ const { useToken: e } = Mn, { token: t } = e(), n = D(!1), a = r.editorCtrl;
778
+ xn(ot.EditorControl, a), M(
779
+ () => a.visible.value,
780
+ (s) => {
781
+ n.value = s ?? !1;
782
+ }
783
+ ), de(() => {
784
+ n.value = a.visible.value ?? !1;
785
+ });
786
+ const l = () => {
787
+ St(a);
788
+ };
789
+ return (s, c) => (g(), C(u(Or), {
790
+ open: n.value,
791
+ "onUpdate:open": c[4] || (c[4] = (d) => n.value = d),
792
+ "get-container": !1,
793
+ closable: !1,
794
+ "header-style": {
795
+ height: "40px",
796
+ padding: "10px 6px 10px 16px",
797
+ backgroundColor: u(t).colorBgLayout
798
+ },
799
+ "body-style": {
800
+ padding: "10px 16px"
801
+ },
802
+ "footer-style": {
803
+ textAlign: "right"
804
+ },
805
+ style: {
806
+ position: "absolute",
807
+ boxShadow: "rgba(0, 0, 0, 0.3) -2px 0px 8px"
808
+ },
809
+ width: "420px",
810
+ onClose: l
811
+ }, {
812
+ extra: b(() => [
813
+ R("div", Zr, [
814
+ k(u(we), {
815
+ class: "top-[-2px] left-[2px] w-6 h-6",
816
+ icon: "icon-new",
817
+ angle: 45,
818
+ fontsize: "24px",
819
+ clickable: "",
820
+ color: "#666",
821
+ position: [0, 0],
822
+ onClick: c[0] || (c[0] = () => u(St)(u(a)))
823
+ })
824
+ ])
825
+ ]),
826
+ default: b(() => [
827
+ H(s.$slots, "default")
828
+ ]),
829
+ footer: b(() => [
830
+ k(u(rt), null, {
831
+ default: b(() => [
832
+ s.cancelText !== "" ? (g(), C(u(ie), {
833
+ key: 0,
834
+ onClick: c[1] || (c[1] = () => u(St)(u(a)))
835
+ }, {
836
+ default: b(() => [
837
+ G(X(s.cancelText ?? "取消"), 1)
838
+ ]),
839
+ _: 1
840
+ })) : O("", !0),
841
+ s.saveAsText !== "" && u(a).saveAsBtnVisible !== !1 ? (g(), C(u(ie), {
842
+ key: 1,
843
+ onClick: c[2] || (c[2] = () => u(cr)(u(a))),
844
+ type: "primary",
845
+ loading: u(a).isFormSaving.value
846
+ }, {
847
+ default: b(() => [
848
+ G(X(s.saveAsText ?? "另存为"), 1)
849
+ ]),
850
+ _: 1
851
+ }, 8, ["loading"])) : O("", !0),
852
+ s.saveText !== "" && u(a).saveBtnVisible !== !1 ? (g(), C(u(ie), {
853
+ key: 2,
854
+ onClick: c[3] || (c[3] = () => u(In)(u(a))),
855
+ type: "primary",
856
+ loading: u(a).isFormSaving.value
857
+ }, {
858
+ default: b(() => [
859
+ G(X(s.saveText ?? "保存"), 1)
860
+ ]),
861
+ _: 1
862
+ }, 8, ["loading"])) : O("", !0)
863
+ ]),
864
+ _: 1
865
+ })
866
+ ]),
867
+ _: 3
868
+ }, 8, ["open", "header-style"]));
869
+ }
870
+ }), Ba = /* @__PURE__ */ I({
871
+ __name: "index",
872
+ props: {
873
+ labelWidth: {},
874
+ wrapperWidth: {},
875
+ editorCtrl: {}
876
+ },
877
+ setup(r) {
878
+ const e = r, t = e.editorCtrl ?? Kt(ot.EditorControl, void 0);
879
+ return (n, o) => {
880
+ const a = Pe("submit");
881
+ return Ae((g(), C(u(Fn), {
882
+ "label-col": { flex: e.labelWidth ?? "85px" },
883
+ "wrapper-col": {
884
+ flex: e.wrapperWidth ?? "1"
885
+ },
886
+ style: {
887
+ display: "flex",
888
+ flexWrap: "wrap"
889
+ }
890
+ }, {
891
+ default: b(() => [
892
+ H(n.$slots, "default")
893
+ ]),
894
+ _: 3
895
+ }, 8, ["label-col", "wrapper-col"])), [
896
+ [
897
+ a,
898
+ () => {
899
+ u(t) && u(In)(u(t));
900
+ }
901
+ ]
902
+ ]);
903
+ };
904
+ }
905
+ }), eo = { class: "w-full flex items-center" }, to = { class: "flex-grow" }, no = { class: "w-8 mt-[-2px]" }, ro = {
906
+ key: 1,
907
+ class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
908
+ }, La = /* @__PURE__ */ I({
909
+ inheritAttrs: !1,
910
+ __name: "formItem",
911
+ props: {
912
+ label: {},
913
+ rule: {},
914
+ helper: {},
915
+ width: {}
916
+ },
917
+ setup(r) {
918
+ const e = r, t = je(), n = Kt(ot.EditorControl, void 0), o = On(e, n), a = D(!1);
919
+ return setTimeout(() => {
920
+ a.value = !0;
921
+ }, 30), (l, s) => {
922
+ var c, d, f, i;
923
+ return g(), P("div", {
924
+ class: le(["w-full relative mb-1", l.width])
925
+ }, [
926
+ a.value ? (g(), C(u(Bn), V({
927
+ key: 0,
928
+ required: !!l.rule && ((i = (f = (d = (c = u(n)) == null ? void 0 : c.formRules) == null ? void 0 : d.value) == null ? void 0 : f[l.rule]) == null ? void 0 : i.required),
929
+ class: "!w-[95%] relative"
930
+ }, u(t), {
931
+ class: [l.rule ? "" : "mb-3"]
932
+ }), {
933
+ label: b(() => [
934
+ R("span", {
935
+ class: le([u(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
936
+ }, X(l.label), 3)
937
+ ]),
938
+ default: b(() => [
939
+ R("div", eo, [
940
+ R("div", to, [
941
+ H(l.$slots, "default")
942
+ ]),
943
+ R("div", no, [
944
+ H(l.$slots, "helper", {}, () => [
945
+ l.helper ? (g(), C(u(Yr), {
946
+ key: 0,
947
+ text: l.helper
948
+ }, null, 8, ["text"])) : O("", !0)
949
+ ])
950
+ ])
951
+ ])
952
+ ]),
953
+ _: 3
954
+ }, 16, ["required", "class"])) : O("", !0),
955
+ u(o).errClass ? (g(), P("span", ro, X(u(o).msg), 1)) : O("", !0)
956
+ ], 2);
957
+ };
958
+ }
959
+ }), oo = { class: "w-1/3 relative mb-1" }, ao = { class: "flex items-center" }, lo = { class: "flex-grow pl-1" }, io = {
960
+ key: 0,
961
+ class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
962
+ }, Tt = /* @__PURE__ */ I({
963
+ inheritAttrs: !1,
964
+ __name: "searchItem",
965
+ props: {
966
+ label: {},
967
+ width: {},
968
+ rule: {}
969
+ },
970
+ setup(r) {
971
+ const e = r, t = je(), n = Kt(ot.EditorControl, void 0), o = On(e, n);
972
+ return (a, l) => (g(), P("div", oo, [
973
+ k(u(Bn), V({
974
+ required: a.rule !== void 0,
975
+ class: "w-[90%] relative"
976
+ }, u(t), {
977
+ class: [a.rule ? "" : "mb-3", a.width],
978
+ labelCol: { span: 6 }
979
+ }), wn({
980
+ default: b(() => [
981
+ R("div", ao, [
982
+ R("div", lo, [
983
+ H(a.$slots, "default")
984
+ ])
985
+ ])
986
+ ]),
987
+ _: 2
988
+ }, [
989
+ a.label ? {
990
+ name: "label",
991
+ fn: b(() => [
992
+ R("span", {
993
+ class: le([u(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
994
+ }, X(a.label), 3)
995
+ ]),
996
+ key: "0"
997
+ } : void 0
998
+ ]), 1040, ["required", "class"]),
999
+ u(o).msg ? (g(), P("span", io, X(u(o).msg), 1)) : O("", !0)
1000
+ ]));
1001
+ }
1002
+ }), Ya = /* @__PURE__ */ I({
1003
+ __name: "index",
1004
+ props: {
1005
+ search: {},
1006
+ gridCtrl: {}
1007
+ },
1008
+ emits: ["update:search"],
1009
+ setup(r, { emit: e }) {
1010
+ const t = r, n = e, o = D(0), a = D(0), l = D(0), s = (h) => {
1011
+ let v = 0;
1012
+ for (let w = 0; w < h.length; w++)
1013
+ typeof h[w].type == "object" && v++;
1014
+ return v;
1015
+ }, c = rr(), d = () => {
1016
+ a.value = 0, l.value = 0, c.default && (a.value = s(c.default({}))), t.gridCtrl.searchBar && c.control && (l.value = s(c.control({}))), o.value = 2 - (a.value + l.value) % 3;
1017
+ };
1018
+ M(
1019
+ () => t.gridCtrl.searchBar,
1020
+ () => {
1021
+ d();
1022
+ }
1023
+ );
1024
+ const f = JSON.parse(JSON.stringify(t.search));
1025
+ de(() => {
1026
+ var v;
1027
+ d();
1028
+ let h = { ...t.search };
1029
+ t.gridCtrl.gridQuery = {
1030
+ ...t.gridCtrl.gridQuery,
1031
+ Query: {
1032
+ ...(v = t.gridCtrl.gridQuery) == null ? void 0 : v.Query,
1033
+ ...h
1034
+ }
1035
+ };
1036
+ });
1037
+ const i = () => {
1038
+ var v;
1039
+ let h = { ...t.search };
1040
+ t.gridCtrl.gridQuery = {
1041
+ ...t.gridCtrl.gridQuery,
1042
+ Query: {
1043
+ ...(v = t.gridCtrl.gridQuery) == null ? void 0 : v.Query,
1044
+ ...h
1045
+ }
1046
+ }, t.gridCtrl.reload.value = !0;
1047
+ }, p = () => {
1048
+ const h = JSON.parse(JSON.stringify(f));
1049
+ for (const v in t.search)
1050
+ h[v] === void 0 && (h[v] = void 0);
1051
+ n("update:search", h);
1052
+ };
1053
+ return (h, v) => {
1054
+ const w = Pe("submit");
1055
+ return a.value + l.value > 0 ? Ae((g(), C(u(Fn), {
1056
+ key: 0,
1057
+ "label-col": { flex: "60px" },
1058
+ style: {
1059
+ flexWrap: "wrap",
1060
+ borderBottom: "1px solid #e9e9e9"
1061
+ },
1062
+ class: "flex mb-[10px]"
1063
+ }, {
1064
+ default: b(() => [
1065
+ H(h.$slots, "default"),
1066
+ h.gridCtrl.searchBar ? H(h.$slots, "control", { key: 0 }) : O("", !0),
1067
+ o.value >= 1 ? (g(), C(Tt, {
1068
+ key: 1,
1069
+ class: "w-1/3"
1070
+ })) : O("", !0),
1071
+ o.value >= 2 ? (g(), C(Tt, {
1072
+ key: 2,
1073
+ class: "w-1/3"
1074
+ })) : O("", !0),
1075
+ a.value || h.gridCtrl.searchBar ? (g(), C(Tt, {
1076
+ key: 3,
1077
+ class: "w-1/3 flex justify-end text-right pr-5",
1078
+ "wrapper-col": { flex: "auto" }
1079
+ }, {
1080
+ default: b(() => [
1081
+ k(u(rt), null, {
1082
+ default: b(() => [
1083
+ k(u(ie), {
1084
+ type: "primary",
1085
+ onClick: i,
1086
+ icon: "icon-search"
1087
+ }, {
1088
+ default: b(() => v[0] || (v[0] = [
1089
+ G("搜索")
1090
+ ])),
1091
+ _: 1,
1092
+ __: [0]
1093
+ }),
1094
+ k(u(ie), {
1095
+ onClick: p,
1096
+ icon: "icon-reset"
1097
+ }, {
1098
+ default: b(() => v[1] || (v[1] = [
1099
+ G("重置")
1100
+ ])),
1101
+ _: 1,
1102
+ __: [1]
1103
+ })
1104
+ ]),
1105
+ _: 1
1106
+ })
1107
+ ]),
1108
+ _: 1
1109
+ })) : O("", !0)
1110
+ ]),
1111
+ _: 3
1112
+ })), [
1113
+ [w, i]
1114
+ ]) : O("", !0);
1115
+ };
1116
+ }
1117
+ }), so = /* @__PURE__ */ I({
1118
+ __name: "tableOperate",
1119
+ props: {
1120
+ record: {},
1121
+ gridCtrl: {}
1122
+ },
1123
+ setup(r) {
1124
+ const e = r, t = e.gridCtrl, n = [
1125
+ {
1126
+ key: "Edit",
1127
+ label: "编辑",
1128
+ type: "primary",
1129
+ visible: !0,
1130
+ permit: ":edit",
1131
+ click: () => fr(t, e.record)
1132
+ },
1133
+ {
1134
+ key: "Delete",
1135
+ label: "删除",
1136
+ type: "primary",
1137
+ visible: !0,
1138
+ danger: !0,
1139
+ permit: ":delete",
1140
+ confirm: !0,
1141
+ confirmText: "是否删除此记录?",
1142
+ click: () => pr(t, e.record)
1143
+ }
1144
+ ], { buttons: o, menus: a } = $n(n, 0, t.operates), l = (s) => {
1145
+ if (typeof s.disabled == "boolean")
1146
+ return s.disabled;
1147
+ if (typeof s.disabled == "function")
1148
+ return $e(s, e.record) ?? !1;
1149
+ if (e.record.hasOwnProperty("Enabled"))
1150
+ switch (s.key) {
1151
+ case "Edit":
1152
+ return !e.record.Enabled;
1153
+ case "Delete":
1154
+ return !!e.record.Enabled;
1155
+ }
1156
+ return !1;
1157
+ };
1158
+ return (s, c) => {
1159
+ const d = Pe("role"), f = Pe("permit");
1160
+ return g(), C(u(ln), { theme: {
1161
+ token: {
1162
+ fontSize: 13
1163
+ }
1164
+ } }, {
1165
+ default: b(() => [
1166
+ k(u(rt), null, {
1167
+ default: b(() => [
1168
+ (g(!0), P(ne, null, xe(u(o), (i) => (g(), P(ne, {
1169
+ key: i.key
1170
+ }, [
1171
+ u(Ye)(i, e.record) ? (g(), C(u($r), {
1172
+ key: 0,
1173
+ disabled: l(i) || !i.confirm,
1174
+ cancelText: "否",
1175
+ okText: "是",
1176
+ title: i.confirmText,
1177
+ okButtonProps: { size: "small" },
1178
+ cancelButtonProps: { size: "small" },
1179
+ onConfirm: (p) => u(Ce)(i, u(t).page, u(t), e.record, !0)
1180
+ }, {
1181
+ default: b(() => [
1182
+ u(Ye)(i, e.record) ? Ae((g(), C(u(An), {
1183
+ key: i.key,
1184
+ type: i.type ?? "text",
1185
+ danger: i.danger,
1186
+ disabled: l(i),
1187
+ onClick: (p) => u(Ce)(i, u(t).page, u(t), e.record),
1188
+ size: "small",
1189
+ style: Wt({
1190
+ padding: i.type ?? "0px 4px"
1191
+ })
1192
+ }, {
1193
+ default: b(() => [
1194
+ G(X(i.label), 1)
1195
+ ]),
1196
+ _: 2
1197
+ }, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
1198
+ [d, i.role],
1199
+ [f, i.permit]
1200
+ ]) : O("", !0)
1201
+ ]),
1202
+ _: 2
1203
+ }, 1032, ["disabled", "title", "onConfirm"])) : O("", !0)
1204
+ ], 64))), 128)),
1205
+ s.record.Enabled == 1 ? (g(), C(u(ln), {
1206
+ key: 0,
1207
+ autoInsertSpaceInButton: !1
1208
+ }, {
1209
+ default: b(() => [
1210
+ u(a).length > 0 ? (g(), C(u(Pr), {
1211
+ key: 0,
1212
+ size: "small"
1213
+ }, {
1214
+ overlay: b(() => [
1215
+ k(u(Gt), null, {
1216
+ default: b(() => [
1217
+ (g(!0), P(ne, null, xe(u(a), (i) => (g(), P(ne, {
1218
+ key: i.key
1219
+ }, [
1220
+ u(Ye)(i, e.record) ? Ae((g(), C(u(qt), {
1221
+ key: 0,
1222
+ disabled: l(i),
1223
+ onClick: (p) => u(Ce)(i, u(t).page, u(t), e.record)
1224
+ }, {
1225
+ default: b(() => [
1226
+ G(X(i.label), 1)
1227
+ ]),
1228
+ _: 2
1229
+ }, 1032, ["disabled", "onClick"])), [
1230
+ [d, i.role],
1231
+ [f, i.permit]
1232
+ ]) : O("", !0)
1233
+ ], 64))), 128))
1234
+ ]),
1235
+ _: 1
1236
+ })
1237
+ ]),
1238
+ default: b(() => [
1239
+ c[0] || (c[0] = G(" 更多 "))
1240
+ ]),
1241
+ _: 1,
1242
+ __: [0]
1243
+ })) : O("", !0)
1244
+ ]),
1245
+ _: 1
1246
+ })) : O("", !0)
1247
+ ]),
1248
+ _: 1
1249
+ })
1250
+ ]),
1251
+ _: 1
1252
+ });
1253
+ };
1254
+ }
1255
+ });
1256
+ /*!
1257
+ * vue-draggable-next v2.2.0
1258
+ * (c) 2023 Anish George
1259
+ * @license MIT
1260
+ */
1261
+ /**!
1262
+ * Sortable 1.14.0
1263
+ * @author RubaXa <trash@rubaxa.org>
1264
+ * @author owenm <owen23355@gmail.com>
1265
+ * @license MIT
1266
+ */
1267
+ function un(r, e) {
1268
+ var t = Object.keys(r);
1269
+ if (Object.getOwnPropertySymbols) {
1270
+ var n = Object.getOwnPropertySymbols(r);
1271
+ e && (n = n.filter(function(o) {
1272
+ return Object.getOwnPropertyDescriptor(r, o).enumerable;
1273
+ })), t.push.apply(t, n);
1274
+ }
1275
+ return t;
1276
+ }
1277
+ function ue(r) {
1278
+ for (var e = 1; e < arguments.length; e++) {
1279
+ var t = arguments[e] != null ? arguments[e] : {};
1280
+ e % 2 ? un(Object(t), !0).forEach(function(n) {
1281
+ uo(r, n, t[n]);
1282
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : un(Object(t)).forEach(function(n) {
1283
+ Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
1284
+ });
1285
+ }
1286
+ return r;
1287
+ }
1288
+ function pt(r) {
1289
+ "@babel/helpers - typeof";
1290
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? pt = function(e) {
1291
+ return typeof e;
1292
+ } : pt = function(e) {
1293
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1294
+ }, pt(r);
1295
+ }
1296
+ function uo(r, e, t) {
1297
+ return e in r ? Object.defineProperty(r, e, {
1298
+ value: t,
1299
+ enumerable: !0,
1300
+ configurable: !0,
1301
+ writable: !0
1302
+ }) : r[e] = t, r;
1303
+ }
1304
+ function he() {
1305
+ return he = Object.assign || function(r) {
1306
+ for (var e = 1; e < arguments.length; e++) {
1307
+ var t = arguments[e];
1308
+ for (var n in t)
1309
+ Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]);
1310
+ }
1311
+ return r;
1312
+ }, he.apply(this, arguments);
1313
+ }
1314
+ function co(r, e) {
1315
+ if (r == null) return {};
1316
+ var t = {}, n = Object.keys(r), o, a;
1317
+ for (a = 0; a < n.length; a++)
1318
+ o = n[a], !(e.indexOf(o) >= 0) && (t[o] = r[o]);
1319
+ return t;
1320
+ }
1321
+ function fo(r, e) {
1322
+ if (r == null) return {};
1323
+ var t = co(r, e), n, o;
1324
+ if (Object.getOwnPropertySymbols) {
1325
+ var a = Object.getOwnPropertySymbols(r);
1326
+ for (o = 0; o < a.length; o++)
1327
+ n = a[o], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(r, n) && (t[n] = r[n]);
1328
+ }
1329
+ return t;
1330
+ }
1331
+ var po = "1.14.0";
1332
+ function pe(r) {
1333
+ if (typeof window < "u" && window.navigator)
1334
+ return !!/* @__PURE__ */ navigator.userAgent.match(r);
1335
+ }
1336
+ var me = pe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), at = pe(/Edge/i), dn = pe(/firefox/i), Qe = pe(/safari/i) && !pe(/chrome/i) && !pe(/android/i), Ln = pe(/iP(ad|od|hone)/i), ho = pe(/chrome/i) && pe(/android/i), Yn = {
1337
+ capture: !1,
1338
+ passive: !1
1339
+ };
1340
+ function T(r, e, t) {
1341
+ r.addEventListener(e, t, !me && Yn);
1342
+ }
1343
+ function S(r, e, t) {
1344
+ r.removeEventListener(e, t, !me && Yn);
1345
+ }
1346
+ function yt(r, e) {
1347
+ if (e) {
1348
+ if (e[0] === ">" && (e = e.substring(1)), r)
1349
+ try {
1350
+ if (r.matches)
1351
+ return r.matches(e);
1352
+ if (r.msMatchesSelector)
1353
+ return r.msMatchesSelector(e);
1354
+ if (r.webkitMatchesSelector)
1355
+ return r.webkitMatchesSelector(e);
1356
+ } catch {
1357
+ return !1;
1358
+ }
1359
+ return !1;
1360
+ }
1361
+ }
1362
+ function mo(r) {
1363
+ return r.host && r !== document && r.host.nodeType ? r.host : r.parentNode;
1364
+ }
1365
+ function ae(r, e, t, n) {
1366
+ if (r) {
1367
+ t = t || document;
1368
+ do {
1369
+ if (e != null && (e[0] === ">" ? r.parentNode === t && yt(r, e) : yt(r, e)) || n && r === t)
1370
+ return r;
1371
+ if (r === t) break;
1372
+ } while (r = mo(r));
1373
+ }
1374
+ return null;
1375
+ }
1376
+ var cn = /\s+/g;
1377
+ function J(r, e, t) {
1378
+ if (r && e)
1379
+ if (r.classList)
1380
+ r.classList[t ? "add" : "remove"](e);
1381
+ else {
1382
+ var n = (" " + r.className + " ").replace(cn, " ").replace(" " + e + " ", " ");
1383
+ r.className = (n + (t ? " " + e : "")).replace(cn, " ");
1384
+ }
1385
+ }
1386
+ function _(r, e, t) {
1387
+ var n = r && r.style;
1388
+ if (n) {
1389
+ if (t === void 0)
1390
+ return document.defaultView && document.defaultView.getComputedStyle ? t = document.defaultView.getComputedStyle(r, "") : r.currentStyle && (t = r.currentStyle), e === void 0 ? t : t[e];
1391
+ !(e in n) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), n[e] = t + (typeof t == "string" ? "" : "px");
1392
+ }
1393
+ }
1394
+ function Re(r, e) {
1395
+ var t = "";
1396
+ if (typeof r == "string")
1397
+ t = r;
1398
+ else
1399
+ do {
1400
+ var n = _(r, "transform");
1401
+ n && n !== "none" && (t = n + " " + t);
1402
+ } while (!e && (r = r.parentNode));
1403
+ var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
1404
+ return o && new o(t);
1405
+ }
1406
+ function Rn(r, e, t) {
1407
+ if (r) {
1408
+ var n = r.getElementsByTagName(e), o = 0, a = n.length;
1409
+ if (t)
1410
+ for (; o < a; o++)
1411
+ t(n[o], o);
1412
+ return n;
1413
+ }
1414
+ return [];
1415
+ }
1416
+ function se() {
1417
+ var r = document.scrollingElement;
1418
+ return r || document.documentElement;
1419
+ }
1420
+ function z(r, e, t, n, o) {
1421
+ if (!(!r.getBoundingClientRect && r !== window)) {
1422
+ var a, l, s, c, d, f, i;
1423
+ if (r !== window && r.parentNode && r !== se() ? (a = r.getBoundingClientRect(), l = a.top, s = a.left, c = a.bottom, d = a.right, f = a.height, i = a.width) : (l = 0, s = 0, c = window.innerHeight, d = window.innerWidth, f = window.innerHeight, i = window.innerWidth), (e || t) && r !== window && (o = o || r.parentNode, !me))
1424
+ do
1425
+ if (o && o.getBoundingClientRect && (_(o, "transform") !== "none" || t && _(o, "position") !== "static")) {
1426
+ var p = o.getBoundingClientRect();
1427
+ l -= p.top + parseInt(_(o, "border-top-width")), s -= p.left + parseInt(_(o, "border-left-width")), c = l + a.height, d = s + a.width;
1428
+ break;
1429
+ }
1430
+ while (o = o.parentNode);
1431
+ if (n && r !== window) {
1432
+ var h = Re(o || r), v = h && h.a, w = h && h.d;
1433
+ h && (l /= w, s /= v, i /= v, f /= w, c = l + f, d = s + i);
1434
+ }
1435
+ return {
1436
+ top: l,
1437
+ left: s,
1438
+ bottom: c,
1439
+ right: d,
1440
+ width: i,
1441
+ height: f
1442
+ };
1443
+ }
1444
+ }
1445
+ function fn(r, e, t) {
1446
+ for (var n = ye(r, !0), o = z(r)[e]; n; ) {
1447
+ var a = z(n)[t], l = void 0;
1448
+ if (l = o >= a, !l) return n;
1449
+ if (n === se()) break;
1450
+ n = ye(n, !1);
1451
+ }
1452
+ return !1;
1453
+ }
1454
+ function ze(r, e, t, n) {
1455
+ for (var o = 0, a = 0, l = r.children; a < l.length; ) {
1456
+ if (l[a].style.display !== "none" && l[a] !== y.ghost && (n || l[a] !== y.dragged) && ae(l[a], t.draggable, r, !1)) {
1457
+ if (o === e)
1458
+ return l[a];
1459
+ o++;
1460
+ }
1461
+ a++;
1462
+ }
1463
+ return null;
1464
+ }
1465
+ function Jt(r, e) {
1466
+ for (var t = r.lastElementChild; t && (t === y.ghost || _(t, "display") === "none" || e && !yt(t, e)); )
1467
+ t = t.previousElementSibling;
1468
+ return t || null;
1469
+ }
1470
+ function te(r, e) {
1471
+ var t = 0;
1472
+ if (!r || !r.parentNode)
1473
+ return -1;
1474
+ for (; r = r.previousElementSibling; )
1475
+ r.nodeName.toUpperCase() !== "TEMPLATE" && r !== y.clone && (!e || yt(r, e)) && t++;
1476
+ return t;
1477
+ }
1478
+ function pn(r) {
1479
+ var e = 0, t = 0, n = se();
1480
+ if (r)
1481
+ do {
1482
+ var o = Re(r), a = o.a, l = o.d;
1483
+ e += r.scrollLeft * a, t += r.scrollTop * l;
1484
+ } while (r !== n && (r = r.parentNode));
1485
+ return [e, t];
1486
+ }
1487
+ function go(r, e) {
1488
+ for (var t in r)
1489
+ if (r.hasOwnProperty(t)) {
1490
+ for (var n in e)
1491
+ if (e.hasOwnProperty(n) && e[n] === r[t][n]) return Number(t);
1492
+ }
1493
+ return -1;
1494
+ }
1495
+ function ye(r, e) {
1496
+ if (!r || !r.getBoundingClientRect) return se();
1497
+ var t = r, n = !1;
1498
+ do
1499
+ if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
1500
+ var o = _(t);
1501
+ if (t.clientWidth < t.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
1502
+ if (!t.getBoundingClientRect || t === document.body) return se();
1503
+ if (n || e) return t;
1504
+ n = !0;
1505
+ }
1506
+ }
1507
+ while (t = t.parentNode);
1508
+ return se();
1509
+ }
1510
+ function vo(r, e) {
1511
+ if (r && e)
1512
+ for (var t in e)
1513
+ e.hasOwnProperty(t) && (r[t] = e[t]);
1514
+ return r;
1515
+ }
1516
+ function kt(r, e) {
1517
+ return Math.round(r.top) === Math.round(e.top) && Math.round(r.left) === Math.round(e.left) && Math.round(r.height) === Math.round(e.height) && Math.round(r.width) === Math.round(e.width);
1518
+ }
1519
+ var Je;
1520
+ function zn(r, e) {
1521
+ return function() {
1522
+ if (!Je) {
1523
+ var t = arguments, n = this;
1524
+ t.length === 1 ? r.call(n, t[0]) : r.apply(n, t), Je = setTimeout(function() {
1525
+ Je = void 0;
1526
+ }, e);
1527
+ }
1528
+ };
1529
+ }
1530
+ function bo() {
1531
+ clearTimeout(Je), Je = void 0;
1532
+ }
1533
+ function jn(r, e, t) {
1534
+ r.scrollLeft += e, r.scrollTop += t;
1535
+ }
1536
+ function Un(r) {
1537
+ var e = window.Polymer, t = window.jQuery || window.Zepto;
1538
+ return e && e.dom ? e.dom(r).cloneNode(!0) : t ? t(r).clone(!0)[0] : r.cloneNode(!0);
1539
+ }
1540
+ var ee = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
1541
+ function _o() {
1542
+ var r = [], e;
1543
+ return {
1544
+ captureAnimationState: function() {
1545
+ if (r = [], !!this.options.animation) {
1546
+ var n = [].slice.call(this.el.children);
1547
+ n.forEach(function(o) {
1548
+ if (!(_(o, "display") === "none" || o === y.ghost)) {
1549
+ r.push({
1550
+ target: o,
1551
+ rect: z(o)
1552
+ });
1553
+ var a = ue({}, r[r.length - 1].rect);
1554
+ if (o.thisAnimationDuration) {
1555
+ var l = Re(o, !0);
1556
+ l && (a.top -= l.f, a.left -= l.e);
1557
+ }
1558
+ o.fromRect = a;
1559
+ }
1560
+ });
1561
+ }
1562
+ },
1563
+ addAnimationState: function(n) {
1564
+ r.push(n);
1565
+ },
1566
+ removeAnimationState: function(n) {
1567
+ r.splice(go(r, {
1568
+ target: n
1569
+ }), 1);
1570
+ },
1571
+ animateAll: function(n) {
1572
+ var o = this;
1573
+ if (!this.options.animation) {
1574
+ clearTimeout(e), typeof n == "function" && n();
1575
+ return;
1576
+ }
1577
+ var a = !1, l = 0;
1578
+ r.forEach(function(s) {
1579
+ var c = 0, d = s.target, f = d.fromRect, i = z(d), p = d.prevFromRect, h = d.prevToRect, v = s.rect, w = Re(d, !0);
1580
+ w && (i.top -= w.f, i.left -= w.e), d.toRect = i, d.thisAnimationDuration && kt(p, i) && !kt(f, i) && // Make sure animatingRect is on line between toRect & fromRect
1581
+ (v.top - i.top) / (v.left - i.left) === (f.top - i.top) / (f.left - i.left) && (c = wo(v, p, h, o.options)), kt(i, f) || (d.prevFromRect = f, d.prevToRect = i, c || (c = o.options.animation), o.animate(d, v, i, c)), c && (a = !0, l = Math.max(l, c), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
1582
+ d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
1583
+ }, c), d.thisAnimationDuration = c);
1584
+ }), clearTimeout(e), a ? e = setTimeout(function() {
1585
+ typeof n == "function" && n();
1586
+ }, l) : typeof n == "function" && n(), r = [];
1587
+ },
1588
+ animate: function(n, o, a, l) {
1589
+ if (l) {
1590
+ _(n, "transition", ""), _(n, "transform", "");
1591
+ var s = Re(this.el), c = s && s.a, d = s && s.d, f = (o.left - a.left) / (c || 1), i = (o.top - a.top) / (d || 1);
1592
+ n.animatingX = !!f, n.animatingY = !!i, _(n, "transform", "translate3d(" + f + "px," + i + "px,0)"), this.forRepaintDummy = yo(n), _(n, "transition", "transform " + l + "ms" + (this.options.easing ? " " + this.options.easing : "")), _(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
1593
+ _(n, "transition", ""), _(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
1594
+ }, l);
1595
+ }
1596
+ }
1597
+ };
1598
+ }
1599
+ function yo(r) {
1600
+ return r.offsetWidth;
1601
+ }
1602
+ function wo(r, e, t, n) {
1603
+ return Math.sqrt(Math.pow(e.top - r.top, 2) + Math.pow(e.left - r.left, 2)) / Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) * n.animation;
1604
+ }
1605
+ var Me = [], It = {
1606
+ initializeByDefault: !0
1607
+ }, lt = {
1608
+ mount: function(e) {
1609
+ for (var t in It)
1610
+ It.hasOwnProperty(t) && !(t in e) && (e[t] = It[t]);
1611
+ Me.forEach(function(n) {
1612
+ if (n.pluginName === e.pluginName)
1613
+ throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
1614
+ }), Me.push(e);
1615
+ },
1616
+ pluginEvent: function(e, t, n) {
1617
+ var o = this;
1618
+ this.eventCanceled = !1, n.cancel = function() {
1619
+ o.eventCanceled = !0;
1620
+ };
1621
+ var a = e + "Global";
1622
+ Me.forEach(function(l) {
1623
+ t[l.pluginName] && (t[l.pluginName][a] && t[l.pluginName][a](ue({
1624
+ sortable: t
1625
+ }, n)), t.options[l.pluginName] && t[l.pluginName][e] && t[l.pluginName][e](ue({
1626
+ sortable: t
1627
+ }, n)));
1628
+ });
1629
+ },
1630
+ initializePlugins: function(e, t, n, o) {
1631
+ Me.forEach(function(s) {
1632
+ var c = s.pluginName;
1633
+ if (!(!e.options[c] && !s.initializeByDefault)) {
1634
+ var d = new s(e, t, e.options);
1635
+ d.sortable = e, d.options = e.options, e[c] = d, he(n, d.defaults);
1636
+ }
1637
+ });
1638
+ for (var a in e.options)
1639
+ if (e.options.hasOwnProperty(a)) {
1640
+ var l = this.modifyOption(e, a, e.options[a]);
1641
+ typeof l < "u" && (e.options[a] = l);
1642
+ }
1643
+ },
1644
+ getEventProperties: function(e, t) {
1645
+ var n = {};
1646
+ return Me.forEach(function(o) {
1647
+ typeof o.eventProperties == "function" && he(n, o.eventProperties.call(t[o.pluginName], e));
1648
+ }), n;
1649
+ },
1650
+ modifyOption: function(e, t, n) {
1651
+ var o;
1652
+ return Me.forEach(function(a) {
1653
+ e[a.pluginName] && a.optionListeners && typeof a.optionListeners[t] == "function" && (o = a.optionListeners[t].call(e[a.pluginName], n));
1654
+ }), o;
1655
+ }
1656
+ };
1657
+ function xo(r) {
1658
+ var e = r.sortable, t = r.rootEl, n = r.name, o = r.targetEl, a = r.cloneEl, l = r.toEl, s = r.fromEl, c = r.oldIndex, d = r.newIndex, f = r.oldDraggableIndex, i = r.newDraggableIndex, p = r.originalEvent, h = r.putSortable, v = r.extraEventProperties;
1659
+ if (e = e || t && t[ee], !!e) {
1660
+ var w, $ = e.options, x = "on" + n.charAt(0).toUpperCase() + n.substr(1);
1661
+ window.CustomEvent && !me && !at ? w = new CustomEvent(n, {
1662
+ bubbles: !0,
1663
+ cancelable: !0
1664
+ }) : (w = document.createEvent("Event"), w.initEvent(n, !0, !0)), w.to = l || t, w.from = s || t, w.item = o || t, w.clone = a, w.oldIndex = c, w.newIndex = d, w.oldDraggableIndex = f, w.newDraggableIndex = i, w.originalEvent = p, w.pullMode = h ? h.lastPutMode : void 0;
1665
+ var A = ue(ue({}, v), lt.getEventProperties(n, e));
1666
+ for (var L in A)
1667
+ w[L] = A[L];
1668
+ t && t.dispatchEvent(w), $[x] && $[x].call(e, w);
1669
+ }
1670
+ }
1671
+ var Co = ["evt"], K = function(e, t) {
1672
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = n.evt, a = fo(n, Co);
1673
+ lt.pluginEvent.bind(y)(e, t, ue({
1674
+ dragEl: m,
1675
+ parentEl: F,
1676
+ ghostEl: E,
1677
+ rootEl: N,
1678
+ nextEl: Oe,
1679
+ lastDownEl: ht,
1680
+ cloneEl: B,
1681
+ cloneHidden: _e,
1682
+ dragStarted: Ke,
1683
+ putSortable: j,
1684
+ activeSortable: y.active,
1685
+ originalEvent: o,
1686
+ oldIndex: Le,
1687
+ oldDraggableIndex: Ze,
1688
+ newIndex: Z,
1689
+ newDraggableIndex: be,
1690
+ hideGhostForTarget: Wn,
1691
+ unhideGhostForTarget: Kn,
1692
+ cloneNowHidden: function() {
1693
+ _e = !0;
1694
+ },
1695
+ cloneNowShown: function() {
1696
+ _e = !1;
1697
+ },
1698
+ dispatchSortableEvent: function(s) {
1699
+ W({
1700
+ sortable: t,
1701
+ name: s,
1702
+ originalEvent: o
1703
+ });
1704
+ }
1705
+ }, a));
1706
+ };
1707
+ function W(r) {
1708
+ xo(ue({
1709
+ putSortable: j,
1710
+ cloneEl: B,
1711
+ targetEl: m,
1712
+ rootEl: N,
1713
+ oldIndex: Le,
1714
+ oldDraggableIndex: Ze,
1715
+ newIndex: Z,
1716
+ newDraggableIndex: be
1717
+ }, r));
1718
+ }
1719
+ var m, F, E, N, Oe, ht, B, _e, Le, Z, Ze, be, ut, j, Be = !1, wt = !1, xt = [], ke, re, Ot, $t, hn, mn, Ke, Fe, et, tt = !1, dt = !1, mt, U, Pt = [], zt = !1, Ct = [], Dt = typeof document < "u", ct = Ln, gn = at || me ? "cssFloat" : "float", Eo = Dt && !ho && !Ln && "draggable" in document.createElement("div"), Xn = function() {
1720
+ if (Dt) {
1721
+ if (me)
1722
+ return !1;
1723
+ var r = document.createElement("x");
1724
+ return r.style.cssText = "pointer-events:auto", r.style.pointerEvents === "auto";
1725
+ }
1726
+ }(), Hn = function(e, t) {
1727
+ var n = _(e), o = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), a = ze(e, 0, t), l = ze(e, 1, t), s = a && _(a), c = l && _(l), d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + z(a).width, f = c && parseInt(c.marginLeft) + parseInt(c.marginRight) + z(l).width;
1728
+ if (n.display === "flex")
1729
+ return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
1730
+ if (n.display === "grid")
1731
+ return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
1732
+ if (a && s.float && s.float !== "none") {
1733
+ var i = s.float === "left" ? "left" : "right";
1734
+ return l && (c.clear === "both" || c.clear === i) ? "vertical" : "horizontal";
1735
+ }
1736
+ return a && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || d >= o && n[gn] === "none" || l && n[gn] === "none" && d + f > o) ? "vertical" : "horizontal";
1737
+ }, Do = function(e, t, n) {
1738
+ var o = n ? e.left : e.top, a = n ? e.right : e.bottom, l = n ? e.width : e.height, s = n ? t.left : t.top, c = n ? t.right : t.bottom, d = n ? t.width : t.height;
1739
+ return o === s || a === c || o + l / 2 === s + d / 2;
1740
+ }, So = function(e, t) {
1741
+ var n;
1742
+ return xt.some(function(o) {
1743
+ var a = o[ee].options.emptyInsertThreshold;
1744
+ if (!(!a || Jt(o))) {
1745
+ var l = z(o), s = e >= l.left - a && e <= l.right + a, c = t >= l.top - a && t <= l.bottom + a;
1746
+ if (s && c)
1747
+ return n = o;
1748
+ }
1749
+ }), n;
1750
+ }, Vn = function(e) {
1751
+ function t(a, l) {
1752
+ return function(s, c, d, f) {
1753
+ var i = s.options.group.name && c.options.group.name && s.options.group.name === c.options.group.name;
1754
+ if (a == null && (l || i))
1755
+ return !0;
1756
+ if (a == null || a === !1)
1757
+ return !1;
1758
+ if (l && a === "clone")
1759
+ return a;
1760
+ if (typeof a == "function")
1761
+ return t(a(s, c, d, f), l)(s, c, d, f);
1762
+ var p = (l ? s : c).options.group.name;
1763
+ return a === !0 || typeof a == "string" && a === p || a.join && a.indexOf(p) > -1;
1764
+ };
1765
+ }
1766
+ var n = {}, o = e.group;
1767
+ (!o || pt(o) != "object") && (o = {
1768
+ name: o
1769
+ }), n.name = o.name, n.checkPull = t(o.pull, !0), n.checkPut = t(o.put), n.revertClone = o.revertClone, e.group = n;
1770
+ }, Wn = function() {
1771
+ !Xn && E && _(E, "display", "none");
1772
+ }, Kn = function() {
1773
+ !Xn && E && _(E, "display", "");
1774
+ };
1775
+ Dt && document.addEventListener("click", function(r) {
1776
+ if (wt)
1777
+ return r.preventDefault(), r.stopPropagation && r.stopPropagation(), r.stopImmediatePropagation && r.stopImmediatePropagation(), wt = !1, !1;
1778
+ }, !0);
1779
+ var Ie = function(e) {
1780
+ if (m) {
1781
+ e = e.touches ? e.touches[0] : e;
1782
+ var t = So(e.clientX, e.clientY);
1783
+ if (t) {
1784
+ var n = {};
1785
+ for (var o in e)
1786
+ e.hasOwnProperty(o) && (n[o] = e[o]);
1787
+ n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[ee]._onDragOver(n);
1788
+ }
1789
+ }
1790
+ }, To = function(e) {
1791
+ m && m.parentNode[ee]._isOutsideThisEl(e.target);
1792
+ };
1793
+ function y(r, e) {
1794
+ if (!(r && r.nodeType && r.nodeType === 1))
1795
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));
1796
+ this.el = r, this.options = e = he({}, e), r[ee] = this;
1797
+ var t = {
1798
+ group: null,
1799
+ sort: !0,
1800
+ disabled: !1,
1801
+ store: null,
1802
+ handle: null,
1803
+ draggable: /^[uo]l$/i.test(r.nodeName) ? ">li" : ">*",
1804
+ swapThreshold: 1,
1805
+ // percentage; 0 <= x <= 1
1806
+ invertSwap: !1,
1807
+ // invert always
1808
+ invertedSwapThreshold: null,
1809
+ // will be set to same as swapThreshold if default
1810
+ removeCloneOnHide: !0,
1811
+ direction: function() {
1812
+ return Hn(r, this.options);
1813
+ },
1814
+ ghostClass: "sortable-ghost",
1815
+ chosenClass: "sortable-chosen",
1816
+ dragClass: "sortable-drag",
1817
+ ignore: "a, img",
1818
+ filter: null,
1819
+ preventOnFilter: !0,
1820
+ animation: 0,
1821
+ easing: null,
1822
+ setData: function(l, s) {
1823
+ l.setData("Text", s.textContent);
1824
+ },
1825
+ dropBubble: !1,
1826
+ dragoverBubble: !1,
1827
+ dataIdAttr: "data-id",
1828
+ delay: 0,
1829
+ delayOnTouchOnly: !1,
1830
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1831
+ forceFallback: !1,
1832
+ fallbackClass: "sortable-fallback",
1833
+ fallbackOnBody: !1,
1834
+ fallbackTolerance: 0,
1835
+ fallbackOffset: {
1836
+ x: 0,
1837
+ y: 0
1838
+ },
1839
+ supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && !Qe,
1840
+ emptyInsertThreshold: 5
1841
+ };
1842
+ lt.initializePlugins(this, r, t);
1843
+ for (var n in t)
1844
+ !(n in e) && (e[n] = t[n]);
1845
+ Vn(e);
1846
+ for (var o in this)
1847
+ o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
1848
+ this.nativeDraggable = e.forceFallback ? !1 : Eo, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? T(r, "pointerdown", this._onTapStart) : (T(r, "mousedown", this._onTapStart), T(r, "touchstart", this._onTapStart)), this.nativeDraggable && (T(r, "dragover", this), T(r, "dragenter", this)), xt.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), he(this, _o());
1849
+ }
1850
+ y.prototype = /** @lends Sortable.prototype */
1851
+ {
1852
+ constructor: y,
1853
+ _isOutsideThisEl: function(e) {
1854
+ !this.el.contains(e) && e !== this.el && (Fe = null);
1855
+ },
1856
+ _getDirection: function(e, t) {
1857
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, m) : this.options.direction;
1858
+ },
1859
+ _onTapStart: function(e) {
1860
+ if (e.cancelable) {
1861
+ var t = this, n = this.el, o = this.options, a = o.preventOnFilter, l = e.type, s = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, c = (s || e).target, d = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || c, f = o.filter;
1862
+ if (Mo(n), !m && !(/mousedown|pointerdown/.test(l) && e.button !== 0 || o.disabled) && !d.isContentEditable && !(!this.nativeDraggable && Qe && c && c.tagName.toUpperCase() === "SELECT") && (c = ae(c, o.draggable, n, !1), !(c && c.animated) && ht !== c)) {
1863
+ if (Le = te(c), Ze = te(c, o.draggable), typeof f == "function") {
1864
+ if (f.call(this, e, c, this)) {
1865
+ W({
1866
+ sortable: t,
1867
+ rootEl: d,
1868
+ name: "filter",
1869
+ targetEl: c,
1870
+ toEl: n,
1871
+ fromEl: n
1872
+ }), K("filter", t, {
1873
+ evt: e
1874
+ }), a && e.cancelable && e.preventDefault();
1875
+ return;
1876
+ }
1877
+ } else if (f && (f = f.split(",").some(function(i) {
1878
+ if (i = ae(d, i.trim(), n, !1), i)
1879
+ return W({
1880
+ sortable: t,
1881
+ rootEl: i,
1882
+ name: "filter",
1883
+ targetEl: c,
1884
+ fromEl: n,
1885
+ toEl: n
1886
+ }), K("filter", t, {
1887
+ evt: e
1888
+ }), !0;
1889
+ }), f)) {
1890
+ a && e.cancelable && e.preventDefault();
1891
+ return;
1892
+ }
1893
+ o.handle && !ae(d, o.handle, n, !1) || this._prepareDragStart(e, s, c);
1894
+ }
1895
+ }
1896
+ },
1897
+ _prepareDragStart: function(e, t, n) {
1898
+ var o = this, a = o.el, l = o.options, s = a.ownerDocument, c;
1899
+ if (n && !m && n.parentNode === a) {
1900
+ var d = z(n);
1901
+ if (N = a, m = n, F = m.parentNode, Oe = m.nextSibling, ht = n, ut = l.group, y.dragged = m, ke = {
1902
+ target: m,
1903
+ clientX: (t || e).clientX,
1904
+ clientY: (t || e).clientY
1905
+ }, hn = ke.clientX - d.left, mn = ke.clientY - d.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, m.style["will-change"] = "all", c = function() {
1906
+ if (K("delayEnded", o, {
1907
+ evt: e
1908
+ }), y.eventCanceled) {
1909
+ o._onDrop();
1910
+ return;
1911
+ }
1912
+ o._disableDelayedDragEvents(), !dn && o.nativeDraggable && (m.draggable = !0), o._triggerDragStart(e, t), W({
1913
+ sortable: o,
1914
+ name: "choose",
1915
+ originalEvent: e
1916
+ }), J(m, l.chosenClass, !0);
1917
+ }, l.ignore.split(",").forEach(function(f) {
1918
+ Rn(m, f.trim(), At);
1919
+ }), T(s, "dragover", Ie), T(s, "mousemove", Ie), T(s, "touchmove", Ie), T(s, "mouseup", o._onDrop), T(s, "touchend", o._onDrop), T(s, "touchcancel", o._onDrop), dn && this.nativeDraggable && (this.options.touchStartThreshold = 4, m.draggable = !0), K("delayStart", this, {
1920
+ evt: e
1921
+ }), l.delay && (!l.delayOnTouchOnly || t) && (!this.nativeDraggable || !(at || me))) {
1922
+ if (y.eventCanceled) {
1923
+ this._onDrop();
1924
+ return;
1925
+ }
1926
+ T(s, "mouseup", o._disableDelayedDrag), T(s, "touchend", o._disableDelayedDrag), T(s, "touchcancel", o._disableDelayedDrag), T(s, "mousemove", o._delayedDragTouchMoveHandler), T(s, "touchmove", o._delayedDragTouchMoveHandler), l.supportPointer && T(s, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(c, l.delay);
1927
+ } else
1928
+ c();
1929
+ }
1930
+ },
1931
+ _delayedDragTouchMoveHandler: function(e) {
1932
+ var t = e.touches ? e.touches[0] : e;
1933
+ Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
1934
+ },
1935
+ _disableDelayedDrag: function() {
1936
+ m && At(m), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
1937
+ },
1938
+ _disableDelayedDragEvents: function() {
1939
+ var e = this.el.ownerDocument;
1940
+ S(e, "mouseup", this._disableDelayedDrag), S(e, "touchend", this._disableDelayedDrag), S(e, "touchcancel", this._disableDelayedDrag), S(e, "mousemove", this._delayedDragTouchMoveHandler), S(e, "touchmove", this._delayedDragTouchMoveHandler), S(e, "pointermove", this._delayedDragTouchMoveHandler);
1941
+ },
1942
+ _triggerDragStart: function(e, t) {
1943
+ t = t || e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? T(document, "pointermove", this._onTouchMove) : t ? T(document, "touchmove", this._onTouchMove) : T(document, "mousemove", this._onTouchMove) : (T(m, "dragend", this), T(N, "dragstart", this._onDragStart));
1944
+ try {
1945
+ document.selection ? gt(function() {
1946
+ document.selection.empty();
1947
+ }) : window.getSelection().removeAllRanges();
1948
+ } catch {
1949
+ }
1950
+ },
1951
+ _dragStarted: function(e, t) {
1952
+ if (Be = !1, N && m) {
1953
+ K("dragStarted", this, {
1954
+ evt: t
1955
+ }), this.nativeDraggable && T(document, "dragover", To);
1956
+ var n = this.options;
1957
+ !e && J(m, n.dragClass, !1), J(m, n.ghostClass, !0), y.active = this, e && this._appendGhost(), W({
1958
+ sortable: this,
1959
+ name: "start",
1960
+ originalEvent: t
1961
+ });
1962
+ } else
1963
+ this._nulling();
1964
+ },
1965
+ _emulateDragOver: function() {
1966
+ if (re) {
1967
+ this._lastX = re.clientX, this._lastY = re.clientY, Wn();
1968
+ for (var e = document.elementFromPoint(re.clientX, re.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(re.clientX, re.clientY), e !== t); )
1969
+ t = e;
1970
+ if (m.parentNode[ee]._isOutsideThisEl(e), t)
1971
+ do {
1972
+ if (t[ee]) {
1973
+ var n = void 0;
1974
+ if (n = t[ee]._onDragOver({
1975
+ clientX: re.clientX,
1976
+ clientY: re.clientY,
1977
+ target: e,
1978
+ rootEl: t
1979
+ }), n && !this.options.dragoverBubble)
1980
+ break;
1981
+ }
1982
+ e = t;
1983
+ } while (t = t.parentNode);
1984
+ Kn();
1985
+ }
1986
+ },
1987
+ _onTouchMove: function(e) {
1988
+ if (ke) {
1989
+ var t = this.options, n = t.fallbackTolerance, o = t.fallbackOffset, a = e.touches ? e.touches[0] : e, l = E && Re(E, !0), s = E && l && l.a, c = E && l && l.d, d = ct && U && pn(U), f = (a.clientX - ke.clientX + o.x) / (s || 1) + (d ? d[0] - Pt[0] : 0) / (s || 1), i = (a.clientY - ke.clientY + o.y) / (c || 1) + (d ? d[1] - Pt[1] : 0) / (c || 1);
1990
+ if (!y.active && !Be) {
1991
+ if (n && Math.max(Math.abs(a.clientX - this._lastX), Math.abs(a.clientY - this._lastY)) < n)
1992
+ return;
1993
+ this._onDragStart(e, !0);
1994
+ }
1995
+ if (E) {
1996
+ l ? (l.e += f - (Ot || 0), l.f += i - ($t || 0)) : l = {
1997
+ a: 1,
1998
+ b: 0,
1999
+ c: 0,
2000
+ d: 1,
2001
+ e: f,
2002
+ f: i
2003
+ };
2004
+ var p = "matrix(".concat(l.a, ",").concat(l.b, ",").concat(l.c, ",").concat(l.d, ",").concat(l.e, ",").concat(l.f, ")");
2005
+ _(E, "webkitTransform", p), _(E, "mozTransform", p), _(E, "msTransform", p), _(E, "transform", p), Ot = f, $t = i, re = a;
2006
+ }
2007
+ e.cancelable && e.preventDefault();
2008
+ }
2009
+ },
2010
+ _appendGhost: function() {
2011
+ if (!E) {
2012
+ var e = this.options.fallbackOnBody ? document.body : N, t = z(m, !0, ct, !0, e), n = this.options;
2013
+ if (ct) {
2014
+ for (U = e; _(U, "position") === "static" && _(U, "transform") === "none" && U !== document; )
2015
+ U = U.parentNode;
2016
+ U !== document.body && U !== document.documentElement ? (U === document && (U = se()), t.top += U.scrollTop, t.left += U.scrollLeft) : U = se(), Pt = pn(U);
2017
+ }
2018
+ E = m.cloneNode(!0), J(E, n.ghostClass, !1), J(E, n.fallbackClass, !0), J(E, n.dragClass, !0), _(E, "transition", ""), _(E, "transform", ""), _(E, "box-sizing", "border-box"), _(E, "margin", 0), _(E, "top", t.top), _(E, "left", t.left), _(E, "width", t.width), _(E, "height", t.height), _(E, "opacity", "0.8"), _(E, "position", ct ? "absolute" : "fixed"), _(E, "zIndex", "100000"), _(E, "pointerEvents", "none"), y.ghost = E, e.appendChild(E), _(E, "transform-origin", hn / parseInt(E.style.width) * 100 + "% " + mn / parseInt(E.style.height) * 100 + "%");
2019
+ }
2020
+ },
2021
+ _onDragStart: function(e, t) {
2022
+ var n = this, o = e.dataTransfer, a = n.options;
2023
+ if (K("dragStart", this, {
2024
+ evt: e
2025
+ }), y.eventCanceled) {
2026
+ this._onDrop();
2027
+ return;
2028
+ }
2029
+ K("setupClone", this), y.eventCanceled || (B = Un(m), B.draggable = !1, B.style["will-change"] = "", this._hideClone(), J(B, this.options.chosenClass, !1), y.clone = B), n.cloneId = gt(function() {
2030
+ K("clone", n), !y.eventCanceled && (n.options.removeCloneOnHide || N.insertBefore(B, m), n._hideClone(), W({
2031
+ sortable: n,
2032
+ name: "clone"
2033
+ }));
2034
+ }), !t && J(m, a.dragClass, !0), t ? (wt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (S(document, "mouseup", n._onDrop), S(document, "touchend", n._onDrop), S(document, "touchcancel", n._onDrop), o && (o.effectAllowed = "move", a.setData && a.setData.call(n, o, m)), T(document, "drop", n), _(m, "transform", "translateZ(0)")), Be = !0, n._dragStartId = gt(n._dragStarted.bind(n, t, e)), T(document, "selectstart", n), Ke = !0, Qe && _(document.body, "user-select", "none");
2035
+ },
2036
+ // Returns true - if no further action is needed (either inserted or another condition)
2037
+ _onDragOver: function(e) {
2038
+ var t = this.el, n = e.target, o, a, l, s = this.options, c = s.group, d = y.active, f = ut === c, i = s.sort, p = j || d, h, v = this, w = !1;
2039
+ if (zt) return;
2040
+ function $(We, Qn) {
2041
+ K(We, v, ue({
2042
+ evt: e,
2043
+ isOwner: f,
2044
+ axis: h ? "vertical" : "horizontal",
2045
+ revert: l,
2046
+ dragRect: o,
2047
+ targetRect: a,
2048
+ canSort: i,
2049
+ fromSortable: p,
2050
+ target: n,
2051
+ completed: A,
2052
+ onMove: function(tn, Jn) {
2053
+ return ft(N, t, m, o, tn, z(tn), e, Jn);
2054
+ },
2055
+ changed: L
2056
+ }, Qn));
2057
+ }
2058
+ function x() {
2059
+ $("dragOverAnimationCapture"), v.captureAnimationState(), v !== p && p.captureAnimationState();
2060
+ }
2061
+ function A(We) {
2062
+ return $("dragOverCompleted", {
2063
+ insertion: We
2064
+ }), We && (f ? d._hideClone() : d._showClone(v), v !== p && (J(m, j ? j.options.ghostClass : d.options.ghostClass, !1), J(m, s.ghostClass, !0)), j !== v && v !== y.active ? j = v : v === y.active && j && (j = null), p === v && (v._ignoreWhileAnimating = n), v.animateAll(function() {
2065
+ $("dragOverAnimationComplete"), v._ignoreWhileAnimating = null;
2066
+ }), v !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (n === m && !m.animated || n === t && !n.animated) && (Fe = null), !s.dragoverBubble && !e.rootEl && n !== document && (m.parentNode[ee]._isOutsideThisEl(e.target), !We && Ie(e)), !s.dragoverBubble && e.stopPropagation && e.stopPropagation(), w = !0;
2067
+ }
2068
+ function L() {
2069
+ Z = te(m), be = te(m, s.draggable), W({
2070
+ sortable: v,
2071
+ name: "change",
2072
+ toEl: t,
2073
+ newIndex: Z,
2074
+ newDraggableIndex: be,
2075
+ originalEvent: e
2076
+ });
2077
+ }
2078
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ae(n, s.draggable, t, !0), $("dragOver"), y.eventCanceled) return w;
2079
+ if (m.contains(e.target) || n.animated && n.animatingX && n.animatingY || v._ignoreWhileAnimating === n)
2080
+ return A(!1);
2081
+ if (wt = !1, d && !s.disabled && (f ? i || (l = F !== N) : j === this || (this.lastPutMode = ut.checkPull(this, d, m, e)) && c.checkPut(this, d, m, e))) {
2082
+ if (h = this._getDirection(e, n) === "vertical", o = z(m), $("dragOverValid"), y.eventCanceled) return w;
2083
+ if (l)
2084
+ return F = N, x(), this._hideClone(), $("revert"), y.eventCanceled || (Oe ? N.insertBefore(m, Oe) : N.appendChild(m)), A(!0);
2085
+ var q = Jt(t, s.draggable);
2086
+ if (!q || $o(e, h, this) && !q.animated) {
2087
+ if (q === m)
2088
+ return A(!1);
2089
+ if (q && t === e.target && (n = q), n && (a = z(n)), ft(N, t, m, o, n, a, e, !!n) !== !1)
2090
+ return x(), t.appendChild(m), F = t, L(), A(!0);
2091
+ } else if (q && Oo(e, h, this)) {
2092
+ var De = ze(t, 0, s, !0);
2093
+ if (De === m)
2094
+ return A(!1);
2095
+ if (n = De, a = z(n), ft(N, t, m, o, n, a, e, !1) !== !1)
2096
+ return x(), t.insertBefore(m, De), F = t, L(), A(!0);
2097
+ } else if (n.parentNode === t) {
2098
+ a = z(n);
2099
+ var oe = 0, Se, Ue = m.parentNode !== t, Q = !Do(m.animated && m.toRect || o, n.animated && n.toRect || a, h), Xe = h ? "top" : "left", ge = fn(n, "top", "top") || fn(m, "top", "top"), He = ge ? ge.scrollTop : void 0;
2100
+ Fe !== n && (Se = a[Xe], tt = !1, dt = !Q && s.invertSwap || Ue), oe = Po(e, n, a, h, Q ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, dt, Fe === n);
2101
+ var fe;
2102
+ if (oe !== 0) {
2103
+ var Te = te(m);
2104
+ do
2105
+ Te -= oe, fe = F.children[Te];
2106
+ while (fe && (_(fe, "display") === "none" || fe === E));
2107
+ }
2108
+ if (oe === 0 || fe === n)
2109
+ return A(!1);
2110
+ Fe = n, et = oe;
2111
+ var Ve = n.nextElementSibling, ve = !1;
2112
+ ve = oe === 1;
2113
+ var it = ft(N, t, m, o, n, a, e, ve);
2114
+ if (it !== !1)
2115
+ return (it === 1 || it === -1) && (ve = it === 1), zt = !0, setTimeout(Io, 30), x(), ve && !Ve ? t.appendChild(m) : n.parentNode.insertBefore(m, ve ? Ve : n), ge && jn(ge, 0, He - ge.scrollTop), F = m.parentNode, Se !== void 0 && !dt && (mt = Math.abs(Se - z(n)[Xe])), L(), A(!0);
2116
+ }
2117
+ if (t.contains(m))
2118
+ return A(!1);
2119
+ }
2120
+ return !1;
2121
+ },
2122
+ _ignoreWhileAnimating: null,
2123
+ _offMoveEvents: function() {
2124
+ S(document, "mousemove", this._onTouchMove), S(document, "touchmove", this._onTouchMove), S(document, "pointermove", this._onTouchMove), S(document, "dragover", Ie), S(document, "mousemove", Ie), S(document, "touchmove", Ie);
2125
+ },
2126
+ _offUpEvents: function() {
2127
+ var e = this.el.ownerDocument;
2128
+ S(e, "mouseup", this._onDrop), S(e, "touchend", this._onDrop), S(e, "pointerup", this._onDrop), S(e, "touchcancel", this._onDrop), S(document, "selectstart", this);
2129
+ },
2130
+ _onDrop: function(e) {
2131
+ var t = this.el, n = this.options;
2132
+ if (Z = te(m), be = te(m, n.draggable), K("drop", this, {
2133
+ evt: e
2134
+ }), F = m && m.parentNode, Z = te(m), be = te(m, n.draggable), y.eventCanceled) {
2135
+ this._nulling();
2136
+ return;
2137
+ }
2138
+ Be = !1, dt = !1, tt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), jt(this.cloneId), jt(this._dragStartId), this.nativeDraggable && (S(document, "drop", this), S(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Qe && _(document.body, "user-select", ""), _(m, "transform", ""), e && (Ke && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), E && E.parentNode && E.parentNode.removeChild(E), (N === F || j && j.lastPutMode !== "clone") && B && B.parentNode && B.parentNode.removeChild(B), m && (this.nativeDraggable && S(m, "dragend", this), At(m), m.style["will-change"] = "", Ke && !Be && J(m, j ? j.options.ghostClass : this.options.ghostClass, !1), J(m, this.options.chosenClass, !1), W({
2139
+ sortable: this,
2140
+ name: "unchoose",
2141
+ toEl: F,
2142
+ newIndex: null,
2143
+ newDraggableIndex: null,
2144
+ originalEvent: e
2145
+ }), N !== F ? (Z >= 0 && (W({
2146
+ rootEl: F,
2147
+ name: "add",
2148
+ toEl: F,
2149
+ fromEl: N,
2150
+ originalEvent: e
2151
+ }), W({
2152
+ sortable: this,
2153
+ name: "remove",
2154
+ toEl: F,
2155
+ originalEvent: e
2156
+ }), W({
2157
+ rootEl: F,
2158
+ name: "sort",
2159
+ toEl: F,
2160
+ fromEl: N,
2161
+ originalEvent: e
2162
+ }), W({
2163
+ sortable: this,
2164
+ name: "sort",
2165
+ toEl: F,
2166
+ originalEvent: e
2167
+ })), j && j.save()) : Z !== Le && Z >= 0 && (W({
2168
+ sortable: this,
2169
+ name: "update",
2170
+ toEl: F,
2171
+ originalEvent: e
2172
+ }), W({
2173
+ sortable: this,
2174
+ name: "sort",
2175
+ toEl: F,
2176
+ originalEvent: e
2177
+ })), y.active && ((Z == null || Z === -1) && (Z = Le, be = Ze), W({
2178
+ sortable: this,
2179
+ name: "end",
2180
+ toEl: F,
2181
+ originalEvent: e
2182
+ }), this.save()))), this._nulling();
2183
+ },
2184
+ _nulling: function() {
2185
+ K("nulling", this), N = m = F = E = Oe = B = ht = _e = ke = re = Ke = Z = be = Le = Ze = Fe = et = j = ut = y.dragged = y.ghost = y.clone = y.active = null, Ct.forEach(function(e) {
2186
+ e.checked = !0;
2187
+ }), Ct.length = Ot = $t = 0;
2188
+ },
2189
+ handleEvent: function(e) {
2190
+ switch (e.type) {
2191
+ case "drop":
2192
+ case "dragend":
2193
+ this._onDrop(e);
2194
+ break;
2195
+ case "dragenter":
2196
+ case "dragover":
2197
+ m && (this._onDragOver(e), ko(e));
2198
+ break;
2199
+ case "selectstart":
2200
+ e.preventDefault();
2201
+ break;
2202
+ }
2203
+ },
2204
+ /**
2205
+ * Serializes the item into an array of string.
2206
+ * @returns {String[]}
2207
+ */
2208
+ toArray: function() {
2209
+ for (var e = [], t, n = this.el.children, o = 0, a = n.length, l = this.options; o < a; o++)
2210
+ t = n[o], ae(t, l.draggable, this.el, !1) && e.push(t.getAttribute(l.dataIdAttr) || No(t));
2211
+ return e;
2212
+ },
2213
+ /**
2214
+ * Sorts the elements according to the array.
2215
+ * @param {String[]} order order of the items
2216
+ */
2217
+ sort: function(e, t) {
2218
+ var n = {}, o = this.el;
2219
+ this.toArray().forEach(function(a, l) {
2220
+ var s = o.children[l];
2221
+ ae(s, this.options.draggable, o, !1) && (n[a] = s);
2222
+ }, this), t && this.captureAnimationState(), e.forEach(function(a) {
2223
+ n[a] && (o.removeChild(n[a]), o.appendChild(n[a]));
2224
+ }), t && this.animateAll();
2225
+ },
2226
+ /**
2227
+ * Save the current sorting
2228
+ */
2229
+ save: function() {
2230
+ var e = this.options.store;
2231
+ e && e.set && e.set(this);
2232
+ },
2233
+ /**
2234
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2235
+ * @param {HTMLElement} el
2236
+ * @param {String} [selector] default: `options.draggable`
2237
+ * @returns {HTMLElement|null}
2238
+ */
2239
+ closest: function(e, t) {
2240
+ return ae(e, t || this.options.draggable, this.el, !1);
2241
+ },
2242
+ /**
2243
+ * Set/get option
2244
+ * @param {string} name
2245
+ * @param {*} [value]
2246
+ * @returns {*}
2247
+ */
2248
+ option: function(e, t) {
2249
+ var n = this.options;
2250
+ if (t === void 0)
2251
+ return n[e];
2252
+ var o = lt.modifyOption(this, e, t);
2253
+ typeof o < "u" ? n[e] = o : n[e] = t, e === "group" && Vn(n);
2254
+ },
2255
+ /**
2256
+ * Destroy
2257
+ */
2258
+ destroy: function() {
2259
+ K("destroy", this);
2260
+ var e = this.el;
2261
+ e[ee] = null, S(e, "mousedown", this._onTapStart), S(e, "touchstart", this._onTapStart), S(e, "pointerdown", this._onTapStart), this.nativeDraggable && (S(e, "dragover", this), S(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(t) {
2262
+ t.removeAttribute("draggable");
2263
+ }), this._onDrop(), this._disableDelayedDragEvents(), xt.splice(xt.indexOf(this.el), 1), this.el = e = null;
2264
+ },
2265
+ _hideClone: function() {
2266
+ if (!_e) {
2267
+ if (K("hideClone", this), y.eventCanceled) return;
2268
+ _(B, "display", "none"), this.options.removeCloneOnHide && B.parentNode && B.parentNode.removeChild(B), _e = !0;
2269
+ }
2270
+ },
2271
+ _showClone: function(e) {
2272
+ if (e.lastPutMode !== "clone") {
2273
+ this._hideClone();
2274
+ return;
2275
+ }
2276
+ if (_e) {
2277
+ if (K("showClone", this), y.eventCanceled) return;
2278
+ m.parentNode == N && !this.options.group.revertClone ? N.insertBefore(B, m) : Oe ? N.insertBefore(B, Oe) : N.appendChild(B), this.options.group.revertClone && this.animate(m, B), _(B, "display", ""), _e = !1;
2279
+ }
2280
+ }
2281
+ };
2282
+ function ko(r) {
2283
+ r.dataTransfer && (r.dataTransfer.dropEffect = "move"), r.cancelable && r.preventDefault();
2284
+ }
2285
+ function ft(r, e, t, n, o, a, l, s) {
2286
+ var c, d = r[ee], f = d.options.onMove, i;
2287
+ return window.CustomEvent && !me && !at ? c = new CustomEvent("move", {
2288
+ bubbles: !0,
2289
+ cancelable: !0
2290
+ }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = e, c.from = r, c.dragged = t, c.draggedRect = n, c.related = o || e, c.relatedRect = a || z(e), c.willInsertAfter = s, c.originalEvent = l, r.dispatchEvent(c), f && (i = f.call(d, c, l)), i;
2291
+ }
2292
+ function At(r) {
2293
+ r.draggable = !1;
2294
+ }
2295
+ function Io() {
2296
+ zt = !1;
2297
+ }
2298
+ function Oo(r, e, t) {
2299
+ var n = z(ze(t.el, 0, t.options, !0)), o = 10;
2300
+ return e ? r.clientX < n.left - o || r.clientY < n.top && r.clientX < n.right : r.clientY < n.top - o || r.clientY < n.bottom && r.clientX < n.left;
2301
+ }
2302
+ function $o(r, e, t) {
2303
+ var n = z(Jt(t.el, t.options.draggable)), o = 10;
2304
+ return e ? r.clientX > n.right + o || r.clientX <= n.right && r.clientY > n.bottom && r.clientX >= n.left : r.clientX > n.right && r.clientY > n.top || r.clientX <= n.right && r.clientY > n.bottom + o;
2305
+ }
2306
+ function Po(r, e, t, n, o, a, l, s) {
2307
+ var c = n ? r.clientY : r.clientX, d = n ? t.height : t.width, f = n ? t.top : t.left, i = n ? t.bottom : t.right, p = !1;
2308
+ if (!l) {
2309
+ if (s && mt < d * o) {
2310
+ if (!tt && (et === 1 ? c > f + d * a / 2 : c < i - d * a / 2) && (tt = !0), tt)
2311
+ p = !0;
2312
+ else if (et === 1 ? c < f + mt : c > i - mt)
2313
+ return -et;
2314
+ } else if (c > f + d * (1 - o) / 2 && c < i - d * (1 - o) / 2)
2315
+ return Ao(e);
2316
+ }
2317
+ return p = p || l, p && (c < f + d * a / 2 || c > i - d * a / 2) ? c > f + d / 2 ? 1 : -1 : 0;
2318
+ }
2319
+ function Ao(r) {
2320
+ return te(m) < te(r) ? 1 : -1;
2321
+ }
2322
+ function No(r) {
2323
+ for (var e = r.tagName + r.className + r.src + r.href + r.textContent, t = e.length, n = 0; t--; )
2324
+ n += e.charCodeAt(t);
2325
+ return n.toString(36);
2326
+ }
2327
+ function Mo(r) {
2328
+ Ct.length = 0;
2329
+ for (var e = r.getElementsByTagName("input"), t = e.length; t--; ) {
2330
+ var n = e[t];
2331
+ n.checked && Ct.push(n);
2332
+ }
2333
+ }
2334
+ function gt(r) {
2335
+ return setTimeout(r, 0);
2336
+ }
2337
+ function jt(r) {
2338
+ return clearTimeout(r);
2339
+ }
2340
+ Dt && T(document, "touchmove", function(r) {
2341
+ (y.active || Be) && r.cancelable && r.preventDefault();
2342
+ });
2343
+ y.utils = {
2344
+ on: T,
2345
+ off: S,
2346
+ css: _,
2347
+ find: Rn,
2348
+ is: function(e, t) {
2349
+ return !!ae(e, t, e, !1);
2350
+ },
2351
+ extend: vo,
2352
+ throttle: zn,
2353
+ closest: ae,
2354
+ toggleClass: J,
2355
+ clone: Un,
2356
+ index: te,
2357
+ nextTick: gt,
2358
+ cancelNextTick: jt,
2359
+ detectDirection: Hn,
2360
+ getChild: ze
2361
+ };
2362
+ y.get = function(r) {
2363
+ return r[ee];
2364
+ };
2365
+ y.mount = function() {
2366
+ for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++)
2367
+ e[t] = arguments[t];
2368
+ e[0].constructor === Array && (e = e[0]), e.forEach(function(n) {
2369
+ if (!n.prototype || !n.prototype.constructor)
2370
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
2371
+ n.utils && (y.utils = ue(ue({}, y.utils), n.utils)), lt.mount(n);
2372
+ });
2373
+ };
2374
+ y.create = function(r, e) {
2375
+ return new y(r, e);
2376
+ };
2377
+ y.version = po;
2378
+ var Y = [], Ge, Ut, Xt = !1, Nt, Mt, Et, qe;
2379
+ function Fo() {
2380
+ function r() {
2381
+ this.defaults = {
2382
+ scroll: !0,
2383
+ forceAutoScrollFallback: !1,
2384
+ scrollSensitivity: 30,
2385
+ scrollSpeed: 10,
2386
+ bubbleScroll: !0
2387
+ };
2388
+ for (var e in this)
2389
+ e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
2390
+ }
2391
+ return r.prototype = {
2392
+ dragStarted: function(t) {
2393
+ var n = t.originalEvent;
2394
+ this.sortable.nativeDraggable ? T(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? T(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? T(document, "touchmove", this._handleFallbackAutoScroll) : T(document, "mousemove", this._handleFallbackAutoScroll);
2395
+ },
2396
+ dragOverCompleted: function(t) {
2397
+ var n = t.originalEvent;
2398
+ !this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
2399
+ },
2400
+ drop: function() {
2401
+ this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : (S(document, "pointermove", this._handleFallbackAutoScroll), S(document, "touchmove", this._handleFallbackAutoScroll), S(document, "mousemove", this._handleFallbackAutoScroll)), vn(), vt(), bo();
2402
+ },
2403
+ nulling: function() {
2404
+ Et = Ut = Ge = Xt = qe = Nt = Mt = null, Y.length = 0;
2405
+ },
2406
+ _handleFallbackAutoScroll: function(t) {
2407
+ this._handleAutoScroll(t, !0);
2408
+ },
2409
+ _handleAutoScroll: function(t, n) {
2410
+ var o = this, a = (t.touches ? t.touches[0] : t).clientX, l = (t.touches ? t.touches[0] : t).clientY, s = document.elementFromPoint(a, l);
2411
+ if (Et = t, n || this.options.forceAutoScrollFallback || at || me || Qe) {
2412
+ Ft(t, this.options, s, n);
2413
+ var c = ye(s, !0);
2414
+ Xt && (!qe || a !== Nt || l !== Mt) && (qe && vn(), qe = setInterval(function() {
2415
+ var d = ye(document.elementFromPoint(a, l), !0);
2416
+ d !== c && (c = d, vt()), Ft(t, o.options, d, n);
2417
+ }, 10), Nt = a, Mt = l);
2418
+ } else {
2419
+ if (!this.options.bubbleScroll || ye(s, !0) === se()) {
2420
+ vt();
2421
+ return;
2422
+ }
2423
+ Ft(t, this.options, ye(s, !1), !1);
2424
+ }
2425
+ }
2426
+ }, he(r, {
2427
+ pluginName: "scroll",
2428
+ initializeByDefault: !0
2429
+ });
2430
+ }
2431
+ function vt() {
2432
+ Y.forEach(function(r) {
2433
+ clearInterval(r.pid);
2434
+ }), Y = [];
2435
+ }
2436
+ function vn() {
2437
+ clearInterval(qe);
2438
+ }
2439
+ var Ft = zn(function(r, e, t, n) {
2440
+ if (e.scroll) {
2441
+ var o = (r.touches ? r.touches[0] : r).clientX, a = (r.touches ? r.touches[0] : r).clientY, l = e.scrollSensitivity, s = e.scrollSpeed, c = se(), d = !1, f;
2442
+ Ut !== t && (Ut = t, vt(), Ge = e.scroll, f = e.scrollFn, Ge === !0 && (Ge = ye(t, !0)));
2443
+ var i = 0, p = Ge;
2444
+ do {
2445
+ var h = p, v = z(h), w = v.top, $ = v.bottom, x = v.left, A = v.right, L = v.width, q = v.height, De = void 0, oe = void 0, Se = h.scrollWidth, Ue = h.scrollHeight, Q = _(h), Xe = h.scrollLeft, ge = h.scrollTop;
2446
+ h === c ? (De = L < Se && (Q.overflowX === "auto" || Q.overflowX === "scroll" || Q.overflowX === "visible"), oe = q < Ue && (Q.overflowY === "auto" || Q.overflowY === "scroll" || Q.overflowY === "visible")) : (De = L < Se && (Q.overflowX === "auto" || Q.overflowX === "scroll"), oe = q < Ue && (Q.overflowY === "auto" || Q.overflowY === "scroll"));
2447
+ var He = De && (Math.abs(A - o) <= l && Xe + L < Se) - (Math.abs(x - o) <= l && !!Xe), fe = oe && (Math.abs($ - a) <= l && ge + q < Ue) - (Math.abs(w - a) <= l && !!ge);
2448
+ if (!Y[i])
2449
+ for (var Te = 0; Te <= i; Te++)
2450
+ Y[Te] || (Y[Te] = {});
2451
+ (Y[i].vx != He || Y[i].vy != fe || Y[i].el !== h) && (Y[i].el = h, Y[i].vx = He, Y[i].vy = fe, clearInterval(Y[i].pid), (He != 0 || fe != 0) && (d = !0, Y[i].pid = setInterval((function() {
2452
+ n && this.layer === 0 && y.active._onTouchMove(Et);
2453
+ var Ve = Y[this.layer].vy ? Y[this.layer].vy * s : 0, ve = Y[this.layer].vx ? Y[this.layer].vx * s : 0;
2454
+ typeof f == "function" && f.call(y.dragged.parentNode[ee], ve, Ve, r, Et, Y[this.layer].el) !== "continue" || jn(Y[this.layer].el, ve, Ve);
2455
+ }).bind({
2456
+ layer: i
2457
+ }), 24))), i++;
2458
+ } while (e.bubbleScroll && p !== c && (p = ye(p, !1)));
2459
+ Xt = d;
2460
+ }
2461
+ }, 30), Gn = function(e) {
2462
+ var t = e.originalEvent, n = e.putSortable, o = e.dragEl, a = e.activeSortable, l = e.dispatchSortableEvent, s = e.hideGhostForTarget, c = e.unhideGhostForTarget;
2463
+ if (t) {
2464
+ var d = n || a;
2465
+ s();
2466
+ var f = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t, i = document.elementFromPoint(f.clientX, f.clientY);
2467
+ c(), d && !d.el.contains(i) && (l("spill"), this.onSpill({
2468
+ dragEl: o,
2469
+ putSortable: n
2470
+ }));
2471
+ }
2472
+ };
2473
+ function Zt() {
2474
+ }
2475
+ Zt.prototype = {
2476
+ startIndex: null,
2477
+ dragStart: function(e) {
2478
+ var t = e.oldDraggableIndex;
2479
+ this.startIndex = t;
2480
+ },
2481
+ onSpill: function(e) {
2482
+ var t = e.dragEl, n = e.putSortable;
2483
+ this.sortable.captureAnimationState(), n && n.captureAnimationState();
2484
+ var o = ze(this.sortable.el, this.startIndex, this.options);
2485
+ o ? this.sortable.el.insertBefore(t, o) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
2486
+ },
2487
+ drop: Gn
2488
+ };
2489
+ he(Zt, {
2490
+ pluginName: "revertOnSpill"
2491
+ });
2492
+ function en() {
2493
+ }
2494
+ en.prototype = {
2495
+ onSpill: function(e) {
2496
+ var t = e.dragEl, n = e.putSortable, o = n || this.sortable;
2497
+ o.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), o.animateAll();
2498
+ },
2499
+ drop: Gn
2500
+ };
2501
+ he(en, {
2502
+ pluginName: "removeOnSpill"
2503
+ });
2504
+ y.mount(new Fo());
2505
+ y.mount(en, Zt);
2506
+ function Bo() {
2507
+ return typeof window < "u" ? window.console : global.console;
2508
+ }
2509
+ const Lo = Bo();
2510
+ function Yo(r) {
2511
+ const e = /* @__PURE__ */ Object.create(null);
2512
+ return function(n) {
2513
+ return e[n] || (e[n] = r(n));
2514
+ };
2515
+ }
2516
+ const Ro = /-(\w)/g, bn = Yo((r) => r.replace(Ro, (e, t) => t ? t.toUpperCase() : ""));
2517
+ function Bt(r) {
2518
+ r.parentElement !== null && r.parentElement.removeChild(r);
2519
+ }
2520
+ function _n(r, e, t) {
2521
+ const n = t === 0 ? r.children[0] : r.children[t - 1].nextSibling;
2522
+ r.insertBefore(e, n);
2523
+ }
2524
+ function zo(r, e) {
2525
+ return Object.values(r).indexOf(e);
2526
+ }
2527
+ function jo(r, e, t, n) {
2528
+ if (!r)
2529
+ return [];
2530
+ const o = Object.values(r), a = e.length - n;
2531
+ return [...e].map((s, c) => c >= a ? o.length : o.indexOf(s));
2532
+ }
2533
+ function qn(r, e) {
2534
+ this.$nextTick(() => this.$emit(r.toLowerCase(), e));
2535
+ }
2536
+ function Uo(r) {
2537
+ return (e) => {
2538
+ this.realList !== null && this["onDrag" + r](e), qn.call(this, r, e);
2539
+ };
2540
+ }
2541
+ function Xo(r) {
2542
+ return ["transition-group", "TransitionGroup"].includes(r);
2543
+ }
2544
+ function Ho(r) {
2545
+ if (!r || r.length !== 1)
2546
+ return !1;
2547
+ const [{ type: e }] = r;
2548
+ return e ? Xo(e.name) : !1;
2549
+ }
2550
+ function Vo(r, e) {
2551
+ return e ? { ...e.props, ...e.attrs } : r;
2552
+ }
2553
+ const Ht = ["Start", "Add", "Remove", "Update", "End"], Vt = ["Choose", "Unchoose", "Sort", "Filter", "Clone"], Wo = ["Move", ...Ht, ...Vt].map((r) => "on" + r);
2554
+ let Lt = null;
2555
+ const Ko = {
2556
+ options: Object,
2557
+ list: {
2558
+ type: Array,
2559
+ required: !1,
2560
+ default: null
2561
+ },
2562
+ noTransitionOnDrag: {
2563
+ type: Boolean,
2564
+ default: !1
2565
+ },
2566
+ clone: {
2567
+ type: Function,
2568
+ default: (r) => r
2569
+ },
2570
+ tag: {
2571
+ type: String,
2572
+ default: "div"
2573
+ },
2574
+ move: {
2575
+ type: Function,
2576
+ default: null
2577
+ },
2578
+ componentData: {
2579
+ type: Object,
2580
+ required: !1,
2581
+ default: null
2582
+ },
2583
+ component: {
2584
+ type: String,
2585
+ default: null
2586
+ },
2587
+ modelValue: {
2588
+ type: Array,
2589
+ required: !1,
2590
+ default: null
2591
+ }
2592
+ }, Go = I({
2593
+ name: "VueDraggableNext",
2594
+ inheritAttrs: !1,
2595
+ emits: [
2596
+ "update:modelValue",
2597
+ "move",
2598
+ "change",
2599
+ ...Ht.map((r) => r.toLowerCase()),
2600
+ ...Vt.map((r) => r.toLowerCase())
2601
+ ],
2602
+ props: Ko,
2603
+ data() {
2604
+ return {
2605
+ transitionMode: !1,
2606
+ noneFunctionalComponentMode: !1,
2607
+ headerOffset: 0,
2608
+ footerOffset: 0,
2609
+ _sortable: {},
2610
+ visibleIndexes: [],
2611
+ context: {}
2612
+ };
2613
+ },
2614
+ render() {
2615
+ const r = this.$slots.default ? this.$slots.default() : null, e = Vo(this.$attrs, this.componentData);
2616
+ return r ? (this.transitionMode = Ho(r), on(this.getTag(), e, r)) : on(this.getTag(), e, []);
2617
+ },
2618
+ created() {
2619
+ this.list !== null && this.modelValue !== null && Lo.error("list props are mutually exclusive! Please set one.");
2620
+ },
2621
+ mounted() {
2622
+ const r = {};
2623
+ Ht.forEach((o) => {
2624
+ r["on" + o] = Uo.call(this, o);
2625
+ }), Vt.forEach((o) => {
2626
+ r["on" + o] = qn.bind(this, o);
2627
+ });
2628
+ const e = Object.keys(this.$attrs).reduce((o, a) => (o[bn(a)] = this.$attrs[a], o), {}), t = Object.assign({}, e, r, {
2629
+ onMove: (o, a) => this.onDragMove(o, a)
2630
+ });
2631
+ !("draggable" in t) && (t.draggable = ">*");
2632
+ const n = this.$el.nodeType === 1 ? this.$el : this.$el.parentElement;
2633
+ this._sortable = new y(n, t), n.__draggable_component__ = this, this.computeIndexes();
2634
+ },
2635
+ beforeUnmount() {
2636
+ try {
2637
+ this._sortable !== void 0 && this._sortable.destroy();
2638
+ } catch {
2639
+ }
2640
+ },
2641
+ computed: {
2642
+ realList() {
2643
+ return this.list ? this.list : this.modelValue;
2644
+ }
2645
+ },
2646
+ watch: {
2647
+ $attrs: {
2648
+ handler(r) {
2649
+ this.updateOptions(r);
2650
+ },
2651
+ deep: !0
2652
+ },
2653
+ realList() {
2654
+ this.computeIndexes();
2655
+ }
2656
+ },
2657
+ methods: {
2658
+ getTag() {
2659
+ return this.component ? or(this.component) : this.tag;
2660
+ },
2661
+ updateOptions(r) {
2662
+ for (var e in r) {
2663
+ const t = bn(e);
2664
+ Wo.indexOf(t) === -1 && this._sortable.option(t, r[e]);
2665
+ }
2666
+ },
2667
+ getChildrenNodes() {
2668
+ return this.$el.children;
2669
+ },
2670
+ computeIndexes() {
2671
+ this.$nextTick(() => {
2672
+ this.visibleIndexes = jo(this.getChildrenNodes(), this.$el.children, this.transitionMode, this.footerOffset);
2673
+ });
2674
+ },
2675
+ getUnderlyingVm(r) {
2676
+ const e = zo(this.getChildrenNodes() || [], r);
2677
+ if (e === -1)
2678
+ return null;
2679
+ const t = this.realList[e];
2680
+ return { index: e, element: t };
2681
+ },
2682
+ emitChanges(r) {
2683
+ this.$nextTick(() => {
2684
+ this.$emit("change", r);
2685
+ });
2686
+ },
2687
+ alterList(r) {
2688
+ if (this.list) {
2689
+ r(this.list);
2690
+ return;
2691
+ }
2692
+ const e = [...this.modelValue];
2693
+ r(e), this.$emit("update:modelValue", e);
2694
+ },
2695
+ spliceList() {
2696
+ const r = (e) => e.splice(...arguments);
2697
+ this.alterList(r);
2698
+ },
2699
+ updatePosition(r, e) {
2700
+ const t = (n) => n.splice(e, 0, n.splice(r, 1)[0]);
2701
+ this.alterList(t);
2702
+ },
2703
+ getVmIndex(r) {
2704
+ const e = this.visibleIndexes, t = e.length;
2705
+ return r > t - 1 ? t : e[r];
2706
+ },
2707
+ getComponent() {
2708
+ return this.$slots.default ? (
2709
+ //@ts-ignore
2710
+ this.$slots.default()[0].componentInstance
2711
+ ) : null;
2712
+ },
2713
+ resetTransitionData(r) {
2714
+ if (!this.noTransitionOnDrag || !this.transitionMode)
2715
+ return;
2716
+ var e = this.getChildrenNodes();
2717
+ e[r].data = null;
2718
+ const t = this.getComponent();
2719
+ t.children = [], t.kept = void 0;
2720
+ },
2721
+ onDragStart(r) {
2722
+ this.computeIndexes(), this.context = this.getUnderlyingVm(r.item), this.context && (r.item._underlying_vm_ = this.clone(this.context.element), Lt = r.item);
2723
+ },
2724
+ onDragAdd(r) {
2725
+ const e = r.item._underlying_vm_;
2726
+ if (e === void 0)
2727
+ return;
2728
+ Bt(r.item);
2729
+ const t = this.getVmIndex(r.newIndex);
2730
+ this.spliceList(t, 0, e), this.computeIndexes();
2731
+ const n = { element: e, newIndex: t };
2732
+ this.emitChanges({ added: n });
2733
+ },
2734
+ onDragRemove(r) {
2735
+ if (_n(this.$el, r.item, r.oldIndex), r.pullMode === "clone") {
2736
+ Bt(r.clone);
2737
+ return;
2738
+ }
2739
+ if (!this.context)
2740
+ return;
2741
+ const e = this.context.index;
2742
+ this.spliceList(e, 1);
2743
+ const t = { element: this.context.element, oldIndex: e };
2744
+ this.resetTransitionData(e), this.emitChanges({ removed: t });
2745
+ },
2746
+ onDragUpdate(r) {
2747
+ Bt(r.item), _n(r.from, r.item, r.oldIndex);
2748
+ const e = this.context.index, t = this.getVmIndex(r.newIndex);
2749
+ this.updatePosition(e, t);
2750
+ const n = { element: this.context.element, oldIndex: e, newIndex: t };
2751
+ this.emitChanges({ moved: n });
2752
+ },
2753
+ updateProperty(r, e) {
2754
+ r.hasOwnProperty(e) && (r[e] += this.headerOffset);
2755
+ },
2756
+ onDragMove(r, e) {
2757
+ const t = this.move;
2758
+ if (!t || !this.realList)
2759
+ return !0;
2760
+ const n = this.getRelatedContextFromMoveEvent(r), o = this.context, a = this.computeFutureIndex(n, r);
2761
+ Object.assign(o, { futureIndex: a });
2762
+ const l = Object.assign({}, r, {
2763
+ relatedContext: n,
2764
+ draggedContext: o
2765
+ });
2766
+ return t(l, e);
2767
+ },
2768
+ onDragEnd() {
2769
+ this.computeIndexes(), Lt = null;
2770
+ },
2771
+ getTrargetedComponent(r) {
2772
+ return r.__draggable_component__;
2773
+ },
2774
+ getRelatedContextFromMoveEvent({ to: r, related: e }) {
2775
+ const t = this.getTrargetedComponent(r);
2776
+ if (!t)
2777
+ return { component: t };
2778
+ const n = t.realList, o = { list: n, component: t };
2779
+ if (r !== e && n && t.getUnderlyingVm) {
2780
+ const a = t.getUnderlyingVm(e);
2781
+ if (a)
2782
+ return Object.assign(a, o);
2783
+ }
2784
+ return o;
2785
+ },
2786
+ computeFutureIndex(r, e) {
2787
+ const t = [...e.to.children].filter((l) => l.style.display !== "none");
2788
+ if (t.length === 0)
2789
+ return 0;
2790
+ const n = t.indexOf(e.related), o = r.component.getVmIndex(n);
2791
+ return t.indexOf(Lt) !== -1 || !e.willInsertAfter ? o : o + 1;
2792
+ }
2793
+ }
2794
+ }), qo = { class: "inline-flex [&>div]:ml-[-1px] first:[&>div]:ml-0" }, Qo = /* @__PURE__ */ I({
2795
+ __name: "icontool",
2796
+ props: {
2797
+ gridCtrl: {}
2798
+ },
2799
+ setup(r) {
2800
+ const e = r, t = e.gridCtrl, { tools: n } = hr(e.gridCtrl), o = Cn();
2801
+ M(
2802
+ () => t.selectable.value,
2803
+ (s) => {
2804
+ st(n, "tool.export.excel.selected") && (st(n, "tool.export.excel.selected").disabled = !s), st(n, "tool.export.pdf.selected") && (st(n, "tool.export.pdf.selected").disabled = !s);
2805
+ }
2806
+ );
2807
+ const a = D([]);
2808
+ M(
2809
+ () => t.columns.value,
2810
+ (s) => {
2811
+ a.value = Pn(s, !0);
2812
+ },
2813
+ { deep: !0, immediate: !0 }
2814
+ );
2815
+ const l = () => {
2816
+ t.columns.value.splice(0, t.columns.value.length, ...a.value), o.setTableColumns(gr.currentRoute.value.path, t.columns.value);
2817
+ };
2818
+ return (s, c) => (g(), P("div", qo, [
2819
+ (g(!0), P(ne, null, xe(u(n), (d, f) => (g(), P(ne, {
2820
+ key: d.key
2821
+ }, [
2822
+ u(Ye)(d) && d.dropdown ? (g(), C(u(Rt), {
2823
+ key: 0,
2824
+ placement: "bottomRight",
2825
+ class: "p-0 rounded-none"
2826
+ }, {
2827
+ overlay: b(() => [
2828
+ R("div", {
2829
+ class: le(["min-w-[100px] bg-white rounded shadow-md p-4", d.dropdownClass])
2830
+ }, [
2831
+ d.dropdown === "headset" ? (g(), C(u(Go), {
2832
+ key: 0,
2833
+ modelValue: a.value,
2834
+ "onUpdate:modelValue": c[1] || (c[1] = (i) => a.value = i),
2835
+ "item-key": "dataIndex",
2836
+ onEnd: l,
2837
+ handle: ".drag-handle"
2838
+ }, {
2839
+ default: b(() => [
2840
+ (g(!0), P(ne, null, xe(a.value, (i) => (g(), P("div", {
2841
+ key: i.name,
2842
+ onClick: c[0] || (c[0] = nt(() => {
2843
+ }, ["stop"])),
2844
+ class: "flex items-center mb-2 last:mb-0 select-none"
2845
+ }, [
2846
+ c[2] || (c[2] = R("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
2847
+ k(u(Ar), {
2848
+ checked: i.visible !== !1,
2849
+ onChange: nt(
2850
+ (p) => {
2851
+ u(mr)(i, p.target.checked);
2852
+ },
2853
+ ["stop", "prevent"]
2854
+ ),
2855
+ class: "text-gray-700 hover:text-gray-900 select-none"
2856
+ }, {
2857
+ default: b(() => [
2858
+ G(X(i.title), 1)
2859
+ ]),
2860
+ _: 2
2861
+ }, 1032, ["checked", "onChange"])
2862
+ ]))), 128))
2863
+ ]),
2864
+ _: 1
2865
+ }, 8, ["modelValue"])) : O("", !0)
2866
+ ], 2)
2867
+ ]),
2868
+ default: b(() => [
2869
+ k(u(ie), {
2870
+ class: le([
2871
+ "px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
2872
+ f === 0 ? "rounded-l-[5px]" : "",
2873
+ f === u(n).length - 1 ? "rounded-r-[5px]" : ""
2874
+ ]),
2875
+ disabled: u($e)(d),
2876
+ tiptext: d.label,
2877
+ onClick: (i) => u(Ce)(d, u(t).page, u(t))
2878
+ }, {
2879
+ default: b(() => [
2880
+ k(u(we), {
2881
+ icon: d.icon,
2882
+ class: "w-[18px] h-[18.5px]",
2883
+ clickable: ""
2884
+ }, null, 8, ["icon"])
2885
+ ]),
2886
+ _: 2
2887
+ }, 1032, ["class", "disabled", "tiptext", "onClick"])
2888
+ ]),
2889
+ _: 2
2890
+ }, 1024)) : !d.children && u(Ye)(d) ? (g(), C(u(ie), {
2891
+ key: 1,
2892
+ class: le([
2893
+ "px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
2894
+ f === 0 ? "rounded-l-[5px]" : "",
2895
+ f === u(n).length - 1 ? "rounded-r-[5px]" : ""
2896
+ ]),
2897
+ disabled: u($e)(d),
2898
+ tiptext: d.label,
2899
+ onClick: (i) => u(Ce)(d, u(t).page, u(t))
2900
+ }, {
2901
+ default: b(() => [
2902
+ k(u(we), {
2903
+ icon: d.icon,
2904
+ class: "w-[18px] h-[18.5px]",
2905
+ clickable: ""
2906
+ }, null, 8, ["icon"])
2907
+ ]),
2908
+ _: 2
2909
+ }, 1032, ["class", "disabled", "tiptext", "onClick"])) : u(Ye)(d) ? (g(), C(u(Rt), {
2910
+ key: 2,
2911
+ placement: "bottomRight",
2912
+ class: "p-0 rounded-none"
2913
+ }, {
2914
+ overlay: b(() => [
2915
+ k(u(Gt), null, {
2916
+ default: b(() => [
2917
+ (g(!0), P(ne, null, xe(d.children, (i) => (g(), C(u(qt), {
2918
+ key: i.key,
2919
+ disabled: u($e)(i)
2920
+ }, {
2921
+ default: b(() => [
2922
+ G(X(i.label), 1)
2923
+ ]),
2924
+ _: 2
2925
+ }, 1032, ["disabled"]))), 128))
2926
+ ]),
2927
+ _: 2
2928
+ }, 1024)
2929
+ ]),
2930
+ default: b(() => [
2931
+ k(u(ie), {
2932
+ class: le([
2933
+ "!w-[46px] px-[5px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
2934
+ f === 0 ? "rounded-l-[5px]" : ""
2935
+ ]),
2936
+ disabled: u($e)(d),
2937
+ tiptext: d.label,
2938
+ icon: d.icon,
2939
+ iconProps: { class: "w-[19px] h-[19px]" },
2940
+ onClick: (i) => u(Ce)(d, u(t).page, u(t))
2941
+ }, {
2942
+ default: b(() => [
2943
+ k(u(we), {
2944
+ icon: "icon-down-arrow",
2945
+ class: "w-[12px] h-[12px]"
2946
+ })
2947
+ ]),
2948
+ _: 2
2949
+ }, 1032, ["class", "disabled", "tiptext", "icon", "onClick"])
2950
+ ]),
2951
+ _: 2
2952
+ }, 1024)) : O("", !0)
2953
+ ], 64))), 128))
2954
+ ]));
2955
+ }
2956
+ }), Jo = { class: "flex justify-between mb-[10px]" }, Zo = { key: 1 }, ea = 3, ta = /* @__PURE__ */ I({
2957
+ __name: "index",
2958
+ props: {
2959
+ gridCtrl: {},
2960
+ editorCtrl: {}
2961
+ },
2962
+ setup(r) {
2963
+ const e = r, t = e.gridCtrl, n = t.page, o = e.editorCtrl, a = [
2964
+ {
2965
+ key: "New",
2966
+ label: "新增",
2967
+ type: "primary",
2968
+ icon: "icon-new",
2969
+ danger: !0,
2970
+ permit: ":new",
2971
+ // 默认仅受权限码控制
2972
+ click: () => vr(o)
2973
+ }
2974
+ ], l = D([]), s = D([]);
2975
+ return M(
2976
+ () => {
2977
+ var c;
2978
+ return (c = t.buttons) == null ? void 0 : c.value;
2979
+ },
2980
+ () => {
2981
+ var f;
2982
+ const { buttons: c, menus: d } = $n(
2983
+ a,
2984
+ t.flat !== void 0 ? t.flat : ea,
2985
+ (f = t.buttons) == null ? void 0 : f.value
2986
+ );
2987
+ l.value.splice(0, l.value.length, ...c), s.value.splice(0, s.value.length, ...d);
2988
+ },
2989
+ {
2990
+ deep: !0,
2991
+ immediate: !0
2992
+ }
2993
+ ), (c, d) => {
2994
+ const f = Pe("role"), i = Pe("permit");
2995
+ return g(), P("div", Jo, [
2996
+ k(u(rt), null, {
2997
+ default: b(() => [
2998
+ (g(!0), P(ne, null, xe(l.value, (p) => Ae((g(), C(u(ie), {
2999
+ key: p.key,
3000
+ type: p.type,
3001
+ danger: p.danger,
3002
+ disabled: u($e)(p),
3003
+ icon: p.icon,
3004
+ onClick: (h) => u(Ce)(p, u(n), u(t))
3005
+ }, {
3006
+ default: b(() => [
3007
+ G(X(p.label), 1)
3008
+ ]),
3009
+ _: 2
3010
+ }, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
3011
+ [f, p.role],
3012
+ [i, p.permit]
3013
+ ])), 128)),
3014
+ s.value.length > 0 ? (g(), C(u(Rt), { key: 0 }, {
3015
+ overlay: b(() => [
3016
+ k(u(Gt), null, {
3017
+ default: b(() => [
3018
+ (g(!0), P(ne, null, xe(s.value, (p) => Ae((g(), C(u(qt), {
3019
+ key: p.key,
3020
+ disabled: u($e)(p),
3021
+ onClick: (h) => u(Ce)(p, u(n), u(t))
3022
+ }, {
3023
+ default: b(() => [
3024
+ G(X(p.label), 1)
3025
+ ]),
3026
+ _: 2
3027
+ }, 1032, ["disabled", "onClick"])), [
3028
+ [f, p.role],
3029
+ [i, p.permit]
3030
+ ])), 128))
3031
+ ]),
3032
+ _: 1
3033
+ })
3034
+ ]),
3035
+ default: b(() => [
3036
+ k(u(ie), null, {
3037
+ default: b(() => d[0] || (d[0] = [
3038
+ G(" 更多操作 ")
3039
+ ])),
3040
+ _: 1,
3041
+ __: [0]
3042
+ })
3043
+ ]),
3044
+ _: 1
3045
+ })) : O("", !0),
3046
+ l.value.length === 0 && s.value.length === 0 ? (g(), P("span", Zo)) : O("", !0)
3047
+ ]),
3048
+ _: 1
3049
+ }),
3050
+ k(u(rt), { class: "mr-1" }, {
3051
+ default: b(() => [
3052
+ (g(), C(ar(Qo), { "grid-ctrl": u(t) }, null, 8, ["grid-ctrl"]))
3053
+ ]),
3054
+ _: 1
3055
+ })
3056
+ ]);
3057
+ };
3058
+ }
3059
+ }), Ra = /* @__PURE__ */ I({
3060
+ inheritAttrs: !1,
3061
+ __name: "index",
3062
+ props: {
3063
+ gridCtrl: {},
3064
+ primaryKey: {},
3065
+ tableData: {},
3066
+ rowSelection: {},
3067
+ pagination: { type: [Boolean, Object] },
3068
+ scroll: {},
3069
+ statusDisabled: { type: Function }
3070
+ },
3071
+ setup(r) {
3072
+ const e = r, t = je(), n = e.gridCtrl;
3073
+ n && (n.pageNo.value = 1, n.total.value = 0, n.pageSize.value = n.pageSize.value);
3074
+ const o = D(n.pageSize.value), a = D(n.pageNo.value), l = D([]), s = D({
3075
+ total: 0,
3076
+ current: 1,
3077
+ pageSize: o.value,
3078
+ showTotal: (p) => `共 ${p} 条记录`,
3079
+ onChange: (p, h) => {
3080
+ s.value.current = p, s.value.pageSize = h, o.value = h, a.value = p, n && (n.pageNo.value = p, n.pageSize.value = h, n.remotePage && an(n));
3081
+ },
3082
+ ...e.pagination
3083
+ });
3084
+ M(
3085
+ () => n.tableData.value,
3086
+ (p) => {
3087
+ p && (l.value = p, s.value.total = n.total.value ?? 0);
3088
+ },
3089
+ { immediate: !0 }
3090
+ ), M(
3091
+ () => e.tableData,
3092
+ (p) => {
3093
+ p && (l.value = p, s.value.total = p.length);
3094
+ },
3095
+ { immediate: !0 }
3096
+ );
3097
+ const c = D(n.columns.value), d = {
3098
+ onChange: (p, h) => {
3099
+ n && (n.selectKeys.value = p, n.selectRows.value = h);
3100
+ },
3101
+ columnWidth: "30px",
3102
+ getCheckboxProps: (p) => ({
3103
+ disabled: p.Enabled === 0
3104
+ }),
3105
+ ...e.rowSelection
3106
+ }, f = D(d);
3107
+ M(
3108
+ () => n.selectable.value,
3109
+ (p) => {
3110
+ n && (f.value = p ? d : void 0);
3111
+ },
3112
+ { immediate: !0 }
3113
+ ), M(
3114
+ () => n.columns.value,
3115
+ () => {
3116
+ c.value = Pn(n.columns.value);
3117
+ },
3118
+ { deep: !0, immediate: !0 }
3119
+ );
3120
+ const i = D(!1);
3121
+ return lr(() => {
3122
+ i.value && n && (n.reload.value = !0);
3123
+ }), de(async () => {
3124
+ xn(ot.GridControl, n), n.tableData.value ? (l.value = n.tableData.value, n.total.value = l.value.length, s.value.total = n.total.value ?? 0) : n.autoload !== !1 && (n.remotePage ? l.value = (await an(n)).rows : l.value = await br(n)), setTimeout(() => {
3125
+ i.value = !0;
3126
+ }, 50);
3127
+ }), (p, h) => {
3128
+ var w, $;
3129
+ const v = Pe("permit");
3130
+ return g(), P(ne, null, [
3131
+ (w = u(n).buttons) != null && w.value.length || ($ = u(n).tools) != null && $.length ? (g(), C(ta, {
3132
+ key: 0,
3133
+ "grid-ctrl": u(n),
3134
+ "editor-ctrl": u(n).editor
3135
+ }, null, 8, ["grid-ctrl", "editor-ctrl"])) : O("", !0),
3136
+ i.value ? (g(), C(u(Nn), V({
3137
+ key: 1,
3138
+ class: "w-full",
3139
+ "row-key": e.primaryKey ?? u(n).primaryKey ?? "Id",
3140
+ "data-source": l.value,
3141
+ loading: u(n).isGridLoading.value,
3142
+ columns: c.value,
3143
+ pagination: s.value,
3144
+ "row-selection": f.value,
3145
+ scroll: e.scroll || { x: 700, y: 1e3 },
3146
+ size: u(n).tableSize.value,
3147
+ bordered: ""
3148
+ }, u(t)), {
3149
+ bodyCell: b((x) => {
3150
+ var A, L;
3151
+ return [
3152
+ H(p.$slots, "bodyCell", {
3153
+ column: x == null ? void 0 : x.column,
3154
+ record: x == null ? void 0 : x.record
3155
+ }),
3156
+ u(n) && ((A = x == null ? void 0 : x.column) == null ? void 0 : A.dataIndex) === "enabled" ? Ae((g(), C(qr, {
3157
+ key: 0,
3158
+ checked: x.record.Enabled,
3159
+ "onUpdate:checked": (q) => x.record.Enabled = q,
3160
+ disabled: p.statusDisabled ? p.statusDisabled(x.record) : !1,
3161
+ data: u(Sn).EnableDisable,
3162
+ onClick: (q) => u(_r)(u(n), x.record),
3163
+ class: le([
3164
+ "w-[58px]",
3165
+ p.statusDisabled && p.statusDisabled(x.record) ? "cursor-not-allowed disabled" : ""
3166
+ ]),
3167
+ loading: x == null ? void 0 : x.record.isLoading
3168
+ }, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"])), [
3169
+ [v, ":enabled", "disable"]
3170
+ ]) : O("", !0),
3171
+ u(n) && ((L = x == null ? void 0 : x.column) == null ? void 0 : L.dataIndex) === "operation" ? H(p.$slots, "operate", {
3172
+ key: 1,
3173
+ record: x == null ? void 0 : x.record
3174
+ }, () => [
3175
+ k(so, {
3176
+ record: x == null ? void 0 : x.record,
3177
+ "grid-ctrl": u(n)
3178
+ }, null, 8, ["record", "grid-ctrl"])
3179
+ ]) : O("", !0)
3180
+ ];
3181
+ }),
3182
+ _: 3
3183
+ }, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) : O("", !0)
3184
+ ], 64);
3185
+ };
3186
+ }
3187
+ }), na = { class: "flex items-center gap-1" }, ra = { class: "text-nowrap" }, za = /* @__PURE__ */ I({
3188
+ __name: "index",
3189
+ props: {
3190
+ treeCtrl: {},
3191
+ selectedKeys: {},
3192
+ expandedKeys: {}
3193
+ },
3194
+ emits: ["select", "update:selectedKeys"],
3195
+ setup(r, { emit: e }) {
3196
+ const t = r, n = je(), o = t.treeCtrl, a = D([]);
3197
+ M(
3198
+ () => o.data.value,
3199
+ (f) => {
3200
+ f && (a.value = o.fieldMap ? bt(o.fieldMap, f) : f, d(t.selectedKeys ?? []));
3201
+ }
3202
+ );
3203
+ const l = e, s = D([]);
3204
+ M(
3205
+ () => t.selectedKeys,
3206
+ (f) => {
3207
+ f && (s.value = f);
3208
+ },
3209
+ { immediate: !0 }
3210
+ );
3211
+ const c = D(["-"]);
3212
+ M(
3213
+ () => t.expandedKeys,
3214
+ (f) => {
3215
+ f && (c.value = f);
3216
+ },
3217
+ { immediate: !0 }
3218
+ );
3219
+ const d = (f, i) => {
3220
+ f.length === 0 && f.push(...s.value), f.length > 0 && (o.node.value = i == null ? void 0 : i.node.dataRef), s.value = f, l("update:selectedKeys", f), l("select", f, i);
3221
+ };
3222
+ return de(() => {
3223
+ o.fieldMap || (o.fieldMap = {
3224
+ label: "Name",
3225
+ key: "Id",
3226
+ value: "Id",
3227
+ icon: "Icon"
3228
+ }), o.data.value ? a.value = bt(o.fieldMap, o.data.value) : o.autoload && kn(o);
3229
+ }), (f, i) => (g(), C(u(Nr), V({
3230
+ class: "w-full",
3231
+ "show-line": !0,
3232
+ "tree-data": a.value,
3233
+ "expanded-keys": c.value,
3234
+ "onUpdate:expandedKeys": i[0] || (i[0] = (p) => c.value = p),
3235
+ "selected-keys": s.value,
3236
+ loading: u(o).isTreeLoading,
3237
+ onSelect: d
3238
+ }, u(n)), {
3239
+ title: b(({ key: p, label: h, icon: v }) => [
3240
+ H(f.$slots, "title", {
3241
+ label: h,
3242
+ key: p,
3243
+ icon: v
3244
+ }, () => [
3245
+ R("div", na, [
3246
+ k(u(we), { icon: v }, null, 8, ["icon"]),
3247
+ R("span", ra, X(h), 1)
3248
+ ])
3249
+ ])
3250
+ ]),
3251
+ _: 3
3252
+ }, 16, ["tree-data", "expanded-keys", "selected-keys", "loading"]));
3253
+ }
3254
+ }), oa = { class: "relative h-[calc(100vh-80px)] overflow-y-auto" }, aa = { class: "flex w-full h-full min-h-full" }, la = {
3255
+ key: 0,
3256
+ class: "w-1/4 pr-4 min-h-full min-w-[170px] max-w-[200px]"
3257
+ }, ia = { class: "flex-1 h-full overflow-y-auto" }, ja = /* @__PURE__ */ I({
3258
+ __name: "index",
3259
+ props: {
3260
+ left: { type: Boolean }
3261
+ },
3262
+ setup(r) {
3263
+ const { useToken: e } = Mn, { token: t } = e();
3264
+ return (n, o) => (g(), P("div", oa, [
3265
+ k(u(Mr), {
3266
+ class: "m-[10px] p-[10px] h-[calc(100vh-100px)] !min-h-[calc(100vh-100px)]",
3267
+ style: Wt({
3268
+ backgroundColor: u(t).colorBgContainer
3269
+ })
3270
+ }, {
3271
+ default: b(() => [
3272
+ R("div", aa, [
3273
+ n.left ? (g(), P("div", la, [
3274
+ H(n.$slots, "left")
3275
+ ])) : O("", !0),
3276
+ R("div", ia, [
3277
+ H(n.$slots, "default")
3278
+ ])
3279
+ ])
3280
+ ]),
3281
+ _: 3
3282
+ }, 8, ["style"])
3283
+ ]));
3284
+ }
3285
+ }), sa = { class: "font-['Courier'] text-[#666]" }, Ua = /* @__PURE__ */ I({
3286
+ __name: "index",
3287
+ setup(r) {
3288
+ const e = D("");
3289
+ return de(() => {
3290
+ setInterval(() => {
3291
+ const t = /* @__PURE__ */ new Date(), n = { month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }, o = t.toLocaleString(void 0, n).replace(/\//g, "-").replace(",", "");
3292
+ e.value = t.getFullYear() + "-" + o;
3293
+ }, 1e3);
3294
+ }), (t, n) => (g(), P("div", sa, X(e.value), 1));
3295
+ }
3296
+ });
3297
+ export {
3298
+ Ka as AppIcon,
3299
+ xa as AutoComplete,
3300
+ Ga as BasicLayout,
3301
+ qa as Breadcrumb,
3302
+ ie as Button,
3303
+ Ca as Cascader,
3304
+ Ea as Checkbox,
3305
+ ja as Content,
3306
+ Da as DatePicker,
3307
+ Ua as Datetime,
3308
+ ol as Dialog,
3309
+ Fa as Drawer,
3310
+ cl as Error403,
3311
+ pl as Error404,
3312
+ ul as ExcelForm,
3313
+ Ba as Form,
3314
+ La as FormItem,
3315
+ ya as Fullscreen,
3316
+ Qa as Header,
3317
+ Ja as HeaderExits,
3318
+ Yr as Helper,
3319
+ Za as Icon,
3320
+ Qo as Icontool,
3321
+ Xr as Input,
3322
+ Sa as InputIcon,
3323
+ ka as InputNumber,
3324
+ Ta as InputPassword,
3325
+ wa as LayoutIcon,
3326
+ el as Menu,
3327
+ tl as MenuTabs,
3328
+ nl as ProjectIcon,
3329
+ Ia as PropEditor,
3330
+ Gr as Radio,
3331
+ Oa as RadioStatus,
3332
+ $a as RangePicker,
3333
+ Ya as Search,
3334
+ Tt as SearchItem,
3335
+ Pa as Select,
3336
+ qr as Switch,
3337
+ Ra as Table,
3338
+ so as TableOperate,
3339
+ Aa as Textarea,
3340
+ we as ToolIcon,
3341
+ ta as Toolbar,
3342
+ Va as Tooltip,
3343
+ Qr as Transfer,
3344
+ Na as TransferTable,
3345
+ za as Tree,
3346
+ Ma as TreeSelect,
3347
+ ll as UploadForm,
3348
+ il as UploadList
3349
+ };