@das-fed/ui 1.1.4 → 6.3.0-beta.1

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 (152) hide show
  1. package/global/icons/index.local.js +1 -1
  2. package/global/style/index.css +1 -1
  3. package/global/style/scrollbar.css +22 -22
  4. package/global/theme/index.js +12 -12
  5. package/global/theme/module/color.js +31 -31
  6. package/global/theme/module/fontSize.js +5 -5
  7. package/global/theme/module/scrollbar.js +6 -6
  8. package/package.json +15 -9
  9. package/packages/business-components/app-container/index.js +154 -147
  10. package/packages/business-components/change-enterprises/index.css +1 -0
  11. package/packages/business-components/change-enterprises/index.js +241 -0
  12. package/packages/business-components/change-pwd/index.css +1 -0
  13. package/packages/business-components/change-pwd/index.js +330 -0
  14. package/packages/business-components/currency-page/index.css +1 -0
  15. package/packages/business-components/currency-page/index.js +99 -0
  16. package/packages/business-components/device-panel/index.css +1 -0
  17. package/packages/business-components/device-panel/index.js +115939 -0
  18. package/packages/business-components/echarts/index.js +93 -122
  19. package/packages/business-components/export-button/index.js +73 -66
  20. package/packages/business-components/import-button/index.js +213 -170
  21. package/packages/business-components/index.js +8 -1
  22. package/packages/business-components/layout-breadcrumb/index.js +82 -66
  23. package/packages/business-components/model-table-dialog/index.js +299 -289
  24. package/packages/business-components/process-configuration/index.css +1 -0
  25. package/packages/business-components/process-configuration/index.js +612 -0
  26. package/packages/business-components/process-form/index.css +1 -0
  27. package/packages/business-components/process-form/index.js +524 -0
  28. package/packages/business-components/process-search-form/index.js +73 -315
  29. package/packages/business-components/process-table/index.css +1 -1
  30. package/packages/business-components/process-table/index.js +186 -152
  31. package/packages/business-components/urgent-panel/index.css +1 -0
  32. package/packages/business-components/urgent-panel/index.js +3914 -0
  33. package/packages/business-components/user-org-dialog/index.js +466 -375
  34. package/packages/business-components/video-dialog/index.css +1 -0
  35. package/packages/business-components/video-dialog/index.js +1041 -0
  36. package/packages/business.js +1 -2
  37. package/packages/components/alert/index.js +449 -633
  38. package/packages/components/audio-video/index.css +1 -1
  39. package/packages/components/audio-video/index.js +312 -126
  40. package/packages/components/autocomplete/index.css +1 -1
  41. package/packages/components/autocomplete/index.js +312 -2923
  42. package/packages/components/breadcrumb/index.js +97 -82
  43. package/packages/components/button/index.css +1 -1
  44. package/packages/components/button/index.js +646 -787
  45. package/packages/components/calendar/index.css +1 -1
  46. package/packages/components/calendar/index.js +655 -3879
  47. package/packages/components/cascader/index.js +209 -203
  48. package/packages/components/checkbox/index.css +1 -1
  49. package/packages/components/checkbox/index.js +710 -872
  50. package/packages/components/collapse-panel/index.css +1 -1
  51. package/packages/components/collapse-panel/index.js +419 -601
  52. package/packages/components/collapse-transition/index.js +23 -21
  53. package/packages/components/collaspe/index.css +1 -1
  54. package/packages/components/collaspe/index.js +413 -595
  55. package/packages/components/color-picker/index.css +1 -1
  56. package/packages/components/color-picker/index.js +176 -133
  57. package/packages/components/custom-search-item/index.js +43 -37
  58. package/packages/components/date-picker/index.js +1338 -1459
  59. package/packages/components/dialog/index.js +429 -215
  60. package/packages/components/dimple-layout/index.css +1 -1
  61. package/packages/components/dimple-layout/index.js +1298 -1794
  62. package/packages/components/drawer/index.js +105 -77
  63. package/packages/components/dropdown/index.js +129 -109
  64. package/packages/components/edit-table/index.css +1 -1
  65. package/packages/components/edit-table/index.js +868 -752
  66. package/packages/components/empty/index.js +83 -78
  67. package/packages/components/form/index.js +22 -15
  68. package/packages/components/form-item/index.css +1 -1
  69. package/packages/components/form-item/index.js +601 -440
  70. package/packages/components/icon/index.css +1 -1
  71. package/packages/components/icon/index.js +38 -22
  72. package/packages/components/image-preview/index.css +1 -0
  73. package/packages/components/image-preview/index.js +2714 -0
  74. package/packages/components/image-upload/index.js +601 -765
  75. package/packages/components/image-viewer/index.css +1 -1
  76. package/packages/components/image-viewer/index.js +909 -990
  77. package/packages/components/index.js +2 -2
  78. package/packages/components/input/index.css +1 -1
  79. package/packages/components/input/index.js +284 -256
  80. package/packages/components/input-dialog-select/index.css +1 -1
  81. package/packages/components/input-dialog-select/index.js +179 -156
  82. package/packages/components/input-number/index.css +1 -1
  83. package/packages/components/input-number/index.js +157 -170
  84. package/packages/components/live-player/index.css +1 -0
  85. package/packages/components/live-player/index.js +170 -0
  86. package/packages/components/loading/index.js +17 -26
  87. package/packages/components/map/index.css +1 -1
  88. package/packages/components/map/index.js +18913 -461
  89. package/packages/components/menu-aside/index.css +1 -1
  90. package/packages/components/menu-aside/index.js +648 -713
  91. package/packages/components/menu-header/index.js +446 -629
  92. package/packages/components/message/index.js +25 -16
  93. package/packages/components/notification/index.js +386 -575
  94. package/packages/components/overlay/index.js +112 -103
  95. package/packages/components/pagination/index.js +260 -330
  96. package/packages/components/popover/index.js +104 -93
  97. package/packages/components/popup-mask/index.css +1 -1
  98. package/packages/components/popup-mask/index.js +77 -72
  99. package/packages/components/preview/index.js +33 -28
  100. package/packages/components/progress/index.js +214 -221
  101. package/packages/components/radio/index.css +1 -1
  102. package/packages/components/radio/index.js +699 -862
  103. package/packages/components/radio-tabs/index.js +144 -107
  104. package/packages/components/rich-editor/index.css +1 -1
  105. package/packages/components/rich-editor/index.js +105 -106
  106. package/packages/components/scrollbar/index.css +3 -2
  107. package/packages/components/scrollbar/index.js +2262 -1201
  108. package/packages/components/search/index.js +500 -664
  109. package/packages/components/search-form/index.css +1 -1
  110. package/packages/components/search-form/index.js +724 -626
  111. package/packages/components/select/index.css +1 -1
  112. package/packages/components/select/index.js +1052 -950
  113. package/packages/components/select-input/index.js +63 -53
  114. package/packages/components/select-list/index.css +1 -1
  115. package/packages/components/select-list/index.js +258 -235
  116. package/packages/components/special-range-picker-month/index.css +1 -1
  117. package/packages/components/special-range-picker-month/index.js +3068 -72555
  118. package/packages/components/special-range-picker-year/index.css +1 -1
  119. package/packages/components/special-range-picker-year/index.js +345 -339
  120. package/packages/components/spin/index.js +415 -594
  121. package/packages/components/split-panel/index.css +1 -1
  122. package/packages/components/split-panel/index.js +146 -127
  123. package/packages/components/step/index.js +414 -597
  124. package/packages/components/steps/index.js +407 -590
  125. package/packages/components/switch/index.js +23 -23
  126. package/packages/components/table/index.css +1 -1
  127. package/packages/components/table/index.js +80813 -27734
  128. package/packages/components/tabs/index.css +1 -1
  129. package/packages/components/tabs/index.js +620 -813
  130. package/packages/components/tag/index.js +63 -63
  131. package/packages/components/text-tooltip/index.css +9 -0
  132. package/packages/components/text-tooltip/index.js +2739 -33
  133. package/packages/components/time-line/index.js +464 -643
  134. package/packages/components/tooltip/index.css +1 -1
  135. package/packages/components/tooltip/index.js +108 -79
  136. package/packages/components/tree/index.css +1 -1
  137. package/packages/components/tree/index.js +840 -809
  138. package/packages/components/tree-select/index.js +271 -303
  139. package/packages/components/tree-table/index.js +461 -352
  140. package/packages/components/upload/index.js +682 -858
  141. package/packages/components/virtual-tree/index.css +1 -1
  142. package/packages/components/virtual-tree/index.js +144 -126
  143. package/packages/index.d.ts +1 -0
  144. package/packages/index.js +2 -2
  145. package/style/business.css +11 -4
  146. package/style/index.css +52 -42
  147. package/packages/business-components/low-code/index.css +0 -1
  148. package/packages/business-components/low-code/index.js +0 -60
  149. package/packages/components/audio-video-player/index.css +0 -1
  150. package/packages/components/audio-video-player/index.js +0 -83
  151. package/packages/components/table-column/index.css +0 -1
  152. package/packages/components/table-column/index.js +0 -82021
@@ -0,0 +1,2714 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, warn, inject, ref, computed, unref as unref$1, isRef, getCurrentInstance, mergeProps, renderSlot, markRaw, effectScope, shallowRef, watch as watch$1, nextTick, onMounted, createBlock, Teleport, createVNode, Transition, withCtx, normalizeClass, normalizeStyle, withModifiers, createCommentVNode, Fragment, resolveDynamicComponent, renderList, withDirectives, vShow, createApp } from 'vue';
2
+ import { unref, getCurrentScope, onScopeDispose, watch } from 'vue-demi';
3
+
4
+ var _a;
5
+ const isClient = typeof window !== "undefined";
6
+ const isString$1 = (val) => typeof val === "string";
7
+ const noop = () => {
8
+ };
9
+ isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
10
+
11
+ function resolveUnref(r) {
12
+ return typeof r === "function" ? r() : unref(r);
13
+ }
14
+ function identity(arg) {
15
+ return arg;
16
+ }
17
+
18
+ function tryOnScopeDispose(fn) {
19
+ if (getCurrentScope()) {
20
+ onScopeDispose(fn);
21
+ return true;
22
+ }
23
+ return false;
24
+ }
25
+
26
+ function unrefElement(elRef) {
27
+ var _a;
28
+ const plain = resolveUnref(elRef);
29
+ return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
30
+ }
31
+
32
+ const defaultWindow = isClient ? window : void 0;
33
+
34
+ function useEventListener(...args) {
35
+ let target;
36
+ let events;
37
+ let listeners;
38
+ let options;
39
+ if (isString$1(args[0]) || Array.isArray(args[0])) {
40
+ [events, listeners, options] = args;
41
+ target = defaultWindow;
42
+ } else {
43
+ [target, events, listeners, options] = args;
44
+ }
45
+ if (!target)
46
+ return noop;
47
+ if (!Array.isArray(events))
48
+ events = [events];
49
+ if (!Array.isArray(listeners))
50
+ listeners = [listeners];
51
+ const cleanups = [];
52
+ const cleanup = () => {
53
+ cleanups.forEach((fn) => fn());
54
+ cleanups.length = 0;
55
+ };
56
+ const register = (el, event, listener, options2) => {
57
+ el.addEventListener(event, listener, options2);
58
+ return () => el.removeEventListener(event, listener, options2);
59
+ };
60
+ const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
61
+ cleanup();
62
+ if (!el)
63
+ return;
64
+ cleanups.push(...events.flatMap((event) => {
65
+ return listeners.map((listener) => register(el, event, listener, options2));
66
+ }));
67
+ }, { immediate: true, flush: "post" });
68
+ const stop = () => {
69
+ stopWatch();
70
+ cleanup();
71
+ };
72
+ tryOnScopeDispose(stop);
73
+ return stop;
74
+ }
75
+
76
+ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
77
+ const globalKey = "__vueuse_ssr_handlers__";
78
+ _global[globalKey] = _global[globalKey] || {};
79
+
80
+ var SwipeDirection;
81
+ (function(SwipeDirection2) {
82
+ SwipeDirection2["UP"] = "UP";
83
+ SwipeDirection2["RIGHT"] = "RIGHT";
84
+ SwipeDirection2["DOWN"] = "DOWN";
85
+ SwipeDirection2["LEFT"] = "LEFT";
86
+ SwipeDirection2["NONE"] = "NONE";
87
+ })(SwipeDirection || (SwipeDirection = {}));
88
+
89
+ var __defProp = Object.defineProperty;
90
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
91
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
92
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
93
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
94
+ var __spreadValues = (a, b) => {
95
+ for (var prop in b || (b = {}))
96
+ if (__hasOwnProp.call(b, prop))
97
+ __defNormalProp(a, prop, b[prop]);
98
+ if (__getOwnPropSymbols)
99
+ for (var prop of __getOwnPropSymbols(b)) {
100
+ if (__propIsEnum.call(b, prop))
101
+ __defNormalProp(a, prop, b[prop]);
102
+ }
103
+ return a;
104
+ };
105
+ const _TransitionPresets = {
106
+ easeInSine: [0.12, 0, 0.39, 0],
107
+ easeOutSine: [0.61, 1, 0.88, 1],
108
+ easeInOutSine: [0.37, 0, 0.63, 1],
109
+ easeInQuad: [0.11, 0, 0.5, 0],
110
+ easeOutQuad: [0.5, 1, 0.89, 1],
111
+ easeInOutQuad: [0.45, 0, 0.55, 1],
112
+ easeInCubic: [0.32, 0, 0.67, 0],
113
+ easeOutCubic: [0.33, 1, 0.68, 1],
114
+ easeInOutCubic: [0.65, 0, 0.35, 1],
115
+ easeInQuart: [0.5, 0, 0.75, 0],
116
+ easeOutQuart: [0.25, 1, 0.5, 1],
117
+ easeInOutQuart: [0.76, 0, 0.24, 1],
118
+ easeInQuint: [0.64, 0, 0.78, 0],
119
+ easeOutQuint: [0.22, 1, 0.36, 1],
120
+ easeInOutQuint: [0.83, 0, 0.17, 1],
121
+ easeInExpo: [0.7, 0, 0.84, 0],
122
+ easeOutExpo: [0.16, 1, 0.3, 1],
123
+ easeInOutExpo: [0.87, 0, 0.13, 1],
124
+ easeInCirc: [0.55, 0, 1, 0.45],
125
+ easeOutCirc: [0, 0.55, 0.45, 1],
126
+ easeInOutCirc: [0.85, 0, 0.15, 1],
127
+ easeInBack: [0.36, 0, 0.66, -0.56],
128
+ easeOutBack: [0.34, 1.56, 0.64, 1],
129
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
130
+ };
131
+ __spreadValues({
132
+ linear: identity
133
+ }, _TransitionPresets);
134
+
135
+ /**
136
+ * @vue/shared v3.4.27
137
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
138
+ * @license MIT
139
+ **/
140
+
141
+
142
+
143
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
144
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
145
+ const hasOwnProperty$4 = Object.prototype.hasOwnProperty;
146
+ const hasOwn = (val, key) => hasOwnProperty$4.call(val, key);
147
+ const isString = (val) => typeof val === "string";
148
+ const isObject$1 = (val) => val !== null && typeof val === "object";
149
+
150
+ /** Detect free variable `global` from Node.js. */
151
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
152
+
153
+ /** Detect free variable `self`. */
154
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
155
+
156
+ /** Used as a reference to the global object. */
157
+ var root = freeGlobal || freeSelf || Function('return this')();
158
+
159
+ /** Built-in value references. */
160
+ var Symbol$1 = root.Symbol;
161
+
162
+ /** Used for built-in method references. */
163
+ var objectProto$4 = Object.prototype;
164
+
165
+ /** Used to check objects for own properties. */
166
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
167
+
168
+ /**
169
+ * Used to resolve the
170
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
171
+ * of values.
172
+ */
173
+ var nativeObjectToString$1 = objectProto$4.toString;
174
+
175
+ /** Built-in value references. */
176
+ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
177
+
178
+ /**
179
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
180
+ *
181
+ * @private
182
+ * @param {*} value The value to query.
183
+ * @returns {string} Returns the raw `toStringTag`.
184
+ */
185
+ function getRawTag(value) {
186
+ var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
187
+ tag = value[symToStringTag$1];
188
+
189
+ try {
190
+ value[symToStringTag$1] = undefined;
191
+ var unmasked = true;
192
+ } catch (e) {}
193
+
194
+ var result = nativeObjectToString$1.call(value);
195
+ if (unmasked) {
196
+ if (isOwn) {
197
+ value[symToStringTag$1] = tag;
198
+ } else {
199
+ delete value[symToStringTag$1];
200
+ }
201
+ }
202
+ return result;
203
+ }
204
+
205
+ /** Used for built-in method references. */
206
+ var objectProto$3 = Object.prototype;
207
+
208
+ /**
209
+ * Used to resolve the
210
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
211
+ * of values.
212
+ */
213
+ var nativeObjectToString = objectProto$3.toString;
214
+
215
+ /**
216
+ * Converts `value` to a string using `Object.prototype.toString`.
217
+ *
218
+ * @private
219
+ * @param {*} value The value to convert.
220
+ * @returns {string} Returns the converted string.
221
+ */
222
+ function objectToString(value) {
223
+ return nativeObjectToString.call(value);
224
+ }
225
+
226
+ /** `Object#toString` result references. */
227
+ var nullTag = '[object Null]',
228
+ undefinedTag = '[object Undefined]';
229
+
230
+ /** Built-in value references. */
231
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
232
+
233
+ /**
234
+ * The base implementation of `getTag` without fallbacks for buggy environments.
235
+ *
236
+ * @private
237
+ * @param {*} value The value to query.
238
+ * @returns {string} Returns the `toStringTag`.
239
+ */
240
+ function baseGetTag(value) {
241
+ if (value == null) {
242
+ return value === undefined ? undefinedTag : nullTag;
243
+ }
244
+ return (symToStringTag && symToStringTag in Object(value))
245
+ ? getRawTag(value)
246
+ : objectToString(value);
247
+ }
248
+
249
+ /**
250
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
251
+ * and has a `typeof` result of "object".
252
+ *
253
+ * @static
254
+ * @memberOf _
255
+ * @since 4.0.0
256
+ * @category Lang
257
+ * @param {*} value The value to check.
258
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
259
+ * @example
260
+ *
261
+ * _.isObjectLike({});
262
+ * // => true
263
+ *
264
+ * _.isObjectLike([1, 2, 3]);
265
+ * // => true
266
+ *
267
+ * _.isObjectLike(_.noop);
268
+ * // => false
269
+ *
270
+ * _.isObjectLike(null);
271
+ * // => false
272
+ */
273
+ function isObjectLike(value) {
274
+ return value != null && typeof value == 'object';
275
+ }
276
+
277
+ /** `Object#toString` result references. */
278
+ var symbolTag = '[object Symbol]';
279
+
280
+ /**
281
+ * Checks if `value` is classified as a `Symbol` primitive or object.
282
+ *
283
+ * @static
284
+ * @memberOf _
285
+ * @since 4.0.0
286
+ * @category Lang
287
+ * @param {*} value The value to check.
288
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
289
+ * @example
290
+ *
291
+ * _.isSymbol(Symbol.iterator);
292
+ * // => true
293
+ *
294
+ * _.isSymbol('abc');
295
+ * // => false
296
+ */
297
+ function isSymbol(value) {
298
+ return typeof value == 'symbol' ||
299
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
300
+ }
301
+
302
+ /**
303
+ * A specialized version of `_.map` for arrays without support for iteratee
304
+ * shorthands.
305
+ *
306
+ * @private
307
+ * @param {Array} [array] The array to iterate over.
308
+ * @param {Function} iteratee The function invoked per iteration.
309
+ * @returns {Array} Returns the new mapped array.
310
+ */
311
+ function arrayMap(array, iteratee) {
312
+ var index = -1,
313
+ length = array == null ? 0 : array.length,
314
+ result = Array(length);
315
+
316
+ while (++index < length) {
317
+ result[index] = iteratee(array[index], index, array);
318
+ }
319
+ return result;
320
+ }
321
+
322
+ /**
323
+ * Checks if `value` is classified as an `Array` object.
324
+ *
325
+ * @static
326
+ * @memberOf _
327
+ * @since 0.1.0
328
+ * @category Lang
329
+ * @param {*} value The value to check.
330
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
331
+ * @example
332
+ *
333
+ * _.isArray([1, 2, 3]);
334
+ * // => true
335
+ *
336
+ * _.isArray(document.body.children);
337
+ * // => false
338
+ *
339
+ * _.isArray('abc');
340
+ * // => false
341
+ *
342
+ * _.isArray(_.noop);
343
+ * // => false
344
+ */
345
+ var isArray = Array.isArray;
346
+
347
+ /** Used as references for various `Number` constants. */
348
+ var INFINITY$1 = 1 / 0;
349
+
350
+ /** Used to convert symbols to primitives and strings. */
351
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
352
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
353
+
354
+ /**
355
+ * The base implementation of `_.toString` which doesn't convert nullish
356
+ * values to empty strings.
357
+ *
358
+ * @private
359
+ * @param {*} value The value to process.
360
+ * @returns {string} Returns the string.
361
+ */
362
+ function baseToString(value) {
363
+ // Exit early for strings to avoid a performance hit in some environments.
364
+ if (typeof value == 'string') {
365
+ return value;
366
+ }
367
+ if (isArray(value)) {
368
+ // Recursively convert values (susceptible to call stack limits).
369
+ return arrayMap(value, baseToString) + '';
370
+ }
371
+ if (isSymbol(value)) {
372
+ return symbolToString ? symbolToString.call(value) : '';
373
+ }
374
+ var result = (value + '');
375
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
376
+ }
377
+
378
+ /** Used to match a single whitespace character. */
379
+ var reWhitespace = /\s/;
380
+
381
+ /**
382
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
383
+ * character of `string`.
384
+ *
385
+ * @private
386
+ * @param {string} string The string to inspect.
387
+ * @returns {number} Returns the index of the last non-whitespace character.
388
+ */
389
+ function trimmedEndIndex(string) {
390
+ var index = string.length;
391
+
392
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
393
+ return index;
394
+ }
395
+
396
+ /** Used to match leading whitespace. */
397
+ var reTrimStart = /^\s+/;
398
+
399
+ /**
400
+ * The base implementation of `_.trim`.
401
+ *
402
+ * @private
403
+ * @param {string} string The string to trim.
404
+ * @returns {string} Returns the trimmed string.
405
+ */
406
+ function baseTrim(string) {
407
+ return string
408
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
409
+ : string;
410
+ }
411
+
412
+ /**
413
+ * Checks if `value` is the
414
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
415
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
416
+ *
417
+ * @static
418
+ * @memberOf _
419
+ * @since 0.1.0
420
+ * @category Lang
421
+ * @param {*} value The value to check.
422
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
423
+ * @example
424
+ *
425
+ * _.isObject({});
426
+ * // => true
427
+ *
428
+ * _.isObject([1, 2, 3]);
429
+ * // => true
430
+ *
431
+ * _.isObject(_.noop);
432
+ * // => true
433
+ *
434
+ * _.isObject(null);
435
+ * // => false
436
+ */
437
+ function isObject(value) {
438
+ var type = typeof value;
439
+ return value != null && (type == 'object' || type == 'function');
440
+ }
441
+
442
+ /** Used as references for various `Number` constants. */
443
+ var NAN = 0 / 0;
444
+
445
+ /** Used to detect bad signed hexadecimal string values. */
446
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
447
+
448
+ /** Used to detect binary string values. */
449
+ var reIsBinary = /^0b[01]+$/i;
450
+
451
+ /** Used to detect octal string values. */
452
+ var reIsOctal = /^0o[0-7]+$/i;
453
+
454
+ /** Built-in method references without a dependency on `root`. */
455
+ var freeParseInt = parseInt;
456
+
457
+ /**
458
+ * Converts `value` to a number.
459
+ *
460
+ * @static
461
+ * @memberOf _
462
+ * @since 4.0.0
463
+ * @category Lang
464
+ * @param {*} value The value to process.
465
+ * @returns {number} Returns the number.
466
+ * @example
467
+ *
468
+ * _.toNumber(3.2);
469
+ * // => 3.2
470
+ *
471
+ * _.toNumber(Number.MIN_VALUE);
472
+ * // => 5e-324
473
+ *
474
+ * _.toNumber(Infinity);
475
+ * // => Infinity
476
+ *
477
+ * _.toNumber('3.2');
478
+ * // => 3.2
479
+ */
480
+ function toNumber(value) {
481
+ if (typeof value == 'number') {
482
+ return value;
483
+ }
484
+ if (isSymbol(value)) {
485
+ return NAN;
486
+ }
487
+ if (isObject(value)) {
488
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
489
+ value = isObject(other) ? (other + '') : other;
490
+ }
491
+ if (typeof value != 'string') {
492
+ return value === 0 ? value : +value;
493
+ }
494
+ value = baseTrim(value);
495
+ var isBinary = reIsBinary.test(value);
496
+ return (isBinary || reIsOctal.test(value))
497
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
498
+ : (reIsBadHex.test(value) ? NAN : +value);
499
+ }
500
+
501
+ /** `Object#toString` result references. */
502
+ var asyncTag = '[object AsyncFunction]',
503
+ funcTag = '[object Function]',
504
+ genTag = '[object GeneratorFunction]',
505
+ proxyTag = '[object Proxy]';
506
+
507
+ /**
508
+ * Checks if `value` is classified as a `Function` object.
509
+ *
510
+ * @static
511
+ * @memberOf _
512
+ * @since 0.1.0
513
+ * @category Lang
514
+ * @param {*} value The value to check.
515
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
516
+ * @example
517
+ *
518
+ * _.isFunction(_);
519
+ * // => true
520
+ *
521
+ * _.isFunction(/abc/);
522
+ * // => false
523
+ */
524
+ function isFunction(value) {
525
+ if (!isObject(value)) {
526
+ return false;
527
+ }
528
+ // The use of `Object#toString` avoids issues with the `typeof` operator
529
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
530
+ var tag = baseGetTag(value);
531
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
532
+ }
533
+
534
+ /** Used to detect overreaching core-js shims. */
535
+ var coreJsData = root['__core-js_shared__'];
536
+
537
+ /** Used to detect methods masquerading as native. */
538
+ var maskSrcKey = (function() {
539
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
540
+ return uid ? ('Symbol(src)_1.' + uid) : '';
541
+ }());
542
+
543
+ /**
544
+ * Checks if `func` has its source masked.
545
+ *
546
+ * @private
547
+ * @param {Function} func The function to check.
548
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
549
+ */
550
+ function isMasked(func) {
551
+ return !!maskSrcKey && (maskSrcKey in func);
552
+ }
553
+
554
+ /** Used for built-in method references. */
555
+ var funcProto$1 = Function.prototype;
556
+
557
+ /** Used to resolve the decompiled source of functions. */
558
+ var funcToString$1 = funcProto$1.toString;
559
+
560
+ /**
561
+ * Converts `func` to its source code.
562
+ *
563
+ * @private
564
+ * @param {Function} func The function to convert.
565
+ * @returns {string} Returns the source code.
566
+ */
567
+ function toSource(func) {
568
+ if (func != null) {
569
+ try {
570
+ return funcToString$1.call(func);
571
+ } catch (e) {}
572
+ try {
573
+ return (func + '');
574
+ } catch (e) {}
575
+ }
576
+ return '';
577
+ }
578
+
579
+ /**
580
+ * Used to match `RegExp`
581
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
582
+ */
583
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
584
+
585
+ /** Used to detect host constructors (Safari). */
586
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
587
+
588
+ /** Used for built-in method references. */
589
+ var funcProto = Function.prototype,
590
+ objectProto$2 = Object.prototype;
591
+
592
+ /** Used to resolve the decompiled source of functions. */
593
+ var funcToString = funcProto.toString;
594
+
595
+ /** Used to check objects for own properties. */
596
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
597
+
598
+ /** Used to detect if a method is native. */
599
+ var reIsNative = RegExp('^' +
600
+ funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
601
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
602
+ );
603
+
604
+ /**
605
+ * The base implementation of `_.isNative` without bad shim checks.
606
+ *
607
+ * @private
608
+ * @param {*} value The value to check.
609
+ * @returns {boolean} Returns `true` if `value` is a native function,
610
+ * else `false`.
611
+ */
612
+ function baseIsNative(value) {
613
+ if (!isObject(value) || isMasked(value)) {
614
+ return false;
615
+ }
616
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
617
+ return pattern.test(toSource(value));
618
+ }
619
+
620
+ /**
621
+ * Gets the value at `key` of `object`.
622
+ *
623
+ * @private
624
+ * @param {Object} [object] The object to query.
625
+ * @param {string} key The key of the property to get.
626
+ * @returns {*} Returns the property value.
627
+ */
628
+ function getValue(object, key) {
629
+ return object == null ? undefined : object[key];
630
+ }
631
+
632
+ /**
633
+ * Gets the native function at `key` of `object`.
634
+ *
635
+ * @private
636
+ * @param {Object} object The object to query.
637
+ * @param {string} key The key of the method to get.
638
+ * @returns {*} Returns the function if it's native, else `undefined`.
639
+ */
640
+ function getNative(object, key) {
641
+ var value = getValue(object, key);
642
+ return baseIsNative(value) ? value : undefined;
643
+ }
644
+
645
+ /**
646
+ * Performs a
647
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
648
+ * comparison between two values to determine if they are equivalent.
649
+ *
650
+ * @static
651
+ * @memberOf _
652
+ * @since 4.0.0
653
+ * @category Lang
654
+ * @param {*} value The value to compare.
655
+ * @param {*} other The other value to compare.
656
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
657
+ * @example
658
+ *
659
+ * var object = { 'a': 1 };
660
+ * var other = { 'a': 1 };
661
+ *
662
+ * _.eq(object, object);
663
+ * // => true
664
+ *
665
+ * _.eq(object, other);
666
+ * // => false
667
+ *
668
+ * _.eq('a', 'a');
669
+ * // => true
670
+ *
671
+ * _.eq('a', Object('a'));
672
+ * // => false
673
+ *
674
+ * _.eq(NaN, NaN);
675
+ * // => true
676
+ */
677
+ function eq(value, other) {
678
+ return value === other || (value !== value && other !== other);
679
+ }
680
+
681
+ /** Used to match property names within property paths. */
682
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
683
+ reIsPlainProp = /^\w*$/;
684
+
685
+ /**
686
+ * Checks if `value` is a property name and not a property path.
687
+ *
688
+ * @private
689
+ * @param {*} value The value to check.
690
+ * @param {Object} [object] The object to query keys on.
691
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
692
+ */
693
+ function isKey(value, object) {
694
+ if (isArray(value)) {
695
+ return false;
696
+ }
697
+ var type = typeof value;
698
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
699
+ value == null || isSymbol(value)) {
700
+ return true;
701
+ }
702
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
703
+ (object != null && value in Object(object));
704
+ }
705
+
706
+ /* Built-in method references that are verified to be native. */
707
+ var nativeCreate = getNative(Object, 'create');
708
+
709
+ /**
710
+ * Removes all key-value entries from the hash.
711
+ *
712
+ * @private
713
+ * @name clear
714
+ * @memberOf Hash
715
+ */
716
+ function hashClear() {
717
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
718
+ this.size = 0;
719
+ }
720
+
721
+ /**
722
+ * Removes `key` and its value from the hash.
723
+ *
724
+ * @private
725
+ * @name delete
726
+ * @memberOf Hash
727
+ * @param {Object} hash The hash to modify.
728
+ * @param {string} key The key of the value to remove.
729
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
730
+ */
731
+ function hashDelete(key) {
732
+ var result = this.has(key) && delete this.__data__[key];
733
+ this.size -= result ? 1 : 0;
734
+ return result;
735
+ }
736
+
737
+ /** Used to stand-in for `undefined` hash values. */
738
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
739
+
740
+ /** Used for built-in method references. */
741
+ var objectProto$1 = Object.prototype;
742
+
743
+ /** Used to check objects for own properties. */
744
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
745
+
746
+ /**
747
+ * Gets the hash value for `key`.
748
+ *
749
+ * @private
750
+ * @name get
751
+ * @memberOf Hash
752
+ * @param {string} key The key of the value to get.
753
+ * @returns {*} Returns the entry value.
754
+ */
755
+ function hashGet(key) {
756
+ var data = this.__data__;
757
+ if (nativeCreate) {
758
+ var result = data[key];
759
+ return result === HASH_UNDEFINED$1 ? undefined : result;
760
+ }
761
+ return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
762
+ }
763
+
764
+ /** Used for built-in method references. */
765
+ var objectProto = Object.prototype;
766
+
767
+ /** Used to check objects for own properties. */
768
+ var hasOwnProperty = objectProto.hasOwnProperty;
769
+
770
+ /**
771
+ * Checks if a hash value for `key` exists.
772
+ *
773
+ * @private
774
+ * @name has
775
+ * @memberOf Hash
776
+ * @param {string} key The key of the entry to check.
777
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
778
+ */
779
+ function hashHas(key) {
780
+ var data = this.__data__;
781
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
782
+ }
783
+
784
+ /** Used to stand-in for `undefined` hash values. */
785
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
786
+
787
+ /**
788
+ * Sets the hash `key` to `value`.
789
+ *
790
+ * @private
791
+ * @name set
792
+ * @memberOf Hash
793
+ * @param {string} key The key of the value to set.
794
+ * @param {*} value The value to set.
795
+ * @returns {Object} Returns the hash instance.
796
+ */
797
+ function hashSet(key, value) {
798
+ var data = this.__data__;
799
+ this.size += this.has(key) ? 0 : 1;
800
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
801
+ return this;
802
+ }
803
+
804
+ /**
805
+ * Creates a hash object.
806
+ *
807
+ * @private
808
+ * @constructor
809
+ * @param {Array} [entries] The key-value pairs to cache.
810
+ */
811
+ function Hash(entries) {
812
+ var index = -1,
813
+ length = entries == null ? 0 : entries.length;
814
+
815
+ this.clear();
816
+ while (++index < length) {
817
+ var entry = entries[index];
818
+ this.set(entry[0], entry[1]);
819
+ }
820
+ }
821
+
822
+ // Add methods to `Hash`.
823
+ Hash.prototype.clear = hashClear;
824
+ Hash.prototype['delete'] = hashDelete;
825
+ Hash.prototype.get = hashGet;
826
+ Hash.prototype.has = hashHas;
827
+ Hash.prototype.set = hashSet;
828
+
829
+ /**
830
+ * Removes all key-value entries from the list cache.
831
+ *
832
+ * @private
833
+ * @name clear
834
+ * @memberOf ListCache
835
+ */
836
+ function listCacheClear() {
837
+ this.__data__ = [];
838
+ this.size = 0;
839
+ }
840
+
841
+ /**
842
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
843
+ *
844
+ * @private
845
+ * @param {Array} array The array to inspect.
846
+ * @param {*} key The key to search for.
847
+ * @returns {number} Returns the index of the matched value, else `-1`.
848
+ */
849
+ function assocIndexOf(array, key) {
850
+ var length = array.length;
851
+ while (length--) {
852
+ if (eq(array[length][0], key)) {
853
+ return length;
854
+ }
855
+ }
856
+ return -1;
857
+ }
858
+
859
+ /** Used for built-in method references. */
860
+ var arrayProto = Array.prototype;
861
+
862
+ /** Built-in value references. */
863
+ var splice = arrayProto.splice;
864
+
865
+ /**
866
+ * Removes `key` and its value from the list cache.
867
+ *
868
+ * @private
869
+ * @name delete
870
+ * @memberOf ListCache
871
+ * @param {string} key The key of the value to remove.
872
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
873
+ */
874
+ function listCacheDelete(key) {
875
+ var data = this.__data__,
876
+ index = assocIndexOf(data, key);
877
+
878
+ if (index < 0) {
879
+ return false;
880
+ }
881
+ var lastIndex = data.length - 1;
882
+ if (index == lastIndex) {
883
+ data.pop();
884
+ } else {
885
+ splice.call(data, index, 1);
886
+ }
887
+ --this.size;
888
+ return true;
889
+ }
890
+
891
+ /**
892
+ * Gets the list cache value for `key`.
893
+ *
894
+ * @private
895
+ * @name get
896
+ * @memberOf ListCache
897
+ * @param {string} key The key of the value to get.
898
+ * @returns {*} Returns the entry value.
899
+ */
900
+ function listCacheGet(key) {
901
+ var data = this.__data__,
902
+ index = assocIndexOf(data, key);
903
+
904
+ return index < 0 ? undefined : data[index][1];
905
+ }
906
+
907
+ /**
908
+ * Checks if a list cache value for `key` exists.
909
+ *
910
+ * @private
911
+ * @name has
912
+ * @memberOf ListCache
913
+ * @param {string} key The key of the entry to check.
914
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
915
+ */
916
+ function listCacheHas(key) {
917
+ return assocIndexOf(this.__data__, key) > -1;
918
+ }
919
+
920
+ /**
921
+ * Sets the list cache `key` to `value`.
922
+ *
923
+ * @private
924
+ * @name set
925
+ * @memberOf ListCache
926
+ * @param {string} key The key of the value to set.
927
+ * @param {*} value The value to set.
928
+ * @returns {Object} Returns the list cache instance.
929
+ */
930
+ function listCacheSet(key, value) {
931
+ var data = this.__data__,
932
+ index = assocIndexOf(data, key);
933
+
934
+ if (index < 0) {
935
+ ++this.size;
936
+ data.push([key, value]);
937
+ } else {
938
+ data[index][1] = value;
939
+ }
940
+ return this;
941
+ }
942
+
943
+ /**
944
+ * Creates an list cache object.
945
+ *
946
+ * @private
947
+ * @constructor
948
+ * @param {Array} [entries] The key-value pairs to cache.
949
+ */
950
+ function ListCache(entries) {
951
+ var index = -1,
952
+ length = entries == null ? 0 : entries.length;
953
+
954
+ this.clear();
955
+ while (++index < length) {
956
+ var entry = entries[index];
957
+ this.set(entry[0], entry[1]);
958
+ }
959
+ }
960
+
961
+ // Add methods to `ListCache`.
962
+ ListCache.prototype.clear = listCacheClear;
963
+ ListCache.prototype['delete'] = listCacheDelete;
964
+ ListCache.prototype.get = listCacheGet;
965
+ ListCache.prototype.has = listCacheHas;
966
+ ListCache.prototype.set = listCacheSet;
967
+
968
+ /* Built-in method references that are verified to be native. */
969
+ var Map = getNative(root, 'Map');
970
+
971
+ /**
972
+ * Removes all key-value entries from the map.
973
+ *
974
+ * @private
975
+ * @name clear
976
+ * @memberOf MapCache
977
+ */
978
+ function mapCacheClear() {
979
+ this.size = 0;
980
+ this.__data__ = {
981
+ 'hash': new Hash,
982
+ 'map': new (Map || ListCache),
983
+ 'string': new Hash
984
+ };
985
+ }
986
+
987
+ /**
988
+ * Checks if `value` is suitable for use as unique object key.
989
+ *
990
+ * @private
991
+ * @param {*} value The value to check.
992
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
993
+ */
994
+ function isKeyable(value) {
995
+ var type = typeof value;
996
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
997
+ ? (value !== '__proto__')
998
+ : (value === null);
999
+ }
1000
+
1001
+ /**
1002
+ * Gets the data for `map`.
1003
+ *
1004
+ * @private
1005
+ * @param {Object} map The map to query.
1006
+ * @param {string} key The reference key.
1007
+ * @returns {*} Returns the map data.
1008
+ */
1009
+ function getMapData(map, key) {
1010
+ var data = map.__data__;
1011
+ return isKeyable(key)
1012
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1013
+ : data.map;
1014
+ }
1015
+
1016
+ /**
1017
+ * Removes `key` and its value from the map.
1018
+ *
1019
+ * @private
1020
+ * @name delete
1021
+ * @memberOf MapCache
1022
+ * @param {string} key The key of the value to remove.
1023
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1024
+ */
1025
+ function mapCacheDelete(key) {
1026
+ var result = getMapData(this, key)['delete'](key);
1027
+ this.size -= result ? 1 : 0;
1028
+ return result;
1029
+ }
1030
+
1031
+ /**
1032
+ * Gets the map value for `key`.
1033
+ *
1034
+ * @private
1035
+ * @name get
1036
+ * @memberOf MapCache
1037
+ * @param {string} key The key of the value to get.
1038
+ * @returns {*} Returns the entry value.
1039
+ */
1040
+ function mapCacheGet(key) {
1041
+ return getMapData(this, key).get(key);
1042
+ }
1043
+
1044
+ /**
1045
+ * Checks if a map value for `key` exists.
1046
+ *
1047
+ * @private
1048
+ * @name has
1049
+ * @memberOf MapCache
1050
+ * @param {string} key The key of the entry to check.
1051
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1052
+ */
1053
+ function mapCacheHas(key) {
1054
+ return getMapData(this, key).has(key);
1055
+ }
1056
+
1057
+ /**
1058
+ * Sets the map `key` to `value`.
1059
+ *
1060
+ * @private
1061
+ * @name set
1062
+ * @memberOf MapCache
1063
+ * @param {string} key The key of the value to set.
1064
+ * @param {*} value The value to set.
1065
+ * @returns {Object} Returns the map cache instance.
1066
+ */
1067
+ function mapCacheSet(key, value) {
1068
+ var data = getMapData(this, key),
1069
+ size = data.size;
1070
+
1071
+ data.set(key, value);
1072
+ this.size += data.size == size ? 0 : 1;
1073
+ return this;
1074
+ }
1075
+
1076
+ /**
1077
+ * Creates a map cache object to store key-value pairs.
1078
+ *
1079
+ * @private
1080
+ * @constructor
1081
+ * @param {Array} [entries] The key-value pairs to cache.
1082
+ */
1083
+ function MapCache(entries) {
1084
+ var index = -1,
1085
+ length = entries == null ? 0 : entries.length;
1086
+
1087
+ this.clear();
1088
+ while (++index < length) {
1089
+ var entry = entries[index];
1090
+ this.set(entry[0], entry[1]);
1091
+ }
1092
+ }
1093
+
1094
+ // Add methods to `MapCache`.
1095
+ MapCache.prototype.clear = mapCacheClear;
1096
+ MapCache.prototype['delete'] = mapCacheDelete;
1097
+ MapCache.prototype.get = mapCacheGet;
1098
+ MapCache.prototype.has = mapCacheHas;
1099
+ MapCache.prototype.set = mapCacheSet;
1100
+
1101
+ /** Error message constants. */
1102
+ var FUNC_ERROR_TEXT$2 = 'Expected a function';
1103
+
1104
+ /**
1105
+ * Creates a function that memoizes the result of `func`. If `resolver` is
1106
+ * provided, it determines the cache key for storing the result based on the
1107
+ * arguments provided to the memoized function. By default, the first argument
1108
+ * provided to the memoized function is used as the map cache key. The `func`
1109
+ * is invoked with the `this` binding of the memoized function.
1110
+ *
1111
+ * **Note:** The cache is exposed as the `cache` property on the memoized
1112
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
1113
+ * constructor with one whose instances implement the
1114
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1115
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1116
+ *
1117
+ * @static
1118
+ * @memberOf _
1119
+ * @since 0.1.0
1120
+ * @category Function
1121
+ * @param {Function} func The function to have its output memoized.
1122
+ * @param {Function} [resolver] The function to resolve the cache key.
1123
+ * @returns {Function} Returns the new memoized function.
1124
+ * @example
1125
+ *
1126
+ * var object = { 'a': 1, 'b': 2 };
1127
+ * var other = { 'c': 3, 'd': 4 };
1128
+ *
1129
+ * var values = _.memoize(_.values);
1130
+ * values(object);
1131
+ * // => [1, 2]
1132
+ *
1133
+ * values(other);
1134
+ * // => [3, 4]
1135
+ *
1136
+ * object.a = 2;
1137
+ * values(object);
1138
+ * // => [1, 2]
1139
+ *
1140
+ * // Modify the result cache.
1141
+ * values.cache.set(object, ['a', 'b']);
1142
+ * values(object);
1143
+ * // => ['a', 'b']
1144
+ *
1145
+ * // Replace `_.memoize.Cache`.
1146
+ * _.memoize.Cache = WeakMap;
1147
+ */
1148
+ function memoize(func, resolver) {
1149
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1150
+ throw new TypeError(FUNC_ERROR_TEXT$2);
1151
+ }
1152
+ var memoized = function() {
1153
+ var args = arguments,
1154
+ key = resolver ? resolver.apply(this, args) : args[0],
1155
+ cache = memoized.cache;
1156
+
1157
+ if (cache.has(key)) {
1158
+ return cache.get(key);
1159
+ }
1160
+ var result = func.apply(this, args);
1161
+ memoized.cache = cache.set(key, result) || cache;
1162
+ return result;
1163
+ };
1164
+ memoized.cache = new (memoize.Cache || MapCache);
1165
+ return memoized;
1166
+ }
1167
+
1168
+ // Expose `MapCache`.
1169
+ memoize.Cache = MapCache;
1170
+
1171
+ /** Used as the maximum memoize cache size. */
1172
+ var MAX_MEMOIZE_SIZE = 500;
1173
+
1174
+ /**
1175
+ * A specialized version of `_.memoize` which clears the memoized function's
1176
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1177
+ *
1178
+ * @private
1179
+ * @param {Function} func The function to have its output memoized.
1180
+ * @returns {Function} Returns the new memoized function.
1181
+ */
1182
+ function memoizeCapped(func) {
1183
+ var result = memoize(func, function(key) {
1184
+ if (cache.size === MAX_MEMOIZE_SIZE) {
1185
+ cache.clear();
1186
+ }
1187
+ return key;
1188
+ });
1189
+
1190
+ var cache = result.cache;
1191
+ return result;
1192
+ }
1193
+
1194
+ /** Used to match property names within property paths. */
1195
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1196
+
1197
+ /** Used to match backslashes in property paths. */
1198
+ var reEscapeChar = /\\(\\)?/g;
1199
+
1200
+ /**
1201
+ * Converts `string` to a property path array.
1202
+ *
1203
+ * @private
1204
+ * @param {string} string The string to convert.
1205
+ * @returns {Array} Returns the property path array.
1206
+ */
1207
+ var stringToPath = memoizeCapped(function(string) {
1208
+ var result = [];
1209
+ if (string.charCodeAt(0) === 46 /* . */) {
1210
+ result.push('');
1211
+ }
1212
+ string.replace(rePropName, function(match, number, quote, subString) {
1213
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1214
+ });
1215
+ return result;
1216
+ });
1217
+
1218
+ /**
1219
+ * Converts `value` to a string. An empty string is returned for `null`
1220
+ * and `undefined` values. The sign of `-0` is preserved.
1221
+ *
1222
+ * @static
1223
+ * @memberOf _
1224
+ * @since 4.0.0
1225
+ * @category Lang
1226
+ * @param {*} value The value to convert.
1227
+ * @returns {string} Returns the converted string.
1228
+ * @example
1229
+ *
1230
+ * _.toString(null);
1231
+ * // => ''
1232
+ *
1233
+ * _.toString(-0);
1234
+ * // => '-0'
1235
+ *
1236
+ * _.toString([1, 2, 3]);
1237
+ * // => '1,2,3'
1238
+ */
1239
+ function toString(value) {
1240
+ return value == null ? '' : baseToString(value);
1241
+ }
1242
+
1243
+ /**
1244
+ * Casts `value` to a path array if it's not one.
1245
+ *
1246
+ * @private
1247
+ * @param {*} value The value to inspect.
1248
+ * @param {Object} [object] The object to query keys on.
1249
+ * @returns {Array} Returns the cast property path array.
1250
+ */
1251
+ function castPath(value, object) {
1252
+ if (isArray(value)) {
1253
+ return value;
1254
+ }
1255
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
1256
+ }
1257
+
1258
+ /** Used as references for various `Number` constants. */
1259
+ var INFINITY = 1 / 0;
1260
+
1261
+ /**
1262
+ * Converts `value` to a string key if it's not a string or symbol.
1263
+ *
1264
+ * @private
1265
+ * @param {*} value The value to inspect.
1266
+ * @returns {string|symbol} Returns the key.
1267
+ */
1268
+ function toKey(value) {
1269
+ if (typeof value == 'string' || isSymbol(value)) {
1270
+ return value;
1271
+ }
1272
+ var result = (value + '');
1273
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1274
+ }
1275
+
1276
+ /**
1277
+ * The base implementation of `_.get` without support for default values.
1278
+ *
1279
+ * @private
1280
+ * @param {Object} object The object to query.
1281
+ * @param {Array|string} path The path of the property to get.
1282
+ * @returns {*} Returns the resolved value.
1283
+ */
1284
+ function baseGet(object, path) {
1285
+ path = castPath(path, object);
1286
+
1287
+ var index = 0,
1288
+ length = path.length;
1289
+
1290
+ while (object != null && index < length) {
1291
+ object = object[toKey(path[index++])];
1292
+ }
1293
+ return (index && index == length) ? object : undefined;
1294
+ }
1295
+
1296
+ /**
1297
+ * Gets the value at `path` of `object`. If the resolved value is
1298
+ * `undefined`, the `defaultValue` is returned in its place.
1299
+ *
1300
+ * @static
1301
+ * @memberOf _
1302
+ * @since 3.7.0
1303
+ * @category Object
1304
+ * @param {Object} object The object to query.
1305
+ * @param {Array|string} path The path of the property to get.
1306
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1307
+ * @returns {*} Returns the resolved value.
1308
+ * @example
1309
+ *
1310
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1311
+ *
1312
+ * _.get(object, 'a[0].b.c');
1313
+ * // => 3
1314
+ *
1315
+ * _.get(object, ['a', '0', 'b', 'c']);
1316
+ * // => 3
1317
+ *
1318
+ * _.get(object, 'a.b.c', 'default');
1319
+ * // => 'default'
1320
+ */
1321
+ function get(object, path, defaultValue) {
1322
+ var result = object == null ? undefined : baseGet(object, path);
1323
+ return result === undefined ? defaultValue : result;
1324
+ }
1325
+
1326
+ /**
1327
+ * Gets the timestamp of the number of milliseconds that have elapsed since
1328
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
1329
+ *
1330
+ * @static
1331
+ * @memberOf _
1332
+ * @since 2.4.0
1333
+ * @category Date
1334
+ * @returns {number} Returns the timestamp.
1335
+ * @example
1336
+ *
1337
+ * _.defer(function(stamp) {
1338
+ * console.log(_.now() - stamp);
1339
+ * }, _.now());
1340
+ * // => Logs the number of milliseconds it took for the deferred invocation.
1341
+ */
1342
+ var now = function() {
1343
+ return root.Date.now();
1344
+ };
1345
+
1346
+ /** Error message constants. */
1347
+ var FUNC_ERROR_TEXT$1 = 'Expected a function';
1348
+
1349
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1350
+ var nativeMax = Math.max,
1351
+ nativeMin = Math.min;
1352
+
1353
+ /**
1354
+ * Creates a debounced function that delays invoking `func` until after `wait`
1355
+ * milliseconds have elapsed since the last time the debounced function was
1356
+ * invoked. The debounced function comes with a `cancel` method to cancel
1357
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
1358
+ * Provide `options` to indicate whether `func` should be invoked on the
1359
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
1360
+ * with the last arguments provided to the debounced function. Subsequent
1361
+ * calls to the debounced function return the result of the last `func`
1362
+ * invocation.
1363
+ *
1364
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
1365
+ * invoked on the trailing edge of the timeout only if the debounced function
1366
+ * is invoked more than once during the `wait` timeout.
1367
+ *
1368
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
1369
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
1370
+ *
1371
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
1372
+ * for details over the differences between `_.debounce` and `_.throttle`.
1373
+ *
1374
+ * @static
1375
+ * @memberOf _
1376
+ * @since 0.1.0
1377
+ * @category Function
1378
+ * @param {Function} func The function to debounce.
1379
+ * @param {number} [wait=0] The number of milliseconds to delay.
1380
+ * @param {Object} [options={}] The options object.
1381
+ * @param {boolean} [options.leading=false]
1382
+ * Specify invoking on the leading edge of the timeout.
1383
+ * @param {number} [options.maxWait]
1384
+ * The maximum time `func` is allowed to be delayed before it's invoked.
1385
+ * @param {boolean} [options.trailing=true]
1386
+ * Specify invoking on the trailing edge of the timeout.
1387
+ * @returns {Function} Returns the new debounced function.
1388
+ * @example
1389
+ *
1390
+ * // Avoid costly calculations while the window size is in flux.
1391
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
1392
+ *
1393
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
1394
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
1395
+ * 'leading': true,
1396
+ * 'trailing': false
1397
+ * }));
1398
+ *
1399
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
1400
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
1401
+ * var source = new EventSource('/stream');
1402
+ * jQuery(source).on('message', debounced);
1403
+ *
1404
+ * // Cancel the trailing debounced invocation.
1405
+ * jQuery(window).on('popstate', debounced.cancel);
1406
+ */
1407
+ function debounce(func, wait, options) {
1408
+ var lastArgs,
1409
+ lastThis,
1410
+ maxWait,
1411
+ result,
1412
+ timerId,
1413
+ lastCallTime,
1414
+ lastInvokeTime = 0,
1415
+ leading = false,
1416
+ maxing = false,
1417
+ trailing = true;
1418
+
1419
+ if (typeof func != 'function') {
1420
+ throw new TypeError(FUNC_ERROR_TEXT$1);
1421
+ }
1422
+ wait = toNumber(wait) || 0;
1423
+ if (isObject(options)) {
1424
+ leading = !!options.leading;
1425
+ maxing = 'maxWait' in options;
1426
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
1427
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
1428
+ }
1429
+
1430
+ function invokeFunc(time) {
1431
+ var args = lastArgs,
1432
+ thisArg = lastThis;
1433
+
1434
+ lastArgs = lastThis = undefined;
1435
+ lastInvokeTime = time;
1436
+ result = func.apply(thisArg, args);
1437
+ return result;
1438
+ }
1439
+
1440
+ function leadingEdge(time) {
1441
+ // Reset any `maxWait` timer.
1442
+ lastInvokeTime = time;
1443
+ // Start the timer for the trailing edge.
1444
+ timerId = setTimeout(timerExpired, wait);
1445
+ // Invoke the leading edge.
1446
+ return leading ? invokeFunc(time) : result;
1447
+ }
1448
+
1449
+ function remainingWait(time) {
1450
+ var timeSinceLastCall = time - lastCallTime,
1451
+ timeSinceLastInvoke = time - lastInvokeTime,
1452
+ timeWaiting = wait - timeSinceLastCall;
1453
+
1454
+ return maxing
1455
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
1456
+ : timeWaiting;
1457
+ }
1458
+
1459
+ function shouldInvoke(time) {
1460
+ var timeSinceLastCall = time - lastCallTime,
1461
+ timeSinceLastInvoke = time - lastInvokeTime;
1462
+
1463
+ // Either this is the first call, activity has stopped and we're at the
1464
+ // trailing edge, the system time has gone backwards and we're treating
1465
+ // it as the trailing edge, or we've hit the `maxWait` limit.
1466
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
1467
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
1468
+ }
1469
+
1470
+ function timerExpired() {
1471
+ var time = now();
1472
+ if (shouldInvoke(time)) {
1473
+ return trailingEdge(time);
1474
+ }
1475
+ // Restart the timer.
1476
+ timerId = setTimeout(timerExpired, remainingWait(time));
1477
+ }
1478
+
1479
+ function trailingEdge(time) {
1480
+ timerId = undefined;
1481
+
1482
+ // Only invoke if we have `lastArgs` which means `func` has been
1483
+ // debounced at least once.
1484
+ if (trailing && lastArgs) {
1485
+ return invokeFunc(time);
1486
+ }
1487
+ lastArgs = lastThis = undefined;
1488
+ return result;
1489
+ }
1490
+
1491
+ function cancel() {
1492
+ if (timerId !== undefined) {
1493
+ clearTimeout(timerId);
1494
+ }
1495
+ lastInvokeTime = 0;
1496
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
1497
+ }
1498
+
1499
+ function flush() {
1500
+ return timerId === undefined ? result : trailingEdge(now());
1501
+ }
1502
+
1503
+ function debounced() {
1504
+ var time = now(),
1505
+ isInvoking = shouldInvoke(time);
1506
+
1507
+ lastArgs = arguments;
1508
+ lastThis = this;
1509
+ lastCallTime = time;
1510
+
1511
+ if (isInvoking) {
1512
+ if (timerId === undefined) {
1513
+ return leadingEdge(lastCallTime);
1514
+ }
1515
+ if (maxing) {
1516
+ // Handle invocations in a tight loop.
1517
+ clearTimeout(timerId);
1518
+ timerId = setTimeout(timerExpired, wait);
1519
+ return invokeFunc(lastCallTime);
1520
+ }
1521
+ }
1522
+ if (timerId === undefined) {
1523
+ timerId = setTimeout(timerExpired, wait);
1524
+ }
1525
+ return result;
1526
+ }
1527
+ debounced.cancel = cancel;
1528
+ debounced.flush = flush;
1529
+ return debounced;
1530
+ }
1531
+
1532
+ /**
1533
+ * The inverse of `_.toPairs`; this method returns an object composed
1534
+ * from key-value `pairs`.
1535
+ *
1536
+ * @static
1537
+ * @memberOf _
1538
+ * @since 4.0.0
1539
+ * @category Array
1540
+ * @param {Array} pairs The key-value pairs.
1541
+ * @returns {Object} Returns the new object.
1542
+ * @example
1543
+ *
1544
+ * _.fromPairs([['a', 1], ['b', 2]]);
1545
+ * // => { 'a': 1, 'b': 2 }
1546
+ */
1547
+ function fromPairs(pairs) {
1548
+ var index = -1,
1549
+ length = pairs == null ? 0 : pairs.length,
1550
+ result = {};
1551
+
1552
+ while (++index < length) {
1553
+ var pair = pairs[index];
1554
+ result[pair[0]] = pair[1];
1555
+ }
1556
+ return result;
1557
+ }
1558
+
1559
+ /** Error message constants. */
1560
+ var FUNC_ERROR_TEXT = 'Expected a function';
1561
+
1562
+ /**
1563
+ * Creates a throttled function that only invokes `func` at most once per
1564
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
1565
+ * method to cancel delayed `func` invocations and a `flush` method to
1566
+ * immediately invoke them. Provide `options` to indicate whether `func`
1567
+ * should be invoked on the leading and/or trailing edge of the `wait`
1568
+ * timeout. The `func` is invoked with the last arguments provided to the
1569
+ * throttled function. Subsequent calls to the throttled function return the
1570
+ * result of the last `func` invocation.
1571
+ *
1572
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
1573
+ * invoked on the trailing edge of the timeout only if the throttled function
1574
+ * is invoked more than once during the `wait` timeout.
1575
+ *
1576
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
1577
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
1578
+ *
1579
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
1580
+ * for details over the differences between `_.throttle` and `_.debounce`.
1581
+ *
1582
+ * @static
1583
+ * @memberOf _
1584
+ * @since 0.1.0
1585
+ * @category Function
1586
+ * @param {Function} func The function to throttle.
1587
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
1588
+ * @param {Object} [options={}] The options object.
1589
+ * @param {boolean} [options.leading=true]
1590
+ * Specify invoking on the leading edge of the timeout.
1591
+ * @param {boolean} [options.trailing=true]
1592
+ * Specify invoking on the trailing edge of the timeout.
1593
+ * @returns {Function} Returns the new throttled function.
1594
+ * @example
1595
+ *
1596
+ * // Avoid excessively updating the position while scrolling.
1597
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
1598
+ *
1599
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
1600
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
1601
+ * jQuery(element).on('click', throttled);
1602
+ *
1603
+ * // Cancel the trailing throttled invocation.
1604
+ * jQuery(window).on('popstate', throttled.cancel);
1605
+ */
1606
+ function throttle(func, wait, options) {
1607
+ var leading = true,
1608
+ trailing = true;
1609
+
1610
+ if (typeof func != 'function') {
1611
+ throw new TypeError(FUNC_ERROR_TEXT);
1612
+ }
1613
+ if (isObject(options)) {
1614
+ leading = 'leading' in options ? !!options.leading : leading;
1615
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
1616
+ }
1617
+ return debounce(func, wait, {
1618
+ 'leading': leading,
1619
+ 'maxWait': wait,
1620
+ 'trailing': trailing
1621
+ });
1622
+ }
1623
+
1624
+ const isUndefined = (val) => val === void 0;
1625
+ const isNumber = (val) => typeof val === "number";
1626
+ const isStringNumber = (val) => {
1627
+ if (!isString(val)) {
1628
+ return false;
1629
+ }
1630
+ return !Number.isNaN(Number(val));
1631
+ };
1632
+
1633
+ const keysOf = (arr) => Object.keys(arr);
1634
+
1635
+ class ElementPlusError extends Error {
1636
+ constructor(m) {
1637
+ super(m);
1638
+ this.name = "ElementPlusError";
1639
+ }
1640
+ }
1641
+ function debugWarn(scope, message) {
1642
+ if (process.env.NODE_ENV !== "production") {
1643
+ const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
1644
+ console.warn(error);
1645
+ }
1646
+ }
1647
+
1648
+ const SCOPE = "utils/dom/style";
1649
+ function addUnit(value, defaultUnit = "px") {
1650
+ if (!value)
1651
+ return "";
1652
+ if (isNumber(value) || isStringNumber(value)) {
1653
+ return `${value}${defaultUnit}`;
1654
+ } else if (isString(value)) {
1655
+ return value;
1656
+ }
1657
+ debugWarn(SCOPE, "binding value must be a string or number");
1658
+ }
1659
+
1660
+ /*! Element Plus Icons Vue v2.3.1 */
1661
+
1662
+ var arrow_left_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1663
+ name: "ArrowLeft",
1664
+ __name: "arrow-left",
1665
+ setup(__props) {
1666
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1667
+ xmlns: "http://www.w3.org/2000/svg",
1668
+ viewBox: "0 0 1024 1024"
1669
+ }, [
1670
+ createElementVNode("path", {
1671
+ fill: "currentColor",
1672
+ d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"
1673
+ })
1674
+ ]));
1675
+ }
1676
+ });
1677
+
1678
+ // src/components/arrow-left.vue
1679
+ var arrow_left_default = arrow_left_vue_vue_type_script_setup_true_lang_default;
1680
+ var arrow_right_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1681
+ name: "ArrowRight",
1682
+ __name: "arrow-right",
1683
+ setup(__props) {
1684
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1685
+ xmlns: "http://www.w3.org/2000/svg",
1686
+ viewBox: "0 0 1024 1024"
1687
+ }, [
1688
+ createElementVNode("path", {
1689
+ fill: "currentColor",
1690
+ d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
1691
+ })
1692
+ ]));
1693
+ }
1694
+ });
1695
+
1696
+ // src/components/arrow-right.vue
1697
+ var arrow_right_default = arrow_right_vue_vue_type_script_setup_true_lang_default;
1698
+ var close_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1699
+ name: "Close",
1700
+ __name: "close",
1701
+ setup(__props) {
1702
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1703
+ xmlns: "http://www.w3.org/2000/svg",
1704
+ viewBox: "0 0 1024 1024"
1705
+ }, [
1706
+ createElementVNode("path", {
1707
+ fill: "currentColor",
1708
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
1709
+ })
1710
+ ]));
1711
+ }
1712
+ });
1713
+
1714
+ // src/components/close.vue
1715
+ var close_default = close_vue_vue_type_script_setup_true_lang_default;
1716
+ var full_screen_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1717
+ name: "FullScreen",
1718
+ __name: "full-screen",
1719
+ setup(__props) {
1720
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1721
+ xmlns: "http://www.w3.org/2000/svg",
1722
+ viewBox: "0 0 1024 1024"
1723
+ }, [
1724
+ createElementVNode("path", {
1725
+ fill: "currentColor",
1726
+ d: "m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"
1727
+ })
1728
+ ]));
1729
+ }
1730
+ });
1731
+
1732
+ // src/components/full-screen.vue
1733
+ var full_screen_default = full_screen_vue_vue_type_script_setup_true_lang_default;
1734
+ var refresh_left_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1735
+ name: "RefreshLeft",
1736
+ __name: "refresh-left",
1737
+ setup(__props) {
1738
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1739
+ xmlns: "http://www.w3.org/2000/svg",
1740
+ viewBox: "0 0 1024 1024"
1741
+ }, [
1742
+ createElementVNode("path", {
1743
+ fill: "currentColor",
1744
+ d: "M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"
1745
+ })
1746
+ ]));
1747
+ }
1748
+ });
1749
+
1750
+ // src/components/refresh-left.vue
1751
+ var refresh_left_default = refresh_left_vue_vue_type_script_setup_true_lang_default;
1752
+ var refresh_right_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1753
+ name: "RefreshRight",
1754
+ __name: "refresh-right",
1755
+ setup(__props) {
1756
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1757
+ xmlns: "http://www.w3.org/2000/svg",
1758
+ viewBox: "0 0 1024 1024"
1759
+ }, [
1760
+ createElementVNode("path", {
1761
+ fill: "currentColor",
1762
+ d: "M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"
1763
+ })
1764
+ ]));
1765
+ }
1766
+ });
1767
+
1768
+ // src/components/refresh-right.vue
1769
+ var refresh_right_default = refresh_right_vue_vue_type_script_setup_true_lang_default;
1770
+ var scale_to_original_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1771
+ name: "ScaleToOriginal",
1772
+ __name: "scale-to-original",
1773
+ setup(__props) {
1774
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1775
+ xmlns: "http://www.w3.org/2000/svg",
1776
+ viewBox: "0 0 1024 1024"
1777
+ }, [
1778
+ createElementVNode("path", {
1779
+ fill: "currentColor",
1780
+ d: "M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"
1781
+ })
1782
+ ]));
1783
+ }
1784
+ });
1785
+
1786
+ // src/components/scale-to-original.vue
1787
+ var scale_to_original_default = scale_to_original_vue_vue_type_script_setup_true_lang_default;
1788
+ var zoom_in_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1789
+ name: "ZoomIn",
1790
+ __name: "zoom-in",
1791
+ setup(__props) {
1792
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1793
+ xmlns: "http://www.w3.org/2000/svg",
1794
+ viewBox: "0 0 1024 1024"
1795
+ }, [
1796
+ createElementVNode("path", {
1797
+ fill: "currentColor",
1798
+ d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
1799
+ })
1800
+ ]));
1801
+ }
1802
+ });
1803
+
1804
+ // src/components/zoom-in.vue
1805
+ var zoom_in_default = zoom_in_vue_vue_type_script_setup_true_lang_default;
1806
+ var zoom_out_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
1807
+ name: "ZoomOut",
1808
+ __name: "zoom-out",
1809
+ setup(__props) {
1810
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1811
+ xmlns: "http://www.w3.org/2000/svg",
1812
+ viewBox: "0 0 1024 1024"
1813
+ }, [
1814
+ createElementVNode("path", {
1815
+ fill: "currentColor",
1816
+ d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"
1817
+ })
1818
+ ]));
1819
+ }
1820
+ });
1821
+
1822
+ // src/components/zoom-out.vue
1823
+ var zoom_out_default = zoom_out_vue_vue_type_script_setup_true_lang_default;
1824
+
1825
+ const epPropKey = "__epPropKey";
1826
+ const definePropType = (val) => val;
1827
+ const isEpProp = (val) => isObject$1(val) && !!val[epPropKey];
1828
+ const buildProp = (prop, key) => {
1829
+ if (!isObject$1(prop) || isEpProp(prop))
1830
+ return prop;
1831
+ const { values, required, default: defaultValue, type, validator } = prop;
1832
+ const _validator = values || validator ? (val) => {
1833
+ let valid = false;
1834
+ let allowedValues = [];
1835
+ if (values) {
1836
+ allowedValues = Array.from(values);
1837
+ if (hasOwn(prop, "default")) {
1838
+ allowedValues.push(defaultValue);
1839
+ }
1840
+ valid || (valid = allowedValues.includes(val));
1841
+ }
1842
+ if (validator)
1843
+ valid || (valid = validator(val));
1844
+ if (!valid && allowedValues.length > 0) {
1845
+ const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
1846
+ warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
1847
+ }
1848
+ return valid;
1849
+ } : void 0;
1850
+ const epProp = {
1851
+ type,
1852
+ required: !!required,
1853
+ validator: _validator,
1854
+ [epPropKey]: true
1855
+ };
1856
+ if (hasOwn(prop, "default"))
1857
+ epProp.default = defaultValue;
1858
+ return epProp;
1859
+ };
1860
+ const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
1861
+ key,
1862
+ buildProp(option, key)
1863
+ ]));
1864
+
1865
+ const withInstall = (main, extra) => {
1866
+ main.install = (app) => {
1867
+ for (const comp of [main, ...Object.values({})]) {
1868
+ app.component(comp.name, comp);
1869
+ }
1870
+ };
1871
+ return main;
1872
+ };
1873
+
1874
+ const EVENT_CODE = {
1875
+ tab: "Tab",
1876
+ enter: "Enter",
1877
+ space: "Space",
1878
+ left: "ArrowLeft",
1879
+ up: "ArrowUp",
1880
+ right: "ArrowRight",
1881
+ down: "ArrowDown",
1882
+ esc: "Escape",
1883
+ delete: "Delete",
1884
+ backspace: "Backspace",
1885
+ numpadEnter: "NumpadEnter",
1886
+ pageUp: "PageUp",
1887
+ pageDown: "PageDown",
1888
+ home: "Home",
1889
+ end: "End"
1890
+ };
1891
+
1892
+ const mutable = (val) => val;
1893
+
1894
+ var English = {
1895
+ name: "en",
1896
+ el: {
1897
+ colorpicker: {
1898
+ confirm: "OK",
1899
+ clear: "Clear",
1900
+ defaultLabel: "color picker",
1901
+ description: "current color is {color}. press enter to select a new color."
1902
+ },
1903
+ datepicker: {
1904
+ now: "Now",
1905
+ today: "Today",
1906
+ cancel: "Cancel",
1907
+ clear: "Clear",
1908
+ confirm: "OK",
1909
+ dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
1910
+ monthTablePrompt: "Use the arrow keys and enter to select the month",
1911
+ yearTablePrompt: "Use the arrow keys and enter to select the year",
1912
+ selectedDate: "Selected date",
1913
+ selectDate: "Select date",
1914
+ selectTime: "Select time",
1915
+ startDate: "Start Date",
1916
+ startTime: "Start Time",
1917
+ endDate: "End Date",
1918
+ endTime: "End Time",
1919
+ prevYear: "Previous Year",
1920
+ nextYear: "Next Year",
1921
+ prevMonth: "Previous Month",
1922
+ nextMonth: "Next Month",
1923
+ year: "",
1924
+ month1: "January",
1925
+ month2: "February",
1926
+ month3: "March",
1927
+ month4: "April",
1928
+ month5: "May",
1929
+ month6: "June",
1930
+ month7: "July",
1931
+ month8: "August",
1932
+ month9: "September",
1933
+ month10: "October",
1934
+ month11: "November",
1935
+ month12: "December",
1936
+ week: "week",
1937
+ weeks: {
1938
+ sun: "Sun",
1939
+ mon: "Mon",
1940
+ tue: "Tue",
1941
+ wed: "Wed",
1942
+ thu: "Thu",
1943
+ fri: "Fri",
1944
+ sat: "Sat"
1945
+ },
1946
+ weeksFull: {
1947
+ sun: "Sunday",
1948
+ mon: "Monday",
1949
+ tue: "Tuesday",
1950
+ wed: "Wednesday",
1951
+ thu: "Thursday",
1952
+ fri: "Friday",
1953
+ sat: "Saturday"
1954
+ },
1955
+ months: {
1956
+ jan: "Jan",
1957
+ feb: "Feb",
1958
+ mar: "Mar",
1959
+ apr: "Apr",
1960
+ may: "May",
1961
+ jun: "Jun",
1962
+ jul: "Jul",
1963
+ aug: "Aug",
1964
+ sep: "Sep",
1965
+ oct: "Oct",
1966
+ nov: "Nov",
1967
+ dec: "Dec"
1968
+ }
1969
+ },
1970
+ inputNumber: {
1971
+ decrease: "decrease number",
1972
+ increase: "increase number"
1973
+ },
1974
+ select: {
1975
+ loading: "Loading",
1976
+ noMatch: "No matching data",
1977
+ noData: "No data",
1978
+ placeholder: "Select"
1979
+ },
1980
+ dropdown: {
1981
+ toggleDropdown: "Toggle Dropdown"
1982
+ },
1983
+ cascader: {
1984
+ noMatch: "No matching data",
1985
+ loading: "Loading",
1986
+ placeholder: "Select",
1987
+ noData: "No data"
1988
+ },
1989
+ pagination: {
1990
+ goto: "Go to",
1991
+ pagesize: "/page",
1992
+ total: "Total {total}",
1993
+ pageClassifier: "",
1994
+ page: "Page",
1995
+ prev: "Go to previous page",
1996
+ next: "Go to next page",
1997
+ currentPage: "page {pager}",
1998
+ prevPages: "Previous {pager} pages",
1999
+ nextPages: "Next {pager} pages",
2000
+ deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
2001
+ },
2002
+ dialog: {
2003
+ close: "Close this dialog"
2004
+ },
2005
+ drawer: {
2006
+ close: "Close this dialog"
2007
+ },
2008
+ messagebox: {
2009
+ title: "Message",
2010
+ confirm: "OK",
2011
+ cancel: "Cancel",
2012
+ error: "Illegal input",
2013
+ close: "Close this dialog"
2014
+ },
2015
+ upload: {
2016
+ deleteTip: "press delete to remove",
2017
+ delete: "Delete",
2018
+ preview: "Preview",
2019
+ continue: "Continue"
2020
+ },
2021
+ slider: {
2022
+ defaultLabel: "slider between {min} and {max}",
2023
+ defaultRangeStartLabel: "pick start value",
2024
+ defaultRangeEndLabel: "pick end value"
2025
+ },
2026
+ table: {
2027
+ emptyText: "No Data",
2028
+ confirmFilter: "Confirm",
2029
+ resetFilter: "Reset",
2030
+ clearFilter: "All",
2031
+ sumText: "Sum"
2032
+ },
2033
+ tree: {
2034
+ emptyText: "No Data"
2035
+ },
2036
+ transfer: {
2037
+ noMatch: "No matching data",
2038
+ noData: "No data",
2039
+ titles: ["List 1", "List 2"],
2040
+ filterPlaceholder: "Enter keyword",
2041
+ noCheckedFormat: "{total} items",
2042
+ hasCheckedFormat: "{checked}/{total} checked"
2043
+ },
2044
+ image: {
2045
+ error: "FAILED"
2046
+ },
2047
+ pageHeader: {
2048
+ title: "Back"
2049
+ },
2050
+ popconfirm: {
2051
+ confirmButtonText: "Yes",
2052
+ cancelButtonText: "No"
2053
+ }
2054
+ }
2055
+ };
2056
+
2057
+ const buildTranslator = (locale) => (path, option) => translate(path, option, unref$1(locale));
2058
+ const translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
2059
+ var _a;
2060
+ return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
2061
+ });
2062
+ const buildLocaleContext = (locale) => {
2063
+ const lang = computed(() => unref$1(locale).name);
2064
+ const localeRef = isRef(locale) ? locale : ref(locale);
2065
+ return {
2066
+ lang,
2067
+ locale: localeRef,
2068
+ t: buildTranslator(locale)
2069
+ };
2070
+ };
2071
+ const localeContextKey = Symbol("localeContextKey");
2072
+ const useLocale = (localeOverrides) => {
2073
+ const locale = inject(localeContextKey, ref());
2074
+ return buildLocaleContext(computed(() => locale.value || English));
2075
+ };
2076
+
2077
+ const defaultNamespace = "el";
2078
+ const statePrefix = "is-";
2079
+ const _bem = (namespace, block, blockSuffix, element, modifier) => {
2080
+ let cls = `${namespace}-${block}`;
2081
+ if (blockSuffix) {
2082
+ cls += `-${blockSuffix}`;
2083
+ }
2084
+ if (element) {
2085
+ cls += `__${element}`;
2086
+ }
2087
+ if (modifier) {
2088
+ cls += `--${modifier}`;
2089
+ }
2090
+ return cls;
2091
+ };
2092
+ const namespaceContextKey = Symbol("namespaceContextKey");
2093
+ const useGetDerivedNamespace = (namespaceOverrides) => {
2094
+ const derivedNamespace = (getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace));
2095
+ const namespace = computed(() => {
2096
+ return unref$1(derivedNamespace) || defaultNamespace;
2097
+ });
2098
+ return namespace;
2099
+ };
2100
+ const useNamespace = (block, namespaceOverrides) => {
2101
+ const namespace = useGetDerivedNamespace();
2102
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
2103
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
2104
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
2105
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
2106
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
2107
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
2108
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
2109
+ const is = (name, ...args) => {
2110
+ const state = args.length >= 1 ? args[0] : true;
2111
+ return name && state ? `${statePrefix}${name}` : "";
2112
+ };
2113
+ const cssVar = (object) => {
2114
+ const styles = {};
2115
+ for (const key in object) {
2116
+ if (object[key]) {
2117
+ styles[`--${namespace.value}-${key}`] = object[key];
2118
+ }
2119
+ }
2120
+ return styles;
2121
+ };
2122
+ const cssVarBlock = (object) => {
2123
+ const styles = {};
2124
+ for (const key in object) {
2125
+ if (object[key]) {
2126
+ styles[`--${namespace.value}-${block}-${key}`] = object[key];
2127
+ }
2128
+ }
2129
+ return styles;
2130
+ };
2131
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
2132
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
2133
+ return {
2134
+ namespace,
2135
+ b,
2136
+ e,
2137
+ m,
2138
+ be,
2139
+ em,
2140
+ bm,
2141
+ bem,
2142
+ is,
2143
+ cssVar,
2144
+ cssVarName,
2145
+ cssVarBlock,
2146
+ cssVarBlockName
2147
+ };
2148
+ };
2149
+
2150
+ const zIndex = ref(0);
2151
+ const defaultInitialZIndex = 2e3;
2152
+ const zIndexContextKey = Symbol("zIndexContextKey");
2153
+ const useZIndex = (zIndexOverrides) => {
2154
+ const zIndexInjection = (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0);
2155
+ const initialZIndex = computed(() => {
2156
+ const zIndexFromInjection = unref$1(zIndexInjection);
2157
+ return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
2158
+ });
2159
+ const currentZIndex = computed(() => initialZIndex.value + zIndex.value);
2160
+ const nextZIndex = () => {
2161
+ zIndex.value++;
2162
+ return currentZIndex.value;
2163
+ };
2164
+ return {
2165
+ initialZIndex,
2166
+ currentZIndex,
2167
+ nextZIndex
2168
+ };
2169
+ };
2170
+
2171
+ var _export_sfc = (sfc, props) => {
2172
+ const target = sfc.__vccOpts || sfc;
2173
+ for (const [key, val] of props) {
2174
+ target[key] = val;
2175
+ }
2176
+ return target;
2177
+ };
2178
+
2179
+ const iconProps = buildProps({
2180
+ size: {
2181
+ type: definePropType([Number, String])
2182
+ },
2183
+ color: {
2184
+ type: String
2185
+ }
2186
+ });
2187
+
2188
+ const __default__$1 = defineComponent({
2189
+ name: "ElIcon",
2190
+ inheritAttrs: false
2191
+ });
2192
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2193
+ ...__default__$1,
2194
+ props: iconProps,
2195
+ setup(__props) {
2196
+ const props = __props;
2197
+ const ns = useNamespace("icon");
2198
+ const style = computed(() => {
2199
+ const { size, color } = props;
2200
+ if (!size && !color)
2201
+ return {};
2202
+ return {
2203
+ fontSize: isUndefined(size) ? void 0 : addUnit(size),
2204
+ "--color": color
2205
+ };
2206
+ });
2207
+ return (_ctx, _cache) => {
2208
+ return openBlock(), createElementBlock("i", mergeProps({
2209
+ class: unref$1(ns).b(),
2210
+ style: unref$1(style)
2211
+ }, _ctx.$attrs), [
2212
+ renderSlot(_ctx.$slots, "default")
2213
+ ], 16);
2214
+ };
2215
+ }
2216
+ });
2217
+ var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
2218
+
2219
+ const ElIcon = withInstall(Icon);
2220
+
2221
+ const imageViewerProps = buildProps({
2222
+ urlList: {
2223
+ type: definePropType(Array),
2224
+ default: () => mutable([])
2225
+ },
2226
+ zIndex: {
2227
+ type: Number
2228
+ },
2229
+ initialIndex: {
2230
+ type: Number,
2231
+ default: 0
2232
+ },
2233
+ infinite: {
2234
+ type: Boolean,
2235
+ default: true
2236
+ },
2237
+ hideOnClickModal: Boolean,
2238
+ teleported: Boolean,
2239
+ closeOnPressEscape: {
2240
+ type: Boolean,
2241
+ default: true
2242
+ },
2243
+ zoomRate: {
2244
+ type: Number,
2245
+ default: 1.2
2246
+ },
2247
+ minScale: {
2248
+ type: Number,
2249
+ default: 0.2
2250
+ },
2251
+ maxScale: {
2252
+ type: Number,
2253
+ default: 7
2254
+ }
2255
+ });
2256
+ const imageViewerEmits = {
2257
+ close: () => true,
2258
+ switch: (index) => isNumber(index),
2259
+ rotate: (deg) => isNumber(deg)
2260
+ };
2261
+
2262
+ const _hoisted_1 = ["src"];
2263
+ const __default__ = defineComponent({
2264
+ name: "ElImageViewer"
2265
+ });
2266
+ const _sfc_main = /* @__PURE__ */ defineComponent({
2267
+ ...__default__,
2268
+ props: imageViewerProps,
2269
+ emits: imageViewerEmits,
2270
+ setup(__props, { expose, emit }) {
2271
+ const props = __props;
2272
+ const modes = {
2273
+ CONTAIN: {
2274
+ name: "contain",
2275
+ icon: markRaw(full_screen_default)
2276
+ },
2277
+ ORIGINAL: {
2278
+ name: "original",
2279
+ icon: markRaw(scale_to_original_default)
2280
+ }
2281
+ };
2282
+ const { t } = useLocale();
2283
+ const ns = useNamespace("image-viewer");
2284
+ const { nextZIndex } = useZIndex();
2285
+ const wrapper = ref();
2286
+ const imgRefs = ref([]);
2287
+ const scopeEventListener = effectScope();
2288
+ const loading = ref(true);
2289
+ const activeIndex = ref(props.initialIndex);
2290
+ const mode = shallowRef(modes.CONTAIN);
2291
+ const transform = ref({
2292
+ scale: 1,
2293
+ deg: 0,
2294
+ offsetX: 0,
2295
+ offsetY: 0,
2296
+ enableTransition: false
2297
+ });
2298
+ const isSingle = computed(() => {
2299
+ const { urlList } = props;
2300
+ return urlList.length <= 1;
2301
+ });
2302
+ const isFirst = computed(() => {
2303
+ return activeIndex.value === 0;
2304
+ });
2305
+ const isLast = computed(() => {
2306
+ return activeIndex.value === props.urlList.length - 1;
2307
+ });
2308
+ const currentImg = computed(() => {
2309
+ return props.urlList[activeIndex.value];
2310
+ });
2311
+ const arrowPrevKls = computed(() => [
2312
+ ns.e("btn"),
2313
+ ns.e("prev"),
2314
+ ns.is("disabled", !props.infinite && isFirst.value)
2315
+ ]);
2316
+ const arrowNextKls = computed(() => [
2317
+ ns.e("btn"),
2318
+ ns.e("next"),
2319
+ ns.is("disabled", !props.infinite && isLast.value)
2320
+ ]);
2321
+ const imgStyle = computed(() => {
2322
+ const { scale, deg, offsetX, offsetY, enableTransition } = transform.value;
2323
+ let translateX = offsetX / scale;
2324
+ let translateY = offsetY / scale;
2325
+ switch (deg % 360) {
2326
+ case 90:
2327
+ case -270:
2328
+ [translateX, translateY] = [translateY, -translateX];
2329
+ break;
2330
+ case 180:
2331
+ case -180:
2332
+ [translateX, translateY] = [-translateX, -translateY];
2333
+ break;
2334
+ case 270:
2335
+ case -90:
2336
+ [translateX, translateY] = [-translateY, translateX];
2337
+ break;
2338
+ }
2339
+ const style = {
2340
+ transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
2341
+ transition: enableTransition ? "transform .3s" : ""
2342
+ };
2343
+ if (mode.value.name === modes.CONTAIN.name) {
2344
+ style.maxWidth = style.maxHeight = "100%";
2345
+ }
2346
+ return style;
2347
+ });
2348
+ const computedZIndex = computed(() => {
2349
+ return isNumber(props.zIndex) ? props.zIndex : nextZIndex();
2350
+ });
2351
+ function hide() {
2352
+ unregisterEventListener();
2353
+ emit("close");
2354
+ }
2355
+ function registerEventListener() {
2356
+ const keydownHandler = throttle((e) => {
2357
+ switch (e.code) {
2358
+ case EVENT_CODE.esc:
2359
+ props.closeOnPressEscape && hide();
2360
+ break;
2361
+ case EVENT_CODE.space:
2362
+ toggleMode();
2363
+ break;
2364
+ case EVENT_CODE.left:
2365
+ prev();
2366
+ break;
2367
+ case EVENT_CODE.up:
2368
+ handleActions("zoomIn");
2369
+ break;
2370
+ case EVENT_CODE.right:
2371
+ next();
2372
+ break;
2373
+ case EVENT_CODE.down:
2374
+ handleActions("zoomOut");
2375
+ break;
2376
+ }
2377
+ });
2378
+ const mousewheelHandler = throttle((e) => {
2379
+ const delta = e.deltaY || e.deltaX;
2380
+ handleActions(delta < 0 ? "zoomIn" : "zoomOut", {
2381
+ zoomRate: props.zoomRate,
2382
+ enableTransition: false
2383
+ });
2384
+ });
2385
+ scopeEventListener.run(() => {
2386
+ useEventListener(document, "keydown", keydownHandler);
2387
+ useEventListener(document, "wheel", mousewheelHandler);
2388
+ });
2389
+ }
2390
+ function unregisterEventListener() {
2391
+ scopeEventListener.stop();
2392
+ }
2393
+ function handleImgLoad() {
2394
+ loading.value = false;
2395
+ }
2396
+ function handleImgError(e) {
2397
+ loading.value = false;
2398
+ e.target.alt = t("el.image.error");
2399
+ }
2400
+ function handleMouseDown(e) {
2401
+ if (loading.value || e.button !== 0 || !wrapper.value)
2402
+ return;
2403
+ transform.value.enableTransition = false;
2404
+ const { offsetX, offsetY } = transform.value;
2405
+ const startX = e.pageX;
2406
+ const startY = e.pageY;
2407
+ const dragHandler = throttle((ev) => {
2408
+ transform.value = {
2409
+ ...transform.value,
2410
+ offsetX: offsetX + ev.pageX - startX,
2411
+ offsetY: offsetY + ev.pageY - startY
2412
+ };
2413
+ });
2414
+ const removeMousemove = useEventListener(document, "mousemove", dragHandler);
2415
+ useEventListener(document, "mouseup", () => {
2416
+ removeMousemove();
2417
+ });
2418
+ e.preventDefault();
2419
+ }
2420
+ function reset() {
2421
+ transform.value = {
2422
+ scale: 1,
2423
+ deg: 0,
2424
+ offsetX: 0,
2425
+ offsetY: 0,
2426
+ enableTransition: false
2427
+ };
2428
+ }
2429
+ function toggleMode() {
2430
+ if (loading.value)
2431
+ return;
2432
+ const modeNames = keysOf(modes);
2433
+ const modeValues = Object.values(modes);
2434
+ const currentMode = mode.value.name;
2435
+ const index = modeValues.findIndex((i) => i.name === currentMode);
2436
+ const nextIndex = (index + 1) % modeNames.length;
2437
+ mode.value = modes[modeNames[nextIndex]];
2438
+ reset();
2439
+ }
2440
+ function setActiveItem(index) {
2441
+ const len = props.urlList.length;
2442
+ activeIndex.value = (index + len) % len;
2443
+ }
2444
+ function prev() {
2445
+ if (isFirst.value && !props.infinite)
2446
+ return;
2447
+ setActiveItem(activeIndex.value - 1);
2448
+ }
2449
+ function next() {
2450
+ if (isLast.value && !props.infinite)
2451
+ return;
2452
+ setActiveItem(activeIndex.value + 1);
2453
+ }
2454
+ function handleActions(action, options = {}) {
2455
+ if (loading.value)
2456
+ return;
2457
+ const { minScale, maxScale } = props;
2458
+ const { zoomRate, rotateDeg, enableTransition } = {
2459
+ zoomRate: props.zoomRate,
2460
+ rotateDeg: 90,
2461
+ enableTransition: true,
2462
+ ...options
2463
+ };
2464
+ switch (action) {
2465
+ case "zoomOut":
2466
+ if (transform.value.scale > minScale) {
2467
+ transform.value.scale = Number.parseFloat((transform.value.scale / zoomRate).toFixed(3));
2468
+ }
2469
+ break;
2470
+ case "zoomIn":
2471
+ if (transform.value.scale < maxScale) {
2472
+ transform.value.scale = Number.parseFloat((transform.value.scale * zoomRate).toFixed(3));
2473
+ }
2474
+ break;
2475
+ case "clockwise":
2476
+ transform.value.deg += rotateDeg;
2477
+ emit("rotate", transform.value.deg);
2478
+ break;
2479
+ case "anticlockwise":
2480
+ transform.value.deg -= rotateDeg;
2481
+ emit("rotate", transform.value.deg);
2482
+ break;
2483
+ }
2484
+ transform.value.enableTransition = enableTransition;
2485
+ }
2486
+ watch$1(currentImg, () => {
2487
+ nextTick(() => {
2488
+ const $img = imgRefs.value[0];
2489
+ if (!($img == null ? void 0 : $img.complete)) {
2490
+ loading.value = true;
2491
+ }
2492
+ });
2493
+ });
2494
+ watch$1(activeIndex, (val) => {
2495
+ reset();
2496
+ emit("switch", val);
2497
+ });
2498
+ onMounted(() => {
2499
+ var _a, _b;
2500
+ registerEventListener();
2501
+ (_b = (_a = wrapper.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
2502
+ });
2503
+ expose({
2504
+ setActiveItem
2505
+ });
2506
+ return (_ctx, _cache) => {
2507
+ return openBlock(), createBlock(Teleport, {
2508
+ to: "body",
2509
+ disabled: !_ctx.teleported
2510
+ }, [
2511
+ createVNode(Transition, {
2512
+ name: "viewer-fade",
2513
+ appear: ""
2514
+ }, {
2515
+ default: withCtx(() => [
2516
+ createElementVNode("div", {
2517
+ ref_key: "wrapper",
2518
+ ref: wrapper,
2519
+ tabindex: -1,
2520
+ class: normalizeClass(unref$1(ns).e("wrapper")),
2521
+ style: normalizeStyle({ zIndex: unref$1(computedZIndex) })
2522
+ }, [
2523
+ createElementVNode("div", {
2524
+ class: normalizeClass(unref$1(ns).e("mask")),
2525
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.hideOnClickModal && hide(), ["self"]))
2526
+ }, null, 2),
2527
+ createCommentVNode(" CLOSE "),
2528
+ createElementVNode("span", {
2529
+ class: normalizeClass([unref$1(ns).e("btn"), unref$1(ns).e("close")]),
2530
+ onClick: hide
2531
+ }, [
2532
+ createVNode(unref$1(ElIcon), null, {
2533
+ default: withCtx(() => [
2534
+ createVNode(unref$1(close_default))
2535
+ ]),
2536
+ _: 1
2537
+ })
2538
+ ], 2),
2539
+ createCommentVNode(" ARROW "),
2540
+ !unref$1(isSingle) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2541
+ createElementVNode("span", {
2542
+ class: normalizeClass(unref$1(arrowPrevKls)),
2543
+ onClick: prev
2544
+ }, [
2545
+ createVNode(unref$1(ElIcon), null, {
2546
+ default: withCtx(() => [
2547
+ createVNode(unref$1(arrow_left_default))
2548
+ ]),
2549
+ _: 1
2550
+ })
2551
+ ], 2),
2552
+ createElementVNode("span", {
2553
+ class: normalizeClass(unref$1(arrowNextKls)),
2554
+ onClick: next
2555
+ }, [
2556
+ createVNode(unref$1(ElIcon), null, {
2557
+ default: withCtx(() => [
2558
+ createVNode(unref$1(arrow_right_default))
2559
+ ]),
2560
+ _: 1
2561
+ })
2562
+ ], 2)
2563
+ ], 64)) : createCommentVNode("v-if", true),
2564
+ createCommentVNode(" ACTIONS "),
2565
+ createElementVNode("div", {
2566
+ class: normalizeClass([unref$1(ns).e("btn"), unref$1(ns).e("actions")])
2567
+ }, [
2568
+ createElementVNode("div", {
2569
+ class: normalizeClass(unref$1(ns).e("actions__inner"))
2570
+ }, [
2571
+ createVNode(unref$1(ElIcon), {
2572
+ onClick: _cache[1] || (_cache[1] = ($event) => handleActions("zoomOut"))
2573
+ }, {
2574
+ default: withCtx(() => [
2575
+ createVNode(unref$1(zoom_out_default))
2576
+ ]),
2577
+ _: 1
2578
+ }),
2579
+ createVNode(unref$1(ElIcon), {
2580
+ onClick: _cache[2] || (_cache[2] = ($event) => handleActions("zoomIn"))
2581
+ }, {
2582
+ default: withCtx(() => [
2583
+ createVNode(unref$1(zoom_in_default))
2584
+ ]),
2585
+ _: 1
2586
+ }),
2587
+ createElementVNode("i", {
2588
+ class: normalizeClass(unref$1(ns).e("actions__divider"))
2589
+ }, null, 2),
2590
+ createVNode(unref$1(ElIcon), { onClick: toggleMode }, {
2591
+ default: withCtx(() => [
2592
+ (openBlock(), createBlock(resolveDynamicComponent(unref$1(mode).icon)))
2593
+ ]),
2594
+ _: 1
2595
+ }),
2596
+ createElementVNode("i", {
2597
+ class: normalizeClass(unref$1(ns).e("actions__divider"))
2598
+ }, null, 2),
2599
+ createVNode(unref$1(ElIcon), {
2600
+ onClick: _cache[3] || (_cache[3] = ($event) => handleActions("anticlockwise"))
2601
+ }, {
2602
+ default: withCtx(() => [
2603
+ createVNode(unref$1(refresh_left_default))
2604
+ ]),
2605
+ _: 1
2606
+ }),
2607
+ createVNode(unref$1(ElIcon), {
2608
+ onClick: _cache[4] || (_cache[4] = ($event) => handleActions("clockwise"))
2609
+ }, {
2610
+ default: withCtx(() => [
2611
+ createVNode(unref$1(refresh_right_default))
2612
+ ]),
2613
+ _: 1
2614
+ })
2615
+ ], 2)
2616
+ ], 2),
2617
+ createCommentVNode(" CANVAS "),
2618
+ createElementVNode("div", {
2619
+ class: normalizeClass(unref$1(ns).e("canvas"))
2620
+ }, [
2621
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.urlList, (url, i) => {
2622
+ return withDirectives((openBlock(), createElementBlock("img", {
2623
+ ref_for: true,
2624
+ ref: (el) => imgRefs.value[i] = el,
2625
+ key: url,
2626
+ src: url,
2627
+ style: normalizeStyle(unref$1(imgStyle)),
2628
+ class: normalizeClass(unref$1(ns).e("img")),
2629
+ onLoad: handleImgLoad,
2630
+ onError: handleImgError,
2631
+ onMousedown: handleMouseDown
2632
+ }, null, 46, _hoisted_1)), [
2633
+ [vShow, i === activeIndex.value]
2634
+ ]);
2635
+ }), 128))
2636
+ ], 2),
2637
+ renderSlot(_ctx.$slots, "default")
2638
+ ], 6)
2639
+ ]),
2640
+ _: 3
2641
+ })
2642
+ ], 8, ["disabled"]);
2643
+ };
2644
+ }
2645
+ });
2646
+ var ImageViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/image-viewer/src/image-viewer.vue"]]);
2647
+
2648
+ const ElImageViewer = withInstall(ImageViewer);
2649
+
2650
+ const sendMessageToMainApp = (type, data) => {
2651
+ const { __IN_DAS_MICRO_APP, __DAS_MAIN_APP_HREF } = window;
2652
+ if (!__IN_DAS_MICRO_APP || !__DAS_MAIN_APP_HREF) return;
2653
+ const { origin } = new URL(__DAS_MAIN_APP_HREF);
2654
+ window.top?.postMessage({ type, data }, origin);
2655
+ };
2656
+ const renderPreviewDom = (data) => {
2657
+ const div = document.createElement("div");
2658
+ div.classList.add("das-image-viewer-preview-btn-groups");
2659
+ const { previewList = [], previewBtns = [] } = data;
2660
+ const app = createApp(ElImageViewer, {
2661
+ urlList: previewList,
2662
+ onClose: () => {
2663
+ app.unmount();
2664
+ document.body.removeChild(div);
2665
+ }
2666
+ });
2667
+ document.body.appendChild(div);
2668
+ app.mount(div);
2669
+ setTimeout(() => {
2670
+ const previewImage = document.querySelector(".el-image-viewer__wrapper");
2671
+ previewImage?.classList.add("das-image-viewer-preview-btn-groups");
2672
+ previewImage?.classList.add(...previewBtns);
2673
+ }, 0);
2674
+ };
2675
+ const eventType = "proxy-image-preview";
2676
+ const microFrontend = {
2677
+ sendMessageToMainApp,
2678
+ // @ts-ignore
2679
+ isMicroApp: () => window.__IN_DAS_MICRO_APP && window.top !== window.self,
2680
+ addEventFromMicroApp: () => {
2681
+ window.addEventListener("message", (e) => {
2682
+ const { type, data } = e.data;
2683
+ if (type !== eventType) return;
2684
+ renderPreviewDom(data);
2685
+ });
2686
+ }
2687
+ };
2688
+ microFrontend.addEventFromMicroApp();
2689
+ const useImageViewer = () => {
2690
+ const onPreview = (options) => {
2691
+ const { previewList = [], previewBtnConfig = true } = options;
2692
+ const getPreviewBtns = () => {
2693
+ const arr = [];
2694
+ const config = previewBtnConfig;
2695
+ if (typeof config === "boolean") {
2696
+ if (config) return ["zoom_in", "zoom_out", "turn_left", "turn_right", "full_screen"];
2697
+ return [];
2698
+ }
2699
+ for (const key in config) {
2700
+ if (config[key]) arr.push(key);
2701
+ }
2702
+ return arr;
2703
+ };
2704
+ const data = {
2705
+ previewList,
2706
+ previewBtns: getPreviewBtns()
2707
+ };
2708
+ if (!microFrontend.isMicroApp()) return renderPreviewDom(data);
2709
+ microFrontend.sendMessageToMainApp(eventType, data);
2710
+ };
2711
+ return { onPreview };
2712
+ };
2713
+
2714
+ export { useImageViewer };