@vunk/form 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/components/button/index.d.ts +4 -0
  2. package/components/button/src/ctx.d.ts +96 -0
  3. package/components/button/src/index.vue.d.ts +495 -0
  4. package/components/button/src/types.d.ts +13 -0
  5. package/components/cascader/index.d.ts +6 -0
  6. package/components/cascader/src/ctx.d.ts +120 -0
  7. package/components/cascader/src/index.vue.d.ts +13955 -0
  8. package/components/cascader/src/types.d.ts +7 -0
  9. package/components/cascader/src/use.d.ts +5 -0
  10. package/components/checkbox/index.d.ts +5 -0
  11. package/components/checkbox/src/ctx.d.ts +89 -0
  12. package/components/checkbox/src/index.vue.d.ts +1099 -0
  13. package/components/checkbox/src/types.d.ts +8 -0
  14. package/components/color-picker/index.d.ts +4 -0
  15. package/components/color-picker/src/ctx.d.ts +80 -0
  16. package/components/color-picker/src/index.vue.d.ts +11135 -0
  17. package/components/color-picker/src/types.d.ts +7 -0
  18. package/components/date-picker/index.d.ts +5 -0
  19. package/components/date-picker/src/ctx.d.ts +158 -0
  20. package/components/date-picker/src/index.vue.d.ts +590 -0
  21. package/components/date-picker/src/types.d.ts +20 -0
  22. package/components/date-picker-range/index.d.ts +4 -0
  23. package/components/date-picker-range/src/ctx.d.ts +177 -0
  24. package/components/date-picker-range/src/index.vue.d.ts +410 -0
  25. package/components/date-picker-range/src/types.d.ts +12 -0
  26. package/components/download-plus/index.d.ts +4 -0
  27. package/components/download-plus/src/api.d.ts +13 -0
  28. package/components/download-plus/src/const.d.ts +9 -0
  29. package/components/download-plus/src/ctx.d.ts +84 -0
  30. package/components/download-plus/src/index.vue.d.ts +1020 -0
  31. package/components/download-plus/src/types.d.ts +17 -0
  32. package/components/esri-input-geojson/index.d.ts +6 -0
  33. package/components/esri-input-geojson/src/append.vue.d.ts +2259 -0
  34. package/components/esri-input-geojson/src/const.d.ts +12 -0
  35. package/components/esri-input-geojson/src/ctx.d.ts +223 -0
  36. package/components/esri-input-geojson/src/default-view.vue.d.ts +133 -0
  37. package/components/esri-input-geojson/src/index.vue.d.ts +1249 -0
  38. package/components/esri-input-geojson/src/types.d.ts +22 -0
  39. package/components/esri-input-geojson/src/viewer.vue.d.ts +427 -0
  40. package/components/form/index.d.ts +5 -0
  41. package/components/form/src/ctx.d.ts +84 -0
  42. package/components/form/src/index.vue.d.ts +789 -0
  43. package/components/form/src/types.d.ts +12 -0
  44. package/components/form/src/utils.d.ts +15 -0
  45. package/components/form-item/index.d.ts +5 -0
  46. package/components/form-item/src/ctx.d.ts +62 -0
  47. package/components/form-item/src/index.vue.d.ts +320 -0
  48. package/components/form-item/src/types.d.ts +6 -0
  49. package/components/form-item-renderer/index.cjs +9 -14
  50. package/components/form-item-renderer/index.d.ts +5 -0
  51. package/components/form-item-renderer/index.mjs +10 -16
  52. package/components/form-item-renderer/src/ctx.d.ts +16 -0
  53. package/components/form-item-renderer/src/index.vue.d.ts +38 -0
  54. package/components/form-item-renderer/src/symbols.d.ts +3 -0
  55. package/components/form-item-renderer/src/types.d.ts +7 -0
  56. package/components/form-item-renderer-template/index.d.ts +4 -0
  57. package/components/form-item-renderer-template/src/ctx.d.ts +7 -0
  58. package/components/form-item-renderer-template/src/index.vue.d.ts +16 -0
  59. package/components/form-item-renderer-template/src/types.d.ts +1 -0
  60. package/components/geoinput/index.d.ts +4 -0
  61. package/components/geoinput/src/ctx.d.ts +228 -0
  62. package/components/geoinput/src/index.vue.d.ts +519 -0
  63. package/components/geoinput/src/types.d.ts +12 -0
  64. package/components/geoinput-read/index.d.ts +5 -0
  65. package/components/geoinput-read/src/append.vue.d.ts +383 -0
  66. package/components/geoinput-read/src/core.vue.d.ts +644 -0
  67. package/components/geoinput-read/src/ctx.d.ts +199 -0
  68. package/components/geoinput-read/src/index.vue.d.ts +1169 -0
  69. package/components/geoinput-read/src/types.d.ts +3 -0
  70. package/components/geoinput-update/index.d.ts +5 -0
  71. package/components/geoinput-update/src/append.vue.d.ts +2246 -0
  72. package/components/geoinput-update/src/ctx.d.ts +207 -0
  73. package/components/geoinput-update/src/index.vue.d.ts +1302 -0
  74. package/components/geoinput-update/src/types.d.ts +6 -0
  75. package/components/index2.cjs +38 -0
  76. package/components/index2.mjs +37 -1
  77. package/components/input/index.d.ts +5 -0
  78. package/components/input/src/ctx.d.ts +148 -0
  79. package/components/input/src/index.vue.d.ts +809 -0
  80. package/components/input/src/types.d.ts +13 -0
  81. package/components/input-collection/index.cjs +2214 -0
  82. package/components/input-collection/index.css +11 -0
  83. package/components/input-collection/index.d.ts +4 -0
  84. package/components/input-collection/index.mjs +2208 -0
  85. package/components/input-collection/src/ctx.d.ts +65 -0
  86. package/components/input-collection/src/index.vue.d.ts +1149 -0
  87. package/components/input-collection/src/types.d.ts +3 -0
  88. package/components/input-link/index.d.ts +4 -0
  89. package/components/input-link/src/ctx.d.ts +179 -0
  90. package/components/input-link/src/index.vue.d.ts +385 -0
  91. package/components/input-link/src/types.d.ts +7 -0
  92. package/components/input-number/index.d.ts +4 -0
  93. package/components/input-number/src/ctx.d.ts +90 -0
  94. package/components/input-number/src/index.vue.d.ts +1783 -0
  95. package/components/input-number/src/types.d.ts +8 -0
  96. package/components/monaco-editor/index.css +1 -0
  97. package/components/monaco-editor/index.d.ts +4 -0
  98. package/components/monaco-editor/src/ctx.d.ts +70 -0
  99. package/components/monaco-editor/src/index.vue.d.ts +209 -0
  100. package/components/monaco-editor/src/types.d.ts +7 -0
  101. package/components/radio/index.d.ts +4 -0
  102. package/components/radio/src/ctx.d.ts +82 -0
  103. package/components/radio/src/index.vue.d.ts +629 -0
  104. package/components/radio/src/types.d.ts +8 -0
  105. package/components/select/index.d.ts +4 -0
  106. package/components/select/src/ctx.d.ts +156 -0
  107. package/components/select/src/index.vue.d.ts +13405 -0
  108. package/components/select/src/types.d.ts +11 -0
  109. package/components/slider/index.d.ts +4 -0
  110. package/components/slider/src/ctx.d.ts +127 -0
  111. package/components/slider/src/index.vue.d.ts +341 -0
  112. package/components/slider/src/types.d.ts +7 -0
  113. package/components/switch/index.d.ts +4 -0
  114. package/components/switch/src/ctx.d.ts +114 -0
  115. package/components/switch/src/index.vue.d.ts +584 -0
  116. package/components/switch/src/types.d.ts +8 -0
  117. package/components/template-instances-provider/index.cjs +26 -0
  118. package/components/template-instances-provider/index.d.ts +3 -0
  119. package/components/template-instances-provider/index.mjs +21 -0
  120. package/components/template-instances-provider/src/index.vue.d.ts +4 -0
  121. package/components/templates-default/index.d.ts +4 -0
  122. package/components/templates-default/src/ctx.d.ts +19 -0
  123. package/components/templates-default/src/index.vue.d.ts +198 -0
  124. package/components/templates-default/src/types.d.ts +53 -0
  125. package/components/templates-element-plus/index.d.ts +4 -0
  126. package/components/templates-element-plus/src/ctx.d.ts +9 -0
  127. package/components/templates-element-plus/src/index.vue.d.ts +206 -0
  128. package/components/templates-element-plus/src/types.d.ts +13 -0
  129. package/components/templates-esri/index.d.ts +4 -0
  130. package/components/templates-esri/src/ctx.d.ts +11 -0
  131. package/components/templates-esri/src/index.vue.d.ts +43 -0
  132. package/components/templates-esri/src/types.d.ts +2 -0
  133. package/components/templates-layout/index.d.ts +4 -0
  134. package/components/templates-layout/src/ctx.d.ts +9 -0
  135. package/components/templates-layout/src/index.vue.d.ts +161 -0
  136. package/components/templates-layout/src/types.d.ts +32 -0
  137. package/components/templates-mapbox/index.d.ts +4 -0
  138. package/components/templates-mapbox/src/ctx.d.ts +11 -0
  139. package/components/templates-mapbox/src/index.vue.d.ts +43 -0
  140. package/components/templates-mapbox/src/types.d.ts +3 -0
  141. package/components/templates-variant/index.d.ts +4 -0
  142. package/components/templates-variant/src/ctx.d.ts +11 -0
  143. package/components/templates-variant/src/index.vue.d.ts +43 -0
  144. package/components/templates-variant/src/types.d.ts +2 -0
  145. package/components/upload/index.d.ts +5 -0
  146. package/components/upload/index.mjs +1 -1
  147. package/components/upload/src/ctx.d.ts +180 -0
  148. package/components/upload/src/file.vue.d.ts +363 -0
  149. package/components/upload/src/index.vue.d.ts +2784 -0
  150. package/components/upload/src/types.d.ts +7 -0
  151. package/components/upload-plus/index.d.ts +6 -0
  152. package/components/upload-plus/index.mjs +1 -1
  153. package/components/upload-plus/src/api.d.ts +38 -0
  154. package/components/upload-plus/src/const.d.ts +9 -0
  155. package/components/upload-plus/src/ctx.d.ts +103 -0
  156. package/components/upload-plus/src/index.vue.d.ts +1077 -0
  157. package/components/upload-plus/src/types.d.ts +32 -0
  158. package/components/van-cascader/index.d.ts +4 -0
  159. package/components/van-cascader/src/ctx.d.ts +118 -0
  160. package/components/van-cascader/src/index.vue.d.ts +13312 -0
  161. package/components/van-cascader/src/types.d.ts +1 -0
  162. package/components/var-datetime-picker/index.d.ts +4 -0
  163. package/components/var-datetime-picker/src/const.d.ts +10 -0
  164. package/components/var-datetime-picker/src/ctx.d.ts +67 -0
  165. package/components/var-datetime-picker/src/index.vue.d.ts +771 -0
  166. package/components/var-datetime-picker/src/types.d.ts +22 -0
  167. package/components/vditor/index.d.ts +4 -0
  168. package/components/vditor/src/ctx.d.ts +77 -0
  169. package/components/vditor/src/index.vue.d.ts +324 -0
  170. package/components/vditor/src/types.d.ts +7 -0
  171. package/index.css +13 -0
  172. package/package.json +14 -1
