@maxax/ui 1.0.10 → 1.0.12

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 (50) hide show
  1. package/dist/component.d.ts.map +1 -1
  2. package/dist/components/app-common/better-scroll.vue.d.ts +24 -0
  3. package/dist/components/app-common/better-scroll.vue.d.ts.map +1 -0
  4. package/dist/components/app-common/button-icon.vue.d.ts +28 -0
  5. package/dist/components/app-common/button-icon.vue.d.ts.map +1 -0
  6. package/dist/components/app-common/full-screen.vue.d.ts +6 -0
  7. package/dist/components/app-common/full-screen.vue.d.ts.map +1 -0
  8. package/dist/components/app-common/icon-tooltip.vue.d.ts +23 -0
  9. package/dist/components/app-common/icon-tooltip.vue.d.ts.map +1 -0
  10. package/dist/components/app-common/index.d.ts +16 -0
  11. package/dist/components/app-common/index.d.ts.map +1 -0
  12. package/dist/components/app-common/menu-toggler.vue.d.ts +13 -0
  13. package/dist/components/app-common/menu-toggler.vue.d.ts.map +1 -0
  14. package/dist/components/app-common/pin-toggler.vue.d.ts +6 -0
  15. package/dist/components/app-common/pin-toggler.vue.d.ts.map +1 -0
  16. package/dist/components/app-common/reload-button.vue.d.ts +6 -0
  17. package/dist/components/app-common/reload-button.vue.d.ts.map +1 -0
  18. package/dist/components/basic-button-action/BasicButtonImport.vue.d.ts +2 -2
  19. package/dist/components/basic-cascader/BasicCascader.vue.d.ts +1 -1
  20. package/dist/components/basic-drawer/BasicDrawer.vue.d.ts +1 -1
  21. package/dist/components/basic-json-viewer/components/TreeNode.d.ts +1 -1
  22. package/dist/components/basic-message-box/BasicMessageBox.vue.d.ts +2 -2
  23. package/dist/components/basic-radio-group/BasicRadioGroup.d.ts +1 -1
  24. package/dist/components/basic-region-select/BasicRegionSelect.d.ts +6 -6
  25. package/dist/components/basic-select/BasicSelect.vue.d.ts +1 -1
  26. package/dist/components/basic-svg-icon/interface.d.ts +1 -1
  27. package/dist/components/basic-svg-icon/interface.d.ts.map +1 -1
  28. package/dist/components/basic-upload/BasicUpload.d.ts +2 -2
  29. package/dist/components/basic-upload-core/AjaxUploader.d.ts +3 -3
  30. package/dist/components/basic-upload-core/BasicUploadCore.d.ts +3 -3
  31. package/dist/components/index.d.ts +1 -0
  32. package/dist/components/index.d.ts.map +1 -1
  33. package/dist/components/tree-drop/TreeDrop.vue.d.ts +1 -1
  34. package/dist/index.cjs +2337 -1960
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.mjs +2334 -1957
  37. package/dist/index.mjs.map +1 -1
  38. package/dist/locale/lang/en.d.ts.map +1 -1
  39. package/dist/locale/lang/zh-cn.d.ts.map +1 -1
  40. package/dist/locales.cjs +11 -1
  41. package/dist/locales.cjs.map +1 -1
  42. package/dist/locales.mjs +11 -1
  43. package/dist/locales.mjs.map +1 -1
  44. package/dist/{utils-D_olU8qE.cjs → utils-DRBSpYf4.cjs} +11 -1
  45. package/dist/utils-DRBSpYf4.cjs.map +1 -0
  46. package/dist/{utils-JnUSPc85.js → utils-WrckZ9PX.js} +11 -1
  47. package/dist/utils-WrckZ9PX.js.map +1 -0
  48. package/package.json +4 -3
  49. package/dist/utils-D_olU8qE.cjs.map +0 -1
  50. package/dist/utils-JnUSPc85.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -2,1029 +2,1579 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const utils = require("@maxax/utils");
4
4
  const vue = require("vue");
5
+ const BScroll = require("@better-scroll/core");
5
6
  const naiveUi = require("naive-ui");
7
+ const utils$1 = require("./utils-DRBSpYf4.cjs");
6
8
  const lodashEs = require("lodash-es");
7
- const utils$1 = require("./utils-D_olU8qE.cjs");
8
9
  const hooks = require("@maxax/hooks");
9
10
  const dateFns = require("date-fns");
10
11
  const dayjs = require("dayjs");
11
12
  const vxePcUi = require("vxe-pc-ui");
12
13
  const vxeTable = require("vxe-table");
13
14
  const elementResizeDetectorMaker = require("element-resize-detector");
14
- const isStringNumber = (val) => {
15
- if (!utils.isString(val)) {
16
- return false;
17
- }
18
- return !Number.isNaN(Number(val));
19
- };
20
- let scrollBarWidth;
21
- const getScrollBarWidth = (namespace) => {
22
- var _a;
23
- if (scrollBarWidth !== void 0) return scrollBarWidth;
24
- const outer = document.createElement("div");
25
- outer.className = `${namespace}-scrollbar__wrap`;
26
- outer.style.visibility = "hidden";
27
- outer.style.width = "100px";
28
- outer.style.position = "absolute";
29
- outer.style.top = "-9999px";
30
- document.body.appendChild(outer);
31
- const widthNoScroll = outer.offsetWidth;
32
- outer.style.overflow = "scroll";
33
- const inner = document.createElement("div");
34
- inner.style.width = "100%";
35
- outer.appendChild(inner);
36
- const widthWithScroll = inner.offsetWidth;
37
- (_a = outer.parentNode) == null ? void 0 : _a.removeChild(outer);
38
- scrollBarWidth = widthNoScroll - widthWithScroll;
39
- return scrollBarWidth;
40
- };
41
- const getStyle = (element, styleName) => {
42
- var _a;
43
- if (!element || !styleName) return "";
44
- let key2 = utils.camelize(styleName);
45
- if (key2 === "float") key2 = "cssFloat";
46
- try {
47
- const style = element.style[key2];
48
- if (style) return style;
49
- const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, "");
50
- return computed ? computed[key2] : "";
51
- } catch {
52
- return element.style[key2];
15
+ function tryOnScopeDispose(fn, failSilently) {
16
+ if (vue.getCurrentScope()) {
17
+ vue.onScopeDispose(fn, failSilently);
18
+ return true;
53
19
  }
20
+ return false;
21
+ }
22
+ const isClient = typeof window !== "undefined" && typeof document !== "undefined";
23
+ typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
24
+ const toString = Object.prototype.toString;
25
+ const isObject = (val) => toString.call(val) === "[object Object]";
26
+ const noop = () => {
54
27
  };
55
- function addUnit(value, defaultUnit = "px") {
56
- if (!value) return "";
57
- if (utils.isNumber(value) || isStringNumber(value)) {
58
- return `${value}${defaultUnit}`;
59
- } else if (utils.isString(value)) {
60
- return value;
28
+ function createFilterWrapper(filter, fn) {
29
+ function wrapper(...args) {
30
+ return new Promise((resolve, reject) => {
31
+ Promise.resolve(filter(() => fn.apply(this, args), {
32
+ fn,
33
+ thisArg: this,
34
+ args
35
+ })).then(resolve).catch(reject);
36
+ });
61
37
  }
62
- throw new Error("binding value must be a string or number");
38
+ return wrapper;
63
39
  }
64
- const getTransitionProps = (transitionName, opt = {}) => {
65
- const transitionConfig = {
66
- name: transitionName,
67
- appear: true,
68
- // type: 'animation',
69
- // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
70
- // appearActiveClass: `antdv-base-transtion`,
71
- // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
72
- enterFromClass: `${transitionName}-enter ${transitionName}-enter-prepare ${transitionName}-enter-start`,
73
- enterActiveClass: `${transitionName}-enter ${transitionName}-enter-prepare`,
74
- enterToClass: `${transitionName}-enter ${transitionName}-enter-active`,
75
- leaveFromClass: ` ${transitionName}-leave`,
76
- leaveActiveClass: `${transitionName}-leave ${transitionName}-leave-active`,
77
- leaveToClass: `${transitionName}-leave ${transitionName}-leave-active`,
78
- ...opt
79
- };
80
- const transitionProps = transitionName ? transitionConfig : { css: false, ...opt };
81
- return transitionProps;
82
- };
83
- const getTransitionGroupProps = (transitionName, opt = {}) => {
84
- const transitionConfig = {
85
- name: transitionName,
86
- appear: true,
87
- // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
88
- appearActiveClass: `${transitionName}`,
89
- appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
90
- enterFromClass: `${transitionName}-appear ${transitionName}-enter ${transitionName}-appear-prepare ${transitionName}-enter-prepare`,
91
- enterActiveClass: `${transitionName}`,
92
- enterToClass: `${transitionName}-enter ${transitionName}-appear ${transitionName}-appear-active ${transitionName}-enter-active`,
93
- leaveActiveClass: `${transitionName} ${transitionName}-leave`,
94
- leaveToClass: `${transitionName}-leave-active`,
95
- ...opt
40
+ function debounceFilter(ms, options = {}) {
41
+ let timer;
42
+ let maxTimer;
43
+ let lastRejector = noop;
44
+ const _clearTimeout = (timer$1) => {
45
+ clearTimeout(timer$1);
46
+ lastRejector();
47
+ lastRejector = noop;
96
48
  };
97
- const transitionProps = transitionName ? transitionConfig : { css: false, ...opt };
98
- return transitionProps;
99
- };
100
- const collapseMotion = (name = "ant-motion-collapse", appear = true) => {
101
- return {
102
- name,
103
- appear,
104
- css: true,
105
- onBeforeEnter: (el) => {
106
- const node = el;
107
- node.style.height = "0px";
108
- node.style.opacity = "0";
109
- utils.addClass(node, name);
110
- },
111
- onEnter: (el) => {
112
- const node = el;
113
- vue.nextTick(() => {
114
- node.style.height = `${node.scrollHeight}px`;
115
- node.style.opacity = "1";
116
- });
117
- },
118
- onAfterEnter: (el) => {
119
- const node = el;
120
- if (node) {
121
- utils.removeClass(node, name);
122
- node.style.height = null;
123
- node.style.opacity = null;
124
- }
125
- },
126
- onBeforeLeave: (el) => {
127
- const node = el;
128
- utils.addClass(node, name);
129
- node.style.height = `${node.offsetHeight}px`;
130
- node.style.opacity = null;
131
- },
132
- onLeave: (el) => {
133
- const node = el;
134
- setTimeout(() => {
135
- node.style.height = "0px";
136
- node.style.opacity = "0";
137
- });
138
- },
139
- onAfterLeave: (el) => {
140
- const node = el;
141
- if (node) {
142
- utils.removeClass(node, name);
143
- if (node.style) {
144
- node.style.height = null;
145
- node.style.opacity = null;
146
- }
49
+ let lastInvoker;
50
+ const filter = (invoke$1) => {
51
+ const duration = vue.toValue(ms);
52
+ const maxDuration = vue.toValue(options.maxWait);
53
+ if (timer) _clearTimeout(timer);
54
+ if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
55
+ if (maxTimer) {
56
+ _clearTimeout(maxTimer);
57
+ maxTimer = void 0;
147
58
  }
59
+ return Promise.resolve(invoke$1());
148
60
  }
61
+ return new Promise((resolve, reject) => {
62
+ lastRejector = options.rejectOnCancel ? reject : resolve;
63
+ lastInvoker = invoke$1;
64
+ if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
65
+ if (timer) _clearTimeout(timer);
66
+ maxTimer = void 0;
67
+ resolve(lastInvoker());
68
+ }, maxDuration);
69
+ timer = setTimeout(() => {
70
+ if (maxTimer) _clearTimeout(maxTimer);
71
+ maxTimer = void 0;
72
+ resolve(invoke$1());
73
+ }, duration);
74
+ });
149
75
  };
150
- };
151
- function isEmptyElement(c) {
152
- return c && (c.type === vue.Comment || c.type === vue.Fragment && c.children.length === 0 || c.type === vue.Text && c.children.trim() === "");
76
+ return filter;
153
77
  }
154
- function filterEmpty(children = []) {
155
- const res = [];
156
- children.forEach((child) => {
157
- if (Array.isArray(child)) {
158
- res.push(...child);
159
- } else if ((child == null ? void 0 : child.type) === vue.Fragment) {
160
- res.push(...filterEmpty(child.children));
161
- } else {
162
- res.push(child);
163
- }
78
+ function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
79
+ return new Promise((resolve, reject) => {
80
+ if (throwOnTimeout) setTimeout(() => reject(reason), ms);
81
+ else setTimeout(resolve, ms);
164
82
  });
165
- return res.filter((c) => !isEmptyElement(c));
166
83
  }
167
- const isValid = (value) => {
168
- return value !== void 0 && value !== null && value !== "";
169
- };
170
- const skipFlattenKey = Symbol("skipFlatten");
171
- const flattenChildren = (children = [], fe = true) => {
172
- const temp = Array.isArray(children) ? children : [children];
173
- const res = [];
174
- temp.forEach((child) => {
175
- if (Array.isArray(child)) {
176
- res.push(...flattenChildren(child, fe));
177
- } else if (child && child.type === vue.Fragment) {
178
- if (child.key === skipFlattenKey) {
179
- res.push(child);
180
- } else {
181
- res.push(...flattenChildren(child.children, fe));
182
- }
183
- } else if (child && vue.isVNode(child)) {
184
- if (fe && !isEmptyElement(child)) {
185
- res.push(child);
186
- } else if (!fe) {
187
- res.push(child);
188
- }
189
- } else if (isValid(child)) {
190
- res.push(child);
84
+ function identity(arg) {
85
+ return arg;
86
+ }
87
+ function toArray(value) {
88
+ return Array.isArray(value) ? value : [value];
89
+ }
90
+ function getLifeCycleTarget(target) {
91
+ return vue.getCurrentInstance();
92
+ }
93
+ // @__NO_SIDE_EFFECTS__
94
+ function useDebounceFn(fn, ms = 200, options = {}) {
95
+ return createFilterWrapper(debounceFilter(ms, options), fn);
96
+ }
97
+ function tryOnMounted(fn, sync = true, target) {
98
+ if (getLifeCycleTarget()) vue.onMounted(fn, target);
99
+ else if (sync) fn();
100
+ else vue.nextTick(fn);
101
+ }
102
+ function tryOnUnmounted(fn, target) {
103
+ if (getLifeCycleTarget()) vue.onUnmounted(fn, target);
104
+ }
105
+ function useTimeoutFn(cb, interval, options = {}) {
106
+ const { immediate = true, immediateCallback = false } = options;
107
+ const isPending = vue.shallowRef(false);
108
+ let timer;
109
+ function clear() {
110
+ if (timer) {
111
+ clearTimeout(timer);
112
+ timer = void 0;
191
113
  }
192
- });
193
- return res;
194
- };
195
- const useDraggable = (targetRef, dragRef, draggable, overflow) => {
196
- let transform = {
197
- offsetX: 0,
198
- offsetY: 0
199
- };
200
- const onMousedown = (e) => {
201
- const downX = e.clientX;
202
- const downY = e.clientY;
203
- const { offsetX, offsetY } = transform;
204
- const targetRect = targetRef.value.getBoundingClientRect();
205
- const targetLeft = targetRect.left;
206
- const targetTop = targetRect.top;
207
- const targetWidth = targetRect.width;
208
- const targetHeight = targetRect.height;
209
- const clientWidth = document.documentElement.clientWidth;
210
- const clientHeight = document.documentElement.clientHeight;
211
- const minLeft = -targetLeft + offsetX;
212
- const minTop = -targetTop + offsetY;
213
- const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
214
- const maxTop = clientHeight - targetTop - targetHeight + offsetY;
215
- const onMousemove = (event) => {
216
- let moveX = offsetX + event.clientX - downX;
217
- let moveY = offsetY + event.clientY - downY;
218
- if (!(overflow == null ? void 0 : overflow.value)) {
219
- moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
220
- moveY = Math.min(Math.max(moveY, minTop), maxTop);
221
- }
222
- transform = {
223
- offsetX: moveX,
224
- offsetY: moveY
225
- };
226
- if (targetRef.value) {
227
- targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(moveY)})`;
228
- }
229
- };
230
- const onMouseup = () => {
231
- document.removeEventListener("mousemove", onMousemove);
232
- document.removeEventListener("mouseup", onMouseup);
233
- };
234
- document.addEventListener("mousemove", onMousemove);
235
- document.addEventListener("mouseup", onMouseup);
114
+ }
115
+ function stop() {
116
+ isPending.value = false;
117
+ clear();
118
+ }
119
+ function start(...args) {
120
+ if (immediateCallback) cb();
121
+ clear();
122
+ isPending.value = true;
123
+ timer = setTimeout(() => {
124
+ isPending.value = false;
125
+ timer = void 0;
126
+ cb(...args);
127
+ }, vue.toValue(interval));
128
+ }
129
+ if (immediate) {
130
+ isPending.value = true;
131
+ if (isClient) start();
132
+ }
133
+ tryOnScopeDispose(stop);
134
+ return {
135
+ isPending: vue.shallowReadonly(isPending),
136
+ start,
137
+ stop
236
138
  };
237
- const onDraggable = () => {
238
- if (dragRef.value && targetRef.value) {
239
- dragRef.value.addEventListener("mousedown", onMousedown);
240
- }
139
+ }
140
+ function watchImmediate(source, cb, options) {
141
+ return vue.watch(source, cb, {
142
+ ...options,
143
+ immediate: true
144
+ });
145
+ }
146
+ const defaultWindow = isClient ? window : void 0;
147
+ function unrefElement(elRef) {
148
+ var _$el;
149
+ const plain = vue.toValue(elRef);
150
+ return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
151
+ }
152
+ function useEventListener(...args) {
153
+ const register = (el, event, listener, options) => {
154
+ el.addEventListener(event, listener, options);
155
+ return () => el.removeEventListener(event, listener, options);
241
156
  };
242
- const offDraggable = () => {
243
- if (dragRef.value && targetRef.value) {
244
- dragRef.value.removeEventListener("mousedown", onMousedown);
157
+ const firstParamTargets = vue.computed(() => {
158
+ const test = toArray(vue.toValue(args[0])).filter((e) => e != null);
159
+ return test.every((e) => typeof e !== "string") ? test : void 0;
160
+ });
161
+ return watchImmediate(() => {
162
+ var _firstParamTargets$va, _firstParamTargets$va2;
163
+ return [
164
+ (_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
165
+ toArray(vue.toValue(firstParamTargets.value ? args[1] : args[0])),
166
+ toArray(vue.unref(firstParamTargets.value ? args[2] : args[1])),
167
+ vue.toValue(firstParamTargets.value ? args[3] : args[2])
168
+ ];
169
+ }, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
170
+ if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
171
+ const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
172
+ const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
173
+ onCleanup(() => {
174
+ cleanups.forEach((fn) => fn());
175
+ });
176
+ }, { flush: "post" });
177
+ }
178
+ // @__NO_SIDE_EFFECTS__
179
+ function useMounted() {
180
+ const isMounted = vue.shallowRef(false);
181
+ const instance = vue.getCurrentInstance();
182
+ if (instance) vue.onMounted(() => {
183
+ isMounted.value = true;
184
+ }, instance);
185
+ return isMounted;
186
+ }
187
+ // @__NO_SIDE_EFFECTS__
188
+ function useSupported(callback) {
189
+ const isMounted = /* @__PURE__ */ useMounted();
190
+ return vue.computed(() => {
191
+ isMounted.value;
192
+ return Boolean(callback());
193
+ });
194
+ }
195
+ function useResizeObserver(target, callback, options = {}) {
196
+ const { window: window$1 = defaultWindow, ...observerOptions } = options;
197
+ let observer;
198
+ const isSupported = /* @__PURE__ */ useSupported(() => window$1 && "ResizeObserver" in window$1);
199
+ const cleanup = () => {
200
+ if (observer) {
201
+ observer.disconnect();
202
+ observer = void 0;
245
203
  }
246
204
  };
247
- const resetPosition = () => {
248
- transform = {
249
- offsetX: 0,
250
- offsetY: 0
251
- };
252
- if (targetRef.value) {
253
- targetRef.value.style.transform = "none";
205
+ const stopWatch = vue.watch(vue.computed(() => {
206
+ const _targets = vue.toValue(target);
207
+ return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
208
+ }), (els) => {
209
+ cleanup();
210
+ if (isSupported.value && window$1) {
211
+ observer = new ResizeObserver(callback);
212
+ for (const _el of els) if (_el) observer.observe(_el, observerOptions);
254
213
  }
255
- };
256
- vue.onMounted(() => {
257
- vue.watchEffect(() => {
258
- if (draggable.value) {
259
- onDraggable();
260
- } else {
261
- offDraggable();
262
- }
263
- });
264
- });
265
- vue.onBeforeUnmount(() => {
266
- offDraggable();
214
+ }, {
215
+ immediate: true,
216
+ flush: "post"
267
217
  });
218
+ const stop = () => {
219
+ cleanup();
220
+ stopWatch();
221
+ };
222
+ tryOnScopeDispose(stop);
268
223
  return {
269
- resetPosition
224
+ isSupported,
225
+ stop
270
226
  };
271
- };
272
- const screenSM = 576;
273
- const screenMD = 768;
274
- const screenLG = 992;
275
- const screenXL = 1200;
276
- const screenXXL = 1600;
277
- const screenXXXL = 2e3;
278
- const tokens = {
279
- screenXSMax: screenSM - 1,
280
- screenSM,
281
- screenMD,
282
- screenLG,
283
- screenXL,
284
- screenXXL,
285
- screenXXXL
286
- };
287
- const EVENT_CODE = {
288
- // 40
289
- esc: "Escape",
290
- delete: "Delete",
291
- backspace: "Backspace"
292
- };
293
- const DEFAULT_NAMESPACE = "max";
294
- const DEFAULT_ICON_LOCAL_PREFIX = "max";
295
- const DEFAULT_INITIAL_Z_INDEX = 2e3;
296
- const namespaceContextKey = Symbol("namespaceContextKey");
297
- const localeContextKey = Symbol("localeContextKey");
298
- const zIndexContextKey = Symbol("zIndexContextKey");
299
- const themeOverridesContextKey = Symbol("themeOverridesContextKey");
300
- const iconLocalPrefixContextKey = Symbol("iconLocalPrefixContextKey");
301
- function useLocale(localeOverrides) {
302
- const locale = localeOverrides || vue.inject(localeContextKey, vue.ref());
303
- return utils$1.buildLocaleContext(vue.computed(() => locale.value || utils$1.zhCN));
304
227
  }
305
- function useBasicDrawerModal(params = {}) {
306
- const { t } = useLocale();
307
- const visibleRef = vue.ref(false);
308
- const { bool: loadingRef, setTrue: showLoading, setFalse: hideLoading } = hooks.useBoolean();
309
- const typeRef = vue.ref("add");
310
- const dataRef = vue.ref({});
311
- const titleRef = vue.computed(() => {
312
- return t(`max.basic.${typeRef.value}`) || "";
228
+ function useElementSize(target, initialSize = {
229
+ width: 0,
230
+ height: 0
231
+ }, options = {}) {
232
+ const { window: window$1 = defaultWindow, box = "content-box" } = options;
233
+ const isSVG = vue.computed(() => {
234
+ var _unrefElement;
235
+ return (_unrefElement = unrefElement(target)) === null || _unrefElement === void 0 || (_unrefElement = _unrefElement.namespaceURI) === null || _unrefElement === void 0 ? void 0 : _unrefElement.includes("svg");
313
236
  });
314
- function show(context) {
315
- var _a;
316
- visibleRef.value = true;
317
- typeRef.value = context.type;
318
- dataRef.value = context.data || {};
319
- (_a = params.onShow) == null ? void 0 : _a.call(params, context);
320
- }
321
- function hide() {
322
- var _a;
323
- visibleRef.value = false;
324
- typeRef.value = "add";
325
- dataRef.value = {};
326
- (_a = params.onHide) == null ? void 0 : _a.call(params);
237
+ const width = vue.shallowRef(initialSize.width);
238
+ const height = vue.shallowRef(initialSize.height);
239
+ const { stop: stop1 } = useResizeObserver(target, ([entry]) => {
240
+ const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
241
+ if (window$1 && isSVG.value) {
242
+ const $elem = unrefElement(target);
243
+ if ($elem) {
244
+ const rect = $elem.getBoundingClientRect();
245
+ width.value = rect.width;
246
+ height.value = rect.height;
247
+ }
248
+ } else if (boxSize) {
249
+ const formatBoxSize = toArray(boxSize);
250
+ width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
251
+ height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
252
+ } else {
253
+ width.value = entry.contentRect.width;
254
+ height.value = entry.contentRect.height;
255
+ }
256
+ }, options);
257
+ tryOnMounted(() => {
258
+ const ele = unrefElement(target);
259
+ if (ele) {
260
+ width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
261
+ height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
262
+ }
263
+ });
264
+ const stop2 = vue.watch(() => unrefElement(target), (ele) => {
265
+ width.value = ele ? initialSize.width : 0;
266
+ height.value = ele ? initialSize.height : 0;
267
+ });
268
+ function stop() {
269
+ stop1();
270
+ stop2();
327
271
  }
328
272
  return {
329
- show,
330
- hide,
331
- showLoading,
332
- hideLoading,
333
- visible: visibleRef,
334
- type: typeRef,
335
- data: dataRef,
336
- title: titleRef,
337
- loading: loadingRef
273
+ width,
274
+ height,
275
+ stop
338
276
  };
339
277
  }
340
- let flexGapSupported;
341
- const detectFlexGapSupported = () => {
342
- if (flexGapSupported !== void 0) {
343
- return flexGapSupported;
344
- }
345
- const flex = document.createElement("div");
346
- flex.style.display = "flex";
347
- flex.style.flexDirection = "column";
348
- flex.style.rowGap = "1px";
349
- flex.appendChild(document.createElement("div"));
350
- flex.appendChild(document.createElement("div"));
351
- document.body.appendChild(flex);
352
- flexGapSupported = flex.scrollHeight === 1;
353
- document.body.removeChild(flex);
354
- return flexGapSupported;
355
- };
356
- function useFlexGapSupport() {
357
- const flexible = vue.shallowRef(false);
358
- vue.onMounted(() => {
359
- flexible.value = detectFlexGapSupported();
360
- });
361
- return flexible;
362
- }
363
- function useLocalIcon(localIcon) {
364
- const icon = localIcon || vue.inject(iconLocalPrefixContextKey, vue.ref(DEFAULT_ICON_LOCAL_PREFIX));
365
- return icon.value;
366
- }
367
- const statePrefix = "is-";
368
- const useGetDerivedNamespace = (namespaceOverrides) => {
369
- const derivedNamespace = namespaceOverrides || (vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(DEFAULT_NAMESPACE)) : vue.ref(DEFAULT_NAMESPACE));
370
- const namespace = vue.computed(() => {
371
- return vue.unref(derivedNamespace) || DEFAULT_NAMESPACE;
372
- });
373
- return namespace;
374
- };
375
- const iBem = (namespace, block, blockSuffix, element, modifier) => {
376
- let cls = `${namespace}-${block}`;
377
- if (blockSuffix) {
378
- cls += `-${blockSuffix}`;
379
- }
380
- if (element) {
381
- cls += `__${element}`;
382
- }
383
- if (modifier) {
384
- cls += `--${modifier}`;
385
- }
386
- return cls;
387
- };
388
- function useNamespace(block, namespaceOverrides) {
389
- const namespace = useGetDerivedNamespace(namespaceOverrides);
390
- const componentName = utils.pascalCase(`${namespace.value}-${block}`);
391
- const b = (blockSuffix = "") => iBem(namespace.value, block, blockSuffix, "", "");
392
- const e = (element) => element ? iBem(namespace.value, block, "", element, "") : "";
393
- const m = (modifier) => modifier ? iBem(namespace.value, block, "", "", modifier) : "";
394
- const be = (blockSuffix, element) => blockSuffix && element ? iBem(namespace.value, block, blockSuffix, element, "") : "";
395
- const em = (element, modifier) => element && modifier ? iBem(namespace.value, block, "", element, modifier) : "";
396
- const bm = (blockSuffix, modifier) => blockSuffix && modifier ? iBem(namespace.value, block, blockSuffix, "", modifier) : "";
397
- const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? iBem(namespace.value, block, blockSuffix, element, modifier) : "";
398
- const is = (name, ...args) => {
399
- const state = args.length >= 1 ? args[0] : true;
400
- return name && state ? `${statePrefix}${name}` : "";
278
+ const _TransitionPresets = {
279
+ easeInSine: [
280
+ 0.12,
281
+ 0,
282
+ 0.39,
283
+ 0
284
+ ],
285
+ easeOutSine: [
286
+ 0.61,
287
+ 1,
288
+ 0.88,
289
+ 1
290
+ ],
291
+ easeInOutSine: [
292
+ 0.37,
293
+ 0,
294
+ 0.63,
295
+ 1
296
+ ],
297
+ easeInQuad: [
298
+ 0.11,
299
+ 0,
300
+ 0.5,
301
+ 0
302
+ ],
303
+ easeOutQuad: [
304
+ 0.5,
305
+ 1,
306
+ 0.89,
307
+ 1
308
+ ],
309
+ easeInOutQuad: [
310
+ 0.45,
311
+ 0,
312
+ 0.55,
313
+ 1
314
+ ],
315
+ easeInCubic: [
316
+ 0.32,
317
+ 0,
318
+ 0.67,
319
+ 0
320
+ ],
321
+ easeOutCubic: [
322
+ 0.33,
323
+ 1,
324
+ 0.68,
325
+ 1
326
+ ],
327
+ easeInOutCubic: [
328
+ 0.65,
329
+ 0,
330
+ 0.35,
331
+ 1
332
+ ],
333
+ easeInQuart: [
334
+ 0.5,
335
+ 0,
336
+ 0.75,
337
+ 0
338
+ ],
339
+ easeOutQuart: [
340
+ 0.25,
341
+ 1,
342
+ 0.5,
343
+ 1
344
+ ],
345
+ easeInOutQuart: [
346
+ 0.76,
347
+ 0,
348
+ 0.24,
349
+ 1
350
+ ],
351
+ easeInQuint: [
352
+ 0.64,
353
+ 0,
354
+ 0.78,
355
+ 0
356
+ ],
357
+ easeOutQuint: [
358
+ 0.22,
359
+ 1,
360
+ 0.36,
361
+ 1
362
+ ],
363
+ easeInOutQuint: [
364
+ 0.83,
365
+ 0,
366
+ 0.17,
367
+ 1
368
+ ],
369
+ easeInExpo: [
370
+ 0.7,
371
+ 0,
372
+ 0.84,
373
+ 0
374
+ ],
375
+ easeOutExpo: [
376
+ 0.16,
377
+ 1,
378
+ 0.3,
379
+ 1
380
+ ],
381
+ easeInOutExpo: [
382
+ 0.87,
383
+ 0,
384
+ 0.13,
385
+ 1
386
+ ],
387
+ easeInCirc: [
388
+ 0.55,
389
+ 0,
390
+ 1,
391
+ 0.45
392
+ ],
393
+ easeOutCirc: [
394
+ 0,
395
+ 0.55,
396
+ 0.45,
397
+ 1
398
+ ],
399
+ easeInOutCirc: [
400
+ 0.85,
401
+ 0,
402
+ 0.15,
403
+ 1
404
+ ],
405
+ easeInBack: [
406
+ 0.36,
407
+ 0,
408
+ 0.66,
409
+ -0.56
410
+ ],
411
+ easeOutBack: [
412
+ 0.34,
413
+ 1.56,
414
+ 0.64,
415
+ 1
416
+ ],
417
+ easeInOutBack: [
418
+ 0.68,
419
+ -0.6,
420
+ 0.32,
421
+ 1.6
422
+ ]
423
+ };
424
+ const TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);
425
+ function createEasingFunction([p0, p1, p2, p3]) {
426
+ const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;
427
+ const b = (a1, a2) => 3 * a2 - 6 * a1;
428
+ const c = (a1) => 3 * a1;
429
+ const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;
430
+ const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);
431
+ const getTforX = (x) => {
432
+ let aGuessT = x;
433
+ for (let i = 0; i < 4; ++i) {
434
+ const currentSlope = getSlope(aGuessT, p0, p2);
435
+ if (currentSlope === 0) return aGuessT;
436
+ const currentX = calcBezier(aGuessT, p0, p2) - x;
437
+ aGuessT -= currentX / currentSlope;
438
+ }
439
+ return aGuessT;
401
440
  };
402
- const cssVar = (object) => {
403
- const styles = {};
404
- for (const key2 in object) {
405
- if (object[key2]) {
406
- styles[`--${namespace.value}-${key2}`] = object[key2];
441
+ return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);
442
+ }
443
+ function lerp(a, b, alpha) {
444
+ return a + alpha * (b - a);
445
+ }
446
+ function defaultInterpolation(a, b, t) {
447
+ const aVal = vue.toValue(a);
448
+ const bVal = vue.toValue(b);
449
+ if (typeof aVal === "number" && typeof bVal === "number") return lerp(aVal, bVal, t);
450
+ if (Array.isArray(aVal) && Array.isArray(bVal)) return aVal.map((v, i) => lerp(v, vue.toValue(bVal[i]), t));
451
+ throw new TypeError("Unknown transition type, specify an interpolation function.");
452
+ }
453
+ function normalizeEasing(easing) {
454
+ var _toValue;
455
+ return typeof easing === "function" ? easing : (_toValue = vue.toValue(easing)) !== null && _toValue !== void 0 ? _toValue : identity;
456
+ }
457
+ function transition(source, from, to, options = {}) {
458
+ var _toValue2;
459
+ const { window: window$1 = defaultWindow } = options;
460
+ const fromVal = vue.toValue(from);
461
+ const toVal = vue.toValue(to);
462
+ const duration = (_toValue2 = vue.toValue(options.duration)) !== null && _toValue2 !== void 0 ? _toValue2 : 1e3;
463
+ const startedAt = Date.now();
464
+ const endAt = Date.now() + duration;
465
+ const interpolation = typeof options.interpolation === "function" ? options.interpolation : defaultInterpolation;
466
+ const trans = typeof options.easing !== "undefined" ? normalizeEasing(options.easing) : normalizeEasing(options.transition);
467
+ const ease = typeof trans === "function" ? trans : createEasingFunction(trans);
468
+ return new Promise((resolve) => {
469
+ source.value = fromVal;
470
+ const tick = () => {
471
+ var _options$abort;
472
+ if ((_options$abort = options.abort) === null || _options$abort === void 0 ? void 0 : _options$abort.call(options)) {
473
+ resolve();
474
+ return;
407
475
  }
408
- }
409
- return styles;
476
+ const now2 = Date.now();
477
+ source.value = interpolation(fromVal, toVal, ease((now2 - startedAt) / duration));
478
+ if (now2 < endAt) window$1 === null || window$1 === void 0 || window$1.requestAnimationFrame(tick);
479
+ else {
480
+ source.value = toVal;
481
+ resolve();
482
+ }
483
+ };
484
+ tick();
485
+ });
486
+ }
487
+ function useTransition(source, options = {}) {
488
+ let currentId = 0;
489
+ const sourceVal = () => {
490
+ const v = vue.toValue(source);
491
+ return typeof options.interpolation === "undefined" && Array.isArray(v) ? v.map(vue.toValue) : v;
410
492
  };
411
- const cssVarBlock = (object) => {
412
- const styles = {};
413
- for (const key2 in object) {
414
- if (object[key2]) {
415
- styles[`--${namespace.value}-${block}-${key2}`] = object[key2];
493
+ const outputRef = vue.shallowRef(sourceVal());
494
+ vue.watch(sourceVal, async (to) => {
495
+ var _options$onStarted, _options$onFinished;
496
+ if (vue.toValue(options.disabled)) return;
497
+ const id = ++currentId;
498
+ if (options.delay) await promiseTimeout(vue.toValue(options.delay));
499
+ if (id !== currentId) return;
500
+ (_options$onStarted = options.onStarted) === null || _options$onStarted === void 0 || _options$onStarted.call(options);
501
+ await transition(outputRef, outputRef.value, to, {
502
+ ...options,
503
+ abort: () => {
504
+ var _options$abort2;
505
+ return id !== currentId || ((_options$abort2 = options.abort) === null || _options$abort2 === void 0 ? void 0 : _options$abort2.call(options));
416
506
  }
507
+ });
508
+ (_options$onFinished = options.onFinished) === null || _options$onFinished === void 0 || _options$onFinished.call(options);
509
+ }, { deep: true });
510
+ vue.watch(() => vue.toValue(options.disabled), (disabled) => {
511
+ if (disabled) {
512
+ currentId++;
513
+ outputRef.value = sourceVal();
417
514
  }
418
- return styles;
419
- };
420
- const cssVarName = (name) => `--${namespace.value}-${name}`;
421
- const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
422
- return {
423
- name: componentName,
424
- namespace,
425
- b,
426
- e,
427
- m,
428
- be,
429
- em,
430
- bm,
431
- bem,
432
- is,
433
- cssVar,
434
- cssVarBlock,
435
- cssVarName,
436
- cssVarBlockName
437
- };
515
+ });
516
+ tryOnScopeDispose(() => {
517
+ currentId++;
518
+ });
519
+ return vue.computed(() => vue.toValue(options.disabled) ? sourceVal() : outputRef.value);
438
520
  }
439
- const useLockscreen = (trigger, options = {}) => {
440
- if (!vue.isRef(trigger)) {
441
- throw new Error("[useLockscreen] You need to pass a ref param to this function");
521
+ const isStringNumber = (val) => {
522
+ if (!utils.isString(val)) {
523
+ return false;
442
524
  }
443
- const ns = options.ns || useNamespace("popup");
444
- const hiddenCls = vue.computed(() => ns.bm("parent", "hidden"));
445
- if (!utils.isClient || utils.hasClass(document.body, hiddenCls.value)) {
446
- return;
525
+ return !Number.isNaN(Number(val));
526
+ };
527
+ let scrollBarWidth;
528
+ const getScrollBarWidth = (namespace) => {
529
+ var _a;
530
+ if (scrollBarWidth !== void 0) return scrollBarWidth;
531
+ const outer = document.createElement("div");
532
+ outer.className = `${namespace}-scrollbar__wrap`;
533
+ outer.style.visibility = "hidden";
534
+ outer.style.width = "100px";
535
+ outer.style.position = "absolute";
536
+ outer.style.top = "-9999px";
537
+ document.body.appendChild(outer);
538
+ const widthNoScroll = outer.offsetWidth;
539
+ outer.style.overflow = "scroll";
540
+ const inner = document.createElement("div");
541
+ inner.style.width = "100%";
542
+ outer.appendChild(inner);
543
+ const widthWithScroll = inner.offsetWidth;
544
+ (_a = outer.parentNode) == null ? void 0 : _a.removeChild(outer);
545
+ scrollBarWidth = widthNoScroll - widthWithScroll;
546
+ return scrollBarWidth;
547
+ };
548
+ const getStyle = (element, styleName) => {
549
+ var _a;
550
+ if (!element || !styleName) return "";
551
+ let key2 = utils.camelize(styleName);
552
+ if (key2 === "float") key2 = "cssFloat";
553
+ try {
554
+ const style = element.style[key2];
555
+ if (style) return style;
556
+ const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, "");
557
+ return computed ? computed[key2] : "";
558
+ } catch {
559
+ return element.style[key2];
447
560
  }
448
- let scrollBarWidth2 = 0;
449
- let withoutHiddenClass = false;
450
- let bodyWidth = "0";
451
- const cleanup = () => {
452
- setTimeout(() => {
453
- if (typeof document === "undefined") return;
454
- if (withoutHiddenClass && document) {
455
- document.body.style.width = bodyWidth;
456
- utils.removeClass(document.body, hiddenCls.value);
457
- }
458
- }, 200);
561
+ };
562
+ function addUnit(value, defaultUnit = "px") {
563
+ if (!value) return "";
564
+ if (utils.isNumber(value) || isStringNumber(value)) {
565
+ return `${value}${defaultUnit}`;
566
+ } else if (utils.isString(value)) {
567
+ return value;
568
+ }
569
+ throw new Error("binding value must be a string or number");
570
+ }
571
+ const getTransitionProps = (transitionName, opt = {}) => {
572
+ const transitionConfig = {
573
+ name: transitionName,
574
+ appear: true,
575
+ // type: 'animation',
576
+ // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
577
+ // appearActiveClass: `antdv-base-transtion`,
578
+ // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
579
+ enterFromClass: `${transitionName}-enter ${transitionName}-enter-prepare ${transitionName}-enter-start`,
580
+ enterActiveClass: `${transitionName}-enter ${transitionName}-enter-prepare`,
581
+ enterToClass: `${transitionName}-enter ${transitionName}-enter-active`,
582
+ leaveFromClass: ` ${transitionName}-leave`,
583
+ leaveActiveClass: `${transitionName}-leave ${transitionName}-leave-active`,
584
+ leaveToClass: `${transitionName}-leave ${transitionName}-leave-active`,
585
+ ...opt
459
586
  };
460
- vue.watch(trigger, (val) => {
461
- if (!val) {
462
- cleanup();
463
- return;
464
- }
465
- withoutHiddenClass = !utils.hasClass(document.body, hiddenCls.value);
466
- if (withoutHiddenClass) {
467
- bodyWidth = document.body.style.width;
468
- utils.addClass(document.body, hiddenCls.value);
469
- }
470
- scrollBarWidth2 = getScrollBarWidth(ns.namespace.value);
471
- const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
472
- const bodyOverflowY = getStyle(document.body, "overflowY");
473
- if (scrollBarWidth2 > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) {
474
- document.body.style.width = `calc(100% - ${scrollBarWidth2}px)`;
587
+ const transitionProps = transitionName ? transitionConfig : { css: false, ...opt };
588
+ return transitionProps;
589
+ };
590
+ const getTransitionGroupProps = (transitionName, opt = {}) => {
591
+ const transitionConfig = {
592
+ name: transitionName,
593
+ appear: true,
594
+ // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
595
+ appearActiveClass: `${transitionName}`,
596
+ appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
597
+ enterFromClass: `${transitionName}-appear ${transitionName}-enter ${transitionName}-appear-prepare ${transitionName}-enter-prepare`,
598
+ enterActiveClass: `${transitionName}`,
599
+ enterToClass: `${transitionName}-enter ${transitionName}-appear ${transitionName}-appear-active ${transitionName}-enter-active`,
600
+ leaveActiveClass: `${transitionName} ${transitionName}-leave`,
601
+ leaveToClass: `${transitionName}-leave-active`,
602
+ ...opt
603
+ };
604
+ const transitionProps = transitionName ? transitionConfig : { css: false, ...opt };
605
+ return transitionProps;
606
+ };
607
+ const collapseMotion = (name = "ant-motion-collapse", appear = true) => {
608
+ return {
609
+ name,
610
+ appear,
611
+ css: true,
612
+ onBeforeEnter: (el) => {
613
+ const node = el;
614
+ node.style.height = "0px";
615
+ node.style.opacity = "0";
616
+ utils.addClass(node, name);
617
+ },
618
+ onEnter: (el) => {
619
+ const node = el;
620
+ vue.nextTick(() => {
621
+ node.style.height = `${node.scrollHeight}px`;
622
+ node.style.opacity = "1";
623
+ });
624
+ },
625
+ onAfterEnter: (el) => {
626
+ const node = el;
627
+ if (node) {
628
+ utils.removeClass(node, name);
629
+ node.style.height = null;
630
+ node.style.opacity = null;
631
+ }
632
+ },
633
+ onBeforeLeave: (el) => {
634
+ const node = el;
635
+ utils.addClass(node, name);
636
+ node.style.height = `${node.offsetHeight}px`;
637
+ node.style.opacity = null;
638
+ },
639
+ onLeave: (el) => {
640
+ const node = el;
641
+ setTimeout(() => {
642
+ node.style.height = "0px";
643
+ node.style.opacity = "0";
644
+ });
645
+ },
646
+ onAfterLeave: (el) => {
647
+ const node = el;
648
+ if (node) {
649
+ utils.removeClass(node, name);
650
+ if (node.style) {
651
+ node.style.height = null;
652
+ node.style.opacity = null;
653
+ }
654
+ }
475
655
  }
476
- });
477
- vue.onScopeDispose(() => cleanup());
656
+ };
478
657
  };
479
- function useMergedState(defaultStateValue, option) {
480
- const { defaultValue, value = vue.ref() } = option || {};
481
- let initValue = typeof defaultStateValue === "function" ? defaultStateValue() : defaultStateValue;
482
- if (value.value !== void 0) {
483
- initValue = vue.unref(value);
484
- }
485
- if (defaultValue !== void 0) {
486
- initValue = typeof defaultValue === "function" ? defaultValue() : defaultValue;
487
- }
488
- const innerValue = vue.ref(initValue);
489
- const mergedValue = vue.ref(initValue);
490
- vue.watchEffect(() => {
491
- let val = value.value !== void 0 ? value.value : innerValue.value;
492
- if (option == null ? void 0 : option.postState) {
493
- val = option.postState(val);
658
+ function isEmptyElement(c) {
659
+ return c && (c.type === vue.Comment || c.type === vue.Fragment && c.children.length === 0 || c.type === vue.Text && c.children.trim() === "");
660
+ }
661
+ function filterEmpty(children = []) {
662
+ const res = [];
663
+ children.forEach((child) => {
664
+ if (Array.isArray(child)) {
665
+ res.push(...child);
666
+ } else if ((child == null ? void 0 : child.type) === vue.Fragment) {
667
+ res.push(...filterEmpty(child.children));
668
+ } else {
669
+ res.push(child);
494
670
  }
495
- mergedValue.value = val;
496
671
  });
497
- function triggerChange(newValue) {
498
- const preVal = mergedValue.value;
499
- innerValue.value = newValue;
500
- if (vue.toRaw(mergedValue.value) !== newValue && (option == null ? void 0 : option.onChange)) {
501
- option.onChange(newValue, preVal);
672
+ return res.filter((c) => !isEmptyElement(c));
673
+ }
674
+ const isValid = (value) => {
675
+ return value !== void 0 && value !== null && value !== "";
676
+ };
677
+ const skipFlattenKey = Symbol("skipFlatten");
678
+ const flattenChildren = (children = [], fe = true) => {
679
+ const temp = Array.isArray(children) ? children : [children];
680
+ const res = [];
681
+ temp.forEach((child) => {
682
+ if (Array.isArray(child)) {
683
+ res.push(...flattenChildren(child, fe));
684
+ } else if (child && child.type === vue.Fragment) {
685
+ if (child.key === skipFlattenKey) {
686
+ res.push(child);
687
+ } else {
688
+ res.push(...flattenChildren(child.children, fe));
689
+ }
690
+ } else if (child && vue.isVNode(child)) {
691
+ if (fe && !isEmptyElement(child)) {
692
+ res.push(child);
693
+ } else if (!fe) {
694
+ res.push(child);
695
+ }
696
+ } else if (isValid(child)) {
697
+ res.push(child);
502
698
  }
503
- }
504
- vue.watch(value, () => {
505
- innerValue.value = value.value;
506
699
  });
507
- return [mergedValue, triggerChange];
508
- }
509
- const responsiveArray = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"];
510
- const getResponsiveMap = (token) => ({
511
- xs: `(max-width: ${token.screenXSMax}px)`,
512
- sm: `(min-width: ${token.screenSM}px)`,
513
- md: `(min-width: ${token.screenMD}px)`,
514
- lg: `(min-width: ${token.screenLG}px)`,
515
- xl: `(min-width: ${token.screenXL}px)`,
516
- xxl: `(min-width: ${token.screenXXL}px)`,
517
- xxxl: `{min-width: ${token.screenXXXL}px}`
518
- });
519
- function useResponsiveObserve() {
520
- return vue.computed(() => {
521
- const responsiveMap = getResponsiveMap(tokens);
522
- const subscribers = /* @__PURE__ */ new Map();
523
- let subUid = -1;
524
- let screens = {};
525
- return {
526
- matchHandlers: {},
527
- dispatch(pointMap) {
528
- screens = pointMap;
529
- subscribers.forEach((func) => func(screens));
530
- return subscribers.size >= 1;
531
- },
532
- subscribe(func) {
533
- if (!subscribers.size) this.register();
534
- subUid += 1;
535
- subscribers.set(subUid, func);
536
- func(screens);
537
- return subUid;
538
- },
539
- unsubscribe(paramToken) {
540
- subscribers.delete(paramToken);
541
- if (!subscribers.size) this.unregister();
542
- },
543
- unregister() {
544
- Object.keys(responsiveMap).forEach((screen) => {
545
- const matchMediaQuery = responsiveMap[screen];
546
- const handler = this.matchHandlers[matchMediaQuery];
547
- handler == null ? void 0 : handler.mql.removeListener(handler == null ? void 0 : handler.listener);
548
- });
549
- subscribers.clear();
550
- },
551
- register() {
552
- Object.keys(responsiveMap).forEach((screen) => {
553
- const matchMediaQuery = responsiveMap[screen];
554
- const listener = ({ matches }) => {
555
- this.dispatch({
556
- ...screens,
557
- [screen]: matches
558
- });
559
- };
560
- const mql = window.matchMedia(matchMediaQuery);
561
- mql.addListener(listener);
562
- this.matchHandlers[matchMediaQuery] = {
563
- mql,
564
- listener
565
- };
566
- listener(mql);
567
- });
568
- },
569
- responsiveMap
570
- };
571
- });
572
- }
573
- const NOOP = () => {
700
+ return res;
574
701
  };
575
- const useSameTarget = (handleClick) => {
576
- if (!handleClick) {
577
- return { onClick: NOOP, onMousedown: NOOP, onMouseup: NOOP };
578
- }
579
- let mousedownTarget = false;
580
- let mouseupTarget = false;
581
- const onClick = (e) => {
582
- if (mousedownTarget && mouseupTarget) {
583
- handleClick(e);
584
- }
585
- mousedownTarget = false;
586
- mouseupTarget = false;
702
+ const useDraggable = (targetRef, dragRef, draggable, overflow) => {
703
+ let transform = {
704
+ offsetX: 0,
705
+ offsetY: 0
587
706
  };
588
707
  const onMousedown = (e) => {
589
- mousedownTarget = e.target === e.currentTarget;
708
+ const downX = e.clientX;
709
+ const downY = e.clientY;
710
+ const { offsetX, offsetY } = transform;
711
+ const targetRect = targetRef.value.getBoundingClientRect();
712
+ const targetLeft = targetRect.left;
713
+ const targetTop = targetRect.top;
714
+ const targetWidth = targetRect.width;
715
+ const targetHeight = targetRect.height;
716
+ const clientWidth = document.documentElement.clientWidth;
717
+ const clientHeight = document.documentElement.clientHeight;
718
+ const minLeft = -targetLeft + offsetX;
719
+ const minTop = -targetTop + offsetY;
720
+ const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
721
+ const maxTop = clientHeight - targetTop - targetHeight + offsetY;
722
+ const onMousemove = (event) => {
723
+ let moveX = offsetX + event.clientX - downX;
724
+ let moveY = offsetY + event.clientY - downY;
725
+ if (!(overflow == null ? void 0 : overflow.value)) {
726
+ moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
727
+ moveY = Math.min(Math.max(moveY, minTop), maxTop);
728
+ }
729
+ transform = {
730
+ offsetX: moveX,
731
+ offsetY: moveY
732
+ };
733
+ if (targetRef.value) {
734
+ targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(moveY)})`;
735
+ }
736
+ };
737
+ const onMouseup = () => {
738
+ document.removeEventListener("mousemove", onMousemove);
739
+ document.removeEventListener("mouseup", onMouseup);
740
+ };
741
+ document.addEventListener("mousemove", onMousemove);
742
+ document.addEventListener("mouseup", onMouseup);
590
743
  };
591
- const onMouseup = (e) => {
592
- mouseupTarget = e.target === e.currentTarget;
744
+ const onDraggable = () => {
745
+ if (dragRef.value && targetRef.value) {
746
+ dragRef.value.addEventListener("mousedown", onMousedown);
747
+ }
593
748
  };
594
- return { onClick, onMousedown, onMouseup };
595
- };
596
- function useThemeOverrides(themeOverrides) {
597
- const overrides = themeOverrides || vue.inject(themeOverridesContextKey, vue.ref());
598
- return overrides.value;
599
- }
600
- const zIndex = vue.ref(0);
601
- const initial = {
602
- current: 0
603
- };
604
- const ZINDEX_INJECTION_KEY = Symbol("elZIndexContextKey");
605
- const useZIndex = (zIndexOverrides) => {
606
- const increasingInjection = vue.getCurrentInstance() ? vue.inject(ZINDEX_INJECTION_KEY, initial) : initial;
607
- const zIndexInjection = zIndexOverrides || (vue.getCurrentInstance() ? vue.inject(zIndexContextKey, void 0) : void 0);
608
- const initialZIndex = vue.computed(() => {
609
- const zIndexFromInjection = vue.unref(zIndexInjection);
610
- return utils.isNumber(zIndexFromInjection) ? zIndexFromInjection : DEFAULT_INITIAL_Z_INDEX;
611
- });
612
- const currentZIndex = vue.computed(() => initialZIndex.value + zIndex.value);
613
- const nextZIndex = () => {
614
- increasingInjection.current++;
615
- zIndex.value = increasingInjection.current;
616
- return currentZIndex.value;
749
+ const offDraggable = () => {
750
+ if (dragRef.value && targetRef.value) {
751
+ dragRef.value.removeEventListener("mousedown", onMousedown);
752
+ }
753
+ };
754
+ const resetPosition = () => {
755
+ transform = {
756
+ offsetX: 0,
757
+ offsetY: 0
758
+ };
759
+ if (targetRef.value) {
760
+ targetRef.value.style.transform = "none";
761
+ }
617
762
  };
763
+ vue.onMounted(() => {
764
+ vue.watchEffect(() => {
765
+ if (draggable.value) {
766
+ onDraggable();
767
+ } else {
768
+ offDraggable();
769
+ }
770
+ });
771
+ });
772
+ vue.onBeforeUnmount(() => {
773
+ offDraggable();
774
+ });
618
775
  return {
619
- initialZIndex,
620
- currentZIndex,
621
- nextZIndex
776
+ resetPosition
622
777
  };
623
778
  };
624
- const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
625
- const stringToIcon = (value, validate, allowSimpleName, provider = "") => {
626
- const colonSeparated = value.split(":");
627
- if (value.slice(0, 1) === "@") {
628
- if (colonSeparated.length < 2 || colonSeparated.length > 3) {
629
- return null;
630
- }
631
- provider = colonSeparated.shift().slice(1);
632
- }
633
- if (colonSeparated.length > 3 || !colonSeparated.length) {
634
- return null;
635
- }
636
- if (colonSeparated.length > 1) {
637
- const name2 = colonSeparated.pop();
638
- const prefix = colonSeparated.pop();
639
- const result = {
640
- // Allow provider without '@': "provider:prefix:name"
641
- provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
642
- prefix,
643
- name: name2
644
- };
645
- return validate && !validateIconName(result) ? null : result;
646
- }
647
- const name = colonSeparated[0];
648
- const dashSeparated = name.split("-");
649
- if (dashSeparated.length > 1) {
650
- const result = {
651
- provider,
652
- prefix: dashSeparated.shift(),
653
- name: dashSeparated.join("-")
654
- };
655
- return validate && !validateIconName(result) ? null : result;
656
- }
657
- if (allowSimpleName && provider === "") {
658
- const result = {
659
- provider,
660
- prefix: "",
661
- name
662
- };
663
- return validate && !validateIconName(result, allowSimpleName) ? null : result;
664
- }
665
- return null;
779
+ const screenSM = 576;
780
+ const screenMD = 768;
781
+ const screenLG = 992;
782
+ const screenXL = 1200;
783
+ const screenXXL = 1600;
784
+ const screenXXXL = 2e3;
785
+ const tokens = {
786
+ screenXSMax: screenSM - 1,
787
+ screenSM,
788
+ screenMD,
789
+ screenLG,
790
+ screenXL,
791
+ screenXXL,
792
+ screenXXXL
666
793
  };
667
- const validateIconName = (icon, allowSimpleName) => {
668
- if (!icon) {
669
- return false;
670
- }
671
- return !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
672
- // Check name: cannot be empty
673
- ((allowSimpleName && icon.prefix === "" || !!icon.prefix) && !!icon.name);
794
+ const EVENT_CODE = {
795
+ // 40
796
+ esc: "Escape",
797
+ delete: "Delete",
798
+ backspace: "Backspace"
674
799
  };
675
- const defaultIconDimensions = Object.freeze(
676
- {
677
- left: 0,
678
- top: 0,
679
- width: 16,
680
- height: 16
681
- }
682
- );
683
- const defaultIconTransformations = Object.freeze({
684
- rotate: 0,
685
- vFlip: false,
686
- hFlip: false
687
- });
688
- const defaultIconProps = Object.freeze({
689
- ...defaultIconDimensions,
690
- ...defaultIconTransformations
691
- });
692
- const defaultExtendedIconProps = Object.freeze({
693
- ...defaultIconProps,
694
- body: "",
695
- hidden: false
696
- });
697
- function mergeIconTransformations(obj1, obj2) {
698
- const result = {};
699
- if (!obj1.hFlip !== !obj2.hFlip) {
700
- result.hFlip = true;
701
- }
702
- if (!obj1.vFlip !== !obj2.vFlip) {
703
- result.vFlip = true;
704
- }
705
- const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
706
- if (rotate) {
707
- result.rotate = rotate;
708
- }
709
- return result;
800
+ const DEFAULT_NAMESPACE = "max";
801
+ const DEFAULT_ICON_LOCAL_PREFIX = "max";
802
+ const DEFAULT_INITIAL_Z_INDEX = 2e3;
803
+ const namespaceContextKey = Symbol("namespaceContextKey");
804
+ const localeContextKey = Symbol("localeContextKey");
805
+ const zIndexContextKey = Symbol("zIndexContextKey");
806
+ const themeOverridesContextKey = Symbol("themeOverridesContextKey");
807
+ const iconLocalPrefixContextKey = Symbol("iconLocalPrefixContextKey");
808
+ function useLocale(localeOverrides) {
809
+ const locale = localeOverrides || vue.inject(localeContextKey, vue.ref());
810
+ return utils$1.buildLocaleContext(vue.computed(() => locale.value || utils$1.zhCN));
710
811
  }
711
- function mergeIconData(parent, child) {
712
- const result = mergeIconTransformations(parent, child);
713
- for (const key2 in defaultExtendedIconProps) {
714
- if (key2 in defaultIconTransformations) {
715
- if (key2 in parent && !(key2 in result)) {
716
- result[key2] = defaultIconTransformations[key2];
717
- }
718
- } else if (key2 in child) {
719
- result[key2] = child[key2];
720
- } else if (key2 in parent) {
721
- result[key2] = parent[key2];
722
- }
812
+ function useBasicDrawerModal(params = {}) {
813
+ const { t } = useLocale();
814
+ const visibleRef = vue.ref(false);
815
+ const { bool: loadingRef, setTrue: showLoading, setFalse: hideLoading } = hooks.useBoolean();
816
+ const typeRef = vue.ref("add");
817
+ const dataRef = vue.ref({});
818
+ const titleRef = vue.computed(() => {
819
+ return t(`max.basic.${typeRef.value}`) || "";
820
+ });
821
+ function show(context) {
822
+ var _a;
823
+ visibleRef.value = true;
824
+ typeRef.value = context.type;
825
+ dataRef.value = context.data || {};
826
+ (_a = params.onShow) == null ? void 0 : _a.call(params, context);
723
827
  }
724
- return result;
725
- }
726
- function getIconsTree(data, names) {
727
- const icons = data.icons;
728
- const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
729
- const resolved = /* @__PURE__ */ Object.create(null);
730
- function resolve(name) {
731
- if (icons[name]) {
732
- return resolved[name] = [];
733
- }
734
- if (!(name in resolved)) {
735
- resolved[name] = null;
736
- const parent = aliases[name] && aliases[name].parent;
737
- const value = parent && resolve(parent);
738
- if (value) {
739
- resolved[name] = [parent].concat(value);
740
- }
741
- }
742
- return resolved[name];
828
+ function hide() {
829
+ var _a;
830
+ visibleRef.value = false;
831
+ typeRef.value = "add";
832
+ dataRef.value = {};
833
+ (_a = params.onHide) == null ? void 0 : _a.call(params);
743
834
  }
744
- Object.keys(icons).concat(Object.keys(aliases)).forEach(resolve);
745
- return resolved;
835
+ return {
836
+ show,
837
+ hide,
838
+ showLoading,
839
+ hideLoading,
840
+ visible: visibleRef,
841
+ type: typeRef,
842
+ data: dataRef,
843
+ title: titleRef,
844
+ loading: loadingRef
845
+ };
746
846
  }
747
- function internalGetIconData(data, name, tree) {
748
- const icons = data.icons;
749
- const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
750
- let currentProps = {};
751
- function parse(name2) {
752
- currentProps = mergeIconData(
753
- icons[name2] || aliases[name2],
754
- currentProps
755
- );
847
+ let flexGapSupported;
848
+ const detectFlexGapSupported = () => {
849
+ if (flexGapSupported !== void 0) {
850
+ return flexGapSupported;
756
851
  }
757
- parse(name);
758
- tree.forEach(parse);
759
- return mergeIconData(data, currentProps);
852
+ const flex = document.createElement("div");
853
+ flex.style.display = "flex";
854
+ flex.style.flexDirection = "column";
855
+ flex.style.rowGap = "1px";
856
+ flex.appendChild(document.createElement("div"));
857
+ flex.appendChild(document.createElement("div"));
858
+ document.body.appendChild(flex);
859
+ flexGapSupported = flex.scrollHeight === 1;
860
+ document.body.removeChild(flex);
861
+ return flexGapSupported;
862
+ };
863
+ function useFlexGapSupport() {
864
+ const flexible = vue.shallowRef(false);
865
+ vue.onMounted(() => {
866
+ flexible.value = detectFlexGapSupported();
867
+ });
868
+ return flexible;
760
869
  }
761
- function parseIconSet(data, callback) {
762
- const names = [];
763
- if (typeof data !== "object" || typeof data.icons !== "object") {
764
- return names;
870
+ function useLocalIcon(localIcon) {
871
+ const icon = localIcon || vue.inject(iconLocalPrefixContextKey, vue.ref(DEFAULT_ICON_LOCAL_PREFIX));
872
+ return icon.value;
873
+ }
874
+ const statePrefix = "is-";
875
+ const useGetDerivedNamespace = (namespaceOverrides) => {
876
+ const derivedNamespace = namespaceOverrides || (vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(DEFAULT_NAMESPACE)) : vue.ref(DEFAULT_NAMESPACE));
877
+ const namespace = vue.computed(() => {
878
+ return vue.unref(derivedNamespace) || DEFAULT_NAMESPACE;
879
+ });
880
+ return namespace;
881
+ };
882
+ const iBem = (namespace, block, blockSuffix, element, modifier) => {
883
+ let cls = `${namespace}-${block}`;
884
+ if (blockSuffix) {
885
+ cls += `-${blockSuffix}`;
765
886
  }
766
- if (data.not_found instanceof Array) {
767
- data.not_found.forEach((name) => {
768
- callback(name, null);
769
- names.push(name);
770
- });
887
+ if (element) {
888
+ cls += `__${element}`;
771
889
  }
772
- const tree = getIconsTree(data);
773
- for (const name in tree) {
774
- const item = tree[name];
775
- if (item) {
776
- callback(name, internalGetIconData(data, name, item));
777
- names.push(name);
778
- }
890
+ if (modifier) {
891
+ cls += `--${modifier}`;
779
892
  }
780
- return names;
781
- }
782
- const optionalPropertyDefaults = {
783
- provider: "",
784
- aliases: {},
785
- not_found: {},
786
- ...defaultIconDimensions
893
+ return cls;
787
894
  };
788
- function checkOptionalProps(item, defaults) {
789
- for (const prop in defaults) {
790
- if (prop in item && typeof item[prop] !== typeof defaults[prop]) {
791
- return false;
895
+ function useNamespace(block, namespaceOverrides) {
896
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
897
+ const componentName = utils.pascalCase(`${namespace.value}-${block}`);
898
+ const b = (blockSuffix = "") => iBem(namespace.value, block, blockSuffix, "", "");
899
+ const e = (element) => element ? iBem(namespace.value, block, "", element, "") : "";
900
+ const m = (modifier) => modifier ? iBem(namespace.value, block, "", "", modifier) : "";
901
+ const be = (blockSuffix, element) => blockSuffix && element ? iBem(namespace.value, block, blockSuffix, element, "") : "";
902
+ const em = (element, modifier) => element && modifier ? iBem(namespace.value, block, "", element, modifier) : "";
903
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? iBem(namespace.value, block, blockSuffix, "", modifier) : "";
904
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? iBem(namespace.value, block, blockSuffix, element, modifier) : "";
905
+ const is = (name, ...args) => {
906
+ const state = args.length >= 1 ? args[0] : true;
907
+ return name && state ? `${statePrefix}${name}` : "";
908
+ };
909
+ const cssVar = (object) => {
910
+ const styles = {};
911
+ for (const key2 in object) {
912
+ if (object[key2]) {
913
+ styles[`--${namespace.value}-${key2}`] = object[key2];
914
+ }
792
915
  }
793
- }
794
- return true;
916
+ return styles;
917
+ };
918
+ const cssVarBlock = (object) => {
919
+ const styles = {};
920
+ for (const key2 in object) {
921
+ if (object[key2]) {
922
+ styles[`--${namespace.value}-${block}-${key2}`] = object[key2];
923
+ }
924
+ }
925
+ return styles;
926
+ };
927
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
928
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
929
+ return {
930
+ name: componentName,
931
+ namespace,
932
+ b,
933
+ e,
934
+ m,
935
+ be,
936
+ em,
937
+ bm,
938
+ bem,
939
+ is,
940
+ cssVar,
941
+ cssVarBlock,
942
+ cssVarName,
943
+ cssVarBlockName
944
+ };
795
945
  }
796
- function quicklyValidateIconSet(obj) {
797
- if (typeof obj !== "object" || obj === null) {
798
- return null;
799
- }
800
- const data = obj;
801
- if (typeof data.prefix !== "string" || !obj.icons || typeof obj.icons !== "object") {
802
- return null;
946
+ const useLockscreen = (trigger, options = {}) => {
947
+ if (!vue.isRef(trigger)) {
948
+ throw new Error("[useLockscreen] You need to pass a ref param to this function");
803
949
  }
804
- if (!checkOptionalProps(obj, optionalPropertyDefaults)) {
805
- return null;
950
+ const ns = options.ns || useNamespace("popup");
951
+ const hiddenCls = vue.computed(() => ns.bm("parent", "hidden"));
952
+ if (!utils.isClient || utils.hasClass(document.body, hiddenCls.value)) {
953
+ return;
806
954
  }
807
- const icons = data.icons;
808
- for (const name in icons) {
809
- const icon = icons[name];
810
- if (
811
- // Name cannot be empty
812
- !name || // Must have body
813
- typeof icon.body !== "string" || // Check other props
814
- !checkOptionalProps(
815
- icon,
816
- defaultExtendedIconProps
817
- )
818
- ) {
819
- return null;
955
+ let scrollBarWidth2 = 0;
956
+ let withoutHiddenClass = false;
957
+ let bodyWidth = "0";
958
+ const cleanup = () => {
959
+ setTimeout(() => {
960
+ if (typeof document === "undefined") return;
961
+ if (withoutHiddenClass && document) {
962
+ document.body.style.width = bodyWidth;
963
+ utils.removeClass(document.body, hiddenCls.value);
964
+ }
965
+ }, 200);
966
+ };
967
+ vue.watch(trigger, (val) => {
968
+ if (!val) {
969
+ cleanup();
970
+ return;
820
971
  }
821
- }
822
- const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
823
- for (const name in aliases) {
824
- const icon = aliases[name];
825
- const parent = icon.parent;
826
- if (
827
- // Name cannot be empty
828
- !name || // Parent must be set and point to existing icon
829
- typeof parent !== "string" || !icons[parent] && !aliases[parent] || // Check other props
830
- !checkOptionalProps(
831
- icon,
832
- defaultExtendedIconProps
833
- )
834
- ) {
835
- return null;
972
+ withoutHiddenClass = !utils.hasClass(document.body, hiddenCls.value);
973
+ if (withoutHiddenClass) {
974
+ bodyWidth = document.body.style.width;
975
+ utils.addClass(document.body, hiddenCls.value);
976
+ }
977
+ scrollBarWidth2 = getScrollBarWidth(ns.namespace.value);
978
+ const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
979
+ const bodyOverflowY = getStyle(document.body, "overflowY");
980
+ if (scrollBarWidth2 > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) {
981
+ document.body.style.width = `calc(100% - ${scrollBarWidth2}px)`;
836
982
  }
983
+ });
984
+ vue.onScopeDispose(() => cleanup());
985
+ };
986
+ function useMergedState(defaultStateValue, option) {
987
+ const { defaultValue, value = vue.ref() } = option || {};
988
+ let initValue = typeof defaultStateValue === "function" ? defaultStateValue() : defaultStateValue;
989
+ if (value.value !== void 0) {
990
+ initValue = vue.unref(value);
837
991
  }
838
- return data;
839
- }
840
- const dataStorage = /* @__PURE__ */ Object.create(null);
841
- function newStorage(provider, prefix) {
842
- return {
843
- provider,
844
- prefix,
845
- icons: /* @__PURE__ */ Object.create(null),
846
- missing: /* @__PURE__ */ new Set()
847
- };
848
- }
849
- function getStorage(provider, prefix) {
850
- const providerStorage = dataStorage[provider] || (dataStorage[provider] = /* @__PURE__ */ Object.create(null));
851
- return providerStorage[prefix] || (providerStorage[prefix] = newStorage(provider, prefix));
852
- }
853
- function addIconSet(storage2, data) {
854
- if (!quicklyValidateIconSet(data)) {
855
- return [];
992
+ if (defaultValue !== void 0) {
993
+ initValue = typeof defaultValue === "function" ? defaultValue() : defaultValue;
856
994
  }
857
- return parseIconSet(data, (name, icon) => {
858
- if (icon) {
859
- storage2.icons[name] = icon;
860
- } else {
861
- storage2.missing.add(name);
995
+ const innerValue = vue.ref(initValue);
996
+ const mergedValue = vue.ref(initValue);
997
+ vue.watchEffect(() => {
998
+ let val = value.value !== void 0 ? value.value : innerValue.value;
999
+ if (option == null ? void 0 : option.postState) {
1000
+ val = option.postState(val);
862
1001
  }
1002
+ mergedValue.value = val;
863
1003
  });
864
- }
865
- function addIconToStorage(storage2, name, icon) {
866
- try {
867
- if (typeof icon.body === "string") {
868
- storage2.icons[name] = { ...icon };
869
- return true;
1004
+ function triggerChange(newValue) {
1005
+ const preVal = mergedValue.value;
1006
+ innerValue.value = newValue;
1007
+ if (vue.toRaw(mergedValue.value) !== newValue && (option == null ? void 0 : option.onChange)) {
1008
+ option.onChange(newValue, preVal);
870
1009
  }
871
- } catch (err) {
872
- }
873
- return false;
874
- }
875
- let simpleNames = false;
876
- function allowSimpleNames(allow) {
877
- if (typeof allow === "boolean") {
878
- simpleNames = allow;
879
- }
880
- return simpleNames;
881
- }
882
- function getIconData(name) {
883
- const icon = typeof name === "string" ? stringToIcon(name, true, simpleNames) : name;
884
- if (icon) {
885
- const storage2 = getStorage(icon.provider, icon.prefix);
886
- const iconName = icon.name;
887
- return storage2.icons[iconName] || (storage2.missing.has(iconName) ? null : void 0);
888
1010
  }
1011
+ vue.watch(value, () => {
1012
+ innerValue.value = value.value;
1013
+ });
1014
+ return [mergedValue, triggerChange];
889
1015
  }
890
- function addIcon(name, data) {
891
- const icon = stringToIcon(name, true, simpleNames);
892
- if (!icon) {
893
- return false;
894
- }
895
- const storage2 = getStorage(icon.provider, icon.prefix);
896
- if (data) {
897
- return addIconToStorage(storage2, icon.name, data);
898
- } else {
899
- storage2.missing.add(icon.name);
900
- return true;
901
- }
1016
+ const responsiveArray = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"];
1017
+ const getResponsiveMap = (token) => ({
1018
+ xs: `(max-width: ${token.screenXSMax}px)`,
1019
+ sm: `(min-width: ${token.screenSM}px)`,
1020
+ md: `(min-width: ${token.screenMD}px)`,
1021
+ lg: `(min-width: ${token.screenLG}px)`,
1022
+ xl: `(min-width: ${token.screenXL}px)`,
1023
+ xxl: `(min-width: ${token.screenXXL}px)`,
1024
+ xxxl: `{min-width: ${token.screenXXXL}px}`
1025
+ });
1026
+ function useResponsiveObserve() {
1027
+ return vue.computed(() => {
1028
+ const responsiveMap = getResponsiveMap(tokens);
1029
+ const subscribers = /* @__PURE__ */ new Map();
1030
+ let subUid = -1;
1031
+ let screens = {};
1032
+ return {
1033
+ matchHandlers: {},
1034
+ dispatch(pointMap) {
1035
+ screens = pointMap;
1036
+ subscribers.forEach((func) => func(screens));
1037
+ return subscribers.size >= 1;
1038
+ },
1039
+ subscribe(func) {
1040
+ if (!subscribers.size) this.register();
1041
+ subUid += 1;
1042
+ subscribers.set(subUid, func);
1043
+ func(screens);
1044
+ return subUid;
1045
+ },
1046
+ unsubscribe(paramToken) {
1047
+ subscribers.delete(paramToken);
1048
+ if (!subscribers.size) this.unregister();
1049
+ },
1050
+ unregister() {
1051
+ Object.keys(responsiveMap).forEach((screen) => {
1052
+ const matchMediaQuery = responsiveMap[screen];
1053
+ const handler = this.matchHandlers[matchMediaQuery];
1054
+ handler == null ? void 0 : handler.mql.removeListener(handler == null ? void 0 : handler.listener);
1055
+ });
1056
+ subscribers.clear();
1057
+ },
1058
+ register() {
1059
+ Object.keys(responsiveMap).forEach((screen) => {
1060
+ const matchMediaQuery = responsiveMap[screen];
1061
+ const listener = ({ matches }) => {
1062
+ this.dispatch({
1063
+ ...screens,
1064
+ [screen]: matches
1065
+ });
1066
+ };
1067
+ const mql = window.matchMedia(matchMediaQuery);
1068
+ mql.addListener(listener);
1069
+ this.matchHandlers[matchMediaQuery] = {
1070
+ mql,
1071
+ listener
1072
+ };
1073
+ listener(mql);
1074
+ });
1075
+ },
1076
+ responsiveMap
1077
+ };
1078
+ });
902
1079
  }
903
- function addCollection(data, provider) {
904
- if (typeof data !== "object") {
905
- return false;
906
- }
907
- if (typeof provider !== "string") {
908
- provider = data.provider || "";
1080
+ const NOOP = () => {
1081
+ };
1082
+ const useSameTarget = (handleClick) => {
1083
+ if (!handleClick) {
1084
+ return { onClick: NOOP, onMousedown: NOOP, onMouseup: NOOP };
909
1085
  }
910
- if (simpleNames && !provider && !data.prefix) {
911
- let added = false;
912
- if (quicklyValidateIconSet(data)) {
913
- data.prefix = "";
914
- parseIconSet(data, (name, icon) => {
915
- if (addIcon(name, icon)) {
916
- added = true;
917
- }
918
- });
1086
+ let mousedownTarget = false;
1087
+ let mouseupTarget = false;
1088
+ const onClick = (e) => {
1089
+ if (mousedownTarget && mouseupTarget) {
1090
+ handleClick(e);
919
1091
  }
920
- return added;
921
- }
922
- const prefix = data.prefix;
923
- if (!validateIconName({
924
- prefix,
925
- name: "a"
926
- })) {
927
- return false;
928
- }
929
- const storage2 = getStorage(provider, prefix);
930
- return !!addIconSet(storage2, data);
1092
+ mousedownTarget = false;
1093
+ mouseupTarget = false;
1094
+ };
1095
+ const onMousedown = (e) => {
1096
+ mousedownTarget = e.target === e.currentTarget;
1097
+ };
1098
+ const onMouseup = (e) => {
1099
+ mouseupTarget = e.target === e.currentTarget;
1100
+ };
1101
+ return { onClick, onMousedown, onMouseup };
1102
+ };
1103
+ function useThemeOverrides(themeOverrides) {
1104
+ const overrides = themeOverrides || vue.inject(themeOverridesContextKey, vue.ref());
1105
+ return overrides.value;
931
1106
  }
932
- const defaultIconSizeCustomisations = Object.freeze({
933
- width: null,
934
- height: null
935
- });
936
- const defaultIconCustomisations = Object.freeze({
937
- // Dimensions
938
- ...defaultIconSizeCustomisations,
939
- // Transformations
940
- ...defaultIconTransformations
941
- });
942
- const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
943
- const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
944
- function calculateSize(size, ratio, precision) {
945
- if (ratio === 1) {
946
- return size;
1107
+ const zIndex = vue.ref(0);
1108
+ const initial = {
1109
+ current: 0
1110
+ };
1111
+ const ZINDEX_INJECTION_KEY = Symbol("elZIndexContextKey");
1112
+ const useZIndex = (zIndexOverrides) => {
1113
+ const increasingInjection = vue.getCurrentInstance() ? vue.inject(ZINDEX_INJECTION_KEY, initial) : initial;
1114
+ const zIndexInjection = zIndexOverrides || (vue.getCurrentInstance() ? vue.inject(zIndexContextKey, void 0) : void 0);
1115
+ const initialZIndex = vue.computed(() => {
1116
+ const zIndexFromInjection = vue.unref(zIndexInjection);
1117
+ return utils.isNumber(zIndexFromInjection) ? zIndexFromInjection : DEFAULT_INITIAL_Z_INDEX;
1118
+ });
1119
+ const currentZIndex = vue.computed(() => initialZIndex.value + zIndex.value);
1120
+ const nextZIndex = () => {
1121
+ increasingInjection.current++;
1122
+ zIndex.value = increasingInjection.current;
1123
+ return currentZIndex.value;
1124
+ };
1125
+ return {
1126
+ initialZIndex,
1127
+ currentZIndex,
1128
+ nextZIndex
1129
+ };
1130
+ };
1131
+ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
1132
+ __name: "better-scroll",
1133
+ props: {
1134
+ options: {}
1135
+ },
1136
+ setup(__props, { expose: __expose }) {
1137
+ const props = __props;
1138
+ const { b, e, is } = useNamespace("better-scroll");
1139
+ const bsWrapper = vue.ref();
1140
+ const bsContent = vue.ref();
1141
+ const { width: wrapWidth } = useElementSize(bsWrapper);
1142
+ const { width, height } = useElementSize(bsContent);
1143
+ const instance = vue.ref();
1144
+ const isScrollY = vue.computed(() => Boolean(props.options.scrollY));
1145
+ function initBetterScroll() {
1146
+ if (!bsWrapper.value) return;
1147
+ instance.value = new BScroll(bsWrapper.value, props.options);
1148
+ }
1149
+ vue.watch([() => wrapWidth.value, () => width.value, () => height.value], () => {
1150
+ var _a;
1151
+ (_a = instance.value) == null ? void 0 : _a.refresh();
1152
+ });
1153
+ vue.onMounted(() => {
1154
+ initBetterScroll();
1155
+ });
1156
+ __expose({ instance });
1157
+ return (_ctx, _cache) => {
1158
+ return vue.openBlock(), vue.createElementBlock("div", {
1159
+ ref_key: "bsWrapper",
1160
+ ref: bsWrapper,
1161
+ class: vue.normalizeClass(vue.unref(b)())
1162
+ }, [
1163
+ vue.createElementVNode("div", {
1164
+ ref_key: "bsContent",
1165
+ ref: bsContent,
1166
+ class: vue.normalizeClass([vue.unref(e)("content"), { [vue.unref(is)("h-full")]: !isScrollY.value }])
1167
+ }, [
1168
+ vue.renderSlot(_ctx.$slots, "default")
1169
+ ], 2)
1170
+ ], 2);
1171
+ };
947
1172
  }
948
- precision = precision || 100;
949
- if (typeof size === "number") {
950
- return Math.ceil(size * ratio * precision) / precision;
1173
+ });
1174
+ const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
1175
+ const stringToIcon = (value, validate, allowSimpleName, provider = "") => {
1176
+ const colonSeparated = value.split(":");
1177
+ if (value.slice(0, 1) === "@") {
1178
+ if (colonSeparated.length < 2 || colonSeparated.length > 3) {
1179
+ return null;
1180
+ }
1181
+ provider = colonSeparated.shift().slice(1);
951
1182
  }
952
- if (typeof size !== "string") {
953
- return size;
1183
+ if (colonSeparated.length > 3 || !colonSeparated.length) {
1184
+ return null;
954
1185
  }
955
- const oldParts = size.split(unitsSplit);
956
- if (oldParts === null || !oldParts.length) {
957
- return size;
1186
+ if (colonSeparated.length > 1) {
1187
+ const name2 = colonSeparated.pop();
1188
+ const prefix = colonSeparated.pop();
1189
+ const result = {
1190
+ // Allow provider without '@': "provider:prefix:name"
1191
+ provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
1192
+ prefix,
1193
+ name: name2
1194
+ };
1195
+ return validate && !validateIconName(result) ? null : result;
958
1196
  }
959
- const newParts = [];
960
- let code = oldParts.shift();
961
- let isNumber = unitsTest.test(code);
962
- while (true) {
963
- if (isNumber) {
964
- const num = parseFloat(code);
965
- if (isNaN(num)) {
966
- newParts.push(code);
967
- } else {
968
- newParts.push(Math.ceil(num * ratio * precision) / precision);
1197
+ const name = colonSeparated[0];
1198
+ const dashSeparated = name.split("-");
1199
+ if (dashSeparated.length > 1) {
1200
+ const result = {
1201
+ provider,
1202
+ prefix: dashSeparated.shift(),
1203
+ name: dashSeparated.join("-")
1204
+ };
1205
+ return validate && !validateIconName(result) ? null : result;
1206
+ }
1207
+ if (allowSimpleName && provider === "") {
1208
+ const result = {
1209
+ provider,
1210
+ prefix: "",
1211
+ name
1212
+ };
1213
+ return validate && !validateIconName(result, allowSimpleName) ? null : result;
1214
+ }
1215
+ return null;
1216
+ };
1217
+ const validateIconName = (icon, allowSimpleName) => {
1218
+ if (!icon) {
1219
+ return false;
1220
+ }
1221
+ return !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
1222
+ // Check name: cannot be empty
1223
+ ((allowSimpleName && icon.prefix === "" || !!icon.prefix) && !!icon.name);
1224
+ };
1225
+ const defaultIconDimensions = Object.freeze(
1226
+ {
1227
+ left: 0,
1228
+ top: 0,
1229
+ width: 16,
1230
+ height: 16
1231
+ }
1232
+ );
1233
+ const defaultIconTransformations = Object.freeze({
1234
+ rotate: 0,
1235
+ vFlip: false,
1236
+ hFlip: false
1237
+ });
1238
+ const defaultIconProps = Object.freeze({
1239
+ ...defaultIconDimensions,
1240
+ ...defaultIconTransformations
1241
+ });
1242
+ const defaultExtendedIconProps = Object.freeze({
1243
+ ...defaultIconProps,
1244
+ body: "",
1245
+ hidden: false
1246
+ });
1247
+ function mergeIconTransformations(obj1, obj2) {
1248
+ const result = {};
1249
+ if (!obj1.hFlip !== !obj2.hFlip) {
1250
+ result.hFlip = true;
1251
+ }
1252
+ if (!obj1.vFlip !== !obj2.vFlip) {
1253
+ result.vFlip = true;
1254
+ }
1255
+ const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
1256
+ if (rotate) {
1257
+ result.rotate = rotate;
1258
+ }
1259
+ return result;
1260
+ }
1261
+ function mergeIconData(parent, child) {
1262
+ const result = mergeIconTransformations(parent, child);
1263
+ for (const key2 in defaultExtendedIconProps) {
1264
+ if (key2 in defaultIconTransformations) {
1265
+ if (key2 in parent && !(key2 in result)) {
1266
+ result[key2] = defaultIconTransformations[key2];
969
1267
  }
970
- } else {
971
- newParts.push(code);
972
- }
973
- code = oldParts.shift();
974
- if (code === void 0) {
975
- return newParts.join("");
1268
+ } else if (key2 in child) {
1269
+ result[key2] = child[key2];
1270
+ } else if (key2 in parent) {
1271
+ result[key2] = parent[key2];
976
1272
  }
977
- isNumber = !isNumber;
978
1273
  }
1274
+ return result;
979
1275
  }
980
- function splitSVGDefs(content, tag = "defs") {
981
- let defs = "";
982
- const index2 = content.indexOf("<" + tag);
983
- while (index2 >= 0) {
984
- const start = content.indexOf(">", index2);
985
- const end = content.indexOf("</" + tag);
986
- if (start === -1 || end === -1) {
987
- break;
1276
+ function getIconsTree(data, names) {
1277
+ const icons = data.icons;
1278
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
1279
+ const resolved = /* @__PURE__ */ Object.create(null);
1280
+ function resolve(name) {
1281
+ if (icons[name]) {
1282
+ return resolved[name] = [];
988
1283
  }
989
- const endEnd = content.indexOf(">", end);
990
- if (endEnd === -1) {
991
- break;
1284
+ if (!(name in resolved)) {
1285
+ resolved[name] = null;
1286
+ const parent = aliases[name] && aliases[name].parent;
1287
+ const value = parent && resolve(parent);
1288
+ if (value) {
1289
+ resolved[name] = [parent].concat(value);
1290
+ }
992
1291
  }
993
- defs += content.slice(start + 1, end).trim();
994
- content = content.slice(0, index2).trim() + content.slice(endEnd + 1);
1292
+ return resolved[name];
995
1293
  }
996
- return {
997
- defs,
998
- content
999
- };
1294
+ Object.keys(icons).concat(Object.keys(aliases)).forEach(resolve);
1295
+ return resolved;
1000
1296
  }
1001
- function mergeDefsAndContent(defs, content) {
1002
- return defs ? "<defs>" + defs + "</defs>" + content : content;
1297
+ function internalGetIconData(data, name, tree) {
1298
+ const icons = data.icons;
1299
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
1300
+ let currentProps = {};
1301
+ function parse(name2) {
1302
+ currentProps = mergeIconData(
1303
+ icons[name2] || aliases[name2],
1304
+ currentProps
1305
+ );
1306
+ }
1307
+ parse(name);
1308
+ tree.forEach(parse);
1309
+ return mergeIconData(data, currentProps);
1003
1310
  }
1004
- function wrapSVGContent(body, start, end) {
1005
- const split = splitSVGDefs(body);
1006
- return mergeDefsAndContent(split.defs, start + split.content + end);
1311
+ function parseIconSet(data, callback) {
1312
+ const names = [];
1313
+ if (typeof data !== "object" || typeof data.icons !== "object") {
1314
+ return names;
1315
+ }
1316
+ if (data.not_found instanceof Array) {
1317
+ data.not_found.forEach((name) => {
1318
+ callback(name, null);
1319
+ names.push(name);
1320
+ });
1321
+ }
1322
+ const tree = getIconsTree(data);
1323
+ for (const name in tree) {
1324
+ const item = tree[name];
1325
+ if (item) {
1326
+ callback(name, internalGetIconData(data, name, item));
1327
+ names.push(name);
1328
+ }
1329
+ }
1330
+ return names;
1007
1331
  }
1008
- const isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none";
1009
- function iconToSVG(icon, customisations) {
1010
- const fullIcon = {
1011
- ...defaultIconProps,
1012
- ...icon
1013
- };
1014
- const fullCustomisations = {
1015
- ...defaultIconCustomisations,
1016
- ...customisations
1017
- };
1018
- const box = {
1019
- left: fullIcon.left,
1020
- top: fullIcon.top,
1021
- width: fullIcon.width,
1022
- height: fullIcon.height
1023
- };
1024
- let body = fullIcon.body;
1025
- [fullIcon, fullCustomisations].forEach((props) => {
1026
- const transformations = [];
1027
- const hFlip = props.hFlip;
1332
+ const optionalPropertyDefaults = {
1333
+ provider: "",
1334
+ aliases: {},
1335
+ not_found: {},
1336
+ ...defaultIconDimensions
1337
+ };
1338
+ function checkOptionalProps(item, defaults) {
1339
+ for (const prop in defaults) {
1340
+ if (prop in item && typeof item[prop] !== typeof defaults[prop]) {
1341
+ return false;
1342
+ }
1343
+ }
1344
+ return true;
1345
+ }
1346
+ function quicklyValidateIconSet(obj) {
1347
+ if (typeof obj !== "object" || obj === null) {
1348
+ return null;
1349
+ }
1350
+ const data = obj;
1351
+ if (typeof data.prefix !== "string" || !obj.icons || typeof obj.icons !== "object") {
1352
+ return null;
1353
+ }
1354
+ if (!checkOptionalProps(obj, optionalPropertyDefaults)) {
1355
+ return null;
1356
+ }
1357
+ const icons = data.icons;
1358
+ for (const name in icons) {
1359
+ const icon = icons[name];
1360
+ if (
1361
+ // Name cannot be empty
1362
+ !name || // Must have body
1363
+ typeof icon.body !== "string" || // Check other props
1364
+ !checkOptionalProps(
1365
+ icon,
1366
+ defaultExtendedIconProps
1367
+ )
1368
+ ) {
1369
+ return null;
1370
+ }
1371
+ }
1372
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
1373
+ for (const name in aliases) {
1374
+ const icon = aliases[name];
1375
+ const parent = icon.parent;
1376
+ if (
1377
+ // Name cannot be empty
1378
+ !name || // Parent must be set and point to existing icon
1379
+ typeof parent !== "string" || !icons[parent] && !aliases[parent] || // Check other props
1380
+ !checkOptionalProps(
1381
+ icon,
1382
+ defaultExtendedIconProps
1383
+ )
1384
+ ) {
1385
+ return null;
1386
+ }
1387
+ }
1388
+ return data;
1389
+ }
1390
+ const dataStorage = /* @__PURE__ */ Object.create(null);
1391
+ function newStorage(provider, prefix) {
1392
+ return {
1393
+ provider,
1394
+ prefix,
1395
+ icons: /* @__PURE__ */ Object.create(null),
1396
+ missing: /* @__PURE__ */ new Set()
1397
+ };
1398
+ }
1399
+ function getStorage(provider, prefix) {
1400
+ const providerStorage = dataStorage[provider] || (dataStorage[provider] = /* @__PURE__ */ Object.create(null));
1401
+ return providerStorage[prefix] || (providerStorage[prefix] = newStorage(provider, prefix));
1402
+ }
1403
+ function addIconSet(storage2, data) {
1404
+ if (!quicklyValidateIconSet(data)) {
1405
+ return [];
1406
+ }
1407
+ return parseIconSet(data, (name, icon) => {
1408
+ if (icon) {
1409
+ storage2.icons[name] = icon;
1410
+ } else {
1411
+ storage2.missing.add(name);
1412
+ }
1413
+ });
1414
+ }
1415
+ function addIconToStorage(storage2, name, icon) {
1416
+ try {
1417
+ if (typeof icon.body === "string") {
1418
+ storage2.icons[name] = { ...icon };
1419
+ return true;
1420
+ }
1421
+ } catch (err) {
1422
+ }
1423
+ return false;
1424
+ }
1425
+ let simpleNames = false;
1426
+ function allowSimpleNames(allow) {
1427
+ if (typeof allow === "boolean") {
1428
+ simpleNames = allow;
1429
+ }
1430
+ return simpleNames;
1431
+ }
1432
+ function getIconData(name) {
1433
+ const icon = typeof name === "string" ? stringToIcon(name, true, simpleNames) : name;
1434
+ if (icon) {
1435
+ const storage2 = getStorage(icon.provider, icon.prefix);
1436
+ const iconName = icon.name;
1437
+ return storage2.icons[iconName] || (storage2.missing.has(iconName) ? null : void 0);
1438
+ }
1439
+ }
1440
+ function addIcon(name, data) {
1441
+ const icon = stringToIcon(name, true, simpleNames);
1442
+ if (!icon) {
1443
+ return false;
1444
+ }
1445
+ const storage2 = getStorage(icon.provider, icon.prefix);
1446
+ if (data) {
1447
+ return addIconToStorage(storage2, icon.name, data);
1448
+ } else {
1449
+ storage2.missing.add(icon.name);
1450
+ return true;
1451
+ }
1452
+ }
1453
+ function addCollection(data, provider) {
1454
+ if (typeof data !== "object") {
1455
+ return false;
1456
+ }
1457
+ if (typeof provider !== "string") {
1458
+ provider = data.provider || "";
1459
+ }
1460
+ if (simpleNames && !provider && !data.prefix) {
1461
+ let added = false;
1462
+ if (quicklyValidateIconSet(data)) {
1463
+ data.prefix = "";
1464
+ parseIconSet(data, (name, icon) => {
1465
+ if (addIcon(name, icon)) {
1466
+ added = true;
1467
+ }
1468
+ });
1469
+ }
1470
+ return added;
1471
+ }
1472
+ const prefix = data.prefix;
1473
+ if (!validateIconName({
1474
+ prefix,
1475
+ name: "a"
1476
+ })) {
1477
+ return false;
1478
+ }
1479
+ const storage2 = getStorage(provider, prefix);
1480
+ return !!addIconSet(storage2, data);
1481
+ }
1482
+ const defaultIconSizeCustomisations = Object.freeze({
1483
+ width: null,
1484
+ height: null
1485
+ });
1486
+ const defaultIconCustomisations = Object.freeze({
1487
+ // Dimensions
1488
+ ...defaultIconSizeCustomisations,
1489
+ // Transformations
1490
+ ...defaultIconTransformations
1491
+ });
1492
+ const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
1493
+ const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
1494
+ function calculateSize(size, ratio, precision) {
1495
+ if (ratio === 1) {
1496
+ return size;
1497
+ }
1498
+ precision = precision || 100;
1499
+ if (typeof size === "number") {
1500
+ return Math.ceil(size * ratio * precision) / precision;
1501
+ }
1502
+ if (typeof size !== "string") {
1503
+ return size;
1504
+ }
1505
+ const oldParts = size.split(unitsSplit);
1506
+ if (oldParts === null || !oldParts.length) {
1507
+ return size;
1508
+ }
1509
+ const newParts = [];
1510
+ let code = oldParts.shift();
1511
+ let isNumber = unitsTest.test(code);
1512
+ while (true) {
1513
+ if (isNumber) {
1514
+ const num = parseFloat(code);
1515
+ if (isNaN(num)) {
1516
+ newParts.push(code);
1517
+ } else {
1518
+ newParts.push(Math.ceil(num * ratio * precision) / precision);
1519
+ }
1520
+ } else {
1521
+ newParts.push(code);
1522
+ }
1523
+ code = oldParts.shift();
1524
+ if (code === void 0) {
1525
+ return newParts.join("");
1526
+ }
1527
+ isNumber = !isNumber;
1528
+ }
1529
+ }
1530
+ function splitSVGDefs(content, tag = "defs") {
1531
+ let defs = "";
1532
+ const index2 = content.indexOf("<" + tag);
1533
+ while (index2 >= 0) {
1534
+ const start = content.indexOf(">", index2);
1535
+ const end = content.indexOf("</" + tag);
1536
+ if (start === -1 || end === -1) {
1537
+ break;
1538
+ }
1539
+ const endEnd = content.indexOf(">", end);
1540
+ if (endEnd === -1) {
1541
+ break;
1542
+ }
1543
+ defs += content.slice(start + 1, end).trim();
1544
+ content = content.slice(0, index2).trim() + content.slice(endEnd + 1);
1545
+ }
1546
+ return {
1547
+ defs,
1548
+ content
1549
+ };
1550
+ }
1551
+ function mergeDefsAndContent(defs, content) {
1552
+ return defs ? "<defs>" + defs + "</defs>" + content : content;
1553
+ }
1554
+ function wrapSVGContent(body, start, end) {
1555
+ const split = splitSVGDefs(body);
1556
+ return mergeDefsAndContent(split.defs, start + split.content + end);
1557
+ }
1558
+ const isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none";
1559
+ function iconToSVG(icon, customisations) {
1560
+ const fullIcon = {
1561
+ ...defaultIconProps,
1562
+ ...icon
1563
+ };
1564
+ const fullCustomisations = {
1565
+ ...defaultIconCustomisations,
1566
+ ...customisations
1567
+ };
1568
+ const box = {
1569
+ left: fullIcon.left,
1570
+ top: fullIcon.top,
1571
+ width: fullIcon.width,
1572
+ height: fullIcon.height
1573
+ };
1574
+ let body = fullIcon.body;
1575
+ [fullIcon, fullCustomisations].forEach((props) => {
1576
+ const transformations = [];
1577
+ const hFlip = props.hFlip;
1028
1578
  const vFlip = props.vFlip;
1029
1579
  let rotation = props.rotate;
1030
1580
  if (hFlip) {
@@ -2304,11 +2854,11 @@ const Icon = vue.defineComponent((props, { emit }) => {
2304
2854
  emits: ["load"]
2305
2855
  });
2306
2856
  const _hoisted_1$c = ["xlink:href"];
2307
- const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
2857
+ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
2308
2858
  __name: "BasicSvgIcon",
2309
2859
  props: {
2310
2860
  icon: {},
2311
- localIcon: { type: Boolean }
2861
+ localIcon: {}
2312
2862
  },
2313
2863
  setup(__props) {
2314
2864
  const props = __props;
@@ -2350,16 +2900,224 @@ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
2350
2900
  };
2351
2901
  }
2352
2902
  });
2353
- const XBasicSvgIcon = utils.withInstall(_sfc_main$O);
2354
- const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
2355
- __name: "BasicArrow",
2903
+ const XBasicSvgIcon = utils.withInstall(_sfc_main$U);
2904
+ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
2905
+ ...{
2906
+ inheritAttrs: false
2907
+ },
2908
+ __name: "button-icon",
2356
2909
  props: {
2357
- expand: { type: Boolean },
2358
- inset: { type: Boolean }
2910
+ class: { default: "" },
2911
+ icon: { default: "" },
2912
+ tooltipContent: { default: "" },
2913
+ tooltipPlacement: { default: "bottom" },
2914
+ zIndex: { default: 98 }
2359
2915
  },
2360
2916
  setup(__props) {
2361
2917
  const props = __props;
2362
- const { b } = useNamespace("basic-arrow");
2918
+ const { b, e } = useNamespace("button-icon");
2919
+ const buttonIconClass = vue.computed(() => {
2920
+ return [b(), props.class];
2921
+ });
2922
+ return (_ctx, _cache) => {
2923
+ return vue.openBlock(), vue.createBlock(vue.unref(naiveUi.NTooltip), {
2924
+ placement: __props.tooltipPlacement,
2925
+ "z-index": __props.zIndex,
2926
+ disabled: !__props.tooltipContent
2927
+ }, {
2928
+ trigger: vue.withCtx(() => [
2929
+ vue.createVNode(vue.unref(naiveUi.NButton), vue.mergeProps({
2930
+ quaternary: "",
2931
+ class: buttonIconClass.value
2932
+ }, _ctx.$attrs), {
2933
+ default: vue.withCtx(() => [
2934
+ vue.createElementVNode("div", {
2935
+ class: vue.normalizeClass(vue.unref(e)("icon"))
2936
+ }, [
2937
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
2938
+ vue.createVNode(vue.unref(XBasicSvgIcon), { icon: __props.icon }, null, 8, ["icon"])
2939
+ ])
2940
+ ], 2)
2941
+ ]),
2942
+ _: 3
2943
+ }, 16, ["class"])
2944
+ ]),
2945
+ default: vue.withCtx(() => [
2946
+ vue.createTextVNode(" " + vue.toDisplayString(__props.tooltipContent), 1)
2947
+ ]),
2948
+ _: 3
2949
+ }, 8, ["placement", "z-index", "disabled"]);
2950
+ };
2951
+ }
2952
+ });
2953
+ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
2954
+ __name: "full-screen",
2955
+ props: {
2956
+ full: { type: Boolean }
2957
+ },
2958
+ setup(__props) {
2959
+ const { t } = useLocale();
2960
+ return (_ctx, _cache) => {
2961
+ return vue.openBlock(), vue.createBlock(_sfc_main$T, {
2962
+ key: String(__props.full),
2963
+ "tooltip-content": __props.full ? vue.unref(t)("max.icon.fullscreenExit") : vue.unref(t)("max.icon.fullscreen")
2964
+ }, {
2965
+ default: vue.withCtx(() => [
2966
+ __props.full ? (vue.openBlock(), vue.createBlock(vue.unref(XBasicSvgIcon), {
2967
+ key: 0,
2968
+ icon: "gridicons-fullscreen-exit"
2969
+ })) : (vue.openBlock(), vue.createBlock(vue.unref(XBasicSvgIcon), {
2970
+ key: 1,
2971
+ icon: "gridicons-fullscreen"
2972
+ }))
2973
+ ]),
2974
+ _: 1
2975
+ }, 8, ["tooltip-content"]);
2976
+ };
2977
+ }
2978
+ });
2979
+ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
2980
+ __name: "icon-tooltip",
2981
+ props: {
2982
+ icon: { default: "mdi-help-circle" },
2983
+ localIcon: { default: "" },
2984
+ desc: { default: "" },
2985
+ placement: { default: "top" }
2986
+ },
2987
+ setup(__props) {
2988
+ const props = __props;
2989
+ const { b } = useNamespace("icon-tooltip");
2990
+ const slots = vue.useSlots();
2991
+ const hasCustomTrigger = vue.computed(() => Boolean(slots.trigger));
2992
+ if (!hasCustomTrigger.value && !props.icon && !props.localIcon) {
2993
+ throw new Error("icon or localIcon is required when no custom trigger slot is provided");
2994
+ }
2995
+ return (_ctx, _cache) => {
2996
+ return vue.openBlock(), vue.createBlock(vue.unref(naiveUi.NTooltip), { placement: __props.placement }, {
2997
+ trigger: vue.withCtx(() => [
2998
+ vue.renderSlot(_ctx.$slots, "trigger", {}, () => [
2999
+ vue.createElementVNode("div", {
3000
+ class: vue.normalizeClass(vue.unref(b)())
3001
+ }, [
3002
+ vue.createVNode(vue.unref(XBasicSvgIcon), {
3003
+ icon: __props.icon,
3004
+ "local-icon": __props.localIcon
3005
+ }, null, 8, ["icon", "local-icon"])
3006
+ ], 2)
3007
+ ])
3008
+ ]),
3009
+ default: vue.withCtx(() => [
3010
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
3011
+ vue.createElementVNode("span", null, vue.toDisplayString(__props.desc), 1)
3012
+ ])
3013
+ ]),
3014
+ _: 3
3015
+ }, 8, ["placement"]);
3016
+ };
3017
+ }
3018
+ });
3019
+ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
3020
+ __name: "menu-toggler",
3021
+ props: {
3022
+ collapsed: { type: Boolean },
3023
+ arrowIcon: { type: Boolean, default: false },
3024
+ zIndex: { default: 98 }
3025
+ },
3026
+ setup(__props) {
3027
+ const props = __props;
3028
+ const { t } = useLocale();
3029
+ const icon = vue.computed(() => {
3030
+ const icons = {
3031
+ 0: {
3032
+ 0: "line-md:menu-fold-left",
3033
+ 1: "line-md:menu-fold-right"
3034
+ },
3035
+ 1: {
3036
+ 0: "ph-caret-double-left-bold",
3037
+ 1: "ph-caret-double-right-bold"
3038
+ }
3039
+ };
3040
+ const arrowIcon = Number(props.arrowIcon || false);
3041
+ const collapsed = Number(props.collapsed || false);
3042
+ return icons[arrowIcon][collapsed];
3043
+ });
3044
+ return (_ctx, _cache) => {
3045
+ return vue.openBlock(), vue.createBlock(_sfc_main$T, {
3046
+ key: String(__props.collapsed),
3047
+ "tooltip-content": __props.collapsed ? vue.unref(t)("max.icon.expand") : vue.unref(t)("max.icon.collapse"),
3048
+ "tooltip-placement": "bottom-start",
3049
+ "z-index": __props.zIndex
3050
+ }, {
3051
+ default: vue.withCtx(() => [
3052
+ vue.createVNode(vue.unref(XBasicSvgIcon), { icon: icon.value }, null, 8, ["icon"])
3053
+ ]),
3054
+ _: 1
3055
+ }, 8, ["tooltip-content", "z-index"]);
3056
+ };
3057
+ }
3058
+ });
3059
+ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
3060
+ __name: "pin-toggler",
3061
+ props: {
3062
+ pin: { type: Boolean }
3063
+ },
3064
+ setup(__props) {
3065
+ const props = __props;
3066
+ const { t } = useLocale();
3067
+ const icon = vue.computed(() => props.pin ? "mdi-pin-off" : "mdi-pin");
3068
+ return (_ctx, _cache) => {
3069
+ return vue.openBlock(), vue.createBlock(_sfc_main$T, {
3070
+ "tooltip-content": __props.pin ? vue.unref(t)("max.icon.unpin") : vue.unref(t)("max.icon.pin"),
3071
+ "tooltip-placement": "bottom-start",
3072
+ "z-index": 100
3073
+ }, {
3074
+ default: vue.withCtx(() => [
3075
+ vue.createVNode(vue.unref(XBasicSvgIcon), { icon: icon.value }, null, 8, ["icon"])
3076
+ ]),
3077
+ _: 1
3078
+ }, 8, ["tooltip-content"]);
3079
+ };
3080
+ }
3081
+ });
3082
+ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
3083
+ __name: "reload-button",
3084
+ props: {
3085
+ loading: { type: Boolean }
3086
+ },
3087
+ setup(__props) {
3088
+ const { t } = useLocale();
3089
+ const { b } = useNamespace("reload-button");
3090
+ return (_ctx, _cache) => {
3091
+ return vue.openBlock(), vue.createBlock(_sfc_main$T, {
3092
+ "tooltip-content": vue.unref(t)("max.icon.reload")
3093
+ }, {
3094
+ default: vue.withCtx(() => [
3095
+ vue.createVNode(vue.unref(XBasicSvgIcon), {
3096
+ icon: "mdi-refresh",
3097
+ class: vue.normalizeClass({ [vue.unref(b)()]: __props.loading })
3098
+ }, null, 8, ["class"])
3099
+ ]),
3100
+ _: 1
3101
+ }, 8, ["tooltip-content"]);
3102
+ };
3103
+ }
3104
+ });
3105
+ const XCommonBetterScroll = utils.withInstall(_sfc_main$V);
3106
+ const XCommonButtonIcon = utils.withInstall(_sfc_main$T);
3107
+ const XCommonFullScreen = utils.withInstall(_sfc_main$S);
3108
+ const XCommonIconTooltip = utils.withInstall(_sfc_main$R);
3109
+ const XCommonMenuToggler = utils.withInstall(_sfc_main$Q);
3110
+ const XCommonPinToggler = utils.withInstall(_sfc_main$P);
3111
+ const XCommonReloadButton = utils.withInstall(_sfc_main$O);
3112
+ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
3113
+ __name: "BasicArrow",
3114
+ props: {
3115
+ expand: { type: Boolean },
3116
+ inset: { type: Boolean }
3117
+ },
3118
+ setup(__props) {
3119
+ const props = __props;
3120
+ const { b } = useNamespace("basic-arrow");
2363
3121
  const getClass = vue.computed(() => {
2364
3122
  const { expand, inset } = props;
2365
3123
  const prefixCls = b();
@@ -2440,170 +3198,427 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
2440
3198
  }
2441
3199
  });
2442
3200
  const XBasicButton = utils.withInstall(_sfc_main$M);
2443
- !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
2444
- !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
2445
- const hasOwnProperty = Object.prototype.hasOwnProperty;
2446
- const hasOwn = (val, key2) => hasOwnProperty.call(val, key2);
2447
- const basicOverlayProps = {
2448
- mask: {
2449
- type: Boolean,
2450
- default: true
2451
- },
2452
- customMaskEvent: Boolean,
2453
- overlayClass: {
2454
- type: [String, Array, Object]
2455
- },
2456
- zIndex: {
2457
- type: [String, Number]
2458
- }
2459
- };
2460
- const BasicOverlay = /* @__PURE__ */ vue.defineComponent({
2461
- name: "XBasicOverlay",
2462
- props: basicOverlayProps,
3201
+ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
3202
+ __name: "BasicButtonCreate",
2463
3203
  emits: ["click"],
2464
- setup(props, {
2465
- emit,
2466
- slots
2467
- }) {
2468
- const {
2469
- b
2470
- } = useNamespace("basic-overlay");
2471
- const onMaskClick = (e) => {
2472
- emit("click", e);
3204
+ setup(__props, { emit: __emit }) {
3205
+ const emit = __emit;
3206
+ const { t } = useLocale();
3207
+ const attrs = vue.useAttrs();
3208
+ function onClickHandler() {
3209
+ emit("click");
3210
+ }
3211
+ return (_ctx, _cache) => {
3212
+ return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
3213
+ icon: "ri-add-fill",
3214
+ type: "primary"
3215
+ }, vue.unref(attrs), { onClick: onClickHandler }), {
3216
+ default: vue.withCtx(() => [
3217
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
3218
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.add")), 1)
3219
+ ])
3220
+ ]),
3221
+ _: 3
3222
+ }, 16);
2473
3223
  };
2474
- const {
2475
- onClick,
2476
- onMousedown,
2477
- onMouseup
2478
- } = useSameTarget(props.customMaskEvent ? void 0 : onMaskClick);
2479
- return () => {
2480
- var _a, _b;
2481
- return props.mask ? vue.createVNode("div", {
2482
- "class": [b(), props.overlayClass],
2483
- "style": {
2484
- zIndex: props.zIndex
2485
- },
2486
- "onClick": onClick,
2487
- "onMousedown": onMousedown,
2488
- "onMouseup": onMouseup
2489
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]) : vue.createVNode("div", {
2490
- "class": props.overlayClass,
2491
- "style": {
2492
- zIndex: props.zIndex,
2493
- position: "fixed",
2494
- top: "0px",
2495
- right: "0px",
2496
- bottom: "0px",
2497
- left: "0px"
2498
- }
2499
- }, [(_b = slots.default) == null ? void 0 : _b.call(slots)]);
3224
+ }
3225
+ });
3226
+ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
3227
+ __name: "BasicButtonDelete",
3228
+ emits: ["click"],
3229
+ setup(__props, { emit: __emit }) {
3230
+ const emit = __emit;
3231
+ const { t } = useLocale();
3232
+ const attrs = vue.useAttrs();
3233
+ function onClickHandler() {
3234
+ emit("click");
3235
+ }
3236
+ return (_ctx, _cache) => {
3237
+ return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
3238
+ type: "error",
3239
+ icon: "ri-delete-bin-5-fill"
3240
+ }, vue.unref(attrs), { onClick: onClickHandler }), {
3241
+ default: vue.withCtx(() => [
3242
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
3243
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.delete")), 1)
3244
+ ])
3245
+ ]),
3246
+ _: 3
3247
+ }, 16);
2500
3248
  };
2501
3249
  }
2502
3250
  });
2503
- const XBasicOverlay = utils.withInstall(BasicOverlay);
2504
- const configProviderKey = Symbol("config-provider");
2505
- const globalConfig = vue.ref();
2506
- function useGlobalConfig(key2, defaultValue = void 0) {
2507
- const config = vue.getCurrentInstance() ? vue.inject(configProviderKey, globalConfig) : globalConfig;
2508
- if (key2) {
2509
- return vue.computed(() => {
2510
- var _a, _b;
2511
- return (_b = (_a = config.value) == null ? void 0 : _a[key2]) != null ? _b : defaultValue;
2512
- });
3251
+ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
3252
+ __name: "BasicButtonEdit",
3253
+ emits: ["click"],
3254
+ setup(__props, { emit: __emit }) {
3255
+ const emit = __emit;
3256
+ const { t } = useLocale();
3257
+ const attrs = vue.useAttrs();
3258
+ function onClickHandler() {
3259
+ emit("click");
3260
+ }
3261
+ return (_ctx, _cache) => {
3262
+ return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
3263
+ icon: "ri-edit-fill",
3264
+ type: "primary"
3265
+ }, vue.unref(attrs), { onClick: onClickHandler }), {
3266
+ default: vue.withCtx(() => [
3267
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
3268
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.edit")), 1)
3269
+ ])
3270
+ ]),
3271
+ _: 3
3272
+ }, 16);
3273
+ };
2513
3274
  }
2514
- return config;
2515
- }
2516
- const provideGlobalConfig = (config, app, global = false) => {
2517
- var _a;
2518
- const inSetup = Boolean(vue.getCurrentInstance());
2519
- const oldConfig = inSetup ? useGlobalConfig() : void 0;
2520
- const provideFn = (_a = app == null ? void 0 : app.provide) != null ? _a : inSetup ? vue.provide : void 0;
2521
- if (!provideFn) return;
2522
- const context = vue.computed(() => {
2523
- const cfg = vue.unref(config);
2524
- if (!(oldConfig == null ? void 0 : oldConfig.value)) return cfg;
2525
- return lodashEs.merge(oldConfig.value, cfg);
2526
- });
2527
- provideFn(configProviderKey, context);
2528
- provideFn(
2529
- localeContextKey,
2530
- vue.computed(() => context.value.locale)
2531
- );
2532
- provideFn(
2533
- namespaceContextKey,
2534
- vue.computed(() => context.value.namespace)
2535
- );
2536
- provideFn(
2537
- zIndexContextKey,
2538
- vue.computed(() => context.value.zIndex)
2539
- );
2540
- provideFn(
2541
- themeOverridesContextKey,
2542
- vue.computed(() => context.value.themeOverrides)
2543
- );
2544
- provideFn(
2545
- iconLocalPrefixContextKey,
2546
- vue.computed(() => context.value.iconLocalPrefix)
2547
- );
2548
- if (global || !globalConfig.value) {
2549
- globalConfig.value = context.value;
3275
+ });
3276
+ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
3277
+ __name: "BasicButtonExport",
3278
+ props: {
3279
+ href: {},
3280
+ exportApi: { type: Function },
3281
+ beforeFetch: { type: Function },
3282
+ afterFetch: { type: Function },
3283
+ download: {},
3284
+ origin: { type: Boolean },
3285
+ onClick: { type: Function }
3286
+ },
3287
+ setup(__props) {
3288
+ const props = __props;
3289
+ const { t } = useLocale();
3290
+ const attrs = vue.useAttrs();
3291
+ async function downloadFileRemote() {
3292
+ if (!props.exportApi) return false;
3293
+ const params = utils.isFunction(props.beforeFetch) ? props.beforeFetch() : {};
3294
+ const { response } = await props.exportApi(params);
3295
+ if (response.data) {
3296
+ utils.downloadFileByResponseData(response);
3297
+ }
3298
+ props.afterFetch && props.afterFetch(response);
3299
+ }
3300
+ function onClickHandler() {
3301
+ var _a;
3302
+ if (props.origin) {
3303
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
3304
+ return false;
3305
+ }
3306
+ if (!props.exportApi) {
3307
+ utils.downloadFileStatic(props.href, props.download);
3308
+ return false;
3309
+ }
3310
+ downloadFileRemote();
3311
+ }
3312
+ return (_ctx, _cache) => {
3313
+ return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
3314
+ icon: "ri:export-line",
3315
+ type: "primary"
3316
+ }, vue.unref(attrs), { onClick: onClickHandler }), {
3317
+ default: vue.withCtx(() => [
3318
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
3319
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.export")), 1)
3320
+ ])
3321
+ ]),
3322
+ _: 3
3323
+ }, 16);
3324
+ };
2550
3325
  }
2551
- return context;
2552
- };
2553
- const useConfigProvider = (block) => {
2554
- const config = useGlobalConfig();
2555
- const ns = useNamespace(
2556
- block,
2557
- vue.computed(() => {
3326
+ });
3327
+ const _hoisted_1$b = ["multiple", "name", "accept"];
3328
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
3329
+ __name: "BasicButtonImport",
3330
+ props: {
3331
+ name: { default: "file" },
3332
+ accept: { default: ".xlsx,.xls,.csv" },
3333
+ multiple: { type: Boolean, default: false },
3334
+ beforeUpload: { type: Function, default: void 0 }
3335
+ },
3336
+ emits: ["change"],
3337
+ setup(__props, { emit: __emit }) {
3338
+ const props = __props;
3339
+ const emit = __emit;
3340
+ const { t } = useLocale();
3341
+ const attrs = vue.useAttrs();
3342
+ const uid2 = vue.ref(utils.guid());
3343
+ const fileInputRef = vue.useTemplateRef("fileInputRef");
3344
+ function onClickHandler() {
2558
3345
  var _a;
2559
- return ((_a = config.value) == null ? void 0 : _a.namespace) || DEFAULT_NAMESPACE;
2560
- })
2561
- );
2562
- const locale = useLocale(vue.computed(() => {
2563
- var _a;
2564
- return (_a = config.value) == null ? void 0 : _a.locale;
2565
- }));
2566
- const zIndex2 = useZIndex(vue.computed(() => {
2567
- var _a;
2568
- return ((_a = config.value) == null ? void 0 : _a.zIndex) || DEFAULT_INITIAL_Z_INDEX;
2569
- }));
2570
- const themeOverrides = useThemeOverrides(vue.computed(() => {
2571
- var _a;
2572
- return (_a = config.value) == null ? void 0 : _a.themeOverrides;
2573
- }));
2574
- provideGlobalConfig(vue.computed(() => vue.unref(config) || {}));
2575
- return {
2576
- ns,
2577
- locale,
2578
- zIndex: zIndex2,
2579
- themeOverrides
2580
- };
3346
+ (_a = fileInputRef.value) == null ? void 0 : _a.click();
3347
+ }
3348
+ function reset() {
3349
+ uid2.value = utils.guid();
3350
+ }
3351
+ async function processFile(file, fileList) {
3352
+ const { beforeUpload } = props;
3353
+ let transformedFile = file;
3354
+ if (beforeUpload) {
3355
+ try {
3356
+ transformedFile = await beforeUpload(file, fileList);
3357
+ } catch (e) {
3358
+ console.warn("max-ajax-uploader", e);
3359
+ transformedFile = false;
3360
+ }
3361
+ if (transformedFile === false) {
3362
+ return {
3363
+ origin: file
3364
+ };
3365
+ }
3366
+ }
3367
+ return {
3368
+ origin: file
3369
+ };
3370
+ }
3371
+ function uploadFiles(files) {
3372
+ const originFiles = [...files];
3373
+ const postFiles = originFiles.map((file) => {
3374
+ return processFile(file, originFiles);
3375
+ });
3376
+ Promise.all(postFiles).then((fileList) => {
3377
+ if (fileList.length === 0) {
3378
+ return;
3379
+ }
3380
+ const file = fileList[0].origin;
3381
+ const po = new FormData();
3382
+ po.append("file", file);
3383
+ emit("change", { file: fileList[0].origin, files: fileList, param: po });
3384
+ });
3385
+ }
3386
+ function onFileChange(e) {
3387
+ const { accept } = props;
3388
+ const { files } = e.target;
3389
+ const acceptedFiles = [...files].filter((file) => utils.attrAccept(file, accept));
3390
+ uploadFiles(acceptedFiles);
3391
+ reset();
3392
+ }
3393
+ return (_ctx, _cache) => {
3394
+ return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
3395
+ icon: "ri:import-line",
3396
+ type: "primary"
3397
+ }, vue.unref(attrs), { onClick: onClickHandler }), {
3398
+ default: vue.withCtx(() => [
3399
+ (vue.openBlock(), vue.createElementBlock("input", {
3400
+ key: uid2.value,
3401
+ ref_key: "fileInputRef",
3402
+ ref: fileInputRef,
3403
+ type: "file",
3404
+ class: "hidden",
3405
+ multiple: __props.multiple,
3406
+ name: __props.name,
3407
+ accept: __props.accept,
3408
+ onChange: onFileChange
3409
+ }, null, 40, _hoisted_1$b)),
3410
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
3411
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.import")), 1)
3412
+ ], true)
3413
+ ]),
3414
+ _: 3
3415
+ }, 16);
3416
+ };
3417
+ }
3418
+ });
3419
+ const _export_sfc = (sfc, props) => {
3420
+ const target = sfc.__vccOpts || sfc;
3421
+ for (const [key2, val] of props) {
3422
+ target[key2] = val;
3423
+ }
3424
+ return target;
2581
3425
  };
2582
- const configProviderProps = {
2583
- /** 全局 z-index */
2584
- zIndex: Number,
2585
- /** 全局语言 */
2586
- locale: {
2587
- type: Object
2588
- },
2589
- /** 全局命名空间 */
2590
- namespace: {
2591
- type: String,
2592
- default: DEFAULT_NAMESPACE
3426
+ const BasicButtonImport = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-826acb65"]]);
3427
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
3428
+ __name: "BasicButtonPrint",
3429
+ emits: ["click"],
3430
+ setup(__props, { emit: __emit }) {
3431
+ const emit = __emit;
3432
+ const { t } = useLocale();
3433
+ const attrs = vue.useAttrs();
3434
+ function onClickHandler() {
3435
+ emit("click");
3436
+ }
3437
+ return (_ctx, _cache) => {
3438
+ return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
3439
+ icon: "ri-printer-line",
3440
+ type: "primary"
3441
+ }, vue.unref(attrs), { onClick: onClickHandler }), {
3442
+ default: vue.withCtx(() => [
3443
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
3444
+ vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.print")), 1)
3445
+ ])
3446
+ ]),
3447
+ _: 3
3448
+ }, 16);
3449
+ };
3450
+ }
3451
+ });
3452
+ const XBasicButtonCreate = utils.withInstall(_sfc_main$L);
3453
+ const XBasicButtonEdit = utils.withInstall(_sfc_main$J);
3454
+ const XBasicButtonDelete = utils.withInstall(_sfc_main$K);
3455
+ const XBasicButtonExport = utils.withInstall(_sfc_main$I);
3456
+ const XBasicButtonImport = utils.withInstall(BasicButtonImport);
3457
+ const XBasicButtonPrint = utils.withInstall(_sfc_main$G);
3458
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
3459
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
3460
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
3461
+ const hasOwn = (val, key2) => hasOwnProperty.call(val, key2);
3462
+ const basicOverlayProps = {
3463
+ mask: {
3464
+ type: Boolean,
3465
+ default: true
2593
3466
  },
2594
- /** 本地全局图标前缀 */
2595
- iconLocalPrefix: {
2596
- type: String,
2597
- default: DEFAULT_ICON_LOCAL_PREFIX
3467
+ customMaskEvent: Boolean,
3468
+ overlayClass: {
3469
+ type: [String, Array, Object]
2598
3470
  },
2599
- /** 全局主题覆盖 */
2600
- themeOverrides: {
2601
- type: Object
3471
+ zIndex: {
3472
+ type: [String, Number]
2602
3473
  }
2603
3474
  };
2604
- const ConfigProvider = /* @__PURE__ */ vue.defineComponent({
2605
- name: "ConfigProvider",
2606
- props: configProviderProps,
3475
+ const BasicOverlay = /* @__PURE__ */ vue.defineComponent({
3476
+ name: "XBasicOverlay",
3477
+ props: basicOverlayProps,
3478
+ emits: ["click"],
3479
+ setup(props, {
3480
+ emit,
3481
+ slots
3482
+ }) {
3483
+ const {
3484
+ b
3485
+ } = useNamespace("basic-overlay");
3486
+ const onMaskClick = (e) => {
3487
+ emit("click", e);
3488
+ };
3489
+ const {
3490
+ onClick,
3491
+ onMousedown,
3492
+ onMouseup
3493
+ } = useSameTarget(props.customMaskEvent ? void 0 : onMaskClick);
3494
+ return () => {
3495
+ var _a, _b;
3496
+ return props.mask ? vue.createVNode("div", {
3497
+ "class": [b(), props.overlayClass],
3498
+ "style": {
3499
+ zIndex: props.zIndex
3500
+ },
3501
+ "onClick": onClick,
3502
+ "onMousedown": onMousedown,
3503
+ "onMouseup": onMouseup
3504
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]) : vue.createVNode("div", {
3505
+ "class": props.overlayClass,
3506
+ "style": {
3507
+ zIndex: props.zIndex,
3508
+ position: "fixed",
3509
+ top: "0px",
3510
+ right: "0px",
3511
+ bottom: "0px",
3512
+ left: "0px"
3513
+ }
3514
+ }, [(_b = slots.default) == null ? void 0 : _b.call(slots)]);
3515
+ };
3516
+ }
3517
+ });
3518
+ const XBasicOverlay = utils.withInstall(BasicOverlay);
3519
+ const configProviderKey = Symbol("config-provider");
3520
+ const globalConfig = vue.ref();
3521
+ function useGlobalConfig(key2, defaultValue = void 0) {
3522
+ const config = vue.getCurrentInstance() ? vue.inject(configProviderKey, globalConfig) : globalConfig;
3523
+ if (key2) {
3524
+ return vue.computed(() => {
3525
+ var _a, _b;
3526
+ return (_b = (_a = config.value) == null ? void 0 : _a[key2]) != null ? _b : defaultValue;
3527
+ });
3528
+ }
3529
+ return config;
3530
+ }
3531
+ const provideGlobalConfig = (config, app, global = false) => {
3532
+ var _a;
3533
+ const inSetup = Boolean(vue.getCurrentInstance());
3534
+ const oldConfig = inSetup ? useGlobalConfig() : void 0;
3535
+ const provideFn = (_a = app == null ? void 0 : app.provide) != null ? _a : inSetup ? vue.provide : void 0;
3536
+ if (!provideFn) return;
3537
+ const context = vue.computed(() => {
3538
+ const cfg = vue.unref(config);
3539
+ if (!(oldConfig == null ? void 0 : oldConfig.value)) return cfg;
3540
+ return lodashEs.merge(oldConfig.value, cfg);
3541
+ });
3542
+ provideFn(configProviderKey, context);
3543
+ provideFn(
3544
+ localeContextKey,
3545
+ vue.computed(() => context.value.locale)
3546
+ );
3547
+ provideFn(
3548
+ namespaceContextKey,
3549
+ vue.computed(() => context.value.namespace)
3550
+ );
3551
+ provideFn(
3552
+ zIndexContextKey,
3553
+ vue.computed(() => context.value.zIndex)
3554
+ );
3555
+ provideFn(
3556
+ themeOverridesContextKey,
3557
+ vue.computed(() => context.value.themeOverrides)
3558
+ );
3559
+ provideFn(
3560
+ iconLocalPrefixContextKey,
3561
+ vue.computed(() => context.value.iconLocalPrefix)
3562
+ );
3563
+ if (global || !globalConfig.value) {
3564
+ globalConfig.value = context.value;
3565
+ }
3566
+ return context;
3567
+ };
3568
+ const useConfigProvider = (block) => {
3569
+ const config = useGlobalConfig();
3570
+ const ns = useNamespace(
3571
+ block,
3572
+ vue.computed(() => {
3573
+ var _a;
3574
+ return ((_a = config.value) == null ? void 0 : _a.namespace) || DEFAULT_NAMESPACE;
3575
+ })
3576
+ );
3577
+ const locale = useLocale(vue.computed(() => {
3578
+ var _a;
3579
+ return (_a = config.value) == null ? void 0 : _a.locale;
3580
+ }));
3581
+ const zIndex2 = useZIndex(vue.computed(() => {
3582
+ var _a;
3583
+ return ((_a = config.value) == null ? void 0 : _a.zIndex) || DEFAULT_INITIAL_Z_INDEX;
3584
+ }));
3585
+ const themeOverrides = useThemeOverrides(vue.computed(() => {
3586
+ var _a;
3587
+ return (_a = config.value) == null ? void 0 : _a.themeOverrides;
3588
+ }));
3589
+ provideGlobalConfig(vue.computed(() => vue.unref(config) || {}));
3590
+ return {
3591
+ ns,
3592
+ locale,
3593
+ zIndex: zIndex2,
3594
+ themeOverrides
3595
+ };
3596
+ };
3597
+ const configProviderProps = {
3598
+ /** 全局 z-index 值 */
3599
+ zIndex: Number,
3600
+ /** 全局语言 */
3601
+ locale: {
3602
+ type: Object
3603
+ },
3604
+ /** 全局命名空间 */
3605
+ namespace: {
3606
+ type: String,
3607
+ default: DEFAULT_NAMESPACE
3608
+ },
3609
+ /** 本地全局图标前缀 */
3610
+ iconLocalPrefix: {
3611
+ type: String,
3612
+ default: DEFAULT_ICON_LOCAL_PREFIX
3613
+ },
3614
+ /** 全局主题覆盖 */
3615
+ themeOverrides: {
3616
+ type: Object
3617
+ }
3618
+ };
3619
+ const ConfigProvider = /* @__PURE__ */ vue.defineComponent({
3620
+ name: "ConfigProvider",
3621
+ props: configProviderProps,
2607
3622
  setup(props, {
2608
3623
  slots
2609
3624
  }) {
@@ -2660,7 +3675,7 @@ const basicMessageBoxProps = {
2660
3675
  default: ""
2661
3676
  }
2662
3677
  };
2663
- const _sfc_main$L = vue.defineComponent({
3678
+ const _sfc_main$F = vue.defineComponent({
2664
3679
  components: {
2665
3680
  NButton: naiveUi.NButton,
2666
3681
  NInput: naiveUi.NInput,
@@ -2893,14 +3908,7 @@ const _sfc_main$L = vue.defineComponent({
2893
3908
  };
2894
3909
  }
2895
3910
  });
2896
- const _export_sfc = (sfc, props) => {
2897
- const target = sfc.__vccOpts || sfc;
2898
- for (const [key2, val] of props) {
2899
- target[key2] = val;
2900
- }
2901
- return target;
2902
- };
2903
- const _hoisted_1$b = ["aria-label", "aria-describedby"];
3911
+ const _hoisted_1$a = ["aria-label", "aria-describedby"];
2904
3912
  const _hoisted_2$4 = ["id"];
2905
3913
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2906
3914
  const _component_BasicSvgIcon = vue.resolveComponent("BasicSvgIcon");
@@ -3058,7 +4066,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3058
4066
  ])
3059
4067
  ], 2)
3060
4068
  ], 6)
3061
- ], 42, _hoisted_1$b)
4069
+ ], 42, _hoisted_1$a)
3062
4070
  ]),
3063
4071
  _: 3
3064
4072
  }, 8, ["z-index", "overlay-class", "mask"]), [
@@ -3068,7 +4076,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3068
4076
  _: 3
3069
4077
  });
3070
4078
  }
3071
- const MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$2]]);
4079
+ const MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$2]]);
3072
4080
  const messageInstance = /* @__PURE__ */ new Map();
3073
4081
  const getAppendToElement = (props) => {
3074
4082
  let appendTo = document.body;
@@ -3197,7 +4205,7 @@ const XBasicMessageBox = $MessageBox;
3197
4205
  function _isSlot$3(s) {
3198
4206
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
3199
4207
  }
3200
- const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
4208
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
3201
4209
  name: "ButtonGroupItem",
3202
4210
  props: {
3203
4211
  schema: {
@@ -3550,7 +4558,7 @@ function useButtonGroupSchema({ getProps, schemaRef }) {
3550
4558
  });
3551
4559
  return { getSchema };
3552
4560
  }
3553
- const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
4561
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
3554
4562
  __name: "BasicButtonGroup",
3555
4563
  props: {
3556
4564
  showReturnButton: { type: Boolean },
@@ -3631,7 +4639,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
3631
4639
  return (_ctx, _cache) => {
3632
4640
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: vue.unref(getWrapperClass) }, getBindValue.value), [
3633
4641
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSchema), (schema) => {
3634
- return vue.openBlock(), vue.createBlock(_sfc_main$K, {
4642
+ return vue.openBlock(), vue.createBlock(_sfc_main$E, {
3635
4643
  key: schema.field,
3636
4644
  schema,
3637
4645
  "button-group-action-type": buttonGroupActionType,
@@ -3652,9 +4660,9 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
3652
4660
  };
3653
4661
  }
3654
4662
  });
3655
- const XBasicButtonGroup = utils.withInstall(_sfc_main$J);
3656
- const _hoisted_1$a = ["title"];
3657
- const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
4663
+ const XBasicButtonGroup = utils.withInstall(_sfc_main$D);
4664
+ const _hoisted_1$9 = ["title"];
4665
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
3658
4666
  __name: "BasicText",
3659
4667
  props: {
3660
4668
  icon: { default: "" },
@@ -3692,7 +4700,7 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
3692
4700
  class: vue.normalizeClass(basicTextClass.value),
3693
4701
  title: vue.unref(utils.isString)(vue.unref(mergedValueRef)) ? vue.unref(mergedValueRef) : void 0
3694
4702
  }, [
3695
- __props.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
4703
+ __props.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$U, {
3696
4704
  key: 0,
3697
4705
  icon: __props.icon,
3698
4706
  class: vue.normalizeClass(__props.iconClass),
@@ -3701,12 +4709,12 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
3701
4709
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
3702
4710
  vue.createTextVNode(vue.toDisplayString(vue.unref(mergedValueRef)), 1)
3703
4711
  ])
3704
- ], 10, _hoisted_1$a);
4712
+ ], 10, _hoisted_1$9);
3705
4713
  };
3706
4714
  }
3707
4715
  });
3708
- const XBasicText = utils.withInstall(_sfc_main$I);
3709
- const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
4716
+ const XBasicText = utils.withInstall(_sfc_main$C);
4717
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
3710
4718
  __name: "BasicCard",
3711
4719
  props: {
3712
4720
  title: {},
@@ -3745,8 +4753,8 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
3745
4753
  };
3746
4754
  }
3747
4755
  });
3748
- const XBasicCard = utils.withInstall(_sfc_main$H);
3749
- const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
4756
+ const XBasicCard = utils.withInstall(_sfc_main$B);
4757
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
3750
4758
  ...{
3751
4759
  inheritAttrs: false
3752
4760
  },
@@ -3851,7 +4859,7 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
3851
4859
  }
3852
4860
  });
3853
4861
  const basicCascaderProps = {};
3854
- const XBasicCascader = utils.withInstall(_sfc_main$G);
4862
+ const XBasicCascader = utils.withInstall(_sfc_main$A);
3855
4863
  const basicCheckboxGroupKey = Symbol("basic-checkbox-group");
3856
4864
  const createBasicCheckboxGroupContext = (props) => {
3857
4865
  return vue.provide(basicCheckboxGroupKey, props);
@@ -3872,7 +4880,7 @@ const IconCheck = /* @__PURE__ */ vue.defineComponent({
3872
4880
  }, null)]);
3873
4881
  }
3874
4882
  });
3875
- const _sfc_main$F = vue.defineComponent({
4883
+ const _sfc_main$z = vue.defineComponent({
3876
4884
  name: "IconHover",
3877
4885
  props: {
3878
4886
  disabled: {
@@ -3900,7 +4908,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
3900
4908
  vue.renderSlot(_ctx.$slots, "default")
3901
4909
  ], 2);
3902
4910
  }
3903
- const IconHover = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$1]]);
4911
+ const IconHover = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$1]]);
3904
4912
  const basicCheckboxProps = {
3905
4913
  /**
3906
4914
  * @zh 绑定值
@@ -4287,535 +5295,134 @@ const basicColProps = {
4287
5295
  offset: [String, Number],
4288
5296
  push: [String, Number],
4289
5297
  pull: [String, Number],
4290
- xs: {
4291
- type: [String, Number, Object],
4292
- default: void 0
4293
- },
4294
- sm: {
4295
- type: [String, Number, Object],
4296
- default: void 0
4297
- },
4298
- md: {
4299
- type: [String, Number, Object],
4300
- default: void 0
4301
- },
4302
- lg: {
4303
- type: [String, Number, Object],
4304
- default: void 0
4305
- },
4306
- xl: {
4307
- type: [String, Number, Object],
4308
- default: void 0
4309
- },
4310
- xxl: {
4311
- type: [String, Number, Object],
4312
- default: void 0
4313
- },
4314
- prefixCls: String,
4315
- flex: [String, Number]
4316
- };
4317
- function parseFlex(flex) {
4318
- if (typeof flex === "number") {
4319
- return `${flex} ${flex} auto`;
4320
- }
4321
- if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
4322
- return `0 0 ${flex}`;
4323
- }
4324
- return flex;
4325
- }
4326
- const sizes = ["xs", "sm", "md", "lg", "xl", "xxl"];
4327
- const BasicCol = /* @__PURE__ */ vue.defineComponent({
4328
- compatConfig: {
4329
- MODE: 3
4330
- },
4331
- name: "XBasicCol",
4332
- inheritAttrs: false,
4333
- props: basicColProps,
4334
- setup(props, {
4335
- slots,
4336
- attrs
4337
- }) {
4338
- const {
4339
- b,
4340
- m
4341
- } = useNamespace("basic-col");
4342
- const {
4343
- gutter,
4344
- supportFlexGap,
4345
- wrap
4346
- } = useBasicRowContext();
4347
- const classes = vue.computed(() => {
4348
- const {
4349
- span,
4350
- order,
4351
- offset,
4352
- push,
4353
- pull
4354
- } = props;
4355
- const pre = b();
4356
- let sizeClassObj = {};
4357
- sizes.forEach((size) => {
4358
- let sizeProps = {};
4359
- const propSize = props[size];
4360
- if (typeof propSize === "number") {
4361
- sizeProps.span = propSize;
4362
- } else if (typeof propSize === "object") {
4363
- sizeProps = propSize || {};
4364
- }
4365
- sizeClassObj = {
4366
- ...sizeClassObj,
4367
- [m(`${size}-${sizeProps.span}`)]: sizeProps.span !== void 0,
4368
- [m(`${size}-order-${sizeProps.order}`)]: sizeProps.order || sizeProps.order === 0,
4369
- [m(`${size}-offset-${sizeProps.offset}`)]: sizeProps.offset || sizeProps.offset === 0,
4370
- [m(`${size}-push-${sizeProps.push}`)]: sizeProps.push || sizeProps.push === 0,
4371
- [m(`${size}-pull-${sizeProps.pull}`)]: sizeProps.pull || sizeProps.pull === 0
4372
- // [m(`${size}-rtl`)]: true
4373
- };
4374
- });
4375
- return utils.classNames(pre, {
4376
- [m(`${span}`)]: span !== void 0,
4377
- [m(`order-${order}`)]: order,
4378
- [m(`offset-${offset}`)]: offset,
4379
- [m(`push-${push}`)]: push,
4380
- [m(`pull-${pull}`)]: pull
4381
- }, sizeClassObj, attrs.class);
4382
- });
4383
- const mergedStyle = vue.computed(() => {
4384
- const {
4385
- flex
4386
- } = props;
4387
- const gutterVal = gutter.value;
4388
- const style = {};
4389
- if (gutterVal && gutterVal[0] && gutterVal[0] > 0) {
4390
- const horizontalGutter = `${gutterVal[0] / 2}px`;
4391
- style.paddingLeft = horizontalGutter;
4392
- style.paddingRight = horizontalGutter;
4393
- }
4394
- if (gutterVal && gutterVal[1] && gutterVal[1] > 0 && !supportFlexGap.value) {
4395
- const verticalGutter = `${gutterVal[1] / 2}px`;
4396
- style.paddingTop = verticalGutter;
4397
- style.paddingBottom = verticalGutter;
4398
- }
4399
- if (flex) {
4400
- style.flex = parseFlex(flex);
4401
- if (wrap.value === false && !style.minWidth) {
4402
- style.minWidth = 0;
4403
- }
4404
- }
4405
- return style;
4406
- });
4407
- return () => {
4408
- var _a;
4409
- return vue.createVNode("div", vue.mergeProps(attrs, {
4410
- "class": classes.value,
4411
- "style": [mergedStyle.value, attrs.style]
4412
- }), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
4413
- };
4414
- }
4415
- });
4416
- const XBasicCol = utils.withInstall(BasicCol);
4417
- function tryOnScopeDispose(fn, failSilently) {
4418
- if (vue.getCurrentScope()) {
4419
- vue.onScopeDispose(fn, failSilently);
4420
- return true;
4421
- }
4422
- return false;
4423
- }
4424
- const isClient = typeof window !== "undefined" && typeof document !== "undefined";
4425
- typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
4426
- const toString = Object.prototype.toString;
4427
- const isObject = (val) => toString.call(val) === "[object Object]";
4428
- const noop = () => {
4429
- };
4430
- function createFilterWrapper(filter, fn) {
4431
- function wrapper(...args) {
4432
- return new Promise((resolve, reject) => {
4433
- Promise.resolve(filter(() => fn.apply(this, args), {
4434
- fn,
4435
- thisArg: this,
4436
- args
4437
- })).then(resolve).catch(reject);
4438
- });
4439
- }
4440
- return wrapper;
4441
- }
4442
- function debounceFilter(ms, options = {}) {
4443
- let timer;
4444
- let maxTimer;
4445
- let lastRejector = noop;
4446
- const _clearTimeout = (timer$1) => {
4447
- clearTimeout(timer$1);
4448
- lastRejector();
4449
- lastRejector = noop;
4450
- };
4451
- let lastInvoker;
4452
- const filter = (invoke$1) => {
4453
- const duration = vue.toValue(ms);
4454
- const maxDuration = vue.toValue(options.maxWait);
4455
- if (timer) _clearTimeout(timer);
4456
- if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
4457
- if (maxTimer) {
4458
- _clearTimeout(maxTimer);
4459
- maxTimer = void 0;
4460
- }
4461
- return Promise.resolve(invoke$1());
4462
- }
4463
- return new Promise((resolve, reject) => {
4464
- lastRejector = options.rejectOnCancel ? reject : resolve;
4465
- lastInvoker = invoke$1;
4466
- if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
4467
- if (timer) _clearTimeout(timer);
4468
- maxTimer = void 0;
4469
- resolve(lastInvoker());
4470
- }, maxDuration);
4471
- timer = setTimeout(() => {
4472
- if (maxTimer) _clearTimeout(maxTimer);
4473
- maxTimer = void 0;
4474
- resolve(invoke$1());
4475
- }, duration);
4476
- });
4477
- };
4478
- return filter;
4479
- }
4480
- function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
4481
- return new Promise((resolve, reject) => {
4482
- if (throwOnTimeout) setTimeout(() => reject(reason), ms);
4483
- else setTimeout(resolve, ms);
4484
- });
4485
- }
4486
- function identity(arg) {
4487
- return arg;
4488
- }
4489
- function toArray(value) {
4490
- return Array.isArray(value) ? value : [value];
4491
- }
4492
- function getLifeCycleTarget(target) {
4493
- return vue.getCurrentInstance();
4494
- }
4495
- // @__NO_SIDE_EFFECTS__
4496
- function useDebounceFn(fn, ms = 200, options = {}) {
4497
- return createFilterWrapper(debounceFilter(ms, options), fn);
4498
- }
4499
- function tryOnUnmounted(fn, target) {
4500
- if (getLifeCycleTarget()) vue.onUnmounted(fn, target);
4501
- }
4502
- function useTimeoutFn(cb, interval, options = {}) {
4503
- const { immediate = true, immediateCallback = false } = options;
4504
- const isPending = vue.shallowRef(false);
4505
- let timer;
4506
- function clear() {
4507
- if (timer) {
4508
- clearTimeout(timer);
4509
- timer = void 0;
4510
- }
4511
- }
4512
- function stop() {
4513
- isPending.value = false;
4514
- clear();
4515
- }
4516
- function start(...args) {
4517
- if (immediateCallback) cb();
4518
- clear();
4519
- isPending.value = true;
4520
- timer = setTimeout(() => {
4521
- isPending.value = false;
4522
- timer = void 0;
4523
- cb(...args);
4524
- }, vue.toValue(interval));
4525
- }
4526
- if (immediate) {
4527
- isPending.value = true;
4528
- if (isClient) start();
4529
- }
4530
- tryOnScopeDispose(stop);
4531
- return {
4532
- isPending: vue.shallowReadonly(isPending),
4533
- start,
4534
- stop
4535
- };
4536
- }
4537
- function watchImmediate(source, cb, options) {
4538
- return vue.watch(source, cb, {
4539
- ...options,
4540
- immediate: true
4541
- });
4542
- }
4543
- const defaultWindow = isClient ? window : void 0;
4544
- function unrefElement(elRef) {
4545
- var _$el;
4546
- const plain = vue.toValue(elRef);
4547
- return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
4548
- }
4549
- function useEventListener(...args) {
4550
- const register = (el, event, listener, options) => {
4551
- el.addEventListener(event, listener, options);
4552
- return () => el.removeEventListener(event, listener, options);
4553
- };
4554
- const firstParamTargets = vue.computed(() => {
4555
- const test = toArray(vue.toValue(args[0])).filter((e) => e != null);
4556
- return test.every((e) => typeof e !== "string") ? test : void 0;
4557
- });
4558
- return watchImmediate(() => {
4559
- var _firstParamTargets$va, _firstParamTargets$va2;
4560
- return [
4561
- (_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
4562
- toArray(vue.toValue(firstParamTargets.value ? args[1] : args[0])),
4563
- toArray(vue.unref(firstParamTargets.value ? args[2] : args[1])),
4564
- vue.toValue(firstParamTargets.value ? args[3] : args[2])
4565
- ];
4566
- }, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
4567
- if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
4568
- const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
4569
- const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
4570
- onCleanup(() => {
4571
- cleanups.forEach((fn) => fn());
4572
- });
4573
- }, { flush: "post" });
4574
- }
4575
- const _TransitionPresets = {
4576
- easeInSine: [
4577
- 0.12,
4578
- 0,
4579
- 0.39,
4580
- 0
4581
- ],
4582
- easeOutSine: [
4583
- 0.61,
4584
- 1,
4585
- 0.88,
4586
- 1
4587
- ],
4588
- easeInOutSine: [
4589
- 0.37,
4590
- 0,
4591
- 0.63,
4592
- 1
4593
- ],
4594
- easeInQuad: [
4595
- 0.11,
4596
- 0,
4597
- 0.5,
4598
- 0
4599
- ],
4600
- easeOutQuad: [
4601
- 0.5,
4602
- 1,
4603
- 0.89,
4604
- 1
4605
- ],
4606
- easeInOutQuad: [
4607
- 0.45,
4608
- 0,
4609
- 0.55,
4610
- 1
4611
- ],
4612
- easeInCubic: [
4613
- 0.32,
4614
- 0,
4615
- 0.67,
4616
- 0
4617
- ],
4618
- easeOutCubic: [
4619
- 0.33,
4620
- 1,
4621
- 0.68,
4622
- 1
4623
- ],
4624
- easeInOutCubic: [
4625
- 0.65,
4626
- 0,
4627
- 0.35,
4628
- 1
4629
- ],
4630
- easeInQuart: [
4631
- 0.5,
4632
- 0,
4633
- 0.75,
4634
- 0
4635
- ],
4636
- easeOutQuart: [
4637
- 0.25,
4638
- 1,
4639
- 0.5,
4640
- 1
4641
- ],
4642
- easeInOutQuart: [
4643
- 0.76,
4644
- 0,
4645
- 0.24,
4646
- 1
4647
- ],
4648
- easeInQuint: [
4649
- 0.64,
4650
- 0,
4651
- 0.78,
4652
- 0
4653
- ],
4654
- easeOutQuint: [
4655
- 0.22,
4656
- 1,
4657
- 0.36,
4658
- 1
4659
- ],
4660
- easeInOutQuint: [
4661
- 0.83,
4662
- 0,
4663
- 0.17,
4664
- 1
4665
- ],
4666
- easeInExpo: [
4667
- 0.7,
4668
- 0,
4669
- 0.84,
4670
- 0
4671
- ],
4672
- easeOutExpo: [
4673
- 0.16,
4674
- 1,
4675
- 0.3,
4676
- 1
4677
- ],
4678
- easeInOutExpo: [
4679
- 0.87,
4680
- 0,
4681
- 0.13,
4682
- 1
4683
- ],
4684
- easeInCirc: [
4685
- 0.55,
4686
- 0,
4687
- 1,
4688
- 0.45
4689
- ],
4690
- easeOutCirc: [
4691
- 0,
4692
- 0.55,
4693
- 0.45,
4694
- 1
4695
- ],
4696
- easeInOutCirc: [
4697
- 0.85,
4698
- 0,
4699
- 0.15,
4700
- 1
4701
- ],
4702
- easeInBack: [
4703
- 0.36,
4704
- 0,
4705
- 0.66,
4706
- -0.56
4707
- ],
4708
- easeOutBack: [
4709
- 0.34,
4710
- 1.56,
4711
- 0.64,
4712
- 1
4713
- ],
4714
- easeInOutBack: [
4715
- 0.68,
4716
- -0.6,
4717
- 0.32,
4718
- 1.6
4719
- ]
5298
+ xs: {
5299
+ type: [String, Number, Object],
5300
+ default: void 0
5301
+ },
5302
+ sm: {
5303
+ type: [String, Number, Object],
5304
+ default: void 0
5305
+ },
5306
+ md: {
5307
+ type: [String, Number, Object],
5308
+ default: void 0
5309
+ },
5310
+ lg: {
5311
+ type: [String, Number, Object],
5312
+ default: void 0
5313
+ },
5314
+ xl: {
5315
+ type: [String, Number, Object],
5316
+ default: void 0
5317
+ },
5318
+ xxl: {
5319
+ type: [String, Number, Object],
5320
+ default: void 0
5321
+ },
5322
+ prefixCls: String,
5323
+ flex: [String, Number]
4720
5324
  };
4721
- const TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);
4722
- function createEasingFunction([p0, p1, p2, p3]) {
4723
- const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;
4724
- const b = (a1, a2) => 3 * a2 - 6 * a1;
4725
- const c = (a1) => 3 * a1;
4726
- const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;
4727
- const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);
4728
- const getTforX = (x) => {
4729
- let aGuessT = x;
4730
- for (let i = 0; i < 4; ++i) {
4731
- const currentSlope = getSlope(aGuessT, p0, p2);
4732
- if (currentSlope === 0) return aGuessT;
4733
- const currentX = calcBezier(aGuessT, p0, p2) - x;
4734
- aGuessT -= currentX / currentSlope;
4735
- }
4736
- return aGuessT;
4737
- };
4738
- return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);
4739
- }
4740
- function lerp(a, b, alpha) {
4741
- return a + alpha * (b - a);
4742
- }
4743
- function defaultInterpolation(a, b, t) {
4744
- const aVal = vue.toValue(a);
4745
- const bVal = vue.toValue(b);
4746
- if (typeof aVal === "number" && typeof bVal === "number") return lerp(aVal, bVal, t);
4747
- if (Array.isArray(aVal) && Array.isArray(bVal)) return aVal.map((v, i) => lerp(v, vue.toValue(bVal[i]), t));
4748
- throw new TypeError("Unknown transition type, specify an interpolation function.");
4749
- }
4750
- function normalizeEasing(easing) {
4751
- var _toValue;
4752
- return typeof easing === "function" ? easing : (_toValue = vue.toValue(easing)) !== null && _toValue !== void 0 ? _toValue : identity;
5325
+ function parseFlex(flex) {
5326
+ if (typeof flex === "number") {
5327
+ return `${flex} ${flex} auto`;
5328
+ }
5329
+ if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
5330
+ return `0 0 ${flex}`;
5331
+ }
5332
+ return flex;
4753
5333
  }
4754
- function transition(source, from, to, options = {}) {
4755
- var _toValue2;
4756
- const { window: window$1 = defaultWindow } = options;
4757
- const fromVal = vue.toValue(from);
4758
- const toVal = vue.toValue(to);
4759
- const duration = (_toValue2 = vue.toValue(options.duration)) !== null && _toValue2 !== void 0 ? _toValue2 : 1e3;
4760
- const startedAt = Date.now();
4761
- const endAt = Date.now() + duration;
4762
- const interpolation = typeof options.interpolation === "function" ? options.interpolation : defaultInterpolation;
4763
- const trans = typeof options.easing !== "undefined" ? normalizeEasing(options.easing) : normalizeEasing(options.transition);
4764
- const ease = typeof trans === "function" ? trans : createEasingFunction(trans);
4765
- return new Promise((resolve) => {
4766
- source.value = fromVal;
4767
- const tick = () => {
4768
- var _options$abort;
4769
- if ((_options$abort = options.abort) === null || _options$abort === void 0 ? void 0 : _options$abort.call(options)) {
4770
- resolve();
4771
- return;
5334
+ const sizes = ["xs", "sm", "md", "lg", "xl", "xxl"];
5335
+ const BasicCol = /* @__PURE__ */ vue.defineComponent({
5336
+ compatConfig: {
5337
+ MODE: 3
5338
+ },
5339
+ name: "XBasicCol",
5340
+ inheritAttrs: false,
5341
+ props: basicColProps,
5342
+ setup(props, {
5343
+ slots,
5344
+ attrs
5345
+ }) {
5346
+ const {
5347
+ b,
5348
+ m
5349
+ } = useNamespace("basic-col");
5350
+ const {
5351
+ gutter,
5352
+ supportFlexGap,
5353
+ wrap
5354
+ } = useBasicRowContext();
5355
+ const classes = vue.computed(() => {
5356
+ const {
5357
+ span,
5358
+ order,
5359
+ offset,
5360
+ push,
5361
+ pull
5362
+ } = props;
5363
+ const pre = b();
5364
+ let sizeClassObj = {};
5365
+ sizes.forEach((size) => {
5366
+ let sizeProps = {};
5367
+ const propSize = props[size];
5368
+ if (typeof propSize === "number") {
5369
+ sizeProps.span = propSize;
5370
+ } else if (typeof propSize === "object") {
5371
+ sizeProps = propSize || {};
5372
+ }
5373
+ sizeClassObj = {
5374
+ ...sizeClassObj,
5375
+ [m(`${size}-${sizeProps.span}`)]: sizeProps.span !== void 0,
5376
+ [m(`${size}-order-${sizeProps.order}`)]: sizeProps.order || sizeProps.order === 0,
5377
+ [m(`${size}-offset-${sizeProps.offset}`)]: sizeProps.offset || sizeProps.offset === 0,
5378
+ [m(`${size}-push-${sizeProps.push}`)]: sizeProps.push || sizeProps.push === 0,
5379
+ [m(`${size}-pull-${sizeProps.pull}`)]: sizeProps.pull || sizeProps.pull === 0
5380
+ // [m(`${size}-rtl`)]: true
5381
+ };
5382
+ });
5383
+ return utils.classNames(pre, {
5384
+ [m(`${span}`)]: span !== void 0,
5385
+ [m(`order-${order}`)]: order,
5386
+ [m(`offset-${offset}`)]: offset,
5387
+ [m(`push-${push}`)]: push,
5388
+ [m(`pull-${pull}`)]: pull
5389
+ }, sizeClassObj, attrs.class);
5390
+ });
5391
+ const mergedStyle = vue.computed(() => {
5392
+ const {
5393
+ flex
5394
+ } = props;
5395
+ const gutterVal = gutter.value;
5396
+ const style = {};
5397
+ if (gutterVal && gutterVal[0] && gutterVal[0] > 0) {
5398
+ const horizontalGutter = `${gutterVal[0] / 2}px`;
5399
+ style.paddingLeft = horizontalGutter;
5400
+ style.paddingRight = horizontalGutter;
4772
5401
  }
4773
- const now2 = Date.now();
4774
- source.value = interpolation(fromVal, toVal, ease((now2 - startedAt) / duration));
4775
- if (now2 < endAt) window$1 === null || window$1 === void 0 || window$1.requestAnimationFrame(tick);
4776
- else {
4777
- source.value = toVal;
4778
- resolve();
5402
+ if (gutterVal && gutterVal[1] && gutterVal[1] > 0 && !supportFlexGap.value) {
5403
+ const verticalGutter = `${gutterVal[1] / 2}px`;
5404
+ style.paddingTop = verticalGutter;
5405
+ style.paddingBottom = verticalGutter;
4779
5406
  }
4780
- };
4781
- tick();
4782
- });
4783
- }
4784
- function useTransition(source, options = {}) {
4785
- let currentId = 0;
4786
- const sourceVal = () => {
4787
- const v = vue.toValue(source);
4788
- return typeof options.interpolation === "undefined" && Array.isArray(v) ? v.map(vue.toValue) : v;
4789
- };
4790
- const outputRef = vue.shallowRef(sourceVal());
4791
- vue.watch(sourceVal, async (to) => {
4792
- var _options$onStarted, _options$onFinished;
4793
- if (vue.toValue(options.disabled)) return;
4794
- const id = ++currentId;
4795
- if (options.delay) await promiseTimeout(vue.toValue(options.delay));
4796
- if (id !== currentId) return;
4797
- (_options$onStarted = options.onStarted) === null || _options$onStarted === void 0 || _options$onStarted.call(options);
4798
- await transition(outputRef, outputRef.value, to, {
4799
- ...options,
4800
- abort: () => {
4801
- var _options$abort2;
4802
- return id !== currentId || ((_options$abort2 = options.abort) === null || _options$abort2 === void 0 ? void 0 : _options$abort2.call(options));
5407
+ if (flex) {
5408
+ style.flex = parseFlex(flex);
5409
+ if (wrap.value === false && !style.minWidth) {
5410
+ style.minWidth = 0;
5411
+ }
4803
5412
  }
5413
+ return style;
4804
5414
  });
4805
- (_options$onFinished = options.onFinished) === null || _options$onFinished === void 0 || _options$onFinished.call(options);
4806
- }, { deep: true });
4807
- vue.watch(() => vue.toValue(options.disabled), (disabled) => {
4808
- if (disabled) {
4809
- currentId++;
4810
- outputRef.value = sourceVal();
4811
- }
4812
- });
4813
- tryOnScopeDispose(() => {
4814
- currentId++;
4815
- });
4816
- return vue.computed(() => vue.toValue(options.disabled) ? sourceVal() : outputRef.value);
4817
- }
4818
- const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
5415
+ return () => {
5416
+ var _a;
5417
+ return vue.createVNode("div", vue.mergeProps(attrs, {
5418
+ "class": classes.value,
5419
+ "style": [mergedStyle.value, attrs.style]
5420
+ }), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
5421
+ };
5422
+ }
5423
+ });
5424
+ const XBasicCol = utils.withInstall(BasicCol);
5425
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
4819
5426
  __name: "BasicCountTo",
4820
5427
  props: {
4821
5428
  startValue: { default: 0 },
@@ -4876,8 +5483,8 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
4876
5483
  };
4877
5484
  }
4878
5485
  });
4879
- const XBasicCountTo = utils.withInstall(_sfc_main$E);
4880
- const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
5486
+ const XBasicCountTo = utils.withInstall(_sfc_main$y);
5487
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
4881
5488
  __name: "BasicDatePicker",
4882
5489
  props: {
4883
5490
  disabled: { type: Boolean, default: false },
@@ -4937,7 +5544,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
4937
5544
  };
4938
5545
  }
4939
5546
  });
4940
- const XBasicDatePicker = utils.withInstall(_sfc_main$D);
5547
+ const XBasicDatePicker = utils.withInstall(_sfc_main$x);
4941
5548
  const basicDragVerifyProps = {
4942
5549
  value: {
4943
5550
  type: Boolean,
@@ -4984,7 +5591,7 @@ const basicDragVerifyProps = {
4984
5591
  default: () => ({})
4985
5592
  }
4986
5593
  };
4987
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5594
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
4988
5595
  name: "BasicDragVerify",
4989
5596
  props: basicDragVerifyProps,
4990
5597
  emits: ["success", "update:value", "change", "start", "move", "end"],
@@ -5287,7 +5894,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5287
5894
  };
5288
5895
  }
5289
5896
  });
5290
- const XBasicDragVerify = utils.withInstall(_sfc_main$C);
5897
+ const XBasicDragVerify = utils.withInstall(_sfc_main$w);
5291
5898
  const basicHelpProps = {
5292
5899
  /**
5293
5900
  * Whether to display the serial number
@@ -5303,7 +5910,7 @@ const basicHelpProps = {
5303
5910
  default: ""
5304
5911
  }
5305
5912
  };
5306
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5913
+ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
5307
5914
  name: "BasicHelp",
5308
5915
  components: {
5309
5916
  XBasicSvgIcon
@@ -5349,8 +5956,8 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5349
5956
  });
5350
5957
  }
5351
5958
  });
5352
- const XBasicHelp = utils.withInstall(_sfc_main$B);
5353
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5959
+ const XBasicHelp = utils.withInstall(_sfc_main$v);
5960
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
5354
5961
  __name: "BasicTitle",
5355
5962
  props: {
5356
5963
  helpMessage: {},
@@ -5393,12 +6000,12 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5393
6000
  };
5394
6001
  }
5395
6002
  });
5396
- const XBasicTitle = utils.withInstall(_sfc_main$A);
5397
- const _hoisted_1$9 = {
6003
+ const XBasicTitle = utils.withInstall(_sfc_main$u);
6004
+ const _hoisted_1$8 = {
5398
6005
  key: 0,
5399
6006
  class: "footer-wrapper"
5400
6007
  };
5401
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
6008
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
5402
6009
  __name: "BasicDrawer",
5403
6010
  props: {
5404
6011
  showCancelBtn: { type: Boolean, default: true },
@@ -5532,7 +6139,7 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5532
6139
  !_ctx.$slots.footer ? {
5533
6140
  name: "footer",
5534
6141
  fn: vue.withCtx(() => [
5535
- __props.showFooter ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
6142
+ __props.showFooter ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
5536
6143
  vue.renderSlot(_ctx.$slots, "before-footer"),
5537
6144
  __props.showCancelBtn ? (vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), {
5538
6145
  key: 0,
@@ -5572,7 +6179,7 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5572
6179
  };
5573
6180
  }
5574
6181
  });
5575
- const XBasicDrawer = utils.withInstall(_sfc_main$z);
6182
+ const XBasicDrawer = utils.withInstall(_sfc_main$t);
5576
6183
  const basicEditBatchKey = Symbol("basic-edit-batch");
5577
6184
  const createBasicEditBatchContext = (props) => {
5578
6185
  return vue.provide(basicEditBatchKey, props);
@@ -5580,8 +6187,8 @@ const createBasicEditBatchContext = (props) => {
5580
6187
  const useBasicEditBatchContext = () => {
5581
6188
  return vue.inject(basicEditBatchKey);
5582
6189
  };
5583
- const _hoisted_1$8 = ["disabled"];
5584
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
6190
+ const _hoisted_1$7 = ["disabled"];
6191
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
5585
6192
  __name: "EditBatchAction",
5586
6193
  props: {
5587
6194
  disabled: { type: Boolean, default: false },
@@ -5637,11 +6244,11 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
5637
6244
  _: 1
5638
6245
  }, 16, ["class", "onClick"])) : vue.createCommentVNode("", true),
5639
6246
  vue.renderSlot(_ctx.$slots, "submitAfter")
5640
- ], 10, _hoisted_1$8);
6247
+ ], 10, _hoisted_1$7);
5641
6248
  };
5642
6249
  }
5643
6250
  });
5644
- const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
6251
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
5645
6252
  __name: "BasicHidden",
5646
6253
  props: {
5647
6254
  value: {},
@@ -5668,7 +6275,7 @@ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
5668
6275
  };
5669
6276
  }
5670
6277
  });
5671
- const XBasicHidden = utils.withInstall(_sfc_main$x);
6278
+ const XBasicHidden = utils.withInstall(_sfc_main$r);
5672
6279
  const basicRadioGroupKey = Symbol("basic-radio-group");
5673
6280
  const createBasicRadioGroupContext = (props) => {
5674
6281
  return vue.provide(basicRadioGroupKey, props);
@@ -5936,7 +6543,7 @@ const BasicRadioGroup = /* @__PURE__ */ vue.defineComponent({
5936
6543
  }
5937
6544
  });
5938
6545
  const XBasicRadioGroup = utils.withInstall(BasicRadioGroup);
5939
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
6546
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
5940
6547
  ...{
5941
6548
  inheritAttrs: false
5942
6549
  },
@@ -6055,7 +6662,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
6055
6662
  }
6056
6663
  });
6057
6664
  const basicSelectProps = {};
6058
- const XBasicSelect = utils.withInstall(_sfc_main$w);
6665
+ const XBasicSelect = utils.withInstall(_sfc_main$q);
6059
6666
  const componentMap$1 = /* @__PURE__ */ new Map();
6060
6667
  componentMap$1.set("Input", naiveUi.NInput);
6061
6668
  componentMap$1.set("InputNumber", naiveUi.NInputNumber);
@@ -6134,7 +6741,7 @@ function isComponentEditBatchSchema(schema) {
6134
6741
  function _isSlot$1(s) {
6135
6742
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
6136
6743
  }
6137
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
6744
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
6138
6745
  name: "BasicEditBatchItem",
6139
6746
  components: {
6140
6747
  XBasicHelp
@@ -6872,7 +7479,7 @@ function useEditBatchValues({ getProps, defaultValueRef, getSchema, formModel })
6872
7479
  }
6873
7480
  return { handleFormValues, initDefault };
6874
7481
  }
6875
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
7482
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
6876
7483
  __name: "BasicEditBatch",
6877
7484
  props: {
6878
7485
  name: {},
@@ -7002,7 +7609,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
7002
7609
  options: vue.unref(getOptions)
7003
7610
  }, null, 8, ["value", "options"])
7004
7611
  ], 2),
7005
- schemaItemRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
7612
+ schemaItemRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$p, {
7006
7613
  key: 0,
7007
7614
  schema: schemaItemRef.value,
7008
7615
  "edit-batch-props": getProps.value,
@@ -7019,7 +7626,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
7019
7626
  };
7020
7627
  })
7021
7628
  ]), 1032, ["schema", "edit-batch-props", "all-default-values", "form-model"])) : vue.createCommentVNode("", true),
7022
- vue.createVNode(_sfc_main$y, vue.normalizeProps(vue.guardReactiveProps(getEditBatchActionBindProps.value)), vue.createSlots({ _: 2 }, [
7629
+ vue.createVNode(_sfc_main$s, vue.normalizeProps(vue.guardReactiveProps(getEditBatchActionBindProps.value)), vue.createSlots({ _: 2 }, [
7023
7630
  vue.renderList(["resetBefore", "submitBefore", "submitAfter"], (item) => {
7024
7631
  return {
7025
7632
  name: item,
@@ -7033,7 +7640,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
7033
7640
  };
7034
7641
  }
7035
7642
  });
7036
- const XBasicEditBatch = utils.withInstall(_sfc_main$u);
7643
+ const XBasicEditBatch = utils.withInstall(_sfc_main$o);
7037
7644
  const basicFontIconProps = {
7038
7645
  icon: {
7039
7646
  type: String,
@@ -7084,7 +7691,7 @@ const createBasicFormContext = (props) => {
7084
7691
  const useBasicFormContext = () => {
7085
7692
  return vue.inject(basicFormKey);
7086
7693
  };
7087
- const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
7694
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
7088
7695
  __name: "FormAction",
7089
7696
  props: {
7090
7697
  showActionButtonGroup: { type: Boolean, default: true },
@@ -7224,7 +7831,7 @@ const basicScrollTextProps = {
7224
7831
  default: ""
7225
7832
  }
7226
7833
  };
7227
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
7834
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
7228
7835
  name: "BasicScrollText",
7229
7836
  props: basicScrollTextProps,
7230
7837
  setup(props, {
@@ -7286,7 +7893,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
7286
7893
  }, [content()]) : null])]);
7287
7894
  }
7288
7895
  });
7289
- const XBasicScrollText = utils.withInstall(_sfc_main$s);
7896
+ const XBasicScrollText = utils.withInstall(_sfc_main$m);
7290
7897
  const componentMap = /* @__PURE__ */ new Map();
7291
7898
  componentMap.set("Input", naiveUi.NInput);
7292
7899
  componentMap.set("InputNumber", naiveUi.NInputNumber);
@@ -7385,7 +7992,7 @@ function isComponentFormSchema(schema) {
7385
7992
  function _isSlot(s) {
7386
7993
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
7387
7994
  }
7388
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
7995
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
7389
7996
  name: "BasicFormItem",
7390
7997
  components: {
7391
7998
  XBasicHelp,
@@ -8485,7 +9092,7 @@ function useFormValues({ getProps, defaultValueRef, getSchema, formModel }) {
8485
9092
  }
8486
9093
  return { handleFormValues, initDefault };
8487
9094
  }
8488
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
9095
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
8489
9096
  __name: "BasicForm",
8490
9097
  props: {
8491
9098
  card: { type: Boolean, default: false },
@@ -8676,7 +9283,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
8676
9283
  default: vue.withCtx(() => [
8677
9284
  vue.renderSlot(_ctx.$slots, "formHeader"),
8678
9285
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSchema), (schema) => {
8679
- return vue.openBlock(), vue.createBlock(_sfc_main$r, {
9286
+ return vue.openBlock(), vue.createBlock(_sfc_main$l, {
8680
9287
  key: schema.field,
8681
9288
  "is-advanced": vue.unref(fieldsIsAdvancedMap)[schema.field],
8682
9289
  "form-action-type": formActionType,
@@ -8696,7 +9303,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
8696
9303
  })
8697
9304
  ]), 1032, ["is-advanced", "schema", "form-props", "all-default-values", "form-model"]);
8698
9305
  }), 128)),
8699
- vue.createVNode(_sfc_main$t, vue.mergeProps(getFormActionBindProps.value, { onToggleAdvanced: vue.unref(handleToggleAdvanced) }), vue.createSlots({ _: 2 }, [
9306
+ vue.createVNode(_sfc_main$n, vue.mergeProps(getFormActionBindProps.value, { onToggleAdvanced: vue.unref(handleToggleAdvanced) }), vue.createSlots({ _: 2 }, [
8700
9307
  vue.renderList(["resetBefore", "submitBefore", "advanceBefore", "advanceAfter"], (item) => {
8701
9308
  return {
8702
9309
  name: item,
@@ -8717,8 +9324,8 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
8717
9324
  };
8718
9325
  }
8719
9326
  });
8720
- const XBasicForm = utils.withInstall(_sfc_main$q);
8721
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
9327
+ const XBasicForm = utils.withInstall(_sfc_main$k);
9328
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
8722
9329
  __name: "BasicGradientTitle",
8723
9330
  props: {
8724
9331
  text: {}
@@ -8751,7 +9358,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8751
9358
  }
8752
9359
  });
8753
9360
  const basicGradientTitleProps = {};
8754
- const XBasicGradientTitle = utils.withInstall(_sfc_main$p);
9361
+ const XBasicGradientTitle = utils.withInstall(_sfc_main$j);
8755
9362
  const basicIconOnlineProps = {
8756
9363
  icon: {
8757
9364
  type: String,
@@ -12648,9 +13255,9 @@ const IconJson = {
12648
13255
  "yin-yang"
12649
13256
  ]
12650
13257
  };
12651
- const _hoisted_1$7 = { class: "panel-icon-list" };
13258
+ const _hoisted_1$6 = { class: "panel-icon-list" };
12652
13259
  const _hoisted_2$3 = ["title", "onClick"];
12653
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
13260
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
12654
13261
  __name: "BasicIconPicker",
12655
13262
  props: {
12656
13263
  disabled: { type: Boolean },
@@ -12813,7 +13420,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
12813
13420
  class: vue.normalizeClass(vue.unref(e)("scrollbar"))
12814
13421
  }, {
12815
13422
  default: vue.withCtx(() => [
12816
- vue.createElementVNode("ul", _hoisted_1$7, [
13423
+ vue.createElementVNode("ul", _hoisted_1$6, [
12817
13424
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(pageList.value, (item, key2) => {
12818
13425
  return vue.openBlock(), vue.createElementBlock("li", {
12819
13426
  key: key2,
@@ -12880,7 +13487,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
12880
13487
  };
12881
13488
  }
12882
13489
  });
12883
- const XBasicIconPicker = utils.withInstall(_sfc_main$o);
13490
+ const XBasicIconPicker = utils.withInstall(_sfc_main$i);
12884
13491
  function useClipboard() {
12885
13492
  const copied = vue.ref(false);
12886
13493
  const copy = async (source) => {
@@ -14325,7 +14932,7 @@ function usePagination$1(propsRef) {
14325
14932
  }
14326
14933
  return { getPagination, getPaginationInfo, setShowPagination, getShowPagination, setPagination };
14327
14934
  }
14328
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
14935
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
14329
14936
  __name: "BasicListPage",
14330
14937
  props: {
14331
14938
  listClassName: {},
@@ -14494,7 +15101,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
14494
15101
  };
14495
15102
  }
14496
15103
  });
14497
- const XBasicListPage = utils.withInstall(_sfc_main$n);
15104
+ const XBasicListPage = utils.withInstall(_sfc_main$h);
14498
15105
  function createLoadingComponent(options) {
14499
15106
  let afterLeaveTimer;
14500
15107
  const afterLeaveFlag = vue.ref(false);
@@ -14763,7 +15370,7 @@ const XBasicLoading = {
14763
15370
  directive: vLoading,
14764
15371
  service: Loading
14765
15372
  };
14766
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
15373
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
14767
15374
  __name: "BasicModal",
14768
15375
  props: {
14769
15376
  width: {},
@@ -14915,12 +15522,12 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
14915
15522
  }
14916
15523
  });
14917
15524
  const basicModalProps = {};
14918
- const XBasicModal = utils.withInstall(_sfc_main$m);
14919
- const _hoisted_1$6 = ["id"];
15525
+ const XBasicModal = utils.withInstall(_sfc_main$g);
15526
+ const _hoisted_1$5 = ["id"];
14920
15527
  const _hoisted_2$2 = ["textContent"];
14921
15528
  const _hoisted_3 = { key: 0 };
14922
15529
  const _hoisted_4 = ["innerHTML"];
14923
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
15530
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
14924
15531
  __name: "BasicNotification",
14925
15532
  props: {
14926
15533
  customClass: { default: "" },
@@ -15056,7 +15663,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
15056
15663
  }, null, 8, ["class"])) : vue.createCommentVNode("", true)
15057
15664
  ])
15058
15665
  ], 2)
15059
- ], 46, _hoisted_1$6), [
15666
+ ], 46, _hoisted_1$5), [
15060
15667
  [vue.vShow, visible.value]
15061
15668
  ])
15062
15669
  ]),
@@ -15107,7 +15714,7 @@ const notify = (options, context) => {
15107
15714
  appendTo = document.body;
15108
15715
  }
15109
15716
  const container = document.createElement("div");
15110
- const vm = vue.createVNode(_sfc_main$l, props, utils.isFunction(props.message) ? props.message : vue.isVNode(props.message) ? () => props.message : null);
15717
+ const vm = vue.createVNode(_sfc_main$f, props, utils.isFunction(props.message) ? props.message : vue.isVNode(props.message) ? () => props.message : null);
15111
15718
  vm.appContext = utils.isUndefined(context) ? notify._context : context;
15112
15719
  vm.props.onDestroy = () => {
15113
15720
  vue.render(null, container);
@@ -15165,7 +15772,7 @@ notify.closeAll = closeAll;
15165
15772
  notify._context = null;
15166
15773
  const $Notification = notify;
15167
15774
  const XBasicNotification = $Notification;
15168
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
15775
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
15169
15776
  __name: "BasicPage",
15170
15777
  props: {
15171
15778
  title: {},
@@ -15265,8 +15872,8 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
15265
15872
  };
15266
15873
  }
15267
15874
  });
15268
- const XBasicPage = utils.withInstall(_sfc_main$k);
15269
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
15875
+ const XBasicPage = utils.withInstall(_sfc_main$e);
15876
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
15270
15877
  __name: "BasicPanel",
15271
15878
  props: {
15272
15879
  title: {},
@@ -15303,7 +15910,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
15303
15910
  };
15304
15911
  }
15305
15912
  });
15306
- const XBasicPanel = utils.withInstall(_sfc_main$j);
15913
+ const XBasicPanel = utils.withInstall(_sfc_main$d);
15307
15914
  const regionJson = {
15308
15915
  "110000": "北京市",
15309
15916
  "110100": "市辖区",
@@ -19310,7 +19917,7 @@ const BasicRow = /* @__PURE__ */ vue.defineComponent({
19310
19917
  }
19311
19918
  });
19312
19919
  const XBasicRow = utils.withInstall(BasicRow);
19313
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
19920
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
19314
19921
  __name: "BasicSubPanel",
19315
19922
  props: {
19316
19923
  title: {}
@@ -19346,7 +19953,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
19346
19953
  }
19347
19954
  });
19348
19955
  const basicSubPanelProps = {};
19349
- const XBasicSubPanel = utils.withInstall(_sfc_main$i);
19956
+ const XBasicSubPanel = utils.withInstall(_sfc_main$c);
19350
19957
  const ROW_KEY = "_MAX_ROW_KEY";
19351
19958
  const PAGE_SIZE_OPTIONS = [10, 50, 80, 100];
19352
19959
  const PAGE_SIZE = 10;
@@ -20168,7 +20775,7 @@ const setting = {
20168
20775
  showHeader: true,
20169
20776
  delayHover: 250,
20170
20777
  autoResize: true,
20171
- maxHeight: 325,
20778
+ // maxHeight: 325,
20172
20779
  showOverflow: true,
20173
20780
  showHeaderOverflow: "tooltip",
20174
20781
  showFooterOverflow: "tooltip",
@@ -20213,8 +20820,8 @@ const setting = {
20213
20820
  zoom: true
20214
20821
  })
20215
20822
  };
20216
- const _hoisted_1$5 = { class: "max-table-selection-count" };
20217
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
20823
+ const _hoisted_1$4 = { class: "max-table-selection-count" };
20824
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
20218
20825
  __name: "BasicTable",
20219
20826
  props: /* @__PURE__ */ vue.mergeDefaults({
20220
20827
  layouts: {},
@@ -20603,7 +21210,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
20603
21210
  class: vue.normalizeClass(vue.unref(e)("selection-count"))
20604
21211
  }, [
20605
21212
  vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(t)("max.basic.selected")), 1),
20606
- vue.createElementVNode("span", _hoisted_1$5, vue.toDisplayString(vue.unref(getSelectRows)().length), 1),
21213
+ vue.createElementVNode("span", _hoisted_1$4, vue.toDisplayString(vue.unref(getSelectRows)().length), 1),
20607
21214
  vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(t)("max.basic.item")), 1)
20608
21215
  ], 2)
20609
21216
  ], 2)) : vue.createCommentVNode("", true),
@@ -20668,8 +21275,8 @@ const vxeTableFormatter = {
20668
21275
  }
20669
21276
  };
20670
21277
  vxeTable.VxeUI.formats.mixin(vxeTableFormatter);
20671
- const XBasicTable = utils.withInstall(_sfc_main$h);
20672
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
21278
+ const XBasicTable = utils.withInstall(_sfc_main$b);
21279
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
20673
21280
  __name: "BasicTag",
20674
21281
  props: {
20675
21282
  tagType: { type: [Number, Boolean] },
@@ -20694,7 +21301,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
20694
21301
  };
20695
21302
  }
20696
21303
  });
20697
- const XBasicTag = utils.withInstall(_sfc_main$g);
21304
+ const XBasicTag = utils.withInstall(_sfc_main$a);
20698
21305
  const attrAccept = (file, acceptedFiles) => {
20699
21306
  if (file && acceptedFiles) {
20700
21307
  const acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
@@ -22429,9 +23036,9 @@ const BasicUploadDragger = /* @__PURE__ */ vue.defineComponent({
22429
23036
  }
22430
23037
  });
22431
23038
  const XBasicUploadDragger = utils.withInstall(BasicUploadDragger);
22432
- const _hoisted_1$4 = ["title"];
23039
+ const _hoisted_1$3 = ["title"];
22433
23040
  const _hoisted_2$1 = ["title"];
22434
- const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
23041
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
22435
23042
  __name: "BasicViewBar",
22436
23043
  props: {
22437
23044
  fixed: { type: Boolean },
@@ -22522,7 +23129,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
22522
23129
  onClick: scrollPrev
22523
23130
  }, [
22524
23131
  vue.createVNode(vue.unref(XBasicSvgIcon), { icon: "ri:arrow-left-s-line" })
22525
- ], 10, _hoisted_1$4),
23132
+ ], 10, _hoisted_1$3),
22526
23133
  vue.createElementVNode("div", {
22527
23134
  class: vue.normalizeClass({ [vue.unref(is)("hide")]: !scrollable.value, [vue.unref(e)("next")]: true }),
22528
23135
  title: vue.unref(t)("max.viewBar.next"),
@@ -22543,13 +23150,13 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
22543
23150
  };
22544
23151
  }
22545
23152
  });
22546
- const XBasicViewBar = utils.withInstall(_sfc_main$f);
22547
- const _sfc_main$e = vue.defineComponent({
23153
+ const XBasicViewBar = utils.withInstall(_sfc_main$9);
23154
+ const _sfc_main$8 = vue.defineComponent({
22548
23155
  name: "CLoadingIcon"
22549
23156
  });
22550
- const _hoisted_1$3 = { viewBox: "0 0 50 50" };
23157
+ const _hoisted_1$2 = { viewBox: "0 0 50 50" };
22551
23158
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22552
- return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [
23159
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
22553
23160
  vue.createElementVNode("circle", {
22554
23161
  class: "imax-loading-icon__circle",
22555
23162
  cx: "25",
@@ -22561,7 +23168,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22561
23168
  }, null, -1)
22562
23169
  ])]);
22563
23170
  }
22564
- const LoadingIcon = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render]]);
23171
+ const LoadingIcon = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render]]);
22565
23172
  var ignoreEnum = /* @__PURE__ */ ((ignoreEnum2) => {
22566
23173
  ignoreEnum2["none"] = "none";
22567
23174
  ignoreEnum2["parents"] = "parents";
@@ -22760,9 +23367,9 @@ const useTreeNodeCls = (props, dragoverRefs) => {
22760
23367
  titleCls
22761
23368
  };
22762
23369
  };
22763
- const _hoisted_1$2 = ["d", "stroke-width", "stroke", "stroke-dasharray"];
23370
+ const _hoisted_1$1 = ["d", "stroke-width", "stroke", "stroke-dasharray"];
22764
23371
  const _hoisted_2 = ["draggable"];
22765
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
23372
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
22766
23373
  ...{
22767
23374
  name: "VTreeNode"
22768
23375
  },
@@ -22976,7 +23583,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
22976
23583
  "stroke-width": strokeWidth.value,
22977
23584
  stroke: showLineParams.value.color,
22978
23585
  "stroke-dasharray": strokeDasharray.value
22979
- }, null, 8, _hoisted_1$2)
23586
+ }, null, 8, _hoisted_1$1)
22980
23587
  ], 4);
22981
23588
  }), 128)) : vue.createCommentVNode("", true),
22982
23589
  vue.createElementVNode("div", {
@@ -23076,7 +23683,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
23076
23683
  };
23077
23684
  }
23078
23685
  });
23079
- const XTreeNode = utils.withInstall(_sfc_main$d);
23686
+ const XTreeNode = utils.withInstall(_sfc_main$7);
23080
23687
  const useExpandAnimation = (renderNodesRef, renderStartRef, props) => {
23081
23688
  const expandAnimationStart = vue.ref(false);
23082
23689
  const expandAnimationReady = vue.ref(false);
@@ -24526,7 +25133,7 @@ const pickReadonly = (obj, ...keys) => {
24526
25133
  });
24527
25134
  return picked;
24528
25135
  };
24529
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
25136
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
24530
25137
  ...{
24531
25138
  name: "VTree",
24532
25139
  inheritAttrs: false
@@ -25015,7 +25622,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
25015
25622
  };
25016
25623
  }
25017
25624
  });
25018
- const XTree = utils.withInstall(_sfc_main$c);
25625
+ const XTree = utils.withInstall(_sfc_main$6);
25019
25626
  const useTreeSearchCls = (props, options) => {
25020
25627
  const { checkAllStatus, isShowingChecked } = options;
25021
25628
  const { b } = useNamespace("tree-search");
@@ -25100,8 +25707,8 @@ const DEFAULT_TREE_SEARCH_PROPS = {
25100
25707
  searchDebounceTime: 300
25101
25708
  };
25102
25709
  const TREE_SEARCH_EVENTS = ["search", ...TREE_EVENTS];
25103
- const _hoisted_1$1 = ["placeholder", "disabled"];
25104
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
25710
+ const _hoisted_1 = ["placeholder", "disabled"];
25711
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
25105
25712
  ...{
25106
25713
  name: "VTreeSearch",
25107
25714
  inheritAttrs: false
@@ -25358,7 +25965,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
25358
25965
  placeholder: placeholder.value,
25359
25966
  disabled: __props.searchDisabled,
25360
25967
  onInput: handleSearch
25361
- }, null, 42, _hoisted_1$1), [
25968
+ }, null, 42, _hoisted_1), [
25362
25969
  [vue.vModelText, keyword.value]
25363
25970
  ])
25364
25971
  ])
@@ -25411,7 +26018,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
25411
26018
  };
25412
26019
  }
25413
26020
  });
25414
- const XTreeSearch = utils.withInstall(_sfc_main$b);
26021
+ const XTreeSearch = utils.withInstall(_sfc_main$5);
25415
26022
  const useTreeDropCls = (props, options) => {
25416
26023
  const { dropdownVisible, checkedCount, selectedTitle } = options;
25417
26024
  const { b } = useNamespace("tree-drop");
@@ -25483,7 +26090,7 @@ const DEFAULT_TREE_DROP_PROPS = {
25483
26090
  };
25484
26091
  const TREE_SEARCH_API_METHODS = [...TREE_API_METHODS, "clearKeyword", "getKeyword", "search"];
25485
26092
  const TREE_DROP_EVENTS = ["clear", "dropdown-visible-change", ...TREE_SEARCH_EVENTS];
25486
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
26093
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
25487
26094
  ...{
25488
26095
  name: "VTreeDrop",
25489
26096
  inheritAttrs: false
@@ -25848,8 +26455,21 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
25848
26455
  };
25849
26456
  }
25850
26457
  });
25851
- const XTreeDrop = utils.withInstall(_sfc_main$a);
26458
+ const XTreeDrop = utils.withInstall(_sfc_main$4);
25852
26459
  const components = [
26460
+ XCommonPinToggler,
26461
+ XCommonReloadButton,
26462
+ XCommonBetterScroll,
26463
+ XCommonButtonIcon,
26464
+ XCommonFullScreen,
26465
+ XCommonIconTooltip,
26466
+ XCommonMenuToggler,
26467
+ XBasicButtonCreate,
26468
+ XBasicButtonDelete,
26469
+ XBasicButtonEdit,
26470
+ XBasicButtonExport,
26471
+ XBasicButtonImport,
26472
+ XBasicButtonPrint,
25853
26473
  XConfigProvider,
25854
26474
  XBasicSvgIcon,
25855
26475
  XBasicArrow,
@@ -25912,256 +26532,6 @@ const makeInstaller = (components2 = []) => {
25912
26532
  };
25913
26533
  };
25914
26534
  const installer = makeInstaller([...components]);
25915
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
25916
- __name: "BasicButtonCreate",
25917
- emits: ["click"],
25918
- setup(__props, { emit: __emit }) {
25919
- const emit = __emit;
25920
- const { t } = useLocale();
25921
- const attrs = vue.useAttrs();
25922
- function onClickHandler() {
25923
- emit("click");
25924
- }
25925
- return (_ctx, _cache) => {
25926
- return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
25927
- icon: "ri-add-fill",
25928
- type: "primary"
25929
- }, vue.unref(attrs), { onClick: onClickHandler }), {
25930
- default: vue.withCtx(() => [
25931
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
25932
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.add")), 1)
25933
- ])
25934
- ]),
25935
- _: 3
25936
- }, 16);
25937
- };
25938
- }
25939
- });
25940
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
25941
- __name: "BasicButtonDelete",
25942
- emits: ["click"],
25943
- setup(__props, { emit: __emit }) {
25944
- const emit = __emit;
25945
- const { t } = useLocale();
25946
- const attrs = vue.useAttrs();
25947
- function onClickHandler() {
25948
- emit("click");
25949
- }
25950
- return (_ctx, _cache) => {
25951
- return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
25952
- type: "error",
25953
- icon: "ri-delete-bin-5-fill"
25954
- }, vue.unref(attrs), { onClick: onClickHandler }), {
25955
- default: vue.withCtx(() => [
25956
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
25957
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.delete")), 1)
25958
- ])
25959
- ]),
25960
- _: 3
25961
- }, 16);
25962
- };
25963
- }
25964
- });
25965
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
25966
- __name: "BasicButtonEdit",
25967
- emits: ["click"],
25968
- setup(__props, { emit: __emit }) {
25969
- const emit = __emit;
25970
- const { t } = useLocale();
25971
- const attrs = vue.useAttrs();
25972
- function onClickHandler() {
25973
- emit("click");
25974
- }
25975
- return (_ctx, _cache) => {
25976
- return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
25977
- icon: "ri-edit-fill",
25978
- type: "primary"
25979
- }, vue.unref(attrs), { onClick: onClickHandler }), {
25980
- default: vue.withCtx(() => [
25981
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
25982
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.edit")), 1)
25983
- ])
25984
- ]),
25985
- _: 3
25986
- }, 16);
25987
- };
25988
- }
25989
- });
25990
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
25991
- __name: "BasicButtonExport",
25992
- props: {
25993
- href: {},
25994
- exportApi: { type: Function },
25995
- beforeFetch: { type: Function },
25996
- afterFetch: { type: Function },
25997
- download: {},
25998
- origin: { type: Boolean },
25999
- onClick: { type: Function }
26000
- },
26001
- setup(__props) {
26002
- const props = __props;
26003
- const { t } = useLocale();
26004
- const attrs = vue.useAttrs();
26005
- async function downloadFileRemote() {
26006
- if (!props.exportApi) return false;
26007
- const params = utils.isFunction(props.beforeFetch) ? props.beforeFetch() : {};
26008
- const { response } = await props.exportApi(params);
26009
- if (response.data) {
26010
- utils.downloadFileByResponseData(response);
26011
- }
26012
- props.afterFetch && props.afterFetch(response);
26013
- }
26014
- function onClickHandler() {
26015
- var _a;
26016
- if (props.origin) {
26017
- (_a = props.onClick) == null ? void 0 : _a.call(props);
26018
- return false;
26019
- }
26020
- if (!props.exportApi) {
26021
- utils.downloadFileStatic(props.href, props.download);
26022
- return false;
26023
- }
26024
- downloadFileRemote();
26025
- }
26026
- return (_ctx, _cache) => {
26027
- return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
26028
- icon: "ri:export-line",
26029
- type: "primary"
26030
- }, vue.unref(attrs), { onClick: onClickHandler }), {
26031
- default: vue.withCtx(() => [
26032
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
26033
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.export")), 1)
26034
- ])
26035
- ]),
26036
- _: 3
26037
- }, 16);
26038
- };
26039
- }
26040
- });
26041
- const _hoisted_1 = ["multiple", "name", "accept"];
26042
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
26043
- __name: "BasicButtonImport",
26044
- props: {
26045
- name: { default: "file" },
26046
- accept: { default: ".xlsx,.xls,.csv" },
26047
- multiple: { type: Boolean, default: false },
26048
- beforeUpload: { type: Function, default: void 0 }
26049
- },
26050
- emits: ["change"],
26051
- setup(__props, { emit: __emit }) {
26052
- const props = __props;
26053
- const emit = __emit;
26054
- const { t } = useLocale();
26055
- const attrs = vue.useAttrs();
26056
- const uid2 = vue.ref(utils.guid());
26057
- const fileInputRef = vue.useTemplateRef("fileInputRef");
26058
- function onClickHandler() {
26059
- var _a;
26060
- (_a = fileInputRef.value) == null ? void 0 : _a.click();
26061
- }
26062
- function reset() {
26063
- uid2.value = utils.guid();
26064
- }
26065
- async function processFile(file, fileList) {
26066
- const { beforeUpload } = props;
26067
- let transformedFile = file;
26068
- if (beforeUpload) {
26069
- try {
26070
- transformedFile = await beforeUpload(file, fileList);
26071
- } catch (e) {
26072
- console.warn("max-ajax-uploader", e);
26073
- transformedFile = false;
26074
- }
26075
- if (transformedFile === false) {
26076
- return {
26077
- origin: file
26078
- };
26079
- }
26080
- }
26081
- return {
26082
- origin: file
26083
- };
26084
- }
26085
- function uploadFiles(files) {
26086
- const originFiles = [...files];
26087
- const postFiles = originFiles.map((file) => {
26088
- return processFile(file, originFiles);
26089
- });
26090
- Promise.all(postFiles).then((fileList) => {
26091
- if (fileList.length === 0) {
26092
- return;
26093
- }
26094
- const file = fileList[0].origin;
26095
- const po = new FormData();
26096
- po.append("file", file);
26097
- emit("change", { file: fileList[0].origin, files: fileList, param: po });
26098
- });
26099
- }
26100
- function onFileChange(e) {
26101
- const { accept } = props;
26102
- const { files } = e.target;
26103
- const acceptedFiles = [...files].filter((file) => utils.attrAccept(file, accept));
26104
- uploadFiles(acceptedFiles);
26105
- reset();
26106
- }
26107
- return (_ctx, _cache) => {
26108
- return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
26109
- icon: "ri:import-line",
26110
- type: "primary"
26111
- }, vue.unref(attrs), { onClick: onClickHandler }), {
26112
- default: vue.withCtx(() => [
26113
- (vue.openBlock(), vue.createElementBlock("input", {
26114
- key: uid2.value,
26115
- ref_key: "fileInputRef",
26116
- ref: fileInputRef,
26117
- type: "file",
26118
- class: "hidden",
26119
- multiple: __props.multiple,
26120
- name: __props.name,
26121
- accept: __props.accept,
26122
- onChange: onFileChange
26123
- }, null, 40, _hoisted_1)),
26124
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
26125
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.import")), 1)
26126
- ], true)
26127
- ]),
26128
- _: 3
26129
- }, 16);
26130
- };
26131
- }
26132
- });
26133
- const BasicButtonImport = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-826acb65"]]);
26134
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
26135
- __name: "BasicButtonPrint",
26136
- emits: ["click"],
26137
- setup(__props, { emit: __emit }) {
26138
- const emit = __emit;
26139
- const { t } = useLocale();
26140
- const attrs = vue.useAttrs();
26141
- function onClickHandler() {
26142
- emit("click");
26143
- }
26144
- return (_ctx, _cache) => {
26145
- return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps({
26146
- icon: "ri-printer-line",
26147
- type: "primary"
26148
- }, vue.unref(attrs), { onClick: onClickHandler }), {
26149
- default: vue.withCtx(() => [
26150
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
26151
- vue.createTextVNode(vue.toDisplayString(vue.unref(t)("max.basic.print")), 1)
26152
- ])
26153
- ]),
26154
- _: 3
26155
- }, 16);
26156
- };
26157
- }
26158
- });
26159
- const XBasicButtonCreate = utils.withInstall(_sfc_main$9);
26160
- const XBasicButtonEdit = utils.withInstall(_sfc_main$7);
26161
- const XBasicButtonDelete = utils.withInstall(_sfc_main$8);
26162
- const XBasicButtonExport = utils.withInstall(_sfc_main$6);
26163
- const XBasicButtonImport = utils.withInstall(BasicButtonImport);
26164
- const XBasicButtonPrint = utils.withInstall(_sfc_main$4);
26165
26535
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
26166
26536
  __name: "BasicDrawerFooter",
26167
26537
  props: {
@@ -26603,6 +26973,13 @@ exports.XBasicTriggerButton = XBasicTriggerButton;
26603
26973
  exports.XBasicUpload = XBasicUpload;
26604
26974
  exports.XBasicUploadDragger = XBasicUploadDragger;
26605
26975
  exports.XBasicViewBar = XBasicViewBar;
26976
+ exports.XCommonBetterScroll = XCommonBetterScroll;
26977
+ exports.XCommonButtonIcon = XCommonButtonIcon;
26978
+ exports.XCommonFullScreen = XCommonFullScreen;
26979
+ exports.XCommonIconTooltip = XCommonIconTooltip;
26980
+ exports.XCommonMenuToggler = XCommonMenuToggler;
26981
+ exports.XCommonPinToggler = XCommonPinToggler;
26982
+ exports.XCommonReloadButton = XCommonReloadButton;
26606
26983
  exports.XConfigProvider = XConfigProvider;
26607
26984
  exports.XTree = XTree;
26608
26985
  exports.XTreeDrop = XTreeDrop;