vue-devui 1.0.0-beta.16 → 1.0.0-beta.19

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 (190) hide show
  1. package/README.md +29 -21
  2. package/accordion/index.es.js +229 -14
  3. package/accordion/index.umd.js +1 -1
  4. package/accordion/style.css +1 -1
  5. package/alert/index.es.js +28 -30
  6. package/alert/index.umd.js +1 -1
  7. package/alert/style.css +1 -1
  8. package/auto-complete/index.es.js +133 -271
  9. package/auto-complete/index.umd.js +1 -1
  10. package/auto-complete/style.css +1 -1
  11. package/back-top/index.es.js +5 -3
  12. package/back-top/index.umd.js +1 -1
  13. package/badge/index.es.js +13 -19
  14. package/badge/index.umd.js +1 -1
  15. package/badge/style.css +1 -1
  16. package/breadcrumb/index.es.js +2 -1
  17. package/button/index.es.js +95 -122
  18. package/button/index.umd.js +1 -1
  19. package/button/style.css +1 -1
  20. package/carousel/index.es.js +38 -53
  21. package/carousel/index.umd.js +1 -1
  22. package/cascader/index.es.js +5412 -784
  23. package/cascader/index.umd.js +27 -1
  24. package/cascader/style.css +1 -1
  25. package/checkbox/style.css +1 -1
  26. package/color-picker/index.es.js +5517 -281
  27. package/color-picker/index.umd.js +27 -1
  28. package/color-picker/style.css +1 -1
  29. package/countdown/index.es.js +9 -8
  30. package/date-picker/index.es.js +44 -62
  31. package/date-picker/index.umd.js +1 -1
  32. package/date-picker/style.css +1 -1
  33. package/drawer/index.es.js +159 -324
  34. package/drawer/index.umd.js +1 -1
  35. package/drawer/style.css +1 -1
  36. package/dropdown/index.es.js +459 -301
  37. package/dropdown/index.umd.js +1 -1
  38. package/dropdown/style.css +1 -1
  39. package/editable-select/index.es.js +293 -5724
  40. package/editable-select/index.umd.js +1 -27
  41. package/editable-select/style.css +1 -1
  42. package/form/index.es.js +6125 -535
  43. package/form/index.umd.js +27 -1
  44. package/form/style.css +1 -1
  45. package/fullscreen/index.es.js +112 -133
  46. package/fullscreen/index.umd.js +1 -1
  47. package/fullscreen/style.css +1 -1
  48. package/gantt/index.es.js +3 -15
  49. package/gantt/index.umd.js +1 -1
  50. package/gantt/style.css +1 -1
  51. package/grid/index.es.js +1 -1
  52. package/grid/style.css +1 -1
  53. package/icon/index.es.js +39 -57
  54. package/icon/index.umd.js +1 -1
  55. package/image-preview/index.es.js +2 -1
  56. package/input/index.es.js +4 -5
  57. package/input/index.umd.js +1 -1
  58. package/input/style.css +1 -1
  59. package/input-icon/index.es.js +42 -42
  60. package/input-icon/index.umd.js +1 -1
  61. package/input-icon/style.css +1 -1
  62. package/input-number/index.es.js +46 -57
  63. package/input-number/index.umd.js +1 -1
  64. package/input-number/style.css +1 -1
  65. package/{time-axis → list}/index.d.ts +0 -0
  66. package/list/index.es.js +39 -0
  67. package/list/index.umd.js +1 -0
  68. package/{toast → list}/package.json +1 -1
  69. package/list/style.css +1 -0
  70. package/loading/index.es.js +2 -2
  71. package/modal/index.es.js +300 -960
  72. package/modal/index.umd.js +1 -1
  73. package/modal/style.css +1 -1
  74. package/nav-sprite/index.es.js +1 -675
  75. package/nav-sprite/index.umd.js +1 -1
  76. package/{toast → notification}/index.d.ts +0 -0
  77. package/notification/index.es.js +284 -0
  78. package/notification/index.umd.js +1 -0
  79. package/notification/package.json +7 -0
  80. package/notification/style.css +1 -0
  81. package/nuxt/components/DropdownMenu.js +3 -0
  82. package/nuxt/components/IFileOptions.js +3 -0
  83. package/nuxt/components/IUploadOptions.js +3 -0
  84. package/nuxt/components/List.js +3 -0
  85. package/nuxt/components/ListItem.js +3 -0
  86. package/nuxt/components/Notification.js +3 -0
  87. package/nuxt/components/NotificationService.js +3 -0
  88. package/nuxt/components/PanelBody.js +3 -0
  89. package/nuxt/components/PanelFooter.js +3 -0
  90. package/nuxt/components/PanelHeader.js +3 -0
  91. package/nuxt/components/Timeline.js +3 -0
  92. package/nuxt/components/TimelineItem.js +3 -0
  93. package/nuxt/components/UploadStatus.js +3 -0
  94. package/nuxt/components/alertProps.js +3 -0
  95. package/nuxt/components/badgeProps.js +3 -0
  96. package/nuxt/components/dropdownMenuProps.js +3 -0
  97. package/nuxt/components/fixedOverlayProps.js +3 -0
  98. package/nuxt/components/flexibleOverlayProps.js +3 -0
  99. package/nuxt/components/fullscreenProps.js +3 -0
  100. package/nuxt/components/iconProps.js +2 -0
  101. package/nuxt/components/notificationProps.js +3 -0
  102. package/nuxt/components/overlayEmits.js +3 -0
  103. package/nuxt/components/overlayProps.js +3 -0
  104. package/nuxt/components/paginationProps.js +3 -0
  105. package/nuxt/components/panelProps.js +3 -0
  106. package/nuxt/components/popoverProps.js +3 -0
  107. package/nuxt/components/searchProps.js +3 -0
  108. package/nuxt/components/tooltipProps.js +3 -0
  109. package/nuxt/components/uploadProps.js +3 -0
  110. package/overlay/index.es.js +152 -198
  111. package/overlay/index.umd.js +1 -1
  112. package/overlay/style.css +1 -1
  113. package/package.json +12 -60
  114. package/pagination/index.es.js +11 -13
  115. package/pagination/index.umd.js +1 -1
  116. package/pagination/style.css +1 -1
  117. package/panel/index.es.js +48 -35
  118. package/panel/index.umd.js +1 -1
  119. package/popover/index.es.js +5954 -201
  120. package/popover/index.umd.js +27 -1
  121. package/popover/style.css +1 -1
  122. package/quadrant-diagram/index.es.js +5405 -166
  123. package/quadrant-diagram/index.umd.js +27 -1
  124. package/radio/style.css +1 -1
  125. package/read-tip/index.es.js +6 -3
  126. package/read-tip/style.css +1 -1
  127. package/result/index.es.js +38 -53
  128. package/result/index.umd.js +1 -1
  129. package/ripple/index.es.js +10 -6
  130. package/search/index.es.js +5428 -200
  131. package/search/index.umd.js +27 -1
  132. package/search/style.css +1 -1
  133. package/select/index.es.js +43 -43
  134. package/select/index.umd.js +1 -1
  135. package/select/style.css +1 -1
  136. package/skeleton/index.es.js +17 -17
  137. package/skeleton/index.umd.js +1 -1
  138. package/slider/index.es.js +2 -1
  139. package/splitter/index.es.js +5815 -99
  140. package/splitter/index.umd.js +27 -1
  141. package/splitter/style.css +1 -1
  142. package/status/index.es.js +1 -4
  143. package/status/index.umd.js +1 -1
  144. package/status/style.css +1 -1
  145. package/steps-guide/index.es.js +6 -3
  146. package/sticky/index.umd.js +1 -1
  147. package/style.css +1 -1
  148. package/table/index.es.js +548 -360
  149. package/table/index.umd.js +1 -1
  150. package/table/style.css +1 -1
  151. package/tabs/index.es.js +3 -4
  152. package/tabs/index.umd.js +1 -1
  153. package/tabs/style.css +1 -1
  154. package/tag/index.es.js +2 -1
  155. package/tag-input/index.es.js +4 -2
  156. package/textarea/style.css +1 -1
  157. package/{theme → theme/theme.scss} +0 -0
  158. package/time-picker/index.es.js +98 -123
  159. package/time-picker/index.umd.js +1 -1
  160. package/time-picker/style.css +1 -1
  161. package/timeline/index.d.ts +7 -0
  162. package/{time-axis → timeline}/index.es.js +65 -78
  163. package/timeline/index.umd.js +1 -0
  164. package/{time-axis → timeline}/package.json +1 -1
  165. package/timeline/style.css +1 -0
  166. package/tooltip/index.es.js +5804 -94
  167. package/tooltip/index.umd.js +27 -1
  168. package/tooltip/style.css +1 -1
  169. package/transfer/index.es.js +5896 -404
  170. package/transfer/index.umd.js +27 -1
  171. package/transfer/style.css +1 -1
  172. package/tree/index.es.js +5439 -814
  173. package/tree/index.umd.js +27 -1
  174. package/tree/style.css +1 -1
  175. package/tree-select/index.es.js +11 -7
  176. package/tree-select/style.css +1 -1
  177. package/upload/index.es.js +335 -2213
  178. package/upload/index.umd.js +1 -1
  179. package/upload/style.css +1 -1
  180. package/vue-devui.es.js +9709 -12248
  181. package/vue-devui.umd.js +20 -20
  182. package/nuxt/components/TimeAxis.js +0 -3
  183. package/nuxt/components/TimeAxisItem.js +0 -3
  184. package/nuxt/components/Toast.js +0 -3
  185. package/nuxt/components/ToastService.js +0 -3
  186. package/time-axis/index.umd.js +0 -1
  187. package/time-axis/style.css +0 -1
  188. package/toast/index.es.js +0 -2063
  189. package/toast/index.umd.js +0 -1
  190. package/toast/style.css +0 -1
@@ -21,2047 +21,290 @@ var __publicField = (obj, key, value) => {
21
21
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
22
  return value;
23
23
  };
24
- import { defineComponent, createVNode, getCurrentInstance, ref, computed, watch, nextTick, onUnmounted, mergeProps, createApp, toRefs, withDirectives, resolveComponent, isVNode, resolveDirective } from "vue";
25
- var toast = "";
26
- const toastProps = {
27
- value: {
28
- type: Array,
29
- required: true,
30
- default: () => []
31
- },
32
- life: {
33
- type: Number,
34
- default: null
35
- },
36
- lifeMode: {
37
- type: String,
38
- default: "global"
39
- },
40
- sticky: {
41
- type: Boolean,
42
- default: false
43
- },
44
- style: {
45
- type: Object,
46
- default: () => ({})
47
- },
48
- styleClass: {
49
- type: String
50
- },
51
- onCloseEvent: {
52
- type: Function
53
- },
54
- onValueChange: {
55
- type: Function
56
- }
57
- };
58
- var Icon = defineComponent({
59
- name: "DIcon",
60
- props: {
61
- name: {
62
- type: String,
63
- required: true
64
- },
65
- size: {
66
- type: String,
67
- default: "inherit"
68
- },
69
- color: {
70
- type: String,
71
- default: "inherit"
72
- },
73
- classPrefix: {
74
- type: String,
75
- default: "icon"
76
- }
77
- },
78
- setup(props) {
79
- return __spreadValues({}, props);
80
- },
81
- render() {
82
- const {
83
- name,
84
- size,
85
- color,
86
- classPrefix
87
- } = this;
88
- return /^((https?):)?\/\//.test(name) ? createVNode("img", {
89
- "src": name,
90
- "alt": name.split("/")[name.split("/").length - 1],
91
- "style": {
92
- width: size,
93
- verticalAlign: "text-bottom"
94
- }
95
- }, null) : createVNode("i", {
96
- "class": `${classPrefix} ${classPrefix}-${name}`,
97
- "style": {
98
- fontSize: size,
99
- color
100
- }
101
- }, null);
102
- }
103
- });
104
- Icon.install = function(app) {
105
- app.component(Icon.name, Icon);
106
- };
107
- var ToastIconClose = defineComponent({
108
- name: "DToastIconClose",
109
- props: {
110
- prefixCls: String,
111
- onClick: Function
112
- },
113
- emits: ["click"],
114
- render() {
115
- const {
116
- prefixCls,
117
- $emit
118
- } = this;
119
- const wrapperCls = `${prefixCls}-icon-close`;
120
- return createVNode("div", {
121
- "class": wrapperCls,
122
- "onClick": (e) => $emit("click", e)
123
- }, [createVNode(Icon, {
124
- "name": "close",
125
- "size": "14px"
126
- }, null)]);
127
- }
128
- });
129
- var ToastImage = defineComponent({
130
- name: "DToastImage",
131
- props: {
132
- prefixCls: String,
133
- severity: String
134
- },
135
- render() {
136
- const {
137
- prefixCls,
138
- severity
139
- } = this;
140
- const wrapperCls = [`${prefixCls}-image`, `${prefixCls}-image-${severity || "common"}`];
141
- const severityIconMap = {
142
- info: "info-o",
143
- success: "right-o",
144
- warning: "warning-o",
145
- error: "error-o"
146
- };
147
- const showIcon = () => severity !== "common";
148
- return createVNode("span", {
149
- "class": wrapperCls
150
- }, [showIcon() ? createVNode(Icon, {
151
- "name": severityIconMap[severity],
152
- "size": "16px"
153
- }, null) : null]);
154
- }
155
- });
156
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
157
- var freeGlobal$1 = freeGlobal;
158
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
159
- var root = freeGlobal$1 || freeSelf || Function("return this")();
160
- var root$1 = root;
161
- var Symbol$1 = root$1.Symbol;
162
- var Symbol$2 = Symbol$1;
163
- var objectProto$f = Object.prototype;
164
- var hasOwnProperty$c = objectProto$f.hasOwnProperty;
165
- var nativeObjectToString$1 = objectProto$f.toString;
166
- var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
167
- function getRawTag(value) {
168
- var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
169
- try {
170
- value[symToStringTag$1] = void 0;
171
- var unmasked = true;
172
- } catch (e) {
173
- }
174
- var result = nativeObjectToString$1.call(value);
175
- if (unmasked) {
176
- if (isOwn) {
177
- value[symToStringTag$1] = tag;
178
- } else {
179
- delete value[symToStringTag$1];
180
- }
181
- }
182
- return result;
183
- }
184
- var objectProto$e = Object.prototype;
185
- var nativeObjectToString = objectProto$e.toString;
186
- function objectToString(value) {
187
- return nativeObjectToString.call(value);
188
- }
189
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
190
- var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
191
- function baseGetTag(value) {
192
- if (value == null) {
193
- return value === void 0 ? undefinedTag : nullTag;
194
- }
195
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
196
- }
197
- function isObjectLike(value) {
198
- return value != null && typeof value == "object";
199
- }
200
- var symbolTag$3 = "[object Symbol]";
201
- function isSymbol(value) {
202
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
203
- }
204
- function arrayMap(array, iteratee) {
205
- var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
206
- while (++index2 < length) {
207
- result[index2] = iteratee(array[index2], index2, array);
208
- }
209
- return result;
210
- }
211
- var isArray = Array.isArray;
212
- var isArray$1 = isArray;
213
- var INFINITY$1 = 1 / 0;
214
- var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
215
- function baseToString(value) {
216
- if (typeof value == "string") {
217
- return value;
218
- }
219
- if (isArray$1(value)) {
220
- return arrayMap(value, baseToString) + "";
221
- }
222
- if (isSymbol(value)) {
223
- return symbolToString ? symbolToString.call(value) : "";
224
- }
225
- var result = value + "";
226
- return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
227
- }
228
- var reWhitespace = /\s/;
229
- function trimmedEndIndex(string) {
230
- var index2 = string.length;
231
- while (index2-- && reWhitespace.test(string.charAt(index2))) {
232
- }
233
- return index2;
234
- }
235
- var reTrimStart = /^\s+/;
236
- function baseTrim(string) {
237
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
238
- }
239
- function isObject(value) {
240
- var type = typeof value;
241
- return value != null && (type == "object" || type == "function");
242
- }
243
- var NAN = 0 / 0;
244
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
245
- var reIsBinary = /^0b[01]+$/i;
246
- var reIsOctal = /^0o[0-7]+$/i;
247
- var freeParseInt = parseInt;
248
- function toNumber(value) {
249
- if (typeof value == "number") {
250
- return value;
251
- }
252
- if (isSymbol(value)) {
253
- return NAN;
254
- }
255
- if (isObject(value)) {
256
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
257
- value = isObject(other) ? other + "" : other;
258
- }
259
- if (typeof value != "string") {
260
- return value === 0 ? value : +value;
261
- }
262
- value = baseTrim(value);
263
- var isBinary = reIsBinary.test(value);
264
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
265
- }
266
- function identity(value) {
267
- return value;
268
- }
269
- var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
270
- function isFunction(value) {
271
- if (!isObject(value)) {
272
- return false;
273
- }
274
- var tag = baseGetTag(value);
275
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
276
- }
277
- var coreJsData = root$1["__core-js_shared__"];
278
- var coreJsData$1 = coreJsData;
279
- var maskSrcKey = function() {
280
- var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
281
- return uid ? "Symbol(src)_1." + uid : "";
282
- }();
283
- function isMasked(func) {
284
- return !!maskSrcKey && maskSrcKey in func;
285
- }
286
- var funcProto$2 = Function.prototype;
287
- var funcToString$2 = funcProto$2.toString;
288
- function toSource(func) {
289
- if (func != null) {
290
- try {
291
- return funcToString$2.call(func);
292
- } catch (e) {
293
- }
294
- try {
295
- return func + "";
296
- } catch (e) {
297
- }
298
- }
299
- return "";
300
- }
301
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
302
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
303
- var funcProto$1 = Function.prototype, objectProto$d = Object.prototype;
304
- var funcToString$1 = funcProto$1.toString;
305
- var hasOwnProperty$b = objectProto$d.hasOwnProperty;
306
- var reIsNative = RegExp("^" + funcToString$1.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
307
- function baseIsNative(value) {
308
- if (!isObject(value) || isMasked(value)) {
309
- return false;
310
- }
311
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
312
- return pattern.test(toSource(value));
313
- }
314
- function getValue(object, key) {
315
- return object == null ? void 0 : object[key];
316
- }
317
- function getNative(object, key) {
318
- var value = getValue(object, key);
319
- return baseIsNative(value) ? value : void 0;
320
- }
321
- var WeakMap = getNative(root$1, "WeakMap");
322
- var WeakMap$1 = WeakMap;
323
- var objectCreate = Object.create;
324
- var baseCreate = function() {
325
- function object() {
326
- }
327
- return function(proto) {
328
- if (!isObject(proto)) {
329
- return {};
330
- }
331
- if (objectCreate) {
332
- return objectCreate(proto);
333
- }
334
- object.prototype = proto;
335
- var result = new object();
336
- object.prototype = void 0;
337
- return result;
338
- };
339
- }();
340
- var baseCreate$1 = baseCreate;
341
- function apply(func, thisArg, args) {
342
- switch (args.length) {
343
- case 0:
344
- return func.call(thisArg);
345
- case 1:
346
- return func.call(thisArg, args[0]);
347
- case 2:
348
- return func.call(thisArg, args[0], args[1]);
349
- case 3:
350
- return func.call(thisArg, args[0], args[1], args[2]);
351
- }
352
- return func.apply(thisArg, args);
353
- }
354
- function copyArray(source, array) {
355
- var index2 = -1, length = source.length;
356
- array || (array = Array(length));
357
- while (++index2 < length) {
358
- array[index2] = source[index2];
359
- }
360
- return array;
361
- }
362
- var HOT_COUNT = 800, HOT_SPAN = 16;
363
- var nativeNow = Date.now;
364
- function shortOut(func) {
365
- var count = 0, lastCalled = 0;
366
- return function() {
367
- var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
368
- lastCalled = stamp;
369
- if (remaining > 0) {
370
- if (++count >= HOT_COUNT) {
371
- return arguments[0];
372
- }
373
- } else {
374
- count = 0;
375
- }
376
- return func.apply(void 0, arguments);
377
- };
378
- }
379
- function constant(value) {
380
- return function() {
381
- return value;
382
- };
383
- }
384
- var defineProperty = function() {
385
- try {
386
- var func = getNative(Object, "defineProperty");
387
- func({}, "", {});
388
- return func;
389
- } catch (e) {
390
- }
391
- }();
392
- var defineProperty$1 = defineProperty;
393
- var baseSetToString = !defineProperty$1 ? identity : function(func, string) {
394
- return defineProperty$1(func, "toString", {
395
- "configurable": true,
396
- "enumerable": false,
397
- "value": constant(string),
398
- "writable": true
399
- });
400
- };
401
- var baseSetToString$1 = baseSetToString;
402
- var setToString = shortOut(baseSetToString$1);
403
- var setToString$1 = setToString;
404
- function arrayEach(array, iteratee) {
405
- var index2 = -1, length = array == null ? 0 : array.length;
406
- while (++index2 < length) {
407
- if (iteratee(array[index2], index2, array) === false) {
408
- break;
409
- }
410
- }
411
- return array;
412
- }
413
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
414
- var reIsUint = /^(?:0|[1-9]\d*)$/;
415
- function isIndex(value, length) {
416
- var type = typeof value;
417
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
418
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
419
- }
420
- function baseAssignValue(object, key, value) {
421
- if (key == "__proto__" && defineProperty$1) {
422
- defineProperty$1(object, key, {
423
- "configurable": true,
424
- "enumerable": true,
425
- "value": value,
426
- "writable": true
427
- });
428
- } else {
429
- object[key] = value;
430
- }
431
- }
432
- function eq(value, other) {
433
- return value === other || value !== value && other !== other;
434
- }
435
- var objectProto$c = Object.prototype;
436
- var hasOwnProperty$a = objectProto$c.hasOwnProperty;
437
- function assignValue(object, key, value) {
438
- var objValue = object[key];
439
- if (!(hasOwnProperty$a.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
440
- baseAssignValue(object, key, value);
441
- }
442
- }
443
- function copyObject(source, props, object, customizer) {
444
- var isNew = !object;
445
- object || (object = {});
446
- var index2 = -1, length = props.length;
447
- while (++index2 < length) {
448
- var key = props[index2];
449
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
450
- if (newValue === void 0) {
451
- newValue = source[key];
452
- }
453
- if (isNew) {
454
- baseAssignValue(object, key, newValue);
455
- } else {
456
- assignValue(object, key, newValue);
457
- }
458
- }
459
- return object;
460
- }
461
- var nativeMax$1 = Math.max;
462
- function overRest(func, start, transform) {
463
- start = nativeMax$1(start === void 0 ? func.length - 1 : start, 0);
464
- return function() {
465
- var args = arguments, index2 = -1, length = nativeMax$1(args.length - start, 0), array = Array(length);
466
- while (++index2 < length) {
467
- array[index2] = args[start + index2];
468
- }
469
- index2 = -1;
470
- var otherArgs = Array(start + 1);
471
- while (++index2 < start) {
472
- otherArgs[index2] = args[index2];
473
- }
474
- otherArgs[start] = transform(array);
475
- return apply(func, this, otherArgs);
476
- };
477
- }
478
- function baseRest(func, start) {
479
- return setToString$1(overRest(func, start, identity), func + "");
480
- }
481
- var MAX_SAFE_INTEGER = 9007199254740991;
482
- function isLength(value) {
483
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
484
- }
485
- function isArrayLike(value) {
486
- return value != null && isLength(value.length) && !isFunction(value);
487
- }
488
- function isIterateeCall(value, index2, object) {
489
- if (!isObject(object)) {
490
- return false;
491
- }
492
- var type = typeof index2;
493
- if (type == "number" ? isArrayLike(object) && isIndex(index2, object.length) : type == "string" && index2 in object) {
494
- return eq(object[index2], value);
495
- }
496
- return false;
497
- }
498
- function createAssigner(assigner) {
499
- return baseRest(function(object, sources) {
500
- var index2 = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
501
- customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
502
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
503
- customizer = length < 3 ? void 0 : customizer;
504
- length = 1;
505
- }
506
- object = Object(object);
507
- while (++index2 < length) {
508
- var source = sources[index2];
509
- if (source) {
510
- assigner(object, source, index2, customizer);
511
- }
512
- }
513
- return object;
514
- });
515
- }
516
- var objectProto$b = Object.prototype;
517
- function isPrototype(value) {
518
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$b;
519
- return value === proto;
520
- }
521
- function baseTimes(n, iteratee) {
522
- var index2 = -1, result = Array(n);
523
- while (++index2 < n) {
524
- result[index2] = iteratee(index2);
525
- }
526
- return result;
527
- }
528
- var argsTag$3 = "[object Arguments]";
529
- function baseIsArguments(value) {
530
- return isObjectLike(value) && baseGetTag(value) == argsTag$3;
531
- }
532
- var objectProto$a = Object.prototype;
533
- var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
534
- var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
535
- var isArguments = baseIsArguments(function() {
536
- return arguments;
537
- }()) ? baseIsArguments : function(value) {
538
- return isObjectLike(value) && hasOwnProperty$9.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
539
- };
540
- var isArguments$1 = isArguments;
541
- function stubFalse() {
542
- return false;
543
- }
544
- var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
545
- var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
546
- var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
547
- var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0;
548
- var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
549
- var isBuffer = nativeIsBuffer || stubFalse;
550
- var isBuffer$1 = isBuffer;
551
- var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
552
- var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
553
- var typedArrayTags = {};
554
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
555
- typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
556
- function baseIsTypedArray(value) {
557
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
558
- }
559
- function baseUnary(func) {
560
- return function(value) {
561
- return func(value);
562
- };
563
- }
564
- var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
565
- var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
566
- var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
567
- var freeProcess = moduleExports$1 && freeGlobal$1.process;
568
- var nodeUtil = function() {
569
- try {
570
- var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
571
- if (types) {
572
- return types;
573
- }
574
- return freeProcess && freeProcess.binding && freeProcess.binding("util");
575
- } catch (e) {
576
- }
577
- }();
578
- var nodeUtil$1 = nodeUtil;
579
- var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
580
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
581
- var isTypedArray$1 = isTypedArray;
582
- var objectProto$9 = Object.prototype;
583
- var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
584
- function arrayLikeKeys(value, inherited) {
585
- var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
586
- for (var key in value) {
587
- if ((inherited || hasOwnProperty$8.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
588
- result.push(key);
589
- }
590
- }
591
- return result;
592
- }
593
- function overArg(func, transform) {
594
- return function(arg) {
595
- return func(transform(arg));
596
- };
597
- }
598
- var nativeKeys = overArg(Object.keys, Object);
599
- var nativeKeys$1 = nativeKeys;
600
- var objectProto$8 = Object.prototype;
601
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
602
- function baseKeys(object) {
603
- if (!isPrototype(object)) {
604
- return nativeKeys$1(object);
605
- }
606
- var result = [];
607
- for (var key in Object(object)) {
608
- if (hasOwnProperty$7.call(object, key) && key != "constructor") {
609
- result.push(key);
610
- }
611
- }
612
- return result;
613
- }
614
- function keys(object) {
615
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
616
- }
617
- function nativeKeysIn(object) {
618
- var result = [];
619
- if (object != null) {
620
- for (var key in Object(object)) {
621
- result.push(key);
622
- }
623
- }
624
- return result;
625
- }
626
- var objectProto$7 = Object.prototype;
627
- var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
628
- function baseKeysIn(object) {
629
- if (!isObject(object)) {
630
- return nativeKeysIn(object);
631
- }
632
- var isProto = isPrototype(object), result = [];
633
- for (var key in object) {
634
- if (!(key == "constructor" && (isProto || !hasOwnProperty$6.call(object, key)))) {
635
- result.push(key);
636
- }
637
- }
638
- return result;
639
- }
640
- function keysIn(object) {
641
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
642
- }
643
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
644
- function isKey(value, object) {
645
- if (isArray$1(value)) {
646
- return false;
647
- }
648
- var type = typeof value;
649
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
650
- return true;
651
- }
652
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
653
- }
654
- var nativeCreate = getNative(Object, "create");
655
- var nativeCreate$1 = nativeCreate;
656
- function hashClear() {
657
- this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
658
- this.size = 0;
659
- }
660
- function hashDelete(key) {
661
- var result = this.has(key) && delete this.__data__[key];
662
- this.size -= result ? 1 : 0;
663
- return result;
664
- }
665
- var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
666
- var objectProto$6 = Object.prototype;
667
- var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
668
- function hashGet(key) {
669
- var data = this.__data__;
670
- if (nativeCreate$1) {
671
- var result = data[key];
672
- return result === HASH_UNDEFINED$2 ? void 0 : result;
673
- }
674
- return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
675
- }
676
- var objectProto$5 = Object.prototype;
677
- var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
678
- function hashHas(key) {
679
- var data = this.__data__;
680
- return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
681
- }
682
- var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
683
- function hashSet(key, value) {
684
- var data = this.__data__;
685
- this.size += this.has(key) ? 0 : 1;
686
- data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$1 : value;
687
- return this;
688
- }
689
- function Hash(entries) {
690
- var index2 = -1, length = entries == null ? 0 : entries.length;
691
- this.clear();
692
- while (++index2 < length) {
693
- var entry = entries[index2];
694
- this.set(entry[0], entry[1]);
695
- }
696
- }
697
- Hash.prototype.clear = hashClear;
698
- Hash.prototype["delete"] = hashDelete;
699
- Hash.prototype.get = hashGet;
700
- Hash.prototype.has = hashHas;
701
- Hash.prototype.set = hashSet;
702
- function listCacheClear() {
703
- this.__data__ = [];
704
- this.size = 0;
705
- }
706
- function assocIndexOf(array, key) {
707
- var length = array.length;
708
- while (length--) {
709
- if (eq(array[length][0], key)) {
710
- return length;
711
- }
712
- }
713
- return -1;
714
- }
715
- var arrayProto = Array.prototype;
716
- var splice = arrayProto.splice;
717
- function listCacheDelete(key) {
718
- var data = this.__data__, index2 = assocIndexOf(data, key);
719
- if (index2 < 0) {
720
- return false;
721
- }
722
- var lastIndex = data.length - 1;
723
- if (index2 == lastIndex) {
724
- data.pop();
725
- } else {
726
- splice.call(data, index2, 1);
727
- }
728
- --this.size;
729
- return true;
730
- }
731
- function listCacheGet(key) {
732
- var data = this.__data__, index2 = assocIndexOf(data, key);
733
- return index2 < 0 ? void 0 : data[index2][1];
734
- }
735
- function listCacheHas(key) {
736
- return assocIndexOf(this.__data__, key) > -1;
737
- }
738
- function listCacheSet(key, value) {
739
- var data = this.__data__, index2 = assocIndexOf(data, key);
740
- if (index2 < 0) {
741
- ++this.size;
742
- data.push([key, value]);
743
- } else {
744
- data[index2][1] = value;
745
- }
746
- return this;
747
- }
748
- function ListCache(entries) {
749
- var index2 = -1, length = entries == null ? 0 : entries.length;
750
- this.clear();
751
- while (++index2 < length) {
752
- var entry = entries[index2];
753
- this.set(entry[0], entry[1]);
754
- }
755
- }
756
- ListCache.prototype.clear = listCacheClear;
757
- ListCache.prototype["delete"] = listCacheDelete;
758
- ListCache.prototype.get = listCacheGet;
759
- ListCache.prototype.has = listCacheHas;
760
- ListCache.prototype.set = listCacheSet;
761
- var Map = getNative(root$1, "Map");
762
- var Map$1 = Map;
763
- function mapCacheClear() {
764
- this.size = 0;
765
- this.__data__ = {
766
- "hash": new Hash(),
767
- "map": new (Map$1 || ListCache)(),
768
- "string": new Hash()
769
- };
770
- }
771
- function isKeyable(value) {
772
- var type = typeof value;
773
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
774
- }
775
- function getMapData(map, key) {
776
- var data = map.__data__;
777
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
778
- }
779
- function mapCacheDelete(key) {
780
- var result = getMapData(this, key)["delete"](key);
781
- this.size -= result ? 1 : 0;
782
- return result;
783
- }
784
- function mapCacheGet(key) {
785
- return getMapData(this, key).get(key);
786
- }
787
- function mapCacheHas(key) {
788
- return getMapData(this, key).has(key);
789
- }
790
- function mapCacheSet(key, value) {
791
- var data = getMapData(this, key), size = data.size;
792
- data.set(key, value);
793
- this.size += data.size == size ? 0 : 1;
794
- return this;
795
- }
796
- function MapCache(entries) {
797
- var index2 = -1, length = entries == null ? 0 : entries.length;
798
- this.clear();
799
- while (++index2 < length) {
800
- var entry = entries[index2];
801
- this.set(entry[0], entry[1]);
802
- }
803
- }
804
- MapCache.prototype.clear = mapCacheClear;
805
- MapCache.prototype["delete"] = mapCacheDelete;
806
- MapCache.prototype.get = mapCacheGet;
807
- MapCache.prototype.has = mapCacheHas;
808
- MapCache.prototype.set = mapCacheSet;
809
- var FUNC_ERROR_TEXT$2 = "Expected a function";
810
- function memoize(func, resolver) {
811
- if (typeof func != "function" || resolver != null && typeof resolver != "function") {
812
- throw new TypeError(FUNC_ERROR_TEXT$2);
813
- }
814
- var memoized = function() {
815
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
816
- if (cache.has(key)) {
817
- return cache.get(key);
818
- }
819
- var result = func.apply(this, args);
820
- memoized.cache = cache.set(key, result) || cache;
821
- return result;
822
- };
823
- memoized.cache = new (memoize.Cache || MapCache)();
824
- return memoized;
825
- }
826
- memoize.Cache = MapCache;
827
- var MAX_MEMOIZE_SIZE = 500;
828
- function memoizeCapped(func) {
829
- var result = memoize(func, function(key) {
830
- if (cache.size === MAX_MEMOIZE_SIZE) {
831
- cache.clear();
832
- }
833
- return key;
834
- });
835
- var cache = result.cache;
836
- return result;
837
- }
838
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
839
- var reEscapeChar = /\\(\\)?/g;
840
- var stringToPath = memoizeCapped(function(string) {
841
- var result = [];
842
- if (string.charCodeAt(0) === 46) {
843
- result.push("");
844
- }
845
- string.replace(rePropName, function(match, number, quote, subString) {
846
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
847
- });
848
- return result;
849
- });
850
- var stringToPath$1 = stringToPath;
851
- function toString(value) {
852
- return value == null ? "" : baseToString(value);
853
- }
854
- function castPath(value, object) {
855
- if (isArray$1(value)) {
856
- return value;
857
- }
858
- return isKey(value, object) ? [value] : stringToPath$1(toString(value));
859
- }
860
- var INFINITY = 1 / 0;
861
- function toKey(value) {
862
- if (typeof value == "string" || isSymbol(value)) {
863
- return value;
864
- }
865
- var result = value + "";
866
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
867
- }
868
- function baseGet(object, path) {
869
- path = castPath(path, object);
870
- var index2 = 0, length = path.length;
871
- while (object != null && index2 < length) {
872
- object = object[toKey(path[index2++])];
873
- }
874
- return index2 && index2 == length ? object : void 0;
875
- }
876
- function arrayPush(array, values) {
877
- var index2 = -1, length = values.length, offset = array.length;
878
- while (++index2 < length) {
879
- array[offset + index2] = values[index2];
880
- }
881
- return array;
882
- }
883
- var spreadableSymbol = Symbol$2 ? Symbol$2.isConcatSpreadable : void 0;
884
- function isFlattenable(value) {
885
- return isArray$1(value) || isArguments$1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
886
- }
887
- function baseFlatten(array, depth, predicate, isStrict, result) {
888
- var index2 = -1, length = array.length;
889
- predicate || (predicate = isFlattenable);
890
- result || (result = []);
891
- while (++index2 < length) {
892
- var value = array[index2];
893
- if (depth > 0 && predicate(value)) {
894
- if (depth > 1) {
895
- baseFlatten(value, depth - 1, predicate, isStrict, result);
896
- } else {
897
- arrayPush(result, value);
898
- }
899
- } else if (!isStrict) {
900
- result[result.length] = value;
901
- }
902
- }
903
- return result;
904
- }
905
- function flatten(array) {
906
- var length = array == null ? 0 : array.length;
907
- return length ? baseFlatten(array, 1) : [];
908
- }
909
- function flatRest(func) {
910
- return setToString$1(overRest(func, void 0, flatten), func + "");
911
- }
912
- var getPrototype = overArg(Object.getPrototypeOf, Object);
913
- var getPrototype$1 = getPrototype;
914
- var objectTag$3 = "[object Object]";
915
- var funcProto = Function.prototype, objectProto$4 = Object.prototype;
916
- var funcToString = funcProto.toString;
917
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
918
- var objectCtorString = funcToString.call(Object);
919
- function isPlainObject(value) {
920
- if (!isObjectLike(value) || baseGetTag(value) != objectTag$3) {
921
- return false;
922
- }
923
- var proto = getPrototype$1(value);
924
- if (proto === null) {
925
- return true;
926
- }
927
- var Ctor = hasOwnProperty$3.call(proto, "constructor") && proto.constructor;
928
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
929
- }
930
- function baseSlice(array, start, end) {
931
- var index2 = -1, length = array.length;
932
- if (start < 0) {
933
- start = -start > length ? 0 : length + start;
934
- }
935
- end = end > length ? length : end;
936
- if (end < 0) {
937
- end += length;
938
- }
939
- length = start > end ? 0 : end - start >>> 0;
940
- start >>>= 0;
941
- var result = Array(length);
942
- while (++index2 < length) {
943
- result[index2] = array[index2 + start];
944
- }
945
- return result;
946
- }
947
- function stackClear() {
948
- this.__data__ = new ListCache();
949
- this.size = 0;
950
- }
951
- function stackDelete(key) {
952
- var data = this.__data__, result = data["delete"](key);
953
- this.size = data.size;
954
- return result;
955
- }
956
- function stackGet(key) {
957
- return this.__data__.get(key);
958
- }
959
- function stackHas(key) {
960
- return this.__data__.has(key);
961
- }
962
- var LARGE_ARRAY_SIZE = 200;
963
- function stackSet(key, value) {
964
- var data = this.__data__;
965
- if (data instanceof ListCache) {
966
- var pairs = data.__data__;
967
- if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
968
- pairs.push([key, value]);
969
- this.size = ++data.size;
970
- return this;
971
- }
972
- data = this.__data__ = new MapCache(pairs);
973
- }
974
- data.set(key, value);
975
- this.size = data.size;
976
- return this;
977
- }
978
- function Stack(entries) {
979
- var data = this.__data__ = new ListCache(entries);
980
- this.size = data.size;
981
- }
982
- Stack.prototype.clear = stackClear;
983
- Stack.prototype["delete"] = stackDelete;
984
- Stack.prototype.get = stackGet;
985
- Stack.prototype.has = stackHas;
986
- Stack.prototype.set = stackSet;
987
- function baseAssign(object, source) {
988
- return object && copyObject(source, keys(source), object);
989
- }
990
- function baseAssignIn(object, source) {
991
- return object && copyObject(source, keysIn(source), object);
992
- }
993
- var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
994
- var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
995
- var moduleExports = freeModule && freeModule.exports === freeExports;
996
- var Buffer2 = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
997
- function cloneBuffer(buffer, isDeep) {
998
- if (isDeep) {
999
- return buffer.slice();
1000
- }
1001
- var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1002
- buffer.copy(result);
1003
- return result;
1004
- }
1005
- function arrayFilter(array, predicate) {
1006
- var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
1007
- while (++index2 < length) {
1008
- var value = array[index2];
1009
- if (predicate(value, index2, array)) {
1010
- result[resIndex++] = value;
1011
- }
1012
- }
1013
- return result;
1014
- }
1015
- function stubArray() {
1016
- return [];
1017
- }
1018
- var objectProto$3 = Object.prototype;
1019
- var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
1020
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
1021
- var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
1022
- if (object == null) {
1023
- return [];
1024
- }
1025
- object = Object(object);
1026
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
1027
- return propertyIsEnumerable.call(object, symbol);
1028
- });
1029
- };
1030
- var getSymbols$1 = getSymbols;
1031
- function copySymbols(source, object) {
1032
- return copyObject(source, getSymbols$1(source), object);
1033
- }
1034
- var nativeGetSymbols = Object.getOwnPropertySymbols;
1035
- var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
1036
- var result = [];
1037
- while (object) {
1038
- arrayPush(result, getSymbols$1(object));
1039
- object = getPrototype$1(object);
1040
- }
1041
- return result;
1042
- };
1043
- var getSymbolsIn$1 = getSymbolsIn;
1044
- function copySymbolsIn(source, object) {
1045
- return copyObject(source, getSymbolsIn$1(source), object);
1046
- }
1047
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1048
- var result = keysFunc(object);
1049
- return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
1050
- }
1051
- function getAllKeys(object) {
1052
- return baseGetAllKeys(object, keys, getSymbols$1);
1053
- }
1054
- function getAllKeysIn(object) {
1055
- return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
1056
- }
1057
- var DataView = getNative(root$1, "DataView");
1058
- var DataView$1 = DataView;
1059
- var Promise$1 = getNative(root$1, "Promise");
1060
- var Promise$2 = Promise$1;
1061
- var Set = getNative(root$1, "Set");
1062
- var Set$1 = Set;
1063
- var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
1064
- var dataViewTag$3 = "[object DataView]";
1065
- var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
1066
- var getTag = baseGetTag;
1067
- if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$4 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$4 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) {
1068
- getTag = function(value) {
1069
- var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
1070
- if (ctorString) {
1071
- switch (ctorString) {
1072
- case dataViewCtorString:
1073
- return dataViewTag$3;
1074
- case mapCtorString:
1075
- return mapTag$4;
1076
- case promiseCtorString:
1077
- return promiseTag;
1078
- case setCtorString:
1079
- return setTag$4;
1080
- case weakMapCtorString:
1081
- return weakMapTag$1;
1082
- }
1083
- }
1084
- return result;
1085
- };
1086
- }
1087
- var getTag$1 = getTag;
1088
- var objectProto$2 = Object.prototype;
1089
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1090
- function initCloneArray(array) {
1091
- var length = array.length, result = new array.constructor(length);
1092
- if (length && typeof array[0] == "string" && hasOwnProperty$2.call(array, "index")) {
1093
- result.index = array.index;
1094
- result.input = array.input;
1095
- }
1096
- return result;
1097
- }
1098
- var Uint8Array2 = root$1.Uint8Array;
1099
- var Uint8Array$1 = Uint8Array2;
1100
- function cloneArrayBuffer(arrayBuffer) {
1101
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1102
- new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
1103
- return result;
1104
- }
1105
- function cloneDataView(dataView, isDeep) {
1106
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
1107
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
1108
- }
1109
- var reFlags = /\w*$/;
1110
- function cloneRegExp(regexp) {
1111
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
1112
- result.lastIndex = regexp.lastIndex;
1113
- return result;
1114
- }
1115
- var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
1116
- function cloneSymbol(symbol) {
1117
- return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
1118
- }
1119
- function cloneTypedArray(typedArray, isDeep) {
1120
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
1121
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1122
- }
1123
- var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
1124
- var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
1125
- function initCloneByTag(object, tag, isDeep) {
1126
- var Ctor = object.constructor;
1127
- switch (tag) {
1128
- case arrayBufferTag$2:
1129
- return cloneArrayBuffer(object);
1130
- case boolTag$2:
1131
- case dateTag$2:
1132
- return new Ctor(+object);
1133
- case dataViewTag$2:
1134
- return cloneDataView(object, isDeep);
1135
- case float32Tag$1:
1136
- case float64Tag$1:
1137
- case int8Tag$1:
1138
- case int16Tag$1:
1139
- case int32Tag$1:
1140
- case uint8Tag$1:
1141
- case uint8ClampedTag$1:
1142
- case uint16Tag$1:
1143
- case uint32Tag$1:
1144
- return cloneTypedArray(object, isDeep);
1145
- case mapTag$3:
1146
- return new Ctor();
1147
- case numberTag$2:
1148
- case stringTag$2:
1149
- return new Ctor(object);
1150
- case regexpTag$2:
1151
- return cloneRegExp(object);
1152
- case setTag$3:
1153
- return new Ctor();
1154
- case symbolTag$2:
1155
- return cloneSymbol(object);
1156
- }
1157
- }
1158
- function initCloneObject(object) {
1159
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
1160
- }
1161
- var mapTag$2 = "[object Map]";
1162
- function baseIsMap(value) {
1163
- return isObjectLike(value) && getTag$1(value) == mapTag$2;
1164
- }
1165
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
1166
- var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
1167
- var isMap$1 = isMap;
1168
- var setTag$2 = "[object Set]";
1169
- function baseIsSet(value) {
1170
- return isObjectLike(value) && getTag$1(value) == setTag$2;
1171
- }
1172
- var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
1173
- var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
1174
- var isSet$1 = isSet;
1175
- var CLONE_DEEP_FLAG$2 = 1, CLONE_FLAT_FLAG$1 = 2, CLONE_SYMBOLS_FLAG$2 = 4;
1176
- var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
1177
- var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
1178
- var cloneableTags = {};
1179
- cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1180
- cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
1181
- function baseClone(value, bitmask, customizer, key, object, stack) {
1182
- var result, isDeep = bitmask & CLONE_DEEP_FLAG$2, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$2;
1183
- if (customizer) {
1184
- result = object ? customizer(value, key, object, stack) : customizer(value);
1185
- }
1186
- if (result !== void 0) {
1187
- return result;
1188
- }
1189
- if (!isObject(value)) {
1190
- return value;
1191
- }
1192
- var isArr = isArray$1(value);
1193
- if (isArr) {
1194
- result = initCloneArray(value);
1195
- if (!isDeep) {
1196
- return copyArray(value, result);
1197
- }
1198
- } else {
1199
- var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
1200
- if (isBuffer$1(value)) {
1201
- return cloneBuffer(value, isDeep);
1202
- }
1203
- if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
1204
- result = isFlat || isFunc ? {} : initCloneObject(value);
1205
- if (!isDeep) {
1206
- return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
1207
- }
1208
- } else {
1209
- if (!cloneableTags[tag]) {
1210
- return object ? value : {};
1211
- }
1212
- result = initCloneByTag(value, tag, isDeep);
1213
- }
1214
- }
1215
- stack || (stack = new Stack());
1216
- var stacked = stack.get(value);
1217
- if (stacked) {
1218
- return stacked;
1219
- }
1220
- stack.set(value, result);
1221
- if (isSet$1(value)) {
1222
- value.forEach(function(subValue) {
1223
- result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
1224
- });
1225
- } else if (isMap$1(value)) {
1226
- value.forEach(function(subValue, key2) {
1227
- result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
1228
- });
1229
- }
1230
- var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
1231
- var props = isArr ? void 0 : keysFunc(value);
1232
- arrayEach(props || value, function(subValue, key2) {
1233
- if (props) {
1234
- key2 = subValue;
1235
- subValue = value[key2];
1236
- }
1237
- assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
1238
- });
1239
- return result;
1240
- }
1241
- var CLONE_DEEP_FLAG$1 = 1, CLONE_SYMBOLS_FLAG$1 = 4;
1242
- function cloneDeep(value) {
1243
- return baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
1244
- }
1245
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
1246
- function setCacheAdd(value) {
1247
- this.__data__.set(value, HASH_UNDEFINED);
1248
- return this;
1249
- }
1250
- function setCacheHas(value) {
1251
- return this.__data__.has(value);
1252
- }
1253
- function SetCache(values) {
1254
- var index2 = -1, length = values == null ? 0 : values.length;
1255
- this.__data__ = new MapCache();
1256
- while (++index2 < length) {
1257
- this.add(values[index2]);
1258
- }
1259
- }
1260
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
1261
- SetCache.prototype.has = setCacheHas;
1262
- function arraySome(array, predicate) {
1263
- var index2 = -1, length = array == null ? 0 : array.length;
1264
- while (++index2 < length) {
1265
- if (predicate(array[index2], index2, array)) {
1266
- return true;
1267
- }
1268
- }
1269
- return false;
1270
- }
1271
- function cacheHas(cache, key) {
1272
- return cache.has(key);
1273
- }
1274
- var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
1275
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
1276
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
1277
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1278
- return false;
1279
- }
1280
- var arrStacked = stack.get(array);
1281
- var othStacked = stack.get(other);
1282
- if (arrStacked && othStacked) {
1283
- return arrStacked == other && othStacked == array;
1284
- }
1285
- var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
1286
- stack.set(array, other);
1287
- stack.set(other, array);
1288
- while (++index2 < arrLength) {
1289
- var arrValue = array[index2], othValue = other[index2];
1290
- if (customizer) {
1291
- var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
1292
- }
1293
- if (compared !== void 0) {
1294
- if (compared) {
1295
- continue;
1296
- }
1297
- result = false;
1298
- break;
1299
- }
1300
- if (seen) {
1301
- if (!arraySome(other, function(othValue2, othIndex) {
1302
- if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
1303
- return seen.push(othIndex);
1304
- }
1305
- })) {
1306
- result = false;
1307
- break;
1308
- }
1309
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
1310
- result = false;
1311
- break;
1312
- }
1313
- }
1314
- stack["delete"](array);
1315
- stack["delete"](other);
1316
- return result;
1317
- }
1318
- function mapToArray(map) {
1319
- var index2 = -1, result = Array(map.size);
1320
- map.forEach(function(value, key) {
1321
- result[++index2] = [key, value];
1322
- });
1323
- return result;
1324
- }
1325
- function setToArray(set) {
1326
- var index2 = -1, result = Array(set.size);
1327
- set.forEach(function(value) {
1328
- result[++index2] = value;
1329
- });
1330
- return result;
1331
- }
1332
- var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
1333
- var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
1334
- var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
1335
- var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
1336
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1337
- switch (tag) {
1338
- case dataViewTag:
1339
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
1340
- return false;
1341
- }
1342
- object = object.buffer;
1343
- other = other.buffer;
1344
- case arrayBufferTag:
1345
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
1346
- return false;
1347
- }
1348
- return true;
1349
- case boolTag:
1350
- case dateTag:
1351
- case numberTag:
1352
- return eq(+object, +other);
1353
- case errorTag:
1354
- return object.name == other.name && object.message == other.message;
1355
- case regexpTag:
1356
- case stringTag:
1357
- return object == other + "";
1358
- case mapTag:
1359
- var convert = mapToArray;
1360
- case setTag:
1361
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
1362
- convert || (convert = setToArray);
1363
- if (object.size != other.size && !isPartial) {
1364
- return false;
1365
- }
1366
- var stacked = stack.get(object);
1367
- if (stacked) {
1368
- return stacked == other;
1369
- }
1370
- bitmask |= COMPARE_UNORDERED_FLAG;
1371
- stack.set(object, other);
1372
- var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
1373
- stack["delete"](object);
1374
- return result;
1375
- case symbolTag:
1376
- if (symbolValueOf) {
1377
- return symbolValueOf.call(object) == symbolValueOf.call(other);
1378
- }
1379
- }
1380
- return false;
1381
- }
1382
- var COMPARE_PARTIAL_FLAG$1 = 1;
1383
- var objectProto$1 = Object.prototype;
1384
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1385
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
1386
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
1387
- if (objLength != othLength && !isPartial) {
1388
- return false;
1389
- }
1390
- var index2 = objLength;
1391
- while (index2--) {
1392
- var key = objProps[index2];
1393
- if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
1394
- return false;
1395
- }
1396
- }
1397
- var objStacked = stack.get(object);
1398
- var othStacked = stack.get(other);
1399
- if (objStacked && othStacked) {
1400
- return objStacked == other && othStacked == object;
1401
- }
1402
- var result = true;
1403
- stack.set(object, other);
1404
- stack.set(other, object);
1405
- var skipCtor = isPartial;
1406
- while (++index2 < objLength) {
1407
- key = objProps[index2];
1408
- var objValue = object[key], othValue = other[key];
1409
- if (customizer) {
1410
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
1411
- }
1412
- if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
1413
- result = false;
1414
- break;
1415
- }
1416
- skipCtor || (skipCtor = key == "constructor");
1417
- }
1418
- if (result && !skipCtor) {
1419
- var objCtor = object.constructor, othCtor = other.constructor;
1420
- if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
1421
- result = false;
1422
- }
1423
- }
1424
- stack["delete"](object);
1425
- stack["delete"](other);
1426
- return result;
1427
- }
1428
- var COMPARE_PARTIAL_FLAG = 1;
1429
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
1430
- var objectProto = Object.prototype;
1431
- var hasOwnProperty = objectProto.hasOwnProperty;
1432
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1433
- var objIsArr = isArray$1(object), othIsArr = isArray$1(other), objTag = objIsArr ? arrayTag : getTag$1(object), othTag = othIsArr ? arrayTag : getTag$1(other);
1434
- objTag = objTag == argsTag ? objectTag : objTag;
1435
- othTag = othTag == argsTag ? objectTag : othTag;
1436
- var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
1437
- if (isSameTag && isBuffer$1(object)) {
1438
- if (!isBuffer$1(other)) {
1439
- return false;
1440
- }
1441
- objIsArr = true;
1442
- objIsObj = false;
1443
- }
1444
- if (isSameTag && !objIsObj) {
1445
- stack || (stack = new Stack());
1446
- return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1447
- }
1448
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
1449
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
1450
- if (objIsWrapped || othIsWrapped) {
1451
- var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
1452
- stack || (stack = new Stack());
1453
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1454
- }
1455
- }
1456
- if (!isSameTag) {
1457
- return false;
1458
- }
1459
- stack || (stack = new Stack());
1460
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1461
- }
1462
- function baseIsEqual(value, other, bitmask, customizer, stack) {
1463
- if (value === other) {
1464
- return true;
1465
- }
1466
- if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
1467
- return value !== value && other !== other;
24
+ import { defineComponent, toRefs, createVNode, computed, watch, Transition, reactive, createApp, onUnmounted, mergeProps, isVNode, ref, withDirectives, resolveComponent, resolveDirective } from "vue";
25
+ const notificationProps = {
26
+ modelValue: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ title: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ type: {
35
+ type: String,
36
+ default: "normal"
37
+ },
38
+ duration: {
39
+ type: Number,
40
+ default: 3e3
41
+ },
42
+ onClose: {
43
+ type: Function
1468
44
  }
1469
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
1470
- }
1471
- function createBaseFor(fromRight) {
1472
- return function(object, iteratee, keysFunc) {
1473
- var index2 = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1474
- while (length--) {
1475
- var key = props[fromRight ? length : ++index2];
1476
- if (iteratee(iterable[key], key, iterable) === false) {
1477
- break;
1478
- }
1479
- }
1480
- return object;
1481
- };
1482
- }
1483
- var baseFor = createBaseFor();
1484
- var baseFor$1 = baseFor;
1485
- var now = function() {
1486
- return root$1.Date.now();
1487
45
  };
1488
- var now$1 = now;
1489
- var FUNC_ERROR_TEXT$1 = "Expected a function";
1490
- var nativeMax = Math.max, nativeMin = Math.min;
1491
- function debounce(func, wait, options) {
1492
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
1493
- if (typeof func != "function") {
1494
- throw new TypeError(FUNC_ERROR_TEXT$1);
1495
- }
1496
- wait = toNumber(wait) || 0;
1497
- if (isObject(options)) {
1498
- leading = !!options.leading;
1499
- maxing = "maxWait" in options;
1500
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
1501
- trailing = "trailing" in options ? !!options.trailing : trailing;
1502
- }
1503
- function invokeFunc(time) {
1504
- var args = lastArgs, thisArg = lastThis;
1505
- lastArgs = lastThis = void 0;
1506
- lastInvokeTime = time;
1507
- result = func.apply(thisArg, args);
1508
- return result;
1509
- }
1510
- function leadingEdge(time) {
1511
- lastInvokeTime = time;
1512
- timerId = setTimeout(timerExpired, wait);
1513
- return leading ? invokeFunc(time) : result;
1514
- }
1515
- function remainingWait(time) {
1516
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
1517
- return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
1518
- }
1519
- function shouldInvoke(time) {
1520
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
1521
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
1522
- }
1523
- function timerExpired() {
1524
- var time = now$1();
1525
- if (shouldInvoke(time)) {
1526
- return trailingEdge(time);
1527
- }
1528
- timerId = setTimeout(timerExpired, remainingWait(time));
1529
- }
1530
- function trailingEdge(time) {
1531
- timerId = void 0;
1532
- if (trailing && lastArgs) {
1533
- return invokeFunc(time);
1534
- }
1535
- lastArgs = lastThis = void 0;
1536
- return result;
1537
- }
1538
- function cancel() {
1539
- if (timerId !== void 0) {
1540
- clearTimeout(timerId);
1541
- }
1542
- lastInvokeTime = 0;
1543
- lastArgs = lastCallTime = lastThis = timerId = void 0;
1544
- }
1545
- function flush() {
1546
- return timerId === void 0 ? result : trailingEdge(now$1());
1547
- }
1548
- function debounced() {
1549
- var time = now$1(), isInvoking = shouldInvoke(time);
1550
- lastArgs = arguments;
1551
- lastThis = this;
1552
- lastCallTime = time;
1553
- if (isInvoking) {
1554
- if (timerId === void 0) {
1555
- return leadingEdge(lastCallTime);
1556
- }
1557
- if (maxing) {
1558
- clearTimeout(timerId);
1559
- timerId = setTimeout(timerExpired, wait);
1560
- return invokeFunc(lastCallTime);
1561
- }
1562
- }
1563
- if (timerId === void 0) {
1564
- timerId = setTimeout(timerExpired, wait);
1565
- }
1566
- return result;
1567
- }
1568
- debounced.cancel = cancel;
1569
- debounced.flush = flush;
1570
- return debounced;
1571
- }
1572
- function assignMergeValue(object, key, value) {
1573
- if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
1574
- baseAssignValue(object, key, value);
1575
- }
1576
- }
1577
- function isArrayLikeObject(value) {
1578
- return isObjectLike(value) && isArrayLike(value);
1579
- }
1580
- function safeGet(object, key) {
1581
- if (key === "constructor" && typeof object[key] === "function") {
1582
- return;
46
+ const iconProps = {
47
+ name: {
48
+ type: String,
49
+ default: "",
50
+ required: true
51
+ },
52
+ size: {
53
+ type: String,
54
+ default: "inherit"
55
+ },
56
+ color: {
57
+ type: String,
58
+ default: "inherit"
59
+ },
60
+ classPrefix: {
61
+ type: String,
62
+ default: "icon"
1583
63
  }
1584
- if (key == "__proto__") {
1585
- return;
64
+ };
65
+ var Icon = defineComponent({
66
+ name: "DIcon",
67
+ props: iconProps,
68
+ setup(props) {
69
+ const {
70
+ name,
71
+ size,
72
+ color,
73
+ classPrefix
74
+ } = toRefs(props);
75
+ return () => {
76
+ return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
77
+ "src": name.value,
78
+ "alt": name.value.split("/")[name.value.split("/").length - 1],
79
+ "style": {
80
+ width: size.value,
81
+ verticalAlign: "text-bottom"
82
+ }
83
+ }, null) : createVNode("i", {
84
+ "class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
85
+ "style": {
86
+ fontSize: size.value,
87
+ color: color.value
88
+ }
89
+ }, null);
90
+ };
1586
91
  }
1587
- return object[key];
1588
- }
1589
- function toPlainObject(value) {
1590
- return copyObject(value, keysIn(value));
1591
- }
1592
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
1593
- var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
1594
- if (stacked) {
1595
- assignMergeValue(object, key, stacked);
1596
- return;
92
+ });
93
+ var Close = defineComponent({
94
+ emits: ["click"],
95
+ setup(props, {
96
+ emit
97
+ }) {
98
+ return () => createVNode("div", {
99
+ "class": "devui-notification-icon-close",
100
+ "onClick": (e) => emit("click", e)
101
+ }, [createVNode(Icon, {
102
+ "name": "close",
103
+ "size": "14px"
104
+ }, null)]);
1597
105
  }
1598
- var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
1599
- var isCommon = newValue === void 0;
1600
- if (isCommon) {
1601
- var isArr = isArray$1(srcValue), isBuff = !isArr && isBuffer$1(srcValue), isTyped = !isArr && !isBuff && isTypedArray$1(srcValue);
1602
- newValue = srcValue;
1603
- if (isArr || isBuff || isTyped) {
1604
- if (isArray$1(objValue)) {
1605
- newValue = objValue;
1606
- } else if (isArrayLikeObject(objValue)) {
1607
- newValue = copyArray(objValue);
1608
- } else if (isBuff) {
1609
- isCommon = false;
1610
- newValue = cloneBuffer(srcValue, true);
1611
- } else if (isTyped) {
1612
- isCommon = false;
1613
- newValue = cloneTypedArray(srcValue, true);
1614
- } else {
1615
- newValue = [];
1616
- }
1617
- } else if (isPlainObject(srcValue) || isArguments$1(srcValue)) {
1618
- newValue = objValue;
1619
- if (isArguments$1(objValue)) {
1620
- newValue = toPlainObject(objValue);
1621
- } else if (!isObject(objValue) || isFunction(objValue)) {
1622
- newValue = initCloneObject(srcValue);
1623
- }
1624
- } else {
1625
- isCommon = false;
106
+ });
107
+ var TypeIcon = defineComponent({
108
+ props: {
109
+ type: {
110
+ type: String,
111
+ default: "normal"
1626
112
  }
113
+ },
114
+ setup(props) {
115
+ const {
116
+ type
117
+ } = toRefs(props);
118
+ const classes = computed(() => ({
119
+ "devui-notification-image": true,
120
+ [`devui-notification-image-${type.value}`]: true
121
+ }));
122
+ const severityIconMap = {
123
+ info: "info-o",
124
+ success: "right-o",
125
+ warning: "warning-o",
126
+ error: "error-o"
127
+ };
128
+ return () => createVNode("span", {
129
+ "class": classes.value
130
+ }, [type.value !== "normal" && createVNode(Icon, {
131
+ "name": severityIconMap[type.value],
132
+ "size": "16px"
133
+ }, null)]);
1627
134
  }
1628
- if (isCommon) {
1629
- stack.set(srcValue, newValue);
1630
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
1631
- stack["delete"](srcValue);
1632
- }
1633
- assignMergeValue(object, key, newValue);
1634
- }
1635
- function baseMerge(object, source, srcIndex, customizer, stack) {
1636
- if (object === source) {
1637
- return;
1638
- }
1639
- baseFor$1(source, function(srcValue, key) {
1640
- stack || (stack = new Stack());
1641
- if (isObject(srcValue)) {
1642
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
1643
- } else {
1644
- var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
1645
- if (newValue === void 0) {
1646
- newValue = srcValue;
135
+ });
136
+ function useNotification(props) {
137
+ const classes = computed(() => ({
138
+ "devui-notification-item-container": true,
139
+ [`devui-notification-message-${props.type}`]: true
140
+ }));
141
+ return { classes };
142
+ }
143
+ function useEvent(props, emit) {
144
+ let timer = null;
145
+ let timestamp;
146
+ const close2 = () => {
147
+ var _a;
148
+ clearTimeout(timer);
149
+ timer = null;
150
+ (_a = props.onClose) == null ? void 0 : _a.call(props);
151
+ emit("update:modelValue", false);
152
+ };
153
+ const interrupt = () => {
154
+ if (timer) {
155
+ clearTimeout(timer);
156
+ timer = null;
157
+ }
158
+ };
159
+ const removeReset = () => {
160
+ if (!props.modelValue) {
161
+ const remainTime = props.duration - (Date.now() - timestamp);
162
+ timer = setTimeout(close2, remainTime);
163
+ }
164
+ };
165
+ const handleDestroy = () => {
166
+ emit("destroy");
167
+ };
168
+ watch(() => props.modelValue, (val) => {
169
+ if (val) {
170
+ timestamp = Date.now();
171
+ if (props.duration) {
172
+ timer = setTimeout(close2, props.duration);
1647
173
  }
1648
- assignMergeValue(object, key, newValue);
1649
174
  }
1650
- }, keysIn);
1651
- }
1652
- function last(array) {
1653
- var length = array == null ? 0 : array.length;
1654
- return length ? array[length - 1] : void 0;
1655
- }
1656
- function parent(object, path) {
1657
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
1658
- }
1659
- function isEqual(value, other) {
1660
- return baseIsEqual(value, other);
1661
- }
1662
- var merge = createAssigner(function(object, source, srcIndex) {
1663
- baseMerge(object, source, srcIndex);
1664
- });
1665
- var merge$1 = merge;
1666
- function baseUnset(object, path) {
1667
- path = castPath(path, object);
1668
- object = parent(object, path);
1669
- return object == null || delete object[toKey(last(path))];
1670
- }
1671
- function customOmitClone(value) {
1672
- return isPlainObject(value) ? void 0 : value;
1673
- }
1674
- var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
1675
- var omit = flatRest(function(object, paths) {
1676
- var result = {};
1677
- if (object == null) {
1678
- return result;
1679
- }
1680
- var isDeep = false;
1681
- paths = arrayMap(paths, function(path) {
1682
- path = castPath(path, object);
1683
- isDeep || (isDeep = path.length > 1);
1684
- return path;
1685
- });
1686
- copyObject(object, getAllKeysIn(object), result);
1687
- if (isDeep) {
1688
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
1689
- }
1690
- var length = paths.length;
1691
- while (length--) {
1692
- baseUnset(result, paths[length]);
1693
- }
1694
- return result;
1695
- });
1696
- var omit$1 = omit;
1697
- var FUNC_ERROR_TEXT = "Expected a function";
1698
- function throttle(func, wait, options) {
1699
- var leading = true, trailing = true;
1700
- if (typeof func != "function") {
1701
- throw new TypeError(FUNC_ERROR_TEXT);
1702
- }
1703
- if (isObject(options)) {
1704
- leading = "leading" in options ? !!options.leading : leading;
1705
- trailing = "trailing" in options ? !!options.trailing : trailing;
1706
- }
1707
- return debounce(func, wait, {
1708
- "leading": leading,
1709
- "maxWait": wait,
1710
- "trailing": trailing
1711
175
  });
1712
- }
1713
- function useToastConstant() {
1714
- const ANIMATION_NAME2 = "slide-in";
1715
- const ANIMATION_TIME2 = 300;
1716
- const ID_PREFIX2 = "toast-message";
1717
- return {
1718
- ANIMATION_TIME: ANIMATION_TIME2,
1719
- ANIMATION_NAME: ANIMATION_NAME2,
1720
- ID_PREFIX: ID_PREFIX2
1721
- };
1722
- }
1723
- const { ANIMATION_TIME: ANIMATION_TIME$1 } = useToastConstant();
1724
- function useToastEvent() {
1725
- const ctx = getCurrentInstance();
1726
- function onCloseEvent(msg) {
1727
- ctx.emit("closeEvent", msg);
1728
- }
1729
- function onValueChange(msgs) {
1730
- ctx.emit("valueChange", msgs);
1731
- }
1732
- function onHidden() {
1733
- setTimeout(() => {
1734
- var _a, _b;
1735
- return (_b = (_a = ctx.attrs).onHidden) == null ? void 0 : _b.call(_a);
1736
- }, ANIMATION_TIME$1);
1737
- }
1738
- return { onCloseEvent, onValueChange, onHidden };
1739
- }
1740
- function useToastHelper() {
1741
- function severityDelay(msg) {
1742
- switch (msg.severity) {
1743
- case "warning":
1744
- case "error":
1745
- return 1e4;
1746
- default:
1747
- return 5e3;
1748
- }
1749
- }
1750
- return { severityDelay };
1751
- }
1752
- let toastZIndex = 1060;
1753
- function toastIncrease() {
1754
- toastZIndex++;
1755
- }
1756
- const {
1757
- ANIMATION_NAME,
1758
- ANIMATION_TIME,
1759
- ID_PREFIX
1760
- } = useToastConstant();
1761
- var Toast = defineComponent({
1762
- name: "DToast",
1763
- inheritAttrs: false,
1764
- props: toastProps,
1765
- emits: ["closeEvent", "valueChange"],
1766
- setup(props, ctx) {
176
+ return { interrupt, removeReset, close: close2, handleDestroy };
177
+ }
178
+ var notification = "";
179
+ var Notification = defineComponent({
180
+ name: "DNotification",
181
+ props: notificationProps,
182
+ emits: ["update:modelValue", "destroy"],
183
+ setup(props, {
184
+ emit,
185
+ slots
186
+ }) {
1767
187
  const {
1768
- onCloseEvent,
1769
- onHidden,
1770
- onValueChange
1771
- } = useToastEvent();
188
+ modelValue,
189
+ title,
190
+ type
191
+ } = toRefs(props);
1772
192
  const {
1773
- severityDelay
1774
- } = useToastHelper();
1775
- const removeThrottle = throttle(remove, ANIMATION_TIME);
1776
- const messages = ref([]);
1777
- const msgAnimations = ref([]);
1778
- const containerRef = ref();
1779
- const msgItemRefs = ref([]);
1780
- let timestamp = Date.now();
1781
- let timeout;
1782
- const timeoutArr = [];
1783
- const defaultLife = computed(() => {
1784
- if (props.life !== null)
1785
- return props.life;
1786
- if (messages.value.length > 0)
1787
- return severityDelay(messages.value[0]);
1788
- return 5e3;
1789
- });
1790
- watch(() => props.value, (value) => {
1791
- if (value.length === 0)
1792
- return;
1793
- if (hasMsgAnimation()) {
1794
- initValue();
1795
- }
1796
- nextTick(() => {
1797
- initValue(value);
1798
- handleValueChange();
1799
- });
193
+ classes
194
+ } = useNotification(props);
195
+ const {
196
+ interrupt,
197
+ removeReset,
198
+ close: close2,
199
+ handleDestroy
200
+ } = useEvent(props, emit);
201
+ return () => createVNode(Transition, {
202
+ "name": "notification-fade",
203
+ "onAfterLeave": handleDestroy
1800
204
  }, {
1801
- deep: true,
1802
- immediate: true
1803
- });
1804
- watch(messages, (value) => {
1805
- value.length === 0 && msgAnimations.value.length > 0 && (msgAnimations.value = []);
1806
- });
1807
- watch(msgAnimations, (value, oldValue) => {
1808
- oldValue.length > 0 && value.length === 0 && onHidden();
1809
- });
1810
- onUnmounted(() => {
1811
- if (props.sticky) {
1812
- return;
1813
- }
1814
- if (props.lifeMode === "single") {
1815
- timeoutArr.forEach((t) => t && clearTimeout(t));
1816
- } else {
1817
- clearTimeout(timeout);
205
+ default: () => {
206
+ var _a;
207
+ return [modelValue.value && createVNode("div", {
208
+ "class": "devui-notification"
209
+ }, [createVNode("div", {
210
+ "class": classes.value,
211
+ "onMouseenter": interrupt,
212
+ "onMouseleave": removeReset
213
+ }, [createVNode("div", {
214
+ "class": "devui-notification-item"
215
+ }, [createVNode(Close, {
216
+ "onClick": close2
217
+ }, null), title.value && createVNode(TypeIcon, {
218
+ "type": type.value
219
+ }, null), createVNode("div", {
220
+ "class": "devui-notification-message"
221
+ }, [createVNode("span", {
222
+ "class": "devui-notification-title"
223
+ }, [title.value]), createVNode("span", {
224
+ "class": "devui-notification-content"
225
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])])])])])];
1818
226
  }
1819
227
  });
1820
- function initValue(value = []) {
1821
- const cloneValue = cloneDeep(value);
1822
- messages.value = cloneValue.map((v, i) => merge$1(v, {
1823
- id: `${ID_PREFIX}-${i}`
1824
- }));
1825
- msgAnimations.value = [];
1826
- }
1827
- function handleValueChange() {
1828
- toastIncrease();
1829
- setTimeout(() => {
1830
- messages.value.forEach((msg) => msgAnimations.value.push(msg));
1831
- }, 0);
1832
- if (props.sticky)
1833
- return;
1834
- if (timeout) {
1835
- timeout = clearTimeout(timeout);
1836
- }
1837
- if (timeoutArr.length > 0) {
1838
- timeoutArr.splice(0).forEach((t) => clearTimeout(t));
1839
- }
1840
- timestamp = Date.now();
1841
- if (props.lifeMode === "single") {
1842
- setTimeout(() => {
1843
- messages.value.forEach((msg, i) => {
1844
- timeoutArr[i] = setTimeout(() => singleModeRemove(msg), msg.life || severityDelay(msg));
1845
- });
1846
- });
1847
- } else {
1848
- timeout = setTimeout(() => removeAll(), defaultLife.value);
1849
- }
1850
- }
1851
- function singleModeRemove(msg) {
1852
- removeMsgAnimation(msg);
1853
- setTimeout(() => {
1854
- onCloseEvent(msg);
1855
- if (hasMsgAnimation()) {
1856
- const index2 = messages.value.indexOf(msg);
1857
- if (index2 !== -1) {
1858
- messages.value.splice(index2, 1);
1859
- }
1860
- } else {
1861
- messages.value = [];
1862
- }
1863
- onValueChange(messages.value);
1864
- }, ANIMATION_TIME);
1865
- }
1866
- function interrupt(i) {
1867
- if (!msgAnimations.value.includes(messages.value[i]))
1868
- return;
1869
- if (props.lifeMode === "single") {
1870
- if (timeoutArr[i]) {
1871
- timeoutArr[i] = clearTimeout(timeoutArr[i]);
1872
- }
1873
- } else {
1874
- resetDelay(() => {
1875
- messages.value.forEach((msg, _i) => i !== _i && removeMsgAnimation(msg));
1876
- });
1877
- }
1878
- }
1879
- function resetDelay(fn) {
1880
- if (!props.sticky && timeout) {
1881
- timeout = clearTimeout(timeout);
1882
- const remainTime = defaultLife.value - (Date.now() - timestamp);
1883
- timeout = setTimeout(() => fn(), remainTime);
1884
- }
1885
- }
1886
- function remove(i) {
1887
- if (props.lifeMode === "single" && timeoutArr[i]) {
1888
- timeoutArr[i] = clearTimeout(timeoutArr[i]);
1889
- timeoutArr.splice(i, 1);
1890
- }
1891
- removeMsgAnimation(messages.value[i]);
1892
- setTimeout(() => {
1893
- onCloseEvent(messages.value[i]);
1894
- messages.value.splice(i, 1);
1895
- onValueChange(messages.value);
1896
- if (props.lifeMode === "global") {
1897
- removeReset();
1898
- }
1899
- }, ANIMATION_TIME);
1900
- }
1901
- function removeAll() {
1902
- if (messages.value.length > 0) {
1903
- msgAnimations.value = [];
1904
- setTimeout(() => {
1905
- messages.value.forEach((msg) => onCloseEvent(msg));
1906
- messages.value = [];
1907
- onValueChange(messages.value);
1908
- }, ANIMATION_TIME);
1909
- }
1910
- }
1911
- function removeReset(i, msg) {
1912
- const removed = messages.value.findIndex((_msg) => _msg === msg) === -1;
1913
- if (removed || msg !== void 0 && !msgAnimations.value.includes(msg)) {
1914
- return;
1915
- }
1916
- if (props.lifeMode === "single") {
1917
- const msgLife = msg.life || severityDelay(msg);
1918
- const remainTime = msgLife - (Date.now() - timestamp);
1919
- timeoutArr[i] = setTimeout(() => singleModeRemove(msg), remainTime);
1920
- } else {
1921
- resetDelay(() => removeAll());
1922
- }
1923
- }
1924
- function removeIndexThrottle(i) {
1925
- if (i < msgItemRefs.value.length && i > -1) {
1926
- removeThrottle(i);
1927
- }
1928
- }
1929
- function removeMsgThrottle(msg) {
1930
- const ignoreDiffKeys = ["id"];
1931
- const index2 = messages.value.findIndex((_msg) => isEqual(omit$1(_msg, ignoreDiffKeys), omit$1(msg, ignoreDiffKeys)));
1932
- removeIndexThrottle(index2);
1933
- }
1934
- function removeMsgAnimation(msg) {
1935
- msgAnimations.value = msgAnimations.value.filter((_msg) => _msg !== msg);
228
+ }
229
+ });
230
+ function _isSlot(s) {
231
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
232
+ }
233
+ const defaultOptions = {
234
+ modelValue: false,
235
+ duration: 3e3,
236
+ type: "normal"
237
+ };
238
+ function initInstance(props, content) {
239
+ const container = document.createElement("div");
240
+ const app = createApp({
241
+ setup() {
242
+ onUnmounted(() => {
243
+ document.body.removeChild(container);
244
+ });
245
+ return () => createVNode(Notification, mergeProps(props, {
246
+ "onDestroy": app.unmount
247
+ }), _isSlot(content) ? content : {
248
+ default: () => [content]
249
+ });
1936
250
  }
1937
- function close(params) {
1938
- if (params === void 0) {
1939
- return removeAll();
1940
- }
1941
- if (typeof params === "number") {
1942
- removeIndexThrottle(params);
1943
- } else {
1944
- removeMsgThrottle(params);
251
+ });
252
+ document.body.appendChild(container);
253
+ app.mount(container);
254
+ return app;
255
+ }
256
+ function close(props, originOnClose) {
257
+ props.modelValue = false;
258
+ originOnClose == null ? void 0 : originOnClose();
259
+ }
260
+ class NotificationService {
261
+ static open(options) {
262
+ const originOnClose = options.onClose || null;
263
+ const content = options.content;
264
+ let timer;
265
+ delete options.content;
266
+ const props = reactive(__spreadProps(__spreadValues(__spreadValues({}, defaultOptions), options), {
267
+ onClose: () => {
268
+ close(props, originOnClose);
1945
269
  }
270
+ }));
271
+ initInstance(props, content);
272
+ props.modelValue = true;
273
+ clearTimeout(timer);
274
+ if (options.duration) {
275
+ timer = setTimeout(props.onClose, options.duration);
1946
276
  }
1947
- function msgItemRef(i) {
1948
- return msgItemRefs.value[i];
1949
- }
1950
- function hasMsgAnimation() {
1951
- return msgAnimations.value.length > 0;
1952
- }
1953
- return {
1954
- messages,
1955
- msgAnimations,
1956
- containerRef,
1957
- msgItemRefs,
1958
- interrupt,
1959
- removeReset,
1960
- removeThrottle,
1961
- close,
1962
- msgItemRef
1963
- };
1964
- },
1965
- render() {
1966
- const {
1967
- style: extraStyle,
1968
- styleClass: extraClass,
1969
- messages,
1970
- msgAnimations,
1971
- msgItemRefs,
1972
- life,
1973
- interrupt,
1974
- removeReset,
1975
- removeThrottle,
1976
- $attrs,
1977
- $slots
1978
- } = this;
1979
- const prefixCls = "devui-toast";
1980
- const wrapperStyles = [`z-index: ${toastZIndex}`, extraStyle];
1981
- const wrapperCls = [prefixCls, extraClass];
1982
- const msgCls = (msg) => [`${prefixCls}-item-container`, `${prefixCls}-message-${msg.severity}`, {
1983
- [ANIMATION_NAME]: msgAnimations.includes(msg)
1984
- }];
1985
- const showClose = (msg) => !(!msg.summary && life !== null);
1986
- const showImage = (msg) => msg.severity !== "common";
1987
- const showSummary = (msg) => !!msg.summary;
1988
- const showContent = (msg) => !!msg.content;
1989
- const showDetail = (msg) => !showContent(msg) && !!msg.detail;
1990
- const msgContent = (msg) => {
1991
- var _a;
1992
- if (typeof msg.content === "function") {
1993
- return msg.content(msg);
1994
- }
1995
- if ([null, void 0].includes(msg.content)) {
1996
- return null;
1997
- }
1998
- const slotPrefix = "slot:";
1999
- const isSlot = String(msg.content).startsWith(slotPrefix);
2000
- if (isSlot) {
2001
- return (_a = $slots[msg.content.slice(slotPrefix.length)]) == null ? void 0 : _a.call($slots, msg);
2002
- }
2003
- return msg.content;
2004
- };
2005
- return createVNode("div", mergeProps({
2006
- "ref": "containerRef",
2007
- "style": wrapperStyles,
2008
- "class": wrapperCls
2009
- }, $attrs), [messages.map((msg, i) => createVNode("div", {
2010
- "ref": (el) => msgItemRefs[i] = el,
2011
- "key": msg.id,
2012
- "class": msgCls(msg),
2013
- "aria-live": "polite",
2014
- "onMouseenter": () => interrupt(i),
2015
- "onMouseleave": () => removeReset(i, msg)
2016
- }, [createVNode("div", {
2017
- "class": `${prefixCls}-item`
2018
- }, [showClose(msg) ? createVNode(ToastIconClose, {
2019
- "prefixCls": prefixCls,
2020
- "onClick": () => removeThrottle(i)
2021
- }, null) : null, showImage(msg) ? createVNode(ToastImage, {
2022
- "prefixCls": prefixCls,
2023
- "severity": msg.severity
2024
- }, null) : null, createVNode("div", {
2025
- "class": "devui-toast-message"
2026
- }, [showSummary(msg) ? createVNode("span", {
2027
- "class": "devui-toast-title"
2028
- }, [msg.summary]) : null, showContent(msg) ? msgContent(msg) : null, showDetail(msg) ? createVNode("p", {
2029
- "innerHTML": msg.detail
2030
- }, null) : null])])]))]);
2031
277
  }
2032
- });
2033
- function createToastApp(props) {
2034
- return createApp(Toast, props);
2035
278
  }
2036
- class ToastService {
2037
- static open(props) {
2038
- let $body = document.body;
2039
- let $div = document.createElement("div");
2040
- $body.appendChild($div);
2041
- let app = createToastApp(__spreadProps(__spreadValues({}, props != null ? props : {}), { onHidden: () => app == null ? void 0 : app.unmount() }));
2042
- let toastInstance = app.mount($div);
2043
- onUnmounted(() => {
2044
- $body.removeChild($div);
2045
- $body = null;
2046
- $div = null;
2047
- app = null;
2048
- toastInstance = null;
2049
- }, toastInstance.$);
2050
- return {
2051
- toastInstance
2052
- };
279
+ class IUploadOptions {
280
+ constructor() {
281
+ __publicField(this, "uri");
282
+ __publicField(this, "method");
283
+ __publicField(this, "maximumSize");
284
+ __publicField(this, "headers");
285
+ __publicField(this, "authToken");
286
+ __publicField(this, "authTokenHeader");
287
+ __publicField(this, "additionalParameter");
288
+ __publicField(this, "fileFieldName");
289
+ __publicField(this, "checkSameName");
290
+ __publicField(this, "withCredentials");
291
+ __publicField(this, "responseType");
2053
292
  }
2054
293
  }
2055
- Toast.install = function(app) {
2056
- app.component(Toast.name, Toast);
2057
- };
2058
- var UploadStatus;
2059
- (function(UploadStatus2) {
294
+ class IFileOptions {
295
+ constructor() {
296
+ __publicField(this, "accept");
297
+ __publicField(this, "multiple");
298
+ __publicField(this, "webkitdirectory");
299
+ }
300
+ }
301
+ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
2060
302
  UploadStatus2[UploadStatus2["preLoad"] = 0] = "preLoad";
2061
303
  UploadStatus2[UploadStatus2["uploading"] = 1] = "uploading";
2062
304
  UploadStatus2[UploadStatus2["uploaded"] = 2] = "uploaded";
2063
305
  UploadStatus2[UploadStatus2["failed"] = 3] = "failed";
2064
- })(UploadStatus || (UploadStatus = {}));
306
+ return UploadStatus2;
307
+ })(UploadStatus || {});
2065
308
  const uploadProps = {
2066
309
  accept: {
2067
310
  type: String
@@ -2071,8 +314,7 @@ const uploadProps = {
2071
314
  default: false
2072
315
  },
2073
316
  uploadOptions: {
2074
- type: Object,
2075
- required: true
317
+ type: Object
2076
318
  },
2077
319
  multiple: {
2078
320
  type: Boolean,
@@ -2080,25 +322,17 @@ const uploadProps = {
2080
322
  },
2081
323
  autoUpload: {
2082
324
  type: Boolean,
2083
- default: false
325
+ default: true
2084
326
  },
2085
- placeholderText: {
327
+ placeholder: {
2086
328
  type: String,
2087
329
  default: "\u9009\u62E9\u6587\u4EF6"
2088
330
  },
2089
- uploadText: {
2090
- type: String,
2091
- default: "\u4E0A\u4F20"
2092
- },
2093
- uploadedFiles: {
331
+ modelValue: {
2094
332
  type: Array,
2095
333
  default: () => []
2096
334
  },
2097
- withoutBtn: {
2098
- type: Boolean,
2099
- default: false
2100
- },
2101
- enableDrop: {
335
+ droppable: {
2102
336
  type: Boolean,
2103
337
  default: false
2104
338
  },
@@ -2144,9 +378,6 @@ const uploadProps = {
2144
378
  default: false
2145
379
  }
2146
380
  };
2147
- const getFailedFilesCount = (failedCount) => `${failedCount}\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01`;
2148
- const getUploadingFilesCount = (uploadingCount, filesCount) => `${uploadingCount}/${filesCount}\u6B63\u5728\u4E0A\u4F20`;
2149
- const getSelectedFilesCount = (filesCount) => `\u5DF2\u6DFB\u52A0${filesCount}\u4E2A\u6587\u4EF6`;
2150
381
  const getAllFilesBeyondMaximalFileSizeMsg = (maximalSize) => `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
2151
382
  const getBeyondMaximalFileSizeMsg = (filename, maximalSize) => {
2152
383
  return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
@@ -2263,17 +494,7 @@ class FileUploader {
2263
494
  }
2264
495
  send(uploadFiles) {
2265
496
  return new Promise((resolve, reject) => {
2266
- const {
2267
- uri,
2268
- method,
2269
- headers,
2270
- authToken,
2271
- authTokenHeader,
2272
- additionalParameter,
2273
- fileFieldName,
2274
- withCredentials,
2275
- responseType
2276
- } = this.uploadOptions;
497
+ const { uri, method, headers, authToken, authTokenHeader, additionalParameter, fileFieldName, withCredentials, responseType } = this.uploadOptions;
2277
498
  const authTokenHeader_ = authTokenHeader || "Authorization";
2278
499
  const fileFieldName_ = fileFieldName || "file";
2279
500
  this.xhr = new XMLHttpRequest();
@@ -2451,25 +672,20 @@ const useUpload = () => {
2451
672
  };
2452
673
  };
2453
674
  var upload = "";
2454
- function _isSlot(s) {
2455
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
2456
- }
2457
675
  var Upload = defineComponent({
2458
676
  name: "DUpload",
2459
677
  props: uploadProps,
2460
- emits: ["fileDrop", "fileOver", "fileSelect", "deleteUploadedFile", "update:uploadedFiles"],
678
+ emits: ["fileDrop", "fileOver", "fileSelect", "deleteUploadedFile", "update:modelValue"],
2461
679
  setup(props, ctx) {
2462
680
  const {
2463
681
  uploadOptions,
2464
- placeholderText,
682
+ placeholder,
2465
683
  autoUpload,
2466
- withoutBtn,
2467
- uploadText,
2468
684
  disabled,
2469
685
  beforeUpload,
2470
- enableDrop,
686
+ droppable,
2471
687
  oneTimeUpload,
2472
- uploadedFiles,
688
+ modelValue,
2473
689
  multiple,
2474
690
  accept,
2475
691
  webkitdirectory
@@ -2492,13 +708,11 @@ var Upload = defineComponent({
2492
708
  getSameNameFiles
2493
709
  } = useUpload();
2494
710
  const isDropOVer = ref(false);
2495
- const uploadTips = ref("");
711
+ ref("");
2496
712
  const alertMsg = (errorMsg) => {
2497
- ToastService.open({
2498
- value: [{
2499
- severity: "warn",
2500
- content: errorMsg
2501
- }]
713
+ NotificationService.open({
714
+ type: "warning",
715
+ content: errorMsg
2502
716
  });
2503
717
  };
2504
718
  const checkValid = () => {
@@ -2531,7 +745,7 @@ var Upload = defineComponent({
2531
745
  });
2532
746
  checkValid();
2533
747
  const sameNameFiles = getSameNameFiles();
2534
- if (uploadOptions.value.checkSameName && sameNameFiles.length) {
748
+ if (uploadOptions.value && uploadOptions.value.checkSameName && sameNameFiles.length) {
2535
749
  alertMsg(getExistSameNameFilesMsg(sameNameFiles));
2536
750
  }
2537
751
  const selectedFiles = fileUploaders.value.filter((fileUploader) => fileUploader.status === UploadStatus.preLoad).map((fileUploader) => fileUploader.file);
@@ -2563,11 +777,11 @@ var Upload = defineComponent({
2563
777
  ctx.emit("fileOver", event);
2564
778
  };
2565
779
  const deleteUploadedFile = (file) => {
2566
- const newUploadedFiles = uploadedFiles.value.filter((uploadedFile) => {
780
+ const newUploadedFiles = modelValue.value.filter((uploadedFile) => {
2567
781
  return uploadedFile.name !== file.name;
2568
782
  });
2569
783
  ctx.emit("deleteUploadedFile", file);
2570
- ctx.emit("update:uploadedFiles", newUploadedFiles);
784
+ ctx.emit("update:modelValue", newUploadedFiles);
2571
785
  };
2572
786
  const onDeleteFile = (event, file, status) => {
2573
787
  event.stopPropagation();
@@ -2603,156 +817,67 @@ var Upload = defineComponent({
2603
817
  uploadObservable.then((results) => {
2604
818
  props["on-success"] && props["on-success"](results);
2605
819
  const newFiles = results.map((result) => result.file);
2606
- const newUploadedFiles = [...newFiles, ...uploadedFiles.value];
2607
- ctx.emit("update:uploadedFiles", newUploadedFiles);
820
+ const newUploadedFiles = [...newFiles, ...modelValue.value];
821
+ ctx.emit("update:modelValue", newUploadedFiles);
2608
822
  }).catch((error) => {
2609
823
  props["on-error"] && props["on-error"](error);
2610
824
  });
2611
825
  });
2612
826
  };
2613
- const getStatus = () => {
2614
- let uploadingCount = 0;
2615
- let uploadedCount = 0;
2616
- let failedCount = 0;
2617
- const filesCount = fileUploaders.value.length;
2618
- fileUploaders.value.forEach((fileUploader) => {
2619
- if (fileUploader.status === UploadStatus.uploading) {
2620
- uploadingCount++;
2621
- } else if (fileUploader.status === UploadStatus.uploaded) {
2622
- uploadedCount++;
2623
- } else if (fileUploader.status === UploadStatus.failed) {
2624
- failedCount++;
2625
- }
2626
- });
2627
- if (failedCount > 0) {
2628
- uploadTips.value = getFailedFilesCount(failedCount);
2629
- return "failed";
2630
- }
2631
- if (uploadingCount > 0) {
2632
- uploadTips.value = getUploadingFilesCount(uploadingCount, filesCount);
2633
- return "uploading";
2634
- }
2635
- if (uploadedCount === filesCount && uploadedCount !== 0) {
2636
- return "uploaded";
2637
- }
2638
- if (filesCount !== 0) {
2639
- uploadTips.value = getSelectedFilesCount(filesCount);
2640
- return "selected";
2641
- }
2642
- };
2643
- const cancelUpload = () => {
2644
- fileUploaders.value = fileUploaders.value.map((fileUploader) => {
2645
- if (fileUploader.status === UploadStatus.uploading) {
2646
- fileUploader.cancel();
2647
- fileUploader.status = UploadStatus.failed;
2648
- }
2649
- return fileUploader;
2650
- });
2651
- };
2652
- return {
2653
- uploadOptions,
2654
- placeholderText,
2655
- autoUpload,
2656
- withoutBtn,
2657
- uploadText,
2658
- disabled,
2659
- beforeUpload,
2660
- enableDrop,
2661
- isDropOVer,
2662
- onFileDrop,
2663
- onFileOver,
2664
- handleClick,
2665
- fileUploaders,
2666
- onDeleteFile,
2667
- fileUpload,
2668
- getStatus,
2669
- uploadTips,
2670
- cancelUpload,
2671
- deleteUploadedFile,
2672
- multiple
827
+ return () => {
828
+ var _a, _b, _c, _d;
829
+ return createVNode("div", null, [withDirectives(createVNode("div", {
830
+ "class": "devui-upload",
831
+ "style": `border: ${isDropOVer.value ? "1px solid #15bf15" : "0"}`
832
+ }, [((_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)) ? createVNode("div", {
833
+ "onClick": handleClick
834
+ }, [ctx.slots.default()]) : createVNode("div", {
835
+ "class": `devui-input-group ${disabled.value ? "disabled" : ""}`,
836
+ "onClick": handleClick
837
+ }, [fileUploaders.value.length === 0 && createVNode("div", {
838
+ "class": "devui-form-control devui-upload-placeholder"
839
+ }, [placeholder.value]), fileUploaders.value.length > 0 && createVNode("ul", {
840
+ "class": "devui-form-control devui-files-list"
841
+ }, [fileUploaders.value.map((fileUploader, index2) => createVNode("li", {
842
+ "key": index2,
843
+ "class": "devui-file-item devui-file-tag",
844
+ "style": "display: inline-block; margin: 0 2px 2px 0",
845
+ "title": fileUploader.file.name
846
+ }, [createVNode("span", {
847
+ "class": `devui-filename ${fileUploader.status === UploadStatus.failed ? "devui-failed-color" : ""}`
848
+ }, [fileUploader.file.name]), createVNode(resolveComponent("d-icon"), {
849
+ "name": "close",
850
+ "class": `${(fileUploader == null ? void 0 : fileUploader.status) === UploadStatus.failed ? "devui-upload-delete-file-button" : ""} ${(fileUploader == null ? void 0 : fileUploader.status) === UploadStatus.uploading || (fileUploader == null ? void 0 : fileUploader.status) === UploadStatus.uploaded ? "devui-uploading-delete" : ""}`,
851
+ "onClick": (event) => onDeleteFile(event, fileUploader.file, fileUploader.status)
852
+ }, null), fileUploader.status === UploadStatus.uploading && createVNode("div", {
853
+ "class": "icon devui-upload-progress"
854
+ }, [createVNode(resolveComponent("d-progress"), {
855
+ "isCircle": true,
856
+ "percentage": fileUploader.percentage,
857
+ "barbgcolor": "#50D4AB",
858
+ "strokeWidth": 8,
859
+ "showContent": false
860
+ }, null)]), fileUploader.status === UploadStatus.failed && createVNode(resolveComponent("d-icon"), {
861
+ "name": "running",
862
+ "onClick": fileUpload
863
+ }, null), fileUploader.status === UploadStatus.uploaded && createVNode(resolveComponent("d-icon"), {
864
+ "name": "right",
865
+ "color": "#50d4ab"
866
+ }, null)]))]), createVNode("span", {
867
+ "class": "devui-input-group-addon"
868
+ }, [createVNode(resolveComponent("d-icon"), {
869
+ "name": "more-operate",
870
+ "color": "#252b3a"
871
+ }, null)])])]), [[resolveDirective("file-drop"), {
872
+ droppable,
873
+ isSingle: !multiple,
874
+ onFileDrop,
875
+ onFileOver
876
+ }]]), createVNode("div", null, [(_d = (_c = ctx.slots)["uploaded-files"]) == null ? void 0 : _d.call(_c, {
877
+ uploadedFiles: modelValue.value,
878
+ deleteFile: deleteUploadedFile
879
+ })])]);
2673
880
  };
2674
- },
2675
- render() {
2676
- var _a, _b, _c, _d, _e, _f;
2677
- const {
2678
- placeholderText,
2679
- autoUpload,
2680
- withoutBtn,
2681
- uploadText,
2682
- disabled,
2683
- enableDrop,
2684
- isDropOVer,
2685
- onFileDrop,
2686
- onFileOver,
2687
- handleClick,
2688
- fileUploaders,
2689
- onDeleteFile,
2690
- fileUpload,
2691
- uploadedFiles,
2692
- deleteUploadedFile,
2693
- multiple
2694
- } = this;
2695
- return createVNode("div", null, [withDirectives(createVNode("div", {
2696
- "class": "devui-upload",
2697
- "style": `border: ${isDropOVer ? "1px solid #15bf15" : "0"}`
2698
- }, [((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) ? createVNode("div", {
2699
- "onClick": handleClick
2700
- }, [this.$slots.default()]) : createVNode("div", {
2701
- "class": `devui-input-group ${disabled ? "disabled" : ""}`,
2702
- "onClick": handleClick
2703
- }, [fileUploaders.length === 0 && createVNode("div", {
2704
- "class": "devui-form-control devui-upload-placeholder"
2705
- }, [placeholderText]), fileUploaders.length > 0 && createVNode("ul", {
2706
- "class": "devui-form-control devui-files-list"
2707
- }, [fileUploaders.map((fileUploader, index2) => createVNode("li", {
2708
- "key": index2,
2709
- "class": "devui-file-item devui-file-tag",
2710
- "style": "display: inline-block; margin: 0 2px 2px 0",
2711
- "title": fileUploader.file.name
2712
- }, [createVNode("span", {
2713
- "class": `evui-filename ${fileUploader.status === UploadStatus.failed ? "devui-failed-color" : ""}`
2714
- }, [fileUploader.file.name]), createVNode(resolveComponent("d-icon"), {
2715
- "name": "close",
2716
- "class": `${(fileUploader == null ? void 0 : fileUploader.status) === UploadStatus.failed ? "devui-upload-delete-file-button" : ""} ${(fileUploader == null ? void 0 : fileUploader.status) === UploadStatus.uploading || (fileUploader == null ? void 0 : fileUploader.status) === UploadStatus.uploaded ? "devui-uploading-delete" : ""}`,
2717
- "onClick": (event) => onDeleteFile(event, fileUploader.file, fileUploader.status)
2718
- }, null), fileUploader.status === UploadStatus.uploading && createVNode("div", {
2719
- "class": "icon devui-upload-progress"
2720
- }, [createVNode(resolveComponent("d-progress"), {
2721
- "isCircle": true,
2722
- "percentage": fileUploader.percentage,
2723
- "barbgcolor": "#50D4AB",
2724
- "strokeWidth": 8,
2725
- "showContent": false
2726
- }, null)]), fileUploader.status === UploadStatus.failed && createVNode(resolveComponent("d-icon"), {
2727
- "name": "running",
2728
- "onClick": fileUpload
2729
- }, null), fileUploader.status === UploadStatus.uploaded && createVNode(resolveComponent("d-icon"), {
2730
- "name": "right",
2731
- "color": "#50d4ab"
2732
- }, null)]))]), createVNode("span", {
2733
- "class": "devui-input-group-addon"
2734
- }, [createVNode(resolveComponent("d-icon"), {
2735
- "name": "more-operate",
2736
- "color": "#252b3a"
2737
- }, null)])]), !autoUpload && !withoutBtn && createVNode(resolveComponent("d-button"), {
2738
- "style": "marginLeft: 8px",
2739
- "variant": "common",
2740
- "disabled": disabled,
2741
- "onClick": fileUpload
2742
- }, _isSlot(uploadText) ? uploadText : {
2743
- default: () => [uploadText]
2744
- })]), [[resolveDirective("file-drop"), {
2745
- enableDrop,
2746
- isSingle: !multiple,
2747
- onFileDrop,
2748
- onFileOver
2749
- }]]), createVNode("div", null, [(_d = (_c = this.$slots).preloadFiles) == null ? void 0 : _d.call(_c, {
2750
- fileUploaders,
2751
- deleteFile: onDeleteFile
2752
- })]), createVNode("div", null, [(_f = (_e = this.$slots).uploadedFiles) == null ? void 0 : _f.call(_e, {
2753
- uploadedFiles,
2754
- deleteFile: deleteUploadedFile
2755
- })])]);
2756
881
  }
2757
882
  });
2758
883
  const getTransfer = (event) => {
@@ -2813,8 +938,8 @@ const onDrop = (el, binding) => {
2813
938
  };
2814
939
  const fileDropDirective = {
2815
940
  mounted: (el, binding) => {
2816
- const { enableDrop } = binding.value;
2817
- if (!enableDrop) {
941
+ const { droppable } = binding.value;
942
+ if (!droppable) {
2818
943
  return;
2819
944
  }
2820
945
  onDragOver(el, binding);
@@ -2822,16 +947,13 @@ const fileDropDirective = {
2822
947
  onDrop(el, binding);
2823
948
  }
2824
949
  };
2825
- Upload.install = function(app) {
2826
- app.directive("file-drop", fileDropDirective);
2827
- app.component(Upload.name, Upload);
2828
- };
2829
950
  var index = {
2830
951
  title: "Upload \u4E0A\u4F20",
2831
952
  category: "\u6570\u636E\u5F55\u5165",
2832
953
  status: "100%",
2833
954
  install(app) {
2834
- app.use(Upload);
955
+ app.directive("file-drop", fileDropDirective);
956
+ app.component(Upload.name, Upload);
2835
957
  }
2836
958
  };
2837
- export { Upload, index as default };
959
+ export { IFileOptions, IUploadOptions, Upload, UploadStatus, index as default, uploadProps };