@@ -0,0 +1,2208 @@
1
+ import { defineComponent, computed, createVNode, Fragment, resolveComponent, openBlock, createBlock, withCtx, normalizeProps, guardReactiveProps, createElementBlock, createTextVNode, createCommentVNode } from 'vue';
2
+ import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
3
+ import { VkTableColumns } from '@vunk/plus/components/table-columns';
4
+ import { ElTable, ElButton } from 'element-plus';
5
+ import { useComputedReadonly } from '@vunk/form/composables';
6
+ import { VkfTemplatesDefault } from '@vunk/form/components/templates-default';
7
+ import { VkfTemplateInstancesProvider } from '@vunk/form/components/template-instances-provider';
8
+ import { VkfFormItemRenderer } from '@vunk/form/components/form-item-renderer';
9
+ import { ensetData } from '@vunk/core';
10
+ import { p as plus_default, f as minus_default } from '../index2.mjs';
11
+ import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
12
+
13
+ const props = {
14
+ ..._VkfFormItemCtx.props,
15
+ columns: {
16
+ type: Array,
17
+ default: () => []
18
+ },
19
+ modelValue: {
20
+ type: Array,
21
+ default: () => []
22
+ },
23
+ readonly: {
24
+ type: Boolean,
25
+ default: void 0
26
+ }
27
+ };
28
+ const emits = {
29
+ "update:modelValue": null
30
+ };
31
+
32
+ /** Detect free variable `global` from Node.js. */
33
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
34
+
35
+ /** Detect free variable `self`. */
36
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
37
+
38
+ /** Used as a reference to the global object. */
39
+ var root = freeGlobal || freeSelf || Function('return this')();
40
+
41
+ /** Built-in value references. */
42
+ var Symbol = root.Symbol;
43
+
44
+ /** Used for built-in method references. */
45
+ var objectProto$b = Object.prototype;
46
+
47
+ /** Used to check objects for own properties. */
48
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
49
+
50
+ /**
51
+ * Used to resolve the
52
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
53
+ * of values.
54
+ */
55
+ var nativeObjectToString$1 = objectProto$b.toString;
56
+
57
+ /** Built-in value references. */
58
+ var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
59
+
60
+ /**
61
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
62
+ *
63
+ * @private
64
+ * @param {*} value The value to query.
65
+ * @returns {string} Returns the raw `toStringTag`.
66
+ */
67
+ function getRawTag(value) {
68
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
69
+ tag = value[symToStringTag$1];
70
+
71
+ try {
72
+ value[symToStringTag$1] = undefined;
73
+ var unmasked = true;
74
+ } catch (e) {}
75
+
76
+ var result = nativeObjectToString$1.call(value);
77
+ if (unmasked) {
78
+ if (isOwn) {
79
+ value[symToStringTag$1] = tag;
80
+ } else {
81
+ delete value[symToStringTag$1];
82
+ }
83
+ }
84
+ return result;
85
+ }
86
+
87
+ /** Used for built-in method references. */
88
+ var objectProto$a = Object.prototype;
89
+
90
+ /**
91
+ * Used to resolve the
92
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
93
+ * of values.
94
+ */
95
+ var nativeObjectToString = objectProto$a.toString;
96
+
97
+ /**
98
+ * Converts `value` to a string using `Object.prototype.toString`.
99
+ *
100
+ * @private
101
+ * @param {*} value The value to convert.
102
+ * @returns {string} Returns the converted string.
103
+ */
104
+ function objectToString(value) {
105
+ return nativeObjectToString.call(value);
106
+ }
107
+
108
+ /** `Object#toString` result references. */
109
+ var nullTag = '[object Null]',
110
+ undefinedTag = '[object Undefined]';
111
+
112
+ /** Built-in value references. */
113
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
114
+
115
+ /**
116
+ * The base implementation of `getTag` without fallbacks for buggy environments.
117
+ *
118
+ * @private
119
+ * @param {*} value The value to query.
120
+ * @returns {string} Returns the `toStringTag`.
121
+ */
122
+ function baseGetTag(value) {
123
+ if (value == null) {
124
+ return value === undefined ? undefinedTag : nullTag;
125
+ }
126
+ return (symToStringTag && symToStringTag in Object(value))
127
+ ? getRawTag(value)
128
+ : objectToString(value);
129
+ }
130
+
131
+ /**
132
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
133
+ * and has a `typeof` result of "object".
134
+ *
135
+ * @static
136
+ * @memberOf _
137
+ * @since 4.0.0
138
+ * @category Lang
139
+ * @param {*} value The value to check.
140
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
141
+ * @example
142
+ *
143
+ * _.isObjectLike({});
144
+ * // => true
145
+ *
146
+ * _.isObjectLike([1, 2, 3]);
147
+ * // => true
148
+ *
149
+ * _.isObjectLike(_.noop);
150
+ * // => false
151
+ *
152
+ * _.isObjectLike(null);
153
+ * // => false
154
+ */
155
+ function isObjectLike(value) {
156
+ return value != null && typeof value == 'object';
157
+ }
158
+
159
+ /**
160
+ * Checks if `value` is classified as an `Array` object.
161
+ *
162
+ * @static
163
+ * @memberOf _
164
+ * @since 0.1.0
165
+ * @category Lang
166
+ * @param {*} value The value to check.
167
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
168
+ * @example
169
+ *
170
+ * _.isArray([1, 2, 3]);
171
+ * // => true
172
+ *
173
+ * _.isArray(document.body.children);
174
+ * // => false
175
+ *
176
+ * _.isArray('abc');
177
+ * // => false
178
+ *
179
+ * _.isArray(_.noop);
180
+ * // => false
181
+ */
182
+ var isArray = Array.isArray;
183
+
184
+ /**
185
+ * Checks if `value` is the
186
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
187
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
188
+ *
189
+ * @static
190
+ * @memberOf _
191
+ * @since 0.1.0
192
+ * @category Lang
193
+ * @param {*} value The value to check.
194
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
195
+ * @example
196
+ *
197
+ * _.isObject({});
198
+ * // => true
199
+ *
200
+ * _.isObject([1, 2, 3]);
201
+ * // => true
202
+ *
203
+ * _.isObject(_.noop);
204
+ * // => true
205
+ *
206
+ * _.isObject(null);
207
+ * // => false
208
+ */
209
+ function isObject(value) {
210
+ var type = typeof value;
211
+ return value != null && (type == 'object' || type == 'function');
212
+ }
213
+
214
+ /** `Object#toString` result references. */
215
+ var asyncTag = '[object AsyncFunction]',
216
+ funcTag$2 = '[object Function]',
217
+ genTag$1 = '[object GeneratorFunction]',
218
+ proxyTag = '[object Proxy]';
219
+
220
+ /**
221
+ * Checks if `value` is classified as a `Function` object.
222
+ *
223
+ * @static
224
+ * @memberOf _
225
+ * @since 0.1.0
226
+ * @category Lang
227
+ * @param {*} value The value to check.
228
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
229
+ * @example
230
+ *
231
+ * _.isFunction(_);
232
+ * // => true
233
+ *
234
+ * _.isFunction(/abc/);
235
+ * // => false
236
+ */
237
+ function isFunction(value) {
238
+ if (!isObject(value)) {
239
+ return false;
240
+ }
241
+ // The use of `Object#toString` avoids issues with the `typeof` operator
242
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
243
+ var tag = baseGetTag(value);
244
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
245
+ }
246
+
247
+ /** Used to detect overreaching core-js shims. */
248
+ var coreJsData = root['__core-js_shared__'];
249
+
250
+ /** Used to detect methods masquerading as native. */
251
+ var maskSrcKey = (function() {
252
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
253
+ return uid ? ('Symbol(src)_1.' + uid) : '';
254
+ }());
255
+
256
+ /**
257
+ * Checks if `func` has its source masked.
258
+ *
259
+ * @private
260
+ * @param {Function} func The function to check.
261
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
262
+ */
263
+ function isMasked(func) {
264
+ return !!maskSrcKey && (maskSrcKey in func);
265
+ }
266
+
267
+ /** Used for built-in method references. */
268
+ var funcProto$1 = Function.prototype;
269
+
270
+ /** Used to resolve the decompiled source of functions. */
271
+ var funcToString$1 = funcProto$1.toString;
272
+
273
+ /**
274
+ * Converts `func` to its source code.
275
+ *
276
+ * @private
277
+ * @param {Function} func The function to convert.
278
+ * @returns {string} Returns the source code.
279
+ */
280
+ function toSource(func) {
281
+ if (func != null) {
282
+ try {
283
+ return funcToString$1.call(func);
284
+ } catch (e) {}
285
+ try {
286
+ return (func + '');
287
+ } catch (e) {}
288
+ }
289
+ return '';
290
+ }
291
+
292
+ /**
293
+ * Used to match `RegExp`
294
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
295
+ */
296
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
297
+
298
+ /** Used to detect host constructors (Safari). */
299
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
300
+
301
+ /** Used for built-in method references. */
302
+ var funcProto = Function.prototype,
303
+ objectProto$9 = Object.prototype;
304
+
305
+ /** Used to resolve the decompiled source of functions. */
306
+ var funcToString = funcProto.toString;
307
+
308
+ /** Used to check objects for own properties. */
309
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
310
+
311
+ /** Used to detect if a method is native. */
312
+ var reIsNative = RegExp('^' +
313
+ funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&')
314
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
315
+ );
316
+
317
+ /**
318
+ * The base implementation of `_.isNative` without bad shim checks.
319
+ *
320
+ * @private
321
+ * @param {*} value The value to check.
322
+ * @returns {boolean} Returns `true` if `value` is a native function,
323
+ * else `false`.
324
+ */
325
+ function baseIsNative(value) {
326
+ if (!isObject(value) || isMasked(value)) {
327
+ return false;
328
+ }
329
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
330
+ return pattern.test(toSource(value));
331
+ }
332
+
333
+ /**
334
+ * Gets the value at `key` of `object`.
335
+ *
336
+ * @private
337
+ * @param {Object} [object] The object to query.
338
+ * @param {string} key The key of the property to get.
339
+ * @returns {*} Returns the property value.
340
+ */
341
+ function getValue(object, key) {
342
+ return object == null ? undefined : object[key];
343
+ }
344
+
345
+ /**
346
+ * Gets the native function at `key` of `object`.
347
+ *
348
+ * @private
349
+ * @param {Object} object The object to query.
350
+ * @param {string} key The key of the method to get.
351
+ * @returns {*} Returns the function if it's native, else `undefined`.
352
+ */
353
+ function getNative(object, key) {
354
+ var value = getValue(object, key);
355
+ return baseIsNative(value) ? value : undefined;
356
+ }
357
+
358
+ /* Built-in method references that are verified to be native. */
359
+ var WeakMap = getNative(root, 'WeakMap');
360
+
361
+ /** Built-in value references. */
362
+ var objectCreate = Object.create;
363
+
364
+ /**
365
+ * The base implementation of `_.create` without support for assigning
366
+ * properties to the created object.
367
+ *
368
+ * @private
369
+ * @param {Object} proto The object to inherit from.
370
+ * @returns {Object} Returns the new object.
371
+ */
372
+ var baseCreate = (function() {
373
+ function object() {}
374
+ return function(proto) {
375
+ if (!isObject(proto)) {
376
+ return {};
377
+ }
378
+ if (objectCreate) {
379
+ return objectCreate(proto);
380
+ }
381
+ object.prototype = proto;
382
+ var result = new object;
383
+ object.prototype = undefined;
384
+ return result;
385
+ };
386
+ }());
387
+
388
+ var defineProperty = (function() {
389
+ try {
390
+ var func = getNative(Object, 'defineProperty');
391
+ func({}, '', {});
392
+ return func;
393
+ } catch (e) {}
394
+ }());
395
+
396
+ /**
397
+ * A specialized version of `_.forEach` for arrays without support for
398
+ * iteratee shorthands.
399
+ *
400
+ * @private
401
+ * @param {Array} [array] The array to iterate over.
402
+ * @param {Function} iteratee The function invoked per iteration.
403
+ * @returns {Array} Returns `array`.
404
+ */
405
+ function arrayEach(array, iteratee) {
406
+ var index = -1,
407
+ length = array == null ? 0 : array.length;
408
+
409
+ while (++index < length) {
410
+ if (iteratee(array[index], index, array) === false) {
411
+ break;
412
+ }
413
+ }
414
+ return array;
415
+ }
416
+
417
+ /** Used as references for various `Number` constants. */
418
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
419
+
420
+ /** Used to detect unsigned integer values. */
421
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
422
+
423
+ /**
424
+ * Checks if `value` is a valid array-like index.
425
+ *
426
+ * @private
427
+ * @param {*} value The value to check.
428
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
429
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
430
+ */
431
+ function isIndex(value, length) {
432
+ var type = typeof value;
433
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
434
+
435
+ return !!length &&
436
+ (type == 'number' ||
437
+ (type != 'symbol' && reIsUint.test(value))) &&
438
+ (value > -1 && value % 1 == 0 && value < length);
439
+ }
440
+
441
+ /**
442
+ * The base implementation of `assignValue` and `assignMergeValue` without
443
+ * value checks.
444
+ *
445
+ * @private
446
+ * @param {Object} object The object to modify.
447
+ * @param {string} key The key of the property to assign.
448
+ * @param {*} value The value to assign.
449
+ */
450
+ function baseAssignValue(object, key, value) {
451
+ if (key == '__proto__' && defineProperty) {
452
+ defineProperty(object, key, {
453
+ 'configurable': true,
454
+ 'enumerable': true,
455
+ 'value': value,
456
+ 'writable': true
457
+ });
458
+ } else {
459
+ object[key] = value;
460
+ }
461
+ }
462
+
463
+ /**
464
+ * Performs a
465
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
466
+ * comparison between two values to determine if they are equivalent.
467
+ *
468
+ * @static
469
+ * @memberOf _
470
+ * @since 4.0.0
471
+ * @category Lang
472
+ * @param {*} value The value to compare.
473
+ * @param {*} other The other value to compare.
474
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
475
+ * @example
476
+ *
477
+ * var object = { 'a': 1 };
478
+ * var other = { 'a': 1 };
479
+ *
480
+ * _.eq(object, object);
481
+ * // => true
482
+ *
483
+ * _.eq(object, other);
484
+ * // => false
485
+ *
486
+ * _.eq('a', 'a');
487
+ * // => true
488
+ *
489
+ * _.eq('a', Object('a'));
490
+ * // => false
491
+ *
492
+ * _.eq(NaN, NaN);
493
+ * // => true
494
+ */
495
+ function eq(value, other) {
496
+ return value === other || (value !== value && other !== other);
497
+ }
498
+
499
+ /** Used for built-in method references. */
500
+ var objectProto$8 = Object.prototype;
501
+
502
+ /** Used to check objects for own properties. */
503
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
504
+
505
+ /**
506
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
507
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
508
+ * for equality comparisons.
509
+ *
510
+ * @private
511
+ * @param {Object} object The object to modify.
512
+ * @param {string} key The key of the property to assign.
513
+ * @param {*} value The value to assign.
514
+ */
515
+ function assignValue(object, key, value) {
516
+ var objValue = object[key];
517
+ if (!(hasOwnProperty$6.call(object, key) && eq(objValue, value)) ||
518
+ (value === undefined && !(key in object))) {
519
+ baseAssignValue(object, key, value);
520
+ }
521
+ }
522
+
523
+ /** Used as references for various `Number` constants. */
524
+ var MAX_SAFE_INTEGER = 9007199254740991;
525
+
526
+ /**
527
+ * Checks if `value` is a valid array-like length.
528
+ *
529
+ * **Note:** This method is loosely based on
530
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
531
+ *
532
+ * @static
533
+ * @memberOf _
534
+ * @since 4.0.0
535
+ * @category Lang
536
+ * @param {*} value The value to check.
537
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
538
+ * @example
539
+ *
540
+ * _.isLength(3);
541
+ * // => true
542
+ *
543
+ * _.isLength(Number.MIN_VALUE);
544
+ * // => false
545
+ *
546
+ * _.isLength(Infinity);
547
+ * // => false
548
+ *
549
+ * _.isLength('3');
550
+ * // => false
551
+ */
552
+ function isLength(value) {
553
+ return typeof value == 'number' &&
554
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
555
+ }
556
+
557
+ /**
558
+ * Checks if `value` is array-like. A value is considered array-like if it's
559
+ * not a function and has a `value.length` that's an integer greater than or
560
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
561
+ *
562
+ * @static
563
+ * @memberOf _
564
+ * @since 4.0.0
565
+ * @category Lang
566
+ * @param {*} value The value to check.
567
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
568
+ * @example
569
+ *
570
+ * _.isArrayLike([1, 2, 3]);
571
+ * // => true
572
+ *
573
+ * _.isArrayLike(document.body.children);
574
+ * // => true
575
+ *
576
+ * _.isArrayLike('abc');
577
+ * // => true
578
+ *
579
+ * _.isArrayLike(_.noop);
580
+ * // => false
581
+ */
582
+ function isArrayLike(value) {
583
+ return value != null && isLength(value.length) && !isFunction(value);
584
+ }
585
+
586
+ /** Used for built-in method references. */
587
+ var objectProto$7 = Object.prototype;
588
+
589
+ /**
590
+ * Checks if `value` is likely a prototype object.
591
+ *
592
+ * @private
593
+ * @param {*} value The value to check.
594
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
595
+ */
596
+ function isPrototype(value) {
597
+ var Ctor = value && value.constructor,
598
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$7;
599
+
600
+ return value === proto;
601
+ }
602
+
603
+ /**
604
+ * The base implementation of `_.times` without support for iteratee shorthands
605
+ * or max array length checks.
606
+ *
607
+ * @private
608
+ * @param {number} n The number of times to invoke `iteratee`.
609
+ * @param {Function} iteratee The function invoked per iteration.
610
+ * @returns {Array} Returns the array of results.
611
+ */
612
+ function baseTimes(n, iteratee) {
613
+ var index = -1,
614
+ result = Array(n);
615
+
616
+ while (++index < n) {
617
+ result[index] = iteratee(index);
618
+ }
619
+ return result;
620
+ }
621
+
622
+ /** `Object#toString` result references. */
623
+ var argsTag$2 = '[object Arguments]';
624
+
625
+ /**
626
+ * The base implementation of `_.isArguments`.
627
+ *
628
+ * @private
629
+ * @param {*} value The value to check.
630
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
631
+ */
632
+ function baseIsArguments(value) {
633
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
634
+ }
635
+
636
+ /** Used for built-in method references. */
637
+ var objectProto$6 = Object.prototype;
638
+
639
+ /** Used to check objects for own properties. */
640
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
641
+
642
+ /** Built-in value references. */
643
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
644
+
645
+ /**
646
+ * Checks if `value` is likely an `arguments` object.
647
+ *
648
+ * @static
649
+ * @memberOf _
650
+ * @since 0.1.0
651
+ * @category Lang
652
+ * @param {*} value The value to check.
653
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
654
+ * else `false`.
655
+ * @example
656
+ *
657
+ * _.isArguments(function() { return arguments; }());
658
+ * // => true
659
+ *
660
+ * _.isArguments([1, 2, 3]);
661
+ * // => false
662
+ */
663
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
664
+ return isObjectLike(value) && hasOwnProperty$5.call(value, 'callee') &&
665
+ !propertyIsEnumerable$1.call(value, 'callee');
666
+ };
667
+
668
+ /**
669
+ * This method returns `false`.
670
+ *
671
+ * @static
672
+ * @memberOf _
673
+ * @since 4.13.0
674
+ * @category Util
675
+ * @returns {boolean} Returns `false`.
676
+ * @example
677
+ *
678
+ * _.times(2, _.stubFalse);
679
+ * // => [false, false]
680
+ */
681
+ function stubFalse() {
682
+ return false;
683
+ }
684
+
685
+ /** Detect free variable `exports`. */
686
+ var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
687
+
688
+ /** Detect free variable `module`. */
689
+ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
690
+
691
+ /** Detect the popular CommonJS extension `module.exports`. */
692
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
693
+
694
+ /** Built-in value references. */
695
+ var Buffer$1 = moduleExports$2 ? root.Buffer : undefined;
696
+
697
+ /* Built-in method references for those with the same name as other `lodash` methods. */
698
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
699
+
700
+ /**
701
+ * Checks if `value` is a buffer.
702
+ *
703
+ * @static
704
+ * @memberOf _
705
+ * @since 4.3.0
706
+ * @category Lang
707
+ * @param {*} value The value to check.
708
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
709
+ * @example
710
+ *
711
+ * _.isBuffer(new Buffer(2));
712
+ * // => true
713
+ *
714
+ * _.isBuffer(new Uint8Array(2));
715
+ * // => false
716
+ */
717
+ var isBuffer = nativeIsBuffer || stubFalse;
718
+
719
+ /** `Object#toString` result references. */
720
+ var argsTag$1 = '[object Arguments]',
721
+ arrayTag$1 = '[object Array]',
722
+ boolTag$2 = '[object Boolean]',
723
+ dateTag$2 = '[object Date]',
724
+ errorTag$1 = '[object Error]',
725
+ funcTag$1 = '[object Function]',
726
+ mapTag$4 = '[object Map]',
727
+ numberTag$2 = '[object Number]',
728
+ objectTag$2 = '[object Object]',
729
+ regexpTag$2 = '[object RegExp]',
730
+ setTag$4 = '[object Set]',
731
+ stringTag$2 = '[object String]',
732
+ weakMapTag$2 = '[object WeakMap]';
733
+
734
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
735
+ dataViewTag$3 = '[object DataView]',
736
+ float32Tag$2 = '[object Float32Array]',
737
+ float64Tag$2 = '[object Float64Array]',
738
+ int8Tag$2 = '[object Int8Array]',
739
+ int16Tag$2 = '[object Int16Array]',
740
+ int32Tag$2 = '[object Int32Array]',
741
+ uint8Tag$2 = '[object Uint8Array]',
742
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
743
+ uint16Tag$2 = '[object Uint16Array]',
744
+ uint32Tag$2 = '[object Uint32Array]';
745
+
746
+ /** Used to identify `toStringTag` values of typed arrays. */
747
+ var typedArrayTags = {};
748
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
749
+ typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
750
+ typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
751
+ typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
752
+ typedArrayTags[uint32Tag$2] = true;
753
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
754
+ typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
755
+ typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
756
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
757
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
758
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
759
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
760
+ typedArrayTags[weakMapTag$2] = false;
761
+
762
+ /**
763
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
764
+ *
765
+ * @private
766
+ * @param {*} value The value to check.
767
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
768
+ */
769
+ function baseIsTypedArray(value) {
770
+ return isObjectLike(value) &&
771
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
772
+ }
773
+
774
+ /**
775
+ * The base implementation of `_.unary` without support for storing metadata.
776
+ *
777
+ * @private
778
+ * @param {Function} func The function to cap arguments for.
779
+ * @returns {Function} Returns the new capped function.
780
+ */
781
+ function baseUnary(func) {
782
+ return function(value) {
783
+ return func(value);
784
+ };
785
+ }
786
+
787
+ /** Detect free variable `exports`. */
788
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
789
+
790
+ /** Detect free variable `module`. */
791
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
792
+
793
+ /** Detect the popular CommonJS extension `module.exports`. */
794
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
795
+
796
+ /** Detect free variable `process` from Node.js. */
797
+ var freeProcess = moduleExports$1 && freeGlobal.process;
798
+
799
+ /** Used to access faster Node.js helpers. */
800
+ var nodeUtil = (function() {
801
+ try {
802
+ // Use `util.types` for Node.js 10+.
803
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
804
+
805
+ if (types) {
806
+ return types;
807
+ }
808
+
809
+ // Legacy `process.binding('util')` for Node.js < 10.
810
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
811
+ } catch (e) {}
812
+ }());
813
+
814
+ /* Node.js helper references. */
815
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
816
+
817
+ /**
818
+ * Checks if `value` is classified as a typed array.
819
+ *
820
+ * @static
821
+ * @memberOf _
822
+ * @since 3.0.0
823
+ * @category Lang
824
+ * @param {*} value The value to check.
825
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
826
+ * @example
827
+ *
828
+ * _.isTypedArray(new Uint8Array);
829
+ * // => true
830
+ *
831
+ * _.isTypedArray([]);
832
+ * // => false
833
+ */
834
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
835
+
836
+ /** Used for built-in method references. */
837
+ var objectProto$5 = Object.prototype;
838
+
839
+ /** Used to check objects for own properties. */
840
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
841
+
842
+ /**
843
+ * Creates an array of the enumerable property names of the array-like `value`.
844
+ *
845
+ * @private
846
+ * @param {*} value The value to query.
847
+ * @param {boolean} inherited Specify returning inherited property names.
848
+ * @returns {Array} Returns the array of property names.
849
+ */
850
+ function arrayLikeKeys(value, inherited) {
851
+ var isArr = isArray(value),
852
+ isArg = !isArr && isArguments(value),
853
+ isBuff = !isArr && !isArg && isBuffer(value),
854
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
855
+ skipIndexes = isArr || isArg || isBuff || isType,
856
+ result = skipIndexes ? baseTimes(value.length, String) : [],
857
+ length = result.length;
858
+
859
+ for (var key in value) {
860
+ if ((hasOwnProperty$4.call(value, key)) &&
861
+ !(skipIndexes && (
862
+ // Safari 9 has enumerable `arguments.length` in strict mode.
863
+ key == 'length' ||
864
+ // Node.js 0.10 has enumerable non-index properties on buffers.
865
+ (isBuff && (key == 'offset' || key == 'parent')) ||
866
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
867
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
868
+ // Skip index properties.
869
+ isIndex(key, length)
870
+ ))) {
871
+ result.push(key);
872
+ }
873
+ }
874
+ return result;
875
+ }
876
+
877
+ /**
878
+ * Creates a unary function that invokes `func` with its argument transformed.
879
+ *
880
+ * @private
881
+ * @param {Function} func The function to wrap.
882
+ * @param {Function} transform The argument transform.
883
+ * @returns {Function} Returns the new function.
884
+ */
885
+ function overArg(func, transform) {
886
+ return function(arg) {
887
+ return func(transform(arg));
888
+ };
889
+ }
890
+
891
+ /* Built-in method references for those with the same name as other `lodash` methods. */
892
+ var nativeKeys = overArg(Object.keys, Object);
893
+
894
+ /** Used for built-in method references. */
895
+ var objectProto$4 = Object.prototype;
896
+
897
+ /** Used to check objects for own properties. */
898
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
899
+
900
+ /**
901
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
902
+ *
903
+ * @private
904
+ * @param {Object} object The object to query.
905
+ * @returns {Array} Returns the array of property names.
906
+ */
907
+ function baseKeys(object) {
908
+ if (!isPrototype(object)) {
909
+ return nativeKeys(object);
910
+ }
911
+ var result = [];
912
+ for (var key in Object(object)) {
913
+ if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
914
+ result.push(key);
915
+ }
916
+ }
917
+ return result;
918
+ }
919
+
920
+ /**
921
+ * Creates an array of the own enumerable property names of `object`.
922
+ *
923
+ * **Note:** Non-object values are coerced to objects. See the
924
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
925
+ * for more details.
926
+ *
927
+ * @static
928
+ * @since 0.1.0
929
+ * @memberOf _
930
+ * @category Object
931
+ * @param {Object} object The object to query.
932
+ * @returns {Array} Returns the array of property names.
933
+ * @example
934
+ *
935
+ * function Foo() {
936
+ * this.a = 1;
937
+ * this.b = 2;
938
+ * }
939
+ *
940
+ * Foo.prototype.c = 3;
941
+ *
942
+ * _.keys(new Foo);
943
+ * // => ['a', 'b'] (iteration order is not guaranteed)
944
+ *
945
+ * _.keys('hi');
946
+ * // => ['0', '1']
947
+ */
948
+ function keys(object) {
949
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
950
+ }
951
+
952
+ /* Built-in method references that are verified to be native. */
953
+ var nativeCreate = getNative(Object, 'create');
954
+
955
+ /**
956
+ * Removes all key-value entries from the hash.
957
+ *
958
+ * @private
959
+ * @name clear
960
+ * @memberOf Hash
961
+ */
962
+ function hashClear() {
963
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
964
+ this.size = 0;
965
+ }
966
+
967
+ /**
968
+ * Removes `key` and its value from the hash.
969
+ *
970
+ * @private
971
+ * @name delete
972
+ * @memberOf Hash
973
+ * @param {Object} hash The hash to modify.
974
+ * @param {string} key The key of the value to remove.
975
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
976
+ */
977
+ function hashDelete(key) {
978
+ var result = this.has(key) && delete this.__data__[key];
979
+ this.size -= result ? 1 : 0;
980
+ return result;
981
+ }
982
+
983
+ /** Used to stand-in for `undefined` hash values. */
984
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
985
+
986
+ /** Used for built-in method references. */
987
+ var objectProto$3 = Object.prototype;
988
+
989
+ /** Used to check objects for own properties. */
990
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
991
+
992
+ /**
993
+ * Gets the hash value for `key`.
994
+ *
995
+ * @private
996
+ * @name get
997
+ * @memberOf Hash
998
+ * @param {string} key The key of the value to get.
999
+ * @returns {*} Returns the entry value.
1000
+ */
1001
+ function hashGet(key) {
1002
+ var data = this.__data__;
1003
+ if (nativeCreate) {
1004
+ var result = data[key];
1005
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1006
+ }
1007
+ return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
1008
+ }
1009
+
1010
+ /** Used for built-in method references. */
1011
+ var objectProto$2 = Object.prototype;
1012
+
1013
+ /** Used to check objects for own properties. */
1014
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
1015
+
1016
+ /**
1017
+ * Checks if a hash value for `key` exists.
1018
+ *
1019
+ * @private
1020
+ * @name has
1021
+ * @memberOf Hash
1022
+ * @param {string} key The key of the entry to check.
1023
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1024
+ */
1025
+ function hashHas(key) {
1026
+ var data = this.__data__;
1027
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
1028
+ }
1029
+
1030
+ /** Used to stand-in for `undefined` hash values. */
1031
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1032
+
1033
+ /**
1034
+ * Sets the hash `key` to `value`.
1035
+ *
1036
+ * @private
1037
+ * @name set
1038
+ * @memberOf Hash
1039
+ * @param {string} key The key of the value to set.
1040
+ * @param {*} value The value to set.
1041
+ * @returns {Object} Returns the hash instance.
1042
+ */
1043
+ function hashSet(key, value) {
1044
+ var data = this.__data__;
1045
+ this.size += this.has(key) ? 0 : 1;
1046
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1047
+ return this;
1048
+ }
1049
+
1050
+ /**
1051
+ * Creates a hash object.
1052
+ *
1053
+ * @private
1054
+ * @constructor
1055
+ * @param {Array} [entries] The key-value pairs to cache.
1056
+ */
1057
+ function Hash(entries) {
1058
+ var index = -1,
1059
+ length = entries == null ? 0 : entries.length;
1060
+
1061
+ this.clear();
1062
+ while (++index < length) {
1063
+ var entry = entries[index];
1064
+ this.set(entry[0], entry[1]);
1065
+ }
1066
+ }
1067
+
1068
+ // Add methods to `Hash`.
1069
+ Hash.prototype.clear = hashClear;
1070
+ Hash.prototype['delete'] = hashDelete;
1071
+ Hash.prototype.get = hashGet;
1072
+ Hash.prototype.has = hashHas;
1073
+ Hash.prototype.set = hashSet;
1074
+
1075
+ /**
1076
+ * Removes all key-value entries from the list cache.
1077
+ *
1078
+ * @private
1079
+ * @name clear
1080
+ * @memberOf ListCache
1081
+ */
1082
+ function listCacheClear() {
1083
+ this.__data__ = [];
1084
+ this.size = 0;
1085
+ }
1086
+
1087
+ /**
1088
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1089
+ *
1090
+ * @private
1091
+ * @param {Array} array The array to inspect.
1092
+ * @param {*} key The key to search for.
1093
+ * @returns {number} Returns the index of the matched value, else `-1`.
1094
+ */
1095
+ function assocIndexOf(array, key) {
1096
+ var length = array.length;
1097
+ while (length--) {
1098
+ if (eq(array[length][0], key)) {
1099
+ return length;
1100
+ }
1101
+ }
1102
+ return -1;
1103
+ }
1104
+
1105
+ /** Used for built-in method references. */
1106
+ var arrayProto = Array.prototype;
1107
+
1108
+ /** Built-in value references. */
1109
+ var splice = arrayProto.splice;
1110
+
1111
+ /**
1112
+ * Removes `key` and its value from the list cache.
1113
+ *
1114
+ * @private
1115
+ * @name delete
1116
+ * @memberOf ListCache
1117
+ * @param {string} key The key of the value to remove.
1118
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1119
+ */
1120
+ function listCacheDelete(key) {
1121
+ var data = this.__data__,
1122
+ index = assocIndexOf(data, key);
1123
+
1124
+ if (index < 0) {
1125
+ return false;
1126
+ }
1127
+ var lastIndex = data.length - 1;
1128
+ if (index == lastIndex) {
1129
+ data.pop();
1130
+ } else {
1131
+ splice.call(data, index, 1);
1132
+ }
1133
+ --this.size;
1134
+ return true;
1135
+ }
1136
+
1137
+ /**
1138
+ * Gets the list cache value for `key`.
1139
+ *
1140
+ * @private
1141
+ * @name get
1142
+ * @memberOf ListCache
1143
+ * @param {string} key The key of the value to get.
1144
+ * @returns {*} Returns the entry value.
1145
+ */
1146
+ function listCacheGet(key) {
1147
+ var data = this.__data__,
1148
+ index = assocIndexOf(data, key);
1149
+
1150
+ return index < 0 ? undefined : data[index][1];
1151
+ }
1152
+
1153
+ /**
1154
+ * Checks if a list cache value for `key` exists.
1155
+ *
1156
+ * @private
1157
+ * @name has
1158
+ * @memberOf ListCache
1159
+ * @param {string} key The key of the entry to check.
1160
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1161
+ */
1162
+ function listCacheHas(key) {
1163
+ return assocIndexOf(this.__data__, key) > -1;
1164
+ }
1165
+
1166
+ /**
1167
+ * Sets the list cache `key` to `value`.
1168
+ *
1169
+ * @private
1170
+ * @name set
1171
+ * @memberOf ListCache
1172
+ * @param {string} key The key of the value to set.
1173
+ * @param {*} value The value to set.
1174
+ * @returns {Object} Returns the list cache instance.
1175
+ */
1176
+ function listCacheSet(key, value) {
1177
+ var data = this.__data__,
1178
+ index = assocIndexOf(data, key);
1179
+
1180
+ if (index < 0) {
1181
+ ++this.size;
1182
+ data.push([key, value]);
1183
+ } else {
1184
+ data[index][1] = value;
1185
+ }
1186
+ return this;
1187
+ }
1188
+
1189
+ /**
1190
+ * Creates an list cache object.
1191
+ *
1192
+ * @private
1193
+ * @constructor
1194
+ * @param {Array} [entries] The key-value pairs to cache.
1195
+ */
1196
+ function ListCache(entries) {
1197
+ var index = -1,
1198
+ length = entries == null ? 0 : entries.length;
1199
+
1200
+ this.clear();
1201
+ while (++index < length) {
1202
+ var entry = entries[index];
1203
+ this.set(entry[0], entry[1]);
1204
+ }
1205
+ }
1206
+
1207
+ // Add methods to `ListCache`.
1208
+ ListCache.prototype.clear = listCacheClear;
1209
+ ListCache.prototype['delete'] = listCacheDelete;
1210
+ ListCache.prototype.get = listCacheGet;
1211
+ ListCache.prototype.has = listCacheHas;
1212
+ ListCache.prototype.set = listCacheSet;
1213
+
1214
+ /* Built-in method references that are verified to be native. */
1215
+ var Map = getNative(root, 'Map');
1216
+
1217
+ /**
1218
+ * Removes all key-value entries from the map.
1219
+ *
1220
+ * @private
1221
+ * @name clear
1222
+ * @memberOf MapCache
1223
+ */
1224
+ function mapCacheClear() {
1225
+ this.size = 0;
1226
+ this.__data__ = {
1227
+ 'hash': new Hash,
1228
+ 'map': new (Map || ListCache),
1229
+ 'string': new Hash
1230
+ };
1231
+ }
1232
+
1233
+ /**
1234
+ * Checks if `value` is suitable for use as unique object key.
1235
+ *
1236
+ * @private
1237
+ * @param {*} value The value to check.
1238
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1239
+ */
1240
+ function isKeyable(value) {
1241
+ var type = typeof value;
1242
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1243
+ ? (value !== '__proto__')
1244
+ : (value === null);
1245
+ }
1246
+
1247
+ /**
1248
+ * Gets the data for `map`.
1249
+ *
1250
+ * @private
1251
+ * @param {Object} map The map to query.
1252
+ * @param {string} key The reference key.
1253
+ * @returns {*} Returns the map data.
1254
+ */
1255
+ function getMapData(map, key) {
1256
+ var data = map.__data__;
1257
+ return isKeyable(key)
1258
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1259
+ : data.map;
1260
+ }
1261
+
1262
+ /**
1263
+ * Removes `key` and its value from the map.
1264
+ *
1265
+ * @private
1266
+ * @name delete
1267
+ * @memberOf MapCache
1268
+ * @param {string} key The key of the value to remove.
1269
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1270
+ */
1271
+ function mapCacheDelete(key) {
1272
+ var result = getMapData(this, key)['delete'](key);
1273
+ this.size -= result ? 1 : 0;
1274
+ return result;
1275
+ }
1276
+
1277
+ /**
1278
+ * Gets the map value for `key`.
1279
+ *
1280
+ * @private
1281
+ * @name get
1282
+ * @memberOf MapCache
1283
+ * @param {string} key The key of the value to get.
1284
+ * @returns {*} Returns the entry value.
1285
+ */
1286
+ function mapCacheGet(key) {
1287
+ return getMapData(this, key).get(key);
1288
+ }
1289
+
1290
+ /**
1291
+ * Checks if a map value for `key` exists.
1292
+ *
1293
+ * @private
1294
+ * @name has
1295
+ * @memberOf MapCache
1296
+ * @param {string} key The key of the entry to check.
1297
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1298
+ */
1299
+ function mapCacheHas(key) {
1300
+ return getMapData(this, key).has(key);
1301
+ }
1302
+
1303
+ /**
1304
+ * Sets the map `key` to `value`.
1305
+ *
1306
+ * @private
1307
+ * @name set
1308
+ * @memberOf MapCache
1309
+ * @param {string} key The key of the value to set.
1310
+ * @param {*} value The value to set.
1311
+ * @returns {Object} Returns the map cache instance.
1312
+ */
1313
+ function mapCacheSet(key, value) {
1314
+ var data = getMapData(this, key),
1315
+ size = data.size;
1316
+
1317
+ data.set(key, value);
1318
+ this.size += data.size == size ? 0 : 1;
1319
+ return this;
1320
+ }
1321
+
1322
+ /**
1323
+ * Creates a map cache object to store key-value pairs.
1324
+ *
1325
+ * @private
1326
+ * @constructor
1327
+ * @param {Array} [entries] The key-value pairs to cache.
1328
+ */
1329
+ function MapCache(entries) {
1330
+ var index = -1,
1331
+ length = entries == null ? 0 : entries.length;
1332
+
1333
+ this.clear();
1334
+ while (++index < length) {
1335
+ var entry = entries[index];
1336
+ this.set(entry[0], entry[1]);
1337
+ }
1338
+ }
1339
+
1340
+ // Add methods to `MapCache`.
1341
+ MapCache.prototype.clear = mapCacheClear;
1342
+ MapCache.prototype['delete'] = mapCacheDelete;
1343
+ MapCache.prototype.get = mapCacheGet;
1344
+ MapCache.prototype.has = mapCacheHas;
1345
+ MapCache.prototype.set = mapCacheSet;
1346
+
1347
+ /**
1348
+ * Appends the elements of `values` to `array`.
1349
+ *
1350
+ * @private
1351
+ * @param {Array} array The array to modify.
1352
+ * @param {Array} values The values to append.
1353
+ * @returns {Array} Returns `array`.
1354
+ */
1355
+ function arrayPush(array, values) {
1356
+ var index = -1,
1357
+ length = values.length,
1358
+ offset = array.length;
1359
+
1360
+ while (++index < length) {
1361
+ array[offset + index] = values[index];
1362
+ }
1363
+ return array;
1364
+ }
1365
+
1366
+ /** Built-in value references. */
1367
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
1368
+
1369
+ /**
1370
+ * Removes all key-value entries from the stack.
1371
+ *
1372
+ * @private
1373
+ * @name clear
1374
+ * @memberOf Stack
1375
+ */
1376
+ function stackClear() {
1377
+ this.__data__ = new ListCache;
1378
+ this.size = 0;
1379
+ }
1380
+
1381
+ /**
1382
+ * Removes `key` and its value from the stack.
1383
+ *
1384
+ * @private
1385
+ * @name delete
1386
+ * @memberOf Stack
1387
+ * @param {string} key The key of the value to remove.
1388
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1389
+ */
1390
+ function stackDelete(key) {
1391
+ var data = this.__data__,
1392
+ result = data['delete'](key);
1393
+
1394
+ this.size = data.size;
1395
+ return result;
1396
+ }
1397
+
1398
+ /**
1399
+ * Gets the stack value for `key`.
1400
+ *
1401
+ * @private
1402
+ * @name get
1403
+ * @memberOf Stack
1404
+ * @param {string} key The key of the value to get.
1405
+ * @returns {*} Returns the entry value.
1406
+ */
1407
+ function stackGet(key) {
1408
+ return this.__data__.get(key);
1409
+ }
1410
+
1411
+ /**
1412
+ * Checks if a stack value for `key` exists.
1413
+ *
1414
+ * @private
1415
+ * @name has
1416
+ * @memberOf Stack
1417
+ * @param {string} key The key of the entry to check.
1418
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1419
+ */
1420
+ function stackHas(key) {
1421
+ return this.__data__.has(key);
1422
+ }
1423
+
1424
+ /** Used as the size to enable large array optimizations. */
1425
+ var LARGE_ARRAY_SIZE = 200;
1426
+
1427
+ /**
1428
+ * Sets the stack `key` to `value`.
1429
+ *
1430
+ * @private
1431
+ * @name set
1432
+ * @memberOf Stack
1433
+ * @param {string} key The key of the value to set.
1434
+ * @param {*} value The value to set.
1435
+ * @returns {Object} Returns the stack cache instance.
1436
+ */
1437
+ function stackSet(key, value) {
1438
+ var data = this.__data__;
1439
+ if (data instanceof ListCache) {
1440
+ var pairs = data.__data__;
1441
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1442
+ pairs.push([key, value]);
1443
+ this.size = ++data.size;
1444
+ return this;
1445
+ }
1446
+ data = this.__data__ = new MapCache(pairs);
1447
+ }
1448
+ data.set(key, value);
1449
+ this.size = data.size;
1450
+ return this;
1451
+ }
1452
+
1453
+ /**
1454
+ * Creates a stack cache object to store key-value pairs.
1455
+ *
1456
+ * @private
1457
+ * @constructor
1458
+ * @param {Array} [entries] The key-value pairs to cache.
1459
+ */
1460
+ function Stack(entries) {
1461
+ var data = this.__data__ = new ListCache(entries);
1462
+ this.size = data.size;
1463
+ }
1464
+
1465
+ // Add methods to `Stack`.
1466
+ Stack.prototype.clear = stackClear;
1467
+ Stack.prototype['delete'] = stackDelete;
1468
+ Stack.prototype.get = stackGet;
1469
+ Stack.prototype.has = stackHas;
1470
+ Stack.prototype.set = stackSet;
1471
+
1472
+ /** Detect free variable `exports`. */
1473
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1474
+
1475
+ /** Detect free variable `module`. */
1476
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1477
+
1478
+ /** Detect the popular CommonJS extension `module.exports`. */
1479
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1480
+
1481
+ /** Built-in value references. */
1482
+ var Buffer = moduleExports ? root.Buffer : undefined;
1483
+ Buffer ? Buffer.allocUnsafe : undefined;
1484
+
1485
+ /**
1486
+ * Creates a clone of `buffer`.
1487
+ *
1488
+ * @private
1489
+ * @param {Buffer} buffer The buffer to clone.
1490
+ * @param {boolean} [isDeep] Specify a deep clone.
1491
+ * @returns {Buffer} Returns the cloned buffer.
1492
+ */
1493
+ function cloneBuffer(buffer, isDeep) {
1494
+ {
1495
+ return buffer.slice();
1496
+ }
1497
+ }
1498
+
1499
+ /**
1500
+ * A specialized version of `_.filter` for arrays without support for
1501
+ * iteratee shorthands.
1502
+ *
1503
+ * @private
1504
+ * @param {Array} [array] The array to iterate over.
1505
+ * @param {Function} predicate The function invoked per iteration.
1506
+ * @returns {Array} Returns the new filtered array.
1507
+ */
1508
+ function arrayFilter(array, predicate) {
1509
+ var index = -1,
1510
+ length = array == null ? 0 : array.length,
1511
+ resIndex = 0,
1512
+ result = [];
1513
+
1514
+ while (++index < length) {
1515
+ var value = array[index];
1516
+ if (predicate(value, index, array)) {
1517
+ result[resIndex++] = value;
1518
+ }
1519
+ }
1520
+ return result;
1521
+ }
1522
+
1523
+ /**
1524
+ * This method returns a new empty array.
1525
+ *
1526
+ * @static
1527
+ * @memberOf _
1528
+ * @since 4.13.0
1529
+ * @category Util
1530
+ * @returns {Array} Returns the new empty array.
1531
+ * @example
1532
+ *
1533
+ * var arrays = _.times(2, _.stubArray);
1534
+ *
1535
+ * console.log(arrays);
1536
+ * // => [[], []]
1537
+ *
1538
+ * console.log(arrays[0] === arrays[1]);
1539
+ * // => false
1540
+ */
1541
+ function stubArray() {
1542
+ return [];
1543
+ }
1544
+
1545
+ /** Used for built-in method references. */
1546
+ var objectProto$1 = Object.prototype;
1547
+
1548
+ /** Built-in value references. */
1549
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
1550
+
1551
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1552
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1553
+
1554
+ /**
1555
+ * Creates an array of the own enumerable symbols of `object`.
1556
+ *
1557
+ * @private
1558
+ * @param {Object} object The object to query.
1559
+ * @returns {Array} Returns the array of symbols.
1560
+ */
1561
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
1562
+ if (object == null) {
1563
+ return [];
1564
+ }
1565
+ object = Object(object);
1566
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
1567
+ return propertyIsEnumerable.call(object, symbol);
1568
+ });
1569
+ };
1570
+
1571
+ /**
1572
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1573
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1574
+ * symbols of `object`.
1575
+ *
1576
+ * @private
1577
+ * @param {Object} object The object to query.
1578
+ * @param {Function} keysFunc The function to get the keys of `object`.
1579
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
1580
+ * @returns {Array} Returns the array of property names and symbols.
1581
+ */
1582
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1583
+ var result = keysFunc(object);
1584
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
1585
+ }
1586
+
1587
+ /**
1588
+ * Creates an array of own enumerable property names and symbols of `object`.
1589
+ *
1590
+ * @private
1591
+ * @param {Object} object The object to query.
1592
+ * @returns {Array} Returns the array of property names and symbols.
1593
+ */
1594
+ function getAllKeys(object) {
1595
+ return baseGetAllKeys(object, keys, getSymbols);
1596
+ }
1597
+
1598
+ /* Built-in method references that are verified to be native. */
1599
+ var DataView = getNative(root, 'DataView');
1600
+
1601
+ /* Built-in method references that are verified to be native. */
1602
+ var Promise$1 = getNative(root, 'Promise');
1603
+
1604
+ /* Built-in method references that are verified to be native. */
1605
+ var Set = getNative(root, 'Set');
1606
+
1607
+ /** `Object#toString` result references. */
1608
+ var mapTag$3 = '[object Map]',
1609
+ objectTag$1 = '[object Object]',
1610
+ promiseTag = '[object Promise]',
1611
+ setTag$3 = '[object Set]',
1612
+ weakMapTag$1 = '[object WeakMap]';
1613
+
1614
+ var dataViewTag$2 = '[object DataView]';
1615
+
1616
+ /** Used to detect maps, sets, and weakmaps. */
1617
+ var dataViewCtorString = toSource(DataView),
1618
+ mapCtorString = toSource(Map),
1619
+ promiseCtorString = toSource(Promise$1),
1620
+ setCtorString = toSource(Set),
1621
+ weakMapCtorString = toSource(WeakMap);
1622
+
1623
+ /**
1624
+ * Gets the `toStringTag` of `value`.
1625
+ *
1626
+ * @private
1627
+ * @param {*} value The value to query.
1628
+ * @returns {string} Returns the `toStringTag`.
1629
+ */
1630
+ var getTag = baseGetTag;
1631
+
1632
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
1633
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
1634
+ (Map && getTag(new Map) != mapTag$3) ||
1635
+ (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
1636
+ (Set && getTag(new Set) != setTag$3) ||
1637
+ (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
1638
+ getTag = function(value) {
1639
+ var result = baseGetTag(value),
1640
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
1641
+ ctorString = Ctor ? toSource(Ctor) : '';
1642
+
1643
+ if (ctorString) {
1644
+ switch (ctorString) {
1645
+ case dataViewCtorString: return dataViewTag$2;
1646
+ case mapCtorString: return mapTag$3;
1647
+ case promiseCtorString: return promiseTag;
1648
+ case setCtorString: return setTag$3;
1649
+ case weakMapCtorString: return weakMapTag$1;
1650
+ }
1651
+ }
1652
+ return result;
1653
+ };
1654
+ }
1655
+
1656
+ var getTag$1 = getTag;
1657
+
1658
+ /** Used for built-in method references. */
1659
+ var objectProto = Object.prototype;
1660
+
1661
+ /** Used to check objects for own properties. */
1662
+ var hasOwnProperty = objectProto.hasOwnProperty;
1663
+
1664
+ /**
1665
+ * Initializes an array clone.
1666
+ *
1667
+ * @private
1668
+ * @param {Array} array The array to clone.
1669
+ * @returns {Array} Returns the initialized clone.
1670
+ */
1671
+ function initCloneArray(array) {
1672
+ var length = array.length,
1673
+ result = new array.constructor(length);
1674
+
1675
+ // Add properties assigned by `RegExp#exec`.
1676
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
1677
+ result.index = array.index;
1678
+ result.input = array.input;
1679
+ }
1680
+ return result;
1681
+ }
1682
+
1683
+ /** Built-in value references. */
1684
+ var Uint8Array = root.Uint8Array;
1685
+
1686
+ /**
1687
+ * Creates a clone of `arrayBuffer`.
1688
+ *
1689
+ * @private
1690
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
1691
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
1692
+ */
1693
+ function cloneArrayBuffer(arrayBuffer) {
1694
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1695
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
1696
+ return result;
1697
+ }
1698
+
1699
+ /**
1700
+ * Creates a clone of `dataView`.
1701
+ *
1702
+ * @private
1703
+ * @param {Object} dataView The data view to clone.
1704
+ * @param {boolean} [isDeep] Specify a deep clone.
1705
+ * @returns {Object} Returns the cloned data view.
1706
+ */
1707
+ function cloneDataView(dataView, isDeep) {
1708
+ var buffer = cloneArrayBuffer(dataView.buffer) ;
1709
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
1710
+ }
1711
+
1712
+ /** Used to match `RegExp` flags from their coerced string values. */
1713
+ var reFlags = /\w*$/;
1714
+
1715
+ /**
1716
+ * Creates a clone of `regexp`.
1717
+ *
1718
+ * @private
1719
+ * @param {Object} regexp The regexp to clone.
1720
+ * @returns {Object} Returns the cloned regexp.
1721
+ */
1722
+ function cloneRegExp(regexp) {
1723
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
1724
+ result.lastIndex = regexp.lastIndex;
1725
+ return result;
1726
+ }
1727
+
1728
+ /** Used to convert symbols to primitives and strings. */
1729
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
1730
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
1731
+
1732
+ /**
1733
+ * Creates a clone of the `symbol` object.
1734
+ *
1735
+ * @private
1736
+ * @param {Object} symbol The symbol object to clone.
1737
+ * @returns {Object} Returns the cloned symbol object.
1738
+ */
1739
+ function cloneSymbol(symbol) {
1740
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
1741
+ }
1742
+
1743
+ /**
1744
+ * Creates a clone of `typedArray`.
1745
+ *
1746
+ * @private
1747
+ * @param {Object} typedArray The typed array to clone.
1748
+ * @param {boolean} [isDeep] Specify a deep clone.
1749
+ * @returns {Object} Returns the cloned typed array.
1750
+ */
1751
+ function cloneTypedArray(typedArray, isDeep) {
1752
+ var buffer = cloneArrayBuffer(typedArray.buffer) ;
1753
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1754
+ }
1755
+
1756
+ /** `Object#toString` result references. */
1757
+ var boolTag$1 = '[object Boolean]',
1758
+ dateTag$1 = '[object Date]',
1759
+ mapTag$2 = '[object Map]',
1760
+ numberTag$1 = '[object Number]',
1761
+ regexpTag$1 = '[object RegExp]',
1762
+ setTag$2 = '[object Set]',
1763
+ stringTag$1 = '[object String]',
1764
+ symbolTag$1 = '[object Symbol]';
1765
+
1766
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
1767
+ dataViewTag$1 = '[object DataView]',
1768
+ float32Tag$1 = '[object Float32Array]',
1769
+ float64Tag$1 = '[object Float64Array]',
1770
+ int8Tag$1 = '[object Int8Array]',
1771
+ int16Tag$1 = '[object Int16Array]',
1772
+ int32Tag$1 = '[object Int32Array]',
1773
+ uint8Tag$1 = '[object Uint8Array]',
1774
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
1775
+ uint16Tag$1 = '[object Uint16Array]',
1776
+ uint32Tag$1 = '[object Uint32Array]';
1777
+
1778
+ /**
1779
+ * Initializes an object clone based on its `toStringTag`.
1780
+ *
1781
+ * **Note:** This function only supports cloning values with tags of
1782
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
1783
+ *
1784
+ * @private
1785
+ * @param {Object} object The object to clone.
1786
+ * @param {string} tag The `toStringTag` of the object to clone.
1787
+ * @param {boolean} [isDeep] Specify a deep clone.
1788
+ * @returns {Object} Returns the initialized clone.
1789
+ */
1790
+ function initCloneByTag(object, tag, isDeep) {
1791
+ var Ctor = object.constructor;
1792
+ switch (tag) {
1793
+ case arrayBufferTag$1:
1794
+ return cloneArrayBuffer(object);
1795
+
1796
+ case boolTag$1:
1797
+ case dateTag$1:
1798
+ return new Ctor(+object);
1799
+
1800
+ case dataViewTag$1:
1801
+ return cloneDataView(object);
1802
+
1803
+ case float32Tag$1: case float64Tag$1:
1804
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
1805
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
1806
+ return cloneTypedArray(object);
1807
+
1808
+ case mapTag$2:
1809
+ return new Ctor;
1810
+
1811
+ case numberTag$1:
1812
+ case stringTag$1:
1813
+ return new Ctor(object);
1814
+
1815
+ case regexpTag$1:
1816
+ return cloneRegExp(object);
1817
+
1818
+ case setTag$2:
1819
+ return new Ctor;
1820
+
1821
+ case symbolTag$1:
1822
+ return cloneSymbol(object);
1823
+ }
1824
+ }
1825
+
1826
+ /**
1827
+ * Initializes an object clone.
1828
+ *
1829
+ * @private
1830
+ * @param {Object} object The object to clone.
1831
+ * @returns {Object} Returns the initialized clone.
1832
+ */
1833
+ function initCloneObject(object) {
1834
+ return (typeof object.constructor == 'function' && !isPrototype(object))
1835
+ ? baseCreate(getPrototype(object))
1836
+ : {};
1837
+ }
1838
+
1839
+ /** `Object#toString` result references. */
1840
+ var mapTag$1 = '[object Map]';
1841
+
1842
+ /**
1843
+ * The base implementation of `_.isMap` without Node.js optimizations.
1844
+ *
1845
+ * @private
1846
+ * @param {*} value The value to check.
1847
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
1848
+ */
1849
+ function baseIsMap(value) {
1850
+ return isObjectLike(value) && getTag$1(value) == mapTag$1;
1851
+ }
1852
+
1853
+ /* Node.js helper references. */
1854
+ var nodeIsMap = nodeUtil && nodeUtil.isMap;
1855
+
1856
+ /**
1857
+ * Checks if `value` is classified as a `Map` object.
1858
+ *
1859
+ * @static
1860
+ * @memberOf _
1861
+ * @since 4.3.0
1862
+ * @category Lang
1863
+ * @param {*} value The value to check.
1864
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
1865
+ * @example
1866
+ *
1867
+ * _.isMap(new Map);
1868
+ * // => true
1869
+ *
1870
+ * _.isMap(new WeakMap);
1871
+ * // => false
1872
+ */
1873
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
1874
+
1875
+ /** `Object#toString` result references. */
1876
+ var setTag$1 = '[object Set]';
1877
+
1878
+ /**
1879
+ * The base implementation of `_.isSet` without Node.js optimizations.
1880
+ *
1881
+ * @private
1882
+ * @param {*} value The value to check.
1883
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
1884
+ */
1885
+ function baseIsSet(value) {
1886
+ return isObjectLike(value) && getTag$1(value) == setTag$1;
1887
+ }
1888
+
1889
+ /* Node.js helper references. */
1890
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
1891
+
1892
+ /**
1893
+ * Checks if `value` is classified as a `Set` object.
1894
+ *
1895
+ * @static
1896
+ * @memberOf _
1897
+ * @since 4.3.0
1898
+ * @category Lang
1899
+ * @param {*} value The value to check.
1900
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
1901
+ * @example
1902
+ *
1903
+ * _.isSet(new Set);
1904
+ * // => true
1905
+ *
1906
+ * _.isSet(new WeakSet);
1907
+ * // => false
1908
+ */
1909
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
1910
+
1911
+ /** `Object#toString` result references. */
1912
+ var argsTag = '[object Arguments]',
1913
+ arrayTag = '[object Array]',
1914
+ boolTag = '[object Boolean]',
1915
+ dateTag = '[object Date]',
1916
+ errorTag = '[object Error]',
1917
+ funcTag = '[object Function]',
1918
+ genTag = '[object GeneratorFunction]',
1919
+ mapTag = '[object Map]',
1920
+ numberTag = '[object Number]',
1921
+ objectTag = '[object Object]',
1922
+ regexpTag = '[object RegExp]',
1923
+ setTag = '[object Set]',
1924
+ stringTag = '[object String]',
1925
+ symbolTag = '[object Symbol]',
1926
+ weakMapTag = '[object WeakMap]';
1927
+
1928
+ var arrayBufferTag = '[object ArrayBuffer]',
1929
+ dataViewTag = '[object DataView]',
1930
+ float32Tag = '[object Float32Array]',
1931
+ float64Tag = '[object Float64Array]',
1932
+ int8Tag = '[object Int8Array]',
1933
+ int16Tag = '[object Int16Array]',
1934
+ int32Tag = '[object Int32Array]',
1935
+ uint8Tag = '[object Uint8Array]',
1936
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1937
+ uint16Tag = '[object Uint16Array]',
1938
+ uint32Tag = '[object Uint32Array]';
1939
+
1940
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
1941
+ var cloneableTags = {};
1942
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
1943
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
1944
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
1945
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
1946
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
1947
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
1948
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
1949
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
1950
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
1951
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
1952
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1953
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
1954
+ cloneableTags[weakMapTag] = false;
1955
+
1956
+ /**
1957
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
1958
+ * traversed objects.
1959
+ *
1960
+ * @private
1961
+ * @param {*} value The value to clone.
1962
+ * @param {boolean} bitmask The bitmask flags.
1963
+ * 1 - Deep clone
1964
+ * 2 - Flatten inherited properties
1965
+ * 4 - Clone symbols
1966
+ * @param {Function} [customizer] The function to customize cloning.
1967
+ * @param {string} [key] The key of `value`.
1968
+ * @param {Object} [object] The parent object of `value`.
1969
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
1970
+ * @returns {*} Returns the cloned value.
1971
+ */
1972
+ function baseClone(value, bitmask, customizer, key, object, stack) {
1973
+ var result;
1974
+ if (result !== undefined) {
1975
+ return result;
1976
+ }
1977
+ if (!isObject(value)) {
1978
+ return value;
1979
+ }
1980
+ var isArr = isArray(value);
1981
+ if (isArr) {
1982
+ result = initCloneArray(value);
1983
+ } else {
1984
+ var tag = getTag$1(value),
1985
+ isFunc = tag == funcTag || tag == genTag;
1986
+
1987
+ if (isBuffer(value)) {
1988
+ return cloneBuffer(value);
1989
+ }
1990
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
1991
+ result = (isFunc) ? {} : initCloneObject(value);
1992
+ } else {
1993
+ if (!cloneableTags[tag]) {
1994
+ return object ? value : {};
1995
+ }
1996
+ result = initCloneByTag(value, tag);
1997
+ }
1998
+ }
1999
+ // Check for circular references and return its corresponding clone.
2000
+ stack || (stack = new Stack);
2001
+ var stacked = stack.get(value);
2002
+ if (stacked) {
2003
+ return stacked;
2004
+ }
2005
+ stack.set(value, result);
2006
+
2007
+ if (isSet(value)) {
2008
+ value.forEach(function(subValue) {
2009
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
2010
+ });
2011
+ } else if (isMap(value)) {
2012
+ value.forEach(function(subValue, key) {
2013
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
2014
+ });
2015
+ }
2016
+
2017
+ var keysFunc = (getAllKeys)
2018
+ ;
2019
+
2020
+ var props = isArr ? undefined : keysFunc(value);
2021
+ arrayEach(props || value, function(subValue, key) {
2022
+ if (props) {
2023
+ key = subValue;
2024
+ subValue = value[key];
2025
+ }
2026
+ // Recursively populate clone (susceptible to call stack limits).
2027
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
2028
+ });
2029
+ return result;
2030
+ }
2031
+
2032
+ /** Used to compose bitmasks for cloning. */
2033
+ var CLONE_DEEP_FLAG = 1,
2034
+ CLONE_SYMBOLS_FLAG = 4;
2035
+
2036
+ /**
2037
+ * This method is like `_.clone` except that it recursively clones `value`.
2038
+ *
2039
+ * @static
2040
+ * @memberOf _
2041
+ * @since 1.0.0
2042
+ * @category Lang
2043
+ * @param {*} value The value to recursively clone.
2044
+ * @returns {*} Returns the deep cloned value.
2045
+ * @see _.clone
2046
+ * @example
2047
+ *
2048
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
2049
+ *
2050
+ * var deep = _.cloneDeep(objects);
2051
+ * console.log(deep[0] === objects[0]);
2052
+ * // => false
2053
+ */
2054
+ function cloneDeep(value) {
2055
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2056
+ }
2057
+
2058
+ var _sfc_main = /* @__PURE__ */ defineComponent({
2059
+ name: "VkfInputCollection",
2060
+ components: {
2061
+ ElTable,
2062
+ ElButton,
2063
+ VkTableColumns,
2064
+ VkfFormItem,
2065
+ VkfTemplateInstancesProvider,
2066
+ VkfTemplatesDefault
2067
+ },
2068
+ props,
2069
+ emits,
2070
+ setup(props2, {
2071
+ emit
2072
+ }) {
2073
+ const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
2074
+ const readonly = useComputedReadonly(props2);
2075
+ const fullColumns = computed(() => {
2076
+ return props2.columns.map(column => {
2077
+ return {
2078
+ ...column,
2079
+ slots: ({
2080
+ $index
2081
+ }) => createVNode(VkfFormItemRenderer, {
2082
+ "source": [{
2083
+ prop: [$index, column.prop].flat(),
2084
+ templateType: column.templateType,
2085
+ readonly: readonly.value
2086
+ }]
2087
+ }, null)
2088
+ };
2089
+ });
2090
+ });
2091
+ const buttonsColumn = computed(() => ({
2092
+ label: "\u64CD\u4F5C",
2093
+ align: "center",
2094
+ width: "120px",
2095
+ hidden: readonly.value,
2096
+ slots: ({
2097
+ $index
2098
+ }) => createVNode(Fragment, null, [createVNode(ElButton, {
2099
+ "size": "small",
2100
+ "icon": plus_default,
2101
+ "onClick": () => handlePlus($index)
2102
+ }, null), createVNode(ElButton, {
2103
+ "size": "small",
2104
+ "icon": minus_default,
2105
+ "onClick": () => handleMinus($index)
2106
+ }, null)])
2107
+ }));
2108
+ function handlePlus(index) {
2109
+ const data = cloneDeep(props2.modelValue);
2110
+ data.splice(index + 1, 0, {});
2111
+ emit("update:modelValue", data);
2112
+ }
2113
+ function handleMinus(index) {
2114
+ const data = cloneDeep(props2.modelValue);
2115
+ data.splice(index, 1);
2116
+ emit("update:modelValue", data);
2117
+ }
2118
+ const addToFirst = () => {
2119
+ emit("update:modelValue", [{}, ...props2.modelValue]);
2120
+ };
2121
+ const handleFormSetData = e => {
2122
+ const data = cloneDeep(props2.modelValue);
2123
+ ensetData(data, e);
2124
+ emit("update:modelValue", data);
2125
+ };
2126
+ return {
2127
+ addToFirst,
2128
+ formItemBindProps,
2129
+ readonly,
2130
+ fullColumns,
2131
+ buttonsColumn,
2132
+ handleFormSetData
2133
+ };
2134
+ }
2135
+ });
2136
+
2137
+ const _hoisted_1 = {
2138
+ key: 0,
2139
+ class: "vkf-input-collection-options"
2140
+ };
2141
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2142
+ const _component_VkfTemplatesDefault = resolveComponent("VkfTemplatesDefault");
2143
+ const _component_ElButton = resolveComponent("ElButton");
2144
+ const _component_VkTableColumns = resolveComponent("VkTableColumns");
2145
+ const _component_ElTable = resolveComponent("ElTable");
2146
+ const _component_VkfFormItem = resolveComponent("VkfFormItem");
2147
+ const _component_VkfTemplateInstancesProvider = resolveComponent("VkfTemplateInstancesProvider");
2148
+ return openBlock(), createBlock(_component_VkfTemplateInstancesProvider, null, {
2149
+ default: withCtx(() => [
2150
+ createVNode(_component_VkfTemplatesDefault, {
2151
+ data: _ctx.modelValue,
2152
+ onSetData: _ctx.handleFormSetData
2153
+ }, null, 8, ["data", "onSetData"]),
2154
+ createVNode(
2155
+ _component_VkfFormItem,
2156
+ normalizeProps(guardReactiveProps(_ctx.formItemBindProps)),
2157
+ {
2158
+ default: withCtx(() => [
2159
+ !_ctx.readonly ? (openBlock(), createElementBlock("div", _hoisted_1, [
2160
+ createVNode(_component_ElButton, {
2161
+ type: "primary",
2162
+ onClick: _ctx.addToFirst
2163
+ }, {
2164
+ default: withCtx(() => _cache[0] || (_cache[0] = [
2165
+ createTextVNode(" \u6DFB\u52A0 ")
2166
+ ])),
2167
+ _: 1
2168
+ /* STABLE */
2169
+ }, 8, ["onClick"])
2170
+ ])) : createCommentVNode("v-if", true),
2171
+ createVNode(_component_ElTable, {
2172
+ data: _ctx.modelValue,
2173
+ class: "vkf-input-collection-table"
2174
+ }, {
2175
+ default: withCtx(() => [
2176
+ createVNode(_component_VkTableColumns, {
2177
+ source: [
2178
+ ..._ctx.fullColumns,
2179
+ _ctx.buttonsColumn
2180
+ ]
2181
+ }, null, 8, ["source"])
2182
+ ]),
2183
+ _: 1
2184
+ /* STABLE */
2185
+ }, 8, ["data"])
2186
+ ]),
2187
+ _: 1
2188
+ /* STABLE */
2189
+ },
2190
+ 16
2191
+ /* FULL_PROPS */
2192
+ )
2193
+ ]),
2194
+ _: 1
2195
+ /* STABLE */
2196
+ });
2197
+ }
2198
+ var VkfInputCollection = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-collection/src/index.vue"]]);
2199
+
2200
+ var types = /*#__PURE__*/Object.freeze({
2201
+ __proto__: null
2202
+ });
2203
+
2204
+ VkfInputCollection.install = (app) => {
2205
+ app.component(VkfInputCollection.name || "VkfInputCollection", VkfInputCollection);
2206
+ };
2207
+
2208
+ export { VkfInputCollection, types as __VkfInputCollection, VkfInputCollection as default